Transformation-based image compiling method and device
Through the secondary transformation method of LFNST index and double-tree chroma block, image compilation efficiency is improved, high-cost transmission and storage problems of high-resolution images and videos are solved, and more efficient image and video compression is achieved.
Patent Information
- Application Number
- CN202411842295.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-11-01
- Filing Date
- 2020-11-02
- Publication Date
- 2025-04-15
AI Technical Summary
With the increasing demand for high resolution and high-quality images and videos, existing transmission and storage costs have increased, and existing image and video compression technologies are difficult to effectively compress and transmit or store image and video data with different characteristics.
The secondary transformation method of LFNST index and double-tree chroma block is adopted to generate reconstructed images by modifying the transformation coefficient and inverse primary transformation, improving image compilation efficiency, and efficient compiling of LFNST index through encoding and decoding devices.
Improves overall image/video compression efficiency, increases secondary transformation efficiency for LFNST index and dual-tree chromaticity blocks, and reduces transmission and storage costs.
Smart Images

Figure CN119835444A_ABST
Abstract
Description
[0001] This application is a divisional application of a patent application with application number 202080081429.1 (PCT / KR2020 / 015135), which was submitted to the China Patent Office on May 24, 2022, with an international application date of November 2, 2020, and the invention name is “Transformation-based image coding method and device thereof”. Technical Field
[0002] The present disclosure generally relates to image coding technology, and more particularly, to a transformation-based image coding method and device in an image coding system. Background Art
[0003] Recently, there is an increasing demand for high-resolution and high-quality images and videos such as ultra-high-definition (HUD) images and 4K or 8K or larger videos in various fields. As image and video data become high-resolution and high-quality, the amount of information or the number of bits transmitted relative to existing image and video data increases. Therefore, if a medium such as an existing wired or wireless broadband line is used to transmit image data or an existing storage medium is used to store image and video data, the transmission cost and storage cost increase.
[0004] In addition, recently, interest and demand for immersive media such as virtual reality (VR), artificial reality (AR) content or holograms are increasing. Broadcasting of images and videos whose image characteristics are different from those of real images, such as game images, is increasing.
[0005] Therefore, in order to effectively compress and transmit or store and play back information of high-resolution and high-quality images and videos having such various characteristics, efficient image and video compression technology is required. Summary of the invention
[0006] Technical issues
[0007] The technical aspect of the present disclosure is to provide a method and a device for improving image coding efficiency.
[0008] Another technical aspect of the present disclosure is to provide a method and apparatus for increasing efficiency of coding a LFNST index.
[0009] Yet another technical aspect of the present disclosure is to provide a method and apparatus for increasing the efficiency of secondary transformation of a dual-tree chroma block by coding a LFNST index.
[0010] Technical Solution
[0011] According to an embodiment of the present disclosure, a method for decoding an image performed by a decoding device is provided. The method may include: deriving a modified transform coefficient by applying LFNST to the transform coefficient; deriving a residual sample of a target block based on an inverse primary transform of the modified transform coefficient; and generating a reconstructed picture based on the residual sample, wherein the deriving of the modified transform coefficient may include: resolving an LFNST index based on a tree type of the current block as a dual-tree chroma; and deriving the modified transform coefficient based on the LFNST index and the LFNST matrix.
[0012] When the tree type of the current block is dual-tree chroma, the LFNST index can be parsed regardless of whether the MIP mode is applied to the current block.
[0013] When the tree type of the current block is dual-tree chroma, the LFNST index may be parsed regardless of whether the LFNST application width and the LFNST application height corresponding to the current block are 16 or greater.
[0014] When the tree type of the current block is not dual-tree chroma, the LFNST index may be parsed based on that the MIP mode is not applied to the current block.
[0015] When the tree type of the current block is not dual-tree chroma and the MIP mode is applied to the current block, the LFNST index may be parsed based on that the LFNST application width and the LFNST application height corresponding to the current block are 16 or more.
[0016] The LFNST application width may be set to the width of the current block divided by the number of sub-partitions when the current block is vertically split, and may be set to the width of the current block when the current block is not split, and the current block may be a coding block.
[0017] The LFNST application height may be set to the height of the current block divided by the number of sub-partitions when the current block is horizontally split, and may be set to the height of the current block when the current block is not split, and the current block may be a coding block.
[0018] According to an embodiment of the present disclosure, an image encoding method performed by an encoding device is provided. The method may include: deriving a modified transform coefficient from a transform coefficient by applying LFNST; and encoding quantized residual information and an LFNST index indicating an LFNST matrix applied to LFNST, wherein the LFNST index may be encoded based on that a tree type of a current block is dual-tree chroma.
[0019] 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.
[0020] According to yet another embodiment of the present disclosure, a digital storage medium storing image data including encoded image information and a bit stream may be provided to enable a decoding device to perform an image decoding method.
[0021] Beneficial Effects
[0022] According to the present disclosure, the overall image / video compression efficiency can be increased.
[0023] According to the present disclosure, the efficiency of compiling LFNST indexes can be increased.
[0024] According to the present disclosure, it is possible to increase the efficiency of secondary transformation of dual-tree chroma blocks by coding LFNST indexes.
[0025] 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 from the present disclosure by ordinary technicians in the relevant field. Therefore, the specific effects of the present disclosure are not limited to the effects explicitly described in the present disclosure, and may include various effects that can be understood or derived from the technical features of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 An example of a video / image coding system to which the present disclosure is applicable is schematically illustrated.
[0027] Figure 2 is a diagram schematically illustrating a configuration of a video / image encoding device to which the present disclosure is applicable.
[0028] Figure 3 is a diagram schematically illustrating a configuration of a video / image decoding device to which the present disclosure is applicable.
[0029] Figure 4 The structure of a content streaming system to which the present disclosure is applied is illustrated.
[0030] Figure 5 The multiple transformation technology according to an embodiment of the present disclosure is schematically illustrated.
[0031] Figure 6 The intra direction modes of 65 prediction directions are exemplarily shown.
[0032] Figure 7 is a diagram for explaining RST according to an embodiment of the present disclosure.
[0033] Figure 8 is a diagram illustrating an order of arranging output data of a forward primary transform into a one-dimensional vector according to an example.
[0034] Fig. 9is a diagram illustrating an order in which output data of a forward sub-transform is arranged into two-dimensional blocks according to an example.
[0035] Fig.10 is a diagram illustrating a wide-angle intra prediction mode according to an embodiment of this document.
[0036] Fig.11 is a diagram illustrating a block shape to which LFNST is applied.
[0037] Fig.12 is a diagram illustrating an arrangement of output data of a forward LFNST according to an example.
[0038] Fig.13 Illustrated is the clearing of zeros in a block to which 4×4 LFNST is applied according to an example.
[0039] Fig.14 Illustrated is the clearing of zeros in a block to which 8×8 LFNST is applied according to an example.
[0040] Fig.15 is a flowchart illustrating the operation of a video decoding device according to an embodiment of the present disclosure.
[0041] Fig.16 is a flowchart illustrating the operation of a video encoding apparatus according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0042] The document can be modified in various ways and can have various embodiments, and specific embodiments will be illustrated in the drawings and described in detail. However, this is not intended to limit the document to specific embodiments. The terms commonly used in this specification are used to describe specific embodiments rather than to limit the technical spirit of the document. Unless otherwise clearly indicated in the context, singular expressions include plural expressions. Terms such as "including" or "having" in this specification should be understood to indicate the presence of characteristics, numbers, steps, operations, elements, components, or combinations thereof described in this specification, without excluding the possibility of the presence or addition of one or more characteristics, numbers, steps, operations, elements, components, or combinations thereof.
[0043] In addition, in order to facilitate the description related to different feature functions, the elements in the drawings described in this document are illustrated independently. This does not mean that each element is implemented as separate hardware or separate software. For example, at least two elements can be combined to form a single element, or a single element can be divided into multiple elements. Embodiments in which elements are combined and / or separated are also included in the scope of the rights of this document, unless it deviates from the essence of this document.
[0044] Hereinafter, preferred embodiments of the present invention are described in more detail with reference to the accompanying drawings. Hereinafter, in the accompanying drawings, the same reference numerals are used for the same elements, and redundant descriptions of the same elements may be omitted.
[0045] 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 Recommendation 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 Recommendation H.265), EVC (essential video coding) standard, AVS2 standard, etc.).
[0046] In this document, various embodiments related to video / image coding may be provided, and, unless specified otherwise, the embodiments may be combined with each other and performed.
[0047] In this document, video may mean a collection of a series of images over time. Typically, a picture means 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 be composed of one or more slices / tiles. A picture may be composed of one or more tile groups. A tile group may include one or more tiles.
[0048] A pixel or a picture element (pel) may refer to the smallest unit constituting a picture (or image). In addition, a "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a value of a pixel, and may represent only a pixel / pixel value of a luminance component, or only a pixel / pixel value of a chrominance component.
[0049] 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 MxN block may include a set (or array) of samples (or sample arrays) or transform coefficients consisting of M columns and N rows.
[0050] 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".
[0051] 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".
[0052] 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".
[0053] In addition, 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". In addition, "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".
[0054] In addition, brackets used in the present disclosure may mean "for example". Specifically, when indicated as "prediction (intra-frame prediction)", this may mean that "intra-frame prediction" is proposed as an example of "prediction". That is, "prediction" in the present disclosure is not limited to "intra-frame prediction", and "intra-frame prediction" may be proposed as an example of "prediction". In addition, when indicated as "prediction (i.e., intra-frame prediction)", this may also mean that "intra-frame prediction" is proposed as an example of "prediction".
[0055] Technical features described individually in one drawing in the present disclosure may be implemented individually or may be implemented simultaneously.
[0056] Figure 1 An example of a video / image encoding system to which embodiments of this document may be applied is schematically illustrated.
[0057] refer to 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 coded video / image information or data to the receiving device in the form of a file or stream transmission via a digital storage medium or a network.
[0058] 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.
[0059] The video source can obtain the video / image by capturing, synthesizing or generating the process of the video / image. The video source may include a video / image capturing device and / or a video / image generating device. The video / image capturing device may include, for example, one or more cameras, a video / image archive including previously captured videos / images, etc. The video / image generating 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 capturing process may be replaced by the process of generating the relevant data.
[0060] The encoding device can encode the input video / image. The encoding device can perform a series of processes such as prediction, transformation and quantization for compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bit stream.
[0061] 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 transmission 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.
[0062] The decoding device can decode the video / image by performing a series of processes such as dequantization, inverse transformation, prediction, etc. corresponding to the operation of the encoding device.
[0063] The renderer can render the decoded video / image, and the rendered video / image can be displayed through a display.
[0064] Figure 2 is a diagram schematically describing the configuration of a video / image encoding device to which the present document can be applied. Hereinafter, the so-called video encoding device may include an image encoding device.
[0065] refer to 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 also include a subtractor 231. The adder 250 may be referred to as 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 also include the memory 270 as an internal / external component.
[0066] The image partitioner 210 partitions 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 unit (CTU) or a maximum coding unit (LCU), the coding unit may be recursively partitioned according to a quadtree binary tree ternary tree (QTBTTT) structure. For example, a coding unit may be divided into a plurality of coding units with a deeper depth based on a quadtree structure, a binary tree structure, and / or a ternary tree structure. In this case, for example, a quadtree structure may be applied first, and then a binary tree structure and / or a ternary tree structure may be applied. Alternatively, a binary tree structure may be applied first. The coding process according to the present document may be performed based on a final coding unit that is not further partitioned. In this case, based on coding efficiency according to image characteristics, the maximum coding unit may be directly used as a final coding unit. Alternatively, the coding unit may be recursively partitioned into coding units with a further deeper depth as needed, so that a coding unit of an optimal size may be used as a 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 also include a prediction unit (PU) or a transformation unit (TU). In this case, the prediction unit and the transformation unit may be divided or partitioned from the above-mentioned final coding unit. The prediction unit may be a unit for sample prediction, and the transformation unit may be a unit for deriving a transformation coefficient and / or a unit for deriving a residual signal based on the transformation coefficient.
[0067] Depending on the situation, the unit and terms such as block, region, etc. may be used interchangeably. In general, an MxN 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 value of a pixel, 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 pel of a picture (or image).
[0068] The subtractor 231 subtracts the prediction signal (prediction block, prediction sample or prediction sample array) output from the predictor 220 from the input image signal (original block, original sample or original sample array) to generate a residual signal (residual block, residual sample or 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 "current block"), and can generate a prediction block including the prediction sample 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.
[0069] 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.
[0070] The inter-frame predictor 221 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. 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 the skip mode, unlike the merge mode, the 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 prediction item, and the motion vector of the current block can be indicated by signaling the motion vector difference.
[0071] The predictor 220 may generate a prediction signal based on various prediction methods. For example, the predictor may apply intra prediction or inter prediction to predict a block, and may also apply intra prediction and inter prediction at the same time. This may be referred to as combined inter and intra prediction (CIIP). In addition, the predictor may be based on an intra block copy (IBC) prediction mode or a palette mode to perform prediction on a block. The IBC prediction mode or the palette mode may be used for content image / video encoding such as screen content coding (SCC) for games, etc. Although IBC basically performs prediction in the current block, the aspect of deriving a reference block in the current block can be performed similarly to inter prediction. That is, IBC may use at least one of the inter prediction techniques described in the present disclosure.
[0072] 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 a discrete cosine transform (DCT), a discrete sine transform (DST), a graph-based transform (GBT), or a conditional nonlinear transform (CNT), etc. Here, GBT means a transform obtained from a graph when the relationship information between pixels is represented by a 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 instead of square blocks.
[0073] 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 block-type quantized transform coefficients 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 necessary 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 adaptive 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 general constraint information. In the present disclosure, information and / or syntax elements sent from the encoding device / 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 sent through 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 sends a signal output from the entropy encoder 240 and / or a storage device (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.
[0074] 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 via the dequantizer 234 and the inverse transformer 235, a residual signal (residual block or residual sample) can be reconstructed. The adder 250 adds the reconstructed residual signal to the prediction signal output from the predictor 220 so that a reconstructed signal (reconstructed image, reconstructed block, reconstructed sample or reconstructed sample array) can be generated. When there is no residual in the processing target block as in the case of applying the skip mode, the prediction block can be used as a reconstructed block. The generated reconstructed signal can be used for intra-frame prediction of the next processing target block in the current block, and as described later, can be used for inter-frame prediction of the next picture through filtering.
[0075] Meanwhile, during picture encoding and / or reconstruction, luminance mapping and chrominance scaling (LMCS) may be applied.
[0076] 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, specifically in the DPB of the memory 270. Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filtering, bilateral filtering, 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 290. Information about filtering can be encoded in the entropy encoder 290 and output in the form of a bitstream.
[0077] The modified reconstructed picture that has been sent to the memory 270 may be used as a reference picture in the inter predictor 280. Through this, the encoding apparatus can avoid prediction mismatch in the encoding apparatus 200 and the decoding apparatus when applying inter prediction, and can also improve coding efficiency.
[0078] The memory 270DPB 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.
[0079] Figure 3 This is a diagram schematically describing the configuration of a video / image decoding device to which the present document can be applied.
[0080] refer to 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 a memory 360 as an internal / external component.
[0081] When a bit stream including video / image information is input, the decoding device 300 can be used in conjunction with the bit stream already in the 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 quadtree structure, a binary tree structure and / or a ternary tree structure using a coding tree unit or a maximum coding unit. 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.
[0082] The decoding device 300 can receive the Figure 2The signal output by the encoding device of the encoding device, and the received signal can be decoded by the entropy decoder 310. For example, the entropy decoder 310 can parse the bitstream to derive the 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 general constraint information. The decoding device may further decode the picture based on the information about the parameter set and / or the general constraint information. In the present disclosure, the information and / or syntax elements sent / received with the signal described later can be decoded by the decoding process and obtained from the bitstream. For example, the entropy decoder 310 can decode the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, CABAC, etc., and can output the values of the syntax elements necessary 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, determine a context model using the decoded 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, 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 330, and information about the residual, i.e., the quantized transform coefficient and the associated parameter information, which have been entropy decoded in the entropy decoder 310, may be input to the dequantizer 321. In addition, information about filtering among the information decoded in the entropy decoder 310 may be provided to the filter 350. Meanwhile, a receiver (not shown) receiving a signal output from the encoding device may further constitute the decoding device 300 as an internal / external element, and the receiver may be a component of the entropy decoder 310. Meanwhile, the decoding device according to the present disclosure may be referred to as a video / image / picture encoding device, and the decoding device may be classified into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include an entropy decoder 310, and the sample decoder may include at least one of a dequantizer 321, an inverse transformer 322, a predictor 330, an adder 340, a filter 350, and a memory 360.
[0083] 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.
[0084] The inverse transformer 322 obtains a residual signal (residual block, residual sample array) by performing inverse transformation on the transformation coefficients.
[0085] 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.
[0086] The predictor can generate a prediction signal based on various prediction methods. For example, the predictor can apply intra prediction or inter prediction to predict 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) to predict the block. Intra block copy can be used for content image / video coding of games, such as screen content coding (SCC). Although IBC basically performs prediction in the current block, it can be performed similarly to inter prediction in terms of deriving 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.
[0087] The intra-frame predictor 331 can predict the current block by referencing samples in the current picture. Depending on the prediction mode, the referenced samples may be located in the neighborhood of the current block or away 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 intra-frame predictor 331 may determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.
[0088] The inter-frame predictor 332 may derive a prediction block of 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 on a block, sub-block or sample basis based on the correlation of the motion information between the neighboring blocks 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 present in the current picture and temporal neighboring blocks present 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 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 an inter-frame prediction mode for the current block.
[0089] 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 when processing the target block as in the case of applying the skip mode, the prediction block can be used as the reconstructed block.
[0090] 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 block to be processed in the current picture, may be output through filtering as described below, or may be used for inter prediction of the next picture.
[0091] In addition, luma mapping and chroma scaling (LMCS) can be applied to the picture decoding process.
[0092] The filter 350 can improve the subjective / objective image 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 store the modified reconstructed picture in the memory 360, specifically, in the DPB of the memory 360. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filtering, bilateral filtering, etc.
[0093] The (modified) reconstructed picture that has been stored in the DPB of the memory 360 can be used as a reference picture in the inter-frame predictor 332. The memory 360 can 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 can 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 can store the reconstructed samples of the reconstructed block in the current picture and send them to the intra-frame predictor 331.
[0094] 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.
[0095] As described above, when performing video coding, prediction is performed to improve compression efficiency. A prediction block including prediction samples of a current block, that is, a target coding block, can be generated by prediction. In this case, the prediction block includes prediction samples in the spatial domain (or pixel domain). The prediction block is derived similarly in the encoding device and the decoding device. The encoding device can improve image coding efficiency by signaling information (residual information) about the residual between the original block rather than the original sample value of the original block itself and the prediction block to the decoding device. The decoding device can derive a residual block including residual samples based on the residual information, can generate a reconstructed block including reconstructed samples by adding the residual block to the prediction block, and can generate a reconstructed picture including the reconstructed block.
[0096] Residual information can be generated through a transformation and quantization process. For example, the encoding device can derive a residual block between the original block and the prediction block, can derive a transform coefficient by performing a transformation process on the residual samples (residual sample array) included in the residual block, can derive a quantized transform coefficient by performing a quantization process on the transform coefficient, and can send the relevant residual information to the decoding device (through a bitstream) with a signal. In this case, the residual information may include information such as value information, position information, a transformation scheme, a transform kernel, and a quantization parameter of the quantized transform coefficient. The decoding device can perform an inverse quantization / inverse transformation process based on the residual information, and can derive residual samples (or residual blocks). The decoding device can generate a reconstructed picture based on the prediction block and the residual block. In addition, the encoding device can derive a residual block for inter-frame prediction reference of subsequent pictures by inverse quantization / inverse transformation of the quantized transform coefficients, and can generate a reconstructed picture.
[0097] Figure 4 The structure of a content streaming system to which the present disclosure is applied is illustrated.
[0098] In addition, the content streaming system to which the present disclosure is applied may mainly include an encoding server, a streaming server, a network server, a media storage device, a user device, and a multimedia input device.
[0099] The encoding server compresses the content input from multimedia input devices such as smart phones, cameras, camcorders, etc. into digital data to generate a bit stream, and transmits the bit stream to the streaming server. As another example, when multimedia input devices such as smart phones, cameras, camcorders, etc. directly generate a bit stream, the encoding server can be omitted. The bit stream can be generated by applying the encoding method or bit stream generation method of the embodiment of this document. And the streaming server can temporarily store the bit stream in the process of sending or receiving the bit stream.
[0100] The streaming server sends multimedia data to the user device through the network server based on the user's request, and the network server is used as a medium to inform the user of the service. When the user requests the desired service from the network server, the network server transmits it to the streaming server, and the streaming server sends the multimedia data to the user. In this case, the content streaming system may include a separate control server. In this case, the control server is used to control the command / response between the devices in the content streaming system.
[0101] The streaming server can receive content from a media storage and / or an encoding server. For example, when receiving content from an encoding server, the content can be received in real time. In this case, in order to provide a stable streaming service, the streaming server can store the bit stream for a predetermined time.
[0102] For example, the user equipment may include a mobile phone, a smart phone, a laptop computer, a digital broadcast terminal, a personal digital assistant (PDA), a portable multimedia player (PMP), a navigation, a board PC, a tablet PC, an ultrabook, a wearable device (e.g., a watch-type terminal (smart watch), a glasses-type terminal (smart glasses), a head-mounted display (HMD)), a digital TV, a desktop computer, a digital signage, etc. Each of the servers in the content streaming system may be operated as a distributed server, and in this case, data received by each server may be processed in a distributed manner.
[0103] Figure 5 The multi-transformation technology according to an embodiment of the present disclosure is schematically illustrated.
[0104] refer to Figure 5 , the converter can correspond to the above Figure 2 The converter in the encoding device, and the inverse converter may correspond to the above Figure 2The inverse transformer in the encoding device of Figure 3 An inverse transformer in a decoding device.
[0105] The transformer may derive (primary) transform coefficients by performing a primary transform based on the residual samples (residual sample array) in the residual block (S510). 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 applied as the primary transform, it may be referred to as a multi-core transform.
[0106] The multi-core transform may refer to a method of transforming using additionally discrete cosine transform (DCT) type 2 and discrete sine transform (DST) type 7, DCT type 8, and / or DST type 1. That is, the multi-core transform may refer to a transform method of transforming a residual signal (or residual block) in a spatial domain into a transform coefficient (or primary transform coefficient) in a frequency domain based on a plurality of transform kernels selected from among DCT type 2, DST type 7, DCT type 8, and DST type 1. Herein, the primary transform coefficient may be referred to as a time transform coefficient from the perspective of a transformer.
[0107] That is, when a conventional transform method is applied, transform coefficients can be generated by applying a transform from the spatial domain to the frequency domain to the residual signal (or residual block) based on DCT type 2. However, when a multi-core transform is applied, transform coefficients (or primary transform coefficients) can be generated by applying a transform from the spatial domain to the frequency domain to the residual signal (or residual block) based on DCT type 2, DST type 7, DCT type 8, and / or DST type 1. Here, DCT type 2, DST type 7, DCT type 8, and DST type 1 may be referred to as transform types, transform kernels, or transform cores. These DCT / DST types may be defined based on basis functions.
[0108] If a multi-core transform is performed, a vertical transform core and a horizontal transform core for the target block may be selected from the transform cores, a vertical transform may be performed on the target block based on the vertical transform core, and a horizontal transform may be performed on the target block based on the horizontal transform core. Here, the horizontal transform may refer to a transform for the horizontal component of the target block, and the vertical transform may refer to a transform for the vertical component of the target block. The vertical transform core / horizontal transform core may be adaptively determined based on the prediction mode and / or transform index of the target block (CU or subblock) including the residual block.
[0109] In addition, according to an 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 expressed as trTypeHor and the vertical direction transform kernel is expressed as trTypeVer, trTypeHor or trTypeVer value 0 can be set to DCT2, trTypeHor or trTypeVer value 1 can be set to DST-7, and trTypeHor or trTypeVer value 2 can be set to DCT-8.
[0110] In this case, the MTS index information may be encoded and sent to the decoding device with a signal to indicate any one of the plurality of transform kernel sets. For example, MTS index 0 may indicate that both trTypeHor and trTypeVer values are 0, MTS index 1 may indicate that both trTypeHor and trTypeVer values are 1, MTS index 2 may indicate that trTypeHor value is 2 and trTypeVer value is 1, MTS index 3 may indicate that trTypeHor value is 1 and trTypeVer value is 2, and MTS index 4 may indicate that both trTypeHor and trTypeVer values are 2.
[0111] In one example, a transformation core set according to MTS index information is illustrated in the following table.
[0112] [Table 1]
[0113] tu_mst_idx[x0][y0] 0 1 2 3 4 trTypeHor 0 1 2 1 2 trTypeVer 0 1 1 2 2
[0114] The transformer may derive modified (secondary) transform coefficients (S520) 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 performed in a more compressed expression 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 an inseparable secondary transform (NSST) or a mode-dependent inseparable secondary transform (MDNSST). The inseparable secondary transform may represent the generation of modified transform coefficients (or secondary transform coefficients) for the 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 may be applied at one time based on the inseparable transform matrix. In other words, the non-separable secondary transform may refer to a transform method in which the vertical and horizontal directions of the (primary) transform coefficients are not applied separately, and, for example, a two-dimensional signal (transform coefficient) is rearranged into a one-dimensional signal by a certain 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-first order, 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-first order, M×N blocks are arranged in a row in the order of the first column, the second column, ..., and the Nth column. The non-separable secondary transform may be applied to the upper left region of a block (hereinafter, referred to as a transform coefficient block) configured with (primary) transform coefficients. For example, if the width (W) and height (H) of the transform coefficient block are all equal to or greater than 8, an 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 the height (H) of the transform coefficient block are all equal to or greater than 4, and the width (W) or the 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 the condition that only the width (W) or the 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.
[0115] Specifically, for example, if a 4×4 input block is used, the non-separable secondary transform may be performed as follows.
[0116] A 4×4 input block X can be represented as follows.
[0117] [Formula 1]
[0118]
[0119] If X is represented as a vector, then the vector It can be expressed as follows.
[0120]
[0121] In formula 2, the vector is a one-dimensional vector obtained by rearranging the two-dimensional block X of Equation 1 according to row-major order.
[0122] In this case, the inseparable secondary transform can be calculated as follows.
[0123] [Formula 3]
[0124]
[0125] In this formula, denotes a transform coefficient vector and T denotes a 16×16 (non-separable) transform matrix.
[0126] By using the above formula 3, the 16×1 transform coefficient vector can be derived And the vector can be divided into two parts by scanning order (horizontally, vertically, diagonally, etc.) Reorganize into 4×4 blocks. However, the above calculation is an example, and hypercube-Givens transform (HyGT) or the like may also be used for the calculation of the inseparable secondary transform in order to reduce the calculation complexity of the inseparable secondary transform.
[0127] Furthermore, in the inseparable 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.
[0128] 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 can be applied to an 8×8 region included in the 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 can be applied to a 4×4 region included in the 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.
[0129] Here, in order to select the mode-dependent transform cores, two inseparable secondary transform cores per transform set for inseparable secondary transforms may be configured 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.
[0130] However, as the size of the transform (ie, the size of the region to which the transform is applied) may be, for example, a size other than 8×8 or 4×4, the number of sets may be n, and the number of transform kernels in each set may be k.
[0131] 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.
[0132] 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.
[0133] Figure 6 The intra directional mode for 65 prediction directions is schematically shown.
[0134] refer to Figure 6 , 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 6In , H and V represent horizontal and vertical directivities, 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 directivities, and intra-prediction modes 34 to 66 have vertical directivities. Strictly speaking, intra-prediction mode 34 may be considered 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.
[0135] According to an example, four transform sets according to intra prediction modes may be mapped, for example, as shown in the following table.
[0136] [Table 2]
[0137] predModeIntra IfnstTrSetIdx predModeIntra<0 1 0<=predModeIntra<=1 0 2<=predModeIntra<=12 1 13<=predModeIntra<=23 2 24<=predModeIntra<=44 3 45<=predModeIntra<=55 2 56<=predModeIntra<=80 1
[0138] As shown in Table 2, any one of four transform sets, ie, lfnstTrSetIdx, may be mapped to any one of four indexes (ie, 0 to 3) according to the intra prediction mode.
[0139] 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 send the inseparable secondary transform index to a decoding device with a signal. The decoding device can select one of the k transform cores in a specific set based on the inseparable secondary transform index. For example, lfnst index value 0 can refer to a first inseparable secondary transform core, lfnst index value 1 can refer to a second inseparable secondary transform core, and lfnst index value 2 can refer to a third inseparable secondary transform core. Alternatively, 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.
[0140] The transformer can perform an inseparable 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 sent to a decoding device with a signal, and transmitted to a dequantizer / inverse transformer in an encoding device.
[0141] 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 sent to a decoding device with a signal, and transmitted to the dequantizer / inverse transformer in the encoding device.
[0142] 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 a secondary (inverse) transform (S550), and may obtain the residual block (residual sample) by performing a primary (inverse) transform on the (primary) transform coefficients (S560). 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.
[0143] The decoding device may further include a secondary inverse transform application determiner (or an element for determining whether to apply the secondary inverse transform) and a secondary inverse transform determiner (or an element for determining the secondary inverse transform). The secondary inverse transform application determiner may determine whether to apply the 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 the secondary inverse transform based on a secondary transform flag obtained by parsing the bitstream. In another example, the secondary inverse transform application determiner may determine whether to apply the secondary inverse transform based on a transform coefficient of the residual block.
[0144] 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.
[0145] 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.
[0146] 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.
[0147] In addition, the transformation kernel, transformation matrix, and coefficients constituting the transformation kernel matrix described in the present disclosure, that is, the 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 with 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.
[0148] 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.
[0149] 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). A transform index may be referred to as a LFNST index.
[0150] Meanwhile, when performing a secondary inverse transform based on the 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 for 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.
[0151] Figure 7is a diagram illustrating an RST according to an embodiment of the present disclosure.
[0152] In the present disclosure, a “target block” may refer to a current block to be encoded, a residual block, or a transform block.
[0153] In the RST according to the example, an N-dimensional vector may be mapped to an R-dimensional vector located in another space, so that a reduced transformation matrix may 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.
[0154] In an example, the reduction factor or reduction coefficient may be signaled through a bitstream, but the example is not limited thereto. For example, a predefined 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.
[0155] The size of the reduced transform matrix according to an example may be R×N, which is smaller than N×N (the size of a conventional transform matrix), and may be defined as in Equation 4 below.
[0156] [Formula 4]
[0157]
[0158] Figure 7 The matrix T in the reduced transform block shown in (a) may refer to the matrix T of equation 4: R×N .like Figure 7 As shown in (a), when the reduction transformation matrix T R×N When multiplied by the residual samples for the target block, transform coefficients for the current block may be derived.
[0159] In the example, if the size of the block to which the transform is applied is 8×8 and R=16 (ie, R / N=16 / 64=1 / 4), then according to Figure 7 The RST of (a) can be expressed as a matrix operation shown in the following Equation 5. In this case, the storage and multiplication calculations can be reduced to about 1 / 4 by a reduction factor.
[0160] In the present disclosure, a matrix operation may be understood as an operation of obtaining a column vector by multiplying a column vector by a matrix provided on the left side of the column vector.
[0161] [Formula 5]
[0162]
[0163] In formula 5, r1 to r 64 y may represent a residual sample for the target block, and specifically may be a transform coefficient generated by applying a primary transform. As a result of the calculation of Equation 5, a transform coefficient ci of the target block may be derived, and the process of deriving ci may be as shown in Equation 6.
[0164] [Formula 6]
[0165]
[0166] As a result of the calculation of Equation 6, the transform coefficients c1 to c R That is, when R=16, the transform coefficients c1 to c 16 . If a conventional transform is applied instead of RST, and a transform matrix of 64×64 (N×N) size is multiplied by a residual sample of 64×1 (N×1) size, although 64 (N) transform coefficients are derived for the target block, 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 by the encoding device 200 to the decoding device 300 is reduced, and thus the transmission efficiency between the encoding device 200 and the decoding device 300 can be improved.
[0167] When considered from the perspective of the size of the transformation matrix, the size of the conventional transformation matrix is 64×64 (N×N), but the size of the reduced transformation matrix is reduced to 16×64 (R×N), so the storage usage in the case of performing RST can be reduced by the R / N ratio compared to the case of performing the conventional transformation. In addition, when compared with the number of multiplication calculations N×N in the case of using the conventional transformation matrix, the use of the reduced transformation matrix can reduce the number of multiplication calculations (R×N) by the R / N ratio.
[0168] 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 passed 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 an inverse primary transform for the modified transform coefficients.
[0169] According to the example, the inverse RST matrix T N×R The size of is N×R which is smaller than the size of the conventional inverse transform matrix N×N, and is similar to the reduced transform matrix T shown in Equation 4.R×N Has a transposition relationship.
[0170] Figure 7 (b) The matrix T in the reduced inverse transform block shown in t It can refer to the inverse RST matrix T N×R T (The superscript T refers to transposition). Figure 7 As shown in (b), when the inverse RST matrix T RxN T When multiplied by the transform coefficients of the target block, the modified transform coefficients of the target block or the residual samples of the target block can be derived. RxN T It can be expressed as (T RxN T ) NxR .
[0171] More specifically, when the inverse RST is used as the secondary inverse transform, when the inverse RST matrix T RxN T When multiplied by the transform coefficients of the target block, the modified transform coefficients of the target block can be derived. In addition, the inverse RST can be used as an inverse primary transform, and in this case, when the inverse RST matrix T RxN T When multiplied by the transform coefficients of the target block, residual samples of the target block can be derived.
[0172] In the example, if the size of the block to which the inverse transform is applied is 8×8 and R=16 (ie, R / N=16 / 64=1 / 4), then according to Figure 7 The RST of (b) can be expressed as the matrix operation shown in the following equation 7.
[0173] [Formula 7]
[0174]
[0175] In formula 7, c1 to c 16 As a result of the calculation of Equation 7, r representing the modified transform coefficient of the target block or the residual sample of the target block can be derived. i , and derive r i The process can be shown as formula 8.
[0176] [Formula 8]
[0177] For i from 1 to N
[0178] r i= 0
[0179] For j from 1 to R
[0180] ri + = t ji *c j
[0181] As a result of the calculation of Equation 8, r1 to r2 representing the modified transform coefficients of the target block or the residual samples of the target block can be derived. N . From the perspective of the size of the inverse transformation matrix, the size of the conventional inverse transformation matrix is 64×64 (N×N), but the size of the inverse reduction transformation matrix is reduced to 64×16 (R×N), so the storage usage rate in the case of performing the inverse RST can be reduced by the R / N ratio compared to the case of performing the conventional inverse transformation. In addition, when compared with the number of multiplication calculations N×N in the case of using the conventional inverse transformation matrix, the use of the inverse reduction transformation matrix can reduce the number of multiplication calculations (N×R) by the R / N ratio.
[0182] The transform set configuration shown in Table 2 can also be applied to 8×8 RST. That is, 8×8 RST can be applied according to the transform set in Table 2. Since a 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, the 8×8 NSST in the RST configuration can be specified by the transform index, or the 8×8 lfnst can be specified when LFNST is applied. 8×8lfnst and 8×8RST refer to the transform applicable to an 8×8 region included in a transform coefficient block when W and H of a target block to be transformed are both 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×4lfnst and 4×4RST refer to the transform applicable to a 4×4 region included in a transform coefficient block when W and H of a target block are both equal to or greater than 4, and the 4×4 region may be the upper left 4×4 region in the transform coefficient block.
[0183] According to an embodiment of the present disclosure, for the transformation in the encoding process, only 48 pieces of data can be selected, and a maximum 16×48 transform kernel matrix can 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 can be appropriately arranged, thereby forming a 48×1 vector. For example, a 48×1 vector can be constructed based on 48 pieces of data constituting an area other than the lower right 4×4 area in an 8×8 region. 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.
[0184] 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 into a two-dimensional block according to the predetermined arrangement order.
[0185] 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.
[0186] On the contrary, in the inverse transform process, when the inverse RST or LFNST is applied to the 8×8 area, 16 transform coefficients corresponding to the upper left area of the 8×8 area among the transform coefficients in the 8×8 area 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 area, the upper right area, and the lower left area of the 8×8 area except the lower right area.
[0187] 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 the inverse RST for the transform coefficients, and an inverse primary transformer for deriving residual samples for the target block based on the inverse primary transform for the modified transform coefficients. The inverse primary transform refers to an inverse transform of the 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.
[0188] The non-separable transform (LFNST) described above will be described in detail as follows: LFNST may include a forward transform performed by an encoding device and an inverse transform performed by a decoding device.
[0189] The encoding device receives as input a result (or a portion of a result) derived after applying a primary (core) transform, and applies a forward secondary transform (Secondary Transform).
[0190] [Formula 9]
[0191] y=G T x
[0192] In Equation 9, 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.
[0193] 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.
[0194] 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.
[0195] 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 coding 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.
[0196] Figure 8 is a diagram illustrating an order of arranging output data of a forward primary transform into a one-dimensional vector according to an example. Figure 8 The left figures of (a) and (b) show the order for constructing a [48×1] vector, and Figure 8 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 Figure 8 Arrange them in the same order as in (a) and (b) to obtain a one-dimensional vector x.
[0197] 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. Figure 8 The output data of the forward primary transform are arranged in the order of (a), 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 can be arranged in the order of (a). Figure 8 The output data of the forward primary transform are arranged in order of (b).
[0198] According to the example, different Figure 8 The order of (a) and (b) is determined in order to derive and apply Figure 8If the order of arrangement of (a) and (b) is the same (y vector), the column vectors of the matrix G can be rearranged according to the order of arrangement. In other words, the column vectors of G can be rearranged so that each element that makes up the x vector is always multiplied by the same transformation basis vector.
[0199] Since the output y derived by Formula 9 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 9 needs to be properly arranged into 2D data again.
[0200] Fig. 9 is a diagram illustrating an order in which output data of a forward sub-transform is arranged into two-dimensional blocks according to an example.
[0201] In the case of LFNST, the output values can be arranged in 2D blocks according to a predetermined scanning order. Fig. 9 (a) shows that when the output y is a [16×1] vector, the output values are arranged in 16 positions of the 2D block according to the diagonal scanning order. Fig. 9 (b) shows that when the output y is a [8×1] vector, the output values are arranged in 8 positions of the 2D block according to the diagonal scanning order, and the remaining 8 positions are filled with zeros. Fig. 9 The X in (b) indicates that it is filled with zeros.
[0202] 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 the order shown in FIG. Fig. 9 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. 9 The data is arranged in a specific order in the diagonal scan order of .
[0203] 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.
[0204] [Formula 10]
[0205] x=Gy
[0206] 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.
[0207] The output vector x is based on Figure 8 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.
[0208] 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.
[0209] 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.
[0210] In addition, 8 matrices can be derived from the four transform sets shown in Table 2 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.
[0211] Fig. 9 is a diagram illustrating a wide-angle intra prediction mode according to an embodiment of this document.
[0212] 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.
[0213] When predicting that the width of the current 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.
[0214] 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.
[0215] Table 3 below shows a process of deriving a modified intra mode by remapping the intra prediction mode to the wide-angle intra prediction mode.
[0216] [Table 3]
[0217]
[0218] In Table 3, 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.
[0219] 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)).
[0220] For non-square blocks, the intra prediction mode can be divided into two cases and modified.
[0221] 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 from (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], the intra prediction mode is set to a value that is 65 greater than the intra prediction mode [predModeIntra is set equal to (predModeIntra+65)].
[0222] If different from the above, that is, if the following 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 from (60-2*whRatio) when the variable whRatio is greater than 1 and is greater than 60 when the variable 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 the intra prediction mode [predModeIntra is set equal to (predModeIntra-67)].
[0223] Table 2 above shows how to select a transform set based on the intra prediction mode value extended by WAIP in LFNST. Fig.10 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 2.
[0224] 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 Figure 8 (a) and Figure 8 The arrangement order shown in (b) rearranges the two-dimensional data into one-dimensional data. In addition, it can be seen that Figure 8 (a) and Figure 8 The pattern of the sequence shown in (b) is symmetrical about the direction indicated by the pattern 34 (diagonal direction).
[0225] 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.
[0226] Fig.11 is a diagram illustrating a block shape to which LFNST is applied. Fig.11 (a) shows a 4×4 block, (b) shows a 4×8 block and an 8×4 block, (c) shows a 4×N block or an N×4 block, where N is 16 or greater, (d) shows an 8×8 block, and (e) shows an M×N block, where M≥8, N≥8 and N>8 or M>8.
[0227] exist Fig.11 In , blocks with thick borders indicate the areas where LFNST is applied. Fig.11For the blocks in (a) and (b), LFNST is applied to the top left 4×4 region, and for Fig.11 (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. A [16×16] or [16×8] matrix may be applied based on the matrix dimension of G used in Equations 9 and 10.
[0228] More specifically, the [16×8] matrix is applied to Fig.11 (a) 4×4 block (4×4TU or 4×4CU), and the [16×16] matrix is applied to Fig.11 This is to adjust the worst case computational complexity to 8 multiplications per sample.
[0229] about Fig.11 In (d) and (e), LFNST is applied to the upper left 8×8 region, and this LFNST is hereinafter referred to as "8×8LFNST". 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 9) 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 Figure 8 (a) The left order or Figure 8 As can be seen from the left sequence of (b), a [48×1] vector can be constructed based on samples belonging to the remaining three 4×4 blocks while leaving the lower right 4×4 block as is.
[0230] The [48×8] matrix can be applied to Fig.11 (d) is an 8×8 block (8×8TU or 8×8CU), 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.
[0231] Depending on the block shape, when the corresponding forward LFNST (4×4 or 8×8 LFNST) is applied, 8 or 16 output data (Y vector in Eq. 9, [8×1] or [16×1] vector) are generated. In the forward LFNST, since the matrix G T The characteristic is that the amount of output data is equal to or less than the amount of input data.
[0232] Fig.12is a diagram illustrating an 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.
[0233] 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.
[0234] As described above, since the dimension 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.12 In the cases of (a) and (d) of FIG. 1 , the [16×8] matrix and the [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. 9 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) In the case of LFNST applied to 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 zero values.
[0235] As described above, basically, by signaling the LFNST index, whether to apply LFNST and the transformation matrix to be applied are specified. 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.
[0236] 1) If Fig.12 As shown in (a), samples from the eighth position and subsequent positions in the scanning order in the upper left 4×4 block, that is, from the ninth to the sixteenth samples.
[0237] 2) If Fig.12 As shown in (d) and (e), when the [48×16] matrix or the [8×8] 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.
[0238] 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.
[0239] 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.
[0240] Meanwhile, for the adopted LFNST, the following simplification method can be applied.
[0241] (i) According to an example, the number of output data of the forward LFNST may be limited to 16 at most.
[0242] 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 Fig.11 LFNST is applied only once to all blocks of . This simplifies the implementation of image compilation.
[0243] (ii) According to an example, clearing may be additionally applied to an area to which LFNST is not applied. In this document, clearing may mean filling all positions belonging to a specific area with a value of 0. That is, clearing may be applied to an area that is not changed by LFNST and maintains the result of the forward primary transform. As described above, since LFNST is divided into 4×4 LFNST and 8×8 LFNST, clearing may be divided into two types ((ii)-(A) and (ii)-(B)) as follows.
[0244] (ii)-(A) When 4×4 LFNST is applied, an area to which 4×4 LFNST is not applied may be cleared. Fig.13 is a diagram illustrating clearing in a block to which 4×4 LFNST is applied according to an example.
[0245] like Fig.13 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.
[0246] on the other hand, Fig.13 (d) shows that when the maximum value of the number of output data of the forward LFNST according to the example is limited to 16 (as Fig.11 ), the remaining blocks to which 4×4 LFNST is not applied are cleared.
[0247] (ii)-(B) When 8×8 LFNST is applied, an area to which 8×8 LFNST is not applied may be cleared. Fig.14 is a diagram illustrating clearing in a block to which 8×8 LFNST is applied according to an example.
[0248] like Fig.14 As shown, for the block with 8×8 LFNST applied, that is, Fig.12 For all blocks in (d) and (e), the entire area where LFNST is not applied can be filled with zeros.
[0249] (iii) Due to the zeroing presented in (ii) above, the area filled with zeros may not be the same 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.
[0250] For example, when (ii)-(B) is applied, in checking Fig.12 After the areas filled with zero values in (d) and (e) have non-zero data, additionally check Fig.14 Whether 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.
[0251] 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.
[0252] 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.
[0253] Example
[0254] -Limit the number of output data of the forward LFNST to a maximum of 16 → (i)
[0255] - When 4×4 LFNST is applied, all regions where 4×4 LFNST is not applied are cleared → (ii)-(A)
[0256] - When 8×8 LFNST is applied, all regions where 8×8 LFNST is not applied are cleared → (ii)-(B)
[0257] - After checking whether non-zero data also exists in the existing areas filled with zero values and in the areas filled with zeros due to the additional clearing ((ii)-(A), (ii)-(B)), the LFNST index is signaled only when no non-zero data exists → (iii).
[0258] 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.13 (a) and Fig.14 In the case of (a), the eighth position in the scan order is the last position where non-zero data can exist. Fig.13 (b) and (c) and Fig.14 In the 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.
[0259] Therefore, when LFNST is applied, after checking whether non-zero data exists at a position where the residual coding process is not allowed (at a position beyond the last position), it may be determined whether to signal the LFNST index.
[0260] In the case of the zeroing method proposed in (ii), since the amount of data ultimately generated when both the primary transform and LFNST are applied is reduced, the amount of calculation required to perform the entire transform process can be reduced. That is, when LFNST is applied, since zeroing is applied to the forward primary transform output data present 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 transform. 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.
[0261] First, as mentioned above, the amount of computation required to perform the entire transformation process is reduced.
[0262] In particular, when (ii)-(B) is applied, the amount of calculation in the worst case is reduced, making it possible to lighten the transform process. 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.
[0263] Second, the amount of computation required for the entire transformation process can be reduced, thereby reducing the power consumption required to perform the transformation.
[0264] Third, the delays involved in the transformation process are reduced.
[0265] Secondary transforms such as LFNST add computational effort to the existing primary transform, 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 in the prediction process, during encoding, the increase in latency due to the secondary transform results in an increase in latency until reconstruction. This can result in an increase in the overall latency of intra prediction encoding.
[0266] However, if the clearing suggested in (ii) is applied, the delay time for performing the primary transform can be greatly reduced when LFNST is applied, maintaining or reducing the delay time of the entire transform, so that the encoding device can be implemented more simply.
[0267] Meanwhile, in conventional intra prediction, the target block of coding is regarded as one coding unit, and coding is performed without partitioning. However, ISP (Intra Sub Partitioning) coding refers to performing intra prediction coding by partitioning the coding target block in the horizontal direction or the vertical direction. In this case, a reconstructed block can be generated by performing encoding / decoding in units of partitioned blocks, and the reconstructed block can be used as a reference block for the next partitioned block. According to an example, in ISP coding, one coding block can be partitioned into two or four sub-blocks and coded, and in ISP, intra prediction is performed on one sub-block by referring to the reconstructed pixel value of a sub-block adjacent to its left or upper side. Hereinafter, the term "coding" may be used as a concept including both coding performed by an encoding device and decoding performed by a decoding device.
[0268] ISP partitions the block predicted as intra-frame brightness into two or four sub-partitions in the vertical or horizontal direction according to the size of the block. For example, the minimum block size to which ISP can be applied is 4x8 or 8x4. If the block size is larger than 4x8 or 8x4, the block is partitioned into four sub-partitions.
[0269] When ISP is applied, subblocks are sequentially coded according to partition types, such as horizontally or vertically, from left to right or from top to bottom, and the coding of the next subblock can be performed after a subblock is subjected to inverse transformation and intra prediction until the recovery process. For the leftmost or topmost subblock, as in the conventional intra prediction method, the reconstructed pixels of the coded coding block are referenced. In addition, if the previous subblock is not adjacent to each side of the internal subblock that follows it, in order to derive the reference pixels adjacent to the corresponding side, as in the conventional intra prediction method, the reconstructed pixels of the adjacent coding block that has been coded are referenced.
[0270] In ISP coding mode, all sub-blocks can be coded with the same intra prediction mode, and a flag indicating whether ISP coding is used and a flag indicating the direction (horizontal or vertical) partitioning to be performed can be signaled. At this time, the number of sub-blocks may be adjusted to 2 or 4 depending on the shape of the block, and when the size (width x height) of a sub-block is less than 16, the partitioning of the corresponding sub-block may not be allowed, and it may also be restricted to not apply ISP coding itself.
[0271] Meanwhile, in the case of the ISP prediction mode, one coding unit is partitioned into two or four partition blocks, ie, sub-blocks, and prediction is performed, and the same intra prediction mode is applied to the two or four partition blocks thus partitioned.
[0272] As described above, both the horizontal direction (if an MxN coding unit having horizontal and vertical lengths of M and N, respectively, is divided in the horizontal direction, when divided into two, it is divided into Mx(N / 2) blocks, and when divided into four, it is divided into Mx(N / 4) blocks) and the vertical direction (if an MxN coding unit is divided in the vertical direction, when divided into 2, it is divided into (M / 2)xN blocks, and when divided into 4, it is divided into (M / 4)×N blocks) can be used as partition directions. When partitioning in the horizontal direction, the partition blocks are coded in order from top to bottom, and when partitioning in the vertical direction, the partition blocks are coded in order from left to right. In the case of horizontal (vertical) direction partitioning, the currently coded partition block can be predicted by referring to the reconstructed pixel value of the upper (left) partition block.
[0273] The transform can be applied to the residual signal generated by the ISP prediction method in units of partition blocks. The MTS (Multiple Transform Selection) technology based on the DST-7 / DCT-8 combination and the existing DCT-2 can be applied to the forward-based primary transform (core transform or primary transform), and the LFNST (Low Frequency Non-Separable Transform) can be applied to the transform coefficients generated according to the primary transform to generate the final modified transform coefficients.
[0274] That is, LFNST can also be applied to the partition blocks divided by applying the ISP prediction mode, and the same intra prediction mode is applied to the partition blocks divided as described above. Therefore, when the LFNST set derived based on the intra prediction mode is selected, the derived LFNST set can be applied to all partition blocks. That is, the same intra prediction mode is applied to all partition blocks, and thus the same LFNST set can be applied to all partition blocks.
[0275] Meanwhile, according to an example, LFNST may be applied only to transform blocks having horizontal and vertical lengths of 4 or more. Therefore, when the horizontal or vertical length of a partition block partitioned according to the ISP prediction method is less than 4, LFNST is not applied and the LFNST index is not signaled. In addition, when LFNST is applied to each partition block, the corresponding partition block may be regarded as one transform block. Of course, when the ISP prediction method is not applied, LFNST may also be applied to the coding block.
[0276] The application of LFNST to each partition block is described in detail as follows.
[0277] According to an example, after applying forward LFNST to a single partition block, and after leaving only up to 16 coefficients (8 or 16) in the top left 4x4 region according to the transform coefficient scanning order, zeroing of filling all remaining positions and regions with 0 values may be applied.
[0278] Alternatively, according to an example, when the length of one side of the partition block is 4, LFNST is applied only to the upper left 4x4 region, and when the lengths of all sides of the partition block, i.e., the width and height, are 8 or greater, LFNST can be applied to the remaining 48 coefficients except for the lower right 4x4 region in the upper left 8x8 region.
[0279] Alternatively, according to an example, in order to adjust the worst-case computational complexity to 8 multiplications per sample, when each partition block is 4x4 or 8x8, only 8 transform coefficients may be output after applying the forward LFNST. That is, if the partition block is 4x4, an 8x16 matrix may be applied as the transform matrix, and if the partition block is 8x8, an 8x48 matrix may be applied as the transform matrix.
[0280] Meanwhile, in the current VVC standard, LFNST index signaling is performed in units of coding units. Therefore, when the ISP prediction mode is used and LFNST is applied to all partition blocks, the same LFNST index value can be applied to the corresponding partition blocks. That is, when the LFNST index value is sent once at the coding unit level, the corresponding LFNST index can be applied to all partition blocks in the coding unit. As described above, the LFNST index value can have values of 0, 1, and 2, and 0 indicates the case where LFNST is not applied, and 1 and 2 indicate two transform matrices present in one LFNST set when LFNST is applied.
[0281] As described above, the LFNST set is determined by the intra prediction mode, and since all partition blocks in a coding unit are predicted in the same intra prediction mode in the case of the ISP prediction mode, the partition blocks can refer to the same LFNST set.
[0282] As another example, LFNST index signaling is still performed in units of coding units, but in the case of the ISP prediction mode, without determining whether to uniformly apply LFNST to all partition blocks, it may be determined by a separate condition whether to apply the LFNST index value signaled at the coding unit level to each partition block or not to apply LFNST. Here, the separate condition may be signaled in the form of a flag for each partition block through the bitstream, and when the flag value is 1, the LFNST index value signaled at the coding unit level may be applied, and when the flag value is 0, LFNST may not be applied.
[0283] Hereinafter, a method of maintaining the worst-case computational complexity when applying LFNST to the ISP mode will be described.
[0284] In the case of ISP mode, in order to keep the number of multiplications per sample (or per coefficient or per position) to a certain value or less when applying LFNST, the application of LFNST can be limited. Depending on the size of the partition block, the number of multiplications per sample (or per coefficient, or per position) can be kept at 8 or less by applying LFNST as follows.
[0285] 1. When both the horizontal length and the vertical length of the partition block are equal to or greater than 4, the same method as the computational complexity adjustment method for the worst case of LFNST in the current VVC standard can be applied.
[0286] That is, when the partition block is a 4x4 block, in the forward direction, an 8x16 matrix obtained by sampling the first 8 rows from the 16x16 matrix may be applied instead of the 16x16 matrix, and in the backward direction, a 16x8 matrix obtained by sampling the left 8 columns from the 16x16 matrix may be applied. In addition, when the partition block is an 8x8 block, in the forward direction, an 8x48 matrix obtained by sampling the first 8 rows from the 16x48 matrix may be applied instead of the 16x48 matrix, and in the backward direction, a 48x8 matrix obtained by sampling the left 8 columns from the 48x16 matrix may be applied instead of the 48x16 matrix.
[0287] In the case of a 4xN or Nx4 (N>4) block, when forward transform is performed, the 16 coefficients generated after applying the 16x16 matrix only to the upper left 4x4 block are arranged in the upper left 4x4 area, and the other areas can be filled with 0 values. In addition, when inverse transform is performed, the 16 coefficients located in the upper left 4x4 block can be arranged in a scanning order to configure an input vector, and then 16 output data can be generated by multiplying the 16x16 matrix. The generated output data can be arranged in the upper left 4x4 area, and the remaining areas except the upper left 4x4 area can be filled with zeros.
[0288] In the case of an 8xN or Nx8 (N>8) block, when performing forward transform, the 16 coefficients generated after applying the 16x48 matrix only to the ROI area in the upper left 8x8 block (excluding the remaining area of the lower right 4x4 block from the upper left 8x8 block) can be arranged in the upper left 4x4 area, and the other areas can be filled with 0 values. In addition, when performing inverse transform, the 16 coefficients located in the upper left 4x4 block can be arranged in a scanning order to configure an input vector, and then 48 output data can be generated by multiplying the 48x16 matrix. The generated output data can be filled in the ROI area, and the other areas can be filled with 0 values.
[0289] As another example, in order to keep the number of multiplications per sample (or per coefficient or per position) at a certain value or less, the number of multiplications per sample (or per coefficient or per position) based on the ISP coding unit size instead of the size of the ISP partition block can be kept at 8 or less. If there is only one block that satisfies the conditions for applying LFNST among the ISP partition blocks, the worst-case complexity calculation for LFNST can be applied based on the corresponding coding unit size instead of the size of the partition block. For example, when the luma coding block of a certain coding unit is partitioned into 4 4x4-sized partition blocks and ISP-coded, and when there are no non-zero transform coefficients for two of the partition blocks, the other two partition blocks can be respectively set to generate 16 transform coefficients instead of 8 (based on the encoder).
[0290] Hereinafter, a method of signaling a LFNST index in case of the ISP mode will be described.
[0291] As described above, the LFNST index may have values of 0, 1, and 2, where 0 indicates that LFNST is not applied, and 1 and 2 respectively indicate one of two LFNST kernel matrices included in the selected LFNST set. LFNST is applied based on the LFNST kernel matrix selected by the LFNST index. A method of transmitting the LFNST index in the current VVC standard will be described below.
[0292] 1. The LFNST index may be sent once for each coding unit (CU), and in the case of a dual tree, separate LFNST indexes may be sent for luma blocks and chroma blocks, respectively.
[0293] 2. When the LFNST index is not signaled, the LFNST index value is inferred to be a default value of 0. The case where the LFNST index value is inferred to be 0 is as follows.
[0294] A. In the case of a mode where transform is not applied (e.g., transform skip, BDPCM, lossless coding, etc.)
[0295] B. When the primary transform is not DCT-2 (DST7 or DCT8), that is, the horizontal transform or the vertical transform is not DCT-2
[0296] C. When the horizontal length or vertical length of the luma block for the coding unit exceeds the size of the maximum luma transform that can be transformed, for example, when the size of the maximum luma transform that can be transformed is 64, and when the luma block of the coding block is equal to 128x16, LFNST cannot be applied.
[0297] In the case of a dual tree, it is determined whether each of the coding units for the luma component and the coding units for the chroma component exceeds the size of the maximum luma transform. That is, for the luma block, it is checked whether the size of the maximum transformable luma transform is exceeded, and for the chroma block, it is checked whether the horizontal / vertical length of the corresponding luma block for the color format and the size of the maximum transformable luma transform are exceeded. For example, when the color format is 4:2:0, the horizontal / vertical length of the corresponding luma block is twice that of the corresponding chroma block, and the transform size of the corresponding luma block is twice that of the corresponding chroma block. As another example, when the color format is 4:4:4, the horizontal / vertical length and transform size of the corresponding luma block are the same as those of the corresponding chroma block.
[0298] A 64-length transform or a 32-length transform may mean a transform applied to a width or height having a length of 64 or 32, respectively, and a "transform size" may mean 64 or 32 as the corresponding length.
[0299] In the case of a single tree, after checking whether the horizontal length or vertical length of the luma block exceeds the maximum transformable luma transform block size, if it exceeds, the LFNST index signaling can be omitted.
[0300] D. The LFNST index can be sent only when both the horizontal length and the vertical length of the coding unit are equal to or greater than 4.
[0301] In the case of a dual tree, the LFNST index may be signaled only when both the horizontal and vertical lengths of the corresponding component (ie, luma or chroma component) are equal to or greater than 4.
[0302] In the case of a single tree, when both the horizontal and vertical lengths of the luma component are equal to or greater than 4, the LFNST index may be signaled.
[0303] E. If the position of the last non-zero coefficient is not the DC position (upper left position of the block), and in the case of a dual-tree type luma block, if the position of the last non-zero coefficient is not the DC position, send an LFNST index. In the case of a dual-tree type chroma block, if any one of the position of the last non-zero coefficient of Cb and the position of the last non-zero coefficient of Cr is not the DC position, send the corresponding LNFST index.
[0304] In case of a single tree type, if the position of the last non-zero coefficient of any one of the luma component, the Cb component, and the Cr component is not the DC position, the LFNST index is transmitted.
[0305] Here, if a coding block flag (CBF) value indicating whether a transform coefficient of a transform block exists is 0, the position of the last non-zero coefficient of the corresponding transform block is not checked for determining whether to signal the LFNST index. That is, when the corresponding CBF value is 0, since the transform is not applied to the corresponding block, the position of the last non-zero coefficient may not be considered when checking the condition for LFNST index signaling.
[0306] For example, 1) in the case of a dual tree type and a luma component, if the corresponding CBF value is 0, the LFNST index is not signaled, 2) in the case of a dual tree type and a chroma component, if the CBF value for Cb is 0 and the CBF value for Cr is 1, only the position of the last non-zero coefficient for Cr is checked and the corresponding LFNST index is sent, 3) in the case of a single tree type, only the position of the last non-zero coefficient is checked for the component having a CBF value of 1 for each of luma, Cb, and Cr.
[0307] F. When it is confirmed that the transform coefficient exists in a position other than the position where the LFNST transform coefficient may exist, the LFNST index signaling may be omitted. In the case of 4x4 transform blocks and 8x8 transform blocks, according to the transform coefficient scanning order in the VVC standard, the LFNST transform coefficient may exist in 8 positions starting from the DC position, and the remaining positions are filled with zeros. In addition, when the 4x4 transform block and the 8x8 transform block do not exist, according to the transform coefficient scanning order in the VVC standard, the LFNST transform coefficient may exist in 16 positions starting from the DC position, and the remaining positions are filled with zeros.
[0308] Therefore, if non-zero transform coefficients exist in a region that should be filled with zero values after residual coding, LFNST index signaling may be omitted.
[0309] At the same time, the ISP mode can also be applied only to the luminance block, or can be applied to both the luminance block and the chrominance block. As described above, when ISP prediction is applied, the corresponding coding unit can be divided into two or four partition blocks and predicted, and a transform can be applied to each partition block. Therefore, when determining the conditions for signaling the LFNST index in units of coding units, it is also necessary to consider the case where LFNST can be applied to each partition block. In addition, when the ISP prediction mode is applied only to a specific component (e.g., a luminance block), the LFNST index must be signaled in view of the fact that only the component is divided into partition blocks. The LFNST index signaling methods available in ISP mode are summarized as follows.
[0310] 1. The LFNST index may be sent once for each coding unit (CU), and in the case of a dual tree, separate LFNST indexes may be sent for luma blocks and chroma blocks, respectively.
[0311] 2. When the LFNST index is not signaled, the LFNST index value is inferred to be a default value of 0. The case where the LFNST index value is inferred to be 0 is as follows.
[0312] A. In the case of a mode where transform is not applied (e.g., transform skip, BDPCM, lossless coding, etc.)
[0313] B. When the horizontal length or vertical length of the luma block of the coding unit exceeds the size of the maximum luma transform that can be transformed, for example, when the size of the maximum luma transform that can be transformed is 64, and when the size of the luma block of the coding block is equal to 128x16, LFNST cannot be applied.
[0314] Whether to signal the LFNST index may be determined based on the size of the partition block rather than the coding unit. That is, if the horizontal or vertical length of the partition block corresponding to the luma block exceeds the size of the maximum luma transform that can be transformed, the LFNST index signaling may be omitted and the LFNST index value may be inferred to be 0.
[0315] In the case of a dual tree, it is determined whether the size of the maximum luma transform is exceeded for each of the coding unit or partition block of the luma component and the coding unit or partition block of the chroma component. That is, if the horizontal and vertical lengths of the coding unit or partition block of the luma component are compared with the maximum luma transform size, respectively, and at least one of them is greater than the maximum luma transform size, LFNST is not applied, and in the case of the coding unit or partition block of the chroma component, the horizontal / vertical length of the corresponding luma block for the color format is compared with the size of the maximum transformable luma transform. For example, when the color format is 4:2:0, the horizontal / vertical length of the corresponding luma block is twice that of the corresponding chroma block, and the transform size of the corresponding luma block is twice that of the corresponding chroma block. As another example, when the color format is 4:4:4, the horizontal / vertical length and transform size of the corresponding luma block are the same as those of the corresponding chroma block.
[0316] In the case of a single tree, after checking whether the horizontal length or vertical length of a luma block (coding unit or partition block) exceeds the maximum transformable luma transform block size, if it exceeds, LFNST index signaling can be omitted.
[0317] C. If LFNST included in the current VVC standard is applied, the LFNST index may be transmitted only when both the horizontal length and the vertical length of the partition block are equal to or greater than 4.
[0318] If LFNST for 2xM (1xM) or Mx2 (Mx1) blocks is applied in addition to LFNST included in the current VVC standard, the LFNST index can be transmitted only when the size of the partition block is equal to or larger than the 2xM (1xM) or Mx2 (Mx1) block. Here, the expression "PxQ block is equal to or larger than RxS block" means P≥R and Q≥S.
[0319] In summary, the LFNST index can be signaled only when the partition block is equal to or larger than the minimum size applicable to LFNST. In the case of a dual tree, the LFNST index can be signaled only when the partition block of the luma or chroma component is equal to or larger than the minimum size applicable to LFNST. In the case of a single tree, the LFNST index can be signaled only when the partition block of the luma component is equal to or larger than the minimum size applicable to LFNST.
[0320] In this document, the expression “MxN block is greater than or equal to KxL block” means that M is greater than or equal to K and N is greater than or equal to L. The expression “MxN block is greater than KxL block” means that M is greater than or equal to K and N is greater than or equal to L, and either M is greater than K or N is greater than L. The expression “MxN block is less than or equal to KxL block” means that M is less than or equal to K and N is less than or equal to L, and the expression “MxN block is less than KxL block” means that M is less than or equal to K and N is less than or equal to L, and either M is less than K or N is less than L.
[0321] D. If the position of the last non-zero coefficient is not the DC position (upper left position of the block), and in the case of a dual-tree type luma block, if the position of the last non-zero coefficient in any one of all partition blocks is not the DC position, the LFNST index is sent. In the case of a dual-tree type and a chroma block, if at least one of the positions of the last non-zero coefficients of all partition blocks for Cb (if the ISP mode is not applied to the chroma component, the number of partition blocks is considered to be 1) and the positions of the last non-zero coefficients of all partition blocks for Cr (if the ISP mode is not applied to the chroma component, the number of partition blocks is considered to be 1) is not the DC position, the corresponding LNFST index may be sent.
[0322] In case of a single tree type, if the position of the last non-zero coefficient of any one of all partition blocks for luma components, Cb components, and Cr components is not a DC position, a corresponding LFNST index may be transmitted.
[0323] Here, if the value of the coding block flag (CBF) indicating whether there is a transform coefficient for each partition block is 0, the position of the last non-zero coefficient of the corresponding partition block is not checked to determine whether to signal the LFNST index. That is, when the corresponding CBF value is 0, since the transform is not applied to the corresponding block, the position of the last non-zero coefficient of the corresponding partition block is not considered when checking the condition for LFNST index signaling.
[0324] For example, 1) in the case of a dual tree type and a luma component, if the corresponding CBF value for each partition block is 0, the partition block is excluded when determining whether to signal the LFNST index, 2) in the case of a dual tree type and a chroma component, if the CBF value for Cb is 0 and the CBF value for Cr is 1 for each partition block, only the position of the last non-zero coefficient for Cr is checked to determine whether to signal the LFNST index, 3) in the case of a single tree type, it is possible to determine whether to signal the LFNST index by checking the position of the last non-zero coefficient only for blocks having a CBF value of 1 for all partition blocks for the luma component, the Cb component, and the Cr component.
[0325] In the case of the ISP mode, the image information may also be configured so that the position of the last non-zero coefficient is not checked, and an embodiment thereof is as follows.
[0326] i. In the case of ISP mode, LFNST index signaling may be allowed without checking the position of the last non-zero coefficient for both the luminance block and the chrominance block. That is, LFNST index signaling may be allowed even if the position of the last non-zero coefficient of all partition blocks is the DC position or the corresponding CBF value is 0.
[0327] ii. In the case of ISP mode, only the check of the position of the last non-zero coefficient of the luma block may be omitted, and in the case of the chroma block, the check of the position of the last non-zero coefficient may be performed in the above manner. For example, in the case of a dual tree type and a luma block, LFNST index signaling is allowed without checking the position of the last non-zero coefficient, and in the case of a dual tree type and a chroma block, it may be determined whether to signal the corresponding LFNST index by checking whether there is a DC position for the position of the last non-zero coefficient in the above manner.
[0328] iii. In the case of ISP mode and single tree type, method i or ii may be applied. That is, in the case of ISP mode and when number i is applied to single tree type, it is possible to omit the check of the position of the last non-zero coefficient of both the luminance block and the chrominance block and allow LFNST index signaling. Alternatively, by applying part ii, for the partition block of the luminance component, the check of the last non-zero coefficient position is omitted, and for the partition block of the chrominance component (if ISP is not applied to the chrominance component, the number of partition blocks can be considered to be 1), the position of the last non-zero coefficient is checked in the above manner, thereby determining whether to signal the LFNST index.
[0329] E. When it is confirmed that a transform coefficient exists at a position other than a position where a LFNST transform coefficient may exist, LFNST index signaling may be omitted even for one partition block among all partition blocks.
[0330] For example, in the case of a 4x4 partition block and an 8x8 partition block, according to the transform coefficient scanning order in the VVC standard, the LFNST transform coefficient may exist in 8 positions from the DC position, and the remaining positions are filled with zeros. In addition, if it is equal to or greater than 4x4 and is neither a 4x4 partition block nor an 8x8 partition block, according to the transform coefficient scanning order in the VVC standard, the LFNST transform coefficient may exist in 16 positions from the DC position, and all remaining positions are filled with zeros.
[0331] Therefore, if non-zero transform coefficients exist in a region that should be filled with zero values after residual coding, LFNST index signaling may be omitted.
[0332] Meanwhile, in the case of ISP mode, the length condition is checked independently for the horizontal and vertical directions, and DST-7 is applied instead of DCT-2 without signaling the MTS index. It is determined whether the horizontal or vertical length is greater than or equal to 4 and less than or equal to 16, and the primary transform kernel is determined according to the determination result. Therefore, in the case of ISP mode, when LFNST can be applied, the following transform combination configuration is possible.
[0333] 1. When the LFNST index is 0 (including the case where the LFNST index is inferred to be 0), the primary transform decision condition at the time of ISP included in the current VVC standard may be followed. In other words, it may be checked whether the length condition (equal to or greater than 4 or equal to or less than 16) is satisfied independently for the horizontal and vertical directions, respectively, and if satisfied, DST-7 may be applied instead of DCT-2 for the primary transform, and if not satisfied, DCT-2 may be applied.
[0334] 2. For the case where the LFNST index is greater than 0, the following two configurations may be possible as primary transformations.
[0335] A. DCT-2 can be applied in both horizontal and vertical directions.
[0336] B. The primary transform decision condition when the ISP included in the current VVC standard can be followed. In other words, it can be checked whether the length condition (equal to or greater than 4 or equal to or less than 16) is satisfied independently for the horizontal and vertical directions, and if satisfied, DST-7 can be applied instead of DCT-2, and if not satisfied, DCT-2 can be applied.
[0337] In the ISP mode, the image information may be configured so that the LFNST index is transmitted for each partition block rather than for each coding unit. In this case, in the above-mentioned LFNST index signaling method, it may be considered that there is only one partition block in the unit in which the LFNST index is transmitted, and it may be determined whether to signal the LFNST index.
[0338] Hereinafter, signaling of a LFNST index and an MTS index is described.
[0339] The coding unit syntax table, transform unit syntax table, and residual coding syntax table related to the signaling of LFNST index and MTS index according to the example are as follows. According to Table 4, the MTS index is moved from the transform unit level syntax to the coding unit level syntax and is signaled after the LFNST index is signaled. In addition, the constraint that does not allow LFNST when the ISP is applied to the coding unit is removed. Because the constraint that does not allow LFNST when the ISP is applied to the coding unit is removed, LFNST can be applied to all intra-frame prediction blocks. In addition, both the MTS index and the LFNST index are conditionally signaled at the end of the coding unit level.
[0340] [Table 4]
[0341]
[0342] [Table 5]
[0343]
[0344] [Table 6]
[0345]
[0346] The meanings of the main variables in the table are as follows.
[0347] 1.cbWidth, cbHeight: the width and height of the current compilation block
[0348] 2.log2TbWidth, log2TbHeight: The base 2 logarithm of the width and height of the current transform block, which can be reduced to the upper left area where non-zero coefficients may exist by reflecting zeros.
[0349] 3. sps_lfnst_enabled_flag: A flag indicating whether LFNST is enabled, and if the flag value is 0, it indicates that LFNST is not enabled, and if the flag value is 1, it indicates that LFNST is enabled. It is defined in a sequence parameter set (SPS).
[0350] 4. CuPredMode[chType][x0][y0]: A prediction mode corresponding to a variable chType and a (x0, y0) position, chType may have values of 0 and 1, where 0 indicates a luma component and 1 indicates a chroma component. The (x0, y0) position indicates a position on a picture, and MODE_INTRA (intra-frame prediction) and MODE_INTER (inter-frame prediction) as values of CuPredMode[chType][x0][y0] are possible.
[0351] 5. IntraSubPartitionsSplit[x0][y0]: The content of the position (x0, y0) is the same as that in number 4. It indicates which ISP partition at the position (x0, y0) is applied, and ISP_NO_SPLIT indicates that the compilation unit corresponding to the position (x0, y0) is not divided into partition blocks.
[0352] 6. intra_mip_flag[x0][y0]: The content of the position (x0, y0) is the same as in the above number 4. intra_mip_flag is a flag indicating whether the matrix-based intra prediction (MIP) prediction mode is applied. If the flag value is 0, it indicates that MIP is not enabled, and if the flag value is 1, it indicates that MIP is enabled.
[0353] 7.cIdx: A value of 0 indicates luma, and values of 1 and 2 indicate Cb and Cr of chroma components, respectively.
[0354] 8.treeType: indicates single tree and dual tree, etc. (SINGLE_TREE: single tree, DUAL_TREE_LUMA: dual tree of luminance component, DUAL_TREE_CHROMA: dual tree of chrominance component)
[0355] 9.tu_cbf_cb[x0][y0]: The content of the position (x0, y0) is the same as that of No. 4. It indicates the coding block flag (CBF) for the Cb component. If its value is 0, it means that there is no non-zero coefficient in the corresponding transform unit for the Cb component, and if its value is 1, it indicates that there is a non-zero coefficient component in the corresponding transform unit for the Cb component.
[0356] 10. lastSubBlock: This indicates the position in the scanning order of the subblock (coefficient group (CG)) where the last non-zero coefficient is located. 0 indicates a subblock including a DC component, and in the case of greater than 0, it is not a subblock including a DC component.
[0357] 11.lastScanPos: It indicates the position of the last significant coefficient in the scan order within a subblock. If a subblock includes 16 positions, values from 0 to 15 are possible.
[0358] 12.lfnst_idx[x0][y0]: LFNST index syntax element to be parsed. If not parsed, the value 0 is inferred. That is, the default value is set to 0, indicating that LFNST is not applied.
[0359] 13. cu_sbt_flag: A flag indicating whether the Sub-Block Transform (SBT) included in the current VVC standard is applicable. A flag value equal to 0 indicates that SBT is not applicable, and a flag value equal to 1 indicates that SBT is applied.
[0360] 14.sps_explicit_mts_inter_enabled_flag, sps_explicit_mts_intra_enabled_flag: Flags indicating whether explicit MTS is applied to inter CUs and intra CUs, respectively. A flag value equal to 0 indicates that MTS is not applicable to inter CUs or intra CUs, and a flag value equal to 1 indicates that MTS is applicable.
[0361] 15.tu_mts_idx[x0][y0]: MTS index syntax element to be parsed. When not parsed, this element is inferred to have a value of 0. That is, this element is set to a default value of 0, which indicates that DCT-2 is applied horizontally and vertically.
[0362] As shown in Table 4, multiple conditions are checked when mts_idx[x0][y0] is compiled, and tu_mts_idx[x0][y0] is signaled only when lfnst_idx[x0][y0] is equal to 0.
[0363] tu_cbf_luma[x0][y0] is a flag indicating whether there is a significant coefficient for the luma component.
[0364] According to Table 4, when the width and height of the coding unit for the luminance component are both 32 or less, mts_idx[x0][y0] is sent with a signal (Max(cbWidth,cbHeight)<=32), that is, whether MTS is applied is determined by the width and height of the coding unit for the luminance component.
[0365] Furthermore, according to Table 4, it may be configured to signal lfnst_idx[x0][y0] even in ISP mode (IntraSubPartitionsSplitType!=ISP_NO_SPLIT), and the same LFNST index value may be applied to all ISP partition blocks.
[0366] However, mts_idx[x0][y0] may be signaled only in cases other than ISP mode (IntraSubPartitionsSplit[x0][y0] == ISP_NO_SPLIT).
[0367] As shown in Table 6, checking the value of mts_idx[x0][y0] may be omitted in determining log2ZoTbWidth and log2ZoTbHeight (where log2ZoTbWidth and log2ZoTbHeight represent the base 2 logarithmic values of the width and height of the upper left area remaining after clearing).
[0368] According to an example, when determining log2ZoTbWidth and log2ZoTbHeight in residual compilation, a condition to check sps_mts_enable_flag may be added.
[0369] The variable LfnstZeroOutSigCoeffFlag in Table 4 is 0 if there is a valid coefficient at the zero position when LFNST is applied, and otherwise is 1. The variable LfnstZeroOutSigCoeffFlag may be set according to a plurality of conditions shown in Table 6.
[0370] According to an example, the variable LfnstDcOnly in Table 4 is 1 when all the last significant coefficients of the transform block for which the corresponding coding block flag (CBF, which is 1 when there is at least one significant coefficient in the corresponding block, otherwise 0) is 1 are at the DC position (upper left position), otherwise 0. Specifically, the position of the last significant coefficient is checked with respect to one luma transform block in the dual-tree luma, and the position of the last significant coefficient is checked with respect to the transform block for Cb and the transform block for Cr in the dual-tree chroma. In the single tree, the position of the last significant coefficient can be checked with respect to the transform blocks for luma, Cb, and Cr.
[0371] In Table 4, MtsZeroOutSigCoeffFlag is initially set to 1, and this value can be changed in the residual coding of Table 6. When there are significant coefficients in the area to be filled with 0 by clearing (LastSignificantCoeffX>15||LastSignificantCoeffY>15), the variable MtsZeroOutSigCoeffFlag is changed from 1 to 0, in which case the MTS index is not signaled as shown in Table 4.
[0372] As shown in Table 4, when tu_cbf_luma[x0][y0] is 0, coding of mts_idx[x0][y0] may be omitted. That is, when the CBF value of the luma component is 0, the transform is not applied, and thus the MTS index does not need to be signaled. Therefore, coding of the MTS index may be omitted.
[0373] According to an example, the above technical features can be implemented in another conditional syntax. For example, after performing MTS, a variable indicating whether there is a significant coefficient in an area other than the DC area of the current block can be derived, and when the variable indicates that there is a significant coefficient in an area excluding the DC area, the MTS index can be sent with a signal. That is, the existence of a significant coefficient in an area other than the DC area of the current block indicates that the value of tu_cbf_luma[x0][y0] is 1, and in this case, the MTS index can be sent with a signal.
[0374] This variable may be expressed as MtsDcOnly, and after the variable MtsDcOnly is initially set to 1 at the coding unit level, when it is determined at the residual coding level that there are significant coefficients in an area other than DC of the current block, the value is changed to 0. When the variable MtsDcOnly is 0, the image information may be configured such that the MTS index is signaled.
[0375] When tu_cbf_luma[x0][y0] is 0, since the residual coding syntax is not called at the transform unit level of Table 5, the initial value 1 of the variable MtsDcOnly is maintained. In this case, since the variable MtsDcOnly is not changed to 0, the image information can be configured so that the MTS index is not signaled. That is, the MTS index is not parsed and signaled.
[0376] Meanwhile, the decoding apparatus may determine a color index cIdx of the transform coefficient to derive a variable MtsZeroOutSigCoeffFlag of Table 6. A color index cIdx of 0 means a luma component.
[0377] According to an example, since MTS can be applied only to the luma component of the current block, the decoding apparatus can determine whether the color index is luma when deriving the variable MtsZeroOutSigCoeffFlag for determining whether to parse the MTS index.
[0378] The variable MtsZeroOutSigCoeffFlag is a variable indicating whether clearing is performed when MTS is applied. It indicates whether there is a transform coefficient in the upper left area where the last valid coefficient may exist due to clearing after MTS is performed, that is, in an area other than the upper left 16X16 area. As shown in Table 4, the variable MtsZeroOutSigCoeffFlag is initially set to 1 (MtsZeroOutSigCoeffFlag=1) at the coding unit level, and when there is a transform coefficient in an area other than the 16X16 area, its value can be changed from 1 to 0 (MtsZeroOutSigCoeffFlag=0) at the residual coding level as shown in Table 6. When the value of the variable MtsZeroOutSigCoeffFlag is 0, the MTS index is not sent with a signal.
[0379] As shown in Table 6, at the residual coding level, a non-cleared area in which non-zero transform coefficients may exist can be set depending on whether the clearing of the accompanying MTS is performed, and even in this case, the color index (cIdx) is 0, and the non-cleared area can be set to the upper left 16X16 area of the current block.
[0380] Therefore, when deriving a variable for determining whether the MTS index is resolved, whether the color component is luma or chroma is determined. However, since LFNST can be applied to both the luma component and the chroma component of the current block, the color component is not determined when deriving a variable for determining whether to resolve the LFNST index.
[0381] For example, Table 4 shows a variable LfnstZeroOutSigCoeffFlag that can indicate that clearing is performed when LFNST is applied. The variable LfnstZeroOutSigCoeffFlag indicates whether there is a valid coefficient in the second area other than the first area at the upper left of the current block. This value is initially set to 1, and when there is a valid coefficient in the second area, the value can be changed to 0. The LFNST index can only be parsed when the value of the variable LfnstZeroOutSigCoeffFlag that is initially set is maintained at 1. When determining and deriving whether the variable LfnstZeroOutSigCoeffFlag value is 1, since LFNST can be applied to both the luminance component and the chrominance component of the current block, the color index of the current block is not determined.
[0382] When truncated unary code is applied to the LFNST index as a binarization method, the LFNST index includes a maximum of two bins, and possible LFNST index values 0, 1, and 2 are assigned binary codes of 0, 10, and 11.
[0383] According to an example, context-based CABAC coding (conventional coding) may be applied to a first bin of the LFNST index, and bypass coding may be applied to a second bin.
[0384] According to another example, context-based CABAC coding may be applied to both the first bin and the second bin of the LFNST index. The ctxInc that allocates the LFNST index according to the bin of the context coding is as follows.
[0385] [Table 7]
[0386]
[0387] As shown in Table 7, for the first bin (binIdx=0), context 0 may be applied in a single tree, and context 1 may be applied in a non-single tree. As shown in Table 14, for the second bin (binIdx=1), context 2 may be applied. That is, two contexts may be allocated to the first bin, one context may be allocated to the second bin, and each context may be distinguished by ctxInc values (0, 1, and 2).
[0388] Here, the single tree indicates that the luma component and the chroma component are coded with the same coding structure. When the coding unit is partitioned with the same coding structure, and the size of the coding unit becomes less than or equal to a specific threshold size and thus the luma component and the chroma component are coded with a separate tree structure, the coding unit can be considered as a dual tree to determine the context for the first bin. That is, as shown in Table 14, context 1 can be allocated.
[0389] Alternatively, when the value of the variable treeType is assigned as SINGLE_TREE for the first bin, context 0 may be used for compilation, otherwise, context 1 may be used for compilation.
[0390] According to the example, when the first (or second) candidate of only two LFNST core candidates is tried during the encoding process, the LFNST index has two fixed bin values for the candidate (when trying only the first candidate, the LFNST index can be compiled as 10, and when trying only the second candidate, the LFNST index can be compiled as 11). In this case, when the second bin is compiled by the bypass method, even if the second bin has a fixed value (0 or 1), a fixed amount of bits are induced for the second bin, which may significantly increase the coding cost for the second bin. When the second bin is compiled by the context method instead of the bypass method, if only one fixed LFNST core candidate is tried, the probability of the second bin appearing with a fixed value (0 or 1) can be updated toward 100%, and thus the coding cost can be significantly reduced. In summary, compared with applying two candidates, although only one LFNST core candidate is fixed and applied during the encoding process, compiling all two bins by the context method so as to compile the LFNST index can minimize the loss of coding efficiency while reducing the coding complexity, thereby giving considerable freedom when finding a performance-complexity trade-off during the encoding process.
[0391] A syntax table of a coding unit that signals a LFNST index according to an example is as follows.
[0392] [Table 8]
[0393]
[0394]
[0395] In Table 8, lfnst_idx refers to a LFNST index and may have values of 0, 1, and 2 as described above. As shown in Table 8, lfnst_idx is signaled only when the condition of (!intra_mip_flag[x0][y0]||Min(lfnstWidth, lfnstHeight)>=16) is satisfied. Here, intra_mip_flag[x0][y0] is a flag indicating whether a matrix-based intra prediction (MIP) mode is applied to the luma block to which the coordinates (x0, y0) belong. When the MIP mode is applied to the luma block, the value of the flag is 1, and when the MIP mode is not applied to the luma block, the value of the flag is 0.
[0396] lfnstWidth and lfnstHeight indicate the width and height of LFNST applied relative to the currently coded coding block (including both luma coding block and chroma coding block).When ISP is applied to the coding block, lfnstWidth and lfnstHeight may indicate the width and height of each partition block of two or four partition blocks.
[0397] In the above conditions, Min(lfnstWidth, lfnstHeight)>=16 indicates that LFNST is applicable only when the block to which MIP is applied is equal to or larger than a 16x16 block (eg, the width and height of the luma coding block to which MIP is applied are both equal to or larger than 16). The meanings of the main variables included in Table 8 are briefly introduced as follows.
[0398] 1.cbWidth, cbHeight: the width and height of the current compilation block
[0399] 2. sps_lfnst_enabled_flag: A flag indicating whether LFNST is applicable. When LFNST is applicable (enabled), the value of the flag is 1, and when LFNST is not applicable (disabled), the value of the flag is 0. The flag is defined in a sequence parameter set (SPS).
[0400] 3.CuPredMode[chType][x0][y0]: Indicates the prediction mode corresponding to chType and position (x0, y0). chType can have values of 0 and 1, where 0 indicates the luma component and 1 indicates the chroma component. The position (x0, y0) indicates the position in the picture, specifically the position when the upper left position is set to (0, 0) in the current picture. The x-coordinate and the y-coordinate increase from left to right and from top to bottom, respectively. As values of CuPredMode[chType][x0][y0], MODE_INTRA (intra-frame prediction) and MODE_INTER (inter-frame prediction) are possible.
[0401] 4. IntraSubPartitionsSplitType: Indicates whether ISP is performed on the current coding unit, and ISP_NO_SPLIT indicates that the coding unit is not a coding unit split into sub-blocks. ISP_VER_SPLIT indicates that the coding unit is split vertically, and ISP_HOR_SPLIT indicates that the coding unit is split horizontally. For example, when a W x H (width W, height H) block is split horizontally into n partition blocks, the block is split into W x (H / n) blocks, and when a W x H (width W, height H) block is split vertically into n partition blocks, the block is split into (W / n) x H blocks.
[0402] 5. SubWidthC, SubHeightC: SubWidthC and SubHeightC are values set according to the color format (or chroma format, such as 4:2:0, 4:2:2, or 4:4:4), and specifically, represent the width ratio and height ratio between the luminance component and the chroma component, respectively (see the table below).
[0403] [Table 9]
[0404] Chroma Format SubWidthC SubHeightC monochrome 1 1 4:2:0 2 2 4:2:2 2 1 4:4:4 1 1 4:4:4 1 1
[0405] 6. intra_mip_flag[x0][y0]: The content of position (x0, y0) is the same as number 3 above. intra_mip_flag is a flag indicating whether the matrix-based intra prediction (MIP) mode included in the current VVC standard is applied. When the MIP mode is applicable (enabled), the value of the flag is 1, and when the MIP mode is not applicable (disabled), the value of the flag is 0.
[0406] 7. NumIntraSubPartitions: indicates the number of partition blocks into which the compilation unit is partitioned when ISP is applied. That is, NumIntraSubPartitions indicates that the compilation unit is partitioned into NumIntraSubPartitions partition blocks.
[0407] 8. LfnstDcOnly: For all transform blocks belonging to the current coding unit, the value of the variable LfnstDcOnly is 1 when the position of each last non-zero coefficient is the DC position (i.e., the upper left position in the corresponding transform block) or there is no valid coefficient (i.e., the corresponding CBF value is 0).
[0408] In the luma separation tree or luma dual tree, the value of the variable LfnstDCOnly may be determined by checking the above condition only for the transform block corresponding to the luma component in the coding unit, and in the chroma separation tree or chroma dual tree, the value of the variable LfnstDCOnly may be determined by checking the above condition only for the transform block corresponding to the chroma component (Cb and Cr) in the coding unit. In a single tree, the value of the variable LfnstDCOnly may be determined by checking the above condition for all transform blocks corresponding to the luma component and the chroma component (Cb and Cr) in the coding unit.
[0409] 9. LfnstZeroOutSigCoeffFlag: When LFNST is applied, LfnstZeroOutSigCoeffFlag is set to 1 when there are significant coefficients only in the region where significant coefficients may exist, otherwise it is set to 0.
[0410] In a 4x4 transform block or an 8x8 transform block, up to eight significant coefficients may be located from position (0,0) (upper left) according to the scanning order in the transform block, and the remaining positions in the transform block are cleared to 0. In a transform block that is not 4x4 and 8x8 and whose width and height are equal to or greater than 4 (i.e., a transform block to which LFNST is applicable), up to 16 significant coefficients may be located from position (0,0) (upper left) according to the scanning order in the transform block (i.e., the significant coefficients may be located only within the upper left 4x4 block), and the remaining positions in the transform block are cleared to 0.
[0411] 10. cIdx: A value of 0 indicates luma, while values of 1 and 2 indicate chroma components Cb and Cr, respectively.
[0412] 11.treeType: indicates single tree, dual tree, etc. (SINGLE_TREE: single tree, DUAL_TREE_LUMA: dual tree for luminance component, DUAL_TREE_CHROMA: dual tree for chrominance component)
[0413] 12.tu_cbf_luma[x0][y0]: The content of position (x0, y0) is the same as number 3 above. tu_cbf_luma[x0][y0] indicates the coding block flag (CBF) for the luma component, where 0 indicates that there are no valid coefficients in the corresponding transform block for the luma component, and 1 indicates that there are valid coefficients in the corresponding transform block for the luma component.
[0414] 13. lfnst_idx[x0][y0]: LFNST index syntax element to be parsed. When lfnst_idx[x0][y0] is not parsed, lfnst_idx[x0][y0] is inferred to be a value of 0. That is, the default value of 0 indicates that LFNST is not applied.
[0415] In Table 8, since MIP is applied only to the luma component, intra_mip_flag[x0][y0] is a syntax element that exists only for the luma component and may be inferred to be a value of 0 when not signaled. Therefore, since intra_mip_flag[x0][y0] does not exist for the chroma component, although the chroma component is coded in the form of a separate tree or a dual tree, the variable intra_mip_flag[x0][y0] is not separately allocated for the chroma component and is not inferred to be 0. In Table 8, when lnfst_idx is signaled, the condition of (!intra_mip_flag[x0][y0]||Min(lfnstWidth, lfnstHeight)>=16) is checked, but even if intra_mip_flag[x0][y0] does not exist for the chroma component, the variable intra_mip_flag[x0][y0] may be checked. Since LFNST can be applied to chroma components, it is necessary to modify the specification text as follows.
[0416] [Table 10]
[0417]
[0418]
[0419] When the condition is modified as shown in Table 10, it is not checked whether MIP is applied to the chroma component when the LFNST index is signaled in separate tree or dual tree coding. Therefore, LFNST can be appropriately applied to the chroma component.
[0420] As shown in Table 10, when the condition of (treeType==DUAL_TREE_CHROMA||!intra_mip_flag[x0][y0]||Min(lfnstWidth, lfnstHeight)>=16)) is satisfied, the LFNST index is signaled, which means that when the tree type is a dual tree chroma type (treeType==DUAL_TREE_CHROMA), the MIP mode is not applied (!intra_mip_flag[x0][y0]), or the smaller of the width and height of the block to which LFNST is applied is 16 or more (Min(lfnstWidth, lfnstHeight)>=16)), the LFNST index is signaled. That is, when the coding block is dual tree chroma, the LFNST index is signaled without determining whether the MIP mode is applied or the width and height of the block to which LFNST is applied.
[0421] Furthermore, the above conditions may be interpreted such that when the coding block is not dual-tree chroma and MIP is not applied, the LFNST index is signaled without determining the width and height of the block to which LFNST is applied.
[0422] In addition, the above condition may be interpreted such that when the coding block is not dual-tree chroma and MIP is applied, if the smaller of the width and height of the block to which LFNST is applied is 16 or more, the LFNST index is signaled.
[0423] The following figures are provided to describe specific examples of the present disclosure. Because the specific names of the devices illustrated in the figures or the names of specific signals / messages / fields are provided for explanation, the technical features of the present disclosure are not limited to the specific names used in the following figures.
[0424] Fig.15 is a flowchart illustrating the operation of a video decoding device according to an embodiment of the present disclosure.
[0425] Fig.15 Each process disclosed in the reference is based on Figures 5 to 14 Therefore, with reference Figure 3 and Figures 5 to 14 Descriptions of specific details overlapping the details described will be omitted or will be made schematically.
[0426] The decoding apparatus 300 according to an embodiment may receive information about an intra prediction mode, residual information, and a LFNST index from a bitstream ( S1510 ).
[0427] Specifically, the decoding device 300 can decode information about the quantized transform coefficients of the current block from the bitstream, and can derive the quantized transform coefficients of the target block based on the information about the quantized transform coefficients of the current block. The information about the quantized transform coefficients of the target block may be included in a sequence parameter set (SPS) or a slice header, and may include information about whether to apply RST, information about a reduction factor, information about a minimum transform size for applying RST, information about a maximum transform size for applying RST, an inverse RST size, and at least one of information about a transform index indicating any one transform kernel matrix included in a transform set.
[0428] The decoding device may further receive information about the intra prediction mode of the current block and information about whether ISP is applied to the current block. The decoding device may receive and parse flag information indicating whether ISP coding or ISP mode is applied, thereby deriving whether the current block is divided into a predetermined number of sub-partition transform blocks. Here, the current block may be a coding block. In addition, the decoding device may derive the size and number of the divided sub-partition blocks by the flag information indicating the direction in which the current block is divided.
[0429] The decoding apparatus 300 may derive a transform coefficient by dequantizing residual information about the current block, that is, the quantized transform coefficient ( S1520 ).
[0430] The derived transform coefficients may be arranged in a 4×4 block unit according to a reverse diagonal scan order, and the transform coefficients in a 4×4 block may also be arranged according to a reverse diagonal scan order. That is, the dequantized transform coefficients may be arranged according to a reverse scan order applied in a video codec, such as in VVC or HEVC.
[0431] The decoding device may derive modified transform coefficients by applying LFNST to the transform coefficients.
[0432] LFNST is a non-separable transform in which a transform is applied to coefficients without separating the coefficients in a specific direction, unlike a primary transform in which the coefficients to be transformed are separated vertically or horizontally and transformed. This non-separable transform may be a low-frequency non-separable transform in which a forward transform is applied only to a low-frequency region rather than to the entire region of a block.
[0433] The LFNST index information is received as syntax information, and the syntax information is received as a binarized bin string including 0 and 1.
[0434] The syntax element of the LFNST index according to the present embodiment may indicate whether inverse LFNST or inverse inseparable transform is applied and any one transform kernel matrix included in the transform set, and when the transform set includes two transform kernel matrices, the syntax element of the transform index may have three values.
[0435] That is, according to an embodiment, the value of the syntax element of the LFNST index may include 0, indicating that inverse LFNST is not applied to the target block; 1, indicating the first transform kernel matrix among the transform kernel matrices; and 2, indicating the second transform kernel matrix among the transform kernel matrices.
[0436] Information about the intra prediction mode and LFNST index information may be signaled at a coding unit level.
[0437] The decoding apparatus may parse the LFNST index based on that the tree type of the current block is dual-tree chroma ( S1530 ).
[0438] According to an example, when the tree type of the current block is dual-tree chroma, the decoding device may parse the LFNST index regardless of whether the MIP mode is applied to the current block.
[0439] The current block may be a coding block, and when the current block is coded in a dual tree, it may not be checked whether MIP is applied to the chroma component when the LFNST index is signaled. In dual-tree chroma, since MIP is not applied, it is not necessary to determine whether MIP is applied in order to resolve the LFNST index.
[0440] Furthermore, when the tree type of the current block is dual-tree chroma, the decoding apparatus may parse the LFNST index regardless of whether the LFNST application width and the LFNST application height corresponding to the current block are 16 or more.
[0441] According to another example, when the tree type of the current block is not dual-tree chroma, the decoding device may parse the LFNST index based on the MIP mode not being applied to the current block. That is, when the tree type of the current block is not dual-tree chroma and the MIP mode is not applied to the current block, the LFNST index may be parsed.
[0442] According to yet another example, when the tree type of the current block is not dual-tree chroma and the MIP mode is applied to the current block, the decoding apparatus may parse the LFNST index based on that the LFNST application width and the LFNST application height corresponding to the current block are 16 or more.
[0443] That is, when the current block is not dual-tree chroma and the MIP mode is applied, when the LFNST application width and the LFNST application height satisfy a specified condition, the LFNST index may be parsed.
[0444] When the current block is vertically split, the LFNST application width corresponding to the current block is set to the width of the current block divided by the number of split sub-partitions, otherwise, that is, when the current block is not split, it is set to the width of the current block.
[0445] Likewise, when the current block is horizontally partitioned, the LFNST application height corresponding to the current block is set to the height of the current block divided by the number of partitioned sub-partitions, otherwise, that is, when the current block is not partitioned, it is set to the height of the current block. As described above, the current block may be a coding block.
[0446] Subsequently, the decoding apparatus may derive a modified transform coefficient from the transform coefficient based on the LFNST index and the LFNST matrix used for LFNST ( S1540 ).
[0447] The decoding apparatus may determine an LFNST set including an LFNST matrix based on the intra prediction mode derived from the information about the intra prediction mode, and may select any one of a plurality of LFNST matrices based on the LFNST set and the LFNST index.
[0448] Here, the same LFNST set and the same LFNST index may be applied to the sub-partition transform blocks into which the current block is partitioned. That is, since the same intra prediction mode is applied to the sub-partition transform blocks, the LFNST set determined based on the intra prediction mode may also be equally applied to all sub-partition transform blocks. In addition, since the LFNST index is signaled at the coding unit level, the same LFNST matrix may be applied to the sub-partition transform blocks into which the current block is partitioned.
[0449] As described above, a transform set 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 included in the transform set indicated by an LFNST index, that is, any one LFNST matrix. A matrix applied to inverse LFNST may be referred to as an inverse LFNST matrix or a LFNST matrix, and may be referred to by any term as long as the matrix is the transpose of a matrix used for forward LFNST.
[0450] In an example, the inverse LFNST matrix may be a non-square matrix where the number of columns is less than the number of rows.
[0451] The decoding apparatus may derive residual samples of the current block based on the primary inverse transform of the modified transform coefficient ( S1550 ).
[0452] Here, as the primary inverse transform, a conventional separable transform may be used, or the aforementioned MTS may be used.
[0453] Subsequently, the decoding apparatus 300 may generate a reconstructed sample based on the residual sample of the current block and the prediction sample of the current block ( S1560 ).
[0454] The following figures are provided to describe specific examples of the present disclosure. Because the specific names of the devices or the names of specific signals / messages / fields illustrated in the figures are provided for explanation, the technical features of the present disclosure are not limited to the specific names used in the following figures.
[0455] Fig.16 is a flowchart illustrating the operation of a video encoding apparatus according to an embodiment of the present disclosure.
[0456] Fig.16 Each process disclosed in the reference is based on Figures 5 to 14 Therefore, with reference Figure 2 and Figures 5 to 14 Descriptions of specific details overlapping the details described will be omitted or will be made schematically.
[0457] The encoding apparatus 200 according to an embodiment may derive a prediction sample of a current block based on an intra prediction mode applied to the current block.
[0458] When applying ISP to the current block, the encoding apparatus may perform prediction on each sub-partitioned transform block.
[0459] The encoding device can determine whether to apply ISP coding or ISP mode to the current block (ie, coding block), and can determine the direction in which the current block is partitioned, and can derive the size and number of partitioned sub-blocks according to the determination result.
[0460] The same intra prediction mode can be applied to the sub-partition transform blocks into which the current block is partitioned, and the encoding device can derive prediction samples for each sub-partition transform block. That is, the encoding device performs intra prediction in sequence according to the partition form of the sub-partition transform block, for example, horizontally or vertically, or from left to right or from top to bottom. For the leftmost or topmost sub-block, the reconstructed pixels of the already coded coding block are referenced, as in the conventional intra prediction method. Further, for each side of a subsequent internal sub-partition transform block that is not adjacent to the previous sub-partition transform block, in order to derive reference pixels adjacent to the side, the reconstructed pixels of the already coded adjacent coding block are referenced, as in the conventional intra prediction method.
[0461] The encoding apparatus 200 may derive residual samples of the current block based on the prediction samples ( S1610 ).
[0462] The encoding apparatus 200 may derive a transformation coefficient of the current block by applying at least one of LFNST or MTS to the residual sample, and may arrange the transformation coefficients according to a predetermined scanning order.
[0463] The encoding apparatus may derive a transform coefficient of the current block based on the primary transform of the residual sample ( S1620 ).
[0464] The primary transform may be performed by multiple transform cores, as in MTS, in which case the transform core may be selected based on the intra prediction mode.
[0465] The encoding apparatus 200 may determine whether to perform a secondary transform or a non-separable transform, in particular, LFNST, on a transform coefficient of a current block, and may derive a modified transform coefficient by applying LFNST to the transform coefficient.
[0466] LFNST is a non-separable transform in which the transform is applied to coefficients without separating the coefficients in a specific direction, unlike a primary transform that separates the coefficients to be transformed vertically or horizontally and transforms them. This non-separable transform may be a low-frequency non-separable transform that applies the transform only to a low-frequency region instead of the entire target block to be transformed.
[0467] The encoding apparatus may determine whether LFNST is applicable to the current block based on the tree type of the current block, and may derive a modified transform coefficient from the transform coefficient based on an LFNST matrix for LFNST ( S1630 ).
[0468] According to an example, when the tree type of the current block is dual-tree chroma, the encoding apparatus may apply LFNST regardless of whether the MIP mode is applied to the current block.
[0469] The current block may be a coding block, and when the current block is coded in the dual-tree, since MIP is not applied in the dual-tree chroma, it is not necessary to determine whether to apply MIP when determining whether to apply LFNST.
[0470] Also, when the tree type of the current block is dual-tree chroma, the encoding apparatus may determine to apply LFNST regardless of whether an LFNST application width and an LFNST application height corresponding to the current block are 16 or more.
[0471] According to another example, when the tree type of the current block is not dual-tree chroma, the encoding device may determine to apply LFNST based on the fact that the MIP mode is not applied to the current block and may perform LFNST. That is, when the tree type of the current block is not dual-tree chroma and the MIP mode is not applied to the current block, LFNST may be performed.
[0472] According to yet another example, when the tree type of the current block is not dual-tree chroma and the MIP mode is applied to the current block, the encoding apparatus may perform LFNST based on a LFNST application width and a LFNST application height corresponding to the current block being 16 or more.
[0473] That is, when the current block is not dual-tree chroma and the MIP mode is applied, LFNST may be performed when the width of LFNST application and the height of LFNST application satisfy a prescribed condition.
[0474] The width of the LFNST application corresponding to the current block is set to the width of the current block divided by the number of sub-partitions of the split when the current block is vertically split, otherwise, ie, when the current block is not split, it is set to the width of the current block.
[0475] Likewise, the height of the LFNST application corresponding to the current block is set to the height of the current block divided by the number of sub-partitions when the current block is horizontally split, otherwise, i.e., when the current block is not split, it is set to the width of the current block. As described above, the current block may be a coding block.
[0476] The encoding apparatus 200 may determine an LFNST set based on a mapping relationship according to an intra prediction mode applied to a current block, and may perform LFNST, ie, non-separable transform, based on any one of two LFNST matrices included in the LFNST set.
[0477] Here, the same LFNST set and the same LFNST index may be applied to the sub-partition transform blocks into which the current block is partitioned. That is, since the same intra prediction mode is applied to the sub-partition transform blocks, the LFNST set determined based on the intra prediction mode may also be equally applied to all sub-partition transform blocks. In addition, since the LFNST index is encoded by the coding unit, the same LFNST matrix may be applied to the sub-partition transform blocks into which the current block is partitioned.
[0478] As described above, the transform set may be determined according to the intra prediction mode of the transform block to be transformed. The matrix applied to LFNST is the transpose of the matrix used for inverse LFNST.
[0479] In an example, the LFNST matrix may be a non-square matrix in which the number of rows is less than the number of columns.
[0480] The encoding apparatus may derive a quantized transform coefficient by quantizing the modified transform coefficient of the current block, and may encode information about the quantized transform coefficient and an LFNST index indicating the LFNST matrix based on that the tree type of the current block is dual-tree chroma ( S1640 ).
[0481] When the current block is coded in the dual tree, since MIP is not applied in the dual tree chroma, the encoding apparatus may encode the LFNST index without determining whether the MIP is applied.
[0482] When the tree type of the current block is dual-tree chroma, the encoding apparatus may encode the LFNST index regardless of whether the width of the LFNST application corresponding to the current block and the height of the LFNST application are 16 or more.
[0483] According to another example, when the tree type of the current block is not dual-tree chroma, the encoding device may encode the LFNST index based on the MIP mode not being applied to the current block. That is, when the tree type of the current block is not dual-tree chroma and the MIP mode is not applied to the current block, the LFNST index may be encoded.
[0484] According to yet another example, when the tree type of the current block is not dual-tree chroma and the MIP mode is applied to the current block, the encoding apparatus may encode the LFNST index based on that the width of the LFNST application corresponding to the current block and the height of the LFNST application are 16 or more.
[0485] That is, when the current block is not dual-tree chroma and the MIP mode is applied, when the width of LFNST application and the height of LFNST application satisfy a prescribed condition, the LFNST index may be encoded.
[0486] The encoding device may generate residual information including information about the quantized transform coefficients. The residual information may include the aforementioned transform-related information / syntax elements. The encoding device may encode the image / video information including the residual information, and may output the image / video information in the form of a bitstream.
[0487] Specifically, the encoding apparatus 200 may generate information about the quantized transform coefficient and may encode the information about the quantized transform coefficient.
[0488] The syntax element of the LFNST index according to the present embodiment may indicate whether to apply (inverse) LFNST and any one of the LFNST matrices included in the LFNST set, and when the LFNST set includes two transform kernel matrices, the syntax element of the LFNST index may have three values.
[0489] According to an example, when the partitioned tree structure of the current block is a dual tree type, an LFNST index may be encoded for each of a luma block and a chroma block.
[0490] According to an embodiment, the value of the syntax element of the transform index may include: 0, which indicates that no (inverse) LFNST is applied to the current block; 1, which indicates the first LFNST matrix among the LFNST matrices; and 2, which indicates the second LFNST matrix among the LFNST matrices.
[0491] 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.
[0492] 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.
[0493] In the above embodiments, the method is described 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 simultaneously with another step. In addition, it can be understood by a person 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 of the flowchart may be removed without affecting the scope of the present disclosure.
[0494] 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 an image processing device such as a TV, a computer, a smart phone, a set-top box, a display device, etc.
[0495] When the embodiments in the present disclosure are specifically implemented by software, the above methods can be embodied as modules (processes, functions, etc.) for performing the above functions. The module 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 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), a 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 specifically implemented and executed on a processor, a microprocessor, a controller or a chip. For example, the functional units shown in each figure can be specifically implemented and executed on a computer, a processor, a microprocessor, a controller or a chip.
[0496] 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.
[0497] In addition, the processing method of the present disclosure can be generated in the form of a program executed by a computer and stored in a computer-readable recording medium. Multimedia data with a data structure according to the present disclosure can also be stored in a computer-readable recording medium. Computer-readable recording media include all kinds of storage devices and distributed storage devices in which computer-readable data is stored. 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 embodied in the form of a carrier (e.g., transmission via the Internet). In addition, the bit stream generated by the encoding method can be stored in a computer-readable recording medium or sent via a wired or wireless communication network. Additionally, the embodiments of the present disclosure can be embodied as a computer program product through a program code, and the program code can be executed on a computer through an embodiment of the present disclosure. The program code can be stored on a computer-readable carrier.
[0498] 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. Furthermore, 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 comprising: deriving transform coefficients for a current block from a bitstream; deriving residual samples for the current block based on a non-separable transform of the transform coefficients for the current block; as well as Generate a reconstructed picture based on the residual samples, wherein a transform index for the inseparable transform is parsed from the bitstream based on a tree type of the current block, wherein the transformation index indicates one of the transformation kernel matrices, and Wherein, regardless of whether the matrix-based intra prediction MIP mode is applied to the current block or the information of the first width and the first height of the current block, the transform index is parsed based on the tree type of the current block being dual-tree chroma.
2. The method according to claim 1, wherein: When the tree type of the current block is not the dual-tree chroma, the transform index is parsed based on that the MIP mode is not applied to the current block.
3. The method according to claim 1, wherein: When the tree type of the current block is not the dual-tree chroma, the transform index is parsed based on the first width and the first height being greater than or equal to 16.
4. The method according to claim 3, wherein: When the current block is vertically partitioned into sub-partitions, the first width is set to the width of the current block divided by the number of sub-partitions, and when the current block is not partitioned into the sub-partitions, the first width is set to the width of the current block, and The current block is a compilation block.
5. The method according to claim 3, wherein: When the current block is horizontally partitioned into sub-partitions, the first height is set to the height of the current block divided by the number of the sub-partitions, and when the current block is not partitioned into the sub-partitions, the first height is set to the height of the current block, and The current block is a compilation block.
6. A method comprising: deriving residual samples for the current block; deriving transform coefficients for the current block from the residual samples based on a non-separable transform; as well as encoding a transform index for said non-separable transform, wherein the transformation index indicates one of the transformation kernel matrices, wherein the transform index is encoded based on a tree type of the current block, and Wherein, regardless of whether the matrix-based intra prediction MIP mode is applied to the current block or the information of the first width and the first height of the current block, the transform index is encoded based on that the tree type of the current block is dual-tree chroma.
7. The method according to claim 5, wherein: When a tree type of the current block is not the dual-tree chroma, the transform index is encoded based on that the MIP mode is not applied to the current block.
8. The method according to claim 6, wherein: When the tree type of the current block is not the dual-tree chroma, the transform index is encoded based on the first width and the first height being greater than or equal to 16.
9. The method according to claim 8, wherein: When the current block is vertically partitioned into sub-partitions, the first width is set to the width of the current block divided by the number of sub-partitions, and when the current block is not partitioned into the sub-partitions, the first width is set to the width of the current block, and The current block is a compilation block.
10. The method according to claim 8, wherein: When the current block is horizontally partitioned into sub-partitions, the first height is set to the height of the current block divided by the number of the sub-partitions, and when the current block is not partitioned into the sub-partitions, the first height is set to the height of the current block, and The current block is a compilation block.
11. A method comprising: Obtaining a bitstream for an image, wherein the bitstream is generated based on: deriving residual samples for a current block, deriving transform coefficients for the current block from the residual samples based on a non-separable transform, and encoding transform indices for the non-separable transform; and sending data comprising said bit stream, wherein the transformation index indicates one of the transformation kernel matrices, wherein the transform index is encoded based on a tree type of the current block, and Wherein, regardless of whether the matrix-based intra prediction MIP mode is applied to the current block or the information of the first width and the first height of the current block, the transform index is encoded based on that the tree type of the current block is dual-tree chroma.