Video coding method and apparatus based on conversion

JP2026169391APending Publication Date: 2026-10-16LG ELECTRONICS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2026185024
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2019-11-11
Filing Date
2026-08-06
Publication Date
2026-10-16

AI Technical Summary

Benefits of technology

【0018】 本文書によると、全般的な映像/ビデオ圧縮効率を上げることができる。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026169391000001_ABST
    Figure 2026169391000001_ABST
Patent Text Reader

Abstract

Providing a video decoding method. [Solution] The video decoding method according to this document includes the step of applying an inverse linear transformation to the transformation coefficients to derive a residual sample for the current block, wherein the inverse linear transformation is performed based on the MTS index received from the bitstream, and the MTS index is parsed based on the absence of effective coefficients in a second region excluding the first region at the upper left of the current block, wherein the first region is the 16x16 region at the upper left of the current block.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This document relates to image coding technology, and more specifically, to an image coding method and apparatus based on transformation in an image coding system. [Background technology]

[0002] In recent years, the demand for high-resolution, high-quality images and videos, such as 4K or 8K or higher UHD (Ultra High Definition) images and videos, has been increasing in various fields. As image and video data become higher resolution and higher quality, the amount of information or bits transmitted relative to existing image and video data increases. Therefore, when transmitting image data using existing wired or wireless broadband lines, or storing image and video data using existing storage media, transmission and storage costs increase.

[0003] Furthermore, in recent years, interest in and demand for immersive media such as VR (Virtual Reality), AR (Artificial Reality), and holograms have increased, and there has been a rise in broadcasting of images / videos with image characteristics different from real-world images, such as game images.

[0004] Therefore, highly efficient image / video compression technology is required to effectively compress, transmit, store, and play back high-resolution, high-quality image / video information with the various characteristics described above. [Overview of the Initiative] [Problems that the invention aims to solve]

[0005] The technical objective of this document is to provide a method and apparatus for improving the efficiency of video coding.

[0006] Another technical objective of this paper is to provide methods and apparatus for improving the efficiency of conversion index coding.

[0007] Another technical objective of this document is to provide a video coding method and apparatus that utilizes MTS.

[0008] Another technical objective of this paper is to provide a video coding method and apparatus for MTS index signaling. [Means for solving the problem]

[0009] According to one embodiment of this document, a video decoding method is provided that is performed by a decoding device. The method includes the step of applying an inverse linear transformation to a transformation coefficient to derive a residual sample for the current block, wherein the inverse linear transformation is performed based on an MTS index received from the bitstream, and the MTS index is parsed based on the absence of effective coefficients in a second region excluding a first region at the upper left end of the current block, wherein the first region is a 16x16 region at the upper left end of the current block.

[0010] The MTS index is parsed based on flag information indicating whether an effective coefficient exists in the second region, and the flag information is derived by determining whether the effective coefficient exists in the second region on a scan subblock basis in which the effective coefficient is scanned.

[0011] The flag information indicates that the effective coefficient exists in the scan subblock, and if the effective coefficient present in the scan subblock is located in the second region, it indicates that the effective coefficient exists in the second region.

[0012] The flag information has a flag value of 1 indicating whether the effective coefficient exists within the scan subblock, and if the scan subblock is located in the second region, it indicates that the effective coefficient exists in the second region.

[0013] The flag information is initially set to 1, and when the significant coefficient is located in the second region, the flag information is changed to 0.

[0014] The scan sub-block is a 4×4 block, and the scan sub-block is scanned in a reverse diagonal scan direction from the position of the last significant coefficient in the current block.

[0015] According to an embodiment of this document, there is provided a video encoding method performed by an encoding apparatus. The method includes the steps of deriving transform coefficients for the current block by applying MTS to residual samples, zeroing out a second region excluding a first region at the top-left corner of the current block, deriving residual information based on the transform coefficients of the first region, and configuring video information such that an MTS index indicating a transform kernel of the MTS is parsed based on whether a significant coefficient is present in the second region, wherein the first region is a 16×16 region at the top-left corner of the current block.

[0016] According to another embodiment of this document, there is provided a digital storage medium storing video data including encoded video information and a bitstream generated by a video encoding method performed by an encoding apparatus.

[0017] According to another embodiment of this document, there is provided a digital storage medium storing video data including encoded video information and a bitstream that cause a decoding apparatus to perform the video decoding method. Advantageous Effects of the Invention

[0018] According to this document, overall image / video compression efficiency can be improved.

[0019] According to this document, the efficiency of MTS index coding can be improved.

[0020] According to this document, the efficiency of the video coding method using MTS can be improved.

[0021] The effects obtained through a specific example of the present specification are not limited to the effects listed above. For example, various technical effects that can be understood or derived from the present specification by a person having ordinary skill in the related art may exist. Accordingly, the specific effects of the present specification are not limited to those explicitly described in the present specification, and may include various effects that can be understood or derived from the technical features of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] [Figure 1] Schematically illustrates an example of a video / image coding system to which this document can be applied. [Figure 2] This is a diagram schematically illustrating the configuration of a video / image encoding apparatus to which this document can be applied. [Figure 3] This is a diagram schematically illustrating the configuration of a video / image decoding apparatus to which this document can be applied. [Figure 4] Schematically illustrates a multiple transform technique according to an embodiment of this document. [Figure 5] Exemplarily illustrates 65 intra directional modes of prediction directions. [Figure 6] This is a diagram for explaining RST according to an embodiment of this document. [Figure 7] This is a diagram illustrating an order of arranging output data of a forward primary transform into a one-dimensional vector according to an example. [Figure 8] This is a diagram illustrating an order of arranging output data of a forward secondary transform into a two-dimensional block according to an example. [Figure 9]This figure shows a wide-angle intra-prediction mode according to one embodiment of this document. [Figure 10] This diagram shows the block pattern to which LFNST is applied. [Figure 11] This diagram shows the arrangement of output data for a forward LFNST as an example. [Figure 12] This figure shows an example where the number of output data for the forward LFNST was limited to a maximum of 16. [Figure 13] This diagram shows a zero-out in a block to which a 4x4 LFNST is applied, as an example. [Figure 14] This diagram shows a zero-out in a block to which an 8x8 LFNST is applied, as an example. [Figure 15] This is a diagram illustrating the scanning of a 32x32 conversion block, as shown in an example in this document. [Figure 16] This is a diagram illustrating a video decoding method using an example. [Figure 17] This is a diagram illustrating a video encoding method as an example. [Figure 18] An illustrative diagram of a content streaming system structure to which this document applies is shown below. [Modes for carrying out the invention]

[0023] This document is subject to various modifications and can have many different embodiments, and specific embodiments are illustrated in the drawings for detailed explanation. However, this document is not intended to limit itself to any particular embodiment. The terms used herein are used solely to describe specific embodiments and are not intended to limit the technical ideas of this document. Singular expressions include plural expressions unless the context clearly indicates otherwise. In this document, terms such as "includes" or "has" indicate the existence of features, figures, steps, actions, components, parts, or combinations thereof described in the specification, and should not be understood as excluding the existence or possibility of adding one or more other features, figures, steps, actions, components, parts, or combinations thereof.

[0024] On the other hand, each configuration shown in the diagrams described in this document is illustrated independently for the convenience of explaining its distinct characteristic functions, and does not mean that each configuration is embodied in separate hardware or separate software. For example, two or more of the configurations may be combined to form a single configuration, and a single configuration may be divided into multiple configurations. Embodiments in which each configuration is integrated and / or separated are also included within the scope of the rights of this document, as long as they do not deviate from the essence of this document.

[0025] The preferred embodiments of this document will be described in more detail below with reference to the attached drawings. The same reference numerals will be used for the same components in the drawings, and redundant descriptions of the same components will be omitted.

[0026] This document relates to video / image coding. For example, the methods / examples disclosed in this document are related to the VVC (Versatile Video Coding) standard (ITU-T Rec.H.266), next-generation video / image coding standards after VVC, or other video coding-related standards (e.g., HEVC (High Efficiency Video Coding) standard (ITU-T Rec.H.265), EVC (essential video coding) standard, AVS2 standard, etc.).

[0027] This document presents various implementations of video / image coding, and unless otherwise noted, these implementations can be combined and implemented in conjunction with each other.

[0028] In this document, "video" can mean a collection of images over time. "Picture" generally refers to a single image representing a specific time period, while "slice" or "tile" is a unit that constitutes part of a picture in coding. A slice or tile can contain one or more CTUs (coding tree units). A single picture can consist of one or more slices or tiles. A single picture can consist of one or more tile groups. A tile group can contain one or more tiles.

[0029] A pixel or pel can refer to the smallest unit that makes up a picture (or image). Alternatively, the term "sample" can be used as a counterpart to pixel. A sample can generally represent a pixel or a pixel value, or it can represent only the luma component pixel / pixel value, or only the chroma component pixel / pixel value. Alternatively, a sample can refer to a pixel value in the spatial domain, and if such a pixel value is converted to the frequency domain, it can also refer to the conversion coefficient in the frequency domain.

[0030] A unit can represent a basic unit of image processing. A unit can contain at least one of the following: a specific region of a picture and information associated with that region. A unit can contain one luma block and two chroma (e.g., cb, cr) blocks. The term unit may sometimes be used interchangeably with terms such as block or area. In general, an M×N block can contain a set (or array) of samples (or sample arrays) or transform coefficients consisting of M columns and N rows.

[0031] In this document, the terms " / " and "," are interpreted as "and / or." For example, "A / B" is interpreted as "A and / or B," and "A, B" is interpreted as "A and / or B." Additionally, "A / B / C" means "at least one of A, B, and / or C." Similarly, "A, B, C" also means "at least one of A, B, and / or C."

[0032] In addition, in this document, "or" is interpreted as "and / or." For example, "A or B" can mean 1) only "A," 2) only "B," or 3) both "A and B." Alternatively, "or" in this document can mean "additionally or alternatively."

[0033] In this specification, "at least one of A and B" can mean "just A," "just B," or "both A and B." Furthermore, in this specification, the expressions "at least one of A or B" and "at least one of A and / or B" can be interpreted in the same way as "at least one of A and B."

[0034] Furthermore, in this specification, "at least one of A, B and C" may mean "just A," "just B," "just C," or "any combination of A, B and C." Also, "at least one of A, B or C" or "at least one of A, B and / or C" may mean "at least one of A, B and C."

[0035] Furthermore, parentheses used in this specification can mean "for example." Specifically, when "prediction (intra prediction)" is displayed, "intra prediction" is proposed as an example of "prediction." In other words, "prediction" in this specification is not limited to "intra prediction," but rather "intra prediction" is proposed as an example of "prediction." Similarly, when "prediction (i.e., intra prediction)" is displayed, "intra prediction" is proposed as an example of "prediction."

[0036] In this specification, technical features described individually within a single drawing may be represented individually or simultaneously.

[0037] Figure 1 schematically shows an example of a video / image coding system to which this document can be applied.

[0038] Referring to Figure 1, a video / image coding system can include a source device and a receiving device. The source device can transmit encoded video / image information or data to the receiving device in file or streaming form via a digital storage medium or network.

[0039] The source device may include a video source, an encoding device, and a transmitter. The receiving device may include a receiver, a decoding device, and a renderer. The encoding device may be called a video / image encoding device, and the decoding device may be called a video / image decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display unit, which may consist of a separate device or external component.

[0040] A video source can acquire video / images through processes such as video / image capture, synthesis, or generation. A video source may include video / image capture devices and / or video / image generation devices. Video / image capture devices may include, for example, one or more cameras, or video / image archives containing previously captured video / images. Video / image generation devices may include, for example, computers, tablets, and smartphones, and can generate video / images (electronically). For example, virtual video / images can be generated via a computer, in which case the video / image capture process may be replaced by the process of generating the associated data.

[0041] An encoding device can encode input video / image data. For compression and coding efficiency, the encoding device can perform a series of steps, including prediction, transformation, and quantization. The encoded data (encoded video / image information) can be output in bitstream format.

[0042] The transmitting unit can transmit encoded video / image information or data output in bitstream format to the receiving unit of a receiving device via a digital storage medium or through a digital storage medium, in file or streaming format. The digital storage medium can include a variety of storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitting unit may include elements for generating media files via a predetermined file format and may include elements for transmission via a broadcast / communication network. The receiving unit can receive / extract the bitstream and transmit it to a decoding device.

[0043] A decoding device can decode video / images by performing a series of steps, such as inverse quantization, inverse transformation, and prediction, corresponding to the operation of an encoding device.

[0044] The renderer can render the decoded video / image. The rendered video / image can be displayed via the display unit.

[0045] Figure 2 is a schematic diagram illustrating the configuration of a video / image encoding device to which this document can be applied. Hereinafter, the term "video encoding device" may include image encoding devices.

[0046] Referring to Figure 2, the encoding device 200 may be configured to include an image partitioner 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter-predictor 221 and an intra-predictor 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 may further include a subtractor 231. The adder 250 may be called a reconstructor or a reconstructed block generator. The aforementioned video splitting unit 210, prediction unit 220, residual processing unit 230, entropy encoding unit 240, addition unit 250, and filtering unit 260 can be configured by one or more hardware components (e.g., an encoder chipset or processor) depending on the embodiment. The memory 270 may also include a DPB (decoded picture buffer) and may be configured by a digital storage medium. The hardware components may further include the memory 270 as an internal / external component.

[0047] The video splitting unit 210 can split the input video (or picture, frame) input to the encoding device 200 into one or more processing units. For example, the processing units may be called coding units (CUs). In this case, coding units can be recursively split from a coding tree unit (CTU) or the largest coding unit (LCU) using a QTBTTT (Quad-tree binary-tree ternary-tree) structure. For example, a single coding unit can be split into multiple coding units of deeper depth based on a quad-tree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quad-tree structure may be applied first, followed by the binary tree structure and / or the ternary structure. Alternatively, the binary tree structure may be applied first. The coding procedure according to this document can be executed based on the final coding unit that cannot be further split. In this case, based on coding efficiency due to video characteristics, the largest coding unit can be used as the final coding unit, or, if necessary, the coding unit can be recursively divided into lower-depth coding units so that the optimally sized coding unit is used as the final coding unit. Here, the coding procedure can include procedures such as prediction, transformation, and restoration, which will be described later. As another example, the processing unit may further include a prediction unit (PU) or a transformation unit (TU). In this case, the prediction unit and the transformation unit can each be separated or partitioned from the final coding unit described above.The prediction unit is a unit of sample prediction, and the conversion unit is a unit that derives a conversion coefficient and / or a unit that derives a residual signal from the conversion coefficient.

[0048] The term "unit" can sometimes be used interchangeably with terms such as "block" or "area." Generally, an M×N block can represent a set of samples or transform coefficients consisting of M columns and N rows. A sample can generally represent a pixel or a pixel value, and may represent only the luminance (luma) component pixel / pixel value, or only the chroma component pixel / pixel value. A sample can be used as the term corresponding to a single picture (or image) pixel or pel.

[0049] The subtraction unit 231 can generate a residual signal (residual block, residual sample, or residual sample array) by subtracting the predicted signal (predicted block, predicted sample, or predicted sample array) output from the prediction unit 220 from the input video signal (original block, original sample, or original sample array), and the generated residual signal is transmitted to the conversion unit 232. The prediction unit 220 can perform a prediction on the block to be processed (hereinafter referred to as the current block) and generate a predicted block that includes a predicted sample for the current block. The prediction unit 220 can determine whether intra-prediction or inter-prediction is applied on a current block or CU basis. As will be described later in the explanation of each prediction mode, the prediction unit can generate various information related to prediction, such as prediction mode information, and transmit it to the entropy encoding unit 240. The information related to prediction can be encoded by the entropy encoding unit 240 and output in bitstream form.

[0050] The intra-prediction unit 222 can predict the current block by referring to a sample in the current picture. Depending on the prediction mode, the referenced sample may be located adjacent to or far from the current block. In intra-prediction, the prediction mode may include multiple non-directional modes and multiple directional modes. Non-directional modes may include, for example, DC mode and planar mode. Directional modes may include, for example, 33 directional prediction modes or 65 directional prediction modes, depending on the degree of fineness of prediction direction. However, this is merely an example, and more or fewer directional prediction modes may be used depending on the settings. The intra-prediction unit 222 may also use the prediction modes applied to adjacent blocks to determine the prediction mode to be applied to the current block.

[0051] The interprediction unit 221 can derive a predicted block relative to the current block based on a reference block (reference sample array) identified by motion vectors on the reference picture. In this case, in order to reduce the amount of motion information transmitted in interprediction mode, motion information can be predicted in units of blocks, subblocks, or samples based on the correlation of motion information between adjacent blocks and the current block. The motion information may include motion vectors and reference picture indices. The motion information may further include interprediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of interprediction, adjacent blocks may include spatially adjacent blocks that exist in the current picture and temporally adjacent blocks that exist in the reference picture. The reference picture containing the reference block and the reference picture containing the temporally adjacent block may be the same or different. The temporally adjacent block may be called a collocated reference block or colCU, and the reference picture containing the temporally adjacent block may be called a collocated picture (colPic). For example, the interpretation unit 221 can construct a motion information candidate list based on adjacent blocks and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Interpretation can be performed based on various prediction modes; for example, in skip mode and merge mode, the interpretation unit 221 can use the motion information of adjacent blocks as the motion information of the current block. In skip mode, unlike merge mode, no residual signal is transmitted.In motion vector prediction (MVP) mode, the motion vector of an adjacent block is used as a motion vector predictor, and the motion vector difference is signaled to indicate the motion vector of the current block.

[0052] The prediction unit 220 can generate prediction signals based on various prediction methods described later. For example, the prediction unit can apply intra-prediction or inter-prediction for a single block, and can also apply intra-prediction and inter-prediction simultaneously. This can be called combined inter and intra-prediction (CIIP). The prediction unit can also perform intra-block copy (IBC) for predictions on blocks. The intra-block copy can be used for content video / moving video coding such as in games, for example, as in SCC (screen content coding). IBC basically performs prediction within the current picture, but can be performed in a manner similar to inter-prediction in that it derives a reference block within the current picture. That is, IBC can utilize at least one of the inter-prediction techniques described in this document.

[0053] The predicted signals generated via the interpretation unit 221 and / or intrapretation unit 222 can be used to generate a reconstructed signal or a residual signal. The transformation unit 232 can apply transformation techniques to the residual signal to generate transformation coefficients. For example, transformation techniques may include DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), GBT (Graph-Based Transform), or CNT (Conditionally Non-linear Transform). Here, GBT refers to a transformation obtained from a graph, assuming that the relationship information between pixels is represented by this graph. CNT refers to a transformation obtained by generating a predicted signal using all previously reconstructed pixels and based on that. The transformation process can also be applied to pixel blocks of the same size that are square, or to non-square blocks of variable size.

[0054] The quantization unit 233 quantizes the conversion coefficients and transmits them to the entropy encoding unit 240, which can encode the quantized signal (information about the quantized conversion coefficients) and output it as a bitstream. The information about the quantized conversion coefficients can be called residual information. The quantization unit 233 can rearrange the block-form quantized conversion coefficients into a one-dimensional vector form based on the coefficient scan order, and can also generate information about the quantized conversion coefficients based on the one-dimensional vector form of the quantized conversion coefficients. The entropy encoding unit 240 can perform various encoding methods, such as exponential Golomb, CAVLC (context-adaptive variable length coding), and CABAC (context-adaptive binary arithmetic coding). The entropy encoding unit 240 can also encode information necessary for video / image restoration (e.g., values ​​of syntax elements) together with or separately from the quantized conversion coefficients. Encoded information (e.g., encoded video / image information) can be transmitted or stored in bitstream form in units of NAL (network abstraction layer) units. The video / image information may further include information about various parameter sets, such as adaptation parameter sets (APS), picture parameter sets (PPS), sequence parameter sets (SPS), or video parameter sets (VPS). The video / image information may also further include general constraint information. Signaling / transmitted information and / or syntax elements described later in this document can be encoded via the encoding procedure described above and included in the bitstream.The bitstream can be transmitted over a network or stored in a digital storage medium. Here, the network may include broadcast networks and / or communication networks, and the digital storage medium may include a variety of storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The signal output from the entropy encoding unit 240 can be transmitted by a transmitting unit (not shown) and / or stored by a storage unit (not shown) which are configured as internal / external elements of the encoding device 200, or the transmitting unit may be included in the entropy encoding unit 240.

[0055] The quantized conversion coefficients output from the quantization unit 233 can be used to generate a prediction signal. For example, a residual signal (residual block or residual sample) can be reconstructed by applying inverse quantization and inverse transformation to the quantized conversion coefficients via the inverse quantization unit 234 and the inverse transformation unit 235. The adder 250 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample, or reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the prediction unit 220. If there is no residual for the block to be processed, such as when skip mode is applied, the predicted block can be used as the reconstructed block. The generated reconstructed signal can be used for intra-prediction of the next block to be processed in the current picture, and can also be used for inter-prediction of the next picture after filtering, as described later.

[0056] On the other hand, LMCS (luma mapping with chroma scaling) can also be applied during the picture encoding and / or restoration process.

[0057] The filtering unit 260 can improve subjective / objective image quality by applying filtering to the restored signal. For example, the filtering unit 260 can apply various filtering methods to the restored picture to generate a modified restored picture, and the modified restored picture can be stored in the memory 270, specifically in the DPB of the memory 270. The various filtering methods can include, for example, deblocking filtering, sample adaptive offset (SAO), adaptive loop filter, and bilateral filter. The filtering unit 260 can generate various filtering-related information and transmit it to the entropy encoding unit 240, as will be described later in the explanation of each filtering method. The filtering-related information can be encoded by the entropy encoding unit 240 and output in bitstream format.

[0058] The corrected restored picture sent to memory 270 can be used as a reference picture in the interpretation unit 221. When interpretation is applied via this, the encoding device can avoid prediction mismatches between the encoding device 200 and the decoding device, and can also improve encoding efficiency.

[0059] The DPB in memory 270 can store the corrected restored picture for use as a reference picture in the inter-prediction unit 221. Memory 270 can store motion information of blocks from which motion information in the current picture has been derived (or encoded) and / or motion information of blocks in the picture that have already been restored. The stored motion information can be transmitted to the inter-prediction unit 221 for use as motion information of spatially adjacent blocks or motion information of temporally adjacent blocks. Memory 270 can store restored samples of restored blocks in the current picture and transmit them to the intra-prediction unit 222.

[0060] Figure 3 is a schematic diagram illustrating the configuration of a video / image decoding device to which this document can be applied.

[0061] Referring to Figure 3, the decoding device 300 can be configured to include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 may include an inter-predictor 332 and an intra-predictor 331. The residual processor 320 may include a dequantizer 321 and an inverse transformer 322. The aforementioned entropy decoder 310, residual processor 320, predictor 330, adder 340, and filtering device 350 can be configured by a single hardware component (e.g., a decoder chipset or processor) depending on the embodiment. The memory 360 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The aforementioned hardware component may further include memory 360 as an internal / external component.

[0062] When a bitstream containing video / image information is input, the decoding device 300 can reconstruct the image in accordance with the process by which the video / image information was processed in the encoding device shown in Figure 2. For example, the decoding device 300 can derive units / blocks based on block division-related information obtained from the bitstream. The decoding device 300 can perform decoding using the processing units applied in the encoding device. Thus, the decoding processing unit is, for example, a coding unit, which can be divided from a coding tree unit or a maximum coding unit by a quad-tree structure, a binary tree structure, and / or a terminally tree structure. One or more conversion units can be derived from the coding unit. The reconstructed video signal decoded and output via the decoding device 300 can then be reproduced via a playback device.

[0063] The decoding device 300 can receive the signal output from the encoding device shown in Figure 2 in bitstream form, and the received signal can be decoded via the entropy decoding unit 310. For example, the entropy decoding unit 310 can parse the bitstream to derive information necessary for video restoration (or picture restoration) (e.g., video / image information). The video / image information may further include information about various parameter sets, such as the adaptation parameter set (APS), picture parameter set (PPS), sequence parameter set (SPS), or video parameter set (VPS). The video / image information may also further include general constraint information. The decoding device can decode the picture based on the parameter set information and / or the general constraint information. The signaling / received information and / or syntax elements described later in this document can be decoded via the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 can decode information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the values ​​of syntax elements necessary for image restoration and the quantized values ​​of conversion coefficients related to the residual. More specifically, the CABAC entropy decoding method receives bins corresponding to each syntax element in the bitstream, determines a context model using the syntax element information to be decoded and the decoding information of adjacent and decoded blocks or the symbol / bin information decoded in a previous step, predicts the probability of bin occurrence based on the determined context model, and performs arithmetic decoding of the bins to generate symbols corresponding to the values ​​of each syntax element.In this case, the CABAC entropy decoding method can update the context model after determining the context model by utilizing the information of the decoded symbol / bin for the context model of the next symbol / bin. Of the information decoded by the entropy decoding unit 310, information related to prediction is provided to the prediction unit 330, and information for the residual on which entropy decoding was performed by the entropy decoding unit 310, i.e., quantized conversion coefficients and related parameter information, can be input to the inverse quantization unit 321. In addition, of the information decoded by the entropy decoding unit 310, information related to filtering can be provided to the filtering unit 350. On the other hand, a receiving unit (not shown) that receives the signal output from the encoding device may be further configured as an internal / external element of the decoding device 300, or the receiving unit may be a component of the entropy decoding unit 310. On the other hand, the decoding device described in this document may be called a video / image / picture decoding device, and the decoding device may also be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoding unit 310, and the sample decoder may include at least one of the inverse quantization unit 321, inverse transformation unit 322, prediction unit 330, addition unit 340, filtering unit 350, and memory 360.

[0064] The inverse quantization unit 321 can inverse quantize the quantized transformation coefficients and output the transformation coefficients. The inverse quantization unit 321 can rearrange the quantized transformation coefficients in a two-dimensional block form. In this case, the rearrangement can be performed based on the coefficient scan order performed by the encoding device. The inverse quantization unit 321 can perform inverse quantization on the quantized transformation coefficients using quantization parameters (e.g., quantization step size information) and obtain the transformation coefficients.

[0065] The inverse conversion unit 322 performs an inverse conversion on the conversion coefficients to obtain a residual signal (residual block, residual sample array).

[0066] The prediction unit can perform a prediction on the current block and generate a predicted block containing prediction samples for the current block. Based on the prediction information output from the entropy decoding unit 310, the prediction unit can determine whether intra-prediction or inter-prediction is applied to the current block and can determine a specific intra / inter-prediction mode.

[0067] The prediction unit can generate prediction signals based on various prediction methods described later. For example, the prediction unit can apply intra-prediction or inter-prediction for a single block, and can also apply intra-prediction and inter-prediction simultaneously. This can be called combined inter and intra-prediction (CIIP). The prediction unit can also perform intra-block copying (IBC) for predictions on blocks. This intra-block copying can be used for content video / moving video coding, such as in SCC (screen content coding), for example, in games. IBC basically performs prediction within the current picture, but can be performed in a manner similar to inter-prediction in that it derives a reference block within the current picture. That is, IBC can utilize at least one of the inter-prediction techniques described in this document.

[0068] The intra-prediction unit 331 can predict the current block by referring to a sample in the current picture. Depending on the prediction mode, the referenced sample may be located adjacent to the current block or at a distance. In intra-prediction, the prediction mode may include multiple non-directional modes and multiple directional modes. The intra-prediction unit 331 can also use the prediction mode applied to the adjacent block to determine the prediction mode to be applied to the current block.

[0069] The interprediction unit 332 can derive a predicted block for the current block based on a reference block (reference sample array) identified by motion vectors on a reference picture. In this case, to reduce the amount of motion information transmitted in interprediction mode, motion information can be predicted in blocks, subblocks, or samples based on the correlation of motion information between adjacent blocks and the current block. The motion information may include motion vectors and reference picture indices. The motion information may further include interprediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of interprediction, adjacent blocks may include spatially adjacent blocks present in the current picture and temporally adjacent blocks present in the reference picture. For example, the interprediction unit 332 can construct a motion information candidate list based on adjacent blocks and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Interprediction can be performed based on various prediction modes, and the prediction information may include information indicating the mode of interprediction for the current block.

[0070] The summing unit 340 can generate a restored signal (restored picture, restored block, restored sample array) by adding the acquired residual signal to the predicted signal (predicted block, predicted sample array) output from the prediction unit 330. If there is no residual for the block to be processed, such as when skip mode is applied, the predicted block can be used as the restored block.

[0071] The addition unit 340 may be called the restoration unit or restoration block generation unit. The generated restoration signal can be used for intra-prediction of the next block to be processed in the current picture, and can be output after filtering as described later, or it can be used for intra-prediction of the next picture.

[0072] On the other hand, LMCS (luma mapping with chroma scaling) can also be applied during the picture decoding process.

[0073] The filtering unit 350 can improve subjective / objective image quality by applying filtering to the restored signal. For example, the filtering unit 350 can generate a modified restored picture by applying various filtering methods to the restored picture, and can transmit the modified restored picture to the memory 360, specifically to the DPB of the memory 360. The various filtering methods can include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, and bilateral filter.

[0074] The (modified) restored picture stored in the DPB of memory 360 can be used as a reference picture by the inter-prediction unit 332. Memory 360 can store motion information of blocks from which motion information in the current picture has been derived (or decoded) and / or motion information of blocks in the picture that have already been restored. The stored motion information can be transmitted to the inter-prediction unit 332 for use as motion information of spatially adjacent blocks or motion information of temporally adjacent blocks. Memory 360 can store restored samples of restored blocks in the current picture and transmit them to the intra-prediction unit 331.

[0075] In this specification, the embodiments described for the prediction unit 330, inverse quantization unit 321, inverse conversion unit 322, and filtering unit 350 of the decoding device 300 can be applied identically or correspondingly to the prediction unit 220, inverse quantization unit 234, inverse conversion unit 235, and filtering unit 260 of the encoding device 200, respectively.

[0076] As mentioned above, prediction is performed to improve compression efficiency when performing video coding. Through this, a predicted block containing predicted samples for the current block, which is the block to be coded, can be generated. Here, the predicted block contains predicted samples in the spatial domain (or pixel domain). The predicted block is derived in both the encoding and decoding devices, and the encoding device can improve video coding efficiency by signaling the decoding device information about the residual between the original block and the predicted block (residual information), which is not the original sample value of the original block itself. The decoding device can derive a residual block containing residual samples based on the residual information, and can combine the residual block and the predicted block to generate a restored block containing restored samples, and can generate a restored picture containing the restored block.

[0077] The residual information can be generated through transformation and quantization procedures. For example, an encoding device can derive a residual block between the original block and the predicted block, perform a transformation procedure on the residual samples (residual sample array) contained in the residual block to derive transformation coefficients, perform a quantization procedure on the transformation coefficients to derive quantized transformation coefficients, and signal the associated residual information (via a bitstream) to a decoding device. Here, the residual information may include information such as the value information, position information, transformation technique, transformation kernel, and quantization parameters of the quantized transformation coefficients. The decoding device can perform an inverse quantization / inverse transformation procedure based on the residual information to derive a residual sample (or residual block). The decoding device can generate a reconstructed picture based on the predicted block and the residual block. The encoding device can also derive a residual block by inverse quantization / inverse transformation of the quantized transformation coefficients for reference for subsequent interpretation of the picture, and generate a reconstructed picture based on this.

[0078] Figure 4 schematically illustrates the multiplexing technique described in this document.

[0079] Referring to Figure 4, the conversion unit can correspond to the conversion unit in the encoding device shown in Figure 2, and the inverse conversion unit can correspond to the inverse conversion unit in the encoding device shown in Figure 2 or the inverse conversion unit in the decoding device shown in Figure 3.

[0080] The transformation unit can perform a linear transformation based on the residual samples (residual sample array) in the residual block to derive (linear) transformation coefficients (S410). Such a linear transformation (primary transform) can be called a core transform. Here, the linear transformation can be based on Multiple Transform Selection (MTS), and when a multiple transform is applied as the linear transformation, it can be called a multiple core transform.

[0081] Multiple core transforms can represent a transformation method that additionally uses a Discrete Cosine Transform (DCT) type 2 and a Discrete Sine Transform (DST) type 7, a Discrete Sine Transform (DST) type 8, and / or a Discrete Sine Transform (DST) type 1. That is, the multiple core transforms can represent a transformation method that transforms a spatial domain residual signal (or residual block) into frequency domain transformation coefficients (or first-order transformation coefficients) based on a plurality of transformation kernels selected from the DCT type 2, the DST type 7, the DCT type 8, and the DST type 1. Here, the first-order transformation coefficients can be called temporary transformation coefficients from the perspective of the transformer.

[0082] That is, when an existing conversion method is applied, a spatial-domain to frequency-domain conversion of a residual signal (or residual block) can be applied based on DCT type 2 to generate conversion coefficients. In contrast, when the multiple core conversion is applied, a spatial-domain to frequency-domain conversion of a residual signal (or residual block) can be applied based on DCT type 2, DST type 7, DCT type 8, and / or DST type 1, etc., to generate conversion coefficients (or first-order conversion coefficients). Here, DCT type 2, DST type 7, DCT type 8, and DST type 1, etc., can be called conversion types, conversion kernels, or conversion cores. Such DCT / DST conversion types can be defined based on basis functions.

[0083] When the multi-core transformation is performed, a vertical transformation kernel and a horizontal transformation kernel can be selected from the transformation kernels for the target block, and a vertical transformation can be performed on the target block based on the vertical transformation kernel, and a horizontal transformation can be performed on the target block based on the horizontal transformation kernel. Here, the horizontal transformation may represent a transformation to the horizontal component of the target block, and the vertical transformation may represent a transformation to the vertical component of the target block. The vertical transformation kernel / horizontal transformation kernel can be adaptively determined based on the prediction mode and / or transformation index of the target block (CU or subblock) including the residual block.

[0084] Furthermore, for example, when applying MTS to perform a linear transformation, a specific basis function can be set to a predetermined value, and the mapping relationship to the transformation kernel can be set by combining which basis function is applied when it is a vertical or horizontal transformation. For example, if the horizontal transformation kernel is represented by trTypeHor and the vertical transformation kernel is represented by trTypeVer, then a trTypeHor or trTypeVer value of 0 can be set to DCT2, a trTypeHor or trTypeVer value of 1 can be set to DST7, and a trTypeHor or trTypeVer value of 2 can be set to DCT8.

[0085] In this case, the MTS index information can be encoded and signaled to the decoding device to indicate one of several sets of conversion kernels. For example, if the MTS index is 0, it can indicate that both trTypeHor and trTypeVer values ​​are 0; if the MTS index is 1, it can indicate that both trTypeHor and trTypeVer values ​​are 1; if the MTS index is 2, it can indicate that the trTypeHor value is 2 and the trTypeVer value is 1; if the MTS index is 3, it can indicate that the trTypeHor value is 1 and the trTypeVer value is 2; and if the MTS index is 4, it can indicate that both trTypeHor and trTypeVer values ​​are 2.

[0086] As an example, the conversion kernel sets based on MTS index information are shown in the table below.

[0087] [Table 1]

[0088] The conversion unit can perform a quadratic transformation based on the (primary) transformation coefficients to derive modified (secondary) transformation coefficients (S420). The primary transformation is a transformation from the spatial domain to the frequency domain, and the secondary transformation means a transformation in a more compressed representation by utilizing the correlations that exist between the (primary) transformation coefficients. The secondary transformation may include a non-separable transform. In this case, the secondary transformation may be called a non-separable secondary transform (NSST) or MDNSST (mode-dependent non-separable secondary transform). The non-separable secondary transform may represent a transformation that generates modified transformation coefficients (or quadratic transformation coefficients) for the residual signal by quadratic transforming the (primary) transformation coefficients derived via the primary transformation based on a non-separable transform matrix. Here, based on the non-separable transformation matrix, the transformation can be applied at once to the (primary) transformation coefficients without separately applying vertical and horizontal transformations (or horizontal and vertical transformations independently). That is, the non-separable quadratic transformation can be applied to the (primary) transformation coefficients not separately in the vertical and horizontal directions, but rather, for example, a transformation method can be shown in which a two-dimensional signal (transformation coefficients) is realigned to a one-dimensional signal via a specific direction (e.g., row-first direction or column-first direction), and then a modified transformation coefficient (or quadratic transformation coefficient) is generated based on the non-separable transformation matrix. For example, row-first ordering means arranging the M×N blocks in a column in the order of the 1st row, 2nd row, ..., Nth row, and column-first ordering means arranging the M×N blocks in a column in the order of the 1st column, 2nd column, ..., Mth column. The aforementioned non-separable quadratic transformation can be applied to the top-left region of a block composed of (linear) transformation coefficients (hereinafter referred to as a transformation coefficient block).For example, if both the width (W) and height (H) of the conversion coefficient block are 8 or greater, an 8x8 inseparable quadratic transformation can be applied to the 8x8 region at the upper left end of the conversion coefficient block. Also, if both the width (W) and height (H) of the conversion coefficient block are 4 or greater, and either the width (W) or height (H) of the conversion coefficient block is less than 8, a 4x4 inseparable quadratic transformation can be applied to the min(8,W) x min(8,H) region at the upper left end of the conversion coefficient block. However, the embodiments are not limited to these, and for example, even if only the condition that both the width (W) or height (H) of the conversion coefficient block are 4 or greater is met, a 4x4 inseparable quadratic transformation can also be applied to the min(8,W) x min(8,H) region at the upper left end of the conversion coefficient block.

[0089] Specifically, for example, when a 4x4 input block is used, the unseparated quadratic transform can be performed as follows:

[0090] The aforementioned 4x4 input block X is shown as follows:

[0091]

number

[0092] When X is expressed in vector form, JPEG2026169391000004.jpg84 is shown as follows:

[0093]

number

[0094] As shown in equation 2, vector JPEG2026169391000006.jpg84 rearranges the 2D block of X in equation 1 into a 1D vector using row-first order.

[0095] In this case, the quadratic inseparable transform can be calculated as follows.

[0096]

number

[0097] Here, JPEG2026169391000008.jpg75 shows the transformation coefficient vector, and T shows the 16×16 (non-separable) transformation matrix.

[0098] 16 × 1 transformation coefficient vector via the above formula 3 JPEG2026169391000009.jpg75 can be derived, and the above JPEG2026169391000010.jpg75 can be reorganized into 4x4 blocks via a scan order (horizontal, vertical, diagonal, etc.). However, the calculations described above are merely illustrative, and to reduce the computational complexity of inseparable quadratic transforms, methods such as HyGT (Hypercube-Givens Transform) can also be used for calculating inseparable quadratic transforms.

[0099] On the other hand, the non-separated quadratic transform can be a mode-dependent transform kernel (or transform core, transform type), where the mode can include intra-predictive mode and / or inter-predictive mode.

[0100] As described above, the non-separable quadratic transformation can be performed based on an 8x8 transformation or a 4x4 transformation determined based on the width (W) and height (H) of the transformation coefficient block. An 8x8 transformation refers to a transformation that can be applied to an 8x8 region contained within the transformation coefficient block when both W and H are greater than or equal to 8, and the 8x8 region is the upper left corner 8x8 region within the transformation coefficient block. Similarly, a 4x4 transformation refers to a transformation that can be applied to a 4x4 region contained within the transformation coefficient block when both W and H are greater than or equal to 4, and the 4x4 region is the upper left corner 4x4 region within the transformation coefficient block. For example, an 8x8 transformation kernel matrix can be a 64x64 / 16x64 matrix, and a 4x4 transformation kernel matrix can be a 16x16 / 8x16 matrix.

[0101] In this case, for mode-based conversion kernel selection, two non-separable quadratic conversion kernels can be configured for each conversion set for non-separable quadratic conversions for both 8x8 and 4x4 conversions, resulting in four conversion sets. That is, four conversion sets can be configured for 8x8 conversions, and four conversion sets can be configured for 4x4 conversions. In this case, each of the four conversion sets for 8x8 conversions can contain two 8x8 conversion kernels, and each of the four conversion sets for 4x4 conversions can contain two 4x4 conversion kernels.

[0102] However, the size of the transformation, i.e., the size of the region to which the transformation is applied, is merely illustrative, and sizes other than 8x8 or 4x4 can be used, and the number of sets is n, with k transformation kernels in each set.

[0103] The aforementioned set of transformations may be called an NSST set or an LFNST set. The selection of a particular set from among the aforementioned set of transformations can be performed, for example, based on the intra-prediction mode of the current block (CU or sub-block). LFNST (Low-Frequency Non-Separable Transform) is an example of a reduced non-separable transform described later, and represents a non-separable transform for low-frequency components.

[0104] For reference, for example, an intraprediction mode may include two non-directinoal (or non-angular) intraprediction modes and 65 directional (or angular) intraprediction modes. The non-directinoal intraprediction mode may include a planar intraprediction mode (number 0) and a DC intraprediction mode (number 1), and the directional intraprediction mode may include 65 intraprediction modes (numbers 2 through 66). However, this is merely an example, and this document may also apply to cases with a different number of intraprediction modes. On the other hand, a 67th intraprediction mode may be used in some cases, and this 67th intraprediction mode may represent a linear model (LM) mode.

[0105] Figure 5 illustrates 65 intradirectional modes for predicting directions.

[0106] Referring to Figure 5, we can distinguish between intra-prediction modes with horizontal directionality and intra-prediction modes with vertical directionality, centered around intra-prediction mode 34, which has a diagonal prediction direction pointing downward to the right. In Figure 5, H and V represent horizontal and vertical directionality, respectively, and the numbers -32 to 32 indicate a displacement of 1 / 32 units on the sample grid position. This can be used to indicate an offset relative to the mode index value. Intra-prediction modes 2 through 33 have horizontal directionality, while intra-prediction modes 34 through 66 have vertical directionality. On the other hand, intra-prediction mode 34 can be considered neither strictly horizontal nor vertical, but it can be classified as belonging to the horizontal directionality in terms of determining the transformation set of the quadratic transformation. This is because the input data is transposed for the vertical directionality modes which are symmetrical with respect to intra-prediction mode 34, while the input data alignment method for the horizontal directionality modes is used for intra-prediction mode 34. Transposing input data means that for 2D block data M×N, rows become columns and columns become rows to form N×M data. Intra-prediction modes 18 and 50 represent the horizontal intra-prediction mode and the vertical intra-prediction mode, respectively. Intra-prediction mode 2 can be called the diagonal intra-prediction mode because it predicts in the diagonal direction to the right with a left reference pixel. In the same context, intra-prediction mode 34 can be called the diagonal intra-prediction mode to the right and down, and intra-prediction mode 66 can be called the diagonal intra-prediction mode to the left and down.

[0107] For example, the mapping of four transformation sets by the intra-predictive mode is shown in the table below.

[0108] [Table 2]

[0109] As shown in Table 2, the intra prediction mode allows any one of the four transformation sets, i.e., lfnstTrSetIdx to be mapped to any one of the four values ​​from 0 to 3.

[0110] On the other hand, if it is determined that a specific set is to be used for an inseparable transformation, one of the k transformation kernels in the specific set can be selected via an inseparable quadratic transformation index. The encoding device can derive an inseparable quadratic transformation index that points to a specific transformation kernel based on an RD (rate-distortion) check and signal the decoding device to the inseparable quadratic transformation index. The decoding device can select one of the k transformation kernels in the specific set based on the inseparable quadratic transformation index. For example, lfnst index value 0 can point to the first inseparable quadratic transformation kernel, lfnst index value 1 can point to the second inseparable quadratic transformation kernel, and lfnst index value 2 can point to the third inseparable quadratic transformation kernel. Alternatively, lfnst index value 0 can indicate that the first inseparable quadratic transformation is not applied to the target block, and lfnst index values ​​1 to 3 can point to the three transformation kernels.

[0111] The transformation unit can perform the non-separable quadratic transformation based on the selected transformation kernel to obtain modified (quadratic) transformation coefficients. The modified transformation coefficients can be derived as quantized transformation coefficients via the quantization unit, as described above, and can be encoded and transmitted to the decoding unit for signaling and the inverse quantization / inverse transformation unit within the encoding unit.

[0112] On the other hand, as mentioned above, if the quadratic transformation is omitted, the (primary) transformation coefficients, which are the output of the primary (separated) transformation, can be derived as quantized transformation coefficients via the quantization unit, as described above, and can be encoded and transmitted to the decoding device for signaling and to the inverse quantization / inverse transformation unit within the encoding device.

[0113] The inverse transform unit can perform a series of steps in the reverse order of the steps performed by the transform unit described above. The inverse transform unit can receive the (inversely quantized) transform coefficients, perform a quadratic (inverse) transform to derive (primary) transform coefficients (S450), and perform a primary (inverse) transform on the (primary) transform coefficients to obtain a residual block (residual sample) (S460). Here, the primary transform coefficients can be called modified transform coefficients from the perspective of the inverse transform unit. As described above, the encoding and decoding devices can generate a restored block based on the residual block and the predicted block, and generate a restored picture based on this.

[0114] On the other hand, the decoding device may further include a quadratic inverse transform applicability determination unit (or an element that determines whether a quadratic inverse transform is applicable) and a quadratic inverse transform determination unit (or an element that determines the quadratic inverse transform). The quadratic inverse transform applicability determination unit can determine whether a quadratic inverse transform is applicable. For example, the quadratic inverse transform may be NSST, RST, or LFNST, and the quadratic inverse transform applicability determination unit can determine whether a quadratic inverse transform is applicable based on a quadratic transform flag parsed from the bitstream. As another example, the quadratic inverse transform applicability determination unit may also determine whether a quadratic inverse transform is applicable based on the transformation coefficients of the residual block.

[0115] The quadratic inverse transform determination unit can determine the quadratic inverse transform. In this case, the quadratic inverse transform determination unit can determine the quadratic inverse transform to be applied to the current block based on the LFNST (NSST or RST) transform set specified by the intra-prediction mode. In one embodiment, the quadratic transform determination method can be determined depending on the linear transform determination method. Various combinations of linear and quadratic transforms can be determined by the intra-prediction mode. Also, as an example, the quadratic inverse transform determination unit can determine the region to which the quadratic inverse transform is applied based on the size of the current block.

[0116] On the other hand, as mentioned above, if the quadratic (inverse) transformation is omitted, a residual block (residual sample) can be obtained by receiving the (inversely quantized) transformation coefficients and performing the primary (separated) inverse transformation. As mentioned above, the encoding and decoding devices can generate a restored block based on the residual block and the predicted block, and generate a restored picture based on this.

[0117] On the other hand, in this document, in order to reduce the computational complexity and memory requirements of unseparable quadratic transforms, we can apply RST (reduced secondary transform), which is a reduced version of the NSST concept in which the size of the transformation matrix (kernel) is reduced.

[0118] On the other hand, the conversion kernel, conversion matrix, and coefficients constituting the conversion kernel matrix described in this document—that is, kernel coefficients or matrix coefficients—can be represented using 8 bits. This is one condition for implementation in decoding and encoding devices, and it reduces the memory requirements for storing the conversion kernel, along with a reasonably acceptable performance degradation compared to existing 9-bit or 10-bit representations. Furthermore, representing the kernel matrix with 8 bits allows for the use of smaller multipliers, making it more compatible with SIMD (Single Instruction Multiple Data) instructions used for optimal software implementation.

[0119] In this specification, RST can mean a transformation performed on a residual sample for a target block based on a transform matrix whose size has been reduced by a simplification factor. When a simplification transformation is performed, the amount of computation required during the transformation can be reduced by reducing the size of the transform matrix. That is, RST can be used to resolve the complexity problem that arises when transforming large blocks or during non-separable transformations.

[0120] RST can be referred to by a variety of terms, including reduced transform, reduced secondary transform, reduction transform, simplified transform, and simple transform, and the name RST is not limited to the examples listed. Alternatively, since RST primarily occurs in the low-frequency region with non-zero coefficients in the transform block, it can also be called LFNST (Low-Frequency Non-Separable Transform). The aforementioned transform index can be named the LFNST index.

[0121] On the other hand, when the quadratic inverse transformation is performed based on RST, the inverse transformation unit 235 of the encoding device 200 and the inverse transformation unit 322 of the decoding device 300 may include an inverse RST unit that derives corrected transformation coefficients based on the inverse RST of the transformation coefficients, and an inverse linear transformation unit that derives a residual sample for the target block based on the inverse linear transformation of the corrected transformation coefficients. The inverse linear transformation means the inverse transformation of the linear transformation applied to the residual. In this document, deriving transformation coefficients based on a transformation may mean deriving transformation coefficients by applying the transformation in question.

[0122] Figure 6 is a diagram illustrating an RST according to one embodiment described in this document.

[0123] In this specification, “target block” may mean the current block, residual block, or transformed block on which coding is performed.

[0124] In one embodiment of the RST, an N-dimensional vector can be mapped to an R-dimensional vector located in a different space, and a reduced transformation matrix can be determined, where R is less than N. N can represent the square of the side length of the block to which the transformation is applied, or the total number of transformation coefficients corresponding to the block to which the transformation is applied, and the simplified factor can represent the R / N value. The simplified factor can be called by various terms such as reduced factor, reduction factor, simplified factor, or simple factor. On the other hand, R can be called the reduced coefficient, but in some cases the simplified factor can also represent R. Also, in some cases the simplified factor can represent the N / R value.

[0125] In one embodiment, the simplification factor or simplification coefficient may be signaled via a bitstream, but the embodiment is not limited thereto. For example, predefined values ​​for the simplification factor or simplification coefficient may be stored in each encoding device 200 and decoding device 300, in which case the simplification factor or simplification coefficient is not signaled separately.

[0126] The size of the simplified transformation matrix according to one embodiment is R×N, which is smaller than the size N×N of a normal transformation matrix, and can be defined as shown in the following equation 4.

[0127]

number

[0128] The matrix T within the Reduced Transform block shown in Figure 6(a) is the matrix T in Equation 4. R×N This can be interpreted as follows: As shown in Figure 6(a), when the simplified transformation matrix TR×N is multiplied by the residual sample for the target block, the transformation coefficient for the target block can be derived.

[0129] In one embodiment, if the size of the block to which the transformation is applied is 8x8 and R=16 (i.e., R / N=16 / 64=1 / 4), then the RST shown in Figure 6(a) can be represented by a matrix operation as shown in Equation 5 below. In this case, the memory and multiplication operations can be reduced to approximately 1 / 4 by the simplification factor.

[0130] In this document, matrix operations can be understood as operations in which a matrix is ​​placed to the left of a column vector and multiplied by the column vector to obtain a new column vector.

[0131]

number

[0132] In equation 5, r1 to r 64 This can represent the residual sample for the target block, and more specifically, it is the transformation coefficient generated by applying a linear transformation. The result of the calculation in Equation 5 is the transformation coefficient c for the target block. i This can be derived, and c i The derivation process is as shown in equation 6.

[0133]

number

[0134] The result of the calculation in formula 6, and the conversion coefficients c1 to c for the target block. R The following can be derived: That is, when R=16, the conversion coefficients c1 to c for the target block are 16 The following can be derived. If a transformation matrix of size 64×64 (N×N) is applied instead of RST and multiplied by a residual sample of size 64×1 (N×1), 64 (N) transformation coefficients will be derived for the target block. However, because RST was applied, only 16 (R) transformation coefficients will be derived for the target block. The total number of transformation coefficients for the target block decreases from N to R, and the amount of data that the encoding device 200 sends to the decoding device 300 decreases, thus increasing the transmission efficiency between the encoding device 200 and the decoding device 300.

[0135] From the perspective of the size of the transformation matrix, the size of a normal transformation matrix is ​​64 × 64 (N × N), while the size of the simplified transformation matrix is ​​reduced to 16 × 64 (R × N). Therefore, compared to performing a normal transformation, the memory usage when executing RST can be reduced to an R / N ratio. Also, compared to the number of multiplication operations N × N when using a normal transformation matrix, the number of multiplication operations when using a simplified transformation matrix can be reduced to an R / N ratio (R × N).

[0136] In one embodiment, the transform unit 232 of the encoding apparatus 200 may derive transform coefficients for the target block by performing a primary transform and an RST-based secondary transform on residual samples for the target block. Such transform coefficients may be transmitted to the inverse transform unit of the decoding apparatus 300, and the inverse transform unit 322 of the decoding apparatus 300 may derive modified transform coefficients based on an inverse RST (reduced secondary transform) for the transform coefficients, and may derive residual samples for the target block based on an inverse primary transform for the modified transform coefficients.

[0137] Inverse RST matrix T according to an embodiment N×R has a size of N×R that is smaller than the size N×N of a normal inverse transform matrix, and has a transpose relationship with the simplified transform matrix T shown in Equation 4 R×N .

[0138] The matrix T in the Reduced Inv. Transform block shown in (b) of FIG. 6 t may mean the inverse RST matrix T R×N T (the superscript T means transpose). As shown in (b) of FIG. 6, when the inverse RST matrix T R×N T is multiplied to the transform coefficients for the target block, modified transform coefficients for the target block or residual samples for the target block may be derived. The inverse RST matrix T R×N T may also be represented as (T R×N ) T N×R .

[0139] More specifically, when inverse RST is applied as a secondary inverse transform, the inverse RST matrix T is applied to the transform coefficients for the target block R×N TWhen multiplied by this, the modified transformation coefficients for the target block can be derived. On the other hand, the inverse RST can be applied as an inverse linear transformation, in which case the inverse RST matrix T is applied to the transformation coefficients for the target block. R×N T When multiplied, the residual sample for the target block can be derived.

[0140] In one embodiment, when the size of the block to which the inverse transform is applied is 8x8 and R=16 (i.e., R / N=16 / 64=1 / 4), the RST shown in Figure 6(b) can be expressed by a matrix operation as shown in the following equation 7.

[0141]

number

[0142] In formula 7, c1 to c 16 This can show the conversion coefficient for the target block. The result of the calculation in Equation 7, the modified conversion coefficient for the target block, or r showing the residual sample for the target block. i This can be derived, and r i The derivation process is as shown in equation 8.

[0143]

number

[0144] The result of the calculation in Equation 8, the modified conversion coefficient for the target block, or r1 to r representing the residual sample for the target block. NThis can be derived. Considering the size of the inverse transform matrix, the size of a normal inverse transform matrix is ​​64 × 64 (N × N), while the size of the simplified inverse transform matrix is ​​reduced to 64 × 16 (N × R). Therefore, compared to performing a normal inverse transform, memory usage when performing the inverse RST can be reduced to an R / N ratio. Also, compared to the number of multiplication operations N × N when using a normal inverse transform matrix, the number of multiplication operations can be reduced to an R / N ratio (N × R) when using a simplified inverse transform matrix.

[0145] On the other hand, the transformation set configuration shown in Table 2 can also be applied to 8x8 RST. That is, the corresponding 8x8 RST can be applied using the transformation set in Table 2. Since one transformation set consists of two or three transformations (kernels) depending on the prediction mode on the screen, it can be configured to select one from a maximum of four transformations, including not applying a quadratic transformation. When a quadratic transformation is not applied, it can be considered as if the identity matrix is ​​applied. If we assign indices 0, 1, 2, and 3 to the four transformations respectively (for example, index 0 can be assigned to the identity matrix, i.e., when a quadratic transformation is not applied), the transformation to be applied can be specified by signaling a transformation index or lfnst index, which is a syntax element, for each transformation coefficient block. That is, via the transformation index, 8x8 RST can be specified for the 8x8 top-left block in the RST configuration, or 8x8 lfnst can be specified if LFNST is applied. 8×8 lfnst and 8×8 RST refer to transformations that can be applied to an 8×8 region contained within a transformation coefficient block when both W and H of the target block to be transformed are greater than or equal to 8, and the relevant 8×8 region is the upper left corner 8×8 region within the transformation coefficient block. Similarly, 4×4 lfnst and 4×4 RST refer to transformations that can be applied to a 4×4 region contained within a transformation coefficient block when both W and H of the target block are greater than or equal to 4, and the relevant 4×4 region is the upper left corner 4×4 region within the transformation coefficient block.

[0146] On the other hand, according to one embodiment of this document, in the encoding process, it is possible to select only 48 data points from 64 data points constituting an 8x8 region, rather than using a 16x64 transformation kernel matrix, and apply a maximum of a 16x48 transformation kernel matrix to them. Here, "maximum" means that the maximum value of m is 16 for an mx48 transformation kernel matrix that can generate m coefficients. That is, when RST is executed by applying an mx48 transformation kernel matrix (m ≤ 16) to an 8x8 region, it is possible to generate m coefficients from 48 data inputs. If m is 16, it generates 16 coefficients from 48 data inputs. That is, if the 48 data points form a 48x1 vector, a 16x1 vector can be generated by sequentially multiplying the 16x48 matrix and the 48x1 vector. At this time, the 48 data points constituting an 8x8 region can be appropriately arranged to construct a 48x1 vector. For example, a 48x1 vector can be constructed based on 48 data points that constitute the region excluding the bottom right 4x4 region of the 8x8 region. At this time, when a matrix operation is performed by applying a transformation kernel matrix of up to 16x48, 16 modified transformation coefficients are generated, and these 16 modified transformation coefficients can be placed in the upper left 4x4 region according to the scanning order, while the upper right 4x4 region and the lower left 4x4 region can be filled with 0.

[0147] For the inverse transformation of the decoding process, the transposed matrix of the transformation kernel matrix described above can be used. That is, when inverse RST or LFNST is performed as the inverse transformation process executed by the decoding device, the input coefficient data to which inverse RST is applied is composed of one-dimensional vectors in a predetermined order, and the modified coefficient vectors obtained by multiplying the one-dimensional vectors by the corresponding inverse RST matrix on the left side can be arranged in two-dimensional blocks in a predetermined order.

[0148] To summarize, when RST or LFNST is applied to an 8x8 region during the transformation process, a matrix operation is performed between the 48 transformation coefficients from the top-left, top-right, and bottom-left regions of the 8x8 region (excluding the bottom-right region) and a 16x48 transformation kernel matrix. For this matrix operation, the 48 transformation coefficients are input as a one-dimensional array. After this matrix operation is performed, 16 modified transformation coefficients are derived, which can then be arranged in the top-left region of the 8x8 region.

[0149] Conversely, when inverse RST or LFNST is applied to an 8x8 region during the inverse transformation process, the 16 transformation coefficients corresponding to the upper left corner of the 8x8 region can be input in a one-dimensional array form according to the scanning order and performed matrix operations with a 48x16 transformation kernel matrix. That is, the matrix operation in such a case can be expressed as (48x16 matrix) * (16x1 transformation coefficient vector) = (48x1 modified transformation coefficient vector). Here, the nx1 vector can be interpreted as an nx1 matrix, and can therefore also be expressed as an nx1 column vector. Also, * signifies matrix multiplication. When such a matrix operation is performed, 48 modified transformation coefficients can be derived, and these 48 modified transformation coefficients can be arranged in the upper left, upper right, and lower left regions of the 8x8 region, excluding the lower right region.

[0150] On the other hand, when the quadratic inverse transformation is performed based on RST, the inverse transformation unit 235 of the encoding device 200 and the inverse transformation unit 322 of the decoding device 300 may include an inverse RST unit that derives corrected transformation coefficients based on the inverse RST of the transformation coefficients, and an inverse linear transformation unit that derives a residual sample for the target block based on the inverse linear transformation of the corrected transformation coefficients. The inverse linear transformation means the inverse transformation of the linear transformation applied to the residual. In this document, deriving transformation coefficients based on a transformation may mean deriving transformation coefficients by applying the transformation in question.

[0151] Specifically, regarding the detailed non-separated transform, LFNST, the following applies: LFNST can include a forward transform by the encoding device and an inverse transform by the decoding device.

[0152] The encoding device takes the result (or part of the result) derived after applying a primary (core) transform as input and applies a secondary transform.

[0153]

number

[0154] In the above equation 9, x and y are the input and output of the quadratic transformation, respectively, G is the matrix representing the quadratic transformation, and the transform basis vector consists of column vectors. In the case of inverse LFNST, the dimension of the transformation matrix G is expressed as [number of rows × number of columns], and in the case of forward LFNST, the transposed matrix G is G T It becomes that dimension.

[0155] In the case of the reverse LFNST, the dimensions of matrix G are [48×16], [48×8], [16×16], and [16×8], and the [48×8] matrix and the [16×8] matrix are submatrices obtained by sampling eight transformation basis vectors from the left side of the [48×16] matrix and the [16×16] matrix, respectively.

[0156] In contrast, in the case of forward LFNST, matrix G T The dimensions are [16×48], [8×48], [16×16], and [8×16], and the [8×48] matrix and the [8×16] matrix are submatrices obtained by sampling 8 transformation basis vectors from the upper side of the [16×48] matrix and the [16×16] matrix, respectively.

[0157] Therefore, in the case of forward LFNST, the input x can be a [48×1] vector or a [16×1] vector, and the output y can be a [16×1] vector or an [8×1] vector. Since the output of the forward linear transformation in video coding and decoding is two-dimensional (2D) data, in order to construct a [48×1] vector or a [16×1] vector as input x, the 2D data that is the output of the forward transformation must be appropriately arranged to construct a one-dimensional vector.

[0158] Figure 7 shows the sequence for arranging the output data of a forward linear transformation into a one-dimensional vector, as an example. The left-hand diagrams of Figure 7(a) and (b) show the sequence for creating a [48×1] vector, and the right-hand diagrams of Figure 7(a) and (b) show the sequence for creating a [16×1] vector. In the case of LFNST, a one-dimensional vector x can be obtained by sequentially arranging the 2D data in the order shown in Figure 7(a) and (b).

[0159] The orientation of the output data of such a forward linear transformation can be determined by the intra-prediction mode of the current block. For example, if the intra-prediction mode of the current block is horizontal with respect to the diagonal direction, the output data of the forward linear transformation can be arranged in the order shown in Figure 7(a), and if the intra-prediction mode of the current block is vertical with respect to the diagonal direction, the output data of the forward linear transformation can be arranged in the order shown in Figure 7(b).

[0160] For example, a different ordering can be applied from the orderings in Figures 7(a) and (b). To derive the same result (y vector) as when applying the orderings in Figures 7(a) and (b), one simply rearranges the column vectors of matrix G to match the corresponding ordering. That is, the column vectors of G can be rearranged so that each element constituting the x vector is always multiplied by the same transformation basis vector.

[0161] Since the output y derived via equation 9 is a one-dimensional vector, if a configuration that processes the result of a forward quadratic transformation as input, such as a configuration that performs quantization or residual coding, requires two-dimensional data as input data, then the output y vector from equation 9 must again be appropriately arranged in 2D data.

[0162] Figure 8 shows the order in which the output data of a forward quadratic transformation is arranged in a two-dimensional block, as an example.

[0163] In the case of LFNST, the output can be placed in a 2D block according to a predetermined scan order. Figure 8(a) shows that when the output y is a [16×1] vector, the output values ​​are placed in 16 positions in the 2D block according to the diagonal scan order. Figure 8(b) shows that when the output y is an [8×1] vector, the output values ​​are placed in 8 positions in the 2D block according to the diagonal scan order, and the remaining 8 positions are filled with 0. In Figure 8(b), X is shown to be filled with 0.

[0164] As in other examples, the order in which the output vector y is processed by a configuration that performs quantization or residual coding can be a pre-configured order, so the output vector y may not be placed in a 2D block as shown in Figure 8. However, in the case of residual coding, data coding can be performed in units of 2D blocks (e.g., 4x4) such as a Coefficient Group (CG), in which case the data can be arranged in a specific order, as in the diagonal scan order of Figure 8.

[0165] On the other hand, the decoding device can construct a one-dimensional input vector y by arranging the two-dimensional data output via an inverse quantization process or the like in a pre-set scan order for the reverse transformation. The input vector y can be output as the input vector x by the following formula.

[0166]

number

[0167] In the case of inverse LFNST, the output vector x can be derived by multiplying the input vector y, which is a [16×1] vector or an [8×1] vector, by the G matrix. In the case of inverse LFNST, the output vector x is a [48×1] vector or a [16×1] vector.

[0168] The output vector x is arranged in a 2D block in the order shown in Figure 7, and this 2D data becomes the input data (or part of the input data) for the inverse linear transformation.

[0169] Therefore, the inverse quadratic transformation is generally the opposite of the forward quadratic transformation process. In the case of the inverse transformation, unlike the forward transformation, the inverse quadratic transformation is applied first, followed by the inverse linear transformation.

[0170] In reverse LFNST, one transformation matrix G can be selected from eight [48×16] matrices and eight [16×16] matrices. Which of the [48×16] and [16×16] matrices to apply is determined by the size and pattern of the block.

[0171] Furthermore, the eight matrices can be derived from four transformation sets, as shown in Table 2 above, and each transformation set can consist of two matrices. Which of the four transformation sets to use is determined by the intra-prediction mode, and more specifically, the transformation set is determined based on the extended intra-prediction mode value, which also takes into account Wide Angle Intra Prediction (WAIP). Which of the two matrices that make up the selected transformation set is selected is derived via index signaling. More specifically, the transmitted index value can be 0, 1, or 2, where 0 indicates that LFNST should not be applied, and 1 and 2 can indicate either of the two transformation matrices that make up the transformation set selected based on the intra-prediction mode value.

[0172] Figure 9 shows a wide-angle intra-prediction mode according to one embodiment described in this document.

[0173] Typical intra-predictive mode values ​​can range from 0 to 66 and from 81 to 83, while, as illustrated, intra-predictive mode values ​​extended by WAIP can range from -14 to 83. Values ​​from 81 to 83 refer to the CCLM (Cross Component Linear Model) mode, while values ​​from -14 to -1 and from 67 to 80 refer to intra-predictive mode values ​​extended by WAIP application.

[0174] When the width of a predicted block is greater than its height, the upper reference pixel is generally closer to the predicted position within the block. Therefore, predicting in the bottom-left direction is more accurate than predicting in the top-right direction. Conversely, when the height of a block is greater than its width, the left reference pixel is generally closer to the predicted position within the block. Therefore, predicting in the top-right direction is more accurate than predicting in the bottom-left direction. Thus, it is advantageous to remap the index in the wide-angle intra-prediction mode, i.e., apply a mode index transformation.

[0175] When wide-angle intra-prediction is applied, information can be signaled to existing intra-predictions, and after the information has been parsed, it can be remapped with the index of the wide-angle intra-prediction mode. Therefore, the total number of intra-prediction modes for a particular block (e.g., a non-square block of a particular size) does not change; that is, the total number of intra-prediction modes is 67, and the intra-prediction mode coding for the particular block does not change.

[0176] Table 3 below shows the process of remapping the intra prediction mode to the wide-angle intra prediction mode to derive the modified intra mode.

[0177] [Table 3]

[0178] In Table 3, the extended intra-prediction mode value is ultimately stored in the predModeIntra variable, ISP_NO_SPLIT indicates that the CU block is not split into subpartitions by the Intra Sub Partitions (ISP) technology now adopted in the VVC standard, and the cIdx variable values ​​of 0, 1, and 2 indicate that the component is Luma, Cb, or Cr, respectively. The Log2 function shown in Table 3 returns a log value with a base of 2, and the Abs function returns the absolute value.

[0179] The input values ​​for the wide-angle intra prediction mode mapping process include the variable `predModeIntra`, which indicates the intra prediction mode, and the height and width of the transformation block. The output value is the modified intra prediction mode (`predModeIntra`). The height and width of the transformation block or coding block can become the height and width of the current block for the intra prediction mode remapping. In this case, the variable `whRatio`, which reflects the ratio of width to height, can be set to `Abs(Log2(nW / nH))`.

[0180] For non-square blocks, the intra-prediction mode can be modified in two separate cases.

[0181] First, if all of the following conditions are met: (1) the current block width is greater than the height, (2) the pre-correction intra prediction mode is greater than or equal to 2, and (3) the intra prediction mode is (8 + 2 * whRatio) if the variable whRatio is greater than 1, and 8 if the variable whRatio is less than or equal to 1, and is less than the derived value [predModeIntra is less than (whRatio>1)?(8 + 2 * whRatio): 8], then the intra prediction mode is set to a value 65 greater than the current intra prediction mode [predModeIntra is set equal to (predModeIntra + 65)].

[0182] If the above conditions are not met, then the intra-prediction mode is set to a value 67 less than the current intra-prediction mode [predModeIntra is set equal to (predModeIntra-67)] if all of the following conditions are met: (1) the current block height is greater than the width, (2) the pre-correction intra-prediction mode is less than or equal to 66, and (3) the intra-prediction mode is (60-2*whRatio) if the variable whRatio is greater than 1, and 60 if the variable whRatio is less than or equal to 1.

[0183] Table 2, mentioned above, shows how the transformation set is selected in LFNST based on the intra-prediction mode values ​​extended by WAIP. As shown in Figure 9, modes 14-33 and modes 35-80 are symmetrical with respect to the prediction direction, with respect to mode 34. For example, modes 14 and 54 are symmetrical with respect to the direction corresponding to mode 34. Therefore, modes located in symmetrical directions will be subject to the same transformation set, and this symmetry is reflected in Table 2.

[0184] However, we assume that the forward LFNST input data for mode 54 is symmetric to the forward LFNST input data for mode 14. For example, for mode 14 and mode 54, the 2D data is rearranged into 1D data according to the arrangement order shown in Figure 7(a) and Figure 7(b), respectively, and we can see that the arrangement patterns shown in Figure 7(a) and Figure 7(b) are symmetric with respect to the direction pointed to by mode 34 (diagonal term).

[0185] On the other hand, as mentioned above, the choice of which transformation matrix—the [48×16] matrix or the [16×16] matrix—to apply to LFNST is determined by the size of the block to be transformed.

[0186] Figure 10 shows block patterns to which LFNST is applied. Figure 10(a) shows a 4x4 block, (b) shows 4x8 and 8x4 blocks, (c) shows a 4xN or Nx4 block where N is 16 or greater, (d) shows an 8x8 block, and (e) shows an MxN block where M≧8, N≧8, and N>8 or M>8.

[0187] In Figure 10, the blocks with thick borders indicate the regions to which LFNST is applied. For blocks (a) and (b) in Figure 10, LFNST is applied to the top-left 4x4 region, and for block (c) in Figure 10, LFNST is applied to each of the two consecutively arranged top-left 4x4 regions. In Figures (a), (b), and (c), LFNST is applied in units of 4x4 regions, so such LFNST will be named "4x4LFNST" below, and the corresponding transformation matrix can be a base [16x16] or [16x8] matrix for G in equations 9 and 10.

[0188] More specifically, a [16x8] matrix is ​​applied to the 4x4 block (4x4TU or 4x4CU) in Figure 10(a), and a [16x16] matrix is ​​applied to the blocks in Figures 10(b) and (c). This is to match the computational complexity for the worst case to 8 multiplications per sample.

[0189] For Figures 10(d) and (e), LFNST is applied to the upper left 8x8 region, and such LFNST will be referred to as "8x8LFNST" below. The corresponding transformation matrix can be either a [48x16] or [48x8] matrix. In the case of forward LFNST, a [48x1] vector (the x vector in equation 9) is input as input data, so not all sample values ​​in the upper left 8x8 region are used as input values ​​for forward LFNST. That is, as can be seen in the left-hand order of Figure 7(a) or Figure 7(b), the bottom-right 4x4 block is left as is, and a [48x1] vector can be constructed based on the samples belonging to the remaining three 4x4 blocks.

[0190] A [48x8] matrix can be applied to the 8x8 block (8x8TU or 8x8CU) in Figure 10(d), and a [48x16] matrix can be applied to the 8x8 block in Figure 10(e). This is also to match the computational complexity for the worst case to 8 multiplications per sample.

[0191] Depending on the block pattern, applying the corresponding forward LFNST (4x4 LFNST or 8x8 LFNST) will generate 8 or 16 output data (y vectors in Equation 9, [8x1] or [16x1] vectors), and due to the properties of the matrix GT in forward LFNST, the number of output data will be the same as or less than the number of input data.

[0192] Figure 11 shows an example of the output data array for a forward LFNST, illustrating the blocks in which the output data for the forward LFNST is arranged according to the block pattern.

[0193] In Figure 11, the shaded area at the upper left corner of the block corresponds to the area where the output data of the forward LFNST is located. Positions marked with 0 indicate samples filled with the value 0, and the remaining area indicates the area that is not modified by the forward LFNST. In the area not modified by the LFNST, the output data of the forward linear transformation remains unchanged.

[0194] As mentioned above, the number of output data points also changes because the dimension of the transformation matrix applied changes depending on the block pattern. As shown in Figure 11, there are cases where the output data of the forward LFNST cannot completely fill the upper left 4x4 block. In the cases of Figure 11(a) and (d), the blocks or parts of the area inside the blocks shown by the thick lines are to which the [16x8] matrix and the [48x8] matrix are applied, respectively, to generate an [8x1] vector as the output of the forward LFNST. That is, according to the scan order shown in Figure 8(b), only 8 output data points are filled as in Figures 11(a) and (d), and the remaining 8 positions can be filled with 0. In the case of the LFNST applied block in Figure 10(d), the two 4x4 blocks at the upper right and lower left ends adjacent to the upper left 4x4 block are also filled with 0 values, as shown in Figure 11(d).

[0195] As described above, the LFNST index is basically signaled to specify whether LFNST can be applied and which transformation matrix to apply. As shown in Figure 11, when LFNST is applied, the number of output data for forward LFNST may be the same as or less than the number of input data, resulting in a region filled with zero values ​​as shown below.

[0196] 1) As shown in Figure 11(a), within the 4x4 block at the top left, the positions from the 8th in the scan order, i.e., samples from the 9th to the 16th.

[0197] 2) As shown in Figures 11(d) and (e), a [16×48] matrix or an [8×48] matrix is ​​applied to two 4×4 blocks adjacent to the top-left 4×4 block, or the second and third 4×4 blocks in the scan order.

[0198] Therefore, if checking the areas in 1) and 2) above reveals the presence of non-zero data, it is certain that LFNST will not be applied, and thus the signaling of the corresponding LFNST index can be omitted.

[0199] For example, in the case of LFNST adopted in the VVC standard, signaling of the LFNST index is performed after residual coding, so the encoding device can know whether or not there is non-zero data (effectiveness factor) for all positions within the TU or CU block via residual coding. Therefore, the encoding device can decide whether or not to perform signaling for the LFNST index based on the presence or absence of non-zero data, and the decoding device can decide whether or not the LFNST index can be parsed. If there is no non-zero data in the area specified in 1) and 2) above, then signaling of the LFNST index will be performed.

[0200] To apply runcated unary code using a binary method to LFNST indexes, an LFNST index consists of a maximum of two bins, and the binary codes assigned to possible LFNST index values ​​0, 1, and 2 are 0, 10, and 11, respectively. For example, context-based CABAC coding (regular coding) can be applied to the first bin, and context-based CABAC coding can also be applied to the second bin. The coding of LFNST indexes can be represented in the following table.

[0201] [Table 4]

[0202] As shown in Table 4, for the first bin (binIdx=0), context 0 can be applied if it is a single tree, and context 1 can be applied if it is not a single tree. Also, as shown in Table 4, for the second bin (binIdx=1), context 2 can be applied. In other words, two contexts can be assigned to the first bin, and one context can be assigned to the second bin, and each context can be distinguished by the ctxInc value (0, 1, 2).

[0203] Here, a single tree means that the luma and chroma components are coded using the same coding structure. After a coding unit is divided using the same coding structure, if the size of the coding unit falls below a certain threshold and the luma and chroma components are coded using separate tree structures, the coding unit can be considered a dual tree, and the context of the first bin can be determined accordingly. That is, the first context can be assigned as shown in Table 4.

[0204] Alternatively, you can code using context 0 if the value of the variable treeType is assigned to the first bin as SINGLE_TREE, and context 1 otherwise.

[0205] On the other hand, the following simplification method can be applied to the adopted LFNST.

[0206] (i) For example, the number of output data for a forward LFNST can be limited to a maximum of 16.

[0207] In the case of Figure 10(c), a 4x4 LFNST can be applied to each of the two 4x4 regions adjacent to the upper left corner, in which case a maximum of 32 LFNST output data can be generated. If the number of output data for forward LFNST is limited to a maximum of 16, then for 4xN / Nx4 (N≧16) blocks (TU or CU), a 4x4 LFNST can be applied to only one 4x4 region located at the upper left corner, and LFNST can be applied only once to all blocks in Figure 10. This simplifies the implementation for video coding.

[0208] Figure 12 shows an example where the number of output data for the forward LFNST is limited to a maximum of 16. As shown in Figure 12, when LFNST is applied to the top-left 4x4 region of a 4xN or Nx4 block where N is 16 or greater, the output data for the forward LFNST will be 16.

[0209] (ii) For example, zero-out can be additionally applied to regions to which LFNST is not applied. In this document, zero-out can mean filling the values ​​of all positions belonging to a particular region with the value 0. That is, zero-out can also be applied to regions that maintain the result of the forward linear transformation without being modified by LFNST. As mentioned above, since LFNST is divided into 4×4LFNST and 8×8LFNST, zero-out can be divided into two types ((ii)-(A) and (ii)-(B)) as follows.

[0210] (ii)-(A)When 4×4LFNST is applied, areas to which 4×4LFNST is not applied can be zeroed out. Figure 13 shows an example of zeroing out in a block to which 4×4LFNST is applied.

[0211] As shown in Figure 13, for blocks to which 4x4 LFNST is applied, that is, for blocks (a), (b), and (c) in Figure 11, the regions to which LFNST is not applied can all be filled with 0.

[0212] On the other hand, Figure 13(d) shows that when the maximum number of output data points for the forward LFNST is limited to 16, as in Figure 12, zero-out is performed on the remaining blocks to which the 4x4 LFNST is not applied.

[0213] (ii)-(B) When 8×8LFNST is applied, areas to which 8×8LFNST is not applied can be zeroed out. Figure 14 shows an example of zeroing out in a block to which 8×8LFNST is applied.

[0214] As shown in Figure 14, for blocks to which 8x8 LFNST is applied, that is, for blocks (d) and (e) in Figure 11, the regions to which LFNST is not applied can all be filled with 0.

[0215] (iii) When LFNST is applied by the zero-out method presented in (ii) above, the area filled with zeros can change. Therefore, the zero-out method proposed in (ii) above allows checking for the presence of non-zero data over a wider area than in the case of LFNST in Figure 11.

[0216] For example, when applying (ii)-(B), after checking whether non-zero data exists in the regions filled with zero values ​​in Figure 11 (d) and (e), and further in the regions filled with zeros in Figure 14, signaling to the LFNST index can be performed only if no non-zero data exists.

[0217] Of course, even when applying the zero-out proposed in (ii) above, it is still possible to check whether non-zero data exists, just as with existing LFNST index signaling. That is, LFNST index signaling can be applied by checking whether non-zero data exists for blocks filled with zeros in Figure 11. In such a case, zero-out can be performed only on the encoding device, and LFNST index parsing can be performed on the decoding device without assuming the zero-out, that is, by checking whether non-zero data exists only for areas explicitly indicated as zeros in Figure 11.

[0218] A variety of embodiments can be derived by applying combinations of the simplification methods ((i), (ii)-(A), (ii)-(B), (iii)) to the aforementioned LFNST. Of course, the combinations for the simplification methods are not limited to the embodiments described below, and any combination can be applied to the LFNST.

[0219] Examples

[0220] - Limit the number of output data for forward LFNST to a maximum of 16 → (i)

[0221] When -4×4LFNST is applied, all areas to which 4×4LFNST is not applied are zeroed out → (ii)-(A)

[0222] When -8×8LFNST is applied, all areas to which 8×8LFNST is not applied are zeroed out → (ii)-(B)

[0223] - Check whether non-zero data exists in the regions filled with existing zero values ​​and the regions filled with zeros by additional zero-outs ((ii)-(A), (ii)-(B)), and only if no non-zero data exists, perform LFNST indexing signaling → (iii)

[0224] In the above embodiment, when LFNST is applied, the area in which non-zero output data can exist is limited to the upper left 4x4 area. More specifically, in the cases of Figure 13(a) and Figure 14(a), the 8th position in the scan sequence is the last position in which non-zero data can exist, and in the cases of Figure 13(b) and (d) and Figure 14(b), the 16th position in the scan sequence (i.e., the outermost position at the lower right of the upper left 4x4 block) is the last position in which non-zero data can exist.

[0225] Therefore, when LFNST is applied, it is possible to determine whether LFNST index signaling is permitted after checking whether non-zero data exists at locations where the residual coding process is not permitted (locations beyond the last location).

[0226] In the case of the zero-out method proposed in (ii), the amount of data that ultimately occurs when both the linear transformation and LFNST are applied is reduced, thereby reducing the computational load required when executing the entire transformation process. That is, when LFNST is applied, zero-out is also applied to the forward linear transformation output data in the region where LFNST is not applied, so there is no need to generate data for the region that will be zero-out from the time the forward linear transformation is executed. Therefore, the computational load required to generate the relevant data can be saved. The additional effects of the zero-out method proposed in (ii) can be summarized as follows.

[0227] Firstly, as mentioned above, the amount of computation required to execute the entire transformation process is reduced.

[0228] In particular, when (ii)-(B) is applied, the computational complexity in the worst case is reduced, and the conversion process can be made lighter. To elaborate, generally, a large amount of computation is required when performing a large-size linear conversion, and when (ii)-(B) is applied, the number of data items derived as a result of the forward LFNST execution can be reduced to 16 or less, and the effect of reducing the computational complexity of the conversion increases even more as the overall block (TU or CU) size increases.

[0229] Secondly, the amount of computation required for the entire conversion process is reduced, thereby lowering the power consumption required to perform the conversion.

[0230] Third, reduce the latency associated with the conversion process.

[0231] Quadratic transformations like LFNST add computational complexity to existing linear transformations, thus increasing the overall delay time associated with the transformation execution. In particular, in the case of intra-prediction, since reconstruction data from adjacent blocks is used in the prediction process, the increased delay time due to the quadratic transformation during encoding leads to an increased delay time until reconstruction, which can result in an overall increase in the delay time of intra-prediction encoding.

[0232] However, by applying the zero-out method described in (ii), the delay time for the primary conversion execution can be significantly reduced when LFNST is applied. As a result, the overall delay time for the conversion execution remains the same or decreases, making it easier to implement the encoding device.

[0233] On the other hand, conventional intra-prediction treated the block currently to be encoded as a single encoding unit and performed encoding without division. However, ISP (Intra Sub-Paritions) coding means dividing the block currently to be encoded horizontally or vertically and performing intra-predictive coding. In this case, encoding / decoding is performed on each divided block to generate a reconstructed block, and the reconstructed block can be used as a reference block for the next divided block. For example, during ISP coding, one coding block can be divided into two or four sub-blocks and coded, and in ISP, one sub-block performs intra-prediction by referencing the reconstructed pixel value of the adjacent sub-block located to its left or adjacent upper side. Hereafter, the term "coding" can be used as a concept that includes both coding performed by the encoding device and decoding performed by the decoding device.

[0234] On the other hand, the following section will explain the signaling of the LFNST index and the MTS index.

[0235] The coding unit syntax table, translation unit syntax table, and residual coding syntax table related to the signaling of LFNST and MTS indexes in one example are shown in the table below. According to Table 5, the MTS index moves from the translation unit level to the coding unit level syntax and is signaled after the LFNST index signaling. Also, the restriction that prevents LFNST when ISP is applied to the coding unit is removed. Because the restriction that prevents LFNST when ISP is applied to the coding unit is removed, LFNST can be applied to all intra-prediction blocks. In addition, both the MTS index and the LFNST index are conditionally signaled to the last part of the coding unit level.

[0236] [Table 5]

[0237] [Table 6]

[0238] [Table 7]

[0239] The meanings of the main variables in the table above are as follows:

[0240] 1. cbWidth, cbHeight: The current width and height of the coding block.

[0241] 2. log2TbWidth, log2TbHeight: Base - 2 log values ​​of the current width and height of the Transform Block. Zero-out is reflected, and non-zero coefficients can exist in the upper left region.

[0242] 3. sps_lfnst_enabled_flag: This flag indicates whether LFNST is applicable (enable). A flag value of 0 indicates that LFNST is not applicable, and a flag value of 1 indicates that LFNST is applicable. It is defined in the Sequence Parameter Set (SPS).

[0243] 4. CuPredMode[chType][x0][y0]: The prediction mode corresponds to the variable chType and the (x0, y0) position. chType can have values ​​of 0 or 1, where 0 indicates the luma component and 1 indicates the chroma component. The (x0, y0) position indicates the position on the picture, and the CuPredMode[chType][x0][y0] value allows for MODE_INTRA (intra prediction) and MODE_INTER (inter prediction).

[0244] 5. IntraSubPartitionsSplit[x0][y0]: The content for the (x0, y0) position is the same as in 4 above. It indicates what kind of ISP splitting was applied at the (x0, y0) position, and ISP_NO_SPLIT indicates that the coding unit corresponding to the (x0, y0) position is not split into partition blocks.

[0245] 6. intra_mip_flag[x0][y0]: The content for the (x0, y0) position is the same as in 4 above. intra_mip_flag is a flag that indicates whether the MIP (Matrix-based Intra Prediction) prediction mode is applied. A flag value of 0 indicates that MIP is not applicable, and a flag value of 1 indicates that MIP is applied.

[0246] 7. cIdx: A value of 0 indicates luma, while values ​​of 1 and 2 indicate the chromatic components Cb and Cr, respectively.

[0247] 8. treeType: Refers to single-tree and dual-tree types (SINGLE_TREE: single-tree, DUAL_TREE_LUMA: dual-tree for luma component, DUAL_TREE_CHROMA: dual-tree for chroma component)

[0248] 9. lastSubBlock: Indicates the position in the scan order of the sub-block (Coefficient Group, CG) where the last non-zero coefficient is located. 0 refers to the sub-block containing the DC component, and a value greater than 0 indicates that the sub-block does not contain the DC component.

[0249] 10. lastScanPos: Indicates the position in the scan order of the last non-zero coefficient within one sub-block. If one sub-block is composed of 16 positions, values from 0 to 15 are possible.

[0250] 11. lfnst_idx[x0][y0]: This is the LFNST index syntax element to be parsed. If not parsed, it is inferred to be a value of 0. That is, the default value is set to 0, indicating that LFNST is not applied.

[0251] 12. LastSignificantCoeffX, LastSignificantCoeffY: Indicate the x-coordinate and y-coordinate of the position of the last non-zero coefficient within the transform block. The x-coordinate starts at 0 and increases from left to right, and the y-coordinate starts at 0 and increases from top to bottom. When the values of both variables are 0, it means that the last non-zero coefficient is located at the DC position.

[0252] 13. cu_sbt_flag: A flag indicating whether SubBlock Transform (SBT) included in the current VVC standard is applicable. A flag value of 0 indicates that SBT is not applicable, and a flag value of 1 indicates that SBT is applied.

[0253] 14. sps_explicit_mts_inter_enabled_flag, sps_explicit_mts_intra_enabled_flag: These flags indicate whether explicit MTS has been applied to the interCU and intraCU, respectively. A flag value of 0 indicates that MTS cannot be applied to the interCU or intraCU, while a value of 1 indicates that it can be applied.

[0254] 15. tu_mts_idx[x0][y0]: This is the MTS index syntax element to be parsed. If parsing is not performed, it is inferred to have a value of 0. That is, the default value is set to 0, indicating that DCT-2 is applied to all horizontal and vertical directions.

[0255] As shown in Table 5, when coding mts_idx[x0][y0], various conditions are checked, and tu_mts_idx[x0][y0] is signaled only when the lfnst_idx[x0][y0] value is 0.

[0256] Furthermore, tu_cbf_luma[x0][y0] is a flag indicating whether or not an effective coefficient exists for the luma component.

[0257] According to Table 5, when both the width and height of the coding unit for the luma component are 32 or less, mts_idx[x0][y0] is signaled (Max(cbWidth, cbHeight) <= 32), meaning that the applicability of MTS is determined by the width and height of the coding unit for the luma component.

[0258] Furthermore, as shown in Table 5, even in ISP mode, it is possible to configure the system to signal (IntraSubPartitionsSplitType!=ISP_NO_SPLIT)lfnst_idx[x0][y0], and the same LFNST index value can be applied to all ISP partition blocks.

[0259] On the other hand, mts_idx[x0][y0] can only be signaled if it is not in ISP mode (IntraSubPartitionsSplit[x0][y0] == ISP_NO_SPLIT).

[0260] As shown in Table 7, the part of the process of determining log2ZoTbWidth and log2ZoTbHeight (where log2ZoTbWidth and log2ZoTbHeight represent the base-2 log values ​​of the width and height of the upper-left region remaining after zeroing out, respectively) where the mts_idx[x0][y0] value is checked can be omitted.

[0261] Additionally, when determining log2ZoTbWidth and log2ZoTbHeight using residual coding, a condition can be added to check sps_mts_enable_flag.

[0262] The variable LfnstZeroOutSigCoeffFlag in Table 5 is 0 if an effective coefficient exists at a position where zero-out occurs when LFNST is applied, and 1 otherwise. The variable LfnstZeroOutSigCoeffFlag can be set by various conditions shown in Table 7.

[0263] For example, the variable LfnstDcOnly in Table 5 will be 1 if the last effective coefficients of a transformation block with a corresponding CBF (Coded Block Flag, 1 if at least one effective coefficient exists in the block, 0 otherwise) value is 1, and 0 otherwise. More specifically, in the case of a dual-tree luma, the position of the last effective coefficient is checked for one luma transformation block, and in the case of a dual-tree chroma, the position of the last effective coefficient is checked for both the transformation block for Cb and the transformation block for Cr. In the case of a single tree, the position of the last effective coefficient can be checked for the transformation blocks for luma, Cb, and Cr.

[0264] In Table 5, MtsZeroOutSigCoeffFlag is initially set to 1, and this value can be changed by residual coding in Table 7. The variable MtsZeroOutSigCoeffFlag is changed from 1 to 0 if there is an effective coefficient in the region that should be filled with 0 by zero-out (LastSignificantCoeffX>15||LastSignificantCoeffY>15), in which case the MTS index is not signaled, as shown in Table 5.

[0265] On the other hand, as shown in Table 5, if tu_cbf_luma[x0][y0] is 0, the mts_idx[x0][y0] coding can be omitted. That is, if the CBF value of the luma component is 0, the transformation is not applied, so there is no need to signal the MTS index, and the MTS index coding can be omitted.

[0266] For example, the aforementioned technical features can be embodied in other conditional constructs. For instance, after MTS is executed, a variable can be derived indicating whether an effective coefficient exists in the region excluding the DC region of the current block, and if the variable indicates that an effective coefficient exists in the region excluding the DC region, the MTS index can be signaled. That is, the existence of an effective coefficient in the region excluding the DC region of the current block indicates that the tu_cbf_luma[x0][y0] value is 1, in which case the MTS index can be signaled.

[0267] The aforementioned variable can be represented as MtsDcOnly, which is initially set to 1 at the coding unit level, and then changed to 0 at the residual coding level if it indicates that an effective coefficient exists in the area excluding the DC area of ​​the current block. When the variable MtsDcOnly is 0, the video information can be configured so that the MTS index is signaled.

[0268] If tu_cbf_luma[x0][y0] is 0, the variable MtsDcOnly will retain its initial value of 1 because no call to the residual coding syntax is made at the conversion unit level in Table 6. In such a case, since the variable MtsDcOnly was not changed to 0, the video information can be configured so that the MTS index is not signaled. That is, the MTS index is not parsed and signaled.

[0269] On the other hand, the decoding device can determine the color index (cIdx) of the conversion coefficients in order to derive the variable MtsZeroOutSigCoeffFlag in Table 7. A color index (cIdx) of 0 means that the luma component is present.

[0270] For example, since MTS can only be applied to the luma component of a block, the decoding device can determine whether the color index is luma when deriving the variable MtsZeroOutSigCoeffFlag, which determines whether the MTS index is parsable.

[0271] The variable MtsZeroOutSigCoeffFlag indicates whether zero-out was performed when MTS was applied. It shows whether a conversion coefficient exists in an area other than the upper-left region where the last effective coefficient can exist after MTS execution due to zero-out, i.e., an area other than the upper-left 16x16 region. The variable MtsZeroOutSigCoeffFlag is initially set to 1 at the coding unit level (MtsZeroOutSigCoeffFlag=1) as shown in Table 5, and if a conversion coefficient exists in an area other than the 16x16 region, its value can be changed from 1 to 0 at the residual coding level (MtsZeroOutSigCoeffFlag=0) as shown in Table 7. If the value of the variable MtsZeroOutSigCoeffFlag is 0, the MTS index is not signaled.

[0272] As shown in Table 7, at the residual coding level, a non-zero-out region where non-zero transform coefficients can exist may be set depending on whether zero-out associated with MTS is performed. Also in this case, when the color index (cIdx) is 0, the non-zero-out region may be set to the top-left 16×16 region of the current block.

[0273] In this way, when deriving the variable that determines whether parsing of the MTS index is allowed, it is determined whether the color component is luma or chroma. However, since LFNST can be applied to both the luma component and the chroma component of the current block, the color component is not determined when deriving the variable that determines whether parsing of the LFNST index is allowed.

[0274] For example, Table 5 shows a variable LfnstZeroOutSigCoeffFlag that may indicate that zero-out is performed when LFNST is applied. The variable LfnstZeroOutSigCoeffFlag indicates whether a significant coefficient exists in the second region excluding the first top-left region of the current block, and this value is initially set to 1, and if a significant coefficient exists in the second region, its value may be changed to 0. The LFNST index can be parsed only when the initially set value of the variable LfnstZeroOutSigCoeffFlag is maintained at 1. When determining and deriving whether the value of the variable LfnstZeroOutSigCoeffFlag is 1, since LFNST can be applied to both the luma component and the chroma component of the current block, the color index of the current block is not determined.

[0275] As shown in Table 5, the MTS index is signaled for each coding unit, and mts_idx (MTS index) is signaled only when MtsZeroOutSigCoeffFlag is 1.

[0276] Furthermore, as shown in Table 7, the MtsZeroOutCoeffFlag value can be determined at the residual coding level by a specific condition (if((LastSignificantCoeffX>15||LastSignificantCoeffY>15)&&cIdx==0)).

[0277] The MtsZeroOutSigCoeffFlag value is set to 0 if the X-coordinate of the last non-zero coefficient (LastSignificantCoeffX) is greater than 15 or the Y-coordinate of the last non-zero coefficient (LastSignificantCoeffY) is greater than 15 (where the X-coordinate increases from left to right within the transformation block, and the Y-coordinate increases from top to bottom within the transformation block. The top-left corner of the transformation block is (0,0).

[0278] Since MtsZeroOutSigCoeffFlag was initialized to 1 in Table 5, if the conditions presented in Table 7 are not met and the MtsZeroOutSigCoeffFlag value is not set to 0, the value of 1 will remain.

[0279] When A is a primary transform applied horizontally and B is a primary transform applied vertically, the primary transforms can be represented as (A, B). Currently, the VVC standard restricts the transformation coefficients to exist only in the upper left 16x16 region of the corresponding transformation block when the transformations are (DST-7, DST-7), (DST-7, DCT-8), (DCT-8, DST-7), and (DCT-8, DCT-8). Therefore, the condition (LastSignificantCoeffX>15||LastSignificantCoeffY>15) in Table 7 indicates that the last non-zero coefficient is located outside the upper left 16x16 region. In Table 7, the variable cIdx represents the color component, and a value of 0 for the variable cIdx means it is the luma component.

[0280] Currently, in the VVC standard, the MTS index (mts_idx) is parsed after parsing for the residual coding. More specifically, Table 5 shows a coding unit which is a syntax parsing function for a coding unit, where the MTS index is parsed after the transformation tree function, and a function that performs residual coding parsing is called within the transformation tree function. Therefore, the MTS index is parsed after parsing for the residual (the residual parsing function shown in Table 7 is responsible for parsing for the relevant residual coding), and from a decoding perspective, it is not possible to know what primary transformation will be applied while the residual coding is in progress because the MTS index information is not known. However, if MTS is enabled and SBT or ISP is applied, or if implicit MTS is applied, then MTS is implicitly applied, and the relevant primary transformation can be known before parsing for the residual coding.

[0281] The reason why conditional checks like those in Table 7 are necessary is that the current VVC standard restricts the output to only 16 conversion coefficients when a forward transformation is applied to 32-length DST-7 or 32-length DCT-8. For example, if the MTS index value is greater than 0 and the applied linear transformation is one of (DST-7, DST-7), (DST-7, DCT-8), (DCT-8, DST-7), or (DCT-8, DCT-8), then non-zero conversion coefficients will only exist in the upper left 16x16 region of the corresponding transformation block.

[0282] Therefore, if the position of the last non-zero conversion coefficient is outside the upper left 16x16 region, it corresponds to the case where the MTS index value is 0, and signaling for the MTS index can be omitted as shown in Table 5. However, even if the position of the last non-zero conversion coefficient is inside the upper left 16x16 region, a non-zero coefficient can exist outside the upper left 16x16 region, so in this case, even if the MTS index value is 0, a situation can occur where the MTS index is signaled as 0, and this is explained below.

[0283] When the linear transformation is (DCT-2, DCT-2), the position of the last non-zero coefficient lies in the upper left 16x16 region, and at the same time, non-zero transformation coefficients can also exist outside the upper left 16x16 region. This is because, in terms of the scan order within the transformation block, it is possible to scan outside the upper left 16x16 region, i.e., regions other than the upper left 16x16 region, and also scan the upper left 16x16 region, or conversely, to scan the upper left 16x16 region and also scan outside the upper left 16x16 region.

[0284] Figure 15 illustrates the scanning of a 32x32 transformation block as an example in this document, more specifically showing that the 32x32 transformation block is divided into 4x4 coefficient groups (CGs) for scanning. In this document, when a block is divided into CGs for scanning, the corresponding CG is also called a "scan subblock."

[0285] The numbers displayed for each CG indicate the forward scan order, and the decoding device scans in reverse order, starting from the position where the last non-zero conversion coefficient exists. In Figure 15, we can assume that the last non-zero conversion coefficient exists at CG 25, and this CG 25 is located within the 16x16 area at the top left.

[0286] As shown in Figure 15, if the last non-zero conversion coefficient exists in CG 25, the decoding device scans from the CG containing the last non-zero conversion coefficient in reverse scan order. Therefore, based on the numbers shown in Figure 15, the CGs are scanned in the order of 25, 24, 23, ..., 3, 2, 1. Since CGs 24, 23, 22, 21, 20, 17, 16, 15, and 11 are located outside the upper left 16x16 region, checking whether LastSignificantCoeffX and LastSignificantCoeffY fall within the upper left 16x16 region, as shown in Table 7, does not allow us to determine whether a non-zero coefficient exists only in the upper left 16x16 region.

[0287] Therefore, when performing parsing for residual coding, checking whether the corresponding 4x4 coefficient group belongs to the upper-left 16x16 region each time a non-zero conversion coefficient is scanned allows the MtsZeroOutSigCoeffFlag value to be set to 0 only if the non-zero coefficient exists outside the upper-left 16x16 region. The residual coding syntax reflecting this is shown in the table below.

[0288] [Table 8-1]

[0289] [Table 8-2]

[0290] [Table 8-3]

[0291] As shown in Table 8, whenever a non-zero conversion coefficient is found, it can be configured to check if it is located in the upper left 16x16 region (if((xC>15||yC>15)&&cIdx==0)) and set the MtsZeroOutSigCoeffFlag value to 0. At this time, the above condition is checked if the sig_coeff_flag[xC][yC] value, which is flag information indicating the presence or absence of a conversion coefficient, is 1 (if(sig_coeff_flag[xC][yC])), where xC and yC refer to the sample unit X and Y coordinates within the current conversion block, respectively. The upper left position of the relevant conversion block is (0,0).

[0292] Table 8 includes the condition check and MtsZeroOutSigCoeffFlag update part (if((LastSignificantCoeffX>15||LastSignificantCoeffY>15)&&cIdx==0)MtsZeroOutSigCoeffFlag=0) presented in Table 7. If the sig_coeff_flag[xC][yC] value for the last non-zero conversion coefficient is inferred to be 1, the corresponding condition check and MtsZeroOutSigCoeffFlag update part in Table 8 can be removed.

[0293] To summarize, when signaling the MTS index in Table 5 via the syntax configuration shown in Table 8, the MTS index will only be signaled if a non-zero conversion coefficient exists in the upper left 16x16 region of the Luma conversion block, regardless of which linear transformation is applied. If the MTS index is not signaled, the corresponding value is inferred to be 0, i.e., (DCT-2, DCT-2) is applied.

[0294] As mentioned above, there are three cases in which it is possible to know the linear transformation applied before the MTS index is signaled:

[0295] 1) When a Subblock Transform (SBT) is applied

[0296] 2) When Intra Sub-Partitions (ISP) are applied

[0297] 3) When implicit MTS applies

[0298] In case (1), the MTS index is configured to signal only when the cu_sbt_flag value, which indicates whether SBT is applicable or not in Table 5, is 0. In other words, the MTS index is signaled only when SBT is not applied, so if SBT is applied, it is unrelated to the correction in Table 7.

[0299] In case (2), the MTS index is signaled only when ISP is not applied in Table 4 (which corresponds to checking the IntraSubPartitionsSplit[x0][y0]==ISP_NO_SPLIT condition when signaling the MTS index in Table 5), so the case where ISP is applied is also unrelated to the correction in Table 8.

[0300] Even in case (3), the MTS index is signaled only when explicit MTS is enabled in Table 5, so the correction in Table 8 does not apply when implicit MTS is applied. In other words, the MTS index is signaled only when the sps_explicit_mts_intra_enabled_flag value is 1 for MTS applied to residual blocks generated by intra prediction (intra MTS), and only when the sps_explicit_mts_inter_enabled_flag value is 1 for MTS applied to residual blocks generated by inter prediction (inter MTS), so the correction in Table 8 does not affect when implicit MTS is applied.

[0301] On the other hand, other examples can be used to check whether a non-zero coefficient exists outside the upper left 16x16 region in CG units, as shown in the table below.

[0302]

Table 9-1

[0303]

Table 9-2

[0304]

Table 9-3

[0305] In Table 9, xS and yS denote the X coordinate position and Y coordinate position in each CG unit inside the current transform block, and it is necessary to convert xS and yS into coordinates in sample units to confirm whether the transform coefficient is located outside the top-left 16×16 area. That is, xS and yS are converted into sample unit coordinates as (xS<<log2SbW) and (yS<<log2SbH). At this time, log2SbW and log2SbH are respectively the base-2 logarithm values of the width and height of the corresponding CG, the X coordinate increases from the left side to the right side, and the Y coordinate increases from the upper side to the lower side. The coordinates for the top-left position of the corresponding transform block are (0, 0).

[0306] As shown in Table 9, when scanning in CG units, for each CG, if a non-zero transform coefficient exists inside the corresponding CG (when the value of coded_sub_block_flag[xS][yS] is 1) and it is confirmed that the corresponding CG is located outside the top-left 16×16 region of the corresponding transform block ((xS<<log2SbW)>15||(yS<<log2SbH)>15)), the MtsZeroOutSigCoeffFlag value is set to 0.

[0307] As shown in Table 5, the variable MtsZeroOutSigCoeffFlag is initialized to 1, so if the MtsZeroOutSigCoeffFlag value is not set to 0, it will remain at 1. If the coded_sub_block_flag[xS][yS] value of the CG to which the last non-zero conversion coefficient belongs is inferred to be 1, then the corresponding condition check part in Table 7 and the MtsZeroOutSigCoeffFlag update part (if((LastSignificantCoeffX>15||LastSignificantCoeffY>15)&&cIdx==0)MtsZeroOutSigCoeffFlag=0) can also be removed in Table 9.

[0308] The following drawings have been prepared to illustrate a specific example of this specification. The names of specific devices and signals / messages / fields shown in the drawings are presented illustratively, and the technical features of this specification are not limited to the specific names used in the following drawings.

[0309] Figure 16 is a flowchart illustrating the operation of a video decoding device according to one embodiment described in this document.

[0310] Each step disclosed in Figure 16 is based in part on the details described in Figures 4 through 15. Therefore, specific details that overlap with those described in Figures 3 through 15 are omitted or simplified in their explanation.

[0311] A decoding device 300 according to one embodiment can receive a bitstream containing residual information and derive residual information for the current block, i.e., the conversion block to be converted, from the bitstream, such as quantized conversion coefficients (S1610).

[0312] More specifically, the decoding device 300 can decode information about the quantized transformation coefficients for the current block from the bitstream, and can derive the quantized transformation coefficients for the target block based on the information about the quantized transformation coefficients for the current block. The information about the quantized transformation coefficients for the target block can be contained in an SPS (Sequence Parameter Set) or a slice header, and may include at least one of the following: information on whether a simplified transformation (RST) is applied, information on the simplified factor, information on the minimum transformation size to apply the simplified transformation, information on the maximum transformation size to apply the simplified transformation, the inverse simplified transformation size, and information on a transformation index that points to one of the transformation kernel matrices contained in the transformation set.

[0313] The decoding device 300 can derive the position of the last effective coefficient in the current block and the transformation coefficient for the current block based on the residual information (S1620). The decoding device 300 can derive the transformation coefficient by performing inverse quantization on the quantized transformation coefficient for the current block.

[0314] The derived conversion coefficients can be arranged in a two-dimensional array in the current block, and the decoding device can derive information about non-zero data in the current block, i.e., non-zero effective coefficients, through such residual coding. That is, the decoding device can determine the last position information of the non-zero effective coefficients in the current block.

[0315] The transformation coefficients derived based on the residual information of S1620 may be inversely quantized transformation coefficients as described above, or they may be quantized transformation coefficients. That is, regardless of whether the transformation coefficients are quantizable or not, the data should be such that it is possible to determine whether the data is not zero in the current block and the position of the effective coefficients.

[0316] The decoding device may or may not apply LFNST to the conversion coefficients to derive the corrected conversion coefficients.

[0317] The decoding device can derive residual samples by performing an inverse linear transformation on the transformed or modified transformed coefficients. The decoding device can use a standard DCT-2 as the transformation kernel for the inverse linear transformation, or it can apply the detailed MTS.

[0318] MTS can be executed implicitly or based on explicit MTS index signaling.

[0319] The decoding device can check predetermined conditions in order to parse the MTS index. For example, the decoding device can parse the MTS index based on the fact that there are no effective coefficients in a second region excluding the first region at the top left of the current block (S1630).

[0320] The MTS index can derive flag information indicating whether an effective coefficient exists in a second region. This flag information can be derived by determining whether an effective coefficient exists in the second region on a scan subblock basis where the effective coefficient is scanned.

[0321] The decoding device can perform an inverse linear transformation on the transformation coefficients of the first region at the top left of the current block that is to be transformed. That is, the second region, excluding the first region at the top left of the current block, is zeroed out and has no transformation coefficients.

[0322] For example, when MTS is applied, the first area is the top-left 16x16 area of ​​the current block, and in this case, the second area can represent the area other than the top-left 16x16 area.

[0323] The scan subblock is a 4x4 block, and the scan subblock can be scanned by the inverse diagonal scan direction from the position of the last effective coefficient in the current block, as shown in Figure 15.

[0324] After determining whether effective coefficients exist in the zeroed-out region, the decoding device can derive flag information indicating whether effective coefficients exist in the second region in order to parse the MTS index, and parse the MTS index based on this.

[0325] This flag information is represented by the variable MtsZeroOutSigCoeffFlag, which allows us to determine whether the effective coefficient exists in the second region for each scan subblock in which the effective coefficient is scanned.

[0326] The variable MtsZeroOutSigCoeffFlag is a flag (coded_sub_block_flag or sb_coded_flag) that indicates whether an effective coefficient exists within the scan subblock, as shown in Table 9. If the value of the flag is 1 and the effective coefficient present within the scan subblock is located in the second region (((xS<<log2SbW)> 15||(yS<<log2SbH)> 15)) It can be indicated that the effective coefficient exists in the second region.

[0327] Alternatively, the variable MtsZeroOutSigCoeffFlag can be derived by checking whether the 4x4 scan subblock belongs to the first region each time the conversion coefficients are scanned, as shown in Table 8. That is, if the value of the flag (sig_coeff_flag) indicating whether an effective coefficient exists within the scan subblock is 1, and the effective coefficient present within the scan subblock is located in the second region (if((xC>15||yC>15)), then the variable MtsZeroOutSigCoeffFlag can indicate that an effective coefficient exists in the second region.

[0328] Alternatively, the variable MtsZeroOutSigCoeffFlag can have a flag value of 1 indicating whether an effective coefficient exists, and if the scan subblock itself is located in the second region, it can also indicate that an effective coefficient exists in the second region.

[0329] Such a variable, MtsZeroOutSigCoeffFlag, can be initially set to 1, remains 1 if the effective coefficient is not in the second region, and can be changed to 0 if the effective coefficient is in the second region.

[0330] To summarize, the decoding device can parse the MTS index based on the flag information indicating that there are no effective coefficients in the second region, and the MTS index can be parsed when the variable MtsZeroOutSigCoeffFlag, which was initially set to 1, maintains that value.

[0331] Subsequently, the decoding device can apply the conversion kernel derived based on the MTS index to the conversion coefficients of the first region to derive the residual sample for the current block (S1640).

[0332] Next, the decoding device 300 can generate a reconstructed sample based on the residual sample for the current block and the predicted sample for the current block.

[0333] The following drawings have been prepared to illustrate a specific example of this specification. The names of specific devices and signals / messages / fields shown in the drawings are presented illustratively, and the technical features of this specification are not limited to the specific names used in the following drawings.

[0334] Figure 17 is a flowchart illustrating the operation of a video encoding device according to one embodiment described in this document.

[0335] Each step disclosed in Figure 17 is based in part on the details described in Figures 4 through 15. Therefore, specific details that overlap with those described in Figures 2 and 4 through 15 are omitted or simplified in their explanation.

[0336] An encoding device 200 according to one embodiment can derive a predicted sample based on the intra-prediction mode currently applied to the block (S1710).

[0337] An encoding device 200 according to one embodiment can derive a residual sample for the current block based on a predicted sample (S1720).

[0338] The encoding device 200 according to one embodiment can apply MTS to a residual sample to derive a conversion coefficient for the current block (S1730).

[0339] For example, the encoding device may apply the detailed MTS for the first-order conversion, or it may use the standard DCT-2 as the conversion kernel.

[0340] MTS can be executed implicitly or based on explicit MTS index signaling.

[0341] The encoding device can decide whether to perform MTS for the primary conversion, and if it decides to perform MTS, it can apply DCT-8 or DST-7 to the residual sample to derive the conversion coefficients.

[0342] For example, when MTS is applied as the primary conversion, the encoding device can zero out a second region, excluding the first region at the top left of the current block (S1740).

[0343] For example, the first region is the 16x16 region at the top left of the current block, and in this case, the second region can represent the region other than the top left 16x16 region.

[0344] This zero-out process reduces the computational load required to execute the entire conversion process, thereby reducing power consumption. Furthermore, it reduces the latency associated with the conversion process, increasing video coding efficiency.

[0345] The encoding device can also derive modified conversion coefficients by further applying LFNST to the conversion coefficients derived after the first-order conversion.

[0346] The encoding device can derive residual information based on the conversion coefficients for the current block or the modified conversion coefficients (S1750).

[0347] In other words, the encoding device can generate residual information containing information about the quantized conversion coefficients. The residual information may include the conversion-related information / syntax elements described in detail. The encoding device can encode the video information containing the residual information and output it in bitstream format.

[0348] More specifically, the encoding device 200 can generate information about quantized transformation coefficients and encode the generated information about quantized transformation coefficients.

[0349] Furthermore, the encoding device can configure the video information so that an MTS index is parsed that instructs the MTS conversion kernel based on whether an effective coefficient exists in the second region (S1760).

[0350] Furthermore, the encoding device can configure the video information such that flag information indicating whether the effective coefficient exists in a second region is derived for each scan subblock in which the effective coefficient is scanned.

[0351] In other words, the encoding device can configure the video information so that the video information shown in Table 8 or Table 9 is parsed by the decoding device.

[0352] For example, the scan subblock is a 4x4 block, and the scan subblock can be scanned by the decoding device in the reverse diagonal scan direction from the position of the last effective coefficient in the current block, as shown in Figure 15.

[0353] The flag information is the variable MtsZeroOutSigCoeffFlag, which allows you to determine whether the effective coefficient exists in the second region for each scan subblock in which the effective coefficient is scanned.

[0354] The variable MtsZeroOutSigCoeffFlag has a flag value (coded_sub_block_flag) of 1, which indicates whether an effective coefficient exists within the scan subblock, as shown in Table 9. If the effective coefficient present within the scan subblock is located in the second region (((xS<<log2SbW)> 15||(yS<<log2SbH)> 15)) It can be indicated that the effective coefficient exists in the second region.

[0355] Alternatively, the variable MtsZeroOutSigCoeffFlag can be derived by checking whether the 4x4 scan subblock belongs to the first region each time the conversion coefficients are scanned, as shown in Table 8. That is, if the value of the flag (sig_coeff_flag) indicating whether an effective coefficient exists within the scan subblock is 1, and the effective coefficient present within the scan subblock is located in the second region (if((xC>15||yC>15)), then the variable MtsZeroOutSigCoeffFlag can indicate that an effective coefficient exists in the second region.

[0356] Alternatively, the variable MtsZeroOutSigCoeffFlag can have a flag value of 1 indicating whether an effective coefficient exists, and if the scan subblock itself is located in the second region, it can also indicate that an effective coefficient exists in the second region.

[0357] Such a variable, MtsZeroOutSigCoeffFlag, can be initially set to 1, remains 1 if the effective coefficient is not in the second region, and can be changed to 0 if the effective coefficient is in the second region.

[0358] The encoding device can output the MTS index after encoding it, based on the residual information and flag information derived from the conversion coefficients indicating that no effective coefficients exist in the second area.

[0359] In this document, at least one of quantization / inverse quantization and / or transformation / inverse transformation may be omitted. If quantization / inverse quantization is omitted, the quantized transformation coefficient may be called a transformation coefficient. If transformation / inverse transformation is omitted, the transformation coefficient may also be called a coefficient or residual coefficient, or may still be called a transformation coefficient for consistency of expression.

[0360] Furthermore, in this document, quantized transformation coefficients and transformation coefficients may be referred to as transformation coefficients and scaled transformation coefficients, respectively. In this case, residual information may include information about the transformation coefficients, and such information about the transformation coefficients may be signaled via residual coding syntax. Based on the residual information (or information about the transformation coefficients), transformation coefficients can be derived, and scaled transformation coefficients can be derived via inverse transformation (scaling) of the transformation coefficients. Based on inverse transformation (transformation) of the scaled transformation coefficients, residual samples can be derived. This can be similarly applied / expressed in other parts of this document.

[0361] In the embodiments described above, the method is explained based on a flowchart as a series of steps or blocks; however, this document is not limited to the order of the steps, and some steps may occur in a different order or simultaneously with other steps than those described above. Furthermore, those skilled in the art will understand that the steps shown in the flowchart are not exclusive, and other steps may be included, or one or more steps in the flowchart may be deleted without affecting the scope of this document.

[0362] The method described in this document above can be implemented in software form, and the encoding and / or decoding device described in this document may be included in, for example, image processing devices such as TVs, computers, smartphones, set-top boxes, and display devices.

[0363] In this document, when embodiments are implemented in software, the methods described above can be implemented by modules (processes, functions, etc.) that perform the functions described above. These modules are stored in memory and can be executed by a processor. The memory may be internal or external to the processor and may be connected to the processor by various well-known means. The processor may include an ASIC (application-specific integrated circuit), other chipsets, logic circuits, and / or data processing devices. The memory may include ROM (read-only memory), RAM (random access memory), flash memory, memory cards, storage media, and / or other storage devices. That is, the embodiments described in this document can be implemented and executed on a processor, microprocessor, controller, or chip. For example, the functional units shown in each drawing can be implemented and executed on a computer, processor, microprocessor, controller, or chip.

[0364] Furthermore, decoding and encoding devices to which this document applies include multimedia broadcasting transceivers, mobile communication terminals, home cinema video equipment, digital cinema video equipment, surveillance cameras, video interaction equipment, real-time communication equipment such as video communications, mobile streaming equipment, storage media, camcorders, customized video (VoD) service providers, OTT video (Over the Top Video) equipment, internet streaming service providers, 3D video equipment, image telephone video equipment, and medical video equipment, etc., and may be used to process video signals or data signals. For example, OTT video (Over the Top Video) equipment may include game consoles, Blu-ray players, internet access TVs, home theater systems, smartphones, tablet PCs, DVRs (Digital Video Recorders), etc.

[0365] Furthermore, the processing methods to which this document applies can be produced in the form of programs executed by a computer and stored on a computer-readable recording medium. Multimedia data having the data structure relating to this document can also be stored on a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices that store computer-readable data. The computer-readable recording medium may include, for example, Blu-ray discs (BDs), general-purpose serial buses (USB), ROMs, PROMs, EPROMs, EEPROMs, RAMs, CD-ROMs, magnetic tapes, floppy disks, and optical data storage devices. The computer-readable recording medium also includes media embodied in the form of carrier waves (e.g., transmission over the Internet). Furthermore, bitstreams generated by encoding methods can be stored on computer-readable recording media or transmitted over a wireless network. Furthermore, embodiments of this document can be embodied in computer program products in the form of program code, and the program code can be executed by a computer according to the embodiments of this document. The program code can be stored on a computer-readable carrier.

[0366] Figure 18 illustrates a content streaming system structure to which this document applies.

[0367] Furthermore, the content streaming systems to which this document applies may include a wide range of components, such as encoding servers, streaming servers, web servers, media storage facilities, user equipment, and multimedia input devices.

[0368] The encoding server is responsible for compressing content input from multimedia input devices such as smartphones, cameras, and camcorders into digital data to generate a bitstream, and transmitting this bitstream to the streaming server. In other cases, if a multimedia input device such as a smartphone, camera, or camcorder directly generates the bitstream, the encoding server may be omitted. The bitstream can be generated by the encoding method or bitstream generation method to which this document applies, and the streaming server may temporarily store the bitstream during the process of transmitting or receiving it.

[0369] The streaming server transmits multimedia data to user devices based on user requests via a web server, and the web server acts as an intermediary to inform users about available services. When a user requests a desired service from the web server, the web server transmits this to the streaming server, and the streaming server transmits multimedia data to the user. In this case, the content streaming system may include a separate control server, in which case the control server controls the commands and responses between the devices within the content streaming system.

[0370] The streaming server can receive content from a media storage and / or encoding server. For example, if it starts receiving content from the encoding server, it can receive the content in real time. In this case, in order to provide a smooth streaming service, the streaming server can store the bitstream over a certain period of time.

[0371] Examples of user devices include mobile phones, smartphones, laptop computers, digital broadcasting terminals, PDAs (personal digital assistants), PMPs (portable multimedia players), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices (such as smartwatches, smart glasses, HMDs (head-mounted displays)), digital TVs, desktop computers, and digital signage. Each server within the content streaming system can be operated as a distributed server, in which case the data received by each server can be processed in a distributed manner.

[0372] The claims described herein can be combined in various ways. For example, the technical features of the method claims herein can be combined and embodied in an apparatus, and the technical features of the apparatus claims herein can be combined and embodied in a method. Furthermore, the technical features of the method claims and the technical features of the apparatus claims herein can be combined and embodied in an apparatus, and the technical features of the method claims and the technical features of the apparatus claims herein can be combined and embodied in a method.

Claims

1. In a video decoding method performed by a decoding device, Steps to obtain residual information from a bitstream, The steps include: deriving a conversion coefficient for the current block based on the residual information; The process includes the step of deriving a residual sample for the current block by applying an inverse linear transformation to the transformation coefficients based on an MTS (Multiple Transform Selection) index, The derivation of the aforementioned conversion coefficient is as follows: The steps include: deriving whether the effective coefficient exists within the scan subblock by scanning the scan subblock in units of scan subblocks that have already been set according to the inverse diagonal scan order; (i) Whether the effective coefficient exists within the scan subblock, (ii) Whether the scan subblock belongs to a second region other than the upper left 16x16 region of the current block, and (iii) Whether the color index of the current block is 0, The step of deriving flag information indicating whether the effective coefficient is in the second region based on the above, The MTS index is parsed based on the flag information indicating that the effective coefficient does not exist in the second region. The aforementioned MTS index represents a method for indicating a conversion kernel.

2. The method according to claim 1, wherein the MTS index is inferred to be 0 if the MTS index is not parsed.

3. The method according to claim 1, wherein the step of deriving whether the effective coefficient is present in the scan subblock includes parsing a flag indicating whether the effective coefficient is present in the scan subblock.

4. The aforementioned flag information is initially set to 1, The method according to claim 1, wherein the effective coefficient is located in the second region, the flag information is changed to 0.

5. The aforementioned scan subblock is a 4x4 block, The method according to claim 1, wherein the scan subblock is scanned in the inverse diagonal scan order starting from the last scan subblock containing the last effective coefficient in the current block.

6. In a video encoding method performed by a video encoding device, The current step is to derive a predicted sample for the block, The steps include: deriving a residual sample for the current block based on the predicted sample; The steps include: deriving an MTS (multiple transform selection) index that represents the transformation kernel, The steps include: deriving a conversion coefficient for the current block by applying a linear transformation to the residual sample based on the MTS index; The steps include: deriving residual information based on the conversion coefficient of the 16x16 region at the upper left of the current block; The process includes the step of configuring video information so as to parse the MTS index based on the fact that the effective coefficient is located in a second region other than the upper left 16x16 region, The above configuration of the video information is, The steps include: encoding a flag indicating whether the effective coefficient exists within a scan subblock by scanning the scan subblock in units of scan subblocks that have already been set according to the inverse diagonal scan order; (i) Whether the effective coefficient exists within the scan subblock, (ii) Whether the scan subblock belongs to a second region other than the upper left 16x16 region of the current block, and (iii) Whether the color index of the current block is 0, Based on this, the step of deriving flag information indicating whether the effective coefficient exists in the second region, A method comprising the step of encoding the MTS index based on flag information indicating that the effective coefficient does not exist in the second region.

7. The method according to claim 6, wherein the MTS index is inferred to be 0 if the MTS index is not encoded.

8. The aforementioned flag information is initially set to 1, The method according to claim 6, wherein the effective coefficient is located in the second region, the flag information is changed to 0.

9. The aforementioned scan subblock is a 4x4 block, The method according to claim 7, wherein the scan subblock is scanned in the inverse diagonal scan order starting from the last scan subblock containing the last effective coefficient in the current block.

10. In a method for transmitting data related to video information, The steps include generating a bitstream related to the video, The step of transmitting the data, which includes the bitstream, The aforementioned bitstream is The current step is to derive a predicted sample for the block, The steps include: deriving a residual sample for the current block based on the predicted sample; The steps include: deriving an MTS (multiple transform selection) index that represents the transformation kernel, The steps include: deriving a conversion coefficient for the current block by applying a linear transformation to the residual sample based on the MTS index; The steps include: deriving residual information based on the conversion coefficient of the 16x16 region at the upper left of the current block; The steps of configuring video information to parse the MTS index based on the fact that the effective coefficient is located in a second region other than the upper left 16x16 region, and generating based on these steps, The above configuration of the video information is, The steps include: encoding a flag indicating whether the effective coefficient exists within a scan subblock by scanning the scan subblock in units of scan subblocks that have already been set according to the inverse diagonal scan order; (i) Whether the effective coefficient exists within the scan subblock, (ii) Whether the scan subblock belongs to a second region other than the upper left 16x16 region of the current block, and (iii) Whether the color index of the current block is 0, Based on this, the step of deriving flag information indicating whether the effective coefficient exists in the second region, A method comprising the step of encoding the MTS index based on flag information indicating that the effective coefficient does not exist in the second region.