Method and apparatus for processing a video signal
By applying non-separable transforms based on intra prediction modes, the method enhances transformation efficiency for next-generation video content, addressing the increased memory and processing demands of high-resolution video.
Patent Information
- Application Number
- JP2025206917
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2018-09-05
- Filing Date
- 2025-11-27
- Publication Date
- 2026-02-06
AI Technical Summary
Next-generation video content with high spatial resolution, high frame rate, and high dimensionality requires more efficient coding tools for processing, particularly in converting spatial domain video signals into frequency domain, to manage increased memory storage and processing demands.
A method and apparatus that apply non-separable transforms to video blocks based on intra prediction modes, using predefined transform sets and kernels, and include horizontal and vertical transforms to enhance transformation efficiency.
The method increases transformation efficiency by adapting transformations to suit current blocks, improving processing efficiency for next-generation video content.
Smart Images

Figure 2026020347000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a method and apparatus for processing a video signal, and in particular to a method and apparatus for encoding or decoding a video signal by performing a transformation. [Background technology]
[0002] Compression encoding refers to a series of signal processing techniques used to transmit digitized information over communication lines or store it in a suitable format for storage media. Media such as video, images, and audio can be compressed and encoded, and the technology that compresses and encodes video in particular is called video compression.
[0003] Next-generation video content will be characterized by high spatial resolution, high frame rate, and high dimensionality of scene representation, and processing such content will bring about a huge increase in memory storage, memory access rate, and processing power.
[0004] Therefore, it is necessary to design coding tools for more efficiently processing next-generation video content. In particular, video codec standards following the high efficiency video coding (HEVC) standard require more accurate prediction techniques as well as efficient conversion techniques for converting spatial domain video signals into frequency domain. Summary of the Invention [Problem to be solved by the invention]
[0005] SUMMARY OF THE INVENTION An embodiment of the present invention provides a method and apparatus for processing a video signal that applies an adapted transformation to a current block.
[0006] The technical problems to be solved by the present invention are not limited to the technical problems mentioned above, and other technical problems not mentioned will be clearly understood by those skilled in the art to which the present invention pertains from the following description. [Means for solving the problem]
[0007] A video signal decoding method according to an embodiment of the present invention includes the steps of: determining a non-separable transform set index indicating a non-separable transform set to be used for non-separable transformation of the current block from among predefined non-separable transform sets based on the intra prediction mode of the current block; determining a transform kernel indicated by a non-separable transform index of the current block from among transform kernels included in the non-separable transform set indicated by the non-separable transform set index as a non-separable transform matrix; and applying the non-separable transform matrix to an upper left region of the current block determined according to the width and height of the current block, wherein each of the predefined non-separable transform sets includes two transform kernels.
[0008] Also, the non-separable transform set indexes may be assigned to four transform sets that are set according to the range of the intra prediction mode.
[0009] Furthermore, if the intra prediction mode is 0 to 1, the non-separable transform set index may be determined to be a first index value; if the intra prediction mode is 2 to 12 or 56 to 66, the non-separable transform set index may be determined to be a second index value; if the intra prediction mode is 13 to 23 or 45 to 55, the non-separable transform set index may be determined to be a third index value; and if the intra prediction mode is 24 to 44, the non-separable transform set index may be determined to be a fourth index value.
[0010] Also, two non-separable transform kernels can be set for each index value of the non-separable transform set index.
[0011] In addition, the non-separable transformation matrix can be applied when the non-separable transformation index is not 0 and the width and height of the current block are each 4 or more.
[0012] The method may further include applying a horizontal transform and a vertical transform to the current block to which the non-separable transform has been applied.
[0013] Also, the horizontal transform and the vertical transform may be determined based on a prediction mode applied to the current block and a multiple transform selection (MTS) index for selecting a transform matrix.
[0014] An apparatus for decoding a video signal according to an embodiment of the present invention includes a memory for storing the video signal and a processor coupled to the memory, wherein the processor determines a non-separable transform set index indicating a non-separable transform set to be used for non-separable transformation of the current block from among predefined non-separable transform sets based on an intra prediction mode of the current block, obtains a non-separable transform index of the current block, determines a transform kernel indicated by the non-separable transform index from among transform kernels included in the non-separable transform set indicated by the non-separable transform set index using a non-separable transform matrix, and applies the non-separable transform matrix to an upper left region of the current block determined according to a width and height of the current block, wherein each of the predefined non-separable transform sets includes two transform kernels. [Effects of the Invention]
[0015] According to an embodiment of the present invention, the efficiency of the transformation can be increased by determining and applying a transformation that is suited to the current block.
[0016] The effects obtained by the present invention are not limited to those mentioned above, and other effects not mentioned will be clearly understood by those skilled in the art to which the present invention pertains from the following description. [Brief explanation of the drawings]
[0017] The accompanying drawings, which are included as part of the detailed description to facilitate understanding of the present invention, provide embodiments of the present invention and, together with the detailed description, explain the technical features of the present invention.
[0018] [Figure 1] An example of a video coding system will be shown as an embodiment to which the present invention is applied. [Figure 2] 1 shows a schematic block diagram of an encoding device for encoding a video / image signal as an embodiment to which the present invention is applied. [Figure 3] 1 shows a schematic block diagram of a decoding device that decodes a video signal as an embodiment to which the present invention is applied. [Figure 4] 1 is a structural diagram of a content streaming system as an embodiment to which the present invention is applied; [Figure 5a] 1 is a diagram for explaining a block division structure using a QT (Quad Tree, hereinafter referred to as "QT") as an embodiment to which the present invention can be applied. FIG. [Figure 5b] 1 is a diagram illustrating a block division structure using a Binary Tree (BT, hereinafter referred to as "BT") as an embodiment to which the present invention can be applied. [Figure 5c] 1 is a diagram illustrating a block division structure using a ternary tree (TT, hereinafter referred to as "TT") as an embodiment to which the present invention can be applied. [Figure 5d] 1 is a diagram illustrating a block division structure using an Asymmetric Tree (hereinafter referred to as "AT") as an embodiment to which the present invention can be applied. [Figure 6]1 shows a schematic block diagram of a transform and quantization unit and an inverse quantization and inverse transform unit in an encoding device as an embodiment to which the present invention is applied. [Figure 7] 1 shows a schematic block diagram of an inverse quantization and inverse transform unit in a decoding device as an embodiment to which the present invention is applied. [Figure 8] 1 is a flowchart showing a process in which AMT (adaptive multiple transform) is performed. [Figure 9] 10 is a flowchart illustrating a decoding process in which AMT is performed. [Figure 10] 10 is a flowchart illustrating an MTS-based inverse transformation process according to an embodiment of the present invention. [Figure 11] FIG. 2 is a block diagram of an apparatus for performing MTS-based decoding according to an embodiment of the present invention. [Figure 12] 1 is an encoding / decoding flowchart in which a secondary transform is applied as an embodiment to which the present invention is applied. [Figure 13] 1 is an encoding / decoding flowchart in which a secondary transform is applied as an embodiment to which the present invention is applied. [Figure 14] As an embodiment to which the present invention is applied, a diagram for explaining Givens rotation is shown. [Figure 15] As an embodiment to which the present invention is applied, a configuration of one round in a 4x4 NSST (non-separable secondary transform) composed of a Givens rotation layer and permutation is shown. [Figure 16] As an embodiment to which the present invention is applied, the operation of a reduced secondary transform (RST) will be shown. [Figure 17] 10 is a diagram illustrating a process of performing a reverse scan from the 64th to the 17th blocks based on a reverse scan order, according to an embodiment of the present invention. [Figure 18]As an embodiment to which the present invention is applied, an example of an encoding flowchart using a single transform indicator (STI) will be shown. [Figure 19] As an embodiment to which the present invention is applied, an example of an encoding flowchart using a unified transform indicator (UTI) will be shown. [Figure 20a] Another example of an encoding flowchart using UTI will be shown as an embodiment to which the present invention is applied. [Figure 20b] Another example of an encoding flowchart using UTI will be shown as an embodiment to which the present invention is applied. [Figure 21] As an embodiment to which the present invention is applied, an example of an encoding flowchart for performing conversion will be shown. [Figure 22] As an embodiment to which the present invention is applied, an example of a decoding flowchart for performing conversion is shown. [Figure 23] As an embodiment to which the present invention is applied, an example of a detailed block diagram of the conversion unit 120 in the encoding device 100 is shown. [Figure 24] As an embodiment to which the present invention is applied, an example of a detailed block diagram of the inverse transform unit 230 in the decoding device 200 is shown. [Figure 25] 1 shows a flowchart for processing a video signal as an embodiment to which the present invention is applied. [Figure 26] 1 shows an example of a block diagram of an apparatus for processing a video signal as an embodiment to which the present invention is applied. DETAILED DESCRIPTION OF THE INVENTION
[0019] Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. The detailed description disclosed below together with the accompanying drawings is intended to describe exemplary embodiments of the present invention and is not intended to represent the only embodiments in which the present invention can be practiced. The following detailed description includes specific details to provide a thorough understanding of the present invention. However, those skilled in the art will understand that the present invention can be practiced without such specific details.
[0020] In some cases, in order to avoid obscuring the concept of the present invention, well-known structures and devices may be omitted or shown in block diagram form, focusing on the core functions of each structure and device.
[0021] Furthermore, the terms used in this invention are currently common terms that are widely used whenever possible, but in certain cases, the applicant will use terms arbitrarily selected by the applicant to explain the invention. In such cases, the meanings of the terms will be clearly explained in the detailed description of the relevant part, so it is made clear that the terms should not be interpreted simply based on the names of the terms used in the description of this invention, but should be interpreted by understanding the meanings of the terms.
[0022] Specific terms used in the following description are provided to facilitate understanding of the present invention, and the use of such specific terms may be changed to other forms without departing from the technical spirit of the present invention. For example, in the case of a signal, data, sample, picture, frame, block, etc., they may be appropriately substituted and interpreted in each coding process.
[0023] Hereinafter, in this specification, the term "processing unit" refers to a unit in which encoding / decoding processes such as prediction, transformation, and / or quantization are performed. The term "processing unit" may also be interpreted to include a unit of a luma component and a unit of a chroma component. For example, the processing unit may correspond to a block, a coding unit (CU), a prediction unit (PU), or a transform unit (TU).
[0024] Furthermore, a processing unit may be interpreted as a unit of a luma component or a unit of a chroma component. For example, a processing unit may correspond to a CTB, CB, PU, or TB of a luma component. Alternatively, a processing unit may correspond to a CTB, CB, PU, or TB of a chroma component. Furthermore, without being limited thereto, a processing unit may be interpreted to include a unit of a luma component and a unit of a chroma component.
[0025] Furthermore, the processing units are not necessarily limited to square blocks, but may be configured in the form of polygons having three or more vertices.
[0026] In the following description, pixels or picture elements are commonly referred to as samples. Using a sample can mean using a pixel value or picture element value.
[0027] FIG. 1 shows an example of a video coding system as an embodiment to which the present invention is applied.
[0028] The video coding system may include a source device 10 and a receiving device 20. The source device 10 may transfer encoded video / image information or data to the receiving device 20 in a file or streaming format via a digital storage medium or a network.
[0029] The source device 10 may include a video source 11, an encoding device 12, and a transmitter 13. The receiving device 20 may include a receiver 21, a decoding device 22, and a renderer 23. The encoding device 10 may be referred to as a video / video encoding device, and the decoding device 20 may be referred to as a video / video decoding device. The transmitter 13 may be included in the encoding device 12. The receiver 21 may be included in the decoding device 22. The renderer 23 may include a display unit or may be configured as a separate device or an external component of the display unit.
[0030] A video source can acquire video / images through a video / image capture, synthesis, or generation process. A video source can include a video / image capture device and / or a video / image generation device. A video / image capture device can include, for example, one or more cameras, a video / image archive containing previously captured video / images, etc. A video / image generation device can include, for example, a computer, a tablet, or a smartphone, and can (electronically) generate video / images. For example, a virtual video / image can be generated through a computer, in which case the video / image capture process can replace the process by which the associated data is generated.
[0031] The encoding device 12 can encode the input video / image. The encoding device 12 can perform a series of steps such as prediction, transformation, and quantization for compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.
[0032] The transfer unit 13 can transfer the encoded video / image information or data output in the form of a bitstream to a receiving unit of a receiving device via a digital storage medium or a network in the form of a file or streaming. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray®, HDD, SSD, etc. The transfer unit 13 can include elements for generating a media file in a predetermined file format and elements for transfer via a broadcast / communication network. The receiver 21 can extract the bitstream and transfer it to a decoding device 22.
[0033] The decoding device 22 can decode the video / image by performing a series of steps such as inverse quantization, inverse transform, and prediction corresponding to the operations of the encoding device 12.
[0034] A renderer 23 can render the decoded video / image, and the rendered video / image can be displayed on a display unit.
[0035] 2 is a schematic block diagram of an encoding device 100 for encoding a video / image signal as an embodiment to which the present invention is applied. The encoding device 100 in FIG. 2 may correspond to the encoding device 12 in FIG.
[0036] The image division unit 110 may divide an input image (or picture, frame) input to the encoding device 100 into one or more processing units. For example, the processing units may be called coding units (CUs). In this case, the coding units may be recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) based on a quad-tree binary-tree (QTBT) structure. For example, one coding unit may be divided into multiple coding units of deeper depths based on a quad-tree structure and / or a binary tree structure. In this case, for example, the quad-tree structure may be applied first, and then the binary tree structure may be applied later. Alternatively, the binary tree structure may be applied first. The coding procedure according to the present invention may be performed based on the final coding unit that is not further divided. In this case, the largest coding unit may be used as the final coding unit immediately based on coding efficiency according to image characteristics, or the coding unit may be recursively divided into coding units of lower depths as needed, and the coding unit with the optimal size may be used as the final coding unit. Here, the coding procedure may include prediction, transformation, and restoration procedures, which will be described later. As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may be divided or partitioned from the final coding unit. The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.
[0037] The term unit is sometimes used interchangeably with terms such as block or area. In general, an MxN block can refer to a set of samples or transform coefficients consisting of M columns and N rows. A sample generally refers to a pixel or pixel value, or to a pixel / pixel value of the luma component only, or to a pixel / pixel value of the chroma component only. A sample is used as a term that corresponds to one pixel or pel in a picture (or image).
[0038] The encoding apparatus 100 may subtract a prediction signal (predicted block, prediction sample array) output from the inter prediction unit 180 or the intra prediction unit 185 from an input video signal (original block, original sample array) to generate a residual signal (residual signal, remaining block, remaining sample array), and the generated residual signal is transmitted to the conversion unit 120. In this case, as shown in the figure, a unit in the encoder 100 that subtracts the prediction signal (predicted block, prediction sample array) from the input video signal (original block, original sample array) may be referred to as a subtraction unit 115. The prediction unit may predict a target block (hereinafter referred to as a current block) and generate a predicted block including prediction samples of the current block. The prediction unit may determine whether intra prediction or inter prediction is applied for the current block or for each CU. The prediction unit may generate various information related to prediction, such as prediction mode information, as will be described later in the description of each prediction mode, and transmit the information to the entropy encoding unit 190. The prediction information can be encoded by the entropy encoding unit 190 and output in the form of a bitstream.
[0039] The intra prediction unit 185 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located far away, depending on the prediction mode. Prediction modes in intra prediction may include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes may include, for example, a DC mode and a planar mode. The directional modes may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the granularity of the prediction direction. However, this is merely an example, and more or less directional prediction modes may be used depending on the settings. The intra prediction unit 185 may also determine the prediction mode to be applied to the current block using the prediction modes applied to neighboring blocks.
[0040] The inter prediction unit 180 may derive a predicted block of a current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. In this case, to reduce the amount of motion information transmitted in inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between surrounding blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include information on the inter prediction direction (e.g., L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the surrounding blocks may include spatial neighboring blocks in the current picture and temporal neighboring blocks in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring blocks may be the same or different. The temporal neighboring blocks may be referred to as collocated reference blocks, collocated (CU, colCU), etc., and the reference picture including the temporal neighboring blocks may be referred to as a collocated picture (colPic). For example, the inter predictor 180 may construct a motion information candidate list based on neighboring blocks and generate information indicating which candidate is used to derive a motion vector and / or a reference picture index for the current block. Inter prediction may be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the inter predictor 180 may use motion information of neighboring blocks as motion information for the current block. In the case of skip mode, unlike in merge mode, a residual signal may not be transmitted.In the case of motion vector prediction (MVP) mode, the motion vector of the current block can be indicated by signaling the motion vector difference using the motion vector of the surrounding block as the motion vector predictor.
[0041] The prediction signal generated via the inter prediction unit 180 or the intra prediction unit 185 is used to generate a reconstructed signal or a residual signal.
[0042] The transform unit 120 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loeve transform (KLT), a graph-based transform (GBT), or a conditionally non-linear transform (CNT). Here, the GBT refers to a transform obtained from a graph representing inter-pixel relationship information. The CNT refers to a transform obtained based on a predicted signal generated using all previously reconstructed pixels. The transform process may be applied to square pixel blocks of the same size, or to non-square blocks of variable size.
[0043] The quantization unit 130 quantizes the transform coefficients and transmits them to the entropy encoding unit 190. The entropy encoding unit 190 encodes the quantized signal (information about the quantized transform coefficients) and outputs it as a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantization unit 130 may rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and may generate information about the quantized transform coefficients based on the quantized transform coefficients in a one-dimensional vector form. The entropy encoding unit 190 may perform various encoding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), etc. The entropy encoding unit 190 may encode information required for video / image restoration (e.g., values of syntax elements) together with or separately from the quantized transform coefficients. The encoded information (e.g., video / image information) can be transmitted or stored in the form of a bitstream in NAL (network abstraction layer) units. The bitstream can be transmitted via a network or stored in a digital storage medium. Here, the network can include a broadcast network and / or a network, and the digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD. A transmitting unit (not shown) for transmitting the signal output from the entropy encoding unit 190 and / or a storing unit (not shown) for storing the signal can be configured as an element inside / outside the encoding device 100, or the transmitting unit can be a component of the entropy encoding unit 190.
[0044] The quantized transform coefficients output from the quantization unit 130 can be used to generate a prediction signal. For example, the quantized transform coefficients can be inversely quantized and inversely transformed via the inverse quantization unit 140 and the inverse transform unit 150 in a loop to reconstruct a residual signal. The adder 155 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the inter prediction unit 180 or the intra prediction unit 185. When there is no residual for the current block, such as when skip mode is applied, the predicted block is used as the reconstructed block. The adder 155 can be referred to as a reconstruction unit or a reconstructed block generator. The generated reconstructed signal is used for intra prediction of the next current block in the current picture, and may also be used for inter prediction of the next picture after filtering, as described below.
[0045] The filtering unit 160 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 160 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture and transfer the modified reconstructed picture to the decoded picture buffer 170. Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filtering unit 160 may generate various information related to filtering, as will be described later in the description of each filtering method, and transfer the information related to filtering to the entropy encoding unit 190. The entropy encoding unit 190 may encode the information related to filtering and output it in the form of a bitstream.
[0046] The modified reconstructed picture transferred to the decoded picture buffer 170 is used as a reference picture by the inter prediction unit 180. This allows the encoding device to avoid prediction mismatch between the encoding device 100 and the decoding device when inter prediction is applied, and also improves encoding efficiency.
[0047] The decoded picture buffer 170 can store the modified reconstructed picture for use as a reference picture from the inter predictor 180 .
[0048] 3 is a schematic block diagram of a decoding device for decoding a video signal as an embodiment to which the present invention is applied. The decoding device 200 in FIG. 3 may correspond to the decoding device 22 in FIG.
[0049] 3, the decoding device 200 may include an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an adder 235, a filtering unit 240, a decoded picture buffer (DPB) 250, an inter prediction unit 260, and an intra prediction unit 265. The inter prediction unit 260 and the intra prediction unit 265 may be collectively referred to as a prediction unit. That is, the prediction unit may include an inter prediction unit 180 and an intra prediction unit 185. The inverse quantization unit 220 and the inverse transform unit 230 may be collectively referred to as a residual processing unit. That is, the residual processing unit may include an inverse quantization unit 220 and an inverse transform unit 230. The entropy decoding unit 210, the inverse quantization unit 220, the inverse transform unit 230, the adder 235, the filtering unit 240, the inter prediction unit 260, and the intra prediction unit 265 may be configured as a single hardware component (e.g., a decoder or a processor) depending on the embodiment. Additionally, the decoded picture buffer 250 may be implemented by a single hardware component (eg, a memory or digital storage medium) depending on the embodiment.
[0050] When a bitstream including video / image information is input, the decoding device 200 can reconstruct an image corresponding to the process by which the video / image information from the encoding device 100 of Fig. 2 was processed. For example, the decoding device 200 can perform decoding using the processing unit applied in the encoding device 100. Therefore, the processing unit for decoding can be, for example, a coding unit, and the coding unit can be divided into a coding tree unit or a maximum coding unit according to a quad tree structure and / or a binary tree structure. The reconstructed video signal decoded and output by the decoding device 200 can be played back through a playback device.
[0051] The decoding apparatus 200 may receive a signal output from the encoding apparatus 100 of FIG. 2 in the form of a bitstream, and the received signal may be decoded via an entropy decoding unit 210. For example, the entropy decoding unit 210 may derive information (e.g., video / image information) necessary for image restoration (or picture restoration) by analyzing the bitstream. For example, the entropy decoding unit 210 may decode information in the bitstream based on a coding method such as Exponential Golomb coding, CAVLC, or CABAC, and output values of syntax elements necessary for image restoration and quantized values of transform coefficients related to residuals. In more detail, the CABAC entropy decoding method receives bins corresponding to each syntax element from the bitstream, determines a context model using information on the syntax element to be decoded and decoded information on neighboring and current blocks, or information on symbols / bins decoded in a previous stage, predicts the occurrence probability of the bin based on the determined context model, and performs arithmetic decoding of the bin to generate a symbol corresponding to the value of each syntax element. After determining the context model, the CABAC entropy decoding method may update the context model using information on the decoded symbol / bin for the context model of the next symbol / bin. Prediction information among the information decoded by the entropy decoding unit 210 is provided to the prediction unit (inter prediction unit 260 and intra prediction unit 265), and entropy-decoded residual values, i.e., quantized transform coefficients and related parameter information, from the entropy decoding unit 210 may be input to the inverse quantization unit 220. In addition, information regarding filtering among the information decoded by the entropy decoding unit 210 may be provided to the filtering unit 240. Meanwhile, a receiving unit (not shown) that receives a signal output from the encoding device 100 may be further configured as an internal / external element of the decoding device 200, or the receiving unit may be a component of the entropy decoding unit 210.
[0052] The inverse quantization unit 220 may inverse quantize the quantized transform coefficients to output transform coefficients. The inverse quantization unit 220 may rearrange the quantized transform coefficients into a two-dimensional block format. In this case, the rearrangement may be performed based on the coefficient scanning order performed in the encoding apparatus 100. The inverse quantization unit 220 may inverse quantize the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.
[0053] The inverse transform unit 230 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0054] The prediction unit may predict a current block and generate a predicted block including prediction samples of the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on the prediction information output from the entropy decoding unit 210, and may determine a specific intra / inter prediction mode.
[0055] The intra prediction unit 265 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located far away from the current block depending on the prediction mode. Prediction modes in intra prediction may include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 265 may also determine the prediction mode to be applied to the current block using the prediction modes applied to neighboring blocks.
[0056] The inter prediction unit 260 may derive a predicted block of the current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. In this case, to reduce the amount of motion information transmitted in inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between surrounding blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include information on the inter prediction direction (e.g., L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the surrounding blocks may include spatial neighboring blocks in the current picture and temporal neighboring blocks in the reference picture. For example, the inter prediction unit 260 may construct a motion information candidate list based on the surrounding blocks and derive a motion vector and / or a reference picture index for the current block based on received candidate selection information. Inter prediction may be performed based on various prediction modes, and the prediction information may include information indicating the inter prediction mode of the current block.
[0057] The adder 235 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed, sample array) by adding the acquired residual signal to the predicted signal (predicted block, predicted sample array) output from the inter prediction unit 260 or intra prediction unit 265. As in the case where skip mode is applied, if there is no residual for the current block, the predicted block is used as the reconstructed block.
[0058] The adder 235 may be referred to as a reconstruction unit or a reconstruction block generator. The generated reconstruction signal may be used for intra prediction of the next block to be processed in the current picture, and may also be used for inter prediction of the next picture after filtering, as described below.
[0059] The filtering unit 240 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 240 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture and transfer the modified reconstructed picture to the decoded picture buffer 250. Various filtering methods may include, for example, deblocking filtering, sample adaptive offset (SAO), adaptive loop filter (ALF), bilateral filter, etc.
[0060] The modified reconstructed picture transferred to the decoded picture buffer 250 is used as a reference picture by the inter predictor 260 .
[0061] In this specification, the embodiments described for the filtering unit 160, inter prediction unit 180 and intra prediction unit 185 of the encoding device 100 can also be applied identically or correspondingly to the filtering unit 240, inter prediction unit 260 and intra prediction unit 265 of each decoding device.
[0062] FIG. 4 is a structural diagram of a content streaming system according to an embodiment of the present invention.
[0063] The content streaming system to which the present invention is applied can broadly include an encoding server 410 , a streaming server 420 , a web server 430 , a media storage 440 , a user device 450 and a multimedia input device 460 .
[0064] The encoding server 410 compresses content input from a multimedia input device such as a smartphone, camera, camcorder, etc. into digital data to generate a bitstream and transmits the bitstream to the streaming server 420. As another example, if a multimedia input device 460 such as a smartphone, camera, camcorder, etc. directly generates a bitstream, the encoding server 410 can be omitted.
[0065] The bitstream can be generated by an encoding method or a bitstream generating method to which the present invention is applied, and the streaming server 420 can temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0066] The streaming server 420 transfers multimedia data to the user device 450 based on a user request via the web server 430, and the web server 430 acts as an intermediary informing the user of available services. When a user requests a desired service from the web server 430, the web server 430 transfers the request to the streaming server 420, which then transfers the multimedia data to the user. In this case, the content streaming system may include a separate control server, which controls commands and responses between devices in the content streaming system.
[0067] The streaming server 420 can receive content from the media storage 440 and / or the encoding server 410. For example, when receiving content from the encoding server 410, the content can be received in real time. In this case, to provide a smooth streaming service, the streaming server 420 can store the bitstream for a certain period of time.
[0068] Examples of user device 450 include mobile phones, smartphones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, head mounted displays (HMDs)), digital TVs, desktop computers, digital signage, and the like.
[0069] Each server in the content streaming system can be operated as a distributed server, in which case data received by each server can be processed in a distributed manner.
[0070] Figure 5 is a diagram illustrating block division structures according to embodiments to which the present invention can be applied, where Figure 5a is a QT (QuadTree, QT), Figure 5b is a BT (Binary Tree, BT), Figure 5c is a TT (Ternary Tree, TT), and Figure 5d is an AT (Asymmetric Tree, AT).
[0071] In video coding, a block can be divided based on the QT. A subblock divided by the QT can be further divided recursively using the QT. A leaf block that is no longer divided by the QT can be divided by at least one of BT, TT, or AT. BT can have two types of division: horizontal BT (2NxN, 2NxN) and vertical BT (Nx2N, Nx2N). TT can have two types of division: horizontal TT (2Nx1 / 2N, 2NxN, 2Nx1 / 2N) and vertical TT (1 / 2Nx2N, Nx2N, 1 / 2Nx2N). AT can have four types of division: horizontal-up AT (2Nx1 / 2N, 2Nx3 / 2N), horizontal-down AT (2Nx3 / 2N, 2Nx1 / 2N), vertical-left AT (1 / 2Nx2N, 3 / 2Nx2N), vertical-right AT (3 / 2Nx2N, 1 / 2Nx2N). Each BT, TT, and AT can be further divided recursively using BT, TT, and AT.
[0072] Figure 5a shows an example of QT partitioning. Block A can be partitioned into four sub-blocks (A0, A1, A2, A3) by QT. Sub-block A1 can be partitioned again into four sub-blocks (B0, B1, B2, B3) by QT.
[0073] Figure 5b shows an example of BT division. Block B3, which is no longer divided by QT, can be divided into vertical BT (C0, C1) or horizontal BT (D0, D1). Like block C0, each sub-block can be further divided recursively, such as into horizontal BT (E0, E1) or vertical BT (F0, F1).
[0074] Figure 5c shows an example of TT division. Block B3, which is no longer divided by QT, can be divided into vertical TTs (C0, C1, C2) or horizontal TTs (D0, D1, D2). Like block C1, each sub-block can be further divided recursively, such as into horizontal TTs (E0, E1, E2) or vertical TTs (F0, F1, F2).
[0075] Figure 5d shows an example of AT division. Block B3, which is no longer divided by QT, can be divided into vertical AT(C0, C1) or horizontal AT(D0, D1). Like block C1, each sub-block can be further divided recursively, such as into horizontal AT(E0, E1) or vertical TT(F0, F1).
[0076] Meanwhile, BT, TT, and AT divisions can be used together for division. For example, sub-blocks divided by BT can be divided by TT or AT. Also, sub-blocks divided by TT can be divided by BT or AT. Sub-blocks divided by AT can be divided by BT or TT. For example, after horizontal BT division, each sub-block can be divided into vertical BT, or after vertical BT division, each sub-block can be divided into horizontal BT. In this case, the division order is different, but the final division form is the same.
[0077] Also, when a block is divided, the order of searching the block can be defined in various ways. Generally, searching from left to right and from top to bottom means the order of determining whether to divide an additional block for each divided sub-block, or the encoding order of each sub-block if the block is no longer divided, or the search order when a sub-block refers to information on other adjacent blocks.
[0078] Transforms can be performed for each processing unit (or transform block) divided according to the division structure shown in Figures 5a to 5d, and in particular, transformation matrices can be applied by dividing the processing unit into rows and columns. According to an embodiment of the present invention, different transform types are used depending on the length of the processing unit (or transform block) in the row or column direction.
[0079] Transforms are applied to residual blocks to decorrelate them as much as possible, concentrate coefficients in low frequencies, and create a zero tail at the beginning of the block. In JEM software, the transform part includes two main functions: core transform and secondary transform. Core transforms consist of the DCT (discrete cosine transform) and DST (discrete sine transform) family, which are applied to every row and column of the residual block. Secondary transforms can then be additionally applied to the top left corner of the core transform output. Similarly, inverse secondary transforms and inverse transforms of the core transform order can be applied. First, the secondary transform can be applied to the top left corner of the coefficient block. The core transform is then applied to the rows and columns of the secondary transform output. The core transform or inverse transform can also be referred to as the primary transform or inverse transform.
[0080] 6 and 7 show embodiments to which the present invention is applied. FIG. 6 shows a schematic block diagram of the transform and quantization unit (120 / 130) and the inverse quantization and inverse transform unit (140 / 150) in the encoding device 100 of FIG. 2, and FIG. 7 shows a schematic block diagram of the inverse quantization and inverse transform unit (220 / 230) in the decoding device 200.
[0081] 6, the transform and quantization unit (120 / 130) may include a primary transform unit 121, a secondary transform unit 122, and a quantization unit 130. The inverse quantization and inverse transform unit (140 / 150) may include an inverse quantization unit 140, an inverse secondary transform unit 151, and an inverse primary transform unit 152.
[0082] Looking carefully at FIG. 7, the inverse quantization and inverse transform unit (220 / 230) may include an inverse quantization unit 220, an inverse secondary transform unit 231, and an inverse primary transform unit 232.
[0083] In the present invention, when a transformation is performed, the transformation can be performed through multiple stages. For example, as shown in Figure 6, two stages of a primary transform and a secondary transform can be applied, or more transformation stages can be used depending on the algorithm. Here, the primary transform can be referred to as a core transform.
[0084] The linear transform unit 121 can apply a linear transform to the residual signal, where the linear transform can be pre-defined in a table from the encoder and / or decoder.
[0085] The secondary transform unit 122 can apply a secondary transform to the linearly transformed signal, where the secondary transform can be pre-defined in a table from the encoder and / or decoder.
[0086] In one embodiment, a non-separable secondary transform (NSST) may be conditionally applied as the secondary transform. For example, the NSST may be applied only to intra-predicted blocks, and each prediction mode group may have its own applicable transform set.
[0087] Here, the prediction mode group may be set based on the symmetry of the prediction direction. For example, since the prediction mode 52 and the prediction mode 16 are symmetric based on the prediction mode 34 (diagonal direction), they form one group and the same transform set may be applied. In this case, when applying the transform of the prediction mode 52, the input data is transposed before being applied, because the transform set is the same as that of the prediction mode 16.
[0088] On the other hand, for the planar mode and DC mode, there is no directional symmetry, so each mode has a transformation set, which can consist of two transformations, while for the remaining directional modes, each transformation set can consist of three transformations.
[0089] The quantization unit 130 can quantize the quadratic transformed signal.
[0090] The inverse quantization and inverse transformation unit (140 / 150) performs the process described above in reverse, and a duplicated description will be omitted.
[0091] FIG. 7 shows a schematic block diagram of the inverse quantization and inverse transform unit (220 / 230) in the decoding device 200.
[0092] Referring to FIG. 7, the inverse quantization and inverse transform unit (220 / 230) may include an inverse quantization unit 220, an inverse secondary transform unit 231, and an inverse primary transform unit 232.
[0093] The inverse quantization unit 220 obtains transform coefficients from the entropy decoded signal using the quantization step size information.
[0094] The inverse quadratic transform unit 231 performs an inverse quadratic transform on the transform coefficients. Here, the inverse quadratic transform refers to the inverse transform of the quadratic transform described with reference to FIG.
[0095] The inverse primary transform unit 232 performs an inverse primary transform on the inverse quadratic transformed signal (or block) to obtain a residual signal. Here, the inverse primary transform refers to the inverse transform of the primary transform described in FIG. 6.
[0096] In addition to the DCT-2 and 4x4 DST-4 applied in HEVC, the adaptive (or explicit) multiple transform (AMT or EMT) technique is used for residual coding of inter- and intra-encoded blocks. Besides the HEVC transforms, a number of selected transforms from other DCT / DST families are used. The newly introduced transform matrices from JEM are DST-7, DCT-8, DST-1, and DCT-5. Table 1 below shows the selected DST / DCT basis functions.
[0097] [Table 1]
[0098] EMT can be applied to CUs with width and height less than or equal to 64, and whether EMT is applied can be controlled by a CU-level flag. If the CU-level flag is 0, DCT-2 is applied to the CU to encode the residual. For intra-CU luma coding blocks to which EMT is applied, two additional flags are signaled to identify the horizontal and vertical transforms used. Like HEVC, the residuals of JEM blocks can be coded in transform skip mode. For intra-residual coding, a mode-dependent transform candidate selection process is used, depending on the residual statistics of other intra-prediction modes. Three transform subsets are defined as shown in Table 2 below, and the transform subset is selected based on the intra-prediction mode as shown in Table 3.
[0099] [Table 2]
[0100] With the subset concept, a subset of transforms is first identified based on Table 2 by using the intra prediction modes of CUs with CU-level EMT_CU_flag set to 1. Then, for each horizontal (EMT_TU_horizontal_flag) and vertical (EMT_TU_vertical_flag) transform, one of the two candidate transforms in the identified subset of transforms is selected based on explicit signaling using flags based on Table 3.
[0101] [Table 3]
[0102] [Table 4]
[0103] Table 4 shows a transform configuration group to which AMT (adaptive multiple transform) is applied as an embodiment to which the present invention is applied.
[0104] Looking carefully at Table 4, transform configuration groups are determined based on prediction modes, and there can be a total of six groups (G0 to G5). G0 to G4 correspond to cases where intra prediction is applied, and G5 indicates a combination (or transform set, or transform combination set) of transforms applied to a residual block generated by inter prediction.
[0105] A combination of transformations can be made by a horizontal transform (or row transform) applied to the rows of the 2D block and a vertical transform (or column transform) applied to the columns.
[0106] Here, each group of transform settings can have four candidate transform combinations, which can be selected or determined using transform combination indices 0 to 3, and the transform combination indices can be encoded and transmitted from the encoder to the decoder.
[0107] In one embodiment, residual data (or residual signals) obtained through intra prediction may have different statistical characteristics depending on the intra prediction mode. Therefore, a different transform may be applied to each intra prediction mode instead of a general cosine transform, as shown in Table 4. In this specification, the transform type may be represented as, for example, DCT-Type 2, DCT-II, or DCT-2.
[0108] A careful look at Table 4 reveals cases where 35 intra prediction modes are used and cases where 67 intra prediction modes are used. Multiple transform combinations can be applied to each transform setting group, which is divided into columns for each intra prediction mode. For example, multiple transform combinations can be configured with four combinations (row-direction transform, column-direction transform). For example, in group 0, DST-7 and DCT-5 can be applied to both the row (horizontal) and column (vertical) directions, resulting in a total of four possible combinations.
[0109] Since a total of four transform kernel combinations can be applied to each intra prediction mode, a transform combination index for selecting one of them can be transmitted for each transform unit. In this specification, the transform combination index can be referred to as an AMT index and can be represented by amt_idx.
[0110] In addition to the transform kernels listed in Table 4, there may be cases where DCT-2 is optimal for both row and column directions due to the characteristics of the residual signal. Therefore, by defining an AMT flag for each coding unit, transforms can be applied adaptively. Here, if the AMT flag is 0, DCT-2 is applied to both row and column directions, and if the AMT flag is 1, one of the four combinations can be selected or determined using the AMT index.
[0111] In one embodiment, when the AMT flag is 0, if the number of transform coefficients in one transform unit is less than 3, the transform kernel in Table 4 is not applied, and DST-7 can be applied in both the row and column directions.
[0112] In one embodiment, the values of the transform coefficients are parsed first, and if the number of transform coefficients is less than 3, the AMT index is not parsed and DST-7 is applied, thereby reducing the amount of additional information transmitted.
[0113] In one embodiment, AMT can be applied only if the width and height of the transform unit are both 32 or less.
[0114] In one embodiment, Table 4 can be established via off-line training.
[0115] In one embodiment, the AMT index may be defined as a single index that can simultaneously refer to a combination of horizontal and vertical transforms, or the AMT index may be defined as separate horizontal and vertical transform indexes.
[0116] FIG. 8 is a flowchart showing the process of performing AMT (adaptive multiple transform).
[0117] Although this specification primarily describes an embodiment of a separable transform in which transformations are applied separately in the horizontal and vertical directions, the combination of transformations can also be configured into a non-separable transform.
[0118] Alternatively, a combination of separable and non-separable transforms can be configured. In this case, if a non-separable transform is used, row / column or horizontal / vertical direction selection is not required, and the transform combinations in Table 4 can be used only when a separable transform is selected.
[0119] In addition, the method proposed in this specification can be applied regardless of whether it is a linear transform or a secondary transform. That is, there is no restriction that it must be applied to only one of the two, and it can be applied to both. Here, the linear transform may refer to a transform for initially transforming a residual block, and the secondary transform may refer to a transform for applying a transform to a block generated as a result of the linear transform.
[0120] First, the encoding device 100 may determine a transform group corresponding to the current block (S805). Here, the transform group may refer to the transform group in Table 4, but the present invention is not limited thereto and may be configured with other transform combinations.
[0121] The encoding device 100 may perform a transform on a combination of candidate transforms to be used in the transform group (S810). As a result of the transform execution, the encoding device 100 may determine or select a combination of transforms with the smallest rate distortion (RD) cost (S815). The encoding device 100 may encode an index of the transform combination corresponding to the selected transform combination (S820).
[0122] FIG. 9 is a flowchart showing the decoding process in which AMT is performed.
[0123] First, the decoding apparatus 200 may determine a transform group for a current block (S905). The decoding apparatus 200 may analyze a transform combination index, where the transform combination index may correspond to one of a plurality of transform combinations in the transform group (S910). The decoding apparatus 200 may derive a transform combination corresponding to the transform combination index (S915). Here, the transform combination may refer to the transform combinations described in Table 4, but the present invention is not limited thereto. That is, configurations using other transform combinations are also possible.
[0124] The decoding device 200 may perform an inverse transform on the current block based on the transform combination (S920). If the transform combination is composed of a row transform and a column transform, the row transform may be applied first, and then the column transform may be applied. However, the present invention is not limited thereto, and if the transform combination is composed of non-separable transforms, the non-separable transform may be applied directly.
[0125] Meanwhile, in another embodiment, the process of determining the transformation group and the process of analyzing the transformation combination index can be performed simultaneously.
[0126] According to an embodiment of the present invention, the aforementioned term "AMT" can be redefined as "MTS (multiple transform set or multiple transform selection)". The MTS-related syntax and semantics described below are defined in the versatile video coding (VVC) standard document JVET-K1001-v4.
[0127] In an embodiment of the present invention, two MTS candidates are used for the directional mode and four MTS candidates for the non-directional mode as follows:
[0128] A) Non-directional mode (DC, Planner)
[0129] When the MTS index is 0, DST-7 is used for the horizontal and vertical transforms.
[0130] When the MTS index is 1, the DST-7 is used for the vertical transform and the DCT-8 is used for the horizontal transform.
[0131] When the MTS index is 2, a DCT-8 is used for the vertical transform and a DST-7 is used for the horizontal transform.
[0132] When the MTS index is 3, DCT-8 is used for the horizontal and vertical transforms.
[0133] B) Modes belonging to the horizontal group mode
[0134] When the MTS index is 0, DST-7 is used for the horizontal and vertical transforms.
[0135] When the MTS index is 1, a DCT-8 is used for the vertical transform and a DST-7 is used for the horizontal transform.
[0136] C) Modes belonging to the vertical group mode
[0137] When the MTS index is 0, DST-7 is used for horizontal and vertical transformation.
[0138] When the MTS index is 1, the DST-7 is used for the vertical transform and the DCT-8 is used for the horizontal transform.
[0139] Here (in VTM 2.0, where 67 modes are used), the horizontal group modes include intra prediction modes 2 through 34, and the vertical modes include intra prediction modes 35 through 66.
[0140] In another embodiment of the present invention, three MTS candidates are used for all intra-prediction modes.
[0141] When the MTS index is 0, DST-7 is used for horizontal and vertical transformation.
[0142] When the MTS index is 1, the DST-7 is used for the vertical transform and the DCT-8 is used for the horizontal transform.
[0143] When the MTS index is 2, a DCT-8 is used for the vertical transform and a DST-7 is used for the horizontal transform.
[0144] In another embodiment of the present invention, two MTS candidates are used for directional prediction modes and three MTS candidates for non-directional prediction modes.
[0145] A) Non-directional mode (DC, Planner)
[0146] When the MTS index is 0, DST-7 is used for horizontal and vertical transformation.
[0147] When the MTS index is 1, DST-7 is used for the vertical transform and DCT-8 is used for the horizontal transform.
[0148] When the MTS index is 2, DCT-8 is used for the vertical transform and DST-7 is used for the horizontal transform.
[0149] B) Prediction mode corresponding to horizontal group mode
[0150] When the MTS index is 0, DST-7 is used for horizontal and vertical transformation.
[0151] When the MTS index is 1, DCT-8 is used for the vertical transform and DST-7 is used for the horizontal transform.
[0152] C) Prediction mode corresponding to vertical group mode
[0153] When the MTS index is 0, DST-7 is used for horizontal and vertical transformation.
[0154] When the MTS index is 1, DST-7 is used for the vertical transform and DCT-8 is used for the horizontal transform.
[0155] In another embodiment of the present invention, one MTS candidate (e.g., DST-7) is used for all intra modes. In this case, encoding time can be reduced by up to 40% with minor coding loss. Furthermore, one flag is used to indicate between DCT-2 and DST-7.
[0156] FIG. 10 is a flowchart illustrating an MTS-based inverse transformation process according to an embodiment of the present invention.
[0157] The decoding device 200 to which the present invention is applied may acquire sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag (S1005). Here, sps_mts_intra_enabled_flag indicates whether cu_mts_flag is present in the residual coding syntax of the intra-coding unit. For example, if sps_mts_intra_enabled_flag = 0, cu_mts_flag is not present in the residual coding syntax of the intra-coding unit. If sps_mts_intra_enabled_flag = 1, cu_mts_flag is present in the residual coding syntax of the intra-coding unit. And, sps_mts_inter_enabled_flag indicates whether cu_mts_flag is present in the residual coding syntax of the inter-coding unit. For example, if sps_mts_inter_enabled_flag=0, cu_mts_flag is not present in the residual coding syntax of the inter coding unit, and if sps_mts_inter_enabled_flag=1, cu_mts_flag is present in the residual coding syntax of the inter coding unit.
[0158] The decoding apparatus 200 may acquire cu_mts_flag based on sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag (S1010). For example, when sps_mts_intra_enabled_flag = 1 or sps_mts_inter_enabled_flag = 1, the decoding apparatus 200 may acquire cu_mts_flag. Here, cu_mts_flag indicates whether MTS is applied to residual samples of a luma transform block. For example, when cu_mts_flag = 0, MTS is not applied to residual samples of a luma transform block, and when cu_mts_flag = 1, MTS is applied to residual samples of a luma transform block.
[0159] The decoding apparatus 200 may acquire mts_idx based on cu_mts_flag (S1015). For example, when cu_mts_flag = 1, the decoding apparatus 200 may acquire mts_idx, where mts_idx indicates which transform kernel is applied to the luma residual samples along the horizontal and / or vertical directions of the current transform block.
[0160] For example, for mts_idx, at least one of the embodiments described herein can be applied.
[0161] The decoding apparatus 200 may derive a transform kernel corresponding to mts_idx (S1020). For example, the transform kernel corresponding to mts_idx may be defined as a horizontal transform and a vertical transform.
[0162] For example, if MTS is applied to the current block (i.e., cu_mts_flag = 1), the decoding apparatus 200 may configure MTS candidates based on the intra prediction mode of the current block. In this case, the decoding flowchart of Figure 10 may further include a step of configuring MTS candidates. Then, the decoding apparatus 200 may determine an MTS candidate to be applied to the current block from the configured MTS candidates using mts_idx.
[0163] As another example, different transform kernels may be applied to the horizontal transform and the vertical transform, although the present invention is not limited thereto and the same transform kernel may be applied to the horizontal transform and the vertical transform.
[0164] Then, the decoding device 200 can perform an inverse transform based on the transform kernel (S1025).
[0165] In addition, in this document, MTS can also be expressed as AMT or EMT, and similarly, it can be expressed as mts_idx, AMT_idx, EMT_idx, AMT_TU_idx, EMT_TU_idx, etc., but the present invention is not limited to such expressions.
[0166] FIG. 11 is a block diagram of an apparatus for performing MTS-based decoding according to an embodiment of the present invention.
[0167] The decoding device 200 to which the present invention is applied may include a sequence parameter acquisition unit 1105 , an MTS flag acquisition unit 1110 , an MTS index acquisition unit 1115 , and a transformation kernel derivation unit 1120 .
[0168] The sequence parameter acquisition unit 1105 may acquire sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag. Here, sps_mts_intra_enabled_flag indicates whether cu_mts_flag is present in the residual coding syntax of an intra coding unit, and sps_mts_inter_enabled_flag indicates whether cu_mts_flag is present in the residual coding syntax of an inter coding unit. For a specific example, the description related to FIG. 10 may be applied.
[0169] The MTS flag acquirer 1110 may acquire cu_mts_flag based on sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag. For example, when sps_mts_intra_enabled_flag = 1 or sps_mts_inter_enabled_flag = 1, the MTS flag acquirer 1110 may acquire cu_mts_flag. Here, cu_mts_flag indicates whether MTS is applied to residual samples of a luma transform block. For a specific example, the description related to FIG. 10 may be applied.
[0170] The MTS index obtainer 1115 may obtain mts_idx based on cu_mts_flag. For example, when cu_mts_flag = 1, the MTS index obtainer 1115 may obtain mts_idx. Here, mts_idx indicates which transform kernel is applied to luma residual samples along the horizontal and / or vertical directions of the current transform block. For a specific example, the description of FIG. 10 may be applied.
[0171] The transform kernel deriving unit 1120 can derive a transform kernel corresponding to mts_idx, and the decoding device 200 can perform an inverse transform based on the derive transform kernel.
[0172] A mode-dependent non-separable secondary transform (MDNSST) is introduced. To maintain low complexity, MDNSST is applied only to low-frequency coefficients after the primary transform. A non-separable transform applied primarily to low-frequency coefficients can also be called a low-frequency non-separable transform (LFNST). If the width (W) and height (H) of a transform coefficient block are both equal to or greater than 8, an 8x8 non-separable secondary transform is applied to the upper-left 8x8 region of the transform coefficient block. Otherwise, if the width or height is less than 8, a 4x4 non-separable secondary transform is applied. The 4x4 non-separable secondary transform can be performed on the upper-left min(8,W) x min(8,H) region of the transform coefficient block. Here, min(A,B) is a function that outputs the smaller of A and B. WxH is the block size, W is the width, and H is the height.
[0173] The RT applied to the upper left 8x8 block of a block of transform coefficients to which a primary transform has been applied may be referred to as an 8x8 RST. In Equation 3, when the value of R is set to 16, the forward 8x8 RST has a 16x64 matrix form, and the inverse 8x8 RST has a 64x16 form. The configuration of the transform set shown in Table 5 may also be applied to the 8x8 RST. That is, as shown in Table 5, the 8x8 RST may be determined based on a transform set corresponding to the intra prediction mode. Since one transform set consists of two or three transforms depending on the intra prediction mode, any one of up to four transforms may be selected, including cases where no secondary transform is applied (one transform may correspond to an identity matrix). When the four transforms are assigned indices of 0, 1, 2, and 3, respectively, the transform to be applied may be specified by signaling a syntax element corresponding to the NSST index for each block of transform coefficients. For example, the 0th index can be assigned to the identity matrix, i.e., when no quadratic transformation is applied. In conclusion, for an 8x8 top-left block via the NSST index, an 8x8 NSST can be specified according to the JEM NSST, and an 8x8 RST can be specified according to the RST configuration.
[0174] [Table 5]
[0175] An NSST index (NSST idx) may be coded to indicate a transform kernel within a transform set. If NSST is not applied, an NSST index with a value of 0 may be signaled.
[0176] 12 and 13 are encoding / decoding flowcharts in which a secondary transform is applied as an embodiment to which the present invention is applied.
[0177] In JEM, the secondary transform (MDNSST) is not applied to blocks coded in transform skip mode. If the MDNSST index is signaled for a CU and is non-zero, MDNSST is not used for blocks of components coded in transform skip mode within the CU. The overall coding structure, including coefficient encoding and NSST index coding, is shown in Figures 12 and 13. A coded block flag (CBF) is encoded to determine whether to perform coefficient encoding or NSST coding. In Figures 12 and 13, the CBF flag can indicate a luma block cbf flag (cbf_luma flag) or a chroma block cbf flag (cbf_cb flag or cbf_cr flag). Transform coefficients are coded when the CBF flag is 1.
[0178] Referring to FIG. 12, the encoding apparatus 100 checks whether the CBF is 1 (S1205). If the CBF is 0, the encoding apparatus 100 does not encode the transform coefficients or the NSST indexes. If the CBF is 1, the encoding apparatus 100 encodes the transform coefficients (S1210). Thereafter, the encoding apparatus 100 determines whether to perform NSST index coding (S1215) and performs NSST index coding (S1220). If NSST index coding is not applied, the encoding apparatus 100 may end the transform procedure in a state where NSST is not applied and perform subsequent steps (e.g., quantization).
[0179] 13, the decoding apparatus 200 checks whether the CBF is 1 (S1305). If the CBF is 0, the decoding apparatus 200 does not perform transform coefficient decoding or NSST index decoding. If the CBF is 1, the decoding apparatus 200 performs transform coefficient decoding (S1310). Thereafter, the decoding apparatus 200 determines whether to perform NSST index coding (S1315) and analyzes the NSST index (S1320).
[0180] NSST is not applied to the entire block (TU in the case of HEVC) to which the primary transform has been applied, but can be applied to the upper left 8x8 region or 4x4 region. For example, if the block size is 8x8 or greater, 8x8 NSST can be applied, and if the block size is less than 8x8, 4x4 NSST can be applied. Also, if 8x8 NSST is applied, 4x4 NSST can be applied to each 4x4 block. Both 8x8 NSST and 4x4 NSST can be determined according to the configuration of the transform set described above. As they are non-separable transforms, 8x8 NSST has 64 input data and 64 output data, while 4x4 NSST has 16 inputs and 16 outputs.
[0181] 14 and 15 are embodiments to which the present invention is applied. FIG. 14 illustrates a diagram for explaining Givens rotation, and FIG. 15 illustrates the configuration of one round in a 4x4 NSST consisting of a Givens rotation layer and permutation.
[0182] Both the 8x8 NSST and the 4x4 NSST can be constructed by a hierarchical combination of Givens rotations. The matrix corresponding to one Givens rotation is the same as Equation 1, and the matrix multiplication can be represented graphically as Figure 14.
[0183]
number
[0184] In Figure 14, the output t m and t n can be calculated as in mathematical formula 2.
[0185]
number
[0186] As shown in Figure 14, one Givens rotation rotates two data points, so 32 or 8 Givens rotations are required to process 64 data points (for 8x8 NSST) or 16 data points (for 4x4 NSST), respectively. Therefore, a bundle of 32 or 8 Givens rotations can form a Givens rotation layer. As shown in Figure 15, the output data of one Givens rotation layer is shuffled and then transmitted to the input data of the next Givens rotation layer. As shown in Figure 15, the permutation pattern is regularly defined. In the case of 4x4 NSST, four Givens rotation layers and corresponding permutations form one round. 4x4 NSST is performed in two rounds, while 8x8 NSST is performed in four rounds. Different rounds use the same permutation pattern but apply different Givens rotation angles. Therefore, it is necessary to store the angle data of all Givens rotations that make up each transformation.
[0187] In the final stage, a final permutation is performed on the data output through the Givens rotation layer, and the permutation information is stored separately for each transformation. This permutation is performed at the end of the forward NSST, and the inverse permutation is applied first to the inverse NSST.
[0188] The reverse NSST rotates the Givens rotation layers and permutations applied in the forward NSST in the reverse order, and also takes a negative (-) value for each Givens rotation angle.
[0189] RST(Reduced secondary transform)
[0190] FIG. 16 shows the operation of RST as an embodiment to which the present invention is applied.
[0191] Assuming that an orthogonal matrix representing a single transform has a form of NxN, the RT (reduced transform) leaves only R out of N transform basis vectors (R < N). The matrix of the forward RT for generating transform coefficients can be defined as in Mathematical Expression 3.
[0192]
Equation
[0193] Since the matrix of the reverse RT is the transpose matrix of the forward RT matrix, if the application of the forward RT and the reverse RT is illustrated, it can be the same as FIGS. 14a and 14b.
[0194] The RT applied to the upper left 8x8 block of a block of transform coefficients to which a primary transform has been applied may be referred to as an 8x8 RST. In Equation 3, when the value of R is set to 16, the forward 8x8 RST has a 16x64 matrix form, and the inverse 8x8 RST has a 64x16 form. The configuration of the transform set shown in Table 5 may also be applied to the 8x8 RST. That is, as shown in Table 5, the 8x8 RST may be determined based on a transform set corresponding to the intra prediction mode. Since one transform set consists of two or three transforms depending on the intra prediction mode, any one of up to four transforms may be selected, including cases where no secondary transform is applied (one transform may correspond to an identity matrix). When the four transforms are assigned indices of 0, 1, 2, and 3, respectively, the transform to be applied may be specified by signaling a syntax element corresponding to the NSST index for each block of transform coefficients. For example, the 0th index can be assigned to the identity matrix, i.e., when no quadratic transformation is applied. In conclusion, for an 8x8 top-left block via the NSST index, an 8x8 NSST can be specified according to the JEM NSST, and an 8x8 RST can be specified according to the RST configuration.
[0195] FIG. 17 is a diagram illustrating a process of performing a backward scan from the 64th to the 17th blocks based on the backward scan order, as an embodiment to which the present invention is applied.
[0196] When the forward 8x8 RST as shown in Equation 3 is applied, 16 valid transform coefficients are generated, so 64 input data constituting an 8x8 area is reduced to 16 output data, and from the perspective of a two-dimensional area, only about 1 / 4 of the area is filled with valid transform coefficients. Therefore, by applying the forward 8x8 RST, the 16 output data obtained are filled in the area at the top left of Figure 17.
[0197] In Figure 17, the 4x4 region at the top left is the ROI (region of interest) region filled with valid transform coefficients, and the remaining regions are empty. The empty regions may be filled with a value of 0 by default. If valid non-zero transform coefficients are found outside the ROI region of Figure 17, it is certain that the 8x8 RST is not applied, and therefore the coding of the corresponding NSST index may be omitted. Conversely, if no non-zero transform coefficients are found outside the ROI region of Figure 17 (when the 8x8 RST is applied, and the region outside the ROI is filled with 0), the 8x8 RST may have been applied, and therefore the NSST index may be coded. Such conditional NSST index coding may be performed after the residual coding process, since it is necessary to check for the presence of non-zero transform coefficients.
[0198] FIG. 18 shows an example of an encoding flowchart using a single transform indicator as an embodiment to which the present invention is applied.
[0199] In an embodiment of the present invention, a single transform indicator (STI) is introduced. Instead of sequentially using two transforms (a primary transform and a secondary transform), a single transform can be applied when the single transform indicator is activated (STI coding == 1). Here, the single transform can be any type of transform. For example, the single transform can be a separable transform or a non-separable transform. The single transform can be a transform approximated from a non-separable transform. A single transform index (ST_idx in FIG. 18) can be signaled when the single transform indicator is activated. Here, the single transform index can indicate a transform to be applied from available transform candidates.
[0200] Referring to FIG. 18, the encoding apparatus 100 determines whether CBF is 1 (S1805). If CBF is 1, the encoding apparatus 100 determines whether STI coding is applied (S1810). If STI coding is applied, the encoding apparatus 100 encodes an STI index (STI_Idx) (S1845) and performs coding of transform coefficients (S1850). If STI coding is not applied, the encoding apparatus 100 encodes a flag (EMT_CU_Flag) indicating whether EMT (or MTS) is applied at the CU level (S1815). Thereafter, the encoding apparatus 100 performs coding of transform coefficients (S1820). Thereafter, the encoding apparatus 100 determines whether EMT is applied to a transform unit (TU) (S1825). If EMT is applied to the TU, the encoding apparatus 100 encodes an index (EMT_TU Idx) of the primary transform applied to the TU (S1830). Thereafter, the encoding apparatus 100 determines whether an NSST is applied (S1835). If an NSST is applied, the encoding apparatus 100 encodes an index (NSST_Idx) indicating the NSST to be applied (S1840).
[0201] In one example, when the single transform coding condition is satisfied / activated (e.g., STI_coding == 1), the single transform index (ST_Idx) is not signaled but can be implicitly derived. ST_idx can be implicitly determined based on the block size and intra prediction mode. Here, ST_idx can indicate the transform (or transform kernel) to be applied to the current transform block.
[0202] A single transformation indicator can be activated (STI_coding == 1) if one or more of the following conditions are met:
[0203] The block size corresponds to a predetermined value, such as 4 or 8.
[0204] Block width == Block height (square block)
[0205] The intra prediction mode is one of the predetermined modes such as DC or Planar.
[0206] In another example, the STI coding flag may be signaled to indicate whether a single transform is applied. The STI coding flag may be signaled based on the STI coding value and CBF. For example, the STI coding flag may be signaled when the CBF is 1 and STI coding is activated. Furthermore, the STI coding flag may be conditionally signaled taking into account the block size, block shape (square block or non-square block), or intra prediction mode.
[0207] Since the acquired information is used during coefficient coding, ST_idx can be determined after coefficient coding. In one example, ST_idx can be implicitly determined based on the block size, intra prediction mode, and the number of non-zero coefficients. In another example, ST_idx can be conditionally encoded / decoded based on the block size and / or block shape and / or intra prediction mode, and / or the number of non-zero coefficients. In another example, ST_idx signaling can be omitted depending on the distribution of non-zero coefficients (i.e., the locations of non-zero coefficients). In particular, if a non-zero coefficient is found in an area other than the upper left 4x4 area, ST_idx signaling can be omitted.
[0208] FIG. 19 shows an example of an encoding flowchart using a unified transform indicator (UTI) as an embodiment to which the present invention is applied.
[0209] In the embodiment of the present invention, a unified conversion indicator is introduced, which includes a primary conversion indicator and a secondary conversion indicator.
[0210] Referring to FIG. 19, the encoding apparatus 100 determines whether CBF is 1 (S1905). If CBF is 1, the encoding apparatus 100 determines whether UTI coding is applied (S1910). If UTI coding is applied, the encoding apparatus 100 encodes a UTI index (UTI_Idx) (S1945) and performs coding of transform coefficients (S1950). If UTI coding is not applied, the encoding apparatus 100 encodes a flag (EMT_CU_Flag) indicating whether EMT (or MTS) is applied at the CU level (S1915). Thereafter, the encoding apparatus 100 encodes the transform coefficients (S1920). Thereafter, the encoding apparatus 100 determines whether EMT is applied to a transform unit (TU) (S1925). If EMT is applied to the TU, encoding apparatus 100 encodes an index (EMT_TU Idx) of the primary transform applied to the TU (S1930). Then, encoding apparatus 100 determines whether NSST is applied (S1935). If NSST is applied, encoding apparatus 100 encodes an index (NSST_Idx) indicating the NSST to be applied (S1940).
[0211] The UTI can be encoded for each predetermined unit (CTU or CU).
[0212] The UTI coding mode may depend on the following conditions:
[0213] Block size
[0214] Block Shape
[0215] Intra Prediction Mode
[0216] How to derive / extract the core transform index from the UTI is predefined. How to derive / extract the secondary transform index from the UTI is predefined.
[0217] The syntax structure of the UTI is selectively used. The UTI may depend on the CU (or TU) size. For example, a smaller CU (TU) may have a relatively narrow range of UTI indices. In one example, if a predefined condition is met (e.g., the block size is smaller than a predefined threshold), the UTI may point to only the core transform index.
[0218] [Table 6]
[0219] In another example, if a secondary transform is not indicated to be used (e.g., if the secondary transform index == 0 or the secondary transform has already been determined), the UTI index can be treated as a core transform index. Similarly, if the core transform index is known, the UTI index can be treated as a secondary transform index. In particular, a predetermined core transform can be used, taking into account the intra prediction mode and block size.
[0220] 20a and 20b show another example of an encoding flowchart using UTI as an embodiment to which the present invention is applied.
[0221] In another example, the transform encoding structure uses UTI index coding as shown in Figures 20a and 20b, where the UTI index can be encoded before or after the coefficient encoding.
[0222] Referring to FIG. 20A, the encoding apparatus 100 checks whether the CBF is 1 (S2005). If the CBF is 1, the encoding apparatus 100 codes the UTI index (UTI_Idx) (S2010) and performs coding of the transform coefficients (S2015).
[0223] Referring to FIG. 20b, the encoding apparatus 100 checks whether the CBF is 1 (S2055). If the CBF is 1, the encoding apparatus 100 performs coding of the transform coefficients (S2060) and codes the UTI index (UTI_Idx) (S2065).
[0224] In another embodiment of the present invention, data hiding and implicit coding methods of transform indicators are introduced. Here, the transform indicator includes ST_idx, UTI_idx, EMT_CU_Flag, EMT_TU_Flag, NSST_idx, and a transform-related index used to indicate a transform kernel. The above-mentioned transform indicators are not signaled, and the information can be inserted into the coefficient encoding process (can be extracted during the coefficient coding process). The coefficient encoding process can include the following parts:
[0225] - Last x position (Last_position_x), Last y position (Last_position_y)
[0226] - Group flag
[0227] - Significance map
[0228] - Flag indicating whether it is greater than 1 (Greater_than_1_flag)
[0229] - Flag indicating whether it is greater than 2 (Greater_than_2_flag)
[0230] - Remaining level coding
[0231] - Sign coding
[0232] For example, the transformation indicator information can be inserted into one or more of the coefficient coding processes described above. The following can be considered together for inserting the transformation indicator information:
[0233] - Pattern of Sign coding
[0234] - The absolute value of the remaining level
[0235] The number of flags indicating whether they are greater than -1 (Greater_than_1_flag)
[0236] - The value of Last_position_X and Last_position_Y
[0237] The aforementioned data hiding methods can be considered conditional. For example, the data hiding method can depend on the number of non-zero coefficients.
[0238] In yet another example, NSST_idx and EMT_idx can be dependent. For example, when EMT_CU_flag is 0 (or 1), NSST_idx may not be 0. In this case, NSST_idx-1 can be signaled instead of NSST_idx.
[0239] In another embodiment of the present invention, mapping of NSST transform sets based on intra prediction modes is presented as shown in Table 7 below. As mentioned above, the following description will focus on NSST as an example of a non-separable transform, but other known terms for non-separable transforms (e.g., LFNST) may also be used. For example, NSST set and NSST index are used interchangeably with LFNST set and LFNST index. Furthermore, RST described in this document is used interchangeably with RST or LFNST as an example of a non-separable transform (e.g., LFNST) that uses a non-square transform matrix having a reduced input length and / or a reduced output length with a square non-separable transform matrix applied to at least a portion of a transform block (the remaining region excluding the upper-left 4x4 or 8x8 region or the lower-right 4x4 region of an 8x8 block).
[0240] [Table 7]
[0241] The NSST set number can be rearranged between 0 and 3 as shown in Table 8.
[0242] [Table 8]
[0243] In the NSST transformation set, four transformation sets are used (instead of 35) to reduce the memory space required.
[0244] Furthermore, for each transformation set, a different number of transformation kernels are used as follows:
[0245] Case A: Two available transform kernels are used for each transform set, and the NSST index ranges from 0 to 2. For example, if the NSST index is 0, a secondary transform (a secondary inverse transform based on the decoder) may not be applied. If the NSST index is 1 or 2, a secondary transform may be applied. A transform set may include two transform kernels, and an index of 1 or 2 may be mapped to the two transform kernels.
[0246] [Table 9]
[0247] Referring to Table 9, two transform kernels are used for each of the 0th to 3rd non-separable transform (NSST or LFNST) sets.
[0248] Case B: Use two available transformation kernels for transformation set 0, and one for each of the remaining transformation sets. The available NSST indices for transformation set 0 (DC, Planner) are 0 to 2. However, the NSST indices for other modes (transform sets 1, 2, and 3) are 0 to 1.
[0249] [Table 10]
[0250] Referring to Table 10, two non-separable transform kernels are set for the non-separable transform (NSST) set corresponding to index 0, and one non-separable transform kernel is set for each of the non-separable transform (NSST) sets corresponding to indexes 1, 2, and 3.
[0251] Case C: One transform kernel is used for each transform set, and the NSST index ranges from 0 to 1.
[0252] [Table 11]
[0253] FIG. 21 shows an example of an encoding flowchart for performing conversion as an embodiment to which the present invention is applied.
[0254] The encoding apparatus 100 performs a primary transform on the residual block (S2105). The primary transform may be referred to as a core transform. In an embodiment, the encoding apparatus 100 may perform the primary transform using the MTS. The encoding apparatus 100 may also transmit an MTS index indicating a specific MTS from among MTS candidates to the decoding apparatus 200. In this case, the MTS candidate may be configured based on the intra prediction mode of the current block.
[0255] The encoding apparatus 100 determines whether to apply a secondary transform (S2110). For example, the encoding apparatus 100 may determine whether to apply a secondary transform based on the linearly transformed residual transform coefficients. For example, the secondary transform may be NSST or RST.
[0256] The encoding apparatus 100 determines the secondary transform (S2115). At this time, the encoding apparatus 100 can determine the secondary transform based on the NSST (or RST) transform set specified according to the intra prediction mode.
[0257] Also, for example, prior to operation S2115, the encoding apparatus 100 may determine an area to which the secondary transformation is applied based on the size of the current block.
[0258] The encoding apparatus 100 performs the secondary transformation using the secondary transformation determined in step S2115 (S2120).
[0259] FIG. 22 shows an example of a decoding flowchart for performing conversion as an embodiment to which the present invention is applied.
[0260] The decoding device 200 determines whether to apply a secondary inverse transform (S2205). For example, the secondary inverse transform may be an NSST or an RST. As an example, the decoding device 200 may determine whether to apply a secondary inverse transform based on a secondary transform flag received from the encoding device 100.
[0261] The decoding apparatus 200 determines a secondary inverse transform (S2210). At this time, the decoding apparatus 200 may determine a secondary inverse transform to be applied to the current block based on the NSST (or RST) transform set designated according to the above-described intra prediction mode.
[0262] Also, for example, prior to operation S2210, the decoding apparatus 200 may determine an area to which the secondary inverse transform is applied based on the size of the current block.
[0263] The decoding apparatus 200 performs a secondary inverse transform on the dequantized residual block using the secondary inverse transform determined in step S2210 (S2215).
[0264] The decoding apparatus 200 performs a primary inverse transform on the secondary inverse transformed residual block (S2220). The primary inverse transform may be referred to as a core inverse transform. In one embodiment, the decoding apparatus 200 may perform the primary inverse transform using the MTS described above. Also, as an example, the decoding apparatus 200 may determine whether MTS is applied to the current block prior to step S2220. In this case, the decoding flowchart of FIG. 22 may further include a step of determining whether MTS is applied.
[0265] For example, when MTS is applied to the current block (i.e., cu_mts_flag = 1), the decoding apparatus 200 may configure MTS candidates based on the intra prediction mode of the current block. In this case, the decoding flowchart of Figure 22 may further include a step of configuring MTS candidates. Then, the decoding apparatus 200 may determine a linear inverse transform to be applied to the current block using mts_idx indicating a specific MTS among the configured MTS candidates.
[0266] FIG. 23 shows an example of a detailed block diagram of the conversion unit 120 in the encoding device 100 as an embodiment to which the present invention is applied.
[0267] The encoding device 100 to which the embodiment of the present invention is applied may include a primary transform unit 2310, a secondary transform application determining unit 2320, a secondary transform determining unit 2330, and a secondary transform unit 2340.
[0268] The primary transform unit 2310 may perform a primary transform on the residual block. The primary transform may be referred to as a core transform. In an embodiment, the primary transform unit 2310 may perform the primary transform using the MTS. The primary transform unit 2310 may also transmit an MTS index indicating a specific MTS from among MTS candidates to the decoding apparatus 200. In this case, the MTS candidates may be configured based on the intra prediction mode of the current block.
[0269] The secondary transform application determining unit 2320 may determine whether to apply a secondary transform. For example, the secondary transform application determining unit 2320 may determine whether to apply a secondary transform based on transform coefficients of the primary transformed residual block. For example, the secondary transform may be NSST or RST.
[0270] The secondary transform determination unit 2330 determines the secondary transform. In this case, as described above, the secondary transform determination unit 2330 may determine the secondary transform based on the NSST (or RST) transform set specified according to the intra prediction mode.
[0271] Also, for example, the secondary transformation determination unit 2330 may determine the area to which the secondary transformation is applied based on the size of the current block.
[0272] The secondary transform unit 2340 can perform the secondary transform using the determined secondary transform.
[0273] FIG. 24 shows an example of a detailed block diagram of the inverse transform unit 230 in the decoding device 200 as an embodiment to which the present invention is applied.
[0274] The decoding device 200 to which the present invention is applied includes a secondary inverse transform application determining unit 2410, a secondary inverse transform determining unit 2420, a secondary inverse transform unit 2430, and a primary inverse transform unit 2440.
[0275] The secondary inverse transform application determining unit 2410 may determine whether to apply a secondary inverse transform. For example, the secondary inverse transform may be NSST or RST. As one example, the secondary inverse transform application determining unit 2410 may determine whether to apply a secondary inverse transform based on a secondary transform flag received from the encoding apparatus 100. As another example, the secondary inverse transform application determining unit 2410 may determine whether to apply a secondary inverse transform based on transform coefficients of a residual block.
[0276] The secondary inverse transform determination unit 2420 may determine a secondary inverse transform to be applied to the current block based on an NSST (or RST) transform set designated according to the intra prediction mode.
[0277] Also, for example, the secondary inverse transform determination unit 2420 may determine an area to which the secondary inverse transform is applied based on the size of the current block.
[0278] Also, as an example, the secondary inverse transform unit 2430 may perform a secondary inverse transform on the dequantized residual block using the determined secondary inverse transform.
[0279] The primary inverse transform unit 2440 may perform a primary inverse transform on the secondary inverse transformed residual block. As an embodiment, the primary inverse transform unit 2440 may perform a primary transform using the MTS described above. As another example, the primary inverse transform unit 2440 may determine whether MTS is applied to the current block.
[0280] For example, if an MTS is applied to the current block (i.e., cu_mts_flag = 1), the primary inverse transform unit 2440 may configure MTS candidates based on the intra prediction mode of the current block. Then, the primary inverse transform unit 2440 may determine a primary transform to be applied to the current block using mts_idx, which indicates a specific MTS from among the configured MTS candidates.
[0281] 25 shows a flowchart for processing a video signal as an embodiment to which the present invention is applied. The flowchart in FIG. 25 can be executed by the decoding device 200 or the inverse transform unit 230.
[0282] First, the decoding device 200 may determine whether to apply an inverse non-separable transform of the current block based on the non-separable transform index and the width and height of the current block. For example, the decoding device 200 may determine to apply the non-separable transform if the non-separable transform index is not 0 and the width and height of the current block are each equal to or greater than 4. If the non-separable transform index is 0 or the width or height of the current block is less than 4, the decoding device 200 may omit the inverse non-separable transform and perform an inverse linear transform.
[0283] In operation S2505, the decoding apparatus 200 determines a non-separable transform set index indicating a non-separable transform set to be used for non-separable transform of the current block from among predefined non-separable transform sets based on the intra prediction mode of the current block. The non-separable transform set index may be set to be assigned to each of four transform sets set according to the range of the intra prediction mode, as shown in Table 7 or Table 8. That is, as shown in Table 7 or Table 8, if the intra prediction mode is 0 to 1, the non-separable transform set index may be determined to be a first index value; if the intra prediction mode is 2 to 12 or 56 to 66, the non-separable transform set index may be determined to be a second index value; if the intra prediction mode is 13 to 23 or 45 to 55, the non-separable transform set index may be determined to be a third index value; and if the intra prediction mode is 24 to 44, the non-separable transform set index may be determined to be a fourth index value.
[0284] Here, each of the predefined non-separable transform sets can include two transform kernels, as shown in Table 9. Alternatively, each of the predefined non-separable transform sets can include one or two transform kernels, as shown in Table 10 or Table 11.
[0285] In operation S2510, the decoding apparatus 200 determines a transform kernel indicated by the non-separable transform index of the current block from among the transform kernels included in the non-separable transform set indicated by the non-separable transform set index, using a non-separable transform matrix. For example, two non-separable transform kernels may be set for each index value of the non-separable transform set index, and the decoding apparatus 200 may determine a non-separable transform matrix from among the two transform matrix kernels corresponding to the non-separable transform set index, based on the transform kernel indicated by the non-separable transform index.
[0286] In operation S2515, the decoding apparatus 200 applies a non-separable transform matrix to an upper left region of the current block, which is determined according to the width and height of the current block. For example, if both the width and height of the current block are equal to or greater than 8, a non-separable transform is applied to an 8x8 region at the upper left of the current block. If the width or height of the current block is less than 8, a non-separable transform may be applied to a 4x4 region of the current block. The size of the non-separable transform may also be set to 8x8 or 4x4 depending on the region to which the non-separable transform is applied.
[0287] In addition, the decoding apparatus 200 may apply horizontal and vertical transforms to the current block to which the non-separable transform has been applied, where the horizontal and vertical transforms may be determined based on a prediction mode applied to the current block and an MTS index for selecting a transform matrix.
[0288] 26 shows an example of a block diagram of an apparatus for processing a video signal as an embodiment to which the present invention is applied. The video signal processing apparatus of FIG. 26 may correspond to the encoding apparatus of FIG. 1 or the decoding apparatus of FIG. 2.
[0289] The image processing device 2600 for processing an image signal includes a memory 2620 for storing an image signal, and a processor 2610 coupled to the memory for processing the image signal.
[0290] The processor 2610 according to an embodiment of the present invention may be configured with at least one processing circuit for processing a video signal, and may process the video signal by executing a command for encoding or decoding the video signal. That is, the processor 2610 may encode original video data or decode an encoded video signal by executing the encoding or decoding method described above.
[0291] Furthermore, a processing method according to the present invention can be produced in the form of a computer-executable program and stored in a computer-readable storage medium. Multimedia data having a data structure according to the present invention can also be stored in a computer-readable storage medium. The computer-readable storage medium includes any type of storage device or distributed storage device in which computer-readable data is stored. The computer-readable storage 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. The computer-readable storage medium can also include media realized in the form of a carrier wave (e.g., transmission over the Internet). The bitstream generated by the encoding method can be stored in a computer-readable storage medium or transmitted via a wired or wireless communication network.
[0292] Furthermore, embodiments of the present invention may be realized as a computer program product with program code, which may be executed on a computer according to embodiments of the present invention. The program code may be stored on a computer-readable carrier.
[0293] As described above, the embodiments described in the present invention may be implemented and executed on a processor, microprocessor, controller, or chip. For example, the functional units shown in each figure may be implemented and executed on a computer, processor, microprocessor, controller, or chip.
[0294] In addition, the decoder and encoder to which the present invention is applied may be included in real-time communication devices such as multimedia broadcasting transmitting / receiving devices, mobile communication terminals, home cinema video devices, digital cinema video devices, surveillance cameras, video interaction devices, video communications, etc., mobile streaming devices, storage media, camcorders, video-on-demand (VoD) service providing devices, over-the-top (OTT) video devices, internet streaming service providing devices, three-dimensional (3D) video devices, video phones, video devices, medical video devices, etc., and are used to process video signals or data signals. For example, over-the-top (OTT) video devices may include game consoles, Blu-ray players, internet-connected TVs, home theater systems, smartphones, tablet PCs, digital video recorders (DVRs), etc.
[0295] Furthermore, a processing method according to the present invention can be produced in the form of a computer-executable program and stored in a computer-readable storage medium. Multimedia data having a data structure according to the present invention can also be stored in a computer-readable storage medium. The computer-readable storage medium includes any type of storage device or distributed storage device in which computer-readable data is stored. The computer-readable storage 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. The computer-readable storage medium can also include media realized in the form of a carrier wave (e.g., transmission over the Internet). The bitstream generated by the encoding method can be stored in a computer-readable storage medium or transmitted via a wired or wireless communication network.
[0296] Furthermore, embodiments of the present invention may be realized as a computer program product with program code, which may be executed on a computer according to embodiments of the present invention. The program code may be stored on a computer-readable carrier.
[0297] The above-described embodiments are combinations of elements and features of the present invention in a predetermined form. Each element or feature should be considered optional unless otherwise explicitly stated. Each element or feature may be implemented without being combined with other elements or features. It is also possible to combine some elements and / or features to form an embodiment of the present invention. The order of operations described in the embodiments of the present invention may be changed. Some elements or features of any embodiment may be included in other embodiments, or may be substituted with corresponding elements or features of other embodiments. It is obvious that claims that do not have an explicit reference relationship in the claims may be combined to form an embodiment, or may be included as new claims by amendment after filing.
[0298] Embodiments of the present invention may be implemented by various means, such as hardware, firmware, software, or a combination thereof. In a hardware implementation, an embodiment of the present invention may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, etc.
[0299] In the case of implementation by firmware or software, an embodiment of the present invention may be implemented in the form of a module, procedure, function, etc. that performs the functions or operations described above. The software code may be stored in a memory and driven by a processor. The memory may be located inside or outside the processor and may transmit and receive data to and from the processor by various means known in the art.
[0300] It is obvious to those skilled in the art that the present invention can be embodied in other specific forms without departing from the essential characteristics of the present invention. Therefore, the above detailed description should not be interpreted as limiting in all respects, but should be regarded as illustrative. The scope of the present invention should be determined by reasonable interpretation of the appended claims, and all modifications within the equivalent scope of the present invention are included in the scope of the present invention. [Industrial Applicability]
[0301] The above-described preferred embodiments of the present invention have been disclosed for illustrative purposes, and those skilled in the art will appreciate that various other embodiments may be improved, modified, substituted, or added within the technical spirit and scope of the present invention as disclosed in the appended claims.
Claims
1. 1. A method for decoding a video signal, comprising: determining a non-separable transform set index for the current block from among predefined non-separable transform sets based on an intra prediction mode of the current block; determining a transformation kernel included in a non-separable transformation set designated by the non-separable transformation set index as a non-separable transformation matrix for the current block; applying the non-separable transformation matrix to an upper left region of the current block, the upper left region being determined based on a width and a height of the current block; performing a linear inverse transform on the current block to which the non-separable transform matrix has been applied; the transform kernel for the current block is determined as one of two transform kernels included in the non-separable transform set for the current block; applying the non-separable transform matrix to R coefficients in the upper-left region of the current block to generate N transform coefficients, where R is less than N and N is equal to the total number of coefficients in the upper-left region of the current block; A method in which the non-separable transform set index for the current block indicates the non-separable transform set for the current block among four non-separable transform sets, and the non-separable transform set index for the current block is determined according to the range of intra prediction modes to which the intra prediction mode of the current block belongs.
2. The method of claim 1 , wherein the non-separable transformation matrix is applied based on the width and height of the current block being greater than or equal to 4.
3. The method of claim 1 , further comprising applying a horizontal transform and a vertical transform to the current block transformed by the non-separable transformation matrix.
4. The method of claim 3 , wherein the horizontal transformation and the vertical transformation are determined based on a multiple transform selection (MTS) index for selecting a transformation matrix.
5. 1. An apparatus for decoding a video signal, comprising: a memory for storing the video signal; a processor coupled to the memory; The processor: determining a non-separable transform set index for the current block from among predefined non-separable transform sets based on an intra prediction mode of the current block; determining a transformation kernel included in a non-separable transformation set designated by the non-separable transformation set index as a non-separable transformation matrix for the current block; applying the non-separable transformation matrix to an upper left region of the current block, the upper left region being determined based on a width and a height of the current block; a linear inverse transform is performed on the current block to which the non-separable transform matrix is applied; the transform kernel for the current block is determined as one of two transform kernels included in the non-separable transform set for the current block; applying the non-separable transform matrix to R coefficients in the upper-left region of the current block to generate N transform coefficients, where R is less than N and N is equal to the total number of coefficients in the upper-left region of the current block; The non-separable transform set index for the current block indicates the non-separable transform set for the current block among four non-separable transform sets, and the non-separable transform set index for the current block is determined according to the range of intra prediction modes to which the intra prediction mode of the current block belongs.
6. The apparatus of claim 5 , wherein the non-separable transformation matrix is applied based on the width and the height of the current block being greater than or equal to four.
7. The apparatus of claim 5 , wherein the processor is further configured to apply a horizontal transform and a vertical transform to the current block transformed by the non-separable transform matrix.
8. The apparatus of claim 7 , wherein the horizontal transform and the vertical transform are determined based on a multiple transform selection (MTS) index for selecting a transformation matrix.
9. 1. A method for encoding a video signal, comprising: performing a linear transformation on the current block; determining a non-separable transform set for the current block based on an intra-prediction mode of the current block; determining a transformation kernel included in the non-separable transformation set as a non-separable transformation matrix for the current block; applying the non-separable transformation matrix to an upper left region of the current block, the upper left region being a linearly transformed region determined based on a width and a height of the current block; The non-separable transform set index specifies the non-separable transform set for the current block from among predefined non-separable transform sets; the transform kernel for the current block is determined as one of two transform kernels included in the non-separable transform set for the current block; the non-separable transform matrix is applied to N coefficients in the upper-left region of the current block to generate R transform coefficients, where R is less than N and N is equal to the total number of coefficients in the upper-left region of the current block; A method in which the non-separable transform set index for the current block indicates the non-separable transform set for the current block among four non-separable transform sets, and the non-separable transform set index for the current block is determined according to the range of intra prediction modes to which the intra prediction mode of the current block belongs.
10. 1. A method for transmitting a bitstream generated by a method for encoding a video signal, comprising: performing a linear transformation on the current block; determining a non-separable transform set for the current block based on an intra-prediction mode of the current block; determining a transformation kernel included in the non-separable transformation set as a non-separable transformation matrix for the current block; applying the non-separable transformation matrix to an upper left region of the current block, the upper left region being a linearly transformed region determined based on a width and a height of the current block; The non-separable transform set index specifies the non-separable transform set for the current block from among predefined non-separable transform sets; the transform kernel for the current block is determined as one of two transform kernels included in the non-separable transform set for the current block; the non-separable transform matrix is applied to N coefficients in the upper-left region of the current block to generate R transform coefficients, where R is less than N and N is equal to the total number of coefficients in the upper-left region of the current block; A method in which the non-separable transform set index for the current block indicates the non-separable transform set for the current block among four non-separable transform sets, and the non-separable transform set index for the current block is determined according to the range of intra prediction modes to which the intra prediction mode of the current block belongs.
Citation Information
Patent Citations
Reduced size inverse transform for decoding and encoding
US20170034530A1
Non-separable secondary transform for video coding
US20170094313A1
Image encoding method / device, image decoding method / device and recording medium having bitstream stored therein
WO2018070788A1
Method and device for encoding / decoding video signal using secondary transform
WO2018128323A1