Secondary transformation based video coding method and device thereof

By adopting RST and multi-transformation technology in video encoding, the problem of low compression and transmission efficiency of high-resolution and high-quality video data is solved, and more efficient encoding performance and cost reduction are achieved.

JP7654870B2Active Publication Date: 2025-04-01LG ELECTRONICS INC
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2024078414
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2018-12-06
Filing Date
2024-05-14
Publication Date
2025-04-01
Estimated Expiration
2039-12-05

AI Technical Summary

Technical Problem

The prior art is difficult to efficiently compress and transmit high-resolution, high-quality video data, especially in scenarios with different image characteristics such as Immersive Media and game videos.

Method used

The video encoding method based on RST (Reduced Secondary Transform) is adopted to improve the encoding efficiency through inverse RST and multi-transform technology, and the multi-transform kernel matrix and non-segmentable secondary transformation are used during the encoding process to optimize the encoding performance.

Benefits of technology

Improve the efficiency of video encoding, especially in the compression and transmission of high-resolution and high-quality video data, reducing storage and transmission costs while improving encoding performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007654870000037
    Figure 0007654870000037
  • Figure 0007654870000038
    Figure 0007654870000038
  • Figure 0007654870000039
    Figure 0007654870000039
Patent Text Reader

Abstract

To provide a method and an apparatus for increasing image / video compression efficiency, increasing the efficiency of a secondary transform, and increasing image coding efficiency.SOLUTION: A method includes the steps of: deriving transform coefficients through inverse quantization based on quantized transform coefficients for a target block; deriving modified transform coefficients based on an inverse RST (reduced secondary transform) for the transform coefficients; and generating a restoration picture based on residual samples for the target block, based on an inverse primary transform for the modified transform coefficients. The inverse RST is performed based on; transform sets determined by a mapping relation according to an intra prediction mode applied to the target block; and a transform kernel matrix selected from among two transform kernel matrices included in each of the transform sets, and is performed based on: whether the inverse RST is applied; and a transform index for indicating any one of the transform kernel matrices included in the transform sets.SELECTED DRAWING: Figure 9
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This document relates to video coding technology, and more particularly to a transform-based video coding method and apparatus in a video coding system. [Background technology]

[0002] Recently, the demand for high-resolution, high-quality images / videos such as 4K or 8K or higher UHD (Ultra High Definition) images / videos is increasing in various fields. As the image / video data has higher resolution and quality, the amount of information or bits transmitted relatively increases compared to conventional image / video data, so that when the image data is transmitted using a medium such as a conventional wired or wireless broadband line or when the image / video data is stored using an existing storage medium, the transmission cost and storage cost increase.

[0003] In addition, interest and demand for immersive media such as virtual reality (VR), artificial reality (AR) content and holograms has been increasing recently, and the broadcast of images / videos with different image characteristics from real images, such as game images, is increasing.

[0004] Therefore, in order to effectively compress, transmit, store, and play back high-resolution, high-quality image / video information having the above-mentioned various characteristics, a highly efficient image / video compression technology is required. Summary of the Invention [Problem to be solved by the invention]

[0005] The technical problem of this document is to provide a method and apparatus for improving video coding efficiency.

[0006] Another technical problem of this document is to provide a method and apparatus for increasing the conversion efficiency.

[0007] Another technical problem of this document is to provide a method and apparatus for improving the efficiency of secondary transform through coding of transform indexes.

[0008] Another technical problem of this document is to provide a video coding method and apparatus based on RST (reduced secondary transform).

[0009] Another technical object of the present invention is to provide a video coding method and apparatus based on a transform set, which can increase coding efficiency. [Means for solving the problem]

[0010] According to an embodiment of the present document, there is provided a video decoding method performed by a decoding device, the method including the steps of: deriving quantized transform coefficients for a current block from a bitstream; deriving transform coefficients through inverse quantization based on the quantized transform coefficients for the current block; deriving modified transform coefficients based on an inverse reduced secondary transform (RST) for the transform coefficients; deriving residual samples for the current block based on an inverse primary transform for the modified transform coefficients; and generating a reconstructed picture based on the residual samples for the current block, the inverse RST being performed based on a transform set determined based on a mapping relationship according to an intra prediction mode applied to the current block and a selected transform kernel matrix from two transform kernel matrices included in each of the transform sets, and the inverse RST may be performed based on a transform index indicating whether the inverse RST is applied and one of the transform kernel matrices included in the transform set.

[0011] According to another embodiment of the present document, a decoding device for performing video decoding is provided, the decoding device includes an entropy decoding unit for deriving quantized transform coefficients and information on prediction for a current block from a bitstream, a prediction unit for generating a predicted sample for the current block based on the information on the prediction, an inverse quantization unit for deriving transform coefficients through inverse quantization based on the quantized transform coefficients for the current block, an inverse transform unit including an inverse RST unit for deriving modified transform coefficients based on an inverse reduced secondary transform (RST) for the transform coefficients, an inverse linear transform unit for deriving residual samples for the current block based on an inverse linear transform for the modified transform coefficients, and an adder for generating reconstructed samples based on the residual samples and the predicted samples, the inverse RST being performed based on a transform set determined based on a mapping relationship according to an intra prediction mode applied to the current block and a transform kernel matrix selected from two transform kernel matrices included in each of the transform sets, and based on a transform index indicating whether the inverse RST is applied and one of the transform kernel matrices included in the transform set.

[0012] According to an embodiment of the present document, there is provided a video encoding method performed by an encoding apparatus, the method comprising the steps of: deriving a prediction sample based on an intra prediction mode applied to a current block; deriving a residual sample for the current block based on the prediction sample; deriving a transform coefficient for the current block based on a primary transform of the residual sample; deriving modified transform coefficients based on a reduced secondary transform (RST) for the transform coefficients, the inverse RST being performed based on a transform set determined based on a mapping relationship according to an intra prediction mode applied to the current block and a transform kernel matrix selected from two transform kernel matrices included in each of the transform sets; deriving quantized transform coefficients by quantizing the modified transform coefficients; and generating a transform index indicating whether the RST is applied and one of the transform kernel matrices included in the transform set.

[0013] According to yet another embodiment of the present document, a digital storage medium may be provided on which video data including encoded video information generated by a video encoding method performed by an encoding device is stored.

[0014] According to yet another embodiment of the present document, a digital storage medium may be provided on which video data including encoded video information that causes a decoding device to perform the video decoding method may be stored. Effect of the Invention

[0015] This document can improve the efficiency of image / video compression in general.

[0016] According to this document, the efficiency of the secondary transformation can be increased through coding of the transformation index.

[0017] According to this document, video coding can be performed based on a transform set to improve the efficiency of video coding. [Brief description of the drawings]

[0018] [Figure 1] 1 illustrates generally an example of a video / image coding system to which this document may be applied; [Diagram 2] 1 is a diagram illustrating the configuration of a video / image encoding device to which this document can be applied. [Diagram 3] A diagram illustrating the configuration of a video / image decoding device to which this document can be applied. [Figure 4] 1 illustrates a schematic of a multiple conversion technique according to one embodiment of the present document; [Diagram 5] 65 intra-directional modes of prediction directions are shown exemplarily. [Figure 6] FIG. 1 is a diagram for explaining a RST according to one embodiment of this document. [Figure 7] FIG. 1 illustrates a scanning order of transform coefficients according to one embodiment of the present document. [Figure 8] 1 is a flowchart illustrating a reverse RST process according to one embodiment of the present document. [Figure 9] 1 is a flowchart illustrating the operation of a video decoding device according to an embodiment of the present document. [Figure 10] 1 is a control flow diagram illustrating a reverse RST according to one embodiment of the present document. [Figure 11] 1 is a flowchart illustrating the operation of a video encoding device according to an embodiment of the present document. [Figure 12] 1 is a control flowchart for explaining RST according to one embodiment of the present document. [Figure 13] 1 exemplarily illustrates a structural diagram of a content streaming system to which this document applies; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0019] Since this document can be modified in various ways and can have various embodiments, a specific embodiment will be illustrated in the drawings and described in detail. However, this is not intended to limit this document to a specific embodiment. Commonly used terms in this specification are used only to describe a specific embodiment and are not intended to limit the technical ideas of this document. A singular expression includes a plural expression unless the context clearly indicates otherwise. In this specification, the terms "include" or "have" are intended to specify the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and should be understood not to preclude the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.

[0020] Meanwhile, each component in the drawings described in this document is shown independently for the convenience of explaining the different characteristic functions, and does not mean that each component is realized by different hardware or software. For example, two or more components among the components may be combined to form one component, and one component may be divided into multiple components. An embodiment in which each component is integrated and / or separated is also included in the scope of the rights of this document as long as it does not deviate from the essence of this document.

[0021] Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the accompanying drawings. In the following, the same components in the drawings are designated by the same reference numerals, and duplicated descriptions of the same components will be omitted.

[0022] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document may be related to the Versatile Video Coding (VVC) standard (ITU-T Rec. H.266), next-generation video / image coding standards beyond VVC, or other video coding related standards (e.g., the High Efficiency Video Coding (HEVC) standard (ITU-T Rec. H.265), the essential video coding (EVC) standard, the AVS2 standard, etc.).

[0023] Various embodiments relating to video / image coding are presented herein and, unless otherwise stated, the embodiments may be used in combination with each other.

[0024] In this document, video may refer to a collection of a series of images over time. A picture generally refers to a unit that shows one image at a specific time, and a slice / tile is a unit that constitutes a part of a picture in coding. A slice / tile may contain one or more coding tree units (CTUs). One picture may be composed of one or more slices / tiles. One picture may be composed of one or more tile groups. One tile group may contain one or more tiles.

[0025] A pixel or a pel may refer to the smallest unit constituting one picture (or image). A term corresponding to a pixel may be "sample." A sample may generally refer to a pixel or a pixel value, may refer to only a pixel / pixel value of a luma component, or may refer to only a pixel / pixel value of a chroma component. Alternatively, a sample may refer to a pixel value in the spatial domain, or may refer to a transform coefficient in the frequency domain when such a pixel value is transformed into the frequency domain.

[0026] A unit may indicate a basic unit of image processing. A unit may include at least one of a specific region of a picture and information about the corresponding region. One unit may include one luma block and two chroma (e.g., cb, cr) blocks. The unit may be used in combination with terms such as block or area, depending on the case. In a general case, an MxN block may include a set (or array) of samples or transform coefficients consisting of M columns and N rows.

[0027] In this document, the term “ / ” 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.”

[0028] Further, in this 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.”

[0029] FIG. 1 illustrates a schematic diagram of an example video / image coding system to which this document may be applied.

[0030] 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.

[0031] The source device may include a video source, an encoding device, and a sending unit. The receiving device may include a receiving unit, a decoding device, and a renderer. The encoding device may be referred to as a video / video encoding device, and the decoding device may be referred to as a video / video decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display unit, which may be configured as a separate device or an external component.

[0032] A video source may acquire video / video through a video / video capture, synthesis, or generation process, etc. A video source may include a video / video capture device and / or a video / video generation device. A video / video capture device may include, for example, one or more cameras, a video / video archive containing previously captured video / video, etc. A video / video generation device may include, for example, a computer, a tablet, a smartphone, etc., and may (electronically) generate video / video. For example, a virtual video / video may be generated via a computer, etc., in which case the video / video capture process may be substituted as the process by which the associated data is generated.

[0033] An encoding device can encode input video / image. The encoding device can perform a series of procedures such as prediction, transformation, quantization, etc. for compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.

[0034] The transmitting unit may transmit the encoded video / image information or data output in the form of a bitstream to a receiving unit of a receiving device via a digital storage medium or a network in the form of a file or streaming. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitting unit may include an element for generating a media file through a predetermined file format and may include an element for transmission via a broadcasting / communication network. The receiving unit may receive / extract the bitstream and transmit it to a decoding device.

[0035] The decoding device can decode the video / image by performing a series of procedures such as inverse quantization, inverse transformation, prediction, etc., which correspond to the operations of the encoding device.

[0036] The renderer can render the decoded video / image. The rendered video / image can be displayed via a display unit.

[0037] 2 is a diagram for explaining the configuration of a video / image encoding device to which this document can be applied. Hereinafter, the video encoding device may include an image encoding device.

[0038] Referring to FIG. 2, the encoding apparatus 200 may include an image partitioner 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter predictor 221 and an intra predictor 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 may further include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstructed block generator. The image division unit 210, the prediction unit 220, the residual processing unit 230, the entropy encoding unit 240, the addition unit 250, and the filtering unit 260 may be configured by one or more hardware components (e.g., an encoder chipset or a processor) according to an embodiment. Also, the memory 270 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware components may further include the memory 270 as an internal / external component.

[0039] 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) according to a quad-tree binary-tree ternary-tree (QTBTTT) structure. For example, one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad-tree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quad-tree structure may be applied first, and the binary tree structure and / or the ternary structure may be applied later. Alternatively, the binary tree structure may be applied first. The coding procedure according to this document is 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 immediately based on coding efficiency according to image characteristics, or the coding unit may be recursively divided into coding units of lower depths as necessary, and the coding unit of the optimal size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later. As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may each be divided or partitioned from the final coding unit described above.The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.

[0040] The unit may be used in combination with terms such as block or area, depending on the case. In a general case, an MxN block may represent a set of samples or transform coefficients consisting of M columns and N rows. A sample may generally represent a pixel or a pixel value, may represent only a pixel / pixel value of a luma component, or may represent only a pixel / pixel value of a chroma component. A sample may be used as a term corresponding to a pixel or pel of one picture (or image).

[0041] The subtraction unit 231 may subtract a prediction signal (predicted block, prediction sample, or prediction sample array) output from the prediction unit 220 from an input image signal (original block, original sample, or original sample array) to generate a residual signal (residual block, residual sample, or residual sample array), and the generated residual signal is transmitted to the conversion unit 232. The prediction unit 220 may perform prediction on a block to be processed (hereinafter, referred to as a current block) and generate a predicted block including a prediction sample for the current block. The prediction unit 220 may determine whether intra prediction or inter prediction is applied in units of the current block or CU. The prediction unit may generate various information related to prediction, such as prediction mode information, and transmit the information to the entropy encoding unit 240, as described later in the description of each prediction mode. The prediction information may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.

[0042] The intra prediction unit 222 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from the current block depending on the prediction mode. Prediction modes in intra prediction may include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes may include, for example, a DC mode and a planar mode. The directional modes may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the fineness of the prediction direction. However, this is merely an example, and more or less directional prediction modes may be used depending on the settings. The intra prediction unit 222 may also determine a prediction mode to be applied to the current block using prediction modes applied to neighboring blocks.

[0043] The inter prediction unit 221 may derive a predicted block for a current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of a block, a sub-block, or a sample based on the correlation of motion information between a neighboring block and a 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 (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring block may include a spatial neighboring block present in the current picture and a temporal neighboring block present in a reference picture. A reference picture including the reference block and a reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be called a collocated reference block, a collocated CU (colCU), etc., and the reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, the inter prediction unit 221 may generate information indicating which candidate is used to derive a motion vector and / or a reference picture index of the current block by forming a candidate list of motion information based on neighboring blocks. Inter prediction is performed based on various prediction modes, and for example, in the case of a skip mode and a merge mode, the inter prediction unit 221 may use motion information of neighboring blocks as motion information of the current block. In the case of the skip mode, unlike the merge mode, a residual signal may not be transmitted.In the case of motion vector prediction (MVP) mode, the motion vector of the current block can be indicated by using the motion vector of a neighboring block as a motion vector predictor and signaling the motion vector difference.

[0044] The prediction unit 220 may generate a prediction signal based on various prediction methods described below. For example, the prediction unit may apply intra prediction or inter prediction for prediction of one block, as well as intra prediction and inter prediction simultaneously. This may be called combined inter and intra prediction (CIIP). The prediction unit may also perform intra block copy (IBC) for prediction of a block. The intra block copy may be used for coding of content images / videos such as games, for example, as in screen content coding (SCC). IBC is basically performed in a current picture, but is similar to inter prediction in that it derives a reference block in the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document.

[0045] The prediction signal generated through the inter prediction unit 221 and / or the intra prediction unit 222 may be used to generate a restored signal or may be used to generate a residual signal. The transform unit 232 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include a discrete cosine transform (DCT), a discrete sine transform (DST), a graph-based transform (GBT), or a conditionally non-linear transform (CNT). Here, GBT refers to a transform obtained from a graph when the relationship information between pixels is expressed as a graph. CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process may be applied to pixel blocks having the same square size, or may be applied to non-square variable-sized blocks.

[0046] The quantization unit 233 quantizes the transform coefficients and transmits the quantized transform coefficients to the entropy encoding unit 240, and the entropy encoding unit 240 may encode the quantized signal (information on the quantized transform coefficients) and output the quantized signal as a bitstream. The information on the quantized transform coefficients may be called 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 may generate information on the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. 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 reconstruction (e.g., values ​​of syntax elements, etc.) together with or separately from the quantized transform coefficients. The encoded information (e.g., encoded video / image information) may be transmitted or stored in the form of a bitstream in network abstraction layer (NAL) unit 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, which will be described later in this document, may be encoded through the above-mentioned encoding procedures and included in the bitstream.The bitstream may be transmitted via a network or may be stored in a digital storage medium, where the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media such as a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitting unit (not shown) for transmitting the signal output from the entropy encoding unit 240 and / or a storing unit (not shown) for storing the signal may be configured as an internal / external element of the encoding apparatus 200, or the transmitting unit may be included in the entropy encoding unit 240.

[0047] 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 block to be processed, such as when a skip mode is applied, the predicted block may be used as the reconstructed block. The generated reconstructed signal may be used for intra prediction of the next block to be processed in the current picture, and may also be used for inter prediction of the next picture after filtering as described below.

[0048] Meanwhile, luma mapping with chroma scaling (LMCS) may be applied during picture encoding and / or reconstruction.

[0049] The filtering unit 260 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 260 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may store the modified reconstructed picture in the memory 270, specifically, in the DPB of the memory 270. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset (SAO), an adaptive loop filter, a bilateral filter, etc. The filtering unit 260 may generate various information related to filtering and transmit it to the entropy encoding unit 290, as will be described later in relation to each filtering method. The information related to filtering may be encoded by the entropy encoding unit 290 and output in the form of a bitstream.

[0050] The modified reconstructed picture transmitted to the memory 270 can be used as a reference picture in the inter prediction unit 280. When inter prediction is applied through this, the encoding apparatus can avoid a mismatch in prediction between the encoding apparatus 200 and the decoding apparatus, and can also improve encoding efficiency.

[0051] The DPB of the memory 270 may store the modified reconstructed picture to be used as a reference picture in the inter prediction unit 221. The memory 270 may store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 221 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 270 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 222.

[0052] FIG. 3 is a diagram illustrating the schematic configuration of a video / image decoding device to which this document can be applied.

[0053] 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 331 and an intra predictor 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 321. The entropy decoding unit 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be configured as one hardware component (e.g., a decoder chipset or processor) according to an embodiment. Also, the memory 360 may include a decoded picture buffer (DPB) and may be configured as a digital storage medium. The hardware components may further include memory 360 as an internal / external component.

[0054] When a bitstream including video / image information is input, the decoding apparatus 300 can restore an image corresponding to the process in which the video / image information is processed by the encoding apparatus of FIG. 2. For example, the decoding apparatus 300 can derive units / blocks based on information on block division acquired from the bitstream. The decoding apparatus 300 can perform decoding using a processing unit applied in the encoding apparatus. Thus, the processing unit for decoding may be, for example, a coding unit, and the coding unit may be divided according to a coding tree unit or a quad tree structure, a binary tree structure, and / or a ternary tree structure from a maximum coding unit. One or more transform units may be derived from the coding unit. Also, the restored image signal decoded and output by the decoding apparatus 300 can be reproduced by a reproduction device.

[0055] The decoding apparatus 300 may receive a signal output from the encoding apparatus of FIG. 2 in the form of a bitstream, and may decode the received signal 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) required 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 further include general constraint information. The decoding apparatus may further decode pictures based on information on the parameter set and / or the general constraint information. Signaling / received information and / or syntax elements described later in this document may be decoded via the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 may decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output values ​​of syntax elements required for image restoration and quantized values ​​of transform coefficients related to residuals. More specifically, the CABAC entropy decoding method may receive bins corresponding to each syntax element in a bitstream, determine a context model using information on the syntax element to be decoded and decoding information on neighboring and target blocks to be decoded, or information on symbols / bins decoded in a previous step, predict the occurrence probability of bins according to the determined context model, and perform arithmetic decoding of the bins to generate symbols corresponding to the values ​​of each syntax element.In this case, the CABAC entropy decoding method may update the context model using information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. Prediction information from the information decoded by the entropy decoding unit 310 may be provided to the prediction unit 330, and information on the residual entropy-decoded by the entropy decoding unit 310, i.e., quantized transform coefficients and related parameter information, may be input to the inverse quantization unit 321. In addition, filtering information from the information decoded by the entropy decoding unit 310 may be provided to the filtering unit 350. Meanwhile, a receiving unit (not shown) for receiving a signal output from the encoding 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 device according to this document may be called a video / image / picture decoding device, and the decoding device may be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoding unit 310, and the sample decoder may include at least one of the inverse quantization unit 321, the inverse transform unit 322, the prediction unit 330, the addition unit 340, the filtering unit 350, and the memory 360.

[0056] The inverse quantization unit 321 may inverse quantize the quantized transform coefficients to output transform coefficients. The inverse quantization unit 321 may rearrange the quantized transform coefficients in the form of a two-dimensional block. In this case, the rearrangement may be performed based on a coefficient scanning order performed in an encoding device. The inverse quantization unit 321 may perform inverse quantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.

[0057] The inverse transform unit 322 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).

[0058] The prediction unit may perform prediction on a current block and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on information on the prediction output from the entropy decoding unit 310, and may determine a specific intra / inter prediction mode.

[0059] The prediction unit may generate a prediction signal based on various prediction methods described below. For example, the prediction unit may apply intra prediction or inter prediction for prediction of one block, and may simultaneously apply intra prediction and inter prediction. This may be called combined inter and intra prediction (CIIP). The prediction unit may also perform intra block copy (IBC) for prediction of a block. The intra block copy may be used for coding of content images / videos such as games, for example, as in screen content coding (SCC). IBC is basically performed in a current picture, but is similar to inter prediction in that a reference block is derived in the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document.

[0060] The intra prediction unit 332 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located far away from the current block depending on the prediction mode. Prediction modes in intra prediction may include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 332 may also determine a prediction mode to be applied to the current block by using prediction modes applied to neighboring blocks.

[0061] The inter prediction unit 331 may derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include information on an inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the inter prediction unit 331 may configure a candidate list of motion information based on the neighboring blocks, and derive a motion vector and / or a reference picture index of the current block based on received candidate selection information. Inter prediction is performed based on various prediction modes, and the information on the prediction may include information indicating a mode of inter prediction for the current block.

[0062] The adder 340 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to the prediction signal (predicted block, predicted sample array) output from the prediction unit 330. When there is no residual for the block to be processed, such as when the skip mode is applied, the predicted block can be used as the reconstructed block.

[0063] 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, or may be output after filtering as described below, or may be used for inter prediction of a next picture.

[0064] Meanwhile, luma mapping with chroma scaling (LMCS) may be applied during picture decoding.

[0065] 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.

[0066] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter prediction unit 331. The memory 360 may store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 331 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 360 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 332.

[0067] 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 in the same or corresponding manner to the prediction unit 220, inverse quantization unit 234, inverse transform unit 235, and filtering unit 260 of the encoding device 200, respectively.

[0068] As described above, prediction is performed to improve compression efficiency when performing video coding. Through this, a predicted block including predicted samples for a current block, which is a block to be coded, can be generated. Here, the predicted block includes predicted samples in a spatial domain (or a pixel domain). The predicted block is derived in the same way by an encoding device and a decoding device, and the encoding device signals information (residual information) on the residual between the original block and the predicted block to the decoding device, rather than the original sample value of the original block itself, thereby improving the efficiency of video coding. The decoding device can derive a residual block including residual samples based on the residual information, combine the residual block with the predicted block to generate a reconstructed block including reconstructed samples, and generate a reconstructed picture including the reconstructed block.

[0069] The residual information may be generated through a transform and quantization procedure. For example, the encoding apparatus may derive a residual block between the original block and the predicted block, perform a transform procedure on the residual samples (residual sample array) included in the residual block to derive transform coefficients, perform a quantization procedure on the transform coefficients to derive quantized transform coefficients, and signal related residual information (through a bitstream) to a decoding apparatus. Here, the residual information may include information such as value information, position information, transform technique, transform kernel, and quantization parameter of the quantized transform coefficients. The decoding apparatus may perform an inverse quantization / inverse transform procedure based on the residual information to derive residual samples (or residual blocks). 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 subsequent picture, and generate a reconstructed picture based on the residual block.

[0070] FIG. 4 illustrates a schematic of the multiple conversion technique according to this document.

[0071] Referring to Figure 4, the conversion unit may correspond to the conversion unit in the encoding device of Figure 2 described above, and the inverse conversion unit may correspond to the inverse conversion unit in the encoding device of Figure 2 described above or the inverse conversion unit in the decoding device of Figure 3.

[0072] 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.

[0073] The multi-kernel transform may refer to a method of transforming by further using a Discrete Cosine Transform (DCT) type 2 and 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 of transforming a residual signal (or a residual block) in a spatial domain into a transform coefficient (or a first transform coefficient) in a frequency domain based on a plurality of transform kernels selected from the DCT type 2, the DST type 7, the DCT type 8, and the DST type 1. Here, the first transform coefficient may be called a tentative transform coefficient from the perspective of a transform unit.

[0074] In other words, when the existing transform method is applied, a spatial domain to frequency domain transform is applied to the residual signal (or residual block) based on DCT type 2 to generate transform coefficients. In contrast, when the multi-kernel transform is applied, a spatial domain to frequency domain transform is applied to the residual signal (or residual block) based on DCT type 2, DST type 7, DCT type 8, and / or DST type 1, etc. to generate transform coefficients (or first-order 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.

[0075] For reference, the DCT / DST transform types can be defined based on basis functions, which can be shown as in the following table.

[0076] [Table 1]

[0077] 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 may be performed on the current block based on the vertical transform kernel, and a horizontal transform may be performed on the current block 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.

[0078] Also, according to one example, when a first-order transformation is performed by applying MTS, a specific basis function is set to a predetermined value, and when it is a vertical transformation or a horizontal transformation, a mapping relationship for the transformation kernel can be set by combining which basis function is applied or not. For example, when a horizontal transformation kernel is represented by trTypeHor and a vertical transformation 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 DST7, and a value of 2 for trTypeHor or trTypeVer can be set to DCT8.

[0079] In this case, MTS index information may be encoded and signaled to a decoding device to indicate one of a number of transformation kernel sets. For example, an MTS index of 0 may indicate that the values ​​of trTypeHor and trTypeVer are all 0, an MTS index of 1 may indicate that the values ​​of trTypeHor and trTypeVer are all 1, an MTS index of 2 may indicate that the value of trTypeHor is 2 and the value of trTypeVer is 1, an MTS index of 3 may indicate that the value of trTypeHor is 1 and the value of trTypeVer is 2, and an MTS index of 4 may indicate that the values ​​of trTypeHor and trTypeVer are all 2.

[0080] The transform unit may perform a secondary transform based on the (primary) transform coefficients to derive modified (secondary) transform coefficients (S420). The primary transform is a transform from a spatial domain to a frequency domain, and the secondary transform means transforming into a more compressed representation using correlations existing between the (primary) transform coefficients. The secondary transform may include a non-separable transform. In this case, the secondary transform may be called a non-separable secondary transform (NSST) or a mode-dependent non-separable secondary transform (MDNSST). The non-separable secondary transform may refer to a transform in which the (primary) transform coefficients derived through the primary transform are secondary transformed based on a non-separable transform matrix to generate modified transform coefficients (or secondary transform coefficients) for a residual signal. Here, the non-separable transform matrix can be used to apply a transform to the (first-order) transform coefficients at once, without separating the vertical transform and the horizontal transform (or applying the horizontal-vertical transform independently). In other words, the non-separable second-order transform can indicate a transform method in which the vertical and horizontal components of the (first-order) transform coefficients are not separated, and a two-dimensional signal (transform coefficient) is rearranged into a one-dimensional signal through a specific predetermined direction (e.g., row-first direction or column-first direction), and then a modified transform coefficient (or a second-order transform coefficient) is generated based on the non-separable transform matrix. For example, the row-first order is a row arrangement in the order of the first row, the second row, ..., the Nth row for an MxN block, and the column-first order is a row arrangement in the order of the first column, the second column, ..., the Mth column for an MxN block. The non-separable secondary transform may be applied to a top-left region of a block composed of (first-order) transform coefficients (hereinafter, referred to as a transform coefficient block).For example, when the width (W) and height (H) of the transform coefficient block are both 8 or more, an 8×8 non-separable secondary transform can be applied to the upper left 8×8 region of the transform coefficient block. Also, when the width (W) and height (H) of the transform coefficient block are both 4 or more, and the width (W) or height (H) of the transform coefficient block is smaller than 8, a 4×4 non-separable secondary transform can be applied to the upper left min(8,W)×min(8,H) region of the transform coefficient block. However, the embodiment is not limited thereto, and for example, even if the width (W) or height (H) of the transform coefficient block only satisfies the condition that both are 4 or more, a 4×4 non-separable secondary transform can be applied to the upper left min(8,W)×min(8,H) region of the transform coefficient block.

[0081] Specifically, for example, if a 4×4 input block is used, the non-separable quadratic transform is performed as follows:

[0082] The 4×4 input block X can be denoted as follows:

[0083]

number

[0084] When X is expressed in the form of a vector, the vector JPEG0007654870000003.jpg84 can be represented as follows:

[0085]

number

[0086] As shown in Equation 2, the vector JPEG0007654870000005.jpg84 rearranges the two-dimensional block of X in Equation 1 into a one-dimensional vector in row-first order.

[0087] In this case, the second-order non-separable transform can be computed as follows:

[0088]

number

[0089] Where: JPEG0007654870000007.jpg75 denotes a vector of transform coefficients and T denotes a 16x16 (non-separable) transform matrix.

[0090] Through Equation 3, a 16×1 transform coefficient vector JPEG0007654870000008.jpg75 can be derived, and JPEG0007654870000009.jpg75 can be re-organized into 4x4 blocks through the scan order (horizontal, vertical, diagonal, etc.). However, the above calculations are merely examples, and in order to reduce the computational complexity of the non-separable quadratic transform, a Hypercube-Givens Transform (HyGT) or the like may be used to compute the non-separable quadratic transform.

[0091] Meanwhile, the non-separable secondary transform may be mode dependent in that the transform kernel (or transform core, transform type) may be selected, where the mode may include an intra prediction mode and / or an inter prediction mode.

[0092] As described above, the non-separable secondary 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 may be applied to an 8x8 region included in the interior of the corresponding transform coefficient block when W and H are both equal to or greater than 8, and the corresponding 8x8 region may be an 8x8 region in the upper left corner of the corresponding transform coefficient block. Similarly, the 4x4 transform refers to a transform that may be applied to a 4x4 region included in the interior of the corresponding transform coefficient block when W and H are both equal to or greater than 4, and the corresponding 4x4 region may be an 4x4 region in the upper left corner of the corresponding transform coefficient block. For example, the 8x8 transform kernel matrix may be a 64x64 / 16x64 matrix, and the 4x4 transform kernel matrix may be a 16x16 / 8x16 matrix.

[0093] In this case, for the mode-based selection of transformation kernels, three non-separable quadratic transformation kernels may be configured per transformation set for the non-separable quadratic transformation for both the 8×8 transformation and the 4×4 transformation, and the number of transformation sets may be 35. That is, 35 transformation sets may be configured for the 8×8 transformation, and 35 transformation sets may be configured for the 4×4 transformation. In this case, the 35 transformation sets for the 8×8 transformation may each include three 8×8 transformation kernels, and in this case, the 35 transformation sets for the 4×4 transformation may each include three 4×4 transformation kernels. However, the size of the transformation, the number of the sets, and the number of transformation kernels in the set are merely examples, and sizes other than 8×8 or 4×4 may be used, or n sets may be configured, and each set may include k transformation kernels.

[0094] The transform set may be referred to as an NSST set, and the transform kernels in the NSST set may be referred to as NSST kernels. Selection of a particular one of the transform sets may be based on, for example, an intra-prediction mode of a current block (CU or sub-block).

[0095] For reference, for example, the intra prediction modes may include two non-directional (non-angular) intra prediction modes and 65 directional (angular) intra prediction modes. The non-directional intra prediction modes may include a planar intra prediction mode numbered 0 and a DC intra prediction mode numbered 1, and the directional intra prediction modes may include 65 intra prediction modes numbered 2 to 66. However, this is merely an example, and this document may also be applied to cases where the number of intra prediction modes is different. Meanwhile, depending on the case, an intra prediction mode numbered 67 may also be used, and the intra prediction mode numbered 67 may indicate a linear model (LM) mode.

[0096] FIG. 5 exemplarily shows intra-directional modes of 65 prediction directions.

[0097] Referring to FIG. 5, intra prediction modes having horizontal directionality and intra prediction modes having vertical directionality may be distinguished from each other with respect to the 34th intra prediction mode having a prediction direction of a left-up diagonal. H and V in FIG. 5 respectively mean horizontal directionality and vertical directionality, and the numbers from -32 to 32 indicate a displacement of 1 / 32 units on a sample grid position. This may indicate an offset for a mode index value. The 2nd to 33rd intra prediction modes have horizontal directionality, and the 34th to 66th intra prediction modes have vertical directionality. Meanwhile, the 34th intra prediction mode may be regarded as neither horizontal nor vertical in the strict sense, but may be classified as belonging to horizontal directionality from the viewpoint of determining a transform set for a secondary transform. This is because the input data is transposed and used for vertical modes symmetrical with respect to the 34th intra prediction mode, and the input data alignment method for the horizontal mode is used for the 34th intra prediction mode. Transposing the input data means that for a two-dimensional block of data MxN, rows become columns and columns become rows, forming NxM data. The 18th and 50th intra prediction modes indicate horizontal and vertical intra prediction modes, respectively, and the 2nd intra prediction mode has a reference pixel on the left and predicts in an upper right direction, so it can be called an upper right diagonal intra prediction mode, and in the same vein, 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.

[0098] In this case, the mapping between the 35 transform sets and the intra prediction modes may be shown, for example, as in the following table. For reference, when the LM mode is applied to the current block, the secondary transform may not be applied to the current block.

[0099] [Table 2]

[0100] Meanwhile, when it is determined that a particular set is to be used, one of the k transform kernels in the particular set may be selected through an index of a non-separable quadratic transform. The encoding apparatus may derive a non-separable quadratic transform index that indicates a particular transform kernel based on a rate-distortion (RD) check, and may signal the index of the non-separable quadratic transform to a decoding apparatus. The decoding apparatus may select one of the k transform kernels in the particular set based on the index of the non-separable quadratic transform. For example, an index value 0 of NSST may indicate a first non-separable quadratic transform kernel, an index value 1 of NSST may indicate a second non-separable quadratic transform kernel, and an index value 2 of NSST may indicate a third non-separable quadratic transform kernel. Alternatively, an index value 0 of NSST may indicate that a first non-separable quadratic transform is not applied to a current block, and index values ​​1 to 3 of NSST may indicate the three transform kernels.

[0101] 4 again, the transform unit may perform the non-separable second-order transform based on a selected transform kernel to obtain modified (second-order) transform coefficients. The modified transform coefficients may be derived as quantized transform coefficients through the quantizer as described above, and may be encoded and signaled to a decoding device and transmitted to an inverse quantization / inverse transform unit in the encoding device.

[0102] On the other hand, when the second-order transform is omitted as described above, the (first-order) transform coefficients, which are the output of the first-order (separate) transform, can be derived as quantized transform coefficients through a quantization unit as described above, and can be encoded and signaled to a decoding device and transmitted to an inverse quantization / inverse transform unit within the encoding device.

[0103] The inverse transform unit may perform a series of procedures in the reverse order of the procedures 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 called modified transform coefficients from the perspective of the inverse transform unit. As described above, the encoding device and the decoding device may generate a reconstructed block based on the residual block and a predicted block, and generate a reconstructed picture based on the reconstructed block.

[0104] Meanwhile, the decoding apparatus may further include a secondary inverse transform application determining unit (or an element for determining whether to apply the secondary inverse transform) and a secondary inverse transform determining unit (or an element for determining the secondary inverse transform). The secondary inverse transform application determining unit may determine whether to apply the secondary inverse transform. For example, the secondary inverse transform may be NSST or RST, 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 a transform coefficient of a residual block.

[0105] The secondary inverse transform decision unit may determine a secondary inverse transform. In this case, the secondary inverse transform decision unit may determine a secondary inverse transform to be applied to a current block based on an NSST (or RST) transform set designated by an intra prediction mode. In addition, as an embodiment, a secondary transform decision method may be determined depending on a primary transform decision method. Various combinations of primary transform and secondary transform may be determined according to an intra prediction mode. In addition, as an example, the secondary inverse transform decision unit may determine an area to which a secondary inverse transform is applied based on a size of a current block.

[0106] Meanwhile, as described above, if the second (inverse) transform is omitted, the (dequantized) transform coefficients are received and the first (separate) inverse transform is 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 a predicted block, and generate a reconstructed picture based on the reconstructed block.

[0107] On the other hand, in this paper, in order to reduce the computational complexity and memory requirements associated with non-separable secondary transforms, we can apply reduced secondary transforms (RSTs), in which the size of the transformation matrix (kernel) is reduced using the concept of NSST.

[0108] Meanwhile, the coefficients constituting the transform kernel, transform matrix, and transform kernel matrix described in this document, 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 compared to the existing 9 bits or 10 bits, it is possible to reduce the memory requirement for storing the transform kernel with a reasonably accommodating performance degradation. In addition, by expressing the kernel matrix in 8 bits, a small multiplier can be used, and it may be more suitable for SIMD (Single Instruction Multiple Data) instructions used for optimal software implementation.

[0109] 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 performing simplified transformation, the amount of calculation required during transformation can be reduced due to the reduction in size of the transform matrix. That is, RST can be used to solve the issue of computational complexity that occurs during transformation of a large-sized block or non-separable transformation.

[0110] The RST may be referred to by various terms such as reduced transform, reduced secondary transform, reduction transform, simplified transform, simple transform, etc., and the names by which the RST may be referred to are not limited to the listed examples. Alternatively, the RST may be referred to as LFNST (Low-Frequency Non-Separable Transform) since it is mainly performed in the low-frequency domain including non-zero coefficients in the transform block.

[0111] Meanwhile, when the second inverse transform is performed based on the 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 for deriving modified transform coefficients based on the inverse RST for the transform coefficients, and an inverse linear transform unit for deriving residual samples for the target block based on an inverse linear transform for the modified transform coefficients. The inverse linear transform refers to an inverse transform of a linear transform applied to the residual. In this document, deriving transform coefficients based on a transform may refer to deriving transform coefficients by applying the corresponding transform.

[0112] FIG. 6 is a diagram for explaining a RST according to one embodiment of this document.

[0113] In this specification, the term "target block" may refer to a current block or a residual block on which coding is performed.

[0114] In an RST according to an embodiment, an N-dimensional vector is mapped to an R-dimensional vector located in a different space, and a reduced transformation matrix can be determined, where R is smaller than N. N may represent the square of the length of one side of a block to which a transformation is applied, or the total number of transformation coefficients corresponding to the block to which a transformation is applied, and the simplification factor may represent an R / N value. The simplification factor may be referred to by various terms such as a reduced factor, a reduction factor, a simplified factor, and a simple factor. Meanwhile, R may be referred to as a simplification coefficient, but the simplification factor may represent R depending on the case. The simplification factor may also represent an N / R value depending on the case.

[0115] In one embodiment, the simplification factors or simplification coefficients may be signaled via the bitstream, but the embodiment is not limited thereto. For example, predefined values ​​for the simplification factors or simplification coefficients may be stored in each encoding device 200 and decoding device 300, in which case the simplification factors or simplification coefficients may not need to be separately signaled.

[0116] 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.

[0117]

number

[0118] The matrix T in the reduced transform block shown in FIG. 6(a) is the matrix T RxN As shown in FIG. 6(a), a simplified transformation matrix T RxN When multiplied by, the transform coefficients for the current block can be derived.

[0119] In one embodiment, when 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 Fig. 6(a) can be expressed by the matrix operation shown in Equation 5 below. In this case, the memory and multiplication operations can be reduced by about 1 / 4 due to the simplification factor.

[0120]

number

[0121] In Formula 5, r1 to r 64may represent a residual sample for the target block, and more specifically, may be a transform coefficient generated by applying a linear transform. As a result of the operation of Equation 5, the transform coefficient c i can be derived, and c i The derivation process is as shown in Equation 6.

[0122]

number

[0123] As a result of the calculation of Equation 6, the transform coefficients c1 to c2 for the target block are R That is, when R=16, the transform coefficients c1 to c 16 can be derived. If a regular transform is applied instead of the RST and a transform matrix of size 64x64 (NxN) is multiplied by the residual samples of size 64x1 (Nx1), 64 (N) transform coefficients for the current block are derived. However, because the RST is applied, only 16 (R) transform coefficients for the current block are derived. Since the total number of transform coefficients for the current block is reduced from N to R, the amount of data transmitted from the encoding apparatus 200 to the decoding apparatus 300 is reduced, and therefore the transmission efficiency between the encoding apparatus 200 and the decoding apparatus 300 can be increased.

[0124] 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 normal transformation, memory usage during RST can be reduced by a ratio of R / N. Also, compared to the number of multiplication operations (NxN) when using a normal transformation matrix, the number of multiplication operations can be reduced by a ratio of R / N (RxN) when using the simplified transformation matrix.

[0125] 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 the residual samples for the current block. Such transform coefficients may be transmitted to an inverse transform unit 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) for the transform coefficients, and derive residual samples for the current block based on an inverse primary transform for the modified transform coefficients.

[0126] Inverse RST matrix T according to one embodiment NxR The size of the simplified transformation matrix T RxN and are in a transpose relationship.

[0127] The matrix T in the Reduced Inv. Transform block shown in FIG. 6(b) t is the inverse RST matrix T RxN T As shown in FIG. 6(b), the inverse RST matrix T RxN T When the inverse RST matrix T is multiplied by T, modified transform coefficients for the current block or residual samples for the current block can be derived. RxN T is (T RxN ) T NxR It may also be expressed as:

[0128] More specifically, when the inverse RST is applied as the secondary inverse transform, the inverse RST matrix T RxN TAlternatively, an inverse RST may be applied as an inverse linear transform, in which case the inverse RST matrix T RxN T When multiplied by, the residual sample for the current block can be derived.

[0129] 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.

[0130]

number

[0131] In Formula 7, c1 to c 16 The result of the operation of Equation 7 is a modified transform coefficient for the target block or a residual sample for the target block, r j can be derived, and r j The derivation process is as shown in Equation 8.

[0132]

number

[0133] 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. Ncan be derived. In terms of 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), so compared to performing a normal inverse transformation, memory usage can be reduced by a ratio of R / N when performing inverse RST. Also, compared to the number of multiplication operations NxN when using a normal inverse transformation matrix, the number of multiplication operations can be reduced by a ratio of R / N (NxR) when using a simplified inverse transformation matrix.

[0134] Meanwhile, the configuration of the transform set as shown in Table 2 can be applied to the 8x8 RST. That is, the corresponding 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) according to the prediction mode in the screen, it can be configured to select one of up to four transforms including the case where the secondary transform is not applied. When the secondary transform is not applied, the transform can be considered as the one applied with the identity matrix. When the four transforms are assigned indices 0, 1, 2, and 3 (for example, the index 0 can be assigned to the identity matrix, i.e., the case where the secondary transform is not applied), the transform to be applied can be specified by signaling a syntax element called an NSST index for each transform coefficient block. That is, an 8x8 NSST can be specified for an 8x8 upper left block through the NSST index, and an 8x8 RST can be specified in the RST configuration. The 8x8 NSST and 8x8 RST refer to a transform that can be applied to an 8x8 region included within a corresponding transform coefficient block when W and H of a target block to be transformed are both equal to or greater than 8, and the corresponding 8x8 region can be an upper left 8x8 region within the corresponding transform coefficient block. Similarly, the 4x4 NSST and 4x4 RST refer to a transform that can be applied to a 4x4 region included within a corresponding transform coefficient block when W and H of a target block are both equal to or greater than 4, and the corresponding 4x4 region can be an upper left 4x4 region within the corresponding transform coefficient block.

[0135] On the other hand, when applying the (forward) 8x8 RST as in Equation 4, 16 valid transform coefficients are generated, so that the 64 input data constituting the 8x8 area can be seen as being reduced to 16 output data, and from the viewpoint of a two-dimensional area, valid transform coefficients are filled in only 1 / 4 of the area. Therefore, the 16 output data obtained by applying the forward 8x8 RST can be filled in the upper left area of ​​the block (transform coefficients 1 to 16) as shown in FIG. 7.

[0136] 7 is a diagram illustrating a scanning order of transform coefficients according to an embodiment of the present disclosure. As described above, if the forward scan order starts from number 1, the reverse scan can be performed from number 64 to number 17 in the forward scan order in the direction and order of the arrows shown in FIG. 7.

[0137] In Fig. 7, the 4x4 region in the upper left corner is a ROI (Region of Interest) region filled with valid transform coefficients, and the remaining region is left blank. The blank region may be filled with zero values ​​as a default.

[0138] That is, when an 8x8 RST whose forward transform matrix has a form of 16x64 is applied to an 8x8 region, the output transform coefficients are placed in the upper left 4x4 region, and regions where no output transform coefficients exist can be filled with 0s (from the 64th to the 17th) according to the scan order in Figure 7.

[0139] If a valid non-zero transform coefficient is found outside the ROI region of Fig. 7, it is certain that the 8x8 RST is not applied, so index coding of the corresponding NSST can be omitted. Conversely, if a non-zero transform coefficient is not found outside the ROI region of Fig. 7 (e.g., when the transform coefficient for the region outside the ROI is set to 0 when the 8x8 RST is applied), it is possible that the 8x8 RST is applied, so the index of the NSST can be coded. Such conditional NSST index coding can be performed after the residual coding process, since it is necessary to check whether or not there is a non-zero transform coefficient.

[0140] This document deals with the design of a RST that can be applied to 4x4 blocks from the RST structure described in this embodiment, and related optimization methods. Of course, some concepts can be applied not only to 4x4 RSTs, but also to 8x8 RSTs or other types of transformations.

[0141] FIG. 8 is a flow chart illustrating a reverse RST process according to one embodiment of the present document.

[0142] Each step disclosed in Fig. 8 may be performed by the decoding apparatus 300 disclosed in Fig. 3. More specifically, S800 may be performed by the inverse quantization unit 321 disclosed in Fig. 3, and S810 and S820 may be performed by the inverse transform unit 322 disclosed in Fig. 3. Therefore, detailed description that overlaps with the description described above in Fig. 3 will be omitted or simplified. Meanwhile, in this document, RST may refer to a transform applied in a forward direction, and inverse RST may refer to a transform applied in an inverse direction.

[0143] In one embodiment, the detailed operations of the reverse RST are merely reversed in order from the detailed operations of the RST, and the detailed operations of the RST and the detailed operations of the reverse RST may be substantially similar. Therefore, a person skilled in the art can easily understand that the description of S800 to S820 for the reverse RST described below can be applied to the RST in the same or similar manner.

[0144] The decoding apparatus 300 according to an embodiment may perform inverse quantization on quantized transform coefficients for a current block to derive transform coefficients (S800).

[0145] Meanwhile, the decoding apparatus 300 may determine whether to apply the inverse secondary transform after the inverse primary transform and before the inverse secondary transform. For example, the inverse secondary transform may be NSST or RST. As an example, the decoding apparatus may determine whether to apply the inverse secondary transform based on a flag of the secondary transform parsed from the bitstream. As another example, the decoding apparatus may determine whether to apply the inverse secondary transform based on the transform coefficients of the residual block.

[0146] Also, the decoding apparatus 300 may determine an inverse secondary transform. In this case, the decoding apparatus 300 may determine an inverse secondary transform to be applied to the current block based on an NSST (or RST) transform set designated according to an intra prediction mode. Furthermore, as an embodiment, a secondary transform decision method may be determined depending on a primary transform decision method. For example, it may be determined that RST or LFNST is applied only when DCT-2 is applied as a transform kernel in the primary transform. Alternatively, various combinations of the primary transform and the secondary transform may be determined according to the intra prediction mode.

[0147] As another example, prior to the step of determining the inverse secondary transform, the decoding apparatus 300 may determine an area to which the inverse secondary transform is to be applied based on the size of the current block.

[0148] According to an embodiment, the decoding apparatus 300 may select a transform kernel (S810). More specifically, the decoding apparatus 300 may select the transform kernel based on at least one of a transform index, a width and height of an area to which the transform is applied, an intra prediction mode used in image decoding, and information on a color component of a target block. However, the embodiment is not limited thereto. For example, the transform kernel may be predefined, and separate information for selecting the transform kernel may not be signaled.

[0149] In one example, information on a color component of a target block may be indicated via CIdx. If the target block is a luma block, CIdx may indicate 0, and if the target block is a chroma block, e.g., a Cb block or a Cr block, CIdx may indicate a non-zero value (e.g., 1).

[0150] The decoding apparatus 300 according to an embodiment may apply an inverse RST to the transform coefficients based on the selected transform kernel and the reduced factor (S820).

[0151] In the following, according to an embodiment of this document, a method for determining a secondary NSST set, that is, a secondary transform set or transform set, is proposed taking into account an intra prediction mode and a block size.

[0152] As an embodiment, a set for a current transform block is configured based on the intra prediction mode, so that a transform set configured with transform kernels of various sizes can be applied to the transform block. The transform sets in Table 3 are represented by numbers 0 to 3 as shown in Table 4.

[0153] [Table 3]

[0154] [Table 4]

[0155] The indexes 0, 2, 18, and 34 shown in Table 3 correspond to 0, 1, 2, and 3, respectively, in Table 4. In Tables 3 and 4, instead of 35 transform sets, only 4 transform sets are used, which can significantly reduce memory space.

[0156] In addition, the various numbers of transformation kernel matrices that can be included in each transformation set can be set as shown in the table below.

[0157] [Table 5]

[0158] [Table 6]

[0159] [Table 7]

[0160] Table 5 shows that for each transform set, two available transform kernels are used, which results in the transform index having a range from 0 to 2.

[0161] According to Table 6, two available transform kernels are used for transform set 0, i.e., the transform set for DC mode and planar mode among intra prediction modes, and one transform kernel is used for each of the remaining transform sets. In this case, the available transform indexes for transform set 1 are 0 to 2, and the transform indexes for the remaining transform sets 1 to 3 are 0 to 1.

[0162] In Table 7, one available transform kernel is used for each transform set, which results in the transform index having a range from 0 to 1.

[0163] Meanwhile, in the mapping of the transform sets in Table 3, a total of four transform sets can be used, and the four transform sets can be rearranged as shown in Table 4 so as to be divided into indexes of 0, 1, 2, and 3. Tables 8 and 9 below exemplarily show four transform sets that can be used for secondary transform, where Table 8 shows a transform kernel matrix that can be applied to an 8x8 block, and Table 9 shows a transform kernel matrix that can be applied to a 4x4 block. Tables 8 and 9 are composed of two transform kernel matrices per transform set, and two transform kernel matrices can be applied to all intra prediction modes as shown in Table 5.

[0164] [Table 8-1]

[0165] [Table 8-2]

[0166] [Table 8-3]

[0167] [Table 8-4]

[0168] [Table 8-5]

[0169] [Table 8-6]

[0170]

Table 8-7

[0171]

Table 8-8

[0172]

Table 9-1

[0173]

Table 9-2

[0174]

Table 9-3

[0175]

Table 9-4

[0176]

Table 9-5

[0177]

Table 9-6

[0178]

Table 9-7

[0179]

Table 9-8

[0180] The examples of the transformation kernel matrices presented in Table 8 are all transformation kernel matrices multiplied by a scaling value of 128. In the g_aiNsst8x8[N1][N2]

[16]

[64] array appearing in the matrix array of Table 8, N1 indicates the number of transformation sets (N1 is 4 or 35, divided into indexes 0, 1, ..., N1-1), N2 indicates the number of transformation kernel matrices constituting each transformation set (1 or 2), and

[16]

[64] indicates 16x64 Reduced Secondary Transform (RST).

[0181] When a transformation set is composed of one transformation kernel matrix as in Tables 3 and 4, either the first or second transformation kernel matrix in Table 8 can be used for the corresponding transformation set.

[0182] When the corresponding RST is applied, 16 transform coefficients are output, but if only the mx64 portion of the 16x64 matrix is ​​applied, it can be configured to output only m transform coefficients. For example, by setting m=8 and multiplying only the top 8x64 matrix, the amount of calculation can be reduced by half instead of outputting only 8 transform coefficients. To reduce the amount of calculation in the worst case, an 8x64 matrix can be applied to an 8x8 transform unit (TU).

[0183] The examples of transformation kernel matrices presented in Table 9 that can be applied to a 4x4 region are all transformation kernel matrices multiplied by a scaling value of 128. In the g_aiNsst4x4[N1][N2]

[16]

[64] array that appears in the matrix array of Table 9, N1 indicates the number of transform sets (N1 is 4 or 35, divided into indexes 0, 1, ..., N1-1), N2 indicates the number of transformation kernel matrices that make up each transformation set (1 or 2), and

[16]

[16] indicates a 16x16 transformation.

[0184] When a transformation set is composed of one transformation kernel matrix as in Tables 3 and 4, either the first or second transformation kernel matrix in Table 9 can be used for the corresponding transformation set.

[0185] As with the 8x8 RST, if only the mx16 portion of the 16x16 matrix is ​​used, then only m transform coefficients can be output. For example, m=8, and instead of multiplying only the top 8x16 matrix and outputting only 8 transform coefficients, the amount of computation can be reduced by half. To reduce the worst-case computation, an 8x16 matrix can be applied to a 4x4 transform unit (TU).

[0186] Basically, the transformation kernel matrix applicable to the 4x4 region presented in Table 9 can be applied to 4x4 TUs, 4xM TUs, and Mx4 TUs (in the case of M>4, 4xM TUs and Mx4 TUs, the transformation kernel matrix specified for each 4x4 region can be applied, or it can be applied only to the largest upper left 4x8 or 8x4 region), or it can be applied only to the upper left 4x4 region. If the secondary transformation is configured to be applied only to the upper left 4x4 region, the transformation kernel matrix applicable to the 8x8 region presented in Table 8 may not be necessary.

[0187] Meanwhile, in order to reduce the amount of calculations for the worst case, the following embodiment can be proposed. In the following, a matrix consisting of M rows and N columns is represented as an MxN matrix, which means a forward transform, i.e., a transform matrix applied when performing a transform (RST) in an encoding device. Therefore, in an inverse transform (inverse RST) performed in a decoding device, an NxM matrix obtained by transposing the MxN matrix can be used.

[0188] 1) For a block (e.g., a transform unit) with width W and height H, if W≧8 and H≧8, a transform kernel matrix that can be applied to an 8x8 region is applied to the upper left 8x8 region of the block. If W=8 and H=8, only the 8x64 portion of the 16x64 matrix can be applied, i.e., 8 transform coefficients can be generated.

[0189] 2) For a block (e.g., a transform unit) with width W and height H, if one of W and H is less than 8, i.e., one of W and H is 4, a transform kernel matrix that can be applied to a 4x4 region is applied to the upper left corner of the block. If W=4 and H=4, then only the 8x16 portion of the 16x16 matrix can be applied, in which case 8 transform coefficients are generated.

[0190] If (W,H)=(4,8) or (8,4), the quadratic transformation is applied only to the upper left 4x4 region. If W or H is greater than 8, i.e., W or H is equal to or greater than 16 and the other is 4, the quadratic transformation is applied only to the two upper left 4x4 blocks. That is, the specified transformation kernel matrix can be applied only to the maximum upper left 4x8 or 8x4 region, which is divided into two 4x4 blocks.

[0191] 3) For a block (eg, a transform unit) with width W and height H, if W and H are both 4, then the quadratic transform may not be applied.

[0192] 4) For a block (e.g., a transform unit) having a width of W and a height of H, the number of coefficients generated by applying a quadratic transform can be configured to be kept to ¼ or less of the area of ​​the transform unit (i.e., the number of total pixels constituting the transform unit = WxH). For example, when W and H are both 4, the most significant 4x16 matrix of the 16x16 matrix can be applied to generate four transform coefficients.

[0193] When a secondary transform is applied only to the largest 8x8 region in the upper left of the entire transform unit (TU), 8 or less coefficients must be generated for a 4x8 transform unit or an 8x4 transform unit, so that the most significant 8x16 matrix of 16x16 matrices can be applied to the 4x4 region in the upper left. For an 8x8 transform unit, up to a maximum 16x64 matrix can be applied (up to 16 coefficients can be generated), and for a 4xN or Nx4 (N≧16) transform unit, a 16x16 matrix can be applied to the 4x4 block in the upper left, or the most significant 8x16 matrix of 16x16 matrices can be applied to two 4x4 blocks located in the upper left. In a similar manner, for a 4x8 transform unit or an 8x4 transform unit, the most significant 4x16 matrix of 16x16 matrices can be applied to two 4x4 blocks located in the upper left, respectively, to generate a total of eight transform coefficients.

[0194] 5) The maximum size of a quadratic transformation applied to a 4x4 region can be limited to 8x16. In this case, the amount of memory required to store a transformation kernel matrix applied to a 4x4 region can be reduced by half compared to a 16x16 matrix.

[0195] For example, for all the transformation kernel matrices presented in Table 9, only the top 8x16 matrix can be extracted from each 16x16 matrix, limiting the maximum size to 8x16, and realizing the storage of only the corresponding 8x16 matrix of the transformation kernel matrix in an actual video coding system.

[0196] If the maximum size of the applicable transform is 8x16 and the maximum number of multiplications required to generate one coefficient is limited to 8, then for a 4x4 block, a maximum of 8x16 matrices can be applied, and for a 4xN block or Nx4 block, (N≧8, N=2 n For example, for a 4xN block or an Nx4 block, (N≧8, N=2 n, n≧3), an 8x16 matrix can be stored for one 4x4 block in the upper left row.

[0197] According to an embodiment, when coding an index specifying a secondary transform to be applied to a luma component, more specifically, when one transform set is composed of two transform kernel matrices, it is necessary to specify whether or not to apply a secondary transform and, if so, which transform kernel matrix to apply. For example, if a secondary transform is not applied, the transform index may be coded as 0, and if so, the transform indexes for the two transform sets may be coded as 1 and 2, respectively.

[0198] In this case, when coding the transform index, truncated unary coding can be used. For example, the transform indexes 0, 1, and 2 can be coded by being assigned binary codes of 0, 10, and 11, respectively.

[0199] In addition, when coding in the truncated unary manner, a different CABAC context can be assigned to each bin, and according to the above example, when coding transform indexes 0, 10, and 11, two CABAC contexts can be used.

[0200] Meanwhile, when coding a transform index that specifies a secondary transform to be applied to a chroma component, more specifically, when one transform set is composed of two transform kernel matrices, whether or not a secondary transform is to be applied and, if so, which transform kernel matrix to apply should be specified, in the same manner as when coding a transform index for a secondary transform for a luma component. For example, if a secondary transform is not to be applied, the transform index can be coded as 0, and if it is applied, the transform indexes for the two transform sets can be coded as 1 and 2, respectively.

[0201] In this case, when coding the transform index, truncated unary coding can be used. For example, the transform indexes 0, 1, and 2 can be coded by being assigned binary codes of 0, 10, and 11, respectively.

[0202] In addition, when coding in the truncated unary manner, a different CABAC context can be assigned to each bin, and according to the above example, when coding transform indexes 0, 10, and 11, two CABAC contexts can be used.

[0203] In addition, according to an embodiment, different CABAC context sets may be assigned according to chroma intra prediction modes. For example, when a non-directional mode such as a planar mode or a DC mode is distinguished from other directional modes (i.e., when the modes are distinguished into two groups), a corresponding CABAC context set (composed of two contexts) may be assigned to each group when coding 0, 10, and 11 as in the above example.

[0204] In this way, when dividing the chroma intra prediction mode into several groups and allocating the corresponding CABAC context set, a chroma intra prediction mode value should be found before transform index coding for the secondary transform. However, in the case of a chroma direct mode (DM), since the luma intra prediction mode value is used as is, an intra prediction mode value for the luma component should also be found. Therefore, when coding information for a chroma component, data dependency on information for the luma component may occur, so in the case of a chroma DM mode, when transform index coding for the secondary transform is performed without information on the intra prediction mode, the above-mentioned data dependency can be removed by mapping to a specific group. For example, when the chroma intra prediction mode is a chroma DM mode, it is possible to consider it to be a planar mode or a DC mode, use the corresponding CABAC context set, and perform the corresponding transform index coding, or to consider it to be another directional mode, and apply the corresponding CABAC context set.

[0205] FIG. 9 is a flowchart illustrating the operation of a video decoding device according to one embodiment of this document.

[0206] Each step disclosed in Fig. 9 may be performed by the decoding apparatus 300 disclosed in Fig. 3. More specifically, S910 may be performed by the entropy decoding unit 310 disclosed in Fig. 3, S920 may be performed by the inverse quantization unit 321 disclosed in Fig. 3, S930 and S940 may be performed by the inverse transform unit 322 disclosed in Fig. 3, and S950 may be performed by the addition unit 340 disclosed in Fig. 3. Also, the operations according to S910 to S950 are based on some of the contents described above in Figs. 4 to 8. Therefore, the detailed description of the contents overlapping with the contents described above in Figs. 3 to 8 will be omitted or simplified.

[0207] The decoding apparatus 300 according to an embodiment may derive quantized transform coefficients for a target block from a bitstream (S910). More specifically, the decoding apparatus 300 may decode information on quantized transform coefficients for a target block from a bitstream, and may derive quantized transform coefficients for the target block based on the information on the quantized transform coefficients for the target block. The information on the quantized transform coefficients for the target block may be included in a sequence parameter set (SPS) or a slice header, and may include at least one of information on whether a simplified transform (RST) is applied, information on a simplification factor, information on a minimum transform size to apply the simplified transform, information on a maximum transform size to apply the simplified transform, a simplified inverse transform size, and information on a transform index indicating any one of transform kernel matrices included in a transform set.

[0208] The decoding apparatus 300 according to an embodiment may perform inverse quantization on the quantized transform coefficients of the current block to derive transform coefficients (S920).

[0209] The decoding apparatus 300 according to an embodiment may derive modified transform coefficients based on an inverse reduced secondary transform (RST) of the transform coefficients (S930).

[0210] In one example, the inverse RST may be performed based on an inverse RST matrix, which may be a non-square matrix with a number of columns less than the number of rows.

[0211] In one embodiment, S930 may include the steps of decoding a transform index, determining whether a condition for applying an inverse RST is met based on the transform index, selecting a transform kernel matrix, and if the condition for applying the inverse RST is met, applying the inverse RST to the transform coefficients based on the selected transform kernel matrix and / or a simplification factor. In this case, the size of the simplified inverse transform matrix may be determined based on the simplification factor.

[0212] The decoding apparatus 300 according to an embodiment may derive residual samples for the current block based on the inverse transform of the modified transform coefficients (S940).

[0213] The decoding apparatus 300 may perform an inverse linear transform on the modified transform coefficients for the current block, where the inverse linear transform may be a simplified inverse transform or a conventional separate transform may be used.

[0214] The decoding apparatus 300 according to an embodiment may generate a reconstructed sample based on a residual sample for a current block and a predicted sample for the current block (S950).

[0215] Referring to S930, it can be seen that a residual sample for a target block is derived based on an inverse RST for a transform coefficient for the target block. Considering the size of an inverse transform matrix, the size of a normal inverse transform matrix is ​​NxN, but the size of an inverse RST matrix is ​​reduced to NxR, so that memory usage can be reduced at a rate of R / N when performing an inverse RST compared to performing a normal transform. Also, compared to the number of multiplication operations NxN when using a normal inverse transform matrix, the number of multiplication operations can be reduced at a rate of R / N (NxR) when using an inverse RST matrix. Also, since only R transform coefficients need to be decoded when applying the inverse RST, compared to the number of transform coefficients that need to be decoded when a normal inverse transform is applied, the total number of transform coefficients for the target block is reduced from N to R, and the decoding efficiency can be increased. In summary, according to S930, the (inverse) transform efficiency and the decoding efficiency of the decoding device 300 can be increased through the inverse RST.

[0216] FIG. 10 is a control flow chart for explaining a reverse RST according to one embodiment of the present document.

[0217] The decoding apparatus 300 receives information on a transform index and an intra-prediction mode from a bitstream (S1000).

[0218] Such information is received as syntax information, which is received as a binary coded bin string containing 0's and 1's.

[0219] Meanwhile, the entropy decoding unit 310 can derive binarization information for the syntax elements of the transform index.

[0220] This generates a candidate set for the binarized values ​​that the received transform index syntax element may have, and in accordance with this embodiment, the transform index syntax element may be binarized in a truncated unary code manner.

[0221] The transform index syntax element according to this embodiment can indicate whether an inverse RST is applied and one of the transform kernel matrices included in the transform set, and if the transform set includes two transform kernel matrices, the value of the transform index syntax element can be three.

[0222] That is, according to one embodiment, the syntax element value for the transform index may include 0 indicating a case where the inverse RST is not applied to the target block, 1 indicating the first transform kernel matrix among the transform kernel matrices, and 2 indicating the second transform kernel matrix among the transform kernel matrices.

[0223] In this case, the syntax element values ​​for the three transform indexes can be coded as 0, 10, and 11 using the truncated unary code method. That is, the value 0 for the syntax element can be binarized as '0', the value 1 for the syntax element can be binarized as '10', and the value 2 for the syntax element can be binarized as '11'.

[0224] The entropy decoding unit 310 derives context information, i.e., a context model, for a bin string of a transform index (S1010), and decodes bins of the bin string of a syntax element based on the context information (S1020).

[0225] In summary, the entropy decoding unit 310 receives the bin string binarized in the truncated unary code manner, and decodes the syntax elements of the transform index through a candidate set for the corresponding binarized value.

[0226] According to this embodiment, different context information, i.e., probability models, can be applied to two bins of a transformation index, respectively. That is, both of the two bins of the transformation index can be decoded in a context manner rather than a bypass manner, and the first bin of the bins of the syntax elements for the transformation index can be decoded based on the first context information, and the second bin of the bins of the syntax elements for the transformation index can be decoded based on the second context information.

[0227] By the context information based decoding, the value of the syntax element for the transform index applied to the current block can be derived from among the binary coded values ​​that the syntax element of the transform index may have (S1030).

[0228] That is, one of transform indexes 0, 1, and 2 can be applied or derived for the current target block.

[0229] The inverse transform unit 332 of the decoding apparatus 300 may determine a transform set based on a mapping relationship according to an intra-prediction mode applied to a current block (S1040), and perform inverse RST based on the values ​​of syntax elements for the transform set and the transform index (S1050).

[0230] As mentioned above, multiple transform sets can be determined depending on the intra prediction mode of the transform block to be transformed, and the inverse RST can be performed based on one of the transform kernel matrices included in the transform set indicated by the transform index.

[0231] FIG. 11 is a flow chart illustrating the operation of a video encoding device according to one embodiment of this document.

[0232] Each step disclosed in FIG. 11 may be performed by the encoding apparatus 200 disclosed in FIG. 2. More specifically, S1110 may be performed by the prediction unit 220 disclosed in FIG. 2, S1120 may be performed by the subtraction unit 231 disclosed in FIG. 2, S1130 and S1140 may be performed by the conversion unit 232 disclosed in FIG. 2, and S1150 may be performed by the quantization unit 233 and the entropy encoding unit 240 disclosed in FIG. 2. Also, the operations according to S1110 to S1150 are based on some of the contents described above in FIG. 4 to FIG. 8. Therefore, the detailed description of the contents overlapping with the contents described above in FIG. 2 and FIG. 4 to FIG. 8 will be omitted or simplified.

[0233] The encoding apparatus 200 according to an embodiment may derive prediction samples based on an intra-prediction mode applied to a current block (S1110).

[0234] The encoding apparatus 200 according to an embodiment may derive a residual sample for a current block (S1120).

[0235] The encoding apparatus 200 according to an embodiment may derive transform coefficients for the current block based on a first-order transform of residual samples (S1130). The first-order transform may be performed through a plurality of transform kernels, and in this case, the transform kernels may be selected based on an intra-prediction mode.

[0236] The decoding apparatus 300 may perform a secondary transform, specifically, an NSST, on transform coefficients for a current block, and in this case, the NSST may be performed based on a simplified transform (RST) or may be performed without being based on the RST. When the NSST is performed based on the RST, it may correspond to the operation according to S1140.

[0237] The encoding apparatus 200 according to an embodiment may derive modified transform coefficients for the current block based on the RST for the transform coefficients (S1140). In one example, the RST may be performed based on a simplified transform matrix or a transform kernel matrix, and the simplified transform matrix may be a non-square matrix in which the number of rows is less than the number of columns.

[0238] In one embodiment, S1140 may include determining whether a condition for applying a RST is met, generating and encoding a transform index based on the determination, selecting a transform kernel matrix, and if a condition for applying a RST is met, applying the RST to the residual samples based on the selected transform kernel matrix and / or a simplification factor. In this case, the size of the simplified transform kernel matrix may be determined based on the simplification factor.

[0239] According to an embodiment, the encoding apparatus 200 may perform quantization based on the modified transform coefficients for the current block, derive quantized transform coefficients, and encode information about the quantized transform coefficients (S1160).

[0240] More specifically, the encoding apparatus 200 may generate information about the quantized transform coefficients and encode the generated information about the quantized transform coefficients.

[0241] In one example, the information about the quantized transform coefficients may include at least one of information on whether a RST is applied, information on a simplification factor, information on a minimum transform size to apply the RST to, and information on a maximum transform size to apply the RST to.

[0242] Referring to S1140, it can be seen that transform coefficients for a target block are derived based on the RST for the residual samples. In terms of the size of the transform kernel matrix, the size of a normal transform kernel matrix is ​​NxN, but the size of the simplified transform matrix is ​​reduced to RxN, so that compared to performing a normal transform, the memory usage can be reduced at a ratio of R / N when performing the RST. Also, compared to the number of multiplication operations NxN when using a normal transform kernel matrix, the number of multiplication operations can be reduced at a ratio of R / N (RxN) when using the simplified transform kernel matrix. Furthermore, since only R transform coefficients are derived when the RST is applied, compared to the number of transform coefficients derived when a normal transform is applied, the total number of transform coefficients for a target block is reduced from N to R, and the amount of data transmitted from the encoding apparatus 200 to the decoding apparatus 300 can be reduced. In summary, according to S1140, the transform efficiency and coding efficiency of the encoding apparatus 200 can be increased through the RST.

[0243] FIG. 12 is a control flow chart for explaining the RST according to one embodiment of the present document.

[0244] First, the encoding apparatus 200 may determine a transformation set based on a mapping relationship according to an intra-prediction mode applied to a current block (S1200).

[0245] Thereafter, the transform unit 232 can derive transform coefficients by performing RST based on any one of the transform kernel matrices included in the transform set (S1210).

[0246] In this embodiment, the transform coefficients are modified transform coefficients that are subjected to a primary transform followed by a secondary transform, and each transform set may include two transform kernel matrices.

[0247] When the RST is performed in this manner, information regarding the RST can be encoded in the entropy encoding unit 240 .

[0248] First, the entropy encoding unit 240 may derive a syntax element value for a transform index indicating one of the transform kernel matrices included in the transform set (S1220).

[0249] The transform index syntax element in this embodiment can indicate whether an (inverse) RST is applied and one of the transform kernel matrices included in the transform set, and if the transform set includes two transform kernel matrices, the value of the transform index syntax element can be three.

[0250] According to one embodiment, the syntax element value for the transform index can be derived as 0 indicating a case where (inverse) RST is not applied to the target block, 1 indicating the first transform kernel matrix among the transform kernel matrices, or 2 indicating the second transform kernel matrix among the transform kernel matrices.

[0251] Thereafter, the entropy encoding unit 240 may binarize the syntax element values ​​for the derived transform indexes (S1230).

[0252] The entropy encoding unit 240 can binarize the syntax element values ​​for the three transform indexes to 0, 10, and 11 using a truncated unary code method. That is, the value 0 for the syntax element can be binarized to "0", the value 1 for the syntax element can be binarized to "10", and the value 2 for the syntax element can be binarized to "11", and the entropy encoding unit 240 can binarize the syntax elements for the derived transform indexes to any one of "0", "10", and "11".

[0253] The entropy encoding unit 240 may derive context information, i.e., a context model, for a bin string of a transformation index (S1240), and encode the bins of the bin string of a syntax element based on the context information (S1250).

[0254] According to this embodiment, different context information can be applied to two bins of the transformation index, i.e., the two bins of the transformation index can be encoded in a context manner other than the bypass manner, and the first bin of the bins of the syntax elements for the transformation index can be encoded based on the first context information, and the second bin of the bins of the syntax elements for the transformation index can be encoded based on the second context information.

[0255] The bin string of the encoded syntax elements can be output to the decoding apparatus 300 or to the outside in the form of a bitstream.

[0256] In the above embodiments, the method is described based on a flowchart as a series of steps or blocks, but this document is not limited to the order of steps, and some steps may occur in a different order or simultaneously with other steps than those described above. Also, those skilled in the art will understand that the steps shown in the flowcharts are not exclusive, and other steps may be included, or one or more steps of the flowcharts may be removed without affecting the scope of this document.

[0257] The method according to the present document described above 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 a device that performs video processing, such as a TV, a computer, a smartphone, a set-top box, a display device, etc.

[0258] When the embodiments in this document are implemented in software, the methods described above may be implemented with modules (steps, functions, etc.) performing the functions described above. The modules may be stored in a memory and executed by a processor. The memory may be internal or external to the processor and may be coupled to the processor in various ways as is well known. The processor may include an application-specific integrated circuit (ASIC), other chipsets, logic circuits, and / or data processing devices. The memory may include read-only memory (ROM), random access memory (RAM), flash memory, memory cards, storage media, and / or other storage devices. That is, the embodiments described in this document may be implemented and performed on a processor, microprocessor, controller, or chip. For example, the functional units shown in each figure may be implemented and performed on a computer, processor, microprocessor, controller, or chip.

[0259] In addition, the decoding device and encoding device to which this document is applied may be included in a multimedia broadcast transmitting / receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video 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 video (OTT) device, an internet streaming service providing device, a three-dimensional (3D) video device, a video telephone video device, a medical video device, etc., and may be used to process a video signal or a data signal. For example, an over-the-top video (OTT) device may include a game console, a Blu-ray player, an internet-connected TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), etc.

[0260] In addition, the processing method to which this document is applied may be produced in the form of a program executed by a computer, and may be stored in a computer-readable recording medium. Multimedia data having a data structure according to the present invention may also be stored in a computer-readable recording medium. The computer-readable recording medium includes all kinds of storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable recording medium may include, for example, a Blu-ray Disc (BD), a Universal Serial Bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. In addition, the computer-readable recording medium includes a medium realized in the form of a carrier wave (e.g., transmission via the Internet). In addition, a bit stream generated by the encoding method may be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network. In addition, the embodiments of this document may be realized in a computer program product by a program code, and the program code may be executed by a computer according to the embodiments of this document. The program code may be stored on a computer-readable carrier.

[0261] FIG. 13 shows an exemplary structure of a content streaming system to which this document is applied.

[0262] Furthermore, the content streaming system to which this document is applied can broadly include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.

[0263] 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 is applied, and the streaming server may temporarily store the bitstream during the process of transmitting or receiving the bitstream.

[0264] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server acts as a medium to inform the user of available services. When a user requests a desired service from the web server, the web server transfers the request to the streaming server, and the streaming server transmits multimedia data to the user. In this case, the content streaming system may include a separate control server, and in this case, the control server controls commands / responses between devices in the content streaming system.

[0265] The streaming server may receive content from a media storage and / or an encoding server. For example, when 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 in order to provide a smooth streaming service.

[0266] Examples of the user devices include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices such as smartwatches, smart glass, 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.

Claims

1. 1. A video decoding method performed by a decoding device, comprising: receiving residual information for a current block from a bitstream; deriving transform coefficients for the current block based on the residual information; deriving modified transform coefficients based on an inverse secondary transform on the transform coefficients; and deriving residual samples for the current block based on an inverse linear transform on the modified transform coefficients; The step of deriving the modified transform coefficients comprises: deriving a transformation kernel matrix; performing a matrix operation on the transformation coefficients and the transformation kernel matrix; The transformation kernel matrix is ​​derived based on a transformation index and a transformation set; The transformation index represents at least one of first index information indicating that the inverse secondary transformation is not applied to the current block, second index information indicating a first transformation kernel matrix as a transformation kernel matrix for the inverse secondary transformation, and third index information indicating a secondary transformation kernel matrix as the transformation kernel matrix for the inverse secondary transformation; The inverse secondary transformation includes performing a matrix operation on input data for an upper left region of the target block and deriving output data that is greater than the input data through the transformation kernel matrix; 11. A method for decoding an image, comprising: the input data for the top left region is in a top left 4x4 region of the target block; and the output data for the top left region is in a top left 4x4 region of the target block or a top left 8x8 region of the target block.

2. A video encoding method performed by an encoding device, comprising: deriving a residual sample for a current block; deriving transform coefficients for the current block based on a linear transform on the residual samples; deriving modified transform coefficients based on a quadratic transformation of the transform coefficients; encoding residual information associated with the modified transform coefficients and a transform index associated with a transform kernel matrix; The step of deriving the modified transform coefficients comprises: determining a transformation set and the transformation kernel matrix; performing a matrix operation on the transformation coefficients and the transformation kernel matrix; the transformation index represents at least one of first index information indicating that the secondary transformation is not applied to the current block, second index information indicating a first transformation kernel matrix as a transformation kernel matrix for the secondary transformation, and third index information indicating a secondary transformation kernel matrix as the transformation kernel matrix for the secondary transformation; The secondary transformation includes performing a matrix operation on input data for an upper left region of the target block and deriving output data that is smaller than the input data through the transformation kernel matrix; 11. The method of claim 10, wherein the input data for the top left region is in a top left 4x4 region of the target block or a top left 8x8 region of the target block, and the output data for the top left region is in a top left 4x4 region of the target block.

3. A method for transmitting data for a video, comprising the steps of: obtaining a bitstream for the video, the bitstream being generated based on: deriving residual samples for a current block, deriving transform coefficients for the current block based on a linear transformation of the residual samples, deriving modified transform coefficients based on a secondary transformation of the transform coefficients, and encoding residual information associated with the modified transform coefficients and transform indices associated with a transform kernel matrix to output the bitstream; transmitting the data including the bitstream; Deriving the modified transform coefficients comprises: determining a transformation set and the transformation kernel matrix; performing a matrix operation on the transform coefficients and the transform kernel matrix; the transformation index represents at least one of first index information indicating that the secondary transformation is not applied to the current block, second index information indicating a first transformation kernel matrix as a transformation kernel matrix for the secondary transformation, and third index information indicating a secondary transformation kernel matrix as the transformation kernel matrix for the secondary transformation; The secondary transformation is a process of performing a matrix operation on input data for the upper left region of the target block and deriving output data that is smaller than the input data through the transformation kernel matrix.

13. A method for transmitting data, wherein the input data for the upper left region is in a 4x4 region at the top left of the target block or a 8x8 region at the top left of the target block, and the output data for the upper left region is in a 4x4 region at the top left of the target block.

Citation Information

Patent Citations

  • Non-separable secondary transform for video coding

    WO2017058614A1

  • Transform method in image coding system and apparatus for same

    WO2018174402A1

  • Method and apparatus for video coding

    WO2019173522A1

  • Method for encoding / decoding video signal, and apparatus therefor

    WO2020050665A1