Transform-based image coding method and device therefor
Patent Information
- Application Number
- JP2024229789
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2019-10-29
- Filing Date
- 2024-12-26
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2040-10-29
AI Technical Summary
【0019】 本文書によると、全般的な映像/ビデオ圧縮効率を上げることができる。
Smart Images

Figure 2025031953000001_ABST
Abstract
Description
[Technical field]
[0001] This document relates to image coding technology, and more particularly to a transform-based image coding method and apparatus in an image coding 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 to be transmitted increases relatively compared to existing image / video data, so that 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 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 increased, and the broadcast of images / videos that have different image characteristics from real images, such as game images, has increased.
[0004] Therefore, there is a demand for a highly efficient image / video compression technique 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 increasing video coding efficiency.
[0006] Another technical problem of this document is to provide a method and apparatus for improving the efficiency of LFNST index coding.
[0007] Another technical problem of this document is to provide a method and apparatus for improving the efficiency of the secondary transform through coding of the LFNST index.
[0008] Another technical problem of this document is to provide a video coding method and apparatus for deriving an LFNST transform set using an intra mode of a luma block when in CCLM mode. [Means for solving the problem]
[0009] According to an embodiment of the present document, there is provided a video decoding method executed by a decoding device, the method comprising the steps of: updating an intra prediction mode of a chroma block based on an intra prediction mode of a luma block corresponding to the chroma block, when the intra prediction mode of the chroma block is a Cross-Component Linear Model (CCLM) mode; determining an LFNST set having an LFNST matrix based on the updated intra prediction mode; performing LFNST for the chroma block based on the LFNST matrix derived from the LFNST set; and deriving a residual sample for the chroma block based on a transform coefficient, wherein the updated intra prediction mode is derived as an intra prediction mode corresponding to a specific position in the luma block, and updating the updated intra prediction mode to an intra DC mode based on the intra prediction mode corresponding to the specific position being an Intra Block Copy (IBC) mode.
[0010] The specific position is set based on the color format of the chroma block.
[0011] The specific position is the center position of the luma block.
[0012] The specific position is set to ((xTbY+(nTbW*SubWidthC) / 2), (yTbY+(nTbH*SubHeightC) / 2)), where xTbY and yTbY indicate the top left coordinates of the luma block, nTbW and nTbH indicate the width and height of the chroma block, and SubWidthC and SubHeightC are variables corresponding to the color format.
[0013] If the color format is 4:2:0, SubWidthC and SubHeightC are 2; if the color format is 4:2:2, SubWidthC is 2 and SubHeightC is 1.
[0014] When the intra prediction mode corresponding to a particular position is an MIP mode, the updated intra prediction mode is an intra planar mode.
[0015] If the intra prediction mode corresponding to a particular position is the palette mode, the updated intra prediction mode is the intra DC mode.
[0016] According to an embodiment of the present document, there is provided a video encoding method performed by an encoding device, the method including: deriving a prediction sample for a chroma block based on an intra prediction mode for the chroma block being a Cross-Component Linear Model (CCLM); deriving a residual sample for the chroma block based on the prediction sample, the updated intra prediction mode being derived as an intra prediction mode corresponding to a particular position in the luma block; and updating the updated intra prediction mode to an intra DC mode based on the intra prediction mode corresponding to the particular position being an intra block copy (IBC) mode.
[0017] According to another embodiment of the present document, a digital storage medium is provided having stored thereon video data comprising encoded video information and a bitstream generated by a video encoding method performed by an encoding device.
[0018] According to another embodiment of the present document, there is provided a digital storage medium having stored thereon video data comprising encoded video information and a bitstream for enabling a video decoding method to be performed by a decoding device. Effect of the Invention
[0019] According to the document, it can improve the overall image / video compression efficiency.
[0020] According to this document, the efficiency of LFNST index coding can be improved.
[0021] According to this document, the efficiency of secondary transformation can be improved through coding of LFNST indexes.
[0022] According to this document, a video coding method and apparatus can be provided for deriving an LFNST transform set using an intra mode of a luma block when in CCLM mode.
[0023] 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 include various effects that can be understood or derive from the technical features of the present specification. [Brief description of the drawings]
[0024] [Figure 1]FIG. 1 illustrates a schematic diagram of an example of a video / image coding system to which the present 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 is a schematic diagram illustrating a multiple transform scheme according to one 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] FIG. 13 is a diagram illustrating a sequence in which output data of a forward linear transform is arranged into a one-dimensional vector, according to an example. [Figure 8] FIG. 13 is a diagram illustrating a sequence in which output data of a forward quadratic transform is arranged in a two-dimensional block, according to an example. [Figure 9] FIG. 1 illustrates a wide-angle intra-prediction mode according to one embodiment of the present document. [Figure 10] FIG. 13 is a diagram showing block shapes to which LFNST is applied. [Figure 11] FIG. 13 is a diagram showing an example of an arrangement of output data from a forward LFNST; [Figure 12] FIG. 13 is a diagram illustrating an example in which the number of output data items for a forward LFNST is limited to a maximum of 16. [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 illustrates zeroing out in a block to which 8×8 LFNST is applied, according to an example. [Figure 15] 1 is a diagram illustrating a CCLM that can be applied when deriving an intra-prediction mode of a chroma block according to an embodiment. [Figure 16] FIG. 2 is a diagram illustrating a video decoding method according to an example. [Figure 17] FIG. 2 is a diagram illustrating a video encoding method according to an example. [Figure 18] FIG. 1 is an exemplary structural diagram of a content streaming system to which this document applies; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0025] This document may have various modifications and various embodiments, and 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. The terms used in this specification are merely used to describe a specific embodiment, and are not intended to limit the technical ideas of this document. A singular expression includes a plural expression unless the context clearly indicates otherwise. In this specification, the terms "include" or "have" specify the presence of a feature, number, step, operation, component, part, or combination thereof described in the specification, and should be understood not to preclude the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.
[0026] Meanwhile, each component in the drawings described in this document is illustrated independently for the convenience of explaining the different characteristic functions, and does not mean that each component is realized by separate hardware or software. For example, two or more components among the components may be combined to form one component, or one component may be divided into multiple components. An embodiment in which each component is integrated and / or separated is also included in the scope of the rights of this document as long as it does not deviate from the essence of this document.
[0027] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, 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 duplicated descriptions of the same components will be omitted.
[0028] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document are related to the Versatile Video Coding (VVC) standard (ITU-T Rec. H.266), the next generation video / image coding standard after 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.).
[0029] This document presents various embodiments for video / image coding, which may also be implemented in combination with one another, unless otherwise stated.
[0030] In this document, video may refer to a collection of a series of images over time. A picture generally refers to a unit that indicates 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). A picture may be composed of one or more slices / tiles. A picture may be composed of one or more tile groups. A tile group may include one or more tiles.
[0031] 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 the spatial domain, or may refer to a transform coefficient in the frequency domain when such a pixel value is transformed into the frequency domain.
[0032] A unit may indicate a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. A unit may include one luma block and two chroma (e.g., cb, cr) blocks. A unit may be mixed with terms such as block or 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.
[0033] In this document, the terms " / " and "、" should be interpreted to indicate "and / or." For instance, the expression "A / B" may mean "A and / or B." Further, "A, B" may mean "A and / or B." Further, "A / B / C" may mean "at least one of A, B, and / or C." Also, "A / B / C" may mean "at least one of A, B, and / or C."
[0034] Further, in the document, the term “or” should be interpreted to indicate “and / or.” For instance, the expression “A or B” may comprise 1) only A, 2) only B, and / or 3) both A and B. In other words, the term “or” in this document should be interpreted to indicate “additionally or alternatively.”
[0035] In this specification, "at least one of A and B" can 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" can be interpreted as "at least one of A and B."
[0036] 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."
[0037] Furthermore, parentheses used in this specification may mean "for example." Specifically, when "prediction (intra prediction)" is displayed, "intra prediction" is proposed as an example of "prediction." In other words, "prediction" in this specification is not limited to "intra prediction," and "intra prediction" is proposed as an example of "prediction." Furthermore, when "prediction (i.e., intra prediction)" is displayed, "intra prediction" is proposed as an example of "prediction."
[0038] In this specification, technical features described separately in one drawing may be embodied separately or simultaneously.
[0039] FIG. 1 illustrates a schematic diagram of an example of a video / image coding system to which this document can be applied.
[0040] 1, a video / image coding system may include a source device and a receiving device. The source device may transmit encoded video / image information or data in a file or streaming form to the receiving device via a digital storage medium or a network.
[0041] 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.
[0042] A video source may acquire video / images through a video / image capture, synthesis, or generation process. 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.
[0043] 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.
[0044] The transmitting unit can 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 network) in the form of a file or streaming. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitting unit can include elements for generating a media file through a predetermined file format and can include elements for transmission via a broadcasting / communication network. The receiving unit can receive / extract the bitstream and transmit it to a decoding device.
[0045] The decoding device can decode the video / image by performing a series of steps such as inverse quantization, inverse transformation, prediction, etc. that correspond to the operations of the encoding device.
[0046] The renderer can render the decoded video / image. The rendered video / image can be displayed via a display unit.
[0047] 2 is a diagram for explaining a schematic 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.
[0048] Referring to FIG. 2, the encoding apparatus 200 may include an image partitioner 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter 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.
[0049] The image division unit 210 may divide an input image (or picture, 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. The coding procedure according to this document may be performed based on a final coding unit that is not further divided. In this case, the largest coding unit may be used as the final coding unit based on coding efficiency according to image characteristics, or the coding unit may be recursively divided into coding units of lower depths as necessary, 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 is a unit of sample prediction, and the transform unit is a unit for deriving (inducing) transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.
[0050] The unit may be mixed with terms such as block or area in some cases. In the general case, an M×N block may refer to a set of samples or transform coefficients consisting of M columns and N rows. A sample may generally refer to a pixel or pixel value, or 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. A sample may be used as a term corresponding to a pixel or pel of a picture (or image).
[0051] 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 a current block or a 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.
[0052] The intra prediction unit 222 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 away from the current block depending on the prediction mode. In the intra prediction, the prediction mode may include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes may include, for example, a DC mode and a planar mode. The directional modes may 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 merely an example, and more or less directional prediction modes may be used depending on the setting. The intra prediction unit 222 may also determine the prediction mode to be applied to the current block by using the prediction modes applied to the neighboring blocks.
[0053] 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. In this case, 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 (colCU), 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 a skip mode and a merge mode, the inter prediction unit 221 may use motion information of a neighboring block as motion information of the current block. In the case of the skip mode, unlike the merge mode, a residual signal is not transmitted.In the case of a Motion Vector Prediction (MVP) mode, the motion vector of a neighboring block can be used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling the motion vector difference.
[0054] The prediction unit 220 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, and may simultaneously apply intra prediction and inter prediction. 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 / moving image 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 that a reference block is derived within the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document.
[0055] 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.
[0056] The quantizer 233 quantizes the transform coefficients and transmits them to the entropy encoder 240, which may encode the quantized signal (information on the quantized transform coefficients) and output the quantized signal as 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 via 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 a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmission unit (not shown) that transmits the signal output from the entropy encoding unit 240 and / or a storage unit (not shown) that stores the signal may be configured as an internal / external element of the encoding device 200, or the transmission unit may be included in the entropy encoding unit 240.
[0057] 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 a 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.
[0058] Meanwhile, Luma Mapping with Chroma Scaling (LMCS) may be applied during picture encoding and / or restoration.
[0059] 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, deblocking 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 240, as will be described later in relation to each filtering method. The filtering information may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
[0060] The modified reconstructed picture transmitted to the memory 270 can be used as a reference picture in the inter prediction unit 221. When inter prediction is applied through this, the encoding apparatus can avoid prediction mismatch between the encoding apparatus 200 and the decoding apparatus, and can also improve encoding efficiency.
[0061] 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 neighboring block or motion information of a temporal neighboring block. The memory 270 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 222.
[0062] FIG. 3 is a diagram illustrating a schematic configuration of a video / image decoding device to which this document can be applied.
[0063] Referring to FIG. 3, the decoding device 300 may include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 may include an inter predictor 332 and an intra predictor 331. The residual processor 320 may include a dequantizer 321 and an inverse transformer 322. 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. Also, 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.
[0064] When a bitstream including video / image information is input, the decoding apparatus 300 can restore an image corresponding to a process in which the video / image information is processed by the encoding apparatus of FIG. 2. For example, the decoding apparatus 300 can derive a unit / block based on block division related information obtained from the bitstream. The decoding apparatus 300 can perform decoding using a processing unit applied in the encoding apparatus. Thus, the processing unit of decoding is, for example, a coding unit, and the coding unit can 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 can be derived from the coding unit. Then, the restored image signal decoded and output by the decoding apparatus 300 can be reproduced through a reproduction device.
[0065] The decoding device 300 may receive a signal output from the encoding device of FIG. 2 in the form of a bitstream, and may decode the received signal through 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 decode a picture further 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 obtained from the bitstream by being decoded through the decoding procedure. 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 a bitstream, determine a context model using information on a syntax element to be decoded and decoding information on adjacent and to-be-decoded blocks, or information on symbols / bins decoded in a previous step, predict the occurrence probability of bins according to the determined context model, and perform arithmetic decoding of the bins to generate symbols corresponding to the values 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. Prediction information among the information decoded by the entropy decoding unit 310 may be provided to the prediction unit 330, and information on the residual on which the 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. Filtering information among the information decoded by the entropy decoding unit 310 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.
[0066] The inverse quantization unit 321 may inverse quantize the quantized transform coefficients to output 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 scan 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) to obtain transform coefficients.
[0067] The inverse transform unit 322 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0068] The prediction unit may perform prediction on a 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 information on the prediction output from the entropy decoding unit 310, and may determine a specific intra / inter prediction mode.
[0069] The predictor may generate a prediction signal based on various prediction methods described below. For example, the predictor may apply intra prediction or inter prediction for prediction of one block, and may simultaneously apply intra prediction and inter prediction. This may be called Combined Inter and Intra Prediction (CIIP). The predictor may also perform intra block copy (IBC) for prediction of a block. The intra block copy may be used for content image / moving image 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 use at least one of the inter prediction techniques described in this document.
[0070] The intra prediction unit 331 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. In intra prediction, the prediction mode may include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 331 may also determine the prediction mode to be applied to the current block by using the prediction mode applied to the neighboring block.
[0071] The inter prediction unit 332 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. In this case, 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 correlation of motion information between 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 spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the inter prediction unit 332 may configure a motion information candidate list based on the neighboring blocks 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.
[0072] The adder 340 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired 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 the skip mode is applied, the predicted block may be used as the reconstructed block.
[0073] 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 a 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 a next picture.
[0074] Meanwhile, Luma Mapping with Chroma Scaling (LMCS) can be applied in the picture decoding process.
[0075] The filtering unit 350 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 350 may generate a modified reconstructed picture by applying various filtering methods to the 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, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.
[0076] The (modified) reconstructed picture stored in the DPB of the memory 360 may be used as a reference picture in the inter prediction unit 332. The memory 360 may 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 may be transmitted to the inter prediction unit 332 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 360 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 331.
[0077] 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 encoding device 200, respectively.
[0078] 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, which 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 by an encoding device and a decoding device, and the encoding device can improve video coding efficiency by signaling information (residual information) on a residual between the original block and the predicted block, which is not an original sample value of the original block, to a decoding device. The decoding device can derive a residual block including residual samples based on the residual information, combine the residual block and the predicted block to generate a reconstructed block including reconstructed samples, and generate a reconstructed picture including the reconstructed block.
[0079] 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 (through a bitstream) to a decoding apparatus. 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 derive a residual sample (or a residual block) by performing an inverse quantization / inverse transform procedure based on the residual information. 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.
[0080] FIG. 4 illustrates a schematic of the multiple conversion technique according to this document.
[0081] 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.
[0082] 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 called 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 called a multi-core transform.
[0083] The multi-core transform may refer to a method of transforming by additionally using a Discrete Cosine Transform (DCT) type 2 and a Discrete Sine Transform (DST) type 7, DCT type 8, and / or DST type 1. That is, the multi-core transform may refer to a transform method of transforming a residual signal (or a residual block) in a spatial domain into a transform coefficient (or a first transform coefficient) 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 coefficient may be called a temporary transform coefficient from the perspective of a transform unit.
[0084] That is, when the existing transform method is applied, a spatial domain to frequency domain transform is applied to the residual signal (or residual block) based on DCT type 2 to generate transform coefficients. In contrast, when the multi-core transform is applied, a spatial domain to frequency domain transform is 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, 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.
[0085] 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, 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.
[0086] Also, according to one example, when a first-order transformation is performed by applying MTS, a specific basis function is set to a predetermined value, and when it is a vertical transformation or horizontal transformation, a mapping relationship for the transformation kernel can be set by combining what basis function is applied. For example, when a horizontal transformation kernel is represented by trTypeHor and a vertical transformation kernel is represented by trTypeVer, a trTypeHor or trTypeVer value of 0 can be set to DCT2, a trTypeHor or trTypeVer value of 1 can be set to DST7, and a trTypeHor or trTypeVer value of 2 can be set to DCT8.
[0087] In this case, MTS index information may be encoded and signaled to a decoding device to indicate any one of a number of transformation kernel sets. For example, when the MTS index is 0, it may indicate that the trTypeHor and trTypeVer values are both 0, when the MTS index is 1, it may indicate that the trTypeHor and trTypeVer values are both 1, when the MTS index is 2, it may indicate that the trTypeHor value is 2 and the trTypeVer value is 1, when the MTS index is 3, it may indicate that the trTypeHor value is 1 and the trTypeVer value is 2, and when the MTS index is 4, it may indicate that the trTypeHor and trTypeVer values are both 2.
[0088] As an example, a conversion kernel set according to MTS index information is shown in the table below.
[0089] [Table 1]
[0090] The transform unit may perform a secondary transform based on the (first) transform coefficients to derive modified (second) transform coefficients (S420). The first 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 (first) transform coefficients. The secondary transform may include 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 may refer to a transform in which the (first) transform coefficients derived through the first 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, based on the non-separable transform matrix, the (first-order) transform coefficients may be subjected to a transform at once without being subjected to a vertical transform and a horizontal transform separately (or a horizontal transform and a vertical transform independently). That is, the non-separable second-order transform may indicate a transform method in which, for example, a two-dimensional signal (transform coefficient) is rearranged into a one-dimensional signal through a specific determined direction (e.g., 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-major order is to arrange the first row, the second row, ..., the Nth row in a row for an M×N block, and the column-major order is to arrange the first column, the second column, ..., the Mth column in a row for an M×N block. The non-separable secondary transform may 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 equal to or greater than 8, an 8×8 non-separable secondary transform may be applied to the upper left 8×8 region of the transform coefficient block. Also, if the width (W) and height (H) of the transform coefficient block are both equal to or greater than 4, and the width (W) or height (H) of the transform coefficient block is 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) and height (H) of the transform coefficient block are 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.
[0091] Specifically, for example, if a 4×4 input block is used, a non-separable quadratic transform can be performed as follows:
[0092] The above 4×4 input block X can be expressed as follows:
[0093] <Formula 1>
number
[0094] If we express the above X in vector form, the vector JPEG2025031953000004.jpg84 is shown as follows.
[0095] <Formula 2>
number
[0096] As shown in Equation 2, the vector JPEG2025031953000006.jpg84 rearranges the two-dimensional blocks of X in Equation 1 into one-dimensional vectors in row-first order.
[0097] In this case, the second-order non-separable transform can be computed as follows:
[0098] <Formula 3>
number
[0099] Where: JPEG2025031953000008.jpg75 denotes the transform coefficient vector, and T denotes the 16×16 (non-separable) transform matrix.
[0100] The 16×1 transform coefficient vector Above JPEG2025031953000009.jpg75 can be derived JPEG2025031953000010.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.
[0101] Meanwhile, the non-separable secondary transform may select a mode-dependent transform kernel (or transform core, transform type), where the mode may include an intra-prediction mode and / or an inter-prediction mode.
[0102] As described above, the non-separable secondary transform may be performed based on an 8×8 transform or a 4×4 transform determined based on the width (W) and height (H) of the transform coefficient block. The 8×8 transform refers to a transform that may be applied to an 8×8 region contained within the corresponding transform coefficient block when W and H are both greater than or equal to 8, and the corresponding 8×8 region is the upper left 8×8 region within the corresponding transform coefficient block. Similarly, the 4×4 transform refers to a transform that may be applied to a 4×4 region contained within the corresponding transform coefficient block when W and H are both greater than or equal to 4, and the corresponding 4×4 region is the upper left 4×4 region within the corresponding transform coefficient block. For example, the 8×8 transform kernel matrix may be a 64×64 / 16×64 matrix, and the 4×4 transform kernel matrix may be a 16×16 / 8×16 matrix.
[0103] At this time, 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 are 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, each of the four transform sets for the 8×8 transform may include two 8×8 transform kernels, and each of the four transform sets for the 4×4 transform may include two 4×4 transform kernels.
[0104] However, the size of the above transforms, i.e., the size of the region to which the transforms are applied, is merely exemplary and sizes other than 8×8 or 4×4 can be used, the number of sets is n, and the number of transform kernels in each set is k.
[0105] The transform set may be referred to as an NSST set or an LFNST set. The selection of a particular set from the transform set may be performed based on, for example, an intra-prediction mode of the current block (CU or sub-block). The low-frequency non-separable transform (LFNST) is an example of a reduced non-separable transform, which will be described later, and refers to a non-separable transform for low-frequency components.
[0106] For reference, for example, the intra prediction modes may include two non-directional (or non-angular) intra prediction modes and 65 directional (or 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, in some cases, an intra prediction mode numbered 67 may be further used, and the intra prediction mode numbered 67 may indicate a Linear Model (LM) mode.
[0107] FIG. 5 exemplarily shows intra-directional modes of 65 prediction directions.
[0108] Referring to FIG. 5, intra prediction modes having horizontal directionality and intra prediction modes having vertical directionality can be distinguished with respect to the 34th intra prediction mode having a right-down diagonal prediction direction. 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 may indicate an offset to a mode index value. The 2nd to 33rd intra prediction modes have horizontal directionality, and the 34th to 66th intra prediction modes have vertical directionality. Meanwhile, the 34th intra prediction mode can be considered to be neither horizontal nor vertical in the strict sense, but can be classified as belonging to horizontal directionality in terms of determining a transform set of a secondary transform. This is because the input data is transposed for vertical modes symmetrical with respect to the 34th intra prediction mode, and the input data arrangement method for the horizontal mode is used for the 34th intra prediction mode. Transposing the input data means that rows become columns and columns become rows for two-dimensional block data M×N to form N×M data. The 18th intra prediction mode and the 50th intra prediction mode indicate a horizontal intra prediction mode and a vertical intra prediction mode, respectively, and the 2nd intra prediction mode predicts in an upper right direction using a left reference pixel, so it can be called an upper right diagonal intra prediction mode. In the same context, the 34th intra prediction mode can be called a lower right diagonal intra prediction mode, and the 66th intra prediction mode can be called a lower left diagonal intra prediction mode.
[0109] As an example, the mapping of four transform sets according to intra prediction modes is shown in the following table.
[0110] [Table 2]
[0111] As shown in Table 2, depending on the intra prediction mode, any one of four transform sets, i.e., lfnstTrSetIdx can be mapped to any one of 0 to 3, i.e., 4.
[0112] Meanwhile, when it is determined that a specific set is 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 indicates 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 lfnst index value 0 may indicate a first non-separable secondary transform kernel, an lfnst index value 1 may indicate a second non-separable secondary transform kernel, and an lfnst index value 2 may indicate a third non-separable secondary transform kernel. Alternatively, an lfnst index value 0 may indicate that a first non-separable secondary transform is not applied to a target block, and lfnst index values 1 to 3 may indicate the three transform kernels.
[0113] 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 as quantized transform coefficients via the quantizer unit as described above, and may be encoded and signaled to a decoding device and transmitted to an inverse quantization / inverse transform unit in an encoding device.
[0114] On the other hand, as described above, when the secondary transform is omitted, 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, and can be encoded and signaled to a decoding device and transmitted to an inverse quantization / inverse transform unit in an encoding device.
[0115] 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.
[0116] 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 is 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.
[0117] 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 a current block based on an LFNST (NSST or RST) transform set designated according to 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 a primary transform and a 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 a secondary inverse transform is applied based on a size of a current block.
[0118] On the other hand, as described above, when the secondary (inverse) transform is omitted, the residual block (residual sample) can be obtained by receiving the (dequantized) transform coefficients and performing the primary (separate) inverse transform. The encoding device and the decoding device can 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.
[0119] Meanwhile, in this paper, in order to reduce the computational complexity and memory requirements due to non-separable secondary transforms, RST (Reduced Secondary Transform), in which the size of the transform matrix (kernel) is reduced based on the concept of NSST, can be applied.
[0120] Meanwhile, the coefficients constituting the transformation kernel, transformation matrix, and transformation kernel matrix described in this document, i.e., kernel coefficients or matrix coefficients, can be expressed in 8 bits. This is one condition for implementation in a decoding device and an encoding device, and it is possible to 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 can be used, and it is more compatible with SIMD (Single Instruction Multiple Data) instructions used for optimal software implementation.
[0121] 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 computational complexity that occurs during the transform of a large-sized block or a non-separable transform.
[0122] The RST may be called by various terms such as a reduced transform, a reduced secondary transform, a reduction transform, a simplified transform, a simple transform, etc., and the name of the RST is not limited to the listed examples. Alternatively, the RST may be called a Low-Frequency Non-Separable Transform (LFNST) since it is mainly performed in a low-frequency domain including non-zero coefficients in a transform block. The transform index may be named an LFNST index.
[0123] Meanwhile, when the secondary inverse transform is performed based on the 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 the 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 corresponding transform.
[0124] FIG. 6 is a diagram illustrating a RST according to an embodiment of this document.
[0125] 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.
[0126] In an RST according to an embodiment, an N-dimensional vector may be mapped to an R-dimensional vector located in a different space to determine a reduced transformation matrix, 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 in some cases, the simplification factor may represent R. In addition, in some cases, the simplification factor may represent an N / R value.
[0127] 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 are not separately signaled.
[0128] The size of the simplified transformation matrix according to an embodiment is R×N, which is smaller than the size N×N of the normal transformation matrix, and can be defined as Equation 4 below.
[0129] <Formula 4>
number
[0130] The matrix T in the Reduced Transform block shown in FIG. 6(a) is the matrix T in Equation 4. R×N As shown in FIG. 6(a), a simplified transformation matrix T R×N When multiplied by, the transform coefficients for the current block can be derived.
[0131] 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. In this case, the memory and multiplication can be reduced by approximately 1 / 4 due to the simplification factor.
[0132] In this document, a matrix operation may be understood as an operation in which a matrix is placed to the left of a column vector to multiply the matrix by the column vector to obtain the column vector.
[0133] <Formula 5>
number
[0134] In Formula 5, r1 to r 64 may represent a residual sample for the target block, and more specifically, is a transform coefficient generated by applying a linear transform. As a result of the operation of Equation 5, the transform coefficient c i can be derived, c i The derivation process is as shown in Equation 6.
[0135] <Formula 6>
number
[0136] As a result of the calculation of Equation 6, the transform coefficients c1 to c2 for the target block are R That 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 a residual sample having a size of 64×1 (N×1), 64 (N) transform coefficients for the current block are 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, the amount of data transmitted from the encoding device 200 to the decoding device 300 is reduced, and therefore the transmission efficiency between the encoding device 200 and the decoding device 300 can be increased.
[0137] Considering the size of the transformation matrix, the size of the normal transformation matrix is 64x64 (NxN), while the size of the simplified transformation matrix is reduced to 16x64 (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, when using the simplified transformation matrix, the number of multiplication operations can be reduced by a ratio of R / N (RxN).
[0138] 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.
[0139] Inverse RST matrix T according to one embodiment N×R The size of the simplified transformation matrix T R×N It is in a transpose relationship with.
[0140] The matrix T in the Reduced Inv.Transform block shown in Figure 6(b) t is the inverse RST matrix T R×N T (The superscript T means transpose.) As shown in FIG. 6(b), the inverse RST matrix T R×N T When the inverse RST matrix T is multiplied, modified transform coefficients for the current block or residual samples for the current block can be derived. R×N T is (T R×N ) T N×R It can also be expressed as:
[0141] More specifically, when the inverse RST is applied as the secondary inverse transform, the inverse RST matrix T R×N T Alternatively, an inverse RST may be applied as an inverse linear transform, in which case the inverse RST matrix T R×N T Once multiplied by, residual samples for the current block can be derived.
[0142] 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.
[0143] <Formula 7>
number
[0144] 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 i can be derived, and r i The derivation process is as shown in Equation 8.
[0145] <Formula 8>
number
[0146] 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 the normal inverse transformation matrix is 64×64 (N×N), and the size of the simplified inverse transformation matrix is reduced to 64×16 (N×R), so compared to performing 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 N×N when using the normal inverse transformation matrix, when using the simplified inverse transformation matrix, the number of multiplication operations can be reduced by a ratio of R / N (N×R).
[0147] Meanwhile, the transform set configuration as shown in Table 2 may be applied to the 8×8 RST. That is, the corresponding 8×8 RST may be applied according to 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 may be configured to select one from up to four transforms including a case where a secondary transform is not applied. When a secondary transform is not applied, it may be considered that an identity matrix is applied. When indexes 0, 1, 2, and 3 are assigned to the four transforms (for example, index 0 may be assigned to an identity matrix, i.e., when a secondary transform is not applied), a syntax element called a transform index or an lfnst index may be signaled for each transform coefficient block to specify a transform to be applied. That is, for an 8×8 upper left block, an 8×8 RST may be specified in the RST configuration through the transform index, or an 8×8 lfnst may be specified when an LFNST is applied. The 8×8 lfnst and 8×8 RST refer to a transform that can be applied to an 8×8 region contained within a corresponding transform coefficient block when W and H of a target block to be transformed are both greater than or equal to 8, and the corresponding 8×8 region is the upper left 8×8 region within the corresponding transform coefficient block. Similarly, the 4×4 lfnst and 4×4 RST refer to a transform that can be applied to a 4×4 region contained within a corresponding transform coefficient block when W and H of a target block are both greater than or equal to 4, and the corresponding 4×4 region is the upper left 4×4 region within the corresponding transform coefficient block.
[0148] Meanwhile, according to an embodiment of the present document, in the conversion of the encoding process, a maximum 16×48 conversion kernel matrix can be applied by selecting only 48 data, not a 16×64 conversion kernel matrix, for 64 data constituting an 8×8 region. Here, "maximum" means that the maximum value of m is 16 for an m×48 conversion kernel matrix capable of generating m coefficients. That is, when RST is performed by applying an m×48 conversion kernel matrix (m≦16) to an 8×8 region, m coefficients can be generated by receiving an input of 48 data. When m is 16, 16 coefficients can be generated by receiving an input of 48 data. That is, when 48 data constitute a 48×1 vector, a 16×1 vector can be generated by sequentially multiplying a 16×48 matrix and a 48×1 vector. At this time, a 48×1 vector can be configured by appropriately arranging 48 data constituting an 8×8 region. For example, a 48×1 vector can be configured based on 48 data constituting a region excluding a 4×4 region at the bottom right of the 8×8 region. In this case, when a matrix operation is performed by applying a maximum 16x48 transform kernel matrix, 16 modified transform coefficients are generated, and the 16 modified transform coefficients can 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 can be filled with 0s.
[0149] In the inverse transformation of the decoding process, a transposed matrix of the transformation kernel matrix described above can be used. That is, when the inverse RST or LFNST is performed as the inverse transformation process performed in the decoding device, the input coefficient data to which the inverse RST is applied is composed of one-dimensional vectors according to a predetermined arrangement order, and the modified coefficient vectors obtained by multiplying the one-dimensional vectors by the corresponding inverse RST matrix on the left side can be arranged in two-dimensional blocks according to a predetermined arrangement order.
[0150] 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, and a 16×48 transform kernel matrix. For the matrix operation, the 48 transform coefficients are input in 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.
[0151] 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 corner 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, an n×1 vector may be interpreted as an n×1 matrix, and therefore may be expressed as an n×1 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 corner, upper right corner, and lower left corner regions excluding the lower right corner region of the 8×8 region.
[0152] Meanwhile, when the secondary inverse transform is performed based on the 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 the 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 corresponding transform.
[0153] A detailed description of the non-separable transform, LFNST, is given below: LFNST may include a forward transform by an encoding device and an inverse transform by a decoding device.
[0154] The encoding device takes as input the result (or a part of the result) derived after applying a forward primary (core) transform, and applies a forward secondary transform.
[0155] [Number 9] y=G T x
[0156] 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 transposed matrix G is G. T It becomes dimensional.
[0157] For the reverse LFNST, the dimensions of the matrix G are [48×16], [48×8], [16×16], and [16×8], where 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.
[0158] On the other hand, in the case of forward LFNST, the matrix G T The dimensions of are [16×48], [8×48], [16×16], and [8×16], where the [8×48] and [8×16] matrices are submatrices obtained by sampling the upper eight transformation basis vectors of the [16×48] and [16×16] matrices, respectively.
[0159] 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 primary 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.
[0160] FIG. 7 is a diagram showing an example of the order in which output data of the forward linear transform is arranged into a one-dimensional vector. The left diagrams of FIG. 7(a) and (b) show the order in which a [48×1] vector is created, and the right diagrams of FIG. 7(a) and (b) show the order in which a [16×1] vector is created. In the case of LFNST, the one-dimensional vector x can be obtained by sequentially arranging 2D data in the order shown in FIG. 7(a) and (b).
[0161] 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 horizontal with respect to the 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 vertical with respect to the diagonal direction, the output data of the forward primary transform may be arranged in the order of (b) of FIG.
[0162] As an example, an ordering different from that of (a) and (b) of Figure 7 can be applied, and when it is desired to derive the same result (y vector) as when the ordering of (a) and (b) of Figure 7 is applied, the column vectors of matrix G can be rearranged according to the corresponding ordering. In other words, the column vectors of G can be rearranged so that each element constituting the x vector is always multiplied by the same transformation basis vector.
[0163] 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 an input, such as a configuration that performs quantization or residual coding, requires two-dimensional data as input data, the output y vector of Equation 9 must again be appropriately arranged as 2D data.
[0164] 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.
[0165] 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.
[0166] As another example, since the order in which the output vector y is processed by a configuration that performs quantization or residual coding may be performed in a preset order, the output vector y may not be arranged in a 2D block as shown 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 in a specific order such as the diagonal scan order of Fig. 8.
[0167] Meanwhile, the decoding device can arrange (arrange) two-dimensional data output through an inverse quantization process for inverse transform according to a preset scanning order to form a one-dimensional input vector y. The input vector y can be output as an input vector x according to the following equation.
[0168] [Number 10] x=Gy
[0169] 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 is a [48x1] or [16x1] vector.
[0170] The output vector x is arranged in a two-dimensional block in the order shown in FIG. 7 and arranged as two-dimensional data, and such two-dimensional data becomes the input data (or a part of the input data) of the inverse linear transformation.
[0171] Therefore, the inverse quadratic transform is generally the opposite of the forward quadratic transform process, 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.
[0172] 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.
[0173] 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 of the four transform sets is used is determined according to an intra prediction mode, and more specifically, the transform set is determined based on an intra prediction mode value extended in consideration of a wide angle intra prediction mode (Wide Angle Intra Prediction, WAIP). Which matrix is selected from the two matrices constituting the selected transform set is derived through index signaling. More specifically, the transmitted index value 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.
[0174] FIG. 9 is a diagram illustrating a wide-angle intra prediction mode according to one embodiment of the present document.
[0175] General 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 indicate CCLM (Cross Component Linear Model) modes, and values from -14 to -1 and values from 67 to 80 indicate intra prediction mode values extended by applying WAIP.
[0176] When the width of the prediction current block is greater than the height, the upper reference pixel is generally closer to the position inside the block to be predicted. Therefore, predicting in the bottom-left direction is more accurate than predicting in the top-right direction. On the other hand, when the height of the block is greater than the width, the left reference pixel is generally closer to the position inside the block to be predicted. Therefore, predicting in the top-right direction is more accurate than predicting in the bottom-left direction. Therefore, it is advantageous to apply remapping, i.e., mode index conversion, to the index of the wide-angle intra prediction mode.
[0177] When wide-angle intra prediction is applied, information on 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 total number of intra prediction modes for a particular block (e.g., a non-square block of a particular size) is not changed, i.e., the total number of intra prediction modes is 67, and the intra prediction mode coding for the particular block is not changed.
[0178] Table 3 below shows a process of deriving a modified intra mode by remapping an intra prediction mode to a wide-angle intra prediction mode.
[0179] [Table 3]
[0180] 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 currently adopted in the VVC standard, and the variable values cIdx of 0, 1, and 2 indicate the luma, Cb, and Cr components, respectively. The Log2 function shown in Table 3 returns a log value with a base of 2, and the Abs function returns an absolute value.
[0181] 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 may become the height and width of a current block for intra prediction mode remapping. In this case, a variable whRatio reflecting the ratio of width to height may be set to Abs(Log2(nW / nH)).
[0182] For non-square blocks, the intra prediction mode can be modified in two distinct cases.
[0183] First, if all of the following conditions are met: (1) the width of the current block is greater than the height, (2) the intra prediction mode before modification is greater than or equal to 2, and (3) the intra prediction mode is (8+2*whRatio) if the variable whRatio is greater than 1, or 8 if the variable whRatio is less than or equal to 1, and is less than the derived value [predModeIntra is less than (whRatio>1)? (8+2*whRatio):8], the intra prediction mode is set to a value 65 greater than the intra prediction mode [predModeIntra is set equal to (predModeIntra+65)].
[0184] If the above is not the case, then (1) the height of the current block is greater than the width, (2) the intra prediction mode before modification is less than or equal to 66, and (3) the intra prediction mode is greater than the derived value [predModeIntra is greater than(whRatio>1)?(60-2*whRatio):60], and is (60-2*whRatio) if the variable whRatio is greater than 1, or 60 if the variable whRatio is less than or equal to 1, then the intra prediction mode is set to a value 67 less than the intra prediction mode [predModeIntra is set equal to(predModeIntra-67)].
[0185] 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.
[0186] However, it is assumed that the forward LFNST input data for mode 54 is symmetrical with the forward LFNST input data for mode 14. For example, for modes 14 and 54, two-dimensional data is rearranged into one-dimensional data in 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).
[0187] On the other hand, as described above, which of the [48×16] and [16×16] transformation matrices to apply to LFNST is determined based on the size and shape of the block to be transformed.
[0188] Fig. 10 shows block shapes to which LFNST is applied, where (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.
[0189] 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 4x4 region, and for block (c) in Fig. 10, LFNST is applied to each of the two adjacent top-left 4x4 regions. In (a), (b), and (c) in Fig. 10, LFNST is applied in 4x4 region units, so this type of LFNST is hereinafter referred to as "4x4 LFNST," and a [16x16] or [16x8] matrix can be applied as the corresponding transformation matrix depending on the matrix dimension for G in Equation 9 and Equation 10.
[0190] More specifically, a [16×8] matrix is applied to the 4×4 block (4×4TU or 4×4CU) in (a) of Fig. 10, and a [16×16] matrix is applied to the blocks in (b) and (c) of Fig. 10. This is to match the worst case computational complexity to 8 multiplications per sample.
[0191] For (d) and (e) of FIG. 10, LFNST is applied to the upper left 8×8 region, and such LFNST is hereinafter referred to as "8×8 LFNST". A [48×16] or [48×8] matrix can be applied as the corresponding 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 upper left 8×8 region are not used as input values for forward LFNST. That is, as can be seen in the left order of FIG. 7(a) or the left 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.
[0192] 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. This is also to match the worst case computational complexity to 8 multiplications per sample.
[0193] Depending on the block shape, when the corresponding forward LFNST (4x4 LFNST or 8x8 LFNST) is applied, 8 or 16 output data (the y vector in Equation 9, an [8x1] or [16x1] vector) are generated. In forward LFNST, the number of output data may be the same as or less than the number of input data due to the properties of the matrix GT.
[0194] FIG. 11 shows an example of the arrangement of output data from the forward LFNST, and illustrates blocks in which the output data from the forward LFNST is arranged according to the block shape.
[0195] The shaded area at the top left 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 the value 0, 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.
[0196] As mentioned above, the number of output data also changes because the dimension of the transformation matrix applied changes depending on the block shape. As shown in FIG. 11, there are cases where the output data of the forward LFNST cannot 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 shown in bold or a part of the area inside the block, respectively, to generate an [8×1] vector as the output of the forward LFNST. That is, according to the scan order shown in FIG. 8(b), only eight output data are filled as shown in (a) and (d) of FIG. 11, and the remaining eight positions can be filled with 0. In the case of the block applied with LFNST in FIG. 10(d), the two 4×4 blocks at the upper right and lower left adjacent to the upper left 4×4 block are also filled with the value 0 as shown in FIG. 11(d).
[0197] 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 Figure 11, when LFNST is applied, the number of output data of the forward LFNST may be the same as or less than the number of input data, so areas filled with 0 values occur as shown below.
[0198] 1) As shown in (a) of FIG. 11, in the upper left corner of the 4×4 block, the 8th position in the scan order and after, that is, the 9th to 16th samples
[0199] 2) As shown in (d) and (e) of Figure 11, the [16×48] matrix or the [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.
[0200] Therefore, if non-zero data is found by checking the above 1) and 2), it is certain that LFNST is not applied, and therefore signaling of the corresponding LFNST index can be omitted.
[0201] 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 an encoding device can know whether non-zero data (significant coefficients) are possible for all positions inside a TU or CU block through residual coding. Thus, an encoding device can determine whether to perform signaling for the LFNST index based on whether non-zero data is possible, and a 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, signaling of the LFNST index is performed.
[0202] Since a truncated unary code is applied as a binarization method for the LFNST index, the LFNST index consists of a maximum of two bins, and the binary codes for the possible LFNST index values of 0, 1, and 2 are assigned as 0, 10, and 11, respectively. For 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 following table.
[0203] [Table 4]
[0204] As shown in Table 4, for the first bin (binIdx=0), in the case of a single tree, context 0 can be applied, and in the case of not a single tree, context 1 can be applied. Also, as shown in Table 4, for the second bin (binIdx=1), context 2 can be applied. That is, 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 value of ctxInc (0, 1, 2).
[0205] Here, the single tree means that the luma component and the chroma component are coded in the same coding structure. After a coding unit is divided in the same coding structure, if the size of the coding unit is below a certain threshold and the luma component and the chroma component are coded in separate tree structures, the coding unit can be 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.
[0206] Alternatively, if the value of the variable treeType for the first bin is assigned as SINGLE_TREE, then context 0 can be used for coding, otherwise context 1 can be used for coding.
[0207] Meanwhile, the following simplification methods can be applied to the adopted LFNST:
[0208] (i) As an example, the number of output data items for the forward LFNST can be limited to a maximum of 16.
[0209] 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 corner, 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 is applied only to one 4x4 region located at the upper left corner of 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 video coding.
[0210] Fig. 12 is a diagram showing an example in which the number of output data items for forward LFNST is limited to a maximum of 16. As shown in Fig. 12, when LFNST is applied to the upper left 4x4 region of a 4xN or Nx4 block where N is 16 or greater, the number of output data items from the forward LFNST is 16.
[0211] (ii) As an example, zero-out may be additionally applied to areas to which LFNST is not applied. In this document, zero-out may mean filling all position values belonging to a specific area with the value 0. That is, zero-out may also be applied to areas that are not changed 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, and therefore zero-out may be divided into two types ((ii)-(A) and (ii)-(B)) as follows.
[0212] (ii)-(A) When 4×4 LFNST is applied, it is possible to zero out areas to which 4×4 LFNST is not applied. FIG 13 is a diagram illustrating zeroing out in a block to which 4×4 LFNST is applied, according to an example.
[0213] As shown in FIG. 13, for blocks to which 4×4 LFNST is applied, that is, for blocks (a), (b), and (c) in FIG. 11, the areas to which LFNST is not applied can all be filled with 0.
[0214] 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.
[0215] (ii)-(B) When 8×8 LFNST is applied, it is possible to zero out areas to which 8×8 LFNST is not applied. FIG 14 is a diagram illustrating zeroing out in a block to which 8×8 LFNST is applied, according to an example.
[0216] As shown in FIG. 14, for blocks to which 8×8 LFNST is applied, that is, for blocks (d) and (e) in FIG. 11, the areas to which LFNST is not applied can all be filled with 0.
[0217] (iii) When LFNST is applied due to the zero-out proposed in (ii) above, the area filled with zeros can change. 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.
[0218] For example, when applying (ii)-(B), it is possible to check whether non-zero data exists in the area filled with the value 0 in (d) and (e) of FIG. 11 as well as the area additionally filled with 0 in FIG. 14, and then perform signaling for the LFNST index only if non-zero data does not exist.
[0219] Of course, even when applying the zero-out proposed in (ii) above, it is possible to check whether non-zero data exists as with the existing LFNST index signaling. That is, LFNST index signaling can be applied by checking whether non-zero data exists for blocks filled with zeros in Figure 11. In this case, zero-out is performed only in the encoding device, and LFNST index parsing can be performed in the decoding device without assuming the corresponding zero-out, that is, by checking only whether non-zero data exists for only the areas explicitly marked with zeros in Figure 11.
[0220] Various embodiments can be derived by applying combinations of the above simplification methods ((i), (ii)-(A), (ii)-(B), (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.
[0221] Working Example
[0222] -Limit the number of output data for forward LFNST to a maximum of 16 → (i)
[0223] When -4×4LFNST is applied, all areas to which 4×4LFNST is not applied are zeroed out → (ii)-(A)
[0224] When -8×8LFNST is applied, all areas to which 8×8LFNST is not applied are zeroed out → (ii)-(B)
[0225] -For the area filled with the existing value 0 and the area filled with 0 by additional zero-out ((ii)-(A), (ii)-(B)), check whether non-zero data exists, and only if non-zero data does not exist, perform LFNST indexing signaling → (iii)
[0226] In the above embodiment, when LFNST is applied, the region in which non-zero output data can exist is limited 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 14(b), the 16th position in the scan order (i.e., the bottom rightmost position of the upper left 4x4 block) is the last position in which non-zero data can exist.
[0227] Therefore, when LFNST is applied, it can be determined whether LFNST index signaling 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).
[0228] In the case of the zero-out method proposed in (ii), the amount of calculation required to perform the entire transformation process can be reduced because the amount of data finally generated when applying both the primary transformation and LFNST is reduced. In other words, when LFNST is applied, zero-out is also applied to the forward primary 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 primary transformation. Therefore, the amount of calculation required to generate the corresponding data can be reduced. Additional effects of the zero-out method proposed in (ii) can be summarized as follows.
[0229] First, it reduces the amount of computation required to perform the entire transformation process as described above.
[0230] In particular, when (ii)-(B) is applied, the amount of calculations in the worst case is reduced, making the transform process lighter. To expand on this, a large amount of calculations is generally required to execute a large-size primary transform, and 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 transform calculations increases more as the overall size of the block (TU or CU) increases.
[0231] Second, the amount of computation required for the overall conversion process is reduced, reducing the power consumption required to perform the conversion.
[0232] Third, it reduces the latency associated with the conversion process.
[0233] Secondary transforms such as LFNST increase the overall latency associated with transform execution by adding computational complexity to the existing primary transform. 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 transform during encoding leads to an increase in latency until reconstruction, which can lead to an increase in the overall latency of intra prediction encoding.
[0234] However, by applying the zero-out technique proposed in (ii), the latency of the first transform execution can be significantly reduced when LFNST is applied, so the latency of the entire transform execution can be maintained or reduced, making it easier to implement the encoding device.
[0235] Meanwhile, in the conventional intra prediction, a block to be coded is regarded as one coding unit and coded without division. However, ISP (Intra Sub-Partition) coding means dividing a block to be coded horizontally or vertically and coding intra prediction. At this time, coding / decoding is performed in divided block units to generate a restored block, and the restored block can be used as a reference block for the next divided block. As an example, in ISP coding, one coding block can be divided into two or four sub-blocks and coded, and in ISP, one sub-block performs intra prediction with reference to the restored pixel value of the sub-block located to the left or upper adjacent side. Hereinafter, "coding" used can be used as a concept including both coding performed by an encoding device and decoding performed by a decoding device.
[0236] Meanwhile, the signaling order of the LFNST index and the MTS index will be considered below.
[0237] As an example, the LFNST index signaled in the residual coding may be coded next to the coding position for the last non-zero coefficient position, and the MTS index may be coded immediately after the LFNST index. In such a configuration, the LFNST index may be signaled for each transform unit. Alternatively, even if not signaled in the residual coding, the LFNST index may be coded next to the coding position for the last significant coefficient position, and the MTS index may be coded next to the LFNST index.
[0238] The syntax of the residual coding according to an example is as follows:
[0239] [Table 5-1]
[0240] [Table 5-2]
[0241] The meanings of the main variables shown in Table 5 are as follows:
[0242] 1. cbWidth, cbHeight: Width and height of the current coding block
[0243] 2. log2TbWidth, log2TbHeight: Base-2 log values for the width and height of the current transform block, which can be reduced to the upper left corner area where zero-out can be reflected and non-zero coefficients can exist.
[0244] 3. sps_lfnst_enabled_flag: A flag indicating whether LFNST can be enabled or not. When the flag value is 0, it indicates that LFNST cannot be applied, and when the flag value is 1, it indicates that LFNST can be applied. This is defined in the Sequence Parameter Set (SPS).
[0245] 4. CuPredMode[chType][x0][y0]: prediction mode corresponding to the variable chType and the position (x0, y0), chType can have values 0 and 1, where 0 indicates the luma component and 1 indicates the chroma component. The position (x0, y0) indicates the position on the picture, and the possible values of CuPredMode[chType][x0][y0] are MODE_INTRA (intra prediction) and MODE_INTER (inter prediction).
[0246] 5. IntraSubPartitionsSplit[x0][y0]: The content for position (x0, y0) is the same as 4 above. It indicates what type of ISP split is applied at position (x0, y0), and ISP_NO_SPLIT indicates that the coding unit corresponding to position (x0, y0) is not split into partition blocks.
[0247] 6. intra_mip_flag[x0][y0]: The contents for the position (x0, y0) are the same as those in 4 above. intra_mip_flag is a flag indicating whether or not the MIP (Matrix-based Intra Prediction) prediction mode is applied. When the flag value is 0, it indicates that MIP is not applicable, and when the flag value is 1, it indicates that MIP is applied.
[0248] 7. cIdx: A value of 0 indicates luma, and values of 1 and 2 indicate the chroma components Cb and Cr, respectively.
[0249] 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)
[0250] 9. tu_cbf_cb[x0][y0]: The contents for position (x0, y0) are the same as 4 above. Indicates the CBF (Coded Block Flag) for the Cb component. If the value is 0, it means that a non-zero coefficient does not exist in the transform unit corresponding to the Cb component, and if the value is 1, it indicates that a non-zero coefficient exists in the transform unit corresponding to the Cb component.
[0251] 10. lastSubBlock: Indicates the position in the scan order of the sub-block (Sub-Block, Coefficient Group (CG)) in which the last non-zero coefficient is located. 0 indicates a sub-block containing a DC component, and if it is greater than 0, it is not a sub-block containing a DC component.
[0252] 11. lastScanPos: Indicates the position of the last valid coefficient in the scan order within a subblock. If a subblock consists of 16 positions, the possible values are 0 to 15.
[0253] 12. lfnst_idx[x0][y0]: LFNST index syntax element to be parsed. If not parsed, the value 0 is inferred. That is, the default value is set to 0, which indicates that LFNST is not applied.
[0254] 13. 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 0, it means that the last significant coefficient is located at DC.
[0255] 14. cu_sbt_flag: A flag indicating whether the SubBlock Transform (SBT) currently included in the VVC standard is applicable. If the flag value is 0, it indicates that the SBT is not applicable, and if the flag value is 1, it indicates that the SBT is applied.
[0256] 15. 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 corresponding 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.
[0257] 16. tu_mts_idx[x0][y0]: MTS index syntax element to be parsed. If not parsed, it is inferred to have a value of 0. That is, the default value is set to 0, which indicates that DCT-2 is applied to all horizontal and vertical directions.
[0258] As shown in Table 5, in the case of a single tree, it is possible to determine whether or not the LFNST index can be signaled based only on the last significant coefficient position condition for the luma. That is, if the last significant coefficient position is not DC and the last significant coefficient is present inside the top left sub-block (CG), for example, a 4×4 block, the LFNST index is signaled. In this case, in the case of a 4×4 transform block and an 8×8 transform block, the LFNST index is signaled only if the last significant coefficient is present at positions 0 to 7 inside the top left sub-block.
[0259] In the case of a dual tree, the LFNST index is signaled independently for luma and chroma, and for chroma, the LFNST index can be signaled by applying the last significant coefficient position condition only to the Cb component.The corresponding condition is not checked for the Cr component, and if the CBF value for Cb is 0, the LFNST index can be signaled by applying the last significant coefficient position condition to the Cr component.
[0260] In Table 5, "Min(log2TbWidth, log2TbHeight) >= 2" can be expressed as "Min(tbWidth, tbHeight) >= 4", and "Min(log2TbWidth, log2TbHeight) >= 4" can be expressed as "Min(tbWidth, tbHeight) >= 16".
[0261] In Table 5, log2ZoTbWidth and log2ZoTbHeight refer to the base-2 log values of the width and height, respectively, for the top-left region where the last significant coefficient can reside due to zeroing out.
[0262] As shown in Table 5, the log2ZoTbWidth and log2ZoTbHeight values can be updated in two places: first before the MTS index or LFNST index values are parsed, and second after parsing the MTS index.
[0263] The first update occurs before the MTS index (tu_mts_idx[x0][y0]) value is parsed, so log2ZoTbWidth and log2ZoTbHeight can be set regardless of the MTS index value.
[0264] After the MTS index is parsed, log2ZoTbWidth and log2ZoTbHeight are set for cases where the MTS index value is greater than 0 (in the case of a DST-7 / DCT-8 combination). When DST-7 / DCT-8 is applied independently to the horizontal and vertical directions in the first transformation, there can be up to 16 significant coefficients per row or column in each direction. That is, after applying a DST-7 / DCT-8 of length 32 or more, up to 16 transform coefficients per row or column can be derived from the left or top. Therefore, when DST-7 / DCT-8 is applied to both the horizontal and vertical directions for a two-dimensional block, significant coefficients can only exist up to the top left 16x16 region.
[0265] Also, currently, when DCT-2 is applied independently to the horizontal and vertical directions in a primary transform, up to 32 effective coefficients can exist for each row or column in each direction. That is, when a DCT-2 of length 64 or more is applied, up to 32 transform coefficients can be derived for each row or column from the left or top. Therefore, when DCT-2 is applied to both the horizontal and vertical directions for a two-dimensional block, effective coefficients can only exist up to the top left 32x32 region.
[0266] Also, when DST-7 / DCT-8 is applied in one direction and DCT-2 is applied in the other direction, there can be 16 significant coefficients in the former direction and 32 significant coefficients in the latter direction. For example, for a 64x8 transform block, if DCT-2 is applied in the horizontal direction and DST-7 is applied in the vertical direction (which can occur when implicit MTS is applied), there can be significant coefficients in the upper left 32x8 region at most.
[0267] When log2ZoTbWidth and log2ZoTbHeight are updated in two places as in Table 5, i.e., before MTS index parsing, the range of last_sig_coeff_x_prefix and last_sig_coeff_y_prefix can be determined by log2ZoTbWidth and log2ZoTbHeight as shown in the table below.
[0268] [Table 6]
[0269] In such a case, the maximum values of last_sig_coeff_x_prefix and last_sig_coeff_y_prefix may be set to reflect the log2ZoTbWidth and log2TbHeight values in the binarization process for last_sig_coeff_x_prefix and last_sig_coeff_y_prefix.
[0270] [Table 7]
[0271] Meanwhile, as an example, in the case of ISP mode and LFNST is applied, when the signaling of Table 5 is applied, the spec text can be configured as shown in Table 8. Compared with Table 5, the condition that the LFNST index is signaled only when the mode is not ISP (IntraSubPartitionsSplit[x0][y0]==ISP_NO_SPLIT in Table 5) has been deleted.
[0272] In the case of a single tree, if the LFNST index sent in the case of luma (cIdx=0) is reused in the case of chroma, the LFNST index sent for the first ISP partition block in which a significant coefficient exists can be applied to the chroma transform block. Alternatively, even in the case of a single tree, the LFNST index can be signaled separately from the luma component for the case of a chroma component. The variables listed in Table 8 are described in Table 5.
[0273] [Table 8]
[0274] Meanwhile, according to one example, the LFNST index and / or the MTS index may be signaled at a coding unit level. As described above, the LFNST index may have three values, 0, 1, and 2, where 0 indicates that LFNST is not applied, and 1 and 2 indicate the first and second candidates, respectively, of the two LFNST kernel candidates included in the selected LFNST set. The LFNST index is coded via truncated unary binarization, and the values 0, 1, and 2 may be coded with bin strings 0, 10, and 11, respectively.
[0275] According to one example, LFNST can be applied only when DCT-2 is applied to both the horizontal and vertical directions in the primary transform. Therefore, if the MTS index is signaled after the LFNST index signaling, the MTS index can be signaled only if the LFNST index value is 0, and if the LFNST index is not 0, the primary transform can be performed by applying DCT-2 to both the horizontal and vertical directions without signaling the MTS index.
[0276] The MTS index value can have values of 0, 1, 2, 3, 4, which can indicate that DCT-2 / DCT-2, DST-7 / DST-7, DCT-8 / DST-7, DST-7 / DCT-8, DCT-8 / DCT-8 are applied to the horizontal and vertical directions, respectively. The MTS index can also be coded via truncated unary binarization, where the values 0, 1, 2, 3, 4 can be coded with bin strings 0, 10, 110, 1110, 1111, respectively.
[0277] The LFNST index and the MTS index can be signaled at the coding unit level, and the MTS index can be coded following the LFNST index at the coding unit level. The coding unit syntax table for this is as follows.
[0278] [Table 9]
[0279] According to Table 9, in the condition for signaling lfnst_idx[x0][y0], the existing condition for checking whether the value of tu_mts_idx[x0][y0] is 0 (i.e., checking whether both the horizontal and vertical directions are DCT-2) has been changed to a condition for checking whether the value of transform_skip_flag[x0][y0] is 0 (!transform_skip_flag[x0][y0]). transform_skip_flag[x0][y0] indicates whether the coding unit is coded in a transform skip mode in which the transform is omitted, and the above flag is signaled before the MTS index and the LFNST index. That is, since lfnst_idx[x0][y0] is signaled before the value of tu_mtx_idx[x0][y0] is signaled, only the condition for the value of transform_skip_flag[x0][y0] can be checked.
[0280] As shown in Table 9, when coding tu_mts_idx[x0][y0], various conditions are checked and, as mentioned above, tu_mts_idx[x0][y0] is signaled only if the value of lfnst_idx[x0][y0] is 0.
[0281] Furthermore, tu_cbf_luma[x0][y0] is a flag indicating whether or not a significant coefficient exists for the luma component, and cbWidth and cbHeight indicate the width and height of the coding unit for the luma component, respectively.
[0282] Also, in Table 9, (IntraSubPartitionsSplit[x0][y0]==ISP_NO_SPLIT) indicates that the ISP mode is not used, and (!cu_sbt_flag) indicates that SBT is not applied.
[0283] According to Table 9, when the width and height of the coding unit for the luma component are both less than or equal to 32, tu_mts_idx[x0][y0] is signaled, that is, whether MTS is applicable is determined by the width and height of the coding unit for the luma component.
[0284] As another example, when transform block tiling occurs (e.g., when the maximum transform size is set to 32, a 64x64 coding unit is divided into four 32x32 transform blocks for coding), the MTS index may be signaled based on the size of each transform block. For example, when the width and height of a transform block are both less than or equal to 32, the same MTS index value may be applied to all transform blocks in a coding unit, and the same first-order transform may be applied. In addition, when transform block tiling occurs, the value of tu_cbf_luma[x0][y0] in Table 9 is the CBF value for the top left transform block, or may be set to 1 for all transform blocks if the corresponding CBF value of at least one transform block is 1.
[0285] For example, when the ISP mode is applied to the current block, LFNST can be applied, in which case Table 9 can be modified as shown in Table 10.
[0286] [Table 10]
[0287] As shown in Table 10, even in the 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.
[0288] Also, as in Table 10, tu_mts_idx[x0][y0] can be signaled only when not in ISP mode, so the MTS index coding portion is the same as in Table 9.
[0289] If the MTS index is signaled immediately after the LFNST index as in Tables 9 and 10, information about the primary transform cannot be known when performing residual coding. That is, the MTS index is signaled after the residual coding. Therefore, the part in which zeroing out is performed leaving only 16 coefficients for DST-7 or DCT-8 of length 32 in the residual coding part can be changed as shown in Table 11 below.
[0290] [Table 11-1]
[0291] [Table 11-2]
[0292] In the process of determining log2ZoTbWidth and log2ZoTbHeight as shown in Table 11 (where log2ZoTbWidth and log2ZoTbHeight respectively indicate the base-2 log values of the width and height for the upper left region remaining after zero-out is performed), the part checking the value of tu_mts_idx[x0][y0] can be omitted.
[0293] The binarization for last_sig_coeff_x_prefix and last_sig_coeff_y_prefix in Table 11 can be determined based on log2ZoTbWidth and log2ZoTbHeight as in Table 7.
[0294] Also, as shown in Table 11, when determining log2ZoTbWidth and log2ZoTbHeight in residual coding, a condition for checking sps_mts_enable_flag can be added.
[0295] TR in Table 7 indicates a truncated Rice binarization scheme, and the last significant coefficient information can be binarized based on cMax and cRiceParam defined in Table 7.
[0296] For example, if information about the last significant coefficient position for the luma transform block is recorded during the residual coding process, the MTS index can be signaled as shown in Table 12.
[0297] [Table 12]
[0298] In Table 12, LumaLastSignificantCoeffX and LumaLastSignificantCoeffY respectively indicate the X and Y coordinates of the last significant coefficient position for the luma transform block. A condition that LumaLastSignificantCoeffX and LumaLastSignificantCoeffY must all be less than 16 is added to Table 12, and if any one of the two is 16 or greater, DCT-2 is applied to both the horizontal and vertical directions, so it can be inferred that signaling for tu_mts_idx[x0][y0] is omitted and DCT-2 is applied to all the horizontal and vertical directions.
[0299] LumaLastSignificantCoeffX and LumaLastSignificantCoeffY being all less than 16 means that the last significant coefficient is within the upper left 16x16 region, which indicates that there is a possibility that zeroing out has been applied, leaving only 16 transform coefficients from the leftmost or topmost, when a DST-7 or DCT-8 of length 32 is applied in the current VVC standard. Therefore, tu_mts_idx[x0][y0] can be signaled to indicate the transform kernel used for the primary transform.
[0300] Meanwhile, according to another example, the coding unit syntax table, the transform unit syntax table, and the residual coding syntax table are as shown in the following tables. According to Table 13, the MTS index is moved from the transform unit level to the coding unit level syntax and is signaled after the LFNST index signaling. Also, when ISP is applied to the coding unit, the restriction condition that does not allow LFNST is removed. When 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. Also, both the MTS index and the LFNST index are conditionally signaled at the end of the coding unit level.
[0301] [Table 13]
[0302] [Table 14]
[0303] [Table 15]
[0304] In Table 13, MtsZeroOutSigCoeffFlag is initially set to 1, and this value can be changed in the residual coding of Table 15. The variable MtsZeroOutSigCoeffFlag changes its value from 1 to 0 if there is a valid coefficient in the region that should be filled with 0 by zeroing out (LastSignificantCoeffX>15||LastSignificantCoeffY>15), in which case, as in Table 15, the MTS index is not signaled.
[0305] Meanwhile, as shown in Table 13, mts_idx[x0][y0] coding can be omitted when tu_cbf_luma[x0][y0] is 0. That is, when the CBF value of the luma component is 0, no transform is applied, so there is no need to signal the MTS index, and the MTS index coding can be omitted.
[0306] According to an example, the above technical feature may be embodied in other conditional syntax. For example, after MTS is performed, a variable indicating whether a valid coefficient exists in a region excluding the DC region of the current block may be derived, and if the variable indicates that a valid coefficient exists in a region excluding the DC region, an MTS index may be signaled. That is, the presence of a valid coefficient in a region excluding the DC region of the current block indicates that the value of tu_cbf_luma[x0][y0] is 1, and in this case, an MTS index may be signaled.
[0307] The variable may be represented as MtsDcOnly, which may be initially set to 1 at the coding unit level and then changed to 0 when a 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.
[0308] If tu_cbf_luma[x0][y0] is 0, then no invocation of the residual coding syntax is performed at the transform unit level in Table 14, and therefore the variable MtsDcOnly maintains its initial value of 1. In this case, the video information may be configured such that the MTS index is not signaled because the variable MtsDcOnly was not changed to 0. That is, the MTS index is not parsed and signaled.
[0309] Meanwhile, the decoding device may determine the color index (cIdx) of the transform coefficient to derive the variable MtsZeroOutSigCoeffFlag in Table 15. A color index (cIdx) of 0 means a luma component.
[0310] In one example, since MTS may be applied only to the luma component of the current block, the decoding device may determine whether a color index is luma when deriving the variable MtsZeroOutSigCoeffFlag, which determines whether parsing of the MTS index is possible.
[0311] The variable MtsZeroOutSigCoeffFlag indicates whether zero-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 may exist due to zero-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 as shown in Table 13 (MtsZeroOutSigCoeffFlag=1), and if a transform coefficient exists in an area other than the 16x16 area, its value can be changed from 1 to 0 at the residual coding level as shown in Table 15 (MtsZeroOutSigCoeffFlag=0). If the value of the variable MtsZeroOutSigCoeffFlag is 0, the MTS index is not signaled.
[0312] As shown in Table 15, at the residual coding level, a non-zero-out area in which non-zero transform coefficients may exist can be set depending on whether zero-out associated with MTS is performed. In this case, if the color index (cIdx) is 0, the non-zero-out area can be set to the upper left 16x16 area of the current block.
[0313] In this way, when deriving a variable that determines whether or not parsing of an MTS index is possible, it is determined whether the color component is luma or chroma, but since LFNST can be applied to both the luma and chroma components of the current block, the color component is not determined when deriving a variable that determines whether or not parsing of an LFNST index is possible.
[0314] For example, Table 13 shows a variable LfnstZeroOutSigCoeffFlag that can indicate that zero-out has been performed when applying LFNST. The variable LfnstZeroOutSigCoeffFlag indicates whether a valid coefficient exists in a second region excluding the first region at the top left corner of the current block, and the value may be initially set to 1, and if a valid coefficient exists in the second region, the value may be changed to 0. The LFNST index can be parsed only if the initially set value of the variable LfnstZeroOutSigCoeffFlag is maintained at 1. 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 both the luma component and the chroma component of the current block.
[0315] FIG. 15 is a diagram illustrating a CCLM that can be applied when deriving an intra-prediction mode for a chroma block according to an embodiment.
[0316] In this specification, the "reference sample template" may refer to a set of reference samples around a current chroma block for predicting the current chroma block. The reference sample template may be defined in advance, and information about the reference sample template may be signaled from the encoding device 200 to the decoding device 300.
[0317] 15, the collection of samples shaded in one line around the 4×4 block that is the current chroma block represents the reference sample template. It can be seen in FIG. 15 that the reference sample template is made up of one line of reference samples, whereas the reference sample area in the luma region that corresponds to the reference sample template is made up of two lines.
[0318] In one embodiment, when intra-frame coding of a chroma image is performed in the Joint Exploration TEST Model (JEM) used by the Joint Video Exploration Team (JVET), a Cross Component Linear Model (CCLM) can be used. CCLM is a method of predicting pixel values of a chroma image using pixel values of a restored luminance image, and is based on the characteristic that there is a high correlation between a luminance image and a chroma image.
[0319] CCLM prediction of Cb and Cr chroma images is done based on the following formulas:
[0320] <Formula 11>
number
[0321] Here, Pred C (i, j) means the predicted Cb or Cr chroma image, and Rec L '(i, j) means a restored luminance image adjusted to the chroma block size, and (i, j) means a pixel coordinate. In the color format 4:2:0, the size of the luminance image is twice that of the chroma image, so the Rec of the chroma block size is adjusted through downsampling. L ' should be generated, and therefore the chroma image Pred c The luminance image pixel used for (i, j) is Rec L In addition to (2i, 2j), all surrounding pixels can be considered and used. L '(i,j) may denote the downsampled luma sample.
[0322] For example, the above Rec L '(i, j) can be derived using six surrounding pixels as follows:
[0323] <Formula 12>
number
[0324] Also, α and β indicate the cross-correlation and the average value difference between the Cb or Cr chroma block surrounding template and the luminance block surrounding template, as shown in the shaded area in Fig. 12. α and β are, for example, as shown in the following Equation 13.
[0325] <Formula 13>
number
[0326] Here, L(n) means the peripheral reference samples and / or left peripheral samples of the luma block corresponding to the current chroma image, C(n) means the peripheral reference samples and / or left peripheral samples of the current chroma block to which the current encoding is applied, and (i, j) means a pixel position. Also, L(n) may indicate the down-sampled top peripheral samples and / or left peripheral samples of the current luma block. Also, N may indicate the total number of pixel pair (luminance and chrominance) values used in the CCLM parameter calculation, and may indicate a value that is twice the smaller of the width and height of the current chroma block.
[0327] Meanwhile, a picture may be divided into a sequence of coding tree units (CTUs). A CTU may correspond to a coding tree block (CTB). Alternatively, a CTU may include a coding tree block for a luma sample and a coding tree block for a corresponding chroma sample. The tree type may be classified as a single tree (SINGLE_TREE) or a dual tree (DUAL_TREE) depending on whether a luma block and a corresponding chroma block have separate partition structures. If a chroma block has the same partition structure as the luma block, it may be represented as a single tree, and if a chroma component block has a different partition structure from the luma component block, it may be represented as a dual tree.
[0328] Meanwhile, by way of example, when applying LFNST to a chroma transform block, it is necessary to refer to information about a collocated luma transform block.
[0329] The existing specification text for the relevant part is shown in the table below.
[0330] [Table 16]
[0331] As shown in Table 16, when the current intra prediction mode is CCLM mode, the variable value predModeIntra for the corresponding chroma transform block is determined using the intra prediction mode value for the colocated luma transform block (the part shown in italics). In this way, the intra prediction mode value of the luma transform block (the value of predModeIntra) can be used when determining the LFNST set thereafter.
[0332] However, the variables nTbW and nTbH input as input values of this transform process indicate the width and height for the current transform block. If the current block is a luma transform block, the variables nTbW and nTbH indicate the width and height for the luma transform block, and if the current block is a chroma transform block, the variables nTbW and nTbH indicate the width and height for the chroma transform block.
[0333] In this case, the variables nTbW and nTbH in the italicized portion of Table 16 indicate the width and height of the chroma transform block that do not reflect the color format, and therefore do not accurately indicate the reference position of the luma transform block corresponding to the chroma transform block. Therefore, the italicized portion of Table 16 can be modified as shown in the following table.
[0334] [Table 17]
[0335] As shown in Table 17, nTbW( / 2) and nTbH( / 2) have been changed to (nTbW*SubWidthC) / 2 and (nTbH*SubHeightC) / 2, respectively. xTbY and yTbY indicate the position in the current picture relative to the luma (the top-left sample of the current luma transform block relative to the top left luma sample of the current picture), and nTbW and nTbH may indicate the width and height of the transform block to be coded (a variable nTbW specifying the width of the current transform block, a variable nTbH specifying the height of the current transform block).
[0336] If the transform block to be coded is a transform block for chroma (for Cb or Cr), nTbW and nTbH are the width and height of the chroma transform block, respectively. Therefore, if the transform block to be coded is a chroma transform block (cIdx>0), when obtaining a reference position for a collocated luma transform block, the reference position should be obtained with the width and height of the luma transform block. SubWidthC and SubHeightC in Table 17 are values set according to the color 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 component and the chroma component, respectively (see Table 18 below). In the case of a chroma transform block, (nTbW*SubWidthC) and (nTbH*SubHeightC) can be the values for the width and height of the colocated luma transform block, respectively.
[0337] As a result, the values xTbY+(nTbW*SubWidthC) / 2 and yTbY+(nTbH*SubHeightC) / 2 indicate center position values within the collocator transform block based on the top left corner position of the current picture, and therefore can more specifically refer to the collocator transform block.
[0338] [Table 18]
[0339] In Table 17, the predModeIntra variable indicates an intra prediction mode value, and the variable value predModeIntra being INTRA_LT_CCLM, INTRA_L_CCLM, or INTRA_T_CCLM indicates that the current transform block is a transform block for chroma. For example, in the current VVC standard, INTRA_LT_CCLM, INTRA_L_CCLM, and INTRA_T_CCLM correspond to mode values 81, 82, and 83, respectively, among intra prediction mode values. Therefore, as shown in Table 17, the reference position must be obtained in the colocator transform block using the value xTbY+(nTbW*SubWidthC) / 2 and the value yTbY+(nTbH*SubHeightC) / 2.
[0340] As shown in Table 17, the predModeIntra variable value is updated taking into account both the intra_mip_flag[xTbY+(nTbW*SubWidthC) / 2][yTbY+(nTbH*SubHeightC) / 2] variable and the CuPredMode[0][xTbY+(nTbW*SubWidthC) / 2][yTbY+(nTbH*SubHeightC) / 2] variable.
[0341] The variable intra_mip_flag indicates whether the current transform block (or coding unit) is coded using the MIP (Matrix-based Intra Prediction) method, and intra_mip_flag[x][y] indicates a flag value indicating whether MIP can be applied to a position corresponding to the (x, y) coordinates based on the luma component when the top left corner position in the current picture is (0, 0). The x and y coordinates increase from left to right and from top to bottom, respectively. When the flag value indicating whether MIP can be applied is 1, it indicates that MIP has been applied. When the flag value indicating whether MIP can be applied is 0, it indicates that MIP is not applied. MIP can only be applied to luma blocks.
[0342] According to the modified content part of Table 17, when the value of intra_mip_flag[xTbY+(nTbW*SubWidthC) / 2][yTbY+(nTbH*SubHeightC) / 2] inside the collocator transformation block is 1, the predModeIntra value is set to planar mode (INTRA_PLANAR).
[0343] The variable value CuPredMode[0][xTbY+(nTbW*SubWidthC) / 2][yTbY+(nTbH*SubHeightC) / 2] indicates a prediction mode value corresponding to the coordinates (xTbY+(nTbW*SubWidthC) / 2, yTbY+(nTbH*SubHeightC) / 2) when the top left corner of the current picture for the luma component is (0,0). The prediction mode value may have values MODE_INTRA, MODE_IBC, MODE_PLT, and MODE_INTER, which respectively indicate an intra prediction mode, an Intra Block Copy (IBC) prediction mode, a Palette (PLT) coding mode, and an inter prediction mode. According to Table 17, if the variable value CuPredMode[0][xTbY+(nTbW*SubWidthC) / 2][yTbY+(nTbH*SubHeightC) / 2] is MODE_IBC or MODE_PLT, the value of the variable predModeIntra is set to DC mode. If not, the value of the variable predModeIntra is set to IntraPredModeY[xTbY+(nTbW*SubWidthC) / 2][yTbY+(nTbH*SubHeightC) / 2] (the intra prediction mode value corresponding to the center position inside the collocator transform block).
[0344] As an example, based on the updated value predModeIntra in Table 17, the value of the variable predModeIntra can be updated again considering whether wide angle intra prediction is possible as shown in the following table.
[0345] [Table 19]
[0346] The input values of the mapping process presented in Table 19, predModeIntra, nTbW, and nTbH, are the same as the value of the variable predModeIntra updated in Table 17 and nTbW and nTbH referenced in Table 17, respectively.
[0347] In Table 19, nCbW and nCbH respectively indicate the width and height of a coding block corresponding to a corresponding transform block, and the IntraSubPartitionsSplitType variable indicates whether the ISP mode is applied. If IntraSubPartitionsSplitType is ISP_NO_SPLIT, it indicates that the coding unit is not split by ISP (i.e., the ISP mode is not applied). If the value of the variable IntraSubPartitionsSplitType is not ISP_NO_SPLIT, it indicates that the ISP mode is applied and the coding unit is split into two or four partition blocks. In Table 19, cIdx is an index indicating a color component, and if the value of cIdx is 0, it indicates a luma block, and if the value of cIdx is not 0, it indicates a chroma block. The value of predModeIntra output through the mapping process of Table 19 is a value updated considering whether the wide-angle intra prediction (WAIP) mode can be applied.
[0348] For the value of predModeIntra updated through Table 19, the LFNST set can be determined through a mapping relationship as shown in the following table.
[0349] [Table 20]
[0350] In the above table, lfnstTrSetIdx indicates an index for an LFNST set and has a value from 0 to 3, so that a total of four LFNST sets are configured. Each LFNST set can be composed of two transformation kernels, i.e., LFNST kernels (depending on the region to which LFNST is applied, the transformation kernel can be a 16x16 matrix or a 16x48 matrix in the forward direction), and which of the two transformation kernels is applied can be specified through signaling of the LFNST index. In addition, whether or not LFNST can be applied can also be specified through the LFNST index. Currently, in the VVC standard, the LFNST index can have values 0, 1, and 2, where 0 indicates that LFNST is not applied, and 1 and 2 indicate the two transformation kernels, respectively.
[0351] 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.
[0352] FIG. 16 is a flow diagram illustrating the operation of a video decoding device according to one embodiment of the present document.
[0353] Each step disclosed in Fig. 16 is based on a part of the contents detailed in Fig. 4 to Fig. 15. Therefore, the description of the specific contents overlapping with the contents detailed in Fig. 3 to Fig. 15 will be omitted or simplified.
[0354] The decoding device 300 according to an embodiment may obtain intra-prediction mode information and an LFNST index from a bitstream (S1610).
[0355] The intra prediction mode information may include an mpm index indicating one of the mpm candidates in an MPM (Most Probable Mode) list derived based on the intra prediction modes of neighboring blocks (e.g., left and / or upper neighboring blocks) of the current block and additional candidate modes, or remaining (remaining) intra prediction mode information indicating one of the remaining intra prediction modes not included in the above mpm candidates.
[0356] The intra mode information may also include flag information sps_cclm_enabled_flag indicating whether CCLM is applied to the current block, and information about the intra prediction mode for the chroma components, intra_chroma_pred_mode.
[0357] The LFNST index information is received in the syntax information, which is received in a binarized bin string containing 0's and 1's.
[0358] The LFNST index syntax element according to this embodiment can indicate whether an inverse LFNST or an inverse non-separable transform is applied and which one of the transform kernel matrices included in the transform set is to be applied. If the transform set includes two transform kernel matrices, the value of the transform index syntax element is three.
[0359] That is, according to one embodiment, the syntax element value for the LFNST index may include 0 to indicate a case where the inverse LFNST is not applied to the current block, 1 to indicate the first transformation kernel matrix among the transformation kernel matrices, or 2 to indicate the second transformation kernel matrix among the transformation kernel matrices.
[0360] In addition, the decoding device 300 may decode information on quantized transform coefficients for a current block from a bitstream, and may derive quantized transform coefficients for a target block based on the information on the quantized transform coefficients for the current block. The information on the quantized transform coefficients for 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 which the simplified transform is applied, information on a maximum transform size to which the simplified transform is applied, a simplified inverse transform size, and information on a transform index indicating any one of transform kernel matrices included in a transform set.
[0361] The decoding apparatus 300 may perform inverse quantization on residual information for the current block, i.e., quantized transform coefficients, to derive transform coefficients, and may arrange the derived transform coefficients in a predetermined scanning order.
[0362] Specifically, the derived transform coefficients may be arranged in a reverse diagonal scan order in units of 4x4 blocks, and the transform coefficients in the 4x4 blocks may also be arranged in a reverse diagonal scan order, i.e., the transform coefficients on which inverse quantization has been performed may be arranged in a reverse scan order applied in video codecs such as VVC and HEVC.
[0363] The transform coefficients derived based on such residual information may be the inverse quantized transform coefficients as described above, or may be the quantized transform coefficients, i.e., the transform coefficients may be data that can be checked for non-zero data in the current block, regardless of whether they can be quantized or not.
[0364] The decoding device can update the intra prediction mode of the chroma block based on the intra prediction mode of the luma block corresponding to the chroma block based on the intra prediction mode of the chroma block being CCLM mode, and in particular, can update it to intra DC mode based on the intra prediction mode of the luma block being intra block copy (IBC) mode (S1620).
[0365] The decoding device may derive the intra prediction mode of the chroma block as the CCLM mode based on the intra prediction mode information. For example, the decoding device may receive information about the intra prediction mode of the current chroma block via a bitstream, and may derive the CCLM mode as the intra prediction mode of the current chroma block based on the information about the intra prediction mode.
[0366] The CCLM mode may include upper left based CCLM mode, upper based CCLM mode or left side CCLM mode.
[0367] As described above, the decoding device can derive residual samples by applying the non-separable transform LFNST or the separable transform MTS, each of which can be performed based on an LFNST kernel, i.e., an LFNST index indicating an LFNST matrix and an MTS index indicating an MTS kernel.
[0368] Meanwhile, an LFNST set should be determined for LFNST, and the LFNST set has a mapping relationship with the intra prediction mode of the current block.
[0369] For inverse LFNST of a chroma block, the decoding device may update the intra prediction mode of the chroma block based on the intra prediction mode of the luma block corresponding to the chroma block.
[0370] According to one example, the updated intra prediction mode may be derived as an intra prediction mode corresponding to a specific position within the luma block, where the specific position may be set based on the color format of the chroma block.
[0371] The specific position is the center position of the luma block and can be expressed as ((xTbY+(nTbW*SubWidthC) / 2), (yTbY+(nTbH*SubHeightC) / 2)).
[0372] In the center position, xTbY and yTbY indicate the top left corner coordinates of the luma block, i.e., the top left corner position in terms of luma samples for the current transform block, nTbW and nTbH indicate the width and height of the chroma block, and SubWidthC and SubHeightC correspond to variables corresponding to the color format. ((xTbY+(nTbW*SubWidthC) / 2), (yTbY+(nTbH*SubHeightC) / 2)) indicates the middle position of the luma transform block, and IntraPredModeY[xTbY+(nTbW*SubWidthC) / 2][yTbY+(nTbH*SubHeightC) / 2] indicates the intra prediction mode in the luma block for the corresponding position.
[0373] SubWidthC and SubHeightC can be derived as shown in Table 18. That is, if the color format is 4:2:0, SubWidthC and SubHeightC are 2, and if the color format is 4:2:2, SubWidthC is 2 and SubHeightC is 1.
[0374] As shown in Table 17, in order to specify a specific position of a luma block corresponding to a chroma block regardless of the color format, the color format is reflected in a variable indicating the specific position.
[0375] As described above, if the intra prediction mode of the luma block corresponding to a particular position is the IBC mode, the decoding apparatus can update the updated intra prediction mode to the intra DC mode.
[0376] IBC essentially performs prediction within the current picture, but can be performed similarly to inter prediction in that it derives reference blocks within the current picture, i.e., IBC can utilize at least one of the inter prediction techniques described in this document.
[0377] Alternatively, according to one example, if the intra prediction mode corresponding to a particular position is the palette mode, the decoding device may set the updated intra prediction mode to the intra DC mode.
[0378] IBC mode or palette mode can be used for content picture / movie picture coding such as games, for example, as SCC (Screen Content Coding). IBC basically performs prediction within the current picture, but can be performed similarly to inter prediction in deriving a reference block within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described in this document. Palette mode can be seen as an example of intra coding or intra prediction. When palette mode is applied, sample values in a picture can be signaled based on information about a palette table and a palette index.
[0379] Alternatively, as another example, if the intra prediction mode of a luma block corresponding to a particular position is a matrix based intra prediction (MIP) mode, the decoding device can set the updated intra prediction mode to an intra plane mode.
[0380] The MIP mode is also called Affine Linear Weighted Intra Prediction (ALWIP) or Matrix Weighted Intra Prediction (MWIP). When MIP is applied to a current block, a prediction sample for the current block can be derived by i) using surrounding reference samples on which an averaging procedure has been performed, ii) performing a matrix-vector-multiplication procedure, and iii) further performing a horizontal / vertical interpolation procedure as necessary.
[0381] To summarize, if the intra prediction mode for the center position is MIP mode, IBC mode, or palette mode, the intra prediction mode of the chroma block can be updated to a specific mode such as intra-plane mode or intra-DC mode.
[0382] Of course, if the intra prediction mode of the central position is not MIP mode, IBC mode, or palette mode, the intra prediction mode of the chroma block can be updated to the intra prediction mode of the luma block for the central position to reflect the association between the chroma block and the luma block.
[0383] The decoding device may determine an LFNST set including LFNST matrices based on the updated intra-prediction mode (S1630), and perform LFNST on the chroma blocks based on the LFNST matrices derived from the LFNST set to derive transform coefficients (S1640).
[0384] Any one of the multiple LFNST matrices can be selected from among the multiple ones based on the LFNST set and the LFNST index.
[0385] As shown in Table 20, the LFNST transform set is derived depending on the intra prediction mode. 81 to 83 indicating the CCLM mode in the intra prediction mode are omitted because in the case of the CCLM mode, the LFNST transform set is derived using the intra mode value for the corresponding luma block.
[0386] As an example, as shown in Table 20, one of four LFNST sets may be determined according to the intra prediction mode of the current block, and at this time, the LFNST set to be applied to the current chroma block may also be determined.
[0387] The decoding device may then derive modified transform coefficients for the current chroma block by applying the LFNST matrix to the dequantized transform coefficients to perform an inverse RST, eg, an inverse LFNST.
[0388] The decoding apparatus may derive residual samples from the transform coefficients through a first inverse transform (S1650), and if the current block is a chroma block, may derive residual samples for the chroma block based on the transform coefficients. MTS may be used as the first inverse transform.
[0389] The decoding device may also generate reconstructed samples based on the residual samples for the current block and the predicted samples for the current block.
[0390] 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.
[0391] FIG. 17 is a flow diagram illustrating the operation of a video encoding device according to one embodiment of this document.
[0392] Each step disclosed in Fig. 17 is based on part of the contents detailed in Fig. 4 to Fig. 15. Therefore, the description of specific contents that overlap with the contents detailed in Fig. 2 and Fig. 4 to Fig. 15 will be omitted or simplified.
[0393] The encoding apparatus 200 according to an embodiment may derive a prediction sample for a chroma block based on the fact that the intra prediction mode for the chroma block is the CCLM mode (S1710).
[0394] First, the encoding device can derive the intra prediction mode for the chroma block as the CCLM mode.
[0395] For example, the encoding device may determine the intra prediction mode of the current chroma block based on a rate-distortion cost (RD cost) (or RDO), where the RD cost may be derived based on a sum of absolute differences (SAD). The encoding device may determine the CCLM mode as the intra prediction mode of the current chroma block based on the RD cost.
[0396] The CCLM mode may include an upper left based CCLM mode, an upper side based CCLM mode or a left side based CCLM mode.
[0397] In addition, the encoding apparatus may encode information regarding an intra-prediction mode of the current chroma block, and the information regarding the intra-prediction mode may be signaled via a bitstream. The prediction-related information of the current chroma block may include information regarding the intra-prediction mode.
[0398] An encoding apparatus according to an embodiment may derive residual samples for the chroma blocks based on the predicted samples (S1720).
[0399] An encoding apparatus according to an embodiment can derive transform coefficients for a chroma block based on a linear transform on residual samples.
[0400] The primary transform may be performed via multiple transform kernels, where the transform kernel may be selected based on the intra-prediction mode.
[0401] For LFNST of the chroma block, the encoding device can update the intra prediction mode of the chroma block based on the intra prediction mode of the luma block corresponding to the chroma block, and can update to intra DC mode based on the intra prediction mode of the luma block being intra block copy (IBC) mode (S1730).
[0402] The encoding device can update the CCLM mode for a chroma block based on the intra prediction mode of the luma block corresponding to the chroma block, as shown in Table 17 (When predModeIntra is equal to either INTRA_LT_CCLM, INTRA_L_CCLM, or INTRA_T_CCLM, predModeIntra is derived as follows:
[0403] According to one example, the updated intra prediction mode may be derived as an intra prediction mode corresponding to a specific position within the luma block, where the specific position may be set based on the color format of the chroma block.
[0404] The specific position is the center position of the luma block and can be expressed as ((xTbY+(nTbW*SubWidthC) / 2), (yTbY+(nTbH*SubHeightC) / 2)).
[0405] In the center position, xTbY and yTbY indicate the top left corner coordinates of the luma block, i.e., the top left corner position in terms of luma samples for the current transform block, nTbW and nTbH indicate the width and height of the chroma block, and SubWidthC and SubHeightC correspond to variables corresponding to the color format. ((xTbY+(nTbW*SubWidthC) / 2), (yTbY+(nTbH*SubHeightC) / 2)) indicates the middle position of the luma transform block, and IntraPredModeY[xTbY+(nTbW*SubWidthC) / 2][yTbY+(nTbH*SubHeightC) / 2] indicates the intra prediction mode in the luma block for the corresponding position.
[0406] SubWidthC and SubHeighC can be derived as shown in Table 18. That is, if the color format is 4:2:0, SubWidthC and SubHeightC are 2, and if the color format is 4:2:2, SubWidthC is 2 and SubHeightC is 1.
[0407] As shown in Table 17, in order to specify a specific position of a luma block corresponding to a chroma block regardless of the color format, the color format is reflected in a variable indicating the specific position.
[0408] As described above, if the intra prediction mode of the luma block corresponding to a particular position is the IBC mode, the encoding device may update the updated intra prediction mode to the intra DC mode.
[0409] IBC essentially performs prediction within the current picture, but can be performed similarly to inter prediction in that it derives reference blocks within the current picture, i.e., IBC can utilize at least one of the inter prediction techniques described in this document.
[0410] Alternatively, according to one example, if the intra-prediction mode corresponding to a particular position is palette mode, the encoding device may set the updated intra-prediction mode to intra-DC mode.
[0411] IBC mode or palette mode can be used for content picture / movie coding such as games, for example, as SCC (Screen Content Coding). IBC basically performs prediction within the current picture, but can be performed similarly to inter prediction in deriving reference blocks within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described in this document. Palette mode can be seen as an example of intra coding or intra prediction. When palette mode is applied, sample values in a picture can be signaled based on information about a palette table and a palette index.
[0412] Alternatively, as another example, if the intra prediction mode of the luma block corresponding to a particular position is a matrix based intra prediction (MIP) mode, the encoding device may set the updated intra prediction mode to an intra plane mode.
[0413] The MIP mode is also called Affine Linear Weighted Intra Prediction (ALWIP) or Matrix Weighted Intra Prediction (MWIP). When MIP is applied to a current block, a prediction sample for the current block can be derived by i) using surrounding reference samples on which an averaging procedure has been performed, ii) performing a matrix-vector-multiplication procedure, and iii) further performing a horizontal / vertical interpolation procedure as necessary.
[0414] To summarize, if the intra prediction mode for the center position is MIP mode, IBC mode, or palette mode, the intra prediction mode of the chroma block can be updated to a specific mode such as intra-plane mode or intra-DC mode.
[0415] Of course, if the intra prediction mode of the central position is not MIP mode, IBC mode, or palette mode, the intra prediction mode of the chroma block can be updated to the intra prediction mode of the luma block for the central position to reflect the association between the chroma block and the luma block.
[0416] The encoding device may determine an LFNST set including an LFNST matrix based on the updated intra-prediction mode (S1740), and perform LFNST on the chroma block based on the residual sample and the LFNST matrix to derive modified transform coefficients (S1750).
[0417] The encoding device can determine a transform set based on a mapping relationship according to the intra prediction mode applied to the current block, and perform LFNST, i.e., non-separable transform, based on one of two LFNST matrices included in the transform set.
[0418] As described above, a plurality of transform sets may be determined depending on the intra prediction mode of the transform block to be transformed. The matrix applied to LFNST has a transpose relationship with the matrix used in the backward LFNST.
[0419] In one example, an LFNST matrix is a non-square matrix with fewer rows than columns.
[0420] The encoding device may perform quantization based on the modified transform coefficients for the current chroma block to derive quantized transform coefficients, and may encode and output video information including information about the quantized transform coefficients, intra-prediction mode information, and an LFNST index indicating an LFNST matrix (S1760).
[0421] More specifically, the encoding device 200 may generate information about the quantized transform coefficients and encode the generated information about the quantized transform coefficients.
[0422] In one example, the information about the quantized transform coefficients may include at least one of information about whether LFNST is applied, information about a simplification factor, information about a minimum transform size to apply LFNST, and information about a maximum transform size to apply LFNST.
[0423] The encoding device can encode flag information sps_cclm_enabled_flag indicating whether CCLM is applied to the current block as intra mode information, and information intra_chroma_pred_mode regarding the intra prediction mode for the chroma components.
[0424] The information regarding the CCLM mode, intra_chroma_pred_mode, can indicate an upper-left based CCLM mode, an upper-side based CCLM mode, or a left-side based CCLM mode.
[0425] 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 referred to as transform coefficients. When the transform / inverse transform is omitted, the transform coefficients may be referred to as coefficients or residual coefficients, or may still be referred to as transform coefficients for uniformity of expression.
[0426] 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 on the transform coefficients, and the information on the transform coefficients may be signaled via a residual coding syntax. Transform coefficients may be derived based on the residual information (or the information on 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.
[0427] 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.
[0428] The methods described herein may be embodied in the form of software, and the encoding device and / or decoding device described herein may be included in devices that perform image processing, such as, for example, TVs, computers, smartphones, set-top boxes, and display devices.
[0429] In this document, when the embodiments are embodied in software, the methods described above may be embodied in modules (processes, functions, etc.) performing the functions described above. The modules may be stored in a memory and executed by a processor. The memory may be internal or external to the processor and may be coupled to the processor in various well-known ways. The processor may include an Application-Specific Integrated Circuit (ASIC), other chipsets, logic circuits, and / or data processing devices. The memory may include 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.
[0430] 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 OTT video (Over the Top Video) device, an Internet streaming service providing device, a three-dimensional (3D) video device, an image telephone video device, and a medical video device, and may be used to process a video signal or a data signal. For example, the OTT video (Over the Top Video) device may include a game console, a Blu-ray player, an Internet access TV, a home theater system, a smartphone, a tablet PC, a DVR (Digital Video Recorder), and the like.
[0431] 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.
[0432] FIG. 18 exemplarily illustrates a structural diagram of a content streaming system to which this document applies.
[0433] Moreover, the content streaming system to which this document applies may mainly include an encoding server, a streaming server, a web server, a media storage device (repository), a user device, and a multimedia input device.
[0434] 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.
[0435] The streaming server transmits multimedia data to a user device based on a user 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 transfers 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 devices in the content streaming system.
[0436] The streaming server may receive the content from a media storage device and / or an encoding server. For example, when receiving the content 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.
[0437] Examples of the user devices include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation systems, slate PCs, tablet PCs, ultrabooks (ULTRABOOK (registered trademark)), wearable devices (e.g., smart watches, smart glasses, head mounted displays (HMDs), digital TVs, desktop computers, digital signatures, etc.). Each server in the content streaming system may be operated as a distributed server, and in this case, data received by each server may be processed in a distributed manner.
[0438] 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 in an apparatus, and the technical features of the apparatus claims herein may be combined and embodied in a method. Also, the technical features of the method claims herein and the technical features of the apparatus claims herein may be combined and embodied in 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 in a method.
Claims
1. A video decoding method executed by a decoding device, comprising: obtaining intra-prediction mode information and a low frequency non-separable transform (LFNST) index from a bitstream; updating the intra prediction mode of the chroma block based on an intra prediction mode of a luma block corresponding to the chroma block, based on the intra prediction mode of the chroma block being a cross-component linear model (CCLM) mode; determining an LFNST set including an LFNST matrix based on the updated intra-prediction mode; performing LFNST on the chroma blocks based on the LFNST matrices derived from the LFNST set; The updated intra prediction mode is derived as an intra prediction mode corresponding to a particular position within the luma block; The intra prediction mode of the chroma block is updated to an intra DC mode based on the prediction mode corresponding to the specific position being an intra block copy (IBC) mode; The specific position is determined based on a color format of the chroma block.
2. The video decoding method of claim 1 , wherein the specific position is a center position of the luma block.
3. The specific position is set to ((xTbY+(nTbW*SubWidthC) / 2), (yTbY+(nTbH*SubHeightC) / 2)), xTbY and yTbY indicate the top left corner coordinates of the luma block, nTbW and nTbH denote the width and height of the chroma block, The video decoding method of claim 1 , wherein SubWidthC and SubHeightC indicate variables corresponding to the color format.
4. If the color format is 4:2:0, SubWidthC and SubHeightC are 2; The video decoding method of claim 3 , wherein SubWidthC is 2 and SubHeightC is 1 if the color format is 4:2:
2.
5. The video decoding method of claim 1 , wherein if the prediction mode corresponding to the specific position is a matrix-based intra prediction (MIP) mode, the intra prediction mode of the chroma block is updated to an intra plane mode.
6. The video decoding method of claim 1 , wherein if the prediction mode corresponding to the specific position is a palette mode, the intra prediction mode of the chroma block is updated to an intra DC mode.
7. A video encoding method executed by a video encoding device, comprising: deriving a prediction sample for a chroma block based on an intra prediction mode for the chroma block being a cross-component linear model (CCLM); deriving residual samples for the chroma block based on the prediction samples; updating the intra-prediction mode of the chroma block based on an intra-prediction mode of a luma block corresponding to the chroma block; determining a low frequency non-separable transform (LFNST) set including LFNST matrices based on the updated intra-prediction mode; performing LFNST on the chroma blocks based on the residual samples and the LFNST matrix; The updated intra prediction mode is derived as an intra prediction mode corresponding to a particular position within the luma block; The intra prediction mode of the chroma block is updated to an intra DC mode based on the prediction mode corresponding to the specific position being an intra block copy (IBC) mode; The specific position is determined based on a color format of the chroma block.
8. The video encoding method according to claim 7 , wherein the specific position is a center position of the luma block.
9. The specific position is set to ((xTbY+(nTbW*SubWidthC) / 2), (yTbY+(nTbH*SubHeightC) / 2)), xTbY and yTbY indicate the top left corner coordinates of the luma block, nTbW and nTbH denote the width and height of the chroma block, The video encoding method of claim 7 , wherein SubWidthC and SubHeightC indicate variables corresponding to the color format.
10. If the color format is 4:2:0, SubWidthC and SubHeightC are 2; The video encoding method of claim 9 , wherein SubWidthC is 2 and SubHeightC is 1 if the color format is 4:2:
2.
11. The image encoding method of claim 7 , wherein if the prediction mode corresponding to the specific position is a matrix-based intra prediction (MIP) mode, the intra prediction mode of the chroma block is updated to an intra plane mode.
12. The video encoding method of claim 7 , wherein if the prediction mode corresponding to the specific position is a palette mode, the intra prediction mode of the chroma block is updated to an intra DC mode.
13. 1. A method for transmitting data relating to video information, comprising: A step of generating a bitstream relating to a video, the bitstream comprising: deriving a prediction sample for a chroma block based on an intra prediction mode for the chroma block being a cross-component linear model (CCLM); deriving residual samples for the chroma block based on the prediction samples; updating the intra-prediction mode of the chroma block based on an intra-prediction mode of a luma block corresponding to the chroma block; determining a low frequency non-separable transform (LFNST) set including LFNST matrices based on the updated intra-prediction mode; performing LFNST on the chroma blocks based on the residual samples and the LFNST matrix; encoding residual information to generate the bitstream; transmitting the data including the bitstream; The updated intra prediction mode is derived as an intra prediction mode corresponding to a particular position within the luma block; The intra prediction mode of the chroma block is updated to an intra DC mode based on the prediction mode corresponding to the specific position being an intra block copy (IBC) mode; The method, wherein the specific location is determined based on a color format of the chroma block.
Citation Information
Patent Citations
Improved intra predictive mode coding method and apparatus
JP2013541303A
Entropy decoding method, and decoding apparatus using the same
JP2016123119A