Video coding using transform indexes
The video coding method using transform index information for blocks with MIP addresses the need for efficient compression of high-resolution images/videos, particularly in immersive media, by enhancing coding efficiency and reducing complexity.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2025-05-15
- Publication Date
- 2026-03-04
AI Technical Summary
The increasing demand for high-resolution and high-quality images/videos, along with the rise of immersive media like VR and AR, has led to a need for highly efficient image/video compression technologies to manage the increased data transmission and storage costs.
A method and apparatus for video coding using transform index information, specifically for blocks with matrix-based intra prediction (MIP), which includes signaling, deriving, and binarizing transformation index information, and entropy coding to improve coding efficiency.
This approach enhances overall image/video compression efficiency by efficiently transforming blocks with MIP, minimizing mutual interference between MIP and LFNST, and reducing complexity while maintaining optimal coding efficiency.
Smart Images

Figure 0007824467000026 
Figure 0007824467000027 
Figure 0007824467000028
Abstract
Description
[Technical Field]
[0001] This document relates to video coding techniques, and more particularly to video coding using transform indexes. [Background technology]
[0002] In recent years, demand for high-resolution, high-quality images / videos, such as 4K or 8K or higher UHD (Ultra High Definition) images / videos, has been increasing in various fields. As the resolution and quality of image / video data increases, the amount of information or bits to be transmitted increases relatively compared to existing image / video data. Therefore, when transmitting image data using existing media such as wired or wireless broadband lines or storing image / video data using existing storage media, transmission costs and storage costs increase.
[0003] In addition, interest in and demand for immersive media such as VR (Virtual Reality), AR (Artificial Reality) content, and holograms have been increasing in recent years, and the broadcast of images / videos with different image characteristics from real images, such as game images, has been increasing.
[0004] Therefore, there is a demand for highly efficient image / video compression technology to effectively compress and transmit, store, and play back high-resolution, high-quality image / video information that has the various characteristics described above. Summary of the Invention [Means for solving the problem]
[0005] According to one embodiment of the present document, a method and apparatus for improving image / video coding efficiency is provided.
[0006] According to one embodiment of the present document, a video coding method and apparatus using transform index information is provided.
[0007] According to one embodiment of the present document, a transformation method and apparatus for a block to which matrix-based intra prediction (MIP) is applied is provided.
[0008] According to one embodiment of the present document, a method and apparatus for signaling transformation index information to transform a block to which MIP is applied is provided.
[0009] According to one embodiment of this document, a method and apparatus are provided for signaling transformation index information only for blocks to which MIP is not applied.
[0010] According to one embodiment of the present document, a method and apparatus for deriving transformation index information to transform a block to which MIP is applied is provided.
[0011] According to one embodiment of the present document, a method and apparatus for binarizing or entropy coding transform index information is provided.
[0012] According to one embodiment of the present document, there is provided a video / image decoding method performed by a decoding device.
[0013] According to one embodiment of the present document, there is provided a decoding device for performing video / image decoding.
[0014] According to one embodiment of the present document, there is provided a video / image encoding method performed by an encoding device.
[0015] According to one embodiment of the present document, there is provided an encoding device for performing video / image encoding.
[0016] According to one embodiment of the present document, a computer-readable digital storage medium is provided that stores encoded video / image information generated by the video / image encoding method disclosed in at least one of the embodiments of the present document.
[0017] According to one embodiment of the present document, a computer-readable digital storage medium is provided that stores encoded information or encoded video / image information that enables a decoding device to perform the video / image decoding method disclosed in at least one of the embodiments of the present document. [Effects of the Invention]
[0018] According to the document, it can improve overall image / video compression efficiency.
[0019] According to this document, transform indices can be efficiently signaled to efficiently (inverse) transform blocks to which MIP (Matrix based Intra Prediction) is applied.
[0020] According to this document, it is possible to efficiently code the transformation index for the block to which MIP is applied.
[0021] According to this document, the transformation index for the block to which MIP is applied can be derived without separate signaling.
[0022] According to this document, when both MIP and LFNST (Low Frequency Non-Separable Transform) are applied, the mutual interference can be minimized, optimal coding efficiency can be maintained, and complexity can be reduced.
[0023] The effects that can be obtained through a specific example of this document are not limited to the effects listed above. For example, there may be various technical effects that a person having ordinary skill in the related art can understand or derive from this document. Therefore, the specific effects of this document are not limited to those explicitly described in this document, but may include various effects that can be understood or derive from the technical features of this document. [Brief explanation of the drawings]
[0024] [Figure 1] 1 illustrates schematically an example of a video / image coding system to which this document can be applied. [Figure 2] 1 is a diagram illustrating the configuration of a video / image encoding device to which the present document can be applied. [Figure 3] 1 is a diagram illustrating the configuration of a video / image decoding device to which this document can be applied. [Figure 4] 1 illustrates a schematic diagram of a multiple conversion technique according to one embodiment of the present document; [Figure 5] An intra-directional mode with 65 prediction directions is shown as an example. [Figure 6] FIG. 1 is a diagram for explaining RST according to one embodiment of this document. [Figure 7] FIG. 1 is a diagram for explaining RST according to one embodiment of this document. [Figure 8] Illustrates an example of CABAC (context-adaptive binary arithmetic coding) for encoding syntax elements. [Figure 9] 1 shows an example in which a block to which an ISP is applied is divided into sub-blocks based on the size of the block. [Figure 10] 1 shows an example in which a block to which an ISP is applied is divided into sub-blocks based on the size of the block. [Figure 11]FIG. 10 is a diagram illustrating MIP for an 8×8 block. [Figure 12] 1 is a flow chart illustrating how MIP and LFNST are applied. [Figure 13] 1 illustrates an example of a video / image encoding method and associated components according to an embodiment of the present document. [Figure 14] 1 illustrates an example of a video / image encoding method and associated components according to an embodiment of the present document. [Figure 15] 1 illustrates an example of a video / image decoding method and related components according to an embodiment of the present document. [Figure 16] 1 illustrates an example of a video / image decoding method and related components according to an embodiment of the present document. [Figure 17] 1 illustrates an example of a content streaming system to which the embodiments disclosed herein can be applied. DETAILED DESCRIPTION OF THE INVENTION
[0025] This document may be modified in various ways and may have various embodiments. Specific embodiments will be illustrated in the drawings and described in detail. However, this is not intended to limit this document to the specific embodiments. Common terms used in this document are used merely to describe specific embodiments and are not intended to limit the technical ideas of this document. A singular expression includes a plural expression unless the context clearly dictates otherwise. In this specification, the terms "comprise" or "have" are intended to specify the presence of a feature, number, step, operation, component, part, or combination thereof described in the specification, and should be understood not to preclude the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.
[0026] Meanwhile, each component in the drawings described in this document is illustrated independently for the convenience of explaining the different characteristic functions, and does not mean that each component is realized by separate hardware or software. For example, two or more components may be combined to form a single component, or a single component may be divided into multiple components. Embodiments in which each component is integrated and / or separated are also included within the scope of this document as long as they do not deviate from the essence of this document.
[0027] In this document, the terms " / " and "," should be interpreted to mean "and / or." For example, "A / B" means "A and / or B," and "A, B" means "A and / or B." Additionally, "A / B / C" means "at least one of A, B, and / or C." Also, "A, B, C" means "at least one of A, B, and / or C." (In this document, the terms " / " and "," should be interpreted to indicate "and / or." For instance, the expression "A / B" may mean "A and / or B." Further, "A,B" may mean "A and / or B." Further, "A / B / C" may mean "at least one of A, B, and / or C." Also, "A / B / C" may mean "at least one of A, B, and / or C.")
[0028] Additionally, in this document, "or" should be interpreted as "and / or." For example, "A or B" can mean 1) only "A," or 2) only "B," or 3) "A and B." In other words, the term "or" in this document should be interpreted to indicate "and / or." For instance, the expression "A or B" may comprise 1) only A, 2) only B, and / or 3) both A and B. In other words, the term "or" in this document should be interpreted to indicate "additionally or alternatively."
[0029] As used herein, "at least one of A and B" can mean "only A," "only B," or "both A and B." Additionally, as used herein, the expressions "at least one of A or B" and "at least one of A and / or B" can be interpreted as "at least one of A and B."
[0030] Furthermore, in this specification, "at least one of A, B, and C" can mean "only A," "only B," "only C," or "any combination of A, B, and C." Furthermore, "at least one of A, B, or C" or "at least one of A, B, and / or C" can mean "at least one of A, B, and C."
[0031] Furthermore, parentheses used herein may mean "for example." Specifically, when "prediction (intra prediction)" is used, "intra prediction" is proposed as an example of "prediction." In other words, "prediction" in this specification is not limited to "intra prediction," and "intra prediction" is proposed as an example of "prediction." Furthermore, when "prediction (i.e., intra prediction)" is used, "intra prediction" is proposed as an example of "prediction."
[0032] Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the accompanying drawings. Hereinafter, the same reference numerals will be used to refer to the same components in the drawings, and duplicated descriptions of the same components will be omitted.
[0033] In this specification, technical features individually described in one drawing may be embodied individually or simultaneously.
[0034] FIG. 1 illustrates schematically an example of a video / image coding system to which this document can be applied.
[0035] 1, a video / image coding system may include a source device and a receiving device. The source device may transmit encoded video / image information or data to the receiving device via a digital storage medium or a network in the form of a file or streaming.
[0036] The source device may include a video source, an encoding device, and a transmitting unit. The receiving device may include a receiving unit, a decoding device, and a renderer. The encoding device may be referred to as a video / video encoding device, and the decoding device may be referred to as a video / video decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display unit, which may be a separate device or an external component.
[0037] 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, a smartphone, etc., and can (electronically) generate video / images. For example, a virtual video / image can be generated via a computer, etc., in which case the video / image capture process can be replaced with a process in which related data is generated.
[0038] An encoding device can encode input video / images. The encoding device can perform a series of procedures 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.
[0039] The transmitter can transmit the encoded video / image information or data output in the form of a bitstream to a receiver 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 transmitter can include elements for generating a media file in a predetermined file format and elements for transmission via a broadcasting / communication network. The receiver can receive / extract the bitstream and transmit it to a decoding device.
[0040] The decoding device can decode the video / image by performing a series of steps such as inverse quantization, inverse transform, and prediction, which correspond to the operations of the encoding device.
[0041] The renderer can render the decoded video / image, and the rendered video / image can be displayed via a display unit.
[0042] This document relates to video / image coding. For example, methods / embodiments disclosed in this document may be related to the Versatile Video Coding (VVC) standard (ITU-T Rec. H.266), a next-generation video / image coding standard subsequent to VVC, or other video coding-related standards (e.g., the High Efficiency Video Coding (HEVC) standard (ITU-T Rec. H.265), the essential video coding (EVC) standard, the AVS2 standard, etc.).
[0043] This document presents various embodiments relating to video / image coding, and unless otherwise stated, the embodiments may be implemented in combination with each other.
[0044] In this document, video can refer to a collection of a series of images over time. A picture generally refers to a unit that shows one image at a specific time, and a slice / tile is a unit that constitutes part of a picture in coding. A slice / tile can contain one or more coding tree units (CTUs). One picture can be composed of one or more slices / tiles. One picture can be composed of one or more tile groups. One tile group can contain one or more tiles.
[0045] A pixel or a pel may refer to the smallest unit constituting a picture (or image). A "sample" may also be used as a term corresponding to a pixel. A sample may generally refer to a pixel or a pixel value, may refer to only a pixel / pixel value of a luma component, or may refer to only a pixel / pixel value of a chroma component. Alternatively, a sample may refer to a pixel value in the spatial domain, or, when such a pixel value is transformed into the frequency domain, may refer to a transform coefficient in the frequency domain.
[0046] A unit may refer to a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. One unit may include one luma block and two chroma (e.g., cb, cr) blocks. The term unit may be used interchangeably with terms such as block or area. In general, an M×N block may include samples (or a sample array) consisting of M columns and N rows, or a set (or an array) of transform coefficients.
[0047] 2 is a diagram illustrating the configuration of a video / image encoding device to which this document can be applied. Hereinafter, the term "video encoding device" may include a video encoding device.
[0048] As shown in FIG. 2, the encoding apparatus 200 may include an image partitioner 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter predictor 221 and an intra predictor 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 may further include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstructed block generator. The image dividing unit 210, the predicting unit 220, the residual processing unit 230, the entropy encoding unit 240, the adding unit 250, and the filtering unit 260 may be configured by one or more hardware components (e.g., an encoder chipset or a processor) depending on the embodiment. Also, the memory 270 may include a decoded picture buffer (DPB) or may be configured by a digital storage medium. The hardware components may further include the memory 270 as an internal / external component.
[0049] The image division unit 210 may divide an input image (or picture, frame) input to the encoding device 200 into one or more processing units. For example, the processing units may be called coding units (CUs). In this case, the coding units may be recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) using a quad-tree, binary-tree, ternary-tree (QTBTTT) structure. For example, one coding unit may be divided into multiple coding units of deeper depths based on a quad-tree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quad-tree structure may be applied first, and then the binary tree structure and / or the ternary structure may be applied. Alternatively, the binary tree structure may be applied first. The coding procedure according to the present disclosure may be performed based on a final coding unit that is not further divided. In this case, the largest coding unit may be used as the final coding unit 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 a coding unit of an optimal size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later. As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may each be divided or partitioned from the final coding unit.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.
[0050] The term "unit" may be 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, and can refer to only a pixel / pixel value of a luma component or only a pixel / pixel value of a chroma component. A sample can also be used as a term corresponding to one pixel or pel of a picture (or image).
[0051] The subtraction unit 231 may subtract a prediction signal (predicted block, prediction sample, or prediction sample array) output from the prediction unit 220 from an input video signal (original block, original sample, or original sample array) to generate a residual signal (residual block, residual sample, or residual sample array), and the generated residual signal is transmitted to the conversion unit 232. The prediction unit 220 may perform prediction on a block to be processed (hereinafter, referred to as a current block) and generate a predicted block including prediction samples for the current block. The prediction unit 220 may determine whether intra prediction or inter prediction is applied in units of the current block or CU. The prediction unit may generate various information related to prediction, such as prediction mode information, and transmit the information to the entropy encoding unit 240, as will be described later in the description of each prediction mode. The prediction information may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
[0052] The intra prediction unit 222 may predict the current block by referring to samples in the current picture. The referenced samples may be located adjacent to or distant from the current block depending on the prediction mode. Prediction modes in intra prediction may include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes may include, for example, DC mode and 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 222 may also determine the prediction mode to be applied to the current block using the prediction modes applied to neighboring blocks.
[0053] The inter prediction unit 221 may derive a predicted block for a current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. 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 neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include information on an inter prediction direction (such as L0 prediction, L1 prediction, or Bi prediction). In the case of inter prediction, the neighboring 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 block may be the same or different. The temporal neighboring block may be called a collocated reference block, a collocated CU (col CU), or the like, and the reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, the inter predictor 221 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, and for example, in the case of a skip mode or a merge mode, the inter predictor 221 may use motion information of neighboring blocks as motion information of the current block. In the case of the skip mode, unlike the merge mode, a residual signal may not be transmitted.In the case of motion vector prediction (MVP) mode, the motion vector of the current block can be indicated by using the motion vector of the neighboring block as a motion vector predictor and signaling the motion vector difference.
[0054] The predictor 220 may generate a prediction signal based on various prediction methods, which will be described later. For example, the predictor may apply intra prediction or inter prediction for prediction of a block, or may simultaneously apply intra prediction and inter prediction. This may be referred to as combined inter and intra prediction (CIIP). The predictor may also perform intra block copy (IBC) for prediction of a block. The intra block copy may be used for content image / moving image coding, such as games, for example, screen content coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in that it derives a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described herein.
[0055] The prediction signal generated by the inter prediction unit 221 and / or the intra prediction unit 222 may be used to generate a reconstructed signal or a residual signal. The transform unit 232 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include a discrete cosine transform (DCT), a discrete sine transform (DST), a graph-based transform (GBT), or a conditionally non-linear transform (CNT). Here, GBT refers to a transform obtained from a graph representing inter-pixel relationship information. CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. The transform process may be applied to pixel blocks having the same square size or to non-square blocks of variable size.
[0056] The quantization unit 233 quantizes the transform coefficients and transmits them to the entropy encoding unit 240. The entropy encoding unit 240 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 233 may rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and may generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. The entropy encoding unit 240 may perform various encoding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), etc. The entropy encoding unit 240 may also encode information required for video / image restoration (e.g., values of syntax elements) in addition to the quantized transform coefficients, either together with or separately from the quantized transform coefficients. The encoded information (e.g., encoded video / picture information) may be transmitted or stored in the form of a bitstream in network abstraction layer (NAL) unit units. The video / picture information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / picture information may also include general constraint information. Signaling / transmitted information and / or syntax elements described later in this document may be encoded through the encoding procedure described above and included in the bitstream.The bitstream can be transmitted via a network or stored in a digital storage medium. Here, the network can include a broadcasting network and / or a communication network, and the digital storage medium can include various storage media such as a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) for transmitting the signal output from the entropy encoding unit 240 and / or a storage unit (not shown) for storing the signal can be configured as an internal / external element of the encoding apparatus 200, or the transmitter can be included in the entropy encoding unit 240.
[0057] The quantized transform coefficients output from the quantizer 233 may be used to generate a prediction signal. For example, a residual signal (residual block or residual sample) may be reconstructed by applying inverse quantization and inverse transform to the quantized transform coefficients via the inverse quantizer 234 and the inverse transformer 235. The adder 250 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample, or reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the predictor 220. When there is no residual for the current block, such as when skip mode is applied, the predicted block may be used as the reconstructed block. The generated reconstructed signal may be used for intra prediction of the next block to be processed in the current picture, or may be used for inter prediction of the next picture after filtering, as described below.
[0058] Meanwhile, luma mapping with chrominance scaling (LMCS) can be applied during picture encoding and / or restoration.
[0059] The filtering unit 260 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 260 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture and store the modified reconstructed picture in the memory 270, specifically, in the DPB of the memory 270. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset (SAO), an adaptive loop filter, a bilateral filter, etc. The filtering unit 260 may generate various information related to filtering and transmit it to the entropy encoding unit 290, as will be described later in the description of each filtering method. The filtering information may be encoded by the entropy encoding unit 290 and output in the form of a bitstream.
[0060] The modified reconstructed picture transmitted to the memory 270 can be used as a reference picture in the inter prediction unit 280. When inter prediction is applied through this, the encoding apparatus can avoid prediction mismatch between the encoding apparatus 200 and the decoding apparatus, and can also improve coding efficiency.
[0061] The DPB of the memory 270 may store a modified reconstructed picture to be used as a reference picture in the inter predictor 221. The memory 270 may store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter predictor 221 to be used as motion information of a spatially neighboring block or a temporally neighboring block. The memory 270 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra predictor 222.
[0062] FIG. 3 is a diagram illustrating the configuration of a video / image decoding device to which this document can be applied.
[0063] As shown in FIG. 3, the decoding device 300 may include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 may include an inter predictor 331 and an intra predictor 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 321. Depending on the embodiment, the entropy decoding unit 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be implemented as a single hardware component (e.g., a decoder chipset or processor). The memory 360 may include a decoded picture buffer (DPB) or may be implemented as a digital storage medium. The hardware components may further include a memory 360 as an internal / external component.
[0064] When a bitstream including video / image information is input, the decoding apparatus 300 can reconstruct an image corresponding to the process in which the video / image information was processed by the encoding apparatus of FIG. 3. For example, the decoding apparatus 300 can derive units / blocks based on block division-related information obtained from the bitstream. The decoding apparatus 300 can perform decoding using a processing unit applied by the encoding apparatus. Therefore, the processing unit for decoding can be, for example, a coding unit, and the coding unit can be divided from a coding tree unit or a maximal coding unit according to a quad tree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units can be derived from the coding unit. The reconstructed image signal decoded and output by the decoding apparatus 300 can be reproduced via a reproduction device.
[0065] The decoding apparatus 300 may receive a signal output from the encoding apparatus of FIG. 2 in the form of a bitstream, and the received signal may be decoded via the entropy decoding unit 310. For example, the entropy decoding unit 310 may parse the bitstream to derive information (e.g., video / video information) necessary for image restoration (or picture restoration). The video / video information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / video information may also include general constraint information. The decoding apparatus may decode pictures based on the information on the parameter sets and / or the general constraint information. Signaled / received information and / or syntax elements, which will be described later in this document, may be decoded via the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 may decode information in a bitstream based on a coding method such as Exponential Golomb coding, CAVLC, or CABAC, and output values of syntax elements required for image restoration and quantized values of transform coefficients related to residuals. More specifically, the CABAC entropy decoding method receives bins corresponding to each syntax element in the bitstream, determines a context model using information on the syntax element to be decoded and decoding information on adjacent and current blocks or information on symbols / bins decoded in previous steps, predicts the occurrence probability of bins according to the determined context model, and performs arithmetic decoding of the bins to generate symbols corresponding to the values of each syntax element.In this case, after determining a context model, the CABAC entropy decoding method can update the context model using information on the decoded symbol / bin for the context model of the next symbol / bin. Prediction-related information from the information decoded by the entropy decoding unit 310 is provided to the prediction unit 330, and information on the residual on which entropy decoding is performed by the entropy decoding unit 310, i.e., quantized transform coefficients and related parameter information, can be input to the inverse quantization unit 321. In addition, filtering-related information from the information decoded by the entropy decoding unit 310 can be provided to the filtering unit 350. Meanwhile, a receiving unit (not shown) that receives a signal output from the encoding apparatus can be further configured as an internal / external element of the decoding apparatus 300, or the receiving unit can be a component of the entropy decoding unit 310. Meanwhile, the decoding apparatus according to this document may be called a video / image / picture decoding apparatus, and the decoding apparatus may be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoding unit 310, and the sample decoder may include at least one of the inverse quantization unit 321, the inverse transform unit 322, the prediction unit 330, the addition unit 340, the filtering unit 350, and the memory 360.
[0066] The inverse quantization unit 321 may inverse quantize the quantized transform coefficients and output the transform coefficients. The inverse quantization unit 321 may rearrange the quantized transform coefficients in a two-dimensional block format. In this case, the rearrangement may be performed based on the coefficient scanning order performed in the encoding apparatus. The inverse quantization unit 321 may inverse quantize the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.
[0067] The inverse transform unit 322 performs inverse transform on the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0068] The prediction unit may perform prediction on a current block and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on information about the prediction output from the entropy decoding unit 310, and may determine a specific intra / inter prediction mode.
[0069] The predictor may generate a prediction signal based on various prediction methods, which will be described later. For example, the predictor may apply intra prediction or inter prediction for prediction of a block, or may simultaneously apply intra prediction and inter prediction. This may be referred to as combined inter and intra prediction (CIIP). The predictor may also perform intra block copy (IBC) for prediction of a block. The intra block copy may be used for content image / moving image coding, such as games, for example, as in screen content coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in that it derives a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described herein.
[0070] The intra prediction unit 332 may predict the current block by referring to samples in the current picture. The referenced samples may be located adjacent to the current block or may be located far away depending on the prediction mode. In intra prediction, prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 332 may also determine the prediction mode to be applied to the current block using the prediction modes applied to neighboring blocks.
[0071] The inter prediction unit 331 may derive a predicted block for a current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. 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 neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include information on an inter prediction direction (e.g., L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks in the current picture and temporal neighboring blocks in the reference picture. For example, the inter prediction unit 331 may construct a motion information candidate list based on the neighboring 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 for the current block.
[0072] The adder 340 may 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 predictor 330. When there is no residual for the current block, such as when a skip mode is applied, the predicted block may be used as the reconstructed block.
[0073] The adder 340 may be referred to as a reconstruction unit or a reconstruction block generator. The generated reconstruction signal may be used for intra prediction of a next block to be processed in the current picture, may be output after filtering as described below, or may be used for inter prediction of a next picture.
[0074] Meanwhile, LMCS (luma mapping with chroma scaling) can be applied during picture decoding.
[0075] The filtering unit 350 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 350 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may transmit the modified reconstructed picture to the memory 360, specifically, to the DPB of the memory 360. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.
[0076] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter predictor 331. The memory 360 can store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information can be transmitted to the inter predictor 331 to be used as motion information of a spatially neighboring block or a temporally neighboring block. The memory 360 can store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra predictor 332.
[0077] In this specification, the embodiments described for the prediction unit 330, inverse quantization unit 321, inverse transform unit 322, and filtering unit 350 of the decoding device 300 can be applied identically or correspondingly to the prediction unit 220, inverse quantization unit 234, inverse transform unit 235, and filtering unit 260 of the encoding device 200, respectively.
[0078] Meanwhile, as described above, prediction is performed to improve compression efficiency during video coding. Accordingly, a predicted block including predicted samples for a current block, which is a block to be coded, can be generated. Here, the predicted block includes predicted samples in the spatial domain (or pixel domain). The predicted block is derived in the same way by an encoding device and a decoding device. The encoding device can improve image coding efficiency by signaling to a decoding device information (residual information) regarding the residual between the original block and the predicted block, rather than the original sample values of the original block themselves. The decoding device can derive a residual block including residual samples based on the residual information, add the residual block and the predicted block to generate a reconstructed block including reconstructed samples, and generate a reconstructed picture including the reconstructed block.
[0079] The residual information may be generated through a transform and quantization procedure. For example, an encoding apparatus may derive a residual block between the original block and the predicted block, perform a transform procedure on residual samples (residual sample array) included in the residual block to derive transform coefficients, and perform a quantization procedure on the transform coefficients to derive quantized transform coefficients, and then signal the related residual information (via a bitstream) to a decoding apparatus. Here, the residual information may include information such as value information, position information, transform technique, transform kernel, and quantization parameter of the quantized transform coefficients. The decoding apparatus may derive residual samples (or residual blocks) by performing an inverse quantization / inverse transform procedure based on the residual information. The decoding apparatus may generate a reconstructed picture based on the predicted block and the residual block. The encoding apparatus may also derive a residual block by inverse quantizing / inverse transforming the quantized transform coefficients for reference for inter-prediction of a future picture, and generate a reconstructed picture based on the residual block.
[0080] FIG. 4 shows a schematic diagram of the multiple conversion technique according to this document.
[0081] Referring to Figure 4, the transform unit may correspond to the transform unit in the encoding device of Figure 2 described above, and the inverse transform unit may correspond to the inverse transform unit in the encoding device of Figure 2 described above or the inverse transform unit in the decoding device of Figure 3.
[0082] The transform unit may perform a primary transform based on the residual samples (residual sample array) in the residual block to derive (primary) transform coefficients (S410). Such a primary transform may be called a core transform. Here, the primary transform may be based on Multiple Transform Selection (MTS), and when multiple transforms are applied in the primary transform, it may be called a multiple core transform.
[0083] For example, the multi-kernel transform may refer to a transform method additionally using a Discrete Cosine Transform (DCT) Type 2 (DCT-II), a Discrete Sine Transform (DST) Type 7 (DST-VII), a DCT Type 8 (DCT-VIII), and / or a DST Type 1 (DST-I). That is, the multi-kernel transform may refer to a transform method of transforming a spatial domain residual signal (or a residual block) into frequency domain transform coefficients (or primary transform coefficients) based on a plurality of transform kernels selected from the DCT Type 2, the DST Type 7, the DCT Type 8, and the DST Type 1. Here, the primary transform coefficients may be referred to as temporary transform coefficients in a transform unit.
[0084] That is, when an existing transform method is applied, a transform from the spatial domain to the frequency domain is applied to the residual signal (or residual block) based on DCT type 2 to generate transform coefficients. However, in contrast to this, when the multi-kernel transform is applied, a transform from the spatial domain to the frequency domain is applied to the residual signal (or residual block) based on DCT type 2, DST type 7, DCT type 8, and / or DST type 1, etc. to generate transform coefficients (or primary transform coefficients). Here, DCT type 2, DST type 7, DCT type 8, DST type 1, etc. may be referred to as transform types, transform kernels, or transform cores. Such DCT / DST transform types may be defined based on basis functions.
[0085] When the multi-kernel transform is performed, a vertical transform kernel and / or a horizontal transform kernel for a current block may be selected from the transform kernels, and a vertical transform for the current block may be performed based on the vertical transform kernel, and a horizontal transform for the current block may be performed based on the horizontal transform kernel. Here, the horizontal transform may indicate a transform for a horizontal component of the current block, and the vertical transform may indicate a transform for a vertical component of the current block. The vertical transform kernel / horizontal transform kernel may be adaptively determined based on a prediction mode and / or a transform index of a current block (CU or sub-block) including a residual block.
[0086] Alternatively, for example, when applying MTS to perform a linear transform, a specific basis function may be set to a predetermined value, and a mapping relationship for the transform kernel may be set by combining which basis function is applied when performing a vertical transform or horizontal transform. For example, if the horizontal transform kernel is represented by trTypeHor and the vertical transform kernel is represented by trTypeVer, trTypeHor or trTypeVer having a value of 0 may be set to DCT2, and trTypeHor or trTypeVer having a value of 1 may be set to DCT7. trTypeHor or trTypeVer having a value of 2 may be set to DCT8.
[0087] Alternatively, for example, an MTS index may be encoded to indicate one of a plurality of transform kernel sets, and the MTS index information may be signaled to a decoding device. Here, the MTS index may be represented by a tu_mts_idx syntax element or an mts_idx syntax element. For example, an MTS index of 0 may indicate that the trTypeHor and trTypeVer values are all 0; an MTS index of 1 may indicate that the trTypeHor and trTypeVer values are all 1; an MTS index of 2 may indicate that the trTypeHor value is 2 and the trTypeVer value is 1; an MTS index of 3 may indicate that the trTypeHor value is 1 and the trTypeVer value is 2; and an MTS index of 4 may indicate that the trTypeHor and trTypeVer values are all 2. For example, a transform kernel set according to an MTS index may be represented as shown in the following table.
[0088] [Table 1]
[0089] The transform unit may perform a secondary transform based on the (primary) transform coefficients to derive modified (secondary) transform coefficients (S420). The primary transform is a transform from the spatial domain to the frequency domain, and the secondary transform may convert the (primary) transform coefficients into a more compressed representation by utilizing correlations existing between the coefficients.
[0090] For example, the secondary transform may include a non-separable transform. In this case, the secondary transform may be referred to as a non-separable secondary transform (NSST) or a mode-dependent non-separable secondary transform (MDNSST). The non-separable secondary transform may refer to a transform in which (primary) transform coefficients derived through the primary transform are secondarily transformed based on a non-separable transform matrix to generate modified transform coefficients (or secondary transform coefficients) for a residual signal. Here, a transform may be applied to the (primary) transform coefficients at once based on the non-separable transform matrix, without separately applying a vertical transform and a horizontal transform (or independently applying a horizontal transform and a vertical transform).
[0091] That is, the non-separable secondary transform may refer to a transform method in which, for example, a two-dimensional signal (transform coefficient) is rearranged into a one-dimensional signal in a specific direction (e.g., row-first direction or column-first direction) without separating the vertical and horizontal components of the (first-order) transform coefficients, and then modified transform coefficients (or second-order transform coefficients) are generated based on the non-separable transform matrix.
[0092] For example, row-major direction (or order) may refer to an arrangement of an M×N block in the order of first row, second row, ..., Nth row, and column-major direction (or order) may refer to an arrangement of an M×N block in the order of first column, second column, ..., Mth column, where M and N may refer to the width (W) and height (H) of the block, respectively, and are all positive integers.
[0093] For example, the non-separable second-order transform may be applied to the top-left region of a block (hereinafter referred to as a transform coefficient block) composed of (first-order) transform coefficients. For example, if the width (W) and height (H) of the transform coefficient block are both equal to or greater than 8, an 8x8 non-separable second-order transform may be applied to the top-left 8x8 region of the transform coefficient block. Also, if the width (W) and height (H) of the transform coefficient block are both equal to or greater than 4 and the width (W) or height (H) of the transform coefficient block is less than 8, a 4x4 non-separable second-order transform may be applied to the top-left min(8,W) x min(8,H) region of the transform coefficient block. However, the embodiment is not limited thereto. For example, even if the width (W) or height (H) of the transform coefficient block is both equal to or greater than 4, a 4x4 non-separable second-order transform may also be applied to the top-left min(8,W) x min(8,H) region of the transform coefficient block.
[0094] Specifically, for example, if a 4x4 input block is used, a non-separable quadratic transform can be performed as follows:
[0095] The 4x4 input block X is given as follows:
[0096]
number
[0097] For example, the vector form of X is shown below:
[0098]
number
[0099] Referring to Equation 2, TIFF0007824467000004.tif64 can represent a vector X, which is represented by rearranging the two-dimensional block of X in Equation 1 into a one-dimensional vector in row-first order.
[0100] In this case, the second-order non-separable transform can be calculated as follows:
[0101]
number
[0102] where: TIFF0007824467000006.tif64 may denote a transform coefficient vector, and T may denote a 16x16 (non-separable) transform matrix.
[0103] Based on the formula 3, the size of 16×1 TIFF0007824467000007.tif64 can be derived from TIFF0007824467000008.tif64 can be re-organized into 4x4 blocks via scan order (horizontal, vertical, diagonal, etc.). However, the above calculation is only an example, and in order to reduce the computational complexity of non-separable quadratic transforms, HyGT (Hypercube-Givens Transform) or the like can also be used to calculate non-separable quadratic transforms.
[0104] Meanwhile, the non-separable quadratic transform may be a mode-dependent transform kernel (or transform core, transform type), where the mode may include an intra-prediction mode and / or an inter-prediction mode.
[0105] For example, as described above, the non-separable quadratic transform may be performed based on an 8x8 transform or a 4x4 transform determined based on the width (W) and height (H) of the transform coefficient block. For example, the 8x8 transform may refer to a transform that can be applied to an 8x8 region contained within a corresponding transform coefficient block when W and H are all equal to or greater than 8, and the 8x8 region is the upper left 8x8 region within the corresponding transform coefficient block. Similarly, the 4x4 transform may refer to a transform that can be applied to a 4x4 region contained within a corresponding transform coefficient block when W and H are all equal to or greater than 4, and the 4x4 region is the upper left 4x4 region within the corresponding transform coefficient block. For example, the 8x8 transform kernel matrix may be a 64x64 / 16x64 matrix, and the 4x4 transform kernel matrix may be a 16x16 / 8x16 matrix.
[0106] In this case, for mode-based transform kernel selection, two non-separable quadratic transform kernels may be configured per transform set for the non-separable quadratic transform for both the 8×8 transform and the 4×4 transform, resulting in four transform sets. That is, four transform sets may be configured for the 8×8 transform, and four transform sets may be configured for the 4×4 transform. In this case, each of the four transform sets for the 8×8 transform may include two 8×8 transform kernels, and each of the four transform sets for the 4×4 transform may include two 4×4 transform kernels.
[0107] However, the size of the transform, the number of sets, and the number of transform kernels in a set are merely examples, and sizes other than 8x8 or 4x4 may be used, or n sets may be configured, with k transform kernels included in each set, where n and k are each a positive integer.
[0108] For example, the transform set may be referred to as an NSST set, and the transform kernels in the NSST set may be referred to as NSST kernels. For example, the selection of a particular set from the transform set may be performed based on the intra prediction mode of the current block (CU or sub-block).
[0109] For example, the intra prediction modes may include two non-directional or non-angular intra prediction modes and 65 directional or angular intra prediction modes. The non-directional intra prediction modes may include a planar intra prediction mode numbered 0 and a DC intra prediction mode numbered 1, and the directional intra prediction modes may include 65 intra prediction modes numbered 2 to 66. However, this is merely an example, and the embodiments of this document may also be applied to cases where the number of intra prediction modes is different. Meanwhile, in some cases, a 67th intra prediction mode may also be used, and the 67th intra prediction mode may indicate a linear model (LM) mode.
[0110] FIG. 5 exemplarily shows the intra-directional modes of 65 prediction directions.
[0111] Referring to Figure 5, intra prediction modes having horizontal directionality and intra prediction modes having vertical directionality can be distinguished based on the 34th intra prediction mode having a left-up diagonal prediction direction. H and V in Figure 5 may represent horizontal and vertical directionality, respectively, and numbers from -32 to 32 may indicate displacements of 1 / 32 units on the sample grid position. This may indicate an offset for the mode index value.
[0112] For example, the 2nd to 33rd intra prediction modes may have a horizontal direction, and the 34th to 66th intra prediction modes may have a vertical direction. Meanwhile, the 34th intra prediction mode may be strictly considered to have neither a horizontal direction nor a vertical direction, but may be classified as belonging to a horizontal direction in terms of determining a transform set for a secondary transform. This is because input data is transposed and used for vertical modes symmetrical with respect to the 34th intra prediction mode, and an input data alignment method for horizontal modes is used for the 34th intra prediction mode. Here, transposing the input data may mean that rows of 2D block data M×N become columns and columns become rows to form N×M data.
[0113] In addition, the 18th intra prediction mode and the 50th intra prediction mode may indicate a horizontal intra prediction mode and a vertical intra prediction mode, respectively. The 2nd intra prediction mode may be called a right-up diagonal intra prediction mode because it predicts in a direction from the left reference pixel to the right. Similarly, the 34th intra prediction mode may be called a right-down diagonal intra prediction mode, and the 66th intra prediction mode may be called a left-down diagonal intra prediction mode.
[0114] Meanwhile, if it is determined that a specific set is used for a non-separable transform, one of k transform kernels in the specific set may be selected through a non-separable secondary transform index. For example, an encoding device may derive a non-separable secondary transform index indicating a specific transform kernel based on a rate-distortion (RD) check and signal the non-separable secondary transform index to a decoding device. For example, the decoding device may select one of k transform kernels in the specific set based on the non-separable secondary transform index. For example, an NSST index having a value of 0 may indicate a first non-separable quadratic transform kernel, an NSST index having a value of 1 may indicate a second non-separable quadratic transform kernel, and an NSST index having a value of 2 may indicate a third non-separable quadratic transform kernel. Alternatively, an NSST index having a value of 0 may indicate that the first non-separable quadratic transform is not applied to the current block, and NSST indexes having values 1 to 3 may indicate the three transform kernels.
[0115] The transform unit may perform the non-separable quadratic transform based on the selected transform kernel to obtain modified (quadratic) transform coefficients. The modified transform coefficients may be derived as quantized transform coefficients via a quantizer, encoded, and signaled to a decoding device and transmitted to an inverse quantization / inverse transform unit in the encoding device, as described above.
[0116] On the other hand, as mentioned above, if the secondary transform is omitted, the (primary) transform coefficients, which are the output of the primary (separate) transform, can be derived as quantized transform coefficients through the quantization unit as mentioned above, encoded, signaled to the decoding device, and transmitted to the inverse quantization / inverse transform unit within the encoding device.
[0117] Referring again to FIG. 4, the inverse transform unit may perform a series of steps in the reverse order of the steps performed by the transform unit described above. The inverse transform unit may receive (dequantized) transform coefficients, perform a secondary (inverse) transform to derive (primary) transform coefficients (S450), and perform a primary (inverse) transform on the (primary) transform coefficients to obtain residual blocks (residual samples) (S460). Here, the primary transform coefficients may be referred to as modified transform coefficients by the inverse transform unit. As described above, the encoding device and / or decoding device may generate reconstructed blocks based on the residual blocks and predicted blocks, and may generate reconstructed pictures based on the reconstructed blocks.
[0118] Meanwhile, the decoding apparatus may further include a secondary inverse transform application determining unit (or an element determining whether to apply the secondary inverse transform) and a secondary inverse transform determining unit (or an element determining the secondary inverse transform). For example, the secondary inverse transform application determining unit may determine whether to apply the secondary inverse transform. For example, the secondary inverse transform may be NSST or RST, and the secondary inverse transform application determining unit may determine whether to apply the secondary inverse transform based on a secondary transform flag parsed or acquired from the bitstream. Alternatively, for example, the secondary inverse transform application determining unit may determine whether to apply the secondary inverse transform based on transform coefficients of the residual block.
[0119] The secondary inverse transform decision unit may determine a secondary inverse transform. In this case, the secondary inverse transform decision unit may determine a secondary inverse transform to be applied to a current block based on an NSST (or RST) transform set specified by an intra prediction mode. Alternatively, the secondary transform decision method may be determined depending on the primary transform decision method. Alternatively, various combinations of primary transform and secondary transform may be determined depending on the intra prediction mode. For example, the secondary inverse transform decision unit may determine an area to which the secondary inverse transform is applied based on the size of the current block.
[0120] On the other hand, as described above, if the second-order (inverse) transform is omitted, a residual block (residual sample) can be obtained by receiving (dequantized) transform coefficients and performing the first-order (separate) inverse transform. As described above, the encoding device and / or decoding device can generate a reconstructed block based on the residual block and a predicted block, and can generate a reconstructed picture based on the reconstructed block.
[0121] On the other hand, in this paper, in order to reduce the computational complexity and memory requirements due to non-separable secondary transforms, the RST (reduced secondary transform) can be applied, in which the size of the transformation matrix (kernel) is reduced using the concept of NSST.
[0122] In this document, RST may refer to a (simplified) transformation performed on residual samples of a target block based on a transform matrix whose size is reduced by a simplification factor. When this is performed, the amount of calculation required during transformation can be reduced by reducing the size of the transform matrix. That is, RST can be used to solve the computational complexity problem that occurs when transforming large blocks or performing non-separable transformations.
[0123] For example, the RST may be called by various terms such as a reduced transform, a reduced secondary transform, a reduction transform, a simplified transform, or a simple transform, and the names by which the RST is called are not limited to the listed examples. Alternatively, the RST may be called a Low-Frequency Non-Separable Transform (LFNST) because it is mainly performed in the low-frequency domain including non-zero coefficients in the transform block.
[0124] On the other hand, when the second-order inverse transform is performed based on an RST, the inverse transform unit 235 of the encoding apparatus 200 and the inverse transform unit 322 of the decoding apparatus 300 may include an inverse RST unit that derives modified transform coefficients based on the inverse RST for the transform coefficients, and an inverse linear transform unit that derives residual samples for the current block based on an inverse linear transform for the modified transform coefficients. The inverse linear transform refers to the inverse transform of the linear transform applied to the residual. In this document, deriving transform coefficients based on a transform may refer to deriving transform coefficients by applying the corresponding transform.
[0125] 6 and 7 are diagrams for explaining an RST according to an embodiment of the present document.
[0126] For example, Figure 6 is a diagram illustrating application of a forward reduced transform, and Figure 7 is a diagram illustrating application of an inverse reduced transform. In this document, a target block may refer to a current block, a residual block, or a transform block on which coding is performed.
[0127] For example, in RST, an N-dimensional vector can be mapped to an R-dimensional vector located in a different space to determine a reduced transformation matrix. Here, N and R are each positive integers, and R is smaller than N. N may represent the square of the length of one side of a block to which a transformation is applied or the total number of transformation coefficients corresponding to the block to which a transformation is applied, and the simplification factor may represent an R / N value. The simplification factor may be referred to by various terms, such as a reduced factor, a reduction factor, a simplified factor, or a simple factor. Meanwhile, R may be referred to as a reduced coefficient, but in some cases, the simplification factor may also represent R. In other cases, the simplification factor may also represent an N / R value.
[0128] For example, the simplification factor or the reduced coefficient may be signaled via a bitstream, but is not limited thereto. For example, predefined values for the simplification factor or the reduced coefficient may be stored in each encoding device 200 and decoding device 300, in which case the simplification factor or the reduced coefficient is not separately signaled.
[0129] For example, the size of the simplified transformation matrix (R×N) is smaller than the size of the normal transformation matrix (N×N), and can be defined as follows:
[0130]
number
[0131] For example, the matrix T in the reduced transform block shown in FIG. 6 is the matrix T in Equation 4. R×N As shown in Figure 6, the simplified transformation matrix T R×N are multiplied, the transform coefficients for the current block can be derived.
[0132] For example, if the size of the block to which the transform is applied is 8x8 and R is 16 (i.e., R / N=16 / 64=1 / 4), the RST according to Fig. 6 can be expressed by a matrix operation as shown in Equation 5 below. In this case, the memory and multiplication operations can be reduced to approximately 1 / 4 due to the simplification factor.
[0133] In this document, a matrix operation can be understood as an operation in which a matrix is placed to the left of a column vector and the matrix and the column vector are multiplied to obtain the column vector.
[0134]
number
[0135] In Equation 5, r1 to r 64 may represent a residual sample for the current block, or may be a transform coefficient generated by applying a linear transform. The transform coefficient c for the current block is calculated based on the calculation result of Equation 5. i can be derived.
[0136] For example, if R is 16, the transform coefficients c1 to c2 for the current block are 16can be derived. If a regular transform, rather than an RST, is applied and a transform matrix of size 64×64 (N×N) is multiplied by residual samples of size 64×1 (N×1), 64 (N) transform coefficients for the current block are derived. However, because an RST is applied, only 16 (R) transform coefficients for the current block are derived. Since the total number of transform coefficients for the current block is reduced from N to R, the amount of data transmitted from the encoding apparatus 200 to the decoding apparatus 300 is reduced, thereby improving transmission efficiency between the encoding apparatus 200 and the decoding apparatus 300.
[0137] Considering the size of the transformation matrix, the size of a normal transformation matrix is 64x64 (NxN), while the size of a simplified transformation matrix is reduced to 16x64 (RxN). Therefore, compared to performing normal transformation, memory usage when performing RST can be reduced by a ratio of R / N. Also, compared to the number of multiplication operations (NxN) when using a normal transformation matrix, the number of multiplication operations can be reduced by a ratio of R / N (RxN) when using a simplified transformation matrix.
[0138] In one embodiment, the transform unit 232 of the encoding apparatus 200 may derive transform coefficients for the current block by performing a primary transform and an RST-based secondary transform on residual samples for the current block. These transform coefficients may be transmitted to an inverse transform unit 322 of the decoding apparatus 300, and the inverse transform unit 322 of the decoding apparatus 300 may derive modified transform coefficients based on an inverse reduced secondary transform (RST) on the transform coefficients and derive residual samples for the current block based on an inverse primary transform on the modified transform coefficients.
[0139] Inverse RST matrix T according to one embodiment N×RThe size of the simplified transformation matrix T R×N It is in a transpose relationship with
[0140] The matrix T in the reduced inverse transform block shown in FIG. t is the inverse RST matrix T R×N T Here, the superscript T can indicate a transpose. As shown in Figure 7, the inverse RST matrix T R×N T When the inverse RST matrix T is multiplied, modified transform coefficients for the current block or residual samples for the current block can be derived. R×N T is (T R×N ) T N×R It can also be expressed as
[0141] More specifically, when the inverse RST is applied to the secondary inverse transform, the inverse RST matrix T R×N T Alternatively, an inverse RST may be applied to the inverse linear transform, in which case the inverse RST matrix T is applied to the transform coefficients for the current block. R×N T When multiplied by , the residual sample for the current block can be derived.
[0142] In one embodiment, if the size of the block to which the inverse transform is applied is 8x8 and R is 16 (i.e., R / N=16 / 64=1 / 4), the RST according to FIG. 7 can be expressed by a matrix operation as shown in Equation 6 below.
[0143]
number
[0144] In Equation 6, c1 to c 16 may represent the transform coefficients for the current block. r may represent the modified transform coefficients for the current block or the residual samples for the current block based on the calculation result of Equation 6. j That is, r1 through r2, which indicate the modified transform coefficients for the current block or the residual samples for the current block, can be derived. N can be derived.
[0145] Considering the size of the inverse transformation matrix, the size of a normal inverse transformation matrix is 64x64 (NxN), while the size of a simplified inverse transformation matrix is reduced to 64x16 (NxR). Therefore, compared to performing a normal inverse transformation, memory usage when performing inverse RST can be reduced by a ratio of R / N. Also, compared to the number of multiplication operations (NxN) when using a normal inverse transformation matrix, the number of multiplication operations can be reduced by a ratio of R / N (NxR) when using a simplified inverse transformation matrix.
[0146] Meanwhile, a transform set can also be configured and applied to an 8x8 RST. That is, the corresponding 8x8 RST can be applied depending on the transform set. One transform set consists of two or three transform kernels depending on the intra-frame prediction mode, and can be configured to select one of up to four transforms, including cases where a secondary transform is not applied. When a secondary transform is not applied, the transform is considered to be an identity matrix. If the four transforms are assigned indices of 0, 1, 2, or 3 (for example, index 0 can be assigned to the identity matrix, i.e., when a secondary transform is not applied), the transform to be applied can be specified by signaling a syntax element called an NSST index for each transform coefficient block. That is, an 8x8 NSST can be specified for an 8x8 upper left block using the NSST index, and an 8x8 RST can be specified in the RST configuration. 8x8NSST and 8x8RST may indicate a transform that can be applied to an 8x8 region included in a corresponding transform coefficient block when W and H of the target block to be transformed are all equal to or greater than 8, and the 8x8 region is the upper left 8x8 region inside the corresponding transform coefficient block. Similarly, 4x4NSST and 4x4RST may indicate a transform that can be applied to a 4x4 region included in a corresponding transform coefficient block when W and H of the target block are all equal to or greater than 4, and the 4x4 region is the upper left 4x4 region inside the corresponding transform coefficient block.
[0147] Meanwhile, for example, an encoding apparatus may derive a bitstream by encoding values of syntax elements or quantized values of transform coefficients related to residuals based on various coding methods such as exponential Golomb coding, CAVLC (context-adaptive variable length coding), CABAC (context-adaptive binary arithmetic coding), etc. A decoding apparatus may decode a bitstream based on various coding methods such as exponential Golomb coding, CAVLC, CABAC, etc., and derive values of syntax elements or quantized values of transform coefficients related to residuals required for image restoration.
[0148] For example, the above coding method can be performed as follows.
[0149] FIG. 8 illustrates an exemplary CABAC (context-adaptive binary arithmetic coding) method for encoding syntax elements.
[0150] For example, in a CABAC coding process, if an input signal is a syntax element that is not a binary value, the encoding apparatus may convert the input signal into a binary value by binarizing the value of the input signal. Alternatively, if the input signal is already a binary value (i.e., the value of the input signal is a binary value), the input signal may be used as is without binarization. Here, each binary digit 0 or 1 constituting a binary value may be referred to as a bin. For example, if the binary string after binarization is 110, each of 1, 1, and 0 may be represented as a bin. The bin for a syntax element may indicate the value of the syntax element. Such binarization may be based on various binarization methods, such as a truncated rice binarization process or a fixed-length binarization process, and the binarization method for a target syntax element may be predefined. The binarization procedure may be performed by a binarization unit in an entropy encoding unit.
[0151] Thereafter, the binarized bin of the syntax element can be input to a regular coding engine or a bypass coding engine. The regular coding engine of the encoding device can assign a context model reflecting a probability value to the corresponding bin and encode the corresponding bin based on the assigned context model. The regular coding engine of the encoding device can update the context model for the corresponding bin after performing coding for each bin. A bin coded as described above can be referred to as a context-coded bin.
[0152] Meanwhile, when the binarized bin of the syntax element is input to the bypass coding engine, it can be coded as follows. For example, the bypass coding engine of the encoding device can omit the steps of estimating the probability for the input bin and updating the probability model applied to the bin after coding. When bypass coding is applied, the encoding device can code the input bin by applying a uniform probability distribution instead of assigning a context model, thereby improving the encoding speed. A bin coded as described above can be referred to as a bypass bin.
[0153] Entropy decoding can refer to a process of performing the same process as the entropy encoding in reverse order.
[0154] A decoding device (entropy decoding unit) may decode encoded image / video information. The image / video information may include partitioning-related information, prediction-related information (e.g., inter / intra prediction classification information, intra prediction mode information, inter prediction mode information, etc.), residual information, in-loop filtering-related information, etc., or may include various syntax elements related thereto. The entropy coding may be performed in units of syntax elements.
[0155] The decoding device may perform binarization on a target syntax element. Here, the binarization may be based on various binarization methods, such as a truncated rice binarization process or a fixed-length binarization process, and the binarization method for the target syntax element may be predefined. The decoding device may derive usable bin strings (candidate bin strings) for usable values of the target syntax element through the binarization procedure. The binarization procedure may be performed by a binarization unit in an entropy decoding unit.
[0156] The decoding device sequentially decodes or parses each bin for the target syntax element from the input bits in the bitstream, and compares the derived bin string with the usable bin string for the corresponding syntax element. If the derived bin string is the same as one of the usable bin strings, the value corresponding to the bin string is derived as the value of the corresponding syntax element. If not, the next bit in the bitstream can be parsed and the above procedure can be performed again. Through this process, it is possible to signal specific information (or specific syntax element) using variable-length bits in the bitstream without using start or end bits for that information. This allows relatively fewer bits to be allocated to low values, improving overall coding efficiency.
[0157] The decoding device can decode each bin in the bin string from the bitstream based on a context model or by bypassing based on an entropy coding technique such as CABAC or CAVLC.
[0158] When a syntax element is decoded based on a context model, a decoding device can receive a bin corresponding to the syntax element through a bitstream, determine a context model using the syntax element and decoding information of a block to be decoded or an adjacent block, or information on a symbol / bin decoded in a previous step, predict the occurrence probability of the received bin based on the determined context model, and perform arithmetic decoding of the bin to derive the value of the syntax element. Thereafter, the context model of the bin to be decoded next can be updated based on the determined context model.
[0159] A context model can be assigned and updated for each context-coded (regularly coded) bin, and the context model can be indicated based on a context index (ctxIdx: context index) or a context index increment (ctxInc: context index increment). ctxIdx can be derived based on ctxInc. Specifically, for example, ctxIdx indicating a context model for each of the regularly coded bins can be derived as the sum of ctxInc and a context index offset (ctxIdxOffset: context index offset). For example, the ctxInc can be derived differently for each bin. The ctxIdxOffset is indicated by the lowest value of the ctxIdx. The ctxIdxOffset is a value generally used for distinguishing between context models for other syntax elements, and a context model for one syntax element can be distinguished or derived based on ctxInc.
[0160] In the entropy encoding procedure, it can be determined whether to perform encoding via a regular coding engine or via a bypass coding engine, and the coding path can be switched accordingly. Entropy decoding can perform the same process as entropy encoding in reverse order.
[0161] Meanwhile, for example, when a syntax element is bypass decoded, a decoding device may receive bins corresponding to the syntax element through a bitstream and decode the input bins by applying a uniform probability distribution. In this case, the decoding device may omit a procedure for deriving a context model for the syntax element and a procedure for updating the context model applied to the bins after decoding.
[0162] As described above, residual samples may be derived as quantized transform coefficients through a transform and quantization process. Quantized transform coefficients are also referred to as transform coefficients. In this case, the transform coefficients in a block may be signaled in the form of residual information. The residual information may include syntax or syntax elements related to residual coding. For example, an encoding device may encode the residual information and output it in the form of a bitstream, and a decoding device may decode the residual information from the bitstream to derive residual (quantized) transform coefficients. The residual information may include syntax elements indicating whether a transform has been applied to the corresponding block, the location of the last valid transform coefficient in the block, whether valid transform coefficients exist in a sub-block, and the magnitude / sign of the valid transform coefficients, as will be described below.
[0163] Meanwhile, for example, the predictor in the encoding apparatus of Fig. 2 or the predictor in the decoding apparatus of Fig. 3 may perform intra prediction. The intra prediction will be described in more detail below.
[0164] Intra prediction may refer to a prediction that generates prediction samples for a current block based on reference samples in a picture to which the current block belongs (hereinafter referred to as the current picture). When intra prediction is applied to the current block, neighboring reference samples used for intra prediction of the current block may be derived. The neighboring reference samples of the current block may include samples adjacent to the left boundary and bottom-left neighboring samples of the current block having a size of nW×nH, a total of 2×nH samples adjacent to the top boundary and top-right neighboring samples of the current block, and one sample adjacent to the top-left neighboring sample of the current block. Alternatively, the neighboring reference samples of the current block may include upper neighboring samples of multiple columns and left neighboring samples of multiple rows. In addition, the neighboring reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block having a size of nW×nH, a total of nW samples adjacent to the bottom boundary of the current block, and one sample adjacent to the bottom-right of the current block.
[0165] However, some of the neighboring reference samples of the current block may not yet be decoded or may not be available. In this case, the decoder may substitute unavailable samples as available samples to construct neighboring reference samples to be used for prediction, or may construct neighboring reference samples to be used for prediction through interpolation of available samples.
[0166] When neighboring reference samples are derived, (i) a predicted sample can be derived based on an average or interpolation of neighboring reference samples of the current block, or (ii) the predicted sample can be derived based on a reference sample that exists in a specific (prediction) direction with respect to the predicted sample among the neighboring reference samples of the current block. Case (i) can be called a non-directional mode or a non-angular mode, and case (ii) can be called a directional mode or an angular mode.
[0167] Alternatively, the prediction sample may be generated by interpolating the first and second neighboring samples, which are located in the opposite direction of the prediction direction of the intra prediction mode of the current block, with the neighboring reference samples as a reference. This case may be referred to as linear interpolation intra prediction (LIP). Alternatively, a chroma prediction sample may be generated based on a luma sample using a linear model. This case may be referred to as a linear model (LM) mode. Alternatively, a temporary prediction sample of the current block may be derived based on filtered neighboring reference samples, and the temporary prediction sample may be weighted-summed with at least one reference sample derived according to the intra prediction mode from the existing neighboring reference samples, i.e., non-filtered neighboring reference samples. This case may be referred to as position dependent intra prediction (PDPC). In addition, intra-prediction coding can be performed by selecting a reference sample line with the highest prediction accuracy from among multiple adjacent reference sample lines of the current block, deriving a predicted sample using a reference sample located in the prediction direction on the corresponding line, and signaling the reference sample line used to a decoding device. This can be called multi-reference line (MRL) intra prediction or MRL-based intra prediction. In addition, the current block can be divided into vertical or horizontal sub-partitions, and intra prediction can be performed based on the same intra prediction mode, and adjacent reference samples can be derived and used in units of the sub-partitions. That is, in this case, the intra prediction mode for the current block is applied to the sub-partitions in the same way, and adjacent reference samples can be derived and used in units of the sub-partitions, thereby improving intra-prediction performance in some cases.Such a prediction method can be called intra sub-partitions (ISP) or ISP-based intra prediction.
[0168] The above-described intra prediction methods may be referred to as intra prediction types, distinguished from intra prediction modes. The intra prediction types may be referred to by various terms, such as intra prediction techniques or additional intra prediction modes. For example, the intra prediction types (or additional intra prediction modes, etc.) may include at least one of the above-described LIP, PDPC, MRL, and ISP. A general intra prediction method excluding a specific intra prediction type, such as LIP, PDPC, MRL, or ISP, may be referred to as a normal intra prediction type. The normal intra prediction type may be generally applied when the above-described specific intra prediction types are not applicable, and prediction may be performed based on the above-described intra prediction modes. Meanwhile, post-processing filtering may be performed on the derived prediction samples, if necessary.
[0169] That is, the intra prediction procedure may include an intra prediction mode / type determination step, a neighboring reference sample derivation step, and an intra prediction mode / type-based prediction sample derivation step. If necessary, a post-processing filtering step may be performed on the derived prediction samples.
[0170] 9 and 10 show an example in which a block to which an ISP is applied is divided into sub-blocks based on the size of the block.
[0171] Meanwhile, among the above-mentioned intra prediction types, the ISP can divide a current block horizontally or vertically and perform intra prediction on a divided block basis. That is, the ISP can divide the current block horizontally or vertically to derive sub-blocks and perform intra prediction on each of the sub-blocks. In this case, encoding / decoding can be performed on a divided sub-block basis to generate a reconstructed block, which can be used as a reference block for the next divided sub-block. Here, a sub-block is also called an intra sub-partition.
[0172] For example, when ISP is applied, the current block may be divided into two or four sub-partitions vertically or horizontally based on the size of the current block.
[0173] 9, if the size of the current block is 4x8 or 8x4, the current block may be divided into two sub-blocks. Also, referring to FIG. 10, if the size of the current block is a size other than 4x4, 4x8, and 8x4 (i.e., larger than 4x8 or 8x4), the current block may be divided into four sub-blocks.
[0174] For example, for application of an ISP, a flag indicating whether the ISP is applicable may be transmitted on a block-by-block basis, and if the ISP is applied to the current block, a flag indicating whether the partition type is horizontal or vertical, i.e., whether the partition direction is horizontal or vertical, may be encoded / decoded. The flag indicating whether the ISP is applicable may be called an ISP flag, and the ISP flag is indicated by an intra_subpartitions_mode_flag syntax element. Also, the flag indicating the partition type may be called an ISP split flag, and the ISP split flag is indicated by an intra_subpartitions_split_flag syntax element.
[0175] For example, the ISP flag or the ISP split flag indicates information indicating that ISP is not applied to the current block (IntraSubPartitionsSplitType==ISP_NO_SPLIT), information indicating that the block is split horizontally (IntraSubPartitionsSplitType==ISP_HOR_SPLIT), or information indicating that the block is split vertically (IntraSubPartitionsSplitType==ISP_VER_SPLIT). For example, the ISP flag or the ISP split flag is also referred to as ISP-related information regarding subpartitioning of the block.
[0176] Meanwhile, in addition to the above-mentioned intra prediction types, affine linear weighted intra prediction (ALWIP) can also be used. ALWIP is also called linear weighted intra prediction (LWIP), matrix weighted intra prediction (MWIP), or matrix-based intra prediction (MIP). When the ALWIP is applied to a current block, it can derive a predicted sample for the current block by: i) using neighboring reference samples on which an averaging procedure has been performed; ii) performing a matrix-vector multiplication procedure; and iii) further performing horizontal / vertical interpolation procedures as necessary.
[0177] The intra prediction mode used for the ALWIP may be configured to be different from the intra prediction mode used in the LIP, PDPC, MRL, or ISP intra prediction and normal intra prediction. The intra prediction mode for the ALWIP may be referred to as an ALWIP mode. For example, the matrix and offset used in the matrix-vector multiplication may be set differently depending on the intra prediction mode for the ALWIP. Here, the matrix may be referred to as an (affine) weighted value metric, and the offset may be referred to as an (affine) offset vector or an (affine) bias vector. In this document, the intra prediction mode for ALWIP may also be referred to as an ALWIP mode, ALWIP intra prediction mode, LWIP mode, LWIP intra prediction mode, MWIP mode, MWIP intra prediction mode, MIP mode, or MIP intra prediction mode. Specific ALWIP methods will be described later.
[0178] FIG. 11 is a diagram for explaining MIP for an 8×8 block.
[0179] To predict samples of a rectangular block of width W and height H, MIP can use samples adjacent to the left boundary and samples adjacent to the top boundary of the block. Here, the samples adjacent to the left boundary may indicate samples located on a line adjacent to the left boundary of the block and may indicate reconstructed samples. The samples adjacent to the top boundary may indicate samples located on a line adjacent to the top boundary of the block and may indicate reconstructed samples.
[0180] For example, if reconstructed samples are not available, they can be generated or derived and utilized, similar to conventional intra prediction.
[0181] The predicted signal (or predicted sample) can be generated based on an averaging process, a matrix vector multiplication process, and a (linear) interpolation process.
[0182] For example, the averaging process is a process of extracting samples outside the boundary through averaging. For example, if the width W and height H are both 4, the extracted samples are 4 samples, otherwise 8 samples. For example, in FIG. 11, bdry left and bdry top may denote the extracted left and top samples, respectively.
[0183] For example, the matrix vector multiplication process is a process of inputting the averaged samples and performing matrix vector multiplication. Alternatively, an offset can be added. For example, in FIG. 11, A k can be shown as a matrix, b kcan indicate an offset, bdry red is the reduced signal for the samples extracted through the averaging process. red , bdry left and bdry top The result is a reduced prediction signal (pred) for a set of subsampled samples in the original block. red )
[0184] For example, the (linear) interpolation process is a process in which a predicted signal is generated at the remaining positions from a predicted signal for a subsampled set by linear interpolation. Here, the linear interpolation can refer to a single linear interpolation in each direction. For example, in FIG. 11, the reduced predicted signal (pred) is shown in gray in the block. red ) and adjacent boundary samples, linear interpolation can be performed through which all predicted samples in the block can be derived.
[0185] For example, the matrix required to generate a predicted signal (or a predicted block, a predicted sample) (in FIG. 11, A k ) and the offset vector (in FIG. 11, b k ) can come from three sets of matrices (S0, S1, and S2). For example, set S0 contains 18 matrices (A0 i , i=0, 1, ..., 17) and 18 offset vectors (b0 i , i=0, 1, ..., 17). Here, each of the 18 matrices may have 16 rows and 4 columns, and each of the 18 offset vectors may have a size of 16. The matrices and offset vectors of the set S0 may be used for a 4x4 size block. For example, the set S1 may consist of 10 matrices (A1 i , i=0, 1, ..., 9) and 10 offset vectors (b1 i, i=0, 1, ..., 9). Here, each of the 10 matrices may have 16 rows and 8 columns, and each of the 10 offset vectors may have a size of 16. The matrices and offset vectors of the set S1 may be used for blocks of 4x8, 8x4, or 8x8 size. For example, the set S2 may consist of 6 matrices (A2 i , i=0, 1, ..., 5) and six offset vectors (b2 i , i=0, 1, ..., 5), where each of the six matrices may have 64 rows and 8 columns, and each of the six offset vectors may have a size of 64. The matrices and offset vectors of set S2 may be used for all remaining blocks.
[0186] Meanwhile, in one embodiment of this document, LFNST index information for a block to which MIP is applied can be signaled, or an encoding device can generate a bitstream by encoding LFNST index information for transforming a block to which MIP is applied, and a decoding device can obtain LFNST index information for transforming a block to which MIP is applied by parsing or decoding the bitstream.
[0187] For example, the LFNST index information is information for distinguishing an LFNST transform set according to the number of transforms constituting the set. For example, an optimal LFNST kernel may be selected for a block on which MIP-applied intra prediction is performed based on the LFNST index information. For example, the LFNST index information may be indicated by an st_idx syntax element or an lfnst_idx syntax element.
[0188] For example, the LFNST index information (or st_idx syntax element) can be included in the syntax as shown in the table below.
[0189] [Table 2]
[0190] [Table 3]
[0191] [Table 4]
[0192] [Table 5]
[0193] Tables 2 to 5 above show one syntax or piece of information in succession.
[0194] For example, in Tables 2 to 5, the information or semantics indicated by the intra_mip_flag syntax element, intra_mip_mpm_flag syntax element, intra_mip_mpm_idx syntax element, intra_mip_mpm_remainder syntax element, or st_idx syntax element are as shown in the following table.
[0195] [Table 6]
[0196] For example, the intra_mip_flag syntax element may indicate information on whether MIP is applied to a luma sample or the current block. Alternatively, the intra_mip_mpm_flag syntax element, intra_mip_mpm_idx syntax element, or intra_mip_mpm_remainder syntax element may indicate information on an intra prediction mode applied to the current block if MIP is applied. Alternatively, the st_idx syntax element may indicate information on a transform kernel (LFNST kernel) to be applied to LFNST for the current block. That is, the st_idx syntax element is information indicating one of the transform kernels in the LFNST transform set. Here, the st_idx syntax element may be represented by the lfnst_idx syntax element or LFNST index information.
[0197] FIG. 12 is a flow diagram illustrating how MIP and LFNST are applied.
[0198] Meanwhile, in other embodiments of this document, LFNST index information may not be signaled for blocks to which MIP is applied. Alternatively, an encoding device may generate a bitstream by encoding video information excluding LFNST index information for transforming blocks to which MIP is applied, and a decoding device may parse or decode the bitstream and perform a transform process for the blocks to which MIP is applied without LFNST index information for transforming the blocks to which MIP is applied.
[0199] For example, if LFNST index information is not signaled, the LFNST index information may be induced as a base value. For example, the LFNST index information induced as a base value is a value of 0. For example, LFNST index information with a value of 0 may indicate that LFNST is not applied to the corresponding block. In this case, not transmitting the LFNST index information has the effect of reducing the amount of bits for coding the LFNST index information. In addition, it is possible to reduce complexity by preventing the simultaneous application of MIP and LFNST, thereby also having the effect of reducing latency.
[0200] Referring to FIG. 12, first, it is determined whether MIP is applied to a corresponding block. That is, it is determined whether the value of the intra_mip_flag syntax element is 1 or 0 (S1200). For example, if the value of the intra_mip_flag syntax element is 1, it can be interpreted as true or yes, indicating that MIP is applied to the corresponding block. Therefore, MIP prediction can be performed on the corresponding block (S1210). That is, a predicted block for the corresponding block can be derived by performing MIP prediction. Thereafter, an inverse primary transform procedure can be performed (S1220) and an intra reconstruction procedure can be performed (S1230). That is, a residual block can be derived by performing an inverse primary transform on transform coefficients obtained from the bitstream, and a reconstructed block can be generated based on the predicted block and the residual block obtained by MIP prediction. That is, LFNST index information is not included for the block to which MIP is applied. Alternatively, LFNST is not applied to the block to which MIP is applied.
[0201] Alternatively, for example, if the value of the intra_mip_flag syntax element is 0, it can be interpreted as false or no, indicating that MIP is not applied to the corresponding block. That is, conventional intra prediction can be applied to the corresponding block (S1240). That is, conventional intra prediction can be performed to derive a predicted block for the corresponding block. Thereafter, it can be determined whether LFNST is applied to the corresponding block based on LFNST index information for the corresponding block. That is, it can be determined whether the value of the st_idx syntax element is greater than 0 (S1250). For example, if the value of the st_idx syntax element is greater than 0, an inverse LFNST transform procedure can be performed using the transform kernel indicated by the st_idx syntax element (S1260). Alternatively, if the value of the st_idx syntax element is not greater than 0, this can indicate that LFNST is not applied to the corresponding block, and the inverse LFNST transform procedure is not performed. Thereafter, an inverse primary transform procedure can be performed (S1220), and an intra reconstruction procedure can be performed (S1230). That is, a residual block can be derived by performing an inverse primary transform on transform coefficients obtained from a bitstream, and a reconstruction block can be generated based on the residual block and a prediction block obtained by conventional intra prediction.
[0202] In summary, when MIP is applied, an MIP prediction block can be generated without decoding LFNST index information, and the final intra-reconstructed signal can be generated by applying an inverse linear transform to the received coefficients.
[0203] On the other hand, if MIP is not applied, the LFNST index information is decoded, and if the flag (or LFNST index information or st_idx syntax element) value is greater than 0, the inverse LFNST transform and inverse linear transform are applied to the received coefficients to generate the final intra-reconstructed signal.
[0204] For example, for the above-mentioned procedure, the LFNST index information (or the st_idx syntax element) can be included in the syntax or video information and signaled based on information on whether MIP is applied (or the intra_mip_flag syntax element). Alternatively, the LFNST index information (or the st_idx syntax element) can be selectively constructed / parsed / signaled / transmitted / received with reference to information on whether MIP is applied (or the intra_mip_flag syntax element). For example, the LFNST index information is indicated by the st_idx syntax element or the lfnst_idx syntax element.
[0205] For example, the LFNST index information (or st_idx syntax element) can be included as shown in Table 7.
[0206] [Table 7]
[0207] For example, referring to Table 7, the st_idx syntax element may be included based on the intra_mip_flag syntax element, i.e., if the value of the intra_mip_flag syntax element is 0 (!intra_mip_flag), the st_idx syntax element may be included.
[0208] Alternatively, for example, the LFNST index information (or lfnst_idx syntax element) can be included as shown in Table 8.
[0209] [Table 8]
[0210] For example, referring to Table 8, the lfnst_idx syntax element can be included based on the intra_mip_flag syntax element. That is, if the value of the intra_mip_flag syntax element is 0 (!intra_mip_flag), the lfnst_idx syntax element can be included.
[0211] For example, referring to Table 7 or Table 8, the st_idx syntax element or the lfnst_idx syntax element may be included based on ISP (Intra Sub-Partitions)-related information regarding block subpartitioning. For example, the ISP-related information may include an ISP flag or an ISP split flag, which may indicate information on whether subpartitioning is performed on the block. For example, the information on whether subpartitioning is performed is indicated by IntraSubPartitionsSplitType, where ISP_NO_SPLIT may indicate that subpartitioning is not performed, ISP_HOR_SPLIT may indicate that subpartitioning is performed horizontally, and ISP_VER_SPLIT may indicate that subpartitioning is performed vertically.
[0212] The residual-related information includes the LFNST index information based on the MIP flag and the ISP-related information.
[0213] Meanwhile, in other embodiments of this document, LFNST index information for blocks to which MIP is applied can be derived without being separately signaled. Alternatively, an encoding device can generate a bitstream by encoding video information excluding LFNST index information for transforming blocks to which MIP is applied, and a decoding device can parse or decode the bitstream to derive and obtain LFNST index information for transforming blocks to which MIP is applied, and perform a transform process for the blocks based on the LFNST index information.
[0214] That is, LFNST index information for a corresponding block is not decoded, but an index for distinguishing the transforms that constitute the LFNST transform set can be determined through a guided process. Alternatively, a separate optimized transform kernel can be determined through a guided process to be used for the block to which MIP is applied. In this case, the optimal LFNST kernel can be selected for the block to which MIP is applied, while the amount of bits required for coding the kernel can be reduced.
[0215] For example, the LFNST index information can be derived based on at least one of reference line index information for intra prediction, intra prediction mode information, block size information, and MIP applicability information.
[0216] Meanwhile, in other embodiments of this document, binarization can be performed to signal LFNST index information for blocks to which MIP is applied. For example, the number of applicable LFNST transformations varies depending on whether MIP is applied to the current block, and therefore the binarization method for LFNST index information can be selectively switched.
[0217] For example, one LFNST kernel can be used for blocks to which MIP is applied, and this kernel is one of the LFNST kernels applied to blocks to which MIP is not applied. Alternatively, instead of using the existing LFNST kernel for blocks to which MIP is applied, a separate kernel optimized for blocks to which MIP is applied can be defined and used.
[0218] In this case, a reduced number of LFNST kernels are used for blocks to which MIP is applied compared to blocks to which it is not applied, thereby reducing the overhead of signaling LFNST index information and reducing complexity.
[0219] For example, the LFNST index information can be binarized using the following binarization method:
[0220] [Table 9]
[0221] Referring to Table 9, for example, the st_idx syntax element can be binarized to TR (Truncated Rice) if MIP is not applied to the corresponding block, if intra_mip_flag[][] == false, or if the value of the intra_mip_flag syntax element is 0. For example, in this case, the input parameter cMax can have a value of 2, and cRiceParam can have a value of 0.
[0222] Alternatively, for example, if MIP is applied to the corresponding block, the st_idx syntax element may be binarized to FL (Fixed-Length) if intra_mip_flag[][] == true or if the value of the intra_mip_flag syntax element is 1. For example, in this case, the input parameter cMax may have a value of 1.
[0223] Here, the st_idx syntax element can indicate LFNST index information and can also be expressed as the lfnst_idx syntax element.
[0224] Meanwhile, other embodiments of this document may signal LFNST-related information for blocks to which MIP is applied.
[0225] For example, the LFNST index information may include one syntax element, and may indicate whether LFNST is applied and the type of transform kernel used for LFNST based on the one syntax element. In this case, the LFNST index information may be represented by, for example, the st_idx syntax element or the lfnst_idx syntax element.
[0226] Alternatively, for example, the LFNST index information may include one or more syntax elements and may indicate information on whether LFNST is applied and information on the type of transform kernel used for LFNST based on the one or more syntax elements. For example, the LFNST index information may include two syntax elements. In this case, the LFNST index information may include a syntax element indicating information on whether LFNST is applied and a syntax element indicating information on the type of transform kernel used for LFNST. For example, the information on whether LFNST is applied may be indicated as an LFNST flag, and may be represented by the st_flag syntax element or the lfnst_flag syntax element. Alternatively, for example, the information on the type of transform kernel used for LFNST may be indicated as a transform kernel index flag, and may be represented by the st_idx_flag syntax element, the st_kernel_flag syntax element, the lfnst_idx_flag syntax element, or the lfnst_kernel_flag syntax element. For example, when the LFNST index information includes one or more syntax elements as described above, the LFNST index information is also referred to as LFNST-related information.
[0227] For example, LFNST-related information (e.g., st_flag syntax element or st_idx_flag syntax element) may be included as shown in Table 10.
[0228] [Table 10]
[0229] Meanwhile, a different number of LFNST transforms (kernels) may be used for blocks to which MIP is applied than for blocks to which MIP is not applied. For example, only one LFNST transform kernel may be used for blocks to which MIP is applied. For example, the one LFNST transform kernel may be one of the LFNST kernels applied to blocks to which MIP is not applied. Alternatively, instead of using the LFNST kernel that was previously used for blocks to which MIP is applied, a separate kernel optimized for blocks to which MIP is applied may be defined and used.
[0230] In this case, among the LFNST-related information, information regarding the type of transform kernel used for LFNST (e.g., transform kernel index flag) can be selectively signaled depending on whether MIP is applied, and the LFNST-related information at this time can be included, for example, as shown in Table 11.
[0231] [Table 11]
[0232] That is, referring to Table 11, information on the type of transform kernel used for LFNST (or the st_idx_flag syntax element) can be included based on information on whether MIP is applied to the corresponding block (or the intra_mip_flag syntax element). Alternatively, for example, the st_idx_flag syntax element can be signaled when MIP is not applied to the corresponding block (!intra_mip_flag).
[0233] For example, in Table 10 or Table 11, the information or semantics indicated by the st_flag syntax element or the st_idx_flag syntax element are as shown in the table below.
[0234] [Table 12]
[0235] For example, the st_flag syntax element may indicate information on whether a secondary transformation is applied. For example, if the value of the st_flag syntax element is 0, it may indicate that a secondary transformation is not applied, and if the value is 1, it may indicate that a secondary transformation is applied. For example, the st_idx_flag syntax element may indicate information on which secondary transformation kernel is applied from two candidate kernels in the selected transformation set.
[0236] For example, the LFNST related information can be binarized using the following binarization method:
[0237] [Table 13]
[0238] Referring to Table 13, for example, the st_flag syntax element can be binarized to FL. For example, in this case, the input parameter cMax can have a value of 1. Or, for example, the st_idx_flag syntax element can be binarized to FL. For example, in this case, the input parameter cMax can have a value of 1.
[0239] For example, referring to Table 10 or Table 11, the descriptor of the st_flag syntax element or the st_idx_flag syntax element is ae(v). Here, ae(v) may indicate context-adaptive arithmetic entropy coding. Alternatively, a syntax element whose descriptor is ae(v) is a context-adaptive arithmetic entropy-coded syntax element. That is, context-adaptive arithmetic entropy coding may be applied to LFNST-related information (e.g., the st_flag syntax element or the st_idx_flag syntax element). Alternatively, the LFNST-related information (e.g., the st_flag syntax element or the st_idx_flag syntax element) is information or a syntax element to which context-adaptive arithmetic entropy coding has been applied. Alternatively, LFNST-related information (e.g., the bins of the bin string of the st_flag syntax element or the st_idx_flag syntax element) may be encoded / decoded based on the above-mentioned CABAC, etc. Here, context-adaptive arithmetic entropy coding may also be referred to as context model-based coding, context coding, or regular coding.
[0240] For example, the context index increment (ctxInc) of LFNST-related information (e.g., st_flag syntax element or st_idx_flag syntax element) or ctxInc according to the bin position of the st_flag syntax element or st_idx_flag syntax element may be assigned or determined as shown in Table 14. Alternatively, a context model may be selected according to the bin position of the st_flag syntax element or st_idx_flag syntax element as shown in Table 14. Alternatively, a context model may be selected based on ctxInc according to the bin position of the st_flag syntax element or st_idx_flag syntax element that is assigned or determined as shown in Table 14.
[0241] [Table 14]
[0242] Referring to Table 14, for example, the st_flag syntax element (the bin or the first bin of the bin string) can use two context models (or ctxIdx), and the context model can be selected based on ctxInc, which has a value of 0 or 1. Alternatively, for example, the st_idx_flag syntax element (the bin or the first bin of the bin string) can be subjected to bypass coding, or can be coded using a uniform probability distribution.
[0243] For example, the ctxInc of (the bin or the first bin of the bin string of) the st_flag syntax element can be determined based on Table 15 below.
[0244] [Table 15]
[0245] Referring to Table 15, for example, ctxInc of the st_flag syntax element (the bin or the first bin of the bin string) can be determined based on the MTS index (or the tu_mts_idx syntax element) or tree type information (treeType). For example, ctxInc can be derived as 1 if the MTS index value is 0 and the tree type is not a single tree. Alternatively, ctxInc can be derived as 0 if the MTS index value is not 0 or the tree type is a single tree.
[0246] In this case, a reduced number of LFNST kernels are used for blocks to which MIP is applied compared to blocks to which it is not applied, thereby reducing the overhead of signaling LFNST index information and reducing complexity.
[0247] Meanwhile, in another embodiment of this document, an LFNST kernel can be derived and used for a block to which MIP is applied. That is, information about the LFNST kernel can be derived without separately signaling. Alternatively, an encoding device can generate a bitstream by encoding video information excluding LFNST index information for transforming a block to which MIP is applied or information about the (type of) transform kernel used for LFNST, and a decoding device can parse or decode the bitstream to induce and obtain LFNST index information for transforming a block to which MIP is applied or information about the transform kernel used for LFNST, and perform a transform process for the block based on the obtained information.
[0248] That is, LFNST index information or information on the transform kernel used for LFNST for the corresponding block is not decoded, but an index that distinguishes the transforms that make up the LFNST transform set can be determined through a guided process. Alternatively, a separate optimized transform kernel can be determined through a guided process to be used for the block to which MIP is applied. In this case, while selecting the optimal LFNST kernel for the block to which MIP is applied, the amount of bits required for coding the kernel can be reduced.
[0249] For example, LFNST index information or information on the transform kernel used for LFNST can be derived based on at least one of reference line index information for intra prediction, intra prediction mode information, block size information, or MIP applicability information.
[0250] In the above-described embodiments of this document, fixed-length (FL) binarization refers to a method of binarizing a symbol with a fixed length, such as a specific number of bits. The specific number of bits may be predefined or may be determined based on cMax. Truncated unary (TU) binarization refers to a method of binarizing a symbol with a variable length using as many 1s as the number of symbols to be represented and one 0, and if the number of symbols to be represented is equal to the maximum length, no 0s are added. The maximum length may be determined based on cMax. Truncated rice (TR) binarization refers to a method of binarizing a symbol with a concatenated prefix and suffix, such as TU+FL, and uses maximum length and shift information. However, if the shift information has a value of 0, the method is the same as TU. Here, the maximum length may be determined based on cMax, and the shift information may be determined based on cRiceParam.
[0251] 13 and 14 show a schematic diagram of an example of a video / image encoding method and associated components according to an embodiment of the present document.
[0252] The method disclosed in FIG. 13 may be performed by the encoding apparatus disclosed in FIG. 2 or FIG. 14. Specifically, for example, S1300 to S1310 of FIG. 13 may be performed by the prediction unit 220 of the encoding apparatus of FIG. 14, S1320 to S1330 of FIG. 13 may be performed by the residual processing unit 230 of the encoding apparatus of FIG. 14, and S1340 of FIG. 13 may be performed by the entropy encoding unit 240 of the encoding apparatus of FIG. 14. Also, although not shown in FIG. 13, in FIG. 14, the prediction unit 220 of the encoding apparatus may derive prediction samples or prediction-related information, the residual processing unit 230 of the encoding apparatus may derive residual information from original samples or prediction samples, and the entropy encoding unit 240 of the encoding apparatus may generate a bitstream from the residual information or prediction-related information. The method disclosed in FIG. 13 may include embodiments detailed in this document.
[0253] Referring to FIG. 13, an encoding apparatus may perform intra prediction on a current block to generate a predicted sample of the current block (S1300), and may generate intra prediction type information for the current block based on the performed intra prediction (S1310). For example, the encoding apparatus may determine an intra prediction mode and / or an intra prediction type for the current block by considering a rate distortion (RD) cost. The intra prediction mode information is information indicating the determined intra prediction mode, and the intra prediction type information is information indicating the determined intra prediction type. That is, the encoding apparatus may generate intra prediction mode information based on the determined intra prediction mode. Alternatively, the encoding apparatus may generate intra prediction type information based on the determined intra prediction type.
[0254] The intra prediction type information may indicate whether a normal intra prediction type using a reference line adjacent to the current block, a multi-reference line (MRL) using a reference line not adjacent to the current block, an intra sub-partition (ISP) that performs sub-partitioning on the current block, or a matrix-based intra prediction (MIP) that uses a matrix is applicable.
[0255] For example, the intra prediction type information may include an MIP flag indicating whether MIP is applied to the current block. Alternatively, the intra prediction type information may include ISP (Intra Sub-Partitions)-related information regarding ISP subpartitioning of the current block. For example, the ISP-related information may include an ISP flag indicating whether ISP is applied to the current block or an ISP split flag indicating the split direction. Alternatively, the intra prediction type information may include the MIP flag and the ISP-related information. For example, the MIP flag may indicate an intra_mip_flag syntax element. Alternatively, the ISP flag may indicate an intra_subpartitions_mode_flag syntax element, and the ISP split flag may indicate an intra_subpartitions_split_flag syntax element.
[0256] The intra prediction mode information may indicate an intra prediction mode applied to a current block from among the intra prediction modes. For example, the intra prediction modes may include intra prediction modes nos. 0 to 66. For example, intra prediction mode no. 0 may indicate a planar mode, and intra prediction mode no. 1 may indicate a DC mode. In addition, intra prediction modes nos. 2 to 66 may indicate directional or angular intra prediction modes and indicate a reference direction. Alternatively, intra prediction modes nos. 0 and 1 may indicate non-directional or non-angular intra prediction modes. This has been described in detail with reference to FIG. 5.
[0257] For example, the encoding apparatus may generate prediction-related information for the current block, and the prediction-related information may include intra-prediction mode information and / or intra-prediction type information. For example, the encoding apparatus may generate the prediction samples based on the intra-prediction mode and / or intra-prediction type. Alternatively, the encoding apparatus may generate the prediction samples based on the prediction-related information.
[0258] The encoding apparatus may generate residual samples of the current block based on the predicted samples (S1320). For example, the encoding apparatus may generate the residual samples based on original samples (e.g., input video signals) and the predicted samples. Alternatively, for example, the encoding apparatus may generate the residual samples based on the difference between the original samples and the predicted samples.
[0259] The encoding apparatus may generate residual information including information about transform coefficients for a current block based on residual samples (S1330). For example, the encoding apparatus may derive transform coefficients by performing a primary transform based on the residual samples. Alternatively, the encoding apparatus may derive temporary transform coefficients by performing a primary transform based on the residual samples, and may derive transform coefficients by applying an LFNST to the temporary transform coefficients. For example, the encoding apparatus may generate the LFNST index information when the LFNST is applied. That is, the encoding apparatus may generate the LFNST index information based on a transform kernel used to generate the information about the transform coefficients.
[0260] For example, the encoding apparatus may perform quantization based on transform coefficients to derive quantized transform coefficients. The encoding apparatus may also generate information about the quantized transform coefficients based on the quantized transform coefficients. The residual information may include information about the quantized transform coefficients. Here, the information about the quantized transform coefficients may also be simply referred to as information about the transform coefficients.
[0261] The encoding apparatus may encode video information including intra-prediction type information and residual information (S1340). For example, the residual information may include information about (quantized) transform coefficients, as described above. Also, for example, the video information may include the LFNST index information. Alternatively, for example, the residual information of the video information may not include the LFNST index information.
[0262] For example, the image information may include LFNST index information indicating information about non-separable transform for low-frequency transform coefficients of the current block based on the MIP flag. Alternatively, the residual-related information may include LFNST index information based on the MIP flag or the size of the current block. Alternatively, the residual-related information may include LFNST index information based on the MIP flag or information about the current block. Here, the information about the current block may include at least one of the size of the current block, tree structure information indicating a single tree or a dual tree, an LFNST usable flag, or ISP-related information. For example, the MIP flag is one of a plurality of conditions for determining whether the residual-related information includes LFNST index information. However, the residual-related information may also include LFNST index information based on other conditions, such as the size of the current block, in addition to the MIP flag. However, the following description will focus on the MIP flag. Here, the LFNST index information may be referred to as transform index information. Alternatively, the LFNST index information may be represented by an st_idx syntax element or an lfnst_idx syntax element.
[0263] For example, the video information may include the LFNST index information based on the MIP flag indicating that the MIP is not applied. Alternatively, for example, the video information may not include the LFNST index information based on the MIP flag indicating that the MIP is applied. That is, if the MIP flag indicates that MIP is applied to the current block (e.g., if the value of an intra_mip_flag syntax element is 1), the video information may not include the LFNST index information, and if the MIP flag indicates that MIP is not applied to the current block (e.g., if the value of an intra_mip_flag syntax element is 0), the video information may include the LFNST index information.
[0264] Alternatively, for example, the image information may include the LFNST index information based on the MIP flag and the ISP-related information. For example, if the MIP flag indicates that MIP is not applied to the current block (e.g., if the value of the intra_mip_flag syntax element is 0), the residual-related information may include the LFNST index information with reference to the ISP-related information (IntraSubPartitionsSplitType). Here, IntraSubPartitionsSplitType may indicate that ISP is not applied (ISP_NO_SPLIT), is applied horizontally (ISP_HOR_SPLIT), or is applied vertically (ISP_VER_SPLIT), and this may be derived based on the ISP flag or the ISP split flag.
[0265] For example, the LFNST index information may be induced or derived and used when the MIP flag indicates that the MIP is applied to the current block, and in this case, the video information does not include the LFNST index information. That is, the encoding apparatus does not signal the LFNST index information. For example, the LFNST index information may be induced or derived and used based on at least one of reference line index information for the current block, intra-prediction mode information of the current block, size information of the current block, and the MIP flag.
[0266] Alternatively, for example, the LFNST index information may include an LFNST flag indicating whether a non-separable transform is applied to the low-frequency transform coefficients of the current block and / or a transform kernel index flag indicating a transform kernel applied to the current block from among candidate transform kernels. That is, the LFNST index information may indicate information about a non-separable transform for the low-frequency transform coefficients of the current block based on one syntax element or one piece of information, or may be indicated based on two syntax elements or two pieces of information. For example, the LFNST flag may be represented by an st_flag syntax element or an lfnst_flag syntax element, and the transform kernel index flag may be represented by an st_idx_flag syntax element, an st_kernel_flag syntax element, an lfnst_idx_flag syntax element, or an lfnst_kernel_flag syntax element. Here, the transform kernel index flag may be included in the LFNST index information based on the LFNST flag indicating that the non-separable transform is applied and the MIP flag indicating that the MIP is not applied. That is, when the LFNST flag indicates that the non-separable transform is applied and the MIP flag indicates that the MIP is applied, the LFNST index information may include the transform kernel index flag.
[0267] For example, the LFNST flag and the transform kernel index flag may be induced or derived and used when the MIP flag indicates that the MIP is applied to the current block. In this case, the video information does not include the LFNST flag and the transform kernel index flag. That is, the encoding apparatus does not signal the LFNST flag and the transform kernel index flag. For example, the LFNST flag and the transform kernel index flag may be induced or derived and used based on at least one of reference line index information for the current block, intra prediction mode information of the current block, size information of the current block, and the MIP flag.
[0268] For example, if the video information includes the LFNST index information, the LFNST index information is represented through binarization. For example, based on the MIP flag indicating that the MIP is not applied, the LFNST index information (e.g., the st_idx syntax element or the lfnst_idx syntax element) is represented through TR (Truncated Rice)-based binarization, and based on the MIP flag indicating that the MIP is applied, the LFNST index information (e.g., the st_idx syntax element or the lfnst_idx syntax element) is represented through FL (Fixed Length)-based binarization. That is, if the MIP flag indicates that MIP is not applied to the current block (e.g., if the intra_mip_flag syntax element is 0 or false), the LFNST index information (e.g., the st_idx syntax element or the lfnst_idx syntax element) is represented through TR-based binarization, and if the MIP flag indicates that MIP is applied to the current block (e.g., if the intra_mip_flag syntax element is 1 or true), the LFNST index information (e.g., the st_idx syntax element or the lfnst_idx syntax element) is represented through FL-based binarization.
[0269] Alternatively, for example, if the video information includes the LFNST index information and the LFNST index information includes the LFNST flag and the transform kernel index flag, the LFNST flag and the transform kernel index flag are represented through FL (Fixed Length) based binarization.
[0270] For example, the LFNST index information can be represented as a bin string (bin) through binarization as described above, and can be coded to generate a bit, a bit string, or a bit stream.
[0271] For example, the (first) bin of the bin string of the LFNST flag may be coded based on context coding, and the context coding may be performed based on a context index increment / decrement value related to the LFNST flag. Here, context coding is coding performed based on a context model and is also called regular coding. In addition, the context model is represented by a context index (ctxIdx), and the context index is represented based on a context index increment / decrement (ctxInc) and a context index offset (ctxIdxOffset). For example, the context index increment / decrement value is represented as one of candidates including 0 and 1. For example, the context index increment / decrement value may be determined based on an MTS index (e.g., an mts_idx syntax element or a tu_mts_idx syntax element) indicating a transform kernel set to be used for the current block from among transform kernel sets and tree type information indicating a partition structure of the current block. Here, the tree type information may indicate a single tree indicating that the partition structures of the luma component and the chroma component of the current block are the same, or a dual tree indicating that the partition structures of the luma component and the chroma component of the current block are different from each other.
[0272] For example, the (first) bin of the bin string of the transform kernel index flag may be coded based on bypass coding, where bypass coding may indicate that context coding is performed based on a uniform probability distribution, and thus, coding efficiency may be improved by omitting an update procedure for context coding.
[0273] 13, for example, the encoding apparatus may generate reconstructed samples based on the residual samples and the predicted samples, and may derive reconstructed blocks and reconstructed pictures based on the reconstructed samples.
[0274] For example, an encoding device may encode video information including all or part of the above-described information (or syntax elements) to generate a bitstream or encoded information. Alternatively, the video information may be output in the form of a bitstream. The bitstream or encoded information may be transmitted to a decoding device via a network or a storage medium. Alternatively, the bitstream or encoded information may be stored in a computer-readable storage medium, and the bitstream or encoded information may be generated by the above-described video encoding method.
[0275] 15 and 16 show a schematic diagram of an example of a video / image decoding method and associated components according to an embodiment of the present document.
[0276] The method disclosed in Figure 15 may be performed by the decoding device disclosed in Figure 3 or Figure 16. Specifically, for example, S1500 of Figure 15 may be performed by the entropy decoding unit 310 of the decoding device in Figure 16, S1510 of Figure 15 may be performed by the residual processing unit 320 of the decoding device in Figure 16, and S1520 of Figure 15 may be performed by the adder 340 of the decoding device in Figure 16. Also, although not shown in Figure 15, in Figure 16, the entropy decoding unit 310 of the decoding device may derive prediction-related information or residual information from a bitstream, the residual processing unit 320 of the decoding device may derive residual samples from the residual information, the prediction unit 330 of the decoding device may derive prediction samples from the prediction-related information, and the adder 340 of the decoding device may derive reconstructed blocks or reconstructed pictures from the residual samples or prediction samples. The method disclosed in FIG. 15 may include the embodiments detailed herein.
[0277] 15, a decoding apparatus may receive video information including residual information for a current block (S1500). For example, the video information may further include intra-prediction type information. For example, the decoding apparatus may obtain intra-prediction type information or residual-related information by passing or decoding a bitstream. Here, the bitstream is also referred to as encoded (video) information.
[0278] For example, the decoding device may obtain prediction-related information from a bitstream, and the prediction-related information may include intra-prediction mode information and / or intra-prediction type information. For example, the decoding device may generate a prediction sample for the current block based on the prediction-related information.
[0279] The intra prediction mode information may indicate an intra prediction mode applied to a current block from among the intra prediction modes. For example, the intra prediction modes may include intra prediction modes nos. 0 to 66. For example, intra prediction mode no. 0 may indicate a planar mode, and intra prediction mode no. 1 may indicate a DC mode. In addition, intra prediction modes nos. 2 to 66 may indicate directional or angular intra prediction modes and indicate a reference direction. Alternatively, intra prediction modes nos. 0 and 1 may indicate non-directional or non-angular intra prediction modes. This has been described in detail with reference to FIG. 5.
[0280] In addition, the intra prediction type information may indicate whether a normal intra prediction type using a reference line adjacent to the current block, a multi-reference line (MRL) using a reference line not adjacent to the current block, an intra sub-partition (ISP) that performs sub-partitioning on the current block, or a matrix-based intra prediction (MIP) that uses a matrix is applicable.
[0281] For example, a decoding device may obtain residual information from a bitstream. Here, the residual information may indicate information used to derive residual samples, and may include information about the residual samples, (inverse) transform-related information, and / or (inverse) quantization-related information. For example, the residual information may include information about (quantized) transform coefficients.
[0282] For example, the intra prediction type information may include an MIP flag indicating whether MIP is applied to the current block. Alternatively, the intra prediction type information may include ISP (Intra Sub-Partitions)-related information regarding ISP subpartitioning of the current block. For example, the ISP-related information may include an ISP flag indicating whether ISP is applied to the current block or an ISP split flag indicating the split direction. Alternatively, the intra prediction type information may include the MIP flag and the ISP-related information. For example, the MIP flag may indicate an intra_mip_flag syntax element. Alternatively, the ISP flag may indicate an intra_subpartitions_mode_flag syntax element, and the ISP split flag may indicate an intra_subpartitions_split_flag syntax element.
[0283] For example, the image information may include Low Frequency Non-Separable Transform (LFNST) index information indicating information about non-separable transform for low frequency transform coefficients of the current block based on the MIP flag. Alternatively, the residual-related information may include LFNST index information based on the MIP flag or the size of the current block. Alternatively, the residual-related information may include LFNST index information based on the MIP flag or information about the current block. Here, the information about the current block may include at least one of the size of the current block, tree structure information indicating a single tree or a dual tree, an LFNST usable flag, or ISP-related information. For example, the MIP flag is one of a plurality of conditions for determining whether the residual-related information includes LFNST index information. The residual-related information may also include LFNST index information based on other conditions, such as the size of the current block, in addition to the MIP flag. However, the following description will focus on the MIP flag. Here, the LFNST index information may also be referred to as transform index information. Alternatively, the LFNST index information can be expressed by the st_idx or lfnst_idx syntax element.
[0284] For example, the video information may include the LFNST index information based on the MIP flag indicating that the MIP is not applied. Alternatively, the video information may not include the LFNST index information based on the MIP flag indicating that the MIP is applied. That is, if the MIP flag indicates that MIP is applied to the current block (e.g., if the value of an intra_mip_flag syntax element is 1), the video information may not include the LFNST index information, and if the MIP flag indicates that MIP is not applied to the current block (e.g., if the value of an intra_mip_flag syntax element is 0), the video information may include the LFNST index information.
[0285] Alternatively, for example, the image information may include the LFNST index information based on the MIP flag and the ISP-related information. For example, if the MIP flag indicates that MIP is not applied to the current block (e.g., if the value of the intra_mip_flag syntax element is 0), the image information may include the LFNST index information by referring to the ISP-related information (IntraSubPartitionsSplitType). Here, IntraSubPartitionsSplitType may indicate that ISP is not applied (ISP_NO_SPLIT), is applied horizontally (ISP_HOR_SPLIT), or is applied vertically (ISP_VER_SPLIT), and this may be derived based on the ISP flag or the ISP split flag.
[0286] For example, if the video information does not include the LFNST index information, i.e., if the LFNST index information is not signaled, because the MIP flag indicates that the MIP is applied to the current block, the LFNST index information can be induced or derived. For example, the LFNST index information can be derived based on at least one of reference line index information for the current block, intra-prediction mode information of the current block, size information of the current block, and the MIP flag.
[0287] Alternatively, for example, the LFNST index information may include an LFNST flag indicating whether a non-separable transform is applied to the low-frequency transform coefficients of the current block and / or a transform kernel index flag indicating a transform kernel applied to the current block from among candidate transform kernels. That is, the LFNST index information may indicate information about a non-separable transform for the low-frequency transform coefficients of the current block based on one syntax element or one piece of information, or may be indicated based on two syntax elements or two pieces of information. For example, the LFNST flag may be represented by an st_flag syntax element or an lfnst_flag syntax element, and the transform kernel index flag may be represented by an st_idx_flag syntax element, an st_kernel_flag syntax element, an lfnst_idx_flag syntax element, or an lfnst_kernel_flag syntax element. Here, the transform kernel index flag may be included in the LFNST index information based on the LFNST flag indicating that the non-separable transform is applied and the MIP flag indicating that the MIP is not applied. That is, when the LFNST flag indicates that the non-separable transform is applied and the MIP flag indicates that the MIP is applied, the LFNST index information may include the transform kernel index flag.
[0288] For example, if the MIP flag indicates that the MIP is applied to the current block, and the video information does not include the LFNST flag and the transform kernel index flag, i.e., if the LFNST flag and the transform kernel index flag are not signaled, the LFNST flag and the transform kernel index flag may be induced or derived. For example, the LFNST flag and the transform kernel index flag may be derived based on at least one of reference line index information for the current block, intra prediction mode information of the current block, size information of the current block, and the MIP flag.
[0289] For example, if the video information includes the LFNST index information, the LFNST index information may be derived through binarization. For example, based on the MIP flag indicating that the MIP is not applied, the LFNST index information (e.g., the st_idx syntax element or the lfnst_idx syntax element) may be derived through TR (Truncated Rice)-based binarization, and based on the MIP flag indicating that the MIP is applied, the LFNST index information (e.g., the st_idx syntax element or the lfnst_idx syntax element) may be derived through FL (Fixed Length)-based binarization. That is, if the MIP flag indicates that MIP is not applied to the current block (e.g., if the intra_mip_flag syntax element is 0 or false), the LFNST index information (e.g., the st_idx syntax element or the lfnst_idx syntax element) can be derived through TR-based binarization, and if the MIP flag indicates that MIP is applied to the current block (e.g., if the intra_mip_flag syntax element is 1 or true), the LFNST index information (e.g., the st_idx syntax element or the lfnst_idx syntax element) can be derived through FL-based binarization.
[0290] Alternatively, for example, if the video information includes the LFNST index information and the LFNST index information includes the LFNST flag and the transform kernel index flag, the LFNST flag and the transform kernel index flag can be derived through FL (Fixed Length) based binarization.
[0291] For example, the LFNST index information can derive candidates through binarization as described above, and the bins indicated by passing or decoding the bitstream can be compared with the candidates, thereby obtaining the LFNST index information.
[0292] For example, the (first) bin of the bin string of the LFNST flag may be derived based on context coding, and the context coding may be performed based on a context index increment / decrement value related to the LFNST flag. Here, context coding is coding performed based on a context model and is also called regular coding. In addition, the context model is represented by a context index (ctxIdx), and the context index may be derived based on a context index increment / decrement (ctxInc) and a context index offset (ctxIdxOffset). For example, the context index increment / decrement value may be derived as one of candidates including 0 and 1. For example, the context index increment / decrement value may be derived based on an MTS index (e.g., an mts_idx syntax element or a tu_mts_idx syntax element) indicating a transform kernel set to be used for the current block from among transform kernel sets and tree type information indicating a partition structure of the current block. Here, the tree type information may indicate a single tree indicating that the partition structures of the luma component and the chroma component of the current block are the same, or a dual tree indicating that the partition structures of the luma component and the chroma component of the current block are different from each other.
[0293] For example, the (first) bin of the bin string of the transform kernel index flag may be derived based on bypass coding, where bypass coding may indicate that context coding is performed based on a uniform probability distribution, and thus, coding efficiency may be improved by omitting an update procedure of context coding.
[0294] For example, the decoding device may generate the residual samples from information about the transform coefficients based on the LFNST index information. For example, the residual information may include information about the transform coefficients of the current block. Alternatively, for example, the residual-related information may include information about quantized transform coefficients, and the decoding device may derive quantized transform coefficients for the current block based on the information about the quantized transform coefficients. For example, the decoding device may derive transform coefficients for the current block by performing inverse quantization on the quantized transform coefficients. Alternatively, for example, the decoding device may generate residual samples from the derived transform coefficients using the LFNST index information.
[0295] For example, if the LFNST index information is included in the video information or if the LFNST index information is induced or derived, the decoding device may perform LFNST on the transform coefficients according to the LFNST index information and derive modified transform coefficients. Thereafter, the decoding device may generate the residual samples based on the modified transform coefficients. Alternatively, for example, if the LFNST index information is not included in the video information or indicates that LFNST is not to be performed, the decoding device may generate residual samples based on the transform coefficients without performing LFNST on the transform coefficients.
[0296] The decoding apparatus may generate reconstructed samples for the current block based on the residual samples (S1520). For example, the decoding apparatus may generate reconstructed samples based on the predicted samples and the residual samples. Also, for example, a reconstructed block and a reconstructed picture may be derived based on the reconstructed samples.
[0297] For example, a decoding device may decode a bitstream or encoded information to obtain video information including all or part of the above-described information (or syntax elements). The bitstream or encoded information may be stored in a computer-readable storage medium, and the above-described decoding method may be performed.
[0298] In the above-described embodiments, the methods are described with reference to flow charts as a series of steps or blocks, but the embodiments are not limited to the order of the steps, and certain steps may occur in a different order or simultaneously with other steps than those described. Furthermore, those skilled in the art will understand that the steps shown in the flow charts are not exclusive, and other steps may be included, or one or more steps in the flow charts may be deleted without affecting the scope of the embodiments herein.
[0299] The methods according to the embodiments of the present document described above can be implemented in software form, and the encoding device and / or decoding device according to the present document can be included in devices that perform video processing, such as TVs, computers, smartphones, set-top boxes, and display devices.
[0300] In this document, when an embodiment is implemented in software, the method described above may be implemented with modules (processes, functions, etc.) that perform the functions described above. The modules may be stored in memory and executed by a processor. The memory may be internal or external to the processor and may be coupled to the processor in various well-known ways. The processor may include an application-specific integrated circuit (ASIC), other chipsets, logic circuits, and / or data processing devices. The memory may include read-only memory (ROM), random access memory (RAM), flash memory, a memory card, a storage medium, and / or other storage devices. That is, the embodiments described herein may be implemented and executed on a processor, microprocessor, controller, or chip. For example, the functional units illustrated in each drawing may be implemented and executed on a computer, processor, microprocessor, controller, or chip. In this case, information (e.g., information on instructions) or algorithms for implementation may be stored on a digital storage medium.
[0301] In addition, the decoding device and encoding device to which the embodiments of this document are applied may be included in a multimedia broadcast transmitting / receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video interaction device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camcorder, a custom video (VoD) service providing device, an over-the-top (OTT) video (over-the-top) device, an internet streaming service providing device, a three-dimensional (3D) video device, a virtual reality (VR) device, an augmented reality (AR) device, an image telephone video device, a vehicle terminal (e.g., a vehicle terminal (including an autonomous vehicle), an airplane terminal, a ship terminal, etc.), a medical video device, etc., and may be used to process video signals or data signals. For example, over-the-top (OTT) video (over-the-top) devices may include a game console, a Blu-ray player, an internet-connected TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), etc.
[0302] In addition, a processing method to which the embodiments of this document are applied may be produced in the form of a computer-executable program and stored in a computer-readable recording medium. Multimedia data having a data structure according to the embodiments of this document may also be stored in a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices in which computer-readable data is stored. Examples of the computer-readable recording medium include Blu-ray Discs (BDs), Universal Serial Buses (USBs), ROMs, PROMs, EPROMs, EEPROMs, RAMs, CD-ROMs, magnetic tapes, floppy disks, and optical data storage devices. The computer-readable recording medium also includes media embodied in the form of carrier waves (e.g., transmission via the Internet). A bitstream generated by the encoding method may be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.
[0303] Furthermore, the embodiments of the present document may be embodied in a computer program product having program code, which may be executed by a computer in accordance with the embodiments of the present document. The program code may be stored on a computer-readable carrier.
[0304] FIG. 17 illustrates an example of a content streaming system in which the embodiments disclosed herein can be applied.
[0305] Referring to FIG. 17, a content streaming system to which the embodiments of this document are applied can broadly include an encoding server, a streaming server, a web server, a media repository, a user device, and a multimedia input device.
[0306] The encoding server compresses content input from a multimedia input device such as a smartphone, camera, camcorder, etc. into digital data to generate a bitstream and transmits the bitstream to the streaming server. As another example, if a multimedia input device such as a smartphone, camera, camcorder, etc. directly generates a bitstream, the encoding server may be omitted.
[0307] The bitstream may be generated by an encoding method or a bitstream generation method applied to an embodiment of this document, and the streaming server may temporarily store the bitstream during the process of transmitting or receiving the bitstream.
[0308] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server acts as an intermediary to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, which then transmits 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.
[0309] The streaming server can receive content from a media repository and / or an encoding server. For example, if content is received from the encoding server, the content can be received in real time. In this case, the streaming server can store the bitstream for a certain period of time to provide a smooth streaming service.
[0310] Examples of the user devices 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, and digital signs.
[0311] 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.
[0312] The claims described herein may be combined in various ways. For example, the technical features of the method claims herein may be combined and embodied in an apparatus, and the technical features of the apparatus claims herein may be combined and embodied in a method. Furthermore, the technical features of the method claims herein and the technical features of the apparatus claims herein may be combined and embodied in an apparatus, and the technical features of the method claims herein and the technical features of the apparatus claims herein may be combined and embodied in a method.
Claims
1. A video decoding method performed by a decoding device, comprising: receiving video information including residual information for a current block; deriving a predicted sample of the current block based on intra prediction; generating a residual sample of the current block based on the residual information; generating reconstructed samples for the current block based on the predicted samples and the residual samples; the video information includes intra-prediction type information for the current block; The intra prediction type information includes a matrix-based intra prediction (MIP) flag indicating whether matrix-based intra prediction (MIP) is applied to the current block based on whether the tree type of the current block is single-tree or dual-tree luma; Since the value of the MIP flag is equal to 1, the MIP is applied to the current block, and the predicted samples of the current block are reducing neighboring reference samples of the current block; performing matrix multiplication on the reduced adjacent reference samples; and adding an offset to the matrix multiplied value; a size of a matrix used for the matrix multiplication is determined corresponding to a size of the current block; the size of the matrix is 16x8, corresponding to the size of the current block being 8x8; the image information includes Low Frequency Non Separable Transform (LFNST) index information associated with one of transform kernels in an LFNST transform set for the current block, based on the MIP flag indicating that intra sub-partitions (ISP) are not applied to the current block, that the width and height of the current block are greater than 4, that an intra mode is applied to the current block, and that the MIP is not applied; The parsing order of the MIP flag always precedes the parsing order of the LFNST index information; The video information does not include the LFNST index information based on the MIP flag indicating that the MIP is applied; Based on the absence of the LFNST index information because the video information does not include the LFNST index information, a value of the LFNST index information is derived as 0; the residual information includes information about quantized transform coefficients of the current block; The method of claim 1, wherein the residual samples are generated based on the information about the quantized transform coefficients by using the LFNST index information.
2. A video encoding method performed by an encoding device, comprising: generating a predicted sample of a current block by performing intra prediction on the current block; generating intra-prediction type information for the current block based on the performed intra-prediction; generating residual samples of the current block based on the predicted samples; generating residual information based on the residual samples, the residual information including information about quantized transform coefficients for the current block; encoding video information including the intra-prediction type information and the residual information; The intra prediction type information includes a matrix-based intra prediction (MIP) flag indicating whether matrix-based intra prediction (MIP) is applied to the current block based on whether the tree type of the current block is single-tree or dual-tree luma; In response to a value of the MIP flag equal to 1 because the MIP is applied to the current block, the predicted samples of the current block are reducing neighboring reference samples of the current block; performing matrix multiplication on the reduced adjacent reference samples; and adding an offset to the matrix multiplied value; a size of a matrix used for the matrix multiplication is determined corresponding to a size of the current block; the size of the matrix is 16x8, corresponding to the size of the current block being 8x8; the image information includes Low Frequency Non Separable Transform (LFNST) index information associated with one of transform kernels in an LFNST transform set for the current block, based on the MIP flag indicating that intra sub-partitions (ISP) are not applied to the current block, that the width and height of the current block are greater than 4, that an intra mode is applied to the current block, and that the MIP is not applied; The signaling order of the MIP flag always precedes the signaling order of the LFNST index information; The video information does not include the LFNST index information based on the MIP flag indicating that the MIP is applied; The method, wherein the value of the LFNST index information is equal to 0 based on the absence of the LFNST index information because the video information does not include the LFNST index information.
3. A method for transmitting data relating to video, comprising: obtaining a bitstream relating to the video, the bitstream comprising: determining an intra prediction type for a current block; generating a predicted sample of a current block by performing intra prediction on the current block; generating intra-prediction type information for the current block based on the performed intra-prediction; generating residual samples of the current block based on the predicted samples; generating residual information based on the residual samples, the residual information including information about quantized transform coefficients for the current block; encoding video information including the intra-prediction type information and the residual information to generate the bitstream; transmitting the data including the bitstream; The intra prediction type information includes a matrix-based intra prediction (MIP) flag indicating whether matrix-based intra prediction (MIP) is applied to the current block based on whether the tree type of the current block is single-tree or dual-tree luma; In response to a value of the MIP flag equal to 1 because the MIP is applied to the current block, the predicted samples of the current block are reducing neighboring reference samples of the current block; performing matrix multiplication on the reduced adjacent reference samples; and adding an offset to the matrix multiplied value; a size of a matrix used for the matrix multiplication is determined corresponding to a size of the current block; the size of the matrix is 16x8, corresponding to the size of the current block being 8x8; the image information includes Low Frequency Non Separable Transform (LFNST) index information associated with one of transform kernels in an LFNST transform set for the current block, based on the MIP flag indicating that intra sub-partitions (ISP) are not applied to the current block, that the width and height of the current block are greater than 4, that an intra mode is applied to the current block, and that the MIP is not applied; The signaling order of the MIP flag always precedes the signaling order of the LFNST index information; The video information does not include the LFNST index information based on the MIP flag indicating that the MIP is applied; The method, wherein the value of the LFNST index information is equal to 0 based on the absence of the LFNST index information because the video information does not include the LFNST index information.
Citation Information
Patent Citations
Transform coding based on matrix-based intra prediction
WO2020207493A1
An encoder, a decoder and corresponding methods harmonzting matrix-based intra prediction and secoundary transform core selection
WO2020211765A1
Encoding device, decoding device, encoding method, and decoding method
WO2020213677A1