Image decoding / encoding method and data transmission method
By adopting transformation-based encoding methods in the image encoding system, the problem of high-resolution and high-quality image/video data compression and transmission is solved, and a more efficient encoding and decoding process is achieved.
Patent Information
- Application Number
- CN202411985708.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-11-11
- Filing Date
- 2020-11-09
- Publication Date
- 2025-04-11
AI Technical Summary
The prior art is difficult to effectively compress and transmit or store high-resolution and high-quality image/video data, especially when meeting the needs of applications such as ultra-high-definition images, virtual reality and holograms.
By adopting a transform-based encoding method in the image encoding system, it includes determining the residual sample of the current block, analyzing the MTS index, and encoding and decoding the transform coefficients through the derived transformation verification.
Improves image/video compression efficiency, reduces transmission and storage costs, and improves the efficiency of encoding and transform indexes.
Smart Images

Figure CN119815017A_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application with the original application number 202080092359.X (international application number: PCT / KR2020 / 015589, application date: November 9, 2020, invention name: transform-based image coding method and device thereof). Technical Field
[0002] The present disclosure relates to an image encoding technology, and more particularly, to a method and apparatus for encoding an image based on transformation in an image encoding system. Background Art
[0003] Nowadays, the demand for high-resolution and high-quality images / videos such as 4K, 8K or higher ultra-high-definition (UHD) images / videos has been growing in various fields. As image / video data becomes higher resolution and higher quality, the amount of information or bit volume sent increases compared to traditional image data. Therefore, when using a medium such as a traditional wired / wireless broadband line to send image data or using an existing storage medium to store image / video data, its transmission cost and storage cost increase.
[0004] In addition, nowadays, interest and demand for immersive media such as virtual reality (VR) and artificial reality (AR) content or holograms are increasing, and broadcasting of images / videos having image characteristics different from real images such as game images is increasing.
[0005] Therefore, there is a need for an efficient image / video compression technology that effectively compresses and transmits or stores and reproduces information of high-resolution and high-quality images / videos having various characteristics as described above. Summary of the invention
[0006] Technical Purpose
[0007] A technical aspect of the present disclosure is to provide a method and an apparatus for increasing image encoding efficiency.
[0008] Another technical aspect of the present disclosure is to provide a method and apparatus for increasing the efficiency of encoding transform indexes.
[0009] Still another technical aspect of the present disclosure is to provide an image encoding method and an image encoding device using MTS.
[0010] Still another technical aspect of the present disclosure is to provide an image encoding method and an image encoding device for signaling an MTS index.
[0011] Technical Solution
[0012] According to an embodiment of the present disclosure, an image decoding method performed by a decoding device is provided. The method may include: determining whether there is a valid coefficient in a second area other than the upper left first area of the current block; parsing an MTS index from a bitstream based on the absence of a valid coefficient in the second area; and deriving a residual sample of the current block by applying a transform kernel derived based on the MTS index to a transform coefficient in the first area, wherein the valid coefficient exists in a scanning sub-block for scanning the valid coefficient, wherein the MTS index is parsed based on the absence of a valid coefficient in the second area.
[0013] Determining whether there is a significant coefficient in the second region includes: determining whether a value of a flag indicating whether there is a significant coefficient in the scanned subblock is 1; and determining whether the significant coefficient present in the scanned subblock is located in the second region.
[0014] Determining whether a significant coefficient exists in the second region includes: determining whether a value of a flag indicating whether a significant coefficient exists in the scanned subblock is 1; and determining whether the scanned subblock is located in the second region.
[0015] Determining whether a significant coefficient exists in the second region includes deriving flag information indicating whether a significant coefficient exists in the second region, wherein the flag information is initially set to 1, and wherein the flag information is changed to 0 when the significant coefficient is located in the second region.
[0016] The first region is the upper left 16×16 region of the current block, and among them, the scanned sub-block is a 4×4 block.
[0017] The scanning sub-blocks are scanned starting from the position of the last significant coefficient in the current block according to the reverse diagonal scanning direction.
[0018] According to an embodiment of the present disclosure, an image encoding method performed by an encoding device is provided. The method may include: deriving a transform coefficient of a current block based on a single transform for a residual sample; clearing a second region of the current block other than the upper left first region; constructing image information to parse an MTS index based on the absence of a valid coefficient in the second region, wherein the valid coefficient exists in a scanning sub-block in which the valid coefficient is scanned; and encoding the MTS index and residual information derived based on the transform coefficient of the current block.
[0019] According to still another embodiment of the present disclosure, a digital storage medium storing image data including a bit stream generated according to an image encoding method performed by an encoding device and encoded image information may be provided.
[0020] According to yet another embodiment of the present disclosure, a digital storage medium storing image data including encoded image information and a bit stream so that a decoding device performs an image decoding method may be provided.
[0021] Technical Effects
[0022] According to the present disclosure, the overall image / video compression efficiency can be increased.
[0023] According to the present disclosure, the efficiency of encoding the MTS index can be increased.
[0024] According to the present disclosure, the efficiency of an image encoding method using MTS can be increased.
[0025] 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 by a person of ordinary skill in the relevant field or derived from the present disclosure. Therefore, the specific effects of the present disclosure are not limited to those 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
[0026] Figure 1 is a diagram schematically illustrating a configuration of a video / image encoding device to which an embodiment of the present disclosure can be applied.
[0027] Figure 2 is a diagram schematically illustrating a configuration of a video / image decoding device to which an embodiment of the present disclosure can be applied.
[0028] Figure 3 The multi-conversion technology according to the embodiment of the present disclosure is schematically illustrated.
[0029] Figure 4 The intra directional mode for 65 prediction directions is schematically shown.
[0030] Figure 5 is a diagram illustrating an RST according to an embodiment of the present disclosure.
[0031] Figure 6 is a diagram illustrating an order of arranging output data of a forward primary transform into a one-dimensional vector according to an example.
[0032] Figure 7 is a diagram illustrating an order of arranging output data of a forward quadratic transform into two-dimensional blocks according to an example.
[0033] Figure 8 is a diagram illustrating a block shape to which LFNST is applied.
[0034] Fig. 91 is a diagram illustrating arrangement of output data of a forward LFNST according to an example and illustrates blocks in which output data of a forward LFNST according to an example is arranged.
[0035] Fig.10 Clearing to zero in a block to which 4×4 LFNST is applied according to an example is illustrated.
[0036] Fig.11 Clearing to zero in a block to which 8×8 LFNST is applied according to an example is illustrated.
[0037] Fig.12 Scanning of a 32×32 transform block according to an embodiment of the present disclosure is illustrated.
[0038] Fig.13 An image decoding method according to an example is illustrated.
[0039] Fig.14 An image encoding method according to an example is illustrated.
[0040] Fig.15 An example of a video / image encoding system to which the present disclosure can be applied is schematically illustrated.
[0041] Fig.16 The structure of the content streaming system to which the present disclosure is applied is illustrated. DETAILED DESCRIPTION
[0042] 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.
[0043] In addition, for the convenience of describing the different characteristic functions, each component on the drawings described herein is illustrated independently, 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.
[0044] 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.
[0045] 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.).
[0046] In this document, various embodiments related to video / image encoding may be provided, and unless otherwise specified, the embodiments may be combined with each other and performed.
[0047] In this document, video can refer to a collection of a series of images over a period of time. Generally, 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.
[0048] 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.
[0049] 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.
[0050] 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".
[0051] 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".
[0052] 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".
[0053] 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”.
[0054] 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".
[0055] Technical features described separately in one drawing in the present disclosure may be implemented separately or may be implemented simultaneously.
[0056] Figure 1 Schematically illustrates a configuration of a video / image encoding device to which an embodiment of the present disclosure can be applied. Hereinafter, the so-called video encoding device may include an image encoding device.
[0057] Reference Figure 1, the encoding device 100 may include and be configured with an image divider 110, a predictor 120, a residual processor 130, 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 further 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 divider 110, the predictor 120, the residual processor 130, the entropy encoder 140, the adder 150, and the filter 160 described above may be composed of one or more hardware components (e.g., an encoder chipset or processor). In addition, the memory 170 may include a decoded picture buffer (DPB) and may also be composed of a digital storage medium. The hardware component may further include a memory 170 as an internal / external component.
[0058] The image divider 110 may divide the input image (or picture, frame) input to the encoding device 100 into one or more processing units. As an example, the processing unit may be referred to as a coding unit (CU). In this case, the coding unit may be recursively divided 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 divided into a plurality of 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 also be applied first. The encoding process according to this document may be performed based on a final coding unit that is no longer divided. In this case, based on the encoding efficiency according to image characteristics, etc., the LCU may be directly used as the final coding unit, or alternatively, the coding unit may be recursively divided into coding units of a deeper depth so that a coding unit with an optimal size may be used as the final coding unit. Here, the encoding process may include processes such as prediction, transformation, and reconstruction described later. As another example, the processing unit may also include a prediction unit (PU) or a transform unit (TU). In this case, each of the PU and the TU may be segmented or divided from the aforementioned final coding unit. The PU may be a unit for sample prediction, and the TU may be a unit for inducing a transform coefficient and / or a unit for inducing a residual signal from a transform coefficient.
[0059] In some cases, a unit may be used interchangeably with terms such as a block or region. Typically, an M×N block may represent a sample or a set of transform coefficients consisting of M columns and N rows. A sample may generally represent a pixel or a pixel value, and may also represent only a pixel / pixel value of a luminance component, and may also represent only a pixel / pixel value of a chrominance component. A sample may be used as an item corresponding to a pixel or a primitive configuring a picture (or image).
[0060] The encoding device 100 can generate a residual signal (residual block, residual sample array) by subtracting the prediction signal (prediction block, prediction sample array) output from the inter predictor 121 or the intra predictor 122 from the input image signal (original block, original sample array), and send the generated residual signal to the transformer 132. In this case, as illustrated, the unit for subtracting the prediction signal (prediction block, prediction sample array) from the input image signal (original block, original sample array) within the encoder 100 can be referred to as a subtractor 131. The predictor can perform prediction on a block to be processed (hereinafter referred to as a current block) and generate a prediction block including prediction samples of the current block. The predictor can determine whether to apply intra prediction or inter prediction based on the current block or CU. The predictor can generate various information about the prediction, such as prediction mode information, to transmit the generated information to the entropy encoder 140, as described later in the description of each prediction mode. The information about the prediction can be encoded by the entropy encoder 140 and can be output in the form of a bitstream.
[0061] The intra-frame predictor 122 can predict the current block with reference to samples within the current picture. Depending on the prediction mode, the referenced sample may be located adjacent to the current block, or may also be located away from the current block. The prediction mode in the intra-frame prediction may include multiple non-directional modes and multiple directional modes. The non-directional mode may include, for example, a DC mode or a plane mode. Depending on the fineness of the prediction direction, the directional mode may include (for example) 33 directional prediction modes or 65 directional prediction modes. However, this is illustrative, and more or less directional prediction modes than the above number may be used according to the setting. The intra-frame predictor 122 may also use the prediction mode applied to the adjacent block to determine the prediction mode applied to the current block.
[0062] The inter-frame predictor 121 may induce a prediction block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, 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 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 also be the same as each other, and may also be different from each other. The temporal neighboring block may be referred to as a name such as a collocated reference block, a collocated CU (col CU), or the like, and the reference picture including the temporal neighboring block may also be referred to as a name such 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 configure a motion information candidate list based on neighboring blocks, and generate information indicating what 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, and for example, in the case of skip mode and merge mode, the inter-frame predictor 121 may use the motion information of the neighboring blocks as the motion information of the current block. In the case of skip mode, unlike merge mode, a residual signal may not be sent. The motion vector prediction (MVP) mode may indicate the motion vector of the current block by using the motion vector of the neighboring block as a motion vector prediction and by signaling the motion vector difference.
[0063] The predictor 120 may generate a prediction signal based on various prediction methods to be described later. 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 at the same time. 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 to perform prediction on a block. The IBC prediction mode or the palette mode may be used for content image / video encoding of games, etc., such as picture content coding (SCC). IBC basically performs prediction in the current picture, but it may be similarly performed on inter prediction because it derives a reference block in the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document. The palette mode may be considered an example of intra coding or intra prediction. When the palette mode is applied, the sample values in the picture may be signaled based on information about the palette index and the palette table.
[0064] 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, when the relationship information between pixels is illustrated as a curve graph, the GBT represents a transform obtained from the curve graph. The CNT represents a transform obtained based on a prediction signal generated by using all previously reconstructed pixels. In addition, the transform process can also be applied to pixel blocks of squares of the same size, and can also be applied to blocks of variable size rather than squares.
[0065] The quantizer 133 may quantize the transform coefficients to send the quantized transform coefficients to the entropy encoder 140, and the entropy encoder 140 may encode the quantized signal (information about the quantized transform coefficients) to output the encoded quantized signal in the form of a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantizer 133 may rearrange the quantized transform coefficients in the form of a block in the form of a one-dimensional vector based on the coefficient scanning order, and may also generate information about the quantized transform coefficients based on the quantized transform coefficients in the form of a one-dimensional vector. The entropy encoder 140 may perform various encoding methods, such as, for example, exponential Golomb coding, context adaptive variable length coding (CAVLC), and context adaptive binary arithmetic coding (CABAC). The entropy encoder 140 may also encode the information required for video / image reconstruction (e.g., the value of a syntax element, etc.) together with the quantized transform coefficients or separately from the quantized transform coefficients. The encoded information (e.g., the encoded video / image information) may be transmitted or stored in units of a network abstraction layer (NAL) 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, syntax elements and / or information transmitted / signaled from an encoding device to a decoding device may be included in the video / image information. The video / image information may be encoded through the above-mentioned encoding process and included in the bitstream. The bitstream may be sent through a network, or may be stored in a digital storage medium. In this article, the network may include a broadcast network and / or a communication network, etc., and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD. A transmitter (not shown) for sending a signal output from the entropy encoder 140 and / or a storage device (not shown) for storing a signal may be configured as an internal / external element of the encoding device 100, or the transmitter may also be included in the entropy encoder 140.
[0066] The quantized transform coefficients output from the quantizer 133 can be used to generate a prediction signal. For example, the dequantizer 134 and the inverse transformer 135 can apply dequantization and inverse transformation to the quantized transform coefficients to restore the residual signal (residual block or residual sample). The adder 150 can add 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 picture, reconstructed block, reconstructed sample array). As in the case of applying the skip mode, if there is no residual in the block to be processed, the prediction block can be used as the reconstructed block. The adder 150 can be called a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current picture, and as described below, it can also be used for inter-frame prediction of the next picture through filtering.
[0067] In addition, luminance mapping and chrominance scaling (LMCS) may also be applied during picture encoding and / or reconstruction.
[0068] The filter 160 can apply filtering to the reconstructed signal, thereby improving the subjective / objective image quality. For example, the filter 160 can apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and store the modified reconstructed picture in the memory 170, specifically, in 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 filtering related information to transmit the generated information to the entropy encoder 140, as described later in the description of each filtering method. The filtering related information can be encoded by the entropy encoder 140 and can be output in the form of a bit stream.
[0069] The modified reconstructed picture transmitted to the memory 170 may be used as a reference picture in the inter predictor 121. If inter prediction is applied by the inter predictor, the encoding apparatus may avoid prediction mismatch between the encoding apparatus 100 and the decoding apparatus, and may also improve encoding efficiency.
[0070] The DPB of the memory 170 may store a modified reconstructed picture to be used as a reference picture in the inter-frame predictor 121. The memory 170 may store motion information of a block in which motion information within the current picture is derived (or encoded) and / or motion information of a block within a previously reconstructed picture. The stored motion information may be transmitted to the inter-frame predictor 121 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 170 may store reconstructed samples of a reconstructed block within the current picture and transmit the reconstructed samples to the intra-frame predictor 122.
[0071] Figure 2is a diagram schematically illustrating a configuration of a video / image decoding device to which an embodiment of the present disclosure can be applied.
[0072] Reference Figure 2 , the decoding device 200 may include and be configured with 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 232 and an intra-frame predictor 231. The residual processor 220 may include a dequantizer 221 and an inverse transformer 222. According to an embodiment, the entropy decoder 210, the residual processor 220, the predictor 230, the adder 240, and the filter 250 described above may be configured by one or more hardware components (e.g., a decoder chipset or a processor). In addition, the memory 260 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware component may also include a memory 260 as an internal / external component.
[0073] When a bit stream including video / image information is input, the decoding device 200 may respond to the bit stream in which Figure 1 The image is reconstructed based on the process of processing video / image information in the encoding device shown. For example, the decoding device 200 can derive the unit / block based on the block segmentation related information obtained from the bit stream. The decoding device 200 can perform decoding using a processing unit applied to the encoding device. Therefore, the processing unit for decoding can be (for example) a coding unit, and the coding unit can be divided from the CTU or LCU according to a quadtree structure, a binary tree structure and / or a ternary tree structure. One or more transform units can be derived from the coding unit. In addition, the reconstructed image signal decoded and output by the decoding device 200 can be reproduced by a reproduction device.
[0074] The decoding device 200 may receive the bit stream from Figure 1The signal output by the encoding device shown, and the received signal can be decoded by the entropy decoder 210. For example, the entropy decoder 210 can derive the information (e.g., video / image information) required for image reconstruction (or picture reconstruction) by parsing the 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. 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 to be signaled / received (which will be described later in this article) may be decoded by a decoding process and obtained from the bitstream. For example, the entropy decoder 210 may decode the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the values of the syntax elements required for image reconstruction, as well as the quantized values of the residual related transform coefficients. More specifically, the CABAC entropy decoding method can receive bins corresponding to each syntax element in the bitstream, use the syntax element information to be decoded and the decoded information of the adjacent blocks and the blocks to be decoded or the information of the symbol / bin decoded in the previous step to determine the context model, and generate a symbol corresponding to the value of each syntax element by predicting the bin generation probability according to the determined context model to perform arithmetic decoding on the bin. At this time, the CABAC entropy decoding method can determine the context model and then update the context model using the decoded symbol / bin information of the context model for the next symbol / bin. The information about prediction among the information decoded by the entropy decoder 210 can be provided to the predictor (inter-frame predictor 232 and intra-frame predictor 231), and the residual value entropy decoded by the entropy decoder 210, that is, the quantized transform coefficient and related parameter information, can be input to the residual processor 220. The residual processor 220 can derive a residual signal (residual block, residual sample, residual sample array). In addition, the information about filtering among the information decoded by the entropy decoder 210 can be provided to the filter 250. In addition, a receiver (not shown) for receiving a signal output from the encoding device may also be configured as an internal / external element of the decoding device 200, or the receiver may also be a component of the entropy decoder 210. In addition, the decoding device according to the present disclosure may be referred to as a video / image / picture decoding device, and the decoding device may also 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 the entropy decoder 210, and the sample decoder may include at least one of the dequantizer 221, the inverse transformer 222, the adder 240, the filter 250, the memory 260, the inter-frame predictor 232, and the intra-frame predictor 231.
[0075] The dequantizer 221 may dequantize the quantized transform coefficients to output the transform coefficients. The dequantizer 221 may rearrange the quantized transform coefficients in a two-dimensional block form. In this case, the rearrangement may be performed based on the coefficient scanning order performed by the encoding device. The dequantizer 221 may perform dequantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) and obtain the transform coefficients.
[0076] The inverse transformer 222 performs an inverse transform on the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0077] The predictor 230 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 the information on prediction output from the entropy decoder 210 and determine a specific intra / inter prediction mode.
[0078] The predictor may generate a prediction signal based on various prediction methods to be described later. For example, the predictor may apply not only intra prediction or inter prediction to the prediction of a block, but may also apply intra prediction and inter prediction at the same time. 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 to perform prediction on a block. The IBC prediction mode or palette mode may be used for content image / video encoding of games, such as picture content coding (SCC). IBC basically performs prediction in the current picture, but it may be similarly performed on inter prediction because it derives a reference block in the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document. The palette mode may be considered an example of intra coding or intra prediction. When the palette mode is applied, information about the palette table and the palette index may be signaled by including it in the video / image information.
[0079] The intra-frame predictor 231 may predict the current block with reference to samples within the current picture. Depending on the prediction mode, the referenced samples may be located adjacent to the current block, or may be located away from the current block. The prediction modes in the intra-frame prediction may include a plurality of non-directional modes and a plurality of directional modes. The intra-frame predictor 231 may also use the prediction modes applied to the neighboring blocks to determine the prediction mode applied to the current block.
[0080] The inter-frame predictor 232 can induce a prediction block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information can be predicted in units of blocks, sub-blocks or samples based on the correlation of the motion information between the adjacent 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 adjacent blocks may include spatial adjacent blocks present in the current picture and temporal adjacent blocks present in the reference picture. For example, the inter-frame predictor 232 may configure a motion information candidate list based on the adjacent 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 the information about the prediction may include information indicating the mode of inter-frame prediction of the current block.
[0081] The adder 240 may add 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) to generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). For example, in the case of applying the skip mode, if there is no residual in the block to be processed, the prediction block may be used as the reconstructed block.
[0082] 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, and as described below, may also be output through filtering or may also be used for inter prediction of the next picture.
[0083] In addition, luminance mapping and chrominance scaling (LMCS) can also be applied during picture decoding.
[0084] The filter 250 may apply filtering to the reconstructed signal to improve the subjective / objective image quality. For example, the filter 250 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and send the modified reconstructed picture to the memory 260, specifically, the DPB of the memory 260. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bidirectional filter, etc.
[0085] 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 in which the motion information in the current picture is derived (decoded) and / or the motion information of the block in the previously reconstructed picture. The stored motion information may be transmitted to the inter-frame predictor 232 so as 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 transmit the stored reconstructed samples to the intra-frame predictor 231.
[0086] In this document, the exemplary embodiments described in the filter 160 , the inter predictor 121 , and the intra predictor 122 of the encoding apparatus 100 may be equally applied to the filter 250 , the inter predictor 232 , and the intra predictor 231 of the decoding apparatus 200 , respectively.
[0087] As described above, prediction is performed in order to improve the compression efficiency when performing video encoding. Accordingly, a prediction block including prediction samples for a current block as a coding target block can be generated. Here, the prediction block includes prediction samples in a spatial domain (or a pixel domain). The prediction block can be derived identically in an encoding device and a decoding device, and the encoding device can improve the image coding efficiency by signaling to the decoding device information (residual information) about the residual between the original block and the prediction block rather than the original sample value of the original block itself. The decoding device can derive a residual block including residual samples based on the residual information, generate a reconstructed block including reconstructed samples by adding the residual block to the prediction block, and generate a reconstructed picture including the reconstructed block.
[0088] The residual information may be generated by a transform process and a quantization process. For example, the encoding device may derive a residual block between the original block and the prediction block, derive a transform coefficient by performing a transform process on the residual samples (residual sample array) included in the residual block, and derive a quantized transform coefficient by performing a quantization process on the transform coefficient, so that it can signal the associated residual information to the decoding device (through a bitstream). Here, the residual information may include value information, position information, transform technology, transform kernel, quantization parameter, etc. of the quantized transform coefficient. The decoding device may perform a quantization / dequantization process based on the residual information and derive a residual sample (or residual sample block). The decoding device may generate a reconstructed block based on the prediction block and the residual block. The encoding device may derive a residual block by dequantizing / inverse transforming the quantized transform coefficient so as to serve as a reference for inter-frame prediction of the next picture, and may generate a reconstructed picture based on this.
[0089] Figure 3 The multi-conversion technology according to the embodiment of the present disclosure is schematically illustrated.
[0090] Reference Figure 3 , the converter can correspond to the aforementioned Figure 1 The converter in the encoding device, and the inverse converter may correspond to the aforementioned Figure 1 an inverse transformer in an encoding device, or Figure 2 An inverse transformer in a decoding device.
[0091] 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). The primary transform may be referred to as a core transform. In this document, a primary transform may be based on a multi-transform selection (MTS), and when a multi-transform is used as a primary transform, it may be referred to as a multi-core transform.
[0092] 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 in addition. 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.
[0093] 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 a 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.
[0094] 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.
[0095] In addition, according to the example, if a transformation is performed once by applying MTS, the mapping relationship of the transformation 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 transformation or the horizontal transformation. For example, when the horizontal transformation kernel is represented as trTypeHor and the vertical direction transformation 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.
[0096] 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.
[0097] In one example, the transformation core set according to the MTS index information is shown in the following table.
[0098] [Table 1]
[0099] tu_mts_idx[x0][y0] 0 1 2 3 4 trTypeHor 0 1 2 1 2 trTypeVer 0 1 1 2 2
[0100] The transformer may perform a secondary transform based on the (primary) transform coefficients to derive modified (secondary) transform coefficients (S320). A primary transform is a transform from the spatial domain to the frequency domain, while a secondary transform refers to a transform into a more compact representation 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 a non-separable secondary transform (NSST) or a pattern-dependent non-separable secondary transform (MDNSST). NSST may represent a transform that performs a secondary transform on the (primary) transform coefficients derived by the primary transform based on an inseparable transform matrix to generate a modified transform coefficient (or secondary transform coefficient) for the residual signal. Here, based on the inseparable transform matrix, the transform may be applied once to the (primary) transform coefficients without separating the vertical transform and the horizontal transform (or applying the horizontal / vertical transforms independently). In other words, NSST is not applied separately to (primary) transform coefficients in the vertical and horizontal directions, and can represent, for example, a transform method in which a two-dimensional signal (transform coefficient) is rearranged into a one-dimensional signal through a specific predetermined direction (e.g., a row-first direction or a column-first direction) and then a modified transform coefficient (or secondary transform coefficient) is generated based on an inseparable transform matrix. For example, the row-first order is to arrange the M×N blocks in the order of the first row, the second row, ..., and the Nth row, and the column-first order is to arrange the M×N blocks in the order of the first column, the second column, ..., and the Mth column. NSST can be applied to the upper left area of a block (hereinafter, referred to as a transform coefficient block) configured with (primary) transform coefficients. For example, when the width W and the height H of the transform coefficient block are both 8 or more, the 8×8 NSST can be applied to the upper left 8×8 area of the transform coefficient block. In addition, when both the width (W) and the height (H) of the transform coefficient block are 4 or more, when the width (W) or the height (H) of the transform coefficient block is less than 8, the 4×4 NSST may be applied to the upper left min(8,W)×min(8,H) region of the transform coefficient block. However, the embodiment is not limited thereto, and for example, even if only the condition that the width W or the height H of the transform coefficient block is 4 or more is satisfied, the 4×4 NSST may be applied to the upper left min(8,W)×min(8,H) region of the transform coefficient block.
[0101] Specifically, for example, if a 4×4 input block is used, the non-separable secondary transform may be performed as follows.
[0102] A 4×4 input block X can be represented as follows.
[0103] [Formula 1]
[0104]
[0105] If X is represented as a vector, then the vector It can be expressed as follows.
[0106] [Formula 2]
[0107]
[0108] 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.
[0109] In this case, the non-separable quadratic transform can be calculated as follows.
[0110] [Formula 3]
[0111]
[0112] In this formula, denotes a transform coefficient vector and T denotes a 16×16 (non-separable) transform matrix.
[0113] 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.
[0114] Furthermore, 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.
[0115] 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. An 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 upper left 8×8 region in the transform coefficient block. Similarly, a 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 upper 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.
[0116] 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.
[0117] 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.
[0118] 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.
[0119] 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.
[0120] Figure 4 The intra directional mode for 65 prediction directions is schematically shown.
[0121] 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.
[0122] According to an example, four transform sets according to intra prediction modes may be mapped, for example, as shown in the following table.
[0123] [Table 2]
[0124] predModeIntra lfnstTrSetIdx predModeIntra<0 1 0<=predModeIntra<=1 0 2<=predModeIntra<=12 1 13<=predModeIntra<=23 2 24<=predModeIntra<=44 3 45<=predModeIntra<=55 2 56<=predModeIntra<=80 1
[0125] As shown in Table 2, depending on the intra prediction mode, any one of the four transform sets, i.e., lfnstTrSetId x , can be mapped to any of four indices (i.e., 0 to 3).
[0126] 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.
[0127] 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.
[0128] In addition, 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.
[0129] 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 (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.
[0130] 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 the 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.
[0131] 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.
[0132] In addition, as described above, if the secondary (inverse) transform is omitted, the (dequantized) transform coefficients can be received, a (separable) inverse transform can be performed, and a residual block (residual sample) can be obtained. As described above, the encoding device and the decoding device can generate a reconstructed block based on the residual block and the prediction block, and can generate a reconstructed picture based on the reconstructed block.
[0133] Furthermore, 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.
[0134] In addition, 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.
[0135] 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.
[0136] RST may be referred to as various terms such as reduced transform, reduced secondary transform, reduced 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.
[0137] In addition, when performing a secondary inverse transform based on 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 of the 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.
[0138] Figure 5is a diagram illustrating an RST according to an embodiment of the present disclosure.
[0139] In the present disclosure, a “target block” may refer to a current block to be encoded, a residual block, or a transform block.
[0140] In the RST according to the example, an N-dimensional vector can be mapped to an R-dimensional vector located in another space, so that a reduction transformation matrix can be determined, where R is less than N. N may refer to the square of the length of the side of the block to which the transformation is applied, or the total number of transformation coefficients corresponding to the block to which the transformation is applied, and the reduction factor may refer to an R / N value. The reduction factor may be referred to as a reduction factor, a reduction factor, a simplification factor, a simple factor, or other various terms. In addition, R may be referred to as a reduction coefficient, but depending on the situation, the reduction factor may refer to R. In addition, depending on the situation, the reduction factor may refer to an N / R value.
[0141] In an example, the reduction factor or reduction coefficient may be signaled through a bitstream, but the example is not limited thereto. For example, a predetermined value for the reduction factor or reduction coefficient may be stored in each of the encoding device 100 and the decoding device 200, and in this case, the reduction factor or reduction coefficient may not be signaled separately.
[0142] The size of the reduced transform matrix according to an example may be R×N which is smaller than N×N (the size of a conventional transform matrix), and may be defined as in Equation 4 below.
[0143] [Formula 4]
[0144]
[0145] Figure 5 The matrix T in the reduced transform block shown in (a) may refer to the matrix T of Formula 4 R×N .like Figure 5 As shown in (a), when the reduction transformation matrix T R×N When multiplied by the residual samples of the target block, the transform coefficients of the current block can be derived.
[0146] In the example, if the size of the block to which the transform is applied is 8×8 and R=16 (ie, R / N=16 / 64=1 / 4), then according to Figure 5 The RST of (a) can be expressed as a matrix operation shown in the following Equation 5. In this case, the storage and multiplication calculations can be reduced to about 1 / 4 by a reduction factor.
[0147] In the present disclosure, a matrix operation may be understood as an operation of obtaining a column vector by multiplying a column vector by a matrix provided on the left side of the column vector.
[0148] [Formula 5]
[0149]
[0150] In formula 5, r1 to r 64 y may represent the residual sample of the target block, and specifically may be a transform coefficient generated by applying a transform. As a result of the calculation of Equation 5, the transform coefficient c of the target block may be derived. i , and derive c i The process can be shown as formula 6.
[0151] [Formula 6]
[0152]
[0153] As a result of the calculation of Equation 6, the transform coefficients c1 to c R That is, when R=16, the transform coefficients c1 to c 16 . If a conventional transform is applied instead of RST, and a transform matrix of a size of 64×64 (N×N) is multiplied by a residual sample of a size of 64×1 (N×1), only 16 (R) transform coefficients are derived for the target block because RST is applied, although 64 (N) transform coefficients are derived for the target block. Since the total number of transform coefficients for the target block is reduced from N to R, the amount of data transmitted by the encoding device 100 to the decoding device 200 is reduced, and thus the transmission efficiency between the encoding device 100 and the decoding device 200 can be improved.
[0154] When considered from the perspective of the size of the transformation matrix, the size of the conventional transformation matrix is 64×64 (N×N), but the size of the reduced transformation matrix is reduced to 16×64 (R×N), so the storage usage in the case of performing RST can be reduced by the R / N ratio compared to the case of performing the conventional transformation. In addition, when compared with the number of multiplication calculations N×N in the case of using the conventional transformation matrix, the use of the reduced transformation matrix can reduce the number of multiplication calculations (R×N) by the R / N ratio.
[0155] In an example, the transformer 132 of the encoding device 100 may derive the transform coefficient of the target block by performing a primary transform and a secondary transform based on RST on the residual samples of the target block. These transform coefficients may be transmitted to the inverse transformer of the decoding device 200, and the inverse transformer 222 of the decoding device 200 may derive the modified transform coefficient based on the inverse reduced secondary transform (RST) for the transform coefficient, and may derive the residual sample of the target block based on the inverse primary transform for the modified transform coefficient.
[0156] According to the example, the inverse RST matrix T N×RThe size of is N×R which is smaller than the size of the conventional inverse transform matrix N×N, and is similar to the reduced transform matrix T shown in Equation 4. R×N Has a transposition relationship.
[0157] Figure 5 The matrix T in the reduced inverse transform block shown in (b) t It can refer to the inverse RST matrix T N×R T (The superscript T refers to transposition). Figure 5 As shown in (b), when the inverse RST matrix T N×R T When multiplied by the transform coefficients of the target block, the modified transform coefficients of the target block or the residual samples of the target block can be derived. R×N T It can be expressed as (T R×N ) T N×R .
[0158] More specifically, when the inverse RST is used as the secondary inverse transform, when the inverse RST matrix T N×R T When multiplied by the transform coefficients of the target block, the modified transform coefficients of the target block can be derived. In addition, the inverse RST can be used as an inverse primary transform, and in this case, when the inverse RST matrix T N×R T When multiplied by the transform coefficients of the target block, the residual samples of the target block can be derived.
[0159] In the example, if the size of the block to which the inverse transform is applied is 8×8 and R=16 (ie, R / N=16 / 64=1 / 4), then according to Figure 5 The RST of (b) can be expressed as the matrix operation shown in the following Equation 7.
[0160] [Formula 7]
[0161]
[0162] In formula 7, c1 to c 16 As a result of the calculation of Equation 7, r representing the modified transform coefficient of the target block or the residual sample of the target block can be derived. i , and derive r i The process can be shown as formula 8.
[0163] [Formula 8]
[0164]
[0165] As a result of the calculation of Equation 8, r1 to r2 representing the modified transform coefficients of the target block or the residual samples of the target block can be derived. N . From the perspective of the size of the inverse transformation matrix, the size of the conventional inverse transformation matrix is 64×64 (N×N), but the size of the inverse reduction transformation matrix is reduced to 64×16 (R×N), so the storage usage rate in the case of performing the inverse RST can be reduced by the R / N ratio compared to the case of performing the conventional inverse transformation. In addition, when compared with the number of multiplication calculations N×N in the case of using the conventional inverse transformation matrix, the use of the inverse reduction transformation matrix can reduce the number of multiplication calculations (N×R) by the R / N ratio.
[0166] The transform set configuration shown in Table 2 can also be applied to 8×8 RST. That is, 8×8 RST can be applied according to the transform set in Table 2. Since a transform set includes two or three transforms (kernels) according to the intra prediction mode, it can be configured to select one of up to four transforms including the case where the secondary transform is not applied. In the transform where the secondary transform is not applied, the application of the identity matrix can be considered. Assuming that indexes 0, 1, 2, and 3 are assigned to the four transforms respectively (for example, index 0 can be assigned to the case where the identity matrix is applied, that is, the case where the secondary transform is not applied), the transform index or lfnst index as a syntax element can be signaled for each transform coefficient block, thereby specifying the transform to be applied. That is, for the upper left 8×8 block, the 8×8 NSST in the RST configuration can be specified by the transform index, or the 8×8 lfnst can be specified when LFNST is applied. 8×8lfnst and 8×8RST refer to the transform applicable to an 8×8 region included in a transform coefficient block when W and H of a target block to be transformed are both equal to or greater than 8, and the 8×8 region may be the upper left 8×8 region in the transform coefficient block. Similarly, 4×4lfnst and 4×4RST refer to the transform applicable to a 4×4 region included in a transform coefficient block when W and H of a target block are both equal to or greater than 4, and the 4×4 region may be the upper left 4×4 region in the transform coefficient block.
[0167] According to an embodiment of the present disclosure, for the transformation in the encoding process, only 48 pieces of data can be selected, and a maximum 16×48 transform kernel matrix can be applied thereto, instead of applying a 16×64 transform kernel matrix to 64 pieces of data forming an 8×8 region. Here, "maximum" means that m has a maximum value of 16 in the m×48 transform kernel matrix for generating m coefficients. That is, when RST is performed by applying an m×48 transform kernel matrix (m≤16) to an 8×8 region, 48 pieces of data are input, and m coefficients are generated. When m is 16, 48 pieces of data are input and 16 coefficients are generated. That is, assuming that 48 pieces of data form a 48×1 vector, the 16×48 matrix and the 48×1 vector are multiplied in sequence, thereby generating a 16×1 vector. Here, the 48 pieces of data forming an 8×8 region can be appropriately arranged, thereby forming a 48×1 vector. For example, a 48×1 vector can be constructed based on 48 pieces of data constituting an area other than the lower right 4×4 area among the 8×8 area. Here, when the matrix operation is performed by applying the maximum 16×48 transform kernel matrix, 16 modified transform coefficients are generated and the 16 modified transform coefficients can be arranged in the upper left 4×4 region according to the scanning order, and the upper right 4×4 region and the lower left 4×4 region can be filled with zeros.
[0168] For the inverse transform in the decoding process, the transposed matrix of the aforementioned transform kernel matrix can be used. That is, when the inverse RST or LFNST is performed in the inverse transform process performed by the decoding device, the input coefficient data to which the inverse RST is applied is configured in a one-dimensional vector according to a predetermined arrangement order, and the modified coefficient vector obtained by multiplying the one-dimensional vector with the corresponding inverse RST matrix on the left side of the one-dimensional vector can be arranged in a two-dimensional block according to a predetermined arrangement order.
[0169] In summary, in the transformation process, when RST or LFNST is applied to an 8×8 region, 48 transform coefficients in the upper left region, the upper right region, and the lower left region except the lower right region of the 8×8 region are matrix-operated with a 16×48 transform kernel matrix. For the matrix operation, the 48 transform coefficients are input in a one-dimensional array. When the matrix operation is performed, 16 modified transform coefficients are derived, and the modified transform coefficients can be arranged in the upper left region of the 8×8 region.
[0170] On the contrary, in the inverse transform process, when the inverse RST or LFNST is applied to the 8×8 area, 16 transform coefficients corresponding to the upper left area of the 8×8 area among the transform coefficients in the 8×8 area can be input in a one-dimensional array according to the scanning order, and can undergo a matrix operation with a 48×16 transform kernel matrix. That is, the matrix operation can be expressed as (48×16 matrix)*(16×1 transform coefficient vector)=(48×1 modified transform coefficient vector). Here, the n×1 vector can be interpreted as having the same meaning as the n×1 matrix, and can therefore be expressed as an n×1 column vector. In addition, * represents matrix multiplication. When the matrix operation is performed, 48 modified transform coefficients can be derived, and the 48 modified transform coefficients can be arranged in the upper left area, the upper right area, and the lower left area of the 8×8 area except the lower right area.
[0171] When the secondary inverse transform is based on 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 for deriving modified transform coefficients based on an inverse RST of the transform coefficients and an inverse primary transformer for deriving residual samples of the target block based on an inverse primary transform of the modified transform coefficients. The inverse primary transform refers to an inverse transform of a primary transform applied to the residual. In the present disclosure, deriving transform coefficients based on a transform may refer to deriving transform coefficients by applying a transform.
[0172] The non-separable transform (LFNST) described above will be described in detail as follows: LFNST may include a forward transform performed by an encoding device and an inverse transform performed by a decoding device.
[0173] The encoding device receives as input a result (or a portion of a result) derived after applying a primary (core) transform, and applies a forward secondary transform (secondary transform).
[0174] [Formula 9]
[0175] y=G T x
[0176] In Equation 9, x and y are the input and output of the secondary transform, respectively, G is a matrix representing the secondary transform, and the transform basis vectors consist of column vectors. In the case of inverse LFNST, when the dimension of the transform matrix G is expressed as [number of rows × number of columns], in the case of forward LFNST, the transpose of the matrix G becomes G T Dimension.
[0177] For inverse LFNST, the dimensions of the matrix G are [48×16], [48×8], [16×16], [16×8], and the [48×8] matrix and the [16×8] matrix are partial matrices of 8 transformation basis vectors sampled from the left side of the [48×16] matrix and the [16×16] matrix, respectively.
[0178] On the other hand, for forward LFNST, the matrix G T The dimensions of are [16×48], [8×48], [16×16], [8×16], and the [8×48] matrix and the [8×16] matrix are partial matrices obtained by sampling 8 transformation basis vectors from the upper parts of the [16×48] matrix and the [16×16] matrix, respectively.
[0179] Therefore, in the case of forward LFNST, a [48×1] vector or a [16×1] vector can be used as input x, and a [16×1] vector or a [8×1] vector can be used as output y. In video encoding and decoding, the output of the forward primary transform is two-dimensional (2D) data, so in order to construct a [48×1] vector or a [16×1] vector as input x, it is necessary to construct a one-dimensional vector by appropriately arranging the 2D data as the output of the forward transform.
[0180] Figure 6 is a diagram illustrating an order of arranging output data of a forward primary transform into a one-dimensional vector according to an example. Figure 6 The left figures of (a) and (b) show the order for constructing a [48×1] vector, and Figure 6 The right figures of (a) and (b) show the order for constructing a [16×1] vector. In the case of LFNST, the 2D data can be constructed by Figure 6 The same order as in (a) and (b) is arranged sequentially to obtain a one-dimensional vector x.
[0181] The arrangement direction of the output data of the forward primary transform may be determined according to the intra-frame prediction mode of the current block. For example, when the intra-frame prediction mode of the current block is in the horizontal direction relative to the diagonal direction, the arrangement direction of the output data of the forward primary transform may be determined according to the intra-frame prediction mode of the current block. Figure 6 The output data of the forward primary transform are arranged in the order of (a), and when the intra prediction mode of the current block is in a vertical direction relative to the diagonal direction, the output data of the forward primary transform can be arranged in the order of (a). Figure 6 The output data of the forward primary transformation are arranged in the order of (b).
[0182] According to the example, different from Figure 6 The arrangement order of (a) and (b) is shown in Figure 1, and in order to derive and apply Figure 6If the arrangement order of (a) and (b) is the same result (y vector), the column vectors of the matrix G can be rearranged according to the arrangement order. In other words, the column vectors of G can be rearranged so that each element constituting the x vector is always multiplied by the same transformation basis vector.
[0183] Since the output y derived by Formula 9 is a one-dimensional vector, when two-dimensional data is required as input data in a process using the result of a forward quadratic transform as input (for example, in a process of performing quantization or residual encoding), the output y vector of Formula 9 needs to be properly arranged as 2D data again.
[0184] Figure 7 is a diagram illustrating an order of arranging output data of a forward quadratic transform into two-dimensional blocks according to an example.
[0185] In the case of LFNST, the output values may be arranged in 2D blocks according to a predetermined scanning order. Figure 7 (a) shows that when the output y is a [16×1] vector, the output values are arranged at 16 positions of the 2D block according to the diagonal scanning order. Figure 7 (b) shows that when the output y is a [8×1] vector, the output values are arranged at 8 positions of the 2D block according to the diagonal scanning order, and the remaining 8 positions are filled with zeros. Figure 7 The X in (b) indicates that it is filled with zeros.
[0186] According to another example, since the order of processing the output vector y when performing quantization or residual encoding can be preset, the output vector y may not be arranged in a sequence such as Figure 7 However, in the case of residual coding, data encoding may be performed in 2D block (eg, 4×4) units (eg, CG (coefficient group)), and in this case, according to Figure 7 The data is arranged in a specific order in the diagonal scan order of .
[0187] In addition, the decoding device may configure a one-dimensional input vector y by arranging two-dimensional data output through a dequantization process according to a preset scanning order for inverse transformation. The input vector y may be output as an output vector x through the following equation.
[0188] [Formula 10]
[0189] x=Gy
[0190] In the case of inverse LFNST, the output vector x can be derived by multiplying the input vector y, which is a [16×1] vector or a [8×1] vector, by the G matrix. For inverse LFNST, the output vector x can be a [48×1] vector or a [16×1] vector.
[0191] The output vector x is based on Figure 6 The order shown in is arranged in a two-dimensional block and is arranged as two-dimensional data, and the two-dimensional data becomes input data (or a part of the input data) of an inverse primary transform.
[0192] Thus, the inverse quadratic transform is overall the reverse of the forward quadratic transform process, and in the case of an inverse transform, unlike in the forward direction, the inverse quadratic transform is applied first and then the inverse primary transform.
[0193] In the inverse LFNST, one of 8 [48×16] matrices and 8 [16×16] matrices can be selected as the transformation matrix G. Whether to apply the [48×16] matrix or the [16×16] matrix depends on the size and shape of the block.
[0194] In addition, 8 matrices can be derived from the four transform sets shown in Table 2 above, and each transform set can be composed of two matrices. Which transform set to use among the 4 transform sets is determined according to the intra prediction mode, and more specifically, the transform set is determined based on the value of the intra prediction mode extended by considering wide-angle intra prediction (WAIP). Which matrix is selected from the two matrices constituting the selected transform set is derived by index signaling. More specifically, 0, 1, and 2 can be used as the index values sent, 0 can indicate that LFNST is not applied, and 1 and 2 can indicate any one of the two transform matrices constituting the transform set selected based on the intra prediction mode value.
[0195] Furthermore, as described above, which transform matrix of the [48×16] matrix and the [16×16] matrix is applied to the LFNST is determined by the size and shape of the transform target block.
[0196] Figure 8 is a diagram illustrating a block shape to which LFNST is applied. Figure 8 (a) shows a 4×4 block, Figure 8 (b) shows a 4×8 block and an 8×4 block, Figure 8 (c) shows a 4×N block or an N×4 block, where N is 16 or greater, Figure 8 (d) shows an 8×8 block, Figure 8 (e) shows an M×N block, where M≥8, N≥8 and N>8 or M>8.
[0197] exist Figure 8 In , blocks with thick borders indicate the areas where LFNST is applied. Figure 8 For the blocks (a) and (b), LFNST is applied to the top left 4×4 region, and for Figure 8 In the block (c), LFNST is applied separately to the two upper left 4×4 regions that are arranged consecutively. Figure 8 In (a), (b), and (c), since LFNST is applied in units of 4×4 regions, this LFNST will be referred to as “4×4LFNST” hereinafter. Depending on the matrix dimension of G, a [16×16] or [16×8] matrix may be applied.
[0198] More specifically, the [16×8] matrix is applied to Figure 8 (a) 4×4 block (4×4TU or 4×4CU), and the [16×16] matrix is applied to Figure 8 This is to adjust the worst case computational complexity to 8 multiplications per sample.
[0199] about Figure 8 In (d) and (e), LFNST is applied to the upper left 8×8 region, and this LFNST is hereinafter referred to as "8×8LFNST". As the corresponding transformation matrix, a [48×16] matrix or a [48×8] matrix may be applied. In the case of the forward LFNST, since a [48×1] vector (the X vector in Equation 9) is input as input data, not all sample values of the upper left 8×8 region are used as input values of the forward LFNST. That is, as can be seen from Figure 6 The left order of (a) or Figure 6 As can be seen from the left side sequence of (b), a [48×1] vector can be constructed based on samples belonging to the remaining 3 4×4 blocks while leaving the lower right 4×4 block as is.
[0200] The [48×8] matrix can be applied to Figure 8 The 8×8 block (8×8TU or 8×8CU) in (d) and the [48×16] matrix can be applied to Figure 8 The 8×8 block in (e) is also to adjust the worst-case computational complexity to 8 multiplications per sample.
[0201] Depending on the block shape, when the corresponding forward LFNST (4×4 or 8×8 LFNST) is applied, 8 or 16 output data (Y vector in Eq. 9, [8×1] or [16×1] vector) are generated. In the forward LFNST, since the matrix G T The characteristic is that the number of output data is equal to or less than the number of input data.
[0202] Fig. 9 is a diagram illustrating arrangement of output data of a forward LFNST according to an example, and shows blocks in which the output data of the forward LFNST is arranged according to a block shape.
[0203] exist Fig. 9The shaded area on the upper left of the block shown corresponds to the area where the output data of the forward LFNST is located, the positions marked with 0 indicate samples filled with the value 0, and the remaining area represents the area not changed by the forward LFNST. In the area not changed by the LFNST, the output data of the forward primary transform remains unchanged.
[0204] As described above, since the size of the applied transformation matrix varies according to the shape of the block, the amount of output data also varies. Fig. 9 , the output data of the forward LFNST may not completely fill the upper left 4×4 block. Fig. 9 In the cases of (a) and (d) of , the [16×8] matrix and the A[48×8] matrix are applied to the block or partial area inside the block indicated by the bold line, respectively, and an [8×1] vector is generated as the output of the forward LFNST. That is, according to Figure 7 The scanning order shown in (b) can only fill 8 output data, such as Fig. 9 As shown in (a) and (d), the remaining 8 positions can be filled with 0. Figure 8 (d) The case of LFNST application blocks, such as Fig. 9 As shown in (d), the two 4×4 blocks on the upper right and lower left adjacent to the upper left 4×4 block are also filled with values of 0.
[0205] As described above, basically, by signaling the LFNST index, it is specified whether to apply LFNST and the transformation matrix to be applied. Fig. 9 As shown, when LFNST is applied, since the number of output data of the forward LFNST may be equal to or less than the number of input data, an area filled with zero values appears as follows.
[0206] 1) If Fig. 9 As shown in (a), samples from the eighth position and subsequent positions in the scanning order in the upper left 4×4 block, that is, samples from the ninth to sixteenth positions.
[0207] 2) If Fig. 9 As shown in (d) and (e), when the [48×16] matrix or the [48×8] matrix is applied, two 4×4 blocks adjacent to the upper left 4×4 block or the second and third 4×4 blocks in the scanning order.
[0208] Therefore, if non-zero data exists by checking areas 1) and 2), it is determined that LFNST is not applied, so that signaling of the corresponding LFNST index can be omitted.
[0209] According to an example, for example, in the case of LFNST adopted in the VVC standard, since the signaling of the LFNST index is performed after the residual coding, the encoding device can know whether there is non-zero data (significant coefficient) at all positions within the TU or CU block through the residual coding. Therefore, the encoding device can determine whether to perform signaling about the LFNST index based on the presence of non-zero data, and the decoding device can determine whether to parse the LFNST index. When non-zero data does not exist in the area specified in 1) and 2) above, the signaling of the LFNST index is performed.
[0210] In addition, for the adopted LFNST, the following simplified method can be applied.
[0211] (i) According to an example, the number of output data of the forward LFNST may be limited to a maximum value of 16.
[0212] exist Figure 8 In the case of (c), 4×4 LFNST can be applied to two 4×4 regions adjacent to the upper left, respectively, and in this case, a maximum of 32 LFNST output data can be generated. When the number of output data of the forward LFNST is limited to a maximum of 16, in the case of a 4×N / N×4 (N≥16) block (TU or CU), 4×4 LFNST is applied only to one 4×4 region in the upper left, and LFNST can be applied only to Figure 8 By doing this, the implementation of image coding can be simplified.
[0213] (ii) According to an example, zeroing may be additionally applied to an area to which LFNST is not applied. In this document, zeroing may mean filling all positions belonging to a specific area with a value of 0. That is, zeroing may be applied to an area that is unchanged due to LFNST, and the result of the forward primary transformation is maintained. As described above, since LFNST is divided into 4×4 LFNST and 8×8 LFNST, zeroing may be divided into two types ((ii)-(A) and (ii)-(B)) as follows.
[0214] (ii)-(A) When 4×4 LFNST is applied, an area to which 4×4 LFNST is not applied may be cleared. Fig.10 Clearing to zero in a block to which 4×4 LFNST is applied according to an example is illustrated.
[0215] like Fig.10 As shown, for the block to which 4×4 LFNST is applied, that is, for Fig. 9 For the blocks in (a), (b), and (c), even the areas where LFNST is not applied can be filled with zeros.
[0216] Fig.10(d) shows that when the maximum number of pieces of output data of the forward LFNST is limited to 16 according to an example, clearing is performed on the remaining blocks to which the 4×4 LFNST is not applied.
[0217] (ii)-(B) When 8×8 LFNST is applied, an area to which 8×8 LFNST is not applied may be cleared. Fig.11 The clearing of zeros in a block to which an 8×8 LFNST is applied according to an example is illustrated.
[0218] like Fig.11 As shown, for the block with 8×8 LFNST applied, that is, Fig. 9 All blocks in (d) and (e) can be filled with zeros even if the area to which LFNST is not applied.
[0219] (iii) Due to the zeroing proposed in (ii), the area filled with zeros can change when LFNST is applied. Therefore, according to the zeroing proposed in (ii), Fig. 9 Compared with LFNST, a wider area can be checked for the presence of non-zero data.
[0220] For example, when (ii)-(B) is applied, in addition to Fig. 9 Outside the area filled with zeros in (d) and (e), Fig.11 Whether there is non-zero data in the area additionally filled with 0 in , and then the LFNST index can be signaled only when there is no non-zero data.
[0221] Of course, even if the clearing proposed in (ii) is applied, it is possible to check whether there is non-zero data in the same way as the existing LFNST index signaling. Fig. 9 After checking whether there is non-zero data in the block filled with zeros in the , LFNST index signaling can be applied. In this case, the encoding device only performs zeroing and the decoding device does not assume the zeroing, that is, it only checks whether the non-zero data exists only in Fig. 9 LFNST index parsing can be performed in regions explicitly marked as 0 in .
[0222] Various embodiments of the combination of the simplified methods ((i), (ii)-(A), (ii)-(B), (iii)) applying LFNST can be derived. Of course, the combination of the simplified methods described above is not limited to the following embodiments, and any combination can be applied to LFNST.
[0223] Implementation
[0224] -Limit the number of output data of the forward LFNST to a maximum of 16 → (i)
[0225] - When 4×4 LFNST is applied, all regions where 4×4 LFNST is not applied are cleared → (ii)-(A)
[0226] - When 8×8 LFNST is applied, all regions where 8×8 LFNST is not applied are cleared → (ii)-(B)
[0227] - After checking whether non-zero data also exists in the existing areas filled with zero values and in the areas filled with zeros due to the additional clearing ((ii)-(A), (ii)-(B)), the LFNST index is signaled only if non-zero data does not exist → (iii).
[0228] In an embodiment, when LFNST is applied, the area where non-zero output data may exist is limited to the interior of the upper left 4×4 area. Specifically, Fig.10 (a) and Fig.11 In (a), the eighth position in the scan order is the last position where non-zero data can exist, while in Fig.10 (b) and (d) and Fig.11 In (b), the sixteenth position in the scanning order (ie, the lower right position of the upper left 4×4 block) is the last position where non-zero data may exist.
[0229] Therefore, after applying LFNST, after checking whether non-zero data exists at a position that is not allowed by the residual encoding process (at a position beyond the last position), it can be determined whether to signal the LFNST index.
[0230] In the case of the zeroing method proposed in (ii), the amount of calculation required to perform the entire transformation process can be reduced due to the amount of data ultimately generated when both the primary transformation and LFNST are applied. That is, when LFNST is applied, since zeroing is applied to the forward primary transformation output data exists in the area where LFNST is not applied, it is not necessary to generate data for the area that becomes zeroed during the execution of the forward primary transformation. Therefore, the amount of calculation required to generate the corresponding data can be reduced. The additional effects of the zeroing method proposed in (ii) are summarized as follows.
[0231] First, as mentioned above, the amount of computation required to perform the entire transformation process is reduced.
[0232] In particular, when (ii)-(B) is applied, the amount of calculation in the worst case is reduced, so that the transformation process can be made lighter. In other words, in general, a large amount of calculation is required to perform a large-size primary transformation. By applying (ii)-(B), the amount of data derived as a result of performing forward LFNST can be reduced to 16 or less. In addition, as the size of the entire block (TU or CU) increases, the effect of reducing the amount of transformation operations further increases.
[0233] Second, the amount of computation required for the entire transformation process can be reduced, thereby reducing the power consumption required to perform the transformation.
[0234] Third, the delay involved in the transformation process is reduced.
[0235] Secondary transforms such as LFNST add computational effort to the existing primary transform, thus increasing the overall latency involved in performing the transform. In particular, in the case of intra prediction, since reconstructed data of neighboring blocks is used in the prediction process, during encoding, the increase in latency due to the secondary transform results in an increase in latency until reconstruction. This can result in an increase in the overall latency of intra prediction encoding.
[0236] However, if the clearing proposed in (ii) is applied, the delay time for performing one transform can be greatly reduced when LFNST is applied, maintaining or reducing the delay time of the entire transform, so that the encoding device can be implemented more simply.
[0237] In conventional intra prediction, the current block to be encoded is regarded as one coding unit, and encoding is performed without segmentation. However, intra sub-partitioning (ISP) encoding means performing intra prediction encoding by dividing the current block to be encoded in the horizontal direction or the vertical direction. In this case, a reconstructed block can be generated by performing encoding / decoding in units of divided blocks, and the reconstructed block can be used as a reference block for the next divided block. According to an embodiment, in ISP encoding, one coding block may be divided into two or four sub-blocks and encoded, and in ISP, in one sub-block, intra prediction is performed with reference to the reconstructed pixel values of the sub-block located on the adjacent left side or the adjacent upper side. Hereinafter, "encoding" may be used as a concept including both encoding performed by an encoding device and decoding performed by a decoding device.
[0238] ISP is to divide the block predicted as a luma frame into two or four sub-partitions in the vertical or horizontal direction according to the size of the block. For example, the minimum block size to which ISP can be applied is 4×8 or 8×4. When the block size is larger than 4×8 or 8×4, the block is divided into 4 sub-partitions.
[0239] When ISP is applied, subblocks are encoded sequentially from left to right or from top to bottom according to the partition type (e.g., horizontally or vertically), and after performing reconstruction processing via inverse transform and intra prediction for one subblock, encoding of the next subblock can be performed. For the leftmost or topmost subblock, the reconstructed pixels of the already encoded coding block are referenced, as in the conventional intra prediction method. In addition, when each side of the subsequent internal subblock is not adjacent to the previous subblock, in order to derive the reference pixels adjacent to the corresponding side, the reconstructed pixels of the already encoded adjacent coding blocks are referenced, as in the conventional intra prediction method.
[0240] In ISP coding mode, all subblocks can be encoded with the same intra prediction mode, and a flag indicating whether ISP coding is used and a flag indicating the direction (horizontal or vertical) in which the splitting is performed can be signaled. Here, the number of subblocks can be adjusted to 2 or 4 depending on the block shape. When the size (width × height) of one subblock is less than 16, splitting in the subblock may not be allowed, or a restriction may be set so that ISP coding itself is not applied.
[0241] Also, in the case of the ISP prediction mode, one coding unit is divided into two or four partition blocks (ie, sub-blocks) and predicted, and the same intra prediction mode is applied to the divided two or four partition blocks.
[0242] As described above, in the division direction, both the horizontal direction (when an M×N coding unit having a horizontal length and a vertical length of M and N, respectively, is divided in the horizontal direction, if the M×N coding unit is divided into two, the M×N coding unit is divided into M×(N / 2) blocks, and if the M×N coding unit is divided into four blocks, the M×N coding unit is divided into M×(N / 4) blocks) and the vertical direction (when the M×N coding unit is divided in the vertical direction, if the M×N coding unit is divided into two, the M×N coding unit is divided into (M / 2)×N blocks, and if the M×N coding unit is divided into four, the M×N coding unit is divided into (M / 4)×N blocks) are possible. When the M×N coding unit is divided in the horizontal direction, the partition blocks are encoded in a top-to-bottom order, and when the M×N coding unit is divided in the vertical direction, the partition blocks are encoded in a left-to-right order. In the case of horizontal (vertical) partitioning, the currently encoded partition block can be predicted by referring to the reconstructed pixel values of the upper (left) partition block.
[0243] A transformation may be applied to the residual signal generated in units of partition blocks by the ISP prediction method. A multi-transform selection (MTS) technique based on a DST-7 / DCT-8 combination and the existing DCT-2 may be applied to a forward-based primary transform (core transform), and a forward low-frequency non-separable transform (LFNST) may be applied to the transform coefficients generated from the primary transform to generate the final modified transform coefficients.
[0244] That is, LFNST can be applied to the partition blocks divided by applying the ISP prediction mode, and the same intra prediction mode is applied to the divided partition blocks, as described above. Therefore, when the LFNST set derived based on the intra prediction mode is selected, the derived LFNST set can be applied to all partition blocks. That is, because the same intra prediction mode is applied to all partition blocks, the same LFNST set can be applied to all partition blocks.
[0245] In addition, according to an example, LFNST can be applied only to transform blocks having both horizontal and vertical lengths of 4 or more. Therefore, when the horizontal length or vertical length of the partition block divided according to the ISP prediction method is less than 4, LFNST is not applied and the LFNST index is not signaled. In addition, when LFNST is applied to each partition block, the corresponding partition block can be regarded as one transform block. Of course, when the ISP prediction method is not applied, LFNST can be applied to the coding block.
[0246] The application of LFNST to each partition block will be described in detail as follows.
[0247] According to an example, after applying forward LFNST to each partition block, only a maximum of 16 (8 or 16) coefficients are left in the upper left 4×4 region in the transform coefficient scanning order, and then zeroing can be applied, where the remaining positions and regions are all filled with 0.
[0248] Alternatively, according to an example, when the length of one side of the partition block is 4, LFNST is applied only to the upper left 4×4 region, and when the lengths of all sides of the partition block (i.e., width and height) are 8 or greater, LFNST can be applied to the remaining 48 coefficients within the upper left 8×8 region except for the lower right 4×4 region.
[0249] Alternatively, according to an example, in order to adjust the worst-case computational complexity to 8 multiplications per sample, when each partition block is 4×4 or 8×8, only 8 transform coefficients may be output after applying the forward LFNST. That is, when the partition block is 4×4, an 8×16 matrix may be applied as the transform matrix, and when the partition block is 8×8, an 8×48 matrix may be applied as the transform matrix.
[0250] In addition, in the current VVC standard, LFNST index signaling is performed in units of coding units. Therefore, in the ISP prediction mode and when LFNST is applied to all partition blocks, the same LFNST index value can be applied to the corresponding partition blocks. That is, when the LFNST index value is sent once at the coding unit level, the corresponding LFNST index can be applied to all partition blocks in the coding unit. As described above, the LFNST index value can have values of 0, 1, and 2, where 0 represents the case where LFNST is not applied, and 1 and 2 represent two transform matrices present in one LFNST set when LFNST is applied.
[0251] As described above, the LFNST set is determined by the intra prediction mode, and in the case of the ISP prediction mode, since all partition blocks in a coding unit are predicted in the same intra prediction mode, the partition blocks can refer to the same LFNST set.
[0252] As another example, LFNST index signaling is still performed in units of coding units, but in the case of the ISP prediction mode, it is not determined whether LFNST is uniformly applied to all partition blocks, and for each partition block, whether to apply the LFNST index value signaled at the coding unit level and whether to apply LFNST can be determined by a separate condition. Here, a separate condition can be signaled in the form of a flag for each partition block through the bitstream, and when the flag value is 1, the LFNST index value signaled at the coding unit level is applied, and when the flag value is 0, LFNST may not be applied.
[0253] Hereinafter, a method of maintaining the worst-case computational complexity when applying LFNST to the ISP mode will be described.
[0254] In the case of ISP mode, when LFNST is applied, in order to keep the number of multiplications per sample (or per coefficient, per position) to a certain value or less, the application of LFNST may be limited. Depending on the size of the partition block, the number of multiplications per sample (or per coefficient, per position) can be kept at 8 or less by applying LFNST as follows.
[0255] 1. When both the horizontal length and the vertical length of the partition block are 4 or more, the same method as the worst-case computational complexity control method for LFNST in the current VVC standard may be applied.
[0256] That is, when the partition block is a 4×4 block, an 8×16 matrix obtained by sampling the upper 8 rows from the 16×16 matrix may be applied in the forward direction instead of the 16×16 matrix, and a 16×8 matrix obtained by sampling the left 8 columns from the 16×16 matrix may be applied in the reverse direction. In addition, when the partition block is an 8×8 block, in the forward direction, instead of the 16×48 matrix, an 8×48 matrix obtained by sampling the upper 8 rows from the 16×48 matrix is applied, and in the reverse direction, instead of the 48×16 matrix, a 48×8 matrix obtained by sampling the left 8 columns from the 48×16 matrix may be applied.
[0257] In the case of a 4×N or N×4 (N>4) block, when forward transform is performed, 16 coefficients generated after applying the 16×16 matrix to only the upper left 4×4 block may be set in the upper left 4×4 region, and the other regions may be filled with a value of 0. In addition, when inverse transform is performed, the 16 coefficients located in the upper left 4×4 block are set in a scanning order to form an input vector, and then 16 output data may be generated by multiplying the 16×16 matrix. The generated output data may be set in the upper left 4×4 region, and the remaining regions except the upper left 4×4 region may be filled with a value of 0.
[0258] In the case of an 8×N or N×8 (N>8) block, when performing forward transform, the generated 16 coefficients after applying the 16×48 matrix to the ROI region within only the upper left 8×8 block (except for the remaining regions except the lower right 4×4 block from the upper left 8×8 block) can be set in the upper left 4×4 region, and all other regions can be filled with a value of 0. In addition, when performing inverse transform, the 16 coefficients located in the upper left 4×4 region are set in a scanning order to form an input vector, and then 48 output data can be generated by multiplying the 48×16 matrix. The generated output data can be filled in the ROI region, and all other regions can be filled with a value of 0.
[0259] As another example, in order to keep the number of multiplications for each sample (or each coefficient, each position) at a certain value or less, the number of multiplications for each sample (or each coefficient, each position) based on the ISP coding unit size rather than the size of the ISP partition block can be kept at 8 or less. When only one block among the ISP partition blocks meets the conditions for applying LFNST, the worst-case complexity calculation of LFNST can be applied based on the corresponding coding unit size rather than the size of the partition block. For example, if the luminance coding block of a particular coding unit is encoded with ISP by being split into four partition blocks with a size of 4×4, and there are no non-zero transform coefficients for two of the partition blocks, it can be configured so that instead of 8, 16 transform coefficients are generated for each of the other two partition blocks.
[0260] Hereinafter, a method of signaling a LFNST index in case of the ISP mode will be described.
[0261] As described above, the LFNST index may have values of 0, 1, and 2, where 0 indicates that LFNST is not applied, and 1 and 2 indicate one of two LFNST kernel matrices included in the selected LFNST set. A method of transmitting the LFNST index in the current VVC standard will be described as follows.
[0262] 1. The LFNST index may be sent once for each coding unit (CU). In the dual-tree case, a separate LFNST index may be signaled for each of the luma block and the chroma block.
[0263] 2. When the LFNST index is not signaled, the LFNST index is inferred to be 0 as a default value. The LFNST index value is inferred to be 0 in the following cases.
[0264] A. When in a mode where transform is not applied (e.g., transform skip, BDPCM, lossless coding, etc.)
[0265] B. When a transform is not DCT-2 (when it is DST7 or DCT8), that is, when the horizontal transform or the vertical transform is not DCT-2
[0266] C. When the horizontal length or vertical length of the luma block of the coding unit exceeds the size of the convertible maximum luma transform, for example, when the size of the luma block of the coding block is 128×16 when the size of the convertible maximum luma transform is 64, LFNST is not applicable.
[0267] In the case of a dual tree, determine whether each of the coding units of the luma component and the coding units of the chroma component exceeds the size of the maximum luma transform. That is, check whether the luma block exceeds the size of the transformable maximum luma transform, and check whether the chroma block exceeds the horizontal / vertical length of the corresponding luma block for the color format and the size of the maximum transformable luma transform. For example, when the color format is 4:2:0, each of the horizontal / vertical lengths of the corresponding luma block is twice the horizontal / vertical length of the chroma block, and the transform size of the corresponding luma block is twice the transform size of the chroma block. As another example, when the color format is 4:4:4, the horizontal / vertical length of the corresponding luma block is the same as the horizontal / vertical length of the chroma block.
[0268] A 64-length transform or a 32-length transform may represent a transform applied horizontally or vertically with a length of 64 or 32, respectively, and a “transform size” may represent the corresponding length of 64 or 32.
[0269] In the single tree case, it is checked whether the horizontal or vertical length of the luma block exceeds the size of the transformable maximum luma transform block, and if it does, LFNST index signaling can be skipped.
[0270] D. The LFNST index may be sent only when both the horizontal length and the vertical length of the coding unit are greater than or equal to 4.
[0271] In the dual-tree case, the LFNST index may be signaled only for the case where both the horizontal length and the vertical length of the corresponding component (ie, luma or chroma component) are greater than or equal to 4.
[0272] In the single-tree case, the LFNST index may be signaled only for the case where both the horizontal length and the vertical length of the luma component are greater than or equal to 4.
[0273] E. In the case where the last non-zero coefficient position is not the DC position (upper left position of the block), when it is a dual-tree type luma block, if the last non-zero coefficient position is not the DC position, the LFNST index is sent. When it is a dual-tree type chroma block, if even one of the last non-zero coefficient position of Cb and the last non-zero coefficient position of Cr is not the DC position, the LNFST index is sent.
[0274] In case of a single tree type, if the last non-zero coefficient position is not a DC position even in one of the luma component, the Cb component, and the Cr component, a LFNST index is transmitted.
[0275] Here, if a coded block flag (CBF) value indicating whether a transform coefficient exists for a transform block is 0, the last non-zero coefficient position of the transform block is not checked to determine whether to signal the LFNST index. That is, if the CBF value is 0, since the transform is not applied to the block, the last non-zero coefficient position may not be considered when checking the condition for LFNST index signaling.
[0276] For example, 1) in the case of a dual tree type and a luma component, if the corresponding CBF value is 0, the LFNST index is not signaled, 2) in the case of a dual tree type and a chroma component, if the CBF value of Cb is 0 and the CBF value of Cr is 1, the LFNST index is sent by checking only the last non-zero coefficient position of Cr, and 3) in the case of a single tree type, for all of luma, Cb, and Cr, the last non-zero coefficient position is checked only for the component whose corresponding CBF value is 1.
[0277] F. When it is confirmed that there are transform coefficients at positions other than positions where LFNSF transform coefficients can exist, LFNST index signaling can be skipped. In the case of 4×4 transform blocks and 8×8 transform blocks, LFNST transform coefficients can exist at 8 positions starting from the DC position according to the transform coefficient scanning order in the VVC standard, and all remaining positions are filled with 0. In addition, when the transform block is not a 4×4 transform block and an 8×8 transform block, the LFNST transform coefficients can exist at 16 positions starting from the DC position according to the transform coefficient scanning order in the VVC standard, and all remaining positions are filled with 0.
[0278] Therefore, if a non-zero transform coefficient exists in a region to be filled with 0 after residual encoding is performed, LFNST index signaling may be omitted.
[0279] In addition, the ISP mode may be applied only to luma blocks or to both luma blocks and chroma blocks. As described above, when ISP prediction is applied, prediction is performed by partitioning the corresponding coding unit into 2 or 4 partition blocks, and a transform may be applied to each partition block. Therefore, when determining the conditions for signaling the LFNST index on a coding unit basis, the fact that LFNST is applicable to each partition block should also be considered. In addition, when the ISP prediction mode is applied only to a specific component (e.g., a luma block), the LFNST index should be signaled by considering the fact that the partitioning into the component blocks is implemented only for the component. The possible LFNST index signaling schemes when in ISP mode are summarized as follows.
[0280] 1. The LFNST index may be sent once for each coding unit (CU). In the dual-tree case, a separate LFNST index may be signaled for each of the luma block and the chroma block.
[0281] 2. When the LFNST index is not signaled, the LFNST index is inferred to be 0 as a default value. The LFNST index value is inferred to be 0 in the following cases.
[0282] A. When in a mode where transform is not applied (e.g., transform skip, BDPCM, lossless coding, etc.)
[0283] B. When the horizontal length or vertical length of the luma block of the coding unit exceeds the size of the convertible maximum luma transform, for example, when the size of the luma block of the coding block is 128×16 when the size of the convertible maximum luma transform is 64, LFNST is not applicable.
[0284] It is also possible to determine whether to signal the LFNST index based on the size of the partition block rather than the coding unit. That is, when the horizontal length or vertical length of the partition block corresponding to the luma block exceeds the size of the transformable maximum luma transform, the LFNST index signaling can be skipped and the LFNST index can be inferred to be 0.
[0285] In the case of a dual tree, determine whether each of the coding unit or partition block of the luma component and the coding unit or partition block of the chroma component exceeds the maximum transform block size. That is, each of the horizontal and vertical lengths of the coding unit or partition block of the luma is compared with the maximum luma transform size, and if any of them is greater than the maximum luma transform size, LFNST is not applied, and in the case of the coding unit or partition block of the chroma, the horizontal / vertical length of the corresponding luma block for the color format is compared with the transformable maximum luma transform size. For example, when the color format is 4:2:0, each of the horizontal / vertical lengths of the corresponding luma block is twice the horizontal / vertical length of the chroma block, and the transform size of the corresponding luma block is twice the transform size of the chroma block. As another example, when the color format is 4:4:4, the horizontal / vertical length of the corresponding luma block is the same as the horizontal / vertical length of the chroma block.
[0286] In the single tree case, it is checked whether the luma block (coding unit or partition block) exceeds the size of the transformable maximum luma transform block, and if it does, LFNST index signaling can be skipped.
[0287] C. If LFNST included in the current VVC standard is applied, the LFNST index may be transmitted only when both the horizontal length and the vertical length of the partition block are greater than or equal to 4.
[0288] If up to LFNST for 2×M (1×M) or M×2 (M×1) blocks is applied in addition to LFNST included in the current VVC standard, the LFNST index is sent only when the partition block has a size greater than or equal to 2×M (1×M) or M×2 (M×1) blocks. Here, P×Q blocks greater than or equal to R×S blocks means P≥R and Q≥S.
[0289] In summary, the LFNST index may be sent only when the partition block has a size greater than or equal to the minimum size applicable to LFNST. In the dual-tree case, the LFNST index may be signaled only when the partition block of the luma or chroma component has a size greater than or equal to the minimum size applicable to LFNST. In the single-tree case, the LFNST index may be signaled only when the partition block of the luma component has a size greater than or equal to the minimum size applicable to LFNST.
[0290] In this document, an M×N block is equal to or greater than a K×L block, which means that M is equal to or greater than K and N is equal to or greater than L. An M×N block is greater than a K×L block, which means that M is equal to or greater than K and N is equal to or greater than L, where M is greater than K or N is greater than L. An M×N block is less than or equal to a K×L block, which means that M is less than or equal to K and N is less than or equal to L. An M×N block is less than a K×L block, which means that M is less than or equal to K and N is less than or equal to L, where M is less than K or N is less than L.
[0291] D. In the case where the last non-zero coefficient position is not the DC position (upper left position of the block), when it is a dual-tree type luminance block, if the corresponding last non-zero coefficient position is not the DC position in even any one of all partition blocks, LFNST transmission may be performed. When it is a dual-tree type and chrominance block, if even any one of the non-zero coefficient positions of all partition blocks of Cb (here, when the ISP mode is not applied to the chrominance component, the number of partition blocks is considered to be 1) and the last non-zero coefficient position of all partition blocks of Cr (here, when the ISP mode is not applied to the chrominance component, the number of partition blocks is considered to be 1) is not the DC position, the corresponding LNFST index may be transmitted.
[0292] In case of a single tree type, if the last non-zero position is not a DC position even in any one of all partition blocks of luma components, Cb components, and Cr components, a corresponding LNFST index may be transmitted.
[0293] Here, if the coded block flag (CBF) value indicating whether there is a transform coefficient for each partition block is 0, the last non-zero coefficient position of the corresponding partition block is not checked to determine whether to signal the LFNST index. That is, if the CBF value is 0, since the transform is not applied to the block, the last non-zero coefficient position is not considered when checking the conditions for LFNST index signaling.
[0294] For example, 1) in the case of a dual tree type and a luma component, when determining whether to signal a LFNST index for each partition block, if the corresponding CBF value is 0, 2) in the case of a dual tree type and a chroma component, if the CBF value of Cb is 0 and the CBF value of Cr is 1, whether to signal a LFNST index can be determined by checking only the non-zero coefficient position of Cr for each partition block, and 3) in the case of a single tree type, whether to signal a LFNST index can be determined by checking only the last non-zero coefficient position of a block having a CBF value of 1 in all partition blocks of the luma component, the Cb component, and the Cr component.
[0295] In case of the ISP mode, the image information may be configured not to check the last non-zero coefficient position, and its implementation may be as follows.
[0296] i. In the case of ISP mode, LFNST index signaling can be allowed by skipping the check of non-zero coefficient positions for both luma blocks and chroma blocks. That is, LFNST index signaling can be allowed even if the last non-zero coefficient position is the DC position for all partition blocks or the corresponding CBF value is 0.
[0297] ii. In the case of ISP mode, based on the aforementioned scheme, the check of the non-zero coefficient position may be skipped only for the luma block, and the non-zero coefficient position may be checked for the chroma block. For example, in the case of a dual tree type and a luma block, LFNST index signaling is allowed without checking the non-zero coefficient position, and in the case of a dual tree type and a chroma block, whether to signal the LFNST index may be determined by checking whether there is a DC position for the last non-zero coefficient position through the aforementioned scheme.
[0298] iii. In the case of ISP mode and single tree type, scheme i or ii may be applied. That is, in the case of ISP mode and single tree type, when scheme i is applied, LFNST index signaling may be allowed by skipping the check of the last non-zero coefficient position of both the luminance block and the chrominance block. Alternatively, scheme ii may be applied to determine the signaling LFNST index in a manner that the check for the non-zero coefficient position is skipped for the partition block of the luminance component and the check for the non-zero coefficient position is performed for the partition block of the chrominance component according to the above scheme (when ISP is not applied to the chrominance component, the number of partition blocks may be regarded as 1).
[0299] E. When it is confirmed that a transform coefficient exists at a position other than a position where a LFNST transform coefficient may exist even for one partition block among all partition blocks, LFNST index signaling may be omitted.
[0300] For example, in the case of a 4×4 partition block and an 8×8 partition block, the LFNST transform coefficient may be present at 8 positions starting from the DC position according to the transform coefficient scanning order in the VVC standard, and all the remaining positions are filled with 0. In addition, when the transform block is greater than or equal to the 4×4 size and is not a 4×4 partition block and an 8×8 partition block, the LFNST transform coefficient may be present at 16 positions starting from the DC position according to the transform coefficient scanning order in the VVC standard, and all the remaining positions are filled with 0.
[0301] Therefore, if a non-zero transform coefficient exists in a region to be filled with 0 after residual encoding is performed, LFNST index signaling may be omitted.
[0302] In addition, in the case of ISP mode, instead of DCT-2, DST-7 is applied without signaling for the MTS index in the current VVC standard by considering the length condition independently for each of the horizontal and vertical directions. It is determined whether the horizontal or vertical length is greater than or equal to 4 or greater than or equal to 16, and a transform kernel is determined according to the result of the determination. Therefore, when in ISP mode and when LFNST is applicable, the transform combination can be configured as follows.
[0303] 1. In the case where the LFNST index is 0 (including the case where the LFNST index is inferred to be 0), when the ISP is included in the current VVC standard, it may meet the condition for determining a primary transform. That is, it is checked whether the length condition (the condition that the length is greater than or equal to 4 and less than or equal to 16) is independently satisfied for each of the horizontal direction and the vertical direction, and if the condition is satisfied, DST-7 is applied instead of DCT-2 for the primary transform, and if the condition is not satisfied, DCT-2 may be applied.
[0304] 2. In case the LFNST index is greater than 0, for one transformation, the following two configurations are possible.
[0305] A. DCT-2 is applicable to both horizontal and vertical directions.
[0306] B. When ISP is included in the current VVC standard, it may meet the conditions for determining a transformation. That is, it is checked whether the length condition (the condition that the length is greater than or equal to 4 and less than or equal to 16) is satisfied independently for each of the horizontal direction and the vertical direction, and if the condition is satisfied, DST-7 is applied instead of DCT-2, and if the condition is not satisfied, DCT-2 may be applied.
[0307] In the ISP mode, the image information may be configured so that the LFNST index is not transmitted per coding unit but per partition block. In this case, whether to signal the LFNST index may be determined by assuming that there is only one partition block in the unit in which the LFNST index is transmitted in the aforementioned LFNST index signaling scheme.
[0308] Hereinafter, signaling of a LFNST index and an MTS index is described.
[0309] The coding unit syntax table, transform unit syntax table, and residual coding syntax table related to the signaling of LFNST index and MTS index according to the example are as follows. According to Table 3, the MTS index is moved from the transform unit level syntax to the coding unit level syntax and is signaled after the LFNST index is signaled. In addition, the constraint that LFNST is not allowed when ISP is applied to the coding unit is removed. Since the constraint that LFNST is not allowed when ISP is applied to the coding unit is removed, LFNST can be applied to all intra-frame prediction blocks. In addition, both the MTS index and the LFNST index are conditionally signaled at the end of the coding unit level.
[0310] [Table 3]
[0311]
[0312] [Table 4]
[0313]
[0314] [Table 5]
[0315]
[0316] The meanings of the main variables shown in the table are as follows.
[0317] 1.cbWidth, cbHeight: the width and height of the current encoding block
[0318] 2. log2TbWidth, log2TbHeight: The base-2 logarithmic values of the width and height of the current transform block, which can be reduced to the upper left area where non-zero coefficients may exist by reflecting zeros.
[0319] 3. sps_lfnst_enabled_flag: A flag indicating whether LFNST is enabled, if the flag value is 0, it indicates that LFNST is not enabled, and if the flag value is 1, it indicates that LFNST is enabled. It is defined in a sequence parameter set (SPS).
[0320] 4. CuPredMode[chType][x0][y0]: A prediction mode corresponding to a variable chType and a position (x0, y0), chType can have values of 0 and 1, where 0 indicates a luma component and 1 indicates a chroma component. The position (x0, y0) indicates a position on a picture, and MODE_INTRA (intra-frame prediction) and MODE_INTER (inter-frame prediction) can be values of CuPredMode[chType][x0][y0].
[0321] 5. IntraSubPartitionsSplit[x0][y0]: The content of the position (x0, y0) is the same as in item 4. It indicates which ISP partition is applied at the position (x0, y0), and ISP_NO_SPLIT indicates that the coding unit corresponding to the position (x0, y0) is not divided into partition blocks.
[0322] 6. intra_mip_flag[x0][y0]: The content of the position (x0, y0) is the same as in item 4 above. intra_mip_flag is a flag indicating whether the matrix-based intra prediction (MIP) prediction mode is applied. If the flag value is 0, it indicates that MIP is not enabled, and if the flag value is 1, it indicates that MIP is enabled.
[0323] 7. cIdx: A value of 0 indicates luma, and values of 1 and 2 indicate Cb and Cr of chroma components, respectively.
[0324] 8.treeType: indicates single tree and dual tree, etc. (SINGLE_TREE: single tree, DUAL_TREE_LUMA: dual tree for luminance component, DUAL_TREE_CHROMA: dual tree for chrominance component)
[0325] 9.tu_cbf_cb[x0][y0]: The content of the position (x0, y0) is the same as in item 4. It indicates the coded block flag (CBF) of the Cb component. If its value is 0, it means that there is no non-zero coefficient in the corresponding transform unit of the Cb component, and if its value is 1, it indicates that there is a non-zero coefficient in the corresponding transform unit of the Cb component.
[0326] 10. lastSubBlock: It indicates the position of the subblock (coefficient group (CG)) where the last non-zero coefficient is located in the scanning order. 0 indicates a subblock containing a DC component, and in case of greater than 0, it is not a subblock containing a DC component.
[0327] 11.lastScanPos: It indicates the position of the last significant coefficient in a sub-block according to the scanning order. If a sub-block includes 16 positions, it can have a value from 0 to 15.
[0328] 12.lfnst_idx[x0][y0]: LFNST index syntax element to be parsed. If not parsed, it is inferred to have a value of 0. That is, the default value is set to 0, indicating that LFNST is not applied.
[0329] 13. cu_sbt_flag: A flag indicating whether the Sub-Block Transform (SBT) included in the current VVC standard is applicable. A flag value equal to 0 indicates that SBT is not applicable, and a flag value equal to 1 indicates that SBT is applied.
[0330] 14.sps_explicit_mts_inter_enabled_flag, sps_explicit_mts_intra_enabled_flag: Flags indicating whether explicit MTS is applied to inter CUs and intra CUs, respectively. A flag value equal to 0 indicates that MTS is not applicable to inter CUs or intra CUs, and a flag value equal to 1 indicates that MTS is applicable.
[0331] 15.tu_mts_idx[x0][y0]: MTS index syntax element to be parsed. When not parsed, this element is inferred to have a value of 0. That is, this element is set to a default value of 0, which indicates that DCT-2 is applied both horizontally and vertically.
[0332] As shown in Table 3, multiple conditions are checked when encoding mts_idx[x0][y0], and tu_mts_idx[x0][y0] is signaled only when lfnst_idx[x0][y0] is equal to 0.
[0333] tu_cbf_luma[x0][y0] is a flag indicating whether there is a significant coefficient for the luma component.
[0334] According to Table 3, when the width and height of the coding unit of the luminance component are both 32 or less, mts_idx[x0][y0](Max(cbWidth,cbHeight)<=32) is signaled, that is, whether MTS is applied is determined according to the width and height of the coding unit of the luminance component.
[0335] Furthermore, according to Table 3, it may be configured to signal lfnst_idx[x0][y0] even in ISP mode (IntraSubPartitionsSplitType!=ISP_NO_SPLIT), and the same LFNST index value may be applied to all ISP partition blocks.
[0336] However, mts_idx[x0][y0] is signaled only in cases other than ISP mode (IntraSubPartitionsSplit[x0][y0] == ISP_NO_SPLIT).
[0337] As shown in Table 5, in the process of determining log2ZoTbWidth and log2ZoTbHeight (where log2ZoTbWidth and log2ZoTbHeight respectively represent the base 2 logarithmic values of the width and height of the upper left area remaining after clearing), checking the value of mts_idx[x0][y0] can be omitted.
[0338] According to an example, when determining log2ZoTbWidth and log2ZoTbHeight in residual encoding, a condition to check sps_mts_enable_flag may be added.
[0339] If there are valid coefficients at the zeroed position when LFNST is applied, the variable LfnstZeroOutSigCoeffFlag in Table 3 is 0, otherwise it is 1. The variable LfnstZeroOutSigCoeffFlag may be set according to a number of conditions shown in Table 5.
[0340] According to an example, the variable LfnstDcOnly in Table 3 is 1 when all the last significant coefficients of the transform block whose corresponding coding block flag (CBF, which is 1 when there is at least one significant coefficient in the corresponding block, otherwise 0) is 1 are at the DC position (upper left position), otherwise 0. Specifically, the position of the last significant coefficient is checked for one luma transform block in the dual-tree luma, and the position of the last significant coefficient is checked for both the transform block of Cb and the transform block of Cr in the dual-tree chroma. In a single tree, the position of the last significant coefficient can be checked for the transform blocks of luma, Cb, and Cr.
[0341] In Table 3, MtsZeroOutSigCoeffFlag is initially set to 1, and the value can be changed in the residual coding of Table 5. When there are significant coefficients in the area to be filled with 0 by clearing (LastSignificantCoeffX>15||LastSignificantCoeffY>15), the value of the variable MtsZeroOutSigCoeffFlag changes from 1 to 0, in which case the MTS index is not signaled, as shown in Table 3.
[0342] As shown in Table 3, when tu_cbf_luma[x0][y0] is 0, mts_idx[x0][y0] encoding can be omitted. That is, when the CBF value of the luma component is 0, no transform is applied, so there is no need to signal the MTS index. Therefore, the MTS index encoding can be omitted.
[0343] According to an example, the above technical features can be implemented with another conditional syntax. For example, after performing MTS, a variable indicating whether there is a valid coefficient in an area other than the DC area of the current block can be derived, and when the variable indicates that there is a valid coefficient in an area other than the DC area, the MTS index can be signaled. That is, the existence of a valid coefficient in an area other than the DC area of the current block indicates that the value of tu_cbf_luma[x0][y0] is 1, and in this case, the MTS index can be signaled.
[0344] This variable may be expressed as MtsDcOnly, and after the variable MtsDcOnly is initially set to 1 at the coding unit level, when it is determined that there are significant coefficients in an area other than the DC area of the current block in the residual coding level, the value is changed to 0. When the variable MtsDcOnly is 0, the image information may be configured so that the MTS index is signaled.
[0345] When tu_cbf_luma[x0][y0] is 0, since the residual coding syntax is not called at the transform unit level of Table 4, the initial value 1 of the variable MtsDcOnly is maintained. In this case, since the variable MtsDcOnly is not changed to 0, the image information can be configured not to signal the MTS index. That is, the MTS index is not parsed and signaled.
[0346] In addition, the decoding device may determine the color index cIdx of the transformation coefficient to derive the variable MtsZeroOutSigCoeffFlag of Table 5. The color index cIdx being 0 indicates a luminance component.
[0347] According to an example, since the MTS may be applied only to the luma component of the current block, the decoding device may determine whether the color index is luma when deriving the variable MtsZeroOutSigCoeffFlag for determining whether to parse the MTS index.
[0348] The variable MtsZeroOutSigCoeffFlag is a variable indicating whether zeroing is performed when MTS is applied. It indicates whether there is a transform coefficient in an area other than the upper left area (i.e., an area other than the upper left 16×16 area) where the last significant coefficient may exist due to zeroing after performing MTS. The variable MtsZeroOutSigCoeffFlag is initially set to 1 at the coding unit level, as shown in Table 3 (MtsZeroOutSigCoeffFlag=1), and when there is a transform coefficient in an area other than the 16×16 area, its value can be changed from 1 to 0 at the residual coding level, as shown in Table 5 (MtsZeroOutSigCoeffFlag=0). When the value of the variable MtsZeroOutSigCoeffFlag is 0, the MTS index is not signaled.
[0349] As shown in Table 5, at the residual coding level, a non-clearing area in which non-zero transform coefficients may exist can be set depending on whether clearing of the accompanying MTS is performed, and even in this case, the color index (cIdx) is 0, the non-clearing area can be set to the upper left 16×16 area of the current block.
[0350] Thus, when deriving a variable for determining whether to parse the MTS index, it is determined whether the color component is luma or chroma. However, since LFNST can be applied to both luma and chroma components of the current block, the color component is not determined when deriving a variable for determining whether to parse the LFNST index.
[0351] For example, Table 3 shows a variable LfnstZeroOutSigCoeffFlag, which may indicate that zeroing is performed when LFNST is applied. The variable LfnstZeroOutSigCoeffFlag indicates whether there is a valid coefficient in the second region other than the upper left first region of the current block. The value is initially set to 1, and when there is a valid coefficient in the second region, the value may be changed to 0. The LFNST index may be parsed only when the value of the initially set variable LfnstZeroOutSigCoeffFlag remains 1. When determining and deriving whether the value of the variable LfnstZeroOutSigCoeffFlag is 1, since LFNST may be applied to both the luminance component and the chrominance component of the current block, the color index of the current block is not determined.
[0352] As shown in Table 3, the MTS index is signaled for each coding unit, and mts_idx (MTS index) is signaled only when MtsZeroOutSigCoeffFlag is equal to 1.
[0353] In addition, as shown in Table 5, the value of MtsZeroOutCoeffFlag can be determined according to a specific condition (if ((LastSignificantCoeffX>15||LastSignificantCoeffY>15)&&cIdx==0)) in the residual coding level.
[0354] When the x-coordinate of the last non-zero coefficient (LastSignificantCoeffX) is greater than 15 and the y-coordinate of the last non-zero coefficient (LastSignificantCoeffY) is greater than 15, the value of MtsZeroOutSigCoeffFlag is set to 0. Here, the x-coordinate increases from left to right in the transform block, and the y-coordinate increases from top to bottom in the transform block. The top left position of the transform block is (0,0).
[0355] The value of MtsZeroOutSigCoeffFlag is initialized to 1 in Table 3, and remains 1 if the conditions presented in Table 5 are not satisfied, so the value of MtsZeroOutSigCoeffFlag is not set to 0.
[0356] When the primary transform applied in the horizontal direction is A and the primary transform applied in the vertical direction is B, the primary transform can be represented by (A, B). In the current VVC standard, in the cases of (DST-7, DST-7), (DST-7, DCT-8), (DCT-8, DST-7) and (DCT-8, DCT-8), the transform coefficients are restricted to exist only in the upper left 16×16 region of the transform block. Therefore, the condition of (LastSignificantCoeffX>15||LastSignificantCoeffY>15) in Table 5 indicates that the last non-zero coefficient is located outside the upper left 16×16 region. In Table 5, the variable cIdx represents the color component, and the variable cIdx value of 0 represents the brightness component.
[0357] In the current VVC standard, after parsing for residual coding, the MTS index (mts_idx) is parsed. Specifically, Table 3 is a coding unit of a syntax parsing function as a coding unit, the MTS index is parsed after the transform tree function, and the function of parsing residual coding in the transform tree function is called. Therefore, the MTS index is parsed after parsing the residual (the residual parsing function shown in Table 5 is responsible for parsing the residual coding), and since the MTS index information is not known from the decoding perspective during residual coding, it may not be impossible to know which primary transform is applied. However, when MTS is applicable and SBT or ISP is applied, or when implicit MTS is applied, MTS is implicitly applied, so it is also possible to know the primary transform before parsing the residual coding.
[0358] The conditions shown in Table 5 need to be checked because the current VVC standard sets a restriction that only 16 transform coefficients are output when the forward transform is applied in a 32-length DST-7 or a 32-length DCT-8. For example, when the value of the MTS index is greater than 0 and thus indicates that the applied transform is one of (DST-7, DST-7), (DST-7, DCT-8), (DCT-8, DST-7) and (DCT-8, DCT-8), the non-zero transform coefficient may only exist in the upper left 16×16 region of the transform block.
[0359] Therefore, when the position of the last non-zero transform coefficient is outside the upper left 16×16 region corresponding to the case where the MTS index value is 0, the signaling of the MTS index can be omitted, as shown in Table 3. However, even if the position of the last non-zero transform coefficient is within the upper left 16×16 region, the non-zero coefficient may exist outside the upper left 16×16 region. In this case, even if the MTS index value is 0, the MTS index may be signaled as 0, which will be described in detail below.
[0360] When a transform is performed once as (DCT-2, DCT-2), the position of the last non-zero coefficient exists in the upper left 16×16 area, and the non-zero transform coefficient may also exist outside the upper left 16×16 area because, according to the scanning order within the transform block, the area outside the upper left 16×16 area (i.e., the area except the upper left 16×16 area) may be scanned, and then the upper left 16×16 area may be scanned, or the upper left 16×16 area may be scanned and then the area outside the upper left 16×16 area may be scanned.
[0361] Fig.12 The scanning of a 32×32 transform block according to an embodiment of the present disclosure is illustrated, which specifically shows that the 32×32 transform block is divided into 4×4 coefficient groups (CGs) and scanned. In the present disclosure, the CG divided for scanning is referred to as a "scanning subblock".
[0362] The number indicated for each CG represents a forward scanning order, and the CGs can be scanned by the decoding device in a reverse scanning order starting from the position where the last non-zero transform coefficient exists. Fig.12 , it can be assumed that the last non-zero transform coefficient exists in CG 25, and CG 25 exists in the upper left 16×16 region.
[0363] like Fig.12 As shown, when the last non-zero transform coefficient exists in CG 25, since the decoding device scans the CG in reverse scanning order starting from the CG where the last non-zero transform coefficient exists, the decoding device is based on Fig.12The numbers indicated in are scanned in the order of 25, 24, 23, ..., 3, 2, 1. Since CG 24, 23, 22, 21, 20, 17, 16, 15, 11 are located outside the upper left 16×16 area, it is impossible to know whether the non-zero coefficients exist only in the upper left 16×16 area by simply checking whether LastSignificantCoeffX and LastSignificantCoeffY correspond to the upper left 16×16 area as shown in Table 5.
[0364] Therefore, when performing residual coding parsing, if it is checked whether the corresponding 4×4 coefficient group belongs to the upper left 16×16 area each time a non-zero transform coefficient is scanned, the value of MtsZeroOutSigCoeffFlag can be set to 0 only when the non-zero coefficient exists outside the upper left 16×16 area. In this case, the residual coding syntax is as shown in the following table.
[0365] [Table 6]
[0366]
[0367]
[0368]
[0369] As shown in Table 6, whenever a non-zero transform coefficient is found, it can be checked whether the non-zero transform coefficient is located in the upper left 16×16 area (if ((xC>15||yC>15)&&cIdx==0)), thereby setting the value MtsZeroOutSigCoeffFlag to 0. Here, this condition is checked when the value of sig_coeff_flag[xC][yC], which is flag information indicating whether the transform coefficient exists, is 1 (if (sig_coeff_flag[xC][yC])), where xC and yC respectively represent the x coordinate and y coordinate in units of samples within the transform block. The upper left position of the transform block is (0,0).
[0370] Table 6 includes the conditional check and update of MtsZeroOutSigCoeffFlag presented in Table 5 (if ((LastSignificantCoeffX>15||LastSignificantCoeffY>15)&&cIdx==0)MtsZeroOutSigCoeffFlag=0). If the value of sig_coeff_flag[xC][yC] of the last non-zero transform coefficient is inferred to be 1, the conditional check and update of MtsZeroOutSigCoeffFlag can be removed from Table 6.
[0371] In summary, when the MTS index in Table 3 is signaled by the syntax configuration shown in Table 6, no matter which primary transform is applied, the MTS index is signaled only when a non-zero transform coefficient exists in the upper left 16×16 region of the luma transform block. When the MTS index is not signaled, the value of the MTS index is inferred to be 0, that is, (DCT-2, DCT-2) is applied.
[0372] As described above, in the following three cases, the applied primary transform may be known before the MTS index is signaled.
[0373] 1) When sub-block transform (SBT) is applied
[0374] 2) When Intra-frame Sub-partitioning (ISP) is applied
[0375] 3) When implicit MTS is applied
[0376] In case (1), since the MTS index is configured to be signaled only when the value of cu_sbt_flag indicating whether SBT is applied in Table 3 is 0, that is, since the MTS index is signaled only when SBT is not applied, the case of applying SBT is irrelevant to the modification of Table 6.
[0377] In case (2), since the MTS index is signaled only when ISP is not applied in Table 3 (the condition is checked when the MTS index is signaled in Table 3 (if IntraSubPartitionsSplit[x0][y0] == ISP_NO_SPLIT), the case where ISP is applied is also irrelevant to the modification of Table 6.
[0378] In case (3), since the MTS index is signaled only when the explicit MTS is enabled in Table 3, the case where the implicit MTS is applied is also irrelevant to the modification of Table 6. That is, since the MTS index is signaled only when the value of sps_explicit_mts_intra_enabled_flag in the MTS applied to the residual block generated by intra prediction (intra MTS) is 1 and the value of sps_explicit_mts_inter_enabled_flag in the MTS applied to the residual block generated by inter prediction (inter MTS) is 1, the modification of Table 6 has no effect on the case where the implicit MTS is applied.
[0379] According to another example, as shown in the following table, it can be checked in units of CG whether a non-zero coefficient exists outside the upper left 16×16 area.
[0380] [Table 7]
[0381]
[0382]
[0383]
[0384] In Table 7, xS and yS represent the x - coordinate position and y - coordinate position in each CG unit inside the current transform block, and need to be converted to coordinates in terms of samples to check whether the transform coefficients are outside the upper - left 16×16 region. That is, xS and yS are converted to coordinates in terms of samples, such as (xS << log2SbW) and (yS << log2SbH). Here, log2SbW and log2SbH respectively represent the base - 2 logarithms of the width and height of the corresponding CG. In the transform block, the x - coordinate increases from left to right, and the y - coordinate increases from top to bottom. The coordinates of the upper - left position of the transform block are (0, 0).
[0385] As shown in Table 7, when scanning in units of CG, when there are non - zero transform coefficients inside each CG (when the value of coded_sub_block_flag[xS][yS] is 1) and the CG is recognized as being outside the upper - left 16×16 region of the transform block ((xS << log2SbW)>15 || (yS << log2SbH)>15)), the value of MtsZeroOutSigCoeffFlag is set to 0.
[0386] As shown in Table 3, since the value of the variable MtsZeroOutSigCoeffFlag is initialized to 1, the value of MtsZeroOutSigCoeffFlag remains 1 unless the value of MtsZeroOutSigCoeffFlag is set to 0. When the value of coded_sub_block_flag[xS][yS] for the CG to which the last non - zero transform coefficient belongs is inferred to be 1, the conditional check part in Table 5 and the update of MtsZeroOutSigCoeffFlag (if ((LastSignificantCoeffX>15 || LastSignificantCoeffY)>15) && cIdx == 0) MtsZeroOutSigCoeffFlag = 0) can be removed from Table 7.
[0387] The following drawings are provided to describe specific examples of the present disclosure. Since specific terms of the devices illustrated in the drawings or specific terms of signals / messages / fields are provided for illustration purposes, the technical features of the present disclosure are not limited to the specific terms used in the following drawings.
[0388] Fig.13is a flowchart illustrating the operation of a video decoding device according to an embodiment of the present disclosure.
[0389] Fig.13 Each process disclosed in is based on reference Figures 1 to 12 Therefore, some details of the description will be omitted or will be schematically presented with reference to Figures 1 to 12 The content described repeats the description of the specific details.
[0390] The decoding apparatus 200 according to the embodiment may receive a bitstream including residual information, and may derive residual information (eg, quantized transform coefficients) of a current block (ie, a transform block to be transformed) from the bitstream (S1310).
[0391] Specifically, the decoding device 200 can decode information about the quantized transform coefficients of the current block from the bitstream, and can derive the quantized transform coefficients of the target block based on the information about the quantized transform coefficients of the current block. The information about the quantized transform coefficients of the target block may be included in a sequence parameter set (SPS) or a slice header, and may include information about whether to apply RST, information about a reduction factor, information about a minimum transform size for applying RST, information about a maximum transform size for applying RST, an inverse RST size, and at least one of information about a transform index indicating any one of transform kernel matrices included in a transform set.
[0392] The decoding apparatus 200 may derive a position of a last significant coefficient in the current block and a transform coefficient of the current block based on the residual information (S1320). The decoding apparatus 200 may derive a transform coefficient by dequantizing a quantized transform coefficient of the current block.
[0393] The derived transform coefficients can be arranged two-dimensionally in the current block, and the decoding device can derive information about the non-zero data (i.e., non-zero significant coefficients) in the current block through the residual coding. That is, the decoding device can identify the last position information about the non-zero significant coefficients in the current block.
[0394] The transform coefficient derived based on the residual information in S1320 may be a dequantized transform coefficient as described above, or may be a quantized transform coefficient. That is, the transform coefficient only needs to be data for identifying the position of non-zero data and significant coefficients in the current block, and has nothing to do with quantization.
[0395] The decoding apparatus may derive modified transform coefficients by applying LFNST to the transform coefficients, or may not perform LFNST.
[0396] The decoding device may derive residual samples by performing an inverse primary transform of the transform coefficient or the modified transform coefficient. The decoding device may use a general DCT-2 as a transform kernel, or may apply the above-mentioned MTS for a primary inverse transform.
[0397] MTS may be performed implicitly or may be performed based on explicit signaling of an MTS index.
[0398] The decoding device may check a predetermined condition for parsing the MTS index.
[0399] According to an example, the decoding apparatus may determine whether there is a significant coefficient present in the scanned subblock in the second region other than the upper left first region of the current block (S1330).
[0400] To this end, the decoding device can derive flag information indicating whether there is a significant coefficient in the second area other than the upper left first area of the current block. In this case, the flag information can be derived by determining whether there is a significant coefficient in the second area in units of a scanning subblock in which the significant coefficient is scanned.
[0401] According to an example, when MTS is applied to the inverse transform, the decoding device can perform the inverse transform on the transform coefficients in the upper left first region of the current block to be transformed. That is, the second region of the current block other than the upper left first region is cleared and thus does not include the transform coefficients.
[0402] According to an example, when MTS is applied, the first region may be an upper left 16×16 region of the current block, in which case the second region may be a region other than the upper left 16×16 region.
[0403] The scanned sub-block may be a 4×4 block and may be scanned in a reverse diagonal scanning direction starting from the position of the last significant coefficient in the current block, such as Fig.12 shown.
[0404] In order to parse the MTS index after determining whether there is a significant coefficient in the zero region, the decoding apparatus may derive flag information indicating whether there is a significant coefficient in the second region, and may parse the MTS index based on the flag information.
[0405] The flag information may be a variable MtsZeroOutSigCoeffFlag, and whether there is a significant coefficient in the second region may be determined in units of a scanning subblock for scanning significant coefficients.
[0406] When the flag (coded_sub_block_flag or sb_coded_flag) indicating whether there is a significant coefficient in the scanned sub-block shown in Table 7 is equal to 1 and the significant coefficient existing in the scanned sub-block is located in the second region (((xS<<log2SbW)> 15||(yS<<log2SbH)> 15)), the variable MtsZeroOutSigCoeffFlag can indicate that there are valid coefficients in the second region.
[0407] Alternatively, as in Table 6, the variable MtsZeroOutSigCoeffFlag may be derived by checking whether the 4×4 scanned subblock belongs to the first region each time the transform coefficient is scanned. That is, when the flag (sig_coeff_flag) indicating whether there is a valid coefficient in the scanned subblock is equal to a value of 1 and the valid coefficient present in the scanned subblock is located in the second region (if ((xC>15||yC>15)), the variable MtsZeroOutSigCoeffFlag may indicate that there is a valid coefficient in the second region.
[0408] Alternatively, when a flag indicating whether a significant coefficient exists in the scanned subblock is equal to a value of 1 and the scanned subblock is located in the second region, the variable MtsZeroOutSigCoeffFlag may indicate that a significant coefficient exists in the second region.
[0409] The variable MtsZeroOutSigCoeffFlag may be initially set to 1, may remain at 1 when the significant coefficient is not located in the second region, and may be changed to 0 when the significant coefficient is located in the second region.
[0410] The decoding apparatus may parse the MTS index from the bitstream based on the absence of a significant coefficient in the second region (S1340).
[0411] That is, while the value of the variable MtsZeroOutSigCoeffFlag, which is initially set to 1, is maintained, the MTS index can be parsed.
[0412] The decoding apparatus may induce residual samples of the current block by applying a transform kernel derived based on the MTS index to transform coefficients in the first region ( S1350 ).
[0413] Subsequently, the decoding device 200 may generate a reconstructed sample based on the residual sample of the current block and the prediction sample of the current block.
[0414] The following figures are provided to describe specific examples of the present disclosure. Since the specific terms of the devices or the specific terms of the signals / messages / fields illustrated in the figures are provided for illustration, the technical features of the present disclosure are not limited to the specific terms used in the following figures.
[0415] The following figures are provided to describe specific examples of the present disclosure. Since the specific terms of the devices or the specific terms of the signals / messages / fields illustrated in the figures are provided for illustration, the technical features of the present disclosure are not limited to the specific terms used in the following figures.
[0416] Fig.14 is a flowchart illustrating the operation of a video encoding device according to an embodiment of the present disclosure.
[0417] Fig.14 Each process disclosed in is based on reference Figures 1 to 12 Therefore, some details will be omitted or will be schematically described with reference to Figures 1 to 12 A description of the specific details of the overlap.
[0418] The encoding apparatus 100 according to an embodiment may induce a prediction sample based on an intra prediction mode applied to a current block ( S1410 ).
[0419] The encoding apparatus 100 according to an embodiment may induce a residual sample of the current block based on the prediction sample ( S1420 ).
[0420] The encoding apparatus 100 according to an embodiment may induce a transform coefficient of a target block based on one transform of residual samples ( S1430 ).
[0421] According to an example, the encoding device may use a general DCT-2 as a transform kernel, or may apply the above-mentioned MTS to one transform.
[0422] MTS may be performed implicitly or may be performed based on explicit signaling of an MTS index.
[0423] The encoding apparatus may determine whether to perform MTS for a primary transform, and when it is determined that MTS is to be performed, may derive transform coefficients by applying DCT-8 or DST-7 to residual samples.
[0424] According to an example, when MTS is applied for a primary transform, the encoding apparatus may clear a second region other than an upper left first region of the current block ( S1440 ).
[0425] According to an example, the first region may be an upper left 16×16 region of the current block, in which case the second region may be a region other than the upper left 16×16 region.
[0426] Due to this clearing, the amount of calculation required to perform the entire transformation process can be reduced and the amount of operation required for the entire transformation process can be reduced, thereby reducing the power consumption required to perform the transformation. In addition, the delay required in the transformation process can be reduced, thereby increasing the image coding efficiency.
[0427] The encoding device may construct the image information so that the MTS index is parsed based on the absence of a significant coefficient in the second region, in which case it is determined whether there is a significant coefficient in the second region in units of a scanning subblock in which the significant coefficient is scanned (S1450).
[0428] In addition, the encoding device may configure the image information to derive flag information indicating whether there is a significant coefficient in the second region to determine whether to parse the MTS index.
[0429] That is, the encoding device can construct the image information so that the image information shown in Table 6 or Table 7 can be parsed in the decoding device.
[0430] According to an example, the scan sub-block may be a 4×4 block, and the scan sub-block may also be scanned in a decoding device according to a reverse diagonal scanning direction starting from the position of the last significant coefficient in the current block, such as Fig.12 shown.
[0431] The flag information may be a variable MtsZeroOutSigCoeffFlag, and whether there is a significant coefficient in the second region may be determined in units of a scanning subblock for scanning significant coefficients.
[0432] When the flag (coded_sub_block_flag) indicating whether there is a significant coefficient in the scanned sub-block shown in Table 7 is equal to 1 and the significant coefficient existing in the scanned sub-block is located in the second region (((xS<<log2SbW)> 15||(yS<<log2SbH)> 15)), the variable MtsZeroOutSigCoeffFlag can indicate that there are valid coefficients in the second region.
[0433] Alternatively, as shown in Table 6, the variable MtsZeroOutSigCoeffFlag may be derived by checking whether the 4×4 scanned sub-block belongs to the first region each time the transform coefficient is scanned. That is, when the flag (sig_coeff_flag) indicating whether there is a valid coefficient in the scanned sub-block is equal to a value of 1 and the valid coefficient present in the scanned sub-block is located in the second region (if ((xC>15||yC>15)), the variable MtsZeroOutSigCoeffFlag may indicate that there is a valid coefficient in the second region.
[0434] Alternatively, when a flag indicating whether a significant coefficient exists in the scanned subblock is equal to a value of 1 and the scanned subblock is located in the second region, the variable MtsZeroOutSigCoeffFlag may indicate that a significant coefficient exists in the second region.
[0435] The variable MtsZeroOutSigCoeffFlag may be initially set to 1, may remain at 1 when the significant coefficient is not located in the second region, and may be changed to 0 when the significant coefficient is located in the second region.
[0436] The encoding apparatus may induce modified transform coefficients by further applying LFNST to the transform coefficients induced after one transform.
[0437] The encoding apparatus may encode the MTS index and residual information derived based on the transform coefficient or the modified transform coefficient of the current block, based on the absence of the significant coefficient in the second region ( S1460 ).
[0438] That is, the encoding device may generate residual information including information about the quantized transform coefficients. The residual information may include information / syntax elements related to the aforementioned transform. The encoding device may encode the image / video information including the residual information, and may output the encoded image / video information in the form of a bitstream.
[0439] Specifically, the encoding apparatus 100 may generate information about the quantized transform coefficient and may encode the generated information about the quantized transform coefficient.
[0440] 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.
[0441] 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.
[0442] In the above-mentioned embodiments, the method is explained 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 a certain step may be performed concurrently with other steps. In addition, it can be understood by those 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 in the flowchart may be deleted without affecting the scope of the present disclosure.
[0443] 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 a device for image processing such as a television, a computer, a smart phone, a set-top box, a display device, and the like.
[0444] When the embodiments in the present disclosure are implemented by software, the above methods can be implemented as modules (steps, functions, etc.) for performing the above functions. These modules 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 well-known ways. The processor may include an application-specific integrated circuit (ASIC), other chipsets, logic circuits and / or data processing devices. The memory may include 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 implemented and executed on a processor, a microprocessor, a controller or a chip. For example, the functional units shown in each of the accompanying drawings can be implemented and executed on a computer, a processor, a microprocessor, a controller or a chip.
[0445] In addition, the decoding device and encoding device of the present disclosure can 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 can be used to process a video signal or a data signal. For example, an over-the-top (OTT) video device can 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.
[0446] In addition, the processing method of the present disclosure can be produced in the form of a program executed by a computer and can be 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 various storage devices and distributed storage devices that store computer-readable data. 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 implemented in the form of a carrier (e.g., transmission on the Internet). In addition, the bit stream generated by the encoding method can be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network. In addition, the embodiments of the present disclosure can be implemented as a computer program product through a program code, and the program code can be executed on a computer according to the embodiments of the present disclosure. The program code can be stored on a computer-readable carrier.
[0447] Fig.15 An example of a video / image encoding system to which the present disclosure can be applied is illustrated.
[0448] Reference Fig.15 The video / image coding system may include a source device and a receiving device. The source device may transmit the 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.
[0449] 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.
[0450] 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.
[0451] 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.
[0452] 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.
[0453] 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.
[0454] The renderer can render the decoded video / image, and the rendered video / image can be displayed through a display.
[0455] Fig.16 The structure of a content streaming system to which the present disclosure is applied is illustrated.
[0456] Furthermore, the content streaming system to which the present disclosure is applied may generally include an encoding server, a streaming server, a web server, a media storage device, a user device, and a multimedia input device.
[0457] The encoding server is used to compress the content input from a multimedia input device such as a smart phone, a camera, a camcorder, etc. into digital data to generate a bitstream, and send it to a streaming server. As another example, in the case where a multimedia input device such as a smart phone, a camera, a camcorder, etc. directly generates a bitstream, the encoding server can be omitted. The bitstream can be generated by applying the encoding method or the bitstream generation method disclosed in the present invention. And the streaming server can temporarily store the bitstream during the process of sending or receiving the bitstream.
[0458] The streaming server sends multimedia data to the user device through the web server based on the user's request, and the web server serves as a tool to inform the user of what services exist. 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 command / response between the corresponding devices in the content streaming system.
[0459] The streaming server can receive content from a media storage device and / or an 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, in order to smoothly provide a streaming service, the streaming server can store the bit stream for a predetermined time.
[0460] For example, user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigators, tablet PCs, tablet PCs, ultrabooks, wearable devices (e.g., watch-type terminals (smart watches), glasses-type terminals (smart glasses), head-mounted displays (HMDs)), digital TVs, desktop computers, 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.
[0461] The claims disclosed herein may be combined in various ways. For example, the technical features of the method claims of the present disclosure may be combined to be implemented or performed in a device, and the technical features of the device claims may be combined to be implemented or performed in a method. In addition, the technical features of the method claims and the device claims may be combined to be implemented or performed in a device, and the technical features of the method claims and the device claims may be combined to be implemented or performed in a method.
Claims
1. An image decoding method performed by a decoding device, the image decoding method comprising the following steps: Derives a position of a last significant coefficient in a current block and a transform coefficient for the current block based on residual information from a bitstream; as well as deriving residual samples for the current block by applying a transform kernel to the transform coefficients, The step of deriving the transform coefficients comprises the following steps: parsing first information related to whether there is a valid coefficient in the scanning sub-block by scanning the scanning sub-block in units of preset scanning sub-blocks according to a reverse diagonal scanning order; Determine whether the scanned sub-block belongs to a second area other than the upper left first area of the current block; determining whether the color index of the current block indicates a luma component; and Based on the value of the first information, whether the scanned sub-block belongs to the second region, and the color index, deriving second information related to whether the significant coefficient exists in the second region, and The last scanned sub-block is derived based on the position of the last significant coefficient, and the scanned sub-blocks are scanned starting from the last scanned sub-block according to the reverse diagonal scan order.
2. An image encoding method performed by an image encoding device, the image encoding method comprising the following steps: Derived residual samples for the current block based on the prediction samples for the current block; deriving transform coefficients for the current block based on the transform for the residual samples; constructing image information based on the absence of significant coefficients in a second region other than the upper left first region of the current block; as well as encoding residual information derived based on the transform coefficients for the current block, The step of constructing the image information includes the following steps: encoding first information related to whether the significant coefficient exists in the scanning sub-block by scanning the scanning sub-block in units of preset scanning sub-blocks according to a reverse diagonal scanning order; determining whether the scanning sub-block belongs to the second area; determining whether the color index of the current block indicates a luma component; and Based on the value of the first information, whether the scanned sub-block belongs to the second region, and the color index, deriving second information related to whether the significant coefficient exists in the second region, and The last scanned sub-block is derived based on the position of the last significant coefficient, and the scanned sub-blocks are scanned starting from the last scanned sub-block according to the reverse diagonal scan order.
3. A method for transmitting data for image information, the method comprising the following steps: Generate a bitstream for the image, wherein the bitstream is generated based on the following steps: deriving residual samples for the current block based on prediction samples for the current block; deriving transform coefficients for the current block based on transforms for the residual samples; constructing image information based on the absence of significant coefficients in a second region other than an upper left first region of the current block; and encoding residual information derived based on the transform coefficients for the current block to generate the bitstream; and sending said data comprising said bit stream, The step of constructing the image information includes the following steps: encoding first information related to whether the significant coefficient exists in the scanning sub-block by scanning the scanning sub-block in units of preset scanning sub-blocks according to a reverse diagonal scanning order; determining whether the scanning sub-block belongs to the second area; determining whether the color index of the current block indicates a luma component; and Based on the value of the first information, whether the scanned sub-block belongs to the second region, and the color index, deriving second information related to whether the significant coefficient exists in the second region, and The last scanned sub-block is derived based on the position of the last significant coefficient, and the scanned sub-blocks are scanned starting from the last scanned sub-block according to the reverse diagonal scan order.