Image decoding and encoding apparatuses and apparatuses for transmitting a bitstream

By using inverse non-separable transform technology to encode images and limiting the target block size, the problem of efficient compression of high-resolution, high-quality images/videos is solved, improving coding efficiency and reducing costs.

CN117336484BActive Publication Date: 2025-12-16GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311474319.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-07-04
Filing Date
2020-06-05
Publication Date
2025-12-16
Estimated Expiration
2040-06-05

AI Technical Summary

Technical Problem

Existing technologies, when transmitting and storing high-resolution, high-quality images/videos, result in high costs due to the increased amount of information. Furthermore, the increasing demand for immersive media and broadcasting of images/videos with different image characteristics necessitates efficient image/video compression technologies.

Method used

Image encoding is achieved by employing inverse inseparable transform technology. By deriving the transform coefficients of the target block and performing an inverse first transform, the size of the target block for inseparable transform is limited, thereby improving the efficiency of transform index encoding.

Benefits of technology

It improves image/video compression efficiency and transform index coding efficiency, limits the target block size of indivisible transforms, and reduces transmission and storage costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117336484B_ABST
    Figure CN117336484B_ABST
Patent Text Reader

Abstract

Image decoding and encoding apparatuses and apparatuses for transmitting a bitstream are disclosed. An image decoding method performed by an image decoding apparatus according to the present document includes a step for receiving a bitstream including residual information, a step for deriving transform coefficients of a target block based on the residual information, a step for deriving corrected transform coefficients based on an inverse non-separable transform of the transform coefficients, and a step for deriving residual samples of the target block based on an inverse primary transform of the corrected transform coefficients, wherein the inverse non-separable transform is performed when a size of the target block is equal to or smaller than a size of a prescribed maximum transform application block.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the original application No. 202080041767.2 (International Application No. PCT / KR2020 / 007351, filed on June 5, 2020, entitled "TRANSFORM-BASED IMAGE ENCODING METHOD AND APPARATUS THEREFOR"). TECHNICAL FIELD

[0002] The disclosure relates to an image encoding technology, and more particularly, to a method and apparatus for encoding an image based on a transform in an image encoding system. BACKGROUND

[0003] Nowadays, there is a growing demand for high-resolution and high-quality images / videos such as ultra-high definition (UHD) images / videos of 4K, 8K or more in various fields. As image / video data becomes higher in resolution and quality, the amount of information or bits transmitted increases compared to conventional image data. Therefore, when transmitting image data using a medium such as a conventional wired / wireless broadband line or storing image / video data using an existing storage medium, the transmission cost and storage cost thereof 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 different image characteristics 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

[0006] TECHNICAL PROBLEM

[0007] A technical aspect of the disclosure is to provide a method and apparatus for increasing image encoding efficiency.

[0008] Another technical aspect of the disclosure is to provide a method and apparatus for increasing the efficiency of transform index encoding.

[0009] Still another technical aspect of the disclosure is to provide a method and apparatus for encoding a transform index based on a multi-transform technique.

[0010] Still another technical aspect of the disclosure is to provide an image encoding method and apparatus for limiting the size of a target block to which a non-separable transform is to be applied.

[0011] TECHNICAL SOLUTION

[0012] According to an embodiment of the disclosure, an image decoding method performed by a decoding device is provided. The method can include receiving a bitstream including residual information, deriving transform coefficients of a target block based on the residual information, deriving modified transform coefficients based on inverse non-separable transform for the transform coefficients, deriving residual samples of the target block based on inverse primary transform for the modified transform coefficients, generating a reconstructed picture based on the residual samples of the target block, wherein the inverse non-separable transform is performed when a size of the target block is equal to or smaller than a size of a predetermined maximum transform application block.

[0013] Here, further receiving information about the size of the maximum transform application block.

[0014] Whether to perform the inverse non-separable transform is derived by comparing a larger one of a width or a height of the target block with a width or a height of the maximum transform application block, and the size of the maximum transform application block is 64x64.

[0015] When the size of the target block is greater than the size of the predetermined maximum transform application block, an lfnst index indicating a predetermined transform kernel matrix for the inverse non-separable transform is not derived.

[0016] The target block includes a luma coding block and a chroma coding block, when the size of the luma coding block is equal to or smaller than the size of the maximum transform application block and a color format is 4:2:0, the inverse non-separable transform is performed when the chroma coding block is smaller than or equal to 1 / 2 of the size of the maximum transform application block.

[0017] According to another embodiment of the disclosure, an image encoding method performed by an encoding device is provided. The method can include deriving prediction samples of a target block, deriving residual samples of the target block based on the prediction samples, deriving transform coefficients of the target block based on primary transform of the residual samples, deriving modified transform coefficients from the transform coefficients based on a predetermined transform kernel matrix for non-separable transform, and encoding quantized residual information and an lfnst index indicating the transform kernel matrix, wherein the non-separable transform is performed when a size of the target block is equal to or smaller than a size of a predetermined maximum transform application block.

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

[0019] According to still another embodiment of the disclosure, a digital storage medium storing image data including encoded image information and a bitstream to enable a decoding device to perform an image decoding method can be provided.

[0020] Technical effects

[0021] According to the disclosure, overall image / video compression efficiency can be increased.

[0022] According to the disclosure, efficiency of transform index coding can be increased.

[0023] Technical aspects of the disclosure can provide a method and apparatus for coding a transform index based on a multiple transform technique.

[0024] A technical aspect of the disclosure can provide an image coding method and apparatus for limiting the size of a target block to which a non-separable transform is to be applied.

[0025] Effects that can be obtained through specific examples of the disclosure are not limited to those listed above. For example, there can be various technical effects that can be understood or derived by those of ordinary skill in the related art from the disclosure. Therefore, specific effects of the disclosure are not limited to those explicitly described in the disclosure, and can include various effects that can be understood or derived from technical features of the disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0026] Figure 1 An example of a video / image encoding system to which the disclosure is applicable is schematically illustrated.

[0027] Figure 2 FIG. is a diagram schematically illustrating a configuration of a video / image encoding apparatus to which the disclosure is applicable.

[0028] Figure 3 FIG. is a diagram schematically illustrating a configuration of a video / image decoding apparatus to which the disclosure is applicable.

[0029] Figure 4 A multiple transform scheme according to an embodiment of the present document is schematically illustrated.

[0030] Figure 5 Intra directional modes of 65 prediction directions are schematically shown.

[0031] Figure 6 FIG. is a diagram for explaining RST according to an embodiment of the present document.

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

[0033] Figure 8 FIG. is a flowchart illustrating an operation of a video encoding apparatus according to an embodiment of the disclosure.

[0034] Figure 9 A structure of a content streaming system to which the disclosure is applied is illustrated. DETAILED DESCRIPTION

[0035] Although the present disclosure can be susceptible to various modifications and alternative forms, specific embodiments thereof have been shown by way of example in the drawings and will herein be described in detail. The drawings should not be understood as limiting the present disclosure to the particular embodiment disclosed herein but on the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the present disclosure. The terms used herein are merely by way of description and do not in any way limit the technical idea of the present disclosure. The singular forms are intended to include the plural forms unless the context clearly indicates otherwise. The terms such as "include" and "have" are used to designate the presence of the described features, numbers, steps, operations, elements, components, or a combination thereof, and thus should not be understood as precluding the presence or addition of one or more other features, numbers, steps, operations, elements, components, or a combination thereof.

[0036] Further, the components on the drawings described herein are independently illustrated for the convenience of describing different characteristic functions from each other, however, it is not intended that the components are implemented by separate hardware or software. For example, any two or more of the 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 are within the scope of the patent right of the present disclosure as long as they do not depart from the spirit of the present disclosure.

[0037] Hereinafter, preferred embodiments of the present disclosure will be described in greater detail with reference to the accompanying drawings. Also, in the drawings, the same drawing reference numerals are used for the same components, and redundant descriptions for the same components will be omitted.

[0038] The present document relates to video / image encoding. For example, the methods / examples disclosed in the present document can relate to the VVC (Versatile Video Coding) standard (ITU-T Rec. H.266), the next generation video / image encoding standard after VVC, or other video encoding related standards (e.g., the HEVC (High Efficiency Video Coding) standard (ITU-T Rec. H.265), the EVC (Elementary Video Coding) standard, the AVS2 standard, etc.).

[0039] In the present document, various embodiments related to video / image encoding can be provided, and unless specified to the contrary, these embodiments can be combined with and executed with each other.

[0040] In the present document, a video can refer to a set of a series of images for a period of time. In general, a picture refers to a unit of an image representing a specific time region, and a slice / tile refers to a unit of a part constituting a picture. A slice / tile can include one or more coding tree units (CTUs). A picture can be composed of one or more slices / tiles. A picture can be composed of one or more tile groups. One tile group can include one or more tiles.

[0041] A pixel or a pel can refer to a minimum unit constituting one picture (or an image). Also, a "sample" can be used as a term corresponding to a pixel. A sample can generally represent a pixel or a pixel value, and can represent only a pixel / pixel value of a luminance component or only a pixel / pixel value of a chroma component. Alternatively, a sample can mean a pixel value in a spatial domain, or when the pixel value is transformed into a frequency domain, it can mean a transform coefficient in the frequency domain.

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

[0043] In this document, the terms “ / ” and “,” should be interpreted to mean “and / or.” For example, the expression “A / B” can mean “A and / or B.” Also, “A, B” can mean “A and / or B.” Also, “A / B / C” can mean “at least one of A, B, and / or C.” Also, “A / B / C” can mean “at least one of A, B, and / or C.”

[0044] Also, in this document, the term “or” should be interpreted to mean “and / or.” For example, the expression “A or B” can 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 to mean “additionally or alternatively.”

[0045] In this disclosure, “at least one of A and B” can mean “only A”, “only B”, or “both A and B”. Also, in this disclosure, the expression “at least one of A or B” or “at least one of A and / or B” can be interpreted as “at least one of A and B”.

[0046] Also, in this disclosure, “at least one of A, B, and C” can mean “only A”, “only B”, “only C”, or “any combination of A, B, and C”. Also, “at least one of A, B, or C” or “at least one of A, B, and / or C” can mean “at least one of A, B, and C”.

[0047] Also, the bracket used in the disclosure can mean "for example". Specifically, when indicated as "prediction (intra prediction)", it can mean that "intra prediction" is proposed as an example of "prediction". In other words, the "prediction" of the disclosure is not limited to "intra prediction", and "intra prediction" is proposed as an example of "prediction". Also, when indicated as "prediction (i.e., intra prediction)", this can also mean that "intra prediction" is proposed as an example of "prediction".

[0048] The technical features described individually in one drawing in the disclosure can be implemented individually or can be implemented simultaneously.

[0049] Figure 1 An example of a video / image encoding system to which the disclosure is applicable is schematically illustrated.

[0050] Referring to Figure 1 , the video / image encoding system can include a first apparatus (a source apparatus) and a second apparatus (a receiving apparatus). The source apparatus can deliver encoded video / image information or data in the form of a file or a stream to the receiving apparatus via a digital storage medium or a network.

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

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

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

[0054] The transmitter can transmit the encoded video / image information or data, which is outputted in the form of a bitstream, to a receiver of a receiving apparatus in the form of a file or a stream through a digital storage medium or a network. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter can include an element for generating a media file through a predetermined file format, and can include an element for transmission through a broadcasting / communication network. The receiver can receive / extract a bitstream, and transmit the received / extracted bitstream to a decoding device.

[0055] The decoding device can decode a video / image by performing a series of processes such as dequantization, inverse transform, prediction, etc. corresponding to the operations of the encoding device.

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

[0057] Figure 2 FIG. 1 is a diagram schematically illustrating a configuration of a video / image encoding device to which the present disclosure is applicable. Hereinafter, the so-called video encoding device can include an image encoding device.

[0058] Referring to Figure 2 The encoding device 200 can include a picture partitioner 210, a predictor 220, a residue processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 can include an inter-predictor 221 and an intra-predictor 222. The residue processor 230 can include a transformer 232, a quantizer 233, a dequantizer 234, an inverse transformer 235. The residue processor 230 can further include a subtractor 231. The adder 250 can be referred to as a reconstructor or a reconstructed block generator. According to an embodiment, the above-described picture partitioner 210, predictor 220, residue processor 230, entropy encoder 240, adder 250, and filter 260 can be constituted by one or more hardware components (e.g., an encoder chipset or a processor). Further, the memory 270 can include a decoded picture buffer (DPB), and can be constituted by a digital storage medium. The hardware components can further include the memory 270 as an internal / external component.

[0059] The picture partitioner 210 can partition an input picture (or a picture or a frame) input to the encoding apparatus 200 into one or more processing units. As one example, the processing unit can be referred to as a coding unit (CU). In this case, starting from a coding tree unit (CTU) or a largest coding unit (LCU), the coding units can be recursively partitioned according to a quad tree binary tree ternary tree (QTBTTT) structure. For example, based on a quad tree structure, a binary tree structure, and / or a ternary tree structure, one coding unit can be partitioned into a plurality of coding units at a deeper depth. In this case, for example, the quad tree structure can be first applied, and the binary tree structure and / or the ternary tree structure can be later applied. Alternatively, the binary tree structure can be first applied. The encoding process according to the disclosure can be performed based on a final coding unit that is not further partitioned. In this case, based on the coding efficiency according to the characteristics of the picture, the largest coding unit can be directly used as the final coding unit. Alternatively, the coding unit can be recursively partitioned into a coding unit at a deeper depth as necessary, whereby a coding unit of an optimal size can be used as the final coding unit. Here, the encoding process can include processes such as prediction, transform, and reconstruction, which will be described later. As another example, the processing unit can further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit can be separated or partitioned from the above-described final coding unit. The prediction unit can be a unit of sample prediction, and the transform unit can be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from the transform coefficient.

[0060] Depending on the situation, a unit and a term such as a block, a region, and the like can be used instead of each other. In general cases, an MxN block can denote a set of samples or transform coefficients consisting of M columns and N rows. A sample can generally denote a pixel or a pixel value, and can denote only a pixel / pixel value of a luminance component or only a pixel / pixel value of a chrominance component. A sample can be used as a term corresponding to a pixel or a pel of one picture (or image).

[0061] The subtractor 231 subtracts the prediction signal (prediction block, prediction sample array) output from the predictor 220 from the input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is transmitted to the transformer 232. The predictor 220 can perform prediction on a processing target block (hereinafter referred to as a "current block"), and can generate a prediction block including predicted samples of the current block. The predictor 220 can determine whether to apply intra prediction or to apply inter prediction on a basis of the current block or CU. As discussed later in the description of each prediction mode, the predictor can generate various information related to prediction, such as prediction mode information, and transmit the generated information to the entropy encoder 240. The information about prediction can be encoded in the entropy encoder 240 and output in the form of a bitstream.

[0062] The intra predictor 222 can predict the current block by referring to samples in the current picture. The reference samples can be located in the vicinity of the current block or separated from the current block according to the prediction mode. In intra prediction, the prediction mode can include a plurality of non-directional modes and a plurality of directional modes. The non-directional mode can include, for example, a DC mode and a planar mode. The directional mode can include, for example, 33 directional prediction modes or 65 directional prediction modes according to the degree of detail of the prediction direction. However, this is merely an example, and more or less directional prediction modes can be used according to the settings. The intra predictor 222 can determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring block.

[0063] The inter predictor 221 can derive a prediction block for a current block based on a reference block (a reference sample array) designated by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted on a block, sub-block, or sample basis based on the correlation of the motion information between neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring blocks can include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block can be the same as or different from each other. The temporal neighboring block can be referred to as a collocated reference block, a collocated CU (colCU), or the like, and the reference picture including the temporal neighboring block can be referred to as a collocated picture (colPic). For example, the inter predictor 221 can configure a motion information candidate list based on the neighboring blocks and generate information indicating which candidate is used to derive the motion vector and / or the reference picture index of the current block. The inter prediction can be performed based on various prediction modes. For example, in the case of the skip mode and the merge mode, the inter predictor 221 can use the motion information of the neighboring blocks as the motion information of the current block. In the skip mode, unlike the merge mode, a residual signal cannot be transmitted. In the case of the motion information prediction (motion vector prediction, MVP) mode, the motion vector of the neighboring block can be used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling a motion vector difference.

[0064] The predictor 220 can generate a prediction signal based on various prediction methods. For example, the predictor can apply intra prediction or inter prediction to the prediction of one block, and can also simultaneously apply intra prediction and inter prediction. This can be referred to as combined inter and intra prediction (CIIP). In addition, the predictor can predict a block based on an intra block copy (IBC) prediction mode or a palette mode. The IBC prediction mode or the palette mode can be used for content image / video encoding of a game or the like such as screen content coding (SCC). Although the IBC basically performs prediction in the current block, it is similar to the inter prediction in that it derives a reference block in the current block. That is, the IBC can use at least one of the inter prediction techniques described in the present disclosure.

[0065] The prediction signal generated by the inter-predictor 221 and / or the intra-predictor 222 can be used to generate a reconstructed signal or to generate a residual signal. The transformer 232 can generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique can 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, the GBT means a transform obtained from a graph when relationship information between pixels is expressed in a graph. The CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process can be applied to a square pixel block having the same size, or can be applied to a block having a variable size other than a square block.

[0066] The quantizer 233 can quantize the transform coefficients and transmit them to the entropy encoder 240, and the entropy encoder 240 can encode the quantized signals (information about the quantized transform coefficients) and output the encoded signals in a bitstream. The information about the quantized transform coefficients can be referred to as residual information. The quantizer 233 can rearrange the quantized transform coefficients of a block type into a one-dimensional vector form based on a coefficient scan order, and generate the information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. The entropy encoder 240 can perform various encoding methods such as, for example, exponential Golomb, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), and the like. The entropy encoder 240 can encode information required for video / image reconstruction, other than the quantized transform coefficients (e.g., values of syntax elements, etc.), together or separately. The encoded information (e.g., encoded video / image information) can be transmitted or stored in the form of a bitstream on a unit basis of a network abstraction layer (NAL). The video / image information can further include information about various parameter sets such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), a video parameter set (VPS), and the like. In addition, the video / image information can further include regular constraint information. In the disclosure, information and / or syntax elements transmitted from the encoding apparatus to / signaled to the decoding apparatus can be included in the video / image information. The video / image information can be encoded through the encoding process described above and included in the bitstream. The bitstream can be transmitted through a network, or stored in a digital storage medium. Here, the network can include a broadcasting network, a communication network, and / or the like, and the digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, and the like. A transmitter (not shown) that transmits the signals output from the entropy encoder 240 or a memory (not shown) that stores the same can be configured as an internal / external element of the encoding apparatus 200, or the transmitter can be included in the entropy encoder 240.

[0067] The quantized transform coefficients output from the quantizer 233 can be used to generate a prediction signal. For example, by applying dequantization and inverse transform to the quantized transform coefficients using the dequantizer 234 and the inverse transformer 235, a residual signal (a residual block or residual samples) can be reconstructed. The adder 155 adds the reconstructed residual signal to the prediction signal output from the inter-predictor 221 or the intra-predictor 222, so that a reconstructed signal (a reconstructed picture, a reconstructed block, a reconstructed sample array) can be generated. When there is no residual for the processing target block as in the case of applying a skip mode, the prediction block can be used as the reconstructed block. The adder 250 can be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra-prediction of the next processing target block in the target picture, and as subsequently described, can be used for inter-prediction of the next picture by filtering.

[0068] Further, in the picture encoding and / or reconstruction processing, luma mapping with chroma scaling (LMCS) can be applied.

[0069] The filter 260 can improve subjective / objective video quality by applying filtering to the reconstructed signal. For example, the filter 260 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and can store the modified reconstructed picture in the memory 270, especially in the DPB of the memory 270. The various filtering methods can include, for example, deblocking filter, sample adaptive offset, adaptive loop filter, bilateral filter, etc. As discussed subsequently in the description of each filtering method, the filter 260 can generate various information related to the filtering, and transmit the generated information to the entropy encoder 240. The information about the filtering can be encoded in the entropy encoder 240 and output in the form of a bitstream.

[0070] The modified reconstructed picture transmitted to the memory 270 can be used as a reference picture in the inter-predictor 221. Thereby, the encoding apparatus can avoid prediction mismatch in the encoding apparatus 100 and the decoding apparatus when applying inter-prediction, and can also improve encoding efficiency.

[0071] The memory 270 DPB can store the modified reconstructed picture in order to use it as a reference picture in the inter-predictor 221. The memory 270 can store motion information of a block in a current picture from which motion information has been derived (or encoded) and / or motion information of a block in a picture that has been reconstructed. The stored motion information can be transmitted to the inter-predictor 221 to be used as motion information of a neighboring block or motion information of a temporally neighboring block. The memory 270 can store reconstructed samples of a reconstructed block in the current picture, and transmit them to the intra-predictor 222.

[0072] Figure 3FIG. 1 is a diagram schematically illustrating a configuration of a video / image decoding apparatus to which the present disclosure is applicable.

[0073] Referring to Figure 3 , the video decoding apparatus 300 can include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 can include an inter-predictor 332 and an intra-predictor 331. The residual processor 320 can include a dequantizer 321 and an inverse transformer 322. According to an embodiment, the above-described entropy decoder 310, residual processor 320, predictor 330, adder 340, and filter 350 can be constituted by one or more hardware components (e.g., a decoder chipset or a processor). In addition, the memory 360 can include a decoded picture buffer (DPB), and can be constituted by a digital storage medium. The hardware components can further include the memory 360 as an internal / external component.

[0074] When a bitstream including video / image information is input, the decoding apparatus 300 can reconstruct an image in correspondence with a process by which the video / image information has been processed in the encoding apparatus Figure 2 . For example, the decoding apparatus 300 can derive a unit / block based on information related to block partitioning obtained from the bitstream. The decoding apparatus 300 can perform decoding by using a processing unit to which a process applied in the encoding apparatus is applied. Accordingly, the decoded processing unit can be, for example, an encoding unit, which can be partitioned with a coding tree unit or a largest coding unit following a quadtree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units can be derived with the coding unit. Also, a reconstructed image signal decoded and output by the decoding apparatus 300 can be reproduced through a reproducer.

[0075] The decoding apparatus 300 can receive a bitstream from Figure 2The signal output from the encoding apparatus can be received and decoded by the entropy decoder 310. For example, the entropy decoder 310 can parse the bitstream to derive information (e.g., video / image information) required for image reconstruction (or picture reconstruction). The video / image information can further include information on various parameter sets such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), a video parameter set (VPS), etc. In addition, the video / image information can further include general constraint information. The decoding apparatus can further decode a picture based on the information on the parameter sets and / or the general constraint information. In the disclosure, the information and / or syntax elements to be signaled / received, which will be described later, can be decoded by the decoding process and obtained from the bitstream. For example, the entropy decoder 310 can decode information in the bitstream based on an encoding method such as an exponential Golomb coding, a CAVLC, a CABAC, etc., and can output values of syntax elements required for image reconstruction and quantized values of transform coefficients on a residual. More specifically, the CABAC entropy decoding method can receive bins corresponding to each syntax element in the bitstream, determine a context model using decoded information of a target syntax element and decoded information of neighboring and a decoding target block or a symbol / bin decoded in a previous step, predict a bin generation probability according to the determined context model, and perform arithmetic decoding on the bin to generate a symbol corresponding to each syntax element value. Here, the CABAC entropy decoding method can update the context model using information of a symbol / bin decoded for a next context model after determining the context model. Information on prediction among the information decoded in the entropy decoder 310 can be provided to the predictor (inter-predictor 332 and intra-predictor 331), and residual values (i.e., quantized transform coefficients) and associated parameter information on which entropy decoding has been performed in the entropy decoder 310 can be input to the residual processor 320. The residual processor 320 can derive a residual signal (a residual block, a residual sample, a residual sample array). In addition, information on filtering among the information decoded in the entropy decoder 310 can be provided to the filter 350. Furthermore, a receiver (not shown) that receives a signal output from the encoding apparatus can also constitute the decoding apparatus 300 as an internal / external element, and the receiver can be a component of the entropy decoder 310. Furthermore, the decoding apparatus according to the disclosure can be referred to as a video / image / picture encoding apparatus, and the decoding apparatus can be divided into an information decoder (a video / image / picture information decoder) and a sample decoder (a video / image / picture sample decoder). The information decoder can include the entropy decoder 310, and the sample decoder can include at least one of the dequantizer 321, the inverse transformer 322, the adder 340, the filter 350, the memory 360, the inter-predictor 332, and the intra-predictor 331.

[0076] The dequantizer 321 can output transform coefficients by dequantizing the quantized transform coefficients. The dequantizer 321 can rearrange the quantized transform coefficients into the form of a two-dimensional block. In this case, the rearrangement can be performed based on the order of coefficient scanning that has been performed in the encoding apparatus. The dequantizer 321 can perform dequantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step information), and obtain transform coefficients.

[0077] The dequantizer 321 obtains a residual signal (a residual block, a residual sample array) by inverse-transforming the transform coefficients.

[0078] The predictor can perform prediction on the current block and generate a prediction block including prediction samples for the current block. The predictor can determine whether to apply intra prediction or inter prediction to the current block based on information about prediction output from the entropy decoder 310, and specifically can determine an intra / inter prediction mode.

[0079] The predictor can generate a prediction signal based on various prediction methods. For example, the predictor can apply intra prediction or inter prediction to prediction of one block, and can also simultaneously apply intra prediction and inter prediction. This can be referred to as combined inter and intra prediction (CIIP). In addition, the predictor can perform intra block copy (IBC) for prediction of a block. Intra block copy can be used for content image / video encoding of contents such as games, etc., screen content coding (SCC). Although IBC basically performs prediction in the current block, it is similar to inter prediction in that it derives a reference block in the current block. That is, IBC can use at least one of the inter prediction techniques described in the present disclosure.

[0080] The intra predictor 331 can predict the current block by referring to samples in the current picture. The reference samples can be located in the vicinity of the current block or separated from the current block according to the prediction mode. In intra prediction, the prediction mode can include a plurality of non-directional modes and a plurality of directional modes. The intra predictor 331 can determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring block.

[0081] The inter predictor 332 can derive a prediction block for the current block based on a reference block (a reference sample array) designated by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted on a block, sub-block, or sample basis based on the correlation of the motion information between neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can also include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring blocks can include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the inter predictor 332 can configure a motion information candidate list based on the neighboring blocks, and derive a motion vector and / or a reference picture index of the current block based on received candidate selection information. The inter prediction can be performed based on various prediction modes, and information about the prediction can include information indicating a mode of inter prediction for the current block.

[0082] The adder 340 can generate a reconstructed signal (a reconstructed picture, a reconstructed block, a reconstructed sample array) by adding the obtained residual signal to a prediction signal (a prediction block, a prediction sample array) output from the predictor 330. When there is no residual for the processing target block as in the case of applying a skip mode, the prediction block can be used as the reconstructed block.

[0083] The adder 340 can be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra prediction of a next processing target block in the current block, and as subsequently described, can be output through filtering or used for inter prediction of a next picture.

[0084] Further, in the picture decoding process, luma mapping with chroma scaling (LMCS) can be applied.

[0085] The filter 350 can improve subjective / objective video quality by applying filtering to the reconstructed signal. For example, the filter 350 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and can transmit the modified reconstructed picture to the memory 360, particularly, to the DPB of the memory 360. The various filtering methods can include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.

[0086] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter prediction 332. The memory 360 can store motion information of a block in a current picture from which motion information has been derived (or decoded) and / or motion information of a block in a picture that has been reconstructed. The stored motion information can be sent to the inter prediction 332 to be used as motion information of a neighboring block or motion information of a temporally neighboring block. The memory 360 can store reconstructed samples of a reconstructed block in a current picture and send them to the intra prediction 331.

[0087] In this specification, the examples described in the predictors 330, the dequantizer 321, the inverse transformer 322, and the filter 350 of the decoding device 300 can be similarly or correspondingly applied to the predictors 220, the dequantizer 234, the inverse transformer 235, and the filter 260 of the encoding device 200, respectively.

[0088] As described above, prediction is performed in order to improve compression efficiency when performing video encoding. Accordingly, a prediction block including prediction samples for a current block that is an encoding target block can be generated. Here, the prediction block includes prediction samples in a spatial domain (or pixel domain). The prediction block can be derived identically in the encoding device and the decoding device, and the encoding device can improve image encoding efficiency by signaling, to the decoding device, information (residual information) on a residual between the original block and the prediction block, rather than original sample values 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.

[0089] The residual information can be generated through a transform process and a quantization process. For example, the encoding device can derive a residual block between the original block and the prediction block, derive transform coefficients by performing a transform process on residual samples (a residual sample array) included in the residual block, and derive quantized transform coefficients by performing a quantization process on the transform coefficients, so that it can signal associated residual information to the decoding device (through a bitstream). Here, the residual information can include value information of the quantized transform coefficients, position information, a transform technique, a transform kernel, a quantization parameter, and the like. The decoding device can perform a quantization / dequantization process based on the residual information and derive residual samples (or a residual sample block). The decoding device can generate a reconstructed block based on the prediction block and the residual block. The encoding device can derive the residual block by dequantizing / inverse-transforming the quantized transform coefficients in order to be used as a reference for inter prediction of a next picture, and can generate a reconstructed picture based thereon.

[0090] Figure 4 A multi-transform technique according to an embodiment of the disclosure is schematically illustrated.

[0091] Referring to Figure 4 , the transformer can correspond to the transformer in the encoding apparatus of the foregoing Figure 2 , and the inverse transformer can correspond to the inverse transformer in the encoding apparatus of the foregoing Figure 2 , or the inverse transformer in the decoding apparatus of the foregoing Figure 3 .

[0092] The transformer can derive (primary) transform coefficients by performing a primary transform based on residual samples (residual sample array) in the residual block (S410). The primary transform can be referred to as a core transform. In this context, the primary transform can be based on multiple transform selection (MTS), and when multiple transforms are used as the primary transform, it can be referred to as a multi-core transform.

[0093] The multi-core transform can denote a method of performing a transform using Discrete Cosine Transform (DCT) type 2 and Discrete Sine Transform (DST) type 7, DCT type 8, and / or DST type 1 additionally. That is, the multi-core transform can denote a transform method of transforming a residual signal (or residual block) in a spatial domain into a transform coefficient (or primary transform coefficient) in a frequency domain based on multiple transform kernels selected from among DCT type 2, DST type 7, DCT type 8, and DST type 1. In this context, the primary transform coefficient can be referred to as a temporary transform coefficient from the perspective of the transformer.

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

[0095] When the multi-core transform is performed, a vertical transform kernel and a horizontal transform kernel for a target block can be selected from among transform kernels, a vertical transform can be performed on the target block based on the vertical transform kernel, and a horizontal transform can be performed on the target block based on the horizontal transform kernel. Here, the horizontal transform can indicate a transform on a horizontal component of the target block, and the vertical transform can indicate a transform on a vertical component of the target block. The vertical / horizontal transform kernel can be adaptively determined based on a prediction mode of a target (CU or sub-block) including the residual block and / or a transform index.

[0096] Further, according to an example, if one transform is performed by applying the MTS, a mapping relationship of the transform kernel can be set by setting a certain basis function to a predetermined value and combining basis functions to be applied in the vertical transform or the horizontal transform. For example, when a horizontal transform kernel is denoted as trTypeHor and a vertical direction transform kernel is denoted as trTypeVer, trTypeHor or trTypeVer having a value of 0 can be set to DCT2, trTypeHor or trTypeVer having a value of 1 can be set to DST7, and trTypeHor or trTypeVer having a value of 2 can be set to DCT8.

[0097] In this case, MTS index information can be encoded and signaled to a decoding device to indicate any one of a plurality of transform kernel sets. For example, MTS index 0 can indicate that both trTypeHor and trTypeVer values are 0, MTS index 1 can indicate that both trTypeHor and trTypeVer values are 1, MTS index 2 can indicate that trTypeHor value is 2 and trTypeVer value is 1, MTS index 3 can indicate that trTypeHor value is 1 and trTypeVer value is 2, and MTS index 4 can indicate that both trTypeHor and trTypeVer values are 2.

[0098] In one example, transform kernel sets according to MTS index information are shown in the following table.

[0099] [Table 1]

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

[0101] The transformer can derive modified (secondary) transform coefficients by performing a secondary transform based on the (primary) transform coefficients (S420). The primary transform is a transform from a spatial domain to a frequency domain, and the secondary transform refers to a transform into a more compressive representation by using a correlation existing between the (primary) transform coefficients. The secondary transform can include a non-separable transform. In this case, the secondary transform can be referred to as a non-separable secondary transform (NSST) or a mode-dependent non-separable secondary transform (MDNSST). The non-separable secondary transform can denote a transform that generates modified transform coefficients (or secondary transform coefficients) for the residual signal by performing a secondary transform on the (primary) transform coefficients derived through the primary transform based on a non-separable transform matrix. At this time, the vertical transform and the horizontal transform can not be applied to the (primary) transform coefficients separately (or the horizontal transform and the vertical transform can not be applied independently), but the transform matrix can be applied once based on the non-separable transform. In other words, the non-separable secondary transform can denote a transform method in which vertical and horizontal components of the (primary) transform coefficients are not separated, and a two-dimensional signal (transform coefficients) is rearranged into a one-dimensional signal through a certain determined direction (for example, a row-first direction or a column-first direction), and then modified transform coefficients (or secondary transform coefficients) are generated based on a non-separable transform matrix. For example, according to a row-major order, M×N blocks are arranged in a row in the order of a first row, a second row, …, and an Nth row. According to a column-major order, M×N blocks are arranged in a row in the order of a first column, a second column, …, and an Mth column. The non-separable secondary transform can be applied to a left-top region of a block (hereinafter, which can be referred to as a transform coefficient block) configured with the (primary) transform coefficients. For example, if the width (W) and the height (H) of the transform coefficient block are each equal to or greater than 8, an 8×8 non-separable secondary transform can be applied to an 8×8 left-top region of the transform coefficient block. Also, if the width (W) and the height (H) of the transform coefficient block are each equal to or greater than 4, and the width (W) or the height (H) of the transform coefficient block is less than 8, a 4×4 non-separable secondary transform can be applied to a min(8, W)×min(8, H) left-top region of the transform coefficient block. However, embodiments are 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 equal to or greater than 4 is satisfied, the 4×4 non-separable secondary transform can be applied to the min(8, W)×min(8, H) left-top region of the transform coefficient block.

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

[0103] The 4×4 input block X can be expressed as follows.

[0104] [Equation 1]

[0105]

[0106] If X is represented in the form of a vector, the vector may be represented as follows.

[0107] [Equation 2]

[0108]

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

[0110] In this case, the non-separable quadratic transform can be calculated as follows.

[0111] [Equation 3]

[0112]

[0113] In this equation, denotes a transform coefficient vector, and T denotes a 16x16 (non-separable) transform matrix.

[0114] Through the aforementioned Equation 3, the 16x1 transform coefficient vector may be derived, and the vector may be reorganized into 4x4 blocks through a scan order (horizontal, vertical, and diagonal, etc.). However, the above calculation is an example, and a hypercube-Givens transform (HyGT) or the like can also be used for the calculation of the non-separable quadratic transform in order to reduce the calculation complexity of the non-separable quadratic transform.

[0115] Further, in the non-separable quadratic transform, a transform kernel (or transform core, transform type) can be selected to be mode-dependent. In this case, the mode can include an intra-prediction mode and / or an inter-prediction mode.

[0116] As described above, the non-separable quadratic transform can be performed based on an 8x8 transform or a 4x4 transform determined based on a width (W) and a height (H) of a transform coefficient block. The 8x8 transform refers to a transform applicable to an 8x8 region included in the transform coefficient block when both W and H are equal to or greater than 8, and the 8x8 region can be a top-left 8x8 region in the transform coefficient block. Similarly, the 4x4 transform refers to a transform applicable to a 4x4 region included in the transform coefficient block when both W and H are equal to or greater than 4, and the 4x4 region can be a top-left 4x4 region in the transform coefficient block. For example, an 8x8 transform kernel matrix can be a 64x64 / 16x64 matrix, and a 4x4 transform kernel matrix can be a 16x16 / 8x16 matrix.

[0117] Here, to select a mode-dependent transform kernel, two non-separable secondary transform kernels for each transform set for non-separable secondary transform can be configured for both 8x8 transform and 4x4 transform, and there can be four transform sets. That is, four transform sets can be configured for 8x8 transform, and four transform sets can be configured for 4x4 transform. In this case, each of the four transform sets for 8x8 transform can include two 8x8 transform kernels, and each of the four transform sets for 4x4 transform can include two 4x4 transform kernels.

[0118] However, as the size of the transform (i.e., the size of the region to which the transform is applied) can be a size other than 8x8 or 4x4, for example, the number of sets can be n, and the number of transform kernels in each set can be k.

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

[0120] For reference, for example, the intra prediction mode can include two non-directional (or non-angular) intra prediction modes and 65 directional (or angular) intra prediction modes. The non-directional intra prediction mode can include a planar intra prediction mode of 0 number and a DC intra prediction mode of 1 number, and the directional intra prediction mode can include 65 intra prediction modes of 2 number to 66 number. However, this is an example, and the present document can be applied even if the number of intra prediction modes is different. Also, in some cases, a 67th intra prediction mode can also be used, and the 67th intra prediction mode can denote a linear model (LM) mode.

[0121] Figure 5 Intra directional modes with 65 prediction directions are schematically shown.

[0122] Referring to Figure 5 , 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 horizontal directionality and an intra prediction mode having vertical directionality. In Figure 5In the context of HEVC, H and V denote horizontal and vertical directionality, respectively, and the numbers -32 to 32 indicate a displacement in 1 / 32 units on the sample grid position. These numbers can represent an offset for the mode index value. Intra prediction modes 2 to 33 have horizontal directionality and intra prediction modes 34 to 66 have vertical directionality. Strictly speaking, intra prediction mode 34 can be considered neither horizontal nor vertical, but can be classified as belonging to horizontal directionality when determining the transform set for the secondary transform. This is because the input data is transposed for the vertical oriented mode that is symmetric around intra prediction mode 34, and the input data alignment method for horizontal modes is used for intra prediction mode 34. Transposing the input data means switching the rows and columns of a two-dimensional M x N block of data into N x M data. Intra prediction mode 18 and intra prediction mode 50 can represent a horizontal intra prediction mode and a vertical intra prediction mode, respectively, and intra prediction mode 2 can be referred to as a top-right diagonal intra prediction mode because intra prediction mode 2 has a left reference pixel and performs prediction in a top-right direction. Similarly, intra prediction mode 34 can be referred to as a bottom-right diagonal intra prediction mode, and intra prediction mode 66 can be referred to as a bottom-left diagonal intra prediction mode.

[0123] According to examples, four transform sets according to intra prediction modes can be mapped, for example, as shown in the following table.

[0124] [Table 2]

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

[0126] As shown in Table 2, according to intra prediction modes, any one of the four transform sets, i.e., lfnstTrSetldx, can be mapped to any one of the four indices, i.e., 0 to 3.

[0127] When a particular set is determined to be used for a non-separable transform, one of the k transform kernels in the particular set can be selected by a non-separable secondary transform index. The encoding device can derive the non-separable secondary transform index indicating the particular transform kernel based on rate-distortion (RD) checks, and can signal the non-separable secondary transform index to the decoding device. The decoding device can select one of the k transform kernels in the particular set based on the non-separable secondary transform index. For example, lfnst index value 0 can refer to a first non-separable secondary transform kernel, lfnst index value 1 can refer to a second non-separable secondary transform kernel, and lfnst index value 2 can refer to a third non-separable secondary transform kernel. Alternatively, lfnst index value 0 can indicate that a first non-separable secondary transform is not applied to the target block, and lfnst index values 1 to 3 can indicate three transform kernels.

[0128] The transformer can perform a non-separable 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 the quantizer, and can be encoded and signaled to the decoding device, and delivered to the dequantizer / inverse transformer in the encoding device.

[0129] Further, as described above, if the secondary transform is omitted, the (primary) transform coefficients that are output as 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 delivered to the dequantizer / inverse transformer in the encoding device.

[0130] The inverse transformer can perform a series of processes in an order opposite to the order that has been performed in the above-described transformer. The inverse transformer can receive the (dequantized) transform coefficients, and derive the (primary) transform coefficients by performing a secondary (inverse) transform (S450), and can obtain the residual block (residual samples) by performing a primary (inverse) transform on the (primary) transform coefficients (S460). In this regard, the primary transform coefficients can be referred to as modified transform coefficients from the perspective of the inverse transformer. 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.

[0131] The decoding device can 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 can determine whether to apply a secondary inverse transform. For example, the secondary inverse transform can be NSST, RST, or LFNST, and the secondary inverse transform application determiner can determine whether to apply the secondary inverse transform based on a secondary transform flag obtained by parsing a bitstream. In another example, the secondary inverse transform application determiner can determine whether to apply the secondary inverse transform based on transform coefficients of a residual block.

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

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

[0134] Further, in the disclosure, a reduced secondary transform (RST) in which the size of a transform matrix (kernel) is reduced can be applied in the concept of the NSST in order to reduce the amount of calculation and the amount of storage required for the non-separable secondary transform.

[0135] Further, the transform kernel, the transform matrix, and the coefficients constituting the transform kernel matrix, i.e., the kernel coefficients or the matrix coefficients, described in the disclosure can be represented in 8 bits. This can be a condition that is implemented in the decoding device and the encoding device, and compared to the existing 9 bits or 10 bits, the amount of storage required to store the transform kernel can be reduced, and performance degradation can be reasonably accommodated. In addition, representing the kernel matrix in 8 bits can allow the use of a small multiplier, and can be more suitable for single instruction multiple data (SIMD) instructions used for optimal software implementation.

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

[0137] The RST can be referred to as various terms such as reduced transform, reduced secondary transform, downsized transform, simplified transform, and simple transform, and the name by which the RST can be referred to is not limited to the listed examples. Alternatively, since the RST is mainly performed in a low frequency region including non-zero coefficients in a transformed block, it can be referred to as a low frequency non-separable transform (LFNST). The transform index can be referred to as an LFNST index.

[0138] Further, when performing a secondary inverse transform based on the RST, the inverse transformer 235 of the encoding device 200 and the inverse transformer 322 of the decoding device 300 can include an inverse reduced secondary transformer that derives modified transform coefficients based on an inverse RST of the transform coefficients, and an inverse primary transformer that derives 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 the primary transform applied to the residual. In the disclosure, deriving the transform coefficients based on the transform can refer to deriving the transform coefficients by applying the transform.

[0139] Figure 6This is a diagram illustrating an embodiment of the RST according to the present disclosure.

[0140] In this disclosure, "target block" may refer to the current block, residual block, or transform block to be encoded.

[0141] In the example RST, an N-dimensional vector can be mapped to an R-dimensional vector in another space, thus determining the reduced transformation matrix, where R is less than N. N can 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 can refer to the R / N value. The reduction factor can be called a reduction factor, shrinkage factor, simplification factor, or other various terms. Furthermore, R can be called a reduction coefficient, but depending on the situation, the reduction factor can refer to R. Additionally, depending on the situation, the reduction factor can refer to the N / R value.

[0142] In this example, the reduction factor or reduction coefficient can be signaled via a bitstream, but the example is not limited to this. For instance, a predetermined value for the reduction factor or reduction coefficient can be stored in each of the encoding device 200 and the decoding device 300, and in this case, the reduction factor or reduction coefficient does not need to be signaled separately.

[0143] The size of the reduced transformation matrix, as shown in the example, can be less than N×N (the size of the regular transformation matrix) and can be R×N, as defined in Equation 4 below.

[0144] [Formula 4]

[0145]

[0146] Figure 6 The matrix T in the reduced transformation block shown in (a) can refer to the matrix T in Equation 4. R×N .like Figure 6 As shown in (a), when the reduced transformation matrix T R×N By multiplying by the residual sample of the target block, the transformation coefficients of the current block can be derived.

[0147] In the example, if the size of the block to which the transformation is applied is 8×8 and R = 16 (i.e., R / N = 16 / 64 = 1 / 4), then according to Figure 6 The RST of (a) can be represented as the matrix operation shown in Equation 5. In this case, the storage and multiplication computations can be reduced to approximately 1 / 4 by a reduction factor.

[0148] In this disclosure, matrix operations can be understood as operations on column vectors obtained by multiplying a column vector by a matrix placed to the left of the column vector.

[0149] [Formula 5]

[0150]

[0151] In Equation 6, r1to r 64 may represent residual samples of a target block, and specifically can be transform coefficients generated by applying a primary transform. As a result of the calculation of Equation 5, transform coefficients c1to c i of the target block can be derived, and the process of deriving c i may be shown in Equation 6.

[0152] [Equation 6]

[0153]

[0154] As a result of the calculation of Equation 6, transform coefficients c1to c R of the target block can be derived. That is, when R = 16, transform coefficients c1to c 16 If a regular transform is applied instead of RST, and a transform matrix of 64 x 64 (N x N) size is multiplied by residual samples of 64 x 1 (N x 1) size, 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 200 to the decoding device 300 is reduced, and thus the transmission efficiency between the encoding device 200 and the decoding device 300 can be improved.

[0155] When considered from the perspective of the size of the transform matrix, the size of the regular transform matrix is 64 x 64 (N x N), but the size of the reduced transform matrix is reduced to 16 x 64 (R x N), and thus the storage usage rate in the case of performing RST can be reduced by a ratio of R / N compared to the case of performing a regular transform. In addition, when compared to the number of multiplication calculations N x N in the case of using a regular transform matrix, the number of multiplication calculations (R x N) can be reduced by a ratio of R / N using a reduced transform matrix.

[0156] In an example, the transformer 232 of the encoding device 200 can derive transform coefficients of a target block by performing a primary transform and a secondary transform based on RST on residual samples of the target block. These transform coefficients can be communicated to an inverse transformer of the decoding device 300, and the inverse transformer 322 of the decoding device 300 can derive modified transform coefficients based on inverse reduced secondary transform (RST) for the transform coefficients, and can derive residual samples of the target block based on inverse primary transform for the modified transform coefficients.

[0157] The inverse RST matrix T N×RIts size is N×R, which is larger than the size of the conventional inverse transformation matrix N×N, and is the same as the reduced transformation matrix T shown in Equation 4. R×N It has a transpose relationship.

[0158] Figure 6 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 indicates transpose). For example... Figure 6 As shown in (b), when the inverse RST matrix T N×R T Multiplying by the transform coefficients of the target block allows for the derivation of the modified transform coefficients of the target block or the residual samples of the target block. The inverse RST matrix T R×N T It can be represented as (T) R×N T ) N×R .

[0159] More specifically, when the inverse RST is used as a second inverse transformation, 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. Furthermore, the inverse RST can be used as the inverse first-order transform, and in this case, when the inverse RST matrix T... N×R T When multiplied by the transformation coefficients of the target block, the residual sample of the target block can be derived.

[0160] In the example, if the size of the block to which the inverse transform is applied is 8×8 and R = 16 (i.e., R / N = 16 / 64 = 1 / 4), then according to Figure 6 The RST of (b) can be represented as the matrix operation shown in Equation 7.

[0161] [Formula 7]

[0162]

[0163] In Equation 7, c1 to c 16 This can represent the transformation coefficients of the target block. As a result of the calculation in Equation 7, the transformation coefficients representing the modifications to the target block or the r of the residual samples of the target block can be derived. j And derive r j The process can be shown in Equation 8.

[0164] [Formula 8]

[0165]

[0166] As a result of the calculation of Equation 8, r1 to r N From the perspective of the size of the inverse transform matrix, the size of the regular inverse transform matrix is 64x64 (NxN), but the size of the inverse reduced transform matrix is reduced to 64x16 (RxN), and thus the storage usage rate can be reduced by a ratio of R / N in the case of performing the inverse RST compared to the case of performing the regular inverse transform. In addition, the number of multiplication calculations (NXR) can be reduced by a ratio of R / N using the inverse reduced transform matrix when compared to the number of multiplication calculations NxN in the case of using the regular inverse transform matrix.

[0167] The transform set configuration shown in Table 2 can also be applied to 8x8 RST. That is, 8x8 RST can be applied according to the transform set in Table 2. Since one transform set includes two or three transforms (kernels) according to the intra prediction mode, it can be configured to select one of at most four transforms included in the case where the secondary transform is not applied. In the transform in which the secondary transform is not applied, it can be considered to apply an identity matrix. Assuming that indices 0, 1, 2, and 3 are respectively assigned to the four transforms (for example, the index 0 can be assigned to the case where the identity matrix is applied, i.e., 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 designating the transform to be applied. That is, for the top-left 8x8 block, by the transform index, 8x8 NSST in the RST configuration can be designated, or 8x8 lfnst when the LFNST is applied. The 8x8 lfnst and 8x8 RST refer to a transform that can be applied to an 8x8 region included in a transform coefficient block when W and H of a target block to be transformed are equal to or greater than 8, and the 8x8 region can be a top-left 8x8 region in the transform coefficient block. Similarly, the 4x4 lfnst and 4x4 RST refer to a transform that can be applied to a 4x4 region included in a transform coefficient block when W and H of a target block are equal to or greater than 4, and the 4x4 region can be a top-left 4x4 region in the transform coefficient block.

[0168] According to embodiments of the disclosure, for a transform in an encoding process, only 48 pieces of data can be selected, and a maximum 16x48 transform kernel matrix can be applied thereto, instead of applying a 16x64 transform kernel matrix to 64 pieces of data forming an 8x8 region. Here, "maximum" means that m has a maximum value of 16 in an m x 48 transform kernel matrix for generating m coefficients. That is, when RST is performed by applying an m x 48 transform kernel matrix (m ≤ 16) to an 8x8 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 the 48 pieces of data form a 48x1 vector, the 16x48 matrix and the 48x1 vector are sequentially multiplied, thereby generating a 16x1 vector. Here, the 48 pieces of data forming the 8x8 region can be appropriately arranged, thereby forming a 48x1 vector. For example, the 48x1 vector can be configured based on the 48 pieces of data constituting a region other than the right-bottom 4x4 region among the 8x8 region. Here, when matrix operation is performed by applying the maximum 16x48 transform kernel matrix, 16 modified transform coefficients are generated, and the 16 modified transform coefficients can be arranged in the top-left 4x4 region according to a scan order, and the top-right 4x4 region and the bottom-left 4x4 region can be padded with zeros.

[0169] For inverse transform in a decoding process, a transpose matrix of the aforementioned transform kernel matrix can be used. That is, when inverse RST or LFNST is performed in an inverse transform process performed by a decoding device, input coefficient data to which inverse RST is applied is configured in a one-dimensional vector according to a predetermined arrangement order, and a modified coefficient vector obtained by multiplying the one-dimensional vector with a corresponding inverse RST matrix on the left side of the one-dimensional vector can be arranged into a two-dimensional block according to the predetermined arrangement order.

[0170] In summary, in a transform process, when RST or LFNST is applied to an 8x8 region, 48 transform coefficients in the top-left region, the top-right region, and the bottom-left region of the 8x8 region other than the right-bottom region are subjected to matrix operation with a 16x48 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 top-left region of the 8x8 region.

[0171] On the contrary, in the inverse transform process, when inverse RST or LFNST is applied to the 8x8 region, 16 transform coefficients corresponding to the upper left region of the 8x8 region among the transform coefficients in the 8x8 region can be input in a one-dimensional array according to the scan order, and can undergo a matrix operation with a 48x16 transform kernel matrix. That is, the matrix operation can be expressed as (48x16 matrix)*(16x1 transform coefficient vector)=(48x1 modified transform coefficient vector). Here, the nx1 vector can be interpreted to have the same meaning as the nx1 matrix, and thus can be expressed as an nx1 column vector. Also, * denotes 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 region, the upper right region, and the lower left region in the 8x8 region except for the lower right region.

[0172] When the secondary inverse transform is based on RST, the inverse transformer 235 of the encoding apparatus 200 and the inverse transformer 322 of the decoding apparatus 300 can include an inverse reduced secondary transformer for deriving modified transform coefficients based on inverse RST on the transform coefficients and an inverse primary transformer for deriving residual samples of the target block based on inverse primary transform on the modified transform coefficients. The inverse primary transform refers to an inverse transform of a primary transform applied to a residual. In the present disclosure, deriving transform coefficients based on a transform can refer to deriving transform coefficients by applying a transform.

[0173] On the other hand, when LFNST is applied, the maximum size of the target block to which non-separable secondary transform is to be applied can be limited.

[0174] For example, a method of applying LFNST only when the height and the width of the target block (e.g., a coding unit, a coding block, a transform unit, or a transform block) are equal to or less than 64 can be proposed.

[0175] Alternatively, according to another example, a method of applying LFNST only when the size of the target block is less than 128x128 can be proposed. That is, at least one of the width and the height is less than 128, and a method of applying LFNST only to a case where both the width and the height are equal to or less than 128 can be proposed.

[0176] Alternatively, according to an example, the size of the maximum application block to which LFNST is applied can be limited to information such as max_width and max_height rather than a specific value. That is, it can be configured to apply LFNST only when width <= max_width and height <= max_height. In this case, information about max_width and / or information about max_height can be signaled from the encoding apparatus to the decoding apparatus.

[0177] Thus, the specification text in the case of the size of the target block to which LFNST is applied is as follows.

[0178] [Table 3]

[0179]

[0180] As shown in Table 3, lfnst_idx[x0][y0] can be signaled in the coding unit syntax. lfnst_idx[x0][y0] can indicate any one of two transform kernel matrices included in the transform set, and when lfnst_idx is 0, it can indicate a non-separable secondary transform, that is, LFNST is not applied. When lfnst_idx[x0][y0] is not present, it can be inferred to have a value of 0.

[0181] In addition, the maximum coding block size in which lfnst_idx[x0][y0] can be coded is limited to 64x64 (Max(cbWidth, cbHeight)<=64). That is, by adding Max(cbWidth, cbHeight)<=64 to the if statement condition for coding ifnst_idx, the size of the maximum application block is limited to 64x64.

[0182] In the present embodiment, since the width of the coding block (cbWidth) and the height of the coding block (cbHeight) indicate the width of the coding block and the height of the coding block of the luma component, respectively, in the case of the chroma component, LFNST can be applied to each block having a smaller size according to the image color format (for example, 4:2:0).

[0183] Specifically, as shown in Table 3, if the tree type of the target block is dual tree chroma, LFNST can be applied to the chroma block divided by SubWidthC and SubHeightC, which indicate variables of the chroma format in the size of the luma coding block [lfnstWidth = (treeType == DUAL_TREE_CHROMA)? cbWidth / SubWidthC : cbWidth, lfnstHeight = (treeType == DUAL_TREE_CHROMA)? cbHeight / SubHeightC : cbHeight].

[0184] If the color format is 4:2:0, since SubWidthC and SubHeight are 2, LFNST can be applied to a chroma block having a width and a height obtained by dividing the width and the height of the luma block by 2. Therefore, since LFNST can be applied when the size of the luma block is equal to or smaller than a 64x64 block, LFNST can be applied when the size of the chroma block is equal to or smaller than a 32x32 block when the color format is 4:2:0.

[0185] Also, in this document, when a horizontal length and a vertical length of a block A are Wa and Ha, respectively, and a horizontal length and a vertical length of a block B are Wb and Hb, respectively, that the block A is smaller than the block B means that Wa is equal to or smaller than Wb and Ha is equal to or smaller than Hb, and Wa is not equal to Wb or Ha is not equal to Hb. In addition, the meaning that the block A is smaller than or equal to the block B indicates that Wa is equal to or smaller than Wb and Ha is equal to or smaller than Hb.

[0186] In summary, LFNST can be applied when the size of the target block is equal to or smaller than a preset maximum size, which can be applied to the size of the luma block, and accordingly, the maximum size of the chroma block to which LFNST can be applied can be derived.

[0187] On the other hand, unlike Table 3, the maximum block size condition for which LFNST is applied to the luma component and the chroma component can be separately provided through separate syntax information. That is, for the luma component and the chroma component, maximum size information to which LFNST can be applied can be separately signaled.

[0188] According to another example, if LFNST is not applied only for a coding block in which both the width and the height of the target block are 128, that is, if it is configured to apply LFNST only to a block smaller than 128x128, the if clause can be configured as follows.

[0189] [Table 4]

[0190]

[0191] According to another example, the lfnst_idx can be signaled at a transform unit level.

[0192] [Table 5]

[0193]

[0194] As shown in Table 5, the coding part of lfnst_idx[x0][y0] can be moved from the coding unit syntax to the transform unit syntax. That is, lfnst_idx[x0][y0] can be signaled at a transform unit level.

[0195] The width (lfnstWidth) and height (lfnstHeight) of the target block to which the LFNST is applied can vary according to the tree type. In the case of a dual tree chroma block, the width (lfnstWidth) and height (lfnstHeight) of the target block are set to the width (wC) of the chroma transform block and the height (hC) of the chroma transform block, and in other cases, the width (lfnstWidth) and height (lfnstHeight) of the target block can be limited by the width (tbWidth) or height (tbHeight) of the transform block [lfnstWidth = (treeType == DUAL_TREE_CHROMA)? wC : tbWidth, lfnstHeight = (treeType == DUAL_TREE_CHROMA)? hC : tbHeight]. In this case, the width wC of the chroma transform block and the height hC of the chroma transform block are corrected based on SubWidthC and SubHeightC to reflect the color format.

[0196] When the encoding and signaling of the LFNST index moves to the transform unit level, in the case where a coding unit of a larger size is divided into a plurality of transform units, for example, when a coding unit of a 128x128 size is divided into four 64x64 transform units, because the maximum size of the transformable block is 64, that is, when the transform unit tile occurs, the LFNST can be applied to the corresponding transform unit, and since the LFNST index is signaled for each transform unit, different transform cores can be applied to each transform unit.

[0197] Alternatively, according to an example, as described above, the LFNST index can be signaled at the coding unit level, and the width and height of the target block to which the LFNST is applied can be limited to the size of the transform block, for example, the maximum size of the transform block.

[0198] The maximum size of the transform block can be explicitly signaled from the encoding device to the decoding device, or can be implicitly derived. For example, index information or flag information for signaling the maximum size of the transform block can be signaled, and when the maximum size of the transform block is derived based on this information, the LFNST can be performed based thereon.

[0199] The following table shows this as an example.

[0200] [Table 6]

[0201]

[0202] As shown in Table 6, the lfnst_idx is signaled and the LFNST [Max(cbWidth, cbHeight) <= MaxTbSizeY] can be performed on the target block only when the maximum of the width and height of the coding unit is equal to or smaller than the maximum size of the transform block.

[0203] The maximum size of the transform block (MaxTbSizeY) can be derived from higher level flag information such as a sequence parameter set (SPS) (e.g., syntax information such as sps_max_luma_transform_size_64_flag). According to an example, the maximum size of the transform block can be 64x64 or 32x32.

[0204] The following drawings are provided to describe specific examples of the present disclosure. Since specific names of apparatuses or names of specific signals / messages / fields shown in the drawings are provided for illustration, technical features of the present disclosure are not limited to the specific names used in the following drawings.

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

[0206] Figure 7 Each of the operations shown can be performed by Figure 3 the decoding apparatus 300 shown. Specifically, S710 can be performed by Figure 3 the entropy decoder 310 shown, S720 can be performed by Figure 3 the inverse quantizer 321 shown, and S730 and S740 can be performed by Figure 3 the inverse transformer 322 shown, and S750 can be performed by Figure 3 the adder 340 shown. The operations according to S710 to S750 are based on some of the aforementioned details explained with reference to Figure 4 to Figure 6 will be omitted or will be briefly described. The description of specific details overlapping with those explained above with reference to Figure 3 to Figure 6 will be omitted or will be briefly described. The description of specific details overlapping with those explained above with reference to

[0207] The decoding apparatus 300 according to an embodiment can receive a bitstream including residual information and derive quantized transform coefficients of a target block from the bitstream (S710).

[0208] More specifically, the decoding device 300 can decode information about quantized transform coefficients of a target block from a bitstream, and can derive quantized transform coefficients of the target block based on the information about the quantized transform coefficients of the target block. The information about the quantized transform coefficients of the target block can be included in a sequence parameter set (SPS) or a slice header, and can include at least one of information about whether to apply a reduced transform (RST), information about a simplification factor, information about a minimum transform size to which the reduced transform is applied, information about a maximum transform size to which the reduced transform is applied, a reduced inverse transform size, and information about a transform index indicating any one of transform kernel matrices included in a transform set.

[0209] The decoding device 300 also receives information about an LFNST index and an intra prediction mode from a bitstream. In addition, the decoding device 300 can also receive MTS index information indicating a transform kernel of an inverse primary transform.

[0210] The LFNST index information is received as syntax information and the syntax information is received as a bin string of binarization including 0 and 1.

[0211] The syntax element of the LFNST index according to the present embodiment can indicate whether to apply an inverse LFNST or an inverse non-separable transform and any one of transform kernel matrices included in a transform set, and the transform set includes two transform kernel matrices. In this case, the syntax element of the transform index can have three values.

[0212] That is, according to the embodiment, the syntax element value of the LFNST index can include 0, 1, and 2, 0 indicating a case where the inverse LFNST is not applied to the target block, 1 indicating a first transform kernel matrix among the transform kernel matrices, and 2 indicating a second transform kernel matrix among the transform kernel matrices.

[0213] The decoding device 300 according to the embodiment can derive transform coefficients by performing dequantization on the quantized transform coefficients of the target block (S720).

[0214] The decoding device 300 according to the embodiment, when the size of the target block is equal to or smaller than the size of the predetermined maximum transform application block, can derive modified transform coefficients based on the inverse non-separable transform or the inverse LFNST on the transform coefficients (S730).

[0215] The decoding device 300 can also receive information about the size of the maximum transform application block, and can signal the information at a sequence parameter set level with a syntax such as sps_max_luma_transform_size_64_flag.

[0216] Further, a size of a maximum transform application block can be set to a size of a transform block, for example, a maximum size of a transform block. For example, if a size of a maximum transform block is 64x64, a size of a maximum transform application block is set to 64x64 or 64, and if a size of a maximum transform block is 32x32, a size of a maximum transform application block can be set to 32x32 or 32.

[0217] The decoding device 300 can determine whether to perform the inverse non-separable transform by comparing any one of a width or a height of the target block (for example, a larger value) with a size of a maximum transform application block (that is, a width or a height of a maximum transform application block).

[0218] Alternatively, if a size of the target block is greater than a predetermined size of a maximum transform application block, an lfnst index indicating a predetermined transform kernel matrix for the inverse non-separable transform can not be derived. That is, if a size of the target block is greater than a predetermined size of a maximum transform application block, the lfnst index can not be signaled. If the lfnst index is not derived, the lfnst index is inferred to be 0, and the LFNST is not applied to the target block.

[0219] Further, the target block can be a coding block according to an example, and can be a chroma coding block and a luma coding block according to a color index. According to an example, if a size of a luma coding block is less than or equal to a size of a maximum transform application block and a color format is 4:2:0, the inverse non-separable transform can be performed on a chroma coding block when the chroma coding block is less than or equal to 1 / 2 of the size of the maximum transform application block. That is, the inverse LFNST can be applied to a chroma block having a width and a height obtained by dividing a width and a height of a luma block by two. For example, since the inverse LFNST can be applied when a size of a luma block is equal to or less than a 64x64 block, the inverse LFNST can be applied when a size of a chroma block is equal to or less than a 32x32 block when the color format is 4:2:0.

[0220] The inverse transformer 322 of the decoding device 300 can determine a transform set based on a mapping relationship according to an intra prediction mode applied to a target block, and can perform the inverse LFNST, that is, the inverse non-separable transform, based on the transform set and a value of a syntax element of an lfnst index.

[0221] As described above, a plurality of transform sets can be determined according to an intra prediction mode of a transform block to be transformed, and the inverse LFNST can be performed based on any one of transform kernel matrices included in the transform set indicated by the lfnst index.

[0222] In one example, the inverse non-separable transform or inverse LFNST can be performed based on an inverse LFNST matrix, and the inverse LFNST matrix can be a non-square matrix having a number of columns less than a number of rows.

[0223] In one embodiment, S730 can include decoding the transform index, determining whether the transform index corresponds to a condition for applying an inverse RST based on the transform index (i.e., LFNST index), selecting a transform kernel matrix when the condition for applying the inverse LFNST is satisfied, and applying the inverse LFNST to the transform coefficients based on the selected transform kernel matrix and / or a reduction factor. In this case, the size of the reduced inverse transform matrix can be determined based on the reduction factor.

[0224] On the other hand, when the LFNST is not applied, only a one-time inverse transform process based on MTS can be applied in the inverse transform process as follows. That is, the decoding device can determine whether the LFNST is applied to the current block as in the above-described embodiment, and when the LFNST is not applied, the decoding device can derive the residual samples from the transform coefficients through a one-time inverse transform.

[0225] The one-time inverse transform process can be referred to as an inverse one-time transform process or an inverse MTS transform process. This one-time inverse transform process based on MTS can also be omitted in some cases.

[0226] The decoding device 300 according to the embodiment can derive residual samples of the target block based on an inverse one-time transform of the modified transform coefficients (S740).

[0227] The decoding device 300 can perform an inverse one-time transform on the modified transform coefficients of the target block. In this case, a reduced inverse transform can be applied to the inverse one-time transform, or a conventional separable transform can be used.

[0228] The decoding device 300 according to the embodiment can generate reconstructed samples based on the residual samples of the target block and the predicted samples of the target block (S750).

[0229] Referring to S730, it can be confirmed that the residual samples of the target block are derived based on the inverse LFNST of the transform coefficients of the target block. Regarding the size of the inverse transform matrix, the size of the inverse transform matrix is N x N, and the size of the inverse LFNST matrix is reduced to N x R, so the memory occupancy can be reduced by an R / N ratio when the inverse LFNST is performed compared to when the general transform is performed. Also, the number of multiplication operations can be reduced by an R / N ratio (to N x R) when the inverse LFNST matrix is used compared to the number of multiplication operations N x N when the general inverse transform matrix is used. In addition, since only R transform coefficients need to be decoded when the inverse LFNST is applied, the total number of transform coefficients of the target block can be reduced from N to R compared to when the general inverse transform in which N transform coefficients need to be decoded is applied, so the decoding efficiency is increased. That is, according to S730, the (inverse) transform efficiency and the decoding efficiency of the decoding device 300 can be increased by the inverse LFNST.

[0230] The following drawings are provided to describe specific examples of the present disclosure. Since specific names of apparatuses or names of specific signals / messages / fields shown in the drawings are provided for illustration, the technical features of the present disclosure are not limited to the specific names used in the following drawings.

[0231] Figure 8 is a flowchart illustrating an operation of a video encoding apparatus according to an embodiment of the present disclosure.

[0232] Figure 8 Each of the operations shown can be performed by Figure 2 the encoding apparatus 200 shown. Specifically, S810 can be performed by Figure 2 the predictor shown, S820 can be performed by Figure 2 the subtracter 231 shown, S830 and S840 can be performed by Figure 2 the transformer 232 shown, and S850 can be performed by Figure 2 the quantizer 233 and the entropy encoder 240 shown. The operations according to S810 to S850 are based on some of the contents described in Figure 4 to Figure 6 . Thus, the description of specific details overlapping with those explained above with reference to Figure 2 and Figure 4 to Figure 6 will be omitted or will be briefly described.

[0233] The encoding apparatus 200 according to an embodiment can derive prediction samples based on an intra prediction mode applied to a target block (S810).

[0234] The encoding apparatus 200 according to an embodiment can derive residual samples of a target block based on the prediction samples (S820).

[0235] The encoding apparatus 200 according to the embodiment can derive transform coefficients of the target block based on the primary transform of the residual samples (S830).

[0236] The primary transform can be performed through a plurality of transform kernels, and in this case, the transform kernel can be selected based on the intra prediction mode.

[0237] The encoding apparatus 200 can perform a secondary transform or a non-separable transform, particularly, LFNST, on the transform coefficients of the target block.

[0238] When the size of the target block is equal to or smaller than the size of the predetermined maximum transform application block, the encoding apparatus 200 according to the embodiment can derive modified transform coefficients of the target block based on the LFNST for the transform coefficients (S840).

[0239] The size of the maximum transform application block can be set to the size of the transform block, for example, the maximum size of the transform block. For example, if the size of the maximum transform block is 64x64, the size of the maximum transform application block is set to 64x64 or 64, and if the size of the maximum transform block is 32x32, the size of the maximum transform application block can be set to 32x32 or 32.

[0240] The encoding apparatus 200 can determine whether to perform the non-separable transform by comparing any one of the width or the height (for example, the larger value) of the target block with the size of the maximum transform application block (that is, the width or the height of the maximum transform application block).

[0241] Alternatively, if the size of the target block is greater than the size of the predetermined maximum transform application block, the lfnst index indicating the predetermined transform kernel matrix for the non-separable transform can not be derived. That is, if the size of the target block is greater than the size of the predetermined maximum transform application block, the lfnst index can not be signaled. If the lfnst index is not derived, the lfnst index is inferred to 0, and the LFNST is not applied to the target block.

[0242] Further, the target block can be a coding block according to the example, and can be a chroma coding block and a luma coding block according to a color index. According to the example, if the size of the luma coding block is smaller than or equal to the size of the maximum transform application block and the color format is 4:2:0, the non-separable transform can be performed on the chroma coding block when the chroma coding block is smaller than or equal to 1 / 2 of the size of the maximum transform application block. That is, the LFNST can be applied to the chroma block having a width and a height obtained by dividing the width and the height of the luma block by two. For example, since the inverse LFNST can be applied when the size of the luma block is equal to or smaller than the 64x64 block, the LFNST can be applied when the size of the chroma block is equal to or smaller than the 32x32 block when the color format is 4:2:0.

[0243] In one example, the LFNST can be performed based on a simplified transform matrix or a transform kernel matrix, and the simplified transform matrix can be a non-square matrix in which the number of rows is less than the number of columns.

[0244] In one embodiment, S840 can include determining whether a condition for applying the LFNST is satisfied, and based on the determination, generating and encoding an LFNST index when the condition for applying the LFNST is satisfied, selecting a transform kernel matrix and applying the LFNST to the residual samples based on the selected transform kernel matrix and / or a reduction factor. In this case, the size of the simplified transform matrix can be determined based on the reduction factor.

[0245] On the other hand, when the LFNST is not applied, only a one-time transform process based on the MTS can be applied in the transform process as follows. That is, the encoding apparatus can determine whether the LFNST is applied to the current block as in the above-described embodiment, and when the LFNST is not applied, the encoding apparatus can derive transform coefficients from the residual samples by one-time transform.

[0246] This one-time transform process can be referred to as a one-time transform process or an MTS transform process. This one-time transform process based on the MTS can also be omitted in some cases.

[0247] The encoding apparatus 200 according to the embodiment can derive quantized transform coefficients by performing quantization based on the modified transform coefficients of the target block, and can encode information about the quantized transform coefficients and the LFNST index (S850). That is, the encoding apparatus can generate residual information including information about the quantized transform coefficients. The residual information can include the above-described transform-related information / syntax elements. The encoding apparatus can encode image / video information including the residual information and output the encoded image / video information in the form of a bitstream.

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

[0249] In one example, the information about the quantized transform coefficients can include at least one of information about whether the LFNST is applied, information about a reduction factor, information about a minimum transform size at which the LFNST is applied, and information about a maximum transform size at which the LFNST is applied.

[0250] In addition, the encoding apparatus 200 can encode information about the size of the maximum transform application block at a sequence parameter set level, for example, flag information such as sps_max_luma_transform_size_64_flag.

[0251] Referring to S840, it can be confirmed that the transform coefficients of the target block are derived based on the LFNST for the residual samples. Regarding the size of the transform kernel matrix, generally the size of the transform kernel matrix is N x N, while the size of the simplified transform matrix is reduced to R x N, and thus the memory occupancy can be reduced by a ratio of R / N when performing the RST compared to when performing the general transform. Also, the number of multiplication operations can be reduced by a ratio of R / N (to N x R) when using the simplified transform kernel matrix compared to the number of multiplication operations N x N when using the general transform matrix. In addition, since only R transform coefficients need to be derived when applying the RST, the total number of transform coefficients of the target block can be reduced from N to R compared to applying the general transform in which N transform coefficients are derived, and thus the amount of data transmitted by the encoding apparatus 200 to the decoding apparatus 300 is reduced. That is, according to S840, the transform efficiency and the encoding efficiency of the encoding apparatus 200 can be increased by the LFNST.

[0252] In the disclosure, at least one of the quantization / dequantization and / or the transform / inverse transform can be omitted. When the quantization / dequantization is omitted, the quantized transform coefficients can be referred to as transform coefficients. When the transform / inverse transform is omitted, the transform coefficients can be referred to as coefficients or residual coefficients, or can still be referred to as transform coefficients for consistency of expression.

[0253] In addition, in the disclosure, the quantized transform coefficients and the transform coefficients can be referred to as transform coefficients and scaled transform coefficients, respectively. In this case, the residual information can include information on the transform coefficients, and the information on the transform coefficients can be signaled through residual coding syntax. The transform coefficients can be derived based on the residual information (or the information on the transform coefficients), and the scaled transform coefficients can be derived through inverse transform (scaling) of the transform coefficients. The residual samples can be derived based on inverse transform (transform) of the scaled transform coefficients. These details can also be applied / expressed in other parts of the disclosure.

[0254] In the above-described embodiments, the method is explained based on the flowchart by means of a series of steps or blocks, but the disclosure is not limited to the order of the steps, and a certain step can be performed in a different order or step from the above-described order or step, or concurrently with other steps. In addition, it can be understood by one of ordinary skill in the art that the steps shown in the flowchart are not exclusive, and one or more steps in the flowchart can be incorporated or deleted without affecting the scope of the disclosure.

[0255] The above-described method according to the disclosure can be implemented in the form of software, and the encoding apparatus and / or the decoding apparatus according to the disclosure can be included in an apparatus for image processing such as a television, a computer, a smart phone, a set-top box, and a display device, etc.

[0256] When the embodiments of the disclosure are implemented by software, the above-described methods can be implemented as modules (steps, functions, etc.) for performing the above-described functions. The modules can be stored in the memory and can be executed by the processor. The memory can be inside or outside the processor, and can be connected to the processor in various well-known ways. The processor can include an application-specific integrated circuit (ASIC), other chipsets, logic circuit, and / or data processing device. The memory can include read-only memory (ROM), random access memory (RAM), flash memory, memory card, storage medium, and / or other storage device. That is, the embodiments described in the disclosure can be implemented and executed on a processor, microprocessor, controller, or chip. For example, the functional units shown in each of the drawings can be implemented and executed on a computer, processor, microprocessor, controller, or chip.

[0257] In addition, the decoding apparatus and the encoding apparatus according to the 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 camcorder, a video-on-demand (VoD) service providing device, an over-the-top (OTT) video device, an Internet streaming service providing device, 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, the 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.

[0258] In addition, the processing method according to the 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 having a data structure according to the disclosure can also be stored in a computer-readable recording medium. The computer-readable recording medium includes various storage devices and distributed storage devices that store computer-readable data. The computer-readable recording medium can 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 wave (for example, transmission over the Internet). In addition, the bitstream generated by the encoding method can be stored in a computer-readable recording medium or transmitted through a wired or wireless communication network. In addition, the embodiments of the disclosure can be implemented as a computer program product by program codes, and the program codes can be executed on a computer according to the embodiments of the disclosure. The program codes can be stored on a computer-readable carrier.

[0259] Figure 9 An example of a structure of a content streaming system to which the present disclosure is applied is illustrated.

[0260] Further, the content streaming system to which the present disclosure is applied can generally include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.

[0261] The encoding server is used to compress 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 transmit it to the 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 an encoding method or a bitstream generation method of the present disclosure. And the streaming server can temporarily store the bitstream during a process of transmitting or receiving the bitstream.

[0262] The streaming server transmits multimedia data to a user device through a web server based on a request of a user, and the web server serves as a means to inform a user of what services exist. When a user requests a service that the user wants, the web server transmits the request to the streaming server, and the streaming server transmits multimedia data to the user. In this regard, the content streaming system can include a separate control server, and in this case, the control server is used to control commands / responses between respective devices in the content streaming system.

[0263] The streaming server can receive content from a media storage and / or an encoding server. For example, in the case of receiving content from the 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 a bitstream for a predetermined time.

[0264] For example, the user device can include a mobile phone, a smart phone, a laptop computer, a digital broadcasting terminal, a personal digital assistant (PDA), a portable multimedia player (PMP), a navigation, a board PC, a tablet PC, an ultrabook, a wearable device (for example, a watch-type terminal (smart watch), a glasses-type terminal (smart glasses), a head-mounted display (HMD)), a digital TV, a desktop computer, a digital signage, etc. The respective servers in the content streaming system can operate as a distributed server, and in this case, data received by the respective servers can be processed in a distributed manner.

[0265] The claims disclosed herein can be combined in various ways. For example, the technical features of the method claims of the disclosure can be combined to be implemented or performed in an apparatus, and the technical features of the apparatus claims can be combined to be implemented or performed in a method. Also, the technical features of the method claims and the technical features of the apparatus claims can be combined to be implemented or performed in an apparatus, and the technical features of the method claims and the technical features of the apparatus claims can be combined to be implemented or performed in a method.

Claims

1. An image decoding device, the image decoding device comprising: Memory; as well as At least one processor, connected to the memory, is configured to: Receive a bit stream including residual information. The transform coefficients of the transform blocks included in the coded block are derived based on the residual information. The modified transform coefficients are derived based on the inverse inseparable transform of the aforementioned transform coefficients. The residual samples of the transform block are derived based on the inverse first transform of the modified transform coefficients, and The reconstructed image is generated based on the residual samples of the transformed block. Wherein, if the encoded block has a width or height greater than the predetermined maximum transform block width, the inverse inseparable transform is not performed, and Specifically, when the size of the encoded block is equal to or less than the predetermined maximum transform block size, the inverse inseparable transform is performed.

2. The image decoding apparatus according to claim 1, wherein Information regarding the size of the predetermined maximum transform block is further received.

3. The image decoding device according to claim 1, wherein, Whether to perform the inverse inseparable transform is determined by comparing the maximum value of the width and height of the encoded block with the width or height of the predetermined maximum transform block.

4. The image decoding device according to claim 1, wherein, The predetermined maximum transform block size is 64×64.

5. The image decoding device according to claim 1, wherein, Based on the fact that the tree type of the encoded block is dual-tree chroma and the color format is 4:2:0, the width and height of the block to which the inverse inseparable transform is applied are derived to be half the width and height of the encoded block, respectively.

6. An image encoding device, the image encoding device comprising: Memory; as well as At least one processor, connected to the memory, is configured to: Derive the predicted samples of the transform blocks included in the coded block. The residual samples of the transform block are derived based on the predicted samples. The transformation coefficients of the transform block are derived based on a first transformation of the residual samples. Modified transformation coefficients are derived from the transformation coefficients based on a predetermined transformation kernel matrix for inseparable transformations. Based on the modified transform coefficients, quantized transform coefficients are derived by performing quantization, and The residual information is encoded based on the quantized transform coefficients. Wherein, if the encoded block has a width or height greater than the predetermined maximum transform block width, the inseparable transform is not performed, and Specifically, when the size of the encoded block is equal to or less than the predetermined maximum transform block size, the indivisible transform is performed.

7. The image encoding device according to claim 6, wherein, Information regarding the predetermined maximum transform block size is further encoded.

8. The image encoding device according to claim 6, wherein, Whether to perform the indivisible transform is determined by comparing the maximum value of the width and height of the encoded block with the width or height of the predetermined maximum transform block.

9. The image encoding device according to claim 6, wherein, The predetermined maximum transform block size is 64×64.

10. The image encoding device according to claim 6, wherein, Based on the fact that the tree type of the encoded block is dual-tree chroma and the color format is 4:2:0, the width and height of the block after applying the inverse inseparable transform are derived to be half the width and height of the encoded block, respectively.

11. An apparatus for transmitting a bit stream, the apparatus comprising: At least one processor is configured to obtain the bitstream, wherein the bitstream is generated by: deriving prediction samples of transform blocks included in a coded block; deriving residual samples of the transform blocks based on the prediction samples; deriving transform coefficients of the transform blocks based on a first transform of the residual samples; deriving modified transform coefficients from the transform coefficients based on a predetermined transform kernel matrix for inseparable transforms; deriving quantized transform coefficients by performing quantization based on the modified transform coefficients; and encoding residual information based on the quantized transform coefficients; and A transmitter configured to transmit the bit stream. Wherein, if the encoded block has a width or height greater than the predetermined maximum transform block width, the inseparable transform is not performed, and Specifically, when the size of the encoded block is equal to or less than the predetermined maximum transform block size, the indivisible transform is performed.

Citation Information

Patent Citations

  • Method for encoding image, method for decoding image, image encoder, and image decoder

    CN104067622A

  • Method and apparatus for encoding and decoding a video image based on transform

    KR1020180001485A