WO2026010447A1 - 영상 인코딩/디코딩 방법 및 장치, 그리고 비트스트림을 저장한 기록 매체 - Google Patents

영상 인코딩/디코딩 방법 및 장치, 그리고 비트스트림을 저장한 기록 매체

Info

Publication number
WO2026010447A1
WO2026010447A1 PCT/KR2025/009660 KR2025009660W WO2026010447A1 WO 2026010447 A1 WO2026010447 A1 WO 2026010447A1 KR 2025009660 W KR2025009660 W KR 2025009660W WO 2026010447 A1 WO2026010447 A1 WO 2026010447A1
Authority
WO
WIPO (PCT)
Prior art keywords
transformation
current block
block
transform
mode
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
PCT/KR2025/009660
Other languages
English (en)
French (fr)
Inventor
구문모
임재현
김승환
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
LG Electronics Inc
Original Assignee
LG Electronics Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by LG Electronics Inc filed Critical LG Electronics Inc
Publication of WO2026010447A1 publication Critical patent/WO2026010447A1/ko
Pending legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • H04N19/122Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/18Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a set of transform coefficients
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Definitions

  • the present invention relates to a video encoding/decoding method and device, and a recording medium storing a bitstream.
  • HD High Definition
  • UHD Ultra High Definition
  • image compression There are various technologies for image compression, such as inter prediction technology that predicts pixel values included in the current picture from pictures before or after the current picture, intra prediction technology that predicts pixel values included in the current picture using pixel information within the current picture, and entropy encoding technology that assigns short codes to values with high frequency of appearance and long codes to values with low frequency of appearance, and these technologies can be used to effectively compress and transmit or store image data.
  • inter prediction technology that predicts pixel values included in the current picture from pictures before or after the current picture
  • intra prediction technology that predicts pixel values included in the current picture using pixel information within the current picture
  • entropy encoding technology that assigns short codes to values with high frequency of appearance and long codes to values with low frequency of appearance
  • the present disclosure seeks to provide a method and device for performing transformation using non-separable transformation.
  • the present disclosure provides a method and apparatus for performing a transformation using a reduced-dimensional non-separable transform kernel.
  • the present disclosure seeks to provide a method and device for determining/signaling a non-separable transform kernel based on encoding parameters.
  • the present disclosure provides a method and apparatus for determining a transform set for non-separable or separable transform based on multiple intra prediction modes.
  • a video decoding method and device can derive transform coefficients of a current block from a bitstream, derive residual samples of the current block based on an inverse transform of the transform coefficients of the current block, and reconstruct the current block based on the residual samples of the current block.
  • a plurality of transform sets corresponding to a plurality of intra prediction modes for the current block can be derived, respectively.
  • the plurality of transform sets can include a base transform set and an alternative transform set.
  • the residual samples can be derived based on a transform kernel candidate belonging to any one of the plurality of transform sets.
  • the basic transformation set may be selected based on an intra prediction mode that specifies a reference sample for intra prediction of the current block
  • the alternative transformation set may be selected based on a DIPM (Derived Intra Prediction Mode) derived based on a prediction block or surrounding samples of the current block.
  • DIPM Dynamic Intra Prediction Mode
  • the basic transformation set may be selected based on a mode having the largest accumulated intensity value among DIMD (Decoder-side Intra Mode Derivation) modes derived through a DIMD method, and the alternative transformation set may be selected based on a mode having the second largest accumulated intensity value among the DIMD modes.
  • DIMD Decoder-side Intra Mode Derivation
  • the number of transform kernel candidates applicable to the current block among a plurality of transform kernel candidates belonging to a transform set may be determined based on at least one of the size of the current block, the slice type for the current block, the prediction mode of the current block, or whether the transform set of the current block is an alternative transform set.
  • the number of transform kernel candidates applicable to the current block when the product of the width and height of the current block is less than a first value, the number of transform kernel candidates applicable to the current block may be 0 or 1. When the product of the width and height of the current block is greater than or equal to the first value, the number of transform kernel candidates applicable to the current block may be 2 or 3. Here, the first value may be 256 or 512.
  • the number of transform kernel candidates applicable to the current block when the product of the width and height of the current block is less than a first value, the number of transform kernel candidates applicable to the current block may be 0 or 2. When the product of the width and height of the current block is greater than or equal to the first value, the number of transform kernel candidates applicable to the current block may be 1 or 3.
  • the first value may be 32, 64, or 128.
  • the number of transform kernel candidates applicable to the current block may be 0 based on the product of the width and the height of the current block being less than a first value, and the number of transform kernel candidates applicable to the current block may be 1 or 3 based on the product of the width and the height of the current block being greater than or equal to the first value.
  • the first value may be 32, 64, 128, 256, or 512.
  • the number of transform kernel candidates applicable to the current block when the current block is an inter-block, may be 1 or 2 based on the product of the width and height of the current block being less than a first value, and the number of transform kernel candidates applicable to the current block may be 3 based on the product of the width and height of the current block being greater than or equal to the first value.
  • the first value may be 32, 64, 128, 256, or 512.
  • the first value can be determined based on a syntax element regarding section setting.
  • the first value may be a pre-defined fixed value.
  • a computer-readable digital storage medium having encoded video/image information stored thereon, which causes a decoding device according to the present disclosure to perform a video decoding method.
  • FIG. 1 illustrates a video/image coding system according to the present disclosure.
  • the residual processing unit (230) may further include a subtractor (231).
  • the addition unit (250) may be called a reconstructor or a recontructed block generator.
  • the image segmentation unit (210), the prediction unit (220), the residual processing unit (230), the entropy encoding unit (240), the addition unit (250), and the filtering unit (260) described above may be configured by one or more hardware components (e.g., an encoding device chipset or processor) according to an embodiment.
  • the memory (270) may include a decoded picture buffer (DPB) and may be configured by a digital storage medium.
  • the hardware component may further include the memory (270) as an internal/external component.
  • the image segmentation unit (210) can segment an input image (or picture, frame) input to the encoding device (200) into one or more processing units.
  • the processing unit may be called a coding unit (CU).
  • the coding unit may be recursively segmented from a coding tree unit (CTU) or a largest coding unit (LCU) according to a QTBTTT (Quad-tree binary-tree ternary-tree) structure.
  • the largest coding unit may be used directly as the final coding unit, or, if necessary, the coding unit may be recursively split into coding units of lower depths, and the coding unit with the optimal size may be used as the final coding unit.
  • the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later.
  • the processing unit may further include a prediction unit (PU) or a transform unit (TU).
  • the prediction unit and the transform unit may each be split or partitioned from the final coding unit described above.
  • the prediction unit may be a unit of sample prediction
  • the transform unit may be a unit for deriving a transform coefficient and/or a unit for deriving a residual signal from a transform coefficient.
  • an MxN block can represent a set of samples or transform coefficients consisting of M columns and N rows.
  • a sample can generally represent a pixel or a pixel value, and can represent only the pixel/pixel value of the luma component, or only the pixel/pixel value of the chroma component.
  • a sample can be used as a term corresponding to a pixel or pel in a picture (or image).
  • the prediction unit (220) can perform a 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) can determine whether intra prediction or inter prediction is applied on a current block or CU basis.
  • the prediction unit (220) can generate various information related to prediction, such as prediction mode information, as described later in the description of each prediction mode, and transmit the information to the entropy encoding unit (240).
  • the information related to prediction can be encoded by the entropy encoding unit (240) and output in the form of a bitstream.
  • the intra prediction unit (222) can predict the current block by referring to samples in the current picture.
  • the referenced samples may be located in the neighborhood of the current block, or may be located a certain distance away from the current block, depending on the prediction mode.
  • the prediction modes may include one or more non-directional modes and multiple directional modes.
  • the non-directional mode may include at least one of a DC mode or a planar mode.
  • the directional mode may include 33 directional modes or 65 directional modes depending on the degree of detail in the prediction direction. However, this is only an example, and a greater or lesser number of directional modes may be used depending on the settings.
  • the intra prediction unit (222) may also determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.
  • the inter prediction unit (221) can derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture.
  • the motion information can be predicted in units of blocks, subblocks, or samples based on the correlation of motion information between neighboring blocks and the current block.
  • the motion information can include a motion vector and a reference picture index.
  • the motion information can further include inter prediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.).
  • the neighboring block can include a spatial neighboring block existing in the current picture and a temporal neighboring block existing in the reference picture.
  • the reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different.
  • the above temporal neighboring blocks may be called collocated reference blocks, collocated CUs (colCUs), etc., and the reference pictures including the temporal neighboring blocks may be called collocated pictures (colPic).
  • the inter prediction unit (221) may construct a motion information candidate list based on the neighboring blocks, and generate information indicating which candidate is used to derive the motion vector and/or reference picture index of the current block. Inter prediction may be performed based on various prediction modes, and for example, in the case of skip mode and merge mode, the inter prediction unit (221) may use the motion information of the neighboring blocks as the motion information of the current block.
  • a residual signal may not be transmitted.
  • MVP motion vector prediction
  • Palette mode can be viewed as an example of intra coding or intra prediction.
  • sample values within a picture can be signaled based on information about the palette table and palette index.
  • the prediction signal generated through the prediction unit (220) can be used to generate a restoration signal or a residual signal.
  • the transform unit (232) can apply a transform technique to the residual signal to generate transform coefficients.
  • the transform technique can include at least one of a Discrete Cosine Transform (DCT), a Discrete Sine Transform (DST), a Karhunen-Loeve Transform (KLT), a Graph-Based Transform (GBT), or a Conditionally Non-linear Transform (CNT).
  • DCT Discrete Cosine Transform
  • DST Discrete Sine Transform
  • KLT Karhunen-Loeve Transform
  • GBT Graph-Based Transform
  • CNT Conditionally Non-linear Transform
  • GBT refers to a transform obtained from a graph when the relationship information between pixels is expressed as a graph.
  • CNT refers to a transform obtained based on generating a prediction signal using all previously restored pixels.
  • the transform process can be applied to a pixel block having a square size and the same size, or can be applied to a block of a non
  • FIG. 3 is a schematic block diagram of a decoding device to which an embodiment of the present disclosure can be applied and in which decoding of a video/image signal is performed.
  • the decoding device (300) can restore the image corresponding to the process in which the video/image information is processed in the encoding device of FIG. 2.
  • the decoding device (300) can derive units/blocks based on block division-related information obtained from the bitstream.
  • the decoding device (300) can perform decoding using a processing unit applied in the encoding device.
  • the processing unit of decoding may be a coding unit, and the coding unit may be divided from a coding tree unit or a maximum coding unit according to a quad tree structure, a binary tree structure, and/or a ternary tree structure.
  • One or more transform units may be derived from the coding unit. Then, the restored image signal decoded and output through the decoding device (300) can be reproduced through a reproduction device.
  • the decoding device (300) can receive a signal output from the encoding device of FIG. 2 in the form of a bitstream, and the received signal can be decoded through the entropy decoding unit (310).
  • the entropy decoding unit (310) can parse the bitstream to derive information (e.g., video/image information) necessary for image restoration (or picture restoration).
  • the video/image 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/image information may further include general constraint information.
  • the decoding device can decode the picture further based on the information on the parameter set and/or the general constraint information.
  • the signaling/received information and/or syntax elements described later in this specification can be decoded through the decoding procedure and obtained from the bitstream.
  • the entropy decoding unit (310) can decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the values of syntax elements required for image restoration and the quantized values of transform coefficients for residuals.
  • the CABAC entropy decoding method receives a bin corresponding to each syntax element in the bitstream, determines a context model using information of the syntax element to be decoded and decoding information of surrounding and decoding target blocks or information of symbols/bins decoded in the previous step, and predicts the occurrence probability of the bin according to the determined context model to perform arithmetic decoding of the bin to generate a symbol corresponding to the value of each syntax element.
  • the CABAC entropy decoding method can update the context model using information of the decoded symbol/bin for the context model of the next symbol/bin after determining the context model.
  • the entropy decoding unit (310) Among the information decoded by the entropy decoding unit (310), information regarding prediction is provided to the prediction unit (inter-prediction unit (332) and intra-prediction unit (331)), and residual values 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 residual processing unit (320).
  • the residual processing unit (320) can derive a residual signal (residual block, residual samples, residual sample array).
  • information regarding filtering can be provided to the filtering unit (350).
  • a receiving unit that receives a signal output from an encoding device may be further configured as an internal/external element of a decoding device (300), or the receiving unit may be a component of an entropy decoding unit (310).
  • a decoding device may be called a video/video/picture decoding device, and the decoding device may be divided into an information decoding device (video/video/picture information decoding device) and a sample decoding device (video/video/picture sample decoding device).
  • the information decoding device may include the entropy decoding unit (310), and the sample decoding device may include at least one of the inverse quantization unit (321), the inverse transformation unit (322), the addition unit (340), the filtering unit (350), the memory (360), the inter prediction unit (332), and the intra prediction unit (331).
  • the inverse quantization unit (321) can inverse quantize the quantized transform coefficients and output the transform coefficients.
  • the inverse quantization unit (321) can rearrange the quantized transform coefficients into a two-dimensional block form. In this case, the rearrangement can be performed based on the coefficient scanning order performed in the encoding device.
  • the inverse quantization unit (321) can perform inverse quantization on the quantized transform coefficients using quantization parameters (e.g., quantization step size information) and obtain transform coefficients.
  • the transform coefficients are inversely transformed to obtain a residual signal (residual block, residual sample array).
  • the prediction unit (320) can perform a prediction on the current block and generate a predicted block including prediction samples for the current block.
  • the prediction unit (320) can determine whether intra-prediction or inter-prediction is applied to the current block based on the information regarding the prediction output from the entropy decoding unit (310), and can determine a specific intra/inter-prediction mode.
  • the prediction unit (320) can generate a prediction signal based on various prediction methods described below.
  • the prediction unit (320) can apply intra prediction or inter prediction for prediction of a single block, and can also apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP) mode.
  • the prediction unit can be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block.
  • the IBC prediction mode or palette mode can be used for content image/video coding such as games, such as screen content coding (SCC).
  • SCC screen content coding
  • IBC basically performs prediction within the current picture, but can be performed similarly to inter prediction in that it derives a reference block within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described herein.
  • Palette mode can be viewed as an example of intra coding or intra prediction. When palette mode is applied, information about the palette table and palette index may be included and signaled in the video/image information.
  • the intra prediction unit (331) can predict the current block by referring to samples within the current picture.
  • the referenced samples may be located in the neighborhood of the current block, or may be located a certain distance away from the current block, depending on the prediction mode.
  • the prediction modes may include one or more non-directional modes and multiple directional modes.
  • the intra prediction unit (331) may also determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.
  • the inter prediction unit (332) can derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture.
  • the motion information can be predicted in units of blocks, subblocks, or samples based on the correlation of the motion information between the neighboring blocks and the current block.
  • the motion information can include a motion vector and a reference picture index.
  • the motion information can further include inter prediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.).
  • the neighboring blocks can include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture.
  • the inter prediction unit (332) can construct a motion information candidate list based on the neighboring blocks, and derive the motion vector and/or reference picture index of the current block based on the received candidate selection information.
  • Inter prediction can be performed based on various prediction modes, and information about the prediction can include information indicating an inter prediction mode for the current block.
  • the addition unit (340) can generate a restoration signal (restored picture, restoration block, restoration sample array) by adding the acquired residual signal to the prediction signal (prediction block, prediction sample array) output from the prediction unit (including the inter-prediction unit (332) and/or intra-prediction unit (331)).
  • the prediction block can be used as the restoration block.
  • the addition unit (340) may be referred to as a restoration unit or restoration block generation unit.
  • the generated restoration signal may be used for intra prediction of the next processing target block within the current picture, may be output after filtering as described below, or may be used for inter prediction of the next picture.
  • LMCS luma mapping with chroma scaling
  • the filtering unit (350) can improve subjective/objective image quality by applying filtering to the restored signal.
  • the filtering unit (350) can apply various filtering methods to the restored picture to generate a modified restored picture, and transmit the modified restored picture to the memory (360), specifically, to the DPB of the memory (360).
  • the various filtering methods can include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.
  • the (modified) reconstructed picture stored in the DPB of the memory (360) can be used as a reference picture in the inter prediction unit (332).
  • the memory (360) can store motion information of a block from which motion information is derived (or decoded) in the current picture and/or motion information of blocks in a picture that has already been reconstructed.
  • the stored motion information can be transferred to the inter prediction unit (260) to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block.
  • the memory (360) can store reconstructed samples of reconstructed blocks in the current picture and transfer them to the intra prediction unit (331).
  • the embodiments described in the filtering unit (260), the inter prediction unit (221), and the intra prediction unit (222) of the encoding device (200) can be applied to the filtering unit (350), the inter prediction unit (332), and the intra prediction unit (331) of the decoding device (300) in the same or corresponding manner, respectively.
  • FIG. 4 illustrates an image decoding method performed by a decoding device as an embodiment according to the present disclosure.
  • the transform coefficients of the current block can be derived from the bitstream (S400). That is, the bitstream can include residual information of the current block, and the transform coefficients of the current block can be derived by decoding the residual information.
  • residual samples of the current block can be derived by performing at least one of dequantization or inverse-transform on the transform coefficients of the current block (S410).
  • the inverse transform may be performed based on at least one of DCT-2, DST-7, or DCT-8.
  • DCT-2, DST-7, DCT-8, etc. may be referred to as a transform type, a transform kernel, or a transform core.
  • the inverse transform may mean a separable transform.
  • the present disclosure is not limited thereto, and the inverse transform may also mean a non-separable transform, or may be a concept that includes both a separable transform and a non-separable transform.
  • the inverse transform in the present disclosure means a primary transform, but is not limited thereto, and may be transformed into an identical/similar form and applied to a secondary transform.
  • DCT-2 and a non-separable transform may be used, or a non-separable transform may be used in addition to at least one of DCT-2, DST-7, or DCT-8, or a non-separable transform may replace the transform kernel of one or more of DCT-2, DST-7, or DCT-8.
  • a non-separable transform can replace or be added to one or more of the five transform kernel candidates.
  • the notation (transform1, transform2) indicates that transform1 is applied in the horizontal direction and transform2 is applied in the vertical direction. If a non-separable transform replaces some of the transform kernel candidates, the remaining transform kernel candidates except (DCT-2, DCT-2) and (DST-7, DST-7) can be replaced with the non-separable transform.
  • the above transform kernel candidates are only examples, and other types of DCT and/or DST may be included, and a transform skip may be included as a transform kernel candidate.
  • a non-separable transformation can refer to a transformation or inverse transformation based on a non-separable transformation matrix. That is, unlike a separable transformation that performs vertical and horizontal transformations independently by separating the vertical and horizontal transformations, a non-separable transformation can perform horizontal and vertical transformations simultaneously.
  • the input data X to the non-separable transformation is as follows:
  • vector X' can be expressed as follows.
  • non-separable transformation can be performed as in the following mathematical expression 3.
  • F represents a transformation coefficient vector
  • T represents a 16x16 non-separable transformation matrix
  • represents the multiplication of a matrix and a vector.
  • a 16x1 transform coefficient vector F can be derived through the above mathematical expression 3, and the F can be reconstructed into 4x4 blocks according to a predetermined scan order.
  • the scan order can be a horizontal scan, a vertical scan, a diagonal scan, a z-scan, a raster scan, or a predefined scan.
  • the non-separable transform set and/or transform kernel for the above non-separable transform can be variously configured based on at least one of a prediction mode (e.g., intra mode, inter mode, etc.), the width, height, or number of pixels of the current block, the position of a sub-block within the current block, explicitly signaled syntax elements, statistical characteristics of surrounding samples, whether a secondary transform is used, or a quantization parameter (QP).
  • a prediction mode e.g., intra mode, inter mode, etc.
  • QP quantization parameter
  • pre-defined intra prediction modes are grouped to correspond to n sets of non-separable transformations, and each set of non-separable transformations may include k transform kernel candidates.
  • n and k may be arbitrary constants according to rules (conditions) defined identically for the encoding device and the decoding device.
  • the number of non-separable transformation sets and/or the number of transformation kernel candidates included in the non-separable transformation sets may be configured differently depending on the width and/or height of the current block.
  • n 1 non-separable transformation sets and k 1 transformation kernel candidates may be configured.
  • n 2 non-separable transformation sets and k 2 transformation kernel candidates may be configured differently depending on the product of the width and the height of the current block.
  • n 3 non-separable transformation sets and k 3 transformation kernel candidates may be configured, otherwise, n 4 non-separable transformation sets and k 4 transformation kernel candidates may be configured. That is, since the degree of change in the statistical characteristics of the residual signal varies depending on the block size, the number of non-separable transformation sets and transformation kernel candidates can be configured differently to reflect this.
  • the statistical characteristics of the residual signal may be different for each sub-block, and therefore the number of non-separable transform sets and transform kernel candidates may be configured differently.
  • n 5 non-separable transform sets and k 5 transform kernel candidates may be configured for the upper left 4x4 sub-block
  • n 6 non-separable transform sets and k 6 transform kernel candidates may be configured for the other 4x4 sub-blocks.
  • the number of non-separable transformation sets and transformation kernel candidates can be configured differently.
  • the syntax element information indicating any one of a plurality of non-separable transformation configurations can be used. For example, if three kinds of non-separable transformation configurations are supported (i.e., n 7 non-separable transformation sets and k 7 transformation kernel candidates, n 8 non-separable transformation sets and k 8 transformation kernel candidates, n 9 non-separable transformation sets and k 9 transformation kernel candidates), the corresponding syntax element can have values of 0, 1, and 2, and the non-separable transformation configuration applied to the current block can be determined according to the value of the signaled syntax element.
  • the number of non-separable transformation sets and transformation kernel candidates can be configured differently. For example, if the secondary transformation is not applied, a non-separable transformation configuration including a set of n 10 non-separable transformations and k 10 transformation kernel candidates can be applied. If the secondary transformation is applied, a non-separable transformation configuration including a set of n 11 non-separable transformations and k 11 transformation kernel candidates can be applied.
  • non-separable transform configurations can be applied. For example, when the QP value has a small value, a non-separable transform configuration including n 12 non-separable transform sets and k 12 transform kernel candidates can be applied. On the other hand, when the QP value has a large value, a non-separable transform configuration including n 13 non-separable transform sets and k 13 transform kernel candidates can be applied. If the QP value is less than or equal to a threshold (e.g., 32), the case is classified as having a small QP value, and otherwise, the case is classified as having a large QP value. Alternatively, the range of QP values can be divided into three or more ranges, and a different non-separable transform configuration can be applied to each range.
  • a threshold e.g. 32
  • the block can be divided into multiple sub-blocks and a non-separable transform corresponding to the width and height of the sub-blocks can be used.
  • a non-separable transform corresponding to the width and height of the sub-blocks can be used.
  • the 4x8 block can be divided into two 4x4 sub-blocks and a 4x4 block-based non-separable transform can be used for each 4x4 sub-block.
  • the block can be divided into two 8x8 sub-blocks and an 8x8 block-based non-separable transform can be used.
  • the above non-separable transform set can be determined based on the intra prediction mode of the current block and a mapping table.
  • the mapping table can define a mapping relationship between pre-defined intra prediction modes and non-separable transform sets.
  • the pre-defined intra prediction modes can include two non-directional modes and 65 directional modes.
  • the size of the transform kernel of a non-separable transform is larger than that of a separable transform. This means that the computational complexity required for the transform process is high and the memory required for storing the transform kernel is large. Meanwhile, a separable transform can only consider statistical characteristics existing in the horizontal and/or vertical directions, but a non-separable transform can simultaneously consider statistical characteristics in a two-dimensional space including the horizontal and vertical directions, thereby providing better compression efficiency.
  • the non-directional mode may include the planar mode (number 0) and the DC mode (number 1), and the directional mode may include the intra prediction modes (numbers 2 to 66).
  • the present disclosure may also be applied to cases where the number of pre-defined intra prediction modes is different.
  • the pre-defined intra prediction modes may further include intra prediction modes from -14 to -1 and intra prediction modes from 67 to 80.
  • FIG. 5 exemplarily illustrates intra prediction modes and their prediction directions according to the present disclosure.
  • modes -14 to -1 and 2 to 33, and modes 35 to 80 are symmetrical with respect to the prediction direction with respect to mode 34.
  • modes 10 and 58 are symmetrical with respect to the direction corresponding to mode 34
  • mode -1 is symmetrical with mode 67. Therefore, for vertical modes that are symmetrical with respect to horizontal modes with respect to mode 34, input data can be transposed and used. Transposing input data means that rows in the input data MxN of a 2D block become columns and columns become rows to form NxM data.
  • the 16 data that make up the 4x4 block can be appropriately arranged to form a 16x1 one-dimensional vector for non-separable transformation.
  • the one-dimensional vector can be formed in row-major order or column-major order.
  • the residual samples resulting from the non-separable transformation can be arranged in the above order to form a two-dimensional block.
  • the input vector can be constructed according to column-major order.
  • mode 34 can be considered neither a horizontal mode nor a vertical mode, it is classified as belonging to the horizontal mode in the present disclosure. That is, for modes -14 to -1 and 2 to 33, the input data alignment method for the horizontal mode, i.e., row-major order, can be used, and the input data can be transposed and used for the vertical mode that is symmetrical around mode 34.
  • the symmetry between block shapes that are in a transpose relationship with each other i.e., the symmetry between the KxL block and the LxK block
  • a symmetry relationship exists between a KxL block predicted by the P mode and an LxK block predicted by the (68-P) mode.
  • a symmetry relationship exists between a KxL block predicted by the Q mode and an LxK block predicted by the (66-Q) mode.
  • the same transform kernel can be applied to the KxL block and the LxK block.
  • the non-separable transform set can be derived through a mapping table corresponding to the KxL block based on the (68-P) mode instead of the P mode applied to the LxK block.
  • the non-separable transform set can be derived through a mapping table corresponding to the KxL block based on the (66-Q) mode instead of the Q mode applied to the LxK block.
  • the non-separable transformation set can be selected based on mode 2 instead of mode 66.
  • the input data can be read in a pre-determined order (e.g., row-major order or column-major order) to form a one-dimensional vector and then the corresponding non-separable transformation can be applied.
  • the input data can be read in the transposed order to form a one-dimensional vector and then the corresponding non-separable transformation can be applied. That is, if the KxL block is read in row-major order, the LxK block can be read in column-major order. Conversely, if the KxL block is read in column-major order, the LxK block can be read in row-major order.
  • a non-separable transformation set can be determined based on mode 34, and the input data can be read in a predetermined order to form a one-dimensional vector to perform the corresponding non-separable transformation.
  • mode 34 is applied to an LxK block, a non-separable transformation set can be determined based on mode 34 as well, but the input data can be read in a transposed order to form a one-dimensional vector to perform the corresponding non-separable transformation.
  • the non-separable transformation can be performed based on an LxK block by utilizing the symmetry described above for a KxL block in the same manner.
  • a block whose width is greater than its height can be restricted to be used as a reference block.
  • symmetry can be restricted not to be utilized for non-square blocks.
  • non-square blocks can use a different number of non-separable transformation sets and/or transformation kernel candidates than square blocks, and can select a non-separable transformation set using a different mapping table than square blocks.
  • mapping table for selecting a non-separable transformation set is as follows.
  • Table 1 shows an example of assigning non-separable transform sets according to intra prediction modes when there are five non-separable transform sets.
  • the value of predModeIntra indicates the value of the intra prediction mode considering WAIP
  • TrSetIdx is an index indicating a specific non-separable transform set.
  • Table 1 it can be confirmed that the same non-separable transform set is applied to modes located in symmetrical directions according to the intra prediction mode.
  • Table 1 is only an example using five non-separable transform sets and does not limit the total number of non-separable transform sets for non-separable transforms.
  • non-separable transform may not be applied to WAIP for compression performance.
  • a non-separable transform set corresponding to an adjacent intra prediction mode may be shared.
  • inverse transformation can be divided into separable transformation and non-separable transformation.
  • Separable transformation means performing transformations in the horizontal and vertical directions respectively for a two-dimensional block
  • non-separable transformation can mean performing a single transformation on samples constituting the entire or a portion of a two-dimensional block.
  • Each transformation set can contain one or more transformation kernel candidates.
  • any one of (DST-7, DST-7), (DCT-8, DST-7), (DST-7, DCT-8), or (DCT-8, DCT-8) can be applied as a separate transform, and the four transform kernel candidates can be regarded as one transform set.
  • (DCT-2, DCT-2) can be regarded as one transform set.
  • a transform skip that does not apply a transform can also be regarded as one transform set, and (DCT-2, DCT-2) and the transform skip can be regarded as one transform set.
  • a transform kernel may refer to one transform (e.g., DCT-2, DST-7) or a pair of two transforms (e.g., (DCT-2, DCT-2)).
  • a transform set there may be the aforementioned non-separable transform set.
  • the non-separable transform applied as the primary transform may be denoted as a Non-Separable Primary Transform (NSPT).
  • NSPT Non-Separable Primary Transform
  • multiple non-separable transform sets may be configured, and each non-separable transform set may include one or more transform kernels as transform kernel candidates.
  • one of the multiple non-separable transform sets is selected according to the intra prediction mode, and the multiple non-separable transform sets for NSPT may be denoted as an NSPT set list. This is as discussed above, and a detailed description thereof will be omitted here.
  • a group of one or more transformation sets available to the current block can be formed from a plurality of pre-defined transformation sets.
  • the group of one or more transformation sets can be formed by a predetermined area unit to which the current block belongs, and is hereinafter referred to as a collection.
  • the predetermined area unit can be at least one of a picture, a slice, a coding tree unit row (CTU row), or a coding tree unit (CTU).
  • the transform set consisting of (DCT-2, DCT-2) S 1 the transform set consisting of (DST-7, DST-7), (DCT-8, DST-7), (DST-7, DCT-8) and (DCT-8, DCT-8) S 2 , respectively.
  • the above-mentioned NSPT set list can include N non-separable transform sets, and let's call the N non-separable transform sets S 3,1 , S 3,2 , ..., S 3,N , respectively.
  • N can be 35, but is not limited thereto.
  • the transformation kernel applicable to the current block may belong to any one of S 1 , S 2 , or S 3,13 .
  • the collection available to the current block can be denoted as ⁇ S 1 , S 2 , S 3,13 ⁇ .
  • a collection according to the present disclosure is a group of one or more transform sets available to the current block, the collection may be configured differently depending on the context of the current block.
  • a collection may be constructed based on the context of the current block, and at this time, a process of selecting one of a plurality of transformation sets belonging to the collection and selecting one of a plurality of transformation kernel candidates belonging to the selected transformation set may be performed.
  • the selection of the transformation set and the transformation kernel candidate may be performed implicitly based on the context of the current block, or may be performed based on an explicitly signaled index.
  • the process of selecting one of a plurality of transformation sets belonging to the collection and the process of selecting one of a plurality of transformation kernel candidates belonging to the selected transformation set may be performed separately. For example, an index for selecting a transformation set may be first signaled, and based on this, one of the plurality of transformation sets belonging to the collection may be selected.
  • an index indicating one of a plurality of transformation kernel candidates belonging to the transformation set may be signaled, and based on the signaled index, one of the transformation kernel candidates may be selected from the transformation set.
  • the transformation kernel of the current block may be determined based on the selected transformation kernel candidate.
  • the selection of any one transformation set from the collection may be implicitly performed based on the context of the current block, and the selection of any one transformation kernel candidate from the selected transformation set may be performed based on a signaled index.
  • the selection of any one transformation set from the collection may be implicitly performed based on a signaled index, and the selection of any one transformation kernel candidate from the selected transformation set may be implicitly performed based on the context of the current block.
  • multiple MTS sets for MTS can be defined. Based on the size of the current block and/or the intra prediction mode, any one of the multiple MTS sets can be determined. For example, in determining any one MTS set, 16 transform block sizes can be considered, and for directional modes, the shape of the transform block and the symmetry between the intra prediction modes can be considered.
  • the MTS set corresponding to mode 2 can be applied to modes -1 to -14 (or -15), and the MTS set corresponding to mode 66 can be applied to modes 67 to 80 (or 81).
  • a separate MTS set can be allocated for the MIP (Matrix-based Intra Prediction) mode.
  • the MTS set assigned to the MIP mode may be selected based on the size of the current block, without considering the symmetry of the block shape.
  • the MTS set assigned to the MIP mode may be selected based on the symmetrical block size, considering the symmetry of the block shape.
  • a transformation kernel candidate selected by a transformation kernel candidate index may be set as the transformation kernel of the current block.
  • at least one of the horizontal transformation or the vertical transformation of the selected transformation kernel candidate may be changed to another transformation kernel. For example, if the transformation kernel candidate index is 3 and the width and height of the current block are both 16 or less, at least one of the horizontal transformation or the vertical transformation of the transformation kernel candidate corresponding to the transformation kernel candidate index of 3 may be changed to another transformation kernel. At this time, the horizontal transformation and the vertical transformation may be changed independently of each other.
  • Table 7 defines thresholds according to the size of a transform block for changing the horizontal transformation and/or vertical transformation of a transform kernel candidate selected by a transform kernel candidate index to another transform kernel.
  • the six transform kernel candidates constituting one MTS set can be distinguished by transform kernel candidate indices from 0 to 5 as defined in Table 5.
  • the transform kernel candidate indices can be signaled through the bitstream.
  • a flag indicating whether the MTS set is available/applied (MTS enabled flag or MTS flag) can be signaled, and the transform kernel candidate index can be signaled when the flag indicates the availability/applicability of the MTS set.
  • the MTS flag can be composed of one bin, and one or more contexts for CABAC-based entropy coding (hereinafter referred to as CABAC context) can be allocated to the bin. For example, different CABAC contexts can be allocated for non-MIP mode and MIP mode, respectively.
  • the number of transform kernel candidates available to the current block may be set differently.
  • the sum of the absolute values of all or part of the transform coefficients in the current block may be considered.
  • the sum of the absolute values of the transform coefficients is referred to as AbsSum. If AbsSum is less than or equal to T1, only one transform kernel candidate corresponding to a transform kernel candidate index of 0 may be available. If AbsSum is greater than T1 and less than or equal to T2, four transform kernel candidates corresponding to transform kernel candidate indices of 0 to 3 may be available. If AbsSum is greater than T2, six transform kernel candidates corresponding to transform kernel candidate indices of 0 to 5 may be available.
  • T1 may be 6 and T2 may be 32, but this is only an example.
  • the transformation kernel candidate corresponding to the transformation kernel candidate index of 0 can be set as the transformation kernel of the current block without signaling the transformation kernel candidate index.
  • AbsSum is greater than T1 and less than or equal to T2
  • any one of the four transformation kernel candidates can be selected based on the transformation kernel candidate index with two bins. That is, the transformation kernel candidate indices of 0 to 3 can be signaled as 00, 01, 10, and 11, respectively.
  • MSB Most Significant Bit
  • LSB Least Significant Bit
  • the transformation kernel of the current block can be determined based on a transformation set including one or more transformation kernel candidates.
  • the transformation kernel of the current block can be derived from any one or more transformation kernel candidates belonging to the transformation set.
  • the process of determining a transformation kernel of the current block may include at least one of 1) determining a transformation set of the current block or 2) selecting one transformation kernel candidate from the transformation set of the current block.
  • the process of determining the transformation set may be a process of selecting one of a plurality of transformation sets that are identically predefined for the encoding device and the decoding device.
  • the process of determining the transformation set may be a process of configuring one or more transformation sets available to the current block from among a plurality of transformation sets that are identically predefined for the encoding device and the decoding device, and selecting one of the configured transformation sets.
  • the process of determining the transformation set may be a process of configuring one transformation set based on a transformation kernel candidate available to the current block from among a plurality of transformation kernel candidates that are identically predefined for the encoding device and the decoding device.
  • the transformation set of the current block includes multiple transformation kernel candidates, a process of selecting one of the multiple transformation kernel candidates for the current block may be performed. However, if the transformation set of the current block includes only one transformation kernel candidate (i.e., the current block has only one transformation kernel candidate available), the transformation kernel of the current block may be set to that transformation kernel candidate.
  • the transformation set according to the present disclosure may mean the (non-separable) transformation set in the aforementioned embodiment 1, or may mean the MTS set in the embodiment 2.
  • the transformation set may be defined separately from the (non-separable) transformation set in the embodiment 1 or the MTS set in the embodiment 2.
  • the transformation set may include one or more specific transformation kernels as transformation kernel candidates.
  • One specific transformation kernel may be defined as a pair of a transformation kernel for horizontal transformation and a transformation kernel for vertical transformation, or may be defined as one transformation kernel that is equally applied to horizontal and vertical transformations.
  • NSPT which is a non-separable transform applied as a primary transform
  • NSPT can be applied to all or part of a transform block.
  • residual samples existing in the region where NSPT is applied can be input as a one-dimensional vector of NSPT. That is, residual samples existing in all or part of a transform block (referred to as Region Of Interest, ROI, in the present disclosure) can be collected into a one-dimensional vector and configured as an input.
  • the primary transform coefficients can be obtained.
  • the backward NSPT to the primary transform coefficients
  • the one-dimensional vector output can be obtained.
  • the dimension of the matrix of the non-separable transform kernel for NSPT may be determined according to the size of the ROI.
  • the transform kernel may be referred to as a transform type and a transform matrix
  • the non-separable transform kernel for NSPT may be referred to as an NSPT kernel.
  • the dimension of the corresponding transform matrix may be MN x MN.
  • the dimension of the NSPT kernel may be 64 x 64.
  • the NSPT kernel when applying NSPT to a residual generated by intra prediction, can be adaptively determined depending on the intra prediction mode. Since the statistical characteristics of the residual block may vary depending on the intra prediction mode, compression efficiency can be improved by adaptively determining the NSPT kernel depending on the intra prediction mode.
  • the non-separable transform set can be determined based on the intra prediction mode of the current block and a mapping table.
  • the mapping table can define a mapping relationship between pre-defined intra prediction modes and non-separable transform sets.
  • the pre-defined intra prediction modes can include two non-directional modes and 65 directional modes.
  • intra prediction modes can be grouped into intra prediction mode groups.
  • One NSPT kernel or multiple NSPT kernels can be assigned to an intra prediction mode group.
  • a non-separable transform set (NSPT set) including one or more NSPT kernels can be assigned to an intra prediction mode group.
  • the non-separable transform set is mapped to an intra prediction mode, and one of the N NSPT kernels included in the non-separable transform set can be selected.
  • an intra prediction group may include adjacent prediction modes (e.g., modes 17, 18, and 19).
  • the intra prediction group may include modes that have symmetry.
  • directional modes may be symmetrical around the diagonal mode of FIG. 5 described above (i.e., intra prediction mode 34).
  • two modes that have symmetry may form a group (or pair).
  • modes 18 and 50 may be included in the same group because they are symmetrical around mode 34.
  • a process of transposing the 2D input block and then constructing a one-dimensional input vector may be added before applying the forward NSPT kernel.
  • the one-dimensional input vector may be derived from the corresponding input block in the row-first order without transposing the 2D input block. If the intra prediction mode is greater than 34, the one-dimensional input vector can be constructed by first transposing the 2D input block and then reading the input block in the row-first order, or by leaving the 2D input block as is and reading the input block in the column-first order.
  • Table 8 below illustrates an example of a mapping table for assigning NSPT sets according to intra prediction modes.
  • a total of 35 NSPT sets, from 0 to 34, can be defined.
  • the extended WAIP mode i.e., modes -14 to -1 and modes 67 to 80 in FIG. 5
  • the extended WAIP mode can be assigned the NSPT set assigned to the nearest normal directional mode.
  • the extended WAIP mode can be assigned NSPT set number 2.
  • An NSPT set may include one or more NSPT kernels (or kernel candidates). That is, an NSPT set may include N NSPT kernel candidates. For example, N may be set to a value greater than or equal to 1, such as 1, 2, 3, or 4. Among one or more NSPT kernels included in the NSPT set, a kernel applied to a current block may be signaled using an index. In the present disclosure, the index may be referred to as an NSPT index. For example, the NSPT index may have values of 0, 1, 2, ..., N - 1.
  • the NSPT index value may be fixed to 0. In this case, the NSPT index may be inferred without being separately signaled.
  • a flag indicating whether NSPT is applied may be signaled separately from the NSPT index. In the present disclosure, the flag may be referred to as an NSPT flag.
  • NSPT flag value is 1, NSPT may be applied. If the NSPT flag value is 0, NSPT may not be applied. If the NSPT flag is not signaled, the NSPT flag value may be inferred to be 0. For example, if the NSPT flag value is 1, the NSPT index may be signaled. Based on the signaled NSPT index, one of the N kernel candidates included in the NSPT set selected by the intra prediction mode may be specified.
  • the entropy coding method of the NSPT index can be defined in various ways considering the number (N) of NSPT kernels included in the NSPT set. For example, as a method of mapping values from 0 to N-1 to empty strings (i.e., a binarization method), truncated unary binarization, truncated binarization, and fixed-length binarization methods can be used.
  • the candidates can be specified by two bins.
  • the first, second, and third candidates can be binarized and signaled as 0, 10, and 11, respectively.
  • the binarized bins can be coded using context coding or bypass coding.
  • a reduced primary transform (RPT) method using a transform kernel of a reduced dimension by a primary transform is described.
  • RPT reduced primary transform
  • samples belonging to a 2D residual block can be arranged (or rearranged) into a 1D vector according to row-majority (or column-majority).
  • a transformation matrix for NSPT can be multiplied by the arranged vector.
  • the corresponding 2D residual block is an M x N block (M is the width, N is the height)
  • the length of the rearranged 1D vector can be M*N. That is, the corresponding 2D residual block can also be represented as a column vector having dimensions M*N x 1.
  • M*N can be conveniently denoted as MN.
  • the dimension of the corresponding transformation matrix can be MN x MN.
  • forward NSPT can operate by multiplying the left side of an MN x 1 vector by the corresponding MN x MN transformation matrix to obtain an MN x 1 transformation coefficient vector.
  • r transform coefficients can be obtained by multiplying an r x MN matrix.
  • r represents the number of rows of the transformation matrix
  • MN represents the number of columns of the transformation matrix.
  • the value of r can be set to be less than or equal to MN. That is, the existing forward NSPT transformation matrix includes MN rows, each row being a 1 x MN row vector, which is a transform basis vector of the corresponding NSPT transformation matrix.
  • the corresponding transform coefficients can be obtained by multiplying each transform basis vector by an MN x 1 sample column vector.
  • the conventional forward NSPT transformation matrix is composed of MN row vectors
  • MN transformation coefficients i.e., MN x 1 transformation coefficient column vectors
  • the transformation matrix can be composed of r transformation basis vectors instead of MN transformation basis vectors. Accordingly, when the forward RPT is applied, r transformation coefficients (i.e., r x 1 transformation coefficient column vectors) can be obtained instead of MN.
  • the RPT kernel can be constructed by selecting r transform basis vectors, which are part of the transform basis vectors constituting the MN x MN forward NSPT kernel.
  • the transform kernel can be referred to as a transform type and a transform matrix
  • the non-separable transform kernel for NSPT can be referred to as an RPT kernel. That is, when selecting r 1 x MN row vectors from the MN x MN forward NSPT kernel, it can be advantageous to select the most important transform basis vectors from the perspective of coding performance. Specifically, in terms of energy compaction through transform, more energy can be concentrated in the transform coefficients that appear first by multiplying the forward NSPT transform matrix.
  • the transform basis vectors located on the upper side of the forward NSPT transform matrix can generate transform coefficients having larger energy.
  • the r x MN forward RPT kernel can be constructed (or derived) by taking r from the upper side of the forward NSPT kernel.
  • the RPT according to the present disclosure takes only a portion (i.e., r) of the transform coefficients obtained by applying the existing NSPT, which may result in a loss of some of the energy contained in the original signal. In other words, distortion may occur between the original signal and the original signal through this process. Nevertheless, by applying the RPT, only r transform coefficients are generated instead of MN, so the number of bits required to code the transform coefficients can be reduced. Therefore, in the case of a signal in which a large amount of energy is concentrated in a small number of transform coefficients (e.g., an image residual signal), the gain obtained by reducing the signaling bits can be significantly large, thereby improving the coding performance.
  • r a portion of the transform coefficients obtained by applying the existing NSPT
  • the backward NSPT may be the transpose matrix of the forward NSPT kernel described above as a transformation matrix.
  • the input data may be a transformation coefficient signal instead of a sample signal such as a residual signal.
  • the forward NSPT transformation matrix is G and the sample signal rearranged into a 1D vector is x
  • the transformation coefficient vector obtained by multiplying the transformation matrix on the left side can be expressed as in the following mathematical equation 4.
  • x and y can be MN x 1 column vectors.
  • G can have the form of an MN x MN matrix.
  • the reverse NSPT process can be expressed as Equation 5 below using the same variables.
  • G T denotes the transpose matrix of G.
  • the forward RPT operation and the backward RPT operation according to the present disclosure can also be expressed by the two mathematical expressions above.
  • y is an r x 1 column vector instead of an MN x 1 column vector
  • G is an r x MN matrix instead of an MM x MN matrix. That is, even if RPT is applied instead of NSPT, the dimension of the sample signal (e.g., image residual signal) does not change, which may mean that the original number of sample signals (i.e., MN sample signals) can be restored with only r transform coefficients through the backward RPT. In other words, the original MN sample signals can be restored by coding only r transform coefficients that are less than MN, which may lead to an improvement in coding performance.
  • an RPT structure that defines an r value by considering the statistical characteristics of a residual block, and derives a residual block of the size of an existing transform block from a residual block of a reduced size determined by the defined r value. If an additional transformation (i.e., a secondary transform) is applied to predict the statistical distribution of primary transform coefficients, quantized non-zero coefficients may be concentrated in a relatively low frequency region because a quantization process is applied to the primary transform coefficients. Accordingly, a reduced secondary transform for the statistical distribution of primary transform coefficients can define the statistical characteristics of the primary transform coefficients relatively simply by setting an r value for a given low frequency region.
  • a secondary transform for the statistical distribution of primary transform coefficients can define the statistical characteristics of the primary transform coefficients relatively simply by setting an r value for a given low frequency region.
  • the RPT according to the present disclosure is fundamentally different from the reduced secondary transform in that it is a technique for defining an r value by considering the statistical characteristics of samples within a residual block that have very different characteristics from the distribution of the primary transform coefficients.
  • the RPT kernel which is a reduced-dimensional transformation matrix. In other words, a method for determining or defining the r value in the RPT is described below.
  • memory usage can be considered as a measure of worst-case complexity.
  • the allowed memory size per kernel can be set.
  • each kernel coefficient each element constituting the transform kernel is referred to as a kernel coefficient in this disclosure
  • the value of r can be set to q / (MN * p) or less.
  • p is 1 byte for a forward RPT kernel for a 16x16 block
  • the value of r can be set to 32 or less.
  • memory usage and/or the number of multiplications per sample can be considered as measures of worst-case complexity. For example, if the maximum possible number of multiplications per sample is set to 16 for a 16x16 block and memory usage is set to 8KB or less per kernel (kernel coefficients are expressed as 1 byte), the value of r can be set to 16 or less.
  • the r value constituting the RPT kernel may be determined by specific information.
  • the r value constituting the RPT kernel may be determined based on a predefined encoding parameter.
  • the r value may be determined based on the size of a block.
  • the RPT kernel may be variably determined based on the size of the block.
  • the block may be at least one of a coding block, a transform block, and a prediction block.
  • the r value may be determined based on prediction information.
  • the prediction information may include information regarding inter/intra prediction, intra prediction mode information, etc.
  • the r value may be determined based on signaled information (values of syntax elements).
  • the r value may be variably determined based on a quantization parameter value.
  • a predefined fixed value may be used as the r value, and the predefined fixed value may be determined based on signaled information.
  • the values in empty spaces can be filled based on the values of available surrounding pixels and the intra prediction mode.
  • the values in empty spaces can be predicted by performing intra prediction based on the values of available surrounding pixels and the intra prediction mode.
  • the values of empty spaces can be filled from available surrounding pixels using a predefined intra prediction mode (e.g., planar mode).
  • a predefined intra prediction mode e.g., planar mode
  • filling the empty space with 0 among the examples described above may be referred to as a zero-out process.
  • the following embodiment may be applied. If a non-zero transform coefficient is detected (or parsed) in the empty space portion during parsing of the transform coefficients on the decoding device side, it may be considered (or inferred) that the RPT is not applied. In other words, if a non-zero transform coefficient exists in the predefined area representing the empty space, it may be considered that the RPT is not applied. In this case, signaling (or parsing) for a flag indicating whether the RPT is applied and/or an index designating one of a plurality of RPT kernel candidates may not be performed. As an example, if a non-zero transform coefficient exists in the predefined area representing the empty space, a predefined variable value may be updated, and it may be inferred that the RPT is not applied based on the updated variable value.
  • whether or not to apply RPT may be determined based on the size and/or shape of a block.
  • the RPT kernel may be variably determined based on the size and/or shape of the block. Since the r value may vary based on the size and/or shape of the block (i.e., for each M x N block), the empty space may vary based on the size and/or shape of the block. Accordingly, the area for checking whether a non-zero transform coefficient is detected may be defined differently based on the size and/or shape of the block. In other words, the zero-out area may be variably determined.
  • the r value when a 16x64 matrix is applied as a forward RPT matrix for an 8x8 block, the r value may be 16.
  • the CG when the CG is a 4x4 sub-block, only the upper left 4x4 block may be filled with a non-zero RPT transform coefficient, and the remaining three empty 4x4 sub-blocks (i.e., the upper right, lower left, and lower right sub-blocks) may be filled with 0 values.
  • a non-zero transform coefficient is detected in the remaining three 4x4 sub-block areas during the decoding process, it may be considered that the RPT is not applied.
  • a flag indicating whether to apply the RPT or an index specifying one of multiple RPT kernel candidates may not be signaled.
  • the RPT transform coefficients can be filled in the upper-left 4x4 sub-block and the 4x4 sub-block adjacent to the lower side of the upper-left sub-block.
  • the area to be filled with zero as an empty space can be determined as the remaining area excluding the two 4x4 sub-blocks.
  • the RPT kernel can be determined variably depending on the size and/or shape of the block, and as seen, the empty space can be determined differently for an 8x8 block and a 16x8 block.
  • the flag and/or index associated with the RPT may not be signaled if it is detected that non-zero transform coefficients exist in CGs belonging to empty spaces. That is, the transform coefficients within each CG may be scanned in a specified order, and the transform coefficients within the CG may be scanned in the same manner for the next CG according to the scan order for the CG unit.
  • whether to apply the RPT can be determined based on that information alone, which can reduce signaling overhead and related implementation complexity.
  • RPT may not be applied. In this case, signaling for information related to RPT may be omitted.
  • the flag indicating whether RPT is applied can be parsed after parsing (or signaling) the related transform coefficients to make a final determination as to whether RPT is applied.
  • a forward secondary transform may be additionally applied to the transform coefficients generated through the application of RPT.
  • a forward secondary transform may be additionally applied to an area where the generated transform coefficients are located within an M x N block.
  • the area or a part of the area may be referred to as an ROI from the perspective of the forward secondary transform.
  • the backward secondary transform may be applied first and then the backward RPT may be applied.
  • an area or a part of the area where r transform coefficients generated by the application of the forward RPT are located may be set as an ROI and the forward secondary transform may be applied.
  • the first group can be defined as a set of 4x4, 4x8, 8x4, 8x8, 8x16, 16x8, 16x16.
  • the first group can be defined as a set of 4x4, 4x8, 8x4, 8x8, 8x16, 16x8.
  • the first group can be defined as a set of 4x8, 8x4, 8x8, 8x16, 16x8.
  • the first group can be defined as a set of 4x4, 4x8, 8x4, 8x8, 8x16, 16x8.
  • the first group can be defined as a set of 4x4, 4x8, 8x4, 8x8, 8x16, 16x32, 32x16, 32x32.
  • the first group can be defined as a set of 4x4, 4x8, 4x16, 8x4, 8x8, 8x16, 16x4, 16x8, 16x16.
  • the first group can be defined as a set of 4x8, 4x16, 8x4, 8x8, 8x16, 16x4, 16x8, 16x16.
  • the first group can be defined as a set of 4x4, 4x8, 4x16, 8x4, 8x16, 16x4, 16x8, 16x16.
  • the first group can be defined as the set of 4x8, 4x16, 8x4, 8x16, 16x4, 16x8, 16x16.
  • the first group can be defined as the set of 4x4, 4x8, 4x16, 4x32, 8x4, 8x16, 8x32, 16x4, 16x8, 32x4, 32x8.
  • the first group can be defined as the set of 4x8, 4x16, 4x32, 8x4, 8x16, 8x32, 16x4, 16x8, 32x4, 32x8.
  • the first group can be defined as the set of 4x4, 4x8, 4x16, 4x32, 8x4, 8x8, 8x16, 8x32, 16x4, 16x8, 16x16, 32x4, 32x8.
  • the first group can be defined as the set of 4x4, 4x8, 4x16, 4x32, 8x4, 8x8, 8x16, 8x32, 16x4, 16x8, 16x32, 32x4, 32x8, 32x16.
  • the first group can be defined as the set of 4x4, 4x8, 4x16, 4x32, 8x4, 8x8, 8x16, 8x32, 16x4, 16x8, 16x16, 16x32, 32x4, 32x8, 32x16.
  • the first group can be defined as the set of 4x8, 4x16, 4x32, 8x4, 8x16, 8x32, 16x4, 16x8, 16x32, 32x4, 32x8, 32x16.
  • the first group can be defined as a set of 4x4, 4x8, 4x16, 4x32, 8x4, 8x8, 8x16, 8x32, 16x4, 16x8, 16x16, 16x32, 32x4, 32x8, 32x16, 32x32.
  • an NSPT matrix (or NSPT kernel) having a predetermined dimension
  • the NSPT matrix can be expressed as a matrix having a dimension of PxQ as an inverse transformation matrix
  • the PxQ matrix represents a matrix in which the number of rows and the number of columns are P and Q, respectively.
  • a 16x16 NSPT matrix may be applied for a 4x4 block.
  • a 32x20 NSPT matrix may be applied for at least one of a 4x16 block or a 16x4 block.
  • a 64x24 NSPT matrix may be applied for at least one of a 4x16 block or a 16x4 block.
  • a 64x32 NSPT matrix may be applied for an 8x8 block.
  • a 128x40 NSPT matrix may be applied.
  • a 16x16 block a 256x44 NSPT matrix may be applied for a 16x16 block.
  • a 128x36, 128x38, or 128x40 NSPT matrix may be applied.
  • a 256x48 NSPT matrix can be applied.
  • a 512x52 or 512x54 NSPT matrix can be applied.
  • an NSPT matrix of 128x36, 128x38, 128x40, or 128x(36-(4*n)) may be applied.
  • an NSPT matrix of 128x(36-(4*n)) may be applied instead of the NSPT matrix of 128x36, 128x38, or 128x40.
  • * denotes multiplication
  • n may be an integer greater than or equal to 0.
  • the NSPT matrix for at least one of a 4x32 block or a 32x4 block at least one of a 128x36 matrix, a 128x32 matrix, a 128x28 matrix, a 128x24 matrix, a 128x20 matrix, a 128x16 matrix, a 128x12 matrix, a 128x8 matrix, or a 128x4 matrix can be used.
  • an NSPT matrix of 256x48 or 256x(48-(4*m)) may be applied.
  • an NSPT matrix of 256x(48-(4*m)) may be applied instead of the NSPT matrix of 256x48.
  • * denotes multiplication
  • m may denote an integer greater than or equal to 0.
  • the NSPT matrix for at least one of an 8x32 block or a 32x8 block at least one of a 256x48 matrix, a 256x44 matrix, a 256x40 matrix, a 256x36 matrix, a 256x32 matrix, a 256x28 matrix, a 256x24 matrix, a 256x20 matrix, a 256x16 matrix, a 256x12 matrix, a 256x8 matrix, or a 256x4 matrix can be used.
  • the combination of the structure of the NSPT matrix for a 4x32 block and a 32x4 block and the structure of the NSPT matrix for an 8x32 block and a 32x8 block can be formed by a combination of the above-described matrices. That is, the combination of the structure of the NSPT matrix for a 4x32 block and a 32x4 block and the structure of the NSPT matrix for an 8x32 block and a 32x8 block can be defined by a combination of one or more 128x(36-(4*n)) NSPT matrices and one or more 256x(48-(4*m)) NSPT matrices.
  • n can be one or more integers in the range of 0 to 8
  • m can be one or more integers in the range of 0 to 11.
  • the NSPT matrix for at least one of a 4x32 block or a 32x4 block may be a 128x24 matrix
  • the NSPT matrix for at least one of an 8x32 block or a 32x8 block may be a 256x36 matrix.
  • the NSPT matrix for at least one of the 4x32 block or the 32x4 block may be a 128x24 matrix
  • the NSPT matrix for at least one of the 8x32 block or the 32x8 block may be a 256x32 matrix.
  • the NSPT matrix for at least one of the 4x32 block or the 32x4 block may be a 128x24 matrix
  • the NSPT matrix for at least one of the 8x32 block or the 32x8 block may be a 256x28 matrix.
  • the NSPT matrix for at least one of the 4x32 block or the 32x4 block may be a 128x24 matrix
  • the NSPT matrix for at least one of the 8x32 block or the 32x8 block may be a 256x24 matrix.
  • the NSPT matrix for at least one of the 4x32 block or the 32x4 block may be a 128x24 matrix
  • the NSPT matrix for at least one of the 8x32 block or the 32x8 block may be a 256x20 matrix.
  • the NSPT matrix for at least one of the 4x32 block or the 32x4 block may be a 128x24 matrix
  • the NSPT matrix for at least one of the 8x32 block or the 32x8 block may be a 256x16 matrix.
  • the NSPT matrix for at least one of the 4x32 block or the 32x4 block may be a 128x20 matrix
  • the NSPT matrix for at least one of the 8x32 block or the 32x8 block may be a 256x36 matrix.
  • the NSPT matrix for at least one of the 4x32 block or the 32x4 block may be a 128x20 matrix
  • the NSPT matrix for at least one of the 8x32 block or the 32x8 block may be a 256x32 matrix.
  • the NSPT matrix for at least one of the 4x32 block or the 32x4 block may be a 128x20 matrix
  • the NSPT matrix for at least one of the 8x32 block or the 32x8 block may be a 256x28 matrix.
  • the NSPT matrix for at least one of the 4x32 block or the 32x4 block may be a 128x20 matrix
  • the NSPT matrix for at least one of the 8x32 block or the 32x8 block may be a 256x24 matrix.
  • the NSPT matrix for at least one of the 4x32 block or the 32x4 block may be a 128x20 matrix
  • the NSPT matrix for at least one of the 8x32 block or the 32x8 block may be a 256x20 matrix.
  • the NSPT matrix for at least one of the 4x32 block or the 32x4 block may be a 128x20 matrix
  • the NSPT matrix for at least one of the 8x32 block or the 32x8 block may be a 256x16 matrix.
  • the NSPT matrix for at least one of the 4x32 block or the 32x4 block may be a 128x16 matrix
  • the NSPT matrix for at least one of the 8x32 block or the 32x8 block may be a 256x36 matrix.
  • the NSPT matrix for at least one of the 4x32 block or the 32x4 block may be a 128x16 matrix
  • the NSPT matrix for at least one of the 8x32 block or the 32x8 block may be a 256x32 matrix.
  • the NSPT matrix for at least one of the 4x32 block or the 32x4 block may be a 128x16 matrix
  • the NSPT matrix for at least one of the 8x32 block or the 32x8 block may be a 256x28 matrix.
  • the NSPT matrix for at least one of the 4x32 block or the 32x4 block may be a 128x16 matrix
  • the NSPT matrix for at least one of the 8x32 block or the 32x8 block may be a 256x24 matrix.
  • the NSPT matrix for at least one of the 4x32 block or the 32x4 block may be a 128x16 matrix
  • the NSPT matrix for at least one of the 8x32 block or the 32x8 block may be a 256x20 matrix.
  • the NSPT matrix for at least one of the 4x32 block or the 32x4 block may be a 128x16 matrix
  • the NSPT matrix for at least one of the 8x32 block or the 32x8 block may be a 256x16 matrix.
  • a Px1 output vector can be obtained by applying the PxQ matrix to a Qx1 input vector (i.e., (PxQ matrix) x (Qx1 input vector)).
  • the Qx1 input vector may correspond to (inverse quantized) transform coefficients in the current block to which NSPT is applied.
  • the value of Q may mean the number of transform coefficients to which NSPT is applied, and may be less than or equal to the product of the width and the height of the current block.
  • the value of Q may be variably determined based on the size of the current block among the block sizes belonging to the first group described above. Alternatively, the value of Q may be set identically for the block sizes belonging to the first group.
  • the Px1 output vector may correspond to a residual signal (or decoded residual samples). The value of P may be equal to the product of the width and the height of the current block.
  • the forward NSPT matrix can be expressed as a QxP matrix, which is the transpose of the PxQ matrix.
  • a QxP output vector can be obtained by applying the QxP matrix to a Px1 input vector (i.e., (QxP matrix)x(Px1 input vector)).
  • the Px1 input vector can correspond to residual samples in the current block to which NSPT is applied.
  • the value of P can be equal to the product of the width and the height of the current block.
  • the Qx1 output vector can correspond to transform coefficients in the current block derived through NSPT.
  • the value of Q can mean the number of transform coefficients output through NSPT, and can be less than or equal to the product of the width and the height of the current block.
  • the value of Q can be variably determined based on the size of the current block among the block sizes belonging to the first group described above. Alternatively, the value of Q can be set identically for the block sizes belonging to the first group.
  • NSPT can be applied to non-square blocks, such as MxN blocks and NxM blocks.
  • NSPT can be applied to 4x8 blocks and 8x4 blocks.
  • NSPT can be applied to 4x16 blocks and 16x4 blocks, or 8x16 blocks and 16x8 blocks, or 16x32 blocks and 32x16 blocks.
  • LFNST can be composed of a small number of transform basis vectors.
  • a separable primary transform such as DCT-2 and a non-separable secondary transform such as LFNST are applied instead of NSPT to the corresponding block sizes, performance degradation may occur.
  • NSPT NSPT
  • LFNST performs a transpose operation on the input block only for the ROI region, utilizing symmetry.
  • NSPT performs a transpose operation on the entire block, utilizing symmetry. Therefore, NSPT can train and apply the NSPT kernel using a more sophisticated symmetry method, which is expected to improve performance.
  • a 32x64 transformation matrix can be applied instead of a 16x64 transformation matrix from the forward transformation perspective.
  • the 16x64 transformation matrix can be constructed by sampling the upper 16 rows of the 32x64 transformation matrix.
  • NSPT can be applied to the luma component of the current block, but NSPT can not be applied to the chroma component of the current block. If the tree type of the current block is a dual tree, NSPT can be applied to the luma and chroma components of the current block.
  • NSPT may be applied to the luma component of the current block and not applied to the chroma component of the current block, regardless of whether the tree type of the current block is a single tree.
  • NSPT may be applied to the luma component and chroma component of the current block, regardless of whether the tree type of the current block is a single tree.
  • the tree type of the current block is single tree
  • NSPT is allowed for luma and chroma components
  • the size of the current block belongs to the first group one NSPT index may be signaled, and the luma and chroma components of the current block may share the NSPT index.
  • the NSPT index may be an index for selecting any one of the transformation kernel candidates for NSPT. If the sizes of the luma block and the chroma block of the current block belong to the first group, the transformation kernel candidate selected by the same NSPT index may be applied to the luma and chroma components.
  • LFNST may not be applied to the chroma component of the current block, and a separate transformation may be applied.
  • LFNST may be applied to the chroma component of the current block.
  • the NSPT kernel for the above NSPT can be derived based on at least one of symmetry between intra prediction modes or symmetry between block shapes.
  • the NSPT kernel can be derived as an NSPT kernel corresponding to at least one of a mode symmetrical to the intra prediction mode of the current block or a block shape symmetrical to the block shape of the current block.
  • the NSPT kernel can be derived based on an NSPT set including one or more NSPT kernel candidates, wherein the NSPT set can be derived as an NSPT set corresponding to at least one of a mode symmetrical to the intra prediction mode of the current block or a block shape symmetrical to the block shape of the current block.
  • Any one of the one or more NSPT kernel candidates belonging to the NSPT set can be set as the NSPT kernel of the current block.
  • an NSPT index specifying any one of the one or more NSPT kernel candidates belonging to the NSPT set can be used.
  • the NSPT index can be signaled through the bitstream or can be derived based on the aforementioned symmetry.
  • Mode 34 There may be symmetry between at least two intra prediction modes among the intra prediction modes pre-defined in the decoding device. For convenience of explanation, the symmetry will be described centered on the upper left diagonal mode (i.e., mode 34). Referring to Fig. 5, there is symmetry between the directional modes. All modes have a prediction direction except for the Planar mode (number 0) and the DC mode (number 1). Modes 2 to 66 are named normal directional modes (which can be expressed as [2, 66]), and modes -14 to -1 (which can be expressed as [-14, -1]) and modes 67 to 80 (which can be expressed as [67, 80]) are named wide directional modes.
  • the wide directional modes may include at least one of a mode having a value smaller than -14 or a mode having a value larger than 80.
  • all modes except modes 0 and 1 are symmetrical around mode 34.
  • mode x and mode (68 - x) are symmetrical
  • mode x and mode (66 - x) are symmetrical between mode [-14, -1] and mode [67, 80].
  • the same symmetry relationship can be established between mode [N, -1] and mode [67, 66 - N].
  • N can be an integer less than or equal to -14.
  • an MxN block and an NxM block can be defined as blocks that are symmetric to each other.
  • M and N can be the same or different.
  • an M1xN1 block and an M2xN2 block can be defined as blocks that are symmetric to each other.
  • an M1xN1 block and an M2xN2 block can be defined as blocks that are symmetric to each other.
  • modes that are symmetric to each other can share at least one of the NSPT set, NSPT index, or NSPT kernel. That is, at least one of the NSPT set, NSPT index, or NSPT kernel for any one of the symmetric modes can be applied equally to any other one of the symmetric modes.
  • modes that are symmetric to each other can share a single NSPT kernel.
  • the corresponding NSPT kernel can be applied to the input data, and for the other mode, a transpose operation can be applied to the input data and then the corresponding NSPT kernel can be applied.
  • mode x belongs to the [2, 33] mode
  • a one-dimensional vector (1D vector) can be constructed in column-first order for the input data MxM block, and the NSPT kernel can be applied to the 1D vector.
  • a 1D vector may be configured according to the column-first order for the (66 - x) mode that is symmetric to the x-th mode, and the same NSPT kernel as the x-th mode may be applied to the 1D vector.
  • the column-first order or the row-first order may be applied to the modes 0 and 1, and the column-first order or the row-first order may be applied to the mode 34.
  • the row-first order may be applied to the intra prediction mode that belongs to the [2, 33] mode, and the column-first order may be applied to the mode that is symmetric to the intra prediction mode.
  • row-major ordering can be applied, and for modes symmetric to this, column-major ordering can be applied.
  • a non-square block with width and height M and N, respectively can be viewed as having a symmetry relationship with a non-square block with width and height N and M, respectively.
  • the x-th mode of an MxN block belongs to the [N, -1] mode (N ⁇ -14)
  • the method of constructing a 1D vector from an input data block is as discussed above. That is, if a column-major order is applied to mode x, a row-major order can be applied to a mode that is symmetric to it. Alternatively, if a row-major order is applied to mode x, a column-major order can be applied to a mode that is symmetric to it. Specifically, if a column-major order is applied to mode x, input data can be read column-wise from an MxN block of input data to obtain M columns, which can be arranged sequentially to construct a 1D vector. Here, each column can have a length of N.
  • the NSPT set and/or NSPT kernel of the current block may be determined based on at least one of an intra prediction mode symmetric to mode x or a block size of NxM symmetric to the block size of MxN.
  • the NSPT kernel may be set as an NSPT kernel for an NxM block, not an NSPT kernel for an MxN block. That is, if symmetry is utilized for the current block, the NSPT set and/or NSPT kernel for a block that has symmetry with the current block may be utilized in the same manner.
  • a 1D vector may be constructed from an input data block according to a predetermined priority order, which may correspond to an input of the NSPT kernel.
  • the symmetry may be restricted to be utilized only when the value of the intra prediction mode of the current block is greater than 34. That is, when the value of the intra prediction mode of the current block is greater than 34, a transpose operation may be applied when constructing a 1D vector from an input data block, and an NSPT set or NSPT kernel corresponding to a mode and/or block shape having symmetry with the current block may be utilized. Specifically, when the intra prediction mode of the current block belongs to the [N, -1] mode and the [2, 34] mode, symmetry may not be utilized for the current block. On the other hand, when the intra prediction mode of the current block belongs to the [35, 66] mode and the [67, 66 - N] mode, symmetry may be utilized for the current block.
  • N may be an integer less than or equal to -14.
  • the derivation of the NSPT set or NSPT kernel based on the above symmetry can be adaptively performed based on the size of the current block. For example, for 4x4 blocks and 8x8 blocks, the NSPT set or NSPT kernel may be derived based on symmetry, and for 4x8 blocks and 8x4 blocks, the NSPT set or NSPT kernel may not be derived based on symmetry.
  • Table 9 shows an example in which the NSPT set is determined using symmetry, and shows the mapping relationship between the intra prediction mode and the NSPT set when the number of available NSPT sets is 35.
  • Intra prediction mode NSPT set index X ⁇ 0 2 0 ⁇ X ⁇ 34 X 35 ⁇ X ⁇ 66 68 - X X > 66 2
  • the NSPT set of the current block may be determined as an NSPT set having an NSPT set index of 2 among 35 NSPT sets. If the value (X) of the intra prediction mode of the current block is greater than or equal to 0 and less than or equal to 34, the NSPT set of the current block may be determined as an NSPT set having an NSPT set index of X among 35 NSPT sets.
  • the NSPT set of the current block may be determined as an NSPT set having an NSPT set index of (68-X) among 35 NSPT sets. If the value (X) of the intra prediction mode of the current block is greater than or equal to 35 and less than or equal to 66, the NSPT set of the current block may be identical to the NSPT set corresponding to the value (68-X) of the mode symmetrical to the intra prediction mode of the current block.
  • the NSPT set of the current block may be determined as the NSPT set having the NSPT set index of 2 among the 35 NSPT sets. If the value (X) of the intra prediction mode of the current block is greater than 66, the NSPT set of the current block may be identical to the NSPT set corresponding to the mode symmetrical to the intra prediction mode of the current block.
  • Table 10 below shows an example in which the NSPT set is determined without using symmetry, and shows the mapping relationship between the intra prediction mode and the NSPT set when the number of available NSPT sets is 67.
  • Intra prediction mode NSPT set index X ⁇ 0 2 0 ⁇ X ⁇ 66 X X > 66 66
  • the NSPT set of the current block may be determined as an NSPT set having an NSPT set index of 2 among 67 NSPT sets. If the value (X) of the intra prediction mode of the current block is greater than or equal to 0 and less than or equal to 66, the NSPT set of the current block may be determined as an NSPT set having an NSPT set index of X among 67 NSPT sets. If the value (X) of the intra prediction mode of the current block is greater than 66, the NSPT set of the current block may be determined as an NSPT set having an NSPT set index of 66 among 67 NSPT sets.
  • the memory required to store transformation kernels can be reduced while maintaining the performance required for transform application. For example, by utilizing symmetry to use 35 NSPT sets instead of 67, the memory required to store NSPT kernels can be significantly reduced.
  • the number of available NSPT sets and/or the number of NSPT kernel candidates in an NSPT set may vary depending on the block size.
  • the number of available NSPT sets for a 4x4 block may be 35
  • the number of available NSPT sets for a 4x8 block and an 8x4 block may be 19, and the number of available NSPT sets for an 8x8 block may be 10.
  • the NSPT set for a 4x4 block may consist of three NSPT kernel candidates
  • the NSPT sets for a 4x8 block and an 8x4 block may consist of three or two NSPT kernel candidates
  • the NSPT set for an 8x8 block may consist of one NSPT kernel candidate.
  • the size of the transform kernel may increase. Therefore, by reducing the number of available NSPT sets and/or the number of NSPT kernel candidates within an NSPT set, the memory required to store the transform kernel can be saved. Furthermore, as the block size increases, the residual signal characteristics within the block tend to become more generalized. Therefore, reducing the number of available NSPT sets and/or the number of NSPT kernel candidates within an NSPT set can help maintain compression efficiency while reducing implementation complexity by reflecting these statistical characteristics.
  • a non-separable transform may be applied to the current block.
  • the current block may be a block encoded using inter prediction.
  • the method according to the present disclosure may be applied in the same/similar manner even when the current block is a block encoded using intra prediction.
  • the non-separable transform may include at least one of the aforementioned LFNST or NSPT.
  • a transform set for non-separable transformation may be selected based on the intra prediction mode used for intra prediction of the block.
  • an intra prediction mode may be derived based on a decoder-side intra mode derivation (DIMD) method, and a transform set for non-separable transformation may be selected based on the derived intra prediction mode.
  • DIMD decoder-side intra mode derivation
  • a predetermined filter is applied to at least one of a prediction block or a surrounding area of a current block to derive a gradient value in a horizontal and/or vertical direction, and a specific intra prediction mode is derived based on the derived gradient value.
  • a set of transformations to be applied to the current block can be selected based on the specific intra prediction mode.
  • the intra prediction mode derived based on the DIMD method may be called a virtual intra prediction mode (VIPM) or a DIMD mode.
  • an initial sample position may be set, and accumulated intensity values for all intra prediction modes may be initialized (S600).
  • An intensity value for a current sample position may be calculated (S610).
  • An intra prediction mode for which the calculated intensity value is to be accumulated may be selected (S620).
  • the intensity value calculated in S610 may be added to the accumulated intensity value for the selected intra prediction mode (S630).
  • the processes of S610 to S630 described above may be performed for each of all or some sample positions belonging to the current block until a next sample position does not exist. If a next sample position does not exist, an intra prediction mode having the largest accumulated intensity value may be selected (S640).
  • the surrounding area is assumed to be a block with width and height W and H.
  • the DIMD method can also be applied based on the predicted block of the current block, and hereinafter, "surrounding area" can be understood as “predicted block.”
  • a filter of size PxQ can be applied inside a WxH block.
  • the PxQ filter can be a 2D filter or a 1D filter. However, there may be cases where the filter goes beyond the block boundary for samples adjacent to the block boundary.
  • the filter can be applied only to the internal area of the WxH block excluding samples adjacent to the block boundary. Specifically, the filter can be applied only to sample positions belonging to the (W-P+1)x(H-Q+1) area, which is the internal area of the WxH block.
  • the filter size is 3x3
  • a 3x3 2D filter can be applied only to sample positions belonging to the (W-2)x(H-2) block excluding the edge of the length of 1 in the WxH block.
  • the 2D filter can be applied to a 3x3 area having the sample of the sample position (hereinafter referred to as the reference sample) as the center sample.
  • the above reference sample and at least one surrounding sample adjacent to the reference sample may be input to the 2D filter.
  • the surrounding sample may include a sample adjacent to at least one of the top, left, bottom, right, top left, top right, bottom left, or bottom right of the reference sample.
  • a filter can be applied to each sample position belonging to the internal region to derive an intensity value of a specific intra prediction mode.
  • the derived intensity value is added to a previously derived intensity value for the specific intra prediction mode, and through this process, a cumulative intensity value can be derived for the specific intra prediction mode.
  • cumulative intensity values can be derived for all intra prediction modes (or directional modes excluding the non-directional mode).
  • An intra prediction mode with the largest cumulative intensity value can be selected, and this can be set as an intra prediction mode derived based on the DIMD method (hereinafter, referred to as a DIMD mode).
  • Two types of 3x3 filters can be used as filters to induce the DIMD mode, and these are called filterY and filterX, respectively.
  • the position where filterY and filterX are applied i.e., the position of the reference sample
  • the positions of the samples related to the application of the two filters can be represented as A, B, C, D, E, F, G, H, and I.
  • the values obtained by applying filterY and filterX are represented as iDy and iDx, respectively, iDy and iDx can be calculated as follows.
  • iDx G + 2*H + I - A - 2*B - C
  • the subsequent steps i.e., obtaining the intensity value, selecting a specific intra prediction mode, and adding the intensity value to the accumulated intensity value for the intra prediction mode
  • the filter can be moved to the next sample position to be filtered.
  • the function abs may be a function that calculates and returns the absolute value of an input value.
  • the value of iAmp may be calculated as follows. This may correspond to step S610 of FIG. 6.
  • iAngUneven which is the value of the selected specific intra prediction mode, can be determined as in the following mathematical expression 8. This may correspond to step S620 of FIG. 6 for the case where either iDx or iDy is 0.
  • VER_IDX and HOR_IDX can represent vertical mode and horizontal mode, respectively.
  • VER_IDX and HOR_IDX can correspond to mode 50 and mode 18 in Fig. 5, respectively.
  • a value of iDx of 0 can mean that the amount of variation in the vertical direction is 0 or almost none. In other words, it can mean that the same sample values are considered to be present in the vertical direction, and thus prediction is good in the vertical direction.
  • a value of iDy of 0 i.e., when the value of iDx is not 0
  • iAngUneven which is the value of the specific intra prediction mode selected, can be determined as follows. This may correspond to step S620 of FIG. 6 for the case where both iDx and iDy are non-zero.
  • the values of intra prediction modes (especially, the values of directional modes) can be divided into the following four groups.
  • the first group can be composed of modes having a specific number of horizontal directions.
  • the first group can be composed of modes having a value less than or equal to the horizontal mode.
  • the modes having a horizontal direction are modes 2 to 34 (however, mode 34 may not be included in the modes having a horizontal direction), and the value of the horizontal mode is 18 (i.e., the horizontal mode is mode 18).
  • the specific number is N
  • the first group can be composed of modes ⁇ 18, 18-1, 18-2, ... , 18-(N-1) ⁇ .
  • N is 17, the first group can be composed of modes ⁇ 18, 17, 16, ... , 2 ⁇ .
  • the second group (region 1) can be composed of modes with a specific number of horizontal orientations.
  • the second group can be composed of modes whose values are greater than or equal to the value of the horizontal mode. If the specific number is N, the second group can be composed of modes ⁇ 18, 18+1, 18+2, ..., 18+(N-1) ⁇ . If N is 17, the second group can be composed of modes ⁇ 18, 19, 20, ..., 34 ⁇ .
  • the third group (region 2) can be composed of modes having a specific number of vertical orientations.
  • the third group can be composed of modes having a value less than or equal to the vertical mode.
  • the modes having a vertical orientation are modes 34 to 66 (however, mode 34 may not be included in the modes having a vertical orientation), and the value of the vertical mode is 50 (i.e., the vertical mode is mode 50).
  • the third group can be composed of modes ⁇ 50, 50-1, 50-2, ..., 50-(N-1) ⁇ . If N is 17, the third group can be composed of modes ⁇ 50, 49, 48, ..., 34 ⁇ .
  • the fourth group (region 3) can be composed of modes with a specific number of vertical orientations.
  • the fourth group can be composed of modes whose values are greater than or equal to the vertical mode. If the specific number is N, the fourth group can be composed of modes ⁇ 50, 50+1, 50+2, ..., 50+(N-1) ⁇ . If N is 17, the fourth group can be composed of modes ⁇ 50, 51, 52, ..., 66 ⁇ .
  • an identifier indicating a specific group can be calculated as shown in Table 11 below.
  • the identifiers corresponding to the first to fourth groups are 0, 1, 2, and 3, respectively.
  • gtY can indicate whether the amount of change in the vertical direction is greater than the amount of change in the horizontal direction. That is, if absx is greater than absy, gtY can be derived as 1, otherwise gtY can be derived as 0.
  • gtY is 1, this indicates that the amount of change in the vertical direction is greater than the amount of change in the horizontal direction, and if gtY is 0, this indicates that the amount of change in the vertical direction is less than or equal to the amount of change in the horizontal direction. If the amount of change in the vertical direction is large, it may mean that the prediction in the vertical direction is less likely to be good. In this case, region 0 or region 1 can be selected.
  • mapXgrY1[signy][signx] can be selected as the identifier for the region. If the amount of change in the horizontal direction is large, it may mean that the prediction in the horizontal direction is less likely to be good. In this case, region 2 or region 3 can be selected. That is, mapXgrY0[signy][signx] can be selected as an identifier for the region.
  • region 1 or region 2 can be selected, and when the sign for iDx and the sign for iDy are different, region 0 or region 3 can be selected.
  • (1 ⁇ 16) means shifting 1 to the left by 16, which represents 65536, which is 2 16.
  • the intFunc function can be a function that converts fRatioScaled, which is expressed as a decimal value, to an integer value. Operations such as rounding, ceiling, and flooring can be applied to convert to an integer value. You can also convert to an integer value using casting functions such as int provided by the C/C++ library.
  • a division operation (/) may be required to obtain the ratio of absy and absx.
  • the implementation cost for the division operation is expensive or difficult to implement. Therefore, it is often advantageous from an implementation perspective to approximate the division operation as a combination of several integer operations. Therefore, the equations for obtaining the ratio can be approximated with the equations in Table 13 below.
  • the integerized ratio value can be determined through a process as shown in Table 13.
  • the position to which the ratio value is closest in angTable can be determined as shown in Table 14 below.
  • angTable can be composed of 17 entries. If each group described above consists of 17 modes, each intra-prediction mode constituting each group can correspond to an entry. In Table 14, the angTable entry closest to the ratio value can be found, and the value of idx can be derived based on the index of angleTable corresponding to that entry.
  • iAngUneven can be assigned the value of the intra prediction mode for accumulating the intensity value for the current sample position within the current block to which the filter is applied.
  • the region derived above can be an identifier indicating any one of the four groups.
  • offsets[region] can indicate the starting value of the intra prediction mode for the group indicated by the region, and dirs[region] can indicate the direction in which the intra prediction mode increases or decreases.
  • idx can indicate the position within the angleTable. Therefore, the value of iAngUneven can be determined using a formula such as Table 15.
  • the process of adding the accumulated intensity values for a selected specific intra prediction mode can be performed as follows.
  • the piHistogram array is an array that stores the accumulated intensity values for all intra prediction modes, and after being initialized to 0, the intensity values can be calculated by looping over the sample positions of the internal area within the current block to which the filter is applied. At this time, the intensity value calculated for the current sample position is added to the accumulated intensity value for the selected specific intra prediction mode.
  • iAngUneven may store the value of the intra prediction mode selected for the current sample position to which the filter is applied
  • iAmp may store the intensity value calculated for the corresponding sample position.
  • piHistogram[iAngUneven] may store the accumulated intensity value for the intra prediction mode indicated by iAngUneven.
  • the mathematical expression 9 may correspond to step S630 of FIG. 6.
  • the piHistogram array After looping over all sample locations within the internal region of the block to which the filter is applied, the piHistogram array stores the accumulated intensity values for all intra prediction modes. One or more modes with the largest accumulated intensity values can be selected. The selected mode may be referred to as the DIMD mode. This may correspond to step S640 in FIG. 6.
  • NUM_LUMA_MODE can indicate the number of all intra prediction modes available in DIMD mode. For example, NUM_LUMA_MODE can be 67. According to Table 16, the value of the intra prediction mode with the largest accumulated intensity value can be assigned to the firstMode variable. Therefore, the intra prediction mode corresponding to the value of the finally determined firstMode variable can be set as the DIMD mode for the WxH block.
  • An encoding device and a decoding device may define a mapping table that defines a mapping relationship between intra prediction modes and transformation sets.
  • a transformation set corresponding to a previously derived intra prediction mode may be selected from the mapping table without signaling information for selecting a transformation set.
  • the selected transformation set may include a plurality of transformation kernel candidates.
  • An index indicating one of the plurality of transformation kernel candidates may be signaled.
  • the index here may be expressed as an NSPT index or an LFNST index depending on the type of non-separable transformation.
  • the index may be expressed as a transformation index.
  • the value of the index may fall in the range of 0 to N.
  • An index of 0 indicates that a non-separable transformation is not applied, and an index of k may indicate the kth transformation kernel candidate (1 ⁇ k ⁇ N).
  • the transform set candidate may mean a transform set for a non-separable transform (e.g., a transform set for LFNST and/or a transform set for NSPT).
  • the present invention is not limited thereto, and may also mean a transform set for a separable transform (e.g., a transform set for MTS).
  • Each transform set candidate may include one or more transform kernel candidates. Any one of the one or more transform set candidates may be determined as the transform set of the current block. Any one of the one or more transform kernel candidates belonging to the transform set of the current block may be set as the transform kernel of the current block.
  • candidate transformation sets mapped to them can be derived respectively.
  • a transformation set candidate may be selected based on the intra prediction mode applied to the current block.
  • the intra prediction mode may be a planar mode, a DC mode, or a directional mode.
  • the intra prediction mode applied to intra prediction when selecting a transformation set candidate, the residual signal resulting from intra prediction may not exactly match the transformation kernel according to the intra prediction mode.
  • the intra prediction mode applied to intra prediction is referred to as mode A.
  • a transformation set candidate can be selected based on a mode other than mode A.
  • modes other than mode A may include modes similar to mode A.
  • mode value of mode A is M
  • at least one mode in the range of (M-d) to (M+d) may be considered a mode similar to mode A.
  • d may be an integer greater than or equal to 1.
  • Modes other than mode A may include representative modes that do not overlap with mode A.
  • at least one of the planar mode, DC mode, horizontal mode, vertical mode, right-upward diagonal mode, right-downward diagonal mode, or left-downward diagonal mode may be a representative mode that does not overlap with mode A.
  • the right-upward, right-downward, and left-downward diagonal modes may be mode 2, mode 34, and mode 66, respectively.
  • Modes other than the A mode may include modes induced through a specific method, such as the DIMD method, which is as discussed in Example 4.
  • the mode induced through the specific method may be named VIPM (Virtual Intra Prediction Mode) or DIPM (Derived Intra Prediction Mode).
  • a prediction block can be generated based on a specific intra prediction mode, such as a planar mode, a DC mode, or a directional mode.
  • a DIPM can be derived using the DIMD method, which takes the prediction block as input. That is, the DIMD method can derive accumulated amplitude values for intra prediction modes, and the top K intra prediction modes can be derived as DIPMs in descending order of the accumulated amplitude values.
  • K can be an integer greater than or equal to 1.
  • an intra-prediction mode may not be defined for the inter-block. However, as an exception, an intra-prediction mode may be defined for the GPM (Geometric Partitioning Mode) and the CIIP (Combined Inter-Intra Prediction) mode.
  • the DIPM can be derived through the DIMD method that takes as input a prediction block generated through inter-prediction. That is, the accumulated amplitude value for the intra-prediction modes can be derived through the DIMD method, and the top K intra-prediction mode(s) in descending order of the accumulated amplitude value can be derived as the DIPM.
  • K can be an integer greater than or equal to 1.
  • DIPM may be derived based on at least one of the available samples recovered at the decoding device, the distribution of the available samples, the intra prediction mode(s) of adjacent and/or non-adjacent neighboring block(s), or the frequency of the intra prediction modes of the neighboring blocks.
  • Intra prediction may be performed in a manner other than the conventional intra prediction modes such as planar mode, DC mode, or directional mode.
  • intra prediction may be performed in a manner such as Decoder-side Intra Mode Derivation (DIMD), Template-based Intra Mode Derivation (TIMD), Matrix-based Intra Prediction (MIP), Intra Template Matching Prediction (IntraTMP), Extrapolation filter-based Intra Prediction (EIP), or Spatial Geometric Partitioning Mode (SGPM).
  • DIMD Decoder-side Intra Mode Derivation
  • TIMD Template-based Intra Mode Derivation
  • MIP Matrix-based Intra Prediction
  • IntraTMP Intra Template Matching Prediction
  • Extrapolation filter-based Intra Prediction EIP
  • Spatial Geometric Partitioning Mode SGPM
  • each partition according to geometric partitioning may have a conventional intra prediction mode, but it may be difficult to specify a conventional intra prediction mode for the entire coding block or transform block.
  • intra prediction modes such
  • Transform sets specialized for blocks encoded with a special intra prediction mode can be separately defined.
  • transform sets mapped to conventional intra prediction modes can be used in the same manner. If the current block is a block encoded with a special intra prediction mode, a conventional intra prediction mode corresponding to the block encoded with the special intra prediction mode can be derived.
  • a transform set candidate can be selected from the transform sets based on the derived conventional intra prediction mode.
  • the above-described derived conventional intra prediction mode may include a DIPM derived through a DIMD method.
  • the DIMD method may be applied by inputting a prediction block generated based on a special intra prediction mode.
  • the DIMD method mentioned as a method for deriving the DIPM is only an example, and the DIPM may be derived based on at least one of pre-restored available samples in a decoding device, a distribution of the available samples, intra prediction mode(s) of adjacent and/or non-adjacent neighboring block(s), or frequencies of intra prediction modes of neighboring blocks.
  • transformation set candidates can be derived based on different transformation sets.
  • the number of different transformation sets among the transformation sets corresponding to multiple intra prediction modes is two or more, two or more transformation set candidates can be derived.
  • one transformation set candidate can be derived.
  • one or more transformation sets different from KS_(1) can be additionally derived through the findOtherKS function described below. In this case, KS_(1) and the additionally derived one or more transformation sets can be set as transformation set candidates for non-separable transformation of the current block.
  • M_(1) may be set as the base mode.
  • KS_(1) that is mapped to M_(1) may be derived.
  • it may be checked whether the transformation sets that are sequentially mapped to the corresponding modes from M_(2) to M_(n) and KS_(1) are identical.
  • the identity check may be performed until a transformation set that is different from the pre-derived KS_(1) is found. If a transformation set (hereinafter referred to as KS_(k)) that is different from KS_(1) is found, KS_(1) and KS_(k) may be set as transformation set candidates for the current block.
  • two transformation set candidates may be derived for the current block.
  • one transformation set candidate may be derived for the current block.
  • the above one transformation set candidate may be KS_(1).
  • a flag specifying one of two transformation set candidates derived for the current block can be signaled via the bitstream.
  • a transformation set for a non-separable transformation of the current block can be determined based on the signaled flag. However, if, as a result of the identity check, no transformation set different from KS_(1) is found (or, if one transformation set candidate is derived for the current block), the signaling of the aforementioned flag can be omitted, and the derived one transformation set candidate can be set as the transformation set for the non-separable transformation of the current block.
  • a transformation set different from KS_(1) can be additionally derived via the findOtherKS function described below.
  • KS_(1) and the additionally derived transformation set can be set as transformation set candidates for the non-separable transformation of the current block.
  • Whether the two transformation sets are identical can be determined based on whether the transformation set indices between the transformation sets are identical.
  • the transformation set (KS_(2)) mapped to M_(2) may be determined to be the same as the transformation set (KS_(1)) mapped to M_(1). In this case, the transformation set mapped to M_(2) may not be set as a transformation set candidate for the current block.
  • the transformation set (KS_(2)) mapped to M_(2) may be determined to be different from the transformation set (KS_(1)) mapped to M_(1). In this case, KS_(2) may be set as a transformation set candidate for the current block together with KS_(1).
  • the mapping relationship between an intra prediction mode and a transform set can be defined as in Table 8, Table 9, or Table 10.
  • the two directional modes i.e., mode X and mode (68-X)
  • the two directional modes can be mapped to the same transform set.
  • mode 12 and mode 56 are mapped to the same transform set. Therefore, it is possible to determine whether the two transform sets are the same based only on the transform set index (e.g., NSPT set index) pointing to a specific transform set.
  • the transform set index e.g., NSPT set index
  • Equation 10 if the transformation set index K(q) mapped to mode q and the transformation set index K(r) mapped to mode r are the same, the value of redundantKS can be derived as true or 1. Therefore, the transformation set mapped to mode q and the transformation set mapped to mode r can be determined to be the same. Otherwise, the value of redundantKS can be derived as false or 0. Therefore, the transformation set mapped to mode q and the transformation set mapped to mode r can be determined to be different.
  • whether the two transformation sets are identical may be determined based on at least one of the following: whether the transformation set indices between the transformation sets are identical, or whether the input data is transposed (or transposed type).
  • the transposition type may be determined based on a flag indicating whether the input data is transposed.
  • the transformation set (KS_(2)) mapped to M_(2) may be determined to be the same as the transformation set (KS_(1)) mapped to M_(1). In this case, the transformation set mapped to M_(2) may not be set as a transformation set candidate for the current block.
  • the transformation set (KS_(2)) mapped to M_(2) may be determined to be different from the transformation set (KS_(1)) mapped to M_(1).
  • the transformation set (KS_(2)) mapped to M_(2) may be determined to be different from the transformation set (KS_(1)) mapped to M_(1), regardless of whether the transpose type corresponding to M_(2) is the same as the transpose type corresponding to M_(1). If KS_(2) is determined to be different from KS_(1), KS_(2) may be set as a transformation set candidate for the current block together with KS_(1).
  • a transpose operation may be performed on the input data first and then the transform kernel may be applied.
  • the transform kernels applied to mode 12 and mode 56 cannot be considered identical.
  • the transpose operation is a type of shuffling, and can be considered equivalent to multiplying the permutation matrix (here, matrix P) to the left of X.
  • X may be a one-dimensional vector composed of the input data belonging to the 2D block to which the forward non-separable transform is applied in a specific order, such as row-major order.
  • the forward transform kernels for mode 12 and mode 56 are effectively G and GP, respectively, it can be seen that different transform kernels are applied to the two modes. Therefore, it cannot be said that the same transform set is mapped to mode 12 and mode 56. Moreover, if a non-separable transform is applied to a non-square block, such as an MxN block, even the transform kernels applied to the two modes may be different. For the sake of explanation, let's assume that wide angle intra prediction (WAIP) is not applied. Since mode 56 of an MxN block applies a transform set that maps to mode 12 of an NxM block, a fundamentally different transform set may be applied from mode 12 of an MxN block.
  • WAIP wide angle intra prediction
  • the transformation set index mapped to mode x be K(x) and the value representing the transpose type for mode x be TP(x).
  • the variable redundentKS which indicates whether the transformation sets mapped to mode q and mode r are identical, can be derived as follows in mathematical expression 11.
  • the operation "&&" is an AND operation that evaluates to true only when both the left and right sides are true, and false otherwise.
  • the value of redundantKS can be derived as true or 1. Therefore, the transformation set mapped to mode q and the transformation set mapped to mode r can be determined to be the same. Otherwise (for example, if K(q) mapped to mode q and K(r) mapped to mode r are different, or TP(q) for mode q and TP(r) for mode r are different), the value of redundantKS can be derived as false or 0. Therefore, the transformation set mapped to mode q and the transformation set mapped to mode r can be determined to be different.
  • the two modes may be modes prior to being converted to the WAIP mode. That is, M_(1) to M_(n) may be modes prior to being converted to the WAIP mode.
  • the two modes may be modes converted to the modes of WAIP.
  • mode x converted to the modes of WAIP is expressed as WA(x)
  • the variable redundantKS can be derived as in the following mathematical expressions 12 or 13.
  • K(WA(q)) may represent a transformation set index mapped to mode q converted to the mode of WAIP
  • K(WA(r)) may represent a transformation set index mapped to mode r converted to the mode of WAIP.
  • Equation 12 if K(WA(q)) mapped to mode WA(q) and K(WA(r)) mapped to mode WA(r) are identical, the value of redundantKS can be derived as true or 1. Therefore, the transformation set mapped to mode WA(q) and the transformation set mapped to mode WA(r) can be determined to be identical. Otherwise, the value of redundantKS can be derived as false or 0. Therefore, the transformation set mapped to mode WA(q) and the transformation set mapped to mode WA(r) can be determined to be different.
  • Equation 13 K(WA(q)) and K(WA(r)) are as discussed in Equation 12.
  • TP(WA(q)) can represent a transpose type for mode WA(q)
  • TP(WA(r)) can represent a transpose type for mode WA(r).
  • Equation 13 if K(WA(q)) mapped to mode WA(q) is the same as K(WA(r)) mapped to mode WA(r), and TP(WA(q)) for mode WA(q) is the same as TP(WA(r)) for mode WA(r), then the value of redundantKS can be derived as true or 1. Therefore, the set of transformations mapped to mode WA(q) and the set of transformations mapped to mode WA(r) can be determined to be the same.
  • either mode q or mode r may be configured such that only one of them is converted to the WAIP mode and the other is not converted to the WAIP mode.
  • redundantKS can be derived as in Equation 14 or 15.
  • Equation 14 if the transformation set index K(WA(q)) mapped to mode WA(q) and the transformation set index K(r) mapped to mode r are the same, and the transpose type TP(WA(q)) for mode WA(q) and the transpose type TP(r) for mode r are the same, the value of redundantKS can be derived as true or 1. Therefore, the transformation set mapped to mode WA(q) and the transformation set mapped to mode r can be determined to be the same.
  • the value of redundantKS can be derived as false or 0. Therefore, the set of transformations mapped to mode WA(q) and the set of transformations mapped to mode r can be judged to be different.
  • Equation 15 if the transformation set index K(q) mapped to mode q and the transformation set index K(WA(r)) mapped to mode WA(r) are the same, and the transpose type TP(q) for mode q and the transpose type TP(WA(r)) for mode WA(r) are the same, the value of redundantKS can be derived as true or 1. Therefore, the transformation set mapped to mode q and the transformation set mapped to mode WA(r) can be determined to be the same.
  • the value of redundantKS can be derived as false or 0. Therefore, the set of transformations mapped to mode q and the set of transformations mapped to mode WA(r) can be judged to be different.
  • RedundantKS can be derived based on any of the predefined methods identical to those of the encoding device and the decoding device.
  • the predefined methods may include at least one of the redundantKS derivation methods according to the aforementioned mathematical expressions 10 to 15.
  • one of the above-described methods can be selectively used to determine whether the transform sets mapped to the two modes are identical. For example, if SGPM is applied to the current block, the redundantKS derivation method according to Equation 12 can be used. If DIMD mode is applied to the current block, the redundantKS derivation method according to Equation 10 can be used.
  • the transform set candidate(s) can be derived through the aforementioned method based on the conventional intra prediction mode and an additional DIPM.
  • the additional DIPM can be derived through a DIMD method that takes as input a prediction block generated based on the conventional intra prediction mode.
  • the additional DIPM can also be derived through a DIMD method that takes as input a pre-reconstructed neighboring region adjacent to the current block.
  • the conventional intra prediction mode and the additional DIPM derived for the current block can correspond to M_(1) to M_(n).
  • the conventional intra prediction mode can be assigned to M_(1)
  • the additional DIPM can be assigned to M_(2) to M_(n), respectively.
  • q and r can represent the mode before being converted to the WAIP mode, and mode can be set to DIMD, TIMD, SGPM, IntraTMP, EIP, MIP, or convIntra.
  • convIntra can indicate that the normal intra prediction mode, not the special intra prediction mode, is applied to the current block.
  • any one of the redunantKS derivation methods according to the mathematical expressions 10 to 15 can be fixedly used regardless of the mode.
  • the redunantKS derivation method according to Equation 11 may be used fixedly, or the redunantKS derivation method according to Equation 14 or 15 may be used fixedly.
  • M_(1) to M_(n) may be modes that are not converted to the mode of WAIP.
  • the variable found may be a variable indicating whether a transformation set different from the transformation set specified by M_(1) is found.
  • primaryKS may represent the transformation set specified by M_(1)
  • alternativeKS may represent the transformation set mapped to the intra prediction mode when an intra prediction mode having a different transformation set is first found while looping over M_(2) to M_(n).
  • variable found is false, this may indicate that no intra prediction mode with a transformation set different from the primaryKS was found.
  • alternativeKS may be determined to be absent, and a transformation set different from the primaryKS may be found and assigned, as in the pseudocode above.
  • a transformation set different from the primaryKS can be found using the findOtherKS function.
  • the flag for selecting one of the two candidate transformation sets may not be signaled.
  • the primaryKS may be set to the transformation set for the non-separable transformation of the current block.
  • findOtherKS function can be configured as follows.
  • a specific transformation set can be defined as a default transformation set, so that the default transformation set can be returned.
  • the default transformation set may be a transformation set that is mapped to a planar mode or a DC mode.
  • the default transformation set may be a transformation set that is mapped to a down-right diagonal mode (e.g., mode 34).
  • a transformation set that is not mapped to any of the intra prediction modes pre-defined in the encoding device and the decoding device may be defined as the default transformation set.
  • a configuration that selects a transformation set that is mapped to the specific intra prediction mode and performs a transpose operation on input data based on a forward transformation may be defined as the default transformation set.
  • the transformation set adjacent to primaryKS may mean a transformation set corresponding to a value obtained by adding or subtracting a predetermined offset from the transformation set index of primaryKS. For example, if the transformation set index of primaryKS is 5, a transformation set having a transformation set index of 3 or 4 may be selected as alternativeKS.
  • a default transformation set that is not mapped to any of the intra prediction modes pre-defined in the encoding device and the decoding device can be separately defined.
  • the default transformation set can be selected as the alternativeKS.
  • a separate transformation set that is used only when the value of the variable found is false can be defined and used as the default transformation set.
  • a transformation set mapped to the horizontal mode can be selected as alternativeKS. If primaryKS is a transformation set corresponding to the horizontal mode, a transformation set mapped to the vertical mode can be selected as alternativeKS. If primaryKS is a transformation set corresponding to the vertical mode, a transformation set mapped to the horizontal mode can be selected as alternativeKS. If primaryKS is a transformation set corresponding to the horizontal mode (or vertical mode), alternativeKS can be set based on any one of the configurations 1 to 4 described above. If primaryKS is a transformation set corresponding to a non-directional mode (e.g., planar mode, DC mode), alternativeKS can be set based on any one of the configurations 1 to 4 described above.
  • a non-directional mode e.g., planar mode, DC mode
  • the findOtherKS function may be defined by any one of the configurations 1 to 6 described above.
  • the findOtherKS function may be defined by at least two of the configurations 1 to 6, in which case at least one of the two configurations may be selectively used.
  • the transformation set refers to a transformation set for non-separable transformation, but this is only an example. If a separable transformation (e.g., MTS) is applied to the current block, the transformation set in this embodiment can be understood as being replaced with a transformation set for separable transformation.
  • the transformation set for separable transformation can be composed of a plurality of different transformation kernel candidates.
  • Each of the transformation kernel candidates can include at least one of a horizontal transformation kernel or a vertical transformation kernel.
  • the number of transformation kernel candidates belonging to one transformation set can be 4, 6, or 8.
  • a transform set may be selected based on the intra prediction mode of the current block.
  • the transform set may be a transform set for non-separable transforms or a transform set for separable transforms.
  • the selected transform set may include one or more transform kernel candidates.
  • a residual sample of the current block may be generated based on one or more transform kernel candidates belonging to the transform set.
  • a transformation set may be mapped for each intra prediction mode. If two or more intra prediction modes are derived for the current block, a transformation set may exist that is mapped to each intra prediction mode. In this case, the two or more transformation sets that are respectively mapped to the two or more intra prediction modes may be identical to each other. At least one of the two or more transformation sets that are respectively mapped to the two or more intra prediction modes may be different from the other one. The two or more transformation sets that are respectively mapped to the two or more intra prediction modes may also be different from each other.
  • the main transformation set is called the main transformation set
  • the other transformation set(s) is called the alternative transformation set.
  • the main transformation set and the alternative transformation set may be understood as being replaced by the first transformation set and the second transformation set, respectively.
  • a transformation set selected based on an intra prediction mode applied to the prediction process of the current block may be set as a base transformation set.
  • the intra prediction mode may refer to an intra prediction mode that specifies reference samples for intra prediction of the current block.
  • a DIPM may be derived based on a prediction block of the current block or surrounding samples, and a transformation set selected based on the DIPM may be set as an alternative transformation set.
  • the prediction block of the current block may be generated based on the intra prediction mode applied to the prediction process of the current block.
  • the DIPM derivation method has been described above, and a detailed description thereof will be omitted here.
  • a transformation set selected based on the mode with the largest accumulated intensity value among the DIMD modes derived through the aforementioned DIMD method may be set as the default transformation set.
  • a transformation set selected based on the mode with the second largest accumulated intensity value among the DIMD modes may be set as the alternative transformation set.
  • the base transformation set and/or the alternative transformation set may be determined by specific rules even if there is no corresponding intra prediction mode (or DIPM, DIMD mode).
  • the alternative transformation set may be set to a transformation set mapped to a non-directional mode.
  • the non-directional mode may be a planar mode or a DC mode.
  • the method for determining the base and alternative transformation sets is not limited to the method described above, and the method for determining the base and alternative transformation sets may be separately defined according to various intra prediction methods (e.g., Matrix-based Intra Prediction (MIP), Spatial Geometric Partitioning Mode (SGPM), Intra Template Matching (IntraTMP)).
  • MIP Matrix-based Intra Prediction
  • SGPM Spatial Geometric Partitioning Mode
  • IntraTMP Intra Template Matching
  • Which transformation set is applied, between the default transformation set and the alternative transformation set, can be determined implicitly or explicitly. For example, a flag indicating whether the alternative transformation set is applied can be explicitly signaled. If the flag has a first value, this may indicate that the default transformation set is applied. On the other hand, if the flag has a second value, this may indicate that the default transformation set is not applied. If the flag has a second value, this may indicate that the alternative transformation set is applied.
  • a non-separable transformation can be performed based on a single transformation kernel candidate selected from among multiple transformation kernel candidates belonging to a transformation set.
  • the transformation set may be a transformation set for a separable transformation, in which case each transformation kernel candidate belonging to the transformation set may be defined as a pair of a transformation kernel applied in the horizontal direction and a transformation kernel applied in the vertical direction.
  • Any one of the multiple transformation kernel candidates may be determined implicitly or explicitly based on index information signaled through the bitstream.
  • a non-separable transform can be applied to at least one of a block encoded based on an intra mode (hereinafter referred to as an intra block) or a block encoded based on an inter mode (hereinafter referred to as an inter block).
  • an intra block a block encoded based on an intra mode
  • an inter block a block encoded based on an inter mode
  • I-slice may refer to a slice composed of only intra blocks
  • P/B-slice may refer to a slice composed of intra blocks and inter blocks.
  • I-slice may be a slice belonging to a picture coded only in intra mode.
  • P/B-slice is a slice belonging to a picture coded in inter mode, but an intra block may exist in a P/B-slice.
  • a non-separable transformation applied to an intra block is called intra-NST
  • inter-NST a non-separable transformation applied to an inter block
  • Case 1 is when an intra block belonging to an I-slice performs an inseparable transformation based on a basic transformation set.
  • Case 2 is when an intra block belonging to an I-slice performs an inseparable transformation based on an alternative transformation set.
  • Case 3 is when an intra block belonging to a P/B-slice performs an inseparable transformation based on a basic transformation set.
  • Case 4 is when an intra block belonging to a P/B-slice performs an inseparable transformation based on an alternative transformation set.
  • Case 5 is when an inter block belonging to a P/B-slice performs an inseparable transformation based on a basic transformation set.
  • Case 6 is when an inter block belonging to a P/B-slice performs an inseparable transformation based on an alternative transformation set.
  • transformation set # (where # is an integer ranging from 1 to N).
  • [B-(m)] can refer to the case of applying transformation set m, and can be denoted as a combination of [A-(n)]/[B-(m)], where n is an integer ranging from 1 to 3, and m is an integer ranging from 1 to N.
  • the present disclosure assumes that there are only [B-(1)] and [B-(2)], but the present disclosure can be applied identically/similarly even when there are three or more transformation sets. If there are M applicable transformation sets, there may be overlapping transformation sets among the M transformation sets. Even if overlapping transformation sets exist, the conditions under which they are applied may differ. For example, even when the same transformation set is applied, cases where general intra prediction, such as directional mode, is applied may be treated differently from cases where special intra prediction, such as MIP, EIP, IntraTMP, or TIMD, is applied. In such cases, even if the transformation sets overlap, they can be configured to be treated differently, such as B_(p) and B_(q), where p and q are different.
  • the method of applying the transformation kernel can be configured differently depending on the block size.
  • all block sizes allowed by the encoding device and the decoding device can be divided into one or more sections.
  • the one or more sections can include at least one of a first section to which a block size smaller than a first size belongs, a second section to which a block size larger than or equal to the first size belongs and smaller than a second size belongs, a third section to which a block size larger than or equal to the second size belongs and smaller than a third size belongs, ..., an L-th section to which a block size larger than or equal to the (L-1)th size belongs and smaller than the L-th size belongs, or an (L+1)th section to which a block size larger than or equal to the L-th size belongs.
  • the p-th section (i.e., the p-th section) can mean a section in which the number of transformation kernel candidates applicable to the current block is p, and p can be an integer greater than or equal to 0 and less than or equal to L.
  • all block sizes allowed by the encoding device and the decoding device can be divided into (L+1) sections based on the block area as follows.
  • An interval [ a, b ) may mean an interval greater than or equal to a and less than b. If the total number of transformation kernel candidates belonging to a specific transformation set (e.g., a basic transformation set, an alternative transformation set) is L, (L+1) intervals may mean intervals having from 0 to L transformation kernel candidates, respectively. Specifically, an interval [ s_(k), e_(k) ) may represent an interval to which only k transformation kernel candidates among the L transformation kernel candidates are applicable. Here, k may be an integer in the range from 0 to L. In other words, an interval [ s_(k), e_(k) ) may be configured so that from the first transformation kernel candidate to the kth transformation kernel candidate among the L transformation kernel candidates are applicable.
  • a specific transformation set e.g., a basic transformation set, an alternative transformation set
  • (L+1) intervals may mean intervals having from 0 to L transformation kernel candidates, respectively.
  • the interval [ s_(0), e_(0) ) may be an interval to which no transformation kernel candidate is applied.
  • s_(0) may represent the minimum block area to which the non-separable transformation is applicable, and in the present disclosure, the minimum block area is denoted as min_area. For example, if the non-separable transformation is applicable only to blocks in which both the width and the height are greater than or equal to 4, min_area may be 16, and s_(0) may be set to 16.
  • the interval [ s_(L), e_(L) ) may be an interval to which L transformation kernel candidates are applicable.
  • e_(L) may be set to a value greater than the maximum block area to which the non-separable transformation is applicable.
  • max_area the maximum block area
  • e_(L) may be set to a value greater than max_area.
  • e_(L) is set to the value of (max_area+1), and the value of (max_area+1) is denoted as max_area_plus_1.
  • the interval [ s_(k), e_(k) ) cannot contain any block area value, and thus the interval [ s_(k), e_(k) ) can be considered an empty interval. This may indicate that there are no blocks to which k transformation kernel candidates can be applied.
  • min_area and max_area are implicitly determined according to the combinations described above (or fixedly regardless of the combinations), by setting the values of e_(0), s_(1), e_(1), s_(2), e_(2), ..., s_(L-1), e_(L-1), s(L), we can specify applicable transformation kernel candidates for each of all block areas.
  • s_(0) and e_(L) can be set to min_area and max_area_plus_1, respectively.
  • min_area and max_area_plus_1 can be fixed values regardless of the combination. Alternatively, min_area and max_area_plus_1 can have different values depending on the combination.
  • min_area and max_area_plus_1 can have different values depending on whether it is [A-(1)]/[B-(1)], [A-(1)]/[B-(2)], [A-(2)]/[B-(1)], [A-(2)]/[B-(2)], [A-(3)]/[B-(1)], or [A-(3)]/[B-(2)].
  • the values of e_(0), s_(1), e_(1), s_(2), e_(2), ..., s_(L-1), e_(L-1), s(L) can form a non-decreasing sequence.
  • [ s_(0), e_(0) ), [ s_(1), e_(1) ), ... , [ s_(L-1), e_(L-1) ), [ s_(L), e_(L) ) are called range sequences.
  • configuring a larger number of applicable transformation kernel candidates can be advantageous from a performance-complexity trade-off perspective.
  • a larger block area increases the statistical diversity represented by the block data, so a small number of applicable transformation kernel candidates may not sufficiently remove decorrelation in the block data. Therefore, configuring a larger number of applicable transformation kernel candidates for a larger block area can be advantageous for performance improvement.
  • configuring a large number of applicable transformation kernel candidates for a small block area with low statistical diversity can increase the signaling cost of selecting a particular transformation kernel candidate relative to the decorrelation capability.
  • configuring a smaller number of applicable transformation kernel candidates can be advantageous from a performance-complexity perspective. Therefore, configuring a smaller number of applicable transformation kernel candidates for each block area can be advantageous from a performance-complexity trade-off perspective.
  • an interval sequence applied to each combination can be defined. At least one of the six combinations can have an interval sequence different from the other combinations. Some of the six combinations can have the same interval sequence.
  • the same interval sequence (RS1) can be defined for the combinations [A-(1)]/[B-(1)] and [A-(2)]/[B-(1)]
  • the same interval sequence (RS2) can be defined for the combinations [A-(1)]/[B-(2)] and [A-(2)]/[B-(2)].
  • RS1 can be a different interval sequence from RS2.
  • the same interval sequence can be defined for all six combinations.
  • the six combinations can be grouped into multiple groups, and an interval sequence can be defined for each group. The same interval sequence can be applied to combinations belonging to the same group.
  • the total number of transformation kernel candidates (i.e., L) that constitute the transformation set can be defined identically.
  • each combination can have a unique value for L.
  • the interval sequence of [ min_area, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 ), ... , [ max_area_plus_1, max_area_plus_1 ) may be a configuration to which no transformation kernel is applied.
  • the interval sequence of [ min_area, min_area ), [ min_area, min_area ), ... , [ min_area, max_area_plus_1 ) can be a configuration in which all transformation kernel candidates belonging to the transformation set are applicable to all block areas.
  • p may be greater than or equal to 0 and less than or equal to L.
  • p may be greater than or equal to 0 and less than or equal to L.
  • each interval sequence can indicate that transformation kernel candidates 0, 1, 2, and 3 are applicable to the four intervals belonging to the interval sequence, from left to right.
  • the number of applicable transformation kernel candidates for blocks with a block area smaller than 128 may be 0. This may mean that no transformation kernel is applied to blocks with a block area smaller than 128.
  • the number of applicable transformation kernel candidates for blocks with a block area greater than or equal to 128 and less than 256 may be 1.
  • the number of applicable transformation kernel candidates for blocks with a block area greater than or equal to 256 and less than 512 may be 2.
  • the number of applicable transformation kernel candidates for blocks with a block area greater than or equal to 512 may be 3.
  • the number of applicable transformation kernel candidates for a block with a block area smaller than 64 may be 0.
  • the number of applicable transformation kernel candidates for a block with a block area greater than or equal to 64 and less than 256 may be 1.
  • the number of applicable transformation kernel candidates for a block with a block area greater than or equal to 256 and less than 512 may be 2.
  • the number of applicable transformation kernel candidates for a block with a block area greater than or equal to 512 may be 3.
  • the number of applicable transformation kernel candidates for a block with a block area less than 32 may be 0.
  • the number of applicable transformation kernel candidates for a block with a block area greater than or equal to 32 and less than 256 may be 1.
  • the number of applicable transformation kernel candidates for a block with a block area greater than or equal to 256 and less than 512 may be 2.
  • the number of applicable transformation kernel candidates for a block with a block area greater than or equal to 512 may be 3.
  • the number of applicable transformation kernel candidates is determined as one, two, or three depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is zero.
  • the number of applicable transformation kernel candidates may be one.
  • the number of applicable transformation kernel candidates may be two.
  • the number of applicable transformation kernel candidates may be three.
  • the number of applicable transformation kernel candidates is determined as 0, 1, or 3 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 2.
  • the number of applicable transformation kernel candidates may be 0.
  • the number of applicable transformation kernel candidates may be 1.
  • the number of applicable transformation kernel candidates may be 3.
  • the number of applicable transformation kernel candidates is determined as 0, 1, or 3 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 2.
  • the number of applicable transformation kernel candidates may be 0.
  • the number of applicable transformation kernel candidates may be 1.
  • the number of applicable transformation kernel candidates may be 3.
  • the number of applicable transformation kernel candidates is determined as 0, 1, or 3 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 2.
  • the number of applicable transformation kernel candidates may be 0.
  • the number of applicable transformation kernel candidates may be 1.
  • the number of applicable transformation kernel candidates may be 3.
  • the number of applicable transformation kernel candidates is determined as either 1 or 3 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 0 or 2.
  • the number of applicable transformation kernel candidates may be 1.
  • the number of applicable transformation kernel candidates may be 3.
  • the number of applicable transformation kernel candidates is determined as 0, 1, or 3 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 2.
  • the number of applicable transformation kernel candidates may be 0.
  • the number of applicable transformation kernel candidates may be 1.
  • the number of applicable transformation kernel candidates may be 3.
  • the number of applicable transformation kernel candidates is determined as 0, 1, or 3 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 2.
  • the number of applicable transformation kernel candidates may be 0.
  • the number of applicable transformation kernel candidates may be 1.
  • the number of applicable transformation kernel candidates may be 3.
  • the number of applicable transformation kernel candidates is determined as 0, 1, or 3 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 2.
  • the number of applicable transformation kernel candidates may be 0.
  • the number of applicable transformation kernel candidates may be 1.
  • the number of applicable transformation kernel candidates may be 3.
  • the number of applicable transformation kernel candidates is determined as either 1 or 3 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 0 or 2.
  • the number of applicable transformation kernel candidates may be 1.
  • the number of applicable transformation kernel candidates may be 3.
  • the number of applicable transformation kernel candidates is determined as 0, 1, or 2 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 3.
  • the number of applicable transformation kernel candidates may be 0.
  • the number of applicable transformation kernel candidates may be 1.
  • the number of applicable transformation kernel candidates may be 2.
  • the number of applicable transformation kernel candidates is determined as 0, 1, or 2 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 3.
  • the number of applicable transformation kernel candidates may be 0.
  • the number of applicable transformation kernel candidates may be 1.
  • the number of applicable transformation kernel candidates may be 2.
  • the number of applicable transformation kernel candidates is determined as 0, 1, or 2 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 3.
  • the number of applicable transformation kernel candidates may be 0.
  • the number of applicable transformation kernel candidates may be 1.
  • the number of applicable transformation kernel candidates may be 2.
  • the number of applicable transformation kernel candidates is determined as either 1 or 2 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 0 or 3.
  • the number of applicable transformation kernel candidates may be 1.
  • the number of applicable transformation kernel candidates may be 2.
  • the number of applicable transformation kernel candidates is determined as 0, 1, or 2 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 3.
  • the number of applicable transformation kernel candidates may be 0.
  • the number of applicable transformation kernel candidates may be 1.
  • the number of applicable transformation kernel candidates may be 2.
  • the number of applicable transformation kernel candidates is determined as 0, 1, or 2 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 3.
  • the number of applicable transformation kernel candidates may be 0.
  • the number of applicable transformation kernel candidates may be 1.
  • the number of applicable transformation kernel candidates may be 2.
  • the number of applicable transformation kernel candidates is determined as 0, 1, or 2 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 3.
  • the number of applicable transformation kernel candidates may be 0.
  • the number of applicable transformation kernel candidates may be 1.
  • the number of applicable transformation kernel candidates may be 2.
  • the number of applicable transformation kernel candidates is determined as either 1 or 2 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 0 or 3.
  • the number of applicable transformation kernel candidates may be 1.
  • the number of applicable transformation kernel candidates may be 2.
  • the number of applicable transformation kernel candidates is determined as either 0 or 3 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 1 or 2.
  • the number of applicable transformation kernel candidates may be 0. That is, a transformation kernel may not be applied to a block with a block area smaller than 256.
  • the number of applicable transformation kernel candidates may be 3.
  • the number of applicable transformation kernel candidates is determined as either 0 or 3 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 1 or 2.
  • the number of applicable transformation kernel candidates may be 0. That is, no transformation kernel may be applied to blocks with a block area smaller than 128.
  • the number of applicable transformation kernel candidates may be 3.
  • the number of applicable transformation kernel candidates is determined as either 0 or 3 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 1 or 2.
  • the number of applicable transformation kernel candidates may be 0. That is, no transformation kernel may be applied to a block with a block area smaller than 64.
  • the number of applicable transformation kernel candidates may be 3.
  • the number of applicable transformation kernel candidates is determined as either 0 or 3 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 1 or 2.
  • the number of applicable transformation kernel candidates may be 0. That is, no transformation kernel may be applied to a block with a block area smaller than 32.
  • the number of applicable transformation kernel candidates may be 3.
  • the number of applicable transformation kernel candidates for all block areas may be 0. That is, no transformation kernel may be applied to all blocks.
  • the number of applicable transformation kernel candidates for all block areas can be 1.
  • the number of applicable transformation kernel candidates for all block areas can be two.
  • the number of applicable transformation kernel candidates for all block areas can be three.
  • the number of applicable transformation kernel candidates is determined as either 2 or 3 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 0 or 1.
  • the number of applicable transformation kernel candidates may be 2.
  • the number of applicable transformation kernel candidates may be 3.
  • the number of applicable transformation kernel candidates is determined as either 2 or 3 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 0 or 1.
  • the number of applicable transformation kernel candidates may be 2.
  • the number of applicable transformation kernel candidates may be 3.
  • the number of applicable transformation kernel candidates is determined as either 2 or 3 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 0 or 1.
  • the number of applicable transformation kernel candidates may be 2.
  • the number of applicable transformation kernel candidates may be 3.
  • the number of applicable transformation kernel candidates is determined as either 2 or 3 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 0 or 1.
  • the number of applicable transformation kernel candidates may be 2.
  • the number of applicable transformation kernel candidates may be 3.
  • the number of applicable transformation kernel candidates is determined as either 0 or 1 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 2 or 3.
  • the number of applicable transformation kernel candidates may be 0.
  • the number of applicable transformation kernel candidates may be 1.
  • the number of applicable transformation kernel candidates is determined as either 0 or 1 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 2 or 3.
  • the number of applicable transformation kernel candidates may be 0.
  • the number of applicable transformation kernel candidates may be 1.
  • the number of applicable transformation kernel candidates is determined as either 0 or 1 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 2 or 3.
  • the number of applicable transformation kernel candidates may be 0.
  • the number of applicable transformation kernel candidates may be 1.
  • the number of applicable transformation kernel candidates is determined as either 0 or 1 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 2 or 3.
  • the number of applicable transformation kernel candidates may be 0.
  • the number of applicable transformation kernel candidates may be 1.
  • the number of applicable transformation kernel candidates is determined as either 0 or 2 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 1 or 3. For blocks with a block area smaller than 256, the number of applicable transformation kernel candidates may be 0. For blocks with a block area greater than or equal to 256, the number of applicable transformation kernel candidates may be 2.
  • the number of applicable transformation kernel candidates is determined as either 0 or 2 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 1 or 3. For blocks with a block area smaller than 128, the number of applicable transformation kernel candidates may be 0. For blocks with a block area greater than or equal to 128, the number of applicable transformation kernel candidates may be 2.
  • the number of applicable transformation kernel candidates is determined as either 0 or 2 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 1 or 3. For blocks with a block area smaller than 64, the number of applicable transformation kernel candidates may be 0. For blocks with a block area greater than or equal to 64, the number of applicable transformation kernel candidates may be 2.
  • the number of applicable transformation kernel candidates is determined as either 0 or 2 depending on the block area, and there may not be a case where the number of applicable transformation kernel candidates is 1 or 3. For blocks with a block area smaller than 32, the number of applicable transformation kernel candidates may be 0. For blocks with a block area greater than or equal to 32, the number of applicable transformation kernel candidates may be 2.
  • any one of the interval sequences 1 to 40 can be defined. Below, we will examine various examples of interval sequences for the six combinations.
  • the current block is an intra block and the transformation set of the current block is determined as an alternative transformation set
  • no transformation kernel is applied to the current block with a block area smaller than 256
  • the number of applicable transformation kernel candidates can be three for the current block with a block area greater than or equal to 256.
  • the number of applicable transformation kernel candidates for the current block can be three, regardless of the block area of the current block.
  • the current block is an intra block belonging to an I-Slice and the transformation set of the current block is determined as an alternative transformation set
  • no transformation kernel is applied to the current block with a block area smaller than 256
  • the number of applicable transformation kernel candidates for the current block with a block area greater than or equal to 256 may be three.
  • the number of applicable transformation kernel candidates for the current block may be three.
  • the number of transformation kernel candidates applicable to the current block may be 1, regardless of the block area of the current block. In other combinations, the number of transformation kernel candidates applicable to the current block may be 3, regardless of the block area of the current block.
  • the interval sequence applicable to the current block may be any one of the interval sequences 1 to 40 described above.
  • the combination of [A-(1)]/[B-(2)] may have a different interval sequence from other combinations.
  • the number of transformation kernel candidates applicable to the current block may be 3.
  • the interval sequence applicable to the current block may be any one of the interval sequences 1 to 40 described above.
  • the combinations of [A-(1)]/[B-(2)] and [A-(2)]/[B-(2)] may have different interval sequences from other combinations.
  • the number of transformation kernel candidates applicable to the current block may be 3.
  • the number of applicable transformation kernel candidates for the current block with a block area less than 256 may be 2, and the number of applicable transformation kernel candidates for the current block with a block area greater than or equal to 256 may be 3. In other combinations, the number of applicable transformation kernel candidates for the current block may be 3, regardless of the block area of the current block.
  • the current block is an intra block belonging to an I-Slice and the transformation set of the current block is determined as an alternative transformation set
  • no transformation kernel may be applied to a current block having a block area smaller than A
  • the number of applicable transformation kernel candidates for a current block having a block area greater than or equal to A may be 1.
  • the value of A may be an integer of 32, 64, 128, 256, 512, or a larger number. If the current block is an intra block belonging to a P/B-Slice and an alternative transformation set is used, the number of applicable transformation kernel candidates for the current block may be 3, regardless of the block area of the current block.
  • the current block is an intra block belonging to a P/B-Slice and the transformation set of the current block is determined as an alternative transformation set
  • no transformation kernel may be applied to the current block having a block area smaller than B
  • the number of applicable transformation kernel candidates may be 1 for the current block having a block area greater than or equal to B.
  • the value of B may be an integer of 32, 64, 128, 256, 512, or a larger number.
  • the number of applicable transformation kernel candidates for the current block may be determined as either 2 or 3, depending on whether the block area of the current block is less than 256. For other combinations, the number of applicable transformation kernel candidates for the current block may be 3, regardless of the block area of the current block.
  • the number of applicable transformation kernel candidates for the current block with a block area smaller than A may be 1, and the number of applicable transformation kernel candidates for the current block with a block area greater than or equal to A may be 3.
  • the value of A may be an integer of 32, 64, 128, 256, 512, or a larger number.
  • the number of applicable transformation kernel candidates for the current block with a block area less than 256 may be 2, and the number of applicable transformation kernel candidates for the current block with a block area greater than or equal to 256 may be 3.
  • the number of applicable transformation kernel candidates for the current block may be 3, regardless of the block area of the current block.
  • the number of applicable transformation kernel candidates for the current block with a block area smaller than A may be 2, and the number of applicable transformation kernel candidates for the current block with a block area greater than or equal to A may be 3.
  • the value of A may be an integer of 32, 64, 128, 256, 512, or a larger number.
  • the number of applicable transformation kernel candidates for the current block with a block area less than 256 may be 2, and the number of applicable transformation kernel candidates for the current block with a block area greater than or equal to 256 may be 3.
  • the number of applicable transformation kernel candidates for the current block may be 3.
  • HLS high-level syntax
  • a fixed configuration may mean that the configuration for a pre-defined interval sequence in the codec system does not change.
  • An HLS-based configuration may mean that the interval sequence is configured based on syntax elements signaled in a high-level syntax table of the bitstream (e.g., SPS, PPS, PH, SH).
  • the interval sequence for each of the six combinations may be configured based on either the fixed configuration or the HLS-based configuration. For example, all interval sequences for the six combinations may be based on the fixed configuration. Alternatively, all interval sequences for the six combinations may be based on the HLS-based configuration. Alternatively, some interval sequences for the six combinations may be based on the fixed configuration, and the rest may be based on the HLS-based configuration.
  • the interval sequence can be set based on syntax elements as shown in Table 28 below.
  • Table 28 assumes that the interval sequence consists of a total of 4 intervals.
  • the syntax elements can be defined as sps_alt_lfnst_nspt_set_cfg_flag[ k ] and sps_alt_lfnst_nspt_set_range[ k ].
  • k can have a value from 0 to (M-1).
  • syntax elements related to setting the interval sequence can be signaled through the SPS. However, this is only an example, and it can also be signaled through at least one of the picture parameter set (PPS), the picture header (PH), or the slice header (SH).
  • sps_alt_lfnst_nspt_set_cfg_flag[ k ] can have a value of 0 or 1. If the value of sps_alt_lfnst_nspt_set_cfg_flag[ k ] is 0, the value of e_(k) of the k-th interval can be set to a value equal to max_area_plus_1. In this case, the subsequent intervals (i.e., intervals from the (k+1)-th interval) can be empty intervals with length 0.
  • sps_alt_lfnst_nspt_set_cfg_flag[ k ] If the value of sps_alt_lfnst_nspt_set_cfg_flag[ k ] is 1, the values of e_(k) and s_(k+1) can be determined based on sps_alt_lfnst_nspt_set_range[ k ].
  • the value of sps_alt_lfnst_nspt_set_range[ k ] can be a value in a logarithmic scale with a base of 2.
  • the values of e_(k) and s_(k+1) can be set as in the following mathematical expression 16.
  • log2(x) is a function that returns the base-2 logarithm of x. It is not necessary to perform the log2 operation every time in the operation process according to mathematical expression 16.
  • the value of log2(e_(k)) can be calculated by accumulating the value of sps_alt_lfnst_nspt_set_range[ k ] from the base-2 logarithm value (i.e., log2(min_area)) for the smallest block area (i.e., min_area) to which non-separable transformation can be applied.
  • the values of the actual block area, e_(k) and s_(k+1), can be calculated by applying a left shift to the value of 1 as in mathematical expression 16.
  • e_(k) becomes equal to s_(k)
  • the k-th interval becomes an empty interval with a length of 0, and the block area belonging to the interval does not exist.
  • Table 29 shows pseudo code that derives the number of transformation kernel candidates applicable to the current block by comparing the value of the block area (area) of the current block with at least one section.
  • Table 29 shows the pseudo code for the case where the maximum number of applicable transformation kernel candidates is 3 (i.e., when L is 3), but it can be easily modified and applied according to the rules defined in Table 29 even when the maximum number of applicable transformation kernel candidates is greater than or less than 3.
  • areaBoundaryValid[ k ] and areaBoundary[ k ] in Table 29 can be derived based on the associated syntax elements as shown in Table 30 below.
  • sps_alt_lfnst_nspt_set_range[ k ] can be coded with a code having a specific fixed length of bits, such as 3 bits or 4 bits, or with a code having a variable length of bits, such as an Exponential Golomb code.
  • interval sequences for two or more combinations can also be set. For example, based on the syntax elements, interval sequences for the combinations of ([A-(1)]/[B-(2)]) and ([A-(2)]/[B-(2)]) can be set to be identical.
  • the six combinations can be divided into multiple groups.
  • the interval sequence can be set based on fixed settings, and for the other group (hereinafter referred to as the second group), the interval sequence can be set based on HLS-based settings.
  • the first group has a fixed interval sequence pre-defined in the encoding device and the decoding device, there is no need to define a syntax element for setting the interval sequence for the first group.
  • a syntax element for setting the interval sequence can be signaled for each combination.
  • the plurality of combinations belonging to the second group can have different interval sequences.
  • an interval sequence can be determined based on the signaled syntax element for the second group, and the determined interval sequence can be applied equally to the plurality of combinations belonging to the second group.
  • the plurality of combinations belonging to the second group can be divided into a plurality of subgroups.
  • a syntax element for setting the interval sequence can be signaled for each subgroup.
  • the subgroups belonging to the second group can have different interval sequences, and the combinations belonging to the same subgroup can have the same interval sequence.
  • the interval sequence can be set based on HLS-based settings for the six combinations.
  • the six combinations can be divided into multiple groups, and syntax elements related to the interval sequence setting can be signaled for each group. Different interval sequences can be set for the multiple groups. The same interval sequence can be set for one or more combinations belonging to the same group.
  • the interval sequence can be established based on fixed settings for the six combinations.
  • the six combinations can be divided into multiple groups, and a fixed interval sequence can be defined for each group. Different interval sequences can be established for the multiple groups. The same interval sequence can be established for one or more combinations within the same group.
  • a fixed interval sequence can be set for [A-(1)]/[B-(1)], [A-(2)]/[B-(1)], [A-(3)]/[B-(1)], and [A-(3)]/[B-(2)], respectively.
  • a syntax element for setting the interval sequence can be signaled for [A-(1)]/[B-(2)] and [A-(2)]/[B-(2)].
  • the interval sequence determined based on the signaled syntax element can be set identically for [A-(1)]/[B-(2)] and [A-(2)]/[B-(2)].
  • fixed interval sequences may be set for [A-(1)]/[B-(1)], [A-(2)]/[B-(1)], [A-(3)]/[B-(1)], and [A-(3)]/[B-(2)], respectively.
  • Syntax elements as shown in Table 28 may be signaled for [A-(1)]/[B-(2)] and [A-(2)]/[B-(2)], and interval sequences for the corresponding combinations may be set based on the signaled syntax elements.
  • fixed interval sequences can be set for [A-(1)]/[B-(1)], [A-(2)]/[B-(1)], and [A-(3)]/[B-(1)], respectively.
  • a syntax element for setting the interval sequence can be signaled for [A-(1)]/[B-(2)] and [A-(2)]/[B-(2)].
  • the interval sequence determined based on the signaled syntax element can be set identically for [A-(1)]/[B-(2)] and [A-(2)]/[B-(2)].
  • a separate syntax element can be defined and signaled for [A-(3)]/[B-(2)].
  • the interval sequence for [A-(3)]/[B-(2)] can be set based on the syntax element.
  • a fixed interval sequence can be set for each of the six combinations.
  • the six combinations can be divided into multiple groups.
  • the multiple groups can include a first group composed of [A-(1)]/[B-(1)] and [A-(2)]/[B-(1)], a second group composed of [A-(1)]/[B-(2)] and [A-(2)]/[B-(2)], a third group composed of [A-(3)]/[B-(1)], and a fourth group composed of [A-(3)]/[B-(2)].
  • a syntax element as shown in Table 28 can be defined and signaled, and an interval sequence for the group can be set based on the signaled syntax element.
  • the multiple groups can have different interval sequences, and the same interval sequence can be set for combinations belonging to the same group.
  • the inverse transform of the current block may be a separable linear transform and/or an LFNST-based inverse transform. That is, a reverse LFNST may be applied to all or part of the (inverse quantized) transform coefficients of the current block, and then a reverse separable linear transform may be applied to the transform coefficients derived through the LFNST to derive residual samples.
  • a reverse LFNST may be applied to the (inverse quantized) transform coefficients belonging to a certain region of the current block.
  • the certain region means a region to which the forward LFNST is applied, and is hereinafter referred to as a region of interest (ROI).
  • the transform coefficients derived through the LFNST may be arranged in the ROI region according to a predetermined scanning order.
  • the predetermined scanning order may be a row-first order or a column-first order.
  • a reverse separable linear transform may be applied to the transform coefficients derived through the LFNST and the transform coefficients belonging to the remaining area excluding the ROI area within the current block.
  • a reverse separable linear transform may be applied to the transform coefficients derived through the LFNST.
  • the size of the ROI area may be determined based on at least one of the width or the height of the current block.
  • the size of the ROI area may mean at least one of the width or the height of the ROI area, or may mean the number of sample positions belonging to the ROI area.
  • the current block can be restored based on the residual sample of the current block (S420).
  • the current block can be restored based on the predicted block and residual block of the current block.
  • a prediction block for the current block can be derived based on at least one of inter-prediction and intra-prediction.
  • the current block can be divided into multiple partitions, and a prediction block for the current block can be generated based on the prediction for each partition.
  • a current block can be divided into multiple partitions based on one or more dividing lines.
  • the dividing lines can include at least one of a vertical line and a horizontal line.
  • the current block can be divided into two partitions by a predetermined dividing line.
  • the dividing line for the geometric partitioning can be defined based on a predetermined dividing direction (or dividing angle) and a distance from the center of the current block.
  • the current block can be a coding block that is no longer divided through tree-based block partitioning.
  • the prediction block of the current block can be generated as a weighted sum of the first prediction block for the first partition and the second prediction block for the second partition.
  • the first and second prediction blocks can be generated based on intra prediction.
  • the first and second prediction blocks can be generated based on inter prediction.
  • either the first prediction block or the second prediction block can be generated based on intra prediction, and the other can be generated based on inter prediction.
  • a prediction block for each partition can be generated based on inter prediction, and a prediction block of the current block can be generated based on a weighted sum of the generated prediction blocks.
  • a prediction block for each partition can be generated based on intra prediction, and the prediction block for the current block can be generated based on a weighted sum of the generated prediction blocks.
  • This is hereinafter referred to as the Spatial Geometric Partitioning Mode (SGPM).
  • SGPM Spatial Geometric Partitioning Mode
  • the partition type of the current block can be determined based on a partition type index that specifies the partitioning direction and position of the partition line.
  • the partition type index can indicate any one of the predefined partition type candidates.
  • the intra prediction mode of each partition within the current block can be derived based on a mode index that indicates any one of the multiple intra prediction mode candidates.
  • the mode index can be defined for each partition within the current block.
  • the above partition type index and the mode index for each partition can be signaled via the bitstream.
  • the partition type index can be represented as partition_mode_idx
  • the mode index for each partition can be represented as intra_pred_mode0_idx and intra_pred_mode1_idx, respectively.
  • the partition type index and the mode index for the first partition can be signaled via the bitstream
  • the mode index for the second partition can be derived based on the mode index for the first partition.
  • At least one of the above partition type indexes or mode indexes can be signaled based on a flag (cu_sgpm_flag) indicating whether SGPM is applied to the current block. For example, when cu_sgpm_flag is 1, the partition type index and the mode index can be signaled, and when cu_sgpm_flag is 0, the partition type index and the mode index can not be signaled.
  • a candidate list for SGPM may be constructed.
  • the candidate list may include a plurality of candidates, each of which may include one partition type index and two mode indices.
  • the plurality of candidates in the candidate list may be derived from combinations of predefined partition type candidates (e.g., 26 partition type candidates) and predetermined intra prediction mode candidates (e.g., 3 intra prediction mode candidates).
  • the maximum number of candidates that can be included in the candidate list may be 16.
  • a partition type index for the current block and a mode index for each partition may be derived.
  • a candidate index indicating any one of the plurality of candidates may be signaled through a bitstream.
  • the above candidate list may be reordered based on a predetermined template region. For example, a SAD between a predicted sample and a reconstructed sample in the template region may be calculated. The SAD may be calculated for each of a plurality of candidates in the candidate list. The plurality of candidates in the candidate list may be reordered in ascending order of the SAD.
  • the template region may include at least one of a top peripheral region or a left peripheral region adjacent to the current block. The height of the top peripheral region and the width of the left peripheral region may be fixed to a predetermined length (e.g., 1).
  • the above intra prediction mode candidates may be configured in an IPM list.
  • An IPM list may be configured for each partition within the current block. At least one of the intra prediction mode candidates in the IPM list of the first partition may be different from the intra prediction mode candidates in the IPM list of the second partition.
  • a single IPM list may be configured for the current block, and partitions within the current block may share the single IPM list.
  • the IPM list may include three or more intra prediction mode candidates.
  • the SGPM can be applied when the size of the current block satisfies a certain condition.
  • the condition may include at least one of the following conditions 1 to 5.
  • “width” and “height” may represent the width and height of the current block, respectively.
  • a flag may be defined indicating whether blending between the prediction block of the first partition and the prediction block of the second partition for the current block is allowed.
  • adaptive blending may be used in the SGPM.
  • the blending depth for the adaptive blending may be derived based on the size of the current block. For example, if the minimum of the width and height of the current block is 4, the blending depth may be derived as 1/2 ⁇ . If the minimum of the width and height of the current block is 8, the blending depth may be derived as ⁇ . If the minimum of the width and height of the current block is 16, the blending depth may be derived as 2 ⁇ . If the minimum of the width and height of the current block is 32, the blending depth may be derived as 4 ⁇ . If the minimum of the width and height of the current block is greater than 32, the blending depth may be derived as 8 ⁇ .
  • may be any integer greater than 0.
  • the blending depth can be derived as a default value (e.g., 1/4 ⁇ ). This means that blending is not used when the dividing lines of the geometric segmentation correspond to vertical or horizontal lines, and the width of the region to which blending is applied becomes relatively narrower when the dividing lines of the geometric segmentation do not correspond to vertical or horizontal lines (i.e., when the dividing lines have different dividing directions).
  • FIG. 8 illustrates a schematic configuration of a decoding device (300) that performs an image decoding method according to the present disclosure.
  • a decoding device (300) may include a transform coefficient derivation unit (800), a residual sample derivation unit (810), and a restoration block generation unit (820).
  • the transform coefficient derivation unit (800) may be configured in the entropy decoding unit (310) of FIG. 3
  • the residual sample derivation unit (810) may be configured in the residual processing unit (320) of FIG. 3
  • the restoration block generation unit (820) may be configured in the adding unit (340) of FIG. 3.
  • the transform coefficient derivation unit (800) can obtain residual information of the current block from the bitstream and decode it to derive the transform coefficient of the current block.
  • the residual sample derivation unit (810) can derive a residual sample of the current block by performing at least one of inverse quantization or inverse transformation on the transform coefficient of the current block.
  • the residual sample derivation unit (810) can determine a transformation kernel for the inverse transformation of the current block through a predetermined transformation kernel determination method, and derive the residual sample of the current block based on this. This has been described with reference to FIG. 4, and a detailed description thereof will be omitted here.
  • the restoration block generation unit (820) can restore the current block based on the residual sample of the current block.
  • FIG. 9 illustrates an image encoding method performed by an encoding device (200) as an embodiment according to the present disclosure.
  • the residual samples of the current block can be derived by differentiating prediction samples from the original samples of the current block.
  • the prediction samples may be derived based on inter-prediction or intra-prediction.
  • the current block can be divided into multiple partitions, and a prediction block of the current block can be generated based on the prediction for each partition.
  • the prediction block of the current block can be generated as a weighted sum of a first prediction block for the first partition and a second prediction block for the second partition.
  • each of the first and second prediction blocks can be generated based on intra prediction or inter prediction.
  • the partition type of the current block and the intra prediction mode of each partition can be determined.
  • a partition type index for indicating the determined partition type can be encoded in a bitstream.
  • a mode index indicating the determined intra prediction mode among a plurality of intra prediction mode candidates can be encoded in the bitstream.
  • the mode index can be encoded for each partition.
  • the mode index for the second partition can be encoded based on the mode index for the first partition.
  • At least one of the partition type index or the mode index can be encoded based on a flag (cu_sgpm_flag) indicating whether SGPM is applied to the current block.
  • a candidate list for the SGPM of the current block may be constructed.
  • Each candidate in the candidate list may include one partition type index and two mode indices.
  • a partition type index for the current block and a mode index for each partition may be derived.
  • a candidate index indicating any one of the multiple candidates may be encoded in the bitstream.
  • the candidate list may be reordered based on a predetermined template region.
  • the intra prediction mode candidates can be organized into an intra prediction mode (IPM) list.
  • IPM intra prediction mode
  • SGPM can also be applied when the current block size satisfies certain conditions.
  • blending depth may be derived based on the size of the current block.
  • the blending depth may be derived as a default value (e.g., 1/4 ⁇ ). Based on the determination, a flag indicating whether blending between the prediction blocks of the first and second partitions is allowed may be encoded in the bitstream.
  • transform coefficients of the current block can be derived by performing at least one of transformation or quantization on the residual sample of the current block (S910).
  • the transformation method according to the present disclosure can be understood as the reverse process of the inverse transformation described with reference to FIG. 4.
  • the method for determining the transformation kernel for the above transformation is as described with reference to FIG. 4. A detailed description thereof will be omitted here.
  • one or more transformation sets for transformation of the current block can be defined/configured, and each transformation set can include one or more transformation kernel candidates.
  • any one of the plurality of transformation sets can be selected as the transformation set of the current block.
  • Any one of the plurality of transformation kernel candidates belonging to the transformation set of the current block can be selected. The selection can be performed implicitly based on the context of the current block.
  • an optimal transformation set and/or transformation kernel candidate for the current block can be selected, and an index indicating this can be signaled.
  • the transform kernel of the current block may be determined based on an MTS set.
  • One of a plurality of MTS sets may be selected based on at least one of the size of the current block or the intra prediction mode.
  • the selected MTS set may include one or more transform kernel candidates.
  • One of the one or more transform kernel candidates may be selected, and the transform kernel of the current block may be determined based on the selected transform kernel candidate.
  • the selection of the transform kernel candidate may be performed using a transform kernel candidate index derived based on the context of the current block.
  • an optimal transform kernel candidate for the current block may be selected, and a transform kernel candidate index indicating the selected transform kernel candidate may be signaled.
  • the transform kernel of the current block may be determined based on a non-separable linear transform (NSPT) kernel.
  • NSPT non-separable linear transform
  • the forward NSPT may be applied to the current block, and if the size of the current block belongs to the second group, the forward NSPT may not be applied to the current block.
  • the forward separable linear transform e.g., DCT-2
  • the forward LFNST may additionally be applied to all or part of the transform coefficients derived through the separable linear transform.
  • the NSPT can be applied based on at least one of the tree type or component type of the current block.
  • the NSPT kernel (or NSPT matrix) for the NSPT can be determined by utilizing the symmetry between intra prediction modes or the symmetry between block shapes.
  • the NSPT kernel can be expressed as r x MN.
  • r means the output length of the NSPT or the number of transform coefficients generated by the NSPT
  • MN is the product of the width and height of the current block, and can mean the input length of the NSPT or the number of residual samples to which the NSPT is applied.
  • a method for determining the size of the NSPT kernel has been described with reference to FIG. 4.
  • the LFNST index and/or NSPT index for transformation may be encoded as a single integrated syntax, or the LFNST index and NSPT index may be encoded separately and inserted into the bitstream. Binarization of the LFNST index and NSPT index, and assignment of CABAC context and initial value are as described with reference to FIG. 4.
  • a non-separable transformation can be applied to the current block encoded with inter prediction (or intra prediction), as discussed with reference to Fig. 4.
  • a bitstream can be generated by encoding the transform coefficients of the current block (S920).
  • residual information about the transform coefficient can be generated, and a bitstream can be generated by encoding the residual information.
  • FIG. 10 illustrates a schematic configuration of an encoding device (200) that performs an image encoding method according to the present disclosure.
  • an encoding device (200) may include a residual sample derivation unit (1000), a transform coefficient derivation unit (1010), and a transform coefficient encoding unit (1020).
  • the residual sample derivation unit (1000) and the transform coefficient derivation unit (1010) may be configured in the residual processing unit (230) of FIG. 2, and the transform coefficient encoding unit (1020) may be configured in the entropy encoding unit (240) of FIG. 2.
  • the residual sample derivation unit (1000) can derive a residual sample of the current block by differentiating a predicted sample from an original sample of the current block.
  • the predicted sample may be derived based on a predetermined intra prediction mode.
  • the transform coefficient derivation unit (1010) can derive the transform coefficient of the current block by performing at least one of transform and quantization on the residual sample of the current block.
  • the transform coefficient derivation unit (1010) can determine the transform kernel of the current block based on at least one of the above-described embodiments 1 to 4, and derive the transform coefficient by applying the transform kernel to the residual sample of the current block.
  • the transform coefficient encoding unit (1020) can generate a bitstream by encoding the transform coefficient of the current block.
  • the methods are described based on a flowchart as a series of steps or blocks. However, the embodiments are not limited to the order of the steps, and some steps may occur in a different order or simultaneously with other steps described above. Furthermore, those skilled in the art will understand that the steps depicted 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 the embodiments of this document.
  • the method according to the embodiments of 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 a device that performs image processing, such as a TV, a computer, a smartphone, a set-top box, a display device, etc.
  • the above-described method can be implemented as a module (process, function, etc.) that performs the above-described function.
  • the module can be stored in memory and executed by a processor.
  • the memory can be internal or external to the processor and can be connected to the processor by various well-known means.
  • the processor can include an application-specific integrated circuit (ASIC), another chipset, logic circuit, and/or data processing device.
  • the memory can include a read-only memory (ROM), a random access memory (RAM), flash memory, a memory card, a storage medium, and/or other storage devices. That is, the embodiments described in this document can be implemented and performed on a processor, a microprocessor, a controller, or a chip.
  • each drawing can be implemented and performed on a computer, a processor, a microprocessor, a controller, or a chip.
  • information for implementation e.g., information on instructions
  • an algorithm can be stored on a digital storage medium.
  • the decoding device and encoding device to which the embodiment(s) of the present specification are applied may be included in a multimedia broadcasting transmitting and receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video conversation device, a real-time communication device such as a video communication, a mobile streaming device, a storage medium, a camcorder, a video-on-demand (VoD) service providing device, an OTT (Over the top video) device, an Internet streaming service providing device, a three-dimensional (3D) video device, a VR (virtual reality) device, an AR (argumente reality) device, a video phone video device, a transportation terminal (ex.
  • a multimedia broadcasting transmitting and receiving device a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video conversation device, a real-time communication device such as a video communication, a mobile streaming device, a storage medium, a camcorder,
  • the OTT (Over the top video) device may include a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smartphone, a tablet PC, a DVR (Digital Video Recorder), etc.
  • the processing method to which the embodiment(s) of the present specification are applied can be produced in the form of a computer-executable program and can be stored in a computer-readable recording medium.
  • Multimedia data having a data structure according to the embodiment(s) of the present specification can also be stored in a computer-readable recording medium.
  • the computer-readable recording medium includes all types of storage devices and distributed storage devices in which computer-readable data is stored.
  • the computer-readable recording medium can include, for example, a Blu-ray disc (BD), a universal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.
  • the computer-readable recording medium includes a medium implemented in the form of a carrier wave (e.g., transmission via the Internet).
  • a bitstream generated by an encoding method can be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.
  • embodiments of the present disclosure may be implemented as a computer program product by program code, and the program code may be executed on a computer by the embodiments of the present disclosure.
  • the program code may be stored on a computer-readable carrier.
  • FIG. 11 illustrates an example of a content streaming system to which embodiments of the present disclosure can be applied.
  • a content streaming system to which the embodiment(s) of the present specification are applied may largely include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
  • the encoding server compresses content input from multimedia input devices such as smartphones, cameras, and camcorders into digital data, generates a bitstream, and transmits it to the streaming server.
  • multimedia input devices such as smartphones, cameras, and camcorders directly generate bitstreams
  • the encoding server may be omitted.
  • the above bitstream can be generated by an encoding method or a bitstream generation method to which the embodiment(s) of the present specification are applied, and the streaming server can temporarily store the bitstream during the process of transmitting or receiving the bitstream.
  • 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.
  • the web server transmits the request to the streaming server, and the streaming server transmits the multimedia data to the user.
  • the content streaming system may include a separate control server, in which case the control server controls commands/responses between each device within the content streaming system.
  • the streaming server can receive content from a media repository and/or an encoding server. For example, when receiving content from the encoding server, the content can be received in real time. In this case, to provide a smooth streaming service, the streaming server can store the bitstream for a certain period of time.
  • Examples of the user devices may include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation devices, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, HMDs), digital TVs, desktop computers, digital signage, etc.
  • PDAs personal digital assistants
  • PMPs portable multimedia players
  • navigation devices slate PCs
  • tablet PCs tablet PCs
  • ultrabooks ultrabooks
  • wearable devices e.g., smartwatches, smart glasses, HMDs
  • digital TVs desktop computers, digital signage, etc.
  • Each server within the above content streaming system can be operated as a distributed server, in which case data received from each server can be processed in a distributed manner.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

본 개시에 따른 영상 디코딩 방법 및 장치는, 비트스트림으로부터 현재 블록의 변환 계수들을 유도하고, 현재 블록의 변환 계수들에 대한 역변환을 기반으로 현재 블록의 레지듀얼 샘플들을 유도하고, 현재 블록의 레지듀얼 샘플들을 기반으로 현재 블록을 복원할 수 있다. 여기서, 현재 블록에 대한 복수의 인트라 예측 모드들에 대응하는 복수의 변환 세트들이 각각 유도될 수 있다. 복수의 변환 세트들은 기본 변환 세트와 대체 변환 세트를 포함할 수 있다. 레지듀얼 샘플들은 복수의 변환 세트들 중 어느 하나에 속한 변환 커널 후보를 기반으로 유도될 수 있다.

Description

영상 인코딩/디코딩 방법 및 장치, 그리고 비트스트림을 저장한 기록 매체
본 발명은 영상 인코딩/디코딩 방법 및 장치, 그리고 비트스트림을 저장한 기록 매체에 관한 것이다.
최근 HD(High Definition) 영상 및 UHD(Ultra High Definition) 영상과 같은 고해상도, 고품질의 영상에 대한 수요가 다양한 응용 분야에서 증가하고 있고, 이에 따라 고효율의 영상 압축 기술들이 논의되고 있다.
영상 압축 기술로 현재 픽쳐의 이전 또는 이후 픽쳐로부터 현재 픽쳐에 포함된 화소값을 예측하는 인터 예측 기술, 현재 픽쳐 내의 화소 정보를 이용하여 현재 픽쳐에 포함된 화소값을 예측하는 인트라 예측 기술, 출현 빈도가 높은 값에 짧은 부호를 할당하고 출현 빈도가 낮은 값에 긴 부호를 할당하는 엔트로피 부호화 기술 등 다양한 기술이 존재하고 이러한 영상 압축 기술을 이용해 영상 데이터를 효과적으로 압축하여 전송 또는 저장할 수 있다.
본 개시는, 비분리 변환을 이용하여 변환을 수행하는 방법 및 장치를 제공하고자 한다.
본 개시는, 축소된 차원의 비분리 변환 커널을 이용하여 변환을 수행하는 방법 및 장치를 제공하고자 한다.
본 개시는, 부호화 파라미터를 기반으로 비분리 변환 커널을 결정/시그날링하는 방법 및 장치를 제공하고자 한다.
본 개시는, 다중 인트라 예측 모드를 기반으로 비분리 또는 분리 변환을 위한 변환 세트를 결정하는 방법 및 장치를 제공하고자 한다.
본 개시에 따른 영상 디코딩 방법 및 장치는, 비트스트림으로부터 현재 블록의 변환 계수들을 유도하고, 상기 현재 블록의 변환 계수들에 대한 역변환을 기반으로 상기 현재 블록의 레지듀얼 샘플들을 유도하고, 상기 현재 블록의 레지듀얼 샘플들을 기반으로 상기 현재 블록을 복원할 수 있다. 여기서, 상기 현재 블록에 대한 복수의 인트라 예측 모드들에 대응하는 복수의 변환 세트들이 각각 유도될 수 있다. 상기 복수의 변환 세트들은 기본 변환 세트와 대체 변환 세트를 포함할 수 있다. 상기 레지듀얼 샘플들은 상기 복수의 변환 세트들 중 어느 하나에 속한 변환 커널 후보를 기반으로 유도될 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 기본 변환 세트는, 상기 현재 블록의 인트라 예측을 위한 참조 샘플을 특정하는 인트라 예측 모드를 기반으로 선택될 수 있고, 상기 대체 변환 세트는, 상기 현재 블록의 예측 블록 또는 주변 샘플들을 기반으로 유도된 DIPM(Derived Intra Prediction Mode)를 기반으로 선택될 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 기본 변환 세트는, DIMD(Decoder-side Intra Mode Derivation) 방법을 통해 유도된 DIMD 모드들 중 누적된 세기 값이 가장 큰 모드를 기반으로 선택될 수 있고, 상기 대체 변환 세트는, 상기 DIMD 모드들 중 누적된 세기 값이 두 번째로 큰 모드를 기반으로 선택될 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 변환 세트에 속한 복수의 변환 커널 후보들 중 상기 현재 블록에 적용 가능한 변환 커널 후보의 개수는, 상기 현재 블록의 크기, 상기 현재 블록에 관한 슬라이스 타입, 상기 현재 블록의 예측 모드, 또는 상기 현재 블록의 변환 세트가 대체 변환 세트인지 여부 중 적어도 하나에 기초하여 결정될 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 현재 블록의 너비와 높이의 곱이 제1 값보다 작은 경우, 상기 현재 블록에 적용 가능한 변환 커널 후보의 개수는 0개 또는 1개일 수 있다. 상기 현재 블록의 너비와 높이의 곱이 상기 제1 값보다 크거나 같은 경우, 상기 현재 블록에 적용 가능한 변환 커널 후보의 개수는 2개 또는 3개일 수 있다. 여기서, 상기 제1 값은 256 또는 512일 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 현재 블록의 너비와 높이의 곱이 제1 값보다 작은 경우, 상기 현재 블록에 적용 가능한 변환 커널 후보의 개수는 0개 또는 2개일 수 있다. 상기 현재 블록의 너비와 높이의 곱이 상기 제1 값보다 크거나 같은 경우, 상기 현재 블록에 적용 가능한 변환 커널 후보의 개수는 1개 또는 3개일 수 있다. 여기서, 상기 제1 값은 32, 64, 또는 128일 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 현재 블록이 인트라 블록이고 상기 현재 블록의 변환 세트가 대체 변환 세트로 결정되는 경우, 상기 현재 블록의 너비와 높이의 곱이 제1 값보다 작은 것에 기초하여 상기 현재 블록에 적용 가능한 변환 커널 후보의 개수는 0개일 수 있고, 상기 현재 블록의 너비와 높이의 곱이 상기 제1 값보다 크거나 같은 것에 기초하여 상기 현재 블록에 적용 가능한 변환 커널 후보의 개수는 1개 또는 3개일 수 있다. 여기서, 상기 제1 값은 32, 64, 128, 256, 또는 512일 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 현재 블록이 인터 블록인 경우, 상기 현재 블록의 너비와 높이의 곱이 제1 값보다 작은 것에 기초하여 상기 현재 블록에 적용 가능한 변환 커널 후보의 개수는 1개 또는 2개일 수 있고, 상기 현재 블록의 너비와 높이의 곱이 상기 제1 값보다 크거나 같은 것에 기초하여 상기 현재 블록에 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다. 여기서, 상기 제1 값은 32, 64, 128, 256, 또는 512일 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 제1 값은 구간 설정에 관한 신택스 요소를 기반으로 결정될 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 제1 값은 기-정의된 고정된 값일 수 있다.
본 개시에 따른 영상 인코딩 방법 및 장치는, 현재 블록의 레지듀얼 샘플들을 유도하고, 상기 현재 블록의 레지듀얼 샘플들에 대한 변환을 기반으로 상기 현재 블록의 변환 계수들을 유도하고, 상기 현재 블록의 변환 계수들을 부호화할 수 있다. 여기서, 상기 현재 블록에 대한 복수의 인트라 예측 모드들에 대응하는 복수의 변환 세트들이 각각 유도될 수 있다. 상기 복수의 변환 세트들은 기본 변환 세트와 대체 변환 세트를 포함할 수 있다. 상기 변환 계수들은 상기 복수의 변환 세트들 중 어느 하나에 속한 변환 커널 후보를 기반으로 유도될 수 있다.
본 개시에 따른 디코딩 장치에 의하여 영상 디코딩 방법을 수행하도록 야기하는 인코딩된 비디오/영상 정보가 저장된 컴퓨터 판독 가능한 디지털 저장 매체가 제공된다.
본 개시에 따른 영상 인코딩 방법에 따라 생성된 비디오/영상 정보가 저장된 컴퓨터 판독 가능한 디지털 저장 매체가 제공된다.
본 개시에 따른 영상 인코딩 방법에 따라 생성된 비디오/영상 정보를 전송하는 방법 및 장치가 제공된다.
본 개시는, 비분리 변환을 이용함으로써, 변환의 성능을 향상시킬 수 있다.
본 개시는, 축소된 차원의 비분리 변환 커널을 이용하여 변환을 수행함으로써, 변환의 성능을 향상시킬 수 있다.
본 개시는, 부호화 파라미터를 기반으로 비분리 변환 커널을 효과적으로 결정 및/또는 시그날링함으로써, 부호화 효율을 향상시킬 수 있다.
본 개시에 따르면, 실질적으로 중복되지 않는 변환 세트 후보를 구성함으로써, 변환 성능을 향상시킬 수 있을 뿐만 아니라 변환 세트 인덱스를 효율적으로 시그날링할 수도 있다.
도 1은 본 개시에 따른 비디오/영상 코딩 시스템을 도시한 것이다.
도 2는 본 개시의 실시예가 적용될 수 있고, 비디오/영상 신호의 인코딩이 수행되는 인코딩 장치의 개략적인 블록도를 나타낸다.
도 3은 본 개시의 실시예가 적용될 수 있고, 비디오/영상 신호의 디코딩이 수행되는 디코딩 장치의 개략적인 블록도를 나타낸다.
도 4는 본 개시에 따른 일실시예로서, 디코딩 장치(300)에 의해 수행되는 영상 디코딩 방법을 도시한 것이다.
도 5는 본 개시에 따른 인트라 예측 모드와 그 예측 방향을 예시적으로 나타낸다.
도 6은 본 개시에 따른 DIMD 모드를 유도하는 방법의 흐름도를 나타낸 것이다.
도 7은 본 개시에 따른 DIMD 모드를 유도하기 위한 필터를 나타낸 것이다.
도 8은 본 개시에 따른 영상 디코딩 방법을 수행하는 디코딩 장치 (300)의 개략적인 구성을 도시한 것이다.
도 9는 본 개시에 따른 일실시예로서, 인코딩 장치(200)에 의해 수행되는 영상 인코딩 방법을 도시한 것이다.
도 10은 본 개시에 따른 영상 인코딩 방법을 수행하는 인코딩 장치(200)의 개략적인 구성을 도시한 것이다.
도 11은 본 개시의 실시예들이 적용될 수 있는 컨텐츠 스트리밍 시스템의 예를 나타낸다.
본 개시는 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세하게 설명하고자 한다. 그러나, 이는 본 개시를 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 개시의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.
제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 개시의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.
어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어"있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어"있다거나 "직접 접속되어"있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.
본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 개시를 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.
본 개시는 비디오/영상 코딩에 관한 것이다. 예를 들어, 본 명세서에서 개시된 방법/실시예는 VVC (versatile video coding) 표준에 개시되는 방법에 적용될 수 있다. 또한, 이 명세서에서 개시된 방법/실시예는 EVC (essential video coding) 표준, AV1 (AOMedia Video 1) 표준, AVS2 (2nd generation of audio video coding standard) 또는 차세대 비디오/영상 코딩 표준(ex. H.267 or H.268 등)에 개시되는 방법에 적용될 수 있다.
이 명세서는 비디오/영상 코딩에 관한 다양한 실시예들을 제시하며, 다른 언급이 없는 한 상기 실시예들은 서로 조합되어 수행될 수도 있다.
이 명세서에서 비디오(video)는 시간의 흐름에 따른 일련의 영상(image)들의 집합을 의미할 수 있다. 픽쳐(picture)는 일반적으로 특정 시간대의 하나의 영상을 나타내는 단위를 의미하며, 슬라이스(slice)/타일(tile)은 코딩에 있어서 픽쳐의 일부를 구성하는 단위이다. 슬라이스/타일은 하나 이상의 CTU(coding tree unit)을 포함할 수 있다. 하나의 픽쳐는 하나 이상의 슬라이스/타일로 구성될 수 있다. 하나의 타일은 하나의 픽쳐의 특정 타일 열과 특정 타일 행 내에 있는 복수의 CTU들로 구성된 직사각형 영역이다. 타일 열은 픽쳐의 높이와 동일한 높이와 픽쳐 파라미터 세트의 신택스 요구에 의해 지정된 너비를 갖는 CTU들의 직사각형 영역이다. 타일 행은 픽쳐 파라미터 세트에 의해 지정된 높이와 픽쳐의 너비와 동일한 너비를 갖는 CTU들의 직사각형 영역이다. 하나의 타일 내에 CTU들은 CTU 래스터 스캔에 따라 연속적으로 배열되는 반면, 하나의 픽쳐 내 타일들은 타일의 래스터 스캔에 따라 연속적으로 배열될 수 있다. 하나의 슬라이스는 단일 NAL 유닛에 배타적으로 포함될 수 있는 픽쳐의 타일 내에서 정수 개수의 완전한 타일 또는 정수 개수의 연속적인 완전한 CTU 행을 포함할 수 있다. 한편, 하나의 픽쳐는 둘 이상의 서브픽쳐로 구분될 수 있다. 서브픽쳐는 픽쳐 내 하나 이상의 슬라이스들의 직사각형 영역일 수 있다.
화소, 픽셀(pixel) 또는 펠(pel)은 하나의 픽쳐(또는 영상)을 구성하는 최소의 단위를 의미할 수 있다. 또한, 픽셀에 대응하는 용어로서 '샘플(sample)'이 사용될 수 있다. 샘플은 일반적으로 픽셀 또는 픽셀의 값을 나타낼 수 있으며, 루마(luma) 성분의 픽셀/픽셀값만을 나타낼 수도 있고, 크로마(chroma) 성분의 픽셀/픽셀 값만을 나타낼 수도 있다.
유닛(unit)은 영상 처리의 기본 단위를 나타낼 수 있다. 유닛은 픽쳐의 특정 영역 및 해당 영역에 관련된 정보 중 적어도 하나를 포함할 수 있다. 하나의 유닛은 하나의 루마 블록 및 두개의 크로마(ex. cb, cr) 블록을 포함할 수 있다. 유닛은 경우에 따라서 블록(block) 또는 영역(area) 등의 용어와 혼용하여 사용될 수 있다. 일반적인 경우, MxN 블록은 M개의 열과 N개의 행으로 이루어진 샘플들(또는 샘플 어레이) 또는 변환 계수(transform coefficient)들의 집합(또는 어레이)을 포함할 수 있다.
본 명세서에서 "A 또는 B(A or B)"는 "오직 A", "오직 B" 또는 "A와 B 모두"를 의미할 수 있다. 달리 표현하면, 본 명세서에서 "A 또는 B(A or B)"는 "A 및/또는 B(A and/or B)"으로 해석될 수 있다. 예를 들어, 본 명세서에서 "A, B 또는 C(A, B or C)"는 "오직 A", "오직 B", "오직 C", 또는 "A, B 및 C의 임의의 모든 조합(any combination of A, B and C)"를 의미할 수 있다.
본 명세서에서 사용되는 슬래쉬(/)나 쉼표(comma)는 "및/또는(and/or)"을 의미할 수 있다. 예를 들어, "A/B"는 "A 및/또는 B"를 의미할 수 있다. 이에 따라 "A/B"는 "오직 A", "오직 B", 또는 "A와 B 모두"를 의미할 수 있다. 예를 들어, "A, B, C"는 "A, B 또는 C"를 의미할 수 있다.
본 명세서에서 "적어도 하나의 A 및 B(at least one of A and B)"는, "오직 A", "오직 B" 또는 "A와 B 모두"를 의미할 수 있다. 또한, 본 명세서에서 "적어도 하나의 A 또는 B(at least one of A or B)"나 "적어도 하나의 A 및/또는 B(at least one of A and/or B)"라는 표현은 "적어도 하나의 A 및 B(at least one of A and B)"와 동일하게 해석될 수 있다.
또한, 본 명세서에서 "적어도 하나의 A, B 및 C(at least one of A, B and C)"는, "오직 A", "오직 B", "오직 C", 또는 "A, B 및 C의 임의의 모든 조합(any combination of A, B and C)"를 의미할 수 있다. 또한, "적어도 하나의 A, B 또는 C(at least one of A, B or C)"나 "적어도 하나의 A, B 및/또는 C(at least one of A, B and/or C)"는 "적어도 하나의 A, B 및 C(at least one of A, B and C)"를 의미할 수 있다.
또한, 본 명세서에서 사용되는 괄호는 "예를 들어(for example)"를 의미할 수 있다. 구체적으로, "예측(인트라 예측)"로 표시된 경우, "예측"의 일례로 "인트라 예측"이 제안된 것일 수 있다. 달리 표현하면 본 명세서의 "예측"은 "인트라 예측"으로 제한(limit)되지 않고, "인트라 예측"이 "예측"의 일례로 제안될 것일 수 있다. 또한, "예측(즉, 인트라 예측)"으로 표시된 경우에도, "예측"의 일례로 "인트라 예측"이 제안된 것일 수 있다.
본 명세서에서 하나의 도면 내에서 개별적으로 설명되는 기술적 특징은, 개별적으로 구현될 수도 있고, 동시에 구현될 수도 있다.
도 1은 본 개시에 따른 비디오/영상 코딩 시스템을 도시한 것이다.
도 1을 참조하면, 비디오/영상 코딩 시스템은 제1 장치(소스 디바이스) 및 제2 장치(수신 디바이스)를 포함할 수 있다.
소스 디바이스는 인코딩된 비디오(video)/영상(image) 정보 또는 데이터를 파일 또는 스트리밍 형태로 디지털 저장매체 또는 네트워크를 통하여 수신 디바이스로 전달할 수 있다. 상기 소스 디바이스는 비디오 소스, 인코딩 장치, 전송부를 포함할 수 있다. 상기 수신 디바이스는 수신부, 디코딩 장치 및 렌더러를 포함할 수 있다. 상기 인코딩 장치는 비디오/영상 인코딩 장치라고 불릴 수 있고, 상기 디코딩 장치는 비디오/영상 디코딩 장치라고 불릴 수 있다. 송신기는 인코딩 장치에 포함될 수 있다. 수신기는 디코딩 장치에 포함될 수 있다. 렌더러는 디스플레이부를 포함할 수도 있고, 디스플레이부는 별개의 디바이스 또는 외부 컴포넌트로 구성될 수도 있다.
비디오 소스는 비디오/영상의 캡쳐, 합성 또는 생성 과정 등을 통하여 비디오/영상을 획득할 수 있다. 비디오 소스는 비디오/영상 캡쳐 디바이스 및/또는 비디오/영상 생성 디바이스를 포함할 수 있다. 비디오/영상 캡쳐 디바이스는 하나 이상의 카메라, 이전에 캡쳐된 비디오/영상을 포함하는 비디오/영상 아카이브 등을 포함할 수 있다. 비디오/영상 생성 디바이스는 컴퓨터, 타블렛 및 스마트폰 등을 포함할 수 있으며 (전자적으로) 비디오/영상을 생성할 수 있다. 예를 들어, 컴퓨터 등을 통하여 가상의 비디오/영상이 생성될 수 있으며, 이 경우 관련 데이터가 생성되는 과정으로 비디오/영상 캡쳐 과정이 갈음될 수 있다.
인코딩 장치는 입력 비디오/영상을 인코딩할 수 있다. 인코딩 장치는 압축 및 코딩 효율을 위하여 예측, 변환, 양자화 등 일련의 절차를 수행할 수 있다. 인코딩된 데이터(인코딩된 비디오/영상 정보)는 비트스트림(bitstream) 형태로 출력될 수 있다.
전송부는 비트스트림 형태로 출력된 인코딩된 비디오/영상 정보 또는 데이터를 파일 또는 스트리밍 형태로 디지털 저장매체 또는 네트워크를 통하여 수신 디바이스의 수신부로 전달할 수 있다. 디지털 저장 매체는 USB, SD, CD, DVD, 블루레이, HDD, SSD 등 다양한 저장 매체를 포함할 수 있다. 전송부는 미리 정해진 파일 포멧을 통하여 미디어 파일을 생성하기 위한 엘리먼트를 포함할 수 있고, 방송/통신 네트워크를 통한 전송을 위한 엘리먼트를 포함할 수 있다. 수신부는 상기 비트스트림을 수신/추출하여 디코딩 장치로 전달할 수 있다.
디코딩 장치는 인코딩 장치의 동작에 대응하는 역양자화, 역변환, 예측 등 일련의 절차를 수행하여 비디오/영상을 디코딩할 수 있다.
렌더러는 디코딩된 비디오/영상을 렌더링할 수 있다. 렌더링된 비디오/영상은 디스플레이부를 통하여 디스플레이될 수 있다.
도 2는 본 개시의 실시예가 적용될 수 있고, 비디오/영상 신호의 인코딩이 수행되는 인코딩 장치의 개략적인 블록도를 나타낸다.
도 2를 참조하면, 인코딩 장치(200)는 영상 분할부(image partitioner, 210), 예측부(predictor, 220), 레지듀얼 처리부(residual processor, 230), 엔트로피 인코딩부(entropy encoder, 240), 가산부(adder, 250), 필터링부(filter, 260) 및 메모리(memory, 270)를 포함하여 구성될 수 있다. 예측부(220)는 인터 예측부(221) 및 인트라 예측부(222)를 포함할 수 있다. 레지듀얼 처리부(230)는 변환부(transformer, 232), 양자화부(quantizer 233), 역양자화부(dequantizer 234), 역변환부(inverse transformer, 235)를 포함할 수 있다. 레지듀얼 처리부(230)은 감산부(subtractor, 231)를 더 포함할 수 있다. 가산부(250)는 복원부(reconstructor) 또는 복원 블록 생성부(recontructged block generator)로 불릴 수 있다. 상술한 영상 분할부(210), 예측부(220), 레지듀얼 처리부(230), 엔트로피 인코딩부(240), 가산부(250) 및 필터링부(260)는 실시예에 따라 하나 이상의 하드웨어 컴포넌트(예를 들어 인코딩 장치 칩셋 또는 프로세서)에 의하여 구성될 수 있다. 또한 메모리(270)는 DPB(decoded picture buffer)를 포함할 수 있고, 디지털 저장 매체에 의하여 구성될 수도 있다. 상기 하드웨어 컴포넌트는 메모리(270)을 내/외부 컴포넌트로 더 포함할 수도 있다.
영상 분할부(210)는 인코딩 장치(200)에 입력된 입력 영상(또는, 픽쳐, 프레임)를 하나 이상의 처리 유닛(processing unit)으로 분할할 수 있다. 일 예로, 상기 처리 유닛은 코딩 유닛(coding unit, CU)이라고 불릴 수 있다. 이 경우 코딩 유닛은 코딩 트리 유닛(coding tree unit, CTU) 또는 최대 코딩 유닛(largest coding unit, LCU)으로부터 QTBTTT (Quad-tree binary-tree ternary-tree) 구조에 따라 재귀적으로(recursively) 분할될 수 있다.
예를 들어, 하나의 코딩 유닛은 쿼드 트리 구조, 바이너리 트리 구조, 및/또는 터너리 구조를 기반으로 하위(deeper) 뎁스를 가진 복수의 코딩 유닛들로 분할될 수 있다. 이 경우, 예를 들어 쿼드 트리 구조가 먼저 적용되고 바이너리 트리 구조 및/또는 터너리 구조가 나중에 적용될 수 있다. 또는, 바이너리 트리 구조가 쿼드 트리 구조보다 먼저 적용될 수도 있다. 더 이상 분할되지 않는 최종 코딩 유닛을 기반으로 본 명세서에 따른 코딩 절차가 수행될 수 있다. 이 경우 영상 특성에 따른 코딩 효율 등을 기반으로, 최대 코딩 유닛이 바로 최종 코딩 유닛으로 사용될 수 있고, 또는 필요에 따라 코딩 유닛은 재귀적으로(recursively) 하위 뎁스의 코딩 유닛들로 분할되어, 최적의 크기를 가진 코딩 유닛이 최종 코딩 유닛으로 사용될 수 있다. 여기서, 코딩 절차라 함은 후술하는 예측, 변환, 및 복원 등의 절차를 포함할 수 있다.
다른 예로, 상기 처리 유닛은 예측 유닛(PU: Prediction Unit) 또는 변환 유닛(TU: Transform Unit)을 더 포함할 수 있다. 이 경우, 상기 예측 유닛 및 상기 변환 유닛은 각각 상술한 최종 코딩 유닛으로부터 분할 또는 파티셔닝될 수 있다. 상기 예측 유닛은 샘플 예측의 단위일 수 있고, 상기 변환 유닛은 변환 계수를 유도하는 단위 및/또는 변환 계수로부터 레지듀얼 신호(residual signal)를 유도하는 단위일 수 있다.
유닛은 경우에 따라서 블록(block) 또는 영역(area) 등의 용어와 혼용하여 사용될 수 있다. 일반적인 경우, MxN 블록은 M개의 열과 N개의 행으로 이루어진 샘플들 또는 변환 계수(transform coefficient)들의 집합을 나타낼 수 있다. 샘플은 일반적으로 픽셀 또는 픽셀의 값을 나타낼 수 있으며, 루마(luma) 성분의 픽셀/픽셀값만을 나타낼 수도 있고, 크로마(chroma) 성분의 픽셀/픽셀 값만을 나타낼 수도 있다. 샘플은 하나의 픽쳐(또는 영상)을 픽셀(pixel) 또는 펠(pel)에 대응하는 용어로서 사용될 수 있다.
인코딩 장치(200)는 입력 영상 신호(원본 블록, 원본 샘플 어레이)에서 인터 예측부(221) 또는 인트라 예측부(222)로부터 출력된 예측 신호(예측 블록, 예측 샘플 어레이)를 감산하여 레지듀얼 신호(residual signal, 잔여 블록, 잔여 샘플 어레이)를 생성할 수 있고, 생성된 레지듀얼 신호는 변환부(232)로 전송된다. 이 경우, 인코딩 장치(200) 내에서 입력 영상 신호(원본 블록, 원본 샘플 어레이)에서 예측 신호(예측 블록, 예측 샘플 어레이)를 감산하는 유닛은 감산부(231)라고 불릴 수 있다.
예측부(220)는 처리 대상 블록(이하, 현재 블록이라 함)에 대한 예측을 수행하고, 상기 현재 블록에 대한 예측 샘플들을 포함하는 예측 블록(predicted block)을 생성할 수 있다. 예측부(220)는 현재 블록 또는 CU 단위로 인트라 예측이 적용되는지 또는 인터 예측이 적용되는지 결정할 수 있다. 예측부(220)는 각 예측 모드에 대한 설명에서 후술하는 바와 같이 예측 모드 정보 등 예측에 관한 다양한 정보를 생성하여 엔트로피 인코딩부(240)로 전달할 수 있다. 예측에 관한 정보는 엔트로피 인코딩부(240)에서 인코딩되어 비트스트림 형태로 출력될 수 있다.
인트라 예측부(222)는 현재 픽쳐 내의 샘플들을 참조하여 현재 블록을 예측할 수 있다. 상기 참조되는 샘플들은 예측 모드에 따라 상기 현재 블록의 주변(neighbor)에 위치할 수 있고, 또는 현재 블록으로부터 일정 거리만큼 떨어져서 위치할 수도 있다. 인트라 예측에서 예측 모드들은 하나 이상의 비방향성 모드와 복수의 방향성 모드를 포함할 수 있다. 비방향성 모드는, DC 모드 또는 플래너 모드(Planar 모드) 중 적어도 하나를 포함할 수 있다. 방향성 모드는 예측 방향의 세밀한 정도에 따라 33개의 방향성 모드 또는 65개의 방향성 모드를 포함할 수 있다. 다만, 이는 예시로서 설정에 따라 그 이상 또는 그 이하의 개수의 방향성 모드들이 사용될 수 있다. 인트라 예측부(222)는 주변 블록에 적용된 예측 모드를 이용하여, 현재 블록에 적용되는 예측 모드를 결정할 수도 있다.
인터 예측부(221)는 참조 픽쳐 상에서 움직임 벡터에 의해 특정되는 참조 블록(참조 샘플 어레이)을 기반으로, 현재 블록에 대한 예측 블록을 유도할 수 있다. 이때, 인터 예측 모드에서 전송되는 움직임 정보의 양을 줄이기 위해, 주변 블록과 현재 블록 간의 움직임 정보의 상관성에 기초하여 움직임 정보를 블록, 서브블록 또는 샘플 단위로 예측할 수 있다. 상기 움직임 정보는 움직임 벡터 및 참조 픽쳐 인덱스를 포함할 수 있다. 상기 움직임 정보는 인터 예측 방향 정보(L0 예측, L1 예측, Bi 예측 등)를 더 포함할 수 있다. 인터 예측의 경우에, 주변 블록은 현재 픽쳐 내에 존재하는 공간적 주변 블록(spatial neighboring block)과 참조 픽쳐에 존재하는 시간적 주변 블록(temporal neighboring block)을 포함할 수 있다. 상기 참조 블록을 포함하는 참조 픽쳐와 상기 시간적 주변 블록을 포함하는 참조 픽쳐는 동일할 수도 있고, 다를 수도 있다. 상기 시간적 주변 블록은 동일 위치 참조 블록(collocated reference block), 동일 위치 CU(colCU) 등의 이름으로 불릴 수 있으며, 상기 시간적 주변 블록을 포함하는 참조 픽쳐는 동일 위치 픽쳐(collocated picture, colPic)라고 불릴 수도 있다. 예를 들어, 인터 예측부(221)는 주변 블록들을 기반으로 움직임 정보 후보 리스트를 구성하고, 상기 현재 블록의 움직임 벡터 및/또는 참조 픽쳐 인덱스를 도출하기 위하여 어떤 후보가 사용되는지를 지시하는 정보를 생성할 수 있다. 다양한 예측 모드를 기반으로 인터 예측이 수행될 수 있으며, 예를 들어, 스킵 모드와 머지 모드의 경우에, 인터 예측부(221)는 주변 블록의 움직임 정보를 현재 블록의 움직임 정보로 이용할 수 있다. 스킵 모드의 경우, 머지 모드와 달리 레지듀얼 신호가 전송되지 않을 수 있다. 움직임 정보 예측(motion vector prediction, MVP) 모드의 경우, 주변 블록의 움직임 벡터를 움직임 벡터 예측자(motion vector predictor)로 이용하고, 움직임 벡터 차분(motion vector difference)을 시그날링함으로써 현재 블록의 움직임 벡터를 지시할 수 있다.
예측부(220)는 후술하는 다양한 예측 방법을 기반으로 예측 신호를 생성할 수 있다. 예를 들어, 예측부는 하나의 블록에 대한 예측을 위하여 인트라 예측 또는 인터 예측을 적용할 수 있을 뿐 아니라, 인트라 예측과 인터 예측을 동시에 적용할 수 있다. 이는 combined inter and intra prediction (CIIP) 모드라고 불릴 수 있다. 또한, 예측부는 블록에 대한 예측을 위하여 인트라 블록 카피(intra block copy, IBC) 예측 모드에 기반할 수도 있고 또는 팔레트 모드(palette mode)에 기반할 수도 있다. 상기 IBC 예측 모드 또는 팔레트 모드는 SCC(screen content coding) 등과 같이 게임 등의 컨텐츠 영상/동영상 코딩을 위하여 사용될 수 있다. IBC는 기본적으로 현재 픽쳐 내에서 예측을 수행하나, 현재 픽쳐 내에서 참조 블록을 도출하는 점에서 인터 예측과 유사하게 수행될 수 있다. 즉, IBC는 본 명세서에서 설명되는 인터 예측 기법들 중 적어도 하나를 이용할 수 있다. 팔레트 모드는 인트라 코딩 또는 인트라 예측의 일 예로 볼 수 있다. 팔레트 모드가 적용되는 경우 팔레트 테이블 및 팔레트 인덱스에 관한 정보를 기반으로 픽쳐 내 샘플 값을 시그날링할 수 있다. 상기 예측부(220)를 통해 생성된 예측 신호는 복원 신호를 생성하기 위해 이용되거나, 레지듀얼 신호를 생성하기 위해 이용될 수 있다.
변환부(232)는 레지듀얼 신호에 변환 기법을 적용하여 변환 계수들(transform coefficients)를 생성할 수 있다. 예를 들어, 변환 기법은 DCT(Discrete Cosine Transform), DST(Discrete Sine Transform), KLT(Karhunen-Loeve Transform), GBT(Graph-Based Transform), 또는 CNT(Conditionally Non-linear Transform) 중 적어도 하나를 포함할 수 있다. 여기서, GBT는 픽셀 간의 관계 정보를 그래프로 표현한다고 할 때, 이 그래프로부터 얻어진 변환을 의미한다. CNT는 이전에 복원된 모든 픽셀를 이용하여 예측 신호를 생성하고, 그에 기초하여 획득되는 변환을 의미한다. 또한, 변환 과정은 정사각형의 동일한 크기를 갖는 픽셀 블록에 적용될 수도 있고, 정사각형이 아닌 가변 크기의 블록에도 적용될 수 있다.
양자화부(233)는 변환 계수들을 양자화하여 엔트로피 인코딩부(240)로 전송되고, 엔트로피 인코딩부(240)는 양자화된 신호(양자화된 변환 계수들에 관한 정보)를 인코딩하여 비트스트림으로 출력할 수 있다. 상기 양자화된 변환 계수들에 관한 정보는 레지듀얼 정보라고 불릴 수 있다. 양자화부(233)는 계수 스캔 순서(scan order)를 기반으로 블록 형태의 양자화된 변환 계수들을 1차원 벡터 형태로 재배열할 수 있고, 상기 1차원 벡터 형태의 양자화된 변환 계수들을 기반으로 상기 양자화된 변환 계수들에 관한 정보를 생성할 수도 있다.
엔트로피 인코딩부(240)는 지수 골롬(exponential Golomb), CAVLC(context-adaptive variable length coding), CABAC(context-adaptive binary arithmetic coding) 등과 같은 다양한 인코딩 방법을 수행할 수 있다. 엔트로피 인코딩부(240)는 양자화된 변환 계수들 외 비디오/이미지 복원에 필요한 정보들(예컨대, 신택스 요소들(syntax elements)의 값 등)을 함께 또는 별도로 인코딩할 수도 있다.
인코딩된 정보(ex. 인코딩된 비디오/영상 정보)는 비트스트림 형태로 NAL(network abstraction layer) 유닛 단위로 전송 또는 저장될 수 있다. 상기 비디오/영상 정보는 어댑테이션 파라미터 세트(APS), 픽쳐 파라미터 세트(PPS), 시퀀스 파라미터 세트(SPS) 또는 비디오 파라미터 세트(VPS) 등 다양한 파라미터 세트에 관한 정보를 더 포함할 수 있다. 또한, 상기 비디오/영상 정보는 일반 제한 정보(general constraint information)을 더 포함할 수 있다. 본 명세서에서 인코딩 장치에서 디코딩 장치로 전달/시그날링되는 정보 및/또는 신택스 요소들은 비디오/영상 정보에 포함될 수 있다. 상기 비디오/영상 정보는 상술한 인코딩 절차를 통하여 인코딩되어 상기 비트스트림에 포함될 수 있다. 상기 비트스트림은 네트워크를 통하여 전송될 수 있고, 또는 디지털 저장매체에 저장될 수 있다. 여기서, 네트워크는 방송망 및/또는 통신망 등을 포함할 수 있고, 디지털 저장매체는 USB, SD, CD, DVD, 블루레이, HDD, SSD 등 다양한 저장매체를 포함할 수 있다. 엔트로피 인코딩부(240)로부터 출력된 신호는 전송하는 전송부(미도시) 및/또는 저장하는 저장부(미도시)가 인코딩 장치(200)의 내/외부 엘리먼트로서 구성될 수 있고, 또는 전송부는 엔트로피 인코딩부(240)에 포함될 수도 있다.
양자화부(233)로부터 출력된 양자화된 변환 계수들은 예측 신호를 생성하기 위해 이용될 수 있다. 예를 들어, 양자화된 변환 계수들에 역양자화부(234) 및 역변환부(235)를 통해 역양자화 및 역변환을 적용함으로써 레지듀얼 신호(레지듀얼 블록 or 레지듀얼 샘플들)를 복원할 수 있다. 가산부(250)는 복원된 레지듀얼 신호를 인터 예측부(221) 또는 인트라 예측부(222)로부터 출력된 예측 신호에 더함으로써 복원(reconstructed) 신호(복원 픽쳐, 복원 블록, 복원 샘플 어레이)가 생성될 수 있다. 스킵 모드가 적용된 경우와 같이 처리 대상 블록에 대한 레지듀얼이 없는 경우, 예측된 블록이 복원 블록으로 사용될 수 있다. 가산부(250)는 복원부 또는 복원 블록 생성부라고 불릴 수 있다. 생성된 복원 신호는 현재 픽쳐 내 다음 처리 대상 블록의 인트라 예측을 위하여 사용될 수 있고, 후술하는 바와 같이 필터링을 거쳐서 다음 픽쳐의 인터 예측을 위하여 사용될 수도 있다. 한편, 픽쳐 인코딩 및/또는 복원 과정에서 LMCS (luma mapping with chroma scaling)가 적용될 수도 있다.
필터링부(260)는 복원 신호에 필터링을 적용하여 주관적/객관적 화질을 향상시킬 수 있다. 예를 들어, 필터링부(260)은 복원 픽쳐에 다양한 필터링 방법을 적용하여 수정된(modified) 복원 픽쳐를 생성할 수 있고, 상기 수정된 복원 픽쳐를 메모리(270), 구체적으로 메모리(270)의 DPB에 저장할 수 있다. 상기 다양한 필터링 방법은, 디블록킹 필터링, 샘플 적응적 오프셋(sample adaptive offset), 적응적 루프 필터(adaptive loop filter), 양방향 필터(bilateral filter) 등을 포함할 수 있다. 필터링부(260)은 필터링에 관한 다양한 정보를 생성하여 엔트로피 인코딩부(240)로 전달할 수 있다. 필터링 관한 정보는 엔트로피 인코딩부(240)에서 인코딩되어 비트스트림 형태로 출력될 수 있다.
메모리(270)에 전송된 수정된 복원 픽쳐는 인터 예측부(221)에서 참조 픽쳐로 사용될 수 있다. 인코딩 장치는 이를 통하여 인터 예측이 적용되는 경우, 인코딩 장치(200)와 디코딩 장치에서의 예측 미스매치를 피할 수 있고, 부호화 효율도 향상시킬 수 있다.
메모리(270)의 DPB는 수정된 복원 픽쳐를 인터 예측부(221)에서의 참조 픽쳐로 사용하기 위해 저장할 수 있다. 메모리(270)는 현재 픽쳐 내 움직임 정보가 도출된(또는 인코딩된) 블록의 움직임 정보 및/또는 이미 복원된 픽쳐 내 블록들의 움직임 정보를 저장할 수 있다. 상기 저장된 움직임 정보는 공간적 주변 블록의 움직임 정보 또는 시간적 주변 블록의 움직임 정보로 활용하기 위하여 인터 예측부(221)에 전달할 수 있다. 메모리(270)는 현재 픽쳐 내 복원된 블록들의 복원 샘플들을 저장할 수 있고, 인트라 예측부(222)에 전달할 수 있다.
도 3은 본 개시의 실시예가 적용될 수 있고, 비디오/영상 신호의 디코딩이 수행되는 디코딩 장치의 개략적인 블록도를 나타낸다.
도 3을 참조하면, 디코딩 장치(300)는 엔트로피 디코딩부(entropy decoder, 310), 레지듀얼 처리부(residual processor, 320), 예측부(predictor, 330), 가산부(adder, 340), 필터링부(filter, 350) 및 메모리(memoery, 360)를 포함하여 구성될 수 있다. 예측부(330)는 인터 예측부(331) 및 인트라 예측부(332)를 포함할 수 있다. 레지듀얼 처리부(320)는 역양자화부(dequantizer, 321) 및 역변환부(inverse transformer, 321)를 포함할 수 있다.
상술한 엔트로피 디코딩부(310), 레지듀얼 처리부(320), 예측부(330), 가산부(340) 및 필터링부(350)는 실시예에 따라 하나의 하드웨어 컴포넌트(예를 들어 디코딩 장치 칩셋 또는 프로세서)에 의하여 구성될 수 있다. 또한 메모리(360)는 DPB(decoded picture buffer)를 포함할 수 있고, 디지털 저장 매체에 의하여 구성될 수도 있다. 상기 하드웨어 컴포넌트는 메모리(360)을 내/외부 컴포넌트로 더 포함할 수도 있다.
비디오/영상 정보를 포함하는 비트스트림이 입력되면, 디코딩 장치(300)는 도 2의 인코딩 장치에서 비디오/영상 정보가 처리된 프로세스에 대응하여 영상을 복원할 수 있다. 예를 들어, 디코딩 장치(300)는 상기 비트스트림으로부터 획득한 블록 분할 관련 정보를 기반으로 유닛들/블록들을 도출할 수 있다. 디코딩 장치(300)는 인코딩 장치에서 적용된 처리 유닛을 이용하여 디코딩을 수행할 수 있다. 따라서, 디코딩의 처리 유닛은 코딩 유닛일 수 있고, 코딩 유닛은 쿼드 트리 구조, 바이너리 트리 구조 및/또는 터너리 트리 구조에 따라서 코딩 트리 유닛 또는 최대 코딩 유닛으로부터 분할된 것일 수 있다. 코딩 유닛으로부터 하나 이상의 변환 유닛이 도출될 수 있다. 그리고, 디코딩 장치(300)를 통해 디코딩 및 출력된 복원 영상 신호는 재생 장치를 통해 재생될 수 있다.
디코딩 장치(300)는 도 2의 인코딩 장치로부터 출력된 신호를 비트스트림 형태로 수신할 수 있고, 수신된 신호는 엔트로피 디코딩부(310)를 통해 디코딩될 수 있다. 예를 들어, 엔트로피 디코딩부(310)는 상기 비트스트림을 파싱하여 영상 복원(또는 픽쳐 복원)에 필요한 정보(ex. 비디오/영상 정보)를 도출할 수 있다. 상기 비디오/영상 정보는 어댑테이션 파라미터 세트(APS), 픽쳐 파라미터 세트(PPS), 시퀀스 파라미터 세트(SPS) 또는 비디오 파라미터 세트(VPS) 등 다양한 파라미터 세트에 관한 정보를 더 포함할 수 있다. 또한 상기 비디오/영상 정보는 일반 제한 정보(general constraint information)을 더 포함할 수 있다. 디코딩 장치는 상기 파라미터 세트에 관한 정보 및/또는 상기 일반 제한 정보를 더 기반으로 픽쳐를 디코딩할 수 있다. 본 명세서에서 후술되는 시그날링/수신되는 정보 및/또는 신택스 요소들은 상기 디코딩 절차를 통하여 디코딩되어 상기 비트스트림으로부터 획득될 수 있다. 예컨대, 엔트로피 디코딩부(310)는 지수 골롬 부호화, CAVLC 또는 CABAC 등의 코딩 방법을 기초로 비트스트림 내 정보를 디코딩하고, 영상 복원에 필요한 신택스 요소의 값, 레지듀얼에 관한 변환 계수의 양자화된 값들을 출력할 수 있다. 보다 상세하게, CABAC 엔트로피 디코딩 방법은, 비트스트림에서 각 구문 요소에 해당하는 빈을 수신하고, 디코딩 대상 구문 요소 정보와 주변 및 디코딩 대상 블록의 디코딩 정보 혹은 이전 단계에서 디코딩된 심볼/빈의 정보를 이용하여 문맥(context) 모델을 결정하고, 결정된 문맥 모델에 따라 빈(bin)의 발생 확률을 예측하여 빈의 산술 디코딩(arithmetic decoding)를 수행하여 각 구문 요소의 값에 해당하는 심볼을 생성할 수 있다. 이때, CABAC 엔트로피 디코딩 방법은 문맥 모델 결정 후 다음 심볼/빈의 문맥 모델을 위해 디코딩된 심볼/빈의 정보를 이용하여 문맥 모델을 업데이트할 수 있다. 엔트로피 디코딩부(310)에서 디코딩된 정보 중 예측에 관한 정보는 예측부(인터 예측부(332) 및 인트라 예측부(331))로 제공되고, 엔트로피 디코딩부(310)에서 엔트로피 디코딩이 수행된 레지듀얼 값, 즉 양자화된 변환 계수들 및 관련 파라미터 정보는 레지듀얼 처리부(320)로 입력될 수 있다. 레지듀얼 처리부(320)는 레지듀얼 신호(레지듀얼 블록, 레지듀얼 샘플들, 레지듀얼 샘플 어레이)를 도출할 수 있다. 또한, 엔트로피 디코딩부(310)에서 디코딩된 정보 중 필터링에 관한 정보는 필터링부(350)으로 제공될 수 있다. 한편, 인코딩 장치로부터 출력된 신호를 수신하는 수신부(미도시)가 디코딩 장치(300)의 내/외부 엘리먼트로서 더 구성될 수 있고, 또는 수신부는 엔트로피 디코딩부(310)의 구성요소일 수도 있다.
한편, 본 명세서에 따른 디코딩 장치는 비디오/영상/픽쳐 디코딩 장치라고 불릴 수 있고, 상기 디코딩 장치는 정보 디코딩 장치(비디오/영상/픽쳐 정보 디코딩 장치) 및 샘플 디코딩 장치(비디오/영상/픽쳐 샘플 디코딩 장치)로 구분할 수도 있다. 상기 정보 디코딩 장치는 상기 엔트로피 디코딩부(310)를 포함할 수 있고, 상기 샘플 디코딩 장치는 상기 역양자화부(321), 역변환부(322), 가산부(340), 필터링부(350), 메모리(360), 인터 예측부(332) 및 인트라 예측부(331) 중 적어도 하나를 포함할 수 있다.
역양자화부(321)에서는 양자화된 변환 계수들을 역양자화하여 변환 계수들을 출력할 수 있다. 역양자화부(321)는 양자화된 변환 계수들을 2차원의 블록 형태로 재배열할 수 있다. 이 경우, 상기 재배열은 인코딩 장치에서 수행된 계수 스캔 순서를 기반하여 재배열을 수행할 수 있다. 역양자화부(321)는 양자화 파라미터(예를 들어 양자화 스텝 사이즈 정보)를 이용하여 양자화된 변환 계수들에 대한 역양자화를 수행하고, 변환 계수들(transform coefficient)를 획득할 수 있다.
역변환부(322)에서는 변환 계수들를 역변환하여 레지듀얼 신호(레지듀얼 블록, 레지듀얼 샘플 어레이)를 획득하게 된다.
예측부(320)는 현재 블록에 대한 예측을 수행하고, 상기 현재 블록에 대한 예측 샘플들을 포함하는 예측 블록(predicted block)을 생성할 수 있다. 예측부(320)는 엔트로피 디코딩부(310)로부터 출력된 상기 예측에 관한 정보를 기반으로 상기 현재 블록에 인트라 예측이 적용되는지 또는 인터 예측이 적용되는지 결정할 수 있고, 구체적인 인트라/인터 예측 모드를 결정할 수 있다.
예측부(320)는 후술하는 다양한 예측 방법을 기반으로 예측 신호를 생성할 수 있다. 예를 들어, 예측부(320)는 하나의 블록에 대한 예측을 위하여 인트라 예측 또는 인터 예측을 적용할 수 있을 뿐 아니라, 인트라 예측과 인터 예측을 동시에 적용할 수 있다. 이는 combined inter and intra prediction (CIIP) 모드라고 불릴 수 있다. 또한, 예측부는 블록에 대한 예측을 위하여 인트라 블록 카피(intra block copy, IBC) 예측 모드에 기반할 수도 있고 또는 팔레트 모드(palette mode)에 기반할 수도 있다. 상기 IBC 예측 모드 또는 팔레트 모드는 SCC(screen content coding) 등과 같이 게임 등의 컨텐츠 영상/동영상 코딩을 위하여 사용될 수 있다. IBC는 기본적으로 현재 픽쳐 내에서 예측을 수행하나 현재 픽쳐 내에서 참조 블록을 도출하는 점에서 인터 예측과 유사하게 수행될 수 있다. 즉, IBC는 본 명세서에서 설명되는 인터 예측 기법들 중 적어도 하나를 이용할 수 있다. 팔레트 모드는 인트라 코딩 또는 인트라 예측의 일 예로 볼 수 있다. 팔레트 모드가 적용되는 경우 팔레트 테이블 및 팔레트 인덱스에 관한 정보가 상기 비디오/영상 정보에 포함되어 시그날링될 수 있다.
인트라 예측부(331)는 현재 픽쳐 내의 샘플들을 참조하여 현재 블록을 예측할 수 있다. 상기 참조되는 샘플들은 예측 모드에 따라 상기 현재 블록의 주변(neighbor)에 위치할 수 있고, 또는 현재 블록으로부터 일정 거리만큼 떨어져서 위치할 수도 있다. 인트라 예측에서 예측 모드들은 하나 이상의 비방향성 모드와 복수의 방향성 모드를 포함할 수 있다. 인트라 예측부(331)는 주변 블록에 적용된 예측 모드를 이용하여, 현재 블록에 적용되는 예측 모드를 결정할 수도 있다.
인터 예측부(332)는 참조 픽쳐 상에서 움직임 벡터에 의해 특정되는 참조 블록(참조 샘플 어레이)을 기반으로, 현재 블록에 대한 예측 블록을 유도할 수 있다. 이때, 인터 예측 모드에서 전송되는 움직임 정보의 양을 줄이기 위해 주변 블록과 현재 블록 간의 움직임 정보의 상관성에 기초하여 움직임 정보를 블록, 서브블록 또는 샘플 단위로 예측할 수 있다. 상기 움직임 정보는 움직임 벡터 및 참조 픽쳐 인덱스를 포함할 수 있다. 상기 움직임 정보는 인터 예측 방향 정보(L0 예측, L1 예측, Bi 예측 등)를 더 포함할 수 있다. 인터 예측의 경우에, 주변 블록은 현재 픽쳐 내에 존재하는 공간적 주변 블록(spatial neighboring block)과 참조 픽쳐에 존재하는 시간적 주변 블록(temporal neighboring block)을 포함할 수 있다. 예를 들어, 인터 예측부(332)는 주변 블록들을 기반으로 움직임 정보 후보 리스트를 구성하고, 수신한 후보 선택 정보를 기반으로 상기 현재 블록의 움직임 벡터 및/또는 참조 픽쳐 인덱스를 도출할 수 있다. 다양한 예측 모드를 기반으로 인터 예측이 수행될 수 있으며, 상기 예측에 관한 정보는 상기 현재 블록에 대한 인터 예측 모드를 지시하는 정보를 포함할 수 있다.
가산부(340)는 획득된 레지듀얼 신호를 예측부(인터 예측부(332) 및/또는 인트라 예측부(331) 포함)로부터 출력된 예측 신호(예측 블록, 예측 샘플 어레이)에 더함으로써 복원 신호(복원 픽쳐, 복원 블록, 복원 샘플 어레이)를 생성할 수 있다. 스킵 모드가 적용된 경우와 같이 처리 대상 블록에 대한 레지듀얼이 없는 경우, 예측 블록이 복원 블록으로 사용될 수 있다.
가산부(340)는 복원부 또는 복원 블록 생성부라고 불릴 수 있다. 생성된 복원 신호는 현재 픽쳐 내 다음 처리 대상 블록의 인트라 예측을 위하여 사용될 수 있고, 후술하는 바와 같이 필터링을 거쳐서 출력될 수도 있고 또는 다음 픽쳐의 인터 예측을 위하여 사용될 수도 있다. 한편, 픽쳐 디코딩 과정에서 LMCS (luma mapping with chroma scaling)가 적용될 수도 있다.
필터링부(350)는 복원 신호에 필터링을 적용하여 주관적/객관적 화질을 향상시킬 수 있다. 예를 들어 필터링부(350)는 복원 픽쳐에 다양한 필터링 방법을 적용하여 수정된(modified) 복원 픽쳐를 생성할 수 있고, 상기 수정된 복원 픽쳐를 메모리(360), 구체적으로 메모리(360)의 DPB에 전송할 수 있다. 상기 다양한 필터링 방법은, 디블록킹 필터링, 샘플 적응적 오프셋(sample adaptive offset), 적응적 루프 필터(adaptive loop filter), 양방향 필터(bilateral filter) 등을 포함할 수 있다.
메모리(360)의 DPB에 저장된 (수정된) 복원 픽쳐는 인터 예측부(332)에서 참조 픽쳐로 사용될 수 있다. 메모리(360)는 현재 픽쳐 내 움직임 정보가 도출된(또는 디코딩된) 블록의 움직임 정보 및/또는 이미 복원된 픽쳐 내 블록들의 움직임 정보를 저장할 수 있다. 상기 저장된 움직임 정보는 공간적 주변 블록의 움직임 정보 또는 시간적 주변 블록의 움직임 정보로 활용하기 위하여 인터 예측부(260)에 전달할 수 있다. 메모리(360)는 현재 픽쳐 내 복원된 블록들의 복원 샘플들을 저장할 수 있고, 인트라 예측부(331)에 전달할 수 있다.
본 명세서에서, 인코딩 장치(200)의 필터링부(260), 인터 예측부(221) 및 인트라 예측부(222)에서 설명된 실시예들은 각각 디코딩 장치(300)의 필터링부(350), 인터 예측부(332) 및 인트라 예측부(331)에도 동일 또는 대응되도록 적용될 수 있다.
도 4는 본 개시에 따른 일실시예로서, 디코딩 장치에 의해 수행되는 영상 디코딩 방법을 도시한 것이다.
도 4를 참조하면, 비트스트림으로부터 현재 블록의 변환 계수(transform coefficients)를 유도할 수 있다(S400). 즉, 비트스트림은 현재 블록의 레지듀얼 정보를 포함할 수 있고, 해당 레지듀얼 정보를 복호화하여 현재 블록의 변환 계수를 유도할 수 있다.
도 4를 참조하면, 현재 블록의 변환 계수에 역양자화(dequantization) 또는 역변환(inverse-transform) 중 적어도 하나를 수행하여, 현재 블록의 레지듀얼 샘플(residual samples)을 유도할 수 있다(S410).
적응적 다중 핵심 변환(Adaptive Multiple Transform Selection, MTS)이 적용되는 경우, DCT-2, DST-7, 또는 DCT-8 중 적어도 하나를 기반으로 역변환이 수행될 수 있다. 여기서, DCT-2, DST-7, DCT-8 등은 변환 타입, 변환 커널(kernel) 또는 변환 코어(core)라고 불릴 수 있다.
본 개시에서의 역변환은 분리 변환(separable transform)을 의미할 수 있다. 다만, 이에 한정되지 아니하며, 역변환은 비분리 변환(non-separable transform)을 의미할 수도 있고, 분리 변환과 비분리 변환을 포함하는 개념일 수도 있다. 또한, 본 개시에서의 역변환은 1차 변환(primary transform)을 의미하나, 이에 한정되지 아니하며, 동일/유사한 형태로 변형되어 2차 변환(secondary transform)에 적용될 수도 있다.
예를 들어, 역변환을 위한 방법으로, DCT-2와 비분리 변환만을 사용할 수도 있고, DCT-2, DST-7, 또는 DCT-8 중 적어도 하나에 추가로 비분리 변환을 사용할 수도 있으며, DCT-2, DST-7, 또는 DCT-8 중 하나 이상의 변환 커널을 비분리 변환이 대체할 수도 있다.
보다 구체적인 예시로서, 분리 변환을 위한 변환 커널 후보로서, (DCT-2, DCT-2), (DST-7, DST-7), (DCT-8, DST-7), (DST-7, DCT-8), (DCT-8, DCT-8)이 존재하는 경우, 비분리 변환이 상기 5개의 변환 커널 후보 중 하나 이상을 대체하거나 추가될 수 있다. 여기서, (변환1, 변환2)와 같은 표기는, 수평 방향으로 변환1이 적용되고, 수직 방향으로 변환2가 적용되는 것을 가리킨다. 비분리 변환이 해당 변환 커널 후보 중 일부를 대체하는 경우, (DCT-2, DCT-2), (DST-7, DST-7)을 제외한 나머지 변환 커널 후보를 비분리 변환으로 대체할 수 있다. 다만, 상기 변환 커널 후보는 일예에 불과하고, 다른 타입의 DCT 및/또는 DST가 포함될 수도 있고, 변환 커널 후보로 변환 스킵(transform skip)이 포함될 수도 있다.
비분리 변환은, 비분리 변환 매트릭스(non-separable transform matrix)를 기반으로 하는 변환 또는 역변환을 의미할 수 있다. 즉, 수직 변환 및 수평 변환을 분리하여 수평 변환과 수직 변환을 독립적으로 수행하는 분리 변환과 달리, 비분리 변환은 수평 및 수직 변환을 한번에 수행할 수 있다.
예를 들어, 4x4 블록에 비분리 변환이 수행되는 경우, 비분리 변환으로의 입력 데이터 X는 다음 수학식 1과 같다.
상기 입력 데이터 X를 벡터 형태로 나타내는 경우, 벡터 X' 다음과 같이 나타내어질 수 있다.
이 경우, 상기 비분리 변환은 다음 수학식 3과 같이 수행될 수 있다.
수학식 3에서, F는 변환 계수 벡터를 나타내고, T는 16x16 비분리 변환 매트릭스를 나타내며, ㆍ는 행렬과 벡터의 곱셈을 의미한다.
상기 수학식 3을 통해 16x1 변환 계수 벡터 F가 도출될 수 있으며, 상기 F는 소정의 스캔 순서에 따라 4x4 블록으로 재구성될 수 있다. 상기 스캔 순서는, 수평 스캔, 수직 스캔, 대각 스캔, z 스캔, 래스터 스캔, 또는 기-정의된 스캔일 수 있다.
상기 비분리 변환을 위한 비분리 변환 세트 및/또는 변환 커널은, 예측 모드(ex. intra mode, inter mode 등), 현재 블록의 너비, 높이, 또는 픽셀 수, 현재 블록 내 서브 블록의 위치, 명시적으로 시그널링된 구문 요소, 주변 샘플들의 통계적 특성, 2차 변환의 사용 여부, 또는 양자화 파라미터(QP) 중 적어도 하나에 기반하여 다양하게 구성될 수 있다.
구체적으로, 인트라 모드의 경우, n개의 비분리 변환 세트에 대응되도록 기-정의된 인트라 예측 모드들을 그룹핑하고, 각 비분리 변환 세트는 k개의 변환 커널 후보들이 포함될 수 있다. 여기서 n과 k는 인코딩 장치와 디코딩 장치에 동일하게 정의된 규칙(조건)에 따른 임의의 상수일 수 있다.
비분리 변환 세트의 개수 및/또는 비분리 변환 세트에 포함되는 변환 커널 후보의 개수는, 현재 블록의 너비 및/또는 높이에 따라 상이하게 구성될 수 있다. 예를 들어, 4x4 블록에 대해서, n1개의 비분리 변환 세트와 k1개의 변환 커널 후보가 구성될 수 있다. 4x8 블록에 대해서, n2개의 비분리 변환 세트와 k2개의 변환 커널 후보가 구성될 수 있다. 또한, 현재 블록의 너비와 높이의 곱에 따라 비분리 변환 세트의 개수와 각 비분리 변환 세트에 포함되는 변환 커널 후보의 개수가 상이하게 구성될 수 있다. 예를 들어 현재 블록의 너비와 높이의 곱이 256 이상(또는 초과)일 경우, n3개의 비분리 변환 세트와 k3개의 변환 커널 후보가 구성될 수 있고, 그렇지 않은 경우, n4개의 비분리 변환 세트와 k4개의 변환 커널 후보가 구성될 수 있다. 즉, 블록 크기에 따라 레지듀얼 신호의 통계적 특성의 변화도가 다르기 때문에, 이를 반영하기 위해 비분리 변환 세트와 변환 커널 후보의 개수를 상이하게 구성할 수 있다.
현재 블록이 복수의 서브 블록들로 분할되는 경우, 해당 서브 블록마다 레지듀얼 신호의 통계적 특성이 다를 수 있으므로, 비분리 변환 세트와 변환 커널 후보의 개수를 상이하게 구성할 수 있다. 예를 들어, 4x8 또는 8x4 블록이 두 개의 4x4 서브 블록들로 분할되고, 각 서브 블록에 비분리 변환이 적용되는 경우, 좌상단 4x4 서브 블록에 대해서 n5개의 비분리 변환 세트와 k5개의 변환 커널 후보가 구성될 수 있고, 다른 4x4 서브 블록에 대해서 n6개의 비분리 변환 세트와 k6개의 변환 커널 후보가 구성될 수 있다.
명시적으로 시그널링되는 구문 요소에 기초하여, 비분리 변환 세트와 변환 커널 후보의 개수를 상이하게 구성할 수 있다. 상기 구문 요소로서, 복수의 비분리 변환 구성 중 어느 하나를 지시하는 정보가 이용될 수 있다. 예를 들어, 세 종류의 비분리 변환 구성이 지원되는 경우(i.e., n7개의 비분리 변환 세트와 k7개의 변환 커널 후보, n8개의 비분리 변환 세트와 k8개의 변환 커널 후보, n9개의 비분리 변환 세트와 k9개의 변환 커널 후보), 해당 구문 요소가 0, 1, 2의 값을 가질 수 있고, 시그널링되는 구문 요소의 값에 따라 현재 블록에 적용되는 비분리 변환 구성이 결정될 수 있다.
2차 변환의 적용 여부 및/또는 어떤 2차 변환이 적용되는지에 따라, 비분리 변환 세트와 변환 커널 후보의 개수를 상이하게 구성할 수 있다. 예를 들어, 2차 변환이 적용되지 않는 경우, n10개의 비분리 변환 세트와 k10개의 변환 커널 후보를 포함한 비분리 변환 구성을 적용할 수 있다. 2차 변환이 적용되는 경우, n11개의 비분리 변환 세트와 k11개의 변환 커널 후보를 포함한 비분리 변환 구성을 적용할 수 있다.
양자화 파라미터(QP) 및/또는 QP 값의 범위에 따라, 상이한 비분리 변환 구성을 적용할 수 있다. 예를 들어, QP 값이 작은 값을 가지는 경우, n12개의 비분리 변환 세트와 k12개의 변환 커널 후보를 포함한 비분리 변환 구성을 적용할 수 있다. 반면, QP 값이 큰 값을 가지는 경우, n13개의 비분리 변환 세트와 k13개의 변환 커널 후보를 포함한 비분리 변환 구성을 적용할 수 있다. QP 값이 문턱값(e.g., 32) 이하(또는 미만)이면, QP 값이 작은 값을 가지는 경우로 분류하고, 그렇지 않으면, QP 값이 큰 값을 가지는 경우로 분류할 수 있다. 또는, QP 값의 범위를 3개 이상으로 구분하고, 각 범위에 대해 각기 다른 비분리 변환 구성을 적용할 수도 있다.
상대적으로 큰 블록에 대해서, 해당 블록의 너비와 높이에 대응하는 비분리 변환을 사용하지 않고, 해당 블록을 복수의 서브 블록으로 분할하고, 서브 블록의 너비와 높이에 대응하는 비분리 변환을 사용할 수 있다. 예를 들어, 4x8 블록에 대한 비분리 변환을 수행할 때, 4x8 블록을 두 개의 4x4 서브 블록으로 분할하고, 각각의 4x4 서브 블록에 대해서 4x4 블록 기반의 비분리 변환을 사용할 수 있다. 또는, 8x16 블록의 경우, 2개의 8x8 서브 블록으로 분할하고, 8x8 블록 기반의 비분리 변환을 사용할 수 있다.
상기 비분리 변환 세트는, 현재 블록의 인트라 예측 모드와 매핑 테이블을 기반으로 결정될 수 있다. 매핑 테이블은, 기-정의된 인트라 예측 모드들과 비분리 변환 세트들 간의 매핑 관계를 정의할 수 있다. 기-정의된 인트라 예측 모드들은 2개의 비방향성 모드(non-directional modes)와 65개의 방향성 모드(directional modes)을 포함할 수 있다. 일반적으로 비분리 변환은 분리 변환에 비해서 변환 커널의 크기가 크다. 이는, 변환 과정에 소요되는 계산적 복잡도가 높고, 변환 커널의 저장을 위해 요구되는 메모리가 큼을 의미한다. 한편, 분리 변환은 수평 및/또는 수직 방향으로 존재하는 통계적 특성만을 고려할 수 있지만, 비분리 변환은 수평 및 수직 방향을 포함하는 2차원 공간 상의 통계적 특성을 동시에 고려할 수 있으므로 더 나은 압축 효율을 제공한다. 인트라 예측 모드의 방향성에 따라서 레지듀얼의 통계적 특성 및 다양성이 다르기 때문에, 비분리 변환이 절대적으로 필요한 경우가 있을 수 있으며, 분리 변환만으로 충분히 레지듀얼의 특성을 파악할 수 있는 인트라 예측 모드가 존재할 수 있다. 따라서, 인코딩 장치와 디코딩 장치에서 인트라 예측 모드에 따라 어떤 변환을 사용할 것인지 미리 정의함으로써, 복잡도 및 메모리 요구량을 최적화하여 변환 과정을 설계할 수 있다. 상기 비방향성 모드는 0번인 planar 모드 및 1번인 DC 모드를 포함할 수 있고, 상기 방향성 모드는 2번 내지 66번의 인트라 예측 모드를 포함할 수 있다. 다만, 이는 예시로서, 본 개시는 기-정의된 인트라 예측 모드의 개수가 다른 경우에도 적용될 수 있다.
wide angle intra prediction(WAIP)의 적용으로 인해, 기-정의된 인트라 예측 모드는, -14번 내지 -1번의 인트라 예측 모드와 67번 내지 80번의 인트라 예측 모드를 더 포함할 수 있다.
도 5는 본 개시에 따른 인트라 예측 모드와 그 예측 방향을 예시적으로 나타낸다. 도 5를 참조하면, -14번 내지 -1번 및 2번 내지 33번까지의 모드와 35번 내지 80번까지의 모드는 34번 모드를 중심으로 예측 방향 관점에서 대칭이다. 예를 들어 10번 모드와 58번 모드는 34번 모드에 해당하는 방향을 중심으로 대칭이고, -1번 모드는 67번 모드와 대칭이다. 따라서, 34번 모드를 중심으로 수평 방향성 모드에 대칭되는 수직 방향성 모드에 대해서는, 입력 데이터를 트랜스포즈(transpose)해서 사용할 수 있다. 입력 데이터를 transpose한다는 것은 2차원 블록의 입력 데이터 MxN에서의 행이 열이 되고 열이 행이 되어 NxM 데이터를 구성하는 것을 의미한다.
예를 들어, 4x4 블록이 사용되는 경우, 비분리 변환을 위해 4x4 블록을 이루는 16개의 데이터를 적절히 배열하여 16x1의 1차원 벡터를 구성할 수 있다. 이때, 행 우선의 순서로 1차원 벡터를 구성할 수도 있고, 열 우선의 순서로 1차원 벡터를 구성할 수도 있다. 비분리 변환의 결과인 레지듀얼 샘플들을 위 순서로 배열하여 2차원 블록을 구성할 수 있다.
-14번 내지 -1번 및 2번 내지 33번 모드에 대하여, 16x1 입력 벡터를 구성하기 위한 데이터 배열 순서가 행 우선의 순서인 경우, 35번 내지 80번 모드에 대해서는 열 우선의 순서에 따라 입력 벡터가 구성될 수 있다.
34번 모드는 수평 방향성 모드도 아니고 수직 방향성 모드도 아니라고 볼 수 있으나, 본 개시에서는 수평 방향성 모드에 속하는 것으로 분류한다. 즉, -14번 내지 -1번 및 2번 내지 33번 모드에 대해서는 수평 방향성 모드에 대한 입력 데이터 정렬 방식, 즉 행 우선의 순서를 사용하고, 34번 모드를 중심으로 대칭되는 수직 방향성 모드에 대해서 입력 데이터를 transpose하여 사용할 수 있다.
비정방형 블록의 경우, 정방형 블록에서의 대칭성(즉, NxN 블록에서 P번 모드와 (68-P)번 모드 간의 대칭성(2<=P<=33) 또는 Q번 모드와 (66-Q)번 모드 간의 대칭성(-14<=Q<=-1))을 활용할 수 없다. 이에, 인트라 예측 모드만을 기준으로 한 대칭성 외에 서로 전치 관계에 있는 블록 형태 간의 대칭성, 즉 KxL 블록과 LxK 블록 간의 대칭성을 함께 활용할 수도 있다. 구체적으로, P번 모드로 예측되는 KxL 블록과 (68-P)번 모드로 예측되는 LxK 블록 간에 대칭 관계가 존재한다. 또는, Q번 모드로 예측되는 KxL 블록과 (66-Q)번 모드로 예측되는 LxK 블록 간에 대칭 관계가 존재한다.
2번 모드를 갖는 KxL 블록과 66번 모드를 갖는 LxK 블록은 서로 대칭이라 볼 수 있으므로, KxL 블록과 LxK 블록에 동일한 변환 커널을 적용할 수 있다. 만약, KxL 블록의 인트라 예측 모드에 대한 비분리 변환 세트가 매핑되어 있다고 했을 때, LxK 블록에 비분리 변환을 적용하기 위해서는, LxK 블록에 적용되는 P번 모드 대신 (68-P)번 모드를 기반으로, 상기 KxL 블록에 대응하는 매핑 테이블을 통해 비분리 변환 세트를 유도할 수 있다. 또는, LxK 블록에 적용되는 Q번 모드 대신 (66-Q)번 모드를 기반으로, 상기 상기 KxL 블록에 대응하는 매핑 테이블을 통해 비분리 변환 세트를 유도할 수 있다.
예를 들어, LxK 블록에 비분리 변환을 적용하기 위해서는, 66번 모드 대신 2번 모드를 기준으로 비분리 변환 세트를 선택할 수 있다. 또한, KxL 블록에 대해서는 입력 데이터를 기-결정된 순서(e.g., 행 우선의 순서 또는 열 우선의 순서)에 따라 읽어서 1차원 벡터를 구성한 후 해당 비분리 변환을 적용할 수 있다. LxK 블록에 대해서는 입력 데이터를 transpose한 순서에 따라 읽어서 1차원 벡터를 구성한 후 해당 비분리 변환을 적용할 수 있다. 즉, KxL 블록에 대해 행 우선의 순서로 읽었다면, LxK 블록에 대해 열 우선의 순서로 읽을 수 있다. 반대로, KxL 블록에 대해 열 우선의 순서로 읽었다면, LxK 블록에 대해 행 우선의 순서로 읽을 수 있다.
또한, 34번 모드가 KxL 블록에 적용되는 경우, 34번 모드를 기반으로 비분리 변환 세트를 결정하고, 기-결정된 순서에 따라 입력 데이터를 읽어 1차원 벡터를 구성하여 해당 비분리 변환을 수행할 수 있다. 34번 모드가 LxK 블록에 적용되는 경우, 마찬가지로 34번 모드를 기반으로 비분리 변환 세트를 결정하되, 입력 데이터를 transpose한 순서에 따라 읽어 1차원 벡터를 구성하여 해당 비분리 변환을 수행할 수 있다.
본 개시에서는 KxL 블록을 기준으로 비분리 변환 세트의 결정 방법 및 입력 데이터의 구성 방법을 설명하였으나, LxK 블록을 기준으로 KxL 블록에 대해 전술한 대칭성을 동일하게 활용하여 해당 비분리 변환을 수행할 수 있다. 또는, 너비가 높이보다 큰 블록이 기준 블록으로 이용되도록 제한될 수도 있다. 또는, 비정방형 블록의 경우 대칭성을 활용하지 않도록 제한될 수 있다. 이 경우, 비정방형 블록은 정방형 블록과는 다른 개수의 비분리 변환 세트 및/또는 변환 커널 후보를 사용할 수도 있고, 정방형 블록과는 다른 매핑 테이블을 사용하여 비분리 변환 세트를 선택할 수도 있다.
비분리 변환 세트를 선택하기 위한 매핑 테이블의 예는 다음과 같다.
predModeIntra TrSetIdx
predModeIntra < 0 4
0 <= predModeIntra <= 1 0
2 <= predModeIntra <= 12 1
13 <= predModeIntra <= 23 2
24 <= predModeIntra <= 44 3
45 <= predModeIntra <= 55 2
56 <= predModeIntra <= 66 1
67 <= predModeIntra <= 80 4
표 1은, 5개의 비분리 변환 세트가 존재할 때, 인트라 예측 모드 별로 비분리 변환 세트를 할당하는 예시를 보여준다. predModeIntra의 값은 WAIP를 고려한 인트라 예측 모드의 값을 의미하며, TrSetIdx는 특정 비분리 변환 세트를 나타내는 인덱스이다. 표 1에서 인트라 예측 모드에 따라 서로 대칭되는 방향에 위치하는 모드들에 동일한 비분리 변환 세트가 적용되는 것을 확인할 수 있다. 표 1은 5개의 비분리 변환 세트를 사용하는 일예에 불과하며, 비분리 변환을 위한 전체 비분리 변환 세트의 개수를 한정하지 않는다.
또는, 표 2와 같이, 압축 성능을 위해 WAIP에 대해서는 비분리 변환을 적용하지 않을 수도 있다.
predModeIntra TrSetIdx
0 <= predModeIntra <= 1 0
2 <= predModeIntra <= 12 1
13 <= predModeIntra <= 23 2
24 <= predModeIntra <= 44 3
45 <= predModeIntra <= 55 2
56 <= predModeIntra <= 66 1
또는, 표 3과 같이, WAIP에 대해 별도의 비분리 변환 세트를 구성하지 않고, 인접한 인트라 예측 모드에 대응하는 비분리 변환 세트가 공유될 수도 있다.
predModeIntra TrSetIdx
predModeIntra < 0 1
0 <= predModeIntra <= 1 0
2 <= predModeIntra <= 12 1
13 <= predModeIntra <= 23 2
24 <= predModeIntra <= 44 3
45 <= predModeIntra <= 55 2
56 <= predModeIntra <= 80 1
상기 비분리 변환 세트는 복수의 변환 커널 후보를 포함할 수 있고, 복수의 변환 커널 후보 중 어느 하나가 선택적으로 이용될 수 있다. 이를 위해, 비트스트림을 통해 시그날링되는 인덱스가 이용될 수 있다. 또는, 현재 블록의 컨텍스트 정보에 기초하여, 복수의 변환 커널 후보 중 어느 하나가 묵시적으로 결정될 수도 있다. 여기서, 컨텍스트 정보는, 현재 블록의 크기 또는 주변 블록에 비분리 변환이 적용되는지 여부를 의미할 수 있다. 여기서, 현재 블록의 크기는, 너비, 높이, 너비와 높이의 최대값/최소값, 너비와 높이의 합, 또는 너비와 높이의 곱으로 정의될 수 있다.
이하, 현재 블록의 역변환을 위한 변환 커널을 결정하는 방법에 대해서 자세히 살펴보도록 한다.
실시예 1
전술한 바와 같이, 역변환은 분리 변환과 비분리 변환으로 구분될 수 있다. 분리 변환은 2차원 블록에 대해 수평 방향과 수직 방향에 대해 각각 변환을 수행하는 것을 의미하고, 비분리 변환은 2차원 블록 전체 또는 일부 영역을 구성하는 샘플들에 대해 한 번의 변환을 수행하는 것을 의미할 수 있다. 분리 변환을 표기할 때, 수평 변환과 수직 변환의 쌍(pair)으로 표기할 수 있으며, 본 개시에서는 (수평 변환, 수직 변환)과 같이 나타내기로 한다.
현재 블록의 역변환을 위해 복수의 변환 세트가 정의될 수 있다. 각 변환 세트는, 하나 또는 그 이상의 변환 커널 후보를 포함할 수 있다.
예를 들어, (DST-7, DST-7), (DCT-8, DST-7), (DST-7, DCT-8), 또는 (DCT-8, DCT-8) 중 어느 하나가 분리 변환으로서 적용될 수 있으며, 해당 4개의 변환 커널 후보가 하나의 변환 세트로 간주될 수 있다. 또한, (DCT-2, DCT-2)가 하나의 변환 세트로 간주될 수 있다. 변환을 적용하지 않는 변환 스킵도 하나의 변환 세트로 간주될 수 있고, (DCT-2, DCT-2)와 변환 스킵이 하나의 변환 세트로 간주될 수 있다. 본 개시에서 변환 커널(transform kernel)은 하나의 변환(e.g., DCT-2, DST-7)을 지칭할 수도 있고, 2개의 변환 쌍(e.g., (DCT-2, DCT-2))을 지칭할 수도 있다.
또 다른 변환 세트의 예로서, 전술한 비분리 변환 세트가 있을 수 있다. 본 개시에서는 일차 변환으로서 적용되는 비분리 변환을 Non-Separable Primary Transform(NSPT)으로 표기할 수 있다. NSPT에서는, 복수의 비분리 변환 세트가 구성될 수 있고, 각 비분리 변환 세트는 변환 커널 후보로서 하나 또는 그 이상의 변환 커널들을 포함할 수 있다. NSPT의 경우, 인트라 예측 모드에 따라 복수의 비분리 변환 세트 중 어느 하나가 선택되며, NSPT를 위한 복수의 비분리 변환 세트를 NSPT 세트 리스트라고 표기할 수 있다. 이는 앞서 살펴본 바와 같으며, 여기서 자세한 설명은 생략하기로 한다.
기-정의된 복수의 변환 세트로부터 현재 블록이 이용 가능한 하나 또는 그 이상의 변환 세트의 그룹을 구성할 수 있다. 상기 하나 또는 그 이상의 변환 세트의 그룹은, 현재 블록이 속한 소정의 영역 단위로 구성될 수 있으며, 이하 컬렉션(collection)이라 부르기로 한다. 여기서, 소정의 영역 단위는, 픽쳐, 슬라이스, 코딩 트리 유닛 행(CTU row), 또는 코딩 트리 유닛(CTU) 중 적어도 하나일 수 있다.
예를 들어, (DCT-2, DCT-2)으로 구성된 변환 세트를 S1, (DST-7, DST-7), (DCT-8, DST-7), (DST-7, DCT-8) 및 (DCT-8, DCT-8)으로 구성된 변환 세트를 S2라 각각 부르기로 한다. 또한, 전술한 NSPT 세트 리스트는 N개의 비분리 변환 세트를 포함할 수 있으며, N개의 비분리 변환 세트를 S3,1, S3,2, ..., S3,N라 각각 부르기로 한다. 여기서, N은 35일 수 있으나, 이에 한정되지 아니한다.
현재 블록의 인트라 예측 모드에 의해 S3,13이 NSPT를 위한 비분리 변환 세트로 선택된 경우, 현재 블록에 적용 가능한 변환 커널은 S1, S2, 또는 S3,13 중 어느 하나에 속한 것일 수 있다. 이 경우, 현재 블록이 이용 가능한 컬렉션을 {S1, S2, S3,13}으로 표기할 수 있다.
전술한 바와 같이, 본 개시에 따른 컬렉션은 현재 블록이 이용 가능한 하나 또는 그 이상의 변환 세트의 그룹이므로, 현재 블록의 컨텍스트에 따라 상기 컬렉션은 상이하게 구성될 수 있다. 여기서, 컨텍스트는 형태, 크기, 또는 인트라 예측 모드 중 적어도 하나를 포함할 수 있다. 만약, 총 K개의 컨텍스트가 정의되는 경우, K개의 컬렉션이 생성될 수 있으며, 각 컬렉션은 Ci로 표기될 수 있다(i=1, 2, ... , N). 예를 들어, NSPT가 적용될 수 있는 블록의 크기가 4x4, 8x8, 16x16, 32x32이고, 인트라 예측 모드에 의해 총 35개의 비분리 변환 세트 중 어느 하나가 선택되는 경우, 만약 블록의 크기마다 적용되는 변환 커널이 다르다면 총 4 x 35 = 140개의 컨텍스트가 정의될 수 있다.
현재 블록의 컨텍스트를 기반으로 하나의 컬렉션이 구성될 수 있고, 이때, 해당 컬렉션에 속한 복수의 변환 세트 중 어느 하나를 선택하고, 선택된 변환 세트에 속한 복수의 변환 커널 후보 중 어느 하나를 선택하는 과정이 수행될 수 있다. 여기서, 변환 세트와 변환 커널 후보의 선택은, 현재 블록의 컨텍스트를 기반으로 묵시적으로 수행되거나, 명시적으로 시그날링되는 인덱스를 기반으로 수행될 수도 있다. 또는, 컬렉션에 속한 복수의 변환 세트 중 어느 하나를 선택하는 과정과 선택된 변환 세트에 속한 복수의 변환 커널 후보 중 어느 하나를 선택하는 과정은 각각 수행될 수도 있다. 예를 들어, 변환 세트를 선택하기 위한 인덱스를 먼저 시그날링되어 이를 기반으로 컬렉션에 속한 복수의 변환 세트 중 어느 하나를 선택할 수 있다. 그런 다음, 변환 세트에 속한 복수의 변환 커널 후보 중 어느 하나를 지시하는 인덱스가 시그날링될 수 있고, 시그날링된 인덱스를 기반으로 변환 세트로부터 어느 하나의 변환 커널 후보를 선택할 수 있다. 선택된 변환 커널 후보를 기반으로 현재 블록의 변환 커널이 결정될 수 있다. 또는, 컬렉션으로부터 어느 하나의 변환 세트의 선택은 현재 블록의 컨텍스트에 기초하여 묵시적으로 수행되고, 선택된 변환 세트로부터 어느 하나의 변환 커널 후보의 선택은 시그날링된 인덱스를 기반으로 수행될 수 있다. 또는, 컬렉션으로부터 어느 하나의 변환 세트의 선택은 시그날링된 인덱스를 기반으로 수행되고, 선택된 변환 세트로부터 어느 하나의 변환 커널 후보의 선택은 현재 블록의 컨텍스트에 기초하여 묵시적으로 수행될 수 있다. 또는, 컬렉션으로부터 어느 하나의 변환 세트의 선택은 현재 블록의 컨텍스트에 기초하여 묵시적으로 수행되고, 선택된 변환 세트로부터 어느 하나의 변환 커널 후보의 선택 역시 현재 블록의 컨텍스트에 기초하여 묵시적으로 수행될 수 있다. 물론, 컬렉션에 속한 변환 세트의 개수가 1개인 경우, 변환 세트를 선택하기 위한 인덱스가 시그날링되지 않을 수 있다. 마찬가지로, 선택된 변환 세트에 속한 변환 커널 후보의 개수가 1개인 경우, 해당 변환 커널 후보를 지시하기 위한 인덱스가 시그날링되지 않을 수 있다. 또는, 현재 컬렉션에 속한 모든 변환 커널 후보 중 어느 하나를 지시하는 인덱스가 시그날링될 수도 있다. 이 경우, 컬렉션으로부터 어느 하나의 변환 세트를 선택하는 과정이 생략될 수 있다. 이때, 컬렉션에 속한 모든 변환 세트는 우선 순위를 고려하여 재배열될 수 있다. 예를 들어, truncated unary 코드와 같이, 작은 값의 인덱스에 대해 작은 길이의 바이너리 코드를 할당하는 경우, 코딩 성능의 향상에 보다 유리한 변환 커널 후보에 대해 작은 값의 인덱스를 할당하는 것이 유리할 수 있다. 컬렉션에 속한 모든 변환 커널 후보를 우선 순위에 따라 재배열할 때(shuffling), 컬렉션마다 다른 shuffling을 적용할 수도 있다. 또한, 컬렉션에 속한 모든 변환 커널 후보를 재배열하는 것이 아니라, 일부만을 선택적으로 재배열할 수도 있다.
실시예 2
현재 블록의 역변환을 위한 변환 커널은 MTS(Multiple Transform Selection)을 기반으로 결정될 수 있다.
본 개시에 따른 MTS는 DST-7, DCT-8, DCT-5, DST-4, DST-1, 또는 IDT(identity transform, 항등 변환) 중 적어도 하나를 변환 커널로 이용할 수 있다. 또한, 본 개시에 따른 MTS는 DCT-2의 변환 커널을 더 포함할 수도 있다.
본 개시에서, MTS를 위한 복수의 MTS 세트가 정의될 수 있다. 현재 블록의 크기 및/또는 인트라 예측 모드에 기초하여, 복수의 MTS 세트 중 어느 하나가 결정될 수 있다. 예를 들어, 어느 하나의 MTS 세트를 결정함에 있어서, 16개의 변환 블록 크기가 고려될 수 있고, 방향성 모드에 대해서는 변환 블록의 형태와 인트라 예측 모드들 간의 대칭성이 고려될 수 있다. WAIP(Wide Angle Intra Prediction)의 모드(즉, -1번 내지 -14번(또는 -15번), 67번 내지 80번(또는 81번))의 경우, -1번 내지 -14번(또는 -15번) 모드에 대해서는 2번 모드에 대응하는 MTS 세트를 적용하고, 67번 내지 80번(또는 81번) 모드에 대해서는 66번 모드에 대응하는 MTS 세트를 적용할 수 있다. MIP(Matrix-based Intra Prediction) 모드에 대해서는 별도의 MTS 세트가 할당될 수 있다.
예를 들어, 변환 블록 크기와 인트라 예측 모드에 따른 MTS 세트는 다음 표 4와 같이 할당/정의될 수 있다.
블록 크기 인트라 예측 모드
너비 높이 [0, 1] [2, 12] [13, 23] [24, 34] MIP
4 4 0 1 2 3 4
4 8 5 6 7 8 9
4 16 10 11 12 13 14
4 32 15 16 17 18 19
8 4 20 21 22 23 24
8 8 25 26 27 28 29
8 16 30 31 32 33 34
8 32 35 36 37 38 39
16 4 40 41 42 43 44
16 8 45 46 47 48 49
16 16 50 51 52 53 54
16 32 55 56 57 58 59
32 4 60 61 62 63 64
32 8 65 66 67 68 69
32 16 70 71 72 73 74
32 32 75 76 77 78 79
표 4는 16가지의 변환 블록 크기와 인트라 예측 모드에 따른 MTS 세트의 할당을 보여준다. 기-정의된 MTS 세트의 개수는 80개이며, 80개의 MTS 세트 중 어느 하나를 지시하는 인덱스는 표 4와 같이 0부터 79까지를 가질 수 있다.
MTS 세트 인덱스 변환 커널 후보 인덱스
0 1 2 3 4 5
0 18 24 17 23 8 12
1 18 3 7 22 0 16
2 18 2 17 22 3 23
3 18 3 15 17 12 23
4 18 12 3 19 10 13
5 18 12 19 23 13 24
6 18 12 17 2 3 23
7 18 2 17 22 12 23
8 18 2 11 17 22 23
9 18 12 19 23 3 10
10 16 12 13 24 7 8
11 16 2 11 23 12 18
12 13 17 2 22 12 18
13 17 11 2 21 12 18
14 16 13 19 22 3 10
15 18 12 13 7 14 22
16 16 12 11 1 18 22
17 17 13 3 22 12 18
18 6 12 1 22 13 17
19 16 12 13 15 2 23
20 18 24 23 19 12 17
21 18 24 2 17 0 23
22 17 3 4 22 2 13
23 18 12 19 23 3 15
24 18 12 19 23 3 10
25 6 12 18 24 13 19
26 6 12 2 21 13 18
27 17 11 1 22 2 18
28 16 17 3 11 12 23
29 8 12 19 23 11 24
30 16 13 7 23 12 19
31 6 12 1 11 18 22
32 17 11 1 21 12 18
33 6 11 17 21 12 18
34 8 11 14 17 12 22
35 6 12 11 21 14 16
36 6 12 11 1 17 21
37 6 12 11 2 17 21
38 6 11 21 1 12 17
39 16 12 11 7 1 5
40 8 12 19 24 11 17
41 18 13 1 22 2 24
42 6 2 17 21 19 22
43 16 12 11 19 8 15
44 8 12 17 24 13 15
45 6 12 19 21 17 18
46 6 12 13 21 2 18
47 16 2 17 21 1 11
48 6 17 19 23 12 16
49 6 12 14 17 8 22
50 6 7 11 21 9 12
51 16 12 11 1 7 21
52 6 12 11 1 17 21
53 6 12 11 21 1 16
54 8 7 9 11 12 21
55 6 12 7 11 14 21
56 6 12 7 11 1 21
57 16 12 11 1 2 21
58 6 11 17 21 1 12
59 6 12 7 11 9 21
60 18 12 14 21 6 21
61 16 11 1 22 2 17
62 16 11 1 22 2 17
63 16 13 15 7 14 19
64 8 12 1 19 16 23
65 6 12 7 9 13 21
66 6 12 13 2 7 18
67 16 12 1 21 11 17
68 16 11 7 19 12 15
69 8 12 7 11 14 21
70 6 12 7 11 8 9
71 6 12 7 11 2 21
72 6 12 1 11 21 22
73 6 7 11 16 9 12
74 6 12 7 11 9 21
75 6 12 7 11 13 17
76 6 12 11 21 2 7
77 6 12 1 11 2 7
78 6 12 7 11 16 21
79 6 12 7 11 9 16
표 5는, 표 4에서 살펴본 각 MTS 세트에 포함되는 변환 커널 후보를 나타낸다. 각 MTS 세트는 6개의 변환 커널 후보로 구성될 수 있다. 변환 커널 후보 인덱스는 0 내지 5 중 어느 하나의 값을 가지며, 상기 6개의 변환 커널 후보 중 어느 하나를 지시할 수 있다. 여기서, 각 변환 커널 후보는 분리 변환을 위한 수평 변환 커널과 수직 변환 커널의 조합일 수 있고, 0 내지 24의 인덱스를 가진 25개의 변환 커널 후보가 정의될 수 있다.
커널 조합
인덱스
인트라 예측 모드의 값이 35 미만인 경우 인트라 예측 모드의 값이 35 이상인 경우
0 (DCT-8, DCT-8) (DCT-8, DCT-8)
1 (DST-7, DCT-8) (DCT-8, DST-7)
2 (DCT-5, DCT-8) (DCT-8, DCT-5)
3 (DST-4, DCT-8) (DCT-8, DST-4)
4 (DST-1, DCT-8) (DCT-8, DST-1)
5 (DCT-8, DST-7) (DST-7, DCT-8)
6 (DST-7, DST-7) (DST-7, DST-7)
7 (DCT-5, DST-7) (DST-7, DCT-5)
8 (DST-4, DST-7) (DST-7, DST-4)
9 (DST-1, DST-7) (DST-7, DST-1)
10 (DCT-8, DCT-5) (DCT-5, DCT-8)
11 (DST-7, DCT-5) (DCT-5, DST-7)
12 (DCT-5, DCT-5) (DCT-5, DCT-5)
13 (DST-4, DCT-5) (DCT-5, DST-4)
14 (DST-1, DCT-5) (DCT-5, DST-1)
15 (DCT-8, DST-4) (DST-4, DCT-8)
16 (DST-7, DST-4) (DST-4, DST-7)
17 (DCT-5, DST-4) (DST-4, DCT-5)
18 (DST-4, DST-4) (DST-4, DST-4)
19 (DST-1, DST-4) (DST-4, DST-1)
20 (DCT-8, DST-1) (DST-1, DCT-8)
21 (DST-7, DST-1) (DST-1, DST-7)
22 (DCT-5, DST-1) (DST-1, DCT-5)
23 (DST-4, DST-1) (DST-1, DST-4)
24 (DST-1, DST-1) (DST-1, DST-1)
표 6은, 표 5에서 살펴본 25개의 변환 커널 후보의 일예이다. 구체적으로, 변환 커널 후보의 수평 변환과 수직 변환은 (수평 변환, 수직 변환)로 표시되고 있다. 각 변환 커널 후보 인덱스에 대해서, 인트라 예측 모드가 35 미만인 경우의 수평/수직 변환은 인트라 예측 모드가 35 이상인 경우의 수평/수직 변환과 서로 반대일 수 있다. 인트라 예측 모드의 값이 35 이상일 경우, 34번 모드를 중심으로 대칭인 모드를 유도하고, 해당 모드를 기반으로 상기 표 4로부터 MTS 세트를 선택할 수 있다. 또한, 블록 형태의 대칭성이 추가적으로 고려될 수 있다. 원래 변환 블록이 WxH 크기를 가진 경우, 원래 변환 블록을 대칭시켜 HxW 크기를 가진 것으로 간주하고, 표 4로부터 MTS 세트를 선택할 수 있다. 여기서, 인트라 예측 모드의 값은 수정된 인트라 예측 모드의 값일 수 있다. 즉, WAIP을 위한 모드 값으로서, -14번(또는 -15번)부터 -1번까지는 2번 모드로 수정하고, 67번부터 80번(또는 81번)까지는 66번 모드로 수정하며, 나머지 모드는 원래 인트라 예측 모드의 값을 그대로 수정된 인트라 예측 모드의 값으로 설정할 수 있다. 이 경우, WAIP를 위한 확장된 모드들도 34번 모드를 중심으로 하여 대칭으로 구성되기 때문에, Planar 모드와 DC 모드를 제외한 모든 방향성 모드에 대해서는 34번 모드를 중심으로 하는 대칭성을 이용할 수 있다.
예를 들어, 16x32 블록이 54번 모드로 예측되는 경우, 54번에 대칭되는 모드로서 14번 모드(=68-54)가 유도되고, 블록 크기가 32x16으로 간주될 수 있다. 이 경우, 표 4에 정의된 바와 같이, 72의 인덱스를 가진 MTS 세트가 선택될 수 있다.
MIP 모드가 적용되는 경우, 블록 형태의 대칭성을 고려하지 않고, 현재 블록의 크기를 기반으로 MIP 모드에 할당된 MTS 세트가 선택될 수 있다. 또는, MIP 모드가 적용되는 경우, 블록 형태의 대칭성을 고려하여, 대칭되는 블록 크기를 기반으로 MIP 모드에 할당된 MTS 세트가 선택될 수도 있다. 예를 들어, 8x16 블록에 대해 MIP 모드가 적용되는 경우, 8x16 블록은 이에 대칭되는 16x8 블록으로 간주될 수 있고, 표 4에 정의된 바와 같이, 49의 인덱스를 가진 MTS 세트가 선택될 수 있다. 또는, MIP 모드가 적용되는 경우, 인트라 예측 모드는 Planar 모드로 간주될 수 있다. 이 경우, 블록 형태의 대칭성을 고려하지 않고, 현재 블록의 크기를 기반으로 MIP 모드에 할당된 MTS 세트가 선택될 수 있다. 또는, 블록 형태의 대칭성을 고려하여, 대칭되는 블록 크기를 기반으로 MIP 모드에 할당된 MTS 세트가 선택될 수도 있다.
MIP 모드의 경우, MIP 모드가 transpose 모드로 적용되는지 여부를 나타내는 플래그가 이용될 수 있다. MxN의 현재 블록에 MIP 모드가 적용되고 상기 플래그가 transpose 모드의 적용을 지시하는 경우, 인트라 예측 모드는 Planar 모드로 간주되고, MxN의 현재 블록은 NxM 블록으로 간주될 수 있다. 즉, 표 4로부터, NxM의 블록 크기와 Planar 모드에 대응하는 MTS 세트가 선택될 수 있다. 표 6에서 살펴본 바와 같이, 인트라 예측 모드의 값이 35 이상인 경우 수평 변환과 수직 변환을 서로 바꾸게 되나, 현재 블록의 인트라 예측 모드가 Planar 모드로 간주되므로 변환 커널 후보의 수평 변환과 수직 변환을 서로 바꾸지 않을 수 있다. 또는, MxN의 현재 블록에 MIP 모드가 적용되고 상기 플래그가 transpose 모드의 적용을 지시하는 경우, 인트라 예측 모드는 Planar 모드로 간주되지 않고, MxN의 현재 블록은 NxM 블록으로 간주될 수 있다. 즉, 표 4로부터, NxM의 블록 크기와 MIP 모드에 대응하는 MTS 세트가 선택될 수도 있다.
표 5에서, 변환 커널 후보 인덱스에 의해 선택된 변환 커널 후보가 현재 블록의 변환 커널로 설정될 수 있다. 또는, 현재 블록의 크기에 따라, 상기 선택된 변환 커널 후보의 수평 변환 또는 수직 변환 중 적어도 하나가 다른 변환 커널로 변경될 수도 있다. 예를 들어, 변환 커널 후보 인덱스가 3이고, 현재 블록의 너비와 높이가 모두 16 이하인 경우, 3인 변환 커널 후보 인덱스에 대응하는 변환 커널 후보의 수평 변환 또는 수직 변환 중 적어도 하나가 다른 변환 커널로 변경될 수 있다. 이때, 수평 변환과 수직 변환이 서로 독립적으로 변경될 수 있다. 현재 블록의 인트라 예측 모드의 값과 수평 모드의 값 간의 차이(또는 차이의 절대값)가 소정의 문턱값 이하인 경우, 상기 선택된 변환 커널 후보의 수직 변환은 IDT(항등 변환)으로 변경될 수 있다. 현재 블록의 인트라 예측 모드의 값과 수직 모드의 값 간의 차이(또는 차이의 절대값)가 소정의 문턱값 이하인 경우, 상기 선택된 변환 커널 후보의 수평 변환은 IDT(항등 변환)으로 변경될 수 있다. 여기서, 문턱값은 현재 블록의 너비와 높이에 기초하여 다음 표 7과 같이 결정될 수 있다.
블록 크기 문턱값
너비 높이
4 4 8
4 8 6
4 16 4
8 4 8
8 8 8
8 16 6
16 4 4
16 8 2
16 16 -1
표 7은, 변환 커널 후보 인덱스에 의해 선택된 변환 커널 후보의 수평 변환 및/또는 수직 변환을 다른 변환 커널로 변경하기 위한 것으로서, 변환 블록의 크기에 따른 문턱값을 정의한다.
하나의 MTS 세트를 구성하는 6개의 변환 커널 후보는 표 5에 정의된 바와 같이 0 내지 5의 변환 커널 후보 인덱스로 구분될 수 있다. 해당 변환 커널 후보 인덱스는 비트스트림을 통해 시그날링될 수 있다. MTS 세트의 가용/적용 여부를 나타내는 플래그(MTS enabled flag 또는 MTS flag)가 시그날링될 수 있고, 상기 플래그가 MTS 세트의 가용/적용을 지시하는 경우에 변환 커널 후보 인덱스가 시그날링될 수 있다. 상기 MTS flag는 1개의 빈(bin)으로 구성될 수 있고, 해당 빈에 대해 1개 이상의 CABAC 기반의 엔트로피 코딩을 위한 컨텍스트(이하, CABAC context라 함)가 할당될 수 있다. 예를 들어, MIP 모드가 아닌 경우와 MIP 모드인 경우에 대해 각각 다른 CABAC context가 할당될 수 있다.
전술한 현재 블록의 컨텍스트에 따라, 현재 블록이 이용 가능한 변환 커널 후보의 개수가 상이하게 설정될 수 있다. 예를 들어, 현재 블록의 컨텍스트로서, 현재 블록 내 전부 또는 일부 변환 계수의 절대값의 합이 고려될 수 있다. 해당 변환 계수의 절대값의 합을 AbsSum이라 지칭하기로 한다. AbsSum이 T1보다 작거나 같은 경우, 0의 변환 커널 후보 인덱스에 대응하는 1개의 변환 커널 후보만이 이용 가능할 수 있다. AbsSum이 T1보다 크고 T2보다 작거나 같은 경우, 0 내지 3의 변환 커널 후보 인덱스에 대응하는 4개의 변환 커널 후보가 이용 가능할 수 있다. AbsSum이 T2보다 큰 경우, 0 내지 5의 변환 커널 후보 인덱스에 대응하는 6개의 변환 커널 후보가 이용 가능할 수 있다. 여기서, T1은 6이고, T2는 32일 수 있으나, 이는 일예에 불과하다.
AbsSum이 T1보다 작거나 같은 경우, 현재 블록이 이용 가능한 변환 커널 후보의 개수가 1개이므로, 변환 커널 후보 인덱스의 시그날링없이, 0의 변환 커널 후보 인덱스에 대응하는 변환 커널 후보가 현재 블록의 변환 커널로 설정될 수 있다. AbsSum이 T1보다 크고 T2보다 작거나 같은 경우 4개의 변환 커널 후보가 이용 가능하므로, 2개의 빈을 가진 변환 커널 후보 인덱스를 기반으로 4개의 변환 커널 후보 중 어느 하나가 선택될 수 있다. 즉, 0 내지 3의 변환 커널 후보 인덱스는 각각 00, 01, 10, 11로 시그날링될 수 있다. 상기 2개의 빈에 대해서 MSB(Most Significant Bit)가 먼저 시그날링되고, LSB(Least Significant Bit)가 나중에 시그날링될 수 있다. 각 빈에 대해서 서로 다른 CABAC context가 할당될 수 있다. 예를 들어, 2개의 빈에 대해서 상기 MTS flag를 위해 할당된 CABAC context가 아닌 다른 CABAC context를 각 빈마다 할당할 수 있다. 또는, 2개의 빈에 대해서 CABAC context가 할당되지 않고 bypass 코딩이 적용될 수도 있다. AbsSum이 T2보다 큰 경우 변환 커널 후보 인덱스는 0 내지 5의 값을 가지므로, 2개의 빈만으로는 변환 커널 후보 인덱스를 표현할 수 없다. 이 경우, truncated binary 코딩과 같이 2개 이상의 빈을 할당하여 변환 커널 후보 인덱스를 표현할 수 있다. 상기 truncated binary 코딩 방식에 의해 할당되는 각각의 빈에 대해서, CABAC context가 할당될 수도 있고, CABAC context의 할당없이 bypass 코딩이 적용될 수도 있다. 또는, 복수의 빈 중 일부(예를 들어, 첫번째 빈, 또는 첫번째 및 두번째 빈)에 대해서 CABAC context가 할당되고, 나머지 빈에 대해서 bypass 코딩이 적용될 수도 있다.
실시예 3
현재 블록의 변환 커널은 하나 또는 그 이상의 변환 커널 후보를 포함하는 변환 세트를 기반으로 결정될 수 있다. 현재 블록의 변환 커널은 상기 변환 세트에 속한 하나 또는 그 이상의 변환 커널 후보 중 어느 하나로 유도될 수 있다.
현재 블록의 변환 커널을 결정하는 과정은, 1) 현재 블록의 변환 세트를 결정하는 과정 또는 2) 현재 블록의 변환 세트로부터 어느 하나의 변환 커널 후보를 선택하는 과정 중 적어도 하나를 포함할 수 있다. 상기 변환 세트를 결정하는 과정은, 인코딩 장치와 디코딩 장치에 동일하게 기-정의된 복수의 변환 세트 중 어느 하나를 선택하는 과정일 수 있다. 또는, 상기 변환 세트를 결정하는 과정은, 인코딩 장치와 디코딩 장치에 동일하게 기-정의된 복수의 변환 세트 중에서 현재 블록이 이용 가능한 하나 또는 그 이상의 변환 세트를 구성하고, 구성된 변환 세트 중 어느 하나를 선택하는 과정일 수 있다. 또는, 상기 변환 세트를 결정하는 과정은, 인코딩 장치와 디코딩 장치에 동일하게 기-정의된 복수의 변환 커널 후보 중에서 현재 블록이 이용 가능한 변환 커널 후보를 기반으로 하나의 변환 세트를 구성하는 과정일 수 있다.
현재 블록의 변환 세트에 복수의 변환 커널 후보가 포함되는 경우, 현재 블록에 대해 복수의 변환 커널 후보 중 어느 하나를 선택하는 과정이 수행될 수 있다. 다만, 현재 블록의 변환 세트에 1개의 변환 커널 후보가 포함된 경우(즉, 현재 블록이 이용 가능한 변환 커널 후보가 1개인 경우), 현재 블록의 변환 커널은 해당 변환 커널 후보로 설정될 수 있다.
본 개시에 따른 변환 세트는, 전술한 실시예 1에서의 (비분리) 변환 세트를 의미하거나, 실시예 2에서의 MTS 세트를 의미할 수도 있다. 또는, 상기 변환 세트는, 실시예 1의 (비분리) 변환 세트 또는 실시예 2의 MTS 세트와 별개로 정의된 것일 수 있다. 이 경우, 상기 변환 세트는 변환 커널 후보로서 하나 또는 그 이상의 특정 변환 커널을 포함할 수 있다. 하나의 특정 변환 커널은, 수평 변환을 위한 변환 커널과 수직 변환을 위한 변환 커널의 쌍으로 정의되거나, 수평 및 수직 변환에 동일하게 적용되는 하나의 변환 커널로 정의될 수 있다.
본 개시의 실시예에서는, 일차 변환으로 적용되는 비분리 변환인 NSPT 적용 과정을 상세히 설명한다. NSPT는 변환 블록의 전부 또는 일부 영역에 적용될 수 있다. 순방향 NSPT를 기준으로, NSPT가 적용되는 영역에 존재하는 레지듀얼 샘플이 NSPT의 일차원 벡터로 입력될 수 있다. 즉, 한 변환 블록 전체 또는 일부 영역(본 개시에서, Region Of Interest, ROI라고 지칭함)에 존재하는 레지듀얼 샘플들을 일차원 벡터로 모아서 입력으로 구성할 수 있다. 이후, 순방향 NSPT를 적용하면 일차 변환 계수를 획득할 수 있다. 반대로, 일차 변환 계수에 대해 역방향 NSPT를 적용하면 일차원 벡터 출력을 획득할 수 있다. 해당 출력 벡터를 구성하는 각 엘리먼트 값을 2D 변환 블록 내부에 정해진 위치에 배치함으로써 ROI에 대한 레지듀얼 샘플을 획득할 수 있다.
NSPT를 위한 비분리 변환 커널은 ROI의 크기에 따라 행렬의 차원이 결정될 수 있다. 본 개시에서, 변환 커널은 변환 타입, 변환 행렬로 지칭될 수 있고, NSPT를 위한 비분리 변환 커널은 NSPT 커널로 지칭될 수 있다. 예를 들어, 현재 블록이 MxN 변환 블록이고, ROI가 MxN 변환 블록 전부의 영역이고, 정방형 NSPT가 적용되는 경우, 해당 변환 행렬의 차원은 MN x MN일 수 있다. 예를 들어, ROI가 8x8 변환 블록 전부의 영역인 경우, NSPT 커널의 차원은 64 x 64일 수 있다.
본 개시의 일 실시예에 따르면, NSPT를 인트라 예측에 의해 생성된 레지듀얼에 적용되는 경우, 인트라 예측 모드에 따라 NSPT 커널을 적응적으로 결정할 수 있다. 레지듀얼 블록에 대한 통계적 특성이 인트라 예측 모드마다 달라질 수 있기 때문에, 인트라 예측 모드에 따라 NSPT 커널을 적응적으로 결정함으로써 압축 효율을 높일 수 있다.
하나 이상의 인트라 예측 모드에 대해 적용되는 NSPT 커널을 공유하도록 구성할 수 있다. 전술한 바와 같이, 비분리 변환 세트는, 현재 블록의 인트라 예측 모드와 매핑 테이블을 기반으로 결정될 수 있다. 매핑 테이블은, 기-정의된 인트라 예측 모드들과 비분리 변환 세트들 간의 매핑 관계를 정의할 수 있다. 기-정의된 인트라 예측 모드들은 2개의 비방향성 모드와 65개의 방향성 모드들을 포함할 수 있다.
일 실시예로서, 인트라 예측 모드들을 인트라 예측 모드 그룹으로 그룹핑할 수 있다. 인트라 예측 모드 그룹에 1개의 NSPT 커널이 할당될 수도 있고, 복수 개의 NSPT 커널이 할당될 수도 있다. 다시 말해, 인트라 예측 모드 그룹에 하나 이상의 NSPT 커널을 포함하는 비분리 변환 세트(NSPT 세트)가 할당될 수 있다. 인트라 예측 모드에 비분리 변환 세트가 매핑되고, 비분리 변환 세트에 포함된 NSPT 커널 N개 중 하나가 선택될 수 있다.
일 예로서, 인트라 예측 그룹은 인접한 예측 모드들(e.g., 17, 18, 19번 모드)을 포함할 수 있다. 또한, 인트라 예측 그룹은 대칭성을 가지는 모드들을 포함할 수 있다. 예를 들어, 앞서 설명한 도 5의 대각 모드(즉, 34번 인트라 예측 모드)를 중심으로 방향성 모드들이 대칭을 이룰 수 있다. 이때, 대칭을 이루는 두 모드는 하나의 그룹(또는 페어)를 구성할 수 있다. 예를 들어, 18번 모드와 50번 모드는 34번 모드를 중심으로 대칭을 이루므로 동일한 그룹에 포함될 수 있다. 다만, 대칭성을 가지는 모드들에 대해서는 순방향 NSPT 커널을 적용하기 전에 2D 입력 블록을 전치시킨 후 일차원 입력 벡터를 구성하는 과정이 추가될 수 있다. 예를 들어, 인트라 예측 모드가 34 이하인 경우, 2D 입력 블록을 전치시키지 않고, 행 우선 방향(row first order)으로 해당 입력 블록으로부터 일차원 입력 벡터를 유도할 수 있다. 만약, 인트라 예측 모드가 34보다 큰 경우, 먼저 2D 입력 블록을 전치시킨 후, 행 우선 방향으로 해당 입력 블록을 읽거나, 2D 입력 블록을 그대로 두고 열 우선 방향(column first order)으로 해당 입력 블록을 읽음으로써 일차원 입력 벡터를 구성할 수 있다.
다음의 표 8은 인트라 예측 모드에 따른 NSPT 세트를 할당 매핑 테이블을 예시한다. 표 8을 참조하면, 0부터 34까지 총 35개의 NSPT 세트가 정의될 수 있다. 확장된 WAIP 모드(즉, 도 5에서 -14부터 -1까지 모드와 67부터 80까지의 모드)에는 가장 인접한 일반 방향성 모드에 할당된 NSPT 세트가 할당될 수 있다. 즉, 확장된 WAIP 모드에는 2번 NSPT 세트가 할당될 수 있다.
NSPT 세트는 하나 이상의 NSPT 커널(또는 커널 후보)을 포함할 수 있다. 즉, NSPT 세트는 N개의 NSPT 커널 후보를 포함할 수 있다. 일 예로, N은 1, 2, 3, 4 등의 1보다 같거나 큰 값으로 설정될 수 있다. NSPT 세트에 포함된 하나 이상의 NSPT 커널 중 현재 블록에 적용되는 커널을 인덱스를 이용하여 시그날링할 수 있다. 본 개시에서, 해당 인덱스는 NSPT 인덱스로 지칭될 수 있다. 일 예로서, NSPT 인덱스는 0, 1, 2, ... , N - 1의 값을 가질 수 있다.
또한, 일 실시예로서, NSPT 커널 후보의 개수가 1 개인 경우, NSPT 인덱스 값이 0으로 고정될 수 있다. 이 경우, NSPT 인덱스는 별도로 시그날링되지 않고 추론될 수 있다. 또한, NSPT 인덱스와 별개로 NSPT의 적용 여부를 지시하는 플래그가 시그날링될 수 있다. 본 개시에서, 해당 플래그는 NSPT 플래그로 지칭될 수 있다.
NSPT 플래그 값이 1인 경우, NSPT가 적용될 수 있다. NSPT 플래그 값이 0인 경우, NSPT가 적용되지 않을 수 있다. NSPT 플래그가 시그날링되지 않는 경우, NSPT 플래그 값은 0으로 추론될 수 있다. 일 예로서, NSPT 플래그 값이 1인 경우, NSPT 인덱스가 시그날링될 수 있다. 시그날링된 NSPT 인덱스에 기초하여 인트라 예측 모드에 의해 선택되는 NSPT 세트 내 포함된 N개의 커널 후보 중 하나가 특정될 수 있다.
일 실시예에서, NSPT 인덱스의 엔트로피 코딩 방법은 NSPT 세트에 포함된 NSPT 커널의 개수(N)를 고려하여 다양한 여러 방법으로 정의될 수 있다. 예를 들어, 0부터 N-1까지의 값을 빈 스트링으로 매핑하는 방법(i.e., 이진화 방법)으로서, 절삭형 단항 이진화(truncated unary binarization), 절삭형 이진화, 고정 길이 이진화 방법이 이용될 수 있다.
예를 들어, NSPT 세트를 구성하는 커널 후보의 개수 N 값이 2인 경우, 하나의 빈(bin)으로 2개의 후보 중 하나를 특정할 수 있다. 예를 들어, 0은 첫 번째 후보를 지시하고, 1은 두 번째 후보를 지시할 수 있다. 또한, N 값이 3이고 절삭형 단항 이진화를 적용하는 경우, 2개의 빈으로 후보가 특정될 수 있다. 예를 들어, 첫 번째, 두 번째, 세 번째 후보를 각각 0, 10, 11로 이진화하여 시그날링할 수 있다. 실시예로서, 이진화된 빈들은 컨텍스트 코딩(context coding) 또는 바이패스 코딩(bypass coding)을 이용하여 코딩될 수 있다.
본 개시에서는, 일차 변환으로 축소된 차원의 변환 커널을 이용하는 축소된 일차 변환(RPT, reduced primary transform) 방법을 설명한다. 전술한 바와 같이, 순방향 NSPT가 적용되는 경우, 2D 레지듀얼 블록에 속하는 샘플들은 행 우선 순위(또는 열 우선 순위)에 따라 1D 벡터로 배열(또는 재배열)될 수 있다. 이후, NSPT를 위한 변환 행렬이 배열된 벡터에 곱해질 수 있다. 해당 2D 레지듀얼 블록이 M x N 블록(M은 가로의 길이, N은 세로의 길이)일 때, 재배열된 1D 벡터의 길이는 M*N이 될 수 있다. 즉, 해당 2D 레지듀얼 블록은 M*N x 1 차원을 가진 열 벡터로 나타낼 수도 있다. 본 개시에서, M*N은 편의상 MN으로 표기될 수 있다. 이때, 해당 변환 행렬의 차원은 MN x MN일 수 있다. 정리하면, 순방향 NSPT는 MN x 1 벡터의 좌측에 해당 MN x MN 변환 행렬을 곱하여 MN x 1 변환 계수 벡터를 얻는 방식으로 동작할 수 있다.
RPT가 적용되는 경우, 상술한 순방향 NSPT 변환 행렬로서 MN x MN 행렬을 곱하는 것이 아니라, r x MN 행렬을 곱하여 r개의 변환 계수를 획득할 수 있다. 여기서, r은 변환 행렬의 행의 개수를 나타내고, MN은 변환 행렬의 열의 개수를 나타낸다. 본 개시의 실시예에 따르면, r 값은 MN보다 작거나 같게 설정될 수 있다. 즉, 기존의 순방향 NSPT 변환 행렬은 MN개의 행을 포함하며, 각 행은 1 x MN 행 벡터로서 해당 NSPT 변환 행렬의 변환 기저 벡터(transform basis vector)이다. 각 변환 기저 벡터 MN x 1 샘플 열 벡터를 곱하여 해당 변환 계수가 획득될 수 있다.
기존의 순방향 NSPT 변환 행렬은 MN개의 행 벡터로 구성되므로, 순방향 NSPT의 적용을 통해 MN개의 변환 계수(즉, MN x 1 변환 계수 열 벡터)가 획득될 수 있다. 한편, 순방향 RPT의 경우, MN개의 변환 기저 벡터 대신에 r개의 변환 기저 벡터로 변환 행렬이 구성될 수 있다. 이에 따라, 순방향 RPT가 적용되는 경우, MN개 대신 r개의 변환 계수(즉, r x 1 변환 계수 열 벡터)가 획득될 수 있다.
MN x MN 순방향 NSPT 커널을 구성하는 변환 기저 벡터들 중 일부인 r개의 변환 기저 벡터를 선택하여 RPT 커널을 구성할 수 있다. 본 개시에서, 변환 커널은 변환 타입, 변환 행렬로 지칭될 수 있고, NSPT를 위한 비분리 변환 커널은 RPT 커널로 지칭될 수 있다. 즉, MN x MN 순방향 NSPT 커널로부터 r개의 1 x MN 행 벡터들을 선택하는 경우, 코딩 성능 관점에서 가장 중요한 변환 기저 벡터들을 선택하는 것이 유리할 수 있다. 구체적으로, 변환을 통한 에너지 압축(energy compaction) 측면에서, 순방향 NSPT 변환 행렬을 곱하여 먼저 등장하는 변환 계수들에 보다 큰 에너지가 몰릴 수 있다. 다시 말해, 순방향 NSPT 변환 행렬 상측에 위치하는 변환 기저 벡터일수록 보다 큰 에너지를 가지는 변환 계수를 생성할 수 있다. 이러한 점을 감안하여, 순방향 NSPT 커널의 상측부터 r개를 취하여 r x MN 순방향 RPT 커널을 구성(또는 유도)할 수 있다.
본 개시에 따른 RPT는 기존의 NSPT를 적용하여 획득되는 변환 계수들 중 일부(i.e., r개)만을 취하는 것으로서, 원래 신호가 가지는 에너지 중 일부에 대한 손실이 발생할 수 있다. 즉, 해당 과정을 통해 원본 신호와 본래 신호 사이의 왜곡이 발생할 수 있다. 그럼에도, RPT를 적용함으로써, MN개 대신에 r개의 변환 계수만이 생성되므로, 해당 변환 계수들을 코딩하는데 드는 비트 양을 줄일 수 있다. 그렇기 때문에, 적은 개수의 변환 계수들에 에너지가 많이 몰리는 신호의 경우(e.g., 영상 레지듀얼 신호), 시그날링 비트를 줄임으로써 얻는 이득이 현저히 클 수 있고, 이를 통해 코딩 성능을 향상시킬 수 있다.
역방향 NSPT는 변환 행렬로서 상술한 순방향 NSPT 커널의 전치 행렬일 수 있다. 이때, 입력 데이터는 레지듀얼 신호와 같은 샘플 신호 대신 변환 계수 신호일 수 있다. 구체적으로, 순방향 NSPT 변환 행렬이 G이고 1D 벡터로 재배열된 샘플 신호가 x이면, 해당 변환 행렬을 좌측에 곱하여 획득되는 변환 계수 벡터는 다음의 수학식 4와 같이 표현될 수 있다.
수학식 4를 참조하면, x와 y는 MN x 1 열 벡터일 수 있다. G는 MN x MN 행렬의 형태를 가질 수 있다. 역방향 NSPT 과정은 같은 변수를 이용하여 다음의 수학식 5과 같이 표현될 수 있다.
수학식 5에서, GT는 G의 전치 행렬(Transpose matrix)을 의미한다. 본 개시에 따른 순방향 RPT 연산 및 역방향 RPT 연산 또한 상기 두 수학식으로 표현될 수 있다. 다만, RPT가 적용되는 경우, y는 MN x 1 열 벡터 대신에 r x 1 열 벡터이고, G는 MM x MN 행렬 대신에 r x MN 행렬이다. 즉, NSPT 대신에 RPT를 적용하더라도 샘플 신호(e.g., 영상 레지듀얼 신호)의 차원은 변하지 않는데, 이는 역방향 RPT를 통해 r개의 변환 계수만 가지고도 원래 개수의 샘플 신호(즉, MN 개의 샘플 신호)를 복원할 수 있음을 의미할 수 있다. 즉, MN개 보다 적은 r개의 변환 계수만을 코딩하여 원래의 MN개의 샘플 신호를 복원할 수 있어 코딩 성능의 향상을 가져올 수 있다.
본 개시의 일 실시예에서는, 레지듀얼 블록의 통계적 특성을 고려하여 r 값을 정의하고, 정의된 r 값에 따라 결정되는 감소된 크기의 레지듀얼 블록으로부터 기존 변환 블록 크기의 레지듀얼 블록을 유도하는 RPT 구조를 제안한다. 만약 일차 변환 계수의 통계적 분포를 예측하기 위하여 추가적인 다른 변환(i.e., 이차 변환)을 적용하는 경우, 일차 변환 계수에 양자화 과정이 적용이 되므로 상대적으로 낮은 주파수 영역에 양자화된 논-제로 계수들(quantized non-zero coefficients)이 집중하여 존재할 수 있다. 이에 따라, 일차 변환 계수의 통계적 분포를 위한 축소된 이차 변환(reduced secndary transform)은 주어진 낮은 주파수 영역을 위한 r 값을 설정하는 형태로 일차 변환 계수의 통계적 특성을 상대적으로 간단하게 정의할 수 있다. 그러나, 본 개시에 따른 RPT의 경우에는 일차 변환 계수의 분포와는 매우 상이한 특성을 가지는 레지듀얼 블록 내 샘플들의 통계적 특성을 고려하여 r 값을 정의하기 위한 기술로서 축소된 이차 변환과는 근본적인 차이점을 가진다. 이하에서는, 축소된 차원의 변환 행렬인 RPT 커널을 결정하는 다양한 여러 실시예를 설명하도록 한다. 다시 말해, RPT에서의 r 값을 결정 또는 정의하기 위한 방법을 이하에서 설명한다.
본 개시의 일 실시예에서는, 변환 시스템에서 허용하는 워스트 케이스 복잡도(worst case complexity)를 고려하여 RPT에서의 r 값을 결정할 수 있다. 일 실시예로서, 샘플당 곱셈수를 기준으로 워스트 케이스 복잡도를 산정할 수 있다. M x N 블록을 기준으로 순방향 및 역방향 모두 RPT를 적용하는데에는 MN * r 개의 곱셈이 필요하다. 2D 블록은 총 MN 개의 샘플들로 구성되므로 샘플당 곱셈수는 (MN * r ) / MN = r 개로 계산될 수 있다. 따라서, r 값을 허용되는 최대 샘플당 곱셈수 이하로 유지되도록 구성할 수 있다. 예를 들어, 16x16 블록에 대해 최대 가능한 샘플당 곱셈수가 16으로 설정되는 경우, r 값은 16 이하로 결정될 수 있다. 즉, 순방향 RPT 커널은 16 x 256으로 설정될 수 있다.
다른 일 실시예에서, 워스트 케이스 복잡도의 척도로서 메모리 사용량(memory usage)을 고려할 수 있다. 일 예로서, 커널 한 개당 허용되는 메모리 크기를 설정할 수 있다. 예를 들어, 커널 계수(본 개시에서 변환 커널을 구성하는 각 엘리먼트를 커널 계수로 지칭함)마다 p 바이트가 필요하고, 커널 1개당 q 바이트 이하로 메모리 사용량이 설정되는 경우, r 값은 q / (MN * p) 이하로 설정될 수 있다. 예를 들어, 16x16 블록에 대한 순방향 RPT 커널에 대해 p가 1 바이트이고 커널 1개당 8KB 이하로 메모리 사용량이 설정되는 경우(q = 8KB = 213 바이트), r 값은 32 이하로 설정될 수 있다.
또한, 다른 일 예로서, 워스트 케이스 복잡도의 척도로서 메모리 사용량 및/또는 샘플당 곱셈수를 고려할 수 있다. 예를 들어, 16x16 블록에 대해 최대 가능한 샘플당 곱셈수를 16으로 설정하고, 커널 1개당 8KB 이하로 메모리 사용량이 설정되는 경우(커널 계수는 1 바이트로 표현), r 값은 16 이하로 설정될 수 있다.
또한, 일 실시예에서, RPT 커널을 구성하는 r 값은 특정한 정보에 의해 결정될 수 있다. 다시 말해, RPT 커널을 구성하는 r 값은 미리 정의된 부호화 파라미터에 기초하여 결정될 수 있다. 예를 들어, 블록의 크기에 따라 r 값이 결정될 수 있다. 다시 말해, 블록의 크기에 따라 RPT 커널이 가변적으로 결정될 수 있다. 여기서, 블록은 코딩 블록, 변환 블록, 예측 블록 중 적어도 하나일 수 있다. 또한, 예를 들어, 예측 정보에 기초하여 r 값이 결정될 수 있다. 여기서, 예측 정보는 인터/인트라 예측에 관한 정보, 인트라 예측 모드 정보 등을 포함할 수 있다. 또한, 예를 들어, 시그날링되는 정보(신택스 요소의 값)에 기초하여 r 값이 결정될 수 있다. 예를 들어, 양자화 파라미터 값에 따라 r 값이 가변적으로 결정될 수 있다. 또한, 복잡도 개선 측면에서, r 값으로 미리 정의된 고정된 값이 사용될 수도 있으며, 상기 미리 정의된 고정된 값은 시그날링되는 정보를 기반으로 결정될 수 있다.
RPT 커널 r x MN을 샘플 신호에 곱하면, r개의 변환 계수가 획득될 수 있다. 획득된 r개의 변환 계수는 미리 정의된 변환 계수의 스캔 순서(ex., 정방향/역방향 지그재그(zig-zag) 스캔 순서, 정방향/역방향 수평(horizontal) 스캔 순서, 정방향/역방향 수직(vertical) 스캔 순서, 정방향/역방향 대각(diagonal) 스캔 순서, 인트라 예측 모드를 기반으로 특정된 스캔 순서 등)에 따라 배치될 수 있다. 이러한 스캔 순서(예컨대, 계수 그룹(coefficient group, CG) 단위의 스캔 순서도 적용 가능함)에 따라 순방향 RPT 적용으로부터 획득되는 변환 계수들을 배치하는 경우, r 값이 MN보다 작으면 r 개의 변환 계수를 가지고 M x N 블록 내부를 전부 채우지 못하게 되어 빈 공간이 발생할 수 있다. 본 개시의 실시예로서, 상술한 빈 공간은 레지듀얼 신호의 특성을 고려하여 다음과 같은 방법으로 예측될 수 있다.
- 이용 가능한 주변 화소의 값을 이용하여 빈 공간의 값을 채울 수 있다.
- 이용 가능한 주변 화소의 값 및 인트라 예측 모드에 기초하여 빈 공간의 값을 채울 수 있다. 예를 들어, 이용 가능한 주변 화소의 값 및 인트라 예측 모드를 기반으로 인트라 예측을 수행하여 빈 공간의 값을 예측할 수 있다.
- 미리 정의된 고정된 값(예컨대, 0)을 이용하여 빈 공간의 값을 채울 수 있다.
- 미리 정해진 인트라 예측 모드(예컨대, 플래너 모드)를 이용하여 이용 가능한 주변 화소로부터 빈 공간의 값을 채울 수 있다.
본 개시에서, 상술한 예시 중 빈 공간을 0으로 채우는 것은 제로 아웃 과정으로 지칭될 수 있다. 빈 공간을 0으로 채우는 경우, 다음과 같은 실시예가 적용될 수 있다. 디코딩 장치 측에서 변환 계수의 파싱 중에 해당 빈 공간 부분에 0이 아닌 변환 계수가 검출(또는 파싱)되는 경우, RPT가 적용되지 않는 것으로 간주(또는 추론)할 수 있다. 다시 말해, 상기 해당 빈 공간을 나타내는 미리 정의된 영역에 0이 아닌 변환 계수가 존재하는 경우, RPT가 적용되지 않는 것으로 간주될 수 있다. 이 경우, RPT의 적용 여부를 지시하는 플래그 및/또는 복수의 RPT 커널 후보들 중 하나를 지정하는 인덱스에 대한 시그날링(또는 파싱)이 수행되지 않을 수 있다. 일 예로서, 상기 해당 빈 공간을 나타내는 미리 정의된 영역에 0이 아닌 변환 계수가 존재하는 경우, 미리 정의된 변수 값이 업데이트될 수 있고, 업데이트된 변수 값에 기초하여 RPT가 적용되지 않는 것으로 추론될 수 있다.
본 개시의 일 실시예에서, 블록의 크기 및/또는 형태에 따라 RPT의 적용 여부가 결정될 수 있다. 또한, 블록의 크기 및/또는 형태에 따라 RPT 커널이 가변적으로 결정될 수 있다. 블록의 크기 및/또는 형태에 따라(즉, M x N 블록 별로), r 값은 다를 수 있으므로, 블록의 크기 및/또는 형태에 따라 빈 공간은 달라질 수 있다. 이에 따라, 블록의 크기 및/또는 형태 별로 0이 아닌 변환 계수가 검출되는지 여부를 체크하는 영역은 다르게 정의될 수 있다. 다시 말해, 제로 아웃 영역은 가변적으로 결정될 수 있다.
일 예로서, 8x8 블록에 대한 순방향 RPT 행렬로서 16x64 행렬이 적용되는 경우, r 값은 16일 수 있다. 이 경우, CG가 4x4 서브 블록일 때, 좌상단 4x4 블록에만 0이 아닌 RPT 변환 계수가 채워질 수 있고, 빈 공간인 나머지 3개의 4x4 서브 블록들(즉, 우상단, 좌하단, 우하단 서브 블록)에는 0 값이 채워질 수 있다. 이때, 디코딩 과정 중에 해당 나머지 3개의 4x4 서브 블록 영역에 0이 아닌 변환 계수가 검출되는 경우, RPT가 적용되지 않는 것으로 간주할 수 있다. 그리고, 전술한 바와 같이, RPT의 적용 여부를 지시하는 플래그 또는 복수의 RPT 커널 후보들 중 하나를 지정하는 인덱스는 시그날링 되지 않을 수 있다.
또한, 일 예로서, 16x8 블록에 대한 순방향 RPT 행렬로서 32x128 행렬이 적용되고(즉, r 값은 32), CG는 4x4 서브 블록일 때, 스캔 순서 상 2개의 CG에만 0이 아닌 RPT 변환 계수가 채워질 수 있다. 예를 들어, 좌상단 4x4 서브 블록 및 좌상단 서브 블록 하측에 인접한 4x4 서브 블록에 해당 RPT 변환 계수들이 채워질 수 있다. 빈 공간으로서 0으로 채워지는 영역은 해당 2개의 4x4 서브 블록들을 제외한 나머지 영역으로 결정될 수 있다. 블록의 크기 및/또는 형태에 따라 RPT 커널이 가변적으로 결정될 수 있고, 살펴본 바와 같이, 8x8 블록과 16x8 블록에 대해서는 빈 공간이 다르게 결정될 수 있다.
실시예로서, r 값이 CG 크기의 배수이고 CG 단위로 변환 계수가 스캔되는 경우, 빈 공간에 속한 CG들에 0이 아닌 변환 계수가 존재하는 것이 검출되면 RPT와 관련된 플래그 및/또는 인덱스가 시그날링되지 않을 수 있다. 즉, CG마다 CG 내부 변환 계수들을 지정된 순서에 따라 스캔하고, CG 단위에 대한 스캔 순서에 따라 다음 CG로 넘어가서 동일하게 CG 내부 변환 계수들을 스캔할 수 있다. 종래의 영상 압축 기술에서는, 각 CG에 대해 해당 CG 내에 0이 아닌 변환 계수가 존재하는지 여부에 대한 플래그가 먼저 시그날링되므로, 해당 정보만으로 RPT 적용 여부가 결정될 수 있으며, 이를 통해 시그날링 오버헤드가 줄 수 있고 관련 구현 복잡도가 감소할 수 있다.
상술한 바와 같이, RPT가 적용되는 경우 0으로 채워지는 빈 공간 영역에 0이 아닌 변환 계수가 검출되면, RPT가 적용되지 않을 수 있다. 이 경우, RPT와 관련된 정보에 대한 시그날링이 생략될 수 있다. 다만, 해당 빈 공간 영역에 0이 아닌 변환 계수가 검출되지 않는 경우 RPT의 적용 여부를 판단할 수 없으므로, 관련 변환 계수 파싱(또는 시그날링) 이후 RPT 적용 여부를 가리키는 플래그를 파싱하여 RPT 적용 여부를 최종 판단할 수 있다.
일 실시예로서, RPT 적용을 통해 생성된 변환 계수들에 대하여 순방향 이차 변환을 추가적으로 적용할 수 있다. 또는, M x N 블록 내 해당 생성된 변환 계수들이 위치하는 영역에 대하여 순방향 이차 변환을 추가적으로 적용할 수 있다. 본 개시에서, 해당 영역 또는 해당 영역의 일부는 순방향 이차 변환 관점에서는 ROI로 지칭될 수 있다. 역방향에 대해서는 역방향 이차 변환을 먼저 적용한 후 역방향 RPT를 적용할 수 있다. 구체적으로, 순방향 RPT 적용으로 생성된 r개의 변환 계수가 배치된 영역 또는 해당 영역의 일부를 ROI로 설정하여 순방향 이차 변환을 적용할 수 있다. 이 경우, 8x8 영역에 대해 16x64 순방향 RPT 변환 행렬이 적용되는 경우, 생성된 16개의 변환 계수는 좌상단 4x4 서브 블록에 위치할 수 있고 해당 서브블록 영역을 ROI로 설정하여 해당 ROI에 대해 순방향 이차 변환이 적용될 수 있다.
또한, RPT 커널은 정수 연산 또는 고정 소수점 연산과 같은 연산을 고려하여 계수 값이 조정될 수 있다. 즉, RPT 커널은 이론적인 직교 변환 또는 비-직교(non-orthogonal) 변환 (여기서, 직교 변환 및 비-직교 변환은 각 변환 기저 벡터의 놈(norm)이 1인 변환을 나타냄)이 아닌, 해당 커널에 속한 커널 계수들을 적절히 스케일링하여 실제적인 코덱 시스템에서 정수 연산(또는 고정 소수점 연산)을 통해 변환을 수행하도록 구성할 수 있다. 기존의 영상 압축 기술에서 분리 변환을 적용할 때 곱해지는 스케일링 팩터(scaling factor) 만큼, RPT를 적용하는 경우에도 동일하게 반영할 수 있다. 이 경우, 변환 이외의 다른 과정(e.g., 양자화, 역양자화 과정)은 유지하면서 분리 변환 또는 비분리 변환(RPT 포함)을 수행할 수 있다.
변환 기저 벡터에 상술한 스케일링 값을 곱함으로써 RPT 커널의 정수화된 계수를 획득할 수 있다. 실시예로서, 스케일링 값을 곱하는 것은 각 커널 계수에 반올림, floor, ceiling 등의 연산을 적용하는 것을 포함할 수 있다. 즉, 상술한 방법을 통해 획득된 정수화된 RPT 커널이 정의되고 변환/역변환 과정에 이용될 수 있다. 상술한 바와 같이, 반올림, floor, ceiling 등의 연산을 거쳐 스케일링된 정수값의 커널 계수들을 획득하면 모든 커널 계수들에 대해 최대값과 최소값을 구할 수 있으므로, 해당 최대값과 최소값으로부터 모든 커널 계수들을 표현할 수 있을만큼의 비트 수를 얻을 수 있다. 예를 들어, 해당 최대값이 127 이하이고 해당 최소값이 -128 이상이라면 8개의 bit로(특히, 2의 보수 표현 등을 통해) 모든 정수 커널 계수들을 표현할 수 있다.
일반화하면, 해당 최대값이 (2(N-1) - 1) 이하고 해당 최소값이 -2(N-1) 이상이라면 N개의 bit로 모든 정수 커널 계수들을 표현할 수 있다. 만약, 최대값이 (2(N-1) - 1) 보다 크거나 최소값이 -2(N-1) 보다 작은 경우, N개의 bit로 모든 정수 커널 계수들을 표현할 수 없을 수 있다. 이러한 경우, 1) 모든 커널 계수들에 추가적으로 스케일링 값을 곱하여 N 비트 범위 안에 들어오도록 조정하거나, 2) 커널 계수를 표현하는데 필요한 비트 수를 늘릴 수 있다(즉, N+1 비트 이상). 만약, N 비트로 표현하기 위해 모든 커널 계수들에 2-p 만큼을 곱해야 하는 경우(p >= 1), 기존의 부호화/복호화 과정에 융합되도록, 이후 2p 만큼을 곱하여 보상할 수 있다. 실시예로서, 2p 만큼을 곱하는 것은 왼쪽으로 p 비트 만큼 추가적으로 시프트 연산을 수행하거나, 양자화 또는 역양자화 과정에서 적용되는 오른쪽 시프트 양을 p 만큼 줄이는 방식 등으로 구현될 수 있다.
이상에서 설명한 방법으로 모든 커널 계수들을 8-bit, 9-bit, 10-bit 등으로 표현할 수 있으며, 물론 블록 크기나 커널마다 커널 계수의 스케일링 값을 다르게 설정할 수도 있고, 커널 계수를 표현하기 위한 비트 수를 다르게 설정할 수도 있다.
전술한 NSPT는 현재 블록의 크기, 트리 타입, 또는 성분 타입 중 적어도 하나에 기초하여 적용될 수 있다. 일예로, 현재 블록의 크기, 트리 타입, 또는 성분 타입 중 적어도 하나에 기초하여, NSPT의 적용 여부가 결정될 수 있다. 현재 블록의 크기, 트리 타입, 또는 성분 타입 중 적어도 하나에 기초하여, NSPT 인덱스가 시그날링될 수 있다. 현재 블록의 크기, 트리 타입, 또는 성분 타입 중 적어도 하나에 기초하여, NSPT 세트 또는 NSPT 커널이 유도될 수 있다.
디코딩 장치에 기-정의된 허용 변환 블록 크기들(allowed transform block sizes)들은 크게 2개 그룹으로 구분될 수 있다. 2개의 그룹 중 어느 하나(이하, 제1 그룹이라 함)는, NSPT가 적용될 수 있는 블록 크기의 집합을 의미할 수 있다. 상기 제1 그룹은, 상기 허용 변환 블록 크기들 중 어느 하나로 구성될 수도 있고, 상기 허용 블록 크기들 중 둘 또는 그 이상의 블록 크기들로 구성될 수도 있다. NSPT가 적용될 수 있는 블록 크기는, 너비와 높이 중 적어도 하나가 소정의 문턱값보다 작거나 같은 블록 크기로 정의될 수 있다. 또는, NSPT가 적용될 수 있는 블록 크기는, 너비와 높이의 곱이 소정의 문턱값보다 작거나 같은 블록 크기로 정의될 수도 있다. 또는, NSPT가 적용될 수 있는 블록 크기는, 너비와 높이 중 최대값이 소정의 문턱값보다 작거나 같은 블록 크기로 정의될 수도 있다. 상기 문턱값은, 4, 8, 16, 32, 64, 128 또는 그 이상의 정수일 수 있다.
상기 2개의 그룹 중 다른 하나(이하, 제2 그룹이라 함)는, NSPT가 적용되지 않는 블록 크기의 집합을 의미할 수 있다. 상기 제2 그룹에 속한 블록 크기들에 대해서는 전술한 분리 일차 변환이 적용될 수 있다. 또한, 상기 제2 그룹에 속한 블록 크기들 전부 또는 일부에 대해서는 비분리 이차 변환이 적용될 수도 있다.
예를 들어, 현재 블록의 크기가 제1 그룹에 속하는 경우, 현재 블록의 (역양자화된) 변환 계수에 역방향의 NSPT가 적용될 수 있다. 현재 블록의 크기가 제2 그룹에 속하는 경우, 현재 블록의 (역양자화된) 변환 계수에 역방향의 분리 일차 변환이 적용될 수 있다. 또는, 현재 블록의 크기가 제2 그룹에 속하는 경우, 현재 블록의 (역양자화된) 변환 계수에 대해 역방향의 비분리 이차 변환(e.g., low frequency non-separable transform, LFNST)이 먼저 적용되고, 그로부터 얻어진 변환 계수에 대해 역방향의 분리 일차 변환(e.g. DCT-2)이 적용될 수 있다.
일예로, NSPT가 적용될 수 있는 블록 크기의 집합인 제1 그룹은, 4x4, 4x8, 8x4, 8x8의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x8, 8x4, 8x8의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x8, 8x4의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x4, 4x8, 4x16, 8x4, 8x8, 16x4의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x8, 4x16, 8x4, 8x8, 16x4의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x8, 4x16, 8x4, 16x4의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x4, 4x8, 8x4, 8x8, 8x16, 16x8, 16x16의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x4, 4x8, 8x4, 8x8, 8x16, 16x8의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x8, 8x4, 8x8, 8x16, 16x8의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x8, 8x4, 8x16, 16x8의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x4, 4x8, 8x4, 8x8, 8x16, 16x8, 16x16, 16x32, 32x16, 32x32의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x4, 4x8, 8x4, 8x8, 8x16, 16x8, 16x16, 16x32, 32x16의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x8, 8x4, 8x8, 8x16, 16x8, 16x16, 16x32, 32x16의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x8, 8x4, 8x16, 16x8, 16x16, 16x32, 32x16의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x8, 8x4, 8x16, 16x8, 16x32, 32x16의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x4, 4x8, 4x16, 8x4, 16x4의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x4, 4x8, 4x16, 8x4, 8x8, 8x16, 16x4, 16x8의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x8, 4x16, 8x4, 8x8, 8x16, 16x4, 16x8의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x4, 4x8, 4x16, 8x4, 8x16, 16x4, 16x8의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x8, 4x16, 8x4, 8x16, 16x4, 16x8의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x4, 4x8, 4x16, 8x4, 8x8, 8x16, 16x4, 16x8, 16x16의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x8, 4x16, 8x4, 8x8, 8x16, 16x4, 16x8, 16x16의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x4, 4x8, 4x16, 8x4, 8x16, 16x4, 16x8, 16x16의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x8, 4x16, 8x4, 8x16, 16x4, 16x8, 16x16의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x4, 4x8, 4x16, 4x32, 8x4, 8x16, 8x32, 16x4, 16x8, 32x4, 32x8의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x8, 4x16, 4x32, 8x4, 8x16, 8x32, 16x4, 16x8, 32x4, 32x8의 집합으로 정의될 수 있다. 제1 그룹은, 4x4, 4x8, 4x16, 4x32, 8x4, 8x8, 8x16, 8x32, 16x4, 16x8, 16x16, 32x4, 32x8의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x4, 4x8, 4x16, 4x32, 8x4, 8x8, 8x16, 8x32, 16x4, 16x8, 16x32, 32x4, 32x8, 32x16의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x4, 4x8, 4x16, 4x32, 8x4, 8x8, 8x16, 8x32, 16x4, 16x8, 16x16, 16x32, 32x4, 32x8, 32x16의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x8, 4x16, 4x32, 8x4, 8x16, 8x32, 16x4, 16x8, 16x32, 32x4, 32x8, 32x16의 집합으로 정의될 수 있다. 또는, 제1 그룹은, 4x4, 4x8, 4x16, 4x32, 8x4, 8x8, 8x16, 8x32, 16x4, 16x8, 16x16, 16x32, 32x4, 32x8, 32x16, 32x32의 집합으로 정의될 수 있다.
상기 제1 그룹에 속한 블록 크기들에 대해서 소정의 차원을 가진 NSPT 행렬(또는, NSPT 커널)이 적용될 수 있다. 여기서, NSPT 행렬은, 역방향의 변환 행렬로서 PxQ의 차원을 가진 행렬로 표현될 수 있고, PxQ 행렬은 행(row)의 개수와 열(column)의 개수가 각각 P와 Q인 행렬을 나타낸다.
일예로, 4x4 블록에 대해서는 16x16의 NSPT 행렬이 적용될 수 있다. 4x8 블록 또는 8x4 블록 중 적어도 하나에 대해서는 32x20의 NSPT 행렬이 적용될 수 있다. 4x16 블록 또는 16x4 블록 중 적어도 하나에 대해서는 64x24의 NSPT 행렬이 적용될 수 있다. 8x8 블록에 대해서는 64x32의 NSPT 행렬이 적용될 수 있다. 8x16 블록 또는 16x8 블록 중 적어도 하나에 대해서는 128x40의 NSPT 행렬이 적용될 수 있다. 16x16 블록에 대해서는 256x44의 NSPT 행렬이 적용될 수 있다. 4x32 블록 또는 32x4 블록에 대해서는 128x36, 128x38, 또는 128x40의 NSPT 행렬이 적용될 수 있다. 8x32 블록 또는 32x8 블록에 대해서는 256x48의 NSPT 행렬이 적용될 수 있다. 16x32 블록 또는 32x16 블록에 대해서는 512x52 또는 512x54의 NSPT 행렬이 적용될 수 있다.
4x32 블록 또는 32x4 블록 중 적어도 하나에 대해서는, 128x36, 128x38, 128x40, 또는 128x(36-(4*n))의 NSPT 행렬이 적용될 수 있다. 또는, 4x32 블록 또는 32x4 블록 중 적어도 하나에 대해서는, 128x36, 128x38, 또는 128x40의 NSPT 행렬 대신에, 128x(36-(4*n))의 NSPT 행렬이 적용될 수 있다. 여기서, *는 곱셈을 나타내고, n은 0보다 크거나 같은 정수일 수 있다.
일예로, 4x32 블록 또는 32x4 블록 중 적어도 하나에 대한 NSPT 행렬로서, 128x36 행렬, 128x32 행렬, 128x28 행렬, 128x24 행렬, 128x20 행렬, 128x16 행렬, 128x12 행렬, 128x8 행렬, 또는 128x4 행렬 중 적어도 하나가 이용될 수 있다.
또한, 8x32 블록 또는 32x8 블록 중 적어도 하나에 대해서는, 256x48 또는 256x(48-(4*m))의 NSPT 행렬이 적용될 수 있다. 또는, 8x32 블록 또는 32x8 블록 중 적어도 하나에 대해서는, 256x48의 NSPT 행렬 대신에, 256x(48-(4*m))의 NSPT 행렬이 적용될 수 있다. 여기서, *는 곱셈을 나타내고, m은 0보다 크거나 같은 정수를 의미할 수 있다.
일예로, 8x32 블록 또는 32x8 블록 중 적어도 하나에 대한 NSPT 행렬로서, 256x48 행렬, 256x44 행렬, 256x40 행렬, 256x36 행렬, 256x32 행렬, 256x28 행렬, 256x24 행렬, 256x20 행렬, 256x16 행렬, 256x12 행렬, 256x8 행렬, 또는 256x4 행렬 중 적어도 하나가 이용될 수 있다.
4x32 블록과 32x4 블록에 대한 NSPT 행렬의 구조와 8x32 블록과 32x8 블록에 대한 NSPT 행렬의 구조의 조합은, 전술한 행렬들의 조합으로 구성될 수 있다. 즉, 4x32 블록과 32x4 블록에 대한 NSPT 행렬의 구조와 8x32 블록과 32x8 블록에 대한 NSPT 행렬의 구조의 조합은, 하나 또는 그 이상의 128x(36-(4*n))의 NSPT 행렬과 하나 또는 그 이상의 256x(48-(4*m))의 NSPT 행렬의 조합으로 정의될 수 있다. 여기서, n은 0 내지 8의 범위에 속한 하나 또는 그 이상의 정수일 수 있고, m은 0 내지 11의 범위에 속한 하나 또는 그 이상의 정수일 수 있다.
일예로, 4x32 블록 또는 32x4 블록 중 적어도 하나에 대한 NSPT 행렬은 128x24 행렬일 수 있고, 8x32 블록 또는 32x8 블록 중 적어도 하나에 대한 NSPT 행렬은 256x36 행렬일 수 있다.
또는, 4x32 블록 또는 32x4 블록 중 적어도 하나에 대한 NSPT 행렬은 128x24 행렬일 수 있고, 8x32 블록 또는 32x8 블록 중 적어도 하나에 대한 NSPT 행렬은 256x32 행렬일 수 있다.
또는, 4x32 블록 또는 32x4 블록 중 적어도 하나에 대한 NSPT 행렬은 128x24 행렬일 수 있고, 8x32 블록 또는 32x8 블록 중 적어도 하나에 대한 NSPT 행렬은 256x28 행렬일 수 있다.
또는, 4x32 블록 또는 32x4 블록 중 적어도 하나에 대한 NSPT 행렬은 128x24 행렬일 수 있고, 8x32 블록 또는 32x8 블록 중 적어도 하나에 대한 NSPT 행렬은 256x24 행렬일 수 있다.
또는, 4x32 블록 또는 32x4 블록 중 적어도 하나에 대한 NSPT 행렬은 128x24 행렬일 수 있고, 8x32 블록 또는 32x8 블록 중 적어도 하나에 대한 NSPT 행렬은 256x20 행렬일 수 있다.
또는, 4x32 블록 또는 32x4 블록 중 적어도 하나에 대한 NSPT 행렬은 128x24 행렬일 수 있고, 8x32 블록 또는 32x8 블록 중 적어도 하나에 대한 NSPT 행렬은 256x16 행렬일 수 있다.
또는, 4x32 블록 또는 32x4 블록 중 적어도 하나에 대한 NSPT 행렬은 128x20 행렬일 수 있고, 8x32 블록 또는 32x8 블록 중 적어도 하나에 대한 NSPT 행렬은 256x36 행렬일 수 있다.
또는, 4x32 블록 또는 32x4 블록 중 적어도 하나에 대한 NSPT 행렬은 128x20 행렬일 수 있고, 8x32 블록 또는 32x8 블록 중 적어도 하나에 대한 NSPT 행렬은 256x32 행렬일 수 있다.
또는, 4x32 블록 또는 32x4 블록 중 적어도 하나에 대한 NSPT 행렬은 128x20 행렬일 수 있고, 8x32 블록 또는 32x8 블록 중 적어도 하나에 대한 NSPT 행렬은 256x28 행렬일 수 있다.
또는, 4x32 블록 또는 32x4 블록 중 적어도 하나에 대한 NSPT 행렬은 128x20 행렬일 수 있고, 8x32 블록 또는 32x8 블록 중 적어도 하나에 대한 NSPT 행렬은 256x24 행렬일 수 있다.
또는, 4x32 블록 또는 32x4 블록 중 적어도 하나에 대한 NSPT 행렬은 128x20 행렬일 수 있고, 8x32 블록 또는 32x8 블록 중 적어도 하나에 대한 NSPT 행렬은 256x20 행렬일 수 있다.
또는, 4x32 블록 또는 32x4 블록 중 적어도 하나에 대한 NSPT 행렬은 128x20 행렬일 수 있고, 8x32 블록 또는 32x8 블록 중 적어도 하나에 대한 NSPT 행렬은 256x16 행렬일 수 있다.
또는, 4x32 블록 또는 32x4 블록 중 적어도 하나에 대한 NSPT 행렬은 128x16 행렬일 수 있고, 8x32 블록 또는 32x8 블록 중 적어도 하나에 대한 NSPT 행렬은 256x36 행렬일 수 있다.
또는, 4x32 블록 또는 32x4 블록 중 적어도 하나에 대한 NSPT 행렬은 128x16 행렬일 수 있고, 8x32 블록 또는 32x8 블록 중 적어도 하나에 대한 NSPT 행렬은 256x32 행렬일 수 있다.
또는, 4x32 블록 또는 32x4 블록 중 적어도 하나에 대한 NSPT 행렬은 128x16 행렬일 수 있고, 8x32 블록 또는 32x8 블록 중 적어도 하나에 대한 NSPT 행렬은 256x28 행렬일 수 있다.
또는, 4x32 블록 또는 32x4 블록 중 적어도 하나에 대한 NSPT 행렬은 128x16 행렬일 수 있고, 8x32 블록 또는 32x8 블록 중 적어도 하나에 대한 NSPT 행렬은 256x24 행렬일 수 있다.
또는, 4x32 블록 또는 32x4 블록 중 적어도 하나에 대한 NSPT 행렬은 128x16 행렬일 수 있고, 8x32 블록 또는 32x8 블록 중 적어도 하나에 대한 NSPT 행렬은 256x20 행렬일 수 있다.
또는, 4x32 블록 또는 32x4 블록 중 적어도 하나에 대한 NSPT 행렬은 128x16 행렬일 수 있고, 8x32 블록 또는 32x8 블록 중 적어도 하나에 대한 NSPT 행렬은 256x16 행렬일 수 있다.
상기 PxQ 행렬은 역방향의 NSPT 행렬이므로, Qx1 입력 벡터에 PxQ 행렬을 적용하여(즉, (PxQ 행렬)x(Qx1 입력 벡터)) Px1 출력 벡터를 획득할 수 있다. 여기서, Qx1 입력 벡터는 NSPT가 적용되는 현재 블록 내 (역양자화된) 변환 계수들에 대응될 수 있다. 이때, Q의 값은, NSPT가 적용되는 변환 계수들의 개수를 의미할 수 있고, 현재 블록의 너비와 높이의 곱보다 작거나 같을 수 있다. Q의 값은, 전술한 제1 그룹에 속한 블록 크기들 중 현재 블록의 크기에 기초하여 가변적으로 결정될 수 있다. 또는, Q의 값은, 제1 그룹에 속한 블록 크기들에 대해서 동일하게 설정될 수도 있다. Px1 출력 벡터는 잔차 신호(또는, 복호화된 레지듀얼 샘플들)에 대응될 수 있다. P의 값은 현재 블록의 너비와 높이의 곱과 같을 수 있다.
반대로, 순방향의 NSPT 행렬은 상기 PxQ 행렬의 전치 행렬인 QxP 행렬로 표현될 수 있다. Px1 입력 벡터에 QxP 행렬을 적용하여(즉, (QxP 행렬)x(Px1 입력 벡터)) Qx1 출력 벡터를 획득할 수 있다. 여기서, Px1 입력 벡터는 NSPT가 적용되는 현재 블록 내 레지듀얼 샘플들에 대응될 수 있다. P의 값은 현재 블록의 너비와 높이의 곱과 같을 수 있다. Qx1 출력 벡터는 NSPT를 통해 유도되는 현재 블록 내 변환 계수들에 대응될 수 있다. 이때, Q의 값은, NSPT 를 통해 출력되는 변환 계수들의 개수를 의미할 수 있고, 현재 블록의 너비와 높이의 곱보다 작거나 같을 수 있다. 마찬가지로, Q의 값은, 전술한 제1 그룹에 속한 블록 크기들 중 현재 블록의 크기에 기초하여 가변적으로 결정될 수 있다. 또는, Q의 값은, 제1 그룹에 속한 블록 크기들에 대해서 동일하게 설정될 수도 있다.
상기 예와 같이, 비정방형 블록인 MxN 블록과 NxM 블록에 대해 NSPT가 적용될 수 있다. 예를 들어, 4x8 블록과 8x4 블록에 대해 NSPT가 적용될 수 있다. 또는, 4x16 블록과 16x4 블록에 대해 NSPT가 적용되거나, 8x16 블록과 16x8 블록에 대해 NSPT가 적용되거나, 16x32 블록과 32x16 블록에 대해 NSPT가 적용될 수 있다.
상기 제1 그룹에 속한 특정 블록 크기들에 대해서 NSPT를 적용함으로써, 보다 정교하게 변환을 수행할 수 있고, 코딩 성능이 향상될 수 있다. 순방향의 LFNST가 적용될 때, LFNST가 적용되는 영역(i.e. Region-Of-Interest, ROI)을 제외한 나머지 영역의 일차 변환된 변환 계수들이 zero-out될 수 있다. 또한, LFNST는 적은 개수의 변환 기저 벡터들(transform basis vectors)로 구성될 수 있다. 이러한 경우, 해당 블록 크기들에 대해 NSPT 대신 DCT-2와 같은 분리 일차 변환과 LFNST와 같은 비분리 이차 변환을 적용하게 되면, 성능 저하가 발생할 수 있다. 해당 경우에 대해 LFNST 대신에 NSPT를 적용하게 되면, 상기 zero-out 과정이 생략되고, LFNST를 적용하는 경우에 비해 코딩 성능이 향상될 수 있다. 또한, NSPT를 적용하는 방식에 의해서도 성능 향상이 기대될 수 있다. 후술할 대칭성(symmetry)을 이용하여 NSPT 또는 LFNST가 적용될 수 있다. 여기서, LFNST의 경우, ROI 영역에 대해서만 대칭성을 이용하여 해당 입력 블록에 대해 transpose 연산을 수행한다. 반면, NSPT의 경우, 블록 전체에 대해 대칭성을 이용하여 transpose 연산을 수행한다. 따라서, NSPT의 경우, 보다 정교한 방식의 대칭성을 이용하여 해당 NSPT 커널을 training하고 적용할 수 있게 되어 성능 향상이 기대될 수 있다.
또한, 8x8 블록에 대해서 NSPT가 아니라 LFNST를 적용하는 경우, 순방향의 변환 관점에서 16x64 변환 행렬 대신에 32x64 변환 행렬을 적용할 수 있다. 여기서, 16x64 변환 행렬은 32x64 변환 행렬에서 상위 16개의 행(row)을 샘플링하여 구성될 수 있다. 8x8 블록에 대해 16x64 변환 행렬 기반의 LFNST를 적용할 경우, LFNST를 적용하는데 샘플당 16개의 곱셈이 필요하게 되나, 32x64 변환 행렬을 이용할 경우, LFNST를 적용하는데 샘플당 32개의 곱셈이 필요하게 된다. 하지만, 이와 같이 32x64 변환 행렬을 이용하는 경우, 코딩 성능의 향상이 기대될 수 있다.
현재 블록의 트리 타입이 싱글 트리(single tree)인 경우, 현재 블록의 루마 성분에 대해서 NSPT를 적용하고, 현재 블록의 크로마 성분에 대해서 NSPT를 적용하지 않을 수 있다. 현재 블록의 트리 타입이 듀얼 트리(dual tree)인 경우, 현재 블록의 루마 성분과 크로마 성분에 대해서 NSPT를 적용할 수 있다.
또는, 현재 블록의 트리 타입이 싱글 트리인지 여부와 관계없이, 현재 블록의 루마 성분에 대해서 NSPT를 적용하고, 현재 블록의 크로마 성분에 대해서 NSPT를 적용하지 않을 수 있다. 또는, 현재 블록의 트리 타입이 싱글 트리인지 여부와 관계없이, 현재 블록의 루마 성분과 크로마 성분에 대해서 NSPT를 적용할 수도 있다.
일예로, 현재 블록의 트리 타입이 싱글 트리이고, 루마 성분과 크로마 성분에 대해서 NSPT가 허용되고, 현재 블록의 크기가 제1 그룹에 속하는 경우, 하나의 NSPT 인덱스가 시그날링될 수 있고, 현재 블록의 루마 성분과 크로마 성분은 해당 NSPT 인덱스를 공유할 수 있다. 여기서, NSPT 인덱스는 NSPT를 위한 변환 커널 후보들 중 어느 하나를 선택하기 위한 인덱스일 수 있다. 현재 블록의 루마 블록과 크로마 블록의 크기가 상기 제1 그룹에 속하는 경우, 상기 동일한 NSPT 인덱스에 의해 선택된 변환 커널 후보가 루마 성분과 크로마 성분에 적용될 수 있다. 현재 블록의 트리 타입이 싱글 트리이면서 루마 성분에 대해서만 NSPT가 적용되는 경우, 현재 블록의 크로마 성분에 대해서는 LFNST가 적용되지 않을 수 있고, 분리 변환이 적용될 수 있다. 또는, 현재 블록의 트리 타입이 싱글 트리이면서 루마 성분에 대해서만 NSPT가 적용되는 경우, 현재 블록의 크로마 성분에 대해서 LFNST가 적용될 수 있다.
싱글 트리의 경우, 루마 성분과 크로마 성분 간에 연관성이 높은 특성을 가질 수 있다. 이 경우, 루마 성분에만 NSPT를 적용하거나, 하나의 NSPT 인덱스에 의해 선택된 변환 커널 후보를 루마 성분과 크로마 성분에 공통적으로 적용함으로써, 불필요한 시그날링을 줄이고, 압축 효율을 향상시킬 수 있다. 반면, 싱글 트리가 아닌 경우, 루마 성분과 크로마 성분이 각자 독립적인 분할 및 부호화 구조를 가지게 된다. 이 경우, 성분 별로 NSPT 인덱스를 시그날링함으로써, 각 성분의 특성을 반영하고, 압축 효율을 향상시킬 수 있다.
상기 NSPT를 위한 NSPT 커널은, 인트라 예측 모드 간의 대칭성 또는 블록 형태 간의 대칭성 중 적어도 하나에 기초하여 유도될 수 있다. 일예로, NSPT 커널은, 현재 블록의 인트라 예측 모드에 대칭인 모드 또는 현재 블록의 블록 형태에 대칭인 블록 형태 중 적어도 하나에 대응하는 NSPT 커널로 유도될 수 있다. 또는, NSPT 커널은 하나 또는 그 이상의 NSPT 커널 후보들을 포함한 NSPT 세트에 기초하여 유도될 수 있고, 여기서의 NSPT 세트는 현재 블록의 인트라 예측 모드에 대칭인 모드 또는 현재 블록의 블록 형태에 대칭인 블록 형태 중 적어도 하나에 대응하는 NSPT 세트로 유도될 수 있다. 상기 NSPT 세트에 속한 하나 또는 그 이상의 NSPT 커널 후보들 중 어느 하나가 현재 블록의 NSPT 커널로 설정될 수 있다. 이를 위해, NSPT 세트에 속한 하나 또는 그 이상의 NSPT 커널 후보들 중 어느 하나를 특정하는 NSPT 인덱스가 이용될 수 있다. NSPT 인덱스는 비트스트림을 통해 시그날링될 수도 있고, 전술한 대칭성을 기반으로 유도될 수도 있다.
디코딩 장치에 기-정의된 인트라 예측 모드들 중 적어도 둘의 인트라 예측 모드들 간에는 대칭성이 존재할 수 있다. 이하, 설명의 편의를 위해 좌상단 대각 모드(즉, 34번 모드)를 중심으로 한 대칭성을 설명하기로 한다. 도 5를 참조하면, 방향성 모드들 사이에는 대칭성이 존재한다. 0번인 Planar 모드와 1번인 DC 모드를 제외하고는 모든 모드가 예측 방향을 가진다. 2번 모드부터 66번 모드는 노멀(normal) 방향성 모드라고 명명하고([2, 66]과 같이 표기 가능), -14번 모드부터 -1번 모드([-14, -1]와 같이 표기 가능)와 67번 모드부터 80번 모드([67, 80]와 같이 표기 가능)는 와이드(wide) 방향성 모드로 명명할 수 있다. 와이드 방향성 모드는, -14보다 더 작은 값을 가진 모드 또는 80보다 더 큰 값을 가진 모드 중 적어도 하나를 포함할 수 있다. 도 5를 참조하면, 0번 모드와 1번 모드를 제외하고 모든 모드들이 34번 모드를 중심으로 대칭이다. 구체적으로, [2, 66] 모드에 대해서는 x번 모드와 (68 - x)번 모드가 대칭이고, [-14, -1] 모드와 [67, 80] 모드 사이에서 x번 모드와 (66 - x)번 모드가 대칭이다. [N, -1] 모드와 [67, 66 - N] 모드 사이에서 동일한 대칭 관계가 성립될 수 있다. 여기서, N은 -14보다 작거나 같은 정수일 수 있다.
한편, 블록 형태 간의 대칭성과 관련하여, MxN 블록과 NxM 블록은 서로 대칭성을 가진 블록으로 정의될 수 있다. 여기서, M과 N은 동일할 수도 있고, 서로 상이할 수도 있다. 또는, M1xN1 블록의 너비와 높이의 비(M1/N1)와 M2xN2 블록의 높이와 너비의 비(N2/M2)가 동일한 경우, M1xN1 블록과 M2xN2 블록은 서로 대칭성을 가진 블록으로 정의될 수 있다. 또는, M1xN1 블록의 너비와 높이의 비(M1/N1)와 M2xN2 블록의 너비와 높이의 비(M2/N2)가 동일한 경우, M1xN1 블록과 M2xN2 블록은 서로 대칭성을 가진 블록으로 정의될 수 있다.
정방형 블록에서, 서로 대칭인 모드들은 NSPT 세트, NSPT 인덱스, 또는 NSPT 커널 중 적어도 하나를 공유할 수 있다. 즉, 대칭인 모드들 중 어느 하나에 대한 NSPT 세트, NSPT 인덱스, 또는 NSPT 커널 중 적어도 하나가, 대칭인 모드들 중 다른 하나에 대해 동일하게 적용될 수 있다.
일예로, 서로 대칭인 모드들은 하나의 NSPT 커널을 공유할 수 있다. 다만, 서로 대칭인 모드들 중 어느 하나에 대해서는 입력 데이터에 해당 NSPT 커널을 적용하고, 다른 하나에 대해서는 입력 데이터에 전치(transpose) 연산을 적용한 후 해당 NSPT 커널을 적용할 수 있다. 구체적으로, x번 모드가 [2, 33] 모드에 속하는 경우, x번 모드에 대해서는 입력 데이터인 MxM 블록에 대해 열 우선(column-first) 순서에 따라 일차원 벡터(1D vector)를 구성하고, 해당 1D vector에 대해 NSPT 커널을 적용할 수 있다. 여기서, 열 우선 순서에 따른 1D vector의 구성은, 입력 데이터인 MxM 블록으로부터 열 단위로 입력 데이터를 읽어서 M개의 열을 획득하고, 이를 차례대로 배열하여 1D vector를 구성하는 것일 수 있다. 반면, x번 모드에 대칭인 (68 - x)번 모드에 대해서는 행 우선(row-first) 순서에 따라 1D vector를 구성하고, 해당 1D vector에 대해 해당 동일 NSPT 커널을 적용할 수 있다. 여기서, 행 우선 순서에 따른 1D vector의 구성은, 입력 데이터인 MxM 블록으로부터 행 단위로 입력 데이터를 읽어서 M개의 행을 획득하고, 이를 차례대로 배열하여 1D vector를 구성하는 것일 수 있다. x번 모드가 [N, -1] 모드에 속하는 경우(N ≤ -14), x번 모드에 대칭인 (66 - x) 모드에 대해서는 행 우선(column-first) 순서에 따라 1D vector를 구성하고, 해당 1D vector에 대해 x번 모드의 경우와 동일한 NSPT 커널을 적용할 수 있다. 0번 모드와 1번 모드에 대해서는 열 우선 순서 또는 행 우선 순서를 적용할 수 있으며, 34번 모드에 대해서도 열 우선 순서 또는 행 우선 순서를 적용할 수 있다. 또한, [2, 33] 모드에 속한 인트라 예측 모드에 대해서는 행 우선 순서를 적용하고, 해당 인트라 예측 모드에 대칭인 모드에 대해서는 열 우선 순서를 적용할 수도 있다. [N, -1] 모드에 속한 인트라 예측 모드에 대해서 행 우선 순서를 적용하고, 이에 대칭인 모드에 대해서는 열 우선 순서를 적용할 수도 있다.
비정방형 블록의 경우, 인트라 예측 모드 간의 대칭성 외에 블록 형태 간의 대칭성이 더 고려될 수 있다. 너비와 높이가 각각 M과 N인 비정방형 블록은, 너비와 높이가 각각 N과 M인 비정방형 블록과 대칭 관계를 가지는 것으로 볼 수 있다. 일예로, [2, 66] 모드에서, MxN 블록의 x번 모드와 NxM 블록의 (68 - x)번 모드 사이에 대칭성이 존재할 수 있다. 마찬가지로, MxN 블록의 x번 모드가 [N, -1] 모드에 속하는 경우(N ≤ -14), MxN 블록의 x번 모드와 NxM 블록의 (66 - x)번 모드 사이에 대칭성이 존재할 수 있다.
입력 데이터 블록으로부터 1D vector를 구성하는 방법은 앞서 살펴본 바와 같다. 즉, x번 모드에 대해서 열 우선 순서가 적용된다면, 이에 대칭인 모드에 대해서는 행 우선 순서가 적용될 수 있다. 또는, x번 모드에 대해서 행 우선 순서가 적용된다면, 이에 대칭인 모드에 대해서는 열 우선 순서가 적용될 수 있다. 구체적으로, x번 모드에 대해 열 우선 순서가 적용되는 경우, 입력 데이터인 MxN 블록으로부터 열 단위로 입력 데이터를 읽어서 M개의 열을 획득하고, 이를 차례대로 배열하여 1D vector를 구성할 수 있다. 여기서, 각 열은 N의 길이를 가질 수 있다. x번 모드에 대칭인 모드에 대해서는, 입력 데이터인 MxN 블록으로부터 행 단위로 입력 데이터를 읽어서 N개의 행을 획득하고, 이를 차례대로 배열하여 1D vector를 구성할 수 있다. 여기서, 각 행은 M의 길이를 가질 수 있다. 또는, x번 모드에 대해 행 우선 순서가 적용되는 경우, 입력 데이터인 MxN 블록으로부터 행 단위로 입력 데이터를 읽어서 N개의 행을 획득하고, 이를 차례대로 배열하여 1D vector를 구성할 수 있다. 여기서, 각 행은 M 길이를 가질 수 있다. x번 모드에 대칭인 모드에 대해서는, 입력 데이터인 MxN 블록으로부터 열 단위로 입력 데이터를 읽어서 M개의 열을 획득하고, 이를 차례대로 배열하여 1D vector를 구성할 수 있다. 여기서, 각 열은 N의 길이를 가질 수 있다.
현재 블록이 x번 모드를 가진 MxN 블록이고, 현재 블록에 대해 전술한 대칭성을 이용할 경우, 현재 블록의 NSPT 세트 및/또는 NSPT 커널은 x번 모드에 대칭인 인트라 예측 모드 또는 MxN의 블록 크기에 대칭인 NxM의 블록 크기 중 적어도 하나에 기초하여 결정될 수 있다. 여기서, NSPT 커널은, MxN 블록에 대한 NSPT 커널이 아니라 NxM 블록에 대한 NSPT 커널로 설정될 수 있다. 즉, 현재 블록에 대해 대칭성이 이용되는 경우, 현재 블록과 대칭성을 가진 블록에 대한 NSPT 세트 및/또는 NSPT 커널이 동일하게 이용될 수 있다. 전술한 바와 같이, 소정의 우선 순서에 따라 입력 데이터 블록으로부터 1D vector를 구성할 수 있고, 이는 상기 NSPT 커널의 입력에 해당할 수 있다.
또한, 현재 블록의 인트라 예측 모드의 값이 34보다 큰 경우에 대해서만 상기 대칭성이 이용되도록 제한될 수 있다. 즉, 현재 블록의 인트라 예측 모드의 값이 34보다 큰 경우, 입력 데이터 블록으로부터 1D vector 구성시 전치 연산이 적용될 수 있고, 현재 블록과 대칭성을 가진 모드 및/또는 블록 형태에 대응하는 NSPT 세트 또는 NSPT 커널이 이용될 수 있다. 구체적으로, 현재 블록의 인트라 예측 모드가 [N, -1] 모드와 [2, 34] 모드에 속하는 경우, 현재 블록에 대해 대칭성이 이용되지 않을 수 있다. 반면, 현재 블록의 인트라 예측 모드가 [35, 66] 모드와 [67, 66 - N] 모드에 속하는 경우, 현재 블록에 대해 대칭성이 이용될 수 있다. 여기서, N은 -14보다 작거나 같은 정수일 수 있다.
상기 대칭성에 기반한 NSPT 세트 또는 NSPT 커널의 유도는, 현재 블록의 크기에 기초하여 적응적으로 수행될 수 있다. 일예로, 4x4 블록과 8x8 블록에 대해서는, 대칭성에 기반하여 NSPT 세트 또는 NSPT 커널가 유도되고, 4x8 블록과 8x4 블록에 대해서는, 대칭성에 기반하여 NSPT 세트 또는 NSPT 커널이 유도되지 않을 수 있다.
상기 대칭성이 이용되는지 여부에 따라, 이용 가능한 NSPT 세트의 개수는 상이할 수 있다. 일예로, 대칭성이 이용되는 경우, 이용 가능한 NSPT 세트의 개수는 35개이고, 대칭성이 이용되지 않는 경우, 이용 가능한 NSPT 세트의 개수는 67개일 수 있다.
다음 표 9는 대칭성을 이용하여 NSPT 세트가 결정되는 예에 관한 것으로서, 이용 가능한 NSPT 세트의 개수가 35개인 경우의 인트라 예측 모드와 NSPT 세트 간 매핑 관계를 나타낸다.
인트라 예측 모드 NSPT 세트 인덱스
X < 0 2
0 ≤ X ≤ 34 X
35 ≤ X ≤ 66 68 - X
X > 66 2
표 9를 참조하면, 현재 블록의 인트라 예측 모드의 값(X)이 0보다 작은 경우, 현재 블록의 NSPT 세트는 35개의 NSPT 세트들 중 2의 NSPT 세트 인덱스를 가진 NSPT 세트로 결정될 수 있다. 현재 블록의 인트라 예측 모드의 값(X)이 0보다 크거나 같고 34보다 작거나 같은 경우, 현재 블록의 NSPT 세트는 35개의 NSPT 세트들 중 X의 NSPT 세트 인덱스를 가진 NSPT 세트로 결정될 수 있다. 현재 블록의 인트라 예측 모드의 값(X)이 35보다 크거나 같고 66보다 작거나 같은 경우, 현재 블록의 NSPT 세트는 35개의 NSPT 세트들 중 (68-X)의 NSPT 세트 인덱스를 가진 NSPT 세트로 결정될 수 있다. 현재 블록의 인트라 예측 모드의 값(X)이 35보다 크거나 같고 66보다 작거나 같은 경우, 현재 블록의 NSPT 세트는 현재 블록의 인트라 예측 모드에 대칭되는 모드의 값(68-X)에 대응되는 NSPT 세트와 동일할 수 있다. 마찬가지로, 현재 블록의 인트라 예측 모드의 값(X)이 66보다 큰 경우, 현재 블록의 NSPT 세트는 35개의 NSPT 세트들 중 2의 NSPT 세트 인덱스를 가진 NSPT 세트로 결정될 수 있다. 현재 블록의 인트라 예측 모드의 값(X)이 66보다 큰 경우, 현재 블록의 NSPT 세트는 현재 블록의 인트라 예측 모드에 대칭되는 모드에 대응되는 NSPT 세트와 동일할 수 있다.
다음 표 10은 대칭성을 이용하지 않고 NSPT 세트가 결정되는 예에 관한 것으로서, 이용 가능한 NSPT 세트의 개수가 67개인 경우의 인트라 예측 모드와 NSPT 세트 간 매핑 관계를 나타낸다.
인트라 예측 모드 NSPT 세트 인덱스
X < 0 2
0 ≤ X ≤ 66 X
X > 66 66
표 10을 참조하면, 현재 블록의 인트라 예측 모드의 값(X)이 0보다 작은 경우, 현재 블록의 NSPT 세트는 67개의 NSPT 세트들 중 2의 NSPT 세트 인덱스를 가진 NSPT 세트로 결정될 수 있다. 현재 블록의 인트라 예측 모드의 값(X)이 0보다 크거나 같고 66보다 작거나 같은 경우, 현재 블록의 NSPT 세트는 67개의 NSPT 세트들 중 X의 NSPT 세트 인덱스를 가진 NSPT 세트로 결정될 수 있다. 현재 블록의 인트라 예측 모드의 값(X)이 66보다 큰 경우, 현재 블록의 NSPT 세트는 67개의 NSPT 세트들 중 66의 NSPT 세트 인덱스를 가진 NSPT 세트로 결정될 수 있다.
상기 대칭성을 활용함으로써, 변환 적용에 따른 성능은 유지하면서 변환 커널의 저장에 필요한 메모리 크기를 절약할 수 있다. 예를 들어, 67개의 NSPT 세트들 대신에 대칭성을 활용하여 35개의 NSPT 세트들을 이용할 경우, NSPT 커널의 저장에 필요한 메모리 크기를 대폭 저감할 수 있다.
이용 가능한 NSPT 세트의 개수 및/또는 NSPT 세트에 속한 NSPT 커널 후보의 개수는, 블록 크기에 따라 상이할 수 있다. 예를 들어, 4x4 블록에 대해 이용 가능한 NSPT 세트들의 개수는 35개이고, 4x8 블록과 8x4 블록에 대해 이용 가능한 NSPT 세트들의 개수는 19개이며, 8x8 블록에 대해 이용 가능한 NSPT 세트들의 개수는 10개일 수 있다. 4x4 블록에 대한 NSPT 세트는 3개의 NSPT 커널 후보들로 구성될 수 있고, 4x8 블록과 8x4 블록에 대한 NSPT 세트는 3개 또는 2개의 NSPT 커널 후보들로 구성되며, 8x8 블록에 대한 NSPT 세트는 1개의 NSPT 커널 후보로 구성될 수 있다.
블록 크기의 증가에 따라 변환 커널의 크기가 증가할 수 있다. 이에, 이용 가능한 NSPT 세트의 개수 및/또는 NSPT 세트에 속한 NSPT 커널 후보들의 개수를 줄임으로써, 변환 커널의 저장에 필요한 메모리 크기를 절약할 수 있다. 또한, 블록 크기의 증가에 따라 해당 블록 내의 잔차 신호 특성이 보다 일반화되는 경향이 있다. 따라서, 이용 가능한 NSPT 세트의 개수 및/또는 NSPT 세트에 속한 NSPT 커널 후보들의 개수를 줄이는 것은, 이런 통계적 특성을 반영하여 구현 복잡도를 줄이면서 압축 효율을 유지하는 데 도움이 될 수 있다.
실시예 4
현재 블록에 대해서 비분리 변환이 적용될 수 있다. 여기서, 현재 블록은 인터 예측으로 부호화된 블록일 수 있다. 다만, 이에 한정되지 아니하며, 현재 블록이 인트라 예측으로 부호화된 블록인 경우에도 본 개시에 따른 방법이 동일/유사하게 적용될 수 있다. 상기 비분리 변환은 전술한 LFNST 또는 NSPT 중 적어도 하나를 포함할 수 있다.
인트라 예측으로 부호화된 블록의 경우, 해당 블록의 인트라 예측에 사용되는 인트라 예측 모드를 기반으로 비분리 변환을 위한 변환 세트가 선택될 수 있다. 인터 예측으로 부호화된 블록의 경우, 디코더 사이드 인트라 모드 유도(decoder side intra mode derivation, DIMD) 방법을 기반으로 인트라 예측 모드를 유도하고, 상기 유도된 인트라 예측 모드를 기반으로 비분리 변환을 위한 변환 세트가 선택될 수 있다.
DIMD 방법에 따르면, 현재 블록의 예측 블록 또는 주변 영역 중 적어도 하나에 소정의 필터를 적용하여 수평 및/또는 수직 방향의 세기(gradient) 값을 산출하고, 산출된 세기 값을 기반으로 특정 인트라 예측 모드를 유도할 수 있다. 상기 특정 인트라 예측 모드를 기반으로 현재 블록에 적용되는 변환 세트가 선택될 수 있다. 상기 DIMD 방법을 기반으로 유도되는 인트라 예측 모드는 가상 인트라 예측 모드(virtual intra prediction mode, VIPM) 또는 DIMD 모드라 불릴 수도 있다. 이하, 도 6을 참조하여 DIMD 방법을 기반으로 인트라 예측 모드를 유도하는 방법에 대해 자세히 살펴 보기로 한다.
도 6을 참조하면, 초기 샘플 위치가 설정되고, 모든 인트라 예측 모드에 대한 누적 세기 값이 초기화될 수 있다(S600). 현재 샘플 위치에 대한 세기 값이 계산될 수 있다(S610). 상기 계산된 세기 값을 누적할 인트라 예측 모드가 선택될 수 있다(S620). 상기 선택된 인트라 예측 모드에 대한 누적 세기 값에 S610에서 계산된 세기 값을 더할 수 있다(S630). 전술한 S610 내지 S630의 과정은, 다음 샘플 위치가 존재하지 않을 때까지, 현재 블록에 속한 모든 또는 일부 샘플 위치들 각각에 대해서 수행될 수 있다. 다음 샘플 위치가 존재하지 않을 경우, 누적 세기 값이 가장 큰 인트라 예측 모드가 선택될 수 있다(S640).
현재 블록의 주변 영역에 DIMD 방법을 적용하는 과정을 구체적으로 기술하면 다음과 같다. 설명의 편의를 위해, 상기 주변 영역을 너비와 높이가 W와 H인 블록이라 가정한다. 다만, 전술한 바와 같이, 현재 블록의 예측 블록을 기반으로 DIMD 방법이 적용될 수도 있으며, 이하 "주변 영역"은 "예측 블록"으로 대체되어 이해될 수 있다.
WxH 블록 내부에 크기가 PxQ인 필터를 적용할 수 있다. PxQ 필터는 2D 필터일 수도 있고 1D 필터일 수도 있다. 다만, 블록 경계에 인접한 샘플들에 대해서는 필터가 블록 경계를 벗어나는 경우가 발생할 수 있다. 블록 경계에 인접한 샘플들을 제외한 WxH 블록의 내부 영역에 대해서만 필터를 적용할 수 있다. 구체적으로, WxH 블록의 내부 영역인 (W-P+1)x(H-Q+1) 영역에 속한 샘플 위치들에 대해서만 필터가 적용될 수 있다. 일예로, 필터의 크기가 3x3인 경우, WxH 블록에서 1만큼 길이의 가장자리를 제외한 (W-2)x(H-2) 블록에 속한 샘플 위치들에 대해서만 3x3의 2D 필터를 적용할 수 있다. 이때, 상기 샘플 위치의 샘플(이하, 기준 샘플이라 함)을 중앙 샘플로 가진 3x3 영역에 2D 필터가 적용될 수 있다.
상기 기준 샘플과 상기 기준 샘플에 인접한 적어도 하나의 주변 샘플이 2D 필터에 입력될 수 있다. 여기서, 주변 샘플은, 기준 샘플의 상단, 좌측, 하단, 우측, 좌상단, 우상단, 좌하단, 또는 우하단 중 적어도 하나에 인접한 샘플을 포함할 수 있다.
상기 내부 영역에 속한 샘플 위치마다 필터를 적용하여 특정 인트라 예측 모드의 세기 값을 도출할 수 있다. 상기 도출된 세기 값은 특정 인트라 예측 모드에 대해서 기-도출된 세기 값에 더해지게 되며, 이러한 과정을 통해 특정 인트라 예측 모드에 대해서 누적 세기 값이 도출될 수 있다. 상기 내부 영역에 속한 모든 샘플 위치들에 대해 필터를 적용하게 되면, 모든 인트라 예측 모드들(또는, 비방향성 모드를 제외한 방향성 모드들)에 대해서 누적 세기 값이 도출될 수 있다. 가장 큰 누적 세기 값을 가진 인트라 예측 모드가 선택될 수 있고, 이는 DIMD 방법을 기반으로 유도되는 인트라 예측 모드(이하, DIMD 모드라 함)로 설정될 수 있다.
DIMD 모드를 유도하기 위한 필터로 도 7과 같은 두 종류의 3x3 필터가 이용될 수 있으며, 이를 각각 filterY와 filterX로 부르기로 한다. filterY와 filterX가 적용되는 위치(즉, 기준 샘플의 위치)가 E인 경우, 두 필터의 적용에 연관된 샘플들의 위치는 A, B, C, D, E, F, G, H, I로 나타낼 수 있다. filterY와 filterX를 적용하여 구해진 값을 각각 iDy와 iDx로 나타낼 경우, iDy와 iDx는 다음과 같이 계산될 수 있다.
[수학식 6]
iDy = A + 2*D + G - C - 2*F - I
iDx = G + 2*H + I - A - 2*B - C
iDy와 iDx가 0인 경우, 이후 과정들(즉, 세기 값을 구한 후, 특정 인트라 예측 모드를 선택하고, 해당 인트라 예측 모드에 대한 누적 세기 값에 해당 세기 값을 더해주는 과정)을 생략하고 필터를 적용할 다음 샘플 위치로 넘어갈 수 있다.
함수 abs는 입력값에 대한 절대값을 구해 리턴하는 함수일 수 있다. iAmp의 값은 다음과 같이 계산될 수 있다. 이는 도 6의 S610 단계에 해당될 수 있다.
[수학식 7]
iAmp = abs(iDx) + abs(iDy)
iDx 또는 iDy 중 하나라도 0인 경우, 선택되는 특정 인트라 예측 모드의 값인 iAngUneven은 다음 수학식 8과 같이 결정될 수 있다. 이는 iDx 또는 iDy 중 하나라도 0인 경우에 대한 도 6의 S620 단계에 해당될 수 있다.
[수학식 8]
iAngUneven = ( iDx == 0 ) ? VER_IDX : HOR_IDX
수학식 8에서 VER_IDX와 HOR_IDX는 수직 모드와 수평 모드를 각각 의미할 수 있다. 예를 들어, VER_IDX와 HOR_IDX는 도 5에서의 50번 모드와 18번 모드에 각각 대응될 수 있다. iDx의 값이 0이라는 것은 수직 방향으로의 변화량이 0이거나 거의 없다는 것을 의미할 수 있다. 다시 말해, 수직 방향으로 같은 샘플 값들을 갖는 것으로 간주되어 수직 방향으로 예측이 잘된다는 것을 의미할 수 있다. 반대로, iDy의 값이 0이라는 것은(즉, iDx의 값이 0이 아닌 경우) 수평 방향으로의 변화량이 0이거나 거의 없다는 것을 의미할 수 있다. 다시 말해, 수평 방향으로 같은 샘플 값들을 갖는 것으로 간주되어 수평 방향으로 예측이 잘된다는 것을 의미할 수 있다.
iDx와 iDy 모두 0이 아닌 경우, 선택되는 특정 인트라 예측 모드의 값인 iAngUneven은 다음과 같이 결정될 수 있다. 이는 iDx와 iDy 모두 0이 아닌 경우에 대한 도 6의 S620 단계에 해당될 수 있다.
먼저, 인트라 예측 모드들의 값들(특히, 방향성 모드들의 값들)은 다음과 같은 4개의 그룹으로 구분될 수 있다.
제 1 그룹(region 0)은 특정 개수의 수평 방향성을 가진 모드로 구성될 수 있다. 일예로, 제1 그룹은 수평 모드의 값보다 작거나 같은 모드들로 구성될 수 있다. 도 5에서 수평 방향성을 가진 모드는 2번 모드 내지 34번 모드이고(단, 34번 모드는 수평 방향성을 가진 모드에 포함되지 않을 수 있음), 수평 모드의 값은 18이다(즉, 수평 모드는 18번 모드임). 특정 개수를 N이라고 할 경우, 제1 그룹은 {18, 18-1, 18-2, ... , 18-(N-1)} 모드들로 구성될 수 있다. N이 17인 경우, 제1 그룹은 {18, 17, 16, ... , 2} 모드들로 구성될 수 있다.
제2 그룹(region 1)은 특정 개수의 수평 방향성을 가진 모드로 구성될 수 있다. 일예로, 제2 그룹은 수평 모드의 값보다 크거나 같은 모드들로 구성될 수 있다. 특정 개수를 N이라고 할 경우, 제2 그룹은 {18, 18+1, 18+2, ... , 18+(N-1)} 모드들로 구성될 수 있다. N이 17인 경우, 제2 그룹은 {18, 19, 20, ... , 34} 모드들로 구성될 수 있다.
제3 그룹(region 2)은 특정 개수의 수직 방향성을 가진 모드로 구성될 수 있다. 일예로, 제3 그룹은 수직 모드의 값보다 작거나 같은 모드들로 구성될 수 있다. 도 5에서 수직 방향성을 가진 모드는 34번 내지 66번 모드이고(단, 34번 모드는 수직 방향성을 가진 모드에 포함되지 않을 수 있음), 수직 모드의 값은 50이다(즉, 수직 모드는 50번 모드임). 특정 개수를 N이라고 할 경우, 제3 그룹은 {50, 50-1, 50-2, ... , 50-(N-1)} 모드들로 구성될 수 있다. N이 17인 경우, 제3 그룹은 {50, 49, 48, ... , 34} 모드들로 구성될 수 있다.
제4 그룹(region 3)은 특정 개수의 수직 방향성을 가진 모드로 구성될 수 있다. 일예로, 제4 그룹은 수직 모드의 값보다 크거나 같은 모드들로 구성될 수 있다. 특정 개수를 N이라고 할 경우, 제4 그룹은 {50, 50+1, 50+2, ... , 50+(N-1)} 모드들로 구성될 수 있다. N이 17인 경우, 제4 그룹은 {50, 51, 52, ... , 66} 모드들로 구성될 수 있다.
위와 같이 인트라 예측 모드들에 대한 그룹들을 정의할 경우, 특정 그룹을 지시하는 식별자는 다음 표 11과 같이 계산될 수 있다. 제1 그룹 내지 제4 그룹에 대응하는 식별자는 각각 0, 1, 2, 3이다.
signx = iDx < 0 ? 1 : 0
signy = iDy < 0 ? 1 : 0
absx = iDx < 0 ? -iDx : iDx
absy = iDy < 0 ? -iDy : iDy
gtY = absx > absy ? 1 : 0
mapXgrY1[0][0] = 1, mapXgrY1[0][1] = 0, mapXgrY1[1][0] = 0, mapXgrY1[1][1] = 1
mapXgrY0[0][0] = 2, mapXgrY0[0][1] = 3, mapXgrY0[1][0] = 3, mapXgrY0[1][1] = 2
region = gtY ? mapXgrY1[signy][signx] : mapXgrY0[signy][signx]
표 11에서 gtY는 수직 방향에 대한 변화량이 수평 방향에 대한 변화량보다 큰지 여부를 나타낼 수 있다. 즉, absx가 absy보다 큰 경우 gtY는 1로 유도되고, 그렇지 않은 경우 gtY는 0으로 유도될 수 있다. 여기서, gtY가 1인 경우, 이는 수직 방향에 대한 변화량이 수평 방향에 대한 변화량보다 큼을 나타내고, gtY가 0인 경우, 이는 수직 방향에 대한 변화량이 수평 방향에 대한 변화량보다 작거나 같음을 나타낼 수 있다. 수직 방향에 대한 변화량이 크게 되면 수직 방향으로 예측이 잘 될 가능성이 적다는 것을 의미할 수 있다. 이 경우, region 0 또는 region 1이 선택될 수 있다. 즉, region에 대한 식별자로서 mapXgrY1[signy][signx]이 선택될 수 있다. 수평 방향에 대한 변화량이 크게 되면 수평 방향으로 예측이 잘 될 가능성이 적다는 것을 의미할 수 있다. 이 경우, region 2 또는 region 3이 선택될 수 있다. 즉, region에 대한 식별자로서 mapXgrY0[signy][signx]이 선택될 수 있다.
또한, 수평 방향에 대해서는 양의 변화량이 가리키는 방향이 오른쪽이고, 음의 변화량이 가리키는 방향은 왼쪽일 수 있다. 수직 방향에 대해서는 양의 변화량이 가리키는 방향이 아래쪽이고, 음의 변화량이 가리키는 방향은 위쪽일 수 있다. iDx에 대한 sign과 iDy에 대한 sign이 같을 때는 region 1 또는 region 2가 선택될 수 있고, iDx에 대한 sign과 iDy에 대한 sign이 다를 때는 region 0 또는 region 3이 선택될 수 있다.
다음으로 정수 값으로 스케일링된 비율 값(ratio)을 다음 표 12와 같이 구할 수 있다.
fRatio = gtY ? ( absy / absx ) : ( absx / absy )
fRatioScaled = fRatio * (1 << 16)
ratio = intFunc(fRatioScaled)
표 12에서 (1 << 16)은 1을 16만큼 왼쪽으로 shift함을 의미하는 것으로서, 이는 216인 65536을 나타낸다. intFunc 함수는 소수의 값으로 표현된 fRatioScaled를 정수의 값으로 변환하는 함수일 수 있다. 정수의 값으로의 변환을 위해 반올림(round), 올림(ceiling), 버림(floor) 등의 연산이 적용될 수 있다. C/C++ 라이브러리에서 제공하는 int 등의 casting 함수를 이용하여 정수의 값으로 변환할 수도 있다. 표 12에서, absy와 absx의 비율을 구하기 위해 나눗셈 연산(/)이 필요할 수 있다. 그러나, 코덱을 구현할 때는(특히 하드웨어로 구현할 때는) 나눗셈 연산에 대한 구현 비용이 비싸거나 구현이 용이하지 않은 문제가 있다. 이에, 나눗셈 연산을 여러 정수 연산들의 조합으로 근사시키는 편이 구현 측면에서 유리한 경우가 많다. 따라서, 상기 ratio을 구하는 수식들을 다음 표 13의 수식들로 근사시킬 수 있다.
int g_gradDivTable[16] = { 0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0 };
s0 = gtY ? absy : absx
s1 = gtY ? absx : absy
x = floorLog2(s1)
norm = ((s1 << 4) >> x) & 15
int v = g_gradDivTable[norm] | 8
x = x + (norm != 0)
shift = 13 - x
if (shift < 0)
{
shift = -shift
add = (1 << (shift - 1))
ratio = (s0 * v + add) >> shift
}
else
{
ratio = (s0 * v) << shift
}
정수화된 비율 값이 표 13과 같은 과정을 통해 결정될 수 있다. 비율 값이 angTable에서 어느 위치와 가장 가까운지는 다음 표 14와 같이 결정될 수 있다.
int angTable[17] = { 0, 2048, 4096, 6144, 8192, 12288, 16384, 20480, 24576, 28672, 32768, 36864, 40960, 47104, 53248, 59392, 65536 }
idx = 16;
for( int i = 1; i < 17; i++ )
{
if( ratio <= angTable[i] )
{
idx = ratio - angTable[i - 1] < angTable[i] - ratio ? i - 1 : i;
break;
}
}
표 14에 따르면, angTable은 17개의 엔트리로 구성될 수 있다. 전술한 각 그룹이 17개의 모드들로 구성된 경우, 각 그룹을 구성하는 인트라 예측 모드 각각이 엔트리에 해당할 수 있다. 표 14에서, 비율 값(ratio)와 가장 가까운 angTable의 엔트리를 찾고, 해당 엔트리에 대응하는 angleTable의 인덱스를 기반으로 idx의 값이 유도될 수 있다.
int offsets[4] = { HOR_IDX, HOR_IDX, VER_IDX, VER_IDX }
int dirs[4] = { -1, 1, -1, 1 }
iAngUneven = offsets[region] + dirs[region] * idx
표 15는 C/C++ 문법을 따라 기술된다. iAngUneven에는 필터가 적용되는 현재 블록 내 현재 샘플 위치에 대해 세기 값을 누적할 인트라 예측 모드의 값이 할당될 수 있다. 앞서 유도된 region은 4개의 그룹들 중 어느 하나를 지시하는 식별자일 수 있다. offsets[region]은 region이 지시하는 그룹에 대한 인트라 예측 모드의 시작 값을 나태낼 수 있고, dirs[region]은 해당 인트라 예측 모드가 증가 또는 감소하는 방향성을 나타낼 수 있다. idx는 상기 angleTable 내에서의 위치를 나타낼 수 있다. 따라서, 표 15와 같은 수식을 통해 iAngUneven의 값이 결정될 수 있다.
선택된 특정 인트라 예측 모드에 대한 누적 세기 값을 더하는 과정은 다음과 같이 수행될 수 있다.
[수학식 9]
piHistogram[iAngUneven] += iAmp
수학식 9에서 piHistogram 어레이는 모든 인트라 예측 모드들에 대한 누적 세기 값을 저장하고 있는 배열로서, 0으로 초기화된 후 필터가 적용되는 현재 블록 내 내부 영역의 샘플 위치들에 대해서 루프를 돌면서 세기 값을 계산할 수 있다. 이때, 현재 샘플 위치에 대해 계산된 세기 값은 선택된 특정 인트라 예측 모드에 대한 누적 세기 값에 더해지게 된다. 전술한 바와 같이, iAngUneven에는 필터가 적용된 현재 샘플 위치에 대해 선택된 인트라 예측 모드의 값이 저장될 수 있고, iAmp에는 해당 샘플 위치에 대해 계산된 세기 값이 저장될 수 있다. piHistogram[iAngUneven]에는 iAngUneven에 의해 지시되는 인트라 예측 모드에 대한 누적 세기 값이 저장될 수 있다. 상기 수학식 9는 도 6의 S630 단계에 대응될 수 있다.
필터가 적용되는 블록 내 내부 영역의 샘플 위치들에 대해서 루프를 모두 돌게 되면, piHistogram 어레이에는 모든 인트라 예측 모드들에 대한 누적 세기 값이 저장되어 있다. 가장 누적 세기 값이 큰 하나 또는 둘 이상의 모드들을 선택할 수 있다. 상기 선택된 모드는 DIMD 모드라고 불릴 수 있다. 이는 도 6에서의 S640 단계에 해당될 수 있다.
firstAmp = 0, curAmp = 0;
firstMode = 0, curMode = 0;
for (int i = 0; i < NUM_LUMA_MODE; i++)
{
curAmp = piHistogram[i];
curMode = i;
if (curAmp > firstAmp)
{
firstAmp = curAmp;
firstMode = curMode;
}
}
표 16은 C/C++ 문법을 따라 기술된다. NUM_LUMA_MODE는 DIMD 모드로 이용 가능한 모든 인트라 예측 모드들의 개수를 나타낼 수 있다. 예를 들어, NUM_LUMA_MODE는 67일 수 있다. 표 16에 따르면, firstMode 변수에 가장 누적 세기 값이 큰 인트라 예측 모드의 값이 할당될 수 있다. 따라서, 최종적으로 결정된 firstMode 변수의 값에 대응하는 인트라 예측 모드가 WxH 블록에 대한 DIMD 모드로 설정될 수 있다.
인코딩 장치와 디코딩 장치에는 인트라 예측 모드들과 변환 세트들 간의 매핑 관계를 규정하는 매핑 테이블이 정의될 수 있다. 변환 세트를 선택하기 위한 정보의 시그날링없이, 상기 매핑 테이블로부터 앞서 유도된 인트라 예측 모드에 대응하는 변환 세트가 선택될 수 있다.
상기 선택된 변환 세트는 복수의 변환 커널 후보들을 포함할 수 있다. 복수의 변환 커널 후보들 중 어느 하나를 지시하는 인덱스가 시그날링될 수 있다. 여기서의 인덱스는 비분리 변환의 타입에 따라 NSPT 인덱스 또는 LFNST 인덱스로 표현될 수 있다. 또는, 인덱스는 변환 인덱스로 표현될 수도 있다. 예를 들어, 상기 인덱스의 값은 0 내지 N의 범위에 속할 수 있다. 0의 인덱스는 비분리 변환이 적용되지 않음을 지시하고, k의 인덱스는 k번째 변환 커널 후보를 지시할 수 있다(1 ≤ k ≤ N).
실시예 5
현재 블록에 대해서 복수의 인트라 예측 모드들이 유도될 수 있고, 복수의 인트라 예측 모드들을 기반으로 하나 또는 그 이상의 변환 세트 후보들이 유도될 수 있다. 여기서, 변환 세트 후보는, 비분리 변환을 위한 변환 세트(예를 들어, LFNST을 위한 변환 세트 및/또는 NSPT를 위한 변환 세트)를 의미할 수 있다. 다만, 이에 한정되지 아니하며, 분리 변환을 위한 변환 세트(예를 들어, MTS를 위한 변환 세트)를 의미할 수도 있다. 각 변환 세트 후보는 하나 또는 그 이상의 변환 커널 후보들을 포함할 수 있다. 상기 하나 또는 그 이상의 변환 세트 후보들 중 어느 하나가 현재 블록의 변환 세트로 결정될 수 있다. 상기 현재 블록의 변환 세트에 속한 하나 또는 그 이상의 변환 커널 후보들 중 어느 하나가 현재 블록의 변환 커널로 설정될 수 있다.
현재 블록에 대한 복수의 인트라 예측 모드들에 대해서, 이들에 매핑되는 변환 세트 후보들이 각각 유도될 수 있다.
현재 블록이 인트라 블록인 경우, 현재 블록에 적용된 인트라 예측 모드를 기반으로 변환 세트 후보가 선택될 수 있다. 이때, 해당 인트라 예측 모드는, 플래너 모드, DC 모드, 또는 방향성 모드일 수 있다.
다만, 변환 세트 후보를 선택함에 있어서, 인트라 예측에 적용된 인트라 예측 모드를 사용하는 것이 보편적이기는 하나, 인트라 예측에 따른 레지듀얼 신호가 해당 인트라 예측 모드에 따른 변환 커널에 정확히 부합되지 않을 수도 있다. 인트라 예측에 적용된 인트라 예측 모드를 A 모드라 부르기로 한다. 이 경우, A 모드가 아닌 다른 모드를 기반으로 변환 세트 후보를 선택할 수 있다.
일예로, A 모드가 아닌 다른 모드는, A 모드와 유사한 모드를 포함할 수 있다. 예를 들어, A 모드의 모드 값이 M인 경우, (M-d) 내지 (M+d)의 범위에 속한 적어도 하나의 모드가 A 모드와 유사한 모드로 간주될 수 있다. 여기서, d는 1보다 크거나 같은 정수일 수 있다.
A 모드가 아닌 다른 모드는, A 모드와 겹치지 않는 대표적인 모드를 포함할 수 있다. 예를 들어, 플래너 모드, DC 모드, 수평 모드, 수직 모드, 우상향 대각 모드, 우하향 대각 모드, 또는 좌하향 대각 모드 중 적어도 하나가 A 모드와 겹치지 않는 대표적인 모드일 수 있다. 여기서, 우상향, 우하향 및 좌하향 대각 모드는 각각 2번 모드, 34번 모드 및 66번 모드일 수 있다.
A 모드가 아닌 다른 모드는, DIMD 방법과 같은 특정 방식을 통해 유도된 모드를 포함할 수 있으며, DIMD 방법은 실시예 4에서 살펴본 바와 같다. 상기 특정 방식을 통해 유도된 모드는 VIPM(Virtual Intra Prediction Mode) 또는 DIPM(Derived Intra Prediction Mode)으로 명명될 수 있다.
현재 블록이 인트라 블록인 경우, 플래너 모드, DC 모드, 방향성 모드와 같은 특정 인트라 예측 모드를 기반으로 예측 블록이 생성될 수 있다. 해당 예측 블록을 입력으로 하는 DIMD 방법을 통해 DIPM을 유도할 수 있다. 즉, DIMD 방법을 통해 인트라 예측 모드들에 대해 누적된 세기(amplitude) 값을 도출할 수 있고, 누적된 세기 값의 내림차순으로 상위 K개의 인트라 예측 모드(들)이 DIPM으로 유도될 수 있다. 여기서, K는 1보다 크거나 같은 정수일 수 있다.
현재 블록이 인터 블록인 경우, 인터 블록에 대해서도 비분리 변환이 적용될 수 있다. 인터 블록에 대해서는 인트라 예측 모드가 정의되지 않을 수 있다. 다만, 예외적으로 GPM(Geometric Partitioning Mode)과 CIIP(Combined Inter-Intra Prediction) 모드에 대해서는 인트라 예측 모드가 정의될 수 있다. 인터 예측을 통해 생성되는 예측 블록을 입력으로 하는 DIMD 방법을 통해 DIPM을 유도할 수 있다. 즉, DIMD 방법을 통해 인트라 예측 모드들에 대해 누적된 세기(amplitude) 값을 도출할 수 있고, 누적된 세기 값의 내림차순으로 상위 K개의 인트라 예측 모드(들)이 DIPM으로 유도될 수 있다. 여기서, K는 1보다 크거나 같은 정수일 수 있다.
DIPM을 유도하기 위한 방법으로 언급된 DIMD 방법은 일예에 불과하며, 디코딩 장치에서 기-복원된 가용 샘플, 가용 샘플의 분포, 인접 및/또는 인접하지 않은 주변 블록(들)의 인트라 예측 모드(들), 또는 주변 블록들의 인트라 예측 모드들의 빈도 중 적어도 하나를 기반으로 DIPM이 유도될 수도 있다.
플래너 모드, DC 모드, 또는 방향성 모드와 같은 통상적인 인트라 예측 모드와는 다른 방식으로 인트라 예측이 수행될 수도 있다. 예를 들어, DIMD(Decoder side Intra Mode Derivation), TIMD(Template-based Intra Mode Derivation), MIP(Matrix-based Intra Prediction), IntraTMP(Intra Template Matching Prediction), EIP(Extrapolation filter-based Intra Prediction), SGPM(Spatial Geometric Partitioning Mode)와 같은 방식으로 인트라 예측이 수행될 수 있다. SGPM의 경우, 기하학 분할에 따른 파티션마다 통상적인 인트라 예측 모드를 가질 수 있으나, 코딩 블록 또는 변환 블록 전체에 대한 통상적인 인트라 예측 모드를 특정하기는 어려울 수 있다. 본 개시에서는, DIMD, TIMD, MIP, IntraTMP, EIP, SGPM와 같은 인트라 예측 모드를 특수 인트라 예측 모드라 부르기로 한다.
특수 인트라 예측 모드로 부호화된 블록에 특화된 변환 세트들이 별도로 정의될 수 있다. 또는, 특수 인트라 예측 모드로 부호화된 블록에 대해서, 통상적인 인트라 예측 모드들에 매핑되는 변환 세트들이 동일하게 사용될 수 있다. 현재 블록이 특수 인트라 예측 모드로 부호화된 블록인 경우, 특수 인트라 예측 모드로 부호화된 블록에 대응하는 통상적인 인트라 예측 모드를 유도할 수 있다. 상기 유도된 통상적인 인트라 예측 모드를 기반으로 변환 세트들로부터 변환 세트 후보를 선택할 수 있다.
일예로, 상기 유도된 통상적인 인트라 예측 모드는, DIMD 방법을 통해 유도되는 DIPM을 포함할 수 있다. 여기서, DIMD 방법은, 특수 인트라 예측 모드를 기반으로 생성된 예측 블록을 입력으로 하여 적용될 수 있다. DIPM을 유도하기 위한 방법으로 언급된 DIMD 방법은 일예에 불과하며, 디코딩 장치에서 기-복원된 가용 샘플, 가용 샘플의 분포, 인접 및/또는 인접하지 않은 주변 블록(들)의 인트라 예측 모드(들), 또는 주변 블록들의 인트라 예측 모드들의 빈도 중 적어도 하나를 기반으로 DIPM이 유도될 수도 있다.
상기 유도된 통상적인 인트라 예측 모드는, 플래너 모드, DC 모드, 수평 모드, 수직 모드, 우상향 대각 모드, 우하향 대각 모드, 좌하향 대각 모드와 같은 적어도 하나의 대표적인 모드를 포함할 수 있다.
상기 유도된 통상적인 인트라 예측 모드는, 특수 인트라 예측 모드를 적용하는 과정에서 파생되는 인트라 예측 모드를 포함할 수 있다. 예를 들어, 현재 블록에 SGPM이 적용되는 경우, 파티션 경계의 방향에 대응하는 인트라 예측 모드, 파티션 경계의 방향에 가장 유사한 인트라 예측 모드, 또는 각 파티션에 적용되는 인트라 예측 모드 중 적어도 하나가 파생될 수 있다. 현재 블록에 DIMD 또는 TIMD가 적용되는 경우, 인트라 예측 과정에서 하나 또는 그 이상의 인트라 예측 모드들이 파생될 수 있다.
현재 블록이 인트라 블록인 경우, 현재 블록에 대해 유도되는 복수의 인트라 예측 모드는, 현재 블록의 인트라 예측에 사용되는 인트라 예측 모드(즉, A 모드), A 모드와 다른 모드, 또는 현재 블록에 대해 유도된 통상적인 인트라 예측 모드 중 적어도 하나를 포함할 수 있다.
인터 블록에 특화된 변환 세트들이 별도로 정의될 수 있다. 또는, 인터 블록에 대해서, 통상적인 인트라 예측 모드들에 매핑되는 변환 세트들이 동일하게 사용될 수 있다.
현재 블록이 인터 블록인 경우, 인터 예측을 통해 생성된 예측 블록을 기반으로 통상적인 인트라 예측 모드를 유도할 수 있다. 예를 들어, 인터 예측을 통해 생성된 예측 블록을 입력으로 하는 DIMD 방법을 통해 DIPM이 유도될 수 있고, 해당 DIPM이 통상적인 인트라 예측 모드로 설정될 수 있다. 여기서, DIMD 방법은 일예에 불과하며, 디코딩 장치에서 기-복원된 가용 샘플, 가용 샘플의 분포, 인접 및/또는 인접하지 않은 주변 블록(들)의 인트라 예측 모드(들), 또는 주변 블록들의 인트라 예측 모드들의 빈도 중 적어도 하나를 기반으로 DIPM이 유도될 수도 있다. 상기 유도된 통상적인 인트라 예측 모드를 기반으로 변환 세트들로부터 변환 세트 후보를 선택할 수 있다.
현재 블록에 GPM 또는 CIIP 모드가 적용되는 경우, 예측 과정에서 파생되는 인트라 예측 모드를 기반으로 통상적인 인트라 예측 모드를 유도할 수 있다. 상기 유도된 통상적인 인트라 예측 모드를 기반으로 변환 세트들로부터 변환 세트 후보가 선택될 수 있다. 구체적으로, GPM의 경우, 파티션 경계의 방향에 대응하는 인트라 예측 모드, 파티션 경계의 방향에 가장 유사한 인트라 예측 모드, 또는 각 파티션에 적용되는 인트라 예측 모드 중 적어도 하나가 상기 통상적인 인트라 예측 모드로 설정될 수 있다. CIIP 모드의 경우, 인트라 예측에 사용되는 인트라 예측 모드가 상기 통상적인 인트라 예측 모드로 설정될 수 있다.
현재 블록이 인터 블록인 경우, 현재 블록에 대해 유도되는 복수의 인트라 예측 모드들은, 전술한 방법을 통해 유도되는 통상적인 인트라 예측 모드들 중 적어도 하나를 포함할 수 있다.
현재 블록에 대해 유도된 복수의 인트라 예측 모드들을 기반으로 하나 또는 그 이상의 변환 세트 후보들이 유도될 수 있다.
일예로, 복수의 인트라 예측 모드들을 M_(1), M_(2), ... , M_(n-1), M_(n)라 할 경우, 복수의 인트라 예측 모드들에 매핑되는 변환 세트는 KS_(1), KS_(2), ... , KS_(n-1), KS_(n)로 정의될 수 있다. 여기서, n의 값은 2보다 크거나 같은 정수일 수 있다. M_(1) 내지 M_(n)이 서로 다른 모드라 가정할 경우, KS_(1) 내지 KS_(n)는 서로 다른 변환 세트들일 수도 있고, KS_(1) 내지 KS_(n) 전부 또는 일부는 서로 겹칠 수도 있다.
KS_(1) 내지 KS_(n)이 서로 다른 변환 세트들인 경우, KS_(1) 내지 KS_(n)가 현재 블록에 대한 변환 세트 후보들로 설정될 수 있다. 또는, KS_(1) 내지 KS_(n) 중에 적어도 하나의 겹치는 변환 세트가 존재하는 경우, KS_(1) 내지 KS_(n) 중에서 겹치는 변환 세트를 제거하고 서로 다른 변환 세트들만을 선택하여 KSE_(1), KSE(2), ... , KSE_(m-1), KSE_(m)를 구성할 수 있다. 이 경우, KSE_(1) 내지 KSE_(m)가 현재 블록에 대한 변환 세트 후보들로 설정될 수 있다. 여기서, m의 값은 1보다 크거나 같은 정수일 수 있다.
다시 말해, 복수의 인트라 예측 모드들에 대응하는 변환 세트들 중에서 서로 다른 변환 세트들을 기반으로 변환 세트 후보들이 유도될 수 있다. 이때, 복수의 인트라 예측 모드들에 대응하는 변환 세트들 중에서 서로 다른 변환 세트들의 개수가 둘 이상인 경우, 둘 이상의 변환 세트 후보들이 유도될 수 있다. 반면, 복수의 인트라 예측 모드들에 대응하는 변환 세트들이 전부 동일한 경우, 하나의 변환 세트 후보가 유도될 수 있다. 또는, 복수의 인트라 예측 모드들에 대응하는 변환 세트들이 전부 동일한 경우, 후술할 findOtherKS 함수를 통해 KS_(1)과 다른 하나 또는 그 이상의 변환 세트들을 추가적으로 유도할 수도 있다. 이 경우, KS_(1) 및 상기 추가적으로 유도된 하나 또는 그 이상의 변환 세트들이 현재 블록의 비분리 변환을 위한 변환 세트 후보들로 설정될 수 있다.
둘 이상의 변환 세트 후보들이 유도되는 경우, 둘 이상의 변환 세트 후보들 중 어느 하나를 특정하는 변환 세트 인덱스가 비트스트림을 통해 시그날링될 수 있다. 시그날링된 변환 세트 인덱스를 기반으로 현재 블록의 비분리 변환을 위한 변환 세트가 결정될 수 있다. 다만, 하나의 변환 세트 후보가 유도되는 경우, 상기 변환 세트 인덱스의 시그날링이 생략될 수 있고, 변환 세트 인덱스의 값은 0으로 유도될 수 있다.
또는, M_(1)이 기본 모드(base mode)로 설정될 수 있다. 먼저, M_(1)에 매핑되는 KS_(1)를 유도할 수 있다. 그런 다음, M_(2)부터 M_(n)까지 순차적으로 해당 모드에 매핑되는 변환 세트와 KS_(1)이 서로 동일한지 여부를 체크할 수 있다. 상기 동일성 체크는 기-유도된 KS_(1)과 다른 변환 세트가 발견될 때까지 수행될 수 있다. KS_(1)과 다른 변환 세트(이하, KS_(k)라 함)가 발견된 경우, KS_(1)과 KS_(k)는 현재 블록을 위한 변환 세트 후보로 설정될 수 있다. 전술한 과정을 통해, 현재 블록에 대해 둘의 변환 세트 후보들이 유도될 수 있다. 다만, 상기 동일성 체크 결과, KS_(1)과 다른 변환 세트가 발견되지 않을 수도 있다. 이 경우, 현재 블록에 대해 하나의 변환 세트 후보가 유도될 수도 있다. 상기 하나의 변환 세트 후보는 KS_(1)일 수 있다.
현재 블록에 대해 유도된 둘의 변환 세트 후보들 중 어느 하나를 특정하는 플래그가 비트스트림을 통해 시그날링될 수 있다. 시그날링된 플래그를 기반으로 현재 블록의 비분리 변환을 위한 변환 세트가 결정될 수 있다. 다만, 상기 동일성 체크 결과, KS_(1)과 다른 변환 세트가 발견되지 않은 경우(또는, 현재 블록에 대해 하나의 변환 세트 후보가 유도되는 경우), 전술한 플래그의 시그날링이 생략될 수 있고, 상기 유도된 하나의 변환 세트 후보가 현재 블록의 비분리 변환을 위한 변환 세트로 설정될 수 있다. 또는, 동일성 체크 결과, KS_(1)과 다른 변환 세트가 발견되지 않은 경우, 후술할 findOtherKS 함수를 통해 KS_(1)과 다른 변환 세트를 추가적으로 유도할 수도 있다. 이 경우, KS_(1) 및 추가적으로 유도된 변환 세트가 현재 블록의 비분리 변환을 위한 변환 세트 후보들로 설정될 수 있다.
이하, 둘의 인트라 예측 모드에 각각 매핑되는 둘의 변환 세트들이 서로 동일한지 여부를 결정하는 방법에 대해서 살펴보도록 한다.
둘의 변환 세트들이 서로 동일한지 여부는, 변환 세트들 간의 변환 세트 인덱스의 동일 여부를 기반으로 결정될 수 있다.
구체적으로, M_(2)에 매핑되는 변환 세트 인덱스가 M_(1)에 매핑되는 변환 세트 인덱스와 동일한 경우, M_(2)에 매핑되는 변환 세트(KS_(2))는 M_(1)에 매핑되는 변환 세트(KS_(1))와 동일한 것으로 결정될 수 있다. 이 경우, M_(2)에 매핑되는 변환 세트는 현재 블록에 대한 변환 세트 후보로 설정되지 않을 수 있다. 반면, M_(2)에 매핑되는 변환 세트 인덱스가 M_(1)에 매핑되는 변환 세트 인덱스와 다른 경우, M_(2)에 매핑되는 변환 세트(KS_(2))는 M_(1)에 매핑되는 변환 세트(KS_(1))와 다른 것으로 결정될 수 있다. 이 경우, KS_(2)는 KS_(1)와 함께 현재 블록에 대한 변환 세트 후보로 설정될 수 있다.
예를 들어, 인트라 예측 모드와 변환 세트 간의 매핑 관계는, 표 8, 표 9, 또는 표 10과 같이 정의될 수 있다. 표 9에 따르면, 34번 모드를 중심으로 두 방향성 모드들(즉, 모드 X와 모드 (68-X))가 서로 대칭이므로, 둘의 방향성 모드들은 서로 동일한 변환 세트에 매핑될 수 있다. 예컨대, 모드 12와 모드 56은 서로 동일한 변환 세트에 매핑되어 있다. 따라서, 특정 변환 세트를 가리키는 변환 세트 인덱스(예를 들어, NSPT 세트 인덱스)만을 기반으로 둘의 변환 세트들이 서로 동일한지 여부를 판단할 수 있다. 이 경우, 모드 12와 모드 56은 동일한 변환 세트 인덱스에 매핑되므로, 모드 12와 모드 56에 매핑되는 둘의 변환 세트들은 서로 동일한 것으로 판단될 수 있다.
모드 x에 대해 매핑되는 변환 세트 인덱스를 K(x)라 하기로 한다. 이때, 모드 q와 모드 r에 각각 매핑되는 변환 세트들이 서로 동일한지 여부를 나타내는 변수 redundentKS는 다음과 수학식 10과 같이 유도될 수 있다.
[수학식 10]
redundantKS = ( K(q) == K(r) )
수학식 10에서 연산 "=="은 왼편과 오른편이 같으면 true를 반환(return)하고 왼편과 오른편이 다르면 false를 반환하는 연산이다. redundantKS의 값이 true(또는 1)인 경우, 이는 모드 q와 모드 r이 서로 동일한 변환 세트에 매핑됨을 나타낼 수 있고, redundantKS의 값이 false(또는 0)인 경우, 이는 모드 q와 모드 r이 서로 다른 변환 세트에 매핑됨을 나타낼 수 있다.
수학식 10에 따르면, 모드 q에 매핑되는 변환 세트 인덱스 K(q)와 모드 r에 매핑되는 변환 세트 인덱스 K(r)가 서로 동일한 경우, redundantKS의 값이 true 또는 1로 유도될 수 있다. 따라서, 모드 q에 매핑되는 변환 세트와 모드 r에 매핑되는 변환 세트는 서로 동일한 것으로 판단될 수 있다. 그렇지 않은 경우, redundantKS의 값이 false 또는 0으로 유도될 수 있다. 따라서, 모드 q에 매핑되는 변환 세트와 모드 r에 매핑되는 변환 세트는 서로 다른 것으로 판단될 수 있다.
또는, 둘의 변환 세트들이 서로 동일한지 여부는, 변환 세트들 간의 변환 세트 인덱스의 동일 여부 또는 입력 데이터의 전치 여부(또는, 전치 타입) 중 적어도 하나를 기반으로 결정될 수 있다. 상기 전치 타입은 입력 데이터의 전치 여부를 나타내는 플래그를 기반으로 결정될 수 있다.
구체적으로, M_(2)에 매핑되는 변환 세트 인덱스가 M_(1)에 매핑되는 변환 세트 인덱스와 동일하고 M_(2)에 대응하는 전치 타입이 M_(1)에 대응하는 전치 타입과 동일한 경우, M_(2)에 매핑되는 변환 세트(KS_(2))는 M_(1)에 매핑되는 변환 세트(KS_(1))와 동일한 것으로 결정될 수 있다. 이 경우, M_(2)에 매핑되는 변환 세트는 현재 블록에 대한 변환 세트 후보로 설정되지 않을 수 있다. 반면, M_(2)에 매핑되는 변환 세트 인덱스가 M_(1)에 매핑되는 변환 세트 인덱스와 동일하나, M_(2)에 대응하는 전치 타입이 M_(1)에 대응하는 전치 타입과 다른 경우, M_(2)에 매핑되는 변환 세트(KS_(2))는 M_(1)에 매핑되는 변환 세트(KS_(1))와 다른 것으로 결정될 수 있다. 또는, M_(2)에 매핑되는 변환 세트 인덱스가 M_(1)에 매핑되는 변환 세트 인덱스와 다른 경우, M_(2)에 대응하는 전치 타입이 M_(1)에 대응하는 전치 타입과 동일한지 여부에 관계없이, M_(2)에 매핑되는 변환 세트(KS_(2))는 M_(1)에 매핑되는 변환 세트(KS_(1))와 다른 것으로 결정될 수 있다. KS_(2)가 KS_(1)과 다른 것으로 결정된 경우, KS_(2)는 KS_(1)와 함께 현재 블록에 대한 변환 세트 후보로 설정될 수 있다.
예를 들어, 순방향의 비분리 변환을 적용할 때, 입력 데이터에 대해 전치(transpose) 연산을 먼저 수행한 후 변환 커널을 적용할 수 있다. 이 경우, 모드 12와 모드 56이 서로 대칭일지라도, 실질적으로 모드 12와 모드 56에 적용되는 변환 커널은 서로 동일하다고 볼 수 없다. 순방향의 비분리 변환이 적용되는 입력 데이터를 X라고 할 경우, 전치 연산은 일종의 shuffling과 같으므로 해당 permutation 행렬(여기서, 행렬 P)을 X의 왼쪽에 곱하는 것과 같다고 볼 수 있다. X는 순방향의 비분리 변환이 적용되는 2D-블록에 속한 입력 데이터를 행 우선 순서와 같은 특정 순서에 따라 배치하여 1차원 벡터로 구성한 것일 수 있다. 대칭성을 활용하여 모드 56에 대해 전치 연산이 적용될 경우, 서로 대칭인 모드 12와 모드 56에 대해 동일한 변환 커널(여기서, 변환 행렬 G)을 적용하더라도 둘의 모드들에 대한 순방향의 비분리 변환의 결과(y)는 다음과 같이 계산된다.
모드 12: y = Gx
모드 56: y = GPx
따라서, 실질적으로 모드 12와 모드 56에 대한 순방향의 변환 커널은 각각 G와 GP가 되므로, 둘의 모드들에 대해서 서로 다른 변환 커널이 적용된다고 볼 수 있다. 따라서, 모드 12와 모드 56에 대해서는 동일한 변환 세트가 매핑된다고 볼 수 없다. 더욱이, 비정방형 블록인 MxN 블록에 대해 비분리 변환이 적용되는 경우라면, 둘의 모드들에 대해 적용되는 변환 커널마저 달라질 수 있다. 설명의 편의를 위해 wide angle intra prediction(WAIP)이 적용되지 않는 경우를 가정하면, MxN 블록의 모드 56은 NxM 블록의 모드 12에 매핑되는 변환 세트 적용되므로, MxN 블록의 모드 12와는 근본적으로 다른 변환 세트가 적용될 수 있다. MxN 블록을 위한 변환 세트들과 NxM 블록을 위한 변환 세트들이 별도로 정의될 경우에 더욱 그러하다. 따라서, 입력 데이터의 전치 여부를 고려하지 않더라도, 둘의 모드들에 대해 적용되는 변환 커널이 달라지므로, 특히 비정방형 블록의 모드 12와 모드 56에 대해서 서로 동일한 변환 세트가 매핑된다고 볼 수 없다.
모드 x에 대해 매핑되는 변환 세트 인덱스를 K(x)라 하고 모드 x에 대한 전치 타입을 나타내는 값을 TP(x)라 하기로 한다. 이때, 모드 q와 모드 r에 매핑되는 변환 세트들이 서로 동일한지 여부를 나타내는 변수 redundentKS는 다음과 수학식 11과 같이 유도될 수 있다.
[수학식 11]
redundantKS = ( ( K(q) == K(r) ) && ( TP(q) == TP(r) ) )
수학식 11에서 연산 "=="은 왼편과 오른편이 같으면 true를 반환(return)하고 왼편과 오른편이 다르면 false를 반환하는 연산이다. 연산 "&&"은 AND 연산으로서 왼편과 오른편이 모두 true일 경우에만 true이고 그렇지 않으면 false로 계산되는 연산이다. redundantKS의 값이 true(또는 1)인 경우, 이는 모드 q와 모드 r이 서로 동일한 변환 세트에 매핑됨을 나타낼 수 있고, redundantKS의 값이 false(또는 0)인 경우, 이는 모드 q와 모드 r이 서로 다른 변환 세트에 매핑됨을 나타낼 수 있다.
수학식 10에 따르면, 모드 q에 매핑되는 변환 세트 인덱스 K(q)와 모드 r에 매핑되는 변환 세트 인덱스 K(r)가 서로 동일하고, 모드 q에 대한 전치 타입 TP(q)와 모드 r에 대한 전치 타입 TP(r)가 서로 동일한 경우, redundantKS의 값이 true 또는 1로 유도될 수 있다. 따라서, 모드 q에 매핑되는 변환 세트와 모드 r에 매핑되는 변환 세트는 서로 동일한 것으로 판단될 수 있다. 그렇지 않은 경우(예를 들어, 모드 q에 매핑되는 K(q)와 모드 r에 매핑되는 K(r)가 서로 다르거나, 모드 q에 대한 TP(q)와 모드 r에 대한 TP(r)가 서로 다른 경우), redundantKS의 값이 false 또는 0으로 유도될 수 있다. 따라서, 모드 q에 매핑되는 변환 세트와 모드 r에 매핑되는 변환 세트는 서로 다른 것으로 판단될 수 있다.
둘의 모드들에 각각 매핑되는 변환 세트가 서로 동일한지 여부를 판단함에 있어서, 해당 둘의 모드들은 WAIP의 모드로 변환되기 이전 모드들일 수 있다. 즉, M_(1) 내지 M_(n)는 WAIP의 모드로 변환되기 이전 모드들일 수 있다.
또는, 둘의 모드들에 각각 매핑되는 변환 세트가 서로 동일한지 여부를 판단함에 있어서, 해당 둘의 모드들은 WAIP의 모드로 변환된 모드들일 수도 있다. WAIP의 모드로 변환된 모드 x를 WA(x)라 표현할 경우, 변수 redundantKS는 다음 수학식 12 또는 13과 같이 유도될 수 있다.
[수학식 12]
redundantKS = ( K(WA(q)) == K(WA(r)) )
수학식 12에서, K(WA(q))는 WAIP의 모드로 변환된 모드 q에 매핑되는 변환 세트 인덱스를 나타낼 수 있고, K(WA(r))는 WAIP의 모드로 변환된 모드 r에 매핑되는 변환 세트 인덱스를 나타낼 수 있다.
수학식 12에 따르면, 모드 WA(q)에 매핑되는 K(WA(q))와 모드 WA(r)에 매핑되는 K(WA(r))가 서로 동일한 경우, redundantKS의 값이 true 또는 1로 유도될 수 있다. 따라서, 모드 WA(q)에 매핑되는 변환 세트와 모드 WA(r)에 매핑되는 변환 세트는 서로 동일한 것으로 판단될 수 있다. 그렇지 않은 경우, redundantKS의 값이 false 또는 0으로 유도될 수 있다. 따라서, 모드 WA(q)에 매핑되는 변환 세트와 모드 WA(r)에 매핑되는 변환 세트는 서로 다른 것으로 판단될 수 있다.
[수학식 13]
redundantKS = ( ( K(WA(q)) == K(WA(r)) ) && ( TP(WA(q)) == TP(WA(r)) ) )
수학식 13에서, K(WA(q))와 K(WA(r))는 수학식 12에서 살펴본 바와 같다. TP(WA(q))는 모드 WA(q)에 대한 전치 타입을 나타낼 수 있고, TP(WA(r))는 모드 WA(r)에 대한 전치 타입을 나타낼 수 있다.
수학식 13에 따르면, 모드 WA(q)에 매핑되는 K(WA(q))와 모드 WA(r)에 매핑되는 K(WA(r))가 서로 동일하고, 모드 WA(q)에 대한 TP(WA(q))와 모드 WA(r)에 대한 TP(WA(r))가 서로 동일한 경우, redundantKS의 값이 true 또는 1로 유도될 수 있다. 따라서, 모드 WA(q)에 매핑되는 변환 세트와 모드 WA(r)에 매핑되는 변환 세트는 서로 동일한 것으로 판단될 수 있다. 그렇지 않은 경우(예를 들어, 모드 WA(q)에 매핑되는 K(WA(q))와 모드 WA(r)에 매핑되는 K(WA(r))가 서로 다르거나, 모드 WA(q)에 대한 TP(WA(q))와 모드 WA(r)에 대한 TP(WA(r))가 서로 다른 경우), redundantKS의 값이 false 또는 0으로 유도될 수 있다. 따라서, 모드 WA(q)에 매핑되는 변환 세트와 모드 WA(r)에 매핑되는 변환 세트는 서로 다른 것으로 판단될 수 있다.
만약 WAIP가 지원되지 않거나, redundantKS를 구할 때 WAIP의 모드가 고려되지 않도록 구성된 경우, 수학식 10 또는 11이 이용될 수도 있고, WAIP의 모드로 변환하는 WA() 함수가 항등 함수(identity function)로 간주될 수도 있다(즉, WA(q)=q).
또는, 수학식 13에서 모드 q와 모드 r 중 어느 하나만 WAIP의 모드로 변환되고 다른 하나는 WAIP의 모드로 변환되지 않도록 구성될 수도 있다. 이 경우, redundantKS는 다음 수학식 14 또는 15와 같이 유도될 수 있다.
[수학식 14]
redundantKS = ( ( K(WA(q)) == K(r) ) && ( TP(WA(q)) == TP(r) ) )
수학식 14에 따르면, 모드 WA(q)에 매핑되는 변환 세트 인덱스 K(WA(q))와 모드 r에 매핑되는 변환 세트 인덱스 K(r)가 서로 동일하고, 모드 WA(q)에 대한 전치 타입 TP(WA(q))와 모드 r에 대한 전치 타입 TP(r)이 서로 동일한 경우, redundantKS의 값이 true 또는 1로 유도될 수 있다. 따라서, 모드 WA(q)에 매핑되는 변환 세트와 모드 r에 매핑되는 변환 세트는 서로 동일한 것으로 판단될 수 있다. 그렇지 않은 경우(예를 들어, 모드 WA(q)에 매핑되는 변환 세트 인덱스 K(WA(q))와 모드 r에 매핑되는 변환 세트 인덱스 K(r)가 서로 다르거나, 모드 WA(q)에 대한 전치 타입 TP(WA(q))와 모드 r에 대한 전치 타입 TP(r)가 서로 다른 경우), redundantKS의 값이 false 또는 0으로 유도될 수 있다. 따라서, 모드 WA(q)에 매핑되는 변환 세트와 모드 r에 매핑되는 변환 세트는 서로 다른 것으로 판단될 수 있다.
[수학식 15]
redundantKS = ( ( K(q) == K(WA(r)) ) && ( TP(q) == TP(WA(r)) ) )
수학식 15에 따르면, 모드 q에 매핑되는 변환 세트 인덱스 K(q)와 모드 WA(r)에 매핑되는 변환 세트 인덱스 K(WA(r))가 서로 동일하고, 모드 q에 대한 전치 타입 TP(q)와 모드 WA(r)에 대한 전치 타입 TP(WA(r))가 서로 동일한 경우, redundantKS의 값이 true 또는 1로 유도될 수 있다. 따라서, 모드 q에 매핑되는 변환 세트와 모드 WA(r)에 매핑되는 변환 세트는 서로 동일한 것으로 판단될 수 있다. 그렇지 않은 경우(예를 들어, 모드 q에 매핑되는 변환 세트 인덱스 K(q)와 모드 WA(r)에 매핑되는 변환 세트 인덱스 K(WA(r))가 서로 다르거나, 모드 q에 대한 전치 타입 TP(q)와 모드 WA(r)에 대한 전치 타입 TP(WA(r))가 서로 다른 경우), redundantKS의 값이 false 또는 0으로 유도될 수 있다. 따라서, 모드 q에 매핑되는 변환 세트와 모드 WA(r)에 매핑되는 변환 세트는 서로 다른 것으로 판단될 수 있다.
redundantKS는 인코딩 장치와 디코딩 장치에 동일하게 기-정의된 방법들 중 어느 하나를 기반으로 유도될 수 있다. 여기서, 기-정의된 방법들은 전술한 수학식 10 내지 15에 따른 redundantKS 유도 방법들 중 적어도 하나를 포함할 수 있다.
특수 인트라 예측 모드에 따라, 상기 기-정의된 방법들 중 어느 하나를 선택적으로 이용하여 둘의 모드들에 매핑되는 변환 세트가 서로 동일한지 여부를 판단할 수 있다. 예를 들어, 현재 블록에 SGPM이 적용되는 경우, 수학식 12에 따른 redundantKS 유도 방법이 이용될 수 있다. 현재 블록에 DIMD 모드가 적용되는 경우, 수학식 10에 따른 redundantKS 유도 방법이 이용될 수 있다.
현재 블록에 통상적인 인트라 예측 모드가 적용되는 경우에 대해서도, 해당 통상적인 인트라 예측 모드 및 추가적인 DIPM을 기반으로 전술한 방법을 통해 변환 세트 후보(들)을 유도할 수 있다. 여기서, 추가적인 DIPM은 해당 통상적인 인트라 예측 모드를 기반으로 생성된 예측 블록을 입력으로 하는 DIMD 방법을 통해 유도될 수 있다. 또는, 추가적인 DIPM은 현재 블록에 인접한 기-복원된 주변 영역을 입력으로 하는 DIMD 방법을 통해 유도될 수도 있다. 상기 현재 블록에 대해 유도되는 통상적인 인트라 예측 모드 및 추가적인 DIPM은 M_(1) 내지 M_(n)에 대응될 수 있다. 이때, 통상적인 인트라 예측 모드가 M_(1)에 할당될 수 있고, 추가적인 DIPM은 M_(2) 내지 M_(n)에 각각 할당될 수 있다.
서로 중복되지 않는 둘의 변환 세트 후보들을 유도하기 위한 pseudo code는 다음 표 17과 같다.
mode = DIMD or TIMD or SGPM or IntraTMP or EIP or MIP or convIntra;
found = false;
for( iter = 2; iter <= n; iter++) {
redundantKS = calculateRedunantKSFlag(M_(1), M_(iter), mode);
if( redundantKS == false ) {
found = true;
break;
}
}

primaryKS = KS(M_(1));
if( found == true ) {
alternativeKS = KS(M_(iter));
} else {
alternativeKS = findOtherKS(primaryKS);
}
변수 redunantKS를 구하는 함수를 calculateRedunantKSFlag(q, r, mode)라 명명하기로 한다. 여기서, q와 r은 WAIP의 모드로 변환되기 전 모드를 나타낼 수 있고, mode는 DIMD, TIMD, SGPM, IntraTMP, EIP, MIP, 또는 convIntra로 설정될 수 있다. convIntra는 현재 블록에 특수 인트라 예측 모드가 아닌 통상적인 인트라 예측 모드가 적용됨을 나타낼 수 있다. calculateRedunantKSFlag 함수 내부에서 redunantKS의 값을 구할 때, 전술한 수학식 10 내지 15에 따른 redunantKS 유도 방법들 중 어느 하나가 적용될 수 있다. mode에 따라 서로 다른 redunantKS 유도 방법이 적용될 수도 있다. 또는, calculateRedunantKSFlag 함수 내부에서 redunantKS의 값을 구할 때, mode에 관계없이 수학식 10 내지 15에 따른 redunantKS 유도 방법들 중 어느 하나를 고정적으로 사용할 수 있다. 예를 들어, 수학식 11에 따른 redunantKS 유도 방법을 고정적으로 사용할 수도 있고, 수학식 14 또는 15에 따른 redunantKS 유도 방법을 고정적으로 사용할 수도 있다.
상기 pseudo code에서 M_(1) 내지 M_(n)은 WAIP의 모드로 변환되지 않은 모드일 수 있다. 변수 found는 M_(1)에 의해 지정되는 변환 세트와 다른 변환 세트가 발견되었는지를 나타내는 변수일 수 있다. 상기 pseudo code에서 primaryKS는 M_(1)에 의해 지정된 변환 세트를 나타내고, alternativeKS는 M_(2) 내지 M_(n)에 대한 루프를 돌면서 다른 변환 세트를 가지는 인트라 예측 모드가 최초로 발견되었을 때, 해당 인트라 예측 모드에 매핑되는 변환 세트를 나타낼 수 있다.
변수 found가 false인 경우, 이는 primaryKS와 다른 변환 세트를 가지는 인트라 예측 모드가 발견되지 않았음을 나타낼 수 있다. 이러한 경우, alternativeKS가 없다고 판단될 수도 있고, 상기 pseudo code에서와 같이 primaryKS와 다른 변환 세트를 찾아서 할당해 줄 수도 있다. 즉, findOtherKS 함수를 통해 primaryKS와 다른 변환 세트를 찾을 수 있다.
변수 found가 false여서 alternativeKS가 없는 것으로 간주되는 경우, 둘의 변환 세트 후보들 중 어느 하나를 선택하기 위한 플래그는 시그날링되지 않을 수 있다. 이 경우, primaryKS가 현재 블록의 비분리 변환을 위한 변환 세트로 설정될 수 있다.
상기 pseudo code에서 findOtherKS 함수는 다음과 구성으로 동작될 수 있다.
(구성 1) 특정 변환 세트를 디폴트 변환 세트(default transform set)로 정의하여 해당 디폴트 변환 세트가 리턴될 수 있다.
디폴트 변환 세트는, 플래너 모드 또는 DC 모드에 매핑되는 변환 세트일 수 있다. 또는, 디폴트 변환 세트는, 우하향 대각 모드(예를 들어, 모드 34)에 매핑되는 변환 세트일 수 있다. 또는, 인코딩 장치와 디코딩 장치에 기-정의된 인트라 예측 모드들 중 어떤 모드에 대해서도 매핑되지 않는 변환 세트가 디폴트 변환 세트로 정의될 수 있다. 예를 들어, 특정 인트라 예측 모드(e.g., 플래너 모드, DC 모드, 또는 우하향 대각 모드)에 대해서는 전치 연산이 가용하지 않을 경우, 특정 인트라 예측 모드에 매핑되는 변환 세트를 선택하되, 순방향 변환을 기준으로 입력 데이터에 대해 전치 연산을 수행하는 구성이 디폴트 변환 세트로 정의될 수 있다.
(구성 2) primaryKS에 인접한 변환 세트들 중 적어도 하나를 선택할 수 있다. primaryKS에 인접한 변환 세트는, primaryKS의 변환 세트 인덱스에 소정의 오프셋을 더하거나 뺀 값에 대응하는 변환 세트를 의미할 수 있다. 예를 들어, primaryKS의 변환 세트 인덱스가 5인 경우, 3 또는 4의 변환 세트 인덱스를 가진 변환 세트가 alternativeKS로 선택될 수 있다.
(구성 3) 전체 변환 세트들에 대해서 primaryKS와의 동일 여부를 순차적으로 체크하되, primaryKS와 다른 변환 세트가 최초로 발견될 경우, 상기 발견된 변환 세트가 alternativeKS로 선택될 수 있다.
(구성 4) 인코딩 장치와 디코딩 장치에 기-정의된 인트라 예측 모드들 중 어떠한 모드에 대해서도 매핑되지 않는 디폴트 변환 세트가 별도로 정의될 수 있다. 이 경우, 해당 디폴트 변환 세트가 alternativeKS로 선택될 수 있다.
예를 들어, 기존 변환 세트(즉, 기-정의된 인트라 예측 모드들 중 적어도 하나에 매핑되는 변환 세트)를 가지고 디폴트 변환 세트를 구성하는 것이 아니라, 변수 found의 값이 false인 경우에만 사용되는 별도의 변환 세트가 정의하여 이를 디폴트 변환 세트로 사용할 수 있다.
(구성 5) primaryKS가 수평 방향성을 가진 모드에 대응하는 변환 세트인 경우, 수평 모드(또는, 수직 모드)에 매핑되는 변환 세트가 alternativeKS로 선택될 수 있다. primaryKS가 수평 모드에 대응하는 변환 세트인 경우, 수직 모드에 매핑되는 변환 세트가 alternativeKS로 선택될 수 있다. primaryKS가 수직 모드에 대응하는 변환 세트인 경우, 수평 모드에 매핑되는 변환 세트가 alternativeKS로 선택될 수 있다. primaryKS가 수평 모드(또는, 수직 모드)에 대응하는 변환 세트인 경우, 전술한 구성 1 내지 4 중 어느 하나를 기반으로 alternativeKS를 설정할 수 있다. primaryKS가 비방향성 모드(e.g. 플래너 모드, DC 모드)에 대응하는 변환 세트인 경우, 전술한 구성 1 내지 4 중 어느 하나를 기반으로 alternativeKS를 설정할 수 있다.
(구성 6) 특정 인트라 예측 모드(예를 들어, M_(k), k는 2보다 크거나 같고 n보다 작거나 같은 정수)에 매핑되는 변환 세트가 alternativeKS로 선택될 수 있다.
구성 6에 따르면, primaryKS와 alternativeKS가 서로 겹치는 경우가 발생할 수 있다. 그러나, 보다 간단한 구현을 위해, 변수 found의 값이 false가 되는 예외적인 경우에 대해서는 primaryKS와 alternativeKS가 서로 동일하게 되는 경우를 허용할 수 있다. 특정 인트라 예측 모드 M_(k)에 대응되는 변환 세트는 KS(M_(k))로 표기될 수 있다. 여기서, k의 값은 상기 pseudo code에서 mode의 값에 따라(즉, 어떤 인트라 예측 방법이 적용되는지에 따라) 다르게 설정될 수 있다.
findOtherKS 함수는 전술한 구성 1 내지 6 중 어느 하나로 정의될 수 있다. 또는, findOtherKS 함수는 구성 1 내지 6 중 적어도 둘로 정의될 수도 있고, 이 경우 적어도 둘의 구성들 중 어느 하나가 선택적으로 이용될 수 있다.
본 실시예에서의 변환 세트는 비분리 변환을 위한 변환 세트를 의미하나, 이는 일예에 불과하다. 현재 블록에 분리 변환(e.g, MTS)이 적용되는 경우, 본 실시예에서의 변환 세트는 분리 변환을 위한 변환 세트로 대체되어 이해될 수 있다. 이때, 분리 변환을 위한 변환 세트는 서로 다른 복수의 변환 커널 후보들로 구성될 수 있다. 변환 커널 후보들 각각은 수평 변환 커널 또는 수직 변환 커널 중 적어도 하나를 포함할 수 있다. 하나의 변환 세트에 속한 변환 커널 후보들의 개수는 4개, 6개, 또는 8개일 수 있다.
실시예 6
현재 블록의 인트라 예측 모드를 기반으로 변환 세트가 선택될 수 있다. 여기서, 변환 세트는 비분리 변환을 위한 변환 세트 또는 분리 변환을 위한 변환 세트일 수 있다. 선택된 변환 세트에는 하나 또는 그 이상의 변환 커널 후보들이 포함될 수 있다. 변환 세트에 속한 하나 또는 그 이상의 변환 커널 후보들 중 어느 하나를 기반으로 현재 블록의 레지듀얼 샘플을 생성할 수 있다.
구체적으로, 인트라 예측 모드별로 변환 세트가 매핑되어 있을 수 있다. 현재 블록에 대해 2개 이상의 인트라 예측 모드들이 유도되는 경우, 각 인트라 예측 모드에 매핑되는 변환 세트가 존재할 수 있다. 이때, 2개 이상의 인트라 예측 모드들에 각각 매핑되는 2개 이상의 변환 세트들은 서로 동일할 수 있다. 2개 이상의 인트라 예측 모드들에 각각 매핑되는 2개 이상의 변환 세트들 중 적어도 하나는 다른 하나와 상이할 수 있다. 2개 이상의 인트라 예측 모드들에 각각 매핑되는 2개 이상의 변환 세트들은 서로 상이할 수도 있다.
상기 2개 이상의 변환 세트들 중 어느 하나를 기본 변환 세트(main transform set)라 부르고, 다른 변환 세트(들)을 대체 변환 세트(alternative transform set)라 부르기로 한다. 또는, 후술하는 예시에서, 기본 변환 세트와 대체 변환 세트는 제1 변환 세트와 제2 변환 세트로 각각 대체되어 이해될 수도 있다.
일예로, 현재 블록의 예측 과정에 적용되는 인트라 예측 모드를 기반으로 선택된 변환 세트가 기본 변환 세트로 설정될 수 있다. 여기서, 인트라 예측 모드는, 현재 블록의 인트라 예측을 위한 참조 샘플을 특정하는 인트라 예측 모드를 의미할 수 있다. 현재 블록의 예측 블록 또는 주변 샘플들을 기반으로 DIPM이 유도될 수 있고, DIPM을 기반으로 선택된 변환 세트가 대체 변환 세트로 설정될 수 있다. 현재 블록의 예측 블록은, 현재 블록의 예측 과정에 적용되는 인트라 예측 모드를 기반으로 생성된 것일 수 있다. DIPM 유도 방법은 앞서 살펴본 바와 같으며, 여기서 자세한 설명은 생략하기로 한다.
또는, 전술한 DIMD 방법을 통해 유도된 DIMD 모드들 중 누적된 세기 값이 가장 큰 모드를 기반으로 선택된 변환 세트가 기본 변환 세트로 설정될 수 있다. 상기 DIMD 모드들 중 누적된 세기 값이 두 번째로 큰 모드를 기반으로 선택된 변환 세트가 대체 변환 세트로 설정될 수 있다.
또는, 기본 변환 세트 및/또는 대체 변환 세트는 이에 대응되는 인트라 예측 모드(또는, DIPM, DIMD 모드)가 존재하지 않더라도 특정 규칙에 의해 결정될 수도 있다. 예를 들어, 기본 변환 세트가 방향성 모드를 기반으로 선택된 변환 세트에 해당하는 경우, 대체 변환 세트는 비방향성 모드에 매핑되는 변환 세트로 설정될 수 있다. 여기서, 비방향성 모드는 플래너 모드 또는 DC 모드일 수 있다.
기본 및 대체 변환 세트들을 결정하는 방법은 전술한 방법에 국한되지 않으며, 다양한 인트라 예측 방법(예를 들어, Matrix-based Intra Prediction(MIP), Spatial Geometric Partitioning Mode(SGPM), Intra Template Matching(IntraTMP))에 따라 기본 및 대체 변환 세트들을 결정하는 방법이 별도로 정의될 수 있다.
기본 변환 세트와 대체 변환 세트 중 어떤 변환 세트가 적용되는지는, 묵시적(implicitly) 또는 명시적으로(explicitly) 결정될 수 있다. 예를 들어, 대체 변환 세트가 적용되는지 여부에 관한 플래그가 명시적으로 시그날링될 수 있다. 해당 플래그가 제1 값인 경우, 이는 기본 변환 세트가 적용됨을 나타낼 수 있다. 반면, 해당 플래그가 제2 값인 경우, 이는 기본 변환 세트가 적용되지 않음을 나타낼 수 있다. 해당 플래그가 제2 값인 경우, 이는 대체 변환 세트가 적용됨을 나타낼 수 있다.
변환 세트에 속한 복수의 변환 커널 후보들 중에서 선택된 어느 하나의 변환 커널 후보를 기반으로 비분리 변환을 수행할 수 있다. 또는, 변환 세트는 분리 변환을 위한 변환 세트일 수도 있고, 이 경우 변환 세트에 속한 각 변환 커널 후보는 수평 방향에 적용되는 변환 커널과 수직 방향에 적용되는 변환 커널의 쌍(pair)으로 정의될 수 있다.
복수의 변환 커널 후보들 중 어느 하나의 변환 커널 후보는, 묵시적으로 결정될 수도 있고, 비트스트림을 통해 시그날링되는 인덱스 정보를 기반으로 명시적으로 결정될 수도 있다.
비분리 변환은, 인트라 모드를 기반으로 부호화된 블록(이하, 인트라 블록이라 함) 또는 인터 모드를 기반으로 부호화된 블록(이하, 인터 블록이라 함) 중 적어도 하나에 적용될 수 있다. 인트라 블록과 인터 블록에 기본 또는 대체 변환 세트가 적용될 수 있는 경우들을 다음과 같이 분류할 수 있다.
[A-(1)] I-slice에 속한 인트라 블록에 비분리 변환을 적용
[A-(2)] P/B-slice에 속한 인트라 블록에 비분리 변환을 적용
[A-(3)] P/B-slice에 속한 인터 블록에 비분리 변환을 적용
[B-(1)] 기본 변환 세트 적용
[B-(2)] 대체 변환 세트 적용
여기서, I-slice는 인트라 블록으로만 구성된 슬라이스를 지칭할 수 있고, P/B-slice는 인트라 블록과 인터 블록으로 구성된 슬라이스를 지칭할 수 있다. I-slice는 인트라 모드로만 코딩되는 픽쳐에 속하는 슬라이스일 수 있다. P/B-slice는 인터 모드로 코딩되는 픽쳐에 속하는 슬라이스이나, P/B-slice에는 인트라 블록이 존재할 수 있다. 본 개시에서는, 인트라 블록에 적용되는 비분리 변환을 intra-NST라 부르고, 인터 블록에 적용되는 비분리 변환을 inter-NST라 부르기로 한다.
전술한 [A-(1)] 내지 [A-(3)] 및 [B-(1)] 내지 [B-(2)] 간의 조합을 통해 다음 표 18과 같은 6가지의 조합들을 고려해 볼 수 있다.
No. Case Slice type Prediction mode Transform set
1 [A-(1)]/[B-(1)] I-Slice Intra main
2 [A-(1)]/[B-(2)] I-Slice Intra alternative
3 [A-(2)]/[B-(1)] P/B-Slice Intra main
4 [A-(2)]/[B-(2)] P/B-Slice Intra alternative
5 [A-(3)]/[B-(1)] P/B-Slice Inter main
6 [A-(3)]/[B-(2)] P/B-Slice Inter alternative
Case 1은, I-slice에 속한 인트라 블록이 기본 변환 세트를 기반으로 비분리 변환을 수행하는 경우이다. Case 2는, I-slice에 속한 인트라 블록이 대체 변환 세트를 기반으로 비분리 변환을 수행하는 경우이다. Case 3는, P/B-slice에 속한 인트라 블록이 기본 변환 세트를 기반으로 비분리 변환을 수행하는 경우이다. Case 4는, P/B-slice에 속한 인트라 블록이 대체 변환 세트를 기반으로 비분리 변환을 수행하는 경우이다. Case 5는, P/B-slice에 속한 인터 블록이 기본 변환 세트를 기반으로 비분리 변환을 수행하는 경우이다. Case 6은, P/B-slice에 속한 인터 블록이 대체 변환 세트를 기반으로 비분리 변환을 수행하는 경우이다.
본 개시는 기본 변환 세트와 대체 변환 세트의 2가지 변환 세트만이 존재하는 경우를 가정하나, 둘 이상의 대체 변환 세트가 존재할 수도 있다. 보다 일반화하여, 기본 및 대체 변환 세트들을 포함하는 N개의 적용 가능한 변환 세트들이 존재하는 경우, 해당 변환 세트들은 변환 세트 #으로 표기될 수 있다(여기서, #은 1부터 N까지의 범위에 속하는 정수). [B-(m)]은 변환 세트 m을 적용하는 경우를 지칭할 수 있고, [A-(n)]/[B-(m)]의 조합으로 표기될 수 있다. 여기서, n은 1부터 3까지의 범위에 속하는 정수이고, m은 1부터 N까지의 범위에 속하는 정수일 수 있다. 설명의 편의를 위해, 본 개시는 [B-(1)]과 [B-(2)]만 존재한다고 가정하나, 3개 이상의 변환 세트들이 존재하는 경우에도 동일/유사하게 적용될 수 있다. M개의 적용 가능한 변환 세트들이 존재할 경우, M개의 변환 세트들 중에는 중복되는 변환 세트들이 존재할 수 있다. 중복되는 변환 세트들이 존재할지라도, 해당 변환 세트들이 적용되는 조건은 각각 상이할 수 있다. 예를 들어, 동일한 변환 세트가 적용되는 경우라도, 방향성 모드와 같은 일반적인 인트라 예측이 적용되는 경우는, MIP, EIP, IntraTMP, TIMD와 같은 특수한 인트라 예측이 적용되는 경우와 다르게 취급될 수 있다. 이와 같은 경우, 변환 세트들이 서로 중복되더라도, B_(p)와 B_(q)와 같이(여기서 p와 q는 다름) 서로 다르게 취급되도록 구성할 수 있다.
전술한 Cases 1 내지 6에 대해서, 블록 크기별로 변환 커널의 적용 방식을 다르게 구성할 수 있다. 구체적으로, 인코딩 장치와 디코딩 장치에서 허용되는 모든 블록 크기들을 하나 또는 그 이상의 구간들로 구분할 수 있다. 상기 하나 또는 그 이상의 구간들은, 제1 크기보다 작은 블록 크기가 속하는 제1 구간, 제1 크기보다 크거나 같고 제2 크기보다 작은 블록 크기가 속하는 제2 구간, 제2 크기보다 크거나 같고 제3 크기보다 작은 블록 크기가 속하는 제3 구간, ... , 제(L-1) 크기보다 크거나 같고 제L 크기보다 작은 블록 크기가 속하는 제L 구간, 또는 제L 크기보다 크거나 같은 블록 크기가 속하는 제(L+1) 구간 중 적어도 하나를 포함할 수 있다. 여기서, p번째 구간(즉, 제p 구간)은 현재 블록에 적용 가능한 변환 커널 후보의 개수가 p개인 구간을 의미할 수 있고, p는 0보다 크거나 같고 L보다 작거나 같은 정수일 수 있다.
일예로, 인코딩 장치와 디코딩 장치에서 허용되는 모든 블록 크기들을 블록 면적을 기준으로 다음과 같이 (L+1)개의 구간으로 구분할 수 있다.
[ s_(0), e_(0) ), [ s_(1), e_(1) ), ... , [ s_(L-1), e_(L-1) ), [ s_(L), e_(L) )
구간 [ a, b )는 a보다 크거나 같고 b보다 작은 구간을 의미할 수 있다. 특정 변환 세트(예를 들어, 기본 변환 세트, 대체 변환 세트)에 속한 총 변환 커널 후보의 개수를 L개라 할 경우, (L+1)개의 구간은 0부터 L개인 변환 커널 후보를 가진 구간을 각각 의미할 수 있다. 구체적으로, 구간 [ s_(k), e_(k) )는 L개의 변환 커널 후보 중 k개의 변환 커널 후보만이 적용 가능한 구간을 나타낼 수 있다. 여기서, k는 0부터 L까지의 범위에 속한 정수일 수 있다. 부연하면, 구간 [ s_(k), e_(k) )에 대해서는, L개의 변환 커널 후보 중에서 첫 번째 변환 커널 후보부터 k 번째 변환 커널 후보까지 적용 가능하도록 구성할 수 있다.
구간 [ s_(0), e_(0) )은 어떠한 변환 커널 후보도 적용되지 않는 구간일 수 있다. s_(0)은 비분리 변환이 적용 가능한 최소 블록 면적을 나타낼 수 있고, 본 개시에서 해당 최소 블록 면적은 min_area로 표기하기로 한다. 예를 들어, 비분리 변환이 너비와 높이가 둘다 4보다 크거나 같은 블록에 대해서만 적용 가능할 경우, min_area는 16일 수 있고, s_(0)는 16으로 설정될 수 있다.
구간 [ s_(L), e_(L) )은 L개의 변환 커널 후보가 적용 가능한 구간일 수 있다. e_(L)은 비분리 변환이 적용 가능한 최대 블록 면적보다 큰 값으로 설정될 수 있다. 해당 최대 블록 면적을 max_area로 표기할 경우, e_(L)은 max_area보다 큰 값으로 설정될 수 있다. 본 개시에서는 편의상 e_(L)을 (max_area+1)의 값으로 설정하고, (max_area+1)의 값을 max_area_plus_1로 표기하기로 한다.
구간 [ s_(k), e_(k) )에서 s_(k)와 e_(k)가 서로 동일한 경우, 구간 [ s_(k), e_(k) )에는 어떠한 블록 면적의 값도 포함될 수 없게 되므로 구간 [ s_(k), e_(k) )는 빈 구간이라 간주될 수 있다. 이는 k개의 변환 커널 후보가 적용 가능한 블록이 존재하지 않음을 나타낼 수 있다.
비분리 변환이 적용 가능한 모든 블록 면적들에 대해 (L+1)개의 구간을 지정할 수 있다. min_area와 max_area가 전술한 조합에 따라 묵시적으로(또는, 조합에 관계없이 고정적으로) 결정되는 경우, e_(0), s_(1), e_(1), s_(2), e_(2), ..., s_(L-1), e_(L-1), s(L)의 값을 설정함으로써, 모든 블록 면적들 각각에 대해서 적용 가능한 변환 커널 후보를 지정할 수 있다. s_(0)와 e_(L)은 min_area와 max_area_plus_1으로 각각 설정될 수 있다. min_area과 max_area_plus_1은 조합에 관계없이 고정된 값일 수 있다. 또는, min_area과 max_area_plus_1은 조합에 따라 상이한 값을 가질 수도 있다. 즉, [A-(1)]/[B-(1)], [A-(1)]/[B-(2)], [A-(2)]/[B-(1)], [A-(2)]/[B-(2)], [A-(3)]/[B-(1)], 또는 [A-(3)]/[B-(2)]인지에 따라, min_area과 max_area_plus_1은 상이한 값을 가질 수 있다. 블록 면적의 값이 클수록 더 많은 개수의 변환 커널 후보들이 적용 가능하도록 구성할 경우, 상기 e_(0), s_(1), e_(1), s_(2), e_(2), ... , s_(L-1), e_(L-1), s(L)의 값은 줄어들지 않는(non-decreasing) 시퀀스를 형성할 수 있다. 본 개시에서는 [ s_(0), e_(0) ), [ s_(1), e_(1) ), ... , [ s_(L-1), e_(L-1) ), [ s_(L), e_(L) )를 구간 시퀀스(range sequence)라고 부르기로 한다.
블록 면적의 값이 클수록 더 많은 개수의 변환 커널 후보들이 적용 가능하도록 구성하는 것이 성능-복잡도 간의 trade-off 관점에서 유리할 수 있다. 블록 면적의 값이 클수록 해당 블록 데이터를 통해 표현되는 통계적 다양성이 높아지므로, 적은 개수의 변환 커널 후보만으로는 해당 블록 데이터의 decorrelation을 충분히 없애지 못할 수 있다. 따라서, 블록 면적의 값이 클수록 더 많은 개수의 변환 커널 후보들이 적용 가능하도록 구성하는 것이 성능 향상에 유리할 수 있다. 반면, 통계적 다양성이 낮은 작은 면적의 블록에 대해 많은 개수의 변환 커널 후보들이 적용 가능하도록 구성할 경우, 많은 개수의 변환 커널 후보들로 인해 decorrelation 능력 대비 해당 변환 커널 후보들 중 어느 하나를 지정하기 위한 시그날링 비용(signalling cost)이 더 커질 수 있다. 또한, 가급적 적은 개수의 변환 커널 후보들이 적용 가능하도록 구성하는 것이 부호화 복잡도를 줄이는 측면에서 유리할 수 있다. 따라서, 블록 면적별로 필요한 개수만큼의 변환 커널 후보들이 적용 가능하도록 구성하는 것이 성능-복잡도 간의 trade-off 측면에서 유리할 수 있다.
6가지의 조합별로 각 조합에 적용되는 구간 시퀀스가 정의될 수 있다. 이때, 6가지의 조합 중 적어도 하나는 다른 조합과 서로 상이한 구간 시퀀스를 가질 수 있다. 6가지의 조합 중 일부는 서로 동일한 구간 시퀀스를 가질 수도 있다. 예를 들어, [A-(1)]/[B-(1)]과 [A-(2)]/[B-(1)]의 조합에 대해서는 동일한 구간 시퀀스(RS1)가 정의될 수 있고, [A-(1)]/[B-(2)]와 [A-(2)]/[B-(2)]의 조합에 대해서는 동일한 구간 시퀀스(RS2)가 정의될 수 있다. 여기서, RS1은 RS2와 다른 구간 시퀀스일 수 있다. 또는, 6가지의 조합에 대해 모두 동일한 구간 시퀀스가 정의될 수도 있다. 6가지의 조합은 복수의 그룹으로 그룹핑될 수 있고, 각 그룹별로 구간 시퀀스가 정의될 수 있다. 동일 그룹에 속한 조합에 대해서 동일한 구간 시퀀스가 적용될 수 있다. 6가지의 조합에 대해서, 변환 세트를 구성하는 변환 커널 후보의 총 개수(즉, L개)는 동일하게 정의될 수 있다. 또는, 조합별로 고유한 L의 값을 가질 수도 있다. 이하, 구간 시퀀스에 대한 예시들을 살펴보도록 한다.
[ min_area, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 ), ... , [ max_area_plus_1, max_area_plus_1 )의 구간 시퀀스는, 어떠한 변환 커널도 적용하지 않는 구성일 수 있다.
[ min_area, min_area ), [ min_area, min_area ), ... , [ min_area, max_area_plus_1 )의 구간 시퀀스는, 모든 블록 면적들에 대해 변환 세트에 속한 모든 변환 커널 후보들이 적용 가능한 구성일 수 있다.
[ min_area, min_area ), [ min_area, min_area ), ... , [ s_(p) = min_area, e_(p) = max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 ), ... , [ max_area_plus_1, max_area_plus_1 )의 구간 시퀀스는, 모든 블록 면적들에 대해서, 변환 세트에 속한 모든 변환 커널 후보들(즉, L개의 변환 커널 후보들) 중 p개의 변환 커널 후보가 적용 가능한 구성일 수 있다. 여기서, p는 0보다 크거나 같고 L보다 작거나 같을 수 있다.
[ min_area, Q ), [ Q, Q ), ... , [ s_(p) = Q, e_(p) = max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 ), ... , [ max_area_plus_1, max_area_plus_1 )의 구간 시퀀스는, 특정 블록 면적(Q)보다 작은 블록 면적에 대해서는 어떠한 변환 커널도 적용되지 않고, 특정 블록 면적보다 크거나 같은 블록 면적에 대해서는 p개의 변환 커널 후보가 적용 가능한 구성일 수 있다. 여기서, p는 0보다 크거나 같고 L보다 작거나 같을 수 있다.
보다 구체적인 예시로서, 변환 세트에 속한 변환 커널 후보의 개수가 3개인 경우를 가정한다. 이 경우, 다음과 같은 구간 시퀀스들이 고려될 수 있다. 각 구간 시퀀스는, 해당 구간 시퀀스에 속한 4개의 구간들에 대해서 왼쪽에서 오른쪽으로 순서로 0, 1, 2, 3개의 변환 커널 후보들이 각각 적용 가능함을 나타낼 수 있다.
1. [ min_area, 128 ), [ 128, 256 ), [ 256, 512 ), [ 512, max_area_plus_1 )
이 구간 시퀀스에 따르면, 128보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 이는 128보다 작은 블록 면적을 가진 블록에 대해서 어떠한 변환 커널도 적용되지 않음을 의미할 수 있다. 128보다 크거나 같고 256보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다. 256보다 크거나 같고 512보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 2개일 수 있다. 512보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
2. [ min_area, 64 ), [ 64, 256 ), [ 256, 512 ), [ 512, max_area_plus_1 )
이 구간 시퀀스에 따르면, 64보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 64보다 크거나 같고 256보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다. 256보다 크거나 같고 512보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 2개일 수 있다. 512보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
3. [ min_area, 32 ), [ 32, 256 ), [ 256, 512 ), [ 512, max_area_plus_1 )
이 구간 시퀀스에 따르면, 32보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 32보다 크거나 같고 256보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다. 256보다 크거나 같고 512보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 2개일 수 있다. 512보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
4. [ min_area, min_area ), [ min_area, 256 ), [ 256, 512 ), [ 512, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 1개, 2개, 또는 3개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 0개인 경우가 없을 수 있다. 256보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다. 256보다 크거나 같고 512보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 2개일 수 있다. 512보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
5. [ min_area, 128 ), [ 128, 256 ), [ 256, 256 ), [ 256, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개, 1개, 또는 3개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 2개인 경우가 없을 수 있다. 128보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 128보다 크거나 같고 256보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다. 256보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
6. [ min_area, 64 ), [ 64, 256 ), [ 256, 256 ), [ 256, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개, 1개, 또는 3개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 2개인 경우가 없을 수 있다. 64보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 64보다 크거나 같고 256보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다. 256보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
7. [ min_area, 32 ), [ 32, 256 ), [ 256, 256 ), [ 256, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개, 1개, 또는 3개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 2개인 경우가 없을 수 있다. 32보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 32보다 크거나 같고 256보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다. 256보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
8. [ min_area, min_area ), [ min_area, 256 ), [ 256, 256 ), [ 256, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 1개 또는 3개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 0개이거나 2개인 경우가 없을 수 있다. 256보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다. 256보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
9. [ min_area, 128 ), [ 128, 512 ), [ 512, 512 ), [ 512, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개, 1개, 또는 3개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 2개인 경우가 없을 수 있다. 128보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 128보다 크거나 같고 512보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다. 512보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
10. [ min_area, 64 ), [ 64, 512 ), [ 512, 512 ), [ 512, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개, 1개, 또는 3개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 2개인 경우가 없을 수 있다. 64보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 64보다 크거나 같고 512보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다. 512보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
11. [ min_area, 32 ), [ 32, 512 ), [ 512, 512 ), [ 512, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개, 1개, 또는 3개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 2개인 경우가 없을 수 있다. 32보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 32보다 크거나 같고 512보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다. 512보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
12. [ min_area, min_area ), [ min_area, 512 ), [ 512, 512 ), [ 512, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 1개 또는 3개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 0개이거나 2개인 경우가 없을 수 있다. 512보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다. 512보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
13. [ min_area, 128 ), [ 128, 256 ), [ 256, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개, 1개, 또는 2개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 3개인 경우가 없을 수 있다. 128보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 128보다 크거나 같고 256보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다. 256보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 2개일 수 있다.
14. [ min_area, 64 ), [ 64, 256 ), [ 256, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개, 1개, 또는 2개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 3개인 경우가 없을 수 있다. 64보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 64보다 크거나 같고 256보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다. 256보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 2개일 수 있다.
15. [ min_area, 32 ), [ 32, 256 ), [ 256, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개, 1개, 또는 2개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 3개인 경우가 없을 수 있다. 32보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 32보다 크거나 같고 256보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다. 256보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 2개일 수 있다.
16. [ min_area, min_area ), [ min_area, 256 ), [ 256, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 1개 또는 2개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 0개이거나 3개인 경우가 없을 수 있다. 256보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다. 256보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 2개일 수 있다.
17. [ min_area, 128 ), [ 128, 512 ), [ 512, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개, 1개, 또는 2개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 3개인 경우가 없을 수 있다. 128보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 128보다 크거나 같고 512보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다. 512보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 2개일 수 있다.
18. [ min_area, 64 ), [ 64, 512 ), [ 512, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개, 1개, 또는 2개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 3개인 경우가 없을 수 있다. 64보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 64보다 크거나 같고 512보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다. 512보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 2개일 수 있다.
19. [ min_area, 32 ), [ 32, 512 ), [ 512, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개, 1개, 또는 2개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 3개인 경우가 없을 수 있다. 32보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 32보다 크거나 같고 512보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다. 512보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 2개일 수 있다.
20. [ min_area, min_area ), [ min_area, 512 ), [ 512, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 1개 또는 2개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 0개이거나 3개인 경우가 없을 수 있다. 512보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다. 512보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 2개일 수 있다.
21. [ min_area, 256 ), [ 256, 256 ), [ 256, 256 ), [ 256, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개 또는 3개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 1개이거나 2개인 경우가 없을 수 있다. 256보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 즉, 256보다 작은 블록 면적을 가진 블록에 대해서는 변환 커널이 적용되지 않을 수 있다. 256보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
22. [ min_area, 128 ), [ 128, 128 ), [ 128, 128 ), [ 128, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개 또는 3개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 1개이거나 2개인 경우가 없을 수 있다. 128보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 즉, 128보다 작은 블록 면적을 가진 블록에 대해서는 변환 커널이 적용되지 않을 수 있다. 128보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
23. [ min_area, 64 ), [ 64, 64 ), [ 64, 64 ), [ 64, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개 또는 3개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 1개이거나 2개인 경우가 없을 수 있다. 64보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 즉, 64보다 작은 블록 면적을 가진 블록에 대해서는 변환 커널이 적용되지 않을 수 있다. 64보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
24. [ min_area, 32 ), [ 32, 32 ), [ 32, 32 ), [ 32, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개 또는 3개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 1개이거나 2개인 경우가 없을 수 있다. 32보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 즉, 32보다 작은 블록 면적을 가진 블록에 대해서는 변환 커널이 적용되지 않을 수 있다. 32보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
25. [ min_area, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 )
이 구간 시퀀스에 따르면, 모든 블록 면적들에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 즉, 모든 블록들에 대해서 변환 커널이 적용되지 않을 수 있다.
26. [ min_area, min_area ), [ min_area, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 )
이 구간 시퀀스에 따르면, 모든 블록 면적들에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다.
27. [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 )
이 구간 시퀀스에 따르면, 모든 블록 면적들에 대해서 적용 가능한 변환 커널 후보의 개수는 2개일 수 있다.
28. [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
이 구간 시퀀스에 따르면, 모든 블록 면적들에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
29. [ min_area, min_area ), [ min_area, min_area ), [ min_area, 256 ), [ 256, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 2개 또는 3개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 0개이거나 1개인 경우가 없을 수 있다. 256보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 2개일 수 있다. 256보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
30. [ min_area, min_area ), [ min_area, min_area ), [ min_area, 128 ), [ 128, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 2개 또는 3개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 0개이거나 1개인 경우가 없을 수 있다. 128보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 2개일 수 있다. 128보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
31. [ min_area, min_area ), [ min_area, min_area ), [ min_area, 64 ), [ 64, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 2개 또는 3개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 0개이거나 1개인 경우가 없을 수 있다. 64보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 2개일 수 있다. 64보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
32. [ min_area, min_area ), [ min_area, min_area ), [ min_area, 32 ), [ 32, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 2개 또는 3개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 0개이거나 1개인 경우가 없을 수 있다. 32보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 2개일 수 있다. 32보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
33. [ min_area, 256 ), [ 256, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개 또는 1개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 2개이거나 3개인 경우가 없을 수 있다. 256보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 256보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다.
34. [ min_area, 128 ), [ 128, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개 또는 1개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 2개이거나 3개인 경우가 없을 수 있다. 128보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 128보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다.
35. [ min_area, 64 ), [ 64, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개 또는 1개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 2개이거나 3개인 경우가 없을 수 있다. 64보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 64보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다.
36. [ min_area, 32 ), [ 32, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개 또는 1개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 2개이거나 3개인 경우가 없을 수 있다. 32보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 32보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다.
37. [ min_area, 256 ), [ 256, 256 ), [ 256, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개 또는 2개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 1개이거나 3개인 경우가 없을 수 있다. 256보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 256보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 2개일 수 있다.
38. [ min_area, 128 ), [ 128, 128 ), [ 128, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개 또는 2개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 1개이거나 3개인 경우가 없을 수 있다. 128보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 128보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 2개일 수 있다.
39. [ min_area, 64 ), [ 64, 64 ), [ 64, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개 또는 2개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 1개이거나 3개인 경우가 없을 수 있다. 64보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 64보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 2개일 수 있다.
40. [ min_area, 32 ), [ 32, 32 ), [ 32, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 )
이 구간 시퀀스에 따르면, 블록 면적에 따라 적용 가능한 변환 커널 후보의 개수는 0개 또는 2개 중 어느 하나로 결정되며, 적용 가능한 변환 커널 후보의 개수가 1개이거나 3개인 경우가 없을 수 있다. 32보다 작은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 0개일 수 있다. 32보다 크거나 같은 블록 면적을 가진 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 2개일 수 있다.
전술한 6가지의 조합 각각에 대해 상기 1번 내지 40번의 구간 시퀀스 중 어느 하나가 정의될 수 있다. 이하, 6가지의 조합에 대한 구간 시퀀스의 다양한 예시들을 살펴보도록 한다.
Case Slice type Prediction mode Transform set Range sequence
[A-(1)]/[B-(1)] I-Slice Intra main [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(1)]/[B-(2)] I-Slice Intra alternative [ min_area, 256 ), [ 256, 256 ), [ 256, 256 ), [ 256, max_area_plus_1 )
[A-(2)]/[B-(1)] P/B-Slice Intra main [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(2)]/[B-(2)] P/B-Slice Intra alternative [ min_area, 256 ), [ 256, 256 ), [ 256, 256 ), [ 256, max_area_plus_1 )
[A-(3)]/[B-(1)] P/B-Slice Inter main [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(3)]/[B-(2)] P/B-Slice Inter alternative [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
일예로, 표 19에 따르면, 현재 블록이 인트라 블록이고 현재 블록의 변환 세트가 대체 변환 세트로 결정되는 경우, 256보다 작은 블록 면적을 가진 현재 블록에 대해서는 변환 커널이 적용되지 않고, 256보다 크거나 같은 블록 면적을 가진 현재 블록에 대해서는 적용 가능한 변환 커널 후보의 개수가 3개일 수 있다. 그 외 조합의 경우, 현재 블록의 블록 면적에 관계없이, 현재 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
Case Slice type Prediction mode Transform set Range sequence
[A-(1)]/[B-(1)] I-Slice Intra main [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(1)]/[B-(2)] I-Slice Intra alternative [ min_area, 256 ), [ 256, 256 ), [ 256, 256 ), [ 256, max_area_plus_1 )
[A-(2)]/[B-(1)] P/B-Slice Intra main [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(2)]/[B-(2)] P/B-Slice Intra alternative [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(3)]/[B-(1)] P/B-Slice Inter main [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(3)]/[B-(2)] P/B-Slice Inter alternative [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
또는, 표 20에 따르면, 현재 블록이 I-Slice에 속한 인트라 블록이고 현재 블록의 변환 세트가 대체 변환 세트로 결정되는 경우, 256보다 작은 블록 면적을 가진 현재 블록에 대해서는 변환 커널이 적용되지 않고, 256보다 크거나 같은 블록 면적을 가진 현재 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다. 그 외 조합의 경우, 현재 블록의 블록 면적에 관계없이, 현재 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
Case Slice type Prediction mode Transform set Range sequence
[A-(1)]/[B-(1)] I-Slice Intra main [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(1)]/[B-(2)] I-Slice Intra alternative [ min_area, min_area ), [ min_area, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 ), [ max_area_plus_1, max_area_plus_1 )
[A-(2)]/[B-(1)] P/B-Slice Intra main [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(2)]/[B-(2)] P/B-Slice Intra alternative [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(3)]/[B-(1)] P/B-Slice Inter main [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(3)]/[B-(2)] P/B-Slice Inter alternative [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
또는, 표 21에 따르면, 현재 블록이 I-Slice에 속한 인트라 블록이고 현재 블록의 변환 세트가 대체 변환 세트로 결정되는 경우, 현재 블록의 블록 면적에 관계없이, 현재 블록에 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다. 그 외 조합의 경우, 현재 블록의 블록 면적에 관계없이, 현재 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
Case Slice type Prediction mode Transform set Range sequence
[A-(1)]/[B-(1)] I-Slice Intra main [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(1)]/[B-(2)] I-Slice Intra alternative 1번 내지 40번의 구간 시퀀스들 중 어느 하나
[A-(2)]/[B-(1)] P/B-Slice Intra main [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(2)]/[B-(2)] P/B-Slice Intra alternative [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(3)]/[B-(1)] P/B-Slice Inter main [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(3)]/[B-(2)] P/B-Slice Inter alternative [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
또는, 표 22에 따르면, 현재 블록이 I-Slice에 속한 인트라 블록이고 현재 블록의 변환 세트가 대체 변환 세트로 결정되는 경우, 현재 블록에 적용 가능한 구간 시퀀스는 전술한 1번 내지 40번의 구간 시퀀스들 중 어느 하나일 수 있다. 다만, [A-(1)]/[B-(2)]의 조합은 다른 조합과 다른 구간 시퀀스를 가질 수 있다. 그 외 조합의 경우, 현재 블록의 블록 면적에 관계없이, 현재 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
Case Slice type Prediction mode Transform set Range sequence
[A-(1)]/[B-(1)] I-Slice Intra main [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(1)]/[B-(2)] I-Slice Intra alternative 1번 내지 40번의 구간 시퀀스들 중 어느 하나
[A-(2)]/[B-(1)] P/B-Slice Intra main [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(2)]/[B-(2)] P/B-Slice Intra alternative 1번 내지 40번의 구간 시퀀스들 중 어느 하나
[A-(3)]/[B-(1)] P/B-Slice Inter main [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(3)]/[B-(2)] P/B-Slice Inter alternative [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
또는, 표 23에 따르면, 현재 블록이 인트라 블록이고 현재 블록의 변환 세트가 대체 변환 세트로 결정되는 경우, 현재 블록에 적용 가능한 구간 시퀀스는 전술한 1번 내지 40번의 구간 시퀀스들 중 어느 하나일 수 있다. 다만, [A-(1)]/[B-(2)]와 [A-(2)]/[B-(2)]의 조합은 다른 조합과 다른 구간 시퀀스를 가질 수 있다. 그 외 조합의 경우, 현재 블록의 블록 면적에 관계없이, 현재 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
Case Slice type Prediction mode Transform set Range sequence
[A-(1)]/[B-(1)] I-Slice Intra main [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(1)]/[B-(2)] I-Slice Intra alternative [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(2)]/[B-(1)] P/B-Slice Intra main [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(2)]/[B-(2)] P/B-Slice Intra alternative [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(3)]/[B-(1)] P/B-Slice Inter main [ min_area, min_area ), [min_area, min_area ), [ min_area, 256 ), [ 256, max_area_plus_1 )
[A-(3)]/[B-(2)] P/B-Slice Inter alternative [ min_area, min_area ), [min_area, min_area ), [ min_area, 256 ), [ 256, max_area_plus_1 )
또는, 표 24에 따르면, 현재 블록이 P/B-Slice에 속한 인터 블록인 경우, 256보다 작은 블록 면적을 가진 현재 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 2개일 수 있고, 256보다 크거나 같은 블록 면적을 가진 현재 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다. 그 외 조합의 경우, 현재 블록의 블록 면적에 관계없이, 현재 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
Case Slice type Prediction mode Transform set Range sequence
[A-(1)]/[B-(1)] I-Slice Intra main [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(1)]/[B-(2)] I-Slice Intra alternative [ min_area, A ), [ A, max_area_plus_1 ), [max_area_plus_1, max_area_plus_1 ), [max_area_plus_1, max_area_plus_1 )
[A-(2)]/[B-(1)] P/B-Slice Intra main [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(2)]/[B-(2)] P/B-Slice Intra alternative [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 ) 또는,[ min_area, B ), [ B, max_area_plus_1 ), [max_area_plus_1, max_area_plus_1 ), [max_area_plus_1, max_area_plus_1 )
[A-(3)]/[B-(1)] P/B-Slice Inter main [ min_area, min_area ), [min_area, min_area ), [ min_area, 256 ), [ 256, max_area_plus_1 )
[A-(3)]/[B-(2)] P/B-Slice Inter alternative [ min_area, min_area ), [min_area, min_area ), [ min_area, 256 ), [ 256, max_area_plus_1 )
또는, 표 25에 따르면, 현재 블록이 I-Slice에 속한 인트라 블록이고 현재 블록의 변환 세트가 대체 변환 세트로 결정되는 경우, A보다 작은 블록 면적을 가진 현재 블록에 대해서는 변환 커널이 적용되지 않고, A보다 크거나 같은 블록 면적을 가진 현재 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다. 여기서, A의 값은, 32, 64, 128, 256, 512 또는 그 이상의 정수일 수 있다. 현재 블록이 P/B-Slice에 속한 인트라 블록이고 대체 변환 세트가 이용되는 경우, 현재 블록의 블록 면적에 관계없이, 현재 블록에 대해 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
또는, 현재 블록이 P/B-Slice에 속한 인트라 블록이고 현재 블록의 변환 세트가 대체 변환 세트로 결정되는 경우, B보다 작은 블록 면적을 가진 현재 블록에 대해서는 변환 커널이 적용되지 않고, B보다 크거나 같은 블록 면적을 가진 현재 블록에 대해서 적용 가능한 변환 커널 후보의 개수는 1개일 수 있다. 여기서, B의 값은, 32, 64, 128, 256, 512 또는 그 이상의 정수일 수 있다.
현재 블록이 P/B-Slice에 속한 인터 블록인 경우, 현재 블록의 블록 면적이 256보다 작은지 여부에 따라 현재 블록에 대해 적용 가능한 변환 커널 후보의 개수는 2개 또는 3개 중 어느 하나로 결정될 수 있다. 그 외 조합의 경우, 현재 블록의 블록 면적에 관계없이, 현재 블록에 대해 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
Case Slice type Prediction mode Transform set Range sequence
[A-(1)]/[B-(1)] I-Slice Intra main [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(1)]/[B-(2)] I-Slice Intra alternative [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(2)]/[B-(1)] P/B-Slice Intra main [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(2)]/[B-(2)] P/B-Slice Intra alternative [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(3)]/[B-(1)] P/B-Slice Inter main [ min_area, min_area ), [min_area, min_area ), [ min_area, 256 ), [ 256, max_area_plus_1 )
[A-(3)]/[B-(2)] P/B-Slice Inter alternative [ min_area, min_area ), [min_area, A ), [ A, A ), [ A, max_area_plus_1 )
또는, 표 26에 따르면, 현재 블록이 P/B-Slice에 속한 인터 블록이고 현재 블록의 변환 세트가 대체 변환 세트로 결정되는 경우, A보다 작은 블록 면적을 가진 현재 블록에 대해 적용 가능한 변환 커널 후보의 개수는 1개일 수 있고, A보다 크거나 같은 블록 면적을 가진 현재 블록에 대해 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다. 여기서, A의 값은 32, 64, 128, 256, 512 또는 그 이상의 정수일 수 있다.
현재 블록이 P/B-Slice에 속한 인터 블록이고 현재 블록의 변환 세트가 기본 변환 세트로 결정되는 경우, 256보다 작은 블록 면적을 가진 현재 블록에 대해 적용 가능한 변환 커널 후보의 개수는 2개일 수 있고, 256보다 크거나 같은 블록 면적을 가진 현재 블록에 대해 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다. 그 외 조합의 경우, 현재 블록의 블록 면적에 관계없이, 현재 블록에 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
Case Slice type Prediction mode Transform set Range sequence
[A-(1)]/[B-(1)] I-Slice Intra main [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(1)]/[B-(2)] I-Slice Intra alternative [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(2)]/[B-(1)] P/B-Slice Intra main [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(2)]/[B-(2)] P/B-Slice Intra alternative [ min_area, min_area ), [ min_area, min_area ), [ min_area, min_area ), [ min_area, max_area_plus_1 )
[A-(3)]/[B-(1)] P/B-Slice Inter main [ min_area, min_area ), [min_area, min_area ), [ min_area, 256 ), [ 256, max_area_plus_1 )
[A-(3)]/[B-(2)] P/B-Slice Inter alternative [ min_area, min_area ), [min_area, min_area ), [ min_area, A ), [ A, max_area_plus_1 )
또는, 표 27에 따르면, 현재 블록이 P/B-Slice에 속한 인터 블록이고 현재 블록의 변환 세트가 대체 변환 세트로 결정되는 경우, A보다 작은 블록 면적을 가진 현재 블록에 대해 적용 가능한 변환 커널 후보의 개수는 2개일 수 있고, A보다 크거나 같은 블록 면적을 가진 현재 블록에 대해 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다. 여기서, A의 값은 32, 64, 128, 256, 512 또는 그 이상의 정수일 수 있다.
현재 블록이 P/B-Slice에 속한 인터 블록이고 현재 블록의 변환 세트가 기본 변환 세트로 결정되는 경우, 256보다 작은 블록 면적을 가진 현재 블록에 대해 적용 가능한 변환 커널 후보의 개수는 2개일 수 있고, 256보다 크거나 같은 블록 면적을 가진 현재 블록에 대해 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다. 그 외 조합의 경우, 현재 블록의 블록 면적에 관계없이, 현재 블록에 대해 적용 가능한 변환 커널 후보의 개수는 3개일 수 있다.
6가지의 조합에 대해 구간 시퀀스를 설정하는 방법으로, 1) 고정된 설정 또는 2) 상위 레벨 신택스(High-Level Syntax, HLS) 기반의 설정이 이용될 수 있다.
고정된 설정은, 코덱 시스템에 기-정의된 구간 시퀀스에 대한 설정이 변하지 않음을 의미할 수 있다. HLS 기반의 설정은, 비트스트림의 상위 레벨 신택스 테이블(예를 들어, SPS, PPS, PH, SH)에서 시그날링되는 신택스 요소를 기반으로 구간 시퀀스를 설정하는 것을 의미할 수 있다. 6가지의 조합 각각에 대한 구간 시퀀스는, 고정된 설정 또는 HLS 기반의 설정 중 어느 하나를 기반으로 설정될 수 있다. 일예로, 6가지의 조합에 대한 구간 시퀀스 전부는 고정된 설정을 기반으로 할 수 있다. 또는, 6가지의 조합에 대한 구간 시퀀스 전부는 HLS 기반의 설정을 기반으로 할 수 있다. 또는, 6가지의 조합에 대한 구간 시퀀스 일부는 고정된 설정을 기반으로 할 수 있고, 나머지는 HLS 기반의 설정을 기반으로 할 수 있다.
HLS 기반의 설정의 경우, 다음 표 28과 같은 신택스 요소를 기반으로 구간 시퀀스가 설정될 수 있다.
sps_alt_lfnst_nspt_set_cfg_flag[ 0 ]
if( sps_alt_lfnst_nspt_set_cfg_flag[ 0 ] ) {
  sps_alt_lfnst_nspt_set_range[ 0 ]
  sps_alt_lfnst_nspt_set_cfg_flag[ 1 ]
  if( sps_alt_lfnst_nspt_set_cfg_flag[ 1 ] ) {
    sps_alt_lfnst_nspt_set_range[ 1 ]
    sps_alt_lfnst_nspt_set_cfg_flag[ 2 ]
    if( sps_alt_lfnst_nspt_set_cfg_flag[ 2 ] )
      sps_alt_lfnst_nspt_set_range[ 2 ]
  }
}
표 28은 구간 시퀀스가 총 4개의 구간으로 구성된 경우를 가정한 것이다. 구간 시퀀스가 M개의 구간들로 구성될 경우, 신택스 요소들은 sps_alt_lfnst_nspt_set_cfg_flag[ k ]와 sps_alt_lfnst_nspt_set_range[ k ]로 정의될 수 있다. 여기서, k는 0부터 (M-1)까지의 값을 가질 수 있다. 표 28에 따르면, 구간 시퀀스의 설정에 관한 신택스 요소들이 SPS를 통해 시그날링될 수 있다. 다만, 이는 일예에 불과하며, 픽쳐 파라미터 세트(PPS), 픽쳐 헤더(PH), 또는 슬라이스 헤더(SH) 중 적어도 하나를 통해 시그날링될 수도 있다.
sps_alt_lfnst_nspt_set_cfg_flag[ k ]는 0 또는 1의 값을 가질 수 있다. sps_alt_lfnst_nspt_set_cfg_flag[ k ]의 값이 0인 경우, k 번째 구간의 e_(k)의 값은 max_area_plus_1와 같은 값으로 설정될 수 있다. 이 경우, 이후의 구간들(즉, (k+1) 번째부터의 구간들)의 0의 길이를 가진 빈 구간일 수 있다. sps_alt_lfnst_nspt_set_cfg_flag[ k ]의 값이 1인 경우, e_(k)와 s_(k+1)의 값은 sps_alt_lfnst_nspt_set_range[ k ]를 기반으로 결정될 수 있다. sps_alt_lfnst_nspt_set_range[ k ]의 값은 밑이 2인 로그 스케일의 값일 수 있다. 예를 들어 e_(k)과 s_(k+1)의 값은 다음 수학식 16과 같이 설정될 수 있다.
[수학식 16]
e_(k) = s_(k+1) = ( 1 << ( log2( s_(k) ) + sps_alt_lfnst_nspt_set_range[ k ] ) )
수학식 16에서, << 은 왼쪽 쉬프트 연산자로서, ( 1 << s )의 값은 2s를 의미한다. log2(x)는 x의 밑이 2인 로그값을 리턴하는 함수이다. 상기 수학식 16에 따른 연산 과정에서 매번 log2 연산을 할 필요는 없다. 비분리 변환이 적용 가능한 가장 작은 블록 면적(즉, min_area)에 대한 밑이 2인 로그값(즉, log2(min_area))으로부터 sps_alt_lfnst_nspt_set_range[ k ]의 값을 누적해 나가는 방식으로 log2(e_(k))의 값을 계산할 수 있다. 실제 블록 면적의 값인 e_(k)와 s_(k+1)은 수학식 16에서와 같이 1의 값에 대해 왼쪽 쉬프트를 적용하는 방식으로 계산할 수 있다. 수학식 16에서, sps_alt_lfnst_nspt_set_range[ k ]의 값이 0인 경우, e_(k)는 s_(k)과 같게 되므로, k 번째 구간은 0의 길이를 가진 빈 구간이 되어 해당 구간에 속하는 블록 면적은 존재하지 않게 된다.
if( areaBoundaryValid[ 0 ] ) {
if( area < areaBoundary[ 0 ] ) kernelCandNum = 0;
else {
if( areaBoundaryValid[ 1 ] ) {
if( area < areaBoundary[ 1 ] ) kernelCandNum = 1;
else {
if( areaBoundaryValid[ 2 ] ) {
if( area < areaBoundary[ 2 ] ) kernelCandNum = 2;
else kernelCandNum = 3;
} else
kernelLNCandNum = 2;
}
} else
kernelLNCandNum = 1;
}
} else
kernelCandNum = 0;
표 29는 현재 블록의 블록 면적의 값(area)과 적어도 하나의 구간을 비교하여 현재 블록에 적용 가능한 변환 커널 후보의 개수를 유도하는 pseudo 코드를 나타낸다.
표 29에서 areaBoundaryValid[ k ]의 값이 0인 경우, 이는 k 번째 구간에서 e_(k)의 값이 max_area_plus_1로 설정되어 있어 이후의 구간들(즉, (k+1) 번째 구간부터 마지막 구간까지)은 빈 구간에 해당하고, k 번째 구간이 마지막 구간임을 나타낼 수 있다. areaBoundary[ k ]의 값은 k 번째 구간의 e_(k)와 (k+1) 번째 구간의 s_(k+1)을 나타낼 수 있다.
표 29는 적용 가능한 변환 커널 후보의 최대 개수가 3개인 경우(즉, L이 3인 경우)에 대한 pseudo 코드를 나타낸 것이나, 적용 가능한 변환 커널 후보의 최대 개수가 3보다 크거나 작은 경우에도 표 29에서 정의된 규칙에 따라 용이하게 변형되어 적용될 수 있다.
표 29에서의 areaBoundaryValid[ k ]와 areaBoundary[ k ]는 연관된 신택스 요소들을 기반으로 다음 표 30과 같이 유도될 수 있다.
log2Area = log2(min_area)
sps_alt_lfnst_nspt_set_cfg_flag[ 0 ]
if( sps_alt_lfnst_nspt_set_cfg_flag[ 0 ] ) {
areaBoundaryValid[ 0 ] = 1
sps_alt_lfnst_nspt_set_range[ 0 ]
log2Area = log2Area + sps_alt_lfnst_nspt_set_range[ 0 ]
areaBoundary[ 0 ] = ( 1 << log2Area )
  sps_alt_lfnst_nspt_set_cfg_flag[ 1 ]
if( sps_alt_lfnst_nspt_set_cfg_flag[ 1 ] ) {
areaBoundaryValid[ 1 ] = 1
     sps_alt_lfnst_nspt_set_range[ 1 ]
log2Area = log2Area + sps_alt_lfnst_nspt_set_range[ 1 ]
areaBoundary[ 1 ] = ( 1 << log2Area )
     sps_alt_lfnst_nspt_set_cfg_flag[ 2 ]
    if( sps_alt_lfnst_nspt_set_cfg_flag[ 2 ] ) {
areaBoundaryValid[ 2 ] = 1
       sps_alt_lfnst_nspt_set_range[ 2 ]
log2Area = log2Area + sps_alt_lfnst_nspt_set_range[ 2 ]
areaBoundary[ 2 ] = ( 1 << log2Area )
} else
areaBoundaryValid[ 2 ] = 0
} else {
areaBoundaryValid[ 1 ] = areaBoundaryValid[ 2 ] = 0
}
} else {
areaBoundaryValid[ 0 ] = areaBoundaryValid[ 1 ] = areaBoundaryValid[ 2 ] = 0
}
표 30에서, sps_alt_lfnst_nspt_set_range[ k ]은 3 비트나 4 비트와 같이 특정 고정 길이의 비트를 가진 코드로 코딩되거나 Exponential Golumb 코드와 같이 가변 길이 비트를 가진 코드로 코딩될 수도 있다.
전술한 구간 시퀀스의 설정에 관한 신택스 요소를 기반으로 2가지 이상의 조합에 대한 구간 시퀀스를 설정할 수도 있다. 일예로, 상기 신택스 요소를 기반으로 ([A-(1)]/[B-(2)])과 ([A-(2)]/[B-(2)])의 조합에 대한 구간 시퀀스가 서로 동일하게 설정될 수 있다.
6가지의 조합은 복수의 그룹으로 구분될 수 있다. 복수의 그룹 중 어느 하나(이하, 제1 그룹이라 함)에 대해서는 고정된 설정을 기반으로 구간 시퀀스가 설정될 수 있고, 다른 하나(이하, 제2 그룹이라 함)에 대해서는 HLS 기반의 설정을 기반으로 구간 시퀀스가 설정될 수 있다.
제1 그룹은 인코딩 장치와 디코딩 장치에 기-정의된 고정된 구간 시퀀스를 가지므로, 제1 그룹에 대해서는 구간 시퀀스의 설정에 관한 신택스 요소가 정의될 필요가 없다. 제2 그룹에 복수의 조합이 속하는 경우, 각 조합별로 구간 시퀀스의 설정에 관한 신택스 요소가 시그날링될 수 있다. 제2 그룹에 속한 복수의 조합은 서로 다른 구간 시퀀스를 가질 수 있다. 또는, 제2 그룹에 대해서 시그날링된 신택스 요소를 기반으로 구간 시퀀스가 결정될 수 있고, 상기 결정된 구간 시퀀스는 제2 그룹에 속한 복수의 조합에 동일하게 적용될 수 있다. 또는, 제2 그룹에 속한 복수의 조합은 복수의 서브그룹으로 구분될 수 있다. 각 서브그룹별로 구간 시퀀스의 설정에 관한 신택스 요소가 시그날링될 수 있다. 제2 그룹에 속한 서브그룹들은 서로 다른 구간 시퀀스를 가질 수 있고, 동일 서브그룹에 속한 조합은 서로 동일한 구간 시퀀스를 가질 수 있다.
또는, 6가지의 조합에 대해서 HLS 기반의 설정을 기반으로 구간 시퀀스가 설정될 수 있다. 이때, 6가지의 조합은 복수의 그룹으로 구분될 수 있고, 그룹별로 구간 시퀀스의 설정에 관한 신택스 요소가 시그날링될 수 있다. 복수의 그룹에 대해서 서로 상이한 구간 시퀀스가 설정될 수 있다. 동일 그룹에 속한 하나 또는 그 이상의 조합에 대해서 동일한 구간 시퀀스가 설정될 수 있다.
또는, 6가지의 조합에 대해서 고정된 설정을 기반으로 구간 시퀀스가 설정될 수 있다. 이때, 6가지의 조합은 복수의 그룹으로 구분될 수 있고, 그룹별로 고정된 구간 시퀀스가 정의될 수 있다. 복수의 그룹에 대해서 서로 상이한 구간 시퀀스가 설정될 수 있다. 동일 그룹에 속한 하나 또는 그 이상의 조합에 대해서 동일한 구간 시퀀스가 설정될 수 있다.
이하, 구체적인 예시들을 살펴보도록 한다.
[A-(1)]/[B-(1)], [A-(2)]/[B-(1)], [A-(3)]/[B-(1)], [A-(3)]/[B-(2)]에 대해서 각각 고정된 구간 시퀀스가 설정될 수 있다. [A-(1)]/[B-(2)]과 [A-(2)]/[B-(2)]에 대해서 구간 시퀀스의 설정에 관한 신택스 요소가 시그날링될 수 있다. 시그날링된 신택스 요소를 기반으로 결정된 구간 시퀀스는 [A-(1)]/[B-(2)]과 [A-(2)]/[B-(2)]에 대해서 동일하게 설정될 수 있다.
또는, [A-(1)]/[B-(1)], [A-(2)]/[B-(1)], [A-(3)]/[B-(1)], [A-(3)]/[B-(2)]에 대해서 각각 고정된 구간 시퀀스가 설정될 수 있다. [A-(1)]/[B-(2)]과 [A-(2)]/[B-(2)]에 대해서 표 28과 같은 신택스 요소가 각각 시그날링될 수 있고, 시그날링된 신택스 요소를 기반으로 해당 조합에 대한 구간 시퀀스가 설정될 수 있다.
또는, [A-(1)]/[B-(1)], [A-(2)]/[B-(1)], [A-(3)]/[B-(1)]에 대해서 각각 고정된 구간 시퀀스가 설정될 수 있다. [A-(1)]/[B-(2)]과 [A-(2)]/[B-(2)]에 대해서 구간 시퀀스의 설정에 관한 신택스 요소가 시그날링될 수 있다. 시그날링된 신택스 요소를 기반으로 결정된 구간 시퀀스는 [A-(1)]/[B-(2)]과 [A-(2)]/[B-(2)]에 대해서 동일하게 설정될 수 있다. [A-(3)]/[B-(2)]에 대해서 별도의 신택스 요소가 정의되어 시그날링될 수 있다. 해당 신택스 요소를 기반으로 [A-(3)]/[B-(2)]에 대한 구간 시퀀스를 설정할 수 있다.
또는, 6가지의 조합에 대해서 각각 고정된 구간 시퀀스가 설정될 수 있다.
또는, 6가지의 조합은 복수의 그룹으로 구분될 수 있다. 여기서, 복수의 그룹은, [A-(1)]/[B-(1)]와 [A-(2)]/[B-(1)]로 구성된 제1 그룹, [A-(1)]/[B-(2)]과 [A-(2)]/[B-(2)]로 구성된 제2 그룹, [A-(3)]/[B-(1)]로 구성된 제3 그룹 및 [A-(3)]/[B-(2)]로 구성된 제4 그룹을 포함할 수 있다. 각 그룹별로 표 28과 같은 신택스 요소가 정의되어 시그날링될 수 있고, 시그날링된 신택스 요소를 기반으로 해당 그룹에 대한 구간 시퀀스가 설정될 수 있다. 복수의 그룹은 서로 상이한 구간 시퀀스를 가질 수 있고, 동일 그룹에 속한 조합에 대해서 동일한 구간 시퀀스가 설정될 수 있다.
상기 현재 블록의 역변환은 분리 일차 변환 및/또는 LFNST 기반의 역변환일 수 있다. 즉, 현재 블록의 (역양자화된) 변환 계수들 전부 또는 일부에 대해 역방향의 LFNST를 적용하고, 그런 다음 LFNST를 통해 유도된 변환 계수들에 대해 역방향의 분리 일차 변환을 적용하여 레지듀얼 샘플들을 유도할 수 있다. 일예로, 현재 블록의 일부 영역에 속한 (역양자화된) 변환 계수들에 대해 역방향의 LFNST가 적용될 수 있다. 여기서, 일부 영역은 순방향의 LFNST가 적용된 영역을 의미하며, 이하 ROI (region of interest) 영역이라 부르기로 한다. LFNST를 통해 유도된 변환 계수들은 소정의 스캔 순서에 따라 ROI 영역에 배열될 수 있다. 소정의 스캔 순서는, 행 우선 순서(row-first order) 또는 열 우선 순서(column-first order)일 수 있다. 상기 LFNST를 통해 유도된 변환 계수들 및 상기 현재 블록 내 ROI 영역을 제외한 나머지 영역에 속한 변환 계수들에 대해서 역방향의 분리 일차 변환이 적용될 수 있다. 또는, 순방향의 변환 과정에서, 상기 현재 블록 내 ROI 영역을 제외한 나머지 영역에 대해서 zero-out이 수행된 경우(즉, 해당 나머지 영역 내 변환 계수들이 0으로 설정된 경우), LFNST를 통해 유도된 변환 계수들에 대해서 역방향의 분리 일차 변환이 적용될 수 있다. 상기 ROI 영역의 크기는 현재 블록의 너비 또는 높이 중 적어도 하나에 기초하여 결정될 수 있다. 여기서, ROI 영역의 크기는, ROI 영역의 너비 또는 높이 중 적어도 하나를 의미할 수도 있고, ROI 영역에 속한 샘플 위치들의 개수를 의미할 수도 있다.
도 4를 참조하면, 현재 블록의 레지듀얼 샘플을 기반으로 현재 블록을 복원할 수 있다(S420).
현재 블록의 예측 블록과 레지듀얼 블록을 기반으로 현재 블록을 복원할 수 있다.
인터 예측 또는 인트라 예측 중 적어도 하나를 기반으로 현재 블록의 예측 블록을 유도할 수 있다. 일예로, 현재 블록을 복수의 파티션들로 분할하고, 각 파티션에 대한 예측을 기반으로 현재 블록의 예측 블록을 생성할 수 있다.
현재 블록은 하나 또는 그 이상의 분할 라인을 기반으로 복수의 파티션들로 분할될 수 있다. 상기 분할 라인은 수직 라인 또는 수평 라인 중 적어도 하나를 포함할 수 있다. 또는, 현재 블록에 기하학적 분할(geometric partitioning)이 적용되는 경우, 현재 블록은 소정의 분할 라인에 의해 둘의 파티션들로 분할될 수 있다. 상기 기하학적 분할을 위한 분할 라인은, 소정의 분할 방향(또는, 분할 각도) 및 현재 블록의 중심으로부터의 거리에 기초하여 정의될 수 있다. 상기 현재 블록은 트리 기반의 블록 분할을 통해 더 이상 분할되지 않는 코딩 블록일 수 있다.
현재 블록이 둘의 파티션들 즉, 제1 파티션과 제2 파티션으로 분할되는 경우를 가정한다. 이 경우, 현재 블록의 예측 블록은, 제1 파티션에 대한 제1 예측 블록과 제2 파티션에 대한 제2 예측 블록의 가중합으로 생성될 수 있다. 여기서, 제1 및 제2 예측 블록은 인트라 예측을 기반으로 생성될 수 있다. 또는, 제1 및 제2 예측 블록은 인터 예측을 기반으로 생성될 수 있다. 또는, 제1 예측 블록 또는 제2 예측 블록 중 어느 하나는 인트라 예측을 기반으로 생성되고, 다른 하나는 인터 예측을 기반으로 생성될 수 있다.
일예로, 현재 블록이 기하학적 분할에 기반하여 둘의 파티션들로 분할된 경우, 각 파티션에 대한 예측 블록은 인터 예측을 기반으로 생성될 수 있고, 생성된 예측 블록들의 가중합을 기반으로 현재 블록의 예측 블록이 생성될 수 있다.
또는, 현재 블록이 기하학적 분할에 기반하여 둘의 파티션들로 분할된 경우, 각 파티션에 대한 예측 블록은 인트라 예측을 기반으로 생성될 수 있고, 생성된 예측 블록들의 가중합을 기반으로 현재 블록의 예측 블록이 생성될 수 있다. 이하, 이를 공간적 기하학적 분할 모드(Spatial Geometric Partitioning Mode, SGPM)라 부르기로 한다.
현재 블록에 SGPM이 적용되는 경우, 현재 블록의 분할 타입은, 분할 라인의 분할 방향과 위치를 특정하는 분할 타입 인덱스를 기반으로 결정될 수 있다. 분할 타입 인덱스는, 기-정의된 분할 타입 후보들 중 어느 하나를 지시할 수 있다. 현재 블록 내 각 파티션의 인트라 예측 모드는, 복수의 인트라 예측 모드 후보들 중 어느 하나를 지시하는 모드 인덱스를 기반으로 유도될 수 있다. 상기 모드 인덱스는 현재 블록 내 파티션 별로 정의될 수 있다.
상기 분할 타입 인덱스와 각 파티션 별 모드 인덱스는 비트스트림을 통해 시그날링될 수 있다. 이 경우, 분할 타입 인덱스는 partition_mode_idx로, 각 파티션 별 모드 인덱스는 intra_pred_mode0_idx와 intra_pred_mode1_idx로 각각 표현될 수 있다. 또는, 분할 타입 인덱스와 제1 파티션에 대한 모드 인덱스는 비트스트림을 통해 시그날링되고, 제2 파티션에 대한 모드 인덱스는 제1 파티션에 대한 모드 인덱스를 기반으로 유도될 수도 있다. 전술한 분할 타입 인덱스 또는 모드 인덱스 중 적어도 하나는, 현재 블록에 SGPM이 적용되는지 여부를 나타내는 플래그(cu_sgpm_flag)를 기반으로 시그날링될 수 있다. 일예로, cu_sgpm_flag가 1인 경우, 분할 타입 인덱스와 모드 인덱스가 시그날링될 수 있고, cu_sgpm_flag가 0인 경우, 분할 타입 인덱스와 모드 인덱스가 시그날링되지 않을 수 있다.
또는, SGPM을 위한 후보 리스트가 구성될 수 있다. 상기 후보 리스트는 복수의 후보들을 포함하고, 각 후보는 하나의 분할 타입 인덱스와 둘의 모드 인덱스를 포함할 수 있다. 일예로, 후보 리스트에 속한 복수의 후보들은, 기-정의된 분할 타입 후보들(예를 들어, 26개의 분할 타입 후보들)과 소정의 인트라 예측 모드 후보들(예를 들어, 3개의 인트라 예측 모드 후보들) 간의 조합으로 유도될 수 있다. 상기 후보 리스트에 포함 가능한 후보들의 최대 개수는 16일 수 있다. 상기 복수의 후보들 중 어느 하나를 기반으로, 현재 블록에 대한 분할 타입 인덱스와 각 파티션 별 모드 인덱스가 유도될 수 있다. 상기 복수의 후보들 중 어느 하나를 지시하는 후보 인덱스가 비트스트림을 통해 시그날링될 수 있다.
상기 후보 리스트는 소정의 템플릿 영역을 기반으로 재정렬될 수 있다. 일예로, 템플릿 영역의 예측 샘플과 복원 샘플 간의 SAD를 산출할 수 있다. 상기 SAD는 후보 리스트에 속한 복수의 후보들 각각에 대해서 산출될 수 있다. SAD의 오름차순으로 후보 리스트 내 복수의 후보들을 재정렬할 수 있다. 상기 템플릿 영역은, 현재 블록에 인접한 상단 주변 영역 또는 좌측 주변 영역 중 적어도 하나를 포함할 수 있다. 상단 주변 영역의 높이와 좌측 주변 영역의 너비는 소정의 길이(예를 들어, 1)로 고정될 수 있다.
상기 인트라 예측 모드 후보들은 IPM 리스트에 구성될 수 있다. IPM 리스트는 현재 블록 내 파티션 각각에 대해서 구성될 수 있다. 제1 파티션의 IPM 리스트에 속한 인트라 예측 모드 후보들 중 적어도 하나는, 제2 파티션의 IPM 리스트에 속한 인트라 예측 모드 후보들과 상이할 수 있다. 또는, 현재 블록에 대해서 하나의 IPM 리스트가 구성될 수 있고, 현재 블록에 속한 파티션들은 상기 하나의 IPM 리스트를 공유할 수도 있다. 상기 IPM 리스트에는 3개 또는 그 이상의 인트라 예측 모드 후보들이 포함될 수 있다.
SGPM은 현재 블록의 크기가 소정의 조건을 만족하는 경우에 적용될 수 있다. 상기 조건은 다음 조건 1 내지 5 중 적어도 하나를 포함할 수 있다. 여기서, width와 height는 현재 블록의 너비와 높이를 각각 의미할 수 있다.
(조건 1) 4<=width<=64
(조건 2) 4<=height<=64
(조건 3) width<height*8
(조건 4) height<width*8
(조건 5) width*height>=32
현재 블록에 대한 제1 파티션의 예측 블록과 제2 파티션의 예측 블록 간의 블렌딩(blending)이 허용되는지 여부를 나타내는 플래그가 정의될 수 있다.
상기 플래그가 예측 블록들 간의 블렌딩이 허용됨을 지시하는 경우(예를 들어, 플래그가 false인 경우), SGPM에서 적응적 블렌딩이 이용될 수 있다. 적응적 블렌딩을 위한 블렌딩 깊이는 현재 블록의 크기에 기초하여 유도될 수 있다. 일예로, 현재 블록의 너비와 높이 중 최소값이 4인 경우, 블렌딩 깊이는 1/2τ로 유도될 수 있다. 현재 블록의 너비와 높이의 최소값이 8인 경우, 블렌딩 깊이는 τ로 유도될 수 있다. 현재 블록의 너비와 높이의 최소값이 16인 경우, 블렌딩 깊이는 2τ로 유도될 수 있다. 현재 블록의 너비와 높이의 최소값이 32인 경우, 블렌딩 깊이는 4τ로 유도될 수 있다. 현재 블록의 너비와 높이의 최소값이 32보다 큰 경우, 블렌딩 깊이는 8τ로 유도될 수 있다. 여기서, τ는 0보다 큰 임의의 정수일 수 있다.
반면, 플래그가 예측 블록들 간의 블렌딩이 허용되지 않음을 지시하는 경우(예를 들어, 플래그가 true인 경우), 블렌딩 깊이는 디폴트 값(예를 들어, 1/4τ)로 유도될 수 있다. 이는, 기하학적 분할의 분할 라인이 수직 또는 수평 라인에 해당하는 경우에는 블렌딩이 이용되지 않게 되고, 기하학적 분할의 분할 라인이 수직 및 수평 라인에 해당하지 않는 경우(즉, 분할 라인이 다른 분할 방향을 가지는 경우)에는 블렌딩이 적용되는 영역의 너비가 상대적으로 더 좁아지게 됨을 나타낸다.
도 8은 본 개시에 따른 영상 디코딩 방법을 수행하는 디코딩 장치 (300)의 개략적인 구성을 도시한 것이다.
도 8을 참조하면, 본 개시에 따른 디코딩 장치(300)는, 변환 계수 유도부(800), 레지듀얼 샘플 유도부(810), 복원 블록 생성부(820)를 포함할 수 있다. 변환 계수 유도부(800)는 도 3의 엔트로피 디코딩부(310)에 구성될 수 있고, 레지듀얼 샘플 유도부(810)는 도 3의 레지듀얼 처리부(320)에 구성될 수 있고, 복원 블록 생성부(820)는 도 3의 가산부(340)에 구성될 수 있다.
변환 계수 유도부(800)는, 비트스트림으로부터 현재 블록의 레지듀얼 정보를 획득하고, 이를 복호화하여 현재 블록의 변환 계수를 유도할 수 있다.
레지듀얼 샘플 유도부(810)는, 현재 블록의 변환 계수에 역양자화 또는 역변환 중 적어도 하나를 수행하여, 현재 블록의 레지듀얼 샘플을 유도할 수 있다.
레지듀얼 샘플 유도부(810)는, 소정의 변환 커널 결정 방법을 통해 현재 블록의 역변환을 위한 변환 커널을 결정하고, 이를 기반으로 현재 블록의 레지듀얼 샘플을 유도할 수 있다. 이에 대해서는 도 4를 참조하여 살펴본 바와 같으며, 여기서 자세한 설명은 생략하기로 한다.
복원 블록 생성부(820)는, 현재 블록의 레지듀얼 샘플을 기반으로 현재 블록을 복원할 수 있다.
도 9는 본 개시에 따른 일실시예로서, 인코딩 장치(200)에 의해 수행되는 영상 인코딩 방법을 도시한 것이다.
도 9를 참조하면, 현재 블록의 레지듀얼 샘플(residual samples)을 유도할 수 있다(S900).
현재 블록의 레지듀얼 샘플은, 현재 블록의 원본 샘플(original samples)에서 예측 샘플(prediction samples)을 차분하여 유도될 수 있다. 여기서, 예측 샘플은, 인터 예측 또는 인트라 예측을 기반으로 유도된 것일 수 있다. 현재 블록은 복수의 파티션들로 분할될 수 있고, 각 파티션에 대한 예측을 기반으로 현재 블록의 예측 블록을 생성할 수 있다.
도 4를 참조하여 살펴본 바와 같이, 현재 블록이 둘의 파티션들(즉, 제1 파티션과 제2 파티션)로 분할되는 경우, 현재 블록의 예측 블록은, 제1 파티션에 대한 제1 예측 블록과 제2 파티션에 대한 제2 예측 블록의 가중합으로 생성될 수 있다. 여기서, 제1 및 제2 예측 블록 각각 인트라 예측 또는 인터 예측을 기반으로 생성될 수 있다.
현재 블록에 전술한 SGPM이 적용되는 경우, 현재 블록의 분할 타입과 각 파티션의 인트라 예측 모드를 결정될 수 있다. 상기 결정된 분할 타입을 지시하기 위한 분할 타입 인덱스가 비트스트림에 부호화될 수 있다. 복수의 인트라 예측 모드 후보들 중에서 상기 결정된 인트라 예측 모드를 지시하는 모드 인덱스가 비트스트림에 부호화될 수 있다. 상기 모드 인덱스는 파티션 각각에 대해서 부호화될 수 있다. 제2 파티션에 대한 모드 인덱스는 제1 파티션에 대한 모드 인덱스를 기반으로 부호화될 수 있다. 상기 분할 타입 인덱스 또는 상기 모드 인덱스 중 적어도 하나는 현재 블록에 SGPM이 적용되는지 여부를 나타내는 플래그(cu_sgpm_flag)를 기반으로 부호화될 수 있다.
도 4를 참조하여 살펴본 바와 같이, 현재 블록의 SGPM을 위한 후보 리스트가 구성될 수도 있다. 상기 후보 리스트에 속한 각 후보는 하나의 분할 타입 인덱스와 둘의 모드 인덱스를 포함할 수 있다. 상기 후보 리스트 속한 복수의 후보들 중 어느 하나를 기반으로, 현재 블록에 대한 분할 타입 인덱스와 각 파티션 별 모드 인덱스가 유도될 수 있다. 상기 복수의 후보들 중 어느 하나를 지시하는 후보 인덱스가 비트스트림에 부호화될 수 있다. 또한, 상기 후보 리스트는 소정의 템플릿 영역을 기반으로 재정렬될 수도 있다.
도 4를 참조하여 살펴본 바와 같이, 상기 인트라 예측 모드 후보들은 IPM(intra prediction mode) 리스트에 구성될 수 있다. SGPM은 현재 블록의 크기가 소정의 조건을 만족하는 경우에 적용될 수도 있다.
현재 블록에 대한 제1 파티션의 예측 블록과 제2 파티션의 예측 블록 간의 블렌딩(blending)이 허용되는지 여부를 결정할 수 있다. 상기 예측 블록들 간의 블렌딩이 허용되는 것으로 결정된 경우, SGPM에서 적응적 블렌딩이 이용될 수 있고, 적응적 블렌딩을 위한 블렌딩 깊이는 현재 블록의 크기에 기초하여 유도될 수 있다. 반면, 상기 예측 블록들 간의 블렌딩이 허용되지 않는 것으로 결정된 경우, 블렌딩 깊이는 디폴트 값(예를 들어, 1/4τ)으로 유도될 수 있다. 상기 결정에 기초하여 제1 및 제2 파티션의 예측 블록들 간의 블렌딩이 허용되는지 여부를 나타내는 플래그가 비트스트림에 부호화될 수 있다.
도 9을 참조하면, 현재 블록의 레지듀얼 샘플에 변환 또는 양자화 중 적어도 하나를 수행하여 현재 블록의 변환 계수(transform coefficients)를 유도할 수 있다(S910).
본 개시에 따른 변환 방법은 도 4를 참조하여 살펴본 역변환의 역과정으로 이해될 수 있다. 상기 변환을 위한 변환 커널을 결정하는 방법은 도 4를 참조하여 살펴본 바와 같다. 여기서 자세한 설명은 생략하기로 한다.
예를 들어, 현재 블록의 변환을 위한 하나 또는 그 이상의 변환 세트가 정의/구성될 수 있고, 각 변환 세트는 하나 또는 그 이상의 변환 커널 후보를 포함할 수 있다. 이때, 복수의 변환 세트로부터 어느 하나가 현재 블록의 변환 세트로 선택될 수 있다. 현재 블록의 변환 세트에 속한 복수의 변환 커널 후보 중 어느 하나가 선택될 수 있다. 상기 선택은, 현재 블록의 컨텍스트를 기반으로 묵시적으로 수행될 수 있다. 또는, 현재 블록을 위한 최적의 변환 세트 및/또는 변환 커널 후보를 선택하고, 이를 지시하는 인덱스가 시그날링될 수도 있다.
또는, 현재 블록의 변환 커널은 MTS 세트를 기반으로 결정될 수 있다. 현재 블록의 크기 또는 인트라 예측 모드 중 적어도 하나를 기반으로, 복수의 MTS 세트 중 어느 하나가 선택될 수 있다. 선택된 MTS 세트는 하나 또는 그 이상의 변환 커널 후보를 포함할 수 있다. 상기 하나 또는 그 이상의 변환 커널 후보 중 어느 하나가 선택될 수 있고, 선택된 변환 커널 후보를 기반으로 현재 블록의 변환 커널이 결정될 수 있다. 상기 변환 커널 후보의 선택은, 현재 블록의 컨텍스트를 기반으로 유도된 변환 커널 후보 인덱스를 이용하여 수행될 수 있다. 또는, 현재 블록을 위한 최적의 변환 커널 후보가 선택되고, 선택된 변환 커널 후보를 지시하는 변환 커널 후보 인덱스가 시그날링될 수도 있다.
또는, 현재 블록의 변환 커널은 비분리 일차 변환(NSPT) 커널을 기반으로 결정될 수 있다. 현재 블록의 크기가 NSPT가 적용될 수 있는 블록 크기의 집합인 제1 그룹에 속하는 경우, 현재 블록에 대해 순방향의 NSPT가 적용될 수 있고, 현재 블록의 크기가 제2 그룹에 속하는 경우, 현재 블록에 대해 순방향의 NSPT가 적용되지 않을 수 있다. 현재 블록의 크기가 제2 그룹에 속하는 경우, 현재 블록의 레지듀얼 샘플에 순방향의 분리 일차 변환(e.g., DCT-2)을 적용하여 변환 계수들을 유도할 수 있다. 상기 분리 일차 변환을 통해 유도된 변환 계수들 전부 또는 일부에 대해 순방향의 LFNST가 추가적으로 적용될 수도 있다.
또한, 상기 NSPT는 현재 블록의 트리 타입 또는 성분 타입 중 적어도 하나에 기초하여 적용될 수 있다. 상기 NSPT를 위한 NSPT 커널(또는, NSPT 행렬)은, 인트라 예측 모드 간의 대칭성 또는 블록 형태 간의 대칭성을 이용하여 결정될 수 있다. MxN의 현재 블록에 대해 순방향의 NSPT가 적용되는 경우, NSPT 커널은 r x MN으로 표현될 수 있다. 여기서 r은 NSPT의 출력 길이 또는 NSPT에 의해 생성되는 변환 계수의 개수를 의미하고, MN은 현재 블록의 너비와 높이의 곱으로서, NSPT의 입력 길이 또는 NSPT가 적용되는 레지듀얼 샘플의 개수를 의미할 수 있다. 이러한 NSPT 커널의 크기를 결정하는 방법에 대해서는 도 4를 참조하여 살펴본 바와 같다.
변환을 위한 LFNST 인덱스 및/또는 NSPT 인덱스는 통합된 하나의 신택스로 부호화될 수도 있고, LFNST 인덱스와 NSPT 인덱스가 각각 부호화되어 비트스트림에 삽입될 수도 있다. LFNST 인덱스와 NSPT 인덱스에 대한 이진화, 그리고 CABAC 컨텍스트와 초기 값의 할당에 대해서는 도 4를 참조하여 살펴본 바와 같다.
인터 예측(또는, 인트라 예측)으로 부호화된 현재 블록에 대해서 비분리 변환이 적용될 수 있으며, 이는 도 4를 참조하여 살펴본 바와 같다.
또한, 도 4를 참조하여 변환 인덱스를 시그날링하는 방법을 살펴보았으며, 이는 변환 인덱스를 부호화하는 방법에도 동일하게 적용될 수 있다.
도 9를 참조하면, 현재 블록의 변환 계수를 부호화하여 비트스트림을 생성할 수 있다(S920).
상기 현재 블록의 변환 계수를 기반으로, 상기 변환 계수에 관한 레지듀얼 정보가 생성될 수 있고, 레지듀얼 정보를 부호화하여 비트스트림이 생성될 수 있다.
도 10은 본 개시에 따른 영상 인코딩 방법을 수행하는 인코딩 장치(200)의 개략적인 구성을 도시한 것이다.
도 10을 참조하면, 본 개시에 따른 인코딩 장치(200)는, 래지듀얼 샘플 유도부(1000), 변환 계수 유도부(1010) 및 변환 계수 인코딩부(1020)를 포함할 수 있다. 레지듀얼 샘플 유도부(1000)와 변환 계수 유도부(1010)는 도 2의 레지듀얼 처리부(230)에 구성될 수 있고, 변환 계수 인코딩부(1020)는 도 2의 엔트로피 인코딩부(240)에 구성될 수 있다.
레지듀얼 샘플 유도부(1000)는, 현재 블록의 원본 샘플에서 예측 샘플을 차분하여 현재 블록의 레지듀얼 샘플을 유도할 수 있다. 여기서, 예측 샘플은, 소정의 인트라 예측 모드에 기초하여 유도된 것일 수 있다.
변환 계수 유도부(1010)는, 현재 블록의 레지듀얼 샘플에 변환 또는 양자화 중 적어도 하나를 수행하여 현재 블록의 변환 계수를 유도할 수 있다. 변환 계수 유도부(1010)는, 전술한 실시예 1 내지 4 중 적어도 하나에 기초하여 현재 블록의 변환 커널을 결정하고, 현재 블록의 레지듀얼 샘플에 상기 변환 커널을 적용하여 변환 계수를 유도할 수 있다.
변환 계수 인코딩부(1020)는, 현재 블록의 변환 계수를 부호화하여 비트스트림을 생성할 수 있다.
상술한 실시예에서, 방법들은 일련의 단계 또는 블록으로써 순서도를 기초로 설명되고 있지만, 해당 실시예는 단계들의 순서에 한정되는 것은 아니며, 어떤 단계는 상술한 바와 다른 단계와 다른 순서로 또는 동시에 발생할 수 있다. 또한, 당업자라면 순서도에 나타내어진 단계들이 배타적이지 않고, 다른 단계가 포함되거나 순서도의 하나 또는 그 이상의 단계가 본 문서의 실시예들의 범위에 영향을 미치지 않고 삭제될 수 있음을 이해할 수 있을 것이다.
상술한 본 문서의 실시예들에 따른 방법은 소프트웨어 형태로 구현될 수 있으며, 본 문서에 따른 인코딩 장치 및/또는 디코딩 장치는 예를 들어 TV, 컴퓨터, 스마트폰, 셋톱박스, 디스플레이 장치 등의 영상 처리를 수행하는 장치에 포함될 수 있다.
본 문서에서 실시예들이 소프트웨어로 구현될 때, 상술한 방법은 상술한 기능을 수행하는 모듈(과정, 기능 등)로 구현될 수 있다. 모듈은 메모리에 저장되고, 프로세서에 의해 실행될 수 있다. 메모리는 프로세서 내부 또는 외부에 있을 수 있고, 잘 알려진 다양한 수단으로 프로세서와 연결될 수 있다. 프로세서는 ASIC(application-specific integrated circuit), 다른 칩셋, 논리 회로 및/또는 데이터 처리 장치를 포함할 수 있다. 메모리는 ROM(read-only memory), RAM(random access memory), 플래쉬 메모리, 메모리 카드, 저장 매체 및/또는 다른 저장 장치를 포함할 수 있다. 즉, 본 문서에서 설명한 실시예들은 프로세서, 마이크로 프로세서, 컨트롤러 또는 칩 상에서 구현되어 수행될 수 있다. 예를 들어, 각 도면에서 도시한 기능 유닛들은 컴퓨터, 프로세서, 마이크로 프로세서, 컨트롤러 또는 칩 상에서 구현되어 수행될 수 있다. 이 경우 구현을 위한 정보(ex. information on instructions) 또는 알고리즘이 디지털 저장 매체에 저장될 수 있다.
또한, 본 명세서의 실시예(들)이 적용되는 디코딩 장치 및 인코딩 장치는 멀티미디어 방송 송수신 장치, 모바일 통신 단말, 홈 시네마 비디오 장치, 디지털 시네마 비디오 장치, 감시용 카메라, 비디오 대화 장치, 비디오 통신과 같은 실시간 통신 장치, 모바일 스트리밍 장치, 저장 매체, 캠코더, 주문형 비디오(VoD) 서비스 제공 장치, OTT 비디오(Over the top video) 장치, 인터넷 스트리밍 서비스 제공 장치, 3차원(3D) 비디오 장치, VR(virtual reality) 장치, AR(argumente reality) 장치, 화상 전화 비디오 장치, 운송 수단 단말 (ex. 차량(자율주행차량 포함) 단말, 비행기 단말, 선박 단말 등) 및 의료용 비디오 장치 등에 포함될 수 있으며, 비디오 신호 또는 데이터 신호를 처리하기 위해 사용될 수 있다. 예를 들어, OTT 비디오(Over the top video) 장치로는 게임 콘솔, 블루레이 플레이어, 인터넷 접속 TV, 홈시어터 시스템, 스마트폰, 태블릿 PC, DVR(Digital Video Recorder) 등을 포함할 수 있다.
또한, 본 명세서의 실시예(들)이 적용되는 처리 방법은 컴퓨터로 실행되는 프로그램의 형태로 생산될 수 있으며, 컴퓨터가 판독할 수 있는 기록 매체에 저장될 수 있다. 본 명세서의 실시예(들)에 따른 데이터 구조를 가지는 멀티미디어 데이터도 또한 컴퓨터가 판독할 수 있는 기록 매체에 저장될 수 있다. 상기 컴퓨터가 판독할 수 있는 기록 매체는 컴퓨터로 읽을 수 있는 데이터가 저장되는 모든 종류의 저장 장치 및 분산 저장 장치를 포함한다. 상기 컴퓨터가 판독할 수 있는 기록 매체는, 예를 들어, 블루레이 디스크(BD), 범용 직렬 버스(USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크 및 광학적 데이터 저장 장치를 포함할 수 있다. 또한, 상기 컴퓨터가 판독할 수 있는 기록 매체는 반송파(예를 들어, 인터넷을 통한 전송)의 형태로 구현된 미디어를 포함한다. 또한, 인코딩 방법으로 생성된 비트스트림이 컴퓨터가 판독할 수 있는 기록 매체에 저장되거나 유무선 통신 네트워크를 통해 전송될 수 있다.
또한, 본 명세서의 실시예(들)는 프로그램 코드에 의한 컴퓨터 프로그램 제품으로 구현될 수 있고, 상기 프로그램 코드는 본 명세서의 실시예(들)에 의해 컴퓨터에서 수행될 수 있다. 상기 프로그램 코드는 컴퓨터에 의해 판독가능한 캐리어 상에 저장될 수 있다.
도 11은 본 개시의 실시예들이 적용될 수 있는 컨텐츠 스트리밍 시스템의 예를 나타낸다.
도 11을 참조하면, 본 명세서의 실시예(들)이 적용되는 컨텐츠 스트리밍 시스템은 크게 인코딩 서버, 스트리밍 서버, 웹 서버, 미디어 저장소, 사용자 장치 및 멀티미디어 입력 장치를 포함할 수 있다.
상기 인코딩 서버는 스마트폰, 카메라, 캠코더 등과 같은 멀티미디어 입력 장치들로부터 입력된 컨텐츠를 디지털 데이터로 압축하여 비트스트림을 생성하고 이를 상기 스트리밍 서버로 전송하는 역할을 한다. 다른 예로, 스마트폰, 카메라, 캠코더 등과 같은 멀티미디어 입력 장치들이 비트스트림을 직접 생성하는 경우, 상기 인코딩 서버는 생략될 수 있다.
상기 비트스트림은 본 명세서의 실시예(들)이 적용되는 인코딩 방법 또는 비트스트림 생성 방법에 의해 생성될 수 있고, 상기 스트리밍 서버는 상기 비트스트림을 전송 또는 수신하는 과정에서 일시적으로 상기 비트스트림을 저장할 수 있다.
상기 스트리밍 서버는 웹 서버를 통한 사용자 요청에 기초하여 멀티미디어 데이터를 사용자 장치에 전송하고, 상기 웹 서버는 사용자에게 어떠한 서비스가 있는지를 알려주는 매개체 역할을 한다. 사용자가 상기 웹 서버에 원하는 서비스를 요청하면, 상기 웹 서버는 이를 스트리밍 서버에 전달하고, 상기 스트리밍 서버는 사용자에게 멀티미디어 데이터를 전송한다. 이때, 상기 컨텐츠 스트리밍 시스템은 별도의 제어 서버를 포함할 수 있고, 이 경우 상기 제어 서버는 상기 컨텐츠 스트리밍 시스템 내 각 장치 간 명령/응답을 제어하는 역할을 한다.
상기 스트리밍 서버는 미디어 저장소 및/또는 인코딩 서버로부터 컨텐츠를 수신할 수 있다. 예를 들어, 상기 인코딩 서버로부터 컨텐츠를 수신하게 되는 경우, 상기 컨텐츠를 실시간으로 수신할 수 있다. 이 경우, 원활한 스트리밍 서비스를 제공하기 위하여 상기 스트리밍 서버는 상기 비트스트림을 일정 시간동안 저장할 수 있다.
상기 사용자 장치의 예로는, 휴대폰, 스마트 폰(smart phone), 노트북 컴퓨터(laptop computer), 디지털방송용 단말기, PDA(personal digital assistants), PMP(portable multimedia player), 네비게이션, 슬레이트 PC(slate PC), 태블릿 PC(tablet PC), 울트라북(ultrabook), 웨어러블 디바이스(wearable device, 예를 들어, 워치형 단말기 (smartwatch), 글래스형 단말기 (smart glass), HMD(head mounted display)), 디지털 TV, 데스크탑 컴퓨터, 디지털 사이니지 등이 있을 수 있다.
상기 컨텐츠 스트리밍 시스템 내 각 서버들은 분산 서버로 운영될 수 있으며, 이 경우 각 서버에서 수신하는 데이터는 분산 처리될 수 있다.
본 명세서에 기재된 청구항들은 다양한 방식으로 조합될 수 있다. 예를 들어, 본 명세서의 방법 청구항의 기술적 특징이 조합되어 장치로 구현될 수 있고, 본 명세서의 장치 청구항의 기술적 특징이 조합되어 방법으로 구현될 수 있다. 또한, 본 명세서의 방법 청구항의 기술적 특징과 장치 청구항의 기술적 특징이 조합되어 장치로 구현될 수 있고, 본 명세서의 방법 청구항의 기술적 특징과 장치 청구항의 기술적 특징이 조합되어 방법으로 구현될 수 있다.

Claims (13)

  1. 비트스트림으로부터 현재 블록의 변환 계수들을 유도하는 단계;
    상기 현재 블록의 변환 계수들에 대한 역변환을 기반으로 상기 현재 블록의 레지듀얼 샘플들을 유도하는 단계; 및
    상기 현재 블록의 레지듀얼 샘플들을 기반으로 상기 현재 블록을 복원하는 단계를 포함하되,
    상기 현재 블록에 대한 복수의 인트라 예측 모드들에 대응하는 복수의 변환 세트들이 각각 유도되고,
    상기 복수의 변환 세트들은 기본 변환 세트와 대체 변환 세트를 포함하고,
    상기 레지듀얼 샘플들은 상기 복수의 변환 세트들 중 어느 하나에 속한 변환 커널 후보를 기반으로 유도되는, 방법.
  2. 제1항에 있어서,
    상기 기본 변환 세트는, 상기 현재 블록의 인트라 예측을 위한 참조 샘플을 특정하는 인트라 예측 모드를 기반으로 선택되고,
    상기 대체 변환 세트는, 상기 현재 블록의 예측 블록 또는 주변 샘플들을 기반으로 유도된 DIPM(Derived Intra Prediction Mode)를 기반으로 선택된, 방법.
  3. 제1항에 있어서,
    상기 기본 변환 세트는, DIMD(Decoder-side Intra Mode Derivation) 방법을 통해 유도된 DIMD 모드들 중 누적된 세기 값이 가장 큰 모드를 기반으로 선택되고,
    상기 대체 변환 세트는, 상기 DIMD 모드들 중 누적된 세기 값이 두 번째로 큰 모드를 기반으로 선택된, 방법.
  4. 제1항에 있어서,
    변환 세트에 속한 복수의 변환 커널 후보들 중 상기 현재 블록에 적용 가능한 변환 커널 후보의 개수는, 상기 현재 블록의 크기, 상기 현재 블록에 관한 슬라이스 타입, 상기 현재 블록의 예측 모드, 또는 상기 현재 블록의 변환 세트가 대체 변환 세트인지 여부 중 적어도 하나에 기초하여 결정되는, 방법.
  5. 제4항에 있어서,
    상기 현재 블록의 너비와 높이의 곱이 제1 값보다 작은 경우, 상기 현재 블록에 적용 가능한 변환 커널 후보의 개수는 0개 또는 1개이고,
    상기 현재 블록의 너비와 높이의 곱이 상기 제1 값보다 크거나 같은 경우, 상기 현재 블록에 적용 가능한 변환 커널 후보의 개수는 2개 또는 3개이고,
    상기 제1 값은 256 또는 512인, 방법.
  6. 제4항에 있어서,
    상기 현재 블록의 너비와 높이의 곱이 제1 값보다 작은 경우, 상기 현재 블록에 적용 가능한 변환 커널 후보의 개수는 0개 또는 2개이고,
    상기 현재 블록의 너비와 높이의 곱이 상기 제1 값보다 크거나 같은 경우, 상기 현재 블록에 적용 가능한 변환 커널 후보의 개수는 1개 또는 3개이고,
    상기 제1 값은 32, 64, 또는 128인, 방법.
  7. 제4항에 있어서,
    상기 현재 블록이 인트라 블록이고 상기 현재 블록의 변환 세트가 대체 변환 세트로 결정되는 경우,
    상기 현재 블록의 너비와 높이의 곱이 제1 값보다 작은 것에 기초하여 상기 현재 블록에 적용 가능한 변환 커널 후보의 개수는 0개이고,
    상기 현재 블록의 너비와 높이의 곱이 상기 제1 값보다 크거나 같은 것에 기초하여 상기 현재 블록에 적용 가능한 변환 커널 후보의 개수는 1개 또는 3개이고,
    상기 제1 값은 32, 64, 128, 256, 또는 512인, 방법.
  8. 제4항에 있어서,
    상기 현재 블록이 인터 블록인 경우,
    상기 현재 블록의 너비와 높이의 곱이 제1 값보다 작은 것에 기초하여 상기 현재 블록에 적용 가능한 변환 커널 후보의 개수는 1개 또는 2개이고,
    상기 현재 블록의 너비와 높이의 곱이 상기 제1 값보다 크거나 같은 것에 기초하여 상기 현재 블록에 적용 가능한 변환 커널 후보의 개수는 3개이고,
    상기 제1 값은 32, 64, 128, 256, 또는 512인, 방법.
  9. 제5항에 있어서,
    상기 제1 값은 구간 설정에 관한 신택스 요소를 기반으로 결정되는, 방법.
  10. 제5항에 있어서,
    상기 제1 값은 기-정의된 고정된 값인, 방법.
  11. 현재 블록의 레지듀얼 샘플들을 유도하는 단계;
    상기 현재 블록의 레지듀얼 샘플들에 대한 변환을 기반으로 상기 현재 블록의 변환 계수들을 유도하는 단계; 및
    상기 현재 블록의 변환 계수들을 부호화하는 단계를 포함하되,
    상기 현재 블록에 대한 복수의 인트라 예측 모드들에 대응하는 복수의 변환 세트들이 각각 유도되고,
    상기 복수의 변환 세트들은 기본 변환 세트와 대체 변환 세트를 포함하고,
    상기 변환 계수들은 상기 복수의 변환 세트들 중 어느 하나에 속한 변환 커널 후보를 기반으로 유도되는, 방법.
  12. 제11항에 따른 방법에 의해 생성된 비트스트림을 저장하는 비-일시적 컴퓨터 판독 가능한 저장 매체.
  13. 영상 정보에 대한 비트스트림을 획득하는 단계; 여기서, 상기 비트스트림은, 현재 블록의 레지듀얼 샘플들을 유도하는 단계, 상기 현재 블록의 레지듀얼 샘플들에 대한 변환을 기반으로 상기 현재 블록의 변환 계수들을 유도하는 단계, 및 상기 현재 블록의 변환 계수들을 부호화하는 단계에 기초하여 획득됨, 및
    상기 비트스트림을 포함한 데이터를 전송하는 단계를 포함하되,
    상기 현재 블록에 대한 복수의 인트라 예측 모드들에 대응하는 복수의 변환 세트들이 각각 유도되고,
    상기 복수의 변환 세트들은 기본 변환 세트와 대체 변환 세트를 포함하고,
    상기 변환 계수들은 상기 복수의 변환 세트들 중 어느 하나에 속한 변환 커널 후보를 기반으로 유도되는, 방법.
PCT/KR2025/009660 2024-07-04 2025-07-04 영상 인코딩/디코딩 방법 및 장치, 그리고 비트스트림을 저장한 기록 매체 Pending WO2026010447A1 (ko)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US202463667797P 2024-07-04 2024-07-04
US63/667,797 2024-07-04

Publications (1)

Publication Number Publication Date
WO2026010447A1 true WO2026010447A1 (ko) 2026-01-08

Family

ID=98318949

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2025/009660 Pending WO2026010447A1 (ko) 2024-07-04 2025-07-04 영상 인코딩/디코딩 방법 및 장치, 그리고 비트스트림을 저장한 기록 매체

Country Status (1)

Country Link
WO (1) WO2026010447A1 (ko)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220162184A (ko) * 2019-04-16 2022-12-07 엘지전자 주식회사 인트라 예측 기반 영상 코딩에서의 변환
KR20240010541A (ko) * 2017-07-04 2024-01-23 삼성전자주식회사 다중 코어 변환에 의한 비디오 복호화 방법 및 장치, 다중 코어 변환에 의한 비디오 부호화 방법 및 장치
WO2024058637A1 (ko) * 2022-09-16 2024-03-21 주식회사 윌러스표준기술연구소 비디오 신호 처리 방법 및 이를 위한 장치

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20240010541A (ko) * 2017-07-04 2024-01-23 삼성전자주식회사 다중 코어 변환에 의한 비디오 복호화 방법 및 장치, 다중 코어 변환에 의한 비디오 부호화 방법 및 장치
KR20220162184A (ko) * 2019-04-16 2022-12-07 엘지전자 주식회사 인트라 예측 기반 영상 코딩에서의 변환
WO2024058637A1 (ko) * 2022-09-16 2024-03-21 주식회사 윌러스표준기술연구소 비디오 신호 처리 방법 및 이를 위한 장치

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
C. BONNINEAU (INTERDIGITAL), K. NASER, S. PURI, F. LE LÉANNEC (INTERDIGITAL): "AHG12: Multiple Transform Set Selection for Intra MTS", 34. JVET MEETING; 20240417 - 20240424; RENNES; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), no. JVET-AH0307 ; m67917, 21 April 2024 (2024-04-21), XP030317790 *
G. J. SULLIVAN (MICROSOFT), J.-R. OHM (CHAIRS): "Meeting Report of the 34th JCT-VC Meeting (Marrakech, 12–18 January 2019)", 34. JCT-VC MEETING; 20190112 - 20190118; MARRAKECH; (JOINT COLLABORATIVE TEAM ON VIDEO CODING OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), no. JCTVC-AH1000, 21 March 2019 (2019-03-21), XP030200752 *

Similar Documents

Publication Publication Date Title
WO2021054796A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021086055A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021206445A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021066598A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021096290A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021066616A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021054798A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021086061A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021010687A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021096293A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021010680A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021086056A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021194221A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021071282A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021096295A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021086050A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021060905A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021137556A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021086064A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021066601A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021141472A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021086149A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021054799A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021141478A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021071283A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 25833531

Country of ref document: EP

Kind code of ref document: A1