Transformation-based image compiling method and equipment

Through the transformation-based image compilation method, combined with high-frequency zeroing and multiple transformation selection, the compression and transmission efficiency problems of high-resolution images and videos are solved, and more efficient image/video compilation and storage are achieved.

CN119653107APending Publication Date: 2025-03-18NOKIA TECHNOLOGIES OY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411879880.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2019-08-08
Filing Date
2020-08-07
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The prior art is difficult to effectively compress and transmit or store high-resolution and high-quality images and videos, especially when meeting the needs of immersive media.

Method used

The transformation-based image compilation method is adopted to compile the transformation coefficients through high-frequency zeroing, and combined with multiple transformation selection to improve image compilation efficiency and reduce data loss.

Benefits of technology

Improve image/video compression efficiency, enhance residual compilation efficiency, and reduce data loss during high-frequency zeroing, thereby more efficiently processing high-resolution and high-quality images and videos.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119653107A_ABST
    Figure CN119653107A_ABST
Patent Text Reader

Abstract

The invention provides a transformation-based image compiling method and equipment. An image decoding method according to the present document includes a step of deriving a residual sample for a current block based on a transform coefficient, wherein the step of deriving the transform coefficient may include the steps of: determining whether a sub-block transform for performing a transform by a division coding unit is applied to the current block; determining whether multiple transform selection (MTS) using the plurality of transform cores is applied to the current block; and setting a size of a transform block to which the transform is to be applied, based on whether the sub-block transform is applied to the current block and whether the multiple transform selection is applied to the current block.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of a patent application with application number 202080064445.X (PCT / KR2020 / 010490) filed on March 14, 2022, application date on August 7, 2020, and titled “Transformation-based image coding method and device”. Technical Field

[0002] The present disclosure generally relates to image coding technology, and more particularly, to a transformation-based image coding method and device in an image coding system. Background Art

[0003] Recently, there is an increasing demand for high-resolution and high-quality images and videos such as ultra-high-definition (HUD) images and 4K or 8K or larger videos in various fields. As image and video data become high-resolution and high-quality, the amount of information or the number of bits transmitted relative to existing image and video data increases. Therefore, if a medium such as an existing wired or wireless broadband line is used to transmit image data or an existing storage medium is used to store image and video data, the transmission cost and storage cost increase.

[0004] In addition, recently, interest and demand for immersive media such as virtual reality (VR), artificial reality (AR) content or holograms are increasing. Broadcasting of images and videos whose image characteristics are different from those of real images, such as game images, is increasing.

[0005] Therefore, in order to effectively compress and transmit or store and play back information of high-resolution and high-quality images and videos having such various characteristics, efficient image and video compression technology is required. Summary of the invention

[0006] Technical issues

[0007] The technical aspect of the present disclosure is to provide a method and a device for improving image coding efficiency.

[0008] Another technical aspect of the present disclosure is to provide a method and device for improving residual coding efficiency.

[0009] Still another technical aspect of the present disclosure is to provide a method and apparatus for improving residual coding efficiency by coding transform coefficients based on high-frequency zeroing.

[0010] Yet another technical aspect of the present disclosure is to provide a method and apparatus for improving efficiency of image coding in which high frequency zeroing is performed based on multiple transform selections.

[0011] Still another technical aspect of the present disclosure is to provide a method and apparatus for coding an image, which can reduce data loss when performing high-frequency zeroing.

[0012] Another technical aspect of the present disclosure is to provide a method and apparatus for deriving a context model for last significant transform coefficient position information based on a current block size when a transform coefficient for a current block (or a current transform block) is coded based on high frequency zeroing.

[0013] Technical Solution

[0014] According to an embodiment of the present disclosure, an image decoding method performed by a decoding device is provided. The method includes: deriving a residual sample for a current block based on a transform coefficient, wherein the deriving of the transform coefficient includes determining whether a sub-block transform for performing a transform on a partitioned coding unit is applied to the current block, determining whether a multiple transform selection (MTS) using multiple transform cores is applied to the current block, and setting the size of the transform block to which the transform is to be applied based on whether the sub-block transform is applied to the current block and whether the multiple transform selection is applied to the current block.

[0015] The transform block includes a zero block indicating an area in which significant transform coefficients can exist in the current block.

[0016] The width or height of the zeroing block is set to 16 based on the sub-block transform being applied to the current block and the multiple transform selection being applied to the current block.

[0017] The width or height of the zeroing block is set to 32 or less based on whether the sub-block transform is not applied to the current block or the multiple transform selection is not applied to the current block.

[0018] Whether to apply the sub-block transform is determined based on flag information indicating whether the sub-block transform is applied to the current block, and the flag information is signaled at a coding unit level.

[0019] Whether to apply the multiple transform selection is determined based on flag information indicating whether the multiple transform selection is applied to the current block, and the flag information is signaled at a sequence parameter set level.

[0020] When the height of the partitioned subblock is less than 64 and the width of the subblock is 32, the width of the zeroing block is 16, and when the width of the subblock is less than 64 and the height of the subblock is 32, the height of the zeroing block is set to 16.

[0021] The residual information may include last significant coefficient prefix information, and a maximum value of the last significant coefficient prefix information may be derived based on the size of the return-to-zero block.

[0022] According to another embodiment of the present disclosure, there is provided an image encoding method performed by an encoding device. The method includes: deriving a transform coefficient based on a residual sample for a current block, wherein the derivation of the transform coefficient may include determining whether a sub-block transform for performing a transform on a partitioned coding unit is applied to the current block; determining whether a multiple transform selection (MTS) using multiple transform cores is applied to the current block; and setting the size of an area in which the transform coefficient to be inversely transformed exists during decoding based on whether the sub-block transform is applied to the current block and whether the multiple transform selection is applied to the current block.

[0023] According to still another embodiment of the present disclosure, a digital storage medium storing image data including encoded image information and a bit stream generated according to an image encoding method performed by an encoding device may be provided.

[0024] According to yet another embodiment of the present disclosure, a digital storage medium may be provided, which stores image data including encoded image information and a bit stream so that a decoding device performs an image decoding method.

[0025] Beneficial Effects

[0026] According to the present disclosure, the overall image / video compression efficiency can be improved.

[0027] According to the present disclosure, the efficiency of residual coding can be improved.

[0028] According to the present disclosure, the efficiency of residual coding may be improved by coding transform coefficients based on high frequency zeroing.

[0029] According to the present disclosure, the efficiency of image coding in which high frequency zeroing is performed based on multiple transform selection can be improved.

[0030] According to the present disclosure, data loss when performing high-frequency zeroing can be reduced, thereby improving the efficiency of image coding.

[0031] The effects that can be obtained by the specific examples of the present disclosure are not limited to the effects listed above. For example, there may be various technical effects that can be understood or derived from the present disclosure by ordinary technicians in the relevant field. Therefore, the specific effects of the present disclosure are not limited to the effects explicitly described in the present disclosure, and may include various effects that can be understood or derived from the technical features of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 is a diagram schematically illustrating a configuration of a video / image encoding device to which the present disclosure is applied.

[0033] Figure 2 is a diagram schematically illustrating a configuration of a video / image decoding device to which the present disclosure is applicable

[0034] Figure 3 The multiple transformation technology according to an embodiment of the present disclosure is schematically illustrated.

[0035] Figure 4 The intra directional mode for 65 prediction directions is shown as an example.

[0036] Figure 5 Illustrated is an MTS applied to sub-block transform according to an example of the present disclosure.

[0037] Figure 6 Illustrated is 32-point zeroing applied to a sub-block transform according to an example of the present disclosure.

[0038] Figure 7 is a flowchart illustrating the operation of a video decoding apparatus according to an embodiment of the present disclosure.

[0039] Figure 8 is a flowchart illustrating a process for deriving transform coefficients by a video decoding device according to an embodiment of the present disclosure.

[0040] Fig. 9 is a flowchart illustrating the operation of a video encoding apparatus according to an embodiment of the present disclosure.

[0041] FIG. 10 is a flowchart illustrating a process for encoding a transform coefficient and information by a video encoding apparatus according to an embodiment of the present disclosure.

[0042] Fig.11 Schematically illustrating an example of a video / image coding system to which the present disclosure is applicable

[0043] Fig.12 The structure of a content streaming system to which the present disclosure is applied is illustrated. DETAILED DESCRIPTION

[0044] Although the present disclosure may be susceptible to various modifications and includes various embodiments, its specific embodiments have been shown by way of example in the accompanying drawings, and will now be described in detail. However, this is not intended to limit the present disclosure to the specific embodiments disclosed herein. The terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the technical ideas of the present disclosure. Unless the context clearly indicates otherwise, the singular form may include the plural form. Terms such as "including" and "having" are intended to indicate the presence of features, numbers, steps, operations, elements, components, or combinations thereof used in the following description, and therefore should not be understood as precluding the possibility of the presence or addition of one or more different features, numbers, steps, operations, elements, components, or combinations thereof.

[0045] At the same time, in order to facilitate the description of different characteristic functions, each component on the drawings described in this article is independently illustrated, however, it is not intended that each component is implemented by separate hardware or software. For example, any two or more of these components can be combined to form a single component, and any single component can be divided into multiple components. Embodiments in which components are combined and / or divided will fall within the scope of the patent rights of the present disclosure as long as they do not depart from the essence of the present disclosure.

[0046] Hereinafter, preferred embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. In addition, in the accompanying drawings, the same reference numerals are used for the same components, and repeated description of the same components will be omitted.

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

[0048] In this document, various embodiments related to video / image coding may be provided, and unless otherwise specified, the embodiments may be combined with each other and performed.

[0049] In this document, a video may refer to a collection of a series of images over a period of time. Typically, a picture refers to a unit of an image representing a specific time region, and a slice / tile is a unit that constitutes a part of a picture. A slice / tile may include one or more coding tree units (CTUs). A picture may consist of one or more slices / tiles. A picture may consist of one or more tile groups. A tile group may include one or more tiles.

[0050] A pixel or a picture element (pel) may refer to the smallest unit constituting a picture (or image). In addition, a "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a pixel value, and may represent only a pixel / pixel value of a luminance component or only a pixel / pixel value of a chrominance component. Alternatively, a sample may mean a pixel value in a spatial domain, or when the pixel value is transformed into a frequency domain, it may mean a transform coefficient in a frequency domain.

[0051] A unit may represent a basic unit of image processing. A unit may include at least one of a specific region and information related to the region. A unit may include a luminance block and two chrominance (e.g., cb, cr) blocks. Depending on the situation, terms such as unit, block, region, etc. may be used interchangeably. In general, an M×N block may include a set (or array) of samples (or sample arrays) or transform coefficients consisting of M columns and N rows.

[0052] In this document, the terms " / " and "," should be interpreted as indicating "and / or". For example, the expression "A / B" may mean "A and / or B". In addition, "A, B" may mean "A and / or B". In addition, "A / B / C" may mean "at least one of A, B, and / or C". In addition, "A / B / C" may mean "at least one of A, B, and / or C".

[0053] In addition, in this document, the term "or" should be interpreted as indicating "and / or". For example, the expression "A or B" may include 1) only A, 2) only B, and / or 3) both A and B. In other words, the term "or" in this document should be interpreted as indicating "additionally or alternatively".

[0054] In the present disclosure, "at least one of A and B" may mean "only A", "only B", or "both A and B". In addition, in the present disclosure, the expression "at least one of A or B" or "at least one of A and / or B" may be interpreted as "at least one of A and B".

[0055] Furthermore, in the present disclosure, “at least one of A, B, and C” may mean “only A”, “only B”, “only C”, or “any combination of A, B, and C”. Furthermore, “at least one of A, B, or C” or “at least one of A, B and / or C” may mean “at least one of A, B, and C”.

[0056] In addition, the brackets used in the present disclosure may mean "for example". Specifically, when the indication is "prediction (intra-frame prediction)", it may mean that "intra-frame prediction" is proposed as an example of "prediction". In other words, the "prediction" of the present disclosure is not limited to "intra-frame prediction", and "intra-frame prediction" is proposed as an example of "prediction". In addition, when the indication is "prediction (ie, intra-frame prediction)", this may also mean that "intra-frame prediction" is proposed as an example of "prediction".

[0057] Technical features described separately in one drawing in the present disclosure may be implemented separately or may be implemented simultaneously.

[0058] Figure 1is a schematic diagram illustrating a configuration of a video / image encoding device to which an embodiment of the present document can be applied. Hereinafter, a video encoding device may include an image encoding device.

[0059] refer to Figure 1 , the encoding device 100 includes an image partitioner 110, a predictor 120, a residual processor 130, and an entropy encoder 140, an adder 150, a filter 160, and a memory 170. The predictor 120 may include an inter-frame predictor 121 and an intra-frame predictor 122. The residual processor 130 may include a transformer 132, a quantizer 133, a dequantizer 134, and an inverse transformer 135. The residual processor 130 may also include a subtractor 131. The adder 150 may be referred to as a reconstructor or a reconstructed block generator. According to an embodiment, the image partitioner 110, the predictor 120, the residual processor 130, the entropy encoder 140, the adder 150, and the filter 160 may be configured by at least one hardware component (e.g., an encoder chipset or processor). In addition, the memory 170 may include a decoded picture buffer (DPB) or may be configured by a digital storage medium. The hardware component may also include the memory 170 as an internal / external component.

[0060] The image partitioner 110 may partition an input image (or picture or frame) input to the encoding device 100 into one or more processing units. For example, a processor may be referred to as a coding unit (CU). In this case, the coding unit may be recursively partitioned from a coding tree unit (CTU) or a maximum coding unit (LCU) according to a quadtree binary tree ternary tree (QTBTTT) structure. For example, a coding unit may be partitioned into multiple coding units of a deeper depth based on a quadtree structure, a binary tree structure, and / or a ternary tree structure. In this case, for example, a quadtree structure may be applied first and a binary tree structure and / or a ternary tree structure may be applied later. Alternatively, a binary tree structure may be applied first. The coding process according to this document may be performed based on a final coding unit that is no longer partitioned. In this case, the maximum coding unit may be used as the final coding unit based on coding efficiency according to image characteristics, or, if necessary, the coding unit may be recursively partitioned into deeper coding units and a coding unit with an optimal size may be used as the final coding unit. Here, the coding process may include a process of prediction, transformation, and reconstruction, which will be described later. As another example, the processor may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may be split or partitioned from the aforementioned final coding unit. The prediction unit may be a unit for sample prediction, and the transform unit may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from a transform coefficient.

[0061] In some cases, a unit may be used interchangeably with terms such as a block or region. In general, an M×N block may represent a set of samples or transform coefficients consisting of M columns and N rows. A sample may generally represent a pixel or a value of a pixel, may represent only a pixel / pixel value of a luminance component, or may represent only a pixel / pixel value of a chrominance component. A sample may be used as a term corresponding to one picture (or image) of a pixel or a pel.

[0062] In the encoding device 100, a prediction signal (prediction block, prediction sample array) output from the inter predictor 121 or the intra predictor 122 is subtracted from an input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is sent to the transformer 132. In this case, as shown, the unit for subtracting the prediction signal (prediction block, prediction sample array) from the input image signal (original block, original sample array) in the encoding device 100 can be referred to as a subtractor 131. The predictor may perform prediction on a block to be processed (hereinafter, referred to as a current block) and generate a prediction block including prediction samples for the current block. The predictor may determine whether intra prediction or inter prediction is applied on a current block or CU basis. As described later in the description of each prediction mode, the predictor may generate various information related to prediction, such as prediction mode information, and send the generated information to the entropy encoder 140. Information about the prediction may be encoded in the entropy encoder 140 and output in the form of a bitstream.

[0063] The intra-frame predictor 122 can predict the current block by referring to the samples in the current picture. The referenced samples can be located near the current block or can be spaced according to the prediction mode. In intra-frame prediction, the prediction mode may include multiple non-directional modes and multiple directional modes. The non-directional mode may include, for example, a DC mode and a plane mode. Depending on the level of detail of the prediction direction, the directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes. However, this is only an example, and more or less directional prediction modes may be used depending on the setting. The intra-frame predictor 122 can determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring block.

[0064] The inter-frame predictor 121 may derive a prediction block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. Here, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be referred to as a collocated reference block, a collocated CU (colCU), etc., and the reference picture including the temporal neighboring block may be referred to as a collocated picture (colPic). For example, the inter-frame predictor 121 may construct a motion information candidate list based on the neighboring blocks and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter-frame prediction may be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the inter-frame predictor 121 may use the motion information of the neighboring block as the motion information of the current block. In the skip mode, unlike the merge mode, the residual signal may not be transmitted. In the case of the motion vector prediction (MVP) mode, the motion vector of the neighboring block may be used as a motion vector predictor and the motion vector of the current block may be indicated by signaling the motion vector difference.

[0065] The predictor 120 may generate a prediction signal based on various prediction methods described below. For example, the predictor may not only apply intra prediction or inter prediction to predict a block, but also apply intra prediction and inter prediction simultaneously. This may be referred to as combined inter and intra prediction (CIIP). In addition, the predictor may be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode may be used for content image / video coding of games, such as screen content coding (SCC). IBC basically performs prediction in the current picture, but may be performed similarly to inter prediction because 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. The palette mode may be considered an example of intra coding or intra coding. When the palette mode is applied, the sample values ​​within the picture may be signaled based on information about the palette table and the palette index.

[0066] The prediction signal generated by the predictor (including the inter-frame predictor 121 and / or the intra-frame predictor 122) can be used to generate a reconstruction signal or to generate a residual signal. The transformer 132 can generate a transform coefficient by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a karhunen-loève transform (KLT), a graph-based transform (GBT), or a conditional nonlinear transform (CNT). Here, GBT means a transform obtained from a graph when the relationship information between pixels is represented by a graph. CNT refers to a transform generated based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process can be applied to square pixel blocks of the same size or can be applied to blocks of variable size rather than square.

[0067] The quantizer 133 may quantize the transform coefficients and send them to the entropy encoder 140, and the entropy encoder 140 may encode the quantized signal (information about the quantized transform coefficients) and output a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantizer 133 may rearrange the block type quantized transform coefficients into a one-dimensional vector form based on the coefficient scanning order and generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. Information about the transform coefficients may be generated. The entropy encoder 140 may perform various encoding methods such as, for example, exponential Golomb, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), etc. The entropy encoder 140 may encode information necessary for video / image reconstruction other than the quantized transform coefficients (e.g., the values ​​of syntax elements, etc.) together or separately. The encoding information (e.g., encoded video / image information) may be transmitted or stored in units of NAL (network abstraction layer) in the form of a bitstream. The video / image information may also include information about various parameter sets such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. In this document, information and / or syntax elements sent / signaled from an encoding device to a decoding device may be included in the video / picture information. The video / image information may be encoded by the above-mentioned encoding process and included in a bitstream. The bitstream may be sent over a network or may be stored in a digital storage medium. The network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) that transmits a signal output from the entropy encoder 140 and / or a storage unit (not shown) that stores the signal may be included as an internal / external element of the encoding device 100, and alternatively, the transmitter may be included in the entropy encoder 140.

[0068] The quantized transform coefficients output from the quantizer 133 can be used to generate a prediction signal. For example, the residual signal (residual block or residual sample) can be reconstructed by applying dequantization and inverse transformation to the quantized transform coefficients via the dequantizer 134 and the inverse transformer 135. The adder 150 adds the reconstructed residual signal to the prediction signal output from the inter-frame predictor 121 or the intra-frame predictor 122 to generate a reconstructed signal (reconstructed image, reconstructed block, reconstructed sample array). If the block to be processed has no residual, such as the case where the skip mode is applied, the prediction block can be used as a reconstructed block. The adder 150 can be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used to perform intra-frame prediction on the next block to be processed in the current picture and can be used to perform inter-frame prediction on the next picture by filtering as described below.

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

[0070] The filter 160 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 160 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture and store the modified reconstructed picture in the memory 170 (specifically, the DPB of the memory 170). Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filter 160 can generate various information related to filtering as described later in the description of each filtering method and send the generated information to the entropy encoder 140. The information related to filtering can be encoded by the entropy encoder 140 and output in the form of a bit stream.

[0071] The modified reconstructed picture transmitted to the memory 170 may be used as a reference picture in the inter predictor 121. When inter prediction is applied by the encoding device, prediction mismatch between the encoding device 100 and the decoding device may be avoided and encoding efficiency may be improved.

[0072] The DPB of the memory 170 may store the modified reconstructed picture for use as a reference picture in the inter-frame predictor 121. The memory 170 may store the motion information of the block from which the motion information in the current picture is derived (or encoded) and / or the motion information of the reconstructed block in the picture. The stored motion information may be sent to the inter-frame predictor 121 and used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 170 may store the reconstructed samples of the reconstructed block in the current picture and may transmit the reconstructed samples to the intra-frame predictor 122.

[0073] Figure 2 is a schematic diagram illustrating a configuration of a video / image decoding device to which an embodiment of this document can be applied.

[0074] refer to Figure 2 , the decoding device 200 may include an entropy decoder 210, a residual processor 220, a predictor 230, an adder 240, a filter 250, and a memory 260. The predictor 230 may include an inter-frame predictor 231 and an intra-frame predictor 232. The residual processor 220 may include a dequantizer 221 and an inverse transformer 221. According to an embodiment, the entropy decoder 210, the residual processor 220, the predictor 230, the adder 240, and the filter 250 may be configured by a hardware component (e.g., a decoder chipset or a processor). In addition, the memory 260 may include a decoded picture buffer (DPB) or may be configured by a digital storage medium. The hardware component may also include a memory 260 as an internal / external component.

[0075] When a bit stream including video / image information is input, the decoding apparatus 200 can reconstruct the bit stream corresponding to the bit stream in the video / image format. Figure 1 The decoding device 200 may derive a unit / block based on block partition related information obtained from a bitstream. The decoding device 200 may perform decoding using a processor applied in the encoding device. Therefore, the decoding processor may be, for example, a coding unit, and the coding unit may be partitioned from a coding tree unit or a maximum coding unit according to a quadtree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units may be derived from the coding unit. The reconstructed image signal decoded and output by the decoding device 200 may be reproduced by a reproduction device.

[0076] The decoding device 200 can receive the Figure 1The signal output by the encoding device of the encoding device, and the received signal can be decoded by the entropy decoder 210. For example, the entropy decoder 210 can parse the bitstream to derive information (e.g., video / image information) necessary for image reconstruction (or picture reconstruction). The video / image information may also include information about various parameter sets such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. The decoding device may also decode the picture based on the information about the parameter set and / or the general constraint information. The information and / or syntax elements signaled / received described later in this document may be decoded and obtained from the bitstream by a decoding process. For example, the entropy decoder 210 decodes the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and outputs syntax elements required for image reconstruction and quantized values ​​of transform coefficients for the residual. More specifically, the CABAC entropy decoding method may receive a bin corresponding to each syntax element in a bitstream, use the decoded information of the decoded target syntax element information, the decoded information of the decoded target block, or the information of the symbol / bin decoded in the previous stage to determine the context model, and perform arithmetic decoding on the bin by predicting the probability of occurrence of the bin according to the determined context model, and generate a symbol corresponding to the value of each syntax element. In this case, the CABAC entropy decoding method may update the context model by using the decoded symbol / bin information for the context model of the next symbol / bin after determining the context model. The information related to prediction among the information decoded by the entropy decoder 210 may be provided to the predictor (inter-frame predictor 232 and intra-frame predictor 231), and the residual value, i.e., the quantized transform coefficient and the related parameter information, which are entropy decoded in the entropy decoder 210, may be input to the residual processor 220. The residual processor 220 may derive a residual signal (residual block, residual sample, residual sample array). In addition, information about filtering among the information decoded by the entropy decoder 210 may be provided to the filter 250. Meanwhile, a receiver (not shown) for receiving a signal output from the encoding device may be further configured as an internal / external element of the decoding device 200, or the receiver may be a component of the entropy decoder 210. Meanwhile, the decoding device according to the present document may be referred to as a video / image / picture decoding device, and the decoding device may be classified into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder).The information decoder may include an entropy decoder 210 , and the sample decoder may include at least one of a dequantizer 221 , an inverse transformer 222 , an adder 240 , a filter 250 , a memory 260 , an inter predictor 232 , and an intra predictor 231 .

[0077] The dequantizer 221 may dequantize the quantized transform coefficient and output the transform coefficient. The dequantizer 221 may rearrange the quantized transform coefficient in the form of a two-dimensional block form. In this case, the rearrangement may be performed based on the coefficient scanning order performed in the encoding device. The dequantizer 221 may perform dequantization on the quantized transform coefficient by using a quantization parameter (e.g., quantization step size information) and obtain the transform coefficient.

[0078] The inverse transformer 222 performs an inverse transform on the transform coefficients to obtain a residual signal (residual block, residual sample array).

[0079] The predictor may perform prediction on the current block and generate a prediction block including prediction samples of the current block. The predictor may determine whether to apply intra prediction or inter prediction to the current block based on information about the prediction output from the entropy decoder 210 and may determine a specific intra / inter prediction mode.

[0080] The predictor 220 may generate a prediction signal based on various prediction methods described below. For example, the predictor may not only apply intra prediction or inter prediction to predict a block, but also apply intra prediction and inter prediction simultaneously. This may be referred to as combined inter and intra prediction (CIIP). In addition, the predictor may be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode may be used for content image / video coding of games, such as screen content coding (SCC). IBC basically performs prediction in the current picture, but may be performed similarly to inter prediction because 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. The palette mode may be considered an example of intra coding or intra coding. When the palette mode is applied, the sample values ​​within the picture may be signaled based on information about the palette table and the palette index.

[0081] The intra-frame predictor 231 can predict the current block by referring to samples in the current picture. The reference samples can be located near the current block or can be spaced according to the prediction mode. In intra-frame prediction, the prediction mode can include multiple non-directional modes and multiple directional modes. The intra-frame predictor 231 can determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring block.

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

[0083] The adder 240 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the predictor (including the inter-frame predictor 232 and / or the intra-frame predictor 231). If the block to be processed has no residual, such as when the skip mode is applied, the prediction block can be used as the reconstructed block.

[0084] The adder 240 may be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of the next block to be processed in the current picture, may be output through filtering as described below, or may be used for inter prediction of the next picture.

[0085] Meanwhile, luminance mapping with chroma scaling (LMCS) can be applied during picture decoding.

[0086] The filter 250 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 250 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture and store the modified reconstructed picture in the memory 260 (specifically, the DPB of the memory 260). Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.

[0087] The (modified) reconstructed picture stored in the DPB of the memory 260 may be used as a reference picture in the inter-frame predictor 232. The memory 260 may store the motion information of the block from which the motion information in the current picture is derived (or decoded) and / or the motion information of the block that has been reconstructed in the picture. The stored motion information may be sent to the inter-frame predictor 160 to be used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 260 may store the reconstructed samples of the reconstructed block in the current picture and send the reconstructed samples to the intra-frame predictor 231.

[0088] In this document, the embodiments described in the filter 160, the inter-frame predictor 121, and the intra-frame predictor 122 of the encoding device 100 may be the same as the filter 250, the inter-frame predictor 232, and the intra-frame predictor 231 of the decoding device 200 or correspond to the filter 250, the inter-frame predictor 232, and the intra-frame predictor 231 of the decoding device 200, respectively.

[0089] As described above, in performing video coding, prediction is performed to improve compression efficiency. A prediction block including prediction samples for a current block, i.e., a target coding block, can be generated by prediction. In this case, the prediction block includes prediction samples in a spatial domain (or a pixel domain). The prediction block is derived identically in the encoding device and the decoding device. The encoding device can improve image coding efficiency by signaling information (residual information) about the residual between the original block, rather than the original sample value of the original block itself, and the prediction block to the decoding device. The decoding device can derive a residual block including residual samples based on the residual information, can generate a reconstructed image including reconstructed samples by adding the residual block and the prediction block, and can generate a reconstructed picture including the reconstructed block.

[0090] The residual information may be generated by a transformation and quantization process. For example, the encoding device may derive a residual block between the original block and the prediction block, may derive a transform coefficient by performing a transformation process on a residual sample (residual sample array) included in the residual block, may derive a quantized transform coefficient by performing a quantization process on the transform coefficient, and may signal the relevant residual information to the decoding device (through a bitstream). In this case, the residual information may include information such as value information, position information, transformation scheme, transform kernel, and quantization parameter of the quantized transform coefficient. The decoding device may perform a dequantization / inverse transformation process based on the residual information, and may derive a residual sample (or residual block). The decoding device may generate a reconstructed picture based on the prediction block and the residual block. In addition, the encoding device may derive a residual block for reference to inter-frame prediction of a subsequent picture by dequantizing / inverse transforming the quantized transform coefficient, and may generate a reconstructed picture.

[0091] Figure 3The multiple transformation technology according to an embodiment of the present disclosure is schematically illustrated.

[0092] refer to Figure 3 , the transformer can correspond to the previous Figure 1 The converter in the encoding device, and the inverse converter may correspond to the previous Figure 1 The inverse transformer in the encoding device of Figure 2 An inverse transformer in a decoding device.

[0093] The transformer may derive (primary) transform coefficients by performing a primary transform based on the residual samples (residual sample array) in the residual block (S310). This primary transform may be referred to as a core transform. In this document, the primary transform may be based on a multi-transform selection (MTS), and when a multi-transform is applied as the primary transform, it may be referred to as a multi-core transform.

[0094] The multi-core transform may refer to a method of performing transform using discrete cosine transform (DCT) type 2 and discrete sine transform (DST) type 7, DCT type 8, and / or DST type 1 additionally. That is, the multi-core transform may refer to a transform method of transforming a residual signal (or residual block) in the spatial domain into a transform coefficient (or primary transform coefficient) in the frequency domain based on a plurality of transform kernels selected from DCT type 2, DST type 7, DCT type 8, and DST type 1. In this article, the primary transform coefficient may be referred to as a temporary transform coefficient from the perspective of the transformer.

[0095] In other words, when a conventional transform method is applied, a transform coefficient can be generated by applying a transform from the spatial domain to the frequency domain to a residual signal (or residual block) based on DCT type 2. In contrast, when a multi-core transform is applied, a transform coefficient (or primary transform coefficient) can be generated by applying a transform from the spatial domain to the frequency domain to a residual signal (or residual block) based on DCT type 2, DST type 7, DCT type 8, and / or DST type 1. In this document, DCT type 2, DST type 7, DCT type 8, and DST type 1 may be referred to as a transform type, a transform kernel, or a transform core. These DCT / DST transform types may be defined based on basis functions.

[0096] When performing a multi-core transform, a vertical transform core and a horizontal transform core for a target block may be selected from the transform cores, a vertical transform may be performed on the target block based on the vertical transform core, and a horizontal transform may be performed on the target block based on the horizontal transform core. Here, the horizontal transform may indicate a transform of a horizontal component of the target block, and the vertical transform may indicate a transform of a vertical component of the target block. The vertical transform core / horizontal transform core may be adaptively determined based on a prediction mode and / or a transform index of a target (CU or subblock) including a residual block.

[0097] In addition, according to the example, if the primary transform is performed by applying MTS, the mapping relationship of the transform kernel can be set by setting a specific basis function to a predetermined value and combining the basis functions to be applied in the vertical transform or the horizontal transform. For example, when the horizontal transform kernel is represented as trTypeHor and the vertical transform kernel is represented as trTypeVer, trTypeHor or trTypeVer with a value of 0 can be set to DCT2, trTypeHor or trTypeVer with a value of 1 can be set to DST7, and trTypeHor or trTypeVer with a value of 2 can be set to DCT8.

[0098] In this case, the MTS index information may be encoded and signaled to the decoding device to indicate any one of the plurality of transform kernel sets. For example, an MTS index of 0 may indicate that both trTypeHor and trTypeVer values ​​are 0, an MTS index of 1 may indicate that both trTypeHor and trTypeVer values ​​are 1, an MTS index of 2 may indicate that both trTypeHor and trTypeVer values ​​are 2, an MTS index of 3 may indicate that both trTypeHor and trTypeVer values ​​are 1, and an MTS index of 4 may indicate that both trTypeHor and trTypeVer values ​​are 2.

[0099] In one example, the transformation core set according to the MTS index information is shown in the following table.

[0100] [Table 1]

[0101] tu_mts_idx[x0][y0] 0 1 2 3 4 trTypeHor 0 1 2 1 2 trTypeVer 0 1 1 2 2

[0102] The transformer may derive modified (secondary) transform coefficients (S320) by performing a secondary transform based on the (primary) transform coefficients. The primary transform is a transform from the spatial domain to the frequency domain, while the secondary transform refers to a transform into a more compressive representation by using the correlation between the (primary) transform coefficients. The secondary transform may include an inseparable transform. In this case, the secondary transform may be referred to as an inseparable secondary transform (NSST) or a mode-dependent inseparable secondary transform (MDNSST). An inseparable secondary transform may represent a transform that generates a modified transform coefficient (or secondary transform coefficient) for a residual signal by performing a secondary transform on the (primary) transform coefficients derived by the primary transform based on an inseparable transform matrix. At this time, the vertical transform and the horizontal transform may not be applied separately to the (primary) transform coefficients (or the horizontal transform and the vertical transform may not be applied independently), but the transform may be applied once based on the inseparable transform matrix. In other words, the inseparable secondary transform may refer to a transform method in which the vertical component and the horizontal component of the (primary) transform coefficient are not separated, and, for example, a two-dimensional signal (transform coefficient) is rearranged into a one-dimensional signal through a certain determined direction (e.g., a row first direction or a column first direction), and then the modified transform coefficient (or secondary transform coefficient) is generated based on the inseparable transform matrix. For example, according to the row priority order, the M×N blocks are arranged in a row in the order of the first row, the second row, ... and the Nth row. According to the column priority order, the M×N blocks are arranged in a row in the order of the first column, the second column, ... and the Mth column. The inseparable secondary transform may be applied to the left top area of ​​a block (hereinafter, may be referred to as a transform coefficient block) configured with the (primary) transform coefficient. For example, if the width (W) and the height (H) of the transform coefficient block are both equal to or greater than 8, an 8×8 inseparable secondary transform may be applied to the left top 8×8 area of ​​the transform coefficient block. In addition, if the width (W) and height (H) of the transform coefficient block are both equal to or greater than 4, and the width (W) or height (H) of the transform coefficient block is less than 8, a 4×4 non-separable sub-transform may be applied to the top left min(8,W)×min(8,H) region of the transform coefficient block. However, the embodiment is not limited thereto, and for example, even if only the condition that the width (W) or height (H) of the transform coefficient block is equal to or greater than 4 is satisfied, a 4×4 non-separable sub-transform may be applied to the top left min(8,W)×min(8,H) region of the transform coefficient block.

[0103] Specifically, for example, if a 4×4 input block is used, the non-separable secondary transform may be performed as follows.

[0104] A 4×4 input block X can be represented as follows.

[0105] [Formula 1]

[0106]

[0107] If X is represented as a vector, then the vector It can be expressed as follows.

[0108] [Formula 2]

[0109]

[0110] In formula 2, the vector is a one-dimensional vector obtained by rearranging the two-dimensional block X of Equation 1 according to the row-major order.

[0111] In this case, the inseparable secondary transform can be calculated as follows.

[0112] [Formula 3]

[0113]

[0114] In this formula, denotes a transform coefficient vector and T denotes a 16×16 (non-separable) transform matrix.

[0115] By using the above formula 3, the 16×1 transform coefficient vector can be derived And the vector can be divided into two parts by scanning order (horizontally, vertically, diagonally, etc.) Reorganized into 4×4 blocks. However, the above calculation is an example, and Hypercube-Givens Transform (HyGT) or the like may also be used for the calculation of the inseparable secondary transform in order to reduce the calculation complexity of the inseparable secondary transform.

[0116] Meanwhile, in the inseparable secondary transform, the transform kernel (or transform core, transform type) may be selected to be mode-dependent. In this case, the mode may include an intra prediction mode and / or an inter prediction mode.

[0117] As described above, an inseparable secondary transform may be performed based on an 8×8 transform or a 4×4 transform determined based on the width (W) and height (H) of the transform coefficient block. The 8×8 transform refers to a transform that can be applied to an 8×8 region included in a transform coefficient block when both W and H are equal to or greater than 8, and the 8×8 region may be the top left 8×8 region in the transform coefficient block. Similarly, the 4×4 transform refers to a transform that can be applied to a 4×4 region included in a transform coefficient block when both W and H are equal to or greater than 4, and the 4×4 region may be the top left 4×4 region in the transform coefficient block. For example, an 8×8 transform kernel matrix may be a 64×64 / 16×64 matrix, and a 4×4 transform kernel matrix may be a 16×16 / 8×16 matrix.

[0118] Here, in order to select the mode-dependent transform cores, two inseparable secondary transform cores may be configured for each transform set of inseparable secondary transforms for both the 8×8 transform and the 4×4 transform, and there may be four transform sets. That is, four transform sets may be configured for the 8×8 transform, and four transform sets may be configured for the 4×4 transform. In this case, each of the four transform sets for the 8×8 transform may include two 8×8 transform cores, and each of the four transform sets for the 4×4 transform may include two 4×4 transform cores.

[0119] However, as the size of the transform (ie, the size of the region to which the transform is applied) may be, for example, a size other than 8×8 or 4×4, the number of sets may be n, and the number of transform kernels in each set may be k.

[0120] The transform set may be referred to as an NSST set or a LFNST set. A specific set among the transform sets may be selected, for example, based on the intra prediction mode of the current block (CU or subblock). A low frequency non-separable transform (LFNST) may be an example of a reduced non-separable transform, which will be described later, and represents a non-separable transform for a low frequency component.

[0121] For reference, for example, the intra prediction mode may include two non-directional (or non-angle) intra prediction modes and 65 directional (or angle) intra prediction modes. The non-directional intra prediction mode may include a plane intra prediction mode No. 0 and a DC intra prediction mode No. 1, and the directional intra prediction mode may include 65 intra prediction modes No. 2 to No. 66. However, this is an example, and this document may be applied even if the number of intra prediction modes is different. In addition, in some cases, intra prediction mode No. 67 may also be used, and intra prediction mode No. 67 may represent a linear model (LM) mode.

[0122] Figure 4 The intra directional mode for 65 prediction directions is schematically shown.

[0123] Reference Figure 4 , based on the intra prediction mode 34 having the upper left diagonal prediction direction, the intra prediction mode can be divided into an intra prediction mode having a horizontal directionality and an intra prediction mode having a vertical directionality. Figure 4In , H and V indicate horizontal directivity and vertical directivity, respectively, and numbers -32 to 32 indicate displacements of 1 / 32 units on sample grid positions. These numbers may represent offsets for mode index values. Intra-prediction modes 2 to 33 have horizontal directivity, and intra-prediction modes 34 to 66 have vertical directivity. Strictly speaking, intra-prediction mode 34 may be considered to be neither horizontal nor vertical, but may be classified as belonging to horizontal directivity when determining a transform set for a secondary transform. This is because the input data is transposed for a vertical orientation mode symmetrical based on intra-prediction mode 34, and an input data alignment method for a horizontal mode is used for intra-prediction mode 34. Transposing the input data means switching rows and columns of two-dimensional M×N block data to N×M data. Intra-prediction mode 18 and intra-prediction mode 50 may represent a horizontal intra-prediction mode and a vertical intra-prediction mode, respectively, and intra-prediction mode 2 may be referred to as an upper right diagonal intra-prediction mode because intra-prediction mode 2 has a left reference pixel and performs prediction in the upper right direction. Similarly, intra-prediction mode 34 may be referred to as a bottom-right diagonal intra-prediction mode, and intra-prediction mode 66 may be referred to as a bottom-left diagonal intra-prediction mode.

[0124] According to an example, four transform sets according to intra prediction modes may be mapped, for example, as shown in the following table.

[0125] [Table 2]

[0126] lfnstPredModeIntra lfnstTrSetIdx lfnstPredModeIntra<0 1 0<=lfnstPredModeIntra<=1 0 2<=lfnstPredModeIntra<=12 1 13<=lfnstPredModeIntra<=23 2 24<=lfnstPredModeIntra<=44 3 45<=lfnstPredModeIntra<=55 2 56<=lfnstPredModeIntra<=80 1 81<=lfnstPredModeIntra<=83 0

[0127] As shown in Table 2, any one of four transform sets, ie, lfnstTrSetIdx, may be mapped to any one of four indexes (ie, 0 to 3) according to the intra prediction mode.

[0128] When it is determined that a specific set is used for an inseparable transform, one of the k transform cores in the specific set can be selected by an inseparable secondary transform index. The encoding device can derive an inseparable secondary transform index indicating a specific transform core based on a rate-distortion (RD) check, and can signal the inseparable secondary transform index to the decoding device. The decoding device can select one of the k transform cores in a specific set based on the inseparable secondary transform index. For example, lfnst index value 0 can refer to a first inseparable secondary transform core, lfnst index value 1 can refer to a second inseparable secondary transform core, and lfnst index value 2 can refer to a third inseparable secondary transform core. Alternatively, lfnst index value 0 can indicate that the first inseparable secondary transform is not applied to the target block, and lfnst index values ​​1 to 3 can indicate three transform cores.

[0129] The transformer can perform an inseparable secondary transform based on the selected transform kernel, and can obtain modified (secondary) transform coefficients. As described above, the modified transform coefficients can be derived as transform coefficients quantized by a quantizer, and can be encoded and signaled to a decoding device, and transmitted to a dequantizer / inverse transformer in an encoding device.

[0130] At the same time, as described above, if the secondary transform is omitted, the (primary) transform coefficients that are the output of the primary (separable) transform can be derived as transform coefficients quantized by the quantizer as described above, and can be encoded and signaled to the decoding device and transmitted to the dequantizer / inverse transformer in the encoding device.

[0131] The inverse transformer may perform a series of processes in the reverse order of the order already performed in the above-mentioned transformer. The inverse transformer may receive (dequantized) transform coefficients, and derive (primary) transform coefficients by performing a secondary (inverse) transform (S350), and may obtain a residual block (residual sample) by performing a primary (inverse) transform on the (primary) transform coefficients (S360). In this regard, from the perspective of the inverse transformer, the primary transform coefficients may be referred to as modified transform coefficients. As described above, the encoding device and the decoding device may generate a reconstructed block based on the residual block and the prediction block, and may generate a reconstructed picture based on the reconstructed block.

[0132] The decoding device may further include a secondary inverse transform application determiner (or an element for determining whether to apply a secondary inverse transform) and a secondary inverse transform determiner (or an element for determining a secondary inverse transform). The secondary inverse transform application determiner may determine whether to apply a secondary inverse transform. For example, the secondary inverse transform may be NSST, RST, or LFNST, and the secondary inverse transform application determiner may determine whether to apply a secondary inverse transform based on a secondary transform flag obtained by parsing a bitstream. In another example, the secondary inverse transform application determiner may determine whether to apply a secondary inverse transform based on a transform coefficient of a residual block.

[0133] The secondary inverse transform determiner may determine the secondary inverse transform. In this case, the secondary inverse transform determiner may determine the secondary inverse transform applied to the current block based on the LFNST (NSST or RST) transform set specified according to the intra prediction mode. In an embodiment, the secondary transform determination method may be determined depending on the primary transform determination method. Various combinations of the primary transform and the secondary transform may be determined according to the intra prediction mode. In addition, in an example, the secondary inverse transform determiner may determine the area to which the secondary inverse transform is applied based on the size of the current block.

[0134] Meanwhile, as described above, if the secondary (inverse) transform is omitted, the (dequantized) transform coefficients may be received, the primary (separable) inverse transform may be performed, and the residual block (residual sample) may be obtained. As described above, the encoding device and the decoding device may generate a reconstructed block based on the residual block and the prediction block, and may generate a reconstructed picture based on the reconstructed block.

[0135] Meanwhile, in the present disclosure, a reduced secondary transform (RST) in which the size of a transformation matrix (kernel) is reduced may be applied in the concept of NSST in order to reduce the amount of calculation and storage required for an inseparable secondary transform.

[0136] At the same time, the transformation kernel, transformation matrix, and coefficients constituting the transformation kernel matrix described in the present disclosure, that is, the kernel coefficients or matrix coefficients, can be represented by 8 bits. This can be a condition for implementation in a decoding device and an encoding device, and compared with the existing 9 bits or 10 bits, the amount of storage required to store the transformation kernel can be reduced, and performance degradation can be reasonably adapted. In addition, representing the kernel matrix with 8 bits can allow the use of small multipliers and can be more suitable for single instruction multiple data (SIMD) instructions for optimal software implementation.

[0137] In the present specification, the term "RST" may refer to a transformation performed on residual samples of a target block based on a transformation matrix whose size is reduced according to a reduction factor. In the case of performing a reduced transformation, the amount of calculation required for the transformation can be reduced due to the reduction in the size of the transformation matrix. That is, RST can be used to solve the computational complexity problem that occurs when transforming a block of large size or an inseparable transform.

[0138] RST may be referred to as various terms such as reduced transform, reduced secondary transform, downscaled transform, simplified transform, and simple transform, and the names that RST may be referred to as are not limited to the listed examples. Alternatively, since RST is mainly performed in a low-frequency region including non-zero coefficients in a transform block, it may be referred to as a low-frequency non-separable transform (LFNST). A transform index may be referred to as a LFNST index.

[0139] Meanwhile, when performing a secondary inverse transform based on the RST, the inverse transformer 135 of the encoding device 100 and the inverse transformer 222 of the decoding device 200 may include an inverse reduction secondary transformer that derives a modified transform coefficient based on an inverse RST of the transform coefficient, and an inverse primary transformer that derives a residual sample for a target block based on an inverse primary transform of the modified transform coefficient. The inverse primary transform refers to an inverse transform of a primary transform applied to the residual. In the present disclosure, deriving a transform coefficient based on a transform may refer to deriving a transform coefficient by applying a transform.

[0140] Hereinafter, a reduced multiple transform technique (Reduced Adaptive Multiple Selection (or Set) (RMTS)) is described.

[0141] As described above, when a combination of multiple transforms (DCT-2, DST-7, DCT-8, DST-1, DCT-5, etc.) is selectively used for primary transform in a multi-transform technique (multi-transform set or adaptive multi-transform), the transform can be applied only to a predefined area to reduce complexity instead of performing the transform in all cases, thereby significantly reducing complexity in the worst case.

[0142] For example, when the primary transform is applied to an M×M pixel block based on the previous reduced transform (RT) method, calculation may be performed only on the transform block of the R×R block (M>=R) instead of obtaining the M×M transform block. As a result, the non-zero significant coefficients exist only in the R×R region, and the transform coefficients in other regions may be considered to be zero without being calculated. The following table illustrates three examples of reduced adaptive multi-transform (RAMT) using predefined reduced transform factor (R) values ​​for the size of the block to which the primary transform is applied.

[0143] [Table 3]

[0144] Change size Reduction Transform 1 Reduction Transform 2 Reduction Transform 3 8x8 4x4 6x6 6x6 16x16 8x8 12x12 8x8 32x32 16x16 16x16 16x16 64x64 32x32 16x16 16x16 128x128 32x32 16x16 16x16

[0145] According to an example, when applying the reduced multi-transform illustrated above, the reduced transform factor can be determined based on the primary transform. For example, when the primary transform is DCT2, the calculation is simpler than other primary transforms, and therefore the reduced transform may not be used for small blocks or a relatively large R value may be used for small blocks, thereby minimizing the reduction in coding performance. For example, different reduced transform factors can be used for DCT2 and other transforms as follows.

[0146] [Table 4]

[0147] Change size Downscaling transform for DCT2 Downscaling transforms other than DCT2 8x8 8x8 4x4 16x16 16x16 8x8 32x32 32x32 16x16 64x64 32x32 32x32 128x128 32x32 32x32

[0148] As shown in Table 4, when the primary transform is DCT2, the size of the transform does not change when the size of the block to be transformed is 8×8 or 16×16, and the reduced size of the transform is limited to 32×32 when the size of the block is 32×32 or larger.

[0149] Alternatively, according to the example, when the flag value indicating whether MTS is applied is 0 (i.e., when DCT2 is applied for both the horizontal and vertical directions), for both (horizontal and vertical) directions, only 32 coefficients from the left and top may be left and the high-frequency components may be zeroed, that is, set to 0 (zeroing implementation 1).

[0150] For example, in a 64×64 transform unit (TU), the transform coefficients remain only in the left top 32×32 area, in a 64×16 TU, the transform coefficients remain only in the left top 32×16 area, and in an 8×64 TU, the transform coefficients remain only in the left top 8×32 area. That is, there are transform coefficients corresponding to only up to a maximum length of 32 in both width and height.

[0151] This zeroing method may be applied only to a residual signal to which intra prediction is applied or may be applied only to a residual signal to which inter prediction is applied. Alternatively, the zeroing method may be applied to both a residual signal to which intra prediction is applied and a residual signal to which inter prediction is applied.

[0152] The change in the transform block size that can be expressed as the previous zeroing or high-frequency zeroing refers to the process of zeroing (determining to be 0) the transform coefficients related to high frequencies of a certain value or more in a (transform) block having a first width (or length) of W1 and a first height (or length) of H1. When high-frequency zeroing is applied, the transform coefficient values ​​of all transform coefficients outside the low-frequency transform coefficient area configured based on the second width of W2 and the second height of H2 among the transform coefficients in the (transform) block can be determined (set) to 0. The outside of the low-frequency transform coefficient area can be referred to as a high-frequency transform coefficient area. In the example, the low-frequency transform coefficient area can be a rectangular area starting from the top left of the (transform) block.

[0153] That is, high frequency zeroing may be defined as setting all transform coefficients at positions defined by an x-coordinate of w or greater and a y-coordinate of h or greater to 0, wherein the horizontal x-coordinate value of the top left position of the current transform block (TB) is set to 0 and its vertical y-coordinate value is set to 0 (and wherein the x-coordinate increases from left to right and the y-coordinate increases downward).

[0154] In the present disclosure, specific terms or expressions for defining specific information or concepts are used. For example, as described above, in the present specification, a process of zeroing a transform coefficient corresponding to a frequency of a specific value or greater in a (transform) block having a first width (or length) of W1 and a first height (or length) of H1 is defined as "high-frequency zeroing", an area that has been subjected to zeroing by high-frequency zeroing is defined as a "high-frequency transform coefficient area", and an area that has not been subjected to zeroing is defined as a "low-frequency transform coefficient area". In order to indicate the size of the low-frequency transform coefficient area, a second width (or length) of W2 and a second height (or length) of H2 are used.

[0155] However, "high frequency zeroing" can be replaced with various terms such as high frequency zeroing, high frequency zeroing-out, high-frequency zeroing-out, high-frequency zeroing-out, and zero-out, and "high frequency transform coefficient area" can be replaced with various terms such as high frequency zeroing application area, high frequency zeroing area, high frequency area, high frequency coefficient area, high frequency zeroing area, and zeroing area, and "low frequency transform coefficient area" can be replaced with various terms such as high frequency zeroing non-application area, low frequency area, low frequency coefficient area, and restricted area. Therefore, specific terms or expressions used herein to define specific information or concepts need to be interpreted throughout the specification in view of various operations, functions, and effects according to the content indicated by the term, without being limited to the specification.

[0156] Alternatively, according to an example, the low-frequency transform coefficient region refers to the region remaining after high-frequency zeroing is performed or the region in which valid transform coefficients are left, that is, the region where non-zero transform coefficients may exist, and may be referred to as a zeroing region or a zeroing block.

[0157] According to an example, when the flag value indicating whether MTS is applied is 1, that is, when a different transform (DST-7 or DCT-8) other than DCT2 is applied to the horizontal and vertical directions, the transform coefficients can be left only in the left top area, and the remaining area can be zeroed as follows (zeroing implementation 2).

[0158] -When the width (w) is equal to or greater than 2 n When, only from the left and w / 2 p The transform coefficients corresponding to the length of can be retained, and the remaining transform coefficients can be fixed to 0 (returned to zero).

[0159] -When the height (h) is equal to or greater than 2 m When only from the top with h / 2 q The transform coefficients corresponding to the length of can be retained, and the remaining transform coefficients can be fixed to 0 (returned to zero).

[0160] Here, m, n, p, and q may be integers equal to or greater than 0, and may be specifically as follows.

[0161] 1)(m,n,p,q)=(5,5,1,1)

[0162] 2)(m,n,p,q)=(4,4,1,1)

[0163] In configuration 1), the transform coefficients remain only in the top left 16x16 region in a 32x16 TU, and the transform coefficients remain only in the top left 8x16 region in an 8x32 TU.

[0164] This zeroing method may be applied only to the residual signal to which intra prediction is applied or may be applied only to the residual signal to which inter prediction is applied. Alternatively, the zeroing method may be applied to both the residual signal to which intra prediction is applied and the residual signal to which inter prediction is applied.

[0165] Alternatively, according to another example, when the flag value indicating whether MTS is applied is 1, that is, when a different transform (DST-7 or DCT-8) other than DCT2 is applied to the horizontal and vertical directions, the transform coefficients can be left only in the left top area, and the remaining area can be zeroed as follows (zeroing implementation 3).

[0166] - When the height (h) is equal to or greater than the width (w) and equal to or greater than 2 n When only the left top w×(h / 2 p ) area may be left behind, and the remaining transform coefficients may be fixed to 0 (zeroed).

[0167] -When the width (w) is greater than the height (h) and is equal to or greater than 2 m When only the left top (w / 2 q )×h region may be left behind, and the remaining transform coefficients may be fixed to 0 (return to zero).

[0168] Under the above conditions, when the height (h) and width (w) are the same, the vertical length is reduced (h / 2p), but the horizontal length can also be reduced (w / 2q).

[0169] Here, m, n, p, and q may be integers equal to or greater than 0, and may be specifically as follows.

[0170] 1)(m,n,p,q)=(4,4,1,1)

[0171] 2)(m,n,p,q)=(5,5,1,1)

[0172] In configuration 1), the transform coefficients remain only in the top left 16x16 region in a 32x16 TU, and the transform coefficients remain only in the top left 8x8 region in an 8x16 TU.

[0173] This zeroing method may be applied only to the residual signal to which intra prediction is applied or may be applied only to the residual signal to which inter prediction is applied. Alternatively, the zeroing method may be applied to both the residual signal to which intra prediction is applied and the residual signal to which inter prediction is applied.

[0174] In the foregoing embodiments, the transform coefficient region is limited depending on whether the flag value indicating whether MTS is applied is 0 or the flag value indicating whether MTS is applied is 1. According to an example, a combination of these embodiments is possible.

[0175] 1) Zeroing implementation method 1 + zeroing implementation method 2

[0176] 2) Zeroing implementation method 1 + zeroing implementation method 3

[0177] As mentioned in zeroing implementation 2 and zeroing implementation 3, the zeroing method can be applied only to the residual signal to which intra-frame prediction is applied or can be applied only to the residual signal to which inter-frame prediction is applied. Alternatively, the zeroing method can be applied to both the residual signal to which intra-frame prediction is applied and the residual signal to which inter-frame prediction is applied. Therefore, when the MTS flag is 1, the following table can be configured (when the MTS flag is 1, zeroing implementation 1 can be applied). Here, the MTS flag can also be configured to indicate the MTS index of the transform kernel used for the MTS. For example, an MTS index of 0 can indicate that zeroing implementation 1 is applied.

[0178] [Table 5]

[0179] Configuring Indexes Intra-frame prediction residual signal Inter-frame prediction residual signal 1 Do not apply zeroing Do not apply zeroing 2 Do not apply zeroing Zeroing Implementation Method 2 3 Do not apply zeroing Zeroing Implementation Method 3 4 Zeroing Implementation Method 2 Do not apply zeroing 5 Zeroing Implementation Method 2 Zeroing Implementation Method 2 6 Zeroing Implementation Method 2 Zeroing Implementation Method 3 7 Zeroing Implementation Method 3 Do not apply zeroing 8 Zeroing Implementation Method 3 Zeroing Implementation Method 2 9 Zeroing Implementation Method 3 Zeroing Implementation Method 3

[0180] In return-to-zero implementation 1, return-to-zero implementation 2, and return-to-zero implementation 3, an area that inevitably includes a value of 0 in a TU is clearly defined. That is, an area other than the left top area where a transform coefficient is allowed to exist is zeroed. Therefore, according to an embodiment, it can be configured to bypass an area in which a transform coefficient explicitly has a value of 0 as a result of entropy coding of a residual signal, instead of performing residual coding on it. For example, the following configuration is possible.

[0181] 1) In HEVC or VVC, a flag indicating whether there is a non-zero transform coefficient in a coefficient group (CG, which can be a 4x4 or 2x2 block depending on the shape of the subblock and TU block and the luminance component / chrominance component) is coded (subblock_flag). Only when subblock_flag is 1, the inside of the CG is scanned and the coefficient level value is coded. Therefore, for the CG belonging to the area where zeroing is performed, subblock_flag can be set to a value of 0 by default instead of being coded.

[0182] 2) In HEVC or VVC, the position of the last coefficient in the forward scanning order (last_coefficient_position_x in the X direction and last_coefficient_position_y in the Y direction) is coded first. Typically, last_coefficient_position_x and last_coefficient_position_y can have a maximum value (TU width - 1) and a maximum value (TU height - 1), respectively. However, when the area in which non-zero coefficients may exist is limited due to zeroing, the maximum values ​​of last_coefficient_position_x and last_coefficient_position_y are also limited. Therefore, the maximum values ​​of last_coefficient_position_x and last_coefficient_position_y can be limited in view of zeroing and can then be coded. For example, when the binarization method applied to last_coefficient_position_x and last_coefficient_position_y is truncated unary binarization, the maximum length of the truncated unary code (the codeword length that last_coefficient_position_x and last_coefficient_position_y can have) can be reduced based on the adjusted maximum value.

[0183] As described above, when zeroing is applied, particularly when the top left 16x16 region is a low-frequency transform coefficient region (which may be referred to as 32-point reduced MTS or RMT 32 hereinafter), zeroing may be applied both when applying the MTS technique and when applying 32-point DST-7 or 32-point DCT-8.

[0184] Figure 5 Illustrated is an MTS applied to sub-block transform according to an example of the present disclosure.

[0185] According to an example, a sub-block transform (SBT) in which a coding unit is divided into sub-blocks and a transform process is performed on the sub-blocks may be applied. The sub-block transform is applied to a residual signal generated by inter-frame prediction, and the residual signal block is partitioned into two partition sub-blocks, and a separable transform is applied to only one of the sub-blocks according to the sub-block transform. The sub-block may be divided in the horizontal direction or the vertical direction, and the width or height of the partition sub-block may be 1 / 2 or 1 / 4 of the coding unit. When the sub-block transform is applied, since only one of the two partition sub-blocks is transformed, residual data exists only in the transformed sub-block, and residual data does not exist in the remaining one sub-block.

[0186] When the width of the sub-block to which the transform is applied or its height is 64 or more, DCT-2 can be applied in both the horizontal direction and the vertical direction, and when the width of the sub-block to which the transform is applied and its height are 32 or less, DST-7 or DCT-8 can be applied. Therefore, when SBT is applied, zeroing can be performed by applying RMTS32 only when all sides of the sub-block to which the transform is applied have a length of 32 or less. That is, DST-7 or DCT-8 with a length of 32 or less can be applied in each direction (horizontal direction and vertical direction), leaving a maximum of 16 transform coefficients for each row or column.

[0187] like Figure 5 As shown, when the block is divided and the transform is applied to region A, DST-7 or DCT-8 may be applied to each side and the transform applied in the horizontal and vertical directions is not limited to Figure 5 The example is shown in the figure. Figure 5 In , the width and height of the entire block are represented by w and h, respectively, and the width and height of the block to which the separable transform is actually applied are expressed as a pair of (width, height), i.e., (w1,h) or (w,h1). w1 can be 1 / 2 or 1 / 4 of w, and h1 can also be 1 / 2 or 1 / 4 of h.

[0188] like Figure 5 As shown, the block to which the transformation is applied can be positioned on the left or right side of the entire block or on the top or bottom of the entire block. Figure 5 The block may be a residual signal generated by inter-frame prediction. Figure 5 A flag indicating that only one sub-block of the residual signal of the partition shown is applied with the transform, and when the flag is 1, it can also be set by signaling to indicate that the block is Figure 5 The symbol shown indicates whether the partition is vertical or horizontal.

[0189] It is also possible to signal a flag indicating whether block A to which transform is actually applied is positioned on the left or right in the entire block or a flag indicating whether block A is positioned on the top or bottom.

[0190] like Figure 5 As illustrated, when horizontal transform and vertical transform are determined for a specific block instead of being specified by MTS signaling, the above-proposed RMTS32 may be applied to each side when the corresponding side in the horizontal direction and the vertical direction has a length of 32. In RMTS32, residual coding may be omitted for a return-to-zero region, or residual coding may be performed by scanning only a non-return-to-zero region.

[0191] Figure 6 Illustrated is 32-point zeroing applied to a sub-block transform according to an example of the present disclosure.

[0192] When RMTS32 is applied to Figure 5 When the sub-blocks of the partition shown in FIG. 1 are divided into two parts, after transformation, they can be Figure 6 There are residual data as shown. That is, Figure 6 It is shown that the RMTS 32 is applied to a sub-block on which a transform is performed among blocks partitioned according to application of a sub-block transform.

[0193] With respect to the width w and height h of the original transform block, the width and height of the block A to which the transform is actually applied may be w / 2 and h / 2 or w / 4 and h / 4, respectively.

[0194] In summary, if DST-7 or DCT-8 with a length of 32 can be applied in each of the horizontal and vertical directions, RMTS32 can be applied to any block to which the transform is applied. Whether DST-7 or DCT-8 with a length of 32 is applied can be determined by preset signaling or can be determined without signaling according to a predetermined coding condition.

[0195] In the case where MTS is disabled (e.g., in VVC, MTS can be disabled when "sps_mts_enable_flag" is set to 0 in the sequence parameter set), when SBT is applied, DCT-2 is applied in both the horizontal and vertical directions, instead of the combination of DST-7 and DCT-8 presented in Table 3.

[0196] Therefore, when MTS is disabled, even if the block to be transformed is partitioned into sub-blocks, it is necessary to prevent RMTS32 from being applied. As described above, when MTS is not applied, DCT-2 may be applied in the primary transform instead of DST-7 or DCT-8, and the left top block in which the non-zero transform coefficients to which DCT-2 may be applied may be subjected to high-frequency zeroing to reduce the width and height to 32. That is, the left top block in which the non-zero transform coefficients to which inverse DCT-2 may be applied may be reduced in width and height to 32, but is not zeroed to a width and height less than 32. This is to prevent data loss due to zeroing, and the width or height of the left top block to which inverse DCT-2 is applied is not reduced to 16.

[0197] If MTS is disabled, it is necessary to explicitly check the width or height of the partition sub-block to which DCT-2 is applied so that the width or height of the partition sub-block is not reduced to 16.

[0198] According to an example, by determining "sps_mts_enabled_flag" in the residual coding syntax, it can be configured not to perform zeroing due to RMTS32 when applying SBT.

[0199] The specification text reflecting the aforementioned implementation can be shown in the following tables (Table 5 to Table 15).

[0200] [Table 6]

[0201]

[0202] [Table 7]

[0203]

[0204] Tables 6 and 7 include picture information signaled in a sequence parameter set for picture coding and include pieces of flag information related to transformation.

[0205] sps_transform_skip_enabled_flag specifies whether transform skip is applied, ie, whether the transform skip flag (transform_skip_flag) may be present in the transform unit syntax.

[0206] sps_mts_enabled_flag is flag information specifying whether MTS, i.e., multiple transform selection technology, can be explicitly used. sps_mts_enabled_flag is equal to 1, specifying that sps_explicit_mts_intra_enabled_flag and sps_explicit_mts_inter_enabled_flag exist in the sequence parameter set syntax.

[0207] When any one of sps_explicit_mts_intra_enabled_flag and sps_explicit_mts_inter_enabled_flag is 1, it specifies that MTS may be applied to transform units, which means that tu_mts_idx may be present in the transform unit syntax. For example, when sps_mts_enabled_flag is equal to 1 and sps_explicit_mts_intra_enabled_flag is equal to 0, implicit MTS may be applied to intra coding units.

[0208] sps_sbt_enabled_flag is flag information specifying whether the previous sub-block transform can be applied to the coding unit for inter prediction.

[0209] When sps_sbt_enabled_flag is equal to 1, sps_sbt_max_size_64_flag for the maximum width and height of a coding unit for which sub-block transform is allowed may be signaled.

[0210] When sps_sbt_max_size_64_flag is equal to 0, the maximum width and height of a coding unit for allowing block transform is 32, and when sps_sbt_max_size_64_flag is equal to 1, the maximum width and height of a coding unit for allowing sub-block transform is derived to be equal to 64.

[0211] [Table 8]

[0212]

[0213] Table 8 shows transform related information signaled in a picture parameter set. log2_transform_skip_max_size_minus2 is information for deriving a maximum block size for transform skipping, and the maximum block size for transform skipping is derived as a value of log2_transform_skip_max_size_minus2 plus 2 to the power of 2 (1<<(log2_transform_skip_max_size_minus2+2).

[0214] [Table 9]

[0215]

[0216]

[0217] [Table 10]

[0218]

[0219]

[0220] Tables 9 and 10 show syntax and semantics of a coding unit to which inter prediction is applied, and a partition shape to which SBT is applied may be determined by four syntax elements of Table 9.

[0221] cu_sbt_flag specifies whether SBT is applied to a coding unit, and cu_sbt_quad_flag is flag information that specifies whether a block to which a transform is applied is 1 / 4 of a whole block when one coding unit is partitioned into two partition blocks. When cu_sbt_quad_flag is equal to 0, the partition subblock has a size of 1 / 2 of the width or height of the coding unit, and when cu_sbt_quad_flag is equal to 1, the partition subblock has a size of 1 / 4 of the width or height of the coding unit. When the width of a coding unit is w and its height is h, the height of the partition block may be h1=(1 / 4)xh or its width may be w1=(1 / 4)xw.

[0222] cu_sbt_horizontal_flag equal to 1 specifies that the coding unit is partitioned horizontally (ie, in the horizontal direction), and cu_sbt_horizontal_flag equal to 0 specifies that the coding unit is partitioned vertically (ie, in the vertical direction).

[0223] When the cu_sbt_pos_flag value is equal to 0, the transform is applied to the upper sub-block among the sub-blocks partitioned in the horizontal direction, and the transform is applied to the left sub-block among the sub-blocks partitioned in the vertical direction. When the cu_sbt_pos_flag value is equal to 1, the transform is applied to the lower sub-block among the sub-blocks partitioned in the horizontal direction, and the transform is applied to the right sub-block among the sub-blocks partitioned in the vertical direction.

[0224] The following table shows trTypeHor and trTypeVer according to cu_sbt_horizontal_flag and cu_sbt_pos_flag.

[0225] [Table 11]

[0226] cu_sbt_horizontal_flag cu_sbt_pos_flag trTypeHor trTypeVer 0 0 2 1 0 1 1 1 1 0 1 2 1 1 1 1

[0227] As described above, when trTypeHor represents a horizontal transform kernel and trTypeVer represents a vertical transform kernel, a trTypeHor or trTypeVer value of 0 may be set for DCT-2, a trTypeHor or trTypeVer value of 1 may be set for DST-7, and a trTypeHor or trTypeVer value of 2 may be set for DCT-8. Therefore, when the length of at least one side of a partition block to which the transform is applied is 64 or more, DCT-2 may be applied in both the horizontal and vertical directions; otherwise, DST-7 or DCT-8 may be applied. When the current block is partitioned and the transform is performed on the sub-blocks, MTS may be implicitly applied as shown in Table 11.

[0228] When the width and height of the sub-block are both 32 or less and therefore DST-7 or DCT-8 is applied, that is, when MTS is applied to the sub-block, the foregoing RMTS can be applied. For example, if the length of the sub-block in each direction is 32, only 16 transform coefficients can be left by applying DST-7 or DCT-8 with a length of 32.

[0229] However, when the width or height of a subblock is 64 or more, DCT-2 may be applied in both horizontal and vertical directions, and only 32 transform coefficients may be left according to high frequency zeroing, instead of applying RMTS in each direction.

[0230] [Table 12]

[0231]

[0232]

[0233] Table 12 shows part of the syntax and semantics of a transform unit according to an example. tu_mts_idx[x0][y0] specifies an MTS index applied to a transform block, and trTypeHor and trTypeVer may be determined according to the MTS index as shown in Table 1.

[0234] According to another example, mts_idx may be signaled in the coding unit level instead of in the transform unit level.

[0235] [Table 13]

[0236]

[0237]

[0238]

[0239] Table 13 shows part of the syntax and semantics of residual coding according to an example.

[0240] The syntax elements last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix in Table 13 specify (x, y) position information about the last non-zero transform coefficient in the transform block. Specifically, last_sig_coeff_x_prefix specifies the prefix of the column position of the last significant coefficient in the transform block in the scanning order, last_sig_coeff_y_prefix specifies the prefix of the row position of the last significant coefficient in the transform block in the scanning order, last_sig_coeff_x_suffix specifies the suffix of the column position of the last significant coefficient in the transform block in the scanning order, and last_sig_coeff_y_suffix specifies the suffix of the row position of the last significant coefficient in the transform block in the scanning order. Here, the significant coefficient may refer to a non-zero coefficient. In addition, the scanning order may be an upper right diagonal scanning order. Alternatively, the scanning order may be a horizontal scanning order or a vertical scanning order. The scanning order may be determined based on whether intra / inter prediction is applied to a target block (CB or CB including TB) and / or a specific intra / inter prediction mode.

[0241] The zeroing area may be configured in residual coding of Table 13 based on tu_mts_idx[x0][y0] of Table 12.

[0242] In addition, when cu_sbt_flag is equal to 1, the height of the block to which the transform is applied is 32 or less (log2TbHeight<6), its width is 32 (log2TbWidth<6&&log2TbWidth>4), and when sps_mts_enabled_flag is equal to 1, the width of the left top area where non-zero transform coefficients may exist is set to 16 (log2ZoTbWidth=4). Similarly, when cu_sbt_flag is equal to 1, the width of the block to which the transform is applied is 32 or less (log2TbWidth<6), its height is 32 (log2TbHeight<6&&log2TbHeight>4), and when sps_mts_enabled_flag is equal to 1, the height of the left top area where non-zero transform coefficients may exist is set to 16 (log2ZoTbHeight=4).

[0243] The block to which the transform is applied may be an original transform block or a partitioned sub-block.

[0244] Here, log2ZoTbWidth and log2ZoTbHeight represent the maximum width and maximum height of the left top area in the transform block where non-zero coefficients may exist, and the left top area may be referred to as a "reduced transform block." That is, log2ZoTbWidth and log2ZoTbHeight may be defined as variables indicating the width and height of the reduced transform block.

[0245] That is, according to an example, when sub-block transform is applied to a coding unit, MTS needs to be applicable in order to apply return to zero (RMTS), where the width of the left top block where non-zero coefficients may exist is reduced to 16 and the remaining area is zero.

[0246] When MTS is not applied, even if SBT is identified as being applied to the coding unit (when cu_sbt_flag is 1), DCT-2 instead of MTS needs to be applied to the sub-block to which the transform is applied. For example, when sps_mts_enabled_flag is equal to 0, DCT-2 is applied instead of DST-7 or DCT-8 even if SBT is applied to the coding block.

[0247] In addition, when SBT is applied to a coding block, DCT-2 is applied only when the width or height of a sub-block is 64 or more, and DCT-2 is not applied in other cases.

[0248] That is, in order to ensure that DCT-2 is applied to a subblock and to prevent RMTS, which may cause data loss, from being applied to a subblock to which DCT-2 is applied, the encoding device configures image information to check the value of sps_mts_enabled_flag, and the decoding device checks the value of sps_mts_enabled_flag in residual coding according to the configured image information.

[0249] In summary, when only cu_sbt_flag is identified as 1 during image decoding, the value of sps_mts_enabled_flag signaled in the sequence parameter set can be checked when the transform block size is set according to RMTS to prevent RMTS from being applied to the sub-block to which DCT-2 is applied. When cu_sbt_flag is equal to 1 and sps_mts_enabled_flag is equal to 1, RMTS can be applied, so the width and height of the left top block where non-zero transform coefficients may exist can be set to 16, and when cu_sbt_flag is equal to 1 and sps_mts_enabled_flag is equal to 0, MTS is not applied because DCT-2 is used for transform, so zeroing according to RMTS is not applied. In this case, the width and height of the left top block where non-zero transform coefficients may exist can be set to 32 or less.

[0250] For example, in the case of a 32×32 transform block to which a sub-block transform is applied, when sps_mts_enabled_flag is equal to 0, DCT-2 is used as a transform kernel, and thus a width or height of length 32 is not reduced to 16.

[0251] As described above, when MTS is disabled, RMTS of length 16 can be prevented from being zeroed by checking sps_mts_enabled_flag.

[0252] In other cases, when cu_sbt_flag is not 1, the height of the transform block is greater than 32, the width of the transform block is not 32, or MTS is not applied, the width of the transform block may be set to the smaller value of the width of the transform block and 32. That is, the maximum width of the transform block may be limited to 32 by high-frequency zeroing. Further, when cu_sbt_flag is not 1, the width of the transform block is greater than 32, or the height of the transform block is not 32, the height of the transform block may be set to the smaller value of the height of the transform block and 32. That is, the maximum height of the transform block may be limited to 32 by zeroing.

[0253] When SBT is applied, if the length of at least one side of the partition block is 64 or more, DCT-2 may be applied in both the horizontal and vertical directions. Otherwise, DST-7 or DCT-8 may be used as shown in Table 10. Therefore, when SBT is applied, zeroing is performed by applying RMTS32 only when all sides of the partition block to which the transform is applied have a length of 32 or less. That is, when the length of the block in each direction is 32, DST-7 or DCT-8 with a length of 32 may be applied, leaving only 16 transform coefficients.

[0254] As shown in Table 13, when RMTS32 is applied, the width and height of the residual area (low-frequency transform coefficient area) that is not returned to zero can be considered as the width and height of the actual transform block instead of using the width and height of the original transform block used for coding (log2ZoTbWidth=4 or log2ZoTbHeight=4) to perform coding.

[0255] For example, in the case where the width x height of the original transform block is 32x16, when RMTS32 is applied, non-zero coefficients exist only in the left top 16x16 region due to zeroing. Therefore, the width and height of the left top region where non-zero transform coefficients may exist are set to 16 and 16, respectively, and then coding of syntax elements (e.g., last_sig_coeff_x_prefix and last_sig_coeff_y_prefix) may be performed.

[0256] In summary, according to the residual coding of Table 13, log2ZoTbWidth and log2ZoTbHeight indicating the maximum width and maximum height of the non-zero coefficient are set before last_sig_coeff_x_prefix is ​​coded, the position of the last non-zero coefficient is coded by applying log2ZoTbWidth and log2ZoTbHeight, and then the width and height of the actual transform block are changed to log2ZoTbWidth and log2ZoTbHeight respectively (log2TbWidth=log2ZoTbWidth and log2TbHeight=log2ZoTbHeight). Subsequently, the syntax element can be encoded according to the changed value. Therefore, the remaining left top area excluding the zero area in the residual coding can be configured as a new transform block, and then the residual sample can be derived.

[0257] When the size of the transform block is reduced to the low-frequency transform coefficient area by zeroing the high-frequency transform coefficients, the values ​​of last_sig_coeff_x_prefix and last_sig_coeff_y_prefix may be restricted to a range from 0 to a value between (log2ZoTbWidth<<1)−1 and (log2ZoTbHeight<<1)−1 as shown in the semantics of Table 13.

[0258] [Table 14]

[0259]

[0260]

[0261]

[0262]

[0263]

[0264]

[0265] Table 14 illustrates the transformation process in which MTS is implicitly applied when SBT is applied to a coding unit (cu_sbt_flag is equal to 1 and Max(nTbW, nTbH) is less than or equal to 32, implicitMtsEnabled is set equal to 1).

[0266] A variable trTypeHor representing a horizontal transformation kernel and a variable trTypeVer representing a vertical transformation kernel may be derived based on Tables 8-14, and Tables 8-14 of Table 14 may correspond to Table 1 of this document.

[0267] In addition, when SBT is applied to the compilation unit, variables trTypeHor and trTypeVer may be derived based on Tables 8-15, and Tables 8-15 of Table 14 may correspond to Table 11 of this document.

[0268] The size of the block to which zeroing is applied (ie, the zeroing block illustrated in Table 13) is expressed as nonZeroW and nonZeroH in Table 14. nonZeroW and nonZeroH may be defined as variables representing the width and height of the top left block where non-zero transform coefficients may exist.

[0269] When LFNST is not applied, nonZeroW may be set to a smaller value (nonZeroW=Min(nTbW, (trTypeHor>0)?16:32)) of a value based on whether trTypeHor is greater than 0 and the width of the transform block (nTbW). When trTypeHor is greater than 0, since MTS is applied, "(trTypeHor>0)?16:32" is set to 16, and thus nonZeroW is set to a smaller value of the width of the transform block (nTbW) and 16. However, when trTypeHor is not greater than 0, since MTS is not applied, "(trTypeHor>0)?16:32" is set to 32, and thus nonZeroW is set to a smaller value of the width of the transform block (nTbW) and 32.

[0270] Similarly, when LFNST is not applied, nonZeroH may be set to a smaller value (nonZeroH=Min(nTbH,(trTypeVer>0)?16:32)) of a value based on whether trTypeVer is greater than 0 and the width (nTbH) of the transform block. When trTypeVer is greater than 0, since MTS is applied, "(trTypeVer>0)?16:32" is set to 16, and thus nonZeroH is set to a smaller value of the height (nTbH) of the transform block and 16. However, when trTypeVer is not greater than 0, since MTS is not applied, "(trTypeVer>0)?16:32" is set to 32, and thus nonZeroH is set to a smaller value of the height (nTbH) of the transform block and 32.

[0271] That is, the size of the zeroing block is set to 16 or 32, depending on whether MTS is applied, ie, whether trTypeHor and trTypeVer can have a value of 0 or greater.

[0272] The residual sample values ​​can be derived based on nonZeroW and nonZeroH taking into account the zeroing setting (when nTbH is greater than 1, each (vertical) column of scaled transform coefficients d[x][y] with x=0..nonZeroW-1, y=0..nonZeroH-1 is converted to e[x][y] with x=0..nonZeroW-1, y=0..nonZeroH-1 by calling the one-dimensional transform process specified in clause 8.7.4.4 for each column x=0..nonZeroW-1 with the height nTbH of the transform block, the non-zero height nonZeroH of the scaled transform coefficients, the list d[x][y] with y=0..nonZeroH-1 and the transform type variable trType set equal to trTypeVer as input, and the output is a list e[x][y] with y=0..nTbH-1).

[0273] When the size of the transform block is changed by applying zeroing, the size of the transform block for context selection of last_sig_coeff_x_prefix and last_sig_coeff_y_prefix may also be changed. Table 15 shows the binarization of last_sig_coeff_x_prefix and last_sig_coeff_y_prefix considering the reduced transform block, and Table 16 shows the process of deriving ctxInc (context increment) for deriving last_sig_coeff_x_prefix and lastsig_coeff_y_prefix. Since the context can be selected and distinguished by the context increment, the context model can be derived based on the context increment.

[0274] [Table 15]

[0275]

[0276]

[0277] [Table 16]

[0278]

[0279]

[0280] As illustrated in Table 15, the maximum value (cMax) of last_sig_coeff_x_prefix and last_sig_coeff_y_prefix is ​​set to the low-frequency transform coefficient area (cMax=(cMax=(log2ZoTbWidth<<1)−1, cMax=(log2ZoTbHeight<<1)−1) based on log2ZoTbWidth and log2ZoTbHeight corresponding to the width and height of the reduced transform block. When truncated unary is used for binarization of last_sig_coeff_x_prefix and last_sig_coeff_y_prefix, the maximum value (cMax) of last_sig_coeff_x_prefix and last_sig_coeff_y_prefix may be set equal to the maximum value of the codeword used for binarization of last_sig_coeff_x_prefix and last_sig_coeff_y_prefix. Therefore, the maximum length of the prefix codeword representing the last significant coefficient prefix information may be derived based on the size of the return-to-zero block.

[0281] As illustrated in Table 16, for the CABAC context for two syntax elements, last_sig_coeff_x_prefix and last_sig_coeff_y_prefix, the size of the original transform block (TU) in the low-frequency transform coefficient region is applied instead of the reduced transform block (log2TbSize is set equal to log2TbWidth, log2TbSize is set equal to log2TbHeight).

[0282] In summary, according to the example, the residual sample can be derived based on the last significant coefficient position information, wherein the context model can be derived based on the size of the original transform block whose size has not changed, and the last significant coefficient position can be derived based on the size of the transform block to which zeroing has been applied. Here, the size of the transform block to which zeroing has been applied, i.e., the size of the zeroing block, is specifically a size, width or height, smaller than the size, width or height of the original transform block.

[0283] The following figures are provided to describe specific examples of the present disclosure. Since the specific names of the devices or the names of specific signals / messages / fields illustrated in the figures are provided for illustration, the technical features of the present disclosure are not limited to the specific names used in the following figures.

[0284] Figure 7 is a flowchart illustrating the operation of a video decoding device according to an embodiment of the present disclosure.

[0285] Figure 7 Each operation illustrated in the figure can be represented by Figure 2 The decoding device 200 shown in the figure is executed. Specifically, S700 and S710 can be performed by Figure 2 The entropy decoder 210 shown in the figure performs S720, which can be performed by Figure 2 S730 may be performed by the dequantizer 221 shown in FIG. Figure 2 The inverter 222 shown in FIG. 1 is executed, and S740 can be performed by Figure 2 The operations according to S700 to S740 are based on the reference Figures 2 to 6 Therefore, descriptions of specific details overlapping with those explained above will be omitted or will be briefly made.

[0286] The decoding apparatus according to an embodiment may receive a bitstream including residual information (S700). Specifically, the entropy decoder 210 of the decoding apparatus may receive a bitstream including residual information.

[0287] The decoding apparatus according to an embodiment may derive a quantized transform coefficient for the current block based on the residual information included in the bitstream (S710). Specifically, the entropy decoder 210 of the decoding apparatus may quantize the transform coefficient for the current block based on the residual information included in the bitstream.

[0288] The decoding device according to an embodiment may derive a transform coefficient from the quantized transform coefficient based on a dequantization process (S720). Specifically, the dequantizer 221 of the decoding device may derive a transform coefficient from the quantized transform coefficient based on a dequantization process.

[0289] The decoding device according to an embodiment may derive residual samples for the current block by applying inverse transform to the derived transform coefficients (S730). Specifically, the inverse transform 222 of the decoding device may derive residual samples for the current block by applying inverse transform to the derived transform coefficients.

[0290] The decoding apparatus according to an embodiment may generate a reconstructed picture based on the residual samples for the current block (S740). Specifically, the adder 240 of the decoding apparatus may generate a reconstructed picture based on the residual samples for the current block.

[0291] In an embodiment, the unit of the current block may be a transform block (TB).

[0292] In an embodiment, each transform coefficient for the current block may be associated with a high-frequency transform coefficient region including a transform coefficient of 0 or a low-frequency transform coefficient region including at least one significant transform coefficient.

[0293] In an embodiment, the residual information may include last significant coefficient prefix information and last significant coefficient suffix information regarding a position of a last significant transform coefficient among transform coefficients for the current block.

[0294] In one example, the last significant coefficient prefix information may have a maximum value determined based on the size of the return-to-zero block.

[0295] In an embodiment, the position of the last significant transform coefficient may be determined based on a prefix codeword indicating the last significant coefficient prefix information and the last significant coefficient suffix information.

[0296] In an embodiment, the maximum length of the prefix codeword may be determined based on the low-frequency transform coefficient region (ie, the size of the return-to-zero block).

[0297] In an embodiment, the size of the zeroing block may be determined based on the width and height of the current block.

[0298] In an embodiment, the last significant coefficient prefix information may include x-axis prefix information and y-axis prefix information, and the prefix codeword may be a codeword regarding the x-axis prefix information and a codeword for the y-axis prefix information.

[0299] In one example, the x-axis prefix information may be expressed as last_sig_coeff_x_prefix, the y-axis prefix information may be expressed as last_sig_coeff_y_prefix, and the position of the last significant transform coefficient may be expressed as (LastSignificantCoeffX, LastSignificantCoeffY).

[0300] In an embodiment, the residual information may include information about the size of the zeroing block.

[0301] Figure 8 is a flowchart illustrating a process for deriving transform coefficients by a video decoding device according to an embodiment of the present disclosure.

[0302] Figure 8 Each operation illustrated in the figure can be represented by Figure 2 Specifically, S800 to S840 may be performed by Figure 2 The entropy decoder 210 shown in FIG.

[0303] First, as shown, the decoding apparatus may determine whether a sub-block transform that performs transform by partitioning a coding unit is applied to a current block to derive a return-to-zero block for the current block ( S800 ).

[0304] As described above, the return-to-zero block means a low-frequency transform coefficient region including non-zero significant transform coefficients, and the decoding apparatus may derive the return-to-zero block in the residual coding step.

[0305] The decoding apparatus may determine whether to apply sub-block transform based on flag information (cu_sbt_flag) indicating whether sub-block transform is applied to the current block, and may signal this flag information at a coding unit level.

[0306] In addition, the decoding apparatus may determine whether multiple transform selection using a plurality of transform cores is applied to the current block ( S810 ).

[0307] The decoding apparatus may determine whether to apply multiple transform selection based on flag information (sps_mts_enabled_flag) indicating whether multiple transform selection is applied to the current block, and may parse the flag information at a sequence parameter set level.

[0308] The decoding apparatus may set the size of the transform block of the transform block to which the transform is to be applied based on whether the MTS can be applied to the current block, whether the sub-block transform is applied to the current block, and the width or height of the current block (S820). The transform block to which the transform is to be applied may include a zeroing block indicating an area where a valid transform coefficient may exist in the current block, and the width and height of the zeroing block may be derived as various values ​​depending on whether the MTS and the sub-block transform are applied to the current block.

[0309] According to an example, when MTS is applied, the decoding device can set the width or height of the zero block to 16, and when MTS is not applied (if DST-7 / DCT-8 is applicable), the width or height of the zero block can be set to 32 or less.

[0310] Specifically, when DST-7 or DCT-8 is applied instead of DCT-2 as the transform kernel used for the inverse primary transform, the width of the current block is 32, and the height of the current block is 32 or less, the width of the zeroing block may be set to 16. When the above conditions are not met, that is, when the transform kernel is DCT-2, the width of the current block is not 32, or the height of the current block is 64 or more, the width of the zeroing block may be set to the smaller value of the width of the current block and 32.

[0311] Similarly, when DST-7 or DCT-8 is applied instead of DCT-2 as the transform kernel used for the inverse primary transform, the height of the current block is 32, and the width of the current block is 32 or less, the height of the zeroing block can be set to 16. When the above conditions are not met, that is, the transform kernel is DCT-2, the height of the current block is not 32, or the width of the current block is 64 or more, the height of the zeroing block can be set to the smaller value of the height of the current block and 32.

[0312] Furthermore, according to an example, when the value of the flag indicating whether the current block is partitioned into subblocks and transformed is 1, the width of the partitioned subblock is 32, and the height of the subblock is less than 64, the width of the zeroing block (i.e., the width of the upper left region where non-zero transform coefficients may exist in the subblock) may be set to 16. Alternatively, when the value of the flag indicating whether the current block is partitioned into subblocks and transformed is 1, the height of the partitioned subblock is 32, and the width of the upper left region where non-zero transform coefficients can exist in the subblock is less than 64, the height of the subblock may be set to 16.

[0313] The transform kernel may be derived based on the partition direction of the current block and the position of the sub-block to which the transform is applied, as shown in Table 11.

[0314] The size of the return-to-zero block may be smaller than the size of the current block. Specifically, the width of the return-to-zero block may be smaller than the width of the current block, and the height of the return-to-zero block may be smaller than the height of the current block.

[0315] In an embodiment, the size of the zeroing block may be one of 32 x 16, 16 x 32, 16 x 16, or 32 x 32.

[0316] In an embodiment, the size of the current block may be 64 x 64 and the size of the zeroing block may be 32 x 32.

[0317] On the other hand, according to an example, the decoding apparatus may derive a context model for the last significant coefficient position information based on the width or height of the current block, and may derive a value of the last significant coefficient position based on the derived context model.

[0318] According to an example, a context model may be derived based on the size of an original transform block instead of the size of a zeroing block. Specifically, a context increment for x-axis prefix information and y-axis prefix information corresponding to the last significant coefficient prefix information may be derived based on the size of the original transform block.

[0319] As described above, the last significant coefficient position information may include last significant coefficient prefix information and last significant coefficient suffix information, and the value of the last significant coefficient position may be derived based on the context model.

[0320] The decoding apparatus may derive the last significant coefficient position based on the value of the derived last significant coefficient position information and the width or height of the return-to-zero block (S830).

[0321] In one example, the decoding device may derive the last significant coefficient position within the range of the size of the zeroed block that is smaller than the size of the current block instead of the size of the original current block. That is, the transform coefficient to which the transform is applied may be derived within the size of the zeroed block instead of the size of the current block.

[0322] In one example, the last significant coefficient prefix information may have a maximum value determined based on the size of the return-to-zero block.

[0323] In one example, the last significant coefficient position may be derived based on a prefix codeword indicating the last significant coefficient prefix information and the last significant coefficient suffix information, and the maximum length of the prefix codeword may be determined based on the size of the return-to-zero block.

[0324] The decoding apparatus may derive a transform coefficient based on the last significant coefficient position derived according to the width or height of the return-to-zero block ( S840 ).

[0325] The transform coefficients can be derived through the residual coding process of Table 14.

[0326] Subsequently, the decoding apparatus may derive residual samples by performing at least one of the above-mentioned inseparable inverse secondary transform and inverse primary transform based on Table 1 and Table 11.

[0327] The following figures are provided to describe specific examples of the present disclosure. Because the specific names of the devices illustrated in the figures or the names of the specific signals / messages / fields are provided for illustration, the technical features of the present disclosure are not limited to the specific names used in the following figures.

[0328] Fig. 9 is a flowchart illustrating the operation of a video encoding apparatus according to an embodiment of the present disclosure.

[0329] Fig. 9 Each operation illustrated in the figure can be represented by Figure 1 The illustrated encoding device 100 is executed. Specifically, S900 may be performed by Figure 1 The subtractor 131 shown in the figure performs S910, which can be performed by Figure 1 The transformer 132 shown in the figure is executed, and S920 can be performed by Figure 1 The quantizer 133 shown in the figure is executed, and S930 can be performed by Figure 1 The illustrated entropy encoder 140 performs the operations according to S900 to S930 based on the reference Figures 3 to 6 Therefore, some of the foregoing details will be omitted or will be briefly described with reference to the above Figure 1 and Figures 3 to 6 A description of the specific details of those overlaps is explained.

[0330] The encoding apparatus according to an embodiment may derive a residual sample for the current block (S900). Specifically, the subtractor 131 of the encoding apparatus may derive a residual sample for the current block.

[0331] The encoding device according to an embodiment may transform the residual samples for the current block, thereby deriving the transform coefficient for the current block (S910). Specifically, the transformer 132 of the encoding device may transform the residual samples for the current block, thereby deriving the transform coefficient for the current block.

[0332] The encoding device according to an embodiment may derive a quantized transform coefficient from the transform coefficient based on quantization (S920). Specifically, the quantizer 133 of the encoding device may derive a quantized transform coefficient from the transform coefficient based on quantization.

[0333] The encoding device according to an embodiment may encode residual information including information about the quantized transform coefficient (S930). Specifically, the entropy encoder 140 of the encoding device may encode residual information including information about the quantized transform coefficient.

[0334] In an embodiment, each transform coefficient for the current block may be associated with a high-frequency transform coefficient region including a transform coefficient of 0 or a low-frequency transform coefficient region (ie, a return-to-zero block) including at least one significant transform coefficient.

[0335] In an embodiment, the residual information may include last significant coefficient prefix information and last significant coefficient suffix information regarding a position of a last significant transform coefficient among transform coefficients for the current block.

[0336] In an embodiment, the position of the last significant transform coefficient may be determined based on a prefix codeword indicating the last significant coefficient prefix information and the last significant coefficient suffix information.

[0337] In one example, the last significant coefficient prefix information may have a maximum value determined based on the size of the return-to-zero block.

[0338] In an embodiment, the maximum length of the prefix codeword may be determined based on the size of the return-to-zero block.

[0339] In an embodiment, the size of the zeroing block may be determined based on the width and height of the current block.

[0340] In an embodiment, the last significant coefficient prefix information may include x-axis prefix information and y-axis prefix information, and the prefix codeword may be a codeword on the x-axis prefix information and a codeword for the y-axis prefix information.

[0341] In one example, the x-axis prefix information may be expressed as last_sig_coeff_x_prefix, the y-axis prefix information may be expressed as last_sig_coeff_y_prefix, and the position of the last significant transform coefficient may be expressed as (LastSignificantCoeffX, LastSignificantCoeffY).

[0342] In an embodiment, the residual information may include information about the size of the zeroing block.

[0343] Fig.10 is a flowchart illustrating a process for encoding transform coefficients and information according to an embodiment of the present disclosure.

[0344] exist Fig.10 Each operation exposed in can be operated by Figure 1 Specifically, S1000 and S1010 may be performed by the converter 232, and S1020 to S1040 may be performed by Figure 1 The entropy encoder 140 disclosed in is executed.

[0345] First, in order to derive a return-to-zero block for a current block, the encoding apparatus may determine whether a sub-block transform that performs transform by partitioning a coding unit is applied to the current block ( S1000 ).

[0346] As described above, the zeroing block refers to a low-frequency transform coefficient region including non-zero significant transform coefficients, and corresponds to an actual transform block to which transform is applied.

[0347] Information indicating whether sub-block transform is applied to the current block may be generated by the encoding apparatus and output as flag information (cu_sbt_flag), and this flag information may be signaled at a coding unit level.

[0348] In addition, the encoding apparatus may determine whether multiple transform selection using a plurality of transform kernels is applied to the current block ( S1010 ).

[0349] Information indicating whether multiple transform selection is applied to the current block may be generated by the encoding apparatus and output as flag information sps_mts_enabled_flag, and this flag information may be signaled at a sequence parameter set level.

[0350] The encoding device may set the size of the region in which the transform coefficients to be inversely transformed in the decoding process exist based on whether MTS can be applied to the current block, whether the sub-block transform is applied to the current block, and the width or height of the current block (S1020). The region in which the transform coefficients exist may include a zeroing block indicating a region in which important transform coefficients may exist in the current block, and the width and height of the zeroing block may be derived as various values ​​depending on whether MTS and the sub-block transform are applied to the current block.

[0351] According to an example, the encoding apparatus may set the width or height of the return-to-zero block to 16 when MTS is applied, and may set the width or height of the return-to-zero block to 32 or less when MTS is not applied.

[0352] Specifically, when DST-7 or DCT-8 is applied instead of DCT-2 as the transform kernel for the primary transform, the width of the current block is 32, and the height of the current block is 32 or less, the width of the zeroing block may be set to 16. When the above conditions are not met, that is, when the transform kernel is DCT-2, the width of the current block is not 32, or the height of the current block is 64 or more, the width of the zeroing block may be set to the smaller value of the width of the current block and 32.

[0353] Similarly, when DST-7 or DCT-8 is applied instead of DCT-2 as the transform kernel for the primary transform, the height of the current block is 32, and the width of the current block is 32 or less, the height of the zeroing block may be set to 16. When the above conditions are not satisfied, that is, when the transform kernel is DCT-2, the height of the current block is not 32, or the width of the current block is 64 or more, the height of the zeroing block may be set to the smaller value of the height of the current block and 32.

[0354] In addition, according to an example, the width or height of the zeroing block may be derived based on whether the current block is partitioned into sub-blocks and transformed. For example, when the current block is partitioned into sub-blocks and transformed, the width of the partitioned sub-blocks is 32, and the height of the sub-blocks is less than 64, the width of the sub-blocks may be set to 16. Alternatively, when the current block is partitioned into sub-blocks and transformed, the height of the partitioned sub-blocks is 32, and the width of the sub-blocks is less than 64, the height of the sub-blocks may be set to 16.

[0355] The transform kernel may be derived based on the partition direction of the current block and the position of the sub-block to which the transform is applied, as shown in Table 11.

[0356] In an embodiment, the size of the zeroing block may be one of 32 x 16, 16 x 32, 16 x 16, or 32 x 32.

[0357] In an embodiment, the size of the current block may be 64 x 64 and the size of the zeroing block may be 32 x 32.

[0358] The encoding apparatus may derive transform coefficients from residual samples by performing the aforementioned transform process, which is based on at least one of the primary transform of Table 1 and Table 11 and the inseparable inverse secondary transform.

[0359] Meanwhile, the encoding apparatus may derive a last significant coefficient position based on the derived width or height of the return-to-zero block ( S1030 ).

[0360] In one example, the encoding device may derive the last significant coefficient position within the range of the size of the zeroing block that is less than or equal to the size of the current block instead of the size of the original current block. That is, the transform coefficient to which the transform is applied may be derived within the size range of the zeroing block instead of the size range of the current block.

[0361] In one example, the last significant coefficient position may be derived based on a prefix codeword indicating the last significant coefficient prefix information and the last significant coefficient suffix information, and the maximum length of the prefix codeword may be determined based on the size of the return-to-zero block.

[0362] The encoding apparatus may derive a context model for the last significant coefficient position information based on the width or height of the current block, and may encode position information about the value of the last significant coefficient position based on the derived context model ( S1040 ).

[0363] According to an embodiment, a context model may be derived based on the size of an original transform block rather than the size of a zeroing block. Specifically, a context increment for x-axis prefix information and y-axis prefix information corresponding to the last significant coefficient prefix information may be derived based on the size of the original transform block.

[0364] As described above, the last significant coefficient position information may include last significant coefficient prefix information and last significant coefficient suffix information, and the value of the last significant coefficient position may be encoded based on the context model.

[0365] In the present disclosure, at least one of quantization / dequantization and / or transform / inverse transform may be omitted. When quantization / dequantization is omitted, the quantized transform coefficient may be referred to as a transform coefficient. When transform / inverse transform is omitted, the transform coefficient may be referred to as a coefficient or a residual coefficient, or may still be referred to as a transform coefficient for consistency of expression.

[0366] In addition, in the present disclosure, the quantized transform coefficient and the transform coefficient may be referred to as a transform coefficient and a scaled transform coefficient, respectively. In this case, the residual information may include information about the transform coefficient, and the information about the transform coefficient may be signaled by the residual coding syntax. The transform coefficient may be derived based on the residual information (or information about the transform coefficient), and the scaled transform coefficient may be derived by an inverse transform (scaling) of the transform coefficient. The residual sample may be derived based on an inverse transform (transform) of the scaled transform coefficient. These details may also be applied / expressed in other parts of the present disclosure.

[0367] In the above-mentioned embodiments, the method is described based on the flowchart with the aid of a series of steps or boxes, but the present disclosure is not limited to the order of the steps, and a certain step may be performed in an order or step different from the above order or step or simultaneously with another step. In addition, it can be understood by a person of ordinary skill in the art that the steps shown in the flowchart are not exclusive, and another step may be incorporated or one or more steps of the flowchart may be removed without affecting the scope of the present disclosure.

[0368] The above method according to the present disclosure may be implemented in a software form, and the encoding device and / or decoding device according to the present disclosure may be included in an image processing device such as a TV, a computer, a smart phone, a set-top box, a display device, etc.

[0369] When the embodiments in the present disclosure are specifically implemented by software, the above method can be embodied as a module (process, function, etc.) for performing the above functions. The module can be stored in a memory and can be executed by a processor. The memory can be inside or outside the processor and can be connected to the processor in various known ways. The processor may include an application specific integrated circuit (ASIC), other chipsets, logic circuits and / or data processing devices. The memory may include a read-only memory (ROM), a random access memory (RAM), a flash memory, a memory card, a storage medium and / or other storage devices. In other words, the embodiments described in the present disclosure can be specifically implemented and executed on a processor, a microprocessor, a controller or a chip. For example, the functional units shown in each figure can be specifically implemented and executed on a computer, a processor, a microprocessor, a controller or a chip.

[0370] In addition, the decoding device and the encoding device to which the present disclosure is applied may be included in a multimedia broadcast transceiver, a mobile communication terminal, a home theater video device, a digital theater video device, a surveillance camera, a video chat device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camera, a video on demand (VoD) service provider, an over-the-top (OTT) video device, an Internet streaming service provider, a three-dimensional (3D) video device, a video phone video device, and a medical video device, and may be used to process a video signal or a data signal. For example, an over-the-top (OTT) video device may include a game console, a Blu-ray player, an Internet access TV, a home theater system, a smart phone, a tablet PC, a digital video recorder (DVR), etc.

[0371] In addition, the processing method of the present disclosure can be generated in the form of a program executed by a computer and stored in a computer-readable recording medium. Multimedia data with a data structure according to the present disclosure can also be stored in a computer-readable recording medium. Computer-readable recording media include all kinds of storage devices and distributed storage devices in which computer-readable data is stored. Computer-readable recording media may include, for example, a Blu-ray disc (BD), a universal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. In addition, the computer-readable recording medium includes a medium embodied in the form of a carrier (e.g., transmission via the Internet). In addition, the bit stream generated by the encoding method can be stored in a computer-readable recording medium or sent via a wired or wireless communication network. Additionally, the embodiments of the present disclosure can be embodied as a computer program product through a program code, and the program code can be executed on a computer through an embodiment of the present disclosure. The program code can be stored on a computer-readable carrier.

[0372] Fig.11 An example of a video / image coding system to which the present disclosure is applicable is schematically illustrated.

[0373] refer to Fig.11 The video / image coding system may include a first device (source device) and a second device (receiving device). The source device may deliver coded video / image information or data to the receiving device in the form of a file or stream via a digital storage medium or a network.

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

[0375] The video source can obtain the video / image by capturing, synthesizing or generating the process of the video / image. The video source may include a video / image capturing device and / or a video / image generating device. The video / image capturing device may include, for example, one or more cameras, a video / image archive including previously captured videos / images, etc. The video / image generating device may include, for example, a computer, a tablet computer, and a smart phone, and may (electronically) generate the video / image. For example, a virtual video / image may be generated by a computer, etc. In this case, the video / image capturing process may be replaced by the process of generating the relevant data.

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

[0377] The transmitter may transmit the encoded video / image information or data output in the form of a bit stream to a receiver of a receiving device in the form of a file or stream through a digital storage medium or a network. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter may include an element for generating a media file in a predetermined file format, and may include an element for transmitting through a broadcast / communication network. The receiver may receive / extract a bit stream and transmit the received / extracted bit stream to a decoding device.

[0378] The decoding device may decode a video / image by performing a series of processes such as dequantization, inverse transformation, prediction, etc. corresponding to the operation of the encoding device.

[0379] The renderer may render the decoded video / image. The rendered video / image may be displayed through a display.

[0380] Fig.12 The structure of a content streaming system to which the present disclosure is applied is illustrated.

[0381] In addition, the content streaming system to which the present disclosure is applied may mainly include an encoding server, a streaming server, a network server, a media storage, a user device, and a multimedia input device.

[0382] The encoding server is used to compress the content input from multimedia input devices such as smart phones, cameras, camcorders, etc. into digital data to generate a bit stream, and send the bit stream to the streaming server. As another example, when multimedia input devices such as smart phones, cameras, camcorders, etc. directly generate a bit stream, the encoding server can be omitted. The bit stream can be generated by applying the encoding method or bit stream generation method disclosed in the present invention. And the streaming server can temporarily store the bit stream in the process of sending or receiving the bit stream.

[0383] The streaming server sends multimedia data to the user device through a web server based on the user's request, and the web server is used as a tool to inform the user of what services are available. When the user requests the service the user wants, the web server transmits the request to the streaming server, and the streaming server sends the multimedia data to the user. In this regard, the content streaming system may include a separate control server, and in this case, the control server is used to control the commands / responses between the respective devices in the content streaming system.

[0384] The streaming media server can receive content from a media storage and / or encoding server. For example, in the case of receiving content from an encoding server, the content can be received in real time. In this case, the streaming media server can store the bitstream for a predetermined period of time to smoothly provide streaming media services.

[0385] For example, the user device may include a mobile phone, a smart phone, a laptop computer, a digital broadcast terminal, a personal digital assistant (PDA), a portable multimedia player (PMP), a navigation, a tablet PC, a tablet computer, an ultrabook, a wearable device (e.g., a watch-type terminal (smart watch), a glasses-type terminal (smart glasses), a head-mounted display (HMD)), a digital television, a desktop computer, a digital signage, etc. Each server in the content streaming system may operate as a distributed server, and in this case, data received by each server may be processed in a distributed manner.

[0386] The claims disclosed herein can be combined in various ways. For example, the technical features of the method claims of the present disclosure can be combined to be implemented or performed in a device, and the technical features of the device claims can be combined to be implemented or performed in a method. In addition, the technical features of the method claims and the device claims can be combined to be implemented or performed in a device, and the technical features of the method claims and the device claims can be combined to be implemented or performed in a method.

Claims

1. A method comprising: Obtaining residual information from a bitstream; deriving quantized transform coefficients for a current block based on the residual information; deriving transform coefficients from the quantized transform coefficients based on dequantization; deriving residual samples for the current block based on the transform coefficients; as well as Generate a reconstructed picture based on the residual samples, wherein a size of an area in which significant transform coefficients can exist within the current block is set based on at least one of whether a sub-block transform is applied to a coding unit including the current block or whether multiple transform selection is enabled, wherein, based on the sub-block transform being applied to the coding unit and the multiple transform selection being enabled, the width and height of the region in the current block are set to 16, and Wherein, based on the fact that the sub-block transform is not applied to the coding unit, the width of the area in the current block is set to the minimum value of the width of the current block and 32, and the height of the area in the current block is set to the minimum value of the height of the current block and 32.

2. The method according to claim 1, wherein: determining whether to apply the sub-block transform based on flag information related to whether the sub-block transform is applied to the coding unit, and The flag information is sent using a signal at the compilation unit level.

3. The method according to claim 1, wherein: determining whether the multiple transform selection is enabled based on flag information related to whether the multiple transform selection is enabled, and The flag information is sent by signal at the sequence parameter set level.

4. The method according to claim 1, wherein: When the sub-block transform is applied to the coding unit, based on the height of the current block being less than 64 and the width of the current block being 32, the width of the region is set to 16, and Wherein, when the sub-block transform is applied to the coding unit, based on the width of the current block being less than 64 and the height of the current block being 32, the height of the region is set to 16.

5. The method according to claim 1, wherein: The residual information includes the last significant coefficient prefix information, and The maximum value of the last significant coefficient prefix information is derived based on the size of the region.

6. A method comprising: deriving residual samples for the current block; deriving transform coefficients based on the residual samples; deriving quantized transform coefficients from the transform coefficients based on quantization; as well as encoding residual information including information about the quantized transform coefficients, wherein a size of an area in which significant transform coefficients can exist within the current block is set based on at least one of whether a sub-block transform is applied to a coding unit including the current block or whether multiple transform selection is enabled, wherein, based on the sub-block transform being applied to the coding unit and the multiple transform selection being enabled, the width and height of the region in the current block are set to 16, and Wherein, based on the fact that the sub-block transform is not applied to the current block, the width of the area in the current block is set to the minimum value of the width of the current block and 32, and the height of the area in the current block is set to the minimum value of the height of the current block and 32.

7. The method according to claim 6, wherein: When the sub-block transform is applied to the coding unit, based on the height of the current block being less than 64 and the width of the current block being 32, the width of the region is set to 16, and Wherein, when the sub-block transform is applied to the coding unit, based on the width of the current block being less than 64 and the height of the current block being 32, the height of the region is set to 16.

8. The method according to claim 6, wherein: The residual information includes the last significant coefficient prefix information, and The maximum value of the last significant coefficient prefix information is derived based on the size of the region.

9. A method comprising: Obtaining a bitstream, wherein the bitstream is generated based on: deriving residual samples for a current block, deriving transform coefficients based on the residual samples, deriving quantized transform coefficients from the transform coefficients based on quantization, and encoding residual information including information about the quantized transform coefficients; as well as sending the bitstream including the residual information, wherein a size of an area in which significant transform coefficients can exist within the current block is set based on at least one of whether a sub-block transform is applied to a coding unit including the current block or whether multiple transform selection is enabled, wherein, based on the sub-block transform being applied to the coding unit and the multiple transform selection being enabled, the width and height of the region in the current block are set to 16, and Wherein, based on the fact that the sub-block transform is not applied to the coding unit, the width of the area in the current block is set to the minimum value of the width of the current block and 32, and the height of the area in the current block is set to the minimum value of the height of the current block and 32.