Method and apparatus for video coding based on transform
The video coding method enhances compression efficiency by employing MTS and improved MTS index signaling, addressing the need for efficient image/video compression in high-resolution and immersive media.
Patent Information
- Application Number
- JP2025138432
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2019-11-11
- Filing Date
- 2025-08-21
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2040-11-09
AI Technical Summary
The increasing demand for high-resolution and high-quality images/videos, including immersive media like VR and AR content, necessitates a highly efficient image/video compression technique to reduce transmission and storage costs.
A video coding method and apparatus utilizing Multiple Transform Selection (MTS) and improved MTS index signaling, including parsing flag information for significant coefficients in specific regions of a block to enhance coding efficiency.
Improves overall image/video compression efficiency and MTS index coding efficiency, enabling effective transmission and storage of high-resolution, high-quality images/videos.
Smart Images

Figure 2025159225000001_ABST
Abstract
Description
[Technical Field]
[0001] This document relates to image coding technology, and more particularly to a transform-based image coding method and apparatus in an image coding system. [Background technology]
[0002] In recent years, the 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 need for a highly efficient image / video compression technique to effectively compress and transmit, store, and play back high-resolution, high-quality image / video information having the above-mentioned various characteristics. Summary of the Invention [Problem to be solved by the invention]
[0005] The technical problem of this document is to provide a method and apparatus for increasing video coding efficiency.
[0006] Another technical problem of this document is to provide a method and apparatus for improving the efficiency of transform index coding.
[0007] Another technical problem of this document is to provide a video coding method and apparatus using MTS.
[0008] Another technical problem of this document is to provide a video coding method and apparatus for MTS index signaling. [Means for solving the problem]
[0009] According to one embodiment of the present document, there is provided a video decoding method performed by a decoding device, the method including: deriving residual samples for the current block by applying an inverse linear transform to transform coefficients, the inverse linear transform being performed based on an MTS index received from the bitstream, the MTS index being parsed based on the absence of valid coefficients in a second region excluding a first region at the top left corner of the current block, the first region being a 16x16 region at the top left corner of the current block.
[0010] The MTS index is parsed based on flag information indicating whether a significant coefficient exists in the second region, and the flag information is derived by determining whether the significant coefficient exists in the second region in units of scan sub-blocks in which the significant coefficients are scanned.
[0011] The flag information indicates that the effective coefficient is present in the second area if the flag value indicating whether the effective coefficient is present in the scan sub-block is 1 and the effective coefficient present in the scan sub-block is located in the second area.
[0012] The flag information indicates that the effective coefficient exists in the second region when the flag value indicating whether the effective coefficient exists in the scan sub-block is 1 and the scan sub-block is located in the second region.
[0013] The flag information is initially set to 1, and when the significant coefficient is located in the second region, the flag information is changed to 0.
[0014] The scan sub-block is a 4x4 block, and the scan sub-block is scanned in an inverse diagonal scan direction from the position of the last significant coefficient in the current block.
[0015] According to an embodiment of the present document, there is provided a video encoding method executed by an encoding apparatus, the method including: deriving transform coefficients for the current block by applying MTS to residual samples; zeroing out a second region excluding a first region at the top left corner of the current block; deriving residual information based on the transform coefficients of the first region; and configuring video information such that an MTS index indicating a transform kernel of the MTS is parsed based on whether a significant coefficient exists in the second region, the first region being a 16x16 region at the top left corner of the current block.
[0016] According to another embodiment of the present document, a digital storage medium is provided that stores video data including encoded video information and a bitstream generated by a video encoding method performed by an encoding device.
[0017] According to another embodiment of the present document, there is provided a digital storage medium storing video data including encoded video information and a bitstream that enables a decoding device to perform the video decoding method. [Effects of the Invention]
[0018] According to the document, it can improve overall image / video compression efficiency.
[0019] According to this document, the efficiency of MTS index coding can be improved.
[0020] According to this document, the efficiency of video coding methods using MTS can be improved.
[0021] The effects obtained through the specific examples of this specification 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 specification. Therefore, the specific effects of this specification are not limited to those explicitly described in this specification, but may include various effects that can be understood or derive from the technical features of this specification. [Brief explanation of the drawings]
[0022] [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 an RST according to one embodiment of this document. [Figure 7] FIG. 10 is a diagram illustrating an example of an order in which output data of a forward linear transform is arranged into a one-dimensional vector. [Figure 8] FIG. 10 is a diagram illustrating an example of a sequence in which output data of a forward quadratic transform is arranged in a two-dimensional block. [Figure 9]FIG. 1 illustrates a wide-angle intra-prediction mode according to one embodiment of the present document. [Figure 10] FIG. 10 is a diagram showing block patterns to which LFNST is applied. [Figure 11] FIG. 10 is a diagram showing an example of the arrangement of output data from a forward LFNST. [Figure 12] FIG. 10 is a diagram illustrating an example in which the number of output data items for a forward LFNST is limited to a maximum of 16. [Figure 13] FIG. 10 is a diagram illustrating zeroing out in a block to which 4×4 LFNST is applied, according to an example. [Figure 14] FIG. 10 is a diagram illustrating zeroing out in a block to which 8×8 LFNST is applied, according to an example. [Figure 15] FIG. 1 is a diagram illustrating the scanning of a 32×32 transform block according to an example of the present document. [Figure 16] 1 is a diagram illustrating an example of a method for decoding an image; [Figure 17] 1 is a diagram illustrating an example of a video encoding method; [Figure 18] 1 illustrates an exemplary structural diagram of a content streaming system to which this document applies. DETAILED DESCRIPTION OF THE INVENTION
[0023] This document may be modified in various ways and may have various embodiments. A specific embodiment will be illustrated in the drawings and described in detail. However, this is not intended to limit this document to the specific embodiment. The terms used in this document are used merely to describe a specific embodiment and are not intended to limit the technical ideas of this document. The singular expressions include the plural expressions unless the context clearly dictates otherwise. In this specification, the terms "comprise" or "have" 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.
[0024] Meanwhile, each component in the drawings described herein 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 within the scope of this document as long as they do not deviate from the essence of this document.
[0025] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will now be described in more detail with reference to the accompanying drawings. In the following, the same reference numerals will be used to designate the same components in the drawings, and redundant descriptions of the same components will be omitted.
[0026] This document relates to video / image coding. For example, methods / embodiments disclosed in this document may be associated with the Versatile Video Coding (VVC) standard (ITU-T Rec. H.266), a next-generation video / image coding standard beyond 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.).
[0027] This document presents various embodiments relating to video / image coding, and unless otherwise stated, the embodiments may be implemented in combination with each other.
[0028] 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.
[0029] A pixel or a pel may refer to the smallest unit constituting a picture (or image). The term "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.
[0030] 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 a set (or array) of samples or transform coefficients consisting of M columns and N rows.
[0031] In this document, the terms " / " and "," are interpreted as "and / or." For example, "A / B" is interpreted as "A and / or B," and "A, B" is interpreted as "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.")
[0032] 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." Furthermore, in this document, "or" can mean "additionally or alternatively." (Further, in the document, the term "or" 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.")
[0033] 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."
[0034] 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."
[0035] 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."
[0036] In this specification, technical features individually described in one drawing may be embodied individually or simultaneously.
[0037] FIG. 1 illustrates schematically an example of a video / image coding system to which this document can be applied.
[0038] 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.
[0039] 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.
[0040] 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 by a process in which related data is generated.
[0041] 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.
[0042] 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 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.
[0043] 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.
[0044] The renderer can render the decoded video / image, and the rendered video / image can be displayed via a display unit.
[0045] 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.
[0046] Referring to 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) and may be configured by a digital storage medium. The hardware components may further include the memory 270 as an internal / external component.
[0047] 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) according to 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 ternary structure may be applied. Alternatively, the binary tree structure may be applied first. The coding procedure according to this document may be performed based on the final coding unit that is not further divided. In this case, the largest coding unit may be used as the final coding unit based on coding efficiency according to image characteristics, or if necessary, the coding unit may be recursively divided into coding units of lower depths, 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 is a unit of sample prediction, and the transform unit is a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.
[0048] The term "unit" can 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 the luma component or only a pixel / pixel value of the chroma component. A sample can also be used as a term corresponding to a pixel or pel in one picture (or image).
[0049] 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.
[0050] 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. In intra prediction, prediction modes 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 setting. 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.
[0051] 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 blocks may be the same or different. The temporal neighboring blocks may be referred to as collocated reference blocks, collocated CUs (colCUs), etc., and the reference picture including the temporal neighboring blocks may be referred to as collocated pictures (colPics). 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. For example, in the case of skip mode and merge mode, the inter predictor 221 may use motion information of neighboring blocks as motion information of the current block. In the case of skip mode, unlike in merge mode, a residual signal is not transmitted.In the case of motion vector prediction (MVP) mode, the motion vector of the neighboring block is used as a motion vector predictor, and the motion vector difference can be signaled to indicate the motion vector of the current block.
[0052] 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, 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.
[0053] 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. In addition, the transform process may be applied to pixel blocks having the same square size or non-square blocks of variable sizes.
[0054] 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 generate information about the quantized transform coefficients based on the one-dimensional vector form of the quantized transform coefficients. 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.
[0055] 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 current block in the current picture, or may be used for inter prediction of the next picture after filtering, as described below.
[0056] Meanwhile, LMCS (luma mapping with chroma scaling) can be applied during picture encoding and / or reconstruction.
[0057] 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 240, as will be described later in the description of each filtering method. The filtering information may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
[0058] The modified reconstructed picture transmitted to the memory 270 can be used as a reference picture in the inter prediction unit 221. 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.
[0059] 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.
[0060] FIG. 3 is a diagram illustrating the configuration of a video / image decoding device to which this document can be applied.
[0061] Referring to 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 332 and an intra predictor 331. The residual processor 320 may include a dequantizer 321 and an inverse transformer 322. 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). In addition, the memory 360 may include a decoded picture buffer (DPB) and may be implemented as a digital storage medium. The hardware components may further include a memory 360 as an internal / external component.
[0062] 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. 2. 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. Accordingly, the processing unit for decoding is, for example, a coding unit, and the coding unit can be divided into 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 played back via a playback device.
[0063] 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 video 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 set and / or the general constraint information. Signaled / received information and / or syntax elements, which will be described later in this document, may be decoded through 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, decoding information on neighboring and current blocks, or information on symbols / bins decoded in previous steps, predicts the occurrence probability of bins based on 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 may be further configured as an internal / external element of the decoding apparatus 300, or the receiving unit may 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.
[0064] 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 perform inverse quantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.
[0065] The inverse transform unit 322 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0066] 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.
[0067] 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.
[0068] The intra prediction unit 331 may predict a current block by referring to samples in a current picture. The referenced samples may be located adjacent to or distant from the current block 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 331 may also determine a prediction mode to be applied to the current block by using prediction modes applied to neighboring blocks.
[0069] The inter prediction unit 332 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 332 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.
[0070] 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.
[0071] 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.
[0072] Meanwhile, LMCS (luma mapping with chroma scaling) can be applied during picture decoding.
[0073] 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.
[0074] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter predictor 332. 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 332 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 331.
[0075] 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.
[0076] As described above, prediction is performed to improve compression efficiency when performing video coding. Through this, 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 signals information (residual information) regarding the residual between the original block and the predicted block, rather than the original sample values of the original block, to the decoding device, thereby improving video coding efficiency. The decoding device derives a residual block including residual samples based on the residual information, combines the residual block with the predicted block to generate a reconstructed block including reconstructed samples, and generates a reconstructed picture including the reconstructed block.
[0077] 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, perform a quantization procedure on the transform coefficients to derive quantized transform coefficients, and 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.
[0078] FIG. 4 shows a schematic diagram of the multiple conversion technique according to this document.
[0079] 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.
[0080] 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 as the primary transform, it may be called a multiple core transform.
[0081] The multi-kernel transform may refer to a transform method that additionally uses a DCT (Discrete Cosine Transform) Type 2 and a DST (Discrete Sine Transform) Type 7, DCT Type 8, and / or DST Type 1. That is, the multi-kernel transform may refer to a transform method that transforms 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 called temporary transform coefficients from the perspective of a transform unit.
[0082] 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. In contrast, 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.
[0083] When the multi-kernel transform is performed, a vertical transform kernel and 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.
[0084] Also, according to one example, when a linear transform is performed by applying MTS, a specific basis function is set to a predetermined value, and when it is a vertical transform or a horizontal transform, a mapping relationship for the transform kernel can be set by combining which basis function is applied. For example, if a horizontal transform kernel is represented by trTypeHor and a vertical transform kernel is represented by trTypeVer, a trTypeHor or trTypeVer value of 0 can be set to DCT2, a trTypeHor or trTypeVer value of 1 can be set to DCT7, and a trTypeHor or trTypeVer value of 2 can be set to DCT8.
[0085] In this case, MTS index information may be encoded and signaled to a decoding device to indicate one of a plurality of transform kernel sets. For example, if the MTS index is 0, it may indicate that the trTypeHor and trTypeVer values are both 0; if the MTS index is 1, it may indicate that the trTypeHor and trTypeVer values are both 1; if the MTS index is 2, it may indicate that the trTypeHor value is 2 and the trTypeVer value is 1; if the MTS index is 3, it may indicate that the trTypeHor value is 1 and the trTypeVer value is 2; and if the MTS index is 4, it may indicate that the trTypeHor and trTypeVer values are both 2.
[0086] As an example, the conversion kernel set according to the MTS index information is shown in the table below.
[0087] [Table 1]
[0088] 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 refers to a transform using a correlation between the (primary) transform coefficients to a more compressed representation. 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 that generates modified transform coefficients (or secondary transform coefficients) for a residual signal by performing a secondary transform on the (primary) transform coefficients derived through the primary transform based on a non-separable transform matrix. Here, based on the non-separable transform matrix, the (primary) transform coefficients may be simultaneously subjected to a vertical transform and a horizontal transform (or a horizontal-vertical transform independently). That is, the non-separable secondary transform may refer to a transform method in which, instead of being applied separately to the vertical and horizontal directions of the (primary) transform coefficients, a two-dimensional signal (transform coefficients) is rearranged into a one-dimensional signal in a specific direction (e.g., row-first or column-first), and then modified transform coefficients (or secondary transform coefficients) are generated based on the non-separable transform matrix. For example, row-major order refers to arranging the first row, second row, ..., Nth row of an MxN block, and column-major order refers to arranging the first column, second column, ..., Mth column of an MxN block. The non-separable quadratic 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 quadratic transform may be applied to the upper 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 quadratic transform may be applied to the upper left min(8,W) x min(8,H) region of the transform coefficient block. However, embodiments are not limited thereto. For example, even if the condition that the width (W) or height (H) of the transform coefficient block is both equal to or greater than 4 is satisfied, a 4x4 non-separable quadratic transform may also be applied to the upper left min(8,W) x min(8,H) region of the transform coefficient block.
[0089] Specifically, for example, if a 4x4 input block is used, a non-separable quadratic transform can be performed as follows:
[0090] The 4x4 input block X is given as follows:
[0091]
number
[0092] When X is expressed in vector form, the vector JPEG2025159225000004.jpg84 is shown as follows:
[0093]
number
[0094] As shown in Equation 2, the vector JPEG2025159225000006.jpg84 rearranges the two-dimensional blocks of X in Equation 1 into one-dimensional vectors in row-first order.
[0095] In this case, the second-order non-separable transform can be calculated as follows:
[0096]
number
[0097] where: JPEG2025159225000008.jpg75 denotes the transform coefficient vector, and T denotes the 16x16 (non-separable) transform matrix.
[0098] 16×1 transform coefficient vector through Equation 3 JPEG2025159225000009.jpg75 can be derived, JPEG2025159225000010.jpg75 can be re-organized into 4x4 blocks via scan order (horizontal, vertical, diagonal, etc.). However, the above calculation is merely an example, and in order to reduce the computational complexity of the non-separable quadratic transform, a Hypercube-Givens Transform (HyGT) or the like can also be used to calculate the non-separable quadratic transform.
[0099] 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.
[0100] As described above, the non-separable quadratic transform can 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. The 8x8 transform refers to a transform that can be applied to an 8x8 region contained within a corresponding transform coefficient block when W and H are both greater than or equal to 8, and the corresponding 8x8 region is the upper-left 8x8 region within the corresponding transform coefficient block. Similarly, the 4x4 transform refers to a transform that can be applied to a 4x4 region contained within a corresponding transform coefficient block when W and H are both greater than or equal to 4, and the corresponding 4x4 region is the upper-left 4x4 region within the corresponding transform coefficient block. For example, an 8x8 transform kernel matrix can be a 64x64 / 16x64 matrix, and a 4x4 transform kernel matrix can be a 16x16 / 8x16 matrix.
[0101] 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.
[0102] However, the size of the transform, i.e., the size of the area to which the transform is applied, is merely an example and sizes other than 8x8 or 4x4 can be used, the number of sets is n, and the number of transform kernels in each set is k.
[0103] The transform set may be referred to as an NSST set or an LFNST set. Selection of a particular set from the transform set may be performed based on, for example, the intra prediction mode of the current block (CU or sub-block). LFNST (Low-Frequency Non-Separable Transform) is an example of a reduced non-separable transform, which will be described later, and refers to a non-separable transform for low-frequency components.
[0104] For reference, 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 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.
[0105] FIG. 5 exemplarily shows the intra-directional modes of 65 prediction directions.
[0106] Referring to FIG. 5, intra prediction modes can be classified into those with horizontal directionality and those with vertical directionality, with respect to the 34th intra prediction mode, which has a right-down diagonal prediction direction. H and V in FIG. 5 represent horizontal and vertical directionality, respectively, and the numbers -32 to 32 indicate displacements of 1 / 32 units on the sample grid position. This may indicate an offset to the mode index value. Intra prediction modes 2 to 33 have horizontal directionality, and intra prediction modes 34 to 66 have vertical directionality. Meanwhile, the 34th intra prediction mode can be considered neither horizontally nor vertically oriented in the strict sense, but can be classified as belonging to the horizontal direction in terms of determining the transform set for the secondary transform. This is because input data is transposed for vertical modes symmetrical with respect to the 34th intra prediction mode, and the 34th intra prediction mode uses the input data alignment method for horizontal modes. Transposing the input data means that rows of MxN 2D block data become columns and columns become rows to form NxM data. The 18th and 50th intra prediction modes indicate horizontal and vertical intra prediction modes, respectively. The 2nd intra prediction mode predicts in an upper-right direction using a left reference pixel and can be called a right-upward diagonal intra prediction mode. In the same vein, the 34th intra prediction mode can be called a right-downward diagonal intra prediction mode, and the 66th intra prediction mode can be called a left-downward diagonal intra prediction mode.
[0107] For example, the mapping of four transform sets according to intra prediction modes is shown in the following table.
[0108] [Table 2]
[0109] As shown in Table 2, depending on the intra prediction mode, one of four transform sets, i.e., lfnstTrSetIdx, can be mapped to one of 0 to 3, i.e., one of four.
[0110] On the other hand, if it is determined that a specific set is to be 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. The encoding device may derive a non-separable secondary transform index that points to a specific transform kernel based on a rate-distortion (RD) check and signal the non-separable secondary transform index to a decoding device. 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 lfnst index value of 0 may point to the first non-separable secondary transform kernel, an lfnst index value of 1 may point to the second non-separable secondary transform kernel, and an lfnst index value of 2 may point to the third non-separable secondary transform kernel. Alternatively, an lfnst index value of 0 may indicate that the first non-separable secondary transform is not applied to the current block, and lfnst index values of 1 to 3 may point to the three transform kernels.
[0111] 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.
[0112] 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.
[0113] 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 from the inverse transform unit's perspective. As described above, the encoding and decoding devices may generate reconstructed blocks based on the residual blocks and predicted blocks, and generate reconstructed pictures based on the reconstructed blocks.
[0114] 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). 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, RST, or LFNST, and the secondary inverse transform application determining unit may determine whether to apply the secondary inverse transform based on a secondary transform flag parsed from the bitstream. As another example, the secondary inverse transform application determining unit may determine whether to apply the secondary inverse transform based on transform coefficients of a residual block.
[0115] 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 LFNST (NSST or RST) transform set designated by an intra prediction mode. In addition, as an embodiment, the secondary transform decision method may be determined depending on the primary transform decision method. Various combinations of primary transform and secondary transform may be determined depending on the intra prediction mode. In addition, as an 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.
[0116] 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 the decoding device can generate a reconstructed block based on the residual block and a predicted block, and generate a reconstructed picture based on the reconstructed block.
[0117] 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.
[0118] Meanwhile, the coefficients constituting the transform kernel, transform matrix, and transform kernel matrix described herein, i.e., kernel coefficients or matrix coefficients, can be expressed in 8 bits. This is one condition for implementation in a decoding device and an encoding device, and it can reduce the memory requirements for storing the transform kernel with a reasonably acceptable performance degradation compared to the existing 9-bit or 10-bit implementation. In addition, by expressing the kernel matrix in 8 bits, a smaller multiplier can be used, making it more compatible with SIMD (Single Instruction Multiple Data) instructions used for optimal software implementation.
[0119] In this specification, RST may refer to a transformation performed on residual samples of a target block based on a transform matrix whose size is reduced by a simplification factor. When a simplified transformation is performed, the amount of calculation required during the transformation can be reduced due to the reduction in the size of the transform matrix. That is, RST can be used to solve the computational complexity problem that occurs during the transformation of a large block or a non-separable transformation.
[0120] The RST may be called by various terms such as a reduced transform, a reduced transform, a reduced secondary transform, a reduction transform, a simplified transform, a simple transform, etc., and the names of the RST 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. The transform index may be named an LFNST index.
[0121] 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.
[0122] FIG. 6 is a diagram illustrating an RST according to an embodiment of the present document.
[0123] In this specification, the term "target block" may refer to a current block, a residual block, or a transform block on which coding is performed.
[0124] In an RST according to one embodiment, an N-dimensional vector is mapped to an R-dimensional vector located in a different space to determine a reduced transformation matrix, where 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, reduction factor, simplified factor, or 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.
[0125] In one embodiment, the simplification factors or simplification coefficients may be signaled via a bitstream, but the embodiment is not limited thereto. For example, predefined values for the simplification factors or simplification coefficients may be stored in each of the encoding apparatus 200 and the decoding apparatus 300, in which case the simplification factors or simplification coefficients are not separately signaled.
[0126] The size of the simplified transformation matrix according to an embodiment is R×N, which is smaller than the size N×N of the normal transformation matrix, and can be defined as Equation 4 below.
[0127]
number
[0128] The matrix T in the Reduced Transform block shown in (a) of Figure 6 is the matrix T in Equation 4. R×N As shown in (a) of FIG. 6, when the residual samples for the current block are multiplied by the simplified transform matrix TR×N, the transform coefficients for the current block can be derived.
[0129] In one embodiment, if the size of the block to which the transform is applied is 8x8 and R=16 (i.e., R / N=16 / 64=1 / 4), the RST according to (a) of Figure 6 can be expressed by the matrix operation 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.
[0130] 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 multiplied by the column vector to obtain the column vector.
[0131]
number
[0132] In Equation 5, r1 to r 64 can represent a residual sample for the target block, and more specifically, is a transform coefficient generated by applying a linear transform. As a result of the calculation of Equation 5, the transform coefficient c for the target block is i can be derived, and c i The derivation process is as shown in Equation 6.
[0133]
number
[0134] The calculation result of Equation 6 is the transform coefficients c1 to c2 for the target block. R That is, when R=16, the transform coefficients c1 to c2 for the current block can be derived. 16 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 the transmission efficiency between the encoding apparatus 200 and the decoding apparatus 300.
[0135] Considering the size of the transformation matrix, the size of the normal transformation matrix is 64x64 (NxN), while the size of the simplified transformation matrix is reduced to 16x64 (RxN), so 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 the normal transformation matrix, when using the simplified transformation matrix, the number of multiplication operations can be reduced by a ratio of R / N (RxN).
[0136] 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.
[0137] Inverse RST matrix T according to one embodiment N×R The size of the simplified transformation matrix T R×N It is in a transpose relationship with
[0138] The matrix T in the Reduced Inverse Transform block shown in Figure 6(b) t is the inverse RST matrix T R×N T (The superscript T means transpose.) As shown in FIG. 6(b), the inverse RST matrix T R×N T When the inverse RST matrix T is multiplied by , 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
[0139] More specifically, when the inverse RST is applied as the secondary inverse transform, the inverse RST matrix T R×N TAlternatively, an inverse RST may be applied as an inverse linear transform, in which case the inverse RST matrix T R×N T When multiplied by , the residual sample for the current block can be derived.
[0140] In one embodiment, when the size of the block to which the inverse transform is applied is 8x8 and R=16 (i.e., R / N=16 / 64=1 / 4), the RST according to (b) of FIG. 6 can be expressed by a matrix operation as shown in Equation 7 below.
[0141]
number
[0142] In Equation 7, c1 to c 16 The result of the calculation of Equation 7 is r, which indicates the modified transform coefficients for the current block or the residual samples for the current block. i can be derived, and r i The derivation process is as shown in Equation 8.
[0143]
number
[0144] The calculation result of Equation 8 is r1 to r2, which indicate the modified transform coefficients for the target block or the residual samples for the target block. Ncan be derived. Considering the size of the inverse transformation matrix, the size of the normal inverse transformation matrix is 64 x 64 (N x N), while the size of the simplified inverse transformation matrix is reduced to 64 x 16 (N x R). 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 (N x N) when using a normal inverse transformation matrix, the number of multiplication operations can be reduced by a ratio of R / N (N x R) when using a simplified inverse transformation matrix.
[0145] Meanwhile, the transform set configuration shown in Table 2 can also be applied to an 8x8 RST. That is, the corresponding 8x8 RST can be applied according to the transform set in Table 2. Since one transform set is composed of two or three transforms (kernels) depending on the intra-frame prediction mode, it can be configured to select one of up to four transforms, including the case where a secondary transform is not applied. When a secondary transform is not applied, the transform can be considered to have been applied as an identity matrix. If the four transforms are assigned indices 0, 1, 2, and 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 a transform index or an lfnst index for each transform coefficient block. That is, for an 8x8 top-left block, an 8x8 RST can be specified in the RST configuration via the transform index, or an 8x8 lfnst can be specified when an LFNST is applied. 8x8 lfnst and 8x8 RST refer to transformations that can be applied to an 8x8 region contained within a corresponding transform coefficient block when W and H of the target block to be transformed are both greater than or equal to 8, and the corresponding 8x8 region is the upper left 8x8 region within the corresponding transform coefficient block. Similarly, 4x4 lfnst and 4x4 RST refer to transformations that can be applied to a 4x4 region contained within a corresponding transform coefficient block when W and H of the target block are both greater than or equal to 4, and the corresponding 4x4 region is the upper left 4x4 region within the corresponding transform coefficient block.
[0146] Meanwhile, according to one embodiment of this document, during the encoding process, a maximum 16x48 transformation kernel matrix can be applied by selecting only 48 pieces of data, rather than a 16x64 transformation kernel matrix, for 64 pieces of data constituting an 8x8 region. Here, "maximum" means that the maximum value of m is 16 for an mx48 transformation kernel matrix that can generate m coefficients. That is, when RST is performed by applying an mx48 transformation kernel matrix (m≦16) to an 8x8 region, m coefficients can be generated from 48 input pieces of data. When m is 16, 16 coefficients can be generated from 48 input pieces of data. That is, when 48 pieces of data form a 48x1 vector, a 16x1 vector can be generated by sequentially multiplying a 16x48 matrix and a 48x1 vector. In this case, a 48x1 vector can be constructed by appropriately arranging the 48 pieces of data constituting the 8x8 region. For example, a 48x1 vector can be constructed based on 48 pieces of data constituting an area excluding the bottom right 4x4 area of the 8x8 region. In this case, when a matrix operation is performed by applying a maximum 16x48 transformation kernel matrix, 16 modified transformation coefficients are generated, and the 16 modified transformation coefficients can be arranged in the upper left 4x4 area according to the scanning order, and the upper right 4x4 area and the lower left 4x4 area can be filled with 0s.
[0147] A transposed matrix of the above-described transformation kernel matrix can be used for the inverse transformation of the decoding process. That is, when an inverse RST or LFNST is performed as an inverse transformation process in a decoding device, input coefficient data to which the inverse RST is applied is configured as a one-dimensional vector in a predetermined arrangement order, and the modified coefficient vector obtained by multiplying the one-dimensional vector by the corresponding inverse RST matrix on the left side can be arranged in a two-dimensional block in a predetermined arrangement order.
[0148] To summarize, when RST or LFNST is applied to an 8x8 region during the transform process, a matrix operation is performed between 48 transform coefficients in the upper left, upper right, and lower left regions of the 8x8 region, excluding the lower right region, and a 16x48 transform kernel matrix. For the matrix operation, the 48 transform coefficients are input as a one-dimensional array. When this matrix operation is performed, 16 modified transform coefficients are derived, and the modified transform coefficients may be arranged in the upper left region of the 8x8 region.
[0149] Conversely, when inverse RST or LFNST is applied to an 8x8 region during the inverse transform process, 16 transform coefficients corresponding to the upper left corner of the 8x8 region are input in a one-dimensional array form according to the scanning order and can be subjected to a matrix operation with a 48x16 transform kernel matrix. That is, the matrix operation in this case can be expressed as (48x16 matrix) * (16x1 transform coefficient vector) = (48x1 modified transform coefficient vector). Here, an nx1 vector can be interpreted as an nx1 matrix and therefore can also be expressed as an nx1 column vector. Also, * denotes a matrix multiplication operation. When this matrix operation is performed, 48 modified transform coefficients can be derived, and the 48 modified transform coefficients can be arranged in the upper left, upper right, and lower left corners of the 8x8 region, excluding the lower right corner.
[0150] 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.
[0151] The detailed non-separable transform, LFNST, is as follows: LFNST can include a forward transform by an encoding device and an inverse transform by a decoding device.
[0152] The encoding device takes as input the result (or part of the result) derived after applying a forward primary (core) transform, and applies a forward secondary transform.
[0153]
number
[0154] In Equation 9, x and y are the input and output of the quadratic transformation, respectively, and G is a matrix representing the quadratic transformation, where the transform basis vector is composed of a column vector. In the case of the backward LFNST, when the dimension of the transformation matrix G is expressed as [number of rows × number of columns], in the case of the forward LFNST, the transposed matrix G is G. T It becomes a dimension of.
[0155] For the backward LFNST, the dimensions of the matrix G are [48×16], [48×8], [16×16], and [16×8], where the [48×8] and [16×8] matrices are submatrices obtained by sampling eight transformation basis vectors from the left side of the [48×16] and [16×16] matrices, respectively.
[0156] On the other hand, in the case of forward LFNST, the matrix G T The dimensions of are [16×48], [8×48], [16×16], and [8×16], and the [8×48] and [8×16] matrices are submatrices obtained by sampling eight transformation basis vectors from the upper side of the [16×48] and [16×16] matrices, respectively.
[0157] Therefore, in the case of forward LFNST, the input x can be a [48x1] vector or a [16x1] vector, and the output y can be a [16x1] vector or an [8x1] vector. Since the output of the forward linear transform in video coding and decoding is two-dimensional (2D) data, in order to construct a [48x1] or [16x1] vector as the input x, the 2D data output from the forward transform must be appropriately arranged to construct a one-dimensional vector.
[0158] 7 shows an example of a sequence for arranging output data of a forward linear transform into a one-dimensional vector. The left diagrams of (a) and (b) of FIG. 7 show a sequence for creating a [48×1] vector, and the right diagrams of (a) and (b) of FIG. 7 show a sequence for creating a [16×1] vector. In the case of LFNST, the one-dimensional vector x can be obtained by sequentially arranging 2D data in the sequence shown in (a) and (b) of FIG.
[0159] The arrangement direction of the output data of the forward linear transform may be determined according to the intra prediction mode of the current block. For example, if the intra prediction mode of the current block is horizontal with respect to the diagonal direction, the output data of the forward linear transform may be arranged in the order of (a) of Figure 7, and if the intra prediction mode of the current block is vertical with respect to the diagonal direction, the output data of the forward linear transform may be arranged in the order of (b) of Figure 7.
[0160] For example, an ordering different from that of (a) and (b) of Figures 7 can be applied, and if one wants to derive the same result (y vector) as when the ordering of (a) and (b) of Figures 7 is applied, the column vectors of matrix G can be rearranged to match the ordering. That is, the column vectors of G can be rearranged so that each element constituting the x vector is always multiplied by the same transformation basis vector.
[0161] Since the output y derived through Equation 9 is a one-dimensional vector, if a configuration that processes the result of a forward quadratic transform as input, for example, a configuration that performs quantization or residual coding, requires two-dimensional data as input data, the output y vector of Equation 9 must again be appropriately arranged as 2D data.
[0162] FIG. 8 is a diagram illustrating an example of an order in which output data of a forward quadratic transform is arranged in a two-dimensional block.
[0163] In the case of LFNST, the output values can be arranged in a 2D block in a predetermined scan order. Figure 8(a) shows that when the output y is a [16x1] vector, the output values are arranged in 16 positions of the 2D block in a diagonal scan order. Figure 8(b) shows that when the output y is an [8x1] vector, the output values are arranged in 8 positions of the 2D block in a diagonal scan order, and the remaining 8 positions are filled with 0. The X in Figure 8(b) indicates that the value is filled with 0.
[0164] As another example, since the order in which the output vector y is processed in a configuration that performs quantization or residual coding may be performed in a preset order, the output vector y may not be arranged in a 2D block as shown in Figure 8. However, in the case of residual coding, data coding may be performed in units of 2D blocks (e.g., 4x4) such as a coefficient group (CG), and in this case, data may be arranged in a specific order such as the diagonal scan order of Figure 8.
[0165] Meanwhile, the decoding device can generate a one-dimensional input vector y by arranging two-dimensional data output through an inverse quantization process for inverse transform according to a preset scanning order. The input vector y can be output as an input vector x according to the following equation:
[0166]
number
[0167] For the reverse LFNST, the output vector x can be derived by multiplying the input vector y, which is a [16x1] or [8x1] vector, by the G matrix. For the reverse LFNST, the output vector x is a [48x1] or [16x1] vector.
[0168] The output vector x is arranged in a two-dimensional block in the order shown in FIG. 7 and arranged as two-dimensional data, and such two-dimensional data becomes input data (or part of the input data) for the inverse linear transformation.
[0169] Therefore, the inverse quadratic transform is generally the opposite of the forward quadratic transform process, and in the case of the inverse transform, unlike the forward transform, the inverse quadratic transform is applied first, and then the inverse linear transform is applied.
[0170] In the inverse LFNST, one of eight [48x16] matrices or eight [16x16] matrices can be selected as the transformation matrix G. Which of the [48x16] and [16x16] matrices to apply depends on the size and pattern of the block.
[0171] In addition, the eight matrices may be derived from four transform sets as shown in Table 2 above, and each transform set may consist of two matrices. Which transform set to use among the four transform sets is determined according to the intra prediction mode. More specifically, the transform set is determined based on an intra prediction mode value extended to take into account a wide angle intra prediction mode (WAIP). Which matrix to select from the two matrices constituting the selected transform set is determined through index signaling. More specifically, the transmitted index value may be 0, 1, or 2, where 0 indicates that LFNST is not applied and 1 and 2 indicate one of the two transform matrices constituting the transform set selected based on the intra prediction mode value.
[0172] FIG. 9 is a diagram illustrating wide-angle intra prediction modes according to one embodiment of this document.
[0173] General intra prediction mode values can range from 0 to 66 and from 81 to 83, and as shown, intra prediction mode values extended by WAIP can range from -14 to 83. Values from 81 to 83 indicate CCLM (Cross Component Linear Model) modes, and values from -14 to -1 and values from 67 to 80 indicate intra prediction mode values extended by applying WAIP.
[0174] When the width of the current block to be predicted is greater than its height, the upper reference pixel is generally closer to its position within the block to be predicted. Therefore, predicting in the bottom-left direction is more accurate than predicting in the top-right direction. On the other hand, when the height of the block is greater than its width, the left reference pixel is generally closer to its position within the block to be predicted. Therefore, predicting in the top-right direction is more accurate than predicting in the bottom-left direction. Therefore, it is advantageous to apply remapping, i.e., mode index conversion, to the index of the wide-angle intra prediction mode.
[0175] When wide-angle intra prediction is applied, information about existing intra prediction may be signaled, and after parsing the information, the information may be remapped with the index of the wide-angle intra prediction mode. Therefore, the total number of intra prediction modes for a specific block (e.g., a non-square block of a specific size) remains unchanged, i.e., the total number of intra prediction modes is 67, and the intra prediction mode coding for the specific block remains unchanged.
[0176] Table 3 below shows a process of deriving a modified intra mode by remapping an intra prediction mode to a wide-angle intra prediction mode.
[0177] [Table 3]
[0178] In Table 3, the extended intra prediction mode value is finally stored in the predModeIntra variable, ISP_NO_SPLIT indicates that the CU block is not divided into sub-partitions according to the Intra Sub Partitions (ISP) technique currently adopted in the VVC standard, and the cIdx variable values of 0, 1, and 2 indicate the luma, Cb, and Cr components, respectively. The Log2 function shown in Table 3 returns a logarithmic value with a base of 2, and the Abs function returns an absolute value.
[0179] The input values of the wide-angle intra prediction mode mapping process are the variable predModeIntra indicating the intra prediction mode, the height and width of the transform block, etc., and the output value is the modified intra prediction mode predModeIntra. The height and width of the transform block or coding block may become the height and width of the current block for intra prediction mode remapping. In this case, the variable whRatio reflecting the ratio of width to height may be set to Abs(Log2(nW / nH)).
[0180] For non-square blocks, the intra prediction mode can be modified in two distinct cases.
[0181] First, if all of the following conditions are met: (1) the width of the current block is greater than the height; (2) the intra prediction mode before modification is greater than or equal to 2; and (3) the intra prediction mode is (8+2*whRatio) if the variable whRatio is greater than 1, or 8 if the variable whRatio is less than or equal to 1, and is less than the derived value [predModeIntra is less than (whRatio>1)?(8+2*whRatio):8], the intra prediction mode is set to a value 65 greater than the intra prediction mode [predModeIntra is set equal to (predModeIntra+65)].
[0182] If the above is not the case, and all of the following conditions are met: (1) the height of the current block is greater than the width; (2) the intra prediction mode before modification is less than or equal to 66; and (3) the intra prediction mode is (60-2*whRatio) if the variable whRatio is greater than 1, or 60 if the variable whRatio is less than or equal to 1, and is greater than the derived value [predModeIntra is greater than (whRatio>1)?(60-2*whRatio):60], then the intra prediction mode is set to a value 67 less than the intra prediction mode [predModeIntra is set equal to (predModeIntra-67)].
[0183] The above-mentioned Table 2 shows how transform sets are selected based on the intra prediction mode value extended by WAIP in LFNST. As shown in FIG. 9, modes 14 to 33 and modes 35 to 80 are symmetrical to each other in terms of prediction direction with mode 34 as the center. For example, mode 14 and mode 54 are symmetrical to each other with respect to the direction corresponding to mode 34 as the center. Therefore, modes located in symmetrical directions apply the same transform set, and this symmetry is reflected in Table 2.
[0184] However, it is assumed that the forward LFNST input data for mode 54 is symmetrical to the forward LFNST input data for mode 14. For example, for modes 14 and 54, two-dimensional data is rearranged into one-dimensional data according to the arrangement orders shown in Figures 7(a) and 7(b), respectively, and it can be seen that the ordering patterns shown in Figures 7(a) and 7(b) are symmetrical about the direction (diagonal direction) indicated by mode 34.
[0185] On the other hand, as mentioned above, which of the [48×16] and [16×16] transformation matrices to apply to LFNST is determined based on the size of the block to be transformed.
[0186] Figure 10 shows block patterns to which LFNST is applied, where (a) shows a 4x4 block, (b) shows 4x8 and 8x4 blocks, (c) shows a 4xN or Nx4 block where N is 16 or greater, (d) shows an 8x8 block, and (e) shows an MxN block where M≧8, N≧8, and N>8 or M>8.
[0187] In Figure 10, blocks with thick frames indicate areas to which LFNST is applied. For blocks (a) and (b) in Figure 10, LFNST is applied to the top-left 4x4 area, and for block (c) in Figure 10, LFNST is applied to each of the two adjacent top-left 4x4 areas. Because LFNST is applied in 4x4 area units in (a), (b), and (c) in Figure 10, this type of LFNST is hereinafter referred to as "4x4 LFNST," and a [16x16] or [16x8] matrix can be applied to the corresponding transformation matrix based on the matrix dimension for G in Equation 9 and Equation 10.
[0188] More specifically, a [16×8] matrix is applied to the 4×4 block (4×4TU or 4×4CU) in (a) of Figure 10, and a [16×16] matrix is applied to the blocks in (b) and (c) of Figure 10. This is to match the worst-case computational complexity with 8 multiplications per sample.
[0189] For (d) and (e) of Figure 10, LFNST is applied to the upper left 8x8 region, and this LFNST will be referred to as "8x8 LFNST" hereinafter. A [48x16] or [48x8] matrix can be applied as the corresponding transformation matrix. In the case of forward LFNST, a [48x1] vector (the x vector in Equation 9) is input as input data, so all sample values in the upper left 8x8 region are not used as input values for the forward LFNST. That is, as can be seen in the left-hand order of Figure 7(a) or the left-hand order of Figure 7(b), the bottom-right 4x4 block is left as is, and a [48x1] vector can be constructed based on samples belonging to the remaining three 4x4 blocks.
[0190] A [48x8] matrix can be applied to the 8x8 block (8x8TU or 8x8CU) in (d) of Figure 10, and a [48x16] matrix can be applied to the 8x8 block in (e) of Figure 10. This is also to match the worst case computational complexity to 8 multiplications per sample.
[0191] Depending on the block design, applying the corresponding forward LFNST (4x4 LFNST or 8x8 LFNST) generates 8 or 16 output data (the y vector in Equation 9, an [8x1] or [16x1] vector). Due to the nature of matrix GT, the number of output data in the forward LFNST may be equal to or less than the number of input data.
[0192] FIG. 11 shows an example of the arrangement of output data from the forward LFNST, and illustrates blocks in which output data from the forward LFNST is arranged depending on the block pattern.
[0193] The shaded area at the top left of the block in Figure 11 corresponds to the area where the output data of the forward LFNST is located, the positions marked with 0 indicate samples filled with 0 values, and the remaining area indicates areas that are not changed by the forward LFNST. The output data of the forward linear transform remains unchanged in the areas that are not changed by the LFNST.
[0194] As mentioned above, the dimensions of the transformation matrix applied vary depending on the block, and therefore the number of output data also varies. As shown in Figure 11, the output data of the forward LFNST may not fill the entire upper-left 4x4 block. In Figures 11(a) and 11(d), a [16x8] matrix and a [48x8] matrix are applied to the block indicated by the thick line or a partial area within the block, respectively, to generate an [8x1] vector as the output of the forward LFNST. That is, according to the scan order shown in Figure 8(b), only eight output data positions are filled as shown in Figures 11(a) and 11(d), and the remaining eight positions are filled with zeros. In the case of the LFNST-applied block of Figure 10(d), the two 4x4 blocks at the upper right and lower left adjacent to the upper-left 4x4 block are also filled with zeros, as shown in Figure 11(d).
[0195] As described above, the LFNST index is basically signaled to specify whether to apply LFNST and the transformation matrix to be applied. As shown in Figure 11, when LFNST is applied, the number of output data of the forward LFNST may be equal to or less than the number of input data, so areas filled with 0 values occur as follows:
[0196] 1) As shown in Figure 11(a), within the upper left 4x4 block, the 8th position in the scan order and thereafter, i.e., the 9th to 16th samples
[0197] 2) As shown in (d) and (e) of FIG. 11, a [16x48] matrix or an [8x48] matrix is applied to two 4x4 blocks adjacent to the upper left 4x4 block or the second and third 4x4 blocks in the scan order.
[0198] Therefore, if non-zero data is found by checking the above 1) and 2), it is certain that LFNST will not be applied, and therefore signaling of the corresponding LFNST index can be omitted.
[0199] For example, in the case of LFNST adopted in the VVC standard, signaling of the LFNST index is performed after residual coding, so that the encoding device can know whether or not non-zero data (significant coefficients) exist at all positions within a TU or CU block through residual coding. Therefore, the encoding device can determine whether or not to perform signaling for the LFNST index based on the presence or absence of non-zero data, and the decoding device can determine whether or not to parse the LFNST index. If non-zero data does not exist in the areas specified in 1) and 2), signaling of the LFNST index is performed.
[0200] Since a truncated unary code is applied as a binarization method for an LFNST index, the LFNST index consists of a maximum of two bins, and the binary codes for the possible LFNST index values of 0, 1, and 2 are assigned as 0, 10, and 11, respectively. For example, context-based CABAC coding (regular coding) can be applied to the first bin, and context-based CABAC coding can also be applied to the second bin. The coding of an LFNST index can be represented in the following table.
[0201] [Table 4]
[0202] As shown in Table 4, for the first bin (binIdx=0), context 0 can be applied in the case of a single tree, and context 1 can be applied in the case of a non-single tree. Also, as shown in Table 4, context 2 can be applied to the second bin (binIdx=1). That is, two contexts can be assigned to the first bin, and one context can be assigned to the second bin, and each context can be distinguished by the ctxInc value (0, 1, 2).
[0203] Here, single tree means that the luma component and chroma component are coded using the same coding structure. After a coding unit is divided using the same coding structure, if the size of the coding unit is below a certain threshold and the luma component and chroma component are coded using separate tree structures, the coding unit can be considered as a dual tree and the context of the first bin can be determined. That is, the first context can be assigned as shown in Table 4.
[0204] Alternatively, if the value of the variable treeType is assigned as SINGLE_TREE for the first bin, you can code it using context 0, otherwise use context 1.
[0205] Meanwhile, the following simplification method can be applied to the adopted LFNST.
[0206] (i) As an example, the number of output data for the forward LFNST can be limited to a maximum of 16.
[0207] In the case of (c) of Figure 10, 4x4 LFNST can be applied to each of the two 4x4 regions adjacent to the upper left corner, generating up to 32 pieces of LFNST output data. If the number of output data pieces for forward LFNST is limited to a maximum of 16, 4x4 LFNST can be applied only to the single 4x4 region located at the upper left corner of a 4xN / Nx4 (N≧16) block (TU or CU), and LFNST can be applied only once to all blocks in Figure 10. This simplifies the implementation of video coding.
[0208] 12 shows an example in which the number of output data items for the forward LFNST is limited to a maximum of 16. As shown in FIG. 12, when LFNST is applied to the upper left 4×4 region of a 4×N or N×4 block where N is 16 or greater, the number of output data items from the forward LFNST is 16.
[0209] (ii) As an example, zero-out can be additionally applied to areas where LFNST is not applied. In this document, zero-out can mean filling all position values belonging to a specific area with zero values. That is, zero-out can also be applied to areas that are not changed by LFNST and retain the result of the forward linear transform. As described above, since LFNST is divided into 4x4 LFNST and 8x8 LFNST, zero-out can be divided into two types ((ii)-(A) and (ii)-(B)) as follows.
[0210] (ii)-(A) When 4x4 LFNST is applied, regions to which 4x4 LFNST is not applied can be zeroed out. Figure 13 illustrates zeroing out in a block to which 4x4 LFNST is applied, according to an example.
[0211] As shown in FIG. 13, for blocks to which 4×4 LFNST is applied, i.e., for blocks (a), (b), and (c) in FIG. 11, even areas to which LFNST is not applied can be filled with 0.
[0212] On the other hand, (d) of FIG. 13 shows that zeroing out is performed on the remaining blocks to which the 4×4 LFNST is not applied when the maximum number of output data pieces of the forward LFNST is limited to 16 as in FIG.
[0213] (ii)-(B) When 8x8 LFNST is applied, it is possible to zero out areas to which 8x8 LFNST is not applied. Figure 14 is a diagram illustrating zeroing out in a block to which 8x8 LFNST is applied, according to an example.
[0214] As shown in FIG. 14, for blocks to which 8×8 LFNST is applied, that is, for blocks (d) and (e) in FIG. 11, even areas to which LFNST is not applied can be filled with 0.
[0215] (iii) When LFNST is applied, the area filled with zeros can change due to the zero-out method proposed in (ii) above. Therefore, the zero-out method proposed in (ii) above allows checking whether non-zero data exists in a wider area than in the case of LFNST in FIG. 11.
[0216] For example, when (ii)-(B) is applied, it is possible to check whether non-zero data exists in the areas filled with zero values in (d) and (e) of FIG. 11 as well as in the areas additionally filled with zeros in FIG. 14, and then perform signaling for the LFNST index only if non-zero data does not exist.
[0217] Of course, even when the zero-out proposed in (ii) above is applied, it is possible to check whether non-zero data exists, as with the existing LFNST index signaling. That is, LFNST index signaling can be applied by checking whether non-zero data exists for blocks filled with zeros in Figure 11. In this case, zero-out is performed only in the encoding device, and the decoding device can perform LFNST index parsing without assuming the corresponding zero-out, that is, by checking whether non-zero data exists only for areas explicitly marked with zeros in Figure 11.
[0218] Various embodiments can be derived by applying combinations of the simplification methods ((i), (ii)-(A), (ii)-(B), and (iii)) to the LFNST. Of course, the combinations of the simplification methods are not limited to the following examples, and any combination can be applied to the LFNST.
[0219] Example
[0220] -Limit the number of output data for forward LFNST to a maximum of 16 → (i)
[0221] -When 4×4LFNST is applied, all areas to which 4×4LFNST does not apply are zeroed out → (ii)-(A)
[0222] When -8×8LFNST is applied, all areas where 8×8LFNST is not applied are zeroed out → (ii)-(B)
[0223] - For areas filled with existing 0 values and areas filled with 0 due to additional zero-out ((ii)-(A), (ii)-(B)), check whether non-zero data exists, and only if non-zero data does not exist, perform LFNST indexing signaling → (iii)
[0224] In the above embodiment, when LFNST is applied, the area in which non-zero output data can exist is limited to the upper left 4x4 area. More specifically, in the cases of Figures 13(a) and 14(a), the 8th position in the scan order is the last position in which non-zero data can exist, and in the cases of Figures 13(b) and 13(d) and 14(b), the 16th position in the scan order (i.e., the bottom rightmost position of the upper left 4x4 block) is the last position in which non-zero data can exist.
[0225] Therefore, when LFNST is applied, whether or not LFNST index signaling is enabled can be determined after checking whether non-zero data exists at a position where the residual coding process is not allowed (a position beyond the last position).
[0226] In the case of the zero-out method proposed in (ii), the amount of data that is ultimately generated when applying both the primary transform and LFNST is reduced, thereby reducing the amount of calculation required when performing the entire transform process. In other words, when LFNST is applied, zero-out is also applied to the forward primary transform output data that exists in areas where LFNST is not applied, so there is no need to generate data for areas that will be zeroed out when performing the forward primary transform. Therefore, the amount of calculation required to generate the corresponding data can be reduced. Additional effects of the zero-out method proposed in (ii) can be summarized as follows.
[0227] First, as mentioned above, the amount of computation required to perform the entire transformation process is reduced.
[0228] In particular, when (ii)-(B) is applied, the amount of calculation in the worst case is reduced, making the transform process lighter. To expand on this, a large amount of calculations is generally required to execute a large-size primary transform, and when (ii)-(B) is applied, the number of data derived as the forward LFNST execution result can be reduced to 16 or less, and the effect of reducing the amount of transform calculations is further enhanced as the size of the entire block (TU or CU) increases.
[0229] Second, the amount of computation required for the entire conversion process is reduced, thereby reducing the power consumption required to perform the conversion.
[0230] Third, it reduces the latency involved in the conversion process.
[0231] Secondary transforms such as LFNST increase the overall latency associated with the transform execution by adding computational complexity to the existing primary transform. In particular, in the case of intra prediction, reconstruction data from neighboring blocks is used in the prediction process, so the increased latency due to secondary transforms during encoding leads to an increased latency until reconstruction, which can result in an increase in the overall latency of intra prediction encoding.
[0232] However, by applying the zero-out technique proposed in (ii), the latency of the first transform execution can be significantly reduced when LFNST is applied, so the latency of the entire transform execution can be maintained or reduced, making it easier to implement the encoding device.
[0233] On the other hand, conventional intra prediction performs coding without dividing a block to be coded, treating the block to be coded as a single coding unit. However, ISP (Intra Sub-Partitions) coding means dividing the block to be coded horizontally or vertically and performing intra prediction coding. In this case, coding / decoding is performed on the divided block unit to generate a reconstructed block, and the reconstructed block can be used as a reference block for the next divided block. For example, in ISP coding, one coding block can be divided into two or four sub-blocks and coded, and in ISP, one sub-block performs intra prediction by referring to the reconstructed pixel value of the sub-block located to the left or above it. Hereinafter, the term "coding" can be used to refer to both coding performed by an encoding device and decoding performed by a decoding device.
[0234] Meanwhile, the signaling of the LFNST index and the MTS index will be described below.
[0235] The following tables show an example of a coding unit syntax table, a transform unit syntax table, and a residual coding syntax table related to the signaling of an LFNST index and an MTS index. According to Table 5, the MTS index is moved from the transform unit level to the coding unit level syntax and is signaled after the LFNST index signaling. In addition, the restriction that does not allow LFNST when an ISP is applied to a coding unit is removed. When an ISP is applied to a coding unit, the restriction that does not allow LFNST is removed, so that LFNST can be applied to all intra-predicted blocks. In addition, both the MTS index and the LFNST index are conditionally signaled at the end of the coding unit level.
[0236] [Table 5]
[0237] [Table 6]
[0238] [Table 7]
[0239] The main variables in the table have the following meanings:
[0240] 1. cbWidth, cbHeight: Width and height of the current coding block
[0241] 2. log2TbWidth, log2TbHeight: Base-2 logarithm of the width and height of the current transform block. Zero-out is reflected and it can be reduced to the upper left corner where non-zero coefficients can exist.
[0242] 3. sps_lfnst_enabled_flag: A flag indicating whether LFNST is applicable (enabled). If the flag value is 0, LFNST is not applicable, and if the flag value is 1, LFNST is applicable. This flag is defined in the Sequence Parameter Set (SPS).
[0243] 4. CuPredMode[chType][x0][y0]: Prediction mode corresponding to the variable chType and the (x0, y0) position. chType can have values of 0 and 1, where 0 indicates the luma component and 1 indicates the chroma component. The (x0, y0) position indicates the position on the picture, and the CuPredMode[chType][x0][y0] value can be MODE_INTRA (intra prediction) or MODE_INTER (inter prediction).
[0244] 5. IntraSubPartitionsSplit[x0][y0]: The content for the (x0, y0) position is the same as 4. It indicates what type of ISP split is applied at the (x0, y0) position, and ISP_NO_SPLIT indicates that the coding unit corresponding to the (x0, y0) position is not split into partition blocks.
[0245] 6. intra_mip_flag[x0][y0]: The content for the (x0, y0) position is the same as in 4. intra_mip_flag is a flag indicating whether MIP (Matrix-based Intra Prediction) prediction mode is applied. If the flag value is 0, it indicates that MIP is not applicable, and if the flag value is 1, it indicates that MIP is applied.
[0246] 7. cIdx: A value of 0 indicates luma, and values of 1 and 2 indicate the chroma components Cb and Cr, respectively.
[0247] 8. treeType: Indicates single-tree and dual-tree (SINGLE_TREE: single tree, DUAL_TREE_LUMA: dual tree for luma component, DUAL_TREE_CHROMA: dual tree for chroma component)
[0248] 9. lastSubBlock: Indicates the position in the scan order of the sub-block (Coefficient Group (CG)) where the last significant coefficient (last non-zero coefficient) is located. 0 indicates a sub-block containing a DC component, and if it is greater than 0, it is not a sub-block containing a DC component.
[0249] 10. lastScanPos: Indicates the position of the last significant coefficient in the scan order within a subblock. If a subblock consists of 16 positions, the possible values are 0 to 15.
[0250] 11. lfnst_idx[x0][y0]: The LFNST index syntax element to be parsed. If not parsed, it is inferred to have a value of 0. In other words, the default value is set to 0, which indicates that LFNST is not applied.
[0251] 12. LastSignificantCoeffX, LastSignificantCoeffY: Indicates the x and y coordinates where the last significant coefficient is located within the transform block. The x coordinate starts from 0 and increases from left to right, and the y coordinate starts from 0 and increases from top to bottom. If the values of these two variables are all 0, it means that the last significant coefficient is located at DC.
[0252] 13. cu_sbt_flag: A flag indicating whether the SubBlock Transform (SBT) currently included in the VVC standard is applicable. If the flag value is 0, it indicates that the SBT is not applicable, and if the flag value is 1, it indicates that the SBT is applied.
[0253] 14. sps_explicit_mts_inter_enabled_flag, sps_explicit_mts_intra_enabled_flag: Flags indicating whether explicit MTS is applied to inter CUs and intra CUs, respectively. If the corresponding flag value is 0, it indicates that MTS is not applicable to inter CUs or intra CUs, and if the value is 1, it indicates that MTS is applicable.
[0254] 15. tu_mts_idx[x0][y0]: MTS index syntax element to be parsed. If not parsed, it is inferred as 0. That is, the default value is set to 0, which indicates that DCT-2 is applied to both the horizontal and vertical directions.
[0255] As shown in Table 5, when coding mts_idx[x0][y0], various conditions are checked and tu_mts_idx[x0][y0] is signaled only if the lfnst_idx[x0][y0] value is 0.
[0256] Also, tu_cbf_luma[x0][y0] is a flag indicating whether or not a significant coefficient exists for the luma component.
[0257] According to Table 5, when the width and height of the coding unit for the luma component are both less than or equal to 32, mts_idx[x0][y0] is signaled (Max(cbWidth, cbHeight) <= 32), i.e., whether MTS is applicable is determined by the width and height of the coding unit for the luma component.
[0258] Also, according to Table 5, even in the case of ISP mode (IntraSubPartitionsSplitType!=ISP_NO_SPLIT), lfnst_idx[x0][y0] can be configured to be signaled, and the same LFNST index value can be applied to all ISP partition blocks.
[0259] On the other hand, mts_idx[x0][y0] can only be signaled in non-ISP mode (IntraSubPartitionsSplit[x0][y0]==ISP_NO_SPLIT).
[0260] In the process of determining log2ZoTbWidth and log2ZoTbHeight as shown in Table 7 (where log2ZoTbWidth and log2ZoTbHeight respectively represent the base-2 logarithmic values of the width and height for the top-left corner area remaining after zeroing out), the part checking the mts_idx[x0][y0] values can be omitted.
[0261] Also, for example, when determining log2ZoTbWidth and log2ZoTbHeight in residual coding, a condition for checking sps_mts_enable_flag can be added.
[0262] The variable LfnstZeroOutSigCoeffFlag in Table 5 is 0 if there is a valid coefficient at a position that will be zeroed out when LFNST is applied, and is 1 otherwise. The variable LfnstZeroOutSigCoeffFlag can be set according to various conditions shown in Table 7.
[0263] For example, the variable LfnstDcOnly in Table 5 is set to 1 if the last significant coefficients of a transform block whose CBF (Coded Block Flag, which is 1 if there is at least one significant coefficient in the block and 0 otherwise) value is 1 are all located at the DC position (top left position), and is set to 0 otherwise. More specifically, in the case of dual tree luma, the position of the last significant coefficient is checked for one luma transform block, and in the case of dual tree chroma, the position of the last significant coefficient is checked for both the transform block for Cb and the transform block for Cr. In the case of a single tree, the position of the last significant coefficient can be checked for the transform blocks for luma, Cb, and Cr.
[0264] In Table 5, MtsZeroOutSigCoeffFlag is initially set to 1, and this value can be changed by residual coding in Table 7. The variable MtsZeroOutSigCoeffFlag changes its value from 1 to 0 when there is a valid coefficient in the area that should be filled with 0 by zeroing out (LastSignificantCoeffX>15||LastSignificantCoeffY>15), in which case the MTS index is not signaled, as in Table 5.
[0265] Meanwhile, as shown in Table 5, mts_idx[x0][y0] coding can be omitted when tu_cbf_luma[x0][y0] is 0. That is, when the CBF value of the luma component is 0, no transform is applied, so there is no need to signal the MTS index, and therefore MTS index coding can be omitted.
[0266] According to an example, the technical feature may be implemented with other conditional syntax. For example, after MTS is performed, a variable indicating whether a valid coefficient exists in the area excluding the DC region of the current block may be derived, and if the variable indicates that a valid coefficient exists in the area excluding the DC region, an MTS index may be signaled. That is, the presence of a valid coefficient in the area excluding the DC region of the current block indicates that the tu_cbf_luma[x0][y0] value is 1, and in this case, an MTS index may be signaled.
[0267] The variable MtsDcOnly may be initially set to 1 at the coding unit level, and then changed to 0 if it indicates that a valid coefficient exists in a region excluding the DC region of the current block at the residual coding level. When the variable MtsDcOnly is 0, the video information may be configured so that an MTS index is signaled.
[0268] If tu_cbf_luma[x0][y0] is 0, the residual coding syntax is not called at the transform unit level in Table 6, so the variable MtsDcOnly maintains its initial value of 1. In this case, since the variable MtsDcOnly is not changed to 0, the video information can be configured so that the MTS index is not signaled. That is, the MTS index is not parsed or signaled.
[0269] Meanwhile, the decoding apparatus may determine the color index (cIdx) of the transform coefficient to derive the variable MtsZeroOutSigCoeffFlag in Table 7. A color index (cIdx) of 0 indicates a luma component.
[0270] In one example, since MTS can be applied only to the luma component of the current block, the decoding device can determine whether the color index is luma when deriving the variable MtsZeroOutSigCoeffFlag, which determines whether the MTS index can be parsed.
[0271] The variable MtsZeroOutSigCoeffFlag indicates whether zeroing out is performed when MTS is applied, and indicates whether a transform coefficient exists in an area other than the top left area where the last significant coefficient can be located due to zeroing out after MTS is performed, i.e., the top left 16x16 area. The variable MtsZeroOutSigCoeffFlag is initially set to 1 at the coding unit level (MtsZeroOutSigCoeffFlag=1) as shown in Table 5, and if a transform coefficient exists in an area other than the 16x16 area, its value can be changed from 1 to 0 at the residual coding level (MtsZeroOutSigCoeffFlag=0) as shown in Table 7. If the value of the variable MtsZeroOutSigCoeffFlag is 0, the MTS index is not signaled.
[0272] As shown in Table 7, at the residual coding level, a non-zero-out area where non-zero transform coefficients can exist can be set depending on whether zero-out associated with MTS is performed.In this case, if the color index (cIdx) is 0, the non-zero-out area can be set to the upper left 16x16 area of the current block.
[0273] In this way, when deriving the variable that determines whether or not to parse the MTS index, it is determined whether the color component is luma or chroma. However, since LFNST can be applied to both the luma component and the chroma component of the current block, the color component is not determined when deriving the variable that determines whether or not to parse the LFNST index.
[0274] For example, Table 5 shows a variable LfnstZeroOutSigCoeffFlag that can indicate that zeroing out has been performed when LFNST is applied. The variable LfnstZeroOutSigCoeffFlag indicates whether a valid coefficient exists in a second region excluding a first region at the top left of the current block. This value is initially set to 1, and if a valid coefficient exists in the second region, this value can be changed to 0. The LFNST index can be parsed only if the initially set value of the variable LfnstZeroOutSigCoeffFlag is maintained at 1. When determining and deriving whether the value of the variable LfnstZeroOutSigCoeffFlag is 1, the color index of the current block is not determined because LFNST can be applied to both the luma component and the chroma component of the current block.
[0275] As shown in Table 5, an MTS index is signaled for each coding unit, and mts_idx (MTS index) is signaled only when MtsZeroOutSigCoeffFlag is 1.
[0276] Also, as shown in Table 7, the MtsZeroOutCoeffFlag value can be determined according to a specific condition (if((LastSignificantCoeffX>15||LastSignificantCoeffY>15)&&cIdx==0)) at the residual coding level.
[0277] The MtsZeroOutSigCoeffFlag value is set to 0 if the X coordinate value for the last non-zero coefficient (LastSignificantCoeffX) is greater than 15 or the Y coordinate value for the last non-zero coefficient (LastSignificantCoeffY) is greater than 15 (here, the X coordinate value increases from left to right within the corresponding transform block, and the Y coordinate value increases from top to bottom within the corresponding transform block. The top left corner of the corresponding transform block is located at (0, 0).
[0278] Since MtsZeroOutSigCoeffFlag was initialized to 1 in Table 5, if the conditions presented in Table 7 are met and the MtsZeroOutSigCoeffFlag value is not set to 0, the value of 1 will remain.
[0279] If the primary transform applied in the horizontal direction is A and the primary transform applied in the vertical direction is B, the primary transform can be expressed as (A, B). Currently, the VVC standard restricts (DST-7, DST-7), (DST-7, DCT-8), (DCT-8, DST-7), and (DCT-8, DCT-8) to have transform coefficients only in the upper left 16x16 region of the corresponding transform block. Therefore, the condition (LastSignificantCoeffX>15||LastSignificantCoeffY>15) in Table 7 indicates that the last non-zero coefficient is located outside the upper left 16x16 region. In Table 7, the variable cIdx indicates a color component, and a value of 0 for the variable cIdx indicates a luma component.
[0280] In the current VVC standard, the MTS index (mts_idx) is parsed after parsing for residual coding. More specifically, Table 5 shows the coding unit, which is the syntax parsing function for the coding unit. The MTS index is parsed after the transform tree function, and a function that performs residual coding parsing is called within the transform tree function. Therefore, the MTS index is parsed after parsing for the residual (the residual parsing function shown in Table 7 is responsible for parsing for the corresponding residual coding). From a decoding perspective, while residual coding is in progress, the MTS index information is not known, so it is impossible to know what primary transformation is being applied. However, if MTS is enabled and SBT or ISP is applied, or if implicit MTS is applied, MTS is implicitly applied, so the corresponding primary transformation can be known before parsing for residual coding.
[0281] The reason why the condition check shown in Table 7 is necessary is because the current VVC standard restricts the output of only 16 transform coefficients when a 32-length DST-7 or 32-length DCT-8 is applied to a forward transform. For example, if the MTS index value is greater than 0, indicating that the applied primary transform is one of (DST-7, DST-7), (DST-7, DCT-8), (DCT-8, DST-7), or (DCT-8, DCT-8), non-zero transform coefficients can only exist in the upper left 16x16 region of the corresponding transform block.
[0282] Therefore, when the position of the last non-zero transform coefficient is outside the upper left 16x16 region, it corresponds to the case where the MTS index value is 0, so signaling of the MTS index can be omitted as shown in Table 5. However, even if the position of the last non-zero transform coefficient is inside the upper left 16x16 region, since a non-zero coefficient can exist outside the upper left 16x16 region, in this case, even if the MTS index value is 0, a situation may occur where the MTS index is signaled as 0, and this case will be described as follows.
[0283] When the primary transform is (DCT-2, DCT-2), the position of the last non-zero coefficient is in the upper left 16×16 region, and at the same time, there can also be non-zero transform coefficients outside the upper left 16×16 region. This is because, in the scan order within the transform block, it is possible to scan outside the upper left 16×16 region, i.e., to scan a region other than the upper left 16×16 region and also scan the upper left 16×16 region, or conversely, it is possible to scan the upper left 16×16 region and also scan outside the upper left 16×16 region.
[0284] 15 is a diagram illustrating scanning of a 32×32 transform block according to an example of the present document, and more specifically, illustrates that the 32×32 transform block is divided into 4×4 coefficient groups (CGs) and scanned. In this document, when the CGs are divided into CGs and scanned, the corresponding CGs are also referred to as "scan sub-blocks."
[0285] The numbers displayed for each CG indicate the forward scan order, and in the decoding device, the CGs are scanned in the backward scan order starting from the position where the last non-zero transform coefficient is located. In Figure 15, it can be assumed that the last non-zero transform coefficient is located in CG No. 25, which is located within the upper left 16x16 region.
[0286] As shown in Figure 15, if the last non-zero transform coefficient exists in CG No. 25, the decoding device scans from the CG where the last non-zero transform coefficient exists according to the backward scan order, and scans the CGs in the order of 25, 24, 23, ..., 3, 2, 1 based on the numbers shown in Figure 15. Since CGs No. 24, 23, 22, 21, 20, 17, 16, 15, and 11 are located outside the upper left 16x16 region, it is not possible to determine whether a non-zero coefficient exists only in the upper left 16x16 region by simply checking whether LastSignificantCoeffX and LastSignificantCoeffY correspond to the upper left 16x16 region as shown in Table 7.
[0287] Therefore, when parsing for residual coding, if a 4x4 coefficient group is checked to see if it belongs to the upper left 16x16 region each time a non-zero transform coefficient is scanned, the MtsZeroOutSigCoeffFlag value can be set to 0 only if a non-zero coefficient exists outside the upper left 16x16 region. The residual coding syntax reflecting this is shown in the table below.
[0288] [Table 8-1]
[0289] [Table 8-2]
[0290] [Table 8-3]
[0291] As shown in Table 8, whenever a non-zero transform coefficient is found, it is checked whether it is located in the upper left 16x16 region (if((xC>15||yC>15)&&cIdx==0)), and the MtsZeroOutSigCoeffFlag value is set to 0. In this case, if the value of sig_coeff_flag[xC][yC], which is flag information indicating the presence or absence of a transform coefficient, is 1, the above condition is checked (if(sig_coeff_flag[xC][yC])), where xC and yC respectively indicate the sample-unit X and Y coordinates within the current transform block. The upper left position of the corresponding transform block is (0,0).
[0292] Table 8 includes the condition check and MtsZeroOutSigCoeffFlag update part (if((LastSignificantCoeffX>15||LastSignificantCoeffY>15)&&cIdx==0)MtsZeroOutSigCoeffFlag=0) shown in Table 7. If the sig_coeff_flag[xC][yC] value for the last non-zero transform coefficient is inferred to be 1, the corresponding condition check and MtsZeroOutSigCoeffFlag update part in Table 8 can be removed.
[0293] In summary, when the MTS index is signaled in Table 5 through the syntax configuration shown in Table 8, the MTS index is signaled only if there is a non-zero transform coefficient in the upper left 16x16 region of the luma transform block, regardless of what primary transform is applied. If the MTS index is not signaled, the corresponding value is inferred to be 0, i.e., (DCT-2, DCT-2) is applied.
[0294] As mentioned above, there are three cases where the primary transformation to be applied can be known before the MTS index is signaled:
[0295] 1) When Subblock Transform (SBT) is applied
[0296] 2) When Intra Sub-Partitions (ISP) are applied
[0297] 3) When implicit MTS is applied
[0298] In the case of (1), the MTS index is signaled only when the cu_sbt_flag value indicating whether or not SBT is applied in Table 5 is 0, i.e., the MTS index is signaled only when SBT is not applied. Therefore, if SBT is applied, it is not relevant to the modification of Table 7.
[0299] In the case of (2), the MTS index is signaled only when ISP is not applied in Table 4 (when signaling the MTS index in Table 5, the IntraSubPartitionsSplit[x0][y0] == ISP_NO_SPLIT condition is checked), so even if ISP is applied, it is not related to the modification of Table 8.
[0300] For the case (3), since the MTS index is signaled only when explicit MTS is applicable (enabled) in Table 5, the case where implicit MTS is applied is not related to the modification of Table 8. That is, in the case of an MTS applied to a residual block generated by intra prediction (intra MTS), the MTS index is signaled only when the value of sps_explicit_mts_intra_enabled_flag is 1, and in the case of an MTS applied to a residual block generated by inter prediction (inter MTS), the value of sps_explicit_mts_inter_enabled_flag is 1. Therefore, the modification of Table 8 does not affect the case where implicit MTS is applied.
[0301] Meanwhile, as another example, it is possible to check whether a non-zero coefficient exists outside the upper left corner 16x16 area in CG units as shown in the table below.
[0302]
Table 9-1
[0303]
Table 9-2
[0304]
Table 9-3
[0305] The xS and yS in Table 9 indicate the X coordinate position and Y coordinate position of each CG unit inside the current conversion block. In order to confirm whether the conversion coefficient is located outside the 16×16 outer side of the upper left corner, it is necessary to convert xS and yS to the coordinates of the sample unit. That is, xS and yS are converted to the sample unit coordinates as (xS << log2SbW), (yS << log2SbH). At this time, log2SbW and log2SbH are the base-2 logarithm values for the width and height of the corresponding CG respectively. The X coordinate increases from left to right, and the Y coordinate increases from top to bottom. The coordinates relative to the upper left corner position of the corresponding conversion block are (0, 0).
[0306] As shown in Table 9, when scanning in CG units, if there is a non-zero conversion coefficient inside the corresponding CG for each CG (when the coded_sub_block_flag[xS][yS] value is 1), and it is confirmed that the corresponding CG is located outside the 16×16 area of the upper left corner of the corresponding conversion block ((xS << log2SbW) > 15 || (yS << log2SbH) > 15), the MtsZeroOutSigCoeffFlag value is set to 0.
[0307] As shown in Table 5, the variable MtsZeroOutSigCoeffFlag is initialized to 1, so if the MtsZeroOutSigCoeffFlag value is not set to 0, it will be maintained at 1. If the coded_sub_block_flag[xS][yS] value of the CG to which the last non-zero transform coefficient belongs is inferred to be 1, the corresponding condition check part and MtsZeroOutSigCoeffFlag update part (if((LastSignificantCoeffX>15||LastSignificantCoeffY>15)&&cIdx==0)MtsZeroOutSigCoeffFlag=0) in Table 7 can also be removed from Table 9.
[0308] The following drawings are created to explain a specific example of the present specification. The names of specific devices and names of specific signals / messages / fields shown in the drawings are provided for illustrative purposes only, and the technical features of the present specification are not limited to the specific names used in the following drawings.
[0309] FIG. 16 is a flow chart illustrating the operation of a video decoding device according to one embodiment of this document.
[0310] The steps disclosed in Fig. 16 are based on some of the details detailed in Fig. 4 to Fig. 15. Therefore, the description of specific details that overlap with the details detailed in Fig. 3 to Fig. 15 will be omitted or simplified.
[0311] A decoding device 300 according to one embodiment receives a bitstream including residual information and can derive residual information, e.g., quantized transform coefficients, for a current block, i.e., a transform block to be transformed, from the bitstream (S1610).
[0312] More specifically, the decoding apparatus 300 may decode information on quantized transform coefficients for a current block from a bitstream and derive quantized transform coefficients for a target block based on the information on the quantized transform coefficients for the current block. The information on the quantized transform coefficients for the target block may be included in a Sequence Parameter Set (SPS) or a slice header, and may include at least one of information on whether a simplified transform (RST) is applied, information on a simplification factor, information on a minimum transform size for applying the simplified transform, information on a maximum transform size for applying the simplified transform, a simplified inverse transform size, and information on a transform index indicating any one of transform kernel matrices included in the transform set.
[0313] The decoding apparatus 300 may derive the position of the last significant coefficient in the current block and the transform coefficients for the current block based on the residual information (S1620). The decoding apparatus 300 may derive the transform coefficients by performing inverse quantization on the quantized transform coefficients for the current block.
[0314] The derived transform coefficients may be two-dimensionally arranged in the current block, and the decoding device may derive information on non-zero data, i.e., non-zero significant coefficients, in the current block through such residual coding. That is, the decoding device may obtain information on the last position of the non-zero significant coefficients in the current block.
[0315] The transform coefficients derived based on the residual information in S1620 may be dequantized transform coefficients as described above, or may be quantized transform coefficients. That is, the transform coefficients may be data that can identify whether they are non-zero data in the current block and the positions of significant coefficients, regardless of whether they are quantized or not.
[0316] The decoding device may apply LFNST to the transform coefficients to derive modified transform coefficients, or may not perform LFNST.
[0317] The decoding device can derive residual samples by performing an inverse linear transform on the transform coefficients or the modified transform coefficients. The decoding device can use a conventional DCT-2 as a transform kernel for the inverse linear transform, or can apply the detailed MTS.
[0318] MTS can be performed implicitly or based on explicit MTS index signaling.
[0319] The decoding device may check a predetermined condition to parse the MTS index. For example, the decoding device may parse the MTS index based on the absence of a valid coefficient in a second region excluding a first region at the top left corner of the current block (S1630).
[0320] The MTS index can derive flag information indicating whether a significant coefficient exists in the second region, and in this case, the flag information can be derived by determining whether a significant coefficient exists in the second region in units of scan sub-blocks in which the significant coefficients are scanned.
[0321] The decoding apparatus may perform an inverse linear transform on the transform coefficients of the first region at the top left of the current block to be transformed, i.e., the second region excluding the first region at the top left of the current block is zeroed out and has no transform coefficients.
[0322] For example, when MTS is applied, the first region is the upper left 16x16 region of the current block, and in this case, the second region can indicate a region other than the upper left 16x16 region.
[0323] The scan sub-block is a 4x4 block, and the scan sub-block can be scanned in the reverse diagonal scan direction from the position of the last significant coefficient in the current block, as shown in FIG.
[0324] After determining whether a valid coefficient exists in the zeroed-out region, in order to parse the MTS index, the decoding device can derive flag information indicating whether a valid coefficient exists in the second region and parse the MTS index based on this.
[0325] This flag information is a variable MtsZeroOutSigCoeffFlag, and it can be determined whether a significant coefficient exists in the second region in units of scan sub-blocks in which significant coefficients are scanned.
[0326] The variable MtsZeroOutSigCoeffFlag is a flag (coded_sub_block_flag or sb_coded_flag) that indicates whether a valid coefficient exists in the scan sub-block as shown in Table 9. If the value is 1 and the valid coefficient in the scan sub-block is located in the second region (((xS<<log2SbW)> 15||(yS<<log2SbH)> 15)), it can be indicated that the effectiveness coefficient exists in the second region.
[0327] Alternatively, the variable MtsZeroOutSigCoeffFlag can be derived by checking whether the 4x4 scan sub-block belongs to the first region each time the transform coefficients are scanned, as shown in Table 8. That is, if the flag (sig_coeff_flag) indicating whether a significant coefficient exists in the scan sub-block is 1 and the significant coefficient existing in the scan sub-block is located in the second region (if ((xC>15||yC>15)), the variable MtsZeroOutSigCoeffFlag can indicate that a significant coefficient exists in the second region.
[0328] Alternatively, the variable MtsZeroOutSigCoeffFlag may indicate that a valid coefficient exists in the second region if the flag value indicating whether a valid coefficient exists is 1 and the scan sub-block itself is located in the second region.
[0329] Such a variable MtsZeroOutSigCoeffFlag may be initially set to 1, maintained at 1 if the valid coefficient is not located in the second region, and changed to 0 if the valid coefficient is located in the second region.
[0330] To summarize, the decoding device can parse the MTS index based on the flag information indicating that there are no valid coefficients in the second region, and the MTS index can be parsed when the variable MtsZeroOutSigCoeffFlag, which was initially set to 1, maintains that value.
[0331] Thereafter, the decoding apparatus may derive residual samples for the current block by applying the transform kernel derived based on the MTS index to the transform coefficients of the first region (S1640).
[0332] Next, the decoding apparatus 300 may generate reconstructed samples based on the residual samples for the current block and the predicted samples for the current block.
[0333] The following drawings are created to explain a specific example of the present specification. The names of specific devices and names of specific signals / messages / fields shown in the drawings are provided for illustrative purposes only, and the technical features of the present specification are not limited to the specific names used in the following drawings.
[0334] FIG. 17 is a flow diagram illustrating the operation of a video encoding device according to one embodiment of this document.
[0335] The steps disclosed in Fig. 17 are based on some of the details detailed in Fig. 4 to Fig. 15. Therefore, the description of specific details that overlap with the details detailed in Fig. 2 and Fig. 4 to Fig. 15 will be omitted or simplified.
[0336] The encoding apparatus 200 according to an embodiment may derive prediction samples based on an intra prediction mode applied to a current block (S1710).
[0337] The encoding apparatus 200 according to an embodiment may derive a residual sample for the current block based on the predicted sample (S1720).
[0338] The encoding apparatus 200 according to an embodiment may derive transform coefficients for the current block by applying MTS to the residual samples (S1730).
[0339] By way of example, the encoding device can apply the detailed MTS for the primary transform, or can use the conventional DCT-2 as the transform kernel.
[0340] MTS can be performed implicitly or based on explicit MTS index signaling.
[0341] The encoding device can determine whether to perform MTS on the primary transform, and if it decides to perform MTS, it can apply DCT-8 or DST-7 to the residual samples to derive transform coefficients.
[0342] For example, when MTS is applied as a primary transform, the encoding apparatus may zero out a second region excluding a first region at the top left corner of the current block (S1740).
[0343] For example, the first region may be the 16x16 region at the top left corner of the current block, and in this case, the second region may indicate a region other than the 16x16 region at the top left corner.
[0344] This zeroing reduces the amount of calculation required to perform the entire conversion process, thereby reducing the amount of calculation required for the entire conversion process, thereby reducing power consumption required to perform the conversion, and also reducing latency associated with the conversion process, thereby increasing video coding efficiency.
[0345] The encoding apparatus may further apply LFNST to the transform coefficients derived after the primary transform to derive modified transform coefficients.
[0346] The encoding apparatus may derive residual information based on the transform coefficients or modified transform coefficients for the current block (S1750).
[0347] That is, the encoding apparatus can generate residual information including information on quantized transform coefficients. The residual information can include the transform-related information / syntax elements described above. The encoding apparatus can encode image / video information including the residual information and output it in the form of a bitstream.
[0348] More specifically, the encoding apparatus 200 may generate information about the quantized transform coefficients and encode the generated information about the quantized transform coefficients.
[0349] The encoding apparatus may also configure the video information so that an MTS index indicating a transform kernel of the MTS is parsed based on whether a significant coefficient exists in the second region (S1760).
[0350] The encoding apparatus may also configure the image information such that flag information indicating whether a significant coefficient exists in the second region is derived for each scan sub-block in which the significant coefficient is scanned.
[0351] That is, the encoding apparatus can configure the video information so that the video information shown in Table 8 or Table 9 can be parsed by the decoding apparatus.
[0352] For example, the scan sub-block is a 4x4 block, and the scan sub-block can be scanned in a decoding device in an inverse diagonal scan direction from the position of the last significant coefficient in the current block, as shown in FIG.
[0353] The flag information is a variable MtsZeroOutSigCoeffFlag, and it can be determined whether a significant coefficient exists in the second region in units of scan sub-blocks in which significant coefficients are scanned.
[0354] The variable MtsZeroOutSigCoeffFlag is a flag (coded_sub_block_flag) indicating whether a valid coefficient exists in the scan sub-block as shown in Table 9. If the value is 1 and the valid coefficient exists in the scan sub-block and is located in the second region (((xS<<log2SbW)> 15||(yS<<log2SbH)> 15)), it can be indicated that the effectiveness coefficient exists in the second region.
[0355] Alternatively, the variable MtsZeroOutSigCoeffFlag can be derived by checking whether the 4x4 scan sub-block belongs to the first region each time the transform coefficients are scanned, as shown in Table 8. That is, if the flag (sig_coeff_flag) indicating whether a significant coefficient exists in the scan sub-block is 1 and the significant coefficient existing in the scan sub-block is located in the second region (if ((xC>15||yC>15)), the variable MtsZeroOutSigCoeffFlag can indicate that a significant coefficient exists in the second region.
[0356] Alternatively, the variable MtsZeroOutSigCoeffFlag may indicate that a valid coefficient exists in the second region if the flag value indicating whether a valid coefficient exists is 1 and the scan sub-block itself is located in the second region.
[0357] Such a variable MtsZeroOutSigCoeffFlag may be initially set to 1, maintained at 1 if the valid coefficient is not located in the second region, and changed to 0 if the valid coefficient is located in the second region.
[0358] The encoding device may encode and output the MTS index based on the residual information derived based on the transform coefficients and the flag information indicating whether or not a significant coefficient exists in the second region.
[0359] In this document, at least one of quantization / dequantization and / or transform / inverse transform may be omitted. When the quantization / dequantization is omitted, the quantized transform coefficients may be referred to as transform coefficients. When the transform / inverse transform is omitted, the transform coefficients may also be referred to as coefficients or residual coefficients, or may still be referred to as transform coefficients for uniformity of representation.
[0360] Also, in this document, quantized transform coefficients and transform coefficients may be referred to as transform coefficients and scaled transform coefficients, respectively. In this case, residual information may include information about transform coefficients, and the information about the transform coefficients may be signaled via residual coding syntax. Transform coefficients may be derived based on the residual information (or information about the transform coefficients), and scaled transform coefficients may be derived through an inverse transform (scaling) of the transform coefficients. Residual samples may be derived based on an inverse transform (transform) of the scaled transform coefficients. This may also be applied / expressed in other parts of this document.
[0361] In the above-described embodiments, the method is described based on a flowchart as a series of steps or blocks, but this document is not limited to the order of steps, and some steps may occur in a different order or simultaneously with other steps than those described above. Furthermore, those skilled in the art will understand that the steps shown in the flowchart are not exclusive, and other steps may be included, or one or more steps in the flowchart may be deleted without affecting the scope of this document.
[0362] The method according to the present document described above can be implemented in the form of software, and the encoding device and / or decoding device according to the present document can be included in an image processing device such as a TV, a computer, a smartphone, a set-top box, or a display device.
[0363] 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 figure may be implemented and executed on a computer, processor, microprocessor, controller, or chip.
[0364] In addition, the decoding device and encoding device to which this document applies may be included in, and used to process video signals or data signals, multimedia broadcast transmitting / receiving devices, mobile communication terminals, home cinema video devices, digital cinema video devices, surveillance cameras, video interaction devices, real-time communication devices such as video communications, mobile streaming devices, storage media, camcorders, customized video (VoD) service providing devices, over-the-top (OTT) video devices, internet streaming service providing devices, three-dimensional (3D) video devices, image telephone video devices, medical video devices, etc. For example, over-the-top (OTT) video devices may include game consoles, Blu-ray players, internet access TVs, home theater systems, smartphones, tablet PCs, digital video recorders (DVRs), etc.
[0365] Furthermore, the processing method to which this document is applied may be produced in the form of a computer-executable program and stored on a computer-readable recording medium. Multimedia data having a data structure according to this document may also be stored on a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices on which computer-readable data is stored. The computer-readable recording medium may include, for example, a Blu-ray Disc (BD), a Universal Serial Bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. The computer-readable recording medium may also include media embodied in the form of a carrier wave (e.g., transmission via the Internet). A bitstream generated by the encoding method may be stored on a computer-readable recording medium or transmitted via a wired or wireless communication network. The embodiments of this document may be embodied in a computer program product as program code, which can be executed on a computer according to the embodiments of this document. The program code may be stored on a computer-readable carrier.
[0366] FIG. 18 exemplarily shows a structural diagram of a content streaming system to which this document applies.
[0367] Additionally, the content streaming system to which this document applies may include to a large extent encoding servers, streaming servers, web servers, media stores, user devices, and multimedia input devices.
[0368] 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 can be omitted. The bitstream can be generated by an encoding method or a bitstream generation method to which this document applies, and the streaming server can temporarily store the bitstream during the process of transmitting or receiving the bitstream.
[0369] 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.
[0370] 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.
[0371] 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, digital signage, etc. Each server in the content streaming system may be operated as a distributed server, and in this case, data received by each server may be processed in a distributed manner.
[0372] 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 memory configured to store the video; a processor coupled to the memory, The processor: Get the residual information from the bitstream, deriving transform coefficients for a current block based on the residual information; and applying an inverse linear transform to the transform coefficients based on a Multiple Transform Selection (MTS) index to derive residual samples for the current block; The processor: Scanning the scan sub-blocks in units of the previously set scan sub-blocks according to an anti-diagonal scan order to determine whether a valid coefficient exists in the scan sub-block; (i) whether the valid coefficient is present in the scan sub-block; (ii) whether the scan sub-block belongs to a second region other than the top-left corner 16x16 region of the current block; and (iii) whether the color index of the current block is 0; deriving flag information indicating whether the valid coefficient exists in the second region based on the The MTS index is parsed based on the flag information indicating that the valid coefficient does not exist in the second region.
2. The apparatus of claim 1 , wherein the MTS index is inferred to be 0 if the MTS index is not parsed.
3. The apparatus of claim 1 , wherein deriving whether the significant coefficient is present in the scan sub-block comprises parsing a flag indicating whether the significant coefficient is present in the scan sub-block.
4. The flag information is initially set to 1, The apparatus of claim 1 , wherein the flag information is changed to 0 if the significant coefficient is located in the second region.
5. the scan sub-block is a 4x4 block, The apparatus of claim 1 , wherein the scan sub-blocks are scanned according to the reverse diagonal scan order starting from a last scan sub-block containing a last significant coefficient in the current block.
6. a memory configured to store the video; a processor coupled to the memory, The processor: Derive a predicted sample for the current block; deriving a residual sample for the current block based on the predicted sample; applying a linear transform to the residual samples to derive transform coefficients for the current block; deriving residual information based on the transform coefficients of a 16x16 region at the top left corner of the current block; The image information is configured to parse a Multiple Transform Selection (MTS) index indicating a primary transform kernel based on whether a significant coefficient exists in a second region other than the upper left 16x16 region; The processor: encoding a flag indicating whether the significant coefficient is present in the scan sub-block by scanning the scan sub-block in a previously set scan sub-block unit according to an anti-diagonal scan order; (i) whether the valid coefficient is present in the scan sub-block; (ii) whether the scan sub-block belongs to a second region other than the top-left corner 16x16 region of the current block; and (iii) whether the color index of the current block is 0; deriving flag information indicating whether the valid coefficient exists in the second region based on the an apparatus configured to encode the MTS index based on the flag information indicating that the valid coefficient does not exist in the second region.
7. The apparatus of claim 6 , wherein the MTS index is inferred to be 0 if the MTS index is not encoded.
8. The flag information is initially set to 1, The apparatus of claim 6 , wherein the flag information is changed to 0 if the significant coefficient is located in the second region.
9. the scan sub-block is a 4x4 block, The apparatus of claim 7 , wherein the scan sub-blocks are scanned according to the reverse diagonal scan order starting from a last scan sub-block containing a last significant coefficient in the current block.
10. a processor configured to generate a bitstream for the video; a transmitter configured to transmit data including the bitstream; The processor: generating the bitstream for the video; transmitting the data including the bitstream; To obtain the bitstream, the processor: Derive a predicted sample for the current block; deriving a residual sample for the current block based on the predicted sample; applying a linear transform to the residual samples to derive transform coefficients for the current block; deriving residual information based on the transform coefficients of a 16x16 region at the top left corner of the current block; The image information is configured to parse a Multiple Transform Selection (MTS) index indicating a primary transform kernel based on whether a significant coefficient exists in a second region other than the upper left 16x16 region; The processor: encoding a flag indicating whether the significant coefficient is present in the scan sub-block by scanning the scan sub-block in a previously set scan sub-block unit according to an anti-diagonal scan order; (i) whether the valid coefficient is present in the scan sub-block; (ii) whether the scan sub-block belongs to a second region other than the top-left corner 16x16 region of the current block; and (iii) whether the color index of the current block is 0; deriving flag information indicating whether the valid coefficient exists in the second region based on the an apparatus configured to encode the MTS index based on the flag information indicating that the valid coefficient does not exist in the second region.
Citation Information
Patent Citations
Transform-based video coding method and apparatus
JP2023501529A