Transform-based video encoding method and device therefor
By modifying transform coefficients through the purging of LFNST indices based on specific conditions, the method improves video compression efficiency and reduces costs associated with high-resolution video data transmission and storage.
Patent Information
- Application Number
- JP2025025819
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2019-11-13
- Filing Date
- 2025-02-20
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2040-11-13
AI Technical Summary
Current video encoding technologies face challenges in efficiently compressing and transmitting high-quality video data, particularly for high-resolution and immersive media, which results in increased transmission and storage costs.
The proposed method involves a video decoding method that modifies transform coefficients by purging the Low-Frequency Non-Separable Transform (LFNST) index based on specific conditions, such as the application of Intra Scene Prediction (ISP) or the presence of valid coefficients in the DC component of the current block, using individual transform skip flag values for color components.
This approach enhances the overall video compression efficiency, increases the efficiency of LFNST index coding, and improves the coding efficiency of LFNST indexes based on conversion skip flags, thereby reducing transmission and storage costs.
Smart Images

Figure 2025071241000001_ABST
Abstract
Description
[Technical field]
[0001] This document relates to video encoding technology, and more particularly to a transform-based video encoding method and apparatus in a video encoding system. [Background technology]
[0002] In recent years, the demand for high-resolution, high-quality images / videos such as 4K or 8K or higher UHD (Ultra High Definition) images / videos is increasing in various fields. As the image / video data has higher resolution and quality, the amount of information or bits transmitted relatively increases compared to existing image / video data, so when image data is transmitted using a medium such as an existing wired or wireless broadband line or when image / video data is stored using an existing storage (preservation, storage) medium, the transmission cost and storage cost increase.
[0003] In addition, in recent years, interest in and demand for immersive media such as virtual reality (VR), artificial reality (AR) content, and holograms has been increasing, and the broadcast of images / videos with different image characteristics from real images, such as game images, is on the rise.
[0004] Accordingly, there is a demand for a highly efficient image / video compression technology in order to effectively compress and transmit, store, and play back high-resolution, high-quality image / video information having the above-mentioned various characteristics. Summary of the Invention [Problem to be solved by the invention]
[0005] The technical problem of this document is to provide a method and apparatus for improving video coding efficiency.
[0006] Another technical problem of this document is to provide a method and apparatus for improving LFNST index coding efficiency.
[0007] Yet another technical problem of this document is to provide a method and apparatus for improving coding efficiency of LFNST indexes based on transform skip flags. [Means for solving the problem]
[0008] According to one embodiment of the present document, there is provided a video decoding method executed by a decoding device, the method comprising: deriving modified transform coefficients, the deriving modified transform coefficients comprising parsing an LFNST index based on a variable indicating whether an ISP is applied to the current block according to a tree type of the current block or whether significant coefficients exist in a DC component of the current block, the variable may be derived based on individual transform skip flag values for color components of the current block.
[0009] The LFNST index can be parsed regardless of the value of the variable based on whether the current block is a single type or dual tree luma and ISP is applied.
[0010] If the current block is a dual tree chroma, the LFNST index may be parsed based on the variables indicating that there is a significant coefficient at a position that is not a DC component.
[0011] Based on the transform skip flag value being 0 for a color component, the variable can indicate that a significant coefficient exists at a position that is not a DC component.
[0012] The variable is initially set to 1 at the coding unit level of the current block, and if the transform skip flag value is 0, the variable is changed to 0 from the residual coding level, and the LFNST index may be parsed based on the variable being 0.
[0013] If the tree type of the current block is dual tree chroma, a variable may be derived based on the value of the transform skip flag for the chroma Cb component and the value of the transform skip flag for the chroma Cr component.
[0014] The transform skip flag for the current block can be signaled per color component.
[0015] Deriving the modified transform coefficients may further include setting a number of variables for the LFNST based on whether the LFNST index is not zero and whether the individual transform skip flag values of the color components are zero.
[0016] According to one embodiment of the present document, there is provided a video encoding method to be performed by an encoding device, the method comprising applying LFNST to derive modified transform coefficients from transform coefficients, the modified transform coefficients being derived based on variables indicating whether an ISP is applied to the current block according to a tree type of the current block or whether there are valid coefficients in a DC component of the current block, the variables may be derived based on respective transform skip flag values for color components of the current block.
[0017] According to yet another embodiment of the present document, a digital storage medium may be provided that stores encoded video information generated according to the video encoding method performed by an encoding device, and video data having a bitstream.
[0018] According to yet another embodiment of the present document, a digital storage medium may be provided having stored thereon encoded video information and video data having a bitstream that causes a decoding device to perform the video decoding method. Effect of the Invention
[0019] This document can improve the overall image / video compression efficiency.
[0020] This document improves the efficiency of LFNST index coding.
[0021] According to this document, the coding efficiency of LFNST index can be improved based on the transform skip flag.
[0022] The effects obtained through a specific example of the present specification are not limited to the effects listed above. For example, there may be various technical effects that a person having ordinary skill in the related art can understand or derive from the present specification. Thus, the specific effects of the present specification are not limited to those explicitly described in the present specification, and may have various effects that can be understood or derived from the technical features of the present specification. [Brief description of the drawings]
[0023] [Figure 1] FIG. 1 illustrates a schematic diagram of an example of a video / image encoding system to which this document can be applied. [Diagram 2] A diagram that illustrates the configuration of a video / image encoding device to which this document can be applied. [Diagram 3] A diagram illustrating the configuration of a video / image decoding device to which this document can be applied. [Figure 4] FIG. 1 illustrates a schematic diagram of a multiple conversion technique according to an embodiment of the present document; [Diagram 5] FIG. 13 is a diagram illustrating an example of intra-directional modes of 65 prediction directions. [Figure 6] FIG. 1 is a diagram illustrating a RST according to one embodiment of this document. [Figure 7] 13 is a diagram illustrating an example of a sequence in which output data of a forward linear transform is arranged into a one-dimensional vector. FIG. [Figure 8] 13 is a diagram illustrating an example of a sequence in which output data of a forward quadratic transform is arranged in a two-dimensional block. FIG. [Figure 9] FIG. 1 illustrates a wide-angle intra-prediction mode according to one embodiment of the present document. [Figure 10] FIG. 13 shows the shape of a block to which LFNST is applied. [Figure 11] FIG. 13 illustrates an arrangement of output data of a forward LFNST according to an example. [Figure 12] FIG. 13 illustrates an example in which the number of output data items for a forward LFNST is limited to a maximum of 16 items. [Figure 13] FIG. 13 is a diagram illustrating zero-out in a block to which 4×4 LFNST is applied, according to an example. [Figure 14] FIG. 13 is a diagram illustrating zero-out in a block to which 8×8 LFNST is applied, according to an example. [Figure 15] FIG. 2 is a diagram illustrating a video decoding method according to an example. [Figure 16] 1 is a diagram illustrating an example of a video coding method. [Figure 17] FIG. 1 is an exemplary structural diagram of a content streaming system to which this document applies; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0024] Although this document can be modified in various ways and can have various embodiments, a specific embodiment will be illustrated in the drawings and described in detail. However, this is not intended to limit this document to a specific embodiment. Terms commonly used in this specification are used only to describe a specific embodiment and are not intended to limit the technical ideas in this document. A singular expression includes a plural expression unless the context clearly indicates otherwise. In this specification, terms such as "include" or "have" are intended to specify the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and should be understood not to preclude the presence or addition of one or more different features, numbers, steps, operations, components, parts, or combinations thereof.
[0025] Meanwhile, each configuration in the drawings described in this document is shown independently for the convenience of explaining the different characteristic functions, and does not mean that each configuration is realized by separate hardware or software. For example, two or more of each configuration may be combined to form one configuration, and one configuration may be divided into multiple configurations. An embodiment in which each configuration is integrated and / or separated is also included in the scope of this document as long as it does not deviate from the essence of this document.
[0026] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, the preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following, the same reference numerals are used for the same components in the drawings, and the duplicated description of the same components will be omitted.
[0027] This document relates to video / image encoding. For example, the methods / embodiments disclosed in this document may be related to the Versatile Video Coding (VVC) standard (ITU-T Rec. H.266), next-generation video / image coding standards beyond VVC, or other video coding related standards (e.g., the High Efficiency Video Coding (HEVC) standard (ITU-T Rec. H.265), the essential video coding (EVC) standard, the AVS2 standard, etc.).
[0028] Various embodiments relating to video / image encoding are presented in this document and, unless otherwise stated, the embodiments may be performed in combination with each other.
[0029] In this document, video may refer to a collection of a series of images over time. A picture generally refers to a unit that shows one image at a specific time, and a slice / tile is a unit that constitutes a part of a picture in coding. A slice / tile may include one or more coding tree units (CTUs). One picture may be composed of one or more slices / tiles. One picture may be composed of one or more tile groups. One tile group may include one or more tiles.
[0030] A pixel or a pel may refer to the smallest unit constituting one picture (or image). A term corresponding to a pixel may also be used as a "sample." A sample may generally refer to a pixel or a pixel value, may refer to only a pixel / pixel value of a luma component, or may refer to only a pixel / pixel value of a chroma component. Alternatively, a sample may refer to a pixel value in a spatial domain, or may refer to a transform coefficient in the frequency domain when such a pixel value is transformed into a frequency domain.
[0031] A unit may indicate a basic unit of video processing. A unit may include at least one of a specific region of a picture and information about the region. One unit may include one luma block and two chroma (e.g., Cb, cr) blocks. A unit may be mixed with terms such as a block or an area, depending on the case. In a general case, an M×N block may include a set (or array) of samples or transform coefficients consisting of M columns and N rows.
[0032] In this document, " / " and "," are interpreted as "and / or." For example, "A / B" is interpreted as "A and / or B," and "A, B" is interpreted as "A and / or B." Furthermore, "A / B / C" means "at least one of A, B, and / or C." Also, "A, B, C" means "at least one of A, B, and / or C."
[0033] Additionally, in this document, "or" is to be interpreted as "and / or." For example, "A or B" can mean 1) "A" only, 2) "B" only, or 3) "A and B." In other words, "or" in this document can mean "additionally or alternatively."
[0034] In this specification, "at least one of A and B" may mean "only A," "only B," or "both A and B." In addition, in this specification, the expressions "at least one of A or B" and "at least one of A and / or B" may be interpreted similarly to "at least one of A and B."
[0035] In addition, in this specification, "at least one of A, B and C" can mean "only A," "only B," "only C," or "any combination of A, B and C." Furthermore, "at least one of A, B or C" and "at least one of A, B and / or C" can mean "at least one of A, B and C."
[0036] In addition, parentheses used in this specification may mean "for example." Specifically, when "prediction (intra prediction)" is indicated, "intra prediction" may be proposed as an example of "prediction." In other words, "prediction" in this specification is not limited to "intra prediction," and "intra prediction" may be proposed as an example of "prediction." In addition, when "prediction (i.e., intra prediction)" is indicated, "intra prediction" may be proposed as an example of "prediction."
[0037] Technical features described separately in one drawing in this specification may be embodied separately or simultaneously.
[0038] FIG. 1 illustrates a schematic diagram of an example of a video / image encoding system to which this document can be applied.
[0039] 1, a video / image encoding system may include a source device and a receiving device. The source device may transmit encoded video / image information or data to the receiving device in the form of a file or streaming via a digital storage medium or a network.
[0040] The source device may include a video source, an encoding device, and a sending unit. The receiving device may include a receiving unit, a decoding device, and a renderer. The encoding device may be called a video / video encoding device, and the decoding device may be called a video / video decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may also include a display unit, which may be a separate device or an external component.
[0041] A video source may acquire video / images through a video / image capture, synthesis, or generation process, etc. A video source may include a video / image capture device and / or a video / image generation device. A video / image capture device may include, for example, one or more cameras, a video / image archive containing previously captured video / images, etc. A video / image generation device may include, for example, a computer, a tablet, a smartphone, etc., and may (electronically) generate video / images. For example, a virtual video / image may be generated via a computer, etc., in which case the video / image capture process may be replaced by a process in which related data is generated.
[0042] An encoding device can encode an input video / image. The encoding device can perform a series of steps such as prediction, transformation, quantization, etc. for compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.
[0043] The transmitting unit may transmit the encoded video / image information or data output in the form of a bitstream to a receiving unit of a receiving device via a digital storage medium or a network in the form of a file or streaming. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitting unit may include elements for generating a media file through a predetermined file format and may include elements for transmission via a broadcasting / communication network. The receiving unit may receive / extract the bitstream and transmit it to a decoding device.
[0044] The decoding device can decode the video / image by performing a series of steps such as inverse quantization, inverse transformation, prediction, etc., which correspond to the operations of the encoding device.
[0045] The renderer can render the decoded video / image. The rendered video / image can be displayed via a display unit.
[0046] 2 is a diagram for briefly explaining the configuration of a video / image encoding device to which this document can be applied. Hereinafter, the video encoding device may include an image encoding device.
[0047] Referring to FIG. 2, the encoding apparatus 200 may be configured to include an image partitioner 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter predictor 221 and an intra predictor 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 may further include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstructed block generator. The image division unit 210, the prediction unit 220, the residual processing unit 230, the entropy encoding unit 240, the addition unit 250, and the filtering unit 260 may be configured by one or more hardware components (e.g., an encoder chip set or a processor) depending on the embodiment. In addition, the memory 270 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The above hardware components may further include the memory 270 as an internal / external component.
[0048] The image division unit 210 may divide an input image (or a picture, a frame) input to the encoding device 200 into one or more processing units. As an example, the processing unit may be called a coding unit (CU). In this case, the coding unit may be recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) according to a quad-tree binary-tree ternary-tree (QTBTTT) structure. For example, one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad-tree structure, a binary tree structure, and / or a ternary tree structure. In this case, for example, the quad-tree structure may be applied first, and then the binary tree structure and / or the ternary tree structure may be applied. Alternatively, the binary tree structure may be applied first. Based on the final coding unit that is not further divided, the coding procedure according to this document may be performed. In this case, based on coding efficiency according to image characteristics, the largest coding unit may be immediately used as the final coding unit, or, if necessary, the coding unit may be recursively divided into coding units of lower depths, and a coding unit of an optimal size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later. As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may each be divided or partitioned from the final coding unit described above.The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.
[0049] The unit can be mixed with terms such as block or area, depending on the case. In the general case, an M×N block can refer to a set of samples or transform coefficients consisting of M columns and N rows. A sample can generally refer to a pixel or a pixel value, or can refer to only a pixel / pixel value of a luma component, or can refer to only a pixel / pixel value of a chroma component. A sample can be used as a term corresponding to a pixel or pel of a picture (or image).
[0050] The subtraction unit 231 may subtract a prediction signal (predicted block, prediction sample, or prediction sample array) output from the prediction unit 220 from an 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 transmitted to the conversion unit 232. The prediction unit 220 may perform prediction on a block to be processed (hereinafter, referred to as a current block) and generate a predicted block including a prediction sample for the current block. The prediction unit 220 may determine whether intra prediction or inter prediction is applied in units of the current block or CU. The prediction unit may generate various information related to prediction, such as prediction mode information, and transmit the information to the entropy encoding unit 240, as described later in the description of each prediction mode. The prediction information may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
[0051] The intra prediction unit 222 can predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from the current block depending on the prediction mode. The prediction modes in the intra prediction can include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes can include, for example, a DC mode and a planar mode. The directional modes can include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the degree of granularity of the prediction direction. However, this is an example, and more or less directional prediction modes may be used depending on the settings. The intra prediction unit 222 can also determine the prediction mode to be applied to the current block using the prediction modes applied to the neighboring blocks.
[0052] The inter prediction unit 221 may derive a predicted block for the current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. Then, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples 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 further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring blocks may include a spatial neighboring block present in the current picture and a temporal neighboring block present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be called a collocated reference block, a collocated CU (col CU), etc., and the reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, the inter prediction unit 221 may generate information indicating which candidate is used to construct a motion information candidate list based on neighboring blocks and derive a motion vector and / or a reference picture index of the current block. Inter prediction may be performed based on various prediction modes, and for example, in the case of skip mode and merge mode, the inter prediction unit 221 may use the motion information of the neighboring blocks as the motion information of the current block. In the case of skip mode, unlike the merge mode, a residual signal may not be transmitted.In the case of a Motion Vector Prediction (MVP) mode, the motion vector of the current block can be indicated by using the motion vector of a neighboring block as a motion vector predictor and signaling the motion vector difference.
[0053] The prediction unit 220 may generate a prediction signal based on various prediction methods described below. For example, the prediction unit may apply not only intra prediction or inter prediction for prediction of one block, but also intra prediction and inter prediction simultaneously. This may be called Combined Inter and Intra Prediction (CIIP). The prediction unit may also perform intra block copy (IBC) for prediction of a block. The intra block copy may be used for coding of content images / videos such as games, for example, as in Screen Content Coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in deriving a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document.
[0054] The prediction signal generated through the inter prediction unit 221 and / or the intra prediction unit 222 may be used to generate a reconstruction signal or may be used to generate a residual signal. The transform unit 232 may generate transform coefficients 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 conditionally non-linear transform (CNT). Here, the GBT refers to a transform obtained from a graph when the relationship information between pixels is expressed as a graph. The CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process may be applied to pixel blocks having the same square size, or may be applied to blocks of variable sizes that are not square.
[0055] The quantizer 233 quantizes the transform coefficients and transmits the quantized transform coefficients to the entropy encoder 240, which may encode the quantized signal (information on the quantized transform coefficients) and output the quantized signal to a bitstream. The information on the quantized transform coefficients may be referred to as residual information. The quantizer 233 may rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and may generate information on 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 exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC). The entropy encoder 240 may also encode information required for video / image restoration (e.g., values of syntax elements, etc.) together with or separately from the quantized transform coefficients. The encoded information (e.g., encoded video / image information) may be transmitted or stored in the form of a bitstream in Network Abstraction Layer (NAL) units. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / image information may further include general constraint information. Signaling / transmitted information and / or syntax elements described later in this document may be encoded through the encoding procedure described above and included in the bitstream. The bitstream may be transmitted over a network or stored in a digital storage medium.Here, the network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitting unit (not shown) for transmitting the signal output from the entropy encoding unit 240 and / or a storage unit (not shown) for storing the signal may be configured as an internal / external element of the encoding device 200, or the transmitting unit may be included in the entropy encoding unit 240.
[0056] The quantized transform coefficients output from the quantizer 233 may be used to generate a prediction signal. For example, a residual signal (residual block or residual sample) may be reconstructed by applying inverse quantization and inverse transform to the quantized transform coefficients via the inverse quantizer 234 and the inverse transformer 235. The adder 250 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample, or reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the predictor 220. When there is no residual for the current block, such as when a skip mode is applied, the predicted block may be used as the reconstructed block. The generated reconstructed signal may be used for intra prediction of the next current block in the current picture, and may also be used for inter prediction of the next picture after filtering, as described below.
[0057] Meanwhile, Luma Mapping with Chroma Scaling (LMCS) may be applied during picture encoding and / or restoration.
[0058] The filtering unit 260 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 260 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may store the modified reconstructed picture in the memory 270, specifically, in the DPB of the memory 270. The various filtering methods may include, for example, deblock filtering, Sample Adaptive Offset (SAO), an adaptive loop filter, a bilateral filter, etc. The filtering unit 260 may generate various information related to filtering and transmit it to the entropy encoding unit 290, as will be described later in the description of each filtering method. The filtering information may be encoded by the entropy encoding unit 290 and output in the form of a bitstream.
[0059] The modified reconstructed picture transmitted to the memory 270 may be used as a reference picture in the inter prediction unit 280. When inter prediction is applied through this, the encoding apparatus may avoid a mismatch in prediction between the encoding apparatus 200 and the decoding apparatus, and may also improve coding efficiency.
[0060] The DPB of the memory 270 may store the modified reconstructed picture to be used as a reference picture in the inter prediction unit 221. The memory 270 may store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 221 to be utilized as motion information of a spatial peripheral block or motion information of a temporal peripheral block. The memory 270 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 222.
[0061] FIG. 3 is a diagram illustrating a schematic configuration of a video / image decoding device to which the present document can be applied.
[0062] Referring to FIG. 3, the decoding device 300 may be configured to include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 may include an inter predictor 331 and an intra predictor 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 321. The entropy decoder 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be configured as one hardware component (e.g., a decoder chipset or processor) according to an embodiment. In addition, the memory 360 may include a decoded picture buffer (DPB) and may be configured as a digital storage medium. The above hardware components may further include a memory 360 as an internal / external component.
[0063] When a bitstream including video / image information is input, the decoding apparatus 300 can restore an image corresponding to the process in which the video / image information is processed by the encoding apparatus of FIG. 2. For example, the decoding apparatus 300 can derive units / blocks based on information on block division acquired from the bitstream. The decoding apparatus 300 can perform decoding using a processing unit applied in the encoding apparatus. Thus, the processing unit of the decoding may be, for example, a coding unit, and the coding unit may be divided from a coding tree unit or a maximal coding unit according to a quadtree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units may be derived from the coding unit. Then, the restored image signal decoded and output by the decoding apparatus 300 can be reproduced by a reproduction device.
[0064] The decoding device 300 may receive a signal output from the encoding device of FIG. 2 in the form of a bitstream, and the received signal may be decoded via the entropy decoding unit 310. For example, the entropy decoding unit 310 may derive information (e.g., video / image information) required for image restoration (or picture restoration) by parsing the bitstream. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. The decoding device may further decode pictures based on information on the parameter set and / or the general constraint information. Signaling / received information and / or syntax elements described later in this document may be decoded via the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 may decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output values of syntax elements required for image restoration and quantized values of transform coefficients related to residuals. More specifically, the CABAC entropy decoding method may receive bins corresponding to each syntax element in the bitstream, determine a context model using syntax element information to be decoded, decode information of neighboring and to-be-decoded blocks, or information of symbols / bins decoded in a previous stage, predict the occurrence probability of a bin according to the determined context model, and perform arithmetic decoding of the bins to generate a symbol corresponding to the value of each syntax element. In this case, the CABAC entropy decoding method may update the context model using information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model.Among the information decoded by the entropy decoding unit 310, information on prediction is provided to the prediction unit 330, and information on the residual on which entropy decoding is performed by the entropy decoding unit 310, i.e., quantized transform coefficients and related parameter information, may be input to the inverse quantization unit 321. Also, among the information decoded by the entropy decoding unit 310, information on filtering may be provided to the filtering unit 350. Meanwhile, a receiving unit (not shown) for receiving a signal output from the encoding device may be further configured as an internal / external element of the decoding device 300, or the receiving unit may be a component of the entropy decoding unit 310. Meanwhile, the decoding device according to the present document may be called a video / image / picture decoding device, and the decoding device may be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoding unit 310, and the sample decoder may include at least one of the inverse quantization unit 321, the inverse transform unit 322, the prediction unit 330, the addition unit 340, the filtering unit 350, and the memory 360.
[0065] The inverse quantization unit 321 may inverse quantize the quantized transform coefficients and output the transform coefficients. The inverse quantization unit 321 may rearrange the quantized transform coefficients in a two-dimensional block form. In this case, the rearrangement may be performed based on a coefficient scanning order performed in the encoding device. The inverse quantization unit 321 may perform inverse quantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) and obtain transform coefficients.
[0066] The inverse transform unit 322 inverse transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0067] The prediction unit may perform prediction on the current block and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on the prediction information output from the entropy decoding unit 310, and may determine a specific intra / inter prediction mode.
[0068] The prediction unit may generate a prediction signal based on various prediction methods described below. For example, the prediction unit may apply intra prediction or inter prediction for prediction of one block, as well as intra prediction and inter prediction simultaneously. This may be called Combined Inter and Intra Prediction (CIIP). The prediction unit may also perform intra block copy (IBC) for prediction of a block. The intra block copy may be used for content image / video coding such as games, for example, as Screen Content Coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in deriving a reference block within the current picture. That is, IBC may utilize at least one of the inter prediction techniques described in this document.
[0069] The intra prediction unit 332 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located far away depending on the prediction mode. Prediction modes in intra prediction may include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 332 may also determine a prediction mode to be applied to the current block using prediction modes applied to neighboring blocks.
[0070] The inter prediction unit 331 may derive a predicted block for the current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. At that time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between a neighboring block and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring block may include a spatial neighboring block present in the current picture and a temporal neighboring block present in the reference picture. For example, the inter prediction unit 331 may configure a motion information candidate list based on the neighboring block and derive a motion vector and / or a reference picture index for the current block based on the received candidate selection information. Inter prediction may be performed based on various prediction modes, and the information regarding the prediction may include information indicating a mode of inter prediction for the current block.
[0071] The adder 340 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the obtained residual signal to the prediction signal (predicted block, predicted sample array) output from the prediction unit 330. When there is no residual for the current block, such as when a skip mode is applied, the predicted block may be used as the reconstructed block.
[0072] The adder 340 may be referred to as a reconstruction unit or a reconstruction block generator. The generated reconstruction signal may be used for intra prediction of the next block to be processed in the current picture, and may be output after filtering as described below, or may be used for inter prediction of the next picture.
[0073] Meanwhile, Luma Mapping with Chroma Scaling (LMCS) can be applied during the picture decoding process.
[0074] The filtering unit 350 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 350 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may transmit the modified reconstructed picture to the memory 360, specifically, to the DPB of the memory 360. The various filtering methods may include, for example, deblock filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.
[0075] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter prediction unit 331. The memory 360 can store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information can be transmitted to the inter prediction unit 331 to be utilized as motion information of a spatial surrounding block or motion information of a temporal surrounding block. The memory 360 can store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 332.
[0076] In this specification, the embodiments described for the prediction unit 330, inverse quantization unit 321, inverse transform unit 322, and filtering unit 350 of the decoding device 300 can be applied identically or correspondingly to the prediction unit 220, inverse quantization unit 234, inverse transform unit 235, and filtering unit 260 of the decoding device 200, respectively.
[0077] As described above, prediction is performed to improve compression efficiency when performing video coding. Through this, a predicted block including predicted samples for a current block that is a block to be coded can be generated. Here, the predicted block includes predicted samples in a spatial domain (or a pixel domain). The predicted block is derived in the same way in an encoding device and a decoding device, and the encoding device can improve video encoding efficiency by signaling information (residual information) on a residual between the original block and the predicted block to a decoding device, rather than the original sample values of the original block themselves. The decoding device can derive a residual block including residual samples based on the residual information, combine the residual block with the predicted block to generate a reconstructed block including reconstructed samples, and generate a reconstructed picture including the reconstructed block.
[0078] The residual information may be generated through a transform and quantization procedure. For example, an encoding apparatus may derive a residual block between the original block and the predicted block, perform a transform procedure on residual samples (residual sample array) included in the residual block to derive transform coefficients, perform a quantization procedure on the transform coefficients to derive quantized transform coefficients, and signal related residual information to a decoding apparatus (via a bitstream). Here, the residual information may include information such as value information, position information, transform technique, transform kernel, and quantization parameter of the quantized transform coefficients. The decoding apparatus may perform an inverse quantization / inverse transform procedure based on the residual information to derive a residual sample (or a residual block). The decoding apparatus may generate a reconstructed picture based on the predicted block and the residual block. Also, the encoding apparatus may derive a residual block by inverse quantizing / inverse transforming the quantized transform coefficients for reference for inter-prediction of a subsequent picture, and generate a reconstructed picture based on the residual block.
[0079] FIG. 4 illustrates a schematic of the multiple transformation technique according to this document.
[0080] Referring to Figure 4, the conversion unit may correspond to the conversion unit in the encoding device of Figure 2 described above, and the inverse conversion unit may correspond to the inverse conversion unit in the encoding device of Figure 2 described above or the inverse conversion unit in the decoding device of Figure 3.
[0081] The transform unit may perform a primary transform based on residual samples (residual sample array) in the residual block to derive (primary) transform coefficients (S410). Such a primary transform may be referred to as a core transform. Here, the primary transform may be based on Multiple Transform Selection (MTS), and when multiple transforms are applied as the primary transform, it may be referred to as a multiple core transform.
[0082] The multi-core transform may refer to a method of transforming by further using a Discrete Cosine Transform (DCT) type 2, a Discrete Sine Transform (DST) type 7, a DCT type 8, and / or a DST type 1. That is, the multi-core transform may refer to a transform method of transforming a residual signal (or a residual block) in a spatial domain into transform coefficients (or first transform coefficients) in a frequency domain based on a plurality of transform kernels selected from the DCT type 2, the DST type 7, the DCT type 8, and the DST type 1. Here, the first transform coefficients may be called tentative transform coefficients from the perspective of a transform unit.
[0083] In other words, when the existing transform method is applied, a spatial domain to frequency domain transform may be applied to the residual signal (or residual block) based on DCT type 2 to generate transform coefficients. Differently, when the above-mentioned multiple core transform is applied, a spatial domain to frequency domain transform may be applied to the residual signal (or residual block) based on DCT type 2, DST type 7, DCT type 8, and / or DST type 1, etc. to generate transform coefficients (or primary transform coefficients). Here, DCT type 2, DST type 7, DCT type 8, and DST type 1, etc. may be referred to as transform types, transform kernels, or transform cores. Such DCT / DST transform types may be defined based on basis functions.
[0084] When the multi-core transform is performed, a vertical transform kernel and a horizontal transform kernel for a current block may be selected from the transform kernels, and a vertical transform for the current block may be performed based on the vertical transform kernel, and a horizontal transform for the current block may be performed based on the horizontal transform kernel. Here, the horizontal transform may indicate a transform for a horizontal component of the current block, and the vertical transform may indicate a transform for a vertical component of the current block. The vertical transform kernel / horizontal transform kernel may be adaptively determined based on a prediction mode and / or a transform index of a current block (CU or sub-block) including a residual block.
[0085] Also, according to one example, when applying MTS to perform a linear transformation, a specific basis function may be set to a predetermined value, and when it is a vertical transformation or a horizontal transformation, a mapping relationship for the transformation kernel may be set by combining which basis function is applied or not when it is a vertical transformation or a horizontal transformation. For example, when the horizontal transformation kernel is represented by trTypeHor and the vertical transformation kernel is represented by trTypeVer, a value of 0 for trTypeHor or trTypeVer may be set to DCT2, a value of 1 for trTypeHor or trTypeVer may be set to DST7, and a value of 2 for trTypeHor or trTypeVer may be set to DCT8.
[0086] In this case, MTS index information can be encoded and signaled to a decoding device to indicate one of a number (plurality) of transform kernel sets. For example, an MTS index of 0 can indicate that the values of trTypeHor and trTypeVer are all 0, an MTS index of 1 can indicate that the values of trTypeHor and trTypeVer are all 1, an MTS index of 2 can indicate that the value of trTypeHor is 2 and the value of trTypeVer is 1, an MTS index of 3 can indicate that the value of trTypeHor is 1 and the value of trTypeVer is 2, and an MTS index of 4 can indicate that the values of trTypeHor and trTypeVer are all 2.
[0087] As an example, a conversion kernel set according to index information of MTS is shown in the table below.
[0088] [Table 1]
[0089] The transform unit performs a secondary transform based on the (primary) transform coefficients to derive modified (secondary) transform coefficients (S420). The primary transform is a transform from a spatial domain to a frequency domain, and the secondary transform refers to a transform to a more compressed representation using a correlation existing between the (primary) transform coefficients. The secondary transform includes a non-separable transform. In this case, the secondary transform may be called a Non-Separable Secondary Transform (NSST) or a Mode-dependent Non-Separable Secondary Transform (MDNSST). The non-separable secondary transform refers to a transform in which the (primary) transform coefficients derived by the primary transform are secondary transformed based on a non-separable transform matrix to generate modified transform coefficients (or secondary transform coefficients) for a residual signal. Here, the non-separable transform matrix can be used to apply the transform to the (first-order) transform coefficients at once without separating the vertical transform and the horizontal transform (or independently applying the horizontal-vertical transform). In other words, the non-separable second-order transform is a transform method in which, for example, a two-dimensional signal (transform coefficient) is rearranged into a one-dimensional signal in a specific direction (for example, a row-first direction or a column-first direction) without being applied separately to the (first-order) transform coefficients, and then a modified transform coefficient (or a second-order transform coefficient) is generated based on the non-separable transform matrix. For example, the row-first order is to arrange the first row, the second row, ..., the Nth row in a row for an MxN block, and the column-first order is to arrange the first column, the second column, ..., the Mth column in a row for an MxN block. The non-separable second-order transform can be applied to a top-left region of a block (hereinafter, referred to as a transform coefficient block) composed of (first-order) transform coefficients. For example, if the width (W) and height (H) of the transform coefficient block are both greater than or equal to 8, an 8x8 non-separable quadratic transform may be applied to the top-left 8x8 region of the transform coefficient block.Also, if the width (W) and height (H) of the transform coefficient block are both equal to or greater than 4, but the width (W) or height (H) of the transform coefficient block is smaller than 8, a 4×4 non-separable secondary transform may be applied to the upper left min(8,W)×min(8,H) region of the transform coefficient block. However, the embodiment is not limited thereto, and for example, even if only the condition that the width (W) or height (H) of the transform coefficient block is both equal to or greater than 4 is satisfied, a 4×4 non-separable secondary transform may be applied to the upper left min(8,W)×min(8,H) region of the transform coefficient block.
[0090] Specifically, for example, if a 4×4 input block is used, the non-separable quadratic transform can be performed as follows:
[0091] The above 4×4 input block X can be expressed as follows:
[0092] <Formula 1>
number
[0093] If the above X is expressed in the form of a vector, the vector JPEG2025071241000004.jpg84 can be represented as:
[0094] <Formula 2>
number
[0095] As shown in Equation 2, the vector JPEG2025071241000006.jpg84 rearranges the two-dimensional block of X in Equation 1 into a one-dimensional vector in row-first order.
[0096] In this case, the second-order non-separable transform can be computed as follows:
[0097] <Formula 3>
number
[0098] Where: JPEG2025071241000008.jpg75 denotes the transform coefficient vector, and T denotes the 16×16 (non-separable) transform matrix.
[0099] Through the above formula 3, the 16×1 transform coefficient vector Above JPEG2025071241000009.jpg75 can be derived JPEG2025071241000010.jpg75 can be re-organized into 4x4 blocks via the scan order (horizontal, vertical, diagonal, etc.). However, the above calculations are merely examples, and in order to reduce the computational complexity of the non-separable quadratic transform, a Hypercube-Givens Transform (HyGT) or the like can be used to calculate the non-separable quadratic transform.
[0100] Meanwhile, the non-separable secondary transform may select a transform kernel (or transform core, transform type) on a mode-dependent basis, where the mode may include an intra-prediction mode and / or an inter-prediction mode.
[0101] As mentioned above, the non-separable secondary transform can 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 contained within the transform coefficient block when W and H are all equal to or greater than 8, and the 8×8 region can be an upper left 8×8 region within the transform coefficient block. Similarly, the 4×4 transform refers to a transform that can be applied to a 4×4 region contained within the transform coefficient block when W and H are all equal to or greater than 4, and the 4×4 region can be an upper left 4×4 region within the transform coefficient block. For example, the 8×8 transform kernel matrix can be a 64×64 / 16×64 matrix, and the 4×4 transform kernel matrix can be a 16×16 / 8×16 matrix.
[0102] Then, for mode-based transform kernel selection, two non-separable quadratic transform kernels may be configured per transform set for the non-separable quadratic transform for both the 8×8 transform and the 4×4 transform, and the transform sets may be four. 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, the four transform sets for the 8×8 transform may include two 8×8 transform kernels each, and in this case, the four transform sets for the 4×4 transform may include two 4×4 transform kernels each.
[0103] However, the size of the transform, i.e., the size of the region to which the transform is applied, may be other than, for example, 8x8 or 4x4, the number of sets may be n, and the number of transform kernels in each set may be k.
[0104] The transform set may be referred to as an NSST set or an LFNST set. The selection of a particular one of the transform sets may be performed based on, for example, the intra-prediction mode of the current block (CU or sub-block). LFNST (Low-Frequency Non-Separable Transform) may be an example of a reduced non-separable transform, which will be described later, and refers to a non-separable transform for low-frequency components.
[0105] For reference, for example, the intra prediction modes may include two non-directional (non-angular) intra prediction modes and 65 directional (angular) intra prediction modes. The non-directional intra prediction modes may include a planar intra prediction mode numbered 0 and a DC intra prediction mode numbered 1, and the directional intra prediction modes may include 65 intra prediction modes numbered 2 to 66. However, this is merely an example, and the present document may be applied to cases where the number of intra prediction modes is different. Meanwhile, depending on the case, an intra prediction mode numbered 67 may also be used, and the intra prediction mode numbered 67 may indicate a Linear Model (LM) mode.
[0106] FIG. 5 exemplarily shows intra-directional modes of 65 prediction directions.
[0107] Referring to FIG. 5, intra prediction modes having horizontal directionality and intra prediction modes having vertical directionality can be distinguished from each other with respect to intra prediction mode no. 34 having a prediction direction of the diagonal at the lower right. H and V in FIG. 5 respectively mean horizontal directionality and vertical directionality, and the numbers from -32 to 32 indicate a displacement of 1 / 32 units on a sample grid position. This can indicate an offset to a mode index value. Intra prediction modes no. 2 to 33 have horizontal directionality, and intra prediction modes no. 34 to 66 have vertical directionality. Meanwhile, intra prediction mode no. 34 can be regarded as neither horizontal nor vertical directionality strictly speaking, but can be classified as belonging to horizontal directionality from the viewpoint of determining a transform set of a secondary transform. This is because the input data is transposed for vertical modes symmetrical around the 34th intra prediction mode, and the input data alignment method for the horizontal mode is used for the 34th intra prediction mode. Transposing the input data means that for MxN two-dimensional block data, rows become columns and columns become rows to form NxM data. The 18th intra prediction mode and the 50th intra prediction mode indicate horizontal intra prediction mode and vertical intra prediction mode, respectively, and the 2nd intra prediction mode predicts in the upper right direction using the reference pixel on the left, so it can be called the upper right diagonal intra prediction mode. In the same context, the 34th intra prediction mode can be called the lower right diagonal intra prediction mode, and the 66th intra prediction mode can be called the lower left diagonal intra prediction mode.
[0108] As an example, depending on the intra prediction mode, the mapping of the four transform sets may be shown, for example, as in the following table.
[0109] [Table 2]
[0110] As shown in Table 2, depending on the intra prediction mode, one of four transform sets, i.e., lfnstTrSetIdx can be mapped to 0 to 3, i.e., one of four.
[0111] Meanwhile, when it is determined that a specific set is to be used for non-separable transform, one of the k transform kernels in the specific set may be selected through a non-separable secondary transform index. The encoding device may derive a non-separable secondary transform index that points to a specific transform kernel based on a rate-distortion (RD) check, and may signal the non-separable secondary transform index to a decoding device. The decoding device may select one of the k transform kernels in the specific set based on the non-separable secondary transform index. For example, an index value 0 of lfnst may point to a first non-separable secondary transform kernel, an index value 1 of lfnst may point to a second non-separable secondary transform kernel, and an index value 2 of lfnst may point to a third non-separable secondary transform kernel. Alternatively, an index value 0 of lfnst may indicate that a first non-separable secondary transform is not applied to a current block, and index values 1 to 3 of lfnst may point to the three transform kernels.
[0112] The transform unit may perform the non-separable quadratic transform based on the selected transform kernel to obtain modified (quadratic) transform coefficients. The modified transform coefficients may be derived from the transform coefficients quantized via the quantizer as described above, encoded, and signaled to a decoding device and transmitted to an inverse quantization / inverse transform unit in an encoding device.
[0113] On the other hand, when the secondary transform is omitted as described above, the (primary) transform coefficients, which are the output of the primary (separate) transform, can be derived as quantized transform coefficients via a quantization unit as described above, encoded, and signaled to a decoding device and transmitted to an inverse quantization / inverse transform unit in an encoding device.
[0114] The inverse transform unit may perform a series of steps in the reverse order of the steps performed by the transform unit described above. The inverse transform unit may receive (dequantized) transform coefficients, perform a secondary (inverse) transform to derive (primary) transform coefficients (S450), and perform a primary (inverse) transform on the (primary) transform coefficients to obtain a residual block (residual sample) (S460). Here, the primary transform coefficients may be called modified transform coefficients from the perspective of the inverse transform unit. As described above, the encoding device and the decoding device may generate a reconstructed block based on the residual block and a predicted block, and generate a reconstructed picture based on the reconstructed block.
[0115] Meanwhile, the decoding apparatus may further include a secondary inverse transform application determining unit (or an element for determining whether the secondary inverse transform can be applied) and a secondary inverse transform determining unit (or an element for determining the secondary inverse transform). The secondary inverse transform application determining unit may determine whether the secondary inverse transform can be applied. For example, the secondary inverse transform may be NSST, RST, or LFNST, and the secondary inverse transform application determining unit may determine whether the secondary inverse transform can be applied based on a secondary transform flag parsed from the bitstream. As another example, the secondary inverse transform application determining unit may determine whether the secondary inverse transform can be applied based on a transform coefficient of a residual block.
[0116] The secondary inverse transform decision unit may determine a secondary inverse transform. At this time, the secondary inverse transform decision unit may determine a secondary inverse transform to be applied to the current block based on an LFNST (NSST or RST) transform set designated by an intra prediction mode. In addition, as an embodiment, a secondary transform decision method may be determined depending on a primary transform decision method. Various combinations of the primary transform and the secondary transform may be determined according to an intra prediction mode. In addition, as an example, the secondary inverse transform decision unit may determine an area to which the secondary inverse transform is applied based on a size of the current block.
[0117] On the other hand, as described above, if the secondary (inverse) transform is omitted, the (dequantized) transform coefficients may be received and the primary (separate) inverse transform may be performed to obtain a residual block (residual sample). The encoding device and the decoding device may generate a reconstructed block based on the residual block and the predicted block, and generate a reconstructed picture based on the reconstructed block, as described above.
[0118] On the other hand, in this paper, in order to reduce the computational complexity and memory requirements associated with non-separable secondary transforms, the Reduced Secondary Transform (RST), in which the size of the transform matrix (kernel) is reduced based on the concept of NSST, can be applied.
[0119] Meanwhile, the coefficients constituting the transformation kernel, transformation matrix, and transformation kernel matrix described herein, i.e., kernel coefficients or matrix coefficients, may be expressed in 8 bits. This may be one condition for implementation in a decoding device and an encoding device, and may reduce the memory requirement for storing the transformation kernel with a reasonably acceptable performance degradation compared to the existing 9 bits or 10 bits. In addition, by expressing the kernel matrix in 8 bits, a small multiplier may be used, which may be more suitable for SIMD (Single Instruction Multiple Data) instructions used for optimal software implementation.
[0120] In this specification, RST may refer to a transform performed on residual samples for a target block based on a transform matrix whose size is reduced by a simplification factor. When performing a simplified transform, the amount of calculations required during the transform may be reduced due to the reduction in the size of the transform matrix. That is, RST may be used to solve the problem of complexity of calculations that occurs during the transform of a large block or a non-separable transform.
[0121] The RST may be called by various terms such as reduced transform, reduced transform, reduced secondary transform, reduction transform, simplified transform, simple transform, etc., and the names by which the RST may be called are not limited to the examples given. Alternatively, the RST may be called an LFNST (Low-Frequency Non-Separable Transform) since it is mainly performed in a low-frequency domain including non-zero coefficients in a transform block. The transform index may be called an LFNST index.
[0122] Meanwhile, when the secondary inverse transform is performed based on a RST, the inverse transform unit 235 of the encoding device 200 and the inverse transform unit 322 of the decoding device 300 may include an inverse RST unit for deriving modified transform coefficients based on an inverse RST for the transform coefficients, and an inverse linear transform unit for deriving residual samples for the target block based on an inverse linear transform for the modified transform coefficients. The inverse linear transform refers to an inverse transform of a linear transform applied to a residual. In this document, deriving transform coefficients based on a transform may refer to deriving transform coefficients by applying the transform.
[0123] FIG. 6 is a diagram illustrating a RST according to an embodiment of this document.
[0124] In this specification, a "target block" may refer to a current block or a residual block or a transform block on which coding is performed.
[0125] In an RST according to an embodiment, an N dimensional vector is mapped to an R dimensional vector located in a different space, and a reduced transformation matrix can be determined, where R is smaller than N. N may represent the square of the length of one side of a block to which a transformation is applied, or the total number of transformation coefficients corresponding to the block to which a transformation is applied, and the simplification factor may represent an R / N value. The simplification factor may be referred to by various terms such as a reduced factor, a reduction factor, a simplified factor, and a simple factor. Meanwhile, R may be referred to as a reduced coefficient, but the simplification factor may represent R depending on the case. The simplification factor may also represent an N / R value depending on the case.
[0126] In one embodiment, the simplification factors or simplification coefficients may be signaled via the bitstream, but the embodiment is not limited thereto. For example, predefined values for the simplification factors or simplification coefficients may be stored in each encoding device 200 and decoding device 300, in which case the simplification factors or simplification coefficients may not be separately signaled.
[0127] The size of the simplified transformation matrix according to an embodiment is RxN, which is smaller than the size NxN of the normal transformation matrix, and can be defined as Equation 4 below.
[0128] <Formula 4>
number
[0129] The matrix T in the Reduced Transform block shown in FIG. 6(a) is the matrix T in Equation 4. RxN As shown in FIG. 6(a), the simplified transformation matrix T RxN When multiplied by, the transform coefficients for the current block can be derived.
[0130] In one embodiment, when the size of the block to which the transform is applied is 8×8 and R=16 (i.e., R / N=16 / 64=1 / 4), the RST according to FIG. 6(a) can be expressed by a matrix operation as shown in Equation 5 below. In this case, the memory and multiplication operations can be reduced to about 1 / 4 due to the simplification factor.
[0131] In this document, a matrix operation can be understood as an operation in which a matrix is placed to the left of a column vector and the matrix is multiplied by the column vector to obtain the column vector.
[0132] <Formula 5>
number
[0133] In Formula 5, r1 to r 64 may represent residual samples for the current block, and more specifically, may be transform coefficients generated by applying a linear transform. As a result of the operation of Equation 5, the transform coefficients c i can be derived, c i The derivation process is as shown in Equation 6.
[0134] <Formula 6>
number
[0135] As a result of the calculation of Equation 6, the transform coefficients c1 to c2 for the target block are RThat is, when R=16, the transform coefficients c1 to c 16 can be derived. If a regular transform, instead of the RST, is applied and a transform matrix having a size of 64×64 (N×N) is multiplied by the residual sample having a size of 64×1 (N×1), 64 (N) transform coefficients for the current block may be derived, but since the RST is applied, only 16 (R) transform coefficients for the current block are derived. Since the total number of transform coefficients for the current block is reduced from N to R and the amount of data transmitted from the encoding device 200 to the decoding device 300 is reduced, the transmission efficiency between the encoding device 200 and the decoding device 300 may be increased.
[0136] Considering the size of the transformation matrix, the size of the normal transformation matrix is 64 x 64 (NxN), but the size of the simplified transformation matrix is reduced to 16 x 64 (RxN), so compared to performing normal transformation, memory usage can be reduced by a ratio of R / N when performing RST. Also, compared to the number of multiplication operations NxN when using the normal transformation matrix, the number of multiplication operations can be reduced by a ratio of R / N when using the simplified transformation matrix (RxN).
[0137] In one embodiment, the transform unit 232 of the encoding device 200 may derive transform coefficients for the current block by performing a primary transform and an RST-based secondary transform on residual samples for the current block. Such transform coefficients may be transmitted to an inverse transform unit of the decoding device 300, and the inverse transform unit 322 of the decoding device 300 may derive modified transform coefficients based on an inverse reduced secondary transform (RST) on the transform coefficients and derive residual samples for the current block based on an inverse primary transform on the modified transform coefficients.
[0138] Inverse RST matrix T according to one embodiment NxRThe size of the simplified transformation matrix T RxN and are in a transpose relationship.
[0139] The matrix T in the Reduced Inv. Transform block shown in Figure 6(b) t is the inverse RST matrix T RxN T As shown in FIG. 6(b), the inverse RST matrix T RxN T When the inverse RST matrix T is multiplied by T, modified transform coefficients for the current block or residual samples for the current block can be derived. RxN T is (T RxN ) T NxR It is also sometimes expressed as:
[0140] More specifically, when the inverse RST is applied to the secondary inverse transform, the inverse RST matrix T RxN T Alternatively, an inverse RST may be applied to the inverse linear transform, in which case an inverse RST matrix T RxN T Once multiplied by, residual samples for the current block can be derived.
[0141] In one embodiment, when the size of the block to which the inverse transform is applied is 8×8 and R=16 (i.e., R / N=16 / 64=1 / 4), the RST according to (b) of FIG. 6 can be expressed by a matrix operation as shown in Equation 7 below.
[0142] <Formula 7>
number
[0143] In Formula 7, c1 to c 16 may represent the transform coefficients for the current block. As a result of the operation of Equation 7, r j can be derived, and r j The derivation process is as shown in Equation 8.
[0144] <Formula 8>
number
[0145] As a result of the operation of Equation 8, r1 to r2 denote modified transform coefficients for the target block or residual samples for the target block. N can be derived. Considering the size of the inverse transformation matrix, the size of a normal inverse transformation matrix is 64 x 64 (NxN), but the size of the simplified inverse transformation matrix is reduced to 64x16 (NxR), so compared to performing a normal inverse transformation, memory usage can be reduced by a ratio of R / N when performing inverse RST. Also, compared to the number of multiplication operations NxN when using a normal inverse transformation matrix, when using a simplified inverse transformation matrix, the number of multiplication operations can be reduced by a ratio of R / N (NxR).
[0146] Meanwhile, the configuration of the transform set as shown in Table 2 can be applied to the 8×8 RST. That is, the 8×8 RST can be applied by the transform set in Table 2. Since one transform set is composed of two or three transforms (kernels) according to the prediction mode in the screen, it can be configured to select one of up to four transforms, including the case where the secondary transform is not applied. When the secondary transform is not applied, the transform can be considered as the one applied with the identity matrix. When the four transforms are assigned indices 0, 1, 2, and 3 (for example, the 0th index can be assigned to the identity matrix, i.e., when the secondary transform is not applied), a syntax element called a transform index or an lfnst index can be signaled for each block of transform coefficients to specify the transform to be applied. That is, for the 8×8 upper left block, the 8×8 RST can be specified in the RST configuration through the transform index, or the 8×8 lfnst can be specified when the LFNST is applied. An 8×8 lfnst and an 8×8 RST refer to a transform that may be applied to an 8×8 region contained within a block of transform coefficients when the W and H of the current block to be transformed are all equal to or greater than 8, and the 8×8 region may be the top-left 8×8 region within the block of transform coefficients. Similarly, a 4×4 lfnst and a 4×4 RST refer to a transform that may be applied to a 4×4 region contained within a block of transform coefficients when the W and H of the current block are all equal to or greater than 4, and the 4×4 region may be the top-left 4×4 region within the block of transform coefficients.
[0147] Meanwhile, according to an embodiment of this document, in the transformation of the encoding process, instead of a 16×64 transformation kernel matrix, only 48 pieces of data constituting an 8×8 region can be selected, and a maximum 16×48 transformation kernel matrix can be applied. Here, "maximum" means that for an m×48 transformation kernel matrix capable of generating m coefficients, the maximum value of m is 16. That is, when an m×48 transformation kernel matrix (m≦16) is applied to an 8×8 region to perform RST, 48 pieces of data can be input and m coefficients can be generated. When m is 16, 48 pieces of data can be input and 16 coefficients can be generated. That is, when 48 pieces of data form a 48×1 vector, a 16×1 vector can be generated by multiplying the 16×48 matrix and the 48×1 vector in order. At that time, the 48 pieces of data constituting the 8×8 region can be appropriately arranged to form a 48×1 vector. In this case, when a matrix operation is performed by applying a transform kernel matrix of up to 16x48, 16 modified transform coefficients are generated, and the 16 modified transform coefficients may be arranged in the upper left 4x4 area according to the scan order, and the upper right 4x4 area and the lower left 4x4 area may be filled with 0s.
[0148] A transposed matrix of the above-mentioned transform kernel matrix may be used for the inverse transform of the decoding process. That is, when an inverse RST or an LFNST is performed in the inverse transform process performed in the decoding device, input coefficient data to which the inverse RST is applied may be composed of one-dimensional vectors according to a predetermined arrangement order, and modified coefficient vectors obtained by multiplying the one-dimensional vectors by the matrix of the inverse RST on the left side may be arranged in a two-dimensional block according to a predetermined arrangement order.
[0149] In summary, when RST or LFNST is applied to an 8×8 region in the transformation process, a matrix operation is performed between 48 transform coefficients in the upper left, upper right, and lower left regions of the 8×8 region, excluding the lower right region of the 8×8 region, and a 16×48 transform kernel matrix. For the matrix operation, the 48 transform coefficients are input into a one-dimensional array. When such a matrix operation is performed, 16 modified transform coefficients are derived, and the modified transform coefficients may be arranged in the upper left region of the 8×8 region.
[0150] Conversely, when the inverse RST or LFNST is applied to an 8×8 region in the inverse transform process, 16 transform coefficients corresponding to the upper left side of the 8×8 region among the transform coefficients of the 8×8 region are input in a one-dimensional array form according to the scan order and may be subjected to a matrix operation with a 48×16 transform kernel matrix. That is, the matrix operation in this case may be expressed as (48×16 matrix)*(16×1 transform coefficient vector)=(48×1 modified transform coefficient vector). Here, since the nx1 vector may be interpreted as an nx1 matrix, it may also be expressed as an nx1 column vector. Also, * means a matrix multiplication operation. When such a matrix operation is performed, 48 modified transform coefficients may be derived, and the 48 modified transform coefficients may be arranged in the upper left, upper right, and lower left regions of the 8×8 region, excluding the lower right region.
[0151] Meanwhile, when the secondary inverse transform is performed based on a RST, the inverse transform unit 235 of the encoding device 200 and the inverse transform unit 322 of the decoding device 300 may include an inverse RST unit for deriving modified transform coefficients based on an inverse RST for the transform coefficients, and an inverse linear transform unit for deriving residual samples for the target block based on an inverse linear transform for the modified transform coefficients. The inverse linear transform refers to an inverse transform of the linear transform applied to the residual. In this document, deriving transform coefficients based on a transform may refer to deriving transform coefficients by applying the transform.
[0152] 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.
[0153] The encoding device applies a forward primary (core) transform, and then applies a forward secondary transform using the derived result (or a portion of the result) as input.
[0154] <Formula 9>
number
[0155] In the above formula 9, x and y are the input and output of the quadratic transformation, respectively, and G is a matrix indicating the quadratic transformation, and the transform basis vector is composed of column vectors. In the case of backward 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 is G T It becomes dimensional.
[0156] In the case of reverse LFNST, the dimensions of the matrix G are [48×16], [48×8], [16×16], and [16×8]. The [48×8] and [16×8] matrices are submatrices obtained by sampling 8 transformation basis vectors from the left side of the [48×16] and [16×16] matrices, respectively.
[0157] On the other hand, in the case of forward LFNST, the matrix G T The dimensions of are [16x48], [8x48], [16x16], and [8x16], where the [8x48] and [8x16] matrices are submatrices obtained by sampling the eight transformation basis vectors from above the [16x48] and [16x16] matrices, respectively.
[0158] Therefore, in the case of forward LFNST, the input x can be a [48×1] vector or a [16×1] vector, and the output y can be a [16×1] vector or a [8×1] vector. Since the output of the forward linear transform in video coding and decoding is two-dimensional (2D) data, in order to construct a [48×1] vector or a [16×1] vector as the input x, the 2D data that is the output of the forward transform must be appropriately arranged to construct a one-dimensional vector.
[0159] FIG. 7 is a diagram showing an example of a sequence for arranging output data of a forward linear transform into a one-dimensional vector. The left diagrams of (a) and (b) of FIG. 7 show a sequence for creating a [48×1] vector, and the right diagrams of (a) and (b) of FIG. 7 show a sequence for creating a [16×1] vector. In the case of LFNST, 2D data is sequentially arranged in the order shown in (a) and (b) of FIG. 7 to obtain a one-dimensional vector x.
[0160] The arrangement direction of the output data of the forward primary transform may be determined according to the intra prediction mode of the current block. For example, if the intra prediction mode of the current block is a horizontal direction based on a diagonal direction, the output data of the forward primary transform may be arranged in the order of (a) of FIG. 7, and if the intra prediction mode of the current block is a vertical direction based on a diagonal direction, the output data of the forward primary transform may be arranged in the order of (b) of FIG.
[0161] As an example, an ordering different from that of (a) and (b) in Figures 7 can be applied, and in order to derive the same result (y vector) as when the ordering of (a) and (b) in Figures 7 is applied, the column vectors of matrix G can be rearranged according to the ordering. That is, the column vectors of G can be rearranged so that each element constituting the x vector is always multiplied by the same transformation base vector.
[0162] Since the output y derived via Equation 9 is a one-dimensional vector, if a configuration that processes the result of a forward quadratic transform as input, such as a configuration that performs quantization or residual coding, requires two-dimensional data as input data, then the output y vector of Equation 9 must again be appropriately arranged into 2D data.
[0163] FIG. 8 is a diagram illustrating an example of a sequence in which output data of a forward quadratic transform is arranged in a two-dimensional block.
[0164] In the case of LFNST, the output values can be arranged in a 2D block according to a determined scan order. FIG. 8(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 a diagonal scan order. FIG. 8(b) shows that when the output y is an [8×1] vector, the output values are arranged in 8 positions of the 2D block according to a diagonal scan order, and the remaining 8 positions are filled with 0. X in FIG. 8(b) indicates that it is filled with 0.
[0165] As another example, depending on the configuration for performing quantization or residual coding, the order in which the output vector y is processed may be performed according to a preset order, so the output vector y may not be arranged in a 2D block as in Fig. 8. However, in the case of residual coding, data coding may be performed in units of 2D blocks (e.g., 4x4) such as coefficient groups (CGs), in which case data may be arranged according to a specific order such as the diagonal scan order of Fig. 8.
[0166] Meanwhile, the decoding device can arrange (arrange) two-dimensional data output through an inverse quantization process for inverse transformation according to a preset scanning order to form a one-dimensional input vector y. The input vector y can be output to the input vector x according to the following equation.
[0167] <Formula 10>
number
[0168] For reverse LFNST, the output vector x can be derived by multiplying the input vector y, which is a [16x1] or [8x1] vector, by the G matrix. For reverse LFNST, the output vector x can be a [48x1] or [16x1] vector.
[0169] The output vector x is arranged in a two-dimensional block according to the order shown in FIG. 7 and arranged into two-dimensional data, and such two-dimensional data becomes the input data (or a part of the input data) for the inverse linear transformation.
[0170] Therefore, the inverse quadratic transform is generally the opposite process to the forward quadratic transform, and in the case of the inverse transform, unlike the forward transform, the inverse quadratic transform is applied first, and then the inverse linear transform is applied.
[0171] In the inverse LFNST, one of eight [48×16] matrices and eight [16×16] matrices can be selected as the transformation matrix G. Which of the [48×16] and [16×16] matrices to apply is determined by the size and shape of the block.
[0172] Also, the eight matrices may be derived from four transform sets as shown in Table 2 above, and each transform set may be composed of two matrices. Which transform set to use among the four transform sets is determined according to an intra prediction mode, and more specifically, the transform set is determined based on an extended intra prediction mode value, taking into account a wide angle intra prediction mode (Wide Angle Intra Prediction, WAIP). Which of the two matrices constituting the selected transform set is selected is derived through index signaling. More specifically, the index value to be transmitted may be 0, 1, or 2, where 0 indicates that LFNST is not applied, and 1 and 2 may indicate one of the two transform matrices constituting the transform set selected based on the intra prediction mode value.
[0173] FIG. 9 is a diagram illustrating a wide-angle intra prediction mode according to one embodiment of the present document.
[0174] Typical intra prediction mode values may have values from 0 to 66 and from 81 to 83, and as shown, intra prediction mode values extended by WAIP may have values from -14 to 83. Values from 81 to 83 refer to CCLM (Cross Composite Linear Model) modes, and values from -14 to -1 and values from 67 to 80 refer to intra prediction mode values extended by application of WAIP.
[0175] When the width of the prediction current block is greater than the height, the reference pixel on the upper side is closer to the position inside the block to be predicted. Therefore, predicting in the bottom-left direction may be more accurate than predicting in the top-right direction. Conversely, when the height of the block is greater than the width, the reference pixel on the left side is closer to the position inside the block to be predicted. Therefore, predicting in the top-right direction may be more accurate than predicting in the bottom-left direction. Therefore, it may be advantageous to apply remapping, i.e., conversion of mode index, to the index of the wide-angle intra prediction mode.
[0176] When wide-angle intra prediction is applied, information about existing intra prediction may be signaled, and after the information is parsed, the information may be remapped with the index of the wide-angle intra prediction mode. Thus, the number of total intra prediction modes for a particular block (e.g., a non-square block of a particular size) may not be changed, i.e., the number of total intra prediction modes is 67, and the coding of the intra prediction mode for the particular block may not be changed.
[0177] Table 3 below shows a process of deriving a modified intra mode by remapping an intra prediction mode with a wide-angle intra prediction mode.
[0178] [Table 3]
[0179] In Table 3, the extended intra prediction mode value is finally stored in the predModeIntra variable, ISP_NO_SPLIT indicates that the CU block is not divided into sub-partitions by the Intra Sub Partitions (ISP) technology adopted in the current VVC standard, and the cIdx variable values of 0, 1, and 2 indicate the luma, Cb, and Cr components, respectively. The Log2 function appearing in Table 3 returns a log value with a base of 2, and the Abs function returns an absolute value.
[0180] A variable predModeIntra indicating an intra prediction mode, the height and width of a transform block, etc. are used as input values of a wide angle intra prediction mode mapping process, and an output value is the modified intra prediction mode predModeIntra. The height and width of a transform block or a coding block become the height and width of a current block for intra prediction mode remapping. At that time, a variable whRatio reflecting the ratio of height to width can be set to Abs(Log2(nW / nH)).
[0181] For non-square blocks, the intra prediction mode can be modified in two distinct cases.
[0182] First, if all of the following conditions are met: (1) the width of the current block is greater than its height, (2) the intra prediction mode before modification is greater than or equal to 2, and (3) the intra prediction mode is less than the value derived by (8+2*whRatio) if the variable whRatio is greater than 1, or less than 8 if the variable whRatio is equal to or less than 1 [predModeIntra is less than (whRatio>1)?(8+2*whRatio):8], the intra prediction mode is set to a value 65 greater than the intra prediction mode [predModeIntra is set equal to(predModeIntra+65)].
[0183] If the above is not the case, then if all of the following conditions are met: (1) the height of the current block is greater than the width, (2) the intra prediction mode before modification is equal to or less than 66, and (3) the intra prediction mode is greater than the value derived by (60-2*whRatio) if the variable whRatio is greater than 1, or greater than 60 if the variable whRatio is equal to or less than 1 [predModeIntra is greater than (whRatio>1)?(60-2*whRatio):60], then the intra prediction mode is set to a value 67 less than the intra prediction mode [predModeIntra is set equal to (predModeIntra-67)].
[0184] The above-mentioned Table 2 shows how a transform set is selected based on the intra prediction mode value extended by WAIP in LFNST. As shown in FIG. 9, modes 14 to 33 and modes 35 to 80 are symmetrical to each other in terms of prediction direction with mode 34 as the center. For example, mode 14 and mode 54 are symmetrical to each other with respect to the direction corresponding to mode 34 as the center. Therefore, the same transform set is applied to modes located in symmetrical directions, and such symmetry is reflected in Table 2.
[0185] However, it is assumed that the input data to the forward LFNST for mode 54 is symmetrical to the input data to the forward LFNST for mode 14. For example, for modes 14 and 54, two-dimensional data is rearranged into one-dimensional data according to the arrangement orders shown in Figures 7(a) and 7(b), respectively, and it can be seen that the ordering patterns shown in Figures 7(a) and 7(b) are symmetrical about the direction indicated by mode 34 (diagonal direction).
[0186] Meanwhile, as described above, whether to apply a [48×16] matrix or a [16×16] matrix to LFNST is determined based on the size and shape of the block to be transformed.
[0187] Fig. 10 shows the shapes of blocks to which LFNST is applied: (a) shows a 4x4 block, (b) shows 4x8 and 8x4 blocks, (c) shows a 4xN or Nx4 block where N is 16 or more, (d) shows an 8x8 block, and (e) shows an MxN block where M≧8, N≧8, and N>8 or M>8.
[0188] In Fig. 10, blocks with thick frames indicate areas to which LFNST is applied. For blocks (a) and (b) in Fig. 10, LFNST is applied to the top-left 4×4 area, and for block (c) in Fig. 10, LFNST is applied to each of the two consecutive 4×4 areas in the top-left. In (a), (b), and (c) in Fig. 10, LFNST is applied in units of 4×4 areas, so this type of LFNST is hereinafter referred to as "4×4 LFNST," and a [16×16] or [16×8] matrix can be applied as the transformation matrix based on the matrix dimension for G in Equation 9 and Equation 10.
[0189] More specifically, a [16×8] matrix is applied to the 4×4 block (4×4TU or 4×4CU) in Fig. 10(a), and a [16×16] matrix is applied to the blocks in Fig. 10(b) and (c), in order to match the worst case computational complexity to 8 multiplications per sample.
[0190] 10(d) and (e), LFNST is applied to the 8×8 region in the upper left, and such LFNST is hereinafter referred to as "8×8 LFNST". A [48×16] or [48×8] matrix can be applied as the transformation matrix. In the case of forward LFNST, a [48×1] vector (x vector in Equation 9) is input as input data, so all sample values in the 8×8 region in the upper left are not used as input values for forward LFNST. That is, as seen in the left-hand order of FIG. 7(a) or the left-hand order of FIG. 7(b), the bottom-right 4×4 block is left as it is, and a [48×1] vector can be constructed based on samples belonging to the remaining three 4×4 blocks.
[0191] A [48×8] matrix can be applied to the 8×8 block (8×8TU or 8×8CU) in (d) of Figure 10, and a [48×16] matrix can be applied to the 8×8 block in (e) of Figure 10. Again, this is to match the computational complexity for the worst case to 8 multiplications per sample.
[0192] Depending on the block shape, the corresponding forward LFNST (4×4LFNST or 8×8LFNST) is applied to generate 8 or 16 output data (the y vector in Equation 9, [8×1] or [16×1] vector). In the forward LFNST, the matrix G T Due to the nature of the algorithm, the number of output data is equal to or less than the number of input data.
[0193] FIG. 11 is a diagram showing an example of the arrangement of output data from a forward LFNST, showing blocks in which output data from a forward LFNST is arranged according to a block shape.
[0194] The shaded area in the upper left corner of the block shown in Figure 11 corresponds to the area where the output data of the forward LFNST is located, the positions marked with 0 indicate samples that are filled with 0 values, and the remaining areas indicate areas that are not changed by the forward LFNST. In the areas that are not changed by LFNST, the output data of the forward linear transform remains unchanged.
[0195] As mentioned above, the dimension of the transformation matrix to be applied changes according to the shape of the block, so the number of output data also changes. As shown in FIG. 11, the output data of the forward LFNST may not fill the entire upper left 4×4 block. In the cases of (a) and (d) of FIG. 11, a [16×8] matrix and a [48×8] matrix are applied to the block or a part of the inside of the block shown by the thick line, respectively, and an [8×1] vector is generated at the output of the forward LFNST. That is, according to the scan order shown in (b) of FIG. 8, only eight output data are filled as shown in (a) and (d) of FIG. 11, and the remaining eight positions can be filled with zeros. In the case of the block to which LFNST is applied in (d) of FIG. 10, 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 as shown in (d) of FIG. 11.
[0196] As described above, the LFNST index is basically signaled to specify whether LFNST can be applied and the transformation matrix to be applied. As shown in Fig. 11, when LFNST is applied, the number of output data of forward LFNST may be equal to or less than the number of input data, so areas filled with 0 values occur as follows:
[0197] 1) As shown in Fig. 11(a), in the 4x4 block on the upper left, the 8th position in the scan order and after, that is, the 9th to 16th samples
[0198] 2) As shown in (d) and (e) of Figure 11, a [16×48] matrix or an [8×48] matrix is applied to the two 4×4 blocks adjacent to the top-left 4×4 block or the second and third 4×4 blocks in the scan order.
[0199] Therefore, by checking the above items 1) and 2), if non-zero data is found, it is certain that LFNST is not applied, and signaling of the LFNST index can be omitted.
[0200] As an example, in the case of LFNST adopted in the VVC standard, signaling of the LFNST index is performed after residual coding, so that the encoding device can know whether non-zero data (significant coefficients) are present at all positions inside a TU or CU block through residual coding. Thus, the encoding device can determine whether to perform signaling for the LFNST index based on whether non-zero data are present, and the decoding device can determine whether parsing of the LFNST index is possible. If non-zero data is not present in the areas specified in 1) and 2) above, the LFNST index is signaled.
[0201] To apply a truncated unary code as a binarization method for the LFNST index, the LFNST index consists of a maximum of two beans (bins), and the possible LFNST index values of 0, 1, and 2 are assigned binary codes of 0, 10, and 11, respectively. In one example, context-based CABAC coding (regular coding) may be applied to the first bin, and context-based CABAC coding may also be applied to the second bin. The coding of the LFNST index is shown in the table below.
[0202] [Table 4]
[0203] As shown in Table 4, for the first bean (binIdx = 0), context 0 can be applied in the case of a single tree, and context 1 can be applied in the case of non-single tree. Also, as shown in Table 4, for the second bean (binIdx = 1), context 2 can be applied. In other words, two contexts can be assigned to the first bin, and one context can be assigned to the second bin, and each context can be distinguished by the ctxInc value (0, 1, 2).
[0204] Here, the single tree means that the luma component and the chroma component are coded with the same coding structure. When a coding unit is divided while having the same coding structure, if the size of the coding unit becomes equal to or smaller than a certain threshold and the luma component and the chroma component are coded with different tree structures, the coding unit is regarded as a dual tree and the context of the first bin can be determined. That is, the first context can be assigned as shown in Table 4.
[0205] Alternatively, you can code using context number 0 if the value of the variable treeType of the first bean is assigned to SINGLE_TREE, otherwise use context number 1.
[0206] Meanwhile, the following simplification method can be applied to the adopted LFNST.
[0207] (i) In one example, the number of output data for the forward LFNST can be limited to a maximum of 16.
[0208] In the case of (c) of Figure 10, 4x4 LFNST can be applied to each of the two 4x4 regions adjacent to the upper left, and in this case, up to 32 pieces of LFNST output data can be generated. If the number of output data for forward LFNST is limited to a maximum of 16, 4x4 LFNST can be applied only to one 4x4 region in the upper left even for a 4xN / Nx4 (N≧16) block (TU or CU), and LFNST can be applied only once to all blocks in Figure 10. This simplifies the implementation of image encoding.
[0209] Figure 12 shows an example in which the number of output data items for forward LFNST is limited to a maximum of 16. As shown in Figure 12, when LFNST is applied to the top-left 4x4 region in a 4xN or Nx4 block where N is 16 or greater, the number of output data items for forward LFNST is 16.
[0210] (ii) As an example, zero-out can be further applied to areas to which LFNST is not applied. In this document, zero-out can mean that the values of all positions belonging to a specific area are filled with 0. In other words, zero-out can also be applied to areas that remain unchanged by LFNST and retain the result of the forward linear transform. As described above, LFNST is divided into 4×4 LFNST and 8×8 LFNST, so zero-out can be divided into two types ((ii)-(A) and (ii)-(B)) as follows.
[0211] (ii)-(A) When 4×4 LFNST is applied, it is possible to zero out areas to which 4×4 LFNST is not applied. Figure 13 is a diagram showing zeroing out in a block to which 4×4 LFNST is applied, according to an example.
[0212] As shown in FIG. 13, for blocks to which 4×4 LFNST is applied, that is, for the blocks in (a), (b), and (c) of FIG. 11, the areas to which LFNST is not applied can all be filled with 0.
[0213] On the other hand, FIG. 13(d) shows that when the maximum number of output data pieces of the forward LFNST is limited to 16 as in FIG. 12, zero-out is performed on the remaining blocks to which the 4×4 LFNST is not applied.
[0214] (ii)-(B) When 8x8 LFNST is applied, it is possible to zero out areas to which 8x8 LFNST is not applied. Figure 14 is a diagram showing zeroing out in a block to which 8x8 LFNST is applied, according to an example.
[0215] As shown in FIG. 14, for 8x8 blocks to which LFNST is applied, that is, for the blocks in (d) and (e) of FIG. 11, the areas up to which LFNST is not applied can be filled with 0s.
[0216] (iii) The zero-out proposed in (ii) above may change the area filled with zeros when LFNST is applied. Therefore, the zero-out proposed in (ii) above can check whether non-zero data exists in a wider area than in the case of LFNST in Figure 11.
[0217] For example, when (ii)-(B) is applied, it is possible to check whether non-zero data exists in the areas filled with zero values in (d) and (e) of FIG. 11 as well as in the areas further filled with zeros in FIG. 14, and then perform signaling for the LFNST index only if non-zero data does not exist.
[0218] Of course, even if the zero-out proposed in (ii) above is applied, it is possible to check whether non-zero data exists, just like the existing LFNST index signaling. That is, it is possible to check whether non-zero data exists for blocks filled with zeros in Figure 11 and apply LFNST index signaling. In such a case, zero-out is performed only in the encoding device, and the decoding device does not assume the zero-out, i.e., it is possible to check whether non-zero data exists only in areas explicitly marked with zeros in Figure 11, and then perform LFNST index parsing.
[0219] Various embodiments are derived by applying combinations of the above simplification methods ((i), (ii)-(A), (ii)-(B), and (iii)) to LFNST. Of course, the combinations of the above simplification methods are not limited to the following embodiments, and any combination can be applied to LFNST.
[0220] Embodiment
[0221] -Limit the number of output data for forward LFNST to a maximum of 16 → (i)
[0222] -When 4x4 LFNST is applied, all areas where 4x4 LFNST is not applied are zeroed out → (ii)-(A)
[0223] -When 8x8 LFNST is applied, the areas where 8x8 LFNST is not applied are all zeroed out → (ii)-(B)
[0224] -After checking whether non-zero data exists for the area filled with existing zero values and the area filled with zeros by additional zero-out ((ii)-(A), (ii)-(B)), signal LFNST indexing only if non-zero data does not exist → (iii)
[0225] In the above embodiment, when LFNST is applied, the region in which non-zero output data can exist is restricted to the interior of the upper left 4x4 region. More specifically, in the cases of Figures 13(a) and 14(a), the 8th position in the scan order is the last position in which non-zero data can exist, and in the cases of Figures 13(b) and 13(d) and Figure 14(b), the 16th position in the scan order (i.e., the position on the lower right side of the upper left 4x4 block) is the last position in which non-zero data can exist.
[0226] Therefore, when LFNST is applied, it can be determined whether or not signaling of the LFNST index is possible after checking whether non-zero data exists at a position where the residual coding process is not allowed (a position beyond the last position).
[0227] In the case of the zero-out method proposed in (ii), the amount of data finally generated when both the linear transformation and LFNST are applied is reduced, thereby reducing the amount of calculations required when performing the entire transformation process. In other words, when LFNST is applied, zero-out is also applied to the forward linear transformation output data present in areas where LFNST is not applied, so there is no need to generate data for areas that will be zero-out when performing the forward linear transformation. Therefore, the amount of calculations required to generate this data can be reduced. Additional effects of the zero-out method proposed in (ii) can be summarized as follows:
[0228] First, it reduces the amount of computation required to perform the entire transformation process as described above.
[0229] In particular, when (ii)-(B) is applied, the amount of calculations in the worst case is reduced, making the transformation process lighter. In other words, a large amount of calculations is generally required to execute a large-size primary transformation, but when (ii)-(B) is applied, the number of data derived as the forward LFNST execution result can be reduced to 16 or less, and the effect of reducing the amount of transformation calculations increases further as the overall block (TU or CU) size becomes larger.
[0230] Secondly, the amount of computation required for the entire conversion process is reduced, reducing the power consumption required to perform the conversion.
[0231] Third, it reduces the latency involved in the conversion process.
[0232] Secondary transforms such as LFNST add computational complexity to the existing primary transform, increasing the overall latency associated with transform execution. In particular, in the case of intra prediction, reconstruction data of adjacent blocks is used in the prediction process, so the increase in latency due to secondary transforms during encoding leads to an increase in latency until reconstruction, which may lead to an increase in the overall latency of intra prediction encoding.
[0233] However, by applying the zero-out technique proposed in (ii), the latency of the first transform can be significantly reduced when LFNST is applied, so that the latency of the entire transform execution remains the same or is reduced, making it easier to implement the encoding device.
[0234] Meanwhile, in the conventional intra prediction, a block to be coded is considered as one coding unit and coded without division. However, ISP (Intra Sub-Paritions) coding means that a block to be coded is divided horizontally or vertically and intra prediction coding is performed. At this time, coding / decoding is performed in divided block units to generate a restored block, and the restored block is used as a reference block for the next divided block. As an example, in ISP coding, one coding block may be divided into two or four sub-blocks and coded, and in ISP, one sub-block is intra prediction by referring to the restored pixel value of the sub-block located to the left or upper adjacent side. Hereinafter, "coding" used is used as a concept including both encoding performed in an encoding device and decoding performed in a decoding device.
[0235] However, in the following we look carefully at the signaling of the LFNST and MTS indices.
[0236] The coding unit syntax table, transform unit syntax table, and residual coding syntax table related to the signaling of the LFNST index and the MTS index according to an example are as shown in the following tables. According to Table 5, the MTS index is moved from the transform unit level to the coding unit level syntax and is signaled after the LFNST index signaling. In addition, when the ISP is applied to the coding unit, the restriction condition that does not allow LFNST is removed, so that LFNST can be applied to all intra-predicted blocks. In addition, all of the MTS index and the LFNST index are conditionally signaled at the end of the coding unit level.
[0237] [Table 5]
[0238] [Table 6]
[0239] [Table 7]
[0240] The main variables in the above table have the following meanings:
[0241] CbWidth, CbHeight: The width and height of the current coding block.
[0242] log2TbWidth, log2TbHeight: Base-2 log values for the width and height of the current transform block, which reflects zero-outs and can be reduced to the upper left corner area where non-zero coefficients can exist.
[0243] 3. sps_lfnst_enabled_flag: A flag indicating whether LFNST is applicable or not. When the flag value is 0, LFNST is not applicable, and when the flag value is 1, LFNST is applicable. This is defined in the Sequence Parameter Set (SPS).
[0244] 4. CuPredMode[chType][x0][y0]: prediction mode corresponding to the variable chType and the (x0, y0) position. chType can have values of 0 and 1, where 0 represents the luma component and 1 represents the chroma component. The (x0, y0) position indicates a position on the picture, and the possible values of CuPredMode[chType][x0][y0] are MODE_INTRA (intra prediction) and MODE_INTER (inter prediction).
[0245] 5. IntraSubPartitionsSplit[x0][y0]: The content of the (x0, y0) position is the same as that of No. 4. It indicates which ISP split is applied at the (x0,y0) position, and ISP_NO_SPLIT indicates that the coding unit corresponding to the (x0,y0) position is not split into partition blocks.
[0246] 6. intra_mip_flag[x0][y0]: The contents related to the (x0, y0) position are the same as those in 4 above. intra_mip_flag is a flag indicating whether or not a MIP (Matrix-based Intra Prediction) prediction mode is applied. If the flag value is 0, it indicates that MIP cannot be applied, and if the flag value is 1, it indicates that MIP is applied.
[0247] 7. cIdx: A value of 0 represents luma, and values of 1 and 2 represent the chroma components Cb, Cr respectively.
[0248] 8. treeType: Single-tree and dual-tree (SINGLE_TREE: single tree, DUAL_TREE_LUMA: dual tree for luma component, DUAL_TREE_CHROMA: dual tree for chroma component)
[0249] 9. lastSubBlock: Indicates the position in the scan order of the sub-block (Coefficient Group (CG)) in which the last non-zero coefficient is located. 0 indicates a sub-block that contains DC components, and if it is greater than 0, it is not a sub-block that contains DC components.
[0250] 10. lastScanPos: Indicates the position in scan order of the last significant coefficient in a subblock. If a subblock consists of 16 positions, possible values are 0 to 15.
[0251] 11. lfnst_idx[ x0 ][ y0 ]: LFNST index syntax element to be parsed. If not parsed, it is inferred to a zero value. That is, the default value is set to zero, which indicates that LFNST is not applied.
[0252] 12. LastSignificantCoeffX, LastSignificantCoeffY: indicate the x and y coordinates where the last significant coefficient is located in the transform block. The x coordinate starts from 0 and increases from left to right, and the y coordinate starts from 0 and increases from top to bottom. If the values of the two variables are all zero, it means that the last significant coefficient is located at DC.
[0253] 13. cu_sbt_flag: A flag indicating whether the SubBlock Transform (SBT) currently included in the VVC standard is applicable. When the flag value is 0, it indicates that the SBT is not applicable, and when the flag value is 1, it indicates that the SBT is applied.
[0254] 144. sps_explicit_mts_inter_enabled_flag, sps_explicit_mts_intra_enabled_flag: Flags indicating whether explicit MTS has been applied to inter CUs and intra CUs, respectively. When the flag value is 0, it indicates that MTS is not applicable to inter CUs or intra CUs, and when the flag value is 1, it indicates that MTS is applicable.
[0255] 15. tu_mts_idx[ x0 ][ y0 ]: MTS index syntax element to be parsed. If not parsed, it is inferred to a zero value. That is, the default value is set to zero, which indicates that DCT-2 is applied to both horizontal and vertical directions.
[0256] As shown in Table 5, several conditions are checked when coding mts_idx[x0][y0], and tu_mts_idx[x0][y0] is signaled only if the lfnst_idx[x0][y0] value is 0.
[0257] Also, tu_Cbf_luma[x0][y0] is a flag indicating whether or not there is a valid coefficient for the luma component.
[0258] According to Table 5, when the width and height of the coding unit for the luma component are all less than or equal to 32, mts_idx[x0][y0] is signaled (Max(CbWidth, CbHeight) <= 32), that is, whether or not MTS is applied depends on the width and height of the coding unit for the luma component.
[0259] Furthermore, according to Table 5, even in ISP mode (IntraSubPartitionsSplitType != ISP_NO_SPLIT), lfnst_idx[x0][y0] can be configured to be signaled, and the same LFNST index value can be applied to all ISP partition blocks.
[0260] On the other hand, mts_idx[x0][y0] can only be signaled in non-ISP mode (IntraSubPartitionsSplit[x0][y0] == ISP_NO_SPLIT).
[0261] As shown in Table 7, in the process of determining log2ZoTbWidth and log2ZoTbHeight (where log2ZoTbWidth and log2ZoTbHeight respectively indicate the base-2 log values of the width and height of the remaining top-left region after zero-out is performed), the part checking the mts_idx[x0][y0] (x0][y0]) value can be omitted.
[0262] Also, according to one example, a condition can be added to check sps_mts_enable_flag when determining log2ZoTbWidth and log2ZoTbHeight in residual coding.
[0263] The variable LfnstZeroOutSigCoeffFlag in Table 5 is 0 if there is a valid coefficient in a position that will be zeroed out when LFNST is applied, and is 1 otherwise. The variable LfnstZeroOutSigCoeffFlag can be set according to various conditions shown in Table 7.
[0264] According to one example, the variable LfnstDcOnly in Table 5 is set to 1 if the last significant coefficients for the transform block whose CBF (Coded Block Flag, 1 if there is at least one significant coefficient in the block, 0 otherwise) value is 1 are all located at the DC position (top left position), and is set to 0 otherwise. More specifically, in the case of dual tree luma, the position of the last significant coefficient is checked for one luma transform block, and in the case of dual tree chroma, the last significant coefficient position is checked for all of the transform blocks for Cb and Cr. In the case of a single tree, the last significant coefficient position can be checked for luma, Cb, and Cr transform blocks.
[0265] In Table 5, MtsZeroOutSigCoeffFlag is initially set to 1, and this value can be changed by the residual coding in Table 7. The variable MtsZeroOutSigCoeffFlag changes its value from 1 to 0 when there is a valid coefficient in the area that must be filled with zeros by zeroing out ( LastSignificantCoeffX > 15 | | LastSignificantCoeffY > 15 ), in which case the MTS index is not signaled, as shown in Table 5.
[0266] Meanwhile, as shown in Table 5, if tu_Cbf_luma[x0][y0] is 0, mts_idx[x0][y0] coding can be omitted. That is, if the CBF value of the luma component is 0, no transform is applied, so there is no need to signal the MTS index, and therefore MTS index coding can be omitted.
[0267] According to an example, the above technical feature can be realized by other conditional syntax. For example, after MTS is performed, a variable indicating whether a valid coefficient exists in the area excluding the DC area of the current block can be derived, and an MTS index can be signaled if the variable indicates that a valid coefficient exists in the area excluding the DC area. That is, the existence of a valid coefficient in the area excluding the DC area of the current block indicates that the tu_Cbf_luma[x0][y0] value is 1, and in this case, an MTS index can be signaled.
[0268] The variable may be represented as MtsDcOnly, which may be initially set to 1 at the coding unit level and then changed to 0 if the residual coding level indicates that a valid coefficient exists in an area excluding the DC area of the current block. When the variable MtsDcOnly is 0, the video information may be configured such that an MTS index is signaled.
[0269] When tu_Cbf_luma[x0][y0] is 0, the residual coding syntax is not invoked at the transform unit level in Table 6, so the variable MtsDcOnly maintains its initial value of 1. In this case, since the variable MtsDcOnly has not been changed to 0, the video information may be configured such that the MTS index is not signaled, i.e., the MTS index is not parsed and is not signaled.
[0270] Meanwhile, the decoding device may determine the color index cIdx of the transform coefficient to derive the variable MtsZeroOutSigCoeffFlag in Table 7. A color index (cIdx) of 0 means a luma component.
[0271] According to one example, MTS can be applied only to the luma component of the current block, so that the decoding device can determine whether a color index is luma when deriving the variable MtsZeroOutSigCoefFlag, which determines whether parsing of the MTS index is possible.
[0272] The variable MtsZeroOutSigCoeffFlag indicates whether zeroing out is performed when MTS is applied, and indicates whether a transform coefficient exists in an area other than the top left corner area where the last valid coefficient can exist due to zeroing out after MTS is performed, i.e., the top left corner 16x16 area. The variable MtsZeroOutSigCoeffFlag is initially set to 1 at the coding unit level (MtsZeroOutSigCoeffFlag = 1) as shown in Table 5, and if a transform coefficient exists in an area other than the 16x16 area, its value may be changed from 1 to 0 at the residual coding level (MtsZeroOutSigCoeffFlag = 0) as shown in Table 7. If the value of the variable MtsZeroOutSigCoeffFlag is 0, the MTS index is not signaled.
[0273] As shown in Table 7, at the residual coding level, a non-zero-out region in which non-zero transform coefficients can exist may be set depending on whether zero-out associated with the MTS is performed. In this case, if the color index (cIdx) is zero, the non-zero-out region may be set to the upper left 16x16 region of the current block.
[0274] In this way, when deriving a variable that determines whether or not an MTS index can be parsed, a determination is made as to whether the color component is luma or chroma. However, since LFNST can be applied to all of the luma or chroma components of the current block, the color component is not determined when deriving a variable that determines whether or not an LFNST index k can be parsed.
[0275] For example, Table 5 shows a variable LfnstZeroOutSigCoeffFlag that can indicate that zeroing out has been performed when applying LFNST. The variable LfnstZeroOutSigCoeffFlag indicates whether there is a valid coefficient in the second region excluding the first region at the upper left corner of the current block, and this value is initially set to 1, and if there is a valid coefficient in the second region, the value can be changed to 0. The initially set value of the variable LfnstZeroOutSigCoeffFlag should be maintained at 1, and the LFNST index can be parsed. When determining and deriving whether the variable LfnstZeroOutSigCoeffFlag value is 1, the color index of the current block is not determined because LFNST can be applied to all of the luma components or chroma components of the current block.
[0276] Meanwhile, a syntax table of a coding unit signaling an LFNST index according to an example is as follows.
[0277] [Table 8]
[0278] In Table 8, lfnst_idx means an LFNST index, and may have values of 0, 1, and 2 as described above. As shown in Table 8, lfnst_idx is signaled only if the condition (!intra_mip_flag[x0][y0] || Min(lfnstWidth, lfnstHeight) >= 16) is satisfied. Here, intra_mip_flag[x0][y0] is a flag indicating whether MIP (Matrix-based Intra Prediction) mode is applied to the luma block to which the (x0, y0) coordinate belongs, and its value is 1 if the MIP mode is applied to the luma block, and zero if not.
[0279] lfnstWidth and lfnstHeight indicate the width and height to which LFNST is applied to the currently coded coding block (including all of the luma coding block and the chroma coding block). When ISP is applied to the coding block, the width and height of each partition block divided into two or four can be indicated.
[0280] In addition, in the above condition, Min(lfnstWidth, lfnstHeight) >= 16 indicates that when MIP is applied, LFNST can be applied only when the block is 16x16 or more (e.g., when the width and height of the luma coding block to which MIP is applied are both 16 or more). The meanings of the main variables included in Table 8 that do not overlap with the explanation in Table 4 are briefly introduced as follows.
[0281] 1. IntraSubPartitionsSplitType: indicates how ISP partitioning was done for the current coding unit, ISP_NO_SPLIT means that the coding unit is not a coding unit split into partition blocks. ISP_VER_SPLIT means that it is split vertically, and ISP_HOR_SPLIT means that it is split horizontally. For example, if a W x H (width W, height H) block is split horizontally into n partition blocks, it is split into W x (H / n) blocks, and if a W x H (width W, height H) block is split vertically into n partition blocks, it is split into (W / n) x H blocks.
[0282] 2. SubWidthC, SubHeightC: SubWidthC and SubHeightC are values set according to the color format (or chroma format, e.g., 4:2:0, 4:2:2, 4:4:4), and more specifically, they indicate the ratio of the width and height of the luma and chroma components, respectively (see table below).
[0283] [Table 9]
[0284] 3. NumIntraSubPartitions: Indicates how many partition blocks are divided when ISP is applied. In other words, it indicates that it is divided into NumIntraSubPartitions partition blocks.
[0285] 4. LfnstDcOnly: For all transform blocks belonging to the current coding unit, if the last non-zero coefficient position is a DC position (i.e., the top-left position in the transform block) or there are no significant coefficients (i.e., the corresponding CBF value is 0), the value of the LnfstDCOnly variable is 1.
[0286] In the case of a luma separate-tree or luma dual-tree, the above condition is checked only for transform blocks corresponding to the luma component in the coding unit to determine the LfnstDcOnly variable value, and in the case of a chroma separate-tree or chroma dual-tree, the above condition is checked only for transform blocks corresponding to the chroma components (Cb, Cr) in the corresponding coding unit to determine the LfnstDcOnly variable value. In the case of a single tree, the above condition is checked for all transform blocks corresponding to the luma component and chroma components (Cb, Cr) in the coding unit to determine the LfnstDcOnly variable value.
[0287] 5. LfnstZeroOutSigCoeffFlag: Set to 1 if valid coefficients exist only in regions where valid coefficients can exist when applying LFNST, otherwise set to 0.
[0288] In the case of a 4x4 or 8x8 transform block, up to 8 significant coefficients can be located from the (0,0) position (top-left) in the transform block in the scan order, and the remaining positions in the transform block are zeroed out. In the case of a transform block whose width and height are 4 or more each, rather than 4x4 and 8x8 (i.e., a transform block to which LFNST can be applied), up to 16 significant coefficients can be located from the (0,0) position (top-left) in the transform block in the scan order (i.e., significant coefficients can only be located in the top-left 4x4 block), and the remaining positions in the transform block are zeroed out.
[0289] Also, as shown in Table 8, when coding is performed using a split tree or dual tree, the application of MIP to chroma components is not checked when signaling the LFNST index, so that LFNST can be appropriately applied to chroma components.
[0290] As shown in Table 8, if (treeType == DUAL_TREE_CHROMA) and the condition (!intra_mip_flag[x0][y0] || Min(lfnstWidth, lfnstHeight) >= 16) is satisfied, the LFNST index is signaled. This means that the LFNST index is signaled if 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 greater (Min(lfnstWidth, lfnstHeight) >= 16)). In other words, if 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.
[0291] The above condition can also be interpreted as meaning that if a 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.
[0292] In addition, the above condition can be interpreted as meaning that if the coding block is not dual-tree chroma and MIP is applied, the LFNST index is signaled when the smaller of the width and height of the block to which LFNST is applied is 16 or greater.
[0293] On the other hand, as shown in Table 8, the LFNST index is signaled only when transform skip is not applied to the luma component (that is, when the condition transform_skip_flag[x0][y0]
[0000] ==0 is satisfied).
[0294] Here, x0 and y0 refer to the (x0, y0) coordinates when the position of the top left corner of the luma component picture is (0, 0), and the horizontal X coordinate increases from left to right, and the vertical Y coordinate increases from top to bottom.
[0295] Although (x0, y0) is a coordinate based on the luma component, it may also be used for the chroma components, in which case the actual location (x0, y0) points to may be scaled based on the picture for the chroma component. For example, if the chroma format is 4:2:0, the actual location on the picture for the chroma component that (x0, y0) points to may be (x0 / 2, y0 / 2). Then, x0 and y0 can refer to the coordinates for the luma component, regardless of whether the component currently being coded is luma or chroma.
[0296] In transform_skip_flag[x0][y0]
[0000] , the last index 0 means for the luma component. More specifically, in transform_skip_flag[x0][y0][cIdx], cIdx indicates which component it is for, and if the cIdx value is 0, it represents luma, and if cIdx is greater than 0 (1 or 2), it represents chroma.
[0297] In addition, the variable LfnstDcOnly is initialized to a value of 1 as shown in Table 8, and can be set to a value of 0 depending on the conditions in the parsing function of the residual coding as shown in the table below.
[0298] [Table 10-1]
[0299] [Table 10-2]
[0300] As shown in Table 10, the LfnstDcOnly value can be set to 0 only when the value of transform_skip_flag[x0][y0][cIdx] is 0 (i.e., transform skip is not applied to the component pointed to by cIdx). When not in ISP mode, as shown in Table 8, the LFNST index is signaled only when the LfnstDcOnly value is 0, and when the LFNST index is not signaled, the LFNST index value can be inferred to be zero.
[0301] For reference, the residual coding functions shown in Table 10 are called while executing the transform tree (transform_tree) called in Table 8, but in the case of a single tree, the residual coding functions for luma (cIdx = 0) and the functions for chroma (cIdx = 1 or 2, corresponding to the Cb and Cr components) are all called. In the case of a dual tree, in the case of a luma dual tree (DU residual coding AL_TREE_LUMA), only the residual coding function for luma (cIdx = 0) is called, and in the case of a chroma dual tree (DUAL_TREE_CHROMA), only the residual coding function for chroma (cIdx = 1 or 2, corresponding to the Cb and Cr components) is called.
[0302] The conditions under which the LFNST index is signaled for non-ISP mode can be summarized as follows (here, it can be assumed that other conditions for the LFNST index to be signaled are satisfied, e.g., it is assumed that the condition Max(CbWidth, CbHeight) <= MaxTbSizeY is satisfied):
[0303] 1. transform_skip_flag[x0][y0]
[0000] is 1
[0304] - LFNST index is not signaled and is inferred as a zero value
[0305] 2. transform_skip_flag[x0][y0]
[0000] is 0
[0306] 2-A. When transform_skip_flag[x0][y0]
[0001] is 0 and transform_skip_flag[x0][y0]
[0002] is 0
[0307] - For all cIdx in Table 10 (where cIdx is 0, 1, 2), the LfnstDcOnly value can be set to 0
[0308] - If LfnstDcOnly value is 0, signal the L,FNST index, otherwise do not signal the LFNST index and infer a value of 0.
[0309] 2-B.transform_skip_flag[x0][y0]
[0001] is 0, and transform_skip_flag[x0][y0]
[0002] is 1
[0310] - In Table 10, the LfnstDcOnly value can be set to 0 only when cIdx is 0 or 1.
[0311] - If LfnstDcOnly value is 0, signal the LFNST index, otherwise do not signal the LFNST index and infer the value 0.
[0312] 2-C. When transform_skip_flag[x0][y0]
[0001] is 1 and transform_skip_flag[x0][y0]
[0002] is 0
[0313] - The LfnstDcOnly value can be set to 0 only when cIdx is 0 or 2 in Table 10.
[0314] - If LfnstDcOnly value is 0, signal the LFNST index, otherwise do not signal the LFNST index and infer the value 0.
[0315] When 2-D.transform_skip_flag[x0][y0]
[0001] is 1 and transform_skip_flag[x0][y0]
[0002] is 1
[0316] - The LfnstDcOnly value can be set to 0 only if cIdx is 0 in Table 10.
[0317] - If LfnstDcOnly value is 0, signal the LFNST index, otherwise do not signal the LFNST index and infer the value 0.
[0318] In the case of a single tree, mode-check the values of transform_skip_flag[x0][y0]
[0000] , transform_skip_flag[x0][y0]
[0001] , and transform_skip_flag[x0][y0]
[0002] for the above cases. In the case of a dual luma tree, only check transform_skip_flag[x0][y0]
[0000] . In the case of a dual chroma tree, check the values of transform_skip_flag[x0][y0]
[0001] and transform_skip_flag[x0][y0]
[0002] .
[0319] In the case of ISP mode (IntraSubPartitionsSplitType != ISP_NO_SPLIT condition in Table 8, meaning horizontal or vertical split), the LFNST index is signaled as shown in Table 8 without checking the LfnstDcOnly variable.
[0320] Therefore, in single tree and luma dual tree, in ISP mode, the LFNST index is signaled if the transform_skip_flag[x0][y0]
[0000] value is 0 (transform skip is not applied to the luma component) regardless of the LfnstDcOnly variable value (if the LFNST index is not signaled, the LFNST index value can be inferred to be 0 (zero)).
[0321] In the case of a dual tree for chroma, noting that ISP prediction is only applied to luma in the current VVC standard, it is assumed that ISP is not applied to chroma, and the LFNST index can be signaled by checking the LfnstDcOnly variable as described above, and as shown in Table 10, the LfnstDcOnly variable can be set to 0 only if the transform_skip_flag [x0] [y0] [cIdx] value is (0).
[0322] Of course, the ISP mode applied for luma also has an effect in the case of a dual chroma tree, and even in the case of a dual chroma tree, it is also possible to signal an LFNST index for the case where the transform_skip_flag[x0][y0]
[0000] value is 0, regardless of the LfnstDcOnly variable.
[0323] When the ISP mode is applied and the value of transform_skip_flag[x0][y0]
[0000] is 0, the conditions under which the LFNST index is signaled can be summarized as follows: When the value of transform_skip_flag [x0][y0][0] is 1, the LFNST index is not signaled and is inferred to be 0. Of course, it can be assumed that other conditions required for signaling the LFNST index in Table 8 are satisfied, for example, that a condition such as Max(CbWidth, CbHeight)<=MaxTbSizeY is satisfied.
[0324] 1. Single tree
[0325] - LFNST index signaling regardless of the value of the LfnstDcOnly variable
[0326] 2. Dual Tree
[0327] 2-A. When Luma's Dual Tree
[0328] - LFNST index signaling regardless of the value of the LfnstDcOnly variable
[0329] 2-B. Chroma's Dual Tree
[0330] - Depending on the values of transform_skip_flag[x0][y0][1] and transform_skip_flag[x0][y0][2], the LfnstDcOnly variable value may be set to 0, that is, when the cIdx value in transform_skip_flag[x0][y0][cIdx] is 1, the LfnstDcOnly variable value may be set to 0 only when transform_skip_flag[x0][y0][1] value is 0 and when the cIdx value is 2, the LfnstDcOnly variable value can be set to 0 only when the transform_skip_flag[x0][y0][2] value is 0).
[0331] - If the LfnstDcOnly value is 0, the LFNST index is signaled; otherwise, the LFNST index is not signaled and the 0 value is inferred.
[0332] In the above case, the chroma dual tree case is the same as when ISP is not applied.
[0333] Meanwhile, according to one example, in the current VVC standard, a transform skip for a chroma component is permitted, and a transform skip flag (transform_skip_flag) corresponding to each chroma component is added as shown in the table below.
[0334] [Table 11]
[0335] It can be seen that, except for the case of the luma dual tree in Table 11, transform_skip_flag[xC][yC]
[0001] corresponding to whether or not the transform skip can be applied to Cb and transform_skip_flag[xC][yC] [2] corresponding to whether or not the transform skip can be applied to Cr can be signaled. If the value of transform_skip_flag[xC][yC]
[0001] is 1, the transform skip to Cb is applied, if it is 0, the transform skip to Cb is not applied (not applied), and if the value of transform_skip_flag[xC][yC] [2] is 1, the transform skip to Cr is applied, if it is 0, the transform skip to Cr is not applied (not applied).
[0336] Therefore, even if the LFNST index value is greater than 0 (i.e., LFNST is applied), the values of transform_skip_flag[x0][y0][cIdx] for the luma component (Y component) and chroma components (Cb component and Cr component) may be different. According to Table 8 above, the LFNST index value may be greater than 0 only when the transform_skip_flag[x0][y0]
[0000] value is 0, so for cases where the LFNST index value is greater than 0, the transform_skip_flag[x0][y0]
[0000] value is always 0.
[0337] Therefore, the cases in which LFNST can be applied depending on the value of transform_skip_flag[x0][y0][cIdx] can be summarized as follows: Here, the LFNST index is greater than 0 and the value of transform_skip_flag[x0][y0][0] is 0. It can be assumed that other conditions for applying LFNST are satisfied, for example, the width and height of the corresponding block may all be 4 or greater.
[0338] 1. Single Tree
[0339] - For the luma component, apply LFNST
[0340] transform_skip_flag[x0][y0]
[0001] If the value is 0, LFNST is applied to the Cb component. If the value is 1, LFNST is not applied to the Cb component.
[0341] -transform_skip_flag[x0][y0]
[0002] If the value is 0, apply LFNST to the Cr component. If the value is 1, do not apply LFNST to the Cr component.
[0342] 2. Luma's Dual Tree
[0343] - Apply LFNST to the luma component
[0344] 3. Chroma Dual Tree
[0345] -transform_skip_flag[x0][y0]
[0001] If the value is 0, LFNST is applied to the Cb component. If the value is 1, LFNST is not applied to the Cb component.
[0346] -transform_skip_flag[x0][y0]
[0002] If the value is 0, apply LFNST to the Cr component. If the value is 1, do not apply LFNST to the Cr component.
[0347] As mentioned above, if you want to selectively apply LFNST based on the value of transform_skip_flag[x0][y0][cIdx], you should add the following condition to the LFNST specification text:
[0348] [Table 12-1]
[0349] [Table 12-2]
[0350] As shown in Table 12, when the LFNST index (lfnst_idx) value is not 0 (i.e., when LFNST is applied), the transform_skip_flag[xTbY][yTbY][cIdx] value of the component specified by cIdx is checked (When lfnst_idx is not equal to 0 and transform_skip_flag[xTbY][yTbY][cIdx] is equal to 0 and both nTbW and nTbH are greater than or equal to 4, the following applies:) Only if transform_skip_x[[ is a value other than 0, i.e., LFNST is applied, the subsequent coding process is executed. (As shown in Table 12, when the LFNST index (lfnst_idx) value is not 0 (that is, when LFNST is applied), by checking the transform_skip_flag[xTbY][yTbY][cIdx] value for the component specified by cIdx (When lfnst_idx is not equal to 0 and transform_skip_flag[xTbY][yTbY][cIdx] is equal to 0 and both nTbW and nTbH are greater than or equal to 4, the following applies), it may be configured such that the subsequent coding process is performed only when the transform_skip_flag[xTbY][yTbY][cIdx] value is 0, that is, LFNST is applied.)
[0351] Meanwhile, the LFNST index can be signaled depending on whether or not a transform skip is performed for each color component.
[0352] As an example, in comparison with Table 8, in Table 13, the condition of sending an LFNST index only when the value of transform_skip_flag[x0][y0][0] is 0 can be removed.
[0353] [Table 13]
[0354] However, since the method of setting the LfnstDcOnly variable value described in Table 13 is the same as that in Table 10, the setting of the LfnstDcOnly variable value changes depending on the value of transform_skip_flag[x0][y0][cIdx], and ultimately whether or not signaling of the LFNST index is possible also changes.
[0355] To summarize how the LFNST index is signaled by the value of transform_skip_flag[x0][y0][cIdx] when ISP mode is not applied, it can be assumed that other conditions for signaling the LFNST index are already satisfied, e.g., Max(CbWidth, CbHeight) <= MaxTbSizeY.
[0356] 1. Single tree
[0357] - If the value of transform_skip_flag[x0][y0][0] is 0, the value of the LfnstDcOnly variable can be set to 0 according to the method shown in Table 10.
[0358] - If the value of transform_skip_flag[x0][y0][1] is 0, the value of the LfnstDcOnly variable can be set to 0 according to the method shown in Table 10.
[0359] - If the value of transform_skip_flag[x0][y0][2] is 0, the value of the LfnstDcOnly variable may be set to 0 according to the method shown in Table 10.
[0360] - The LFNST index can be signaled if the LfnstDcOnly value is 0. If the LFNST index is not signaled, it can be inferred to be 0 (zero).
[0361] 2. Dual-tree case for luma component
[0362] - If the value of transform_skip_flag[x0][y0][0] is 0, the value of the LfnstDcOnly variable may be set to 0 according to the method shown in Table 10.
[0363] - The LFNST index can be signaled if the LfnstDcOnly value is 0. If the LFNST index is not signaled, it can be inferred as 0.
[0364] 3. Dual tree for chroma components
[0365] - If the value of transform_skip_flag[x0][y0][1] is 0, you can set the value of the LfnstDcOnly variable to 0 by following the method shown in Table 10.
[0366] - If the value of transform_skip_flag[x0][y0][2] is 0, you can set the value of the LfnstDcOnly variable to 0 by following the method shown in Table 10.
[0367] - The LFNST index can be signaled if the LfnstDcOnly value is 0. If the LFNST index is not signaled, it can be inferred as 0.
[0368] As shown in Table 13, the LfnstDcOnly value is initialized to 1, and in the case of dual trees, the LFNST index corresponding to the luma dual tree and the LFNST index corresponding to the chroma dual tree can be signaled separately, which means that different LFNST kernels can be applied to luma and chroma.
[0369] In addition, the dual trees shown in Tables 8 to 13 may include DUAL_TREE_LUMA (corresponding to the luma component) and DUAL_TRE_CHROMA (corresponding to the chroma component) that appear in the current VVC specification document, which includes cases where the luma syntax parsing tree and the chroma syntax parsing tree are differentiated according to the size conditions of the coding unit, etc. For example, the case of a separated tree is included.
[0370] When the ISP mode is applied, transform_skip_flag[x0][y0][0] is not signaled and is inferred to 0 as shown in Table 11. That is, as shown in Table 11, transform_skip_flag[x0][y0][0] is signaled only when the condition IntraSubPartitionsSplit[x0][y0]==ISP_NO_SPLIT is satisfied, which is the case when the ISP mode is not applied.
[0371] Additionally, as shown in Table 11, transform_skip_flag[x0][y0][1] and transform_skip_flag[x0][y0][2] can be signaled regardless of whether the ISP mode is applied or not.
[0372] Therefore, LFNST signaling when the ISP mode is applied can be summarized as follows: It may be assumed that other conditions for signaling the LFNST index are already satisfied, for example, conditions such as Max(CbWidth, CbHeight)<=MaxTbSizeY can be satisfied.
[0373] 1. Single Tree
[0374] - The LFNST index can be signaled. If the LFNST index is not signaled, it can be inferred as 0.
[0375] 2. Dual-tree case for luma component
[0376] - The LFNST index can be signaled. If the LFNST index is not signaled, it can be inferred as 0.
[0377] Dual tree for chroma components
[0378] - If the value of transform_skip_flag[x0][y0][1] is 0, you can set the value of the LfnstDcOnly variable to 0 by following the method shown in Table 10.
[0379] - If the value of transform_skip_flag[x0][y0][2] is 0, you can set the value of the LfnstDcOnly variable to 0 by following the method shown in Table 10.
[0380] - The LFNST index can be signaled if the LfnstDcOnly value is 0. If the LFNST index is not signaled, it can be inferred as 0.
[0381] When the ISP mode is applied, the LfnstDcOnly condition is not checked as shown in Table 13. Therefore, in the first single-tree case above and the second dual-tree case for the luma component, the LFNST index can be signaled without checking the LfnstDcOnly condition. In the case of the chroma dual-tree, the LFNST index can be signaled according to the same conditions as when the ISP mode is not applied, as in case 3 above. That is, the LFNST index is signaled according to the LfnstDcOnly condition.
[0382] According to one example, a transform_skip_flag[x0][y0][cIdx] value can be given for each luma component and two chroma components, so that LFNST can be applied to the component pointed to by cIdx only when the LFNST index value is greater than 0, i.e., even if LFNST is applied, the transform_skip_flag[x0][y0][cIdx] value is 0. The corresponding changes in the specification text are the same as those in Table 12.
[0383] According to one example, if the condition to check whether the transform_skip_flag[x0][y0]
[0000] value is 0 is eliminated only in the case of a dual tree as compared with Table 8, the LFNST index signaling can be configured as shown in Table 14. The LfnstDcOnly variable shown in Table 14 can be set to 0 depending on the condition as shown in Table 10.
[0384] [Table 14]
[0385] With the configuration shown in Table 14, the LFNST index signaling methods shown in Tables 8 to 10 can be applied in the case of a single tree, and the method shown in Table 13 can be applied in the case of a dual tree. Also, since the transform_skip_flag[x0][y0][cIdx] values are respectively given to the luma component and the two chroma components, it is possible to configure so that LFNST is applied to the component pointed to by cIdx only when the transform_skip_flag [x0][y0][cIdx] value is 0, even if the LFNST index value is greater than 0 (i.e., when LFNST is applied) as in the case of Tables 8 to 10. The content of the specification text to be changed is the same as that in Table 12.
[0386] The following drawings are created to explain a specific example of the present specification. The names of specific devices or names of specific signals / messages / fields described in the drawings are presented for illustrative purposes, and therefore the technical features of the present specification are not limited to the specific names used in the following drawings.
[0387] FIG. 15 is a flow chart illustrating the operation of a video decoding device according to one embodiment of the present document.
[0388] Each step disclosed in Fig. 15 is based on a part of the contents described above in Fig. 4 to Fig. 14. Therefore, the description of the specific contents overlapping with the contents described above in Fig. 3 to Fig. 14 will be omitted or simplified.
[0389] A decoding device 300 according to an embodiment may receive information about an intra-prediction mode, residual information, and an LFNST index from a bitstream (S1510).
[0390] More specifically, the decoding device 300 may derive quantized transform coefficients for a target block based on information on quantized transform coefficients for a current block from a bitstream. The information on quantized transform coefficients of the target block may be included in a sequence parameter set (SPS) or a slice header, and may include at least one of information on whether a simplified transform (RST) is applied, information on a simplification factor, information on a minimum transform size to apply the simplified transform, information on a maximum transform size to apply the simplified transform, a simplified inverse transform size, and information on a transform index indicating any one of transform kernel matrices included in the transform set.
[0391] The decoding apparatus may further receive information regarding an intra prediction mode for the current block and information regarding whether ISP is applied to the current block. The decoding apparatus may derive whether the current block is divided into a predetermined number of sub-partition transformation blocks by receiving and parsing flag information indicating whether ISP coding or an ISP mode is applied. Here, the current block may be a coding block. The decoding apparatus may also derive the size and number of sub-partition blocks to be divided through flag information indicating in which direction the current block is divided.
[0392] The decoding device 300 performs inverse quantization on the residual information for the current block, that is, the quantized transform coefficients, to derive the transform coefficients (S1520).
[0393] The derived transform coefficients are arranged in a reverse diagonal scan order in units of 4×4 blocks, and the transform coefficients in the 4×4 blocks are also arranged in a reverse diagonal scan order, i.e., the inversely quantized transform coefficients are arranged in a reverse scan order applied in video codecs such as VVC and HEVC.
[0394] A decoding device can apply LFNST to the transform coefficients to derive modified transform coefficients.
[0395] Unlike a linear transform in which coefficients to be transformed are separated in the vertical or horizontal direction, LFNST is a non-separable transform that applies a transform without separating the coefficients in a specific direction. This non-separable transform may be a low-frequency non-separable transform that applies a forward transform only to a low-frequency region, not to the entire block region.
[0396] The LFNST index information is received in syntax information, which may be received as a binarized string containing 0's and 1's.
[0397] The LFNST index syntax element in this embodiment can indicate whether an inverse LFNST or an inverse non-separable transform is applied and which one of the transform kernel matrices is included in the transform set; if the transform set includes two transform kernel matrices, the value of the transform index syntax element can be three.
[0398] That is, according to one embodiment, the LFNST index syntax element value may include 0 to indicate a case where no inverse LFNST is applied to the current block, 1 to indicate a first one of the transform kernel matrices, or 2 to indicate a second one of the transform kernel matrices.
[0399] The intra-prediction mode information and LFNST index information may be signaled at the coding unit level.
[0400] To determine whether parsing of the LFNST index for the current block is possible, the decoding device may derive a variable indicating whether an ISP is applied to the current block according to a tree type of the current block or whether a significant coefficient exists in a DC component of the current block, and the variable may be derived based on individual transform skip flag values for the color components of the current block (S1530).
[0401] The LFNST index may be parsed regardless of the value of the variable if the current block is single type or dual tree luma and ISP is applied, and if the current block is dual tree chroma or ISP is not applied to the current block, the LFNST index may be parsed based on the variable indicating that there is a significant coefficient in a position that is not a DC component.
[0402] A variable indicating whether there is a valid coefficient in the DC component of the current block may be represented by a variable LfnstDcOnly, which is 0 if there is a non-zero coefficient in a non-DC component position for at least one transform block in one coding unit, and is 1 if there is no non-zero coefficient in a non-DC component position for all transform blocks in one coding unit. In this document, the DC component refers to (0,0) or the top-left position as a position reference for 2D components.
[0403] There may be multiple transform blocks in one coding unit. For example, in the case of a chroma component, there may be transform blocks of Cb and Cr, and in the case of a single tree type, there may be transform blocks of luma, Cb and Cr. According to one example, if a non-zero coefficient is found in any transform block other than the DC component position in one of the transform blocks constituting the current coding block, the variable LfnstDcOnly value may be set to 0.
[0404] On the other hand, if there is no non-zero coefficient in the transform block, the corresponding transform block is not subjected to residual coding, and the value of the variable LfnstDcOnly is not changed by the corresponding transform block. Therefore, if there is no non-zero coefficient in a position other than the direct current (DC) component of the transform block, the value of the variable LfnstDcOnly does not change and maintains the previous value. For example, if a coding unit is coded in a single tree type and the variable LfnstDcOnly value is changed to 0 for a luma transform block, if there is a non-zero coefficient only in the DC component in the Cb transform block or if there is no non-zero coefficient in the Cb transform block, the value of the variable LfnstDcOnly is maintained as zero. The variable LfnstDcOnly value is initially initialized to 1, and if none of the components in the current coding unit can update the variable LfnstDcOnly value to 0, the variable LfnstDcOnly value remains at 1, and if at least one of the transform blocks constituting the coding unit updates the variable LfnstDcOnly value to 0, the variable LfnstDcOnly value is finally maintained at zero.
[0405] On the other hand, such a variable LfnstDcOnly may be derived based on individual transform skip flag values for the color components of the current block. The transform skip flag of the current block may be signaled for each color component, and if the tree type of the current block is single tree, the variable LfnstDcOnly may be derived based on the value of the transform skip flag for the luma component, the value of the transform skip flag for the chroma Cb component, and the value of the transform skip flag for the chroma Cr component. Alternatively, if the tree type of the current block is dual tree luma, the variable LfnstDcOnly may be derived based on the value of the transform skip flag for the luma component, and if the tree type of the current block is dual tree chroma, the variable LfnstDcOnly may be derived based on the value of the transform skip flag for the chroma Cb component and the value of the transform skip flag for the chroma Cr component.
[0406] According to an example, the variable LfnstDcOnly may indicate that a valid coefficient is present at a position other than the DC component based on the transform skip flag value of the color component being zero. That is, when the tree type of the current block is single tree, based on at least one of the values of the transform skip flag for the luma component, the value of the transform skip flag for the chroma Cb component, and the value of the transform skip flag for the chroma Cr component being zero. The variable LfnstDcOnly may be derived as zero. Alternatively, when the tree type of the current block is dual tree luma, the variable LfnstDcOnly may be derived as zero based on at least one of the values of the transform skip flag for the luma component being zero, and when the tree type of the current block is dual tree chroma, the variable LfnstDcOnly may be derived as 0 based on at least one of the values of the transform skip flag for the chroma Cb component and the value of the transform skip flag for the chroma Cr component being zero.
[0407] As mentioned above, the variable LfnstDcOnly may be initially set to 1 at the coding unit level of the current block, and if the transform skip flag value is 0, the variable LfnstDcOnly may be changed to 0 at the residual coding level.
[0408] On the other hand, as described above, in the case of a luma block to which the intra sub-partition (ISP) mode can be applied, the decoding apparatus can parse the LFNST index without deriving the variable LfnstDcOnly.
[0409] Specifically, when the ISP mode is applied and the transform skip flag for the luma component, i.e., transform_skip_flag[x0][y0][0], has a value of 0, when the tree type of the current block is a single tree or a luma dual tree, an LFNST index can be signaled regardless of the value of the variable LfnstDcOnly.
[0410] On the other hand, for chroma components to which the ISP mode is not applied, the value of the variable LfnstDcOnly can be set to 0 according to the values of the transform skip flag for the chroma Cb component, transform_skip_flag[x0][y0][1], and the transform skip flag for the chroma Cr component, transform_skip_flag[x0][y0][2]. In other words, when the cIdx value in transform_skip_flag[x0][y0][cIdx] is 1, the variable LfnstDcOnly value can be set to 0 only when the value of transform_skip_flag[x0][y0][1] is 0, and when the cIdx value is 2, the variable LfnstDcOnly value can be set to 0 only when the value of x0][y0]
[0002] (transform_skip_flag[x0][y0][2]) is 0. If the variable LfnstDcOnly value is 0, the decoding device may parse the LFNST index; otherwise, the LFNST index is not signaled and may be inferred as a zero value.
[0411] Thereafter, the decoding apparatus can derive modified transform coefficients from the transform coefficients based on the LFNST index and the LFNST matrix for the LFNST (S1540).
[0412] The decoding device may set multiple variables for LFNST based on whether the LFNST index is non-zero, i.e., the LFNST index is greater than zero and the individual transform skip flag values for the color components are zero.
[0413] For example, in the step of applying LFNST after parsing the LFNST index, the decoding apparatus may again determine whether the individual transform skip flag values for the color components are zero, and may set various variables for applying LFNST, such as an intra prediction mode for selecting an LFNST set, the number of transform coefficients output after applying LFNST, the size of the block to which LFNST is applied, etc.
[0414] For blocks coded using BDPCM, the transform skip flag may be automatically set to 1. In this case, the transform skip flag may be 1 even if the LFNST index is not 0, so that the transform skip flag value for each color component can be rechecked when actually applying LFNST.
[0415] Alternatively, according to one example, a situation may exist in which the transform skip flag value is not checked when the flag value indicating whether there is a significant coefficient coded in the transform block is zero. In this case, too, since the transform skip flag value is not guaranteed to be 0 simply because the LFNST index is not zero, the transform skip flag value for each color component may be rechecked when applying LFNST.
[0416] That is, the decoding apparatus may check the transform skip flag value for each color component during the LFNST index parsing step, and may recheck the transform skip flag value for each color component when actually applying the LFNST.
[0417] The decoding device can determine an LFNST set including an LFNST matrix based on the intra-prediction mode derived from the intra-prediction mode information, and select any one of a plurality of LFNST matrices based on the LFNST set and the LFNST index.
[0418] In this case, the same LFNST set and the same LFNST index are applied to the sub-partition transform blocks divided in the current block. 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 is also applied to all the sub-partition transform blocks in the same manner. In addition, since the LFNST index is signaled at the coding unit level, the same LFNST matrix is applied to the sub-partition transform blocks divided in the current block.
[0419] Meanwhile, as described above, a transform set is determined according to the intra prediction mode of the transform block to be transformed, and inverse LFNST is performed based on the transform kernel matrices included in the transform set indicated by the LFNST index, i.e., one of the LFNST matrices. A matrix applied to inverse LFNST is named an inverse LFNST matrix or an LFNST matrix, and the name of such a matrix does not matter as long as it is in a transpose relationship with the matrix used for forward LFNST.
[0420] In one example, the inverse LFNST matrix may be a non-square matrix with fewer columns than rows.
[0421] The decoding device derives residual samples for the current block based on a linear inverse transform on the modified transform coefficients (S1550).
[0422] In this case, the inverse linear transformation can use a general separation transformation, or the above-mentioned MTS can be used.
[0423] Subsequently, decoding device 300 may generate reconstructed samples based on the residual samples for the current block and the predicted samples for the current block.
[0424] The following drawings are created to explain a specific example of the present specification. The names of specific devices and names of specific signals / messages / fields described in the drawings are presented for illustrative purposes only, and therefore the technical features of the present specification are not limited to the specific names used in the following drawings.
[0425] FIG. 16 is a flowchart showing the operation of a video encoding device according to an embodiment of the present document.
[0426] Each step disclosed in Fig. 16 is based on some of the contents described above in Fig. 4 to Fig. 14. Therefore, the description of the specific contents that overlap with the contents described above in Fig. 2 and Fig. 4 to Fig. 14 will be omitted or simplified.
[0427] The coding apparatus 200 according to an embodiment may derive a prediction sample of the current block based on an intra-prediction mode applied to the current block.
[0428] When the ISP is applied to the current block, the encoding device performs prediction for each sub-partition transform block.
[0429] The encoding device determines whether to apply ISP coding or ISP mode to a current block, i.e., a coding block, and determines in which direction the current block is to be divided based on the result of the determination, and derives the size and number of sub-blocks to be divided.
[0430] The same intra prediction mode is applied to the divided sub-partition transform blocks of the current block, and the encoding device derives a prediction sample for each sub-partition transform block. That is, the encoding device performs intra prediction sequentially, for example, horizontally or vertically, from left to right or from top to bottom, according to the division form of the sub-partition transform block. For the leftmost or topmost sub-block, the reconstructed pixels of the coding block already coded are referenced as in the normal intra prediction method. Also, when each side of the subsequent inner sub-partition transform block is not adjacent to the previous sub-partition transform block, the reconstructed pixels of the adjacent coding block already coded are referenced as in the normal intra prediction method to derive the reference pixels adjacent to the side.
[0431] The encoding apparatus 200 may derive residual samples of the current block based on the predicted samples (S1610).
[0432] Encoding apparatus 200 may apply at least one of LFNST or MTS to the residual samples to derive transform coefficients of the current block, and arrange the transform coefficients according to a predetermined scanning order.
[0433] The encoding device may derive transform coefficients for the current block based on a linear transform on the residual samples (S1620).
[0434] The primary transform may be performed via multiple transform kernels, such as MTS, where the transform kernel may be selected based on the intra-prediction mode.
[0435] Encoding apparatus 200 may determine whether to perform a quadratic or non-separable transform, specifically LFNST, on the transform coefficients for the current block, and may apply LFNST to the transform coefficients to derive modified transform coefficients.
[0436] Unlike a linear transform that separates and transforms coefficients to be transformed in the vertical or horizontal direction, LFNST is a non-separable transform that applies transform without separating coefficients in a specific direction. Such a non-separable transform may be a low-frequency non-separable transform that applies transform only to the low-frequency region, rather than to the entire target block to be transformed.
[0437] The encoding device may apply multiple LFNST matrices to the transform coefficients to derive a variable indicating whether or not a significant coefficient is present in the DC component of the current block, and according to one example, may derive modified transform coefficients based on a variable indicating whether an ISP is applied to the current block according to a tree type of the current block or whether or not a significant coefficient is present in the DC component of the current block, where the variable may be derived based on individual transform skip flag values for the color components of the current block (S1630).
[0438] Based on whether the current block is single type or dual tree luma and ISP is applied, the encoding device can apply LFNST to the current block, and if the tree type of the current block is dual tree chroma or ISP is not applied, can select an LFNST matrix based on a variable indicating whether there are significant coefficients in the DC component.
[0439] The encoding device can derive variables after applying LFNST for each LFNST matrix candidate, or without applying LFNST for those for which LFNST is not applied.
[0440] Specifically, the encoding apparatus applies multiple LFNST candidates, i.e., LFNST matrices, and eliminates corresponding LFNST matrices in which significant coefficients of all transform blocks exist only at the DC position (obviously, if CBF is 0, it is excluded from the corresponding variable determination process). RD values can be compared only between LFNST matrices in which the variable LfnstDcOnly value is zero. For example, when LFNST is not applied, it is included in the comparison process since it is unrelated to the variable LfnstDcOnly value (in this case, since LFNST is not applied, the LfnstDcOnly variable value can be determined based on the transform coefficients obtained as a result of the primary transform), and the LFNST matrix in which the LfnstDcOnly value is zero is also included in the RD value comparison process.
[0441] A variable indicating whether there is a valid coefficient in the DC component of the current block can be represented by the variable LfnstDcOnly, which is 0 if there is a non-zero coefficient in a non-DC component position for at least one transform block in a coding unit, and is 1 if there is no non-zero coefficient in a non-DC component position for all transform blocks in a coding unit.
[0442] There may be multiple transform blocks in one coding unit. For example, for chroma components, there may be Cb and Cr transform blocks, and for a single tree type, there may be luma, Cb and Cr transform blocks. According to an example, if a non-zero coefficient is found in any transform block other than the DC component position in one of the transform blocks constituting the current coding block, the variable LfnstDcOnly value may be set to 0.
[0443] On the other hand, if there is no non-zero coefficient in a transform block, the value of the variable LfnstDcOnly is not changed by the transform block since no residual coding is performed on the corresponding transform block. Therefore, if there is no non-zero coefficient in a position other than the DC component of the transform block, the value of the variable LfnstDcOnly is not changed and the previous value is maintained. For example, if a coding unit is coded in a single tree type and the variable LfnstDcOnly value is changed to 0 by the luma transform block, if there is a non-zero coefficient only in the DC component in the Cb transform block or if there is no non-zero coefficient in the Cb transform block, the value of the variable LfnstDcOnly is maintained as zero. The variable LfnstDcOnly value is initially initialized to 1, and if none of the components in the current coding unit can update the variable LfnstDcOnly value to 0, the variable LfnstDcOnly value is maintained as 1. If at least one of the transform blocks constituting the coding unit updates the variable LfnstDcOnly value to 0, the variable LfnstDcOnly value is finally maintained at zero.
[0444] On the other hand, such a variable LfnstDcOnly may be derived based on individual transform skip flag values for the color components of the current block. The transform skip flag of the current block may be signaled for each color component, and if the tree type of the current block is single tree, the variable LfnstDcOnly may be derived based on the value of the transform skip flag for the luma component, the value of the transform skip flag for the chroma Cb component, and the value of the transform skip flag for the chroma Cr component. Alternatively, if the tree type of the current block is dual tree luma, the variable LfnstDcOnly may be derived based on the value of the transform skip flag for the luma component, and if the tree type of the current block is dual tree chroma, the variable LfnstDcOnlyg may be derived based on the value of the transform skip flag for the chroma Cb component and the value of the transform skip flag for the chroma Cr component.
[0445] According to an example, the variable LfnstDcOnly may indicate that a valid coefficient is present at a position other than the DC component based on the transform skip flag value of the color component being zero. That is, when the tree type of the current block is a single tree, the variable LfnstDcOnly may be derived to zero based on at least one of the transform skip flag value for the luma component, the transform skip flag value for the chroma Cb component, and the transform skip flag value for the chroma Cr component being zero. Alternatively, when the tree type of the current block is a dual tree luma, the variable LfnstDcOnly may be derived to zero based on at least one of the transform skip flag value for the luma component being zero, and when the tree type of the current block is a dual tree chroma, the variable LfnstDcOnly may be derived to 0 based on at least one of the transform skip flag value for the chroma Cb component and the transform skip flag value for the chroma Cr component being zero.
[0446] As mentioned above, the variable LfnstDcOnly may be initially set to 1 at the coding unit level of the current block, and if the transform skip flag value is 0, the variable LfnstDcOnly may be changed to 0 from the residual coding level.
[0447] The encoding device may select an optimal LFNST matrix based on the variable indicating that significant coefficients exist at locations that are not DC components, and derive modified transform coefficients based on the selected LFNST matrix.
[0448] The encoding apparatus may, in deriving the modified transform coefficients, set a number of variables for the LFNST based on whether the respective transform skip flag values for the color components are zero.
[0449] For example, after determining whether to apply LFNST, the encoding apparatus may again determine whether the individual transform skip flag values for the color components are 0 in the step of applying LFNST, and set various variables for applying LFNST. For example, an intra prediction mode for selecting an LFNST set, the number of transform coefficients output after applying LFNST, the size of the block to which LFNST is applied, etc. may be set.
[0450] For blocks coded using BDPCM, the transform skip flag may be automatically set to 1, so that the transform skip flag value for each color component may be rechecked when effectively applying LFNST.
[0451] Alternatively, according to one example, a situation may exist in which the transform skip flag value is not checked when the flag value indicating whether there is a significant coefficient coded in the transform block is zero. In this case, too, since the transform skip flag value is not guaranteed to be 0 simply because the LFNST index is not zero, the transform skip flag value for each color component can be rechecked when applying LFNST.
[0452] That is, the encoding device may check the value of the transform skip flag for each color component when determining whether LFNST is applicable, and may recheck the value of the transform skip flag for each color component when actually applying LFNST.
[0453] On the other hand, as described above, in the case of a luma block to which the intra sub-partition (ISP) mode can be applied, LFNST can be applied without deriving the variable LfnstDcOnly.
[0454] Specifically, when the ISP mode is applied and the transform skip flag for the luma component, i.e., the value of transform_skip_flag[x0][y0][0], is 0, the tree type of the current block is a single tree or a luma dual tree, and Lfnst can be applied regardless of the value of the variable LfnstDcOnly.
[0455] On the other hand, for chroma components to which the ISP mode is not applied, the value of the variable LfnstDcOnly can be set to 0 according to the values of the transform skip flag for the chroma Cb component, transform_skip_flag[x0][y0][1], and the transform skip flag for the chroma Cr component, transform_skip_flag[x0][y0][2]. In other words, when the cIdx value in transform_skip_flag[x0][y0][cIdx] is 1, the variable LfnstDcOnly value can be set to 0 only when the transform_skip_flag[x0][y0][1] value is 0, and when the cIdx value is 2, the variable LfnstDcOnly value can be set to 0 only when the x0][y0]
[0002] (transform_skip_flag[x0][y0][2]) value is 0. If the variable LfnstDcOnly value is 0, the encoding device can apply LFNST, otherwise LFNST is not applied.
[0456] The encoding device 200 determines an LFNST set based on a mapping relationship according to the intra prediction mode applied to the current block, and performs LFNST, i.e., non-separable transform, based on one of two LFNST matrices included in the LFNST set.
[0457] In this case, the same LFNST set and the same LFNST index are applied to the sub-partition transform blocks divided in the current block. 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 is also applied to all the sub-partition transform blocks in the same manner. In addition, since the LFNST index is encoded on a coding unit basis, the same LFNST matrix is applied to the sub-partition transform blocks divided in the current block.
[0458] As described above, the set of transforms is determined by the intra prediction mode of the transform block to be transformed. The matrix applied to LFNST is in a transpose relationship with the matrix used for the inverse LFNST.
[0459] In one example, the LFNST matrix may be a non-square matrix with the number of rows being less than the number of columns.
[0460] The encoding device may configure the video information such that the variable LfnstDcOnly is initially set to 1 at the coding unit level of the current block, and if the transform skip flag value is 0, the variable LfnstDcOnly is changed to 0 from the residual coding level, and the LFNST index indicating the LFNST matrix to be applied to LFNST based on the variable LfnstDcOnly being 0 is parsed.
[0461] The encoding device may perform quantization based on the modified transform coefficients for the current block to derive quantized transform coefficients and encode the LFNST index.
[0462] The encoding apparatus may generate residual information including information about the quantized transform coefficients. The residual information may include the above-mentioned transform-related information / syntax elements. The encoding apparatus may encode image / video information including the residual information and output the encoded image / video information in the form of a bitstream.
[0463] More specifically, the encoding device 200 may generate information about the quantized transform coefficients and encode the generated information about the quantized transform coefficients.
[0464] The LFNST index syntax element according to this embodiment can indicate whether (inverse) LFNST is applied and which one of the LFNST matrices is included in the LFNST set; if the LFNST set contains two transformation kernel matrices, the value of the LFNST index syntax element can be three.
[0465] By way of example, if the partitioning tree structure for the current block is of a dual tree type, an LFNST index is encoded for each of the luma and chroma blocks.
[0466] In one embodiment, the syntax element value for the transform index is derived as 0 to indicate the case where (inverse) LFNST is not applied to the current block, 1 to indicate the first LFNST matrix among the LFNST matrices, and 2 to indicate the second LFNST matrix among the LFNST matrices.
[0467] In this document, at least one of quantization / dequantization and / or transform / inverse transform may be omitted. When the quantization / dequantization is omitted, the quantized transform coefficients may be called transform coefficients. When the transform / inverse transform is omitted, the transform coefficients may be called coefficients or residual coefficients, or may still be called transform coefficients for uniformity of expression.
[0468] In addition, in this document, the quantized transform coefficients and the transform coefficients may be referred to as transform coefficients and scaled transform coefficients, respectively. In this case, the residual information may include information about the transform coefficients, and the information about the transform coefficients may be signaled via a residual coding syntax. Transform coefficients may be derived based on the residual information (or the information about the transform coefficients), and scaled transform coefficients may be derived via an inverse transform (scaling) on the transform coefficients. Residual samples may be derived based on an inverse transform (transform) on the scaled transform coefficients. This may be similarly applied / expressed in other parts of this document.
[0469] In the above embodiments, the method is described based on a flowchart as a series of steps or blocks, but this document is not limited to the order of steps, and certain steps may occur in different steps and different orders than those described above, or simultaneously. Also, those skilled in the art can understand that the steps shown in the flowchart are not exclusive, and other steps may be included, or one or more steps of the flowchart may be deleted without affecting the scope of this document.
[0470] The method according to the present document described above may be embodied in the form of software, and the encoding device and / or decoding device according to the present document may be included in a device that performs image processing, such as a TV, a computer, a smartphone, a set-top box, or a display device.
[0471] In this document, when the embodiments are embodied in software, the above-described methods may be embodied in modules (processes, functions, etc.) performing the above-described functions. The modules may be stored in a memory and executed by a processor. The memory may be inside or outside the processor and may be connected (coupled) to the processor by various well-known means. The processor may include an Application-Specific Integrated Circuit (ASIC), other chipsets, logic circuits, and / or data processing devices. The memory may include Read-Only Memory (ROM), Random Access Memory (RAM), flash memory, memory cards, storage media, and / or other storage devices. That is, the embodiments described in this document may be embodied and executed on a processor, microprocessor, controller, or chip. For example, the functional units shown in each drawing may be embodied and executed on a computer, processor, microprocessor, controller, or chip.
[0472] In addition, the decoding device and encoding device to which this document is applied may be included in a multimedia broadcast transmitting / receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video interactive device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camcorder, a video on demand (VoD) service providing device, an over-the-top video (OTT) device, an internet streaming service providing device, a three-dimensional (3D) video device, a video telephone 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 video (OTT) device may include a game console, a Blu-ray player, an internet access TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), and the like.
[0473] In addition, the processing method to which this document is applied may be produced in the form of a program executed by a computer and may be stored in a computer-readable recording medium. Multimedia data having a data structure according to this document may also be stored in a computer-readable recording medium. The computer-readable recording medium includes all kinds of storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable recording medium 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. The computer-readable recording medium may also include a medium embodied in the form of a carrier wave (e.g., transmission via the Internet). Also, a bit stream generated by the encoding method may be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network. Also, an embodiment of this document may be embodied in a computer program product by a program code, and the program code may be executed by a computer according to an embodiment of this document. The program code may be stored on a computer-readable carrier.
[0474] FIG. 17 exemplarily shows a structural diagram of a content streaming system to which this document applies.
[0475] Furthermore, the content streaming system to which this document applies may broadly include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
[0476] The encoding server compresses content input from a multimedia input device such as a smartphone, camera, or camcorder into digital data to generate a bitstream and transmits the bitstream to the streaming server. As another example, if a multimedia input device such as a smartphone, camera, or camcorder generates a bitstream directly, the encoding server may be omitted. The bitstream may be generated by an encoding method or a bitstream generation method to which this document is applied, and the streaming server may temporarily store the bitstream during the process of transmitting or receiving the bitstream.
[0477] The streaming server transmits multimedia data to a user device based on a user's request via a web server, and the web server acts as a medium to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, and the streaming server transmits the multimedia data to the user. In this case, the content streaming system may include a separate control server, and in this case, the control server controls commands / responses between the devices in the content streaming system.
[0478] The streaming server may receive the content from a media storage and / or an encoding server. For example, if the content is to be received from the encoding server, the content may be received in real time. In this case, the streaming server may store the bitstream for a certain period of time in order to provide a smooth streaming service.
[0479] Examples of the user device include a mobile phone, a smart phone, a laptop computer, a digital broadcasting terminal, a PDA (Personal Digital Assistant), a PMP (Portable Multimedia Player), a navigation system, a slate PC, a tablet PC, an ULTRABOOK (registered trademark), a wearable device (e.g., a smartwatch, a smart glass, a Head Mounted Display (HMD)), a digital TV, a desktop computer, a digital signage, etc. Each server in the content streaming system can be operated as a distributed server, and in this case, data received by each server can be processed in a distributed manner.
[0480] The claims described herein may be combined in various ways. For example, the technical features of the method claims herein may be combined and embodied as an apparatus, and the technical features of the apparatus claims herein may be combined and embodied as a method. In addition, the technical features of the method claims herein and the technical features of the apparatus claims herein may be combined and embodied as an apparatus, and the technical features of the method claims herein and the technical features of the apparatus claims herein may be combined and embodied as a method.
Claims
1. A video decoding method performed by a decoding device, comprising: obtaining residual information from the bitstream; deriving transform coefficients for a current block based on the residual information; applying a Low Frequency Non-Separable Transform (LFNST) to the transform coefficients to derive modified transform coefficients; deriving residual samples for the current block based on an inverse linear transform on the modified transform coefficients; generating a reconstructed picture based on the residual samples; The step of deriving the modified transform coefficients comprises: parsing a first transform skip flag for a chroma Cb component of the current block; parsing a second transform skip flag for a chroma Cr component of the current block; parsing an LFNST index based on a value of the first transform skip flag for the chroma Cb component and a value of the second transform skip flag for the chroma Cr component; determining whether to apply the LFNST to the chroma Cb component based on the LFNST index and the first transform skip flag for the chroma Cb component; applying the LFNST to first transform coefficients associated with the chroma Cb component based on the determination that the LFNST is applied to the chroma Cb component; determining whether to apply the LFNST to the chroma Cr component based on the LFNST index and the second transform skip flag for the chroma Cr component; applying the LFNST to second transform coefficients associated with the chroma Cr component based on the determination that the LFNST is applied to the chroma Cr component.
2. based on the value of the LFNST index being greater than 0 and the value of the first transform skip flag for the chroma Cb component being 0, the LFNST is applied to the chroma Cb component of the current block; 2. The method of claim 1, wherein the LFNST is not applied to the chroma Cb component of the current block based on the value of the LFNST index being greater than 0 and the value of the first transform skip flag for the chroma Cb component being 1.
3. based on the value of the LFNST index being greater than 0 and the value of the second transform skip flag for the chroma Cr component being 0, the LFNST is applied to the chroma Cr component of the current block; 2. The method of claim 1, wherein the LFNST is not applied to the chroma Cr component of the current block based on the value of the LFNST index being greater than 0 and the value of the second transform skip flag for the chroma Cr component being 1.
4. The LFNST index is parsed based on a variable indicating whether significant coefficients are present only in a DC component of the current block; The method of claim 1 , wherein the variable is derived based on the value of the first transform skip flag for the chroma Cb component and the value of the second transform skip flag for the chroma Cr component.
5. the value of said variable is initially set to 1 in the coding unit syntax; the value of the variable is derived as 0 based on at least one of a value of the first transform skip flag for the chroma Cb component and a value of the second transform skip flag for the chroma Cr component not being 1; The method of claim 4 , wherein the LFNST index is parsed based on the value of the variable being zero.
6. 5. The method of claim 4, wherein the value of the variable is derived as 0 based on the value of the first transform skip flag for the chroma Cb component being 1 and the value of the second transform skip flag for the chroma Cr component being 0.
7. 5. The method of claim 4, wherein the value of the variable is derived as 0 based on the value of the first transform skip flag for the chroma Cb component being 0 and the value of the second transform skip flag for the chroma Cr component being 1.
8. 5. The method of claim 4, wherein the LFNST index is parsed based on the tree type of the current block being dual tree chroma and the variable indicating that the significant coefficient resides in a position other than the DC component.
9. A video encoding method performed by a video encoding device, comprising: deriving a predicted sample for the current block; deriving residual samples for the current block based on the predicted samples; deriving transform coefficients for the current block based on a linear transform on the residual samples; deriving modified transform coefficients from the transform coefficients by applying a Low Frequency Non-Separable Transform (LFNST); generating residual information based on the modified transform coefficients; encoding image information including the residual information; the image information includes a first transform skip flag for a chroma Cb component of the current block and a second transform skip flag for a chroma Cr component of the current block; the image information includes an LFNST index based on a value of the first transform skip flag for the chroma Cb component and a value of the second transform skip flag for the chroma Cr component; The step of applying the LFNST comprises: determining whether to apply the LFNST to the chroma Cb component based on the LFNST index and the first transform skip flag for the chroma Cb component; applying the LFNST to first transform coefficients associated with the chroma Cb component based on the determination that the LFNST is applied to the chroma Cb component; determining whether to apply the LFNST to the chroma Cr component based on the LFNST index and the second transform skip flag for the chroma Cr component; applying the LFNST to second transform coefficients associated with the chroma Cr component based on the determination that the LFNST is applied to the chroma Cr component.
10. based on the value of the LFNST index being greater than 0 and the value of the first transform skip flag for the chroma Cb component being 0, the LFNST is applied to the chroma Cb component of the current block; 10. The method of claim 9, wherein the LFNST is not applied to the chroma Cb component of the current block based on the value of the LFNST index being greater than 0 and the value of the first transform skip flag for the chroma Cb component being 1.
11. based on the value of the LFNST index being greater than 0 and the value of the second transform skip flag for the chroma Cr component being 0, the LFNST is applied to the chroma Cr component of the current block; 10. The method of claim 9, wherein the LFNST is not applied to the chroma Cr component of the current block based on the value of the LFNST index being greater than 0 and the value of the second transform skip flag for the chroma Cr component being 1.
12. the image information includes the LFNST index based on a variable indicating whether significant coefficients are present only in a DC component of the current block; The method of claim 9 , wherein the variable is derived based on the value of the first transform skip flag for the chroma Cb component and the value of the second transform skip flag for the chroma Cr component.
13. the value of said variable is initially set to 1 in the coding unit syntax; the value of the variable is derived as 0 based on at least one of a value of the first transform skip flag for the chroma Cb component and a value of the second transform skip flag for the chroma Cr component not being 1; The method of claim 12 , wherein the LFNST index is included in the image information based on the value of the variable being zero.
14. 1. A method for transmitting data for an image, comprising: generating a bitstream for the image, said bitstream comprising: deriving a predicted sample for the current block; deriving residual samples for the current block based on the predicted samples; deriving transform coefficients for the current block based on a linear transform on the residual samples; deriving modified transform coefficients from the transform coefficients by applying a Low Frequency Non-Separable Transform (LFNST); generating residual information based on the modified transform coefficients; generating image information including the residual information based on the step of encoding the image information; transmitting the data including the bitstream; the image information includes a first transform skip flag for a chroma Cb component of the current block and a second transform skip flag for a chroma Cr component of the current block; the image information includes an LFNST index based on a value of the first transform skip flag for the chroma Cb component and a value of the second transform skip flag for the chroma Cr component; deriving the modified transform coefficients from the transform coefficients by applying the LFNST, determining whether to apply the LFNST to the chroma Cb component based on the LFNST index and the first transform skip flag for the chroma Cb component; applying the LFNST to first transform coefficients associated with the chroma Cb component based on the determination that the LFNST is applied to the chroma Cb component; determining whether to apply the LFNST to the chroma Cr component based on the LFNST index and the second transform skip flag for the chroma Cr component; applying the LFNST to second transform coefficients associated with the chroma Cr component based on the determination that the LFNST is applied to the chroma Cr component.
Citation Information
Patent Citations
Transform-based video encoding method and apparatus
JP7461473B2
Transform-based video encoding method and apparatus
JP7640772B2