Transform-based image coding method and apparatus
The proposed image coding method enhances compression efficiency by applying LFNST and scaling lists based on block types, addressing the need for efficient compression of high-resolution images and VR/AR content.
Patent Information
- Application Number
- JP2025196657
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2020-01-10
- Filing Date
- 2025-11-17
- Publication Date
- 2026-01-23
AI Technical Summary
The increasing demand for high-resolution and high-quality images/videos, including VR and AR content, necessitates a highly efficient image/video compression technique to reduce transmission and storage costs while improving quantization efficiency, particularly for chroma elements in single-tree types.
An image decoding method that applies LFNST to transform coefficients and determines whether to use a scaling list based on the block's tree type, and an encoding method that quantizes transform coefficients considering the tree type and availability of the scaling list, specifically for chroma elements.
Improves overall image/video compression efficiency and quantization efficiency, especially for chroma elements, by optimizing the application of LFNST and scaling lists based on block types.
Smart Images

Figure 2026012562000001_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, has been increasing in various fields. As the resolution and quality of image / video data increases, the amount of information or bits to be transmitted increases relatively compared to existing image / video data. Therefore, when transmitting image data using existing media such as wired or wireless broadband lines or storing image / video data using existing storage media, transmission costs and storage costs increase.
[0003] In addition, interest in and demand for immersive media such as VR (Virtual Reality), AR (Artificial Reality) content, and holograms have been increasing in recent years, and the broadcast of images / videos with different image characteristics from real images, such as game images, has been increasing.
[0004] Therefore, there is a need 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 image coding efficiency.
[0006] Another technical problem of this document is to provide a method and apparatus for increasing quantization efficiency.
[0007] Another technical problem of this document is to provide a method and apparatus for improving quantization efficiency for chroma elements in the case of a single tree type. [Means for solving the problem]
[0008] According to one embodiment of this document, there is provided an image decoding method executed by a decoding device, the method including: deriving modified transform coefficients by applying LFNST to transform coefficients; and deriving residual samples for the current block based on an inverse linear transform of the modified transform coefficients, wherein the deriving the transform coefficients includes determining whether LFNST is applied and whether a scaling list is applied to the current block based on a tree type of the current block; and deriving transform coefficients for the current block from residual information based on a determination result, wherein the scaling list can be applied if the tree type of the current block is a single tree and the current block is a chroma element.
[0009] The LFNST may not be applied to the chroma elements of the current block.
[0010] If the tree type of the current block is a single tree and LFNST is performed on the current block, the scaling list may not be applied to the luma component of the current block.
[0011] When the LFNST is executed, it may further receive flag information indicating the availability of the scaling list.
[0012] If the flag information indicates that the scaling list is not available and the LFNST index is greater than 0, the scaling list may not be applied to the luma component.
[0013] If the flag information indicates that the scaling list is not available and the LFNST index is greater than 0, the scaling list may not be applied to the chroma elements if the tree type of the current block is dual tree chroma.
[0014] If the flag information indicates that the scaling list is not available and the LFNST index is greater than 0, the scaling list may not be applied to the luma element if the tree type of the current block is dual tree luma.
[0015] According to one embodiment of the present document, there is provided an image encoding method executed by an encoding device, the method including the steps of: deriving transform coefficients for a current block from residual samples for the current block based on a transform process; determining whether LFNST is performed in the transform process and whether the scaling list is applied to the current block based on a tree type of the current block; and quantizing the transform coefficients based on the determination, wherein the scaling list can be applied if the tree type of the current block is a single tree and is a chroma element.
[0016] According to another embodiment of the present document, there is provided a digital storage medium storing image data including encoded image information and a bitstream generated by an image encoding method performed by an encoding device.
[0017] According to another embodiment of the present document, there is provided a digital storage medium storing image data including encoded image information and a bitstream for performing the image decoding method by a decoding device. [Effects of the Invention]
[0018] According to this document, the overall image / video compression efficiency can be improved.
[0019] According to this document, quantization efficiency can be improved.
[0020] According to this document, it is possible to improve the quantization efficiency for chroma elements when using a single-tree type transform.
[0021] The effects obtained through the specific examples of this 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 this specification. Therefore, the specific effects of this specification are not limited to those explicitly described in this specification, but may include various effects that can be understood or derive from the technical features of this specification. [Brief explanation of the drawings]
[0022] [Figure 1] 1 is a diagram illustrating the configuration of a video / image encoding device to which this document can be applied; [Figure 2] 1 is a diagram illustrating the configuration of a video / image decoding device to which this document can be applied. [Figure 3] 1 illustrates a schematic diagram of a multiple conversion technique according to an embodiment of the present document; [Figure 4] An intra-directional mode with 65 prediction directions is shown as an example. [Figure 5] FIG. 1 is a diagram for explaining an RST according to one embodiment of this document. [Figure 6] 10 is a diagram illustrating an example of an order in which output data of a forward linear transform is arranged in a one-dimensional vector. FIG. [Figure 7] 10 is a diagram illustrating an example of an order in which output data of a forward quadratic transform is arranged in two-dimensional blocks. [Figure 8] FIG. 10 is a diagram showing a block shape to which LFNST is applied. [Figure 9] FIG. 10 is a diagram showing an example of the arrangement of output data from a forward LFNST. [Figure 10] FIG. 10 is a diagram illustrating zeroing out in a block to which 4x4 LFNST is applied, according to an example. [Figure 11] FIG. 10 is a diagram illustrating zeroing out in an 8x8 block to which LFNST is applied, according to an example. [Figure 12] 1 is a diagram illustrating an image decoding method according to an example. [Figure 13] 1 is a diagram illustrating an example of an image encoding method. [Figure 14] 1 illustrates schematically an example of a video / image coding system to which this document may be applied; [Figure 15] 1 is a diagram illustrating an image decoding method according to an example. [Figure 16] 1 is a diagram illustrating an image encoding method according to an example; [Figure 17] The following shows an example of the structure of a content streaming system to which this document applies. DETAILED DESCRIPTION OF THE INVENTION
[0023] This document may be modified in various ways and may have various embodiments. A specific embodiment will be illustrated in the drawings and described in detail. However, this is not intended to limit this document to the specific embodiment. The terms used in this document are used merely to describe a specific embodiment and are not intended to limit the technical ideas of this document. The singular expressions include the plural expressions unless the context clearly dictates otherwise. In this document, the terms "comprise" 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.
[0024] Meanwhile, each component in the drawings described herein is illustrated independently for the convenience of explaining different characteristic functions, and does not mean that each component is implemented as separate hardware or software. For example, two or more components may be combined to form a single component, or a single component may be divided into multiple components. Embodiments in which each component is integrated and / or separated are also within the scope of this document as long as they do not deviate from the essence of this document.
[0025] Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the accompanying drawings. Hereinafter, the same reference numerals will be used to refer to the same components in the drawings, and duplicated descriptions of the same components will be omitted.
[0026] This document relates to video / image coding. For example, methods / embodiments disclosed in this document may be associated with the Versatile Video Coding (VVC) standard (ITU-T Rec. H.266), a next-generation video / image coding standard beyond VVC, or other video coding-related standards (e.g., the High Efficiency Video Coding (HEVC) standard (ITU-T Rec. H.265), the essential video coding (EVC) standard, the AVS2 standard, etc.).
[0027] This document presents various embodiments related to video / image coding, and unless otherwise stated, the embodiments may also be implemented in combination with each other.
[0028] In this document, video can refer to a collection of a series of images over time. A picture generally refers to a unit that shows one image at a specific time, and a slice / tile is a unit that constitutes part of a picture in coding. A slice / tile can contain one or more coding tree units (CTUs). One picture can consist of one or more slices / tiles. One picture can consist of one or more tile groups. One tile group can contain one or more tiles.
[0029] A pixel or pel may refer to the smallest unit constituting a picture (or image). The term "sample" may also be used as a term corresponding to a pixel. 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, when such a pixel value is transformed into the frequency domain, may refer to a transform coefficient in the frequency domain.
[0030] A unit may refer to a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to that region. One unit may include one luma block and two chroma (e.g., cb, cr) blocks. The term unit may be used interchangeably with terms such as block or area. In general, an M×N block may include a set (or array) of samples or transform coefficients consisting of M columns and N rows.
[0031] In this document, the terms " / " and "," are interpreted as "and / or." For example, "A / B" is interpreted as "A and / or B," and "A, B" is interpreted as "A and / or B." Additionally, "A / B / C" means "at least one of A, B, and / or C." Also, "A, B, C" means "at least one of A, B, and / or C." (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.")
[0032] Additionally, in this document, "or" should be interpreted as "and / or." For example, "A or B" can mean 1) only "A," or 2) only "B," or 3) "A and B." Furthermore, in this document, "or" can mean "additionally or alternatively." (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.")
[0033] As used herein, "at least one of A and B" can mean "only A," "only B," or "both A and B." Additionally, as used herein, 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."
[0034] Furthermore, 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" or "at least one of A, B and / or C" can mean "at least one of A, B and C."
[0035] Furthermore, parentheses used herein may mean "for example." Specifically, when "prediction (intra prediction)" is used, "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 used, "intra prediction" is proposed as an example of "prediction."
[0036] In this specification, technical features individually described in one drawing may be embodied individually or simultaneously.
[0037] FIG. 1 shows a schematic diagram of an example of a video / image coding system to which this document can be applied.
[0038] 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 to the receiving device via a digital storage medium or a network in the form of a file or streaming.
[0039] The source device may include a video source, an encoding device, and a transmitting unit. The receiving device may include a receiving unit, a decoding device, and a renderer. The encoding device may be referred to as a video / image encoding device, and the decoding device may be referred to as a video / image decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display unit, which may be a separate device or an external component.
[0040] A video source can acquire video / images through a video / image capture, synthesis, or generation process. A video source can include a video / image capture device and / or a video / image generation device. A video / image capture device can include, for example, one or more cameras, a video / image archive containing previously captured video / images, etc. A video / image generation device can include, for example, a computer, a tablet, a smartphone, etc., and can (electronically) generate video / images. For example, a virtual video / image can be generated via a computer, etc., in which case the video / image capture process can be replaced by a process in which related data is generated.
[0041] An encoding device can encode input video / images. The encoding device can perform a series of steps such as prediction, transformation, and quantization for compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.
[0042] The transmitter can transmit the encoded video / image information or data output in the form of a bitstream to a receiver of a receiving device via a digital storage medium or a 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 transmitter can include elements for generating a media file in a predetermined file format and elements for transmission via a broadcast / communication network. The receiver can receive / extract the bitstream and transmit it to a decoding device.
[0043] The decoding device can decode the video / image by performing a series of steps, such as inverse quantization, inverse transform, and prediction, which correspond to the operations of the encoding device.
[0044] The renderer can render the decoded video / image, and the rendered video / image can be displayed via a display unit.
[0045] 2 is a diagram for explaining the configuration of a video / image encoding device to which this document can be applied. Hereinafter, the term "video encoding device" may include an image encoding device.
[0046] 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 dividing unit 210, the predicting unit 220, the residual processing unit 230, the entropy encoding unit 240, the adding unit 250, and the filtering unit 260 may be configured as one or more hardware components (e.g., an encoding chipset or a processor) depending on the embodiment. Also, the memory 270 may include a decoded picture buffer (DPB) and may be configured as a digital storage medium. The hardware components may further include the memory 270 as an internal / external component.
[0047] 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. For example, the processing units may be called coding units (CUs). In this case, the coding units may be recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) using a quad-tree, binary-tree, ternary-tree (QTBTTT) structure. For example, one coding unit may be divided into multiple coding units of deeper depths based on a quad-tree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quad-tree structure may be applied first, and then the binary tree structure and / or ternary 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 the 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 if necessary, the coding unit may be recursively divided into coding units of lower depths, and a coding unit of an optimal size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later. As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may each be divided or partitioned from the final coding unit.The prediction unit is a unit of sample prediction, and the transform unit is a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.
[0048] The term "unit" can be used interchangeably with terms such as "block" or "area." In general, an MxN block can refer to a set of samples or transform coefficients consisting of M columns and N rows. A sample generally refers to a pixel or pixel value, and can refer to only the pixel / pixel value of the luma component or only the pixel / pixel value of the chroma component. A sample can also be used as a term corresponding to a pixel or pel in one picture (or image).
[0049] 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 prediction samples for the current block. The prediction unit 220 may determine whether intra prediction or inter prediction is applied in units of the current block or CU. The prediction unit may generate various information related to prediction, such as prediction mode information, and transmit the information to the entropy encoding unit 240, as will be 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.
[0050] The intra prediction unit 222 may predict the current block by referring to samples in the current picture. The referenced samples may be located adjacent to or distant from the current block depending on the prediction mode. In intra prediction, prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes may include, for example, DC mode and planar mode. The directional modes may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the 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 using the prediction modes applied to neighboring blocks.
[0051] The inter prediction unit 221 may derive a predicted block for a current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. To reduce the amount of motion information transmitted in inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between 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 information on an inter prediction direction (such as L0 prediction, L1 prediction, or Bi prediction). In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks in the current picture and temporal neighboring blocks in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring blocks may be the same or different. The temporal neighboring blocks may be referred to as collocated reference blocks, collocated CUs (colCUs), etc., and the reference picture including the temporal neighboring blocks may be referred to as collocated pictures (colPics). For example, the inter predictor 221 may construct a motion information candidate list based on neighboring blocks and generate information indicating which candidate is used to derive a motion vector and / or a reference picture index for the current block. Inter prediction may be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the inter predictor 221 may use motion information of neighboring blocks as motion information of the current block. In the case of skip mode, unlike in merge mode, a residual signal is not transmitted.In the case of motion vector prediction (MVP) mode, the motion vector of the neighboring block is used as a motion vector predictor, and the motion vector difference can be signaled to indicate the motion vector of the current block.
[0052] The predictor 220 may generate a prediction signal based on various prediction methods, which will be described later. For example, the predictor may apply intra prediction or inter prediction for prediction of a block, or may simultaneously apply intra prediction and inter prediction. This may be referred to as 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 / video coding, such as games, such as screen content coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in that it derives a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described herein.
[0053] The prediction signal generated by the inter prediction unit 221 and / or the intra prediction unit 222 may be used to generate a reconstructed signal or 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, GBT refers to a transform obtained from a graph representing inter-pixel relationship information. 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 non-square blocks of variable sizes.
[0054] The quantization unit 233 quantizes the transform coefficients and transmits them to the entropy encoding unit 240. The entropy encoding unit 240 encodes the quantized signal (information about the quantized transform coefficients) and outputs it as a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantization unit 233 may rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order and generate information about the quantized transform coefficients based on the one-dimensional vector form of the quantized transform coefficients. The entropy encoding unit 240 may perform various encoding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), etc. The entropy encoding unit 240 may also encode information required for video / image restoration (e.g., values of syntax elements) in addition to the quantized transform coefficients, either 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 units of 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 also 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 can be transmitted via a network or stored in a digital storage medium. Here, the network can include a broadcasting network and / or a communication network, and the digital storage medium can include various storage media such as a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) for transmitting the signal output from the entropy encoding unit 240 and / or a storage unit (not shown) for storing the signal can be configured as an internal / external element of the encoding apparatus 200, or the transmitter can be included in the entropy encoding unit 240.
[0055] 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 skip mode is applied, the predicted block may be used as the reconstructed block. The generated reconstructed signal may be used for intra prediction of the next current block in the current picture, or may be used for inter prediction of the next picture after filtering, as described below.
[0056] Meanwhile, LMCS (luma mapping with chroma scaling) can be applied during picture encoding and / or reconstruction.
[0057] 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 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 the description of each filtering method. The filtering information may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
[0058] 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 coding efficiency.
[0059] The DPB of the memory 270 may store a modified reconstructed picture to be used as a reference picture in the inter predictor 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 predictor 221 to be used as motion information of a spatially neighboring block or a temporally neighboring block. The memory 270 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra predictor 222.
[0060] FIG. 3 is a diagram illustrating the configuration of a video / image decoding device to which this document can be applied.
[0061] 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. Depending on the embodiment, the entropy decoding unit 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be implemented as a single hardware component (e.g., a decoding chipset or processor). In addition, the memory 360 may include a decoded picture buffer (DPB) and may be implemented as a digital storage medium. The hardware components may further include a memory 360 as an internal / external component.
[0062] When a bitstream including video / image information is input, the decoding apparatus 300 can reconstruct an image corresponding to the process in which the video / image information was processed by the encoding apparatus of FIG. 2. For example, the decoding apparatus 300 can derive units / blocks based on block division-related information obtained from the bitstream. The decoding apparatus 300 can perform decoding using a processing unit applied by the encoding apparatus. Accordingly, the processing unit for decoding is, for example, a coding unit, and the coding unit can be divided into a coding tree unit or a maximal coding unit according to a quad tree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units can be derived from the coding unit. The reconstructed image signal decoded and output by the decoding apparatus 300 can be reproduced through a reproduction device.
[0063] The decoding apparatus 300 may receive a signal output from the encoding apparatus of FIG. 2 in the form of a bitstream, and the received signal may be decoded via the entropy decoding unit 310. For example, the entropy decoding unit 310 may parse the bitstream to derive information (e.g., video / image information) necessary for image restoration (or picture restoration). 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 also include general constraint information. The decoding apparatus may decode pictures based on the information on the parameter set and / or the general constraint information. Signaled / received information and / or syntax elements, which will be described later in this document, may be decoded via the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 may decode information in a bitstream based on a coding method such as Exponential Golomb coding, CAVLC, or CABAC, and output values of syntax elements required for image restoration and quantized values of transform coefficients related to residuals. More specifically, the CABAC entropy decoding method receives bins corresponding to each syntax element in the bitstream, determines a context model using information on the syntax element to be decoded, decoding information on neighboring and current blocks, or information on symbols / bins decoded in previous steps, predicts the occurrence probability of bins based on the determined context model, and performs arithmetic decoding of the bins to generate symbols corresponding to the values of each syntax element.In this case, after determining a context model, the CABAC entropy decoding method can update the context model using information on the decoded symbol / bin for the context model of the next symbol / bin. Prediction-related information from the information decoded by the entropy decoding unit 310 is provided to the prediction unit 330, and information on the residual on which entropy decoding is performed by the entropy decoding unit 310, i.e., quantized transform coefficients and related parameter information, can be input to the inverse quantization unit 321. In addition, filtering-related information from the information decoded by the entropy decoding unit 310 can be provided to the filtering unit 350. Meanwhile, a receiving unit (not shown) that receives a signal output from the encoding apparatus may be further configured as an internal / external element of the decoding apparatus 300, or the receiving unit may be a component of the entropy decoding unit 310. Meanwhile, the decoding apparatus according to this document may be called a video / image / picture decoding apparatus, and the decoding apparatus may be divided into information decoding (video / image / picture information decoding) and sample decoding (video / image / picture sample decoding). The information decoding may include the entropy decoding unit 310, and the sample decoding may include at least one of the inverse quantization unit 321, the inverse transform unit 322, the prediction unit 330, the adder 340, the filtering unit 350, and the memory 360.
[0064] The inverse quantization unit 321 may inverse quantize the quantized transform coefficients and output the transform coefficients. The inverse quantization unit 321 may rearrange the quantized transform coefficients in a two-dimensional block format. In this case, the rearrangement may be performed based on the coefficient scanning order performed in the encoding apparatus. 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.
[0065] The inverse transform unit 322 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0066] 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 about the prediction output from the entropy decoding unit 310, and may determine a specific intra / inter prediction mode.
[0067] The predictor may generate a prediction signal based on various prediction methods, which will be described later. For example, the predictor may apply intra prediction or inter prediction for prediction of a block, or may simultaneously apply intra prediction and inter prediction. This may be referred to as 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 / video coding, such as games, such as screen content coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in that it derives a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described herein.
[0068] The intra prediction unit 331 may predict a current block by referring to samples in a current picture. The referenced samples may be located adjacent to or distant from the current block depending on the prediction mode. In intra prediction, prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 331 may also determine a prediction mode to be applied to the current block by using prediction modes applied to neighboring blocks.
[0069] The inter prediction unit 332 may derive a predicted block for a current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. To reduce the amount of motion information transmitted in inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between 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 information on an inter prediction direction (e.g., L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks in the current picture and temporal neighboring blocks in the reference picture. For example, the inter prediction unit 332 may construct 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 received candidate selection information. Inter prediction may be performed based on various prediction modes, and the prediction information may include information indicating the inter prediction mode for the current block.
[0070] The adder 340 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to the predicted signal (predicted block, predicted sample array) output from the predictor 330. When there is no residual for the current block, such as when a skip mode is applied, the predicted block may be used as the reconstructed block.
[0071] 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, may be output after filtering as described below, or may be used for inter prediction of a next picture.
[0072] Meanwhile, LMCS (luma mapping with chroma scaling) can be applied during picture decoding.
[0073] The filtering unit 350 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 350 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may transmit the modified reconstructed picture to the memory 360, specifically, to the DPB of the memory 360. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.
[0074] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter predictor 332. The memory 360 can store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information can be transmitted to the inter predictor 332 to be used as motion information of a spatially neighboring block or a temporally neighboring block. The memory 360 can store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra predictor 331.
[0075] 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.
[0076] 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 the spatial domain (or pixel domain). The predicted block is derived in the same way by an encoding device and a decoding device. The encoding device signals information (residual information) regarding the residual between the original block and the predicted block, rather than the original sample values of the original block, to the decoding device, thereby improving image coding efficiency. The decoding device derives a residual block including residual samples based on the residual information, combines the residual block with the predicted block to generate a reconstructed block including reconstructed samples, and generates a reconstructed picture including the reconstructed block.
[0077] 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 the related residual information (via 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 residual samples (or residual blocks) 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. The encoding apparatus may also derive a residual block by inverse quantizing / inverse transforming the quantized transform coefficients for reference for inter-prediction of a future picture, and generate a reconstructed picture based on the residual block.
[0078] FIG. 4 shows a schematic diagram of the multiple transformation technique according to this document.
[0079] Referring to Figure 4, the transform unit may correspond to the transform unit in the encoding device of Figure 2 described above, and the inverse transform unit may correspond to the inverse transform unit in the encoding device of Figure 2 described above or the inverse transform unit in the decoding device of Figure 3.
[0080] The transform unit may perform a primary transform based on the residual samples (residual sample array) in the residual block to derive (primary) transform coefficients (S410). Such a primary transform may be referred to as a core transform. Here, the primary transform may be based on Multiple Transform Selection (MTS), and when multiple transforms are applied as the primary transform, it may be referred to as a multiple core transform.
[0081] The multi-kernel transform may refer to a transform method further using a Discrete Cosine Transform (DCT) type 2, a Discrete Sine Transform (DST) type 7, a DCT type 8, and / or a DST type 1. That is, the multi-kernel transform may refer to a transform method for transforming a spatial domain residual signal (or a residual block) into frequency domain transform coefficients (or first-order transform coefficients) 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-order transform coefficients may be referred to as tentative transform coefficients from the perspective of a transform unit.
[0082] In other words, when an existing transform method is applied, a spatial-domain to frequency-domain transform is applied to a residual signal (or residual block) based on DCT type 2 to generate transform coefficients. In contrast, when the multi-kernel transform is applied, a spatial-domain to frequency-domain transform is applied to a 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.
[0083] When the multi-kernel transform is performed, a vertical transform kernel and a horizontal transform kernel for a current block may be selected from the transform kernels, and a vertical transform for the current block may be performed based on the vertical transform kernel, and a horizontal transform for the current block may be performed based on the horizontal transform kernel. Here, the horizontal transform may indicate a transform for a horizontal component of the current block, and the vertical transform may indicate a transform for a vertical component of the current block. The vertical transform kernel / horizontal transform kernel may be adaptively determined based on a prediction mode and / or a transform index of a current block (CU or sub-block) including a residual block.
[0084] Also, according to one example, when a linear transform is performed by applying MTS, a specific basis function is set to a predetermined value, and when it is a vertical transform or a horizontal transform, a mapping relationship for the transform kernel can be set by combining which basis function is applied or not. For example, if the horizontal transform kernel is represented by trTypeHor and the vertical transform kernel is represented by trTypeVer, a value of 0 for trTypeHor or trTypeVer can be set to DCT2, a value of 1 for trTypeHor or trTypeVer can be set to DCT7, and a value of 2 for trTypeHor or trTypeVer can be set to DCT8.
[0085] In this case, MTS index information can be encoded and signaled to a decoding device to indicate one of a number of transform kernel sets. For example, an MTS index of 0 indicates that the values of trTypeHor and trTypeVer are all 0, an MTS index of 1 indicates that the values of trTypeHor and trTypeVer are all 1, an MTS index of 2 indicates that the value of trTypeHor is 2 and the value of trTypeVer is 1, an MTS index of 3 indicates that the value of trTypeHor is 1 and the value of trTypeVer is 2, and an MTS index of 4 indicates that the values of trTypeHor and trTypeVer are all 2.
[0086] As an example, a conversion kernel set according to index information of MTS is shown in the table below.
[0087] [Table 1]
[0088] The transform unit performs a secondary transform on the (primary) transform coefficients to derive modified (secondary) transform coefficients (S420). The primary transform is a transform from the spatial domain to the frequency domain, and the secondary transform refers to a conversion to a more compressed representation using correlations existing between the (primary) transform coefficients. The secondary transform includes a non-separable transform. In this case, the secondary transform may be referred to as a non-separable secondary transform (NSST) or a mode-dependent non-separable secondary transform (MDNSST). The non-separable secondary transform refers to a transform that generates modified transform coefficients (or secondary transform coefficients) for a residual signal by performing a secondary transform on the (primary) transform coefficients derived by the primary transform based on a non-separable transform matrix. Here, a transform may be applied to the (primary) transform coefficients simultaneously without separately applying a vertical transform and a horizontal transform (or independently applying a horizontal-vertical transform) based on the non-separable transform matrix. In other words, the non-separable quadratic transform is not applied separately to the vertical and horizontal directions of the (first-order) transform coefficients, but rather, for example, rearranges a two-dimensional signal (transform coefficient) into a one-dimensional signal in a specific direction (e.g., row-first or column-first), and then generates modified transform coefficients (or second-order transform coefficients) based on the non-separable transform matrix. For example, row-major order means arranging the first row, second row, ..., Nth row in a row for an MxN block, and column-major order means arranging the first column, second column, ..., Mth column in a row for an MxN block. The non-separable quadratic transform can be applied to the top-left region of a block composed of (first-order) transform coefficients (hereinafter referred to as a transform coefficient block). For example, if the width (W) and height (H) of the transform coefficient block are both equal to or greater than 8, an 8x8 non-separable quadratic transform can be applied to the upper left 8x8 region of the transform coefficient block.Also, if the width (W) and height (H) of the transform coefficient block are both 4 or greater, but the width (W) or height (H) of the transform coefficient block is less than 8, a 4x4 non-separable quadratic transform can be applied to the upper left min(8,W) x min(8,H) region of the transform coefficient block. However, the embodiment is not limited thereto. For example, even if the only condition that the width (W) or height (H) of the transform coefficient block is 4 or greater, a 4x4 non-separable quadratic transform can be applied to the upper left min(8,W) x min(8,H) region of the transform coefficient block.
[0089] Specifically, for example, if a 4x4 input block is used, the non-separable quadratic transform can be performed as follows:
[0090] The 4x4 input block X can be expressed as follows:
[0091]
number
[0092] When X is expressed in the form of a vector, the vector JPEG2026012562000004.jpg84 can be represented as follows:
[0093]
number
[0094] As shown in Equation 2, the vector JPEG2026012562000006.jpg84 rearranges the two-dimensional block of X in Equation 1 into a one-dimensional vector in row-first order.
[0095] In this case, the second-order non-separable transform can be calculated as follows:
[0096]
number
[0097] where: JPEG2026012562000008.jpg75 denotes the transform coefficient vector, and T denotes the 16x16 (non-separable) transform matrix.
[0098] Through Equation 3, a 16×1 transform coefficient vector JPEG2026012562000009.jpg75 can be derived, and JPEG2026012562000010.jpg75 can be re-organized into 4x4 blocks via a 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.
[0099] Meanwhile, the non-separable quadratic transform may be mode-dependent, with the transform kernel (or transform core, transform type) being selectable, where the mode may include an intra-prediction mode and / or an inter-prediction mode.
[0100] As described above, the non-separable quadratic transform may be performed based on an 8x8 transform or a 4x4 transform determined based on the width (W) and height (H) of the transform coefficient block. The 8x8 transform refers to a transform that can be applied to an 8x8 region contained within the transform coefficient block when W and H are both equal to or greater than 8, and the 8x8 region may be the upper-left 8x8 region within the transform coefficient block. Similarly, the 4x4 transform refers to a transform that can be applied to a 4x4 region contained within the transform coefficient block when W and H are both equal to or greater than 4, and the 4x4 region may be the upper-left 4x4 region within the transform coefficient block. For example, an 8x8 transform kernel matrix may be a 64x64 / 16x64 matrix, and a 4x4 transform kernel matrix may be a 16x16 / 8x16 matrix.
[0101] Then, for mode-based transform kernel selection, two non-separable quadratic transform kernels may be configured per transform set for the non-separable quadratic transform for both the 8×8 transform and the 4×4 transform, and the number of transform sets may be four. That is, four transform sets may be configured for the 8×8 transform and four transform sets may be configured for the 4×4 transform. In this case, 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.
[0102] However, the size of the transform, i.e., the size of the region to which the transform is applied, may be other than, for example, 8x8 or 4x4, the number of sets may be n, and the number of transform kernels in each set may be k.
[0103] The transform set may be referred to as an NSST set or an LFNST set. The selection of a particular one of the transform sets may be performed based on, for example, the intra prediction mode of the current block (CU or sub-block). LFNST (Low-Frequency Non-Separable Transform) may be an example of a reduced non-separable transform, which will be described later, and refers to a non-separable transform for low-frequency components.
[0104] 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 this document may also be applied to cases where the number of intra prediction modes is different. Meanwhile, an intra prediction mode numbered 67 may also be used depending on the case, and the 67th intra prediction mode may indicate a linear model (LM) mode.
[0105] FIG. 5 exemplarily shows the intra-directional modes of 65 prediction directions.
[0106] Referring to FIG. 5, intra prediction modes can be classified into those with horizontal directionality and those with vertical directionality, centered on the 34th intra prediction mode, which has a prediction direction on the lower right diagonal. In FIG. 5, H and V represent horizontal and vertical directionality, respectively, and the numbers -32 to 32 indicate displacements in 1 / 32 units on the sample grid position. This may indicate an offset to the mode index value. The 2nd to 33rd intra prediction modes have horizontal directionality, while the 34th to 66th intra prediction modes have vertical directionality. Meanwhile, the 34th intra prediction mode can be considered neither horizontal nor vertical, strictly speaking, but can be classified as horizontally oriented from the perspective of determining a transform set for a secondary transform. This is because input data is transposed for vertical modes, which are symmetrical with respect to the 34th intra prediction mode, and the 34th intra prediction mode uses the same input data alignment method as the horizontal mode. Transposing the input data means that for an MxN two-dimensional block of data, rows become columns and columns become rows, creating NxM data. The 18th and 50th intra prediction modes indicate a horizontal intra prediction mode and a vertical intra prediction mode, respectively. The 2nd intra prediction mode predicts in the upper right direction using a reference pixel on the left, 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.
[0107] For example, depending on the intra prediction mode, the mapping of the four transform sets may be shown as in the following table.
[0108] [Table 2]
[0109] As shown in Table 2, one of four transform sets, ie, lfnstTrSetIdx, can be mapped to any of 0 to 3, ie, 4, depending on the intra prediction mode.
[0110] Meanwhile, if it is determined that a specific set is to be used for a non-separable transform, one of k transform kernels in the specific set can be selected through a non-separable quadratic transform index. The encoding device can derive a non-separable quadratic transform index that points to a specific transform kernel based on a rate-distortion (RD) check and signal the non-separable quadratic transform index to a decoding device. The decoding device can select one of k transform kernels in the specific set based on the non-separable quadratic transform index. For example, an lfnst index value of 0 can point to the first non-separable quadratic transform kernel, an lfnst index value of 1 can point to the second non-separable quadratic transform kernel, and an lfnst index value of 2 can point to the third non-separable quadratic transform kernel. Alternatively, an lfnst index value of 0 can indicate that the first non-separable quadratic transform is not applied to the current block, and lfnst index values 1 to 3 can point to the three transform kernels.
[0111] 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, encoded, and signaled to a decoding device and transmitted to an inverse quantization / inverse transform unit in the encoding device.
[0112] On the other hand, when the secondary transform is omitted as described above, the (primary) transform coefficients, which are the output of the primary (separate) transform, can be derived as quantized transform coefficients through the quantization unit as described above, encoded, signaled to the decoding device, and transmitted to the inverse quantization / inverse transform unit within the encoding device.
[0113] 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 residual blocks (residual samples) (S460). Here, the primary transform coefficients may be referred to as modified transform coefficients from the perspective of the inverse transform unit. As described above, the encoding device and the decoding device may generate reconstructed blocks based on the residual blocks and predicted blocks, and generate reconstructed pictures based on the reconstructed blocks.
[0114] Meanwhile, the decoding apparatus may further include a secondary inverse transform application determining unit (or an element determining whether to apply the secondary inverse transform) and a secondary inverse transform determining unit (or an element determining the secondary inverse transform). The secondary inverse transform application determining unit may determine whether to apply the secondary inverse transform. For example, the secondary inverse transform may be NSST, RST, or LFNST, and the secondary inverse transform application determining unit may determine whether to apply the secondary inverse transform based on a secondary transform flag parsed from the bitstream. As another example, the secondary inverse transform application determining unit may determine whether to apply the secondary inverse transform based on transform coefficients of a residual block.
[0115] 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 specified by an intra prediction mode. Also, in one embodiment, the secondary transform decision method may be determined depending on the primary transform decision method. Various combinations of primary transform and secondary transform may be determined depending on the intra prediction mode. Also, as an example, the secondary inverse transform decision unit may determine an area to which the secondary inverse transform is applied based on the size of the current block.
[0116] On the other hand, as described above, if the second-order (inverse) transform is omitted, the (dequantized) transform coefficients can be received and the first-order (separate) inverse transform can be performed to obtain a residual block (residual sample). As described above, 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.
[0117] On the other hand, in this paper, in order to reduce the computational complexity and memory requirements associated with non-separable secondary transforms, the RST (reduced secondary transform) can be applied, in which the size of the transformation matrix (kernel) is reduced using the concept of NSST.
[0118] Meanwhile, the coefficients constituting the transform kernel, transform matrix, and transform kernel matrix described herein, i.e., kernel coefficients or matrix coefficients, can be expressed in 8 bits. This may be one condition for implementation in a decoding device and an encoding device, and may reduce the memory requirements for storing the transform kernel with a reasonably acceptable performance degradation compared to the existing 9-bit or 10-bit representation. In addition, expressing the kernel matrix in 8 bits allows the use of a small multiplier, which may be more suitable for SIMD (Single Instruction Multiple Data) instructions used for optimal software implementation.
[0119] In this specification, RST may refer to a transformation performed on residual samples of a target block based on a transform matrix whose size is reduced by a simplification factor. When a simplified transformation is performed, the amount of calculation required during the transformation may be reduced due to the reduction in the size of the transform matrix. In other words, RST can be used to resolve issues of computational complexity that arise during the transformation of large blocks or non-separable transformations.
[0120] The RST may be referred to by various terms such as a reduced transform, a reduced transform, a reduced secondary transform, a reduction transform, a simplified transform, a simple transform, etc., and the names by which the RST may be referred to are not limited to the examples given. Alternatively, the RST may be referred to as an LFNST (Low-Frequency Non-Separable Transform) because it is mainly performed in the low-frequency domain including non-zero coefficients in the transform block. The transform index may be called an LFNST index.
[0121] On the other hand, when the second-order inverse transform is performed based on an RST, the inverse transform unit 235 of the encoding apparatus 200 and the inverse transform unit 322 of the decoding apparatus 300 may include an inverse RST unit that derives modified transform coefficients based on the inverse RST for the transform coefficients, and an inverse linear transform unit that derives residual samples for the current block based on an inverse linear transform for the modified transform coefficients. The inverse linear transform refers to the inverse transform of the linear transform applied to the residual. In this document, deriving transform coefficients based on a transform may refer to deriving transform coefficients by applying the transform.
[0122] FIG. 6 is a diagram for explaining the RST according to an embodiment of the present document.
[0123] In this specification, the term "target block" may refer to a current block, a residual block, or a transform block on which coding is performed.
[0124] In an RST according to one embodiment, an N-dimensional vector is 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, reduction factor, simplified factor, or simple factor. Meanwhile, R may be referred to as a reduced coefficient, but in some cases, the simplification factor may also represent R. In other cases, the simplification factor may also represent an N / R value.
[0125] In one embodiment, the simplification factors or simplification coefficients may be signaled via a bitstream, but the embodiment is not limited to this. For example, predefined values for the simplification factors or simplification coefficients may be stored in each encoding device 200 and decoding device 300, in which case the simplification factors or simplification coefficients may not be separately signaled.
[0126] The size of the simplified transformation matrix according to an embodiment is RxN, which is smaller than the size NxN of the normal transformation matrix, and can be defined as Equation 4 below.
[0127]
number
[0128] The matrix T in the Reduced Transform block shown in (a) of FIG. 6 is the matrix T in Equation 4. RxN As shown in FIG. 6(a), the simplified transformation matrix T RxN When multiplied by , the transform coefficients for the current block can be derived.
[0129] In one embodiment, if the size of the block to which the transform is applied is 8x8 and R=16 (i.e., R / N=16 / 64=1 / 4), the RST according to (a) of Figure 6 can be expressed by a matrix operation as shown in Equation 5 below. In this case, the memory and multiplication operations can be reduced by approximately 1 / 4 due to the simplification factor.
[0130] In this document, a matrix operation can be understood as an operation in which a matrix is placed to the left of a column vector and multiplied by the column vector to obtain the column vector.
[0131]
number
[0132] In Equation 5, r1 to r 64 may represent a residual sample for the current block, and more specifically, may be a transform coefficient generated by applying a linear transform. As a result of the calculation of Equation 5, the transform coefficient c for the current block is i can be derived, and c i The derivation process is as shown in Equation 6.
[0133]
number
[0134] The calculation result of Equation 6 is the transform coefficients c1 to c2 for the target block. R That is, when R=16, the transform coefficients c1 to c2 for the target block can be derived. 16can be derived. If a regular transform, rather than RST, were applied and a transform matrix of size 64x64 (NxN) were multiplied by residual samples of size 64x1 (Nx1), 64 (N) transform coefficients for the current block would be derived. However, because 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 encoding apparatus 200 to decoding apparatus 300 is reduced, and therefore, transmission efficiency between encoding apparatus 200 and decoding apparatus 300 can be improved.
[0135] Considering the size of the transformation matrix, the size of a normal transformation matrix is 64x64 (NxN), but the size of the simplified transformation matrix is reduced to 16x64 (RxN), so compared to performing normal transformation, memory usage when performing RST can be reduced by a ratio of R / N. Also, compared to the number of multiplication operations when using a normal transformation matrix (NxN), the number of multiplication operations can be reduced by a ratio of R / N (RxN) when using a simplified transformation matrix.
[0136] In one embodiment, the transform unit 232 of the encoding apparatus 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. These transform coefficients may be transmitted to an inverse transform unit 322 of the decoding apparatus 300, and the inverse transform unit 322 of the decoding apparatus 300 may derive modified transform coefficients based on an inverse 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.
[0137] Inverse RST matrix T according to one embodiment NxRThe size of the simplified transformation matrix T shown in Equation 4 is NxR, which is smaller than the size of the normal inverse transformation matrix NxN. RxN and are in a transpose relationship.
[0138] The matrix T in the Reduced Inverse Transform block shown in Figure 6(b) t is the inverse RST matrix T RxN T (The superscript T means transpose.) As shown in FIG. 6(b), the inverse RST matrix T RxN T When the inverse RST matrix T is multiplied by , the modified transform coefficients for the current block or the residual samples for the current block can be derived. RxN T is (T RxN ) T NxR It is also sometimes expressed as:
[0139] More specifically, when the inverse RST is applied to the secondary inverse transform, the inverse RST matrix T RxN T Alternatively, an inverse RST can be applied to the inverse linear transform, in which case the transform coefficients for the current block are multiplied by the inverse RST matrix TRxNT to derive residual samples for the current block.
[0140] In one embodiment, when the size of the block to which the inverse transform is applied is 8x8 and R=16 (i.e., R / N=16 / 64=1 / 4), the RST according to (b) of FIG. 6 can be expressed by a matrix operation as shown in Equation 7 below.
[0141]
number
[0142] In Equation 7, c1 to c 16 The result of the calculation of Equation 7 is r, which indicates the modified transform coefficients for the current block or the residual samples for the current block. i can be derived, and r i The derivation process is as shown in Equation 8.
[0143]
number
[0144] The calculation result of Equation 8 is r1 to r2, which indicate the modified transform coefficients for the target block or the residual samples for the target block. N can be derived. Considering the size of the inverse transformation matrix, the size of a normal inverse transformation matrix is 64x64 (NxN), but the size of the simplified inverse transformation matrix is reduced to 64x16 (NxR). Therefore, compared to performing a normal inverse transformation, memory usage when performing inverse RST can be reduced by a ratio of R / N. Also, compared to the number of multiplication operations when using a normal inverse transformation matrix (NxN), using a simplified inverse transformation matrix can reduce the number of multiplication operations by a ratio of R / N (NxR).
[0145] Meanwhile, the transform set configuration shown in Table 2 can also be applied to an 8x8 RST. That is, the 8x8 RST can be applied according to the transform set in Table 2. Since one transform set is composed of two or three transforms (kernels) depending on the intra-frame prediction mode, it can be configured to select one of up to four transforms, including cases where a secondary transform is not applied. When a secondary transform is not applied, the transform can be considered to have been applied with an identity matrix. If the four transforms are assigned indices 0, 1, 2, and 3 (for example, index 0 can be assigned to the identity matrix, i.e., when a secondary transform is not applied), a syntax element called a transform index or an lfnst index can be signaled for each block of transform coefficients to specify the transform to be applied. That is, for an 8x8 upper left block, an 8x8 RST can be specified in the RST configuration via the transform index, or an 8x8 lfnst can be specified when an LFNST is applied. The 8x8 lfnst and 8x8 RST refer to a transform that can be applied to an 8x8 region contained within a block of transform coefficients when W and H of the target block are all equal to or greater than 8, and the 8x8 region may be the upper left 8x8 region within the block of transform coefficients. Similarly, the 4x4 lfnst and 4x4 RST refer to a transform that can be applied to a 4x4 region contained within a block of transform coefficients when W and H of the target block are all equal to or greater than 4, and the 4x4 region may be the upper left 4x4 region within the block of transform coefficients.
[0146] Meanwhile, according to one embodiment of the present document, in the transformation of the encoding process, instead of a 16x64 transformation kernel matrix, only 48 pieces of data constituting an 8x8 region can be selected, and a maximum 16x48 transformation kernel matrix can be applied. Here, "maximum" means that for an mx48 transformation kernel matrix that can generate m coefficients, the maximum value of m is 16. That is, when RST is performed by applying an mx48 transformation kernel matrix (m≦16) to an 8x8 region, 48 pieces of data can be input and m coefficients can be generated. When m is 16, 48 pieces of data can be input and 16 coefficients can be generated. That is, when 48 pieces of data form a 48x1 vector, the 16x1 vector can be generated by multiplying the 16x48 matrix and the 48x1 vector in order. Then, the 48 pieces of data constituting the 8x8 region can be properly arranged to form a 48x1 vector. 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 scanning order, and the upper right 4x4 area and the lower left 4x4 area can be filled with 0s.
[0147] A transposed matrix of the above-described transform kernel matrix can be used for the inverse transform in the decoding process. That is, when an inverse RST or an LFNST is performed in the inverse transform process executed in the decoding device, input coefficient data to which the inverse RST is applied is configured as a one-dimensional vector in a predetermined arrangement order, and the modified coefficient vector obtained by multiplying the one-dimensional vector by the matrix of the inverse RST on the left side can be arranged in a two-dimensional block in a predetermined arrangement order.
[0148] To summarize, when RST or LFNST is applied to an 8x8 region during the transform process, a matrix operation is performed on 48 transform coefficients in the upper left, upper right, and lower left regions of the 8x8 region, excluding the lower right region, of the transform coefficients of the 8x8 region, and a 16x48 transform kernel matrix. For the matrix operation, the 48 transform coefficients are input into a one-dimensional array. After this matrix operation, 16 modified transform coefficients are derived, and the modified transform coefficients may be arranged in the upper left region of the 8x8 region.
[0149] Conversely, when the inverse RST or LFNST is applied to an 8x8 region in the inverse transform process, 16 transform coefficients corresponding to the upper left side of the 8x8 region among the transform coefficients of the 8x8 region are input in a one-dimensional array form according to the scanning order and may be subjected to a matrix operation with a 48x16 transform kernel matrix. That is, the matrix operation in this case can be expressed as (48x16 matrix) * (16x1 transform coefficient vector) = (48x1 modified transform coefficient vector). Here, an nx1 vector can be interpreted as an nx1 matrix and therefore may be expressed as an nx1 column vector. Also, * indicates a matrix multiplication operation. When this matrix operation is performed, 48 modified transform coefficients can be derived, and the 48 modified transform coefficients can be arranged in the upper left, upper right, and lower left regions of the 8x8 region, excluding the lower right region.
[0150] On the other hand, when the second-order inverse transform is performed based on an RST, the inverse transform unit 235 of the encoding apparatus 200 and the inverse transform unit 322 of the decoding apparatus 300 may include an inverse RST unit that derives modified transform coefficients based on the inverse RST for the transform coefficients, and an inverse linear transform unit that derives residual samples for the current block based on an inverse linear transform for the modified transform coefficients. The inverse linear transform refers to the inverse transform of the linear transform applied to the residual. In this document, deriving transform coefficients based on a transform may refer to deriving transform coefficients by applying the transform.
[0151] The above-mentioned non-separable transform, LFNST, will be described in detail as follows: LFNST can include a forward transform performed by an encoding device and an inverse transform performed by a decoding device.
[0152] The encoding device applies a forward primary (core) transform, and then applies a forward secondary transform using the derived result (or part of the result) as input.
[0153]
number
[0154] In Equation 9, x and y are the input and output of the quadratic transformation, respectively, and G is a matrix representing the quadratic transformation, where the transform basis vector is composed of a column vector. In the case of the backward LFNST, when the dimension of the transformation matrix G is expressed as [number of rows × number of columns], in the case of the forward LFNST, transposing the matrix G is expressed as G. T It becomes a dimension of.
[0155] For the backward LFNST, the dimensions of the matrix G are [48x16], [48x8], [16x16], and [16x8], where the [48x8] and [16x8] matrices are submatrices obtained by sampling eight transformation basis vectors from the left side of the [48x16] and [16x16] matrices, respectively.
[0156] On the other hand, in the case of forward LFNST, the dimensions of the matrix GT are [16x48], [8x48], [16x16], and [8x16], where the [8x48] and [8x16] matrices are submatrices obtained by sampling the eight transformation basis vectors from the top of the [16x48] and [16x16] matrices, respectively.
[0157] Therefore, in the case of forward LFNST, the input x can be a [48x1] vector or a [16x1] vector, and the output y can be a [16x1] vector or an [8x1] vector. Since the output of a forward linear transform in video coding and decoding is two-dimensional (2D) data, in order to construct a [48x1] or [16x1] vector as the input x, the 2D data output from the forward transform must be appropriately arranged to construct a one-dimensional vector.
[0158] 7 shows an example of a sequence for arranging output data of a forward linear transform into a one-dimensional vector. The left diagrams of (a) and (b) of FIG. 7 show a sequence for creating a [48x1] vector, and the right diagrams of (a) and (b) of FIG. 7 show a sequence for creating a [16x1] vector. In the case of LFNST, 2D data is sequentially arranged in the sequence shown in (a) and (b) of FIG. 7 to obtain a one-dimensional vector x.
[0159] The arrangement direction of the output data of the forward linear 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 horizontally aligned with respect to the diagonal direction, the output data of the forward linear transform may be arranged in the order of (a) of Figure 7, and if the intra prediction mode of the current block is vertically aligned with respect to the diagonal direction, the output data of the forward linear transform may be arranged in the order of (b) of Figure 7.
[0160] As an example, an ordering different from that shown in (a) and (b) of Figures 7 can be applied, and in order to derive the same result (y vector) as when the ordering shown in (a) and (b) of Figures 7 is applied, the column vectors of matrix G can be rearranged to match that 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 base vector.
[0161] Since the output y derived through Equation 9 is a one-dimensional vector, if a configuration that processes the result of a forward quadratic transform as input, for example, a configuration that performs quantization or residual coding, requires two-dimensional data as input data, the output y vector of Equation 9 must be appropriately arranged into 2D data again.
[0162] FIG. 8 is a diagram illustrating an example of an order in which output data of a forward quadratic transform is arranged in two-dimensional blocks.
[0163] In the case of LFNST, the output values can be arranged in a 2D block according to a predetermined scan order. Figure 8(a) shows that when the output y is a [16x1] vector, the output values are arranged in 16 positions of the 2D block according to a diagonal scan order. Figure 8(b) shows that when the output y is an [8x1] 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 Figure 8(b) indicates that it is filled with 0.
[0164] As another example, depending on the configuration for performing quantization or residual coding, the order in which the output vector y is processed may be performed according to a preset order, so the output vector y may not be arranged in a 2D block as shown in Figure 7. However, in the case of residual coding, data coding may be performed in units of 2D blocks (e.g., 4x4) such as a coefficient group (CG), and in this case, data may be arranged in a specific order such as the diagonal scan order of Figure 7.
[0165] Meanwhile, the decoding device can arrange two-dimensional data output through an inverse quantization process, etc., for inverse transformation according to a preset scanning order to form a one-dimensional input vector y. The input vector y can be output to the input vector x according to the following equation:
[0166]
number
[0167] For the 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 the reverse LFNST, the output vector x can be a [48x1] or [16x1] vector.
[0168] The output vector x is arranged in two-dimensional blocks in the order shown in FIG. 7 and arranged into two-dimensional data, and such two-dimensional data becomes the input data (or part of the input data) for the inverse linear transformation.
[0169] Therefore, the inverse quadratic transform is generally the opposite process to the forward quadratic transform, and in the case of the inverse transform, unlike the forward transform, the inverse quadratic transform is applied first, and then the inverse linear transform is applied.
[0170] Inverse LFNST allows you to select one of eight [48x16] matrices or eight [16x16] matrices as the transformation matrix G. Whether to apply a [48x16] or [16x16] matrix depends on the size and shape of the block.
[0171] Also, the eight matrices may be derived from four transform sets as shown in Table 2 above, and each transform set may consist of two matrices. Which transform set to use among the four transform sets is determined depending on the intra prediction mode. More specifically, the transform set is determined based on an extended intra prediction mode value, taking into account a wide angle intra prediction mode (WAIP). Which of the two matrices constituting the selected transform set is selected is determined 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 indicate one of the two transform matrices constituting the transform set selected based on the intra prediction mode value.
[0172] FIG. 9 is a diagram illustrating a wide-angle intra prediction mode according to one embodiment of the present document.
[0173] General intra prediction mode values may range from 0 to 66 and from 81 to 83, and as shown, intra prediction mode values extended by WAIP may range 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.
[0174] When the width of the current block to be predicted is greater than its height, the reference pixel on the top is 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. Conversely, when the height of the block is greater than its width, the reference pixel on the left is 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.
[0175] When wide-angle intra prediction is applied, information for existing intra prediction is signaled, and after the information is parsed, the information may be remapped with the index of the wide-angle intra prediction mode. Therefore, the total number of intra prediction modes for a specific block (e.g., a non-square block of a specific size) may not be changed, i.e., the total number of intra prediction modes is 67, and the coding of the intra prediction mode for the specific block may not be changed.
[0176] Table 3 below shows a process of deriving a modified intra mode by remapping an intra prediction mode with a wide-angle intra prediction mode.
[0177] [Table 3]
[0178] 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 according to the Intra Sub Partitions (ISP) technology currently adopted in the VVC standard, and the cIdx variable values of 0, 1, and 2 indicate the luma, Cb, and Cr components, respectively. The Log2 function appearing in Table 3 returns a log value with a base of 2, and the Abs function returns an absolute value.
[0179] The input values of the wide-angle intra prediction mode mapping process are the variable predModeIntra indicating the intra prediction mode, the height and width of the transform block, etc., and the output value is the modified intra prediction mode predModeIntra. The height and width of the transform block or coding block can become the height and width of the current block for intra prediction mode remapping. In this case, the variable whRatio reflecting the ratio of width to height can be set to Abs(Log2(nW / nH)).
[0180] For non-square blocks, the intra prediction mode can be modified in two distinct cases.
[0181] 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 equal to or greater than 2; and (3) the intra prediction mode is (8+2*whRatio) when the variable whRatio is greater than 1, and is less than the value derived from 8 when the variable whRatio is equal to or less than 1 [predModeIntra is less than (whRatio>1)?(8+2*whRatio):8], the intra prediction mode is set to a value 65 greater than the intra prediction mode [predModeIntra is set equal to (predModeIntra+65)].
[0182] If the above is not the case, and all of the following conditions are met: (1) the height of the current block is greater than the width, (2) the intra prediction mode before modification is equal to or less than 66, and (3) the intra prediction mode is greater than the value derived from (60-2*whRatio) when the variable whRatio is greater than 1, and 60 when the variable whRatio is equal to or less than 1 [predModeIntra is greater than (whRatio>1)?(60-2*whRatio):60], then the intra prediction mode is set to a value 67 less than the intra prediction mode [predModeIntra is set equal to (predModeIntra-67)].
[0183] Table 2 above shows how transform sets are 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 at the center. For example, mode 14 and mode 54 are symmetrical to each other with respect to the direction corresponding to mode 34 at the center. Therefore, the same transform set is applied to modes located in symmetrical directions, and this symmetry is reflected in Table 2.
[0184] However, it is assumed that the forward LFNST input data for mode 54 is symmetrical to the forward LFNST input data for mode 14. For example, for modes 14 and 54, two-dimensional data is rearranged into one-dimensional data according to the arrangement orders shown in Figures 7(a) and 7(b), respectively, and it can be seen that the ordering patterns shown in Figures 7(a) and 7(b) are symmetrical about the direction indicated by mode 34 (diagonal direction).
[0185] On the other hand, as described above, whether to apply a [48x16] matrix or a [16x16] matrix to LFNST is determined by the size and shape of the block to be transformed.
[0186] Figure 10 shows the shapes of blocks 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 greater, (d) shows an 8x8 block, and (e) shows an MxN block where M≧8, N≧8, and N>8 or M>8.
[0187] In Fig. 10, blocks with thick frames indicate the regions to which LFNST is applied. For the blocks in Fig. 10(a) and (b), LFNST is applied to the top-left 4x4 region, and for the block in Fig. 10(c), LFNST is applied to each of the two consecutive 4x4 regions in the top-left corner. In Fig. 10(a), (b), and (c), LFNST is applied in units of 4x4 regions, so this type of LFNST will be referred to as "4x4 LFNST" below, and the transformation matrix that can be applied is a [16x16] or [16x8] matrix based on the matrix dimensions for G in Equation 9 and Equation 10.
[0188] More specifically, a [16x8] matrix is applied to the 4x4 block (4x4TU or 4x4CU) in (a) of Figure 10, and a [16x16] matrix is applied to the blocks in (b) and (c) of Figure 10. This is to match the worst-case computational complexity with 8 multiplications per sample.
[0189] 10(d) and (e), LFNST is applied to the upper-left 8x8 region, and such LFNST will be referred to as "8x8 LFNST" hereinafter. A [48x16] or [48x8] matrix can be used as the transformation matrix. In the case of forward LFNST, a [48x1] vector (the x vector in Equation 9) is input as input data, so not all sample values in the upper-left 8x8 region are used as input values for the forward LFNST. That is, as seen in the left-hand order of FIG. 7(a) or the left-hand order of FIG. 7(b), the bottom-right 4x4 block is left as is, and a [48x1] vector can be constructed based on samples belonging to the remaining three 4x4 blocks.
[0190] A [48x8] matrix can be applied to the 8x8 block (8x8TU or 8x8CU) in Figure 10(d), and a [48x16] matrix can be applied to the 8x8 block in Figure 10(e), again to match the worst-case computational complexity to 8 multiplications per sample.
[0191] Depending on the block shape, applying the corresponding forward LFNST (4x4 LFNST or 8x8 LFNST) generates 8 or 16 output data (the y vector in Equation 9, an [8x1] or [16x1] vector). In the forward LFNST, the number of output data is equal to or less than the number of input data due to the properties of the matrix GT.
[0192] FIG. 11 is a diagram showing an example of the arrangement of output data from a forward LFNST, showing blocks in which output data from a forward LFNST is arranged according to a block shape.
[0193] The shaded area in the upper left corner of the block shown in Figure 11 corresponds to the area where the output data of the forward LFNST is located, with locations marked with 0 indicating samples filled with 0 values, and the remaining area indicating areas that are not changed by the forward LFNST. In areas that are not changed by the LFNST, the output data of the forward linear transform remains unchanged.
[0194] As mentioned above, the dimensions of the transformation matrix applied vary depending on the block shape, and therefore the number of output data also varies. As shown in Figure 11, the output data of the forward LFNST may not fill the entire upper-left 4x4 block. In Figures 11(a) and 11(d), a [16x8] matrix and a [48x8] matrix are applied to the block indicated by the thick line or a partial area within the block, respectively, and an [8x1] vector is generated as the output of the forward LFNST. That is, according to the scan order shown in Figure 8(b), only eight output data positions are filled as shown in Figures 11(a) and 11(d), and the remaining eight positions are filled with zeros. In the case of the block to which the LFNST is applied in Figure 10(d), the two 4x4 blocks on the upper right and lower left adjacent to the upper-left 4x4 block are also filled with zeros, as shown in Figure 11(d).
[0195] As described above, the LFNST index is basically signaled to specify whether to apply LFNST and the transformation matrix to be applied. As shown in Figure 11, when LFNST is applied, the number of output data from the forward LFNST may be equal to or less than the number of input data, so areas filled with zero values occur as follows:
[0196] 1) As shown in Figure 11(a), in the 4x4 block on the upper left, the 8th position in the scan order and after, that is, the 9th to 16th samples
[0197] 2) As shown in (d) and (e) of FIG. 11, a [16×48] matrix or an [8×48] matrix is applied to the two 4×4 blocks adjacent to the upper left 4×4 block or the second and third 4×4 blocks in the scan order.
[0198] Therefore, if non-zero data is found by checking the above 1) and 2), it is certain that the LFNST has not been applied, and signaling of the LFNST index can be omitted.
[0199] On the other hand, the following simplification method can be applied to the adopted LFNST.
[0200] (i) As an example, the number of output data for the forward LFNST can be limited to a maximum of 16.
[0201] In the case of (c) of Figure 10, a 4x4 LFNST is applied to each of two adjacent 4x4 regions on the upper left side, generating a maximum of 32 LFNST output data. If the number of output data for the forward LFNST is limited to a maximum of 16, a 4x4 LFNST is applied only to the single 4x4 region on the upper left side of a 4xN / Nx4 (N≧16) block (TU or CU), allowing LFNST to be applied only once to all blocks in Figure 10. This simplifies the implementation of image coding.
[0202] Figure 12 shows an example in which the number of output data items for the forward LFNST is limited to a maximum of 16. As shown in Figure 12, when LFNST is applied to the top-left 4x4 region of a 4xN or Nx4 block where N is 16 or greater, the number of output data items for the forward LFNST is 16.
[0203] (ii) As an example, zero-out can be applied to areas where LFNST is not applied. In this document, zero-out can mean filling all position values belonging to a specific area with zeros. In other words, zero-out can be applied to areas that are not changed by LFNST and retain the results of the forward linear transform. As mentioned above, LFNST is divided into 4x4 LFNST and 8x8 LFNST, so zero-out can be divided into two types ((ii)-(A) and (ii)-(B)) as follows.
[0204] (ii)-(A) When 4x4 LFNST is applied, regions to which 4x4 LFNST is not applied can be zeroed out. Figure 13 illustrates zeroing out in a block to which 4x4 LFNST is applied, according to an example.
[0205] As shown in FIG. 13, for blocks to which 4x4 LFNST is applied, that is, for blocks (a), (b), and (c) in FIG. 11, the area to which LFNST is not applied can be filled with 0.
[0206] On the other hand, (d) of FIG. 13 shows that when the maximum number of output data items of the forward LFNST is limited to 16 as in FIG. 12, zeroing out is performed on the remaining blocks to which the 4x4 LFNST is not applied.
[0207] (ii)-(B) When an 8x8 LFNST is applied, regions to which the 8x8 LFNST is not applied can be zeroed out. Figure 14 illustrates zeroing out in a block to which the 8x8 LFNST is applied, according to an example.
[0208] As shown in FIG. 14, for 8x8 blocks to which LFNST is applied, that is, for the blocks in (d) and (e) of FIG. 11, the area to which LFNST is not applied can be filled with 0s.
[0209] (iii) When LFNST is applied, the zero-out proposed in (ii) above may change the area filled with zeros. Therefore, the zero-out proposed in (ii) above allows checking whether non-zero data exists in a wider area than in the case of LFNST in FIG. 11.
[0210] For example, when (ii)-(B) is applied, it is possible to add to the areas filled with zero values in (d) and (e) of FIG. 11, check whether non-zero data exists up to the areas further filled with zeros in FIG. 14, and then perform signaling for the LFNST index only if non-zero data does not exist.
[0211] Of course, even when the zero-out proposed in (ii) above is applied, it is possible to check whether non-zero data exists, as with the existing LFNST index signaling. That is, it is possible to apply LFNST index signaling 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 the decoding device does not assume this zero-out. That is, it is possible to perform LFNST index parsing by checking whether non-zero data exists only in areas explicitly marked with zeros in Figure 11.
[0212] Various embodiments can be derived by applying combinations of the simplification methods ((i), (ii)-(A), (ii)-(B), and (iii)) to the LFNST. Of course, the combinations of the simplification methods are not limited to the following embodiments, and any combination can be applied to the LFNST.
[0213] Embodiment
[0214] - The number of output data for forward LFNST is limited to a maximum of 16 → (i)
[0215] - When 4x4 LFNST is applied, zero out all areas where 4x4 LFNST is not applied → (ii)-(A)
[0216] - When 8x8 LFNST is applied, zero out all areas where 8x8 LFNST is not applied → (ii)-(B)
[0217] - After checking whether non-zero data exists in the areas filled with existing zero values and in the areas filled with zeros due to additional zero-out ((ii)-(A), (ii)-(B)), signal LFNST indexing only if non-zero data does not exist → (iii)
[0218] In the above embodiment, when LFNST is applied, the area where non-zero output data can exist is limited to the interior of the upper left 4x4 area. More specifically, in the cases of (a) of Figure 13 and (a) of Figure 14, the 8th position in the scan order is the last position where non-zero data can exist, and in the cases of (b) and (d) of Figure 13 and (b) of Figure 14, the 16th position in the scan order (i.e., the position on the lower right edge of the upper left 4x4 block) is the last position where non-zero data can exist.
[0219] Therefore, when LFNST is applied, whether or not to signal the LFNST index can be determined after checking whether non-zero data exists at a position where the residual coding process is not allowed (a position beyond the last position).
[0220] In the case of the zero-out method proposed in (ii), the amount of data ultimately generated when both the linear transform and the LFNST are applied is reduced, thereby reducing the amount of calculation required when performing the entire transform process. In other words, when the LFNST is applied, zero-out is also applied to the forward linear transform output data present in areas where the LFNST is not applied, so there is no need to generate data for areas that will be zeroed out when performing the forward linear transform. Therefore, the amount of calculation required to generate this data can be reduced. Additional benefits of the zero-out method proposed in (ii) can be summarized as follows:
[0221] First, the amount of computation required to perform the entire transformation process is reduced, as described above.
[0222] In particular, when (ii)-(B) is applied, the worst-case calculation amount is reduced, making the transformation process lighter. In general, a large amount of calculations is required to execute a large-size primary transformation, but when (ii)-(B) is applied, the number of data derived as the forward LFNST execution result can be reduced to 16 or less, and the effect of reducing the amount of transformation calculations increases as the overall block (TU or CU) size increases.
[0223] Second, the amount of computation required for the entire conversion process is reduced, reducing the power consumption required to perform the conversion.
[0224] Third, it reduces the latency involved in the conversion process.
[0225] Secondary transforms such as LFNST add computational complexity to existing primary transforms, increasing the overall latency associated with the transform execution. In particular, in the case of intra prediction, reconstruction data from neighboring blocks is used in the prediction process, so the increased latency due to secondary transforms during encoding can lead to an increased latency until reconstruction, potentially resulting in an increase in the overall latency of intra prediction encoding.
[0226] However, by applying the zero-out technique proposed in (ii), the latency of the primary transform can be significantly reduced when LFNST is applied, so the latency of the entire transform execution remains the same or is reduced, making it easier to implement the encoding device.
[0227] Meanwhile, conventional intra prediction treats a block to be coded as a single coding unit and performs coding without division. However, ISP (Intra Sub-Partitions) coding refers to dividing a block to be coded horizontally or vertically and performing intra prediction coding. In this case, coding / decoding is performed on each divided block to generate a reconstructed block, and the reconstructed block is used as a reference block for the next divided block. For example, in ISP coding, one coding block may be divided into two or four sub-blocks and coded, and in ISP, one sub-block is intra predicted by referring to the reconstructed pixel value of the sub-block located to the left or above it. Hereinafter, the term "coding" is used to refer to both encoding performed by an encoding device and decoding performed by a decoding device.
[0228] Meanwhile, below we look at the signaling of LFNST index and MTS index.
[0229] An example of a coding device syntax table related to signaling of LFNST index and MTS index is shown in the following table.
[0230] [Table 4]
[0231] The main variables in the table have the following meanings:
[0232] 1.cbWidth,cbHeight: Width and height of the current coding block
[0233] 2. log2TbWidth, log2TbHeight: Base-2 logarithm of the width and height of the current transform block. Zero-out is reflected and it can be reduced to the upper left section where non-zero coefficients can exist.
[0234] 3. sps_lfnst_enabled_flag: A flag indicating whether LFNST is applicable (enable). If the flag value is 0, LFNST is not applicable, and if the flag value is 1, LFNST is applicable. This is defined in the Sequence Parameter Set (SPS).
[0235] 4. CuPredMode[chType][x0][y0]: Prediction mode corresponding to the variable chType and the (x0,y0) position. chType has values 0 and 1, where 0 indicates the luma element and 1 indicates the chroma element. The (x0,y0) position 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).
[0236] 5. IntraSubPartitionsSplitType: Indicates whether a certain ISP split is applied to the current encoder, and ISP_NO_SPLIT indicates that the encoder is not split into partition blocks.
[0237] 6. intra_mip_flag[x0][y0]: The content for the (x0, y0) position is the same as in item 4. intra_mip_flag is a flag indicating whether or not the MIP (Matrix-based Intra Prediction) prediction mode is applied. If the flag value is 0, it indicates that MIP is not applicable, and if the flag value is 1, it indicates that MIP is applied.
[0238] 7. cIdx: A value of 0 indicates luma, and values of 1 and 2 indicate the chroma elements Cb and Cr, respectively.
[0239] 8. Tree Type: Refers to single-tree and dual-tree (SINGLE_TREE: Single tree, DUAL_TREE_LUMA: Dual tree for luma element, DUAL_TREE_CHROMA: Dual tree for chroma element)
[0240] 9. lfnst_idx[x0][y0]: The LFNST index syntax element to be parsed. If not parsed, the value can be assumed to be 0. In other words, the default value is set to 0, which means that LFNST is not applied.
[0241] The above-described syntax element descriptions apply to the syntax elements shown in the table below.
[0242] In Table 4, transform_skip_flag[x0][y0][0]==0 is one condition for determining whether or not the lfnst index signals depending on whether or not a transform skip is performed for the luma element.
[0243] To address this, according to one example, the following encoder syntax table is proposed to remove the dependency between the transform skip flag for the luma component and the LFNST index signaling for the chroma component, and to eliminate the worst-case delay associated with applying LFNST.
[0244] [Table 5]
[0245] In an embodiment such as Table 5, signaling of the LFNST index for the luma component depends only on the transform skip flag for the luma component for both the dual tree type and the single tree split mode. In the dual tree mode, the LFNST index for the chroma component is signaled only on the transform skip flag for the chroma component. In the single tree split mode, LFNST is not applied to the chroma component to reduce the worst-case delay.
[0246] The variable LfnstTransformNotSkipFlag shown in Table 5 is set by the transform skip flag value for the tree type and color component of the current block, and the LFNST index is signaled only if its value is 1.
[0247] The variable LfnstTransformNotSkipFlag is set to 1 if the tree type is not dual tree chroma (tree Type!=DUAL_TREE_CHROMA), that is, if the tree type is single tree or dual tree luma, and the transform skip flag value for the luma element is 0 ( tree Type!=DUAL_TREE_CHROMA?transform_skip_flag[x0][y0][0]==0 :(transform_skip_flag[x0][y0][1]==0||transform_skip_flag[x0][y0][2]==0)), if the tree type is dual tree chroma, when the transform skip flag value (transform_skip_flag[x0][y0][1]) for the chroma Cb element is 0 or the transform skip flag value (transform_skip_flag[x0][y0][1]) for the chroma Cr element is 0, ( treeType!=DUAL_TREE_CHROMA? transform_skip_flag[x0][y0][0]==0: (transform_skip_flag[x0][y0][1]==0||transform_skip_flag[x0][y0][2]==0) ), is set to 1.
[0248] In this document, the "x?y:z" operator means that if x is TRUE, then x becomes y; otherwise, x becomes z (if x is TRUE, evaluates to the value of y; otherwise, evaluates to the value of z).
[0249] The specification text for the conversion process taking into account Table 5 is as follows:
[0250] [Table 6]
[0251] The variable LfnstZeroOutSigCoeffFlag in Table 4 is 0 if there is a valid coefficient at the position where zeroing out occurs when LFNST is applied, and is 1 otherwise. The variable LfnstZeroOutSigCoeffFlag is set according to several conditions shown in Table 11 below.
[0252] The variable LfnstZeroOutSigCoeffFlag indicates whether a valid coefficient exists in the second section excluding the top left first section of the current block, and its value is initially set to 1. If a valid coefficient exists in the second section, its value is 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 is applied to all luma or chroma elements of the current block.
[0253] For example, the variable LfnstDcOnly in Table 4 is set to 1 if the last significant coefficients of a transform block whose corresponding CBF (Coded Block Flag, which is 1 if there is at least one significant coefficient in the corresponding block, or 0) value is 1, are all located at the DC position (top left position), and is set to 0 otherwise. More specifically, in the case of dual tree luma, the position of the last significant coefficient is checked for one luma transform block, and in the case of dual tree chroma, the position of the last significant coefficient is checked for all transform blocks for Cb and Cr. In the case of a single tree, the position of the last significant coefficient can be checked for transform blocks for luma, Cb, and Cr.
[0254] Meanwhile, a syntax table of an encoding device for signaling an LFNST index according to another example is as follows:
[0255] [Table 7]
[0256] In Table 7, the variable transform_skip_flag[x0][y0][cIdx] indicates whether transform skip is applied to the coding block for the element indicated by cIdx. cIdx has values of 0, 1, and 2, where 0 indicates the luma element, and 1 and 2 indicate the Cb element and Cr element, respectively. A value of 1 in transform_skip_flag[x0][y0][cIdx] indicates that transform skip is applied, and a value of 0 indicates that transform skip is not applied.
[0257] In Table 7, the LfnstNotSkipFlag variable is set to 1 only if transform skip is not applied to all elements constituting the current encoding device (to all encoding blocks), and is set to 0 otherwise. The LFNST index (lfnst_idx in Table 7) can be signaled only when LfnstNotSkipFlag is 1.
[0258] If the current encoding device is coded in a single tree structure (in Table 7, tree Type is SINGLE_TREE), all corresponding elements are composed of Y, Cb, and Cr; if the current encoding device is coded in a separate tree structure for luma (in Table 7, tree Type is DUAL_TREE_LUMA), all corresponding elements are composed of Y only; and if the current encoding device is coded in a separate tree structure for chroma (in Table 7, tree Type is DUAL_TREE_CHROMA), all corresponding elements are composed of Cb and Cr.
[0259] In other words, if even one of the elements constituting the current encoding device is encoded using transform skip, the LFNST index is not signaled and the corresponding LFNST index value can be assumed to be 0. In other words, LFNST is not applied.
[0260] As shown in Table 7, in the structure that restricts the application of LFNST when even one of the components (Y, Cb, Cr) is encoded with transform skip, as in the single tree, when several components (Y, Cb, Cr) are encoded consecutively and an element is determined to be a transform skip during parsing (for example, when Cb and Cr are determined to be a transform skip), an LFNST index value can be added to the corresponding element that is encoded with transform skip until parsing is complete, thereby preventing the corresponding transform coefficient from being buffered.
[0261] For example, if it is determined that an element is coded with transform skip, it is ensured that LFNST is not applied, and therefore inverse quantization, inverse transform, etc. are performed immediately.
[0262] Instead of Table 7, it can be written more succinctly as a syntax table like Table 8.
[0263] [Table 8]
[0264] If a single tree is used and whether or not to signal an LFNST index is determined by checking only whether or not to skip a transform for the luma component, the following syntax table for the encoding device can be configured.
[0265] [Table 9]
[0266] In Table 9, LfnstNotSkipFlag is determined in the same way as in Table 7 or Table 8 if it is a separated tree (i.e., if it is a luma separated tree, it is set to 1 if transform skip is not applied to the luma element, otherwise it is set to 0; if it is a chroma separated tree, it is set to 1 if transform skip is not applied to all Cb and Cr elements, otherwise it is set to 0); in the case of a single tree, it is set to 1 if transform skip is not applied only to the luma element, otherwise it is set to 0. A syntax table such as Table 10 can also be applied instead of Table 9.
[0267] [Table 10]
[0268] On the other hand, in the case of a single tree, an example of determining the LFNST index signaling condition when applying LFNST only to the luma component is as follows.
[0269] In the encoder syntax tables of Tables 4 and 5 and Tables 7, 8, 9, and 10, the LfnstDcOnly and LfnstZeroOutSigCoeffFlag variables are used to signal the LFNST index. Basically, as in Table 7, the LfnstDcOnly and LfnstZeroOutSigCoeffFlag variables are all initialized to 1, and in the syntax table for residual coding as in Table 11, the corresponding two variable values are updated to 0. For reference, if an element (Y, Cb, or Cr) is coded as a transform skip (Y, Cb, or Cr), instead of calling the residual coding in Table 11, another syntax table (transform_ts_coding) is called, and the LfnstDcOnly and LfnstZeroOutSigCoeffFlag variables are not updated when LFNST index parsing for the corresponding element is performed.
[0270] [Table 11-1]
[0271] [Table 11-2]
[0272] In Table 11, lastSubBlock indicates the position in the scan order of the sub-block (sub-block, Coefficient Group (CG)) where the last significant coefficient (last non-zero coefficient) is located. 0 indicates a sub-block containing a DC element, and if it is greater than 0, it is not a sub-block containing a DC element.
[0273] lastScanPos indicates the position of the last significant coefficient in the scan order within a subblock. If a subblock consists of 16 positions, the possible values are 0 to 15.
[0274] LastSignificantCoeffX and 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, while the y coordinate starts from 0 and increases from top to bottom. If the values of both variables are 0, it means that the last significant coefficient is located at DC.
[0275] For the example of Table 5, Table 11 is basically applied to determine the LfnstDcOnly variable value and the LfnstZeroOutSigCoeffFlag variable value, and when Table 11 is applied and coding is performed in a single tree, the residual coding shown in Table 11 is invoked for all elements. For example, if none of the Y, Cb, and Cr elements are coded in a transform skip, residual coding is performed for each element.
[0276] Therefore, when Table 11 is applied and coding is performed in a single tree, if the last non-zero coefficient of even one element is located in a position other than the DC position (the upper left position of the corresponding transform block), the LfnstDcOnly variable is updated to 0, and if the position of the last non-zero coefficient of even one element is located in a section where a transform coefficient cannot be located when LFNST is applied (i.e., in the current VVC standard, in the case of a 4x4 transform block or an 8x8 transform block, it is located in a section other than the 1st to 8th positions according to the forward transform coefficient scan order, or in the case of other transform blocks to which LFNST can be applied, it is located in a section other than the upper left 4x4 section), the LfnstZeroOutSigCoeffFlag variable value is updated to 0. As shown in the encoder syntax table in Table 5 and Tables 7, 8, 9, and 10, the LFNST index is signaled only if the LfnstZeroOutSigCoeffFlag variable value is 1, and if not in ISP mode, the LFNST index is signaled only if the LfnstDcOnly variable value is 0.
[0277] However, when LFNST is applied only to luma components in a single tree, the LfnstDcOnly and LfnstZeroOutSigCoeffFlag variables can be restricted from being updated when residual coding is performed on components to which LFNST is not applied (chroma components, Cb or Cr). This is because it may not be logical to determine whether or not to signal an LFNST index, i.e., whether or not LFNST is applied, based on the transform coefficient arrangement or distribution for components to which LFNST is not applied.
[0278] In the case of a single tree, Table 12 restricts the LfnstDcOnly and LfnstZeroOutSigCoeffFlag variables to be updated only for luma elements. In the case of a non-single tree, the LfnstDcOnly and LfnstZeroOutSigCoeffFlag variables can be updated for all elements, as in Table 11.
[0279] [Table 12-1]
[0280] [Table 12-2]
[0281] In the residual coding shown in Table 12, since the tree type is added to the parameters compared to Table 11, the syntax table for the transform device is modified as shown in Table 13.
[0282] [Table 13]
[0283] Based on the contents of Table 5, some of the contents can be replaced with the examples of Tables 7 to 10, or the contents of Table 11 or Table 12 can be applied. Based on Tables 7 to 10 and Table 11 or Table 12, the following possible combinations can be configured.
[0284] 1. Table 7 (or Table 8) + Table 11
[0285] 2. Table 7 (or Table 8) + Table 12
[0286] 3. Table 9 (or Table 10) + Table 11
[0287] 4. Table 9 (or Table 10) + Table 12
[0288] Below, we will look at how to apply a scaling list to chroma elements when applying LFNST only to the luma element in the case of a single tree.
[0289] Currently, the VVC WD defines a syntax element called scaling_matrix_for_lfnst_disabled_flag. If scaling_matrix_for_lfnst_disabled_flag is 1, the scaling list is not applied when LFNST is applied, and if it is 0, the scaling list can be applied when LFNST is applied.
[0290] Here, the scaling list is a matrix that specifies a specific weight value for each position of a transform coefficient in a transform block, and by multiplying each transform coefficient by the corresponding weight value, inverse quantization or quantization can be performed, and inverse quantization or quantization can be applied by subtracting the weight value depending on the importance of the transform coefficient.
[0291] In the case of a single tree, LFNST can be applied only to the luma component as shown in the example of Table 5. When encoding to a single tree, scaling_matrix_for_lfnst_disabled_flag is set to 1 and LFNST is applied, the scaling list is not applied to the luma component. In this case, the scaling list can be applied to the chroma components to which LFNST is not applied.
[0292] Table 14 shows an example of an inverse scaling process that can be used to implement the above case.
[0293] [Table 14-1]
[0294] [Table 14-2]
[0295] [Table 14-3]
[0296] [Table 14-4]
[0297] In Table 14, tree type indicates the tree type of the encoding device to which the currently processed transform block belongs, and SINGLE_TREE, DUAL_TREE_LUMA, and DUAL_TREE_CHROMA indicate each single tree, a separate tree for luma, and a separate tree for chroma (dual tree chroma).
[0298] In this embodiment, when there is a single tree, LFNST is applied only to the luma element. Therefore, when the scaling_matrix_for_lfnst_disabled_flag value is 1 and LFNST is applied (when the lfnst_idx[xTbY][yTbY] value is greater than 0), the scaling list is not applied to the luma element (corresponding to when the cIdx value is 0).
[0299] On the other hand, for chroma elements (when the cIdx value is greater than 0), other conditions can be further checked (e.g., checking transform_skip_flag[xTbY][yTbY][cIdx]) to determine whether the scaling list is applied or not.
[0300] In the case of a separated tree, as with the luma element in a single tree, when scaling_matrix_for_lfnst_disabled_flag value is 1 and LFNST is applied, the scaling list is not applied to the luma and chroma elements (when lfnst_idx[xTbY][yTbY] value is greater than 0).
[0301] Alternatively, in the case of a separate tree, other conditions can be further checked (e.g., transform_skip_flag[xTbY][yTbY][cIdx]) to determine whether or not to apply the scaling list, as in the case of chroma elements in a single tree.
[0302] Therefore, if the scaling_matrix_for_lfnst_disabled_flag value is 1 and LFNST can be applied only to the luma element in a single tree, the scaling list is not applied to the luma element, and the scaling list is applied to the chroma elements.
[0303] As an example, a combination of Table 14 and the above-mentioned embodiments (a combination based on the contents of Table 5, replacing some of the contents with the embodiments of Tables 7 to 10, or applying the contents of Table 11 or Table 12) is applied.
[0304] In this case, as per the specification text for "Transform process for scaled transform coefficients" in Table 6, in the case of a single tree, LFNST can be configured to be applied only to the luma component.
[0305] 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 shown in the drawings are presented as examples, and the technical features of the present specification are not limited to the specific names used in the following drawings.
[0306] FIG. 15 is a flow diagram illustrating the operation of a video decoding device according to one embodiment of this document.
[0307] The steps disclosed in Figure 15 are based on some of the content described above in Figures 4 to 14. Therefore, in Figures 3 to 14, the description of the specific content that overlaps with the content described above will be omitted or simplified.
[0308] When LFNST is performed from a bitstream, the decoding apparatus 300 according to an embodiment may receive flag information indicating availability of a scaling list, an LFNST index for a current block, and residual information (S1510).
[0309] More specifically, the decoding apparatus 300 may decode information about quantized transform coefficients for a current block from a bitstream and derive quantized transform coefficients for a target block based on the information about the quantized transform coefficients for the current block. The information about 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 about a simplification factor, information on a minimum transform size for applying the simplified transform, information on a maximum transform size for applying the simplified transform, a simplified inverse transform size, and information on a transform index indicating any one of transform kernel matrices included in a transform set.
[0310] In addition, the decoding device may further receive information regarding the intra-prediction mode for the current block and information regarding whether ISP is applied to the current block. The decoding device may derive whether the current block is divided into a predetermined number of sub-partition transformation blocks by receiving and parsing flag information indicating whether ISP coding or ISP mode is applied. Here, the current block is a coding block. In addition, the decoding device may derive the size and number of sub-partition blocks to be divided from the flag information indicating in which direction the current block is divided.
[0311] The LFNST index has a value between 0 and 2 that specifies the LFNST matrix when LFNST is applied to the inverse quadratic non-separability. For example, an LFNST index value of 0 indicates that LFNST is not applied to the current block, an LFNST index value of 1 indicates the first LFNST matrix, and an LFNST index value of 2 indicates the second LFNST matrix.
[0312] Information relating to the ISP and the LFNST index is received at the encoder level.
[0313] Flag information indicating the availability of a scaling list when LFNST received by a decoding device is executed can be indicated by scaling_matrix_for_lfnst_disabled_flag or sps_scaling_matrix_for_lfnst_disabled_flag, and is signaled in the sequence parameter set. If this flag value is 1, a scaling list is not applied when LFNST is applied, and if it is 0, a scaling list can be applied when LFNST is applied. The scaling list is a matrix that specifies a specific weight value for each position of a transform coefficient in a transform block, and enables inverse quantization or quantization to be performed by multiplying the corresponding weight value for each transform coefficient, and enables inverse quantization or quantization to be applied by performing a difference depending on the importance of the transform coefficient.
[0314] The decoding apparatus 300 may determine whether an LFNST is applied to perform inverse quantization on the transform coefficients of the current block and whether a scaling list is applied to the current block based on the tree type of the current block (S1520).
[0315] Whether or not the scaling list is applied is determined based on the flag information and the LFNST index value.
[0316] If the tree type of the current block is single tree, the color components of the current block may include a luma component, a first chroma component indicating chroma Cb, and a second chroma component indicating chroma Cr, and if the tree type of the current block is dual tree luma, the current block may include a luma component. If the tree type of the current block is dual tree chroma, the color components of the current block may include a first chroma component and a second chroma component.
[0317] Here, the current block is a transform block that is a transform unit, and if the tree type of the current block is single tree, it may include a transform block for a luma component, a transform block for a first chroma component, and a transform block for a second chroma component. Also, if the tree type of the current block is dual tree luma, it may include a transform block for a luma component, and if the tree type of the current block is dual tree chroma, it may include transform blocks for the first chroma component and the second chroma component.
[0318] For example, if the current block is a single-tree, LFNST can be applied only to the luma component, and if the current block is encoded in a single-tree and the scaling_matrix_for_lfnst_disabled_flag value is 1 and LFNST is applied, the scaling list is not applied to the luma component. However, the scaling list can be applied to the chroma components to which LFNST is not applied.
[0319] In summary, if the flag information for the scaling list indicates that the scaling list is not available and the LFNST index is greater than 0 (i.e., if LFNST is applied), the scaling list is not applied if the tree type of the current block is a single tree and the block is a luma element, and the scaling list can be applied if the tree type of the current block is a single tree and the block is a chroma element.
[0320] For example, if the flag information indicates that a scaling list is not available and the LFNST index is greater than 0, and the tree type of the current block is dual-tree chroma, then the scaling list is not applied to the chroma elements because LFNST is applicable to the current block.
[0321] As an example, if the flag information indicates that a scaling list is not available and the LFNST index is greater than 0, if the tree type of the current block is dual tree luma, LFNST can be applied to the current block, and therefore the scaling list is not applied to the luma element.
[0322] Thereafter, the decoding apparatus derives transform coefficients for the current block from the residual information based on the determination result (S1530).
[0323] The derived transform coefficients may be arranged in a reverse diagonal scan order in 4x4 block units, and the transform coefficients within the 4x4 block may also be arranged in a reverse diagonal scan order, i.e., the transform coefficients on which inverse quantization has been performed are arranged according to the reverse scan order applied in video codecs such as VVC and HEVC.
[0324] The decoding device can derive modified transform coefficients from the transform coefficients based on the LFNST index and the LFNST matrix for LFNST, that is, by applying LFNST (S1540).
[0325] Unlike linear transforms, which separate and transform coefficients in the vertical or horizontal direction, LFNST is a non-separable transform that applies a transform without separating the coefficients in a specific direction. This non-separable transform is a low-frequency non-separable transform that applies a forward transform only to the low-frequency section, not the entire block section.
[0326] The decoding device can derive various parameters for applying LFNST and can determine whether to apply LFNST based on the tree type and size of the current block.
[0327] The decoding device can derive a first variable (variable LfnstDcOnly) indicating whether a significant coefficient exists in a position other than the DC element of the current block, and a second variable (variable LfnstZeroOutSigCoeffFlag) indicating whether the transform coefficient exists in the second section excluding the first section in the upper left corner of the current block.
[0328] These first and second variables are initially set to 1, and if there is a significant coefficient in a position other than the DC element of the current block, the first variable is updated to 0, and if there is a transform coefficient in the second section, the second variable is updated to 0.
[0329] If the first variable is updated to 0 and the second variable remains at 1, LFNST is applied to the current block.
[0330] On the other hand, for luma blocks where the intra sub-partition (ISP) mode is applicable, the LFNST index can be parsed without deriving the variable LfnstDcOnly.
[0331] Specifically, when the ISP mode is applied and the transform skip flag for the luma element, i.e., the value of transform_skip_flag[x0][y0][0], is 0, the LFNST index is signaled regardless of the value of the variable LfnstDcOnly when the tree type of the current block is a single tree or a dual tree for luma.
[0332] On the other hand, for chroma elements to which the ISP mode is not applied, the variable LfnstDcOnly value can be set to 0 depending on the values of transform_skip_flag[x0][y0][1], which is the transform skip flag for the chroma Cb element, and transform_skip_flag[x0][y0][2], which is the transform skip flag for the chroma Cr element. That is, for transform_skip_flag[x0][y0][cIdx], when the cIdx value is 1, the variable LfnstDcOnly value can be set to 0 only when the value of transform_skip_flag[x0][y0][1] is 0, and when the cIdx value is 2, the variable LfnstDcOnly value can be set to 0 only when the value of transform_skip_flag[x0][y0][2] is 0. When the variable LfnstDcOnly value is 0, the decoding device can parse the LFNST index; other LFNST indices are not signaled and can be inferred to be 0.
[0333] The second variable is LfnstZeroOutSigCoeffFlag, which indicates whether zeroing out has been performed when applying LFNST. The second variable is initially set to 1, and is changed to 0 if there is a valid coefficient in the second section.
[0334] The variable LfnstZeroOutSigCoeffFlag is derived to 0 if the index of the sub-block containing the last non-zero coefficient is greater than 0 and the width and height of the transform block are all equal to or greater than 4, or if the position of the last non-zero coefficient within the sub-block containing the last non-zero coefficient is greater than 7 and the size of the transform block is 4x4 or 8x8. A sub-block refers to a 4x4 block used as a coding unit in residual coding and can also be called a Coefficient Group (CG). A sub-block index of 0 refers to the top-left 4x4 sub-block.
[0335] That is, if a non-zero coefficient is derived in a section of a transform block other than the upper left section where LFNST transform coefficients can exist, or if a non-zero coefficient exists away from the eighth position in the scan order for a 4x4 block or an 8x8 block, the variable LfnstZeroOutSigCoeffFlag is set to 0.
[0336] The decoding device can determine an LFNST set including LFNST matrices based on the intra-prediction mode derived from the intra-prediction mode information, and select one of a plurality of LFNST matrices based on the LFNST set and the LFNST index.
[0337] In this case, the same LFNST set and the same LFNST index are applied to the divided sub-partition transform blocks of the current block. That is, since the same intra prediction mode is applied to the sub-partition transform blocks, the LFNST set determined based on the intra prediction mode is also applied to all the sub-partition transform blocks. Furthermore, since the LFNST index is signaled at the encoding device level, the same LFNST matrix is applied to the divided sub-partition transform blocks of the current block.
[0338] Meanwhile, as described above, the transform set is determined by the intra prediction mode of the transform block to be transformed, and inverse LFNST is performed based on one of the transform kernel matrices, i.e., LFNST matrices, included in the transform set indicated by the LFNST index. A matrix applied to inverse LFNST is called an inverse LFNST matrix or LFNST matrix, and such a matrix may be named in any way as long as it has a transform relationship with the matrix used in forward LFNST.
[0339] In one example, the inverse LFNST matrix is a non-square matrix with fewer columns than rows.
[0340] The decoding device may derive residual samples for the current block based on a linear inverse transform on the modified transform coefficients (S1550).
[0341] In this case, the inverse linear transformation is a normal separation transformation, and the above-mentioned MTS may also be used.
[0342] Thereafter, the decoding apparatus 300 may generate reconstructed samples based on the residual samples for the current block and the predicted samples for the current block.
[0343] 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 shown in the drawings are presented as examples, and the technical features of the present specification are not limited to the specific names used in the following drawings.
[0344] FIG. 16 is a flow diagram illustrating the operation of a video encoding device according to one embodiment of this document.
[0345] The steps disclosed in Figure 16 are based on some of the content described above in Figures 4 to 14. Therefore, in Figure 2 and Figures 4 to 14, the description of the specific content that overlaps with the content described above will be omitted or simplified.
[0346] The encoding apparatus 200 according to an embodiment may derive prediction samples for the current block based on the intra prediction mode applied to the current block.
[0347] When ISP is applied to the current block, the encoding device can perform prediction for each sub-partition transform block.
[0348] The encoding device can determine whether to apply ISP coding or ISP mode to the current block, i.e., the coding block, and based on the result of the determination, can determine in which direction the current block will be divided and derive the size and number of sub-blocks to be divided.
[0349] The same intra prediction mode is applied to the divided sub-partition transform blocks of the current block, and the encoding device can derive prediction samples for each sub-partition transform block. That is, the encoding device performs intra prediction sequentially, for example, horizontally or vertically, from left to right, or from top to bottom, depending on the division form of the sub-partition transform blocks. For the leftmost or topmost sub-block, reconstructed pixels of a previously coded coding block are referenced as in a conventional intra prediction method. Also, if each side of a subsequent internal sub-partition transform block is not adjacent to the previous sub-partition transform block, reconstructed pixels of a previously coded adjacent coding block are referenced as in a conventional intra prediction method to derive reference pixels adjacent to the corresponding side.
[0350] The encoding apparatus 200 may derive residual samples for the current block based on the predicted samples (S1610).
[0351] The encoding apparatus 200 may derive transform coefficients for the current block by applying at least one of LFNST and MTS to the residual samples, and may arrange the transform coefficients according to a predetermined scanning order.
[0352] The encoding device may derive transform coefficients for the current block based on a transform process such as a linear transform and / or a quadratic transform on the residual samples. If the tree type of the current block is a single tree and the current block is a luma component, LFNST may be applied, and if the tree type of the current block is a single tree and the current block is a chroma component, LFNST may not be applied (S1620).
[0353] The primary transform can be performed via multiple transform kernels as per MTS, where the transform kernel is selected based on the intra prediction mode.
[0354] The encoding apparatus 200 may determine whether to perform a quadratic transform or a non-separable transform, specifically, an LFNST, on the transform coefficients for the current block, and may apply the LFNST to the transform coefficients to derive modified transform coefficients.
[0355] Unlike linear transforms, which separate and transform the coefficients to be transformed in the vertical or horizontal direction, LFNST is a non-separable transform that applies a transform without separating the coefficients in a specific direction. This non-separable transform is a low-frequency non-separable transform that applies a transform only to the low-frequency section, not the entire target block.
[0356] The encoding device can derive various variables to apply LFNST, and can determine whether to apply LFNST based on the tree type and size of the current block.
[0357] The encoding device can derive a first variable (variable LfnstDcOnly) indicating whether a significant coefficient exists in a position other than the DC component of the current block, and a second variable (variable LfnstZeroOutSigCoeffFlag) indicating whether the transform coefficient exists in a second section excluding the first section in the upper left corner of the current block.
[0358] These first and second variables are initially set to 1, and if there is a significant coefficient in a position other than the DC element of the current block, the first variable is updated to 0, and if there is a transform coefficient in the second section, the second variable is updated to 0.
[0359] The first variable is updated to 0, and if the second variable remains at 1, LFNST is applied to the current block.
[0360] On the other hand, for luma blocks to which the intra sub-partition (ISP) mode is applicable, LFNST can be applied without deriving the variable LfnstDcOnly.
[0361] Specifically, when the ISP mode is applied and the transform skip flag for the luma element, i.e., the value of transform_skip_flag[x0][y0][0], is 0, LFNST is applied regardless of the value of the variable LfnstDcOnly when the tree type of the current block is a single tree or a dual tree for luma.
[0362] On the other hand, for chroma elements to which the ISP mode is not applied, the variable LfnstDcOnly value can be set to 0 depending on the values of transform_skip_flag[x0][y0][1], which is the transform skip flag for the chroma Cb element, and transform_skip_flag[x0][y0][2], which is the transform skip flag for the chroma Cr element. That is, for transform_skip_flag[x0][y0][cIdx], when the cIdx value is 1, the variable LfnstDcOnly value can be set to 0 only when the value of transform_skip_flag[x0][y0][1] is 0, and when the cIdx value is 2, the variable LfnstDcOnly value can be set to 0 only when the value of transform_skip_flag[x0][y0][2] is 0. When the variable LfnstDcOnly value is 0, the encoding device can apply LFNST, but may not apply LFNST in other cases.
[0363] The second variable is LfnstZeroOutSigCoeffFlag, which indicates whether zeroing out has been performed when applying LFNST. The second variable is initially set to 1, and is changed to 0 if there is a valid coefficient in the second section.
[0364] The variable LfnstZeroOutSigCoeffFlag is derived to 0 if the index of the sub-block containing the last non-zero coefficient is greater than 0 and the width and height of the transform block are all equal to or greater than 4, or if the position of the last non-zero coefficient within the sub-block containing the last non-zero coefficient is greater than 7 and the position of the transform block is 4x4 or 8x8. A sub-block refers to a 4x4 block used as a coding unit in residual coding and can also be called a Coefficient Group (CG). A sub-block index of 0 refers to the top-left 4x4 sub-block.
[0365] That is, in a transform block, if a non-zero coefficient is derived in a section other than the upper left section where an LFNST transform coefficient can exist, or if a non-zero coefficient exists away from the eighth position in the scan order for a 4x4 block or an 8x8 block, the variable LfnstZeroOutSigCoeffFlag is set to 0.
[0366] The encoding device can determine an LFNST set including LFNST matrices based on the intra-prediction mode derived from the intra-prediction mode information, and select one of the multiple LFNST matrices.
[0367] In this case, the same LFNST set and the same LFNST index are applied to the divided sub-partition transform blocks of the current block. That is, since the same intra prediction mode is applied to the sub-partition transform blocks, the LFNST set determined based on the intra prediction mode is also applied to all the sub-partition transform blocks. Furthermore, since the LFNST index is signaled at the encoding device level, the same LFNST matrix is applied to the divided sub-partition transform blocks of the current block.
[0368] Meanwhile, as described above, the transform set is determined depending on the intra prediction mode of the transform block to be transformed, and LFNST is performed based on one of the transform kernel matrices included in the LFNST transform set, i.e., the LFNST matrix. A matrix applied to LFNST is called an LFNST matrix, and the name of such a matrix does not matter as long as it has a transform relationship with the matrix used in backward LFNST.
[0369] In one example, an LFNST matrix is a non-square matrix with fewer rows than columns.
[0370] The encoding device may determine whether LFNST is performed in the conversion process and whether a scaling list is applied to the current block based on the tree type of the current block (S1630).
[0371] The scaling list is a matrix that specifies a specific weight value for each position of a transform coefficient in a transform block, and enables inverse quantization or quantization to be performed by multiplying the corresponding weight value for each transform coefficient, and applies a difference depending on the importance of the transform coefficient.
[0372] For example, the encoding device may not apply a scaling list if the tree type of the current block is a single tree and is a luma component, and may apply a scaling list if the tree type of the current block is a single tree and is a chroma component.
[0373] If the tree type of the current block is single tree, the color components of the current block may include a luma component, a first chroma component indicating chroma Cb, and a second chroma component indicating chroma Cr, and if the tree type of the current block is dual tree luma, the current block may include a luma component. If the tree type of the current block is dual tree chroma, the color components of the current block may include a first chroma component and a second chroma component.
[0374] Here, the current block is a transform block that is a transform unit, and if the tree type of the current block is single tree, it may include a transform block for a luma component, a transform block for a first chroma component, and a transform block for a second chroma component. Also, if the tree type of the current block is dual tree luma, it may include a transform block for a luma component, and if the tree type of the current block is dual tree chroma, it may include transform blocks for the first chroma component and the second chroma component.
[0375] For example, if the current block is a single-tree block, the encoding device may apply LFNST only to the luma component, and if LFNST is applied, the encoding device may not apply a scaling list to the luma component, but may apply a scaling list to the chroma component to which LFNST is not applied.
[0376] In summary, if the LFNST index is greater than 0 (i.e., if LFNST is applied), the encoding device may not apply a scaling list if the tree type of the current block is a single tree and the current block is a luma component, and may apply a scaling list if the tree type of the current block is a single tree and the current block is a chroma component.
[0377] For example, if the LFNST index is greater than 0, the encoding device does not apply the scaling list to the chroma elements if the tree type of the current block is dual tree chroma, since LFNST is applicable to the current block.
[0378] For example, if the LFNST index is greater than 0, the encoding device does not apply a scaling list to the luma component if the tree type of the current block is dual tree luma, since LFNST can be applied to the current block.
[0379] The encoding device may quantize the transform coefficients based on the determination, i.e., whether or not the scaling list is applied to the current block (S1640).
[0380] That is, the encoding device can quantize transform coefficients using a scaling list for transform blocks to which LFNST is not applied, and can quantize transform coefficients without using a scaling list for transform blocks to which LFNST is applied.
[0381] The encoding apparatus may encode and output the residual information and flag information indicating the availability of the scaling list when LFNST is performed (S1650).
[0382] The flag information indicating the availability of the scaling list when LFNST is executed can be indicated by scaling_matrix_for_lfnst_disabled_flag or sps_scaling_matrix_for_lfnst_disabled_flag, and is signaled in the sequence parameter set. If this flag value is 1, the scaling list is not applied when LFNST is applied, and if it is 0, the scaling list can be applied when LFNST is applied.
[0383] If the LFNST index is greater than 0 and the current block is a single tree, the encoding device can encode the flag value as 1 because LFNST is applied to the luma component.
[0384] However, when the LFNST index is greater than 0 and the current block is a single tree, the encoding device can configure the image information so that the scaling list is applied to the chroma elements since the LFNST is not applied to the chroma elements.
[0385] If the LFNST index is greater than 0 and the tree type of the current block is dual-tree chroma, the encoding device can encode the flag value to 1 to prevent the scaling list from being applied to the chroma elements since LFNST can be applied to the current block.
[0386] For example, if the LFNST index is greater than 0 and the tree type of the current block is dual tree luma, the encoding device can encode the flag value to 1 so that the scaling list is not applied to the luma element because LFNST can be applied to the current block.
[0387] The encoding device may perform quantization based on the modified transform coefficients for the current block to derive quantized transform coefficients and encode the LFNST index.
[0388] The encoding device may generate residual information including information on quantized transform coefficients. The residual information may include the above-described transform-related information / syntax elements. The encoding device may encode image / video information including the residual information and output it in the form of a bitstream.
[0389] More specifically, the encoding apparatus 100 may generate information about the quantized transform coefficients and encode the generated information about the quantized transform coefficients.
[0390] The LFNST index syntax element according to this embodiment may indicate whether (inverse) LFNST is applied and which of the LFNST matrices is included in the LFNST set. If the LFNST set includes two transformation kernel matrices, the LFNST index syntax element may have three values.
[0391] For example, if the partitioning tree structure for the current block is a dual tree type, an LFNST index can be encoded for each of the luma block and the chroma block.
[0392] According to one embodiment, the syntax element value for the transform index can be derived as 0, which indicates that no (inverse) LFNST is applied to the current block, 1, which indicates the first LFNST matrix among the LFNST matrices, or 2, which indicates the second LFNST matrix among the LFNST matrices.
[0393] 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 also be referred to as coefficients or residual coefficients, or may still be referred to as transform coefficients for uniformity of representation.
[0394] Also, in this document, quantized transform coefficients and transform coefficients may be referred to as transform coefficients and scaled transform coefficients, respectively. In this case, residual information may include information about transform coefficients, and the information about the transform coefficients may be signaled via residual coding syntax. Transform coefficients may be derived based on the residual information (or information about the transform coefficients), and scaled transform coefficients may be derived through an inverse transform (scaling) of the transform coefficients. Residual samples may be derived based on an inverse transform (transform) of the scaled transform coefficients. This may also be applied / expressed in other parts of this document.
[0395] In the above-described 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 some steps may occur in a different order or simultaneously with other steps than those described above. Furthermore, those skilled in the art will understand that the steps shown in the flowchart are not exclusive, and other steps may be included, or one or more steps in the flowchart may be deleted without affecting the scope of this document.
[0396] The above-described method according to the present document may be implemented in the form of software, and the encoding device and / or decoding device according to the present document may be included in an image processing device such as a TV, a computer, a smartphone, a set-top box, or a display device.
[0397] In this document, when an embodiment is implemented in software, the method described above may be implemented with modules (processes, functions, etc.) that perform the functions described above. The modules may be stored in 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, a memory card, a storage medium, and / or other storage devices. That is, the embodiments described herein may be implemented and executed on a processor, microprocessor, controller, or chip. For example, the functional units illustrated in each figure may be implemented and executed on a computer, processor, microprocessor, controller, or chip.
[0398] In addition, the decoding device and encoding device to which this document is applied may be included in, and may be used to process video signals or data signals, 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 interaction device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camcorder, a customized video (VoD) service providing device, an over-the-top (OTT) video device, an internet streaming service providing device, a three-dimensional (3D) video device, an image telephone video device, a medical video device, etc. For example, over-the-top (OTT) video devices may include a game console, a Blu-ray player, an internet access TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), etc.
[0399] Furthermore, the processing method to which this document is applied may be produced in the form of a computer-executable program and stored on a computer-readable recording medium. Multimedia data having a data structure according to this document may also be stored on a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices on 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 media embodied in the form of a carrier wave (e.g., transmission via the Internet). A bitstream generated by the encoding method may be stored on a computer-readable recording medium or transmitted via a wired or wireless communication network. The embodiments of this document may also be embodied in a computer program product using program code, which can be executed on a computer according to the embodiments of this document. The program code may be stored on a computer-readable carrier.
[0400] FIG. 17 exemplarily shows a structural diagram of a content streaming system to which this document applies.
[0401] Furthermore, the content streaming system to which this document applies can broadly include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
[0402] The encoding server compresses content input from a multimedia input device such as a smartphone, camera, camcorder, etc. 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, camcorder, etc. directly generates a bitstream, the encoding server may be omitted. The bitstream may be generated by an encoding method or a bitstream generation method to which this document applies, and the streaming server may temporarily store the bitstream during the process of transmitting or receiving the bitstream.
[0403] 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 an intermediary that informs the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, which then transmits the multimedia data to the user. The content streaming system may include a separate control server, which controls commands and responses between devices in the content streaming system.
[0404] The streaming server may receive content from a media storage and / or an encoding server. For example, if content is received from the encoding server, the content may be received in real time. In this case, the streaming server may store the bitstream for a certain period of time to provide a smooth streaming service.
[0405] Examples of the user devices include mobile phones, smartphones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, and head mounted displays (HMDs)), digital TVs, desktop computers, digital signage, etc. Each server in the content streaming system can be operated as a distributed server, and in this case, data received by each server can be processed in a distributed manner.
[0406] The claims described herein may be combined in various ways. For example, technical features of method claims herein may be combined to be embodied as an apparatus, and technical features of apparatus claims herein may be combined to be embodied as a method. Furthermore, technical features of method claims herein and technical features of apparatus claims herein may be combined to be embodied as an apparatus, and technical features of method claims herein and technical features of apparatus claims herein may be combined to be embodied as a method.
Claims
1. 1. An image decoding method performed by a decoding device, comprising: deriving transform coefficients for the current block based on residual information received from the bitstream; deriving residual samples for the current block based on an inverse transform on the transform coefficients; The step of deriving the transform coefficients comprises: deriving quantized transform coefficients for the current block based on the residual information; and dequantizing the quantized transform coefficients to derive the transform coefficients; The quantized transform coefficients are dequantized based on whether a scaling list is applied to the current block; determining whether the scaling list is applied to the current block based on a low frequency non-separable transform (LFNST) index of the current block and a tree type of the current block; applying the scaling list to the chroma components of the current block based on the tree type of the current block being a single tree and the color components of the current block being chroma components; The method for decoding an image, wherein the scaling list is not applied to the chroma elements of the current block based on the tree type of the current block being dual tree chroma and the LFNST index being greater than 0.
2. 2. The image decoding method of claim 1, wherein LFNST is not applied to the chroma elements of the current block based on the tree type of the current block being the single tree and the color components of the current block being the chroma elements.
3. 2. The image decoding method of claim 1, wherein the scaling list is not applied to the luma component of the current block based on the tree type of the current block being the single tree and the LFNST index being greater than 0.
4. The image decoding method of claim 1 , further comprising the step of receiving flag information indicating whether the scaling list is available for a block to which LFNST is applied.
5. 5. The image decoding method of claim 4, wherein the scaling list is not applied to the luma component of the current block based on the flag information indicating that the scaling list is not available, the LFNST index being greater than 0, and the tree type of the current block being the single tree.
6. 5. The image decoding method of claim 4, wherein the scaling list is not applied to the chroma elements of the current block based on the flag information indicating that the scaling list is unavailable, the LFNST index being greater than 0, and the tree type of the current block being the dual tree chroma.
7. 5. The image decoding method of claim 4, wherein the scaling list is not applied to the luma component of the current block based on the flag information indicating that the scaling list is not available, the LFNST index is greater than 0, and the tree type of the current block is dual tree luma.
8. 1. An image encoding method performed by an image encoding device, comprising: deriving transform coefficients for the current block from residual samples for the current block based on a transform process; quantizing the transform coefficients based on whether a scaling list is applied to the current block; generating residual information including information about the quantized transform coefficients; encoding the image information including the residual information; determining whether the scaling list is applied to the current block based on a low frequency non-separable transform (LFNST) index of the current block and a tree type of the current block; applying the scaling list to the chroma components of the current block based on the tree type of the current block being a single tree and the color components of the current block being chroma components; The method for encoding images, wherein the scaling list is not applied to the chroma elements of the current block based on the tree type of the current block being dual tree chroma and the LFNST index being greater than 0.
9. 9. The image encoding method of claim 8, wherein the LFNST is not performed on the chroma components of the current block based on the tree type of the current block being the single tree and the color components of the current block being the chroma components.
10. 9. The image encoding method of claim 8, wherein the scaling list is not applied to the luma component of the current block based on the tree type of the current block being the single tree and the LFNST index being greater than 0.
11. 9. The image encoding method of claim 8, wherein the scaling list is not applied to the luma component of the current block based on the tree type of the current block being dual tree luma and the LFNST index being greater than 0.
12. The image encoding method of claim 8 , further comprising the step of encoding flag information indicating whether the scaling list is available for the block to which the LFNST is applied.
13. The image encoding method of claim 8 , wherein the current block comprises a transform block.
14. 1. A method for transmitting data relating to image information, comprising: generating a bitstream relating to the image information, the bitstream comprising: deriving transform coefficients for the current block from residual samples for the current block based on a transform process; quantizing the transform coefficients based on whether a scaling list is applied to the current block; generating residual information including information about the quantized transform coefficients; encoding the image information including the residual information; transmitting the data including the bitstream; determining whether the scaling list is applied to the current block based on a low frequency non-separable transform (LFNST) index of the current block and a tree type of the current block; applying the scaling list to the chroma components of the current block based on the tree type of the current block being a single tree and the color components of the current block being chroma components; The method of claim 1, wherein the scaling list is not applied to the chroma elements of the current block based on the tree type of the current block being dual tree chroma and the LFNST index being greater than 0.
Citation Information
Cited By
Transform-based image coding method, and device for same
JP2025068028A
Image coding method and apparatus based on conversion
JP7869355B2