Transform-based image coding method and apparatus therefor
By borrowing the intra mode of the brightness block in CCLM mode, the problem of low compression and transmission efficiency of high resolution and high-quality image/video data is solved, and more efficient image/video compression and storage is achieved.
Patent Information
- Application Number
- CN202411870970.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-07-13
- Filing Date
- 2020-07-10
- Publication Date
- 2025-04-18
AI Technical Summary
The prior art is difficult to effectively compress and transmit or store high resolution and high quality image/video data, especially in the case of increasing demand for supporting immersive media such as VR and AR.
The LFNST transformation set is derived by borrowing the intra mode of the brightness block in CCLM mode, and image compilation efficiency is improved, especially in transform index compilation.
Improves overall image/video compression efficiency and enables more efficient image compilation and storage by using LFNST transform sets.
Smart Images

Figure CN119854491A_ABST
Abstract
Description
[0001] This application is a divisional application of the patent application with application number 202080060610.4 (PCT / KR2020 / 009138) filed on February 25, 2022, with an international filing date of July 10, 2020, and the invention name being “Transformation-based image coding method and device thereof”. Technical Field
[0002] The present disclosure relates to an image coding technology, and more particularly, to a method and a device for coding an image based on transformation in an image coding system. Background Art
[0003] Nowadays, the demand for high-resolution and high-quality images / videos such as 4K, 8K or higher ultra-high-definition (UHD) images / videos has been growing in various fields. As image / video data becomes higher resolution and higher quality, the amount of information or the amount of bits transmitted increases compared to conventional image data. Therefore, when image data is transmitted using a medium such as a conventional wired / wireless broadband line or when image / video data is stored using an existing storage medium, its transmission cost and storage cost increase.
[0004] In addition, nowadays, interest and demand for immersive media such as virtual reality (VR) and artificial reality (AR) content or holograms are increasing, and broadcasting of images / videos having image characteristics different from real images such as game images is increasing.
[0005] Therefore, there is a need for an efficient image / video compression technology that effectively compresses and transmits or stores and reproduces information of high-resolution and high-quality images / videos having various characteristics as described above. Summary of the invention
[0006] Technical issues
[0007] A technical aspect of the present disclosure is to provide a method and an apparatus for increasing image coding efficiency.
[0008] Another technical aspect of the present disclosure is to provide a method and apparatus for increasing the efficiency of transform index coding.
[0009] Yet another technical aspect of the present disclosure is to provide an image coding method and apparatus using LFNST.
[0010] Still another technical aspect of the present disclosure is to provide an image coding method and apparatus for deriving a LFNST transform set by borrowing an intra mode of a luma block in a CCLM mode.
[0011] Technical Solution
[0012] According to an embodiment of the present disclosure, an image decoding method performed by a decoding device is provided. The method may include: obtaining intra prediction mode information and LFNST index from a bitstream; deriving an intra prediction mode of a chroma block as a cross-component linear model (CCLM) mode based on the intra prediction mode information; changing the intra prediction mode of the chroma block from the CCLM mode to the intra prediction mode of a luminance block corresponding to the chroma block; determining an LFNST set including an LFNST matrix based on the intra prediction mode of a base luminance block; selecting one of the LFNST matrices based on the LFNST set and the LFNST index; and deriving a transform coefficient for the chroma block based on the selected LFNST matrix.
[0013] When the partition tree structure for the current block is a dual tree type, a LFNST index is received for each of the luma block and the chroma block.
[0014] The method further includes: obtaining residual information from a bitstream; deriving a transform coefficient for a current block based on the residual information; deriving a first variable indicating whether a significant coefficient exists in an area of the current block excluding a DC area; deriving a second variable indicating whether a significant coefficient exists in a second area other than the first area at the left top of the current block; and parsing an LFNST index when the first variable indicates that a significant coefficient exists in the area excluding the DC area and the second variable indicates that a significant coefficient does not exist in the second area.
[0015] According to another embodiment of the present disclosure, an image encoding method performed by an encoding device is provided. The method may include: deriving an intra prediction mode for a chroma block as a cross-component linear model (CCLM) mode; deriving a prediction sample for the chroma block based on the CCLM mode; deriving a residual sample for the chroma block based on the prediction sample; changing the intra prediction mode of the chroma block from the CCLM mode to the intra prediction mode of a luminance block corresponding to the chroma block; determining an LFNST set including an LFNST matrix based on the intra prediction mode of the luminance block; deriving a modified transform coefficient for the chroma block based on the residual sample, the LFNST set, and the LFNST matrix.
[0016] According to still another embodiment of the present disclosure, a digital storage medium storing image data including encoded image information and a bit stream generated according to an image encoding method performed by an encoding device may be provided.
[0017] According to yet another embodiment of the present disclosure, a digital storage medium storing image data including encoded image information and a bit stream for causing a decoding device to perform an image decoding method may be provided.
[0018] Beneficial Effects
[0019] According to the present disclosure, the overall image / video compression efficiency can be improved.
[0020] According to the present disclosure, the efficiency of transform index compilation can be improved.
[0021] Technical aspects of the present disclosure may provide an image coding method and apparatus using LFNST.
[0022] Technical aspects of the present disclosure may provide an image coding method and apparatus for deriving a LFNST transform set by borrowing an intra mode of a luma block in a CCLM mode.
[0023] The effects that can be obtained by the specific examples of the present disclosure are not limited to the effects listed above. For example, there may be various technical effects that can be understood or derived by ordinary technicians in the relevant field according to the present disclosure. Therefore, the specific effects of the present disclosure are not limited to those explicitly described in the present disclosure, and may include various effects that can be understood or derived according to the technical features of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 An example of a video / image coding system to which the present disclosure is applicable is schematically illustrated.
[0025] Figure 2 is a diagram schematically illustrating the configuration of a video / image encoding device to which the present disclosure is applicable.
[0026] Figure 3 is a diagram schematically illustrating a configuration of a video / image decoding device to which the present disclosure is applicable.
[0027] Figure 4 The intra directional mode for 65 prediction directions is shown as an example.
[0028] Figure 5 is a diagram illustrating a wide-angle intra prediction mode according to an embodiment of this document.
[0029] Figure 6 is a diagram for describing a CCLM that can be applied when deriving an intra prediction mode of a chroma block according to an embodiment.
[0030] Figure 7 A multiple transformation scheme according to an embodiment of this document is schematically illustrated.
[0031] Figure 8 is a diagram for explaining RST according to an embodiment of this document.
[0032] Fig. 9 is a diagram illustrating an arrangement of output data of a forward primary transform into a sequence of one-dimensional vectors according to an example.
[0033] Fig.10 is a diagram illustrating an arrangement of output data of a forward sub-transform into a sequence of two-dimensional vectors according to an example.
[0034] Fig.11 is a diagram illustrating a block shape to which LFNST is applied.
[0035] Fig.12 is a diagram illustrating an arrangement of output data of a forward LFNST according to an example.
[0036] Fig.13 is a diagram illustrating limiting the number of output data of the forward LFNST to a maximum value of 16 according to an example.
[0037] Fig.14 is a diagram illustrating zeroing in a block to which 4×4 LFNST is applied according to an example.
[0038] Fig.15 is a diagram illustrating clearing in a block to which 8×8 LFNST is applied according to an example.
[0039] Fig.16 is a diagram illustrating clearing in a block to which 8×8 LFNST is applied according to another example.
[0040] Fig.17 is a flowchart for explaining an image decoding method according to an example.
[0041] Fig.18 is a flowchart for explaining an image encoding method according to an example.
[0042] Fig.19 The structure of a content streaming system to which the present disclosure is applied is illustrated. DETAILED DESCRIPTION
[0043] Although the present disclosure may be susceptible to various modifications and includes various embodiments, its specific embodiments have been shown by way of example in the accompanying drawings, and will now be described in detail. However, this is not intended to limit the present disclosure to the specific embodiments disclosed herein. The terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the technical ideas of the present disclosure. Unless the context clearly indicates otherwise, the singular form may include the plural form. Terms such as "including" and "having" are intended to indicate the presence of features, numbers, steps, operations, elements, components, or combinations thereof used in the following description, and therefore should not be understood as precluding the possibility of the presence or addition of one or more different features, numbers, steps, operations, elements, components, or combinations thereof.
[0044] In addition, for the convenience of describing the different characteristic functions, each component on the drawings described herein is illustrated independently, however, it is not intended that each component is implemented by separate hardware or software. For example, any two or more of these components can be combined to form a single component, and any single component can be divided into multiple components. Embodiments in which components are combined and / or divided will fall within the scope of the patent rights of the present disclosure as long as they do not depart from the essence of the present disclosure.
[0045] Hereinafter, preferred embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. In addition, in the accompanying drawings, the same reference numerals are used for the same components, and repeated description of the same components will be omitted.
[0046] This document relates to video / image coding. For example, the methods / examples disclosed in this document may relate to the VVC (Versatile Video Coding) standard (ITU-T Rec. H.266), the next generation video / image coding standard after VVC, or other video coding related standards (e.g., HEVC (High Efficiency Video Coding) standard (ITU-T Rec. H.265), EVC (Basic Video Coding) standard, AVS2 standard, etc.).
[0047] In this document, various embodiments related to video / image coding may be provided, and unless otherwise specified, the embodiments may be combined with each other and performed.
[0048] In this document, video can refer to a collection of a series of images over a period of time. Generally, a picture refers to a unit of an image representing a specific time region, and a slice / tile is a unit that constitutes a part of a picture. A slice / tile may include one or more coding tree units (CTUs). A picture may consist of one or more slices / tiles. A picture may consist of one or more tile groups. A tile group may include one or more tiles.
[0049] A pixel or a picture element (pel) may refer to the smallest unit constituting a picture (or image). In addition, "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a pixel value, and may represent only a pixel / pixel value of a luminance component or only a pixel / pixel value of a chrominance component. Alternatively, a sample may mean a pixel value in a spatial domain, or when the pixel value is transformed into a frequency domain, it may mean a transform coefficient in a frequency domain.
[0050] A unit may represent a basic unit of image processing. A unit may include at least one of a specific region and information related to the region. A unit may include a luminance block and two chrominance (e.g., cb, cr) blocks. Depending on the situation, terms such as unit, block, region, etc. may be used interchangeably. In general, an M×N block may include a set (or array) of samples (or sample arrays) or transform coefficients consisting of M columns and N rows.
[0051] In this document, the terms " / " and "," should be interpreted as indicating "and / or". For example, the expression "A / B" may mean "A and / or B". In addition, "A, B" may mean "A and / or B". In addition, "A / B / C" may mean "at least one of A, B, and / or C". In addition, "A / B / C" may mean "at least one of A, B, and / or C".
[0052] In addition, in this document, the term "or" should be interpreted as indicating "and / or". For example, the expression "A or B" may include 1) only A, 2) only B, and / or 3) both A and B. In other words, the term "or" in this document should be interpreted as indicating "additionally or alternatively".
[0053] In the present disclosure, "at least one of A and B" may mean "only A", "only B", or "both A and B". In addition, in the present disclosure, the expression "at least one of A or B" or "at least one of A and / or B" may be interpreted as "at least one of A and B".
[0054] Furthermore, in the present disclosure, “at least one of A, B, and C” may mean “only A”, “only B”, “only C”, or “any combination of A, B, and C”. Furthermore, “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”.
[0055] In addition, the brackets used in the present disclosure may mean "for example". Specifically, when the indication is "prediction (intra-frame prediction)", it may mean that "intra-frame prediction" is proposed as an example of "prediction". In other words, the "prediction" of the present disclosure is not limited to "intra-frame prediction", and "intra-frame prediction" is proposed as an example of "prediction". In addition, when the indication is "prediction (ie, intra-frame prediction)", this may also mean that "intra-frame prediction" is proposed as an example of "prediction".
[0056] Technical features described separately in one drawing in the present disclosure may be implemented separately or may be implemented simultaneously.
[0057] Figure 1 An example of a video / image coding system to which the present disclosure can be applied is schematically illustrated.
[0058] Reference Figure 1 The video / image coding system may include a first device (source device) and a second device (receiving device). The source device may transmit the encoded video / image information or data to the receiving device in the form of a file or stream via a digital storage medium or a network.
[0059] 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 referred to as a video / image encoding device, and the decoding device may be referred to as 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, and the display may be configured as a separate device or an external component.
[0060] The video source can obtain the video / image by capturing, synthesizing or generating the video / image process. The video source may include a video / image capture device and / or a video / image generation device. The video / image capture device may include, for example, one or more cameras, a video / image archive including previously captured videos / images, etc. The video / image generation device may include, for example, a computer, a tablet computer, and a smart phone, and may (electronically) generate the video / image. For example, a virtual video / image may be generated by a computer, etc. In this case, the video / image capture process may be replaced by a process that generates relevant data.
[0061] The encoding device may encode the input video / image. The encoding device may perform a series of processes such as prediction, transformation, and quantization for compression and coding efficiency. The encoded data (encoded video / image information) may be output in the form of a bitstream.
[0062] The transmitter may transmit the encoded video / image information or data output in the form of a bit stream to a receiver of a receiving device in the form of a file or stream through a digital storage medium or a network. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter may include an element for generating a media file in a predetermined file format, and may include an element for transmitting through a broadcast / communication network. The receiver may receive / extract a bit stream and transmit the received / extracted bit stream to a decoding device.
[0063] The decoding device may decode a video / image by performing a series of processes such as dequantization, inverse transformation, prediction, etc. corresponding to the operation of the encoding device.
[0064] The renderer can render the decoded video / image, and the rendered video / image can be displayed through a display.
[0065] Figure 2 is a diagram schematically illustrating a configuration of a video / image encoding device to which the present disclosure can be applied. Hereinafter, the so-called video encoding device may include an image encoding device.
[0066] Reference Figure 2 , the encoding device 200 may 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-frame predictor 221 and an intra-frame 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. According to an embodiment, the image partitioner 210, the predictor 220, the residual processor 230, the entropy encoder 240, the adder 250, and the filter 260 described above may be composed of one or more hardware components (e.g., an encoder chipset or processor). In addition, the memory 270 may include a decoded picture buffer (DPB) and may be composed of a digital storage medium. The hardware component may further include a memory 270 as an internal / external component.
[0067] The image partitioner 210 may divide the input image (or picture or frame) input to the encoding device 200 into one or more processing units. As an example, the processing unit may be referred to as a coding unit (CU). In this case, starting from a coding tree coding tree unit (CTU) or a maximum coding unit (LCU), the coding unit may be recursively divided according to a quadtree binary tree ternary tree (QTBTTT) structure. For example, based on a quadtree structure, a binary tree structure, and / or a ternary tree structure, a coding unit may be divided into a plurality of coding units with a deeper depth. In this case, for example, a quadtree structure may be applied first, and a binary tree structure and / or a ternary tree structure may be applied later. Alternatively, a binary tree structure may be applied first. The coding process according to the present disclosure may be performed based on a final coding unit that is not further divided. In this case, based on the coding efficiency according to image characteristics, the maximum coding unit may be directly used as the final coding unit. Alternatively, the coding unit may be recursively divided into coding units of a deeper depth as needed, whereby a coding unit of an optimal size may be used as the final coding unit. Here, the coding process may include processes such as prediction, transformation, and reconstruction, which will be described later. As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may be separated or divided from the above-mentioned final coding unit. The prediction unit may be a unit for sample prediction, and the transform unit may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from a transform coefficient.
[0068] Unit and terms such as block, region, etc. may be used to replace each other depending on the situation. In general, an M×N block may represent a set of samples or transform coefficients consisting of M columns and N rows. A sample may generally represent a pixel or a pixel value, and may represent only a pixel / pixel value of a luminance component, or only a pixel / pixel value of a chrominance component. A sample may be used as a term corresponding to a pixel or a pel of a picture (or image).
[0069] The subtractor 231 subtracts the prediction signal (prediction block, prediction sample array) output from the predictor 220 from the input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is sent to the transformer 232. The predictor 220 can perform prediction on the processing target block (hereinafter referred to as the "current block"), and can generate a prediction block including the prediction samples of the current block. The predictor 220 can determine whether to apply intra-frame prediction or inter-frame prediction based on the current block or CU. As discussed later in the description of each prediction mode, the predictor can generate various information related to the prediction, such as prediction mode information, and send the generated information to the entropy encoder 240. Information about the prediction can be encoded in the entropy encoder 240 and output in the form of a bitstream.
[0070] The intra-frame predictor 222 can predict the current block by referring to the samples in the current picture. Depending on the prediction mode, the reference sample can be located near the current block or separated from the current block. In intra-frame prediction, the prediction mode may include a variety of non-directional modes and a variety of directional modes. The non-directional mode may include, for example, a DC mode and a plane mode. Depending on the level of detail of the prediction direction, the directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes. However, this is only an example, and more or fewer directional prediction modes may be used depending on the setting. The intra-frame predictor 222 may determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.
[0071] The inter-frame predictor 221 may derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information may be predicted based on a block, a sub-block, or a sample based on the correlation of the motion information between the neighboring block and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same as or different from each other. The temporal neighboring block may be referred to as a collocated reference block, a collocated CU (colCU), etc., and the reference picture including the temporal neighboring block may be referred to as a collocated picture (colPic). For example, the inter-frame predictor 221 may configure a motion information candidate list based on the neighboring blocks, and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter-frame prediction may be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the inter-frame predictor 221 can use the motion information of the neighboring block as the motion information of the current block. In skip mode, unlike merge mode, a residual signal cannot be sent. In the case of motion information prediction (motion vector prediction, MVP) mode, the motion vector of the neighboring block can be used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling a motion vector difference.
[0072] The predictor 220 can generate a prediction signal based on various prediction methods. For example, the predictor can apply intra prediction or inter prediction to the prediction of a block, and can also apply intra prediction and inter prediction at the same time. This can be called combined inter and intra prediction (CIIP). In addition, the predictor can be based on an intra-block copy (IBC) prediction mode or a palette mode to perform prediction on the block. The IBC prediction mode or the palette mode can be used for content image / video coding such as games such as screen content coding (SCC). Although IBC basically performs prediction in the current block, its execution method is similar to inter prediction in that it derives a reference block in the current block. That is, IBC can use at least one of the inter prediction techniques described in the present disclosure.
[0073] The prediction signal generated by the inter-frame predictor 221 and / or the intra-frame predictor 222 can be used to generate a reconstruction signal or to generate a residual signal. The transformer 232 can generate a transform coefficient by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loève transform (KLT), a graph-based transform (GBT), or a conditional nonlinear transform (CNT). Here, GBT means a transform obtained from a curve graph when the relationship information between pixels is represented by a curve graph. CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process can be applied to square pixel blocks of the same size, or can be applied to blocks of variable size rather than square blocks.
[0074] The quantizer 233 may quantize the transform coefficients and send them to the entropy encoder 240, and the entropy encoder 240 may encode the quantized signal (information about the quantized transform coefficients) and output the encoded signal in the bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantizer 233 may rearrange the quantized transform coefficients of the block type into a one-dimensional vector form based on the coefficient scanning order, and generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. The entropy encoder 240 may perform various encoding methods such as, for example, exponential Golomb, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), etc. The entropy encoder 240 may encode information required for video / image reconstruction other than the quantized transform coefficients (e.g., the value of the syntax element, etc.) together or separately. The encoded information (e.g., the encoded video / image information) may be transmitted or stored on a unit basis of a network abstraction layer (NAL) in the form of a bitstream. The video / image information may also include information about various parameter sets such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), a video parameter set (VPS), etc. In addition, the video / image information may also include conventional constraint information. In the present disclosure, information and / or syntax elements sent from the encoding device to / signaled to the decoding device may be included in the video / image information. The video / image information may be encoded by the above-mentioned encoding process and included in the bitstream. The bitstream may be transmitted over a network or stored in a digital storage medium. Here, the network may include a broadcast network, a communication network, and / or the like, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) that transmits a signal output from the entropy encoder 240 or a memory (not shown) that stores it may be configured as an internal / external element of the encoding device 200, or the transmitter may be included in the entropy encoder 240.
[0075] The quantized transform coefficients output from the quantizer 233 can be used to generate a prediction signal. For example, by applying dequantization and inverse transformation to the quantized transform coefficients using the dequantizer 234 and the inverse transformer 235, the residual signal (residual block or residual sample) can be reconstructed. The adder 155 adds the reconstructed residual signal to the prediction signal output from the inter-frame predictor 221 or the intra-frame predictor 222, so that a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) can be generated. When there is no residual for the processing target block as in the case of applying the skip mode, the prediction block can be used as a reconstructed block. The adder 250 can be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra-frame prediction of the next processing target block in the target picture, and as described later, can be used for inter-frame prediction of the next picture performed by filtering.
[0076] Furthermore, in the picture encoding and / or reconstruction process, luma mapping with chroma scaling (LMCS) may be applied.
[0077] The filter 260 can improve the subjective / objective video quality by applying filtering to the reconstructed signal. For example, the filter 260 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and the modified reconstructed picture can be stored in the memory 270, especially in the DPB of the memory 270. Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive ring filter, bilateral filter, etc. As discussed later in the description of each filtering method, the filter 260 can generate various information related to filtering and send the generated information to the entropy encoder 240. Information about filtering can be encoded in the entropy encoder 240 and output in the form of a bitstream.
[0078] The modified reconstructed picture transmitted to the memory 270 may be used as a reference picture in the inter-frame predictor 221. Accordingly, the encoding device can avoid prediction mismatch in the encoding device 100 and the decoding device when applying inter-frame prediction, and can also improve coding efficiency.
[0079] The memory 270 DPB may store the modified reconstructed picture so as to use it as a reference picture in the inter-frame predictor 221. The memory 270 may store the motion information of the block in the current picture from which the motion information has been derived (or encoded) and / or the motion information of the block in the reconstructed picture. The stored motion information may be sent to the inter-frame predictor 221 to be used as the motion information of the neighboring block or the motion information of the temporal neighboring block. The memory 270 may store the reconstructed samples of the reconstructed block in the current picture and send them to the intra-frame predictor 222.
[0080] Figure 3is a diagram schematically illustrating a configuration of a video / image decoding device to which the present disclosure can be applied.
[0081] Reference Figure 3 , the video decoding device 300 may 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-frame predictor 331 and an intra-frame predictor 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 321. According to an embodiment, the entropy decoder 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 described above may be composed of one or more hardware components (e.g., a decoder chipset or a processor). In addition, the memory 360 may include a decoded picture buffer (DPB) and may be composed of a digital storage medium. The hardware component may also include the memory 360 as an internal / external component.
[0082] When a bit stream including video / image information is input, the decoding device 300 can Figure 2 The image is reconstructed correspondingly to the processing of the video / image information in the encoding device. For example, the decoding device 300 can derive the unit / block based on the information related to the block segmentation obtained from the bit stream. The decoding device 300 can perform decoding by using the processing unit applied in the encoding device. Therefore, the decoding processing unit can be, for example, a coding unit, which can be divided into a coding tree coding tree unit or a maximum coding unit along a quadtree structure, a binary tree structure and / or a ternary tree structure. One or more transform units can be derived from the coding unit. And, the reconstructed image signal decoded and output by the decoding device 300 can be reproduced by a reproducer.
[0083] The decoding device 300 may receive the Figure 2The received signal can be decoded by the entropy decoder 310. For example, the entropy decoder 310 can parse the bitstream to derive information (e.g., video / image information) required for image reconstruction (or picture reconstruction). The video / image information may also include information about various parameter sets such as adaptive parameter set (APS), picture parameter set (PPS), sequence parameter set (SPS), video parameter set (VPS), etc. In addition, the video / image information may also include conventional constraint information. The decoding device may further decode the picture based on the information about the parameter set and / or the conventional constraint information. In the present disclosure, the signaled / received information and / or syntax elements to be described later may be decoded and obtained from the bitstream through a decoding process. For example, the entropy decoder 310 may decode the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, CABAC, etc., and may output the values of syntax elements required for image reconstruction and the quantized values of the transform coefficients of the residual. More specifically, the CABAC entropy decoding method may receive a bin corresponding to each syntax element in the bitstream, use the decoded information of the decoding target syntax element information and the decoded information of the neighboring and decoding target blocks or the information of the symbol / bin decoded in the previous step to determine the context model, predict the bin generation probability according to the determined context model, and perform arithmetic decoding on the bin to generate a symbol corresponding to each syntax element value. Here, the CABAC entropy decoding method may update the context model using the information of the symbol / bin decoded by the context model for the next symbol / bin after determining the context model. Information about prediction among the information decoded in the entropy decoder 310 may be provided to the predictor (inter-frame predictor 332 and intra-frame predictor 331), and the residual value (ie, quantized transform coefficient) and the associated parameter information for which entropy decoding has been performed in the entropy decoder 310 may be input to the residual processor 320. The residual processor 320 may derive a residual signal (residual block, residual sample, residual sample array). In addition, information about filtering among the information decoded in the entropy decoder 310 may be provided to the filter 350. In addition, a receiver (not shown) receiving a signal output from the encoding device may also constitute the decoding device 300 as an internal / external element, and the receiver may be a component of the entropy decoder 310. In addition, the decoding device according to the present disclosure may be referred to as a video / image / picture coding device, and the decoding device may 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 decoder 310, and the sample decoder may include at least one of the dequantizer 321, the inverse transformer 322, the adder 340, the filter 350, the memory 360, the inter-frame predictor 332, and the intra-frame predictor 331.
[0084] The dequantizer 321 may output the transform coefficient by dequantizing the quantized transform coefficient. The dequantizer 321 may rearrange the quantized transform coefficient into a two-dimensional block form. In this case, the rearrangement may be performed based on the order of coefficient scanning that has been performed in the encoding device. The dequantizer 321 may perform dequantization on the quantized transform coefficient using a quantization parameter (e.g., quantization step size information) and obtain the transform coefficient.
[0085] The dequantizer 322 obtains a residual signal (residual block, residual sample array) by inversely transforming the transform coefficients.
[0086] The predictor may perform prediction on the current block and generate a prediction block including prediction samples for the current block. The predictor may determine whether to apply intra prediction or inter prediction to the current block based on information on prediction output from the entropy decoder 310, and may specifically determine an intra / inter prediction mode.
[0087] The predictor can generate a prediction signal based on various prediction methods. For example, the predictor can apply intra prediction or inter prediction to the prediction of a block, and can also apply intra prediction and inter prediction at the same time. This can be called combined inter and intra prediction (CIIP). In addition, the predictor can perform intra-block copy (IBC) for the prediction of the block. Intra-block copy can be used for content image / video coding such as games such as screen content coding (SCC). Although IBC basically performs prediction in the current block, its execution method is similar to inter prediction in that it derives a reference block in the current block. That is, IBC can use at least one of the inter prediction techniques described in the present disclosure.
[0088] The intra-frame predictor 331 can predict the current block by referring to samples in the current picture. Depending on the prediction mode, the reference sample can be located near the current block or separated from the current block. In intra-frame prediction, the prediction mode can include multiple non-directional modes and multiple directional modes. The intra-frame predictor 331 can determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring block.
[0089] The inter-frame predictor 332 can derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information can be predicted based on a block, a sub-block, or a sample based on the correlation of the motion information between the neighboring block and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. For example, the inter-frame predictor 332 may configure a motion information candidate list based on neighboring blocks, and derive a motion vector and / or a reference picture index of the current block based on the received candidate selection information. Inter-frame prediction may be performed based on various prediction modes, and information about the prediction may include information indicating a mode of inter-frame prediction for the current block.
[0090] The adder 340 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the predictor 330. When there is no residual for the processing target block as in the case of applying the skip mode, the prediction block can be used as the reconstructed block.
[0091] The adder 340 may be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of the next processing target block in the current block, and as described later, may be output through filtering or used for inter prediction of the next picture.
[0092] Furthermore, in the picture decoding process, luma mapping with chroma scaling (LMCS) may be applied.
[0093] The filter 350 can improve the subjective / objective video quality by applying filtering to the reconstructed signal. For example, the filter 350 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and the modified reconstructed picture can be sent to the memory 360, especially to the DPB of the memory 360. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive ring filter, bilateral filter, etc.
[0094] The (modified) reconstructed picture stored in the DPB of the memory 360 may be used as a reference picture in the inter-frame predictor 332. The memory 360 may store the motion information of the block in the current picture from which the motion information has been derived (or decoded) and / or the motion information of the block in the reconstructed picture. The stored motion information may be sent to the inter-frame predictor 260 to be used as the motion information of the neighboring block or the motion information of the temporal neighboring block. The memory 360 may store the reconstructed samples of the reconstructed block in the current picture and send them to the intra-frame predictor 331.
[0095] In the present specification, the examples described in the predictor 330, the dequantizer 321, the inverse transformer 322, and the filter 350 of the decoding device 300 may be similarly or correspondingly applied to the predictor 220, the dequantizer 234, the inverse transformer 235, and the filter 260 of the encoding device 200, respectively.
[0096] As described above, prediction is performed in order to improve the compression efficiency when performing video coding. Accordingly, a prediction block including prediction samples for a current block as a coding target block can be generated. Here, the prediction block includes prediction samples in the spatial domain (or pixel domain). The prediction block can be derived identically in the encoding device and the decoding device, and the encoding device can improve the image coding efficiency by signaling to the decoding device information (residual information) about the residual between the original block and the prediction block rather than the original sample value of the original block itself. The decoding device can derive a residual block including residual samples based on the residual information, generate a reconstructed block including reconstructed samples by adding the residual block to the prediction block, and generate a reconstructed picture including the reconstructed block.
[0097] The residual information may be generated by a transform process and a quantization process. For example, the encoding device may derive a residual block between the original block and the prediction block, derive a transform coefficient by performing a transform process on the residual samples (residual sample array) included in the residual block, and derive a quantized transform coefficient by performing a quantization process on the transform coefficient, so that it can signal the associated residual information to the decoding device (through a bitstream). Here, the residual information may include value information, position information, transform technology, transform kernel, quantization parameter, etc. of the quantized transform coefficient. The decoding device may perform a quantization / dequantization process based on the residual information and derive a residual sample (or residual sample block). The decoding device may generate a reconstructed block based on the prediction block and the residual block. The encoding device may derive a residual block by dequantizing / inverse transforming the quantized transform coefficient so as to serve as a reference for inter-frame prediction of the next picture, and may generate a reconstructed picture based on this.
[0098] Figure 4 The intra directional mode for 65 prediction directions is shown as an example.
[0099] In the intra prediction according to the embodiments of this document, it is possible to Figure 4 67 intra prediction modes are shown for use.
[0100] This is an expansion of the existing 35 directional modes to 67 directional modes for intra-frame coding and more accurate prediction of high-resolution images. Figure 4 The arrows indicated by dotted lines in indicate 32 directional modes newly added from the 35 directional modes.
[0101] The INTRA_PLANAR and INTRA_DC modes are identical to the existing INTRA_PLANAR and INTRA_DC modes. The added 32 directional modes can be applied to all block sizes and can be applied to both intra encoding and decoding of luminance (brightness) and chrominance (chrominance) components.
[0102] Reference Figure 4 , based on the intra prediction mode 34 having the upper left diagonal prediction direction, the intra prediction mode can be divided into an intra prediction mode having a horizontal directionality and an intra prediction mode having a vertical directionality. Figure 4 In , H and V indicate horizontal directivity and vertical directivity, respectively, and numbers -32 to 32 indicate displacements of 1 / 32 units on sample grid positions. These numbers may represent offsets for mode index values. Intra-prediction modes 2 to 33 have horizontal directivity, and intra-prediction modes 34 to 66 have vertical directivity. Strictly speaking, intra-prediction mode 34 may be considered to be neither horizontal nor vertical, but may be classified as belonging to horizontal directivity when determining a transform set for a secondary transform. This is because the input data is transposed for a vertical orientation mode symmetrical based on intra-prediction mode 34, and an input data alignment method for a horizontal mode is used for intra-prediction mode 34. Transposing the input data means switching rows and columns of two-dimensional M×N block data to N×M data. Intra-prediction mode 18 and intra-prediction mode 50 may represent horizontal intra-prediction mode and vertical intra-prediction mode, respectively, and intra-prediction mode 2 may be referred to as an upper right diagonal intra-prediction mode because intra-prediction mode 2 has a left reference pixel and performs prediction in the upper right direction. Similarly, intra-prediction mode 34 may be referred to as a bottom-right diagonal intra-prediction mode, and intra-prediction mode 66 may be referred to as a bottom-left diagonal intra-prediction mode.
[0103] Figure 5 is a diagram illustrating a wide-angle intra prediction mode according to an embodiment of this document.
[0104] The general intra prediction mode value may have a value from 0 to 66 and from 81 to 83, and the intra prediction mode value extended due to WAIP may have a value from -14 to 83 as shown. The value from 81 to 83 indicates the CCLM (Cross Component Linear Model) mode, and the value from -14 to -1 and the value from 67 to 80 indicate the intra prediction mode extended due to WAIP application.
[0105] When the width of the current prediction block is greater than the height, the upper reference pixel is generally closer to the position inside the block to be predicted. Therefore, prediction in the lower left direction can be more accurate than in the upper right direction. Conversely, when the height of the block is greater than the width, the left reference pixel is generally closer to the position inside the block to be predicted. Therefore, prediction in the upper right direction can be more accurate than in the lower left direction. Therefore, it can be advantageous to apply remapping (i.e., mode index modification) to the index of the wide-angle intra prediction mode.
[0106] When wide-angle intra prediction is applied, information about the existing intra prediction may be signaled, and after the information is parsed, the information may be remapped to the index of the wide-angle intra prediction mode. Therefore, the total number of intra prediction modes for a specific block (e.g., a non-square block of a specific size) may not be changed, that is, the total number of intra prediction modes is 67, and the intra prediction mode coding for the specific block may not be changed.
[0107] Table 1 below shows a process of deriving a modified intra mode by remapping the intra prediction mode to the wide-angle intra prediction mode.
[0108] [Table 1]
[0109]
[0110] In Table 1, the extended intra prediction mode value is finally stored in the predModeIntra variable, and ISP_NO_SPLIT indicates that the CU block is not divided into sub-partitions by the intra sub-partitioning (ISP) technology currently adopted in the VVC standard, and the cIdx variable values of 0, 1, and 2 indicate the cases of the luminance component, the Cb component, and the Cr component, respectively. The log2 function shown in Table 3 returns a log value with a base of 2, and the Abs function returns an absolute value.
[0111] The variable predModeIntra indicating the intra prediction mode and the height and width of the transform block, etc. are used as input values of the wide-angle intra prediction mode mapping process, and the output value is the modified intra prediction mode predModeIntra. The height and width of the transform block or the coding block can be the height and width of the current block for remapping of the intra prediction mode. At this time, the variable whRatio reflecting the ratio of width to width can be set to Abs (Log2 (nW / nH)).
[0112] For non-square blocks, the intra prediction mode can be divided into two cases and modified.
[0113] First, if all of conditions (1) to (3) are satisfied, (1) the width of the current block is greater than the height, (2) the intra prediction mode before modification is equal to or greater than 2, and (3) the intra prediction mode is less than a value derived as (8+2*whRatio) when the variable whRatio is greater than 1 and is less than 8 when the variable whRatio is less than or equal to 1 (predModeIntra is less than (whRatio > 1) ? (8 + 2 * whRatio) : 8), then the intra prediction mode is set to a value that is 65 greater than predModeIntra [predModeIntra is set equal to (predModeIntra+65)].
[0114] If different from the above, that is, if conditions (1) to (3) are satisfied, (1) the height of the current block is greater than the width, (2) the intra prediction mode before modification is less than or equal to 66, and (3) the intra prediction mode is greater than a value derived as (60-2*whRatio) when whRatio is greater than 1 and greater than 60 when whRatio is less than or equal to 1 (predModeIntra is greater than (whRatio > 1) ? (60 − 2 * whRatio) : 60), then the intra prediction mode is set to a value that is 67 less than predModeIntra [predModeIntra is set equal to (predModeIntra-67)].
[0115] When intra prediction is performed on the current block, prediction of the luminance component block (luminance block) of the current block and prediction of its chrominance component block (chrominance block) may be performed. In this case, the intra prediction mode for the chrominance component (chrominance block) may be set separately from the intra prediction mode for the luminance component (luminance block).
[0116] In this specification, "chrominance block", "chrominance image", etc. may refer to the same meaning as chrominance block, chrominance image, etc., so chrominance and chrominance may be used interchangeably. Similarly, "luminance block", "luminance image", etc. may refer to the same meaning as luminance block, luminance image, etc., so luminance and luminance may be used interchangeably.
[0117] In the present specification, a "current chroma block" may refer to a chroma component block of a current block as a current coding unit, and a "current luminance block" may refer to a luminance component block of a current block as a current coding unit. Therefore, the current luminance block and the current chroma block correspond to each other. However, the current luminance block and the current chroma block do not always have the same block shape and the same number of blocks, and may have different block shapes and different numbers of blocks depending on the situation. In some cases, the current chroma block may correspond to a current luminance region, in which case the current luminance region may include at least one luminance block.
[0118] The intra prediction mode for the chroma component may be indicated based on the intra chroma prediction mode information, and the intra chroma prediction mode information may be signaled in the form of an intra_chroma_pred_mode syntax element. For example, the intra chroma prediction mode information may indicate one of a planar mode, a DC mode, a vertical mode, a horizontal mode, a derived mode (DM), and a CCLM mode. Here, when using Figure 4 Of the 67 intra prediction modes illustrated, planar mode may indicate intra prediction mode 0, DC mode may indicate intra prediction mode 1, vertical mode may indicate intra prediction mode 50, and horizontal mode may indicate intra prediction mode 18. DM may also be referred to as direct mode. CCLM may be referred to as LM.
[0119] DM and CCLM are related intra prediction modes for predicting chrominance blocks using information about luma blocks. DM may refer to a mode in which the same intra prediction mode as that for luma components is applied as an intra prediction mode for chroma components. CCLM may refer to an intra prediction mode in which reconstructed samples of luma blocks are subsampled in the process of generating prediction blocks for chroma blocks, and then samples derived by applying CCLM parameters α and β to the subsampled samples are used as prediction samples for chroma blocks.
[0120] Figure 6 is a diagram illustrating a CCLM applicable when deriving an intra prediction mode for a chroma block according to an embodiment.
[0121] In the present specification, a “reference sample template” may refer to a set of neighboring reference samples of a current chroma block used to predict a current chroma block. The reference sample template may be predefined, and information about the reference sample template may be signaled from the encoding device 200 to the decoding device 300.
[0122] refer to Figure 6 , the set of samples shaded in a row around the 4×4 block that is the current chroma block indicates the reference sample template. Figure 8 , it is shown that the reference sample templates are arranged in one row of reference samples, whereas the reference sample areas in the brightness area corresponding to the reference sample templates are arranged in two rows.
[0123] In an embodiment, when intra-frame coding of a chrominance image is performed in a joint exploration test model (JEM) used in the joint video exploration team (JVET), a cross-component linear model (CCLM) may be used. The CCLM is a method for predicting pixel values of a chrominance image from pixel values of a reconstructed luminance image, and is based on the characteristic of a high correlation between a luminance image and a chrominance image.
[0124] The CCLM prediction of Cb and Cr chrominance images can be based on the following equation.
[0125] [Formula 1]
[0126]
[0127] Here, pred c (i, j) represents the Cb or Cr chrominance image to be predicted, Rec L '(i, j) represents the reconstructed luminance image adjusted to the chrominance block size, and (i, j) represents the coordinates of the pixel. In the 4:2:0 color format, since the size of the luminance image is twice that of the chrominance image, it is necessary to generate a Rec with the chrominance block size by downsampling. L ', so we can consider Rec L (2i, 2j) and the neighboring pixels use the chrominance image predc (i, j), the chrominance image pred c RecL′(i,j) is the pixel of the luminance image of (i, j). RecL′(i,j) can be called the downsampled luminance sample.
[0128] For example, Rec can be derived using six neighboring pixels as shown in the following equation: L '(i,j).
[0129] [Formula 2]
[0130]
[0131] α and β represent Figure 8 The cross-correlation and average difference between the neighboring templates of the Cb or Cr chrominance block and the neighboring templates of the luminance block in the shadow area of . For example, α and β are expressed by Equation 3.
[0132] [Formula 3]
[0133]
[0134] Here, L(n) represents the neighboring reference samples and / or left neighboring samples of the luminance block corresponding to the current chrominance image, C(n) represents the neighboring reference samples and / or left neighboring samples of the current chrominance block to which the encoding is currently applied, and (i, j) represents the pixel position. In addition, L(n) can represent the downsampled upper neighboring samples and / or left neighboring samples of the current luminance block. N can represent the total number of pixel pair (luminance and chrominance) values used for the calculation of CCLM parameters, and can indicate a value that is twice the smaller value of the width and height of the current chrominance block.
[0135] Meanwhile, a picture may be divided into a sequence of coding tree units (CTUs). A CTU may correspond to a coding tree block (CTB). Alternatively, a CTU may include a coding tree block of luma samples and two coding tree blocks of a corresponding chroma block. The tree type may be classified as a single tree (SINGLE_TREE) or a dual tree (DUAL_TREE) according to whether the luma block and the corresponding chroma block have separate partition structures. A single tree may indicate that the chroma block has the same partition structure as the luma block, and a dual tree may indicate that the chroma component block has a partition structure different from that of the luma block.
[0136] Hereinafter, a transformation process requiring an image coding or decoding process of the present disclosure will be described.
[0137] Figure 7 The multi-conversion technology according to the embodiment of the present disclosure is schematically illustrated.
[0138] Reference Figure 7 , the converter can correspond to the aforementioned Figure 2 The converter in the encoding device, and the inverse converter may correspond to the aforementioned Figure 2 an inverse transformer in an encoding device, or Figure 3 An inverse transformer in a decoding device.
[0139] The transformer may derive (primary) transform coefficients by performing a primary transform based on residual samples (residual sample arrays) in the residual block (S710). The primary transform may be referred to as a core transform. In this document, the primary transform may be based on a multi-transform selection (MTS), and when a multi-transform is used as the primary transform, it may be referred to as a multi-core transform.
[0140] The multi-core transform may refer to a method of performing transform using discrete cosine transform (DCT) type 2 and discrete sine transform (DST) type 7, DCT type 8, and / or DST type 1 additionally. That is, the multi-core transform may refer to a transform method of transforming a residual signal (or residual block) in the spatial domain into a transform coefficient (or primary transform coefficient) in the frequency domain based on a plurality of transform kernels selected from DCT type 2, DST type 7, DCT type 8, and DST type 1. In this article, the primary transform coefficient may be referred to as a temporary transform coefficient from the perspective of the transformer.
[0141] In other words, when a conventional transform method is applied, a transform coefficient can be generated by applying a transform from the spatial domain to the frequency domain to a residual signal (or residual block) based on DCT type 2. In contrast, when a multi-core transform is applied, a transform coefficient (or primary transform coefficient) can be generated by applying a transform from the spatial domain to the frequency domain to a residual signal (or residual block) based on DCT type 2, DST type 7, DCT type 8, and / or DST type 1. In this document, DCT type 2, DST type 7, DCT type 8, and DST type 1 may be referred to as a transform type, a transform kernel, or a transform core. These DCT / DST transform types may be defined based on basis functions.
[0142] When performing multi-core transformation, a vertical transformation core and a horizontal transformation core for a target block may be selected from the transformation cores, a vertical transformation may be performed on the target block based on the vertical transformation core, and a horizontal transformation may be performed on the target block based on the horizontal transformation core. Here, the horizontal transformation may indicate a transformation of a horizontal component of the target block, and the vertical transformation may indicate a transformation of a vertical component of the target block. The vertical transformation core / horizontal transformation core may be adaptively determined based on a prediction mode and / or a transformation index of a target (CU or subblock) including a residual block.
[0143] In addition, according to the example, if the primary transform is performed by applying MTS, the mapping relationship of the transform kernel can be set by setting a specific basis function to a predetermined value and combining the basis functions to be applied in the vertical transform or the horizontal transform. For example, when the horizontal transform kernel is represented as trTypeHor and the vertical transform kernel is represented as trTypeVer, trTypeHor or trTypeVer with a value of 0 can be set to DCT2, trTypeHor or trTypeVer with a value of 1 can be set to DST7, and trTypeHor or trTypeVer with a value of 2 can be set to DCT8.
[0144] In this case, the MTS index information may be encoded and signaled to the decoding device to indicate any one of the plurality of transform kernel sets. For example, an MTS index of 0 may indicate that both trTypeHor and trTypeVer values are 0, an MTS index of 1 may indicate that both trTypeHor and trTypeVer values are 1, an MTS index of 2 may indicate that both trTypeHor and trTypeVer values are 2, an MTS index of 3 may indicate that both trTypeHor and trTypeVer values are 1, and an MTS index of 4 may indicate that both trTypeHor and trTypeVer values are 2.
[0145] In one example, the transformation core set according to the MTS index information is shown in the following table.
[0146] [Table 2]
[0147]
[0148] The transformer may derive modified (secondary) transform coefficients (S720) by performing a secondary transform based on the (primary) transform coefficients. The primary transform is a transform from the spatial domain to the frequency domain, while the secondary transform refers to a transform into a more compressive representation by using the correlation between the (primary) transform coefficients. The secondary transform may include an inseparable transform. In this case, the secondary transform may be referred to as a non-separable secondary transform (NSST) or a mode-dependent non-separable secondary transform (MDNSST). An inseparable secondary transform may represent a transform that generates a modified transform coefficient (or secondary transform coefficient) for a residual signal by performing a secondary transform on the (primary) transform coefficients derived by the primary transform based on an inseparable transform matrix. At this time, the vertical transform and the horizontal transform may not be applied separately to the (primary) transform coefficients (or the horizontal transform and the vertical transform may not be applied independently), but the transform matrix may be applied primarily based on the inseparable transform. In other words, the non-separable secondary transform may refer to a transform method in which the vertical component and the horizontal component of the (primary) transform coefficient are not separated, and, for example, a two-dimensional signal (transform coefficient) is rearranged into a one-dimensional signal through a certain determined direction (e.g., a row first direction or a column first direction), and then the modified transform coefficient (or secondary transform coefficient) is generated based on the non-separable transform matrix. For example, according to the row priority order, the M×N blocks are arranged in a row in the order of the first row, the second row, ..., and the Nth row. According to the column priority order, the M×N blocks are arranged in a row in the order of the first column, the second column, ..., and the Mth column. The non-separable secondary transform may be applied to the upper left region of the block configured with the (primary) transform coefficient (hereinafter, may be referred to as the transform coefficient block). For example, if the width (W) and height (H) of the transform coefficient block are both equal to or greater than 8, the 8×8 non-separable secondary transform may be applied to the upper left 8×8 region of the transform coefficient block. In addition, if the width (W) and height (H) of the transform coefficient block are both equal to or greater than 4, and the width (W) or height (H) of the transform coefficient block is less than 8, a 4×4 non-separable sub-transform may be applied to the upper left min (8, W) × min (8, H) region of the transform coefficient block. However, the embodiment is not limited thereto, and for example, even if only the condition that the width (W) or height (H) of the transform coefficient block is equal to or greater than 4 is satisfied, a 4×4 non-separable sub-transform may be applied to the upper left min (8, W) × min (8, H) region of the transform coefficient block.
[0149] Specifically, for example, if a 4×4 input block is used, the non-separable secondary transform may be performed as follows.
[0150] A 4×4 input block X can be represented as follows.
[0151] [Formula 4]
[0152]
[0153] If X is represented as a vector, then the vector It is expressed as follows.
[0154] [Formula 5]
[0155]
[0156] In Equation 5, the vector is a one-dimensional vector obtained by rearranging the two-dimensional block X of Equation 1 according to the row-major order.
[0157] In this case, the secondary inseparable transform can be calculated as follows.
[0158] [Formula 6]
[0159]
[0160] In this formula, denotes a transform coefficient vector, and T denotes a 16x16 (non-separable) transform matrix.
[0161] Through the previous formula 6, the 16x1 transform coefficient vector can be derived , and can be divided into Reorganize into 4x4 blocks. However, the above calculation is an example, and in order to reduce the computational complexity of the non-separable sub-transform, a hypercube-Givens transform (HyGT) or the like may be used for the calculation of the non-separable sub-transform.
[0162] Furthermore, in a non-separable secondary transform, the transform kernel (or transform core, transform type) may be selected to be mode-dependent. In this case, the mode may include an intra prediction mode and / or an inter prediction mode.
[0163] As described above, an inseparable secondary transform may be performed based on an 8×8 transform or a 4×4 transform determined based on the width (W) and height (H) of the transform coefficient block. The 8×8 transform refers to a transform that is applicable to an 8×8 region included in a transform coefficient block when both W and H are equal to or greater than 8, and the 8×8 region may be the upper left 8×8 region in the transform coefficient block. Similarly, the 4×4 transform refers to a transform that is applicable to a 4×4 region included in a transform coefficient block when both W and H are equal to or greater than 4, and the 4×4 region may be the upper left 4×4 region in the transform coefficient block. For example, an 8×8 transform kernel matrix may be a 64×64 / 16×64 matrix, and a 4×4 transform kernel matrix may be a 16×16 / 8×16 matrix.
[0164] Here, in order to select the mode-dependent transform cores, two inseparable secondary transform cores may be configured for each transform set of inseparable secondary transforms for both the 8×8 transform and the 4×4 transform, and there may be four transform sets. That is, four transform sets may be configured for the 8×8 transform, and four transform sets may be configured for the 4×4 transform. In this case, each of the four transform sets for the 8×8 transform may include two 8×8 transform cores, and each of the four transform sets for the 4×4 transform may include two 4×4 transform cores.
[0165] However, as the size of the transform (ie, the size of the region to which the transform is applied) may be a size other than 8×8 or 4×4, for example, the number of sets may be n, and the number of transform kernels in each set may be k.
[0166] The transform set may be referred to as an NSST set or a LFNST set. A specific set among the transform sets may be selected, for example, based on the intra prediction mode of the current block (CU or subblock). A low frequency non-separable transform (LFNST) may be an example of a reduced non-separable transform, which will be described later, and represents a non-separable transform for a low frequency component.
[0167] For reference, for example, the intra prediction mode may include two non-directional (or non-angle) intra prediction modes and 65 directional (or angle) intra prediction modes. The non-directional intra prediction mode may include a plane intra prediction mode No. 0 and a DC intra prediction mode No. 1, and the directional intra prediction mode may include 65 intra prediction modes No. 2 to No. 66. However, this is an example, and this document may be applied even if the number of intra prediction modes is different. In addition, in some cases, intra prediction mode No. 67 may also be used, and intra prediction mode No. 67 may represent a linear model (LM) mode.
[0168] According to an example, the mapping according to Figure 4 and Figure 5 Four transform sets of intra prediction modes.
[0169] [Table 3]
[0170]
[0171] As shown in Table 3, any one of the four transform sets, ie, lfnstTrSetIdx, can be mapped to any one of the four indexes, ie, 0 to 3, according to the intra prediction mode.
[0172] When it is determined that a specific set is used for an inseparable transform, one of the k transform cores in the specific set can be selected by an inseparable secondary transform index. The encoding device can derive an inseparable secondary transform index indicating a specific transform core based on a rate-distortion (RD) check, and can signal the inseparable secondary transform index to the decoding device. The decoding device can select one of the k transform cores in a specific set based on the inseparable secondary transform index. For example, a lfnst index value 0 can refer to a first inseparable secondary transform core, a lfnst index value 1 can refer to a second inseparable secondary transform core, and a lfnst index value 2 can refer to a third inseparable secondary transform core. Alternatively, a lfnst index value 0 can indicate that the first inseparable secondary transform is not applied to the target block, and lfnst index values 1 to 3 can indicate three transform cores.
[0173] The transformer can perform a non-separable secondary transform based on the selected transform kernel, and can obtain modified (secondary) transform coefficients. As described above, the modified transform coefficients can be derived as transform coefficients quantized by a quantizer, and can be encoded and signaled to a decoding device, and transmitted to a dequantizer / inverse transformer in an encoding device.
[0174] In addition, as described above, if the secondary transform is omitted, the (primary) transform coefficients that are the output of the primary (separable) transform can be derived as transform coefficients quantized by the quantizer as described above, and can be encoded and signaled to the decoding device and transmitted to the dequantizer / inverse transformer in the encoding device.
[0175] The inverse transformer may perform a series of processes in the reverse order of the order already performed in the above-mentioned transformer. The inverse transformer may receive the (dequantized) transform coefficients, and derive the (primary) transform coefficients by performing the secondary (inverse) transform (S750), and may obtain the residual block (residual sample) by performing the primary (inverse) transform on the (primary) transform coefficients (S760). In this regard, from the perspective of the inverse transformer, the primary transform coefficients may be referred to as modified transform coefficients. As described above, the encoding device and the decoding device may generate a reconstructed block based on the residual block and the prediction block, and may generate a reconstructed picture based on the reconstructed block.
[0176] The decoding device may further include a secondary inverse transform application determiner (or an element for determining whether to apply a secondary inverse transform) and a secondary inverse transform determiner (or an element for determining a secondary inverse transform). The secondary inverse transform application determiner may determine whether to apply a secondary inverse transform. For example, the secondary inverse transform may be NSST, RST, or LFNST, and the secondary inverse transform application determiner may determine whether to apply a secondary inverse transform based on a secondary transform flag obtained by parsing a bitstream. In another example, the secondary inverse transform application determiner may determine whether to apply a secondary inverse transform based on a transform coefficient of a residual block.
[0177] The secondary inverse transform determiner may determine the secondary inverse transform. In this case, the secondary inverse transform determiner may determine the secondary inverse transform applied to the current block based on the LFNST (NSST or RST) transform set specified according to the intra prediction mode. In an embodiment, the secondary transform determination method may be determined depending on the primary transform determination method. Various combinations of the primary transform and the secondary transform may be determined according to the intra prediction mode. In addition, in an example, the secondary inverse transform determiner may determine the area to which the secondary inverse transform is applied based on the size of the current block.
[0178] In addition, as described above, if the secondary (inverse) transform is omitted, the (dequantized) transform coefficients can be received, the primary (separable) inverse transform can be performed, and the residual block (residual sample) can be obtained. As described above, the encoding device and the decoding device can generate a reconstructed block based on the residual block and the prediction block, and can generate a reconstructed picture based on the reconstructed block.
[0179] Furthermore, in the present disclosure, a reduced secondary transform (RST) in which the size of a transformation matrix (kernel) is reduced may be applied in the concept of NSST in order to reduce the amount of calculation and storage required for an inseparable secondary transform.
[0180] In addition, the transformation kernel, transformation matrix, and coefficients constituting the transformation kernel matrix described in the present disclosure, that is, kernel coefficients or matrix coefficients, can be represented by 8 bits. This can be a condition for implementation in a decoding device and an encoding device, and compared with the existing 9 bits or 10 bits, the amount of storage required to store the transformation kernel can be reduced, and performance degradation can be reasonably adapted. In addition, representing the kernel matrix in 8 bits can allow the use of small multipliers and can be more suitable for single instruction multiple data (SIMD) instructions for optimal software implementation.
[0181] In the present specification, the term "RST" may refer to a transformation performed on residual samples of a target block based on a transformation matrix whose size is reduced according to a reduction factor. In the case of performing a reduced transformation, the amount of calculation required for the transformation can be reduced due to the reduction in the size of the transformation matrix. That is, RST can be used to solve the computational complexity problem that occurs when transforming a block of large size or an inseparable transform.
[0182] RST may be referred to as various terms such as reduced transform, reduced secondary transform, downscaled transform, simplified transform, and simple transform, and the names that RST may be referred to as are not limited to the listed examples. Alternatively, since RST is mainly performed in a low frequency region including non-zero coefficients in a transform block, it may be referred to as a low frequency non-separable transform (LFNST). The transform index may be referred to as an LFNST index.
[0183] In addition, when performing a secondary inverse transform based on an RST, the inverse transformer 235 of the encoding device 200 and the inverse transformer 322 of the decoding device 300 may include: an inverse reduction secondary transformer that derives a modified transform coefficient based on an inverse RST of the transform coefficient; and an inverse primary transformer that derives a residual sample of the target block based on an inverse primary transform of the modified transform coefficient. The inverse primary transform refers to an inverse transform of a primary transform applied to the residual. In the present disclosure, deriving a transform coefficient based on a transform may refer to deriving a transform coefficient by applying a transform.
[0184] Figure 8 is a diagram illustrating an RST according to an embodiment of the present disclosure.
[0185] In the present disclosure, a “target block” may refer to a current block, a residual block, or a transform block to be coded.
[0186] In the RST according to the example, an N-dimensional vector can be mapped to an R-dimensional vector located in another space, so that a reduction transformation matrix can be determined, where R is less than N. N may refer to the square of the length of the side 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 reduction factor may refer to an R / N value. The reduction factor may be referred to as a reduction factor, a reduction factor, a simplification factor, a simple factor, or other various terms. In addition, R may be referred to as a reduction coefficient, but depending on the situation, the reduction factor may refer to R. In addition, depending on the situation, the reduction factor may refer to an N / R value.
[0187] In the example, the reduction factor or reduction coefficient may be signaled through a bitstream, but the example is not limited thereto. For example, a predetermined value for the reduction factor or reduction coefficient may be stored in each of the encoding device 200 and the decoding device 300, and in this case, the reduction factor or reduction coefficient may not be signaled separately.
[0188] The size of the reduced transform matrix according to an example may be RxN, which is smaller than the size of a conventional transform matrix NxN, and may be defined as in the following Equation 7.
[0189] [Formula 7]
[0190]
[0191] Figure 8 The matrix T in the reduced transform block shown in (a) may mean the matrix T of Formula 7 RxN .like Figure 8 As shown in (a), when the reduction transformation matrix T RxN When multiplied by the residual samples of the target block, the transform coefficients for the target block can be derived.
[0192] In an example, if the size of the block to which the transform is applied is 8x8 and R=16 (ie, R / N = 16 / 64 = 1 / 4), then the Figure 8 The RST of (a) is expressed as a matrix operation as shown in the following equation 8. In this case, the memory and multiplication calculation can be reduced to about 1 / 4 by the reduction factor.
[0193] In the present disclosure, a matrix operation may be understood as an operation of multiplying a column vector by a matrix provided on the left side of the column vector to obtain the column vector.
[0194] [Formula 8]
[0195]
[0196] In formula 8, r1 to r 64 ℓ may represent a residual sample of the target block and may specifically be a transform coefficient generated by applying a primary transform. As a result of the calculation of Equation 8, a transform coefficient ci for the target block may be derived, and the process of deriving ci may be the same as in Equation 9.
[0197] [Formula 9]
[0198]
[0199] As a result of the calculation of Equation 9, transform coefficients c1 to c2 for the target block can be derived. R That is, when R=16, the transform coefficients c1 to c2 for the target block can be derived. 16Although 64 (N) transform coefficients are derived for the target block, if a regular transform is applied instead of RST and a transform matrix of 64x64 (NxN) size is multiplied by a residual sample of 64x1 (Nx1) size, only 16 (R) transform coefficients are derived for the target block because RST is applied. Since the total number of transform coefficients for the target block is reduced from N to R, the amount of data transmitted from the encoding device 200 to the decoding device 300 is reduced, so the efficiency of transmission between the encoding device 200 and the decoding device 300 can be improved.
[0200] When considered from the perspective of the size of the transformation matrix, the size of the regular transformation matrix is 64x64 (NxN), but the size of the reduced transformation matrix is reduced to 16x64 (RxN), so when compared with the case of performing the regular transformation, the memory usage in the case of performing RST can be reduced by the R / N ratio. In addition, when compared with the number of multiplication calculations NxN in the case of using the regular transformation matrix, the use of the reduced transformation matrix can reduce the number of multiplication calculations by the R / N ratio (RxN).
[0201] In an example, the transformer 232 of the encoding device 200 may derive transform coefficients for the target block by performing a primary transform and a secondary transform based on RST on the residual samples for the target block. These transform coefficients may be transmitted to the inverse transformer of the decoding device 300, and the inverse transformer 322 of the decoding device 300 may derive modified transform coefficients based on an inverse reduced secondary transform (RST) for the transform coefficients, and may derive residual samples for the target block based on the primary inverse transform for the modified transform coefficients.
[0202] According to the example, the inverse RST matrix T NxR The size of is NxR which is smaller than the size of the regular inverse transform matrix NxN, and is the same as the reduced transform matrix T shown in Equation 7. RxN In a transposed relationship.
[0203] Figure 8 The matrix T in the reduced inverse transform block shown in (b) t It can be referred to as the inverse RST matrix T RxN T (The superscript T means transpose). When the inverse RST matrix T RxN T like Figure 8 When multiplied by the transform coefficients for the target block as shown in (b), the modified transform coefficients for the target block or the residual samples of the current block can be derived. The inverse RST matrix T RxN T Expressed as (T RxN T ) NxR .
[0204] More specifically, when the inverse RST is applied as the secondary inverse transform, the inverse RST matrix T RxN T When multiplied by the transform coefficients for the target block, the modified transform coefficients for the target block are derived. Meanwhile, the inverse RST can be applied as the inverse primary transform, and in this case, the inverse RST matrix T RxN T Residual samples for the target block are derived when multiplied by the transform coefficients for the target block.
[0205] In an example, if the size of the block to which the inverse transform is applied is 8x8 and R = 16 (ie, R / N = 16 / 64 = 1 / 4), then the Figure 8 The RST of (b) is expressed as a matrix operation as shown in the following equation 10.
[0206] [Formula 10]
[0207]
[0208] In formula 10, c1 to c 16 As a result of the calculation of Equation 10, r representing the modified transform coefficient for the target block or the residual sample for the target block may be derived. i , and derive r i The process can be the same as in formula 11.
[0209] [Formula 11]
[0210]
[0211] As a result of the calculation of Equation 11, r1 to r2 representing the modified transform coefficients for the target block or the residual samples for the target block may be derived. N . When considered from the perspective of the size of the inverse transform matrix, the size of the regular inverse transform matrix is 64x64 (NxN), but the size of the reduced inverse transform matrix is reduced to 64x16 (RxN), so when compared with the case of performing the regular inverse transform, the memory usage in the case of performing the inverse RST can be reduced by the R / N ratio. In addition, when compared with the number of multiplication calculations NxN in the case of using the regular inverse transform matrix, the use of the reduced inverse transform matrix can reduce the number of multiplication calculations by the R / N ratio (NxR).
[0212] The transform set configuration shown in Table 3 can also be applied to 8×8 RST. That is, 8×8 RST can be applied according to the transform set in Table 3. Since one transform set includes two or three transforms (kernels) according to the intra prediction mode, it can be configured to select one of up to four transforms including the case where the secondary transform is not applied. In the transform where the secondary transform is not applied, the application of the identity matrix can be considered. Assuming that indexes 0, 1, 2, and 3 are assigned to the four transforms respectively (for example, index 0 can be assigned to the case where the identity matrix is applied, that is, the case where the secondary transform is not applied), the transform index or lfnst index as a syntax element can be signaled for each transform coefficient block, thereby specifying the transform to be applied. That is, for the upper left 8×8 block, by the transform index, the 8×8 NSST in the RST configuration can be specified, or the 8×8 lfnst can be specified when the LFNST is applied. 8×8 lfnst and 8×8 rst refer to transforms that can be applied to an 8×8 region included in a transform coefficient block when both W and H of a target block to be transformed are equal to or greater than 8, and the 8×8 region may be the upper left 8×8 region in the transform coefficient block. Similarly, 4×4 lfnst and 4×4 rst refer to transforms that can be applied to a 4×4 region included in a transform coefficient block when both W and H of a target block are equal to or greater than 4, and the 4×4 region may be the upper left 4×4 region in the transform coefficient block.
[0213] According to an embodiment of the present disclosure, for the transformation in the encoding process, only 48 pieces of data may be selected, and a maximum 16×48 transform kernel matrix may be applied thereto, instead of applying a 16×64 transform kernel matrix to 64 pieces of data forming an 8×8 region. Here, "maximum" means that m has a maximum value of 16 in the m×48 transform kernel matrix for generating m coefficients. That is, when RST is performed by applying an m×48 transform kernel matrix (m≤16) to an 8×8 region, 48 pieces of data are input, and m coefficients are generated. When m is 16, 48 pieces of data are input and 16 coefficients are generated. That is, assuming that 48 pieces of data form a 48×1 vector, the 16×48 matrix and the 48×1 vector are multiplied in sequence, thereby generating a 16×1 vector. Here, the 48 pieces of data forming an 8×8 region may be appropriately arranged, thereby forming a 48×1 vector. For example, a 48×1 vector may be constructed based on 48 pieces of data constituting an area other than the lower right 4×4 area among the 8×8 regions. Here, when the matrix operation is performed by applying the maximum 16×48 transform kernel matrix, 16 modified transform coefficients are generated and the 16 modified transform coefficients can be arranged in the upper left 4×4 region according to the scanning order, and the upper right 4×4 region and the lower left 4×4 region can be filled with zeros.
[0214] For the inverse transform in the decoding process, the transposed matrix of the aforementioned transform kernel matrix can be used. That is, when the inverse RST or LFNST is performed in the inverse transform process performed by the decoding device, the input coefficient data to which the inverse RST is applied is configured in a one-dimensional vector according to a predetermined arrangement order, and the modified coefficient vector obtained by multiplying the one-dimensional vector with the corresponding inverse RST matrix on the left side of the one-dimensional vector can be arranged in a two-dimensional block according to a predetermined arrangement order.
[0215] In summary, in the transformation process, when RST or LFNST is applied to an 8×8 region, 48 transform coefficients in the upper left region, the upper right region, and the lower left region except the lower right region of the 8×8 region are matrix-operated with a 16×48 transform kernel matrix. For the matrix operation, the 48 transform coefficients are input in a one-dimensional array. When the matrix operation is performed, 16 modified transform coefficients are derived, and the modified transform coefficients can be arranged in the upper left region of the 8×8 region.
[0216] On the contrary, in the inverse transform process, when the inverse RST or LFNST is applied to the 8×8 region, 16 transform coefficients corresponding to the upper left region of the 8×8 region among the transform coefficients in the 8×8 region can be input in a one-dimensional array according to the scanning order, and can undergo a matrix operation with a 48×16 transform kernel matrix. That is, the matrix operation can be expressed as (48×16 matrix) * (16×1 transform coefficient vector) = (48×1 modified transform coefficient vector). Here, the n×1 vector can be interpreted as having the same meaning as the n×1 matrix, and can therefore be expressed as an n×1 column vector. In addition, * represents matrix multiplication. When the matrix operation is performed, 48 modified transform coefficients can be derived, and the 48 modified transform coefficients can be arranged in the upper left region, the upper right region, and the lower left region of the 8×8 region except the lower right region.
[0217] When the secondary inverse transform is based on RST, the inverse transformer 235 of the encoding device 200 and the inverse transformer 322 of the decoding device 300 may include an inverse reduction secondary transformer for deriving modified transform coefficients based on an inverse RST of the transform coefficients and an inverse primary transformer for deriving residual samples of the target block based on an inverse primary transform of the modified transform coefficients. The inverse primary transform refers to an inverse transform of a primary transform applied to the residual. In the present disclosure, deriving transform coefficients based on a transform may refer to deriving transform coefficients by applying a transform.
[0218] The non-separable transform (LFNST) described above will be described in detail as follows: The LFNST may include a forward transform performed by an encoding device and an inverse transform performed by a decoding device.
[0219] The encoding device receives as input a result (or a portion of the result) derived after applying a primary (core) transform, and applies a forward secondary transform (Secondary Transform).
[0220] [Formula 12]
[0221]
[0222] In Equation 12, x and y are the input and output of the secondary transform, respectively, G is a matrix representing the secondary transform, and the transform basis vectors consist of column vectors. In the case of inverse LFNST, when the dimension of the transform matrix G is expressed as [number of rows × number of columns], in the case of forward LFNST, the transpose of the matrix G becomes G T Dimension.
[0223] For inverse LFNST, the dimensions of the matrix G are [48×16], [48×8], [16×16], [16×8], and the [48×8] matrix and the [16×8] matrix are partial matrices of 8 transformation basis vectors sampled from the left side of the [48×16] matrix and the [16×16] matrix, respectively.
[0224] On the other hand, for forward LFNST, the matrix G T The dimensions of are [16×48], [8×48], [16×16], [8×16], and the [8×48] matrix and the [8×16] matrix are partial matrices obtained by sampling 8 transformation basis vectors from the upper parts of the [16×48] matrix and the [16×16] matrix, respectively.
[0225] Therefore, in the case of forward LFNST, a [48×1] vector or a [16×1] vector can be used as input x, and a [16×1] vector or a [8×1] vector can be used as output y. In video encoding and decoding, the output of the forward primary transform is two-dimensional (2D) data, so in order to construct a [48×1] vector or a [16×1] vector as input x, it is necessary to construct a one-dimensional vector by appropriately arranging the 2D data as the output of the forward transform.
[0226] Fig. 9 is a diagram illustrating an order of arranging output data of a forward primary transform into a one-dimensional vector according to an example. Fig. 9 The left diagrams of (a) and (b) show the order for constructing a [48 × 1] vector, and Fig. 9 The right figures of (a) and (b) show the order for constructing a [16×1] vector. In the case of LFNST, the 2D data can be constructed by Fig. 9 The same order of (a) and (b) is arranged sequentially to obtain a one-dimensional vector x.
[0227] The arrangement direction of the output data of the forward primary transform may be determined according to the intra-frame prediction mode of the current block. For example, when the intra-frame prediction mode of the current block is in the horizontal direction relative to the diagonal direction, the arrangement direction of the output data of the forward primary transform may be determined according to the intra-frame prediction mode of the current block. Fig. 9 The output data of the forward primary transform are arranged in the order of (a) of FIG. 1 and, when the intra prediction mode of the current block is in a vertical direction relative to the diagonal direction, the output data of the forward primary transform may be arranged in the order of (a) of FIG. Fig. 9 The output data of the forward primary transform are arranged in the order of (b).
[0228] According to the example, different from Fig. 9 The arrangement order of (a) and (b) is the order of arrangement, and in order to derive and apply Fig. 9 If the arrangement order of (a) and (b) is the same (y vector), the column vectors of the matrix G can be rearranged according to the arrangement order. 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.
[0229] Since the output y derived by formula 12 is a one-dimensional vector, when two-dimensional data is required as input data in a process using the result of the forward secondary transform as input (for example, in the process of performing quantization or residual coding), the output y vector of formula 12 needs to be properly arranged as 2D data again.
[0230] Fig.10 is a diagram illustrating an order of arranging output data of a forward secondary transform into a two-dimensional vector according to an example.
[0231] In the case of LFNST, the output values may be arranged in 2D blocks according to a predetermined scanning order. Fig.10 (a) shows that when the output y is a [16×1] vector, the output values are arranged at 16 positions of the 2D block according to the diagonal scanning order. Fig.10 (b) shows that when the output y is a [8×1] vector, the output values are arranged at 8 positions of the 2D block according to the diagonal scanning order, and the remaining 8 positions are filled with zeros. Fig.10 The X in (b) indicates that it is filled with zeros.
[0232] According to another example, since the order of processing the output vector y when performing quantization or residual coding can be preset, the output vector y may not be arranged in Fig.10 However, in the case of residual coding, data coding may be performed in 2D block (eg, 4×4) units (eg, CG (coefficient group)), and in this case, according to Fig.10 The data is arranged in a specific order in the diagonal scan order.
[0233] In addition, the decoding device may configure a one-dimensional input vector y by arranging two-dimensional data output through a dequantization process according to a preset scanning order for inverse transformation. The input vector y may be output as an output vector x through the following equation.
[0234] [Formula 13]
[0235]
[0236] 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 a [8×1] vector, by the G matrix. For inverse LFNST, the output vector x can be a [48×1] vector or a [16×1] vector.
[0237] The output vector x is based on Fig. 9 The order shown in is arranged in a two-dimensional block and is arranged as two-dimensional data, and the two-dimensional data becomes input data (or a part of the input data) of the inverse primary transform.
[0238] Thus, the inverse secondary transform is overall the reverse of the forward secondary transform process and in the case of an inverse transform, unlike in the forward direction, the inverse secondary transform is applied first and then the inverse primary transform.
[0239] In the inverse LFNST, one of 8 [48×16] matrices and 8 [16×16] matrices can be selected as the transformation matrix G. Whether to apply the [48×16] matrix or the [16×16] matrix depends on the size and shape of the block.
[0240] In addition, 8 matrices can be derived from the four transform sets shown in Table 3 above, and each transform set can be composed of two matrices. Which transform set to use among the 4 transform sets is determined according to the intra prediction mode, and more specifically, the transform set is determined based on the value of the intra prediction mode extended by considering wide-angle intra prediction (WAIP). Which matrix is selected from the two matrices constituting the selected transform set is derived by index signaling. More specifically, 0, 1, and 2 can be used as the index values sent, 0 can indicate that LFNST is not applied, and 1 and 2 can indicate any one of the two transform matrices constituting the transform set selected based on the intra prediction mode value.
[0241] Table 3 above shows how to select a transform set based on the intra prediction mode value extended by WAIP in LFNST. Figure 5 As shown, modes 14 to 33 and modes 35 to 80 are symmetric about the prediction direction around mode 34. For example, mode 14 and mode 54 are symmetric about the direction corresponding to mode 34. Therefore, the same set of transformations is applied to modes located in mutually symmetric directions, and this symmetry is also reflected in Table 3.
[0242] In addition, it is assumed that the forward LFNST input data of mode 54 is symmetric with the forward LFNST input data of mode 14. For example, for mode 14 and mode 54, according to Fig. 9 (a) and Fig. 9 The arrangement order shown in (b) rearranges the two-dimensional data into one-dimensional data. In addition, it can be seen that Fig. 9 (a) and Fig. 9 The pattern of the order shown in (b) is symmetrical about the direction indicated by the pattern 34 (diagonal direction).
[0243] Furthermore, as described above, which transform matrix of the [48×16] matrix and the [16×16] matrix is applied to the LFNST is determined by the size and shape of the transform target block.
[0244] Fig.11 is a diagram illustrating a block shape to which LFNST is applied. Fig.11 (a) shows a 4×4 block, Fig.11 (b) shows a 4×8 block and an 8×4 block, Fig.11 (c) shows a 4×N block or an N×4 block, where N is 16 or greater, Fig.11 (d) shows an 8×8 block, Fig.11 (e) shows an M×N block, where M≥8, N≥8 and N>8 or M>8.
[0245] exist Fig.11 In , blocks with thick borders indicate the areas where LFNST is applied. Fig.11 For blocks (a) and (b), LFNST is applied to the top left 4×4 region, and for Fig.11 In block (c), LFNST is applied separately to the two upper left 4×4 regions that are arranged consecutively. Fig.11 In (a), (b), and (c), since LFNST is applied in units of 4×4 regions, the LFNST will be referred to as “4×4 LFNST” hereinafter. As the corresponding transformation matrix, a [16×16] or [16×8] matrix may be applied based on the matrix dimension of G in Equations 12 and 13.
[0246] More specifically, the [16×8] matrix is applied to Fig.11 (a) 4×4 block (4×4 TU or 4×4 CU), and the [16×16] matrix is applied to Fig.11 This is to adjust the worst case computational complexity to 8 multiplications per sample.
[0247] about Fig.11In (d) and (e), LFNST is applied to the upper left 8×8 region, and this LFNST is hereinafter referred to as "8×8 LFNST". As the corresponding transformation matrix, a [48×16] matrix or a [48×8] matrix may be applied. In the case of the forward LFNST, since a [48×1] vector (the X vector in Equation 12) is input as input data, not all sample values of the upper left 8×8 region are used as input values of the forward LFNST. That is, as can be seen from Fig. 9 The left order of (a) or Fig. 9 As can be seen from the left order of (b), a [48×1] vector can be constructed based on samples belonging to the remaining 3 4×4 blocks while leaving the lower right 4×4 block intact.
[0248] The [48×8] matrix can be applied to Fig.11 (d) in 8×8 blocks (8×8 TU or 8×8 CU), and the [48×16] matrix can be applied to Fig.11 The 8×8 block in (e) is also to adjust the worst-case computational complexity to 8 multiplications per sample.
[0249] Depending on the block shape, when the corresponding forward LFNST (4×4 or 8×8 LFNST) is applied, 8 or 16 output data are generated (the Y vector in Eq. 12, [8×1] or [16×1] vector). In the forward LFNST, since the matrix G T The characteristic is that the number of output data is equal to or less than the number of input data.
[0250] Fig.12 is a diagram illustrating arrangement of output data of a forward LFNST according to an example, and shows blocks in which the output data of the forward LFNST is arranged according to a block shape.
[0251] exist Fig.12 The shaded area on the upper left of the block shown corresponds to the area where the output data of the forward LFNST is located, the positions marked with 0 indicate samples filled with 0 values, and the remaining areas represent areas that are not changed by the forward LFNST. In the areas that are not changed by the LFNST, the output data of the forward primary transform remains unchanged.
[0252] As described above, since the size of the applied transformation matrix varies according to the shape of the block, the amount of output data also varies. Fig.12 , the output data of the forward LFNST may not completely fill the upper left 4×4 block. Fig.12In the cases (a) and (d) of , the [16×8] matrix and the A[48×8] matrix are applied to the block or the partial area inside the block indicated by the bold line, respectively, and an [8×1] vector is generated as the output of the forward LFNST. That is, according to Fig.10 The scanning order shown in (b) can only fill 8 output data, such as Fig.12 As shown in (a) and (d), the remaining 8 positions can be filled with 0. Fig.11 (d) The case of LFNST application blocks, such as Fig.12 As shown in (d), the two 4×4 blocks on the upper right and lower left adjacent to the upper left 4×4 block are also filled with 0 values.
[0253] As described above, basically, by signaling the LFNST index, it is specified whether to apply LFNST and the transformation matrix to be applied. Fig.12 As shown, when LFNST is applied, since the number of output data of the forward LFNST may be equal to or less than the number of input data, an area filled with zero values appears as follows.
[0254] 1) If Fig.12 (a) shows samples from the eighth position and subsequent positions in the scanning order in the upper left 4×4 block, that is, samples from the ninth to sixteenth positions.
[0255] 2) If Fig.12 As shown in (d) and (e), when the [16×48] matrix or the [8×48] matrix is applied, two 4×4 blocks adjacent to the upper left 4×4 block or the second and third 4×4 blocks in the scanning order.
[0256] Therefore, if non-zero data exists by checking areas 1) and 2), it is determined that LFNST is not applied, so that signaling of the corresponding LFNST index can be omitted.
[0257] According to an example, for example, in the case of LFNST adopted in the VVC standard, since the signaling of the LFNST index is performed after residual coding, the encoding device can know whether there is non-zero data (significant coefficient) at all positions within the TU or CU block through residual coding. Therefore, the encoding device can determine whether to perform signaling about the LFNST index based on the presence of non-zero data, and the decoding device can determine whether to parse the LFNST index. When non-zero data does not exist in the area specified in 1) and 2) above, the signaling of the LFNST index is performed.
[0258] Since truncated unary code is applied as a binarization method for the LFNST index, the LFNST index consists of up to two bins, and 0, 10, and 11 are assigned as binary codes for possible LFNST index values 0, 1, and 2, respectively. In the case of LFNST currently used for VVC, context-based CABAC coding is applied to the first bin (conventional coding), and bypass coding is applied to the second bin. The total number of contexts for the first bin is 2, and when (DCT-2, DCT-2) is applied as a primary transform pair for horizontal and vertical directions and the luminance component and the chrominance component are coded in a dual-tree type, one context is allocated and the other context is applied to the remaining cases. The coding of the LFNST index is shown in the following table.
[0259] [Table 4]
[0260]
[0261] In addition, for the adopted LFNST, the following simplification method can be applied.
[0262] (i) According to an example, the number of output data of the forward LFNST may be limited to a maximum value of 16.
[0263] exist Fig.11 In the case of (c), 4×4 LFNST can be applied to two 4×4 regions adjacent to the upper left, respectively, and in this case, a maximum of 32 LFNST output data can be generated. When the number of output data of the forward LFNST is limited to a maximum of 16, in the case of a 4×N / N×4 (N≥16) block (TU or CU), 4×4 LFNST is applied only to one 4×4 region in the upper left, and LFNST can be applied only to Fig.11 All blocks of are processed at once. By doing this, the implementation of image compilation can be simplified.
[0264] Fig.13 It is shown that the number of output data of the forward LFNST according to the example is limited to a maximum value of 16. Fig.13 , when LFNST is applied to the upper leftmost 4×4 region in a 4×N or N×4 block (where N is 16 or greater), the output data of the forward LFNST becomes 16.
[0265] (ii) According to an example, zeroing may be additionally applied to an area to which LFNST is not applied. In this document, zeroing may mean filling all positions belonging to a specific area with a value of 0. That is, zeroing may be applied to an area that is unchanged due to LFNST, and the result of the forward primary transformation is maintained. As described above, since LFNST is divided into 4×4 LFNST and 8×8 LFNST, zeroing may be divided into two types ((ii)-(A) and (ii)-(B)) as follows.
[0266] (ii)-(A) When 4×4 LFNST is applied, the area to which 4×4 LFNST is not applied may be zeroed. Fig.14 is a diagram illustrating clearing in a block to which 4×4 LFNST is applied according to an example.
[0267] like Fig.14 As shown, for the block to which 4×4 LFNST is applied, that is, for Fig.12 For all blocks in (a), (b), and (c), the entire area where LFNST is not applied can be filled with zeros.
[0268] on the other hand, Fig.14 (d) shows that when the maximum value of the number of output data of the forward LFNST is limited to 16 (as Fig.13 ), the remaining blocks to which 4×4 LFNST is not applied are cleared.
[0269] (ii)-(B) When 8×8 LFNST is applied, the area to which 8×8 LFNST is not applied may be cleared to zero. Fig.15 is a diagram illustrating clearing of zeros in a block to which 8×8 LFNST is applied according to an example.
[0270] like Fig.15 As shown, for the block with 8×8 LFNST applied, that is, for Fig.12 For all blocks in (d) and (e), the entire area to which LFNST is not applied can be filled with zeros.
[0271] (iii) Due to the zeroing presented in (ii) above, the area filled with zeros may not be the same as when LFNST is applied. Fig.12 The wider region of the LFNST case performs the zeroing proposed in (ii) to check whether there is non-zero data.
[0272] For example, when (ii)-(B) is applied, in checking Fig.12 After filling the areas with zero values in (d) and (e) to see if there is non-zero data, we additionally check Fig.15Whether there is non-zero data in the area filled with 0, the signaling for the LFNST index can be performed only when there is no non-zero data.
[0273] Of course, even if the clearing proposed in (ii) is applied, the presence of non-zero data can be checked in the same way as the existing LFNST index signaling. Fig.12 After checking whether there is non-zero data in the block filled with zeros in , LFNST index signaling can be applied. In this case, the encoding device only performs zero clearing and the decoding device does not assume zero clearing, that is, it only checks whether non-zero data exists only in Fig.12 In the regions explicitly marked as 0 in , LFNST index parsing can be performed.
[0274] Alternatively, according to another example, the following may be performed: Fig.16 Cleared as shown. Fig.16 is a diagram illustrating clearing in a block to which 8×8 LFNST is applied according to another example.
[0275] like Fig.14 and Fig.15 As shown, zeroing can be applied to all regions except the region where LFNST is applied, or zeroing can be applied only to local regions, as shown in Fig.16 Clearing to zero applies only to Fig.16 For areas outside the upper left 8×8 area, clearing may not be applied to the lower right 4×4 block within the upper left 8×8 area.
[0276] Various embodiments of the combination of the simplified methods ((i), (ii)-(A), (ii)-(B), (iii)) applying LFNST can be derived. Of course, the combination of the above simplified methods is not limited to the following embodiments, and any combination can be applied to LFNST.
[0277] Implementation
[0278] - Limit the number of output data of the forward LFNST to a maximum of 16 → (i)
[0279] - When 4×4 LFNST is applied, all regions where 4×4 LFNST is not applied are cleared → (ii)-(A)
[0280] - When 8×8 LFNST is applied, all regions where 8×8 LFNST is not applied are cleared → (ii)-(B)
[0281] - After checking whether non-zero data also exists in the existing regions filled with zero values and in the regions filled with zeros due to the additional clearing ((ii)-(A), (ii)-(B)), the LFNST index is signaled only if no non-zero data exists → (iii).
[0282] In the case of an embodiment, when LFNST is applied, the area where non-zero output data can exist is limited to the interior of the upper left 4×4 area. Fig.14 (a) and Fig.15 In case (a), the eighth position in the scan order is the last position where non-zero data can exist. Fig.14 (b) and (c) and Fig.15 In case of (b), the sixteenth position in the scanning order (ie, the position of the lower right edge of the upper left 4×4 block) is the last position where data other than 0 may exist.
[0283] Therefore, when LFNST is applied, after checking whether non-zero data exists at a position where a residual coding process is not allowed (at a position beyond the last position), it may be determined whether to signal an LFNST index.
[0284] In the case of the zeroing method proposed in (ii), the amount of calculation required to perform the entire transformation process can be reduced due to the amount of data ultimately generated when both the primary transformation and LFNST are applied. That is, when LFNST is applied, since zeroing is applied to the forward primary transformation output data exists in the area where LFNST is not applied, it is not necessary to generate data for the area that becomes zeroed during the execution of the forward primary transformation. Therefore, the amount of calculation required to generate the corresponding data can be reduced. The additional effects of the zeroing method proposed in (ii) are summarized as follows.
[0285] First, as mentioned above, the amount of computation required to perform the entire transformation process is reduced.
[0286] In particular, when (ii)-(B) is applied, the amount of calculation in the worst case is reduced, so that the transform process can be made lighter. In other words, in general, a large amount of calculation is required to perform a large-size primary transform. By applying (ii)-(B), the amount of data derived as a result of performing forward LFNST can be reduced to 16 or less. In addition, as the size of the entire block (TU or CU) increases, the effect of reducing the amount of transform operations further increases.
[0287] Second, the amount of computation required for the entire transformation process can be reduced, thereby reducing the power consumption required to perform the transformation.
[0288] Third, the delay involved in the transformation process is reduced.
[0289] Secondary transforms such as LFNST add computational complexity to existing primary transforms, thus increasing the overall latency involved in performing the transform. In particular, in the case of intra prediction, since reconstructed data of neighboring blocks is used during the prediction process, during encoding, the increase in latency due to the secondary transform leads to an increase in the latency until reconstruction. This can result in an increase in the overall latency of intra prediction coding.
[0290] However, if the zeroing proposed in application (ii) is applied, the latency of performing the primary transform can be greatly reduced when applying LFNST, maintaining or reducing the latency of the entire transform, such that the encoding device can be implemented more simply.
[0291] In the following, an image decoding process reflecting an embodiment is shown in a table.
[0292] [Table 5]
[0293]
[0294] Table 5 shows that sps_log2_max_luma_transform_size_minus5, which is syntax information regarding the size of a transform block, is signaled via the sequence parameter set syntax. According to the semantics, sps_log2_max_luma_transform_size_minus5 represents a value obtained by subtracting 5 from the value obtained by taking the base-2 logarithm of the maximum transform size.
[0295] The minimum size (MinTbSizeY) of a transform block for which a transform can be performed is set to 4 (MinTbSizeY = 1 << MinTbLog2SizeY), and the maximum size of a transform block for which a transform can be performed can be derived as a power of 2 of the value obtained by adding 5 to sps_log2_max_luma_transform_size_minus5 (MaxTbLog2SizeY = sps_log2_max_luma_transform_size_minus5 + 5, MaxTbSizeY = 1 << MaxTbLog2SizeY).
[0296] Since sps_log2_max_luma_transform_size_minus5 consists of 1 bit and has a value of 0 or 1, the width and height of the maximum transform block can be set to 32 or 64 based on sps_log2_max_luma_transform_size_minus5 in Table 5.
[0297] In addition, according to another embodiment, flag information sps_max_luma_transform_size_64_flag of the size of the maximum transform block may be signaled. When sps_max_luma_transform_size_64_flag is 1, the maximum size of the transform block is 64, and when sps_max_luma_transform_size_64_flag is 0, the maximum size of the transform block is 32.
[0298] [Table 6]
[0299]
[0300] Table 6 shows the lfnst_idx[x0][y0] syntax element signaled at the coding unit level. lfnst_idx[x0][y0] may indicate any one of the two transform kernel matrices included in the transform set. If lfnst_idx is 0, it may indicate that the inseparable secondary transform (ie, LFNST) is not applied.
[0301] In order for lfnst_idx to be parsed by the decoding device, many conditions need to be met. First, the variable LfnstDcOnly and the variable LfnstZeroOutSigCoeffFlag are initially set to 1. After parsing the syntax of the transform tree (transform_tree(x0,y0, cbWidth, cbHeight, treeType)), when the variable LfnstDcOnly set to 1 becomes 0 and the value of the variable LfnstZeroOutSigCoeffFlag remains 1, lfnst_idx can be parsed [if(LfnstDcOnly == 0 && LfnstZeroOutSigCoeffFlag == 1 )]. The variable LfnstDcOnly and the variable LfnstZeroOutSigCoeffFlag can be derived from the residual compilation syntax information.
[0302] Furthermore, the maximum coding block size for which lfnst_idx[ x0 ][ y0 ] can be coded is restricted to the maximum transform size (Max( cbWidth, cbHeight ) <= MaxTbSizeY).
[0303] In addition, since the coding block width (cbWidth) and the coding block height (cbHeight) respectively indicate the coding block width and the coding block height of the luma component, in the case of the chroma component, LFNST can be applied to each block of a smaller size according to the image color format (e.g., 4:2:0).
[0304] Specifically, as shown in Table 6, if the tree type of the target block is dual-tree chroma, LFNST can be applied to a chroma block having a size obtained by dividing the size of the luma coding block by the size of the SubWidthC and SubHeight indicating the variables for the chroma block [lfnstWidth = (treeType == DUAL_TREE_CHROMA)? cbWidth / SubWidthC: cbWidth, lfnstHeight = (treeType == DUAL_TREE_CHROMA)? cbHeight / SubHeightC: cbHeight].
[0305] If the color format is 4:2:0, SubWidthC and SubHeight become 2, so LFNST can be applied to the chroma block having the width and height obtained by dividing the width and height of the luma block by 2. Therefore, since LFNST can be applied when the size of the luma block is equal to or smaller than a 64×64 block, LFNST can be applied when the size of the chroma block is equal to or smaller than a 32×32 block when the color format is 4:2:0.
[0306] Furthermore, in this document, when the horizontal length and the vertical length of block A are Wa and Ha, respectively, and when the horizontal length and the vertical length of block B are Wb and Hb, respectively, block A is smaller than block B means that Wa is equal to or smaller than Wb, Ha is equal to or smaller than Hb, and Wa and Wb are not equal or Ha and Hb are not equal. In addition, block A is smaller than or equal to block B means that Wa is equal to or smaller than Wb and Ha is equal to or smaller than Hb.
[0307] In summary, LFNST can be applied when the size of the target block is equal to or smaller than a preset maximum size, which can be applied to the size of the luma block, and accordingly, the maximum size of the chroma block to which LFNST can be applied can be derived.
[0308] [Table 7]
[0309]
[0310] Table 7 shows transform_skip_flag indicating whether transform is skipped for a transform block and transform core index information tu_mts_idx[x0][y0] as the transform core index information for primary transform.
[0311] As shown in Table 7, in order to signal tu_mts_idx[x0][y0], there may be a case where the prediction mode of the current block is inter mode or when the flag information sps_explicit_mts_inter_enabled_flag explicitly indicating whether MTS can be applied to residual data generated by inter prediction is 1 [(CuPredMode[ x0 ][ y0 ] == MODE_INTER && sps_explicit_mts_inter_enabled_flag )], or the prediction mode of the current block is intra mode or when the flag information sps_explicit_mts_intra_enabled_flag explicitly indicating whether MTS can be applied to residual data generated by intra prediction is 1 [(CuPredMode[ x0 ][ y0 ] == MODE_INTRA && sps_explicit_mts_intra_enabled_flag )].
[0312] In addition, when the condition that transform_skip_flag is not 0 is satisfied, tu_mts_idx[x0][y0] can be parsed.
[0313] Furthermore, according to another example, tu_mts_idx[x0][y0] may be signaled at the coding unit level of Table 6 instead of the transform unit level.
[0314] [Table 8]
[0315]
[0316]
[0317] Table 8 shows the residual coding syntax and shows a process of deriving the variable LfnstDcOnly and the variable LfnstZeroOutSigCoeffFlag of Table 6.
[0318] Based on the size of the transform block, variables log2SbW and log2SbH indicating the height and width of the subblock can be derived, and numSbCoeff [numSbCoeff = 1 << (log2SbW + log2SbH )] representing the number of coefficients that can exist in the subblock can be set based on the variables log2SbW and log2SbH.
[0319] The variable lastScanPos indicating the position of the last significant coefficient within the subblock is initially set to numSbCoeff, and the variable lastSubBlock indicating the subblock where the last non-zero coefficient exists is initially set to “(1 << (log2TbWidth + log2TbHeight – ( log2SbW + log2SbH ) ) ) – 1”.
[0320] When performing diagonal scanning in the sub-block corresponding to lastSubBlock[lastScanPos- -], check whether the last non-zero significant coefficient exists at the corresponding position.
[0321] When no valid coefficients are found in the sub-block pointed to by lastSubBlock until the variable lastScanPos becomes 0, the variable lastScanPos is set to numSbCoeff again, and the variable lastSubBlock also becomes the next sub-block in the scanning direction.
[0322] That is, as the variables lastScanPos and lastSubBlock are updated according to the scan direction, the location of the last non-zero coefficient is identified.
[0323] The variable LfnstDcOnly indicates whether a non-zero coefficient exists at a position other than a DC component for at least one transform block in one coding unit, and becomes 0 when a non-zero coefficient exists at a position other than a DC component for at least one transform block in one coding unit, and becomes 1 when a non-zero coefficient does not exist at a position other than a DC component for at least one transform block in one coding unit. In this document, a DC component refers to an upper left position or (0, 0) relative to a 2D component.
[0324] There may be several transform blocks within one coding unit. For example, in the case of chroma components, there may be transform blocks for Cb and Cr, and in the case of a single tree type, there may be transform blocks for luma, Cb, and Cr. According to an example, when a non-zero coefficient other than the position of the DC component is found in one of the transform blocks constituting the current coding block, the variable LnfstDcOnly value may be set to 0.
[0325] Meanwhile, since residual coding is not performed on the corresponding transform block if there is no non-zero coefficient in the transform block, the value of the variable LfnstDcOnly is not changed by the corresponding transform block. Therefore, when there is no non-zero coefficient in a position other than the DC component in the transform block, the value of the variable LfnstDcOnly is not changed and the previous value is maintained. For example, if the coding unit is coded as a single tree type and the value of the variable LfnstDcOnly is changed to 0 due to the luma transform block, the value of the variable LfnstDcOnly remains 0 even if there is a non-zero coefficient only in the DC component in the Cb / Cr transform block or there is no non-zero coefficient in the Cb / Cr transform block. The value of the variable LfnstDcOnly is initially initialized to 1, and if there is no component in the current coding unit that can update the value of the variable LfnstDcOnly to 0, it maintains the value of 1 as it is, and when the value of the variable LfnstDcOnly is updated to 0 at any one of the transform blocks constituting the corresponding coding unit, it is finally maintained at 0.
[0326] As shown in Table 8, when the index of the sub-block where the last non-zero coefficient exists is 0 [lastSubBlock == 0] and the position of the last non-zero coefficient in the sub-block is greater than 0 [lastScanPos > 0], the variable LfnstDcOnly can be derived to 0. The variable LfnstDcOnly can be derived to 0 only when the width and height of the transform block are 4 or more [log2TbWidth >= 2 &&log2TbHeight >= 2] and the transform skip is not applied [!transform_skip_flag[ x0 ][ y0 ]].
[0327] Assuming LFNST is applied, when the index of the sub-block where the last non-zero coefficient exists is greater than 0 and the width and height of the transform block are both greater than or equal to 4 [( lastSubBlock > 0 && log2TbWidth >= 2 && log2TbHeight >=2 )], or when the last position of the non-zero coefficient within the sub-block where the last non-zero coefficient exists is greater than 7 and the size of the transform block is 4×4 or 8×8 [( lastScanPos > 7 && ( log2TbWidth == 2 | |log2TbHeight == 3 ) && log2TbWidth == log2TbHeight )], the variable LfnstZeroOutSigCoeffFlag, which can indicate whether clearing is performed appropriately, is set to 0.
[0328] That is, the first condition of the variable LfnstZeroOutSigCoeffFlag is a condition that a non-zero coefficient is derived in an area other than the upper left area to which LFNST can be applied in the transform block (i.e., when a significant coefficient is derived in a sub-block other than the upper left sub-block (4×4)). When the first condition is satisfied, the flag variable lfnstZeroOutSigCoeffFlag for clearing LFNST is set to 0. Satisfying the first condition means that clearing is not performed, assuming that LFNST is applied.
[0329] The second condition of the variable LfnstZeroOutSigCoeffFlag is for 4×4 blocks and 8×8 blocks. When LFNST is applied to 4×4 blocks and 8×8 blocks, since the last position where a non-zero coefficient can exist is Fig.12 In the 8th position shown in (a) and (d), if there is a non-zero coefficient outside the 7th position when starting from 0, the flag variable lfnstZeroOutSigCoeffFlag is set to 0. Satisfying the second condition also indicates that zeroing is not performed when LFNST is assumed to be applied.
[0330] Thus, when the flag variable lfnstZeroOutSigCoeffFlag is set to 0, lfnst_idx signaled at the coding unit level is not signaled as shown in Table 6. That is, when the flag variable lfnstZeroOutSigCoeffFlag is set to 0, the decoding device does not parse lfnst_idx.
[0331] In summary, at the coding unit level, the variable LfnstDcOnly and the variable LfnstZeroOutSigCoeffFlag are set to 1 respectively, and then at the residual coding level, the variable LfnstDcOnly and the variable LfnstZeroOutSigCoeffFlag are newly derived through the process shown in Table 8. Only when the variable LfnstDcOnly derived from the residual coding level is 0 and the variable LfnstZeroOutSigCoeffFlag is 1 [if (LfnstDcOnly == 0 && LfnstZeroOutSigCoeffFlag == 1), lfnst_idx can be signaled.
[0332] [Table 9]
[0333]
[0334] Table 9 shows a process of deriving an intra prediction mode when CCLM is applied to a chroma block. Based on flag information sps_cclm_enabled_flag indicating whether CCLM is applied to a current block, an intra prediction mode (IntraPredModeC[ xCb ][ yCb ]) is shown in Tables [Table 8.5 and Table 8.6].
[0335] Table 8.5 shows the case where the sps_cclm_enabled_flag value is 0. When CCLM is not applied to the chroma block, the chroma prediction mode index information (intra_chroma_pred_mode[ xCb ][ yCb ]) shows the intra prediction mode for the chroma block according to 0, 1, 2, 3, 4.
[0336] Table 8.6 shows the intra prediction mode for the chroma block according to the chroma prediction mode index information (intra_chroma_pred_mode[xCb][yCb]) 0 to 7 as the case where the sps_cclm_enabled_flag value is 1 when CCLM is applied to the chroma block. When the chroma prediction mode index is 4, 5, and 6, the intra prediction mode for the chroma block is derived as 81, 82, and 83.
[0337] In Table 8.5, when the chroma prediction mode index is 4, and in Table 8.6, when the chroma prediction mode index cIdx is 7, it indicates that DM is applied to the chroma block.
[0338] [Table 10]
[0339]
[0340]
[0341] [Table 11]
[0342]
[0343]
[0344] Table 10 and Table 11 show that the intra prediction process and the inter prediction process are performed based on the variable MaxTbSizeY of the size of the transform block derived according to Table 5.
[0345] The maximum width (maxTbWidth) and maximum height (maxTbHeight) of the transform block are derived from the variables MaxTbSizeY or MaxTbSizeY / SubWidthC reflecting the color format according to the color index [maxTbWidth = (cIdx == 0) - MaxTbSizeY: MaxTbSizeY / SubWidthC, maxTbHeight = (cIdx == 0) - MaxTbSizeY: MaxTbSizeY / SubHeightC] for luma or chroma.
[0346] The height and width of the transform block used for inter-frame prediction and intra-frame prediction are set based on the variable maxTbWidth and the variable maxTbHeight derived in this way [newTbW = (nTbW > maxTbWidth)? (nTbW / 2): nTbW, newTbH = (nTbH > maxTbHeight)? (nTbH / 2): nTbH], and the subsequent prediction process can be performed based on the set values.
[0347] [Table 12]
[0348]
[0349]
[0350]
[0351] Table 12 shows the overall transformation process performed by the decoding device.
[0352] Referring to Table 12, the variable nonZeroSize indicating the size or number of non-zero variables on which matrix operations are performed in order to apply LFNST is set to 8 or 16. When the width and height of the transform block are 4 or 8, that is, Fig.12 The length of the output data of the forward LFNST or the input data of the inverse LFNST for the 4×4 block and the 8×8 block shown is 8. For all other blocks, the length of the output data of the forward LFNST or the input data of the inverse LFNST is 16 [nonZeroSize = ( ( nTbW = = 4 &&nTbH = = 4 ) | | ( nTbW = = 8 && nTbH = = 8)) ? 8:16]. That is, when the forward LFNST is applied, the maximum number of output data is limited to 16.
[0353] The input data of the inverse LFNST can be arranged in two dimensions according to diagonal scanning [xC = DiagScanOrder[ 2 ][ 2 ][ x ][ 0 ], yC = DiagScanOrder[ 2 ][ 2 ][ x ] [1]]. The above section shows the decoding process of (i) of the LFNST simplification method.
[0354] Thus, since the number of input data for the inverse LFNST of the transform block is limited to a maximum value of 16, the LFNST can be applied to the upper leftmost 4×4 region in a 4×N block or an N×4 block, where N is 16 or greater, as shown in FIG. Fig.13 As shown, and the result is Fig.14 As shown in (d), clearing can be performed on the remaining blocks to which 4×4 LFNST is not applied.
[0355] On the other hand, when the intra prediction mode is greater than or equal to 81, that is, when CCLM is applied during intra prediction of a chroma block, the intra prediction mode (predModeIntra) used to derive the transform set can be set to the intra mode (IntraPredModeY[xTbY+nTbW / 2][yTbY+nTbH / 2]) of the corresponding luma block.
[0356] In addition, the variable implicitMtsEnabled indicating whether MTS is implicitly performed may be set to 1 under the condition that the flag information sps_mts_enabled_flag signaled at the sequence parameter level is 1, sps_explicit_mts_intra_enabled_flag is 0, the intra prediction mode is applied to the current block, lfnst_idx is 0, and intra_mip_flag is 1.
[0357] In addition, the variables nonZeroW and nonZeroH indicating the width and height of the upper left block in which non-zero transform coefficients input to the inverse primary transform may exist are derived as 4 when the lfnst index is not 0 and the width or width of the transform block is 4, otherwise derived as 8 [nonZeroW = (nTbW == 4 | | nTbH == 4)? 4: 8, nonZeroH = (nTbW == 4 | | nTbH == 4)? 4: 8]. That is, in the transform block, zeroing is performed in areas other than the 4×4 area and the 8×8 area to which lfnst is applied. This section shows the decoding process of (ii) for the LFNST simplification method.
[0358] [Table 13]
[0359]
[0360] Table 13 shows a LFNST transform set derived based on an input value for deriving a transform kernel matrix and an intra prediction mode and a transform set for LFNST.
[0361] As shown in Table 13, a transform kernel matrix (lowFreqTransMatrix) may be derived using a variable nTrS indicating a transform output size for deriving a transform kernel matrix, intra prediction mode information (predModeIntra) for selecting an LFNST transform set, and a LFNST index signaled from a coding unit as input values.
[0362] There are four LFNST transform sets, such as 0, 1, 2, and 3, and the same transform set can be applied to modes located in mutually symmetric directions based on the symmetry of the intra prediction mode. When the intra prediction mode is a non-directional planar mode or DC mode (0 <= predModeIntra <= 1), the transform set is 0, and in the case of wide-angle intra prediction mode (predModeIntra < 0, 56 <= predModeIntra <= 80), the transform set is 1.
[0363] On the other hand, as described above, when CCLM is applied to a chroma block, the intra prediction mode (predModeIntra) of the chroma block used to derive a transform set can be set to the intra mode (IntraPredModeY[ xTbY +nTbW / 2 ][ yTbY + nTbH / 2 ]) of the corresponding luminance block instead of 81 to 83 indicating CCLM or planar mode.
[0364] Therefore, 81 to 83 to which CCLM is applied are omitted in the intra prediction mode (predModeIntra) for transform set selection of Table 13.
[0365] Meanwhile, Table 14 below shows ctxInc allocated to the bin index of the above-mentioned tu_mts_idx syntax element (ctxInc is assigned to a syntax element of a bin having context coding).
[0366] [Table 14]
[0367]
[0368] As shown in Table 14, ctxInc of the first bin (binIdx=0) of tu_mts_idx is 0, ctxInc of the second bin (binIdx=1) is 1, ctxInc of the third bin (binIdx=2) is 2, and ctxInc of the fourth bin (binIdx=3) is 3.
[0369] In the conventional case, as described above, any one ctxInc is selected from among a plurality of ctxIncs according to a predetermined condition and allocated to the first bin, and as described above, by allocating a fixed ctxInc to the first bin without complying with a specific condition, the coding efficiency can be improved.
[0370] The following figures are provided to describe specific examples of the present disclosure. Since the specific names of the devices illustrated in the figures or the names of the specific signals / messages / fields are provided for illustration purposes, the technical features of the present disclosure are not limited to the specific names used in the following figures.
[0371] Fig.17 is a flowchart illustrating the operation of a video decoding apparatus according to an embodiment of the present disclosure.
[0372] Fig.17 Each of the operations shown can be performed by Figure 3 The decoding device 300 shown in the figure is executed. Specifically, S1710 and S1720 can be performed by Figure 3 The entropy decoder 310 shown in the figure performs S1730 to S1760. Figure 3 The illustrated inverse converter 322 performs and S1770 can be performed by Figure 3 The adder 340 shown in the figure performs the operation according to S1710 to S1770 based on the reference Figures 4 to 16 Therefore, some of the above details will be omitted or briefly described. Figures 3 to 16 Description of those specific details of the overlap.
[0373] The decoding device 300 according to an embodiment may obtain intra prediction mode information and a LFNST index from a bitstream ( S1710 ).
[0374] The intra-frame prediction mode information is an mpm index indicating one of the mpm candidates in a most probable mode (MPM) list derived based on the intra-frame prediction modes of neighboring blocks (e.g., left neighboring blocks and / or upper neighboring blocks) of the current block and additional candidate modes, or remaining intra-frame prediction mode information indicating one of the remaining intra-frame prediction modes not included in the mpm candidates.
[0375] In addition, the intra mode information may include flag information sps_cclm_enabled_flag indicating whether CCLM is applied to the current block and intra_chroma_pred_mode information about an intra prediction mode for a chroma component.
[0376] In addition, the decoding device 300 can decode information about the quantized transform coefficient for the current block from the bitstream and can derive the quantized transform coefficient for the current block based on the information about the quantized transform coefficient for the current block. The information about the quantized transform coefficient for the current block may be included in a sequence parameter set (SPS) or a slice header and may include at least one of the following: information about whether a reduced transform (RST) is applied, information about a minimum transform size for applying the reduced transform, information about a maximum transform size for applying the reduced transform, a reduced inverse transform size, and information about a transform index (LFNST index) indicating any one of transform kernel matrices included in a transform set (LFNST set).
[0377] Meanwhile, when the partition tree structure for the current block is a dual tree type, an LFNST index may be received for each of a luma block and a chroma block.
[0378] The LFNST index information is received as syntax information and the syntax information is received as a binarized bin string including 0 and 1.
[0379] The syntax element of the LFNST index according to the present embodiment may indicate whether to apply inverse LFNST or inverse inseparable transform and any one of the transform core matrices included in the transform set, and the transform set includes two transform core matrices. In this case, the syntax element of the transform index may have three values.
[0380] That is, according to an embodiment, the syntax element value of the LFNST index may include 0 indicating that inverse LFNST is not applied to the target block, 1 indicating a first transform core matrix among transform core matrices, and 2 indicating a second transform core matrix among transform core matrices.
[0381] In addition, the decoding apparatus 300 may also receive MTS index information indicating a transform kernel of an inverse primary transform.
[0382] The decoding apparatus may derive the intra prediction mode of the current chroma block as the CCLM mode based on the intra prediction mode information ( S1720 ).
[0383] The decoding device may derive the intra prediction mode of the current chroma block. For example, the decoding device may receive information about the intra prediction mode of the current chroma block through a bitstream, and may derive the CCLM mode as the intra prediction mode of the current chroma block based on the information about the intra prediction mode.
[0384] The CCLM mode may include a top-left based CCLM mode, a top-based CCLM mode, or a top-left and top-based CCLM mode, and these three CCLM modes may be derived as intra prediction modes 81 to 83 of Table 8.6 of Table 9.
[0385] The decoding apparatus may change the CCLM mode of the chroma block to the intra prediction mode of the luminance block corresponding to the chroma block to perform inverse LFNST of the chroma block ( S1730 ).
[0386] As shown in Table 12 [– When predModeIntra is greater than or equal to 81, the chroma intra prediction mode derivation process as specified in clause 8.4.4 is called with the luma position (xTbY, yTbY), nTbW, nTbH as input, and predModeIntra is set equal to IntraPredModeY[ xTbY + nTbW / 2 ][ yTbY + nTbH / 2 ]. ], the decoding device may change the CCLM mode for the chroma block to the intra prediction mode (IntraPredModeY) of the luma block corresponding to the chroma block.
[0387] Here, when (xTbY, yTbY) is the top left position in the luma sample reference of the current transform block, and nTbW and nTbH are the width and height in the luma sample reference for the current transform block, respectively, (xTbY + nTbW / 2, yTbY + nTbH / 2) indicates the middle position of the current transform block based on the luma sample, and IntraPredModeY[xTbY + nTbW / 2][yTbY + nTbH / 2] indicates the intra prediction mode in the luma block for the corresponding position. Here, the position in the luma sample reference is calculated based on the image format. For example, if the format is 4:2:0 and the current transform block is a transform block for chroma, xTbY, yTbY, nTbW, and nTbH can each be represented as a value that is twice the corresponding value of the current transform block.
[0388] That is, the decoding apparatus may perform LFNST by changing the intra prediction mode for the chroma block to the intra prediction mode of the luma block to reflect the correlation between the chroma block and the luma block, rather than performing LFNST in a specific mode such as the planar mode.
[0389] The decoding apparatus may determine an LFNST set including an LFNST matrix based on the intra prediction mode of the luma block ( S1740 ), and may select any one of a plurality of LFNST matrices based on the LFNST set and the LFNST index ( S1750 ).
[0390] As shown in Table 13, the LFNST transform set is derived according to the intra prediction mode, and 81 to 83 indicating the CCLM mode are omitted in the intra prediction mode. This is because in the CCLM mode, the LFNST transform set is derived using the intra mode value for the corresponding luma block.
[0391] According to an example, as shown in Table 13, any one of four LFNST sets may be determined according to the intra prediction mode of the current block, and in this case, the LFNST set to be applied to the current chroma block may also be determined.
[0392] Then, modified transform coefficients for the current chroma block are derived by applying the LFNST matrix to the inverse quantized transform coefficients to perform inverse RST, eg, inverse LFNST ( S1760 ).
[0393] As described above, a plurality of transform sets may be determined according to an intra prediction mode of a transform block to be transformed, and inverse LFNST may be performed based on a transform kernel matrix, i.e., any one of the LFNST matrices included in the transform set indicated by the LFNST index. A matrix applied to inverse LFNST may be named an inverse LFNST matrix or a LFNST matrix, and the name of this matrix does not matter as long as it has a transposed relationship with a matrix used for forward LFNST.
[0394] The inverse LFNST matrix can be a non-square matrix in which the number of columns is less than the number of rows.
[0395] Meanwhile, a predetermined number of modified transform coefficients may be derived based on the size of the current block. For example, when the height and width of the current block are 8 or more, as in Fig. 9 48 modified transform coefficients are derived as shown on the left. And when the width and height of the current block are not equal to or greater than 8, that is, when the width and height of the current block are greater than or equal to 4 and the width or height of the current block is less than 8, it can be as follows Fig. 9 The 16 modified transform coefficients are derived as shown on the right.
[0396] like Fig. 9 As shown, 48 modified transform coefficients may be arranged in the left top, right top, and left bottom 4x4 regions of the left top 8x8 region of the current block, and 16 modified transform coefficients may be arranged in the left top 4x4 region of the current block.
[0397] The 48 modified transform coefficients and the 16 modified transform coefficients may be arranged in the vertical or horizontal direction according to the intra prediction mode of the current block. For example, when the intra prediction mode is based on the diagonal direction ( Figure 4 Mode 34 in the horizontal direction ( Figure 4 Modes 2 to 34 in FIG. 1 ), the modified transform coefficients may be arranged in the horizontal direction, i.e., in the row-first direction, as Fig. 9 (a). When the intra prediction mode is based on the diagonal direction is the vertical direction ( Figure 4 35 to 66), the modified transform coefficients may be arranged in the vertical direction, i.e., in the column-first direction, as Fig. 9 as shown in (b).
[0398] In one embodiment, S1760 may include: decoding the transform index, determining whether it corresponds to a condition for applying inverse RST based on the transform index, i.e., the LFNST index, selecting a transform kernel matrix, and applying inverse LFNST to the transform coefficients based on the selected transform kernel matrix and / or a simplification factor when the condition for applying inverse LFNST is met. In this case, the size of the simplified inverse transform matrix may be determined based on the simplification factor.
[0399] Referring to S1760, it can be confirmed that the residual samples for the target block are derived based on the inverse LFNST of the transform coefficients for the target block. Regarding the size of the inverse transform matrix, the size of the general inverse transform matrix is NxN, while the size of the inverse LFNST matrix is reduced to NxR, so that it is possible to reduce the memory occupation by the R / N ratio when performing the inverse LFNST compared to performing the general transform. In addition, compared with the number of multiplication operations NxN when using the general inverse transform matrix, the number of multiplication operations can be reduced by the R / N ratio (to NxR) when using the inverse LFNST. In addition, since only R transform coefficients need to be decoded when the inverse LFNST is applied, the total number of transform coefficients for the target block can be reduced from N to R, thereby improving the decoding efficiency. That is, according to S1760, the (inverse) transform efficiency and decoding efficiency of the decoding device 300 can be improved by the inverse LFNST.
[0400] The decoding device 300 according to an embodiment may induce residual samples for the target block based on the primary inverse transform of the modified transform coefficient ( S1770 ).
[0401] On the other hand, when LFNST is not applied, a primary inverse transform process based only on MTS may be applied in the inverse transform process as follows. That is, the decoding device may determine whether to apply LFNST to the current block as in the above-mentioned embodiment, and when LFNST is not applied, the decoding device may derive residual samples from the transform coefficients through the primary inverse transform.
[0402] The decoding apparatus may determine that the LFNST is not applied when there are significant coefficients in the second region other than the first left top region of the current block, and may induce residual samples from the transform coefficients through a primary inverse transform.
[0403] The primary inverse transform process may be referred to as a primary inverse transform process or an inverse MTS transform process. In some cases, such an MTS-based primary inverse transform process may also be omitted.
[0404] Additionally, a simplified inverse transform may be applied to the inverse primary transform, or a conventional separable transform may be used.
[0405] The decoding apparatus 300 according to an embodiment may generate a reconstructed sample based on a residual sample of a current block and a prediction sample of the current block. The current block may be a current luminance block or a current chrominance block.
[0406] Meanwhile, the decoding apparatus may receive a bitstream including residual information, and may derive residual information of a current block, ie, a transform block to be transformed, from the bitstream, for example, a quantized transform coefficient.
[0407] The decoding device 300 may perform dequantization on the quantized transform coefficient of the current block to induce a transform coefficient.
[0408] The derived transform coefficients may be arranged two-dimensionally in the current block, and the decoding device may derive non-zero data, i.e., information about the non-zero significant coefficients in the current block, by residual coding. That is, the decoding device may determine the last position information of the non-zero significant coefficients in the current block.
[0409] The transform coefficient derived based on the residual information may be a dequantized transform coefficient as described above, or may be a quantized transform coefficient. That is, the transform coefficient may be data capable of checking whether there is non-zero data in the current block regardless of quantization.
[0410] The decoding apparatus may derive the first variable indicating whether or not a significant coefficient exists in a region other than a DC region (a position of a DC component) of at least one transform block among transform blocks constituting the coding block.
[0411] The first variable may be a variable LfnstDcOnly that may be derived during residual coding. When the index of the subblock including the last significant coefficient in the current block is 0 and the position of the last significant coefficient in the subblock is greater than 0, the first variable may be derived as 0, and if the first variable is 0, the LFNST index may be parsed.
[0412] The first variable may be initially set to 1, and may be maintained as 1 or may be changed to 0 depending on whether a significant coefficient exists in a region other than a DC region.
[0413] According to an example, variables log2SbW and variable log2SbH indicating the height and width of a subblock may be derived based on the size of the transform block, and numSbCoeff [numSbCoeff = 1 << ( log2SbW + log2SbH )] representing the number of coefficients that may exist in the subblock may be set based on the variables log2SbW and variable log2SbH.
[0414] The variable lastScanPos indicating the position of the last significant coefficient within the sub-block is initially set to numSbCoeff, and the variable lastSubBlock indicating the sub-block in which the last non-zero coefficient exists is initially “( 1 << ( log2TbWidth + log2TbHeight − ( log2SbW + log2SbH ) ) ) – set to 1”.
[0415] When scanning in the diagonal direction in the subblock corresponding to lastSubBlock [lastScanPos− −], it is checked whether there is a last significant coefficient other than 0 at the corresponding position.
[0416] When no significant coefficient is found before the variable lastScanPos becomes 0 within the sub-block pointed to by lastSubBlock, the variable lastScanPos is set to numSbCoeff again, and the variable lastSubBlock is also changed to the next sub-block in the scan direction [lastSubBlock--].
[0417] That is, as the variable lastScanPos and the variable lastSubBlock are updated according to the scan direction, the position where the non-zero coefficient exists is identified.
[0418] The variable LfnstDcOnly indicates whether there is a non-zero coefficient at a position other than the DC component for at least one transform block in one coding unit, and becomes 0 when there is a non-zero coefficient at a position other than the DC component for at least one transform block in one coding unit, and becomes 1 when there is no non-zero coefficient at a position other than the DC component for all transform blocks in one coding unit.
[0419] As shown in Table 8, when the index of the sub-block in which the last non-zero coefficient exists is 0 [lastSubBlock == 0], and the position of the last non-zero coefficient in the sub-block is greater than 0 [lastScanPos > 0], the variable LfnstDcOnly can be derived to 0. The variable LfnstDcOnly can be derived to 0 only when the width and height of the transform block are 4 or more [log2TbWidth >= 2 &&log2TbHeight >= 2] and the transform skip is not applied [!transform_skip_flag[ x0 ][ y0 ]].
[0420] According to an example, the decoding apparatus may derive a second variable indicating whether a significant coefficient exists in a second region other than the first region at the left top of the current block.
[0421] The second variable may be a variable LfnstZeroOutSigCoeffFlag which may indicate that zero-out is performed when LFNST is applied. The second variable is initially set to 1, and when there is a significant coefficient in the second region, the second variable may be changed to 0.
[0422] The variable LfnstZeroOutSigCoeffFlag can be derived to be 0 when the index of the sub-block in which the last non-zero coefficient exists is greater than 0 and the width and height of the transform block are both greater than 4 [( lastSubBlock > 0 && log2TbWidth >= 2 && log2TbHeight >= 2 )], or when the last position of the last non-zero coefficient within the sub-block in which the last non-zero coefficient exists is greater than 7 and the size of the transform block is 4x4 or 8x8 [( lastScanPos > 7 && ( log2TbWidth == 2 | | log2TbHeight == 3 ) &&log2TbWidth == log2TbHeight )].
[0423] That is, in a transform block, when a non-zero coefficient is derived from an area other than the top left area where a LFNST transform coefficient can exist, or for 4x4 blocks and 8x8 blocks, when a non-zero coefficient exists other than the eighth position in the scanning order, the variable LfnstZeroOutSigCoeffFlag is set to 0.
[0424] The first region may be derived based on the size of the current block.
[0425] For example, when the size of the current block is 4x4 or 8x8, the first area may be from the top left of the current block to the eighth sample position in the scanning direction.
[0426] When the size of the current block is 4x4 or 8x8, since 8 data are output through the forward LFNST, the 8 transform coefficients received by the decoding apparatus can be as in Fig.14 (a) and Fig.15 As in (a), they are arranged from the top left of the current block to the eighth sample position in the scanning direction.
[0427] In addition, when the size of the current block is not 4x4 or 8x8, the first area may be a 4x4 area at the left top of the current block. If the size of the current block is not 4x4 or 8x8, since 16 data are output through the forward LFNST, the 16 transform coefficients received by the decoding apparatus may be as follows Fig.14 (b) to (d) and Fig.15 As shown in (b), they are arranged in the top left 4x4 area of the current block.
[0428] At the same time, you can Fig.10 The transform coefficients shown may be arranged in the first region along a diagonal scan direction.
[0429] In addition, according to an example, the maximum number of transform coefficients that may exist in a block to which LFNST is applied may be 16.
[0430] When the first variable indicates that a significant coefficient exists in a region other than a DC region, and the second variable indicates that a significant coefficient does not exist in the second region, the decoding apparatus can parse the LFNST index from the bitstream.
[0431] That is, the LFNST index can be parsed when the first variable set to 1 becomes 0 and the second variable is maintained at 1. In other words, except for the DC region, there are significant coefficients in the sub-block including the DC region, that is, the left top 4×4 block, and when there are no significant coefficients by checking the significant coefficients until the second region of the current block, the LFNST index for LFNST can be parsed.
[0432] In summary, at the coding unit level, the first variable LfnstDcOnly and the second variable LfnstZeroOutSigCoeffFlag are set to 1 respectively, and then re-derived at the residual coding level by the process shown in Table 8. Only when LfnstDcOnly derived from the residual coding level is 0 and the variable LfnstZeroOutSigCoeffFlag is 1 [if (LfnstDcOnly == 0 &&LfnstZeroOutSigCoeffFlag == 1)], lfnst_idx can be signaled at the coding unit level.
[0433] As described above, when the forward LFNST is performed by the encoding apparatus, clearing of the remaining area of the current block except for the area where the LFNST transform coefficient may exist may be performed to zero.
[0434] Therefore, when there are significant coefficients in the second region, it is determined that LFNST is not applied, so the LFNST index is not signaled and the decoding apparatus does not parse the LFNST index.
[0435] When the LFNST index is parsed, the decoding apparatus may apply the LFNST matrix to the transform coefficient of the first region to derive a modified transform coefficient.
[0436] The inverse transformer 332 of the decoding device 300 may determine a transform set based on a mapping relationship according to an intra prediction mode applied to a current block, and may perform inverse LFNST, ie, inverse inseparable transform based on the transform set and a value of a syntax element for an LFNST index.
[0437] The following figures are provided to describe specific examples of the present disclosure. Since the specific names of the devices illustrated in the figures or the names of the specific signals / messages / fields are provided for illustration purposes, the technical features of the present disclosure are not limited to the specific names used in the following figures.
[0438] Fig.18 is a flowchart illustrating the operation of a video encoding apparatus according to an embodiment of the present disclosure.
[0439] Fig.18 Each of the operations shown can be performed by Figure 2 The illustrated encoding device 200 performs. Specifically, S1810 and S1820 can be performed by Figure 2 The illustrated predictor 220 performs S1830, which can be performed by Figure 2 The subtractor 231 shown in the figure is executed, and S1840 to S1850 can be performed by Figure 2 The illustrated converter 232 is executed, and S1870 can be performed by Figure 2The illustrated quantizer 233 and entropy encoder 240 perform. The operations according to S1810 to S1870 are based on Figures 4 to 16 Therefore, some of the contents described in the above reference will be omitted or briefly described. Figure 2 and Figures 4 to 16 Description of those specific details of the overlap.
[0440] The encoding apparatus 200 according to an embodiment may derive an intra prediction mode for a chroma block as a CCLM mode ( S1810 ).
[0441] For example, the encoding device may determine the intra prediction mode of the current chroma block based on the rate distortion cost (or RDO). Here, the RD cost may be derived based on the sum of absolute differences (SAD). The encoding device may determine the CCLM mode as the intra prediction mode of the current chroma block based on the RD cost.
[0442] The CCLM mode may include a top-left based CCLM mode, a top-based CCLM mode, or a top-left and top-based CCLM mode, and these three CCLM modes may be derived as intra prediction modes 81 to 83 of Table 8.6 of Table 9.
[0443] In addition, the encoding device may encode information about the intra prediction mode of the current chroma block, and may signal the information about the intra prediction mode through a bitstream. The prediction-related information of the current chroma block may include information about the intra prediction mode.
[0444] The encoding apparatus may derive a prediction sample for the chroma block based on the CCLM mode ( S1820 ).
[0445] The encoding apparatus 200 according to an embodiment may induce residual samples for a chroma block based on the prediction samples ( S1830 ).
[0446] The encoding apparatus 200 according to an embodiment may induce transform coefficients for a chroma block based on a primary transform for residual samples.
[0447] The primary transform may be performed by a plurality of transform cores, and in this case, the transform core may be selected based on the intra prediction mode.
[0448] The encoding apparatus may change the CCLM mode of the chroma block to the intra prediction mode of the luma block corresponding to the chroma block to perform LFNST of the chroma block ( S1840 ).
[0449] As shown in Table 12 [– When predModeIntra is greater than or equal to 81, the chroma intra prediction mode derivation process as specified in clause 8.4.4 is called with the luma position (xTbY, yTbY), nTbW, nTbH as input, and predModeIntra is set equal to IntraPredModeY[ xTbY + nTbW / 2 ][ yTbY + nTbH / 2 ]. ], the encoding device may change the CCLM mode for the chroma block to the intra prediction mode (IntraPredModeY) of the luma block corresponding to the chroma block.
[0450] That is, the encoding apparatus may perform LFNST by changing the intra prediction mode of the chroma block to the intra prediction mode of the luminance block to reflect the correlation between the chroma block and the luminance block instead of a specific mode such as the planar mode.
[0451] The encoding apparatus determines an LFNST set including an LFNST matrix based on the intra prediction mode of the luma block ( S1850 ), and may derive a modified transform coefficient for the chroma block based on the residual sample, the LFNST set, and the LFNST matrix ( S1860 ).
[0452] The encoding device 200 may determine a transform set based on a mapping relationship according to an intra prediction mode applied to a current block, and may perform LFNST, that is, an inseparable transform based on one of two LFNST matrices included in the transform set.
[0453] As described above, a plurality of transform sets may be determined according to the intra prediction mode of the transform block to be transformed. A matrix applied to LFNST has a transposed relationship with a matrix used for inverse LFNST.
[0454] In one example, the LFNST matrix may be a non-square matrix in which the number of rows is less than the number of columns.
[0455] Referring to S1860, it can be confirmed that the transform coefficient for the target block is derived based on the LFNST for the residual sample. Regarding the size of the transform kernel matrix, the size of the general transform kernel matrix is NxN, and the size of the simplified transform matrix is reduced to RxN, thereby making it possible to reduce the memory occupancy by the R / N ratio when performing RST compared to when performing the general transform. In addition, compared to the number of multiplication operations NxN when the general transform kernel matrix is used, the number of multiplication operations can be reduced by the R / N ratio (to RxN) when the simplified transform kernel matrix is used. In addition, since only R transform coefficients are derived when RST is applied, the total number of transform coefficients for the target block can be reduced from N to R compared to when a general inverse transform that derives N transform coefficients is applied, thereby reducing the amount of data sent by the encoding device 200 to the decoding device 300. That is, according to S1860, the transform efficiency and coding efficiency of the encoding device 200 can be improved by LFNST.
[0456] The encoding device 200 according to an embodiment derives a quantized transform coefficient by performing quantization based on the modified transform coefficient for the current chroma block, encodes image information including information about the quantized transform coefficient, intra prediction mode information, and an LFNST index indicating an LFNST matrix, and then outputs the image information (S1870).
[0457] That is, the encoding device may generate residual information including information about the quantized transform coefficients. The residual information may include the above-mentioned transform-related information / syntax elements. The encoding device may encode the image / video information including the residual information and output the encoded image / video information in the form of a bitstream.
[0458] More specifically, the encoding device 200 may generate information about the quantized transform coefficient and encode the information about the generated quantized transform coefficient.
[0459] In one example, the information about the quantized transform coefficient may include at least one of: information about whether LFNST is applied, information about a simplification factor, information about a minimum transform size to which LFNST is applied, and information about a maximum transform size to which LFNST is applied.
[0460] The encoding apparatus may encode flag information sps_cclm_enabled_flag indicating whether CCLM is applied to the current block as intra mode information about an intra prediction mode for a chroma component and intra_chroma_pred_mode information.
[0461] Intra_chroma_pred_mode, which is information about the CCLM mode, may be encoded using intra prediction modes 81 to 83 of Table 8.6 of Table 9 to indicate a top-left based CCLM mode, a top-based CCLM mode, or a top-left and top-based CCLM mode.
[0462] Meanwhile, the encoding apparatus 200 may determine whether to perform a secondary transform or an inseparable transform, specifically, LFNST, on a transform coefficient for a current block. The current block may be a current luminance block or a current chrominance block.
[0463] When it is determined that LFNST is to be performed, the encoding device 200 may derive a modified transform coefficient for the current block based on the transform coefficient of the first region at the left top of the current block and a predetermined LFNST matrix.
[0464] The first region can be derived based on the size of the current block. For example, when the height and width of the current block are greater than or equal to 8, the first region is as in Fig. 9 The 4x4 regions at the left top, right top, and left bottom of the 8x8 region at the left top of the current block shown on the left. When the height and width of the current block are not equal to or greater than 8, the first region can be as shown in Fig. 9 The 4x4 region at the top left of the current block is shown on the right.
[0465] Transform coefficients of the first region may be read in a vertical or horizontal direction according to an intra prediction mode of the current block and one-dimensionally arranged for a multiplication operation with the LFNST matrix.
[0466] The 48 modified transform coefficients or the 16 modified transform coefficients of the first region may be read in the vertical or horizontal direction and arranged in one dimension according to the intra prediction mode of the current block. For example, if the intra prediction mode is based on the diagonal direction ( Fig. 9 Mode 34 in the horizontal direction ( Fig. 9 2 to 34 in the example above), the transform coefficients can be arranged in the horizontal direction, i.e., in the row-first direction, as Fig. 9 (a). When the intra prediction mode is based on the diagonal direction is the vertical direction ( Fig. 9 35 to 66), the transform coefficients may be arranged in the vertical direction, i.e., in the column-first direction, as Fig. 9 as shown in (b).
[0467] In one example, the LFNST may be performed based on a simplified transformation matrix or a transformation kernel matrix, and the simplified transformation matrix may be a non-square matrix in which the number of rows is less than the number of columns.
[0468] In one embodiment, S1860 may include determining whether a condition for applying LFNST is satisfied, generating and encoding an LFNST index based on the determination, selecting a transform kernel matrix, and applying LFNST to the residual sample based on the selected transform kernel matrix and / or a simplification factor when the condition for applying LFNST is satisfied. In this case, the size of the simplified transform matrix may be determined based on the simplification factor.
[0469] Meanwhile, according to an example, the encoding apparatus may clear the second region of the current block in which the modified transform coefficient does not exist.
[0470] like Fig.14 and Fig.15 Similarly, all remaining areas of the current block in which no modified transform coefficients exist can be regarded as zero. Due to the clearing, the amount of calculation required to perform the entire transform process is reduced, and the amount of calculation required for the entire transform process is reduced, thereby reducing the power consumption required to perform the transform. In addition, the image coding efficiency can be improved by reducing the delay involved in the transform process.
[0471] On the other hand, when LFNST is not applied, the primary transform process based only on MTS may be applied in the transform process as described above. That is, the encoding device may determine whether to apply LFNST to the current block as in the above embodiment, and when LFNST is not applied, the encoding device may derive the transform coefficient from the residual sample through the primary transform.
[0472] This primary transformation process may be referred to as a primary transformation process or an MTS transformation process. In some cases, such an MTS-based primary transformation process may also be omitted.
[0473] The encoding apparatus according to an example may configure the image information such that when there are significant coefficients in the region excluding the DC region of the current block and the above-mentioned clearing is performed, the LFNST index indicating the LFNST matrix is signaled.
[0474] The encoding device may configure the image information so that the image information shown in Table 6 and Table 8 may be parsed by the decoding device.
[0475] According to an example, when the index of a subblock including the last significant coefficient in the current block is 0 and the position of the last significant coefficient in the subblock is greater than 0, it is determined that there are significant coefficients in an area other than the DC area, and image information can be configured such that the LFNST index is notified with a signal.
[0476] In addition, according to an example, when the index of the subblock including the last significant coefficient in the current block is greater than 0 and the width and height of the current block are 4 or more, it is determined that LFNST is not applied, and the image information may be configured such that the LFNST index is not signaled.
[0477] In addition, according to an example, when the size of the current block is 4x4 or 8x8 and the position of the last significant coefficient is equal to or greater than 8, the encoding apparatus may determine that LFNST is not applied and configure the image information so that the LFNST index is not signaled.
[0478] That is, the encoding device can configure the image information so that the LFNST index can be signaled according to the derived variable values after the variable LfnstDcOnly and the variable LfnstZeroOutSigCoeffFlag are derived in the decoding device.
[0479] In addition, the encoding device 200 may encode information about the size of the maximum transform application block at the sequence parameter set level, for example, syntax information about the transform block size such as sps_log2_max_luma_transform_size_minus5, or flag information such as sps_max_luma_transform_size_64_flag.
[0480] In the present disclosure, at least one of quantization / dequantization and / or transform / inverse transform may be omitted. When quantization / dequantization is omitted, the quantized transform coefficient may be referred to as a transform coefficient. When transform / inverse transform is omitted, the transform coefficient may be referred to as a coefficient or a residual coefficient, or may still be referred to as a transform coefficient for consistency of expression.
[0481] In addition, in the present disclosure, the quantized transform coefficient and the transform coefficient may be referred to as a transform coefficient and a scaled transform coefficient, respectively. In this case, the residual information may include information about the transform coefficient, and the information about the transform coefficient may be signaled by the residual coding syntax. The transform coefficient may be derived based on the residual information (or information about the transform coefficient), and the scaled transform coefficient may be derived by an inverse transform (scaling) of the transform coefficient. The residual sample may be derived based on an inverse transform (transform) of the scaled transform coefficient. These details may also be applied / expressed in other parts of the present disclosure.
[0482] In the above-mentioned embodiments, the method is explained based on the flowchart with the aid of a series of steps or boxes, but the present disclosure is not limited to the order of the steps, and a certain step may be performed in an order or step different from the above order or step, or a certain step may be performed concurrently with other steps. In addition, it can be understood by those of ordinary skill in the art that the steps shown in the flowchart are not exclusive, and another step may be incorporated or one or more steps in the flowchart may be deleted without affecting the scope of the present disclosure.
[0483] The above method according to the present disclosure may be implemented in a software form, and the encoding device and / or decoding device according to the present disclosure may be included in a device for image processing such as a television, a computer, a smart phone, a set-top box, a display device, and the like.
[0484] When the embodiments in the present disclosure are implemented by software, the above methods can be implemented as modules (steps, functions, etc.) for performing the above functions. These modules can be stored in a memory and can be executed by a processor. The memory can be inside or outside the processor and can be connected to the processor in various well-known ways. The processor may include an application-specific integrated circuit (ASIC), other chipsets, logic circuits, and / or data processing devices. The memory may include a read-only memory (ROM), a random access memory (RAM), flash memory, a memory card, a storage medium, and / or other storage devices. In other words, the embodiments described in the present disclosure can be implemented and executed on a processor, a microprocessor, a controller, or a chip. For example, the functional units shown in each of the accompanying drawings can be implemented and executed on a computer, a processor, a microprocessor, a controller, or a chip.
[0485] In addition, the decoding device and the encoding device to which the present disclosure is applied may be included in a multimedia broadcast transceiver, a mobile communication terminal, a home theater video device, a digital theater video device, a surveillance camera, a video chat device, a real-time communication device (such as video communication), a mobile streaming device, a storage medium, a camera, a video on demand (VoD) service provider, an over-the-top (OTT) video device, an Internet streaming service provider, a three-dimensional (3D) video device, a video phone video device, and a medical video device, and may be used to process a video signal or a data signal. For example, an over-the-top (OTT) video device may include a game console, a Blu-ray player, an Internet access TV, a home theater system, a smart phone, a tablet PC, a digital video recorder (DVR), etc.
[0486] In addition, the processing method of the present disclosure can be produced in the form of a program executed by a computer and can be stored in a computer-readable recording medium. Multimedia data having a data structure according to the present disclosure can also be stored in a computer-readable recording medium. Computer-readable recording media include various storage devices and distributed storage devices that store computer-readable data. Computer-readable recording media may include, for example, a Blu-ray disc (BD), a universal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. In addition, the computer-readable recording medium includes a medium implemented in the form of a carrier (e.g., transmission on the Internet). In addition, the bit stream generated by the encoding method can be stored in a computer-readable recording medium or transmitted through a wired or wireless communication network. In addition, the embodiments of the present disclosure can be implemented as a computer program product through a program code, and the program code can be executed on a computer according to the embodiments of the present disclosure. The program code can be stored on a computer-readable carrier.
[0487] Fig.19 The structure of the content streaming system to which the present disclosure is applied is illustrated.
[0488] Furthermore, a content streaming system to which the present disclosure is applied may generally include an encoding server, a streaming server, a web server, a media storage device, a user device, and a multimedia input device.
[0489] The encoding server is used to compress the content input from a multimedia input device such as a smart phone, a camera, a camcorder, etc. into digital data to generate a bitstream, and send it to a streaming server. As another example, in the case where a multimedia input device such as a smart phone, a camera, a camcorder, etc. directly generates a bitstream, the encoding server can be omitted. The bitstream can be generated by applying the encoding method or the bitstream generation method disclosed in the present invention. And the streaming server can temporarily store the bitstream during the process of sending or receiving the bitstream.
[0490] The streaming server sends multimedia data to the user device through the web server based on the user's request, and the web server serves as a tool to inform the user of what services exist. When the user requests the service the user wants, the web server transmits the request to the streaming server, and the streaming server sends the multimedia data to the user. In this regard, the content streaming system may include a separate control server, and in this case, the control server is used to control the command / response between the corresponding devices in the content streaming system.
[0491] The streaming server can receive content from a media storage device and / or an encoding server. For example, in the case of receiving content from an encoding server, the content can be received in real time. In this case, in order to smoothly provide a streaming service, the streaming server can store the bit stream for a predetermined time.
[0492] For example, user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigators, tablet PCs, tablet PCs, ultrabooks, wearable devices (e.g., watch-type terminals (smart watches), glasses-type terminals (smart glasses), head-mounted displays (HMDs)), digital TVs, desktop computers, digital signage, etc. Each server in the content streaming system may operate as a distributed server, and in this case, data received by each server may be processed in a distributed manner.
[0493] The claims disclosed herein may be combined in various ways. For example, the technical features of the method claims of the present disclosure may be combined to be implemented or performed in a device, and the technical features of the device claims may be combined to be implemented or performed in a method. In addition, the technical features of the method claims and the device claims may be combined to be implemented or performed in a device, and the technical features of the method claims and the device claims may be combined to be implemented or performed in a method.
Claims
1. A method for decoding an image performed by a decoding device, the method comprising: Obtaining intra prediction mode information and residual information from a bitstream; deriving transform coefficients for a current block based on the residual information; deriving a first variable indicating whether there is a significant coefficient in a region excluding a DC component position of the current block, wherein a value of the first variable is initially set to 1, and in response to the presence of the significant coefficient in the region excluding the DC component position, the value of the first variable is modified to 0; deriving a second variable indicating whether the significant coefficient exists in a second region other than a first region at a left top of the current block; determining whether to obtain a low frequency non-separable transform (LFNST) index from the bitstream based on the first variable and the second variable, wherein, in response to a value of the first variable being equal to 0 and the second variable indicating that the significant coefficient does not exist in the second region, determining to obtain the LFNST index from the bitstream, and wherein, in response to a value of the first variable being equal to 1 or the second variable indicating that the significant coefficient exists in the second region, determining not to obtain the LFNST index from the bitstream; obtaining the LFNST index from the bitstream based on a result of the determining; Derived, based on the intra prediction mode information, an intra prediction mode of the chroma block of the current block as a cross-component linear model (CCLM) mode; Modify the intra-frame prediction mode of the chrominance block from the CCLM mode to the intra-frame prediction mode of the luminance block corresponding to the chrominance block; determining a LFNST set including a LFNST matrix based on the modified intra prediction mode of the chroma block; selecting one of the LFNST matrices based on the LFNST set and the LFNST index; deriving transform coefficients for the chroma block based on the selected LFNST matrix; and deriving residual samples for the chroma block based on the transform coefficients for the chroma block, wherein the intra prediction mode of the chrominance block is modified by using a specific position of the luminance block corresponding to the chrominance block, and The specific position is defined as the center position of the brightness block.
2. The image decoding method according to claim 1, wherein: The LFNST index is received for each of the luma block and the chroma block based on that the partition tree structure for the current block is a dual tree type.
3. The image decoding method according to claim 1, wherein: The transform coefficients are derived by applying a LFNST matrix derived based on the LFNST index to the transform coefficients in the first region.
4. The image decoding method according to claim 1, wherein: The DC component position is the position of the coefficient having a position of 0 in the sub-block whose index is equal to 0.
5. The image decoding method according to claim 1, wherein: The second variable is derived to be 0 based on the fact that the index of the subblock including the last significant coefficient in the current block is greater than 0 and the width and height of the current block are 4 or more, wherein, based on the size of the current block being 4x4 or 8x8 and the position of the last significant coefficient being 8 or greater, the second variable is derived to be 0, and Wherein, based on the second variable being 0, the LFNST index is not parsed.
6. The image decoding method according to claim 5, wherein: The second variable is initially set to 1, and Wherein, based on the existence of the effective coefficient in the second region, the second variable is changed to 0.
7. An image encoding method performed by an image encoding device, the method comprising: deriving an intra prediction mode for a chroma block of a current block as a cross-component linear model (CCLM) mode; deriving prediction samples for the chroma block based on the CCLM mode; deriving residual samples for the chroma block based on the prediction samples; Modify the intra-frame prediction mode of the chrominance block from the CCLM mode to the intra-frame prediction mode of the luminance block corresponding to the chrominance block; determining a low frequency non-separable transform (LFNST) set including a LFNST matrix based on the modified intra prediction mode of the chroma block; deriving transform coefficients based on a primary transform for the residual samples; deriving modified transform coefficients based on the transform coefficients of the first region at the top left of the current block; as well as constructing image information such that an LFNST index specifying the LFNST matrix is signaled, wherein whether to signal the LFNST index is determined based on significant coefficients present in a region excluding a DC component position of the current block, wherein, in response to a situation where the significant coefficient exists in the region excluding the DC component position and the significant coefficient does not exist in a second region of the current block in which the modified transform coefficient does not exist, determining to signal the LFNST index, wherein, in response to a case where the significant coefficient does not exist in the region excluding the DC component position or the significant coefficient exists in the second region, it is determined not to signal the LFNST index, wherein the intra prediction mode of the chrominance block is modified by using a specific position of the luminance block corresponding to the chrominance block, and The specific position is defined as the center position of the brightness block.
8. The image encoding method according to claim 7, wherein: The LFNST index is encoded for each of the luma block and the chroma block based on that the partition tree structure for the current block is a dual tree type. 9 . The image encoding method according to claim 7 , wherein the DC component position is a position of a coefficient having a position of 0 in a subblock whose index is equal to 0.
10. The image encoding method according to claim 7, wherein: determining that the significant coefficient exists in the second region based on that an index of a subblock including a last significant coefficient in the current block is greater than 0 and a width and a height of the current block are 4 or more, and wherein, based on the size of the current block being 4x4 or 8x8 and the position of the last significant coefficient being 8 or greater, determining that the significant coefficient exists in the second region, and The image information is configured such that the LFNST index is not signaled.
11. The image encoding method according to claim 7, wherein the first area is derived based on the size of the current block, in, Based on the height and width of the current block being greater than or equal to 8, the first region is a left top, right top, and left bottom 4x4 region within a left top 8x8 region of the current block, and Wherein, based on the fact that the width and height of the current block are 4 or greater and the width or height of the current block is less than 8, the first area is a left top 4x4 area of the current block.
12. A method for transmitting data for image information, comprising: generating a bitstream for the image information, wherein the bitstream is generated based on: deriving an intra prediction mode for a chroma block of a current block as a cross-component linear model (CCLM) mode, deriving prediction samples for the chroma block based on the CCLM mode, deriving residual samples for the chroma block based on the prediction samples, modifying the intra prediction mode of the chroma block from the CCLM mode to an intra prediction mode of a luminance block corresponding to the chroma block, determining a low-frequency non-separable transform (LFNST) set including a LFNST matrix based on the modified intra prediction mode of the chroma block, deriving transform coefficients based on a primary transform for the residual samples, deriving modified transform coefficients based on the transform coefficients of a first region at a left top of the current block, and constructing the image information such that an LFNST index specifying the LFNST matrix is signaled; and sending said data comprising said bit stream, wherein whether to signal the LFNST index is determined based on significant coefficients present in a region excluding a DC component position of the current block, wherein, in response to a situation where the significant coefficient exists in the region excluding the DC component position and the significant coefficient does not exist in a second region of the current block in which the modified transform coefficient does not exist, determining to signal the LFNST index, wherein, in response to a case where the significant coefficient does not exist in the region excluding the DC component position or the significant coefficient exists in the second region, it is determined not to signal the LFNST index, wherein the intra prediction mode of the chrominance block is modified by using a specific position of the luminance block corresponding to the chrominance block, and The specific position is defined as the center position of the brightness block.