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

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

Info

Publication number
WO2024253493A1
WO2024253493A1 PCT/KR2024/007916 KR2024007916W WO2024253493A1 WO 2024253493 A1 WO2024253493 A1 WO 2024253493A1 KR 2024007916 W KR2024007916 W KR 2024007916W WO 2024253493 A1 WO2024253493 A1 WO 2024253493A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
transform
nspt
current block
transformation
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.)
Ceased
Application number
PCT/KR2024/007916
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
Priority to EP24819644.6A priority Critical patent/EP4727125A1/en
Priority to KR1020267000448A priority patent/KR20260035887A/ko
Priority to CN202480042106.XA priority patent/CN121399938A/zh
Priority to MX2025014539A priority patent/MX2025014539A/es
Publication of WO2024253493A1 publication Critical patent/WO2024253493A1/ko
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • 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
    • 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/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • 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
    • 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/124Quantisation
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame 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/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/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/186Methods 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 colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • H04N19/463Embedding additional information in the video signal during the compression process by compressing encoding parameters before transmission
    • 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/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • 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
    • H04N19/625Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using discrete cosine transform [DCT]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

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 data can be effectively compressed and transmitted or stored.
  • the present disclosure seeks to provide a method and apparatus for performing a transformation using a non-separable first-order transformation.
  • the present disclosure seeks to provide a method and apparatus for performing a transform using a reduced-dimensional non-separable first-order transform kernel.
  • the present disclosure provides a method and device for determining/signaling a non-separable transform kernel based on encoding parameters.
  • the video decoding method and device can obtain residual information from a bitstream, derive transform coefficients of a current block based on the residual information, perform at least one of inverse quantization or inverse transformation on the transform coefficients of the current block to derive residual samples of the current block, and reconstruct the current block based on the residual samples of the current block.
  • the inverse transformation can be performed based on at least one of a non-separable transformation or a separable transformation.
  • a non-separable transformation set for the non-separable transformation can be determined based on a mapping table that defines a mapping relationship between pre-defined intra prediction modes and non-separable transformation sets.
  • the number of non-separable transform sets available to the current block can be determined based on whether the current block is a block of the first size.
  • the block of the first size may include a block having different widths and heights or a block having a width-to-height ratio of at least one of 8:1, 1:8, 16:1, or 1:16.
  • one or more first mapping tables applied to blocks of the first size and a second mapping table applied to blocks other than blocks of the first size may be defined, respectively.
  • an input of a mapping table for determining a non-separable transform set of the current block based on whether the current block is a block of a second size may be determined as either an inductive or wide-angle intra prediction (WAIP) mode based on intra prediction mode information signaled from a bitstream.
  • WAIP wide-angle intra prediction
  • the block of the second size may include a block having a width to height ratio of at least one of 2:1, 1:2, 4:1, or 1:4.
  • whether to apply the non-separable transform can be determined based on whether an intra subpartition mode is applied to a coding block to which the current block belongs.
  • whether to apply the non-separable transform can be determined based on the size of the current block.
  • the non-separable transform set for the non-separable transform may have a set index equal to a value obtained by subtracting 65 from the value of the intra prediction mode.
  • the non-separable transform set for the non-separable transform may have a set index equal to a value obtained by subtracting the value of the intra prediction mode from 1.
  • the video encoding method and device can derive residual samples of a current block, derive transform coefficients of the current block by performing at least one of transform or quantization on the residual samples of the current block, and encode the transform coefficients of the current block.
  • the transform can be performed based on at least one of a non-separable transform or a separable transform.
  • a non-separable transform set for the non-separable transform can be determined based on a mapping table that defines a mapping relationship between pre-defined intra prediction modes and non-separable transform sets.
  • 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.
  • a computer-readable digital storage medium storing video/image information generated by a video encoding method according to the present disclosure is provided.
  • a method and device for transmitting video/image information generated by a video encoding method according to the present disclosure are provided.
  • the present disclosure can improve the performance of transformation by using a non-separable primary transformation as a primary transformation.
  • the present disclosure can improve the performance of transformation by performing the transformation using a non-separable first-order transformation kernel of reduced dimension.
  • the present disclosure can improve encoding efficiency by effectively determining and/or signaling a non-separable transform kernel based on encoding parameters.
  • FIG. 1 illustrates a video/image coding system according to the present disclosure.
  • FIG. 2 is a schematic block diagram of an encoding device to which an embodiment of the present disclosure can be applied and in which encoding of a video/image signal is performed.
  • 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.
  • FIG. 4 illustrates an image decoding method performed by a decoding device (300) as an embodiment according to the present disclosure.
  • FIG. 5 exemplarily illustrates an intra prediction mode and its prediction direction according to the present disclosure.
  • FIG. 6 illustrates a schematic configuration of a decoding device (300) that performs an image decoding method according to the present disclosure.
  • FIG. 7 illustrates an image encoding method performed by an encoding device (200) as an embodiment according to the present disclosure.
  • FIG. 8 illustrates a schematic configuration of an encoding device (200) that performs an image encoding method according to the present disclosure.
  • FIG. 9 illustrates an example of a content streaming system to which embodiments of the present disclosure can be applied.
  • first, second, etc. may be used to describe various components, but the components should not be limited by the terms. The terms are only used to distinguish one component from another.
  • the first component could be referred to as the second component, and similarly, the second component could also be referred to as the first component.
  • the term and/or includes any combination of a plurality of related described items or any item among a plurality of related described items.
  • the present disclosure relates to video/image coding.
  • the method/embodiment disclosed in this specification can be applied to a method disclosed in the versatile video coding (VVC) standard.
  • the method/embodiment disclosed in this specification can be applied to a method disclosed in the essential video coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the 2nd generation of audio video coding standard (AVS2) or the next generation video/image coding standard (e.g., H.267 or H.268, etc.).
  • VVC versatile video coding
  • EVC essential video coding
  • AV1 AOMedia Video 1
  • AVS2 2nd generation of audio video coding standard
  • next generation video/image coding standard e.g., H.267 or H.268, etc.
  • video may mean a collection of images over time.
  • a picture generally means a unit representing one image at a specific time, and a slice/tile is a unit that constitutes a part of a picture in coding.
  • a slice/tile may include one or more CTUs (coding tree units).
  • a picture may be composed of one or more slices/tiles.
  • a tile is a rectangular area composed of multiple CTUs within a specific tile column and a specific tile row of a picture.
  • a tile column is a rectangular area of CTUs having a height equal to the height of the picture and a width specified by the syntax requirements of a picture parameter set.
  • a tile row is a rectangular area of CTUs having a height equal to the width of the picture and a width equal to the width of the picture specified by a picture parameter set. While CTUs within a tile may be arranged sequentially according to a CTU raster scan, tiles within a picture may be arranged sequentially according to a tile raster scan.
  • a slice may contain an integer number of complete tiles or an integer number of contiguous complete CTU rows within a picture that may be exclusively contained in a single NAL unit. Meanwhile, a picture may be divided into two or more subpictures. A subpicture may be a rectangular region of one or more slices within a picture.
  • a pixel or pel can mean the smallest unit that constitutes a picture (or image). Also, a 'sample' can be used as a term corresponding to a pixel.
  • a sample can generally represent a pixel or a pixel value, and can represent only a pixel/pixel value of a luminance component, or only a pixel/pixel value of a chroma component.
  • a unit may represent a basic unit of image processing.
  • a unit may include at least one of a specific region of a picture and information related to the region.
  • One unit may include one luma block and two chroma (ex. cb, cr) blocks.
  • a unit may be used interchangeably with terms such as block or area.
  • an MxN block may include a set (or array) of samples (or sample array) or transform coefficients consisting of M columns and N rows.
  • a or B can mean “only A”, “only B”, or “both A and B”. In other words, as used herein, “A or B” can be interpreted as “A and/or B”. For example, as used herein, “A, B or C” can mean “only A”, “only B”, “only C”, or “any combination of A, B and C”.
  • a slash (/) or a comma can mean “and/or”.
  • A/B can mean “A and/or B”.
  • A/B can mean "only A”, “only B”, or “both A and B”.
  • A, B, C can mean "A, B, or C”.
  • At least one of A and B can mean “only A”, “only B” or “both A and B”. Additionally, as used herein, the expressions “at least one of A or B” or “at least one of A and/or B” can be interpreted identically to “at least one of A and B”.
  • At least one of A, B and C can mean “only A”, “only B”, “only C”, or “any combination of A, B and C”. Additionally, “at least one of A, B or C” or “at least one of A, B and/or C” can mean “at least one of A, B and C”.
  • parentheses used in this specification may mean “for example”. Specifically, when it is indicated as “prediction (intra prediction)”, “intra prediction” may be suggested as an example of “prediction”. In other words, “prediction” in this specification is not limited to “intra prediction”, and “intra prediction” may be suggested as an example of “prediction”. In addition, even when it is indicated as “prediction (i.e., intra prediction)", “intra prediction” may be suggested as an example of "prediction”.
  • FIG. 1 illustrates a video/image coding system according to the present disclosure.
  • a video/image coding system may include a first device (source device) and a second device (receiving device).
  • a source device can transmit encoded video/image information or data to a receiving device via a digital storage medium or a network in the form of a file or streaming.
  • the source device may include a video source, an encoding device, and a transmitter.
  • the receiving device may include a receiver, a decoding device, and a renderer.
  • the encoding device may be called a video/image encoding device, and the decoding device may be called a video/image decoding device.
  • the transmitter may be included in the encoding device.
  • the receiver may be included in the decoding device.
  • the renderer may include a display unit, and the display unit may be configured as a separate device or an external component.
  • the video source can obtain the video/image through a process of capturing, compositing, or generating the video/image.
  • the video source can include a video/image capture device and/or a video/image generation device.
  • the video/image capture device can include one or more cameras, a video/image archive containing previously captured video/image, etc.
  • the video/image generation device can include a computer, a tablet, a smart phone, etc., and can (electronically) generate the video/image.
  • a virtual video/image can be generated through a computer, etc., in which case the video/image capture process can be replaced with a process in which related data is generated.
  • the encoding device can encode input video/image.
  • the encoding device can perform a series of procedures such as prediction, transformation, and quantization for compression and coding efficiency.
  • the encoded data (encoded video/image information) can be output in the form of a bitstream.
  • the transmission unit can transmit encoded video/image information or data output in the form of a bitstream to the reception unit of the receiving device through a digital storage medium or a network in the form of a file or streaming.
  • the digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc.
  • the transmission unit can include an element for generating a media file through a predetermined file format and can include an element for transmission through a broadcasting/communication network.
  • the reception unit can receive/extract the bitstream and transmit it to a decoding device.
  • the decoding device can decode the video/image by performing a series of procedures such as inverse quantization, inverse transformation, and prediction corresponding to the operation of the encoding device.
  • the renderer can render the decoded video/image.
  • the rendered video/image can be displayed through the display unit.
  • FIG. 2 is a schematic block diagram of an encoding device to which an embodiment of the present disclosure can be applied and in which encoding of a video/image signal is performed.
  • the encoding device (200) may be configured to include an image partitioner (210), a prediction unit (predictor) 220, a residual processor (residual processor) 230, an entropy encoder (entropy encoder) 240, an adder (adder) 250, a filter (filter) 260, and a memory (memory) 270.
  • the prediction unit (220) may include an inter prediction unit (221) and an intra prediction unit (222).
  • the residual processor (230) may include a transformer (transformer) 232, a quantizer (quantizer) 233, a dequantizer (dequantizer) 234, and an inverse transformer (inverse transformer) 235.
  • the residual processing unit (230) may further include a subtractor (231).
  • the adding unit (250) may be called a reconstructor or a reconstructed block generator.
  • the image segmenting unit (210), the prediction unit (220), the residual processing unit (230), the entropy encoding unit (240), the adding 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 DPB (decoded picture buffer) 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.
  • a coding unit may be split into a plurality of coding units having deeper depths based on a quad tree structure, a binary tree structure, and/or a ternary structure.
  • the quad tree structure may be applied first and the binary tree structure and/or the ternary structure may be applied later.
  • the binary tree structure may be applied before the quad tree structure.
  • the coding procedure according to the present specification may be performed based on the final coding unit that is no longer split.
  • the maximum coding unit may be used as the final coding unit, or, if necessary, the coding unit may be split recursively 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 described below.
  • 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 may represent only a pixel/pixel value of a luminance component, or only a pixel/pixel value of a chroma component.
  • a sample can be used as a term corresponding to a pixel or pel in a picture (or image).
  • the encoding device (200) can generate a residual signal (residual block, residual sample array) by subtracting a prediction signal (prediction block, prediction sample array) output from an inter prediction unit (221) or an intra prediction unit (222) from an input image signal (original block, original sample array), and the generated residual signal is transmitted to a conversion unit (232).
  • a unit that subtracts a prediction signal (prediction block, prediction sample array) from an input image signal (original block, original sample array) within the encoding device (200) may be called a subtraction unit (231).
  • 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 to the current block or CU unit.
  • the prediction unit (220) can generate various information about prediction, such as prediction mode information, as described below in the description of each prediction mode, and transmit the information to the entropy encoding unit (240).
  • the information about 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 the DC mode or the planar mode.
  • the directional mode may include 33 directional modes or 65 directional modes depending on the degree of detail of the prediction direction. However, this is only an example, and a number of directional modes greater or less than that may be used depending on the setting.
  • the intra prediction unit (222) may determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring block.
  • the inter prediction unit (221) can derive a prediction block for a 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 a reference picture including the above temporal neighboring blocks may be called a collocated picture (colPic).
  • the inter prediction unit (221) may configure a motion information candidate list based on the neighboring blocks, and generate information indicating which candidate is used to derive the motion vector and/or reference picture index of the current block. Inter prediction may be performed based on various prediction modes, and for example, in the case of the skip mode and the 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
  • the prediction unit (220) can generate a prediction signal based on various prediction methods described below.
  • the prediction unit can apply intra prediction or inter prediction for prediction of one block, and can also apply intra prediction and inter prediction at the same time. This can be called a 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 the palette mode can be used for content image/video coding such as games, such as screen content coding (SCC).
  • 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 use at least one of the inter prediction techniques described herein.
  • the palette mode can be viewed as an example of intra coding or intra prediction.
  • the sample values within the 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 to generate 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 means a transform obtained from a graph when the relationship information between pixels is expressed as a graph.
  • CNT means 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 equal size, or can be applied to a block of a non-square variable size.
  • the quantization unit (233) quantizes the transform coefficients and transmits them to the entropy encoding unit (240), and the entropy encoding unit (240) can encode the quantized signal (information about the quantized transform coefficients) and output it as a bitstream.
  • the information about the quantized transform coefficients can be called residual information.
  • the quantization unit (233) can rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on the coefficient scan order, and can also generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form.
  • the entropy encoding unit (240) can perform various encoding methods such as exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), etc.
  • the entropy encoding unit (240) can also encode information necessary for video/image restoration (e.g., values of syntax elements, etc.) together or separately in addition to quantized transform coefficients.
  • Encoded information can be transmitted or stored in the form of a bitstream as a unit of a network abstraction layer (NAL).
  • 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.
  • information and/or syntax elements transmitted/signaled from an encoding device to a decoding device may be included in the video/image information.
  • the video/image information may be encoded through the above-described encoding procedure and included in the bitstream.
  • the bitstream may be transmitted through a network or stored in a digital storage medium.
  • the network may include a broadcasting network and/or a communication network
  • the digital storage medium may include various storage media, such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD.
  • the signal output from the entropy encoding unit (240) may be configured as an internal/external element of the encoding device (200) by the transmitting unit (not shown) and/or the storing unit (not shown), or the transmitting unit may be included in the entropy encoding unit (240).
  • the quantized transform coefficients output from the quantization unit (233) can be used to generate a prediction signal. For example, by applying inverse quantization and inverse transformation to the quantized transform coefficients through the inverse quantization unit (234) and the inverse transform unit (235), a residual signal (residual block or residual samples) can be restored.
  • the adding unit (250) can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the inter prediction unit (221) or the intra prediction unit (222). When there is no residual for the target block to be processed, such as when the skip mode is applied, the predicted block can be used as a reconstructed block.
  • the adding unit (250) can be called a reconstructed unit or a reconstructed block generating unit.
  • the generated restoration signal can be used for intra prediction of the next processing target block in the current picture, and can also be used for inter prediction of the next picture after filtering as described below.
  • LMCS luma mapping with chroma scaling
  • the filtering unit (260) can apply filtering to the restoration signal to improve subjective/objective picture quality.
  • the filtering unit (260) can apply various filtering methods to the restoration picture to generate a modified restoration picture and store the modified restoration picture in the memory (270), specifically, in the DPB of the memory (270).
  • the various filtering methods can include deblocking filtering, a sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.
  • the filtering unit (260) can generate various information regarding filtering and transmit it to the entropy encoding unit (240).
  • the information regarding filtering can be encoded in the entropy encoding unit (240) and output in the form of a bitstream.
  • the modified restored picture transmitted to the memory (270) can be used as a reference picture in the inter prediction unit (221).
  • the encoding device can avoid prediction mismatch between the encoding device (200) and the decoding device, and can also improve encoding efficiency.
  • the DPB of the memory (270) can store the modified restored picture to be used as a reference picture in the inter prediction unit (221).
  • the memory (270) can store motion information of a block from which motion information in the current picture is derived (or encoded) and/or motion information of blocks in a picture that has already been restored.
  • the stored motion information can be transferred to the inter prediction unit (221) to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block.
  • the memory (270) can store restored samples of restored blocks in the current picture and transfer them to the intra prediction unit (222).
  • 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) may be configured to include an entropy decoder (310), a residual processor (320), a predictor (330), an adder (340), a filter (350), and a memory (360).
  • the predictor (330) may include an inter prediction unit (331) and an intra prediction unit (332).
  • the residual processor (320) may include a dequantizer (321) and an inverse transformer (321).
  • the entropy decoding unit (310), residual processing unit (320), prediction unit (330), adding unit (340), and filtering unit (350) described above may be configured by one hardware component (e.g., a decoding device chipset or processor) according to an embodiment.
  • the memory (360) may include a DPB (decoded picture buffer) and may be configured by a digital storage medium.
  • the hardware component may further include the memory (360) as an internal/external component.
  • 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 by 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 values of syntax elements required for image restoration and 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 by using information of a syntax element to be decoded and decoding information of surrounding and decoding target blocks or information of symbols/bins decoded in a previous step, and predicts an occurrence probability of a 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 by using information of the decoded symbol/bin for the context model of the next symbol/bin after determining the context model.
  • Information regarding prediction among the information decoded by the entropy decoding unit (310) 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 among the information decoded by the entropy decoding unit (310) 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 the 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 adding 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 scan 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 about 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 one block, and can also apply intra prediction and inter prediction at the same time. This can be called a 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).
  • 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 use at least one of the inter prediction techniques described herein.
  • the 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 signaled and included in the video/image information.
  • the intra prediction unit (331) 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 intra prediction unit (331) may 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 a 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 inter prediction unit (332) can configure a motion information candidate list based on neighboring blocks, and derive a motion vector and/or a 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 the intra prediction unit (331)).
  • the prediction block can be used as the restoration block.
  • the addition unit (340) may be called a restoration unit or a restoration block generation unit.
  • the generated restoration signal may be used for intra prediction of the next processing target block in 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 apply filtering to the restoration signal to improve subjective/objective image quality.
  • the filtering unit (350) can apply various filtering methods to the restoration picture to generate a modified restoration picture, and transmit the modified restoration picture to the memory (360), specifically, the DPB of the memory (360).
  • the various filtering methods can include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.
  • the (corrected) 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 in the current picture is derived (or decoded) 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) may be applied identically or correspondingly to the filtering unit (350), the inter prediction unit (332), and the intra prediction unit (331) of the decoding device (300), respectively.
  • FIG. 4 illustrates an image decoding method performed by a decoding device according to an embodiment of the present disclosure.
  • 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 and inverse transform on the transform coefficients of the current block (S410).
  • the inverse transform can be performed based on at least one of DCT-2, DST-7, or DCT-8.
  • DCT-2, DST-7, DCT-8, etc. can be called a transform type, a transform kernel, or a transform core.
  • the inverse transform may mean a separable transform. However, it is not limited thereto, and the inverse transform may mean a non-separable transform, or may be a concept including 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 applied to a secondary transform by being transformed into an identical/similar form.
  • 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 indicates that transform1 is applied in the horizontal direction and transform2 is applied in the vertical direction.
  • the 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 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 the transform kernel candidate.
  • a non-separable transform can mean a transform or inverse transform based on a non-separable transform matrix. That is, unlike a separable transform that performs horizontal and vertical transforms independently by separating vertical and horizontal transforms, a non-separable transform can perform horizontal and vertical transforms at once.
  • the input data X to the non-separable transformation is as shown in the following mathematical expression 1.
  • 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 pre-defined 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 second transform is used, or a quantization parameter (QP).
  • a prediction mode e.g., intra mode, inter mode, etc.
  • QP quantization parameter
  • the pre-defined intra prediction modes are grouped to correspond to n non-separable transform sets, and each non-separable transform set may include k transform kernel candidates, where 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. For example, for a 4x4 block, n 1 non-separable transformation sets and k 1 transformation kernel candidates may be configured. For a 4x8 block, n 2 non-separable transformation sets and k 2 transformation kernel candidates may be configured. In addition, the number of non-separable transformation sets and the number of transformation kernel candidates included in each non-separable transformation set 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. For example, if a 4x8 or 8x4 block is divided into two 4x4 sub-blocks and a non-separable transform is applied to each sub-block, n 5 non-separable transform sets and k 5 transform kernel candidates may be configured for the upper left 4x4 sub-block, and n 6 non-separable transform sets and k 6 transform kernel candidates may be configured for other 4x4 sub-blocks.
  • the number of inseparable transformation sets and transformation kernel candidates can be configured differently.
  • the syntax element information indicating any one of a plurality of inseparable transformation configurations can be used. For example, if three kinds of inseparable transformation configurations are supported (i.e., n 7 inseparable transformation sets and k 7 transformation kernel candidates, n 8 inseparable transformation sets and k 8 transformation kernel candidates, n 9 inseparable transformation sets and k 9 transformation kernel candidates), the corresponding syntax element can have values of 0, 1, and 2, and the inseparable transformation configuration applied to the current block can be determined according to the value of the signaled syntax element.
  • the number of non-separable transform sets and transformation kernel candidates can be configured differently. For example, when a second-order transform is not applied, a non-separable transform configuration including a set of n 10 non-separable transforms and k 10 transformation kernel candidates can be applied. When a second-order transform is applied, a non-separable transform configuration including a set of n 11 non-separable transforms 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 ranges of QP values can be divided into three or more, and different non-separable transform configurations can be applied for 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 of the 4x4 sub-blocks.
  • 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 the mapping table.
  • the mapping table can define the mapping relationship between the pre-defined intra prediction modes and the non-separable transform sets.
  • the pre-defined intra prediction modes can include two non-directional modes and 65 directional modes.
  • the non-separable transform has a larger transform kernel size than the 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, the separable transform can consider only statistical characteristics existing in the horizontal and/or vertical directions, but the non-separable transform can simultaneously consider statistical characteristics in the two-dimensional space including the horizontal and vertical directions, thereby providing better compression efficiency.
  • the non-directional mode can include the planar mode of number 0 and the DC mode of number 1, and the directional mode can include the intra prediction modes of numbers 2 to 66.
  • this is merely an example, and the present disclosure can also be applied to cases where the number of pre-defined intra prediction modes is different.
  • the pre-defined intra prediction modes can further include intra prediction modes from -14 to -1 and intra prediction modes from 67 to 80.
  • FIG. 5 exemplarily shows intra prediction modes and prediction directions thereof 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. Accordingly, for a vertical mode that is symmetrical with respect to a horizontal mode with respect to mode 34, the input data can be transposed and used. Transposing the input data means that rows in the input data MxN of a two-dimensional block become columns and columns become rows to form NxM data.
  • 16 data forming a 4x4 block can be appropriately arranged to form a 16x1 1-dimensional vector for non-separable transformation.
  • the 1-dimensional vector can be formed in row-major order or in column-major order.
  • the residual samples resulting from the non-separable transformation can be arranged in the above order to form a 2-dimensional block.
  • the input vector can be constructed according to column-major order.
  • Mode 34 can be considered as neither a horizontal mode nor a vertical mode, but in this disclosure, it is classified as belonging to a horizontal mode. That is, for modes -14 to -1 and 2 to 33, the input data alignment method for the horizontal mode, i.e., the row-major order, is used, and for the vertical mode that is symmetrical about mode 34, the input data can be transposed and used.
  • the symmetry between block shapes that are in a transpose relationship with each other i.e., the symmetry between a KxL block and an 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 transformation kernel can be applied to the KxL block and the LxK block.
  • the non-separable transformation 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 transformation 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 pre-determined order to form a one-dimensional vector and perform the corresponding non-separable transformation.
  • mode 34 is applied to the LxK block, a non-separable transformation set can be determined based on mode 34, but the input data can be read in a transposed order to form a one-dimensional vector and perform the corresponding non-separable transformation.
  • a method for determining a non-separable transformation set and a method for organizing input data are described based on a KxL block.
  • the non-separable transformation may be performed based on an LxK block by utilizing the symmetry described above for a KxL block.
  • a block having a width greater than its height may be restricted to be used as a reference block.
  • the symmetry may be restricted not to be utilized in the case of non-square blocks.
  • a non-square block may use a different number of non-separable transformation sets and/or transformation kernel candidates than a square block, and may select a non-separable transformation set using a different mapping table than a square block.
  • mapping table for selecting a set of non-separable transformations is as follows:
  • Table 1 shows an example of allocating non-separable transform sets by intra prediction mode when there are five non-separable transform sets.
  • the value of predModeIntra means the value of the intra prediction mode considering WAIP, and 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 of using five non-separable transform sets, and does not limit the total number of non-separable transform sets for non-separable transforms.
  • the non-separable transform may not be applied to WAIP for compression performance.
  • a non-separable transform set corresponding to adjacent intra prediction modes may be shared.
  • the above non-separable transform set may include a plurality of transform kernel candidates, and any one of the plurality of transform kernel candidates may be selectively used. For this purpose, an index signaled through a bitstream may be used.
  • any one of the plurality of transform kernel candidates may be implicitly determined based on context information of a current block.
  • the context information may mean a size of a current block or whether a non-separable transform is applied to a neighboring block.
  • the size of the current block may be defined by a width, a height, a maximum/minimum value of the width and the height, a sum of the width and the height, or a product of the width and the height.
  • the inverse transformation can be divided into a separable transformation and a non-separable transformation.
  • a separable transformation means performing transformations in the horizontal direction and the vertical direction respectively for a two-dimensional block
  • a non-separable transformation can mean performing a single transformation for samples constituting the entire or a part of a two-dimensional block.
  • a separable transformation it can be expressed as a pair of horizontal transformation and vertical transformation, and in this disclosure, it will be expressed as (horizontal transformation, vertical transformation).
  • 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 may refer to two transform pairs (e.g., (DCT-2, DCT-2)).
  • a non-separable transform applied as a primary transform may be denoted as a Non-Separable Primary Transform (NSPT).
  • NSPT Non-Separable Primary Transform
  • a plurality of 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 plurality of non-separable transform sets is selected according to the intra prediction mode, and the plurality of 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 transform sets available to a current block can be formed from a plurality of pre-defined transform sets.
  • the group of one or more transform 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).
  • a transform set consisting of (DCT-2, DCT-2) be called S 1
  • a transform set consisting of (DST-7, DST-7), (DCT-8, DST-7), (DST-7, DCT-8) and (DCT-8, DCT-8) be called S 2
  • the above-described NSPT set list can include N non-separable transform sets, and the N non-separable transform sets are called S 3,1 , S 3,2 , ..., S 3,N , respectively.
  • N may 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 a current block, the collection may be configured differently depending on the context of the current block.
  • a collection may be formed 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 index that is explicitly signaled.
  • 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 a 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.
  • a transformation kernel of the current block may be determined based on the selected transformation kernel candidate.
  • the selection of one transformation set from the collection may be implicitly performed based on the context of the current block, and the selection of one transformation kernel candidate from the selected transformation set may be performed based on the signaled index.
  • the selection of one transformation set from the collection may be implicitly performed based on the signaled index, and the selection of one transformation kernel candidate from the selected transformation set may be implicitly performed based on the context of the current block.
  • the selection of one transformation set from the collection may be implicitly performed based on the context of the current block, and the selection of one transformation kernel candidate from the selected transformation set may also be implicitly performed based on the context of the current block.
  • the index for selecting the transformation set may not be signaled.
  • the index for indicating the corresponding transformation kernel candidate may not be signaled.
  • an index indicating one of all transformation kernel candidates belonging to the current collection may be signaled.
  • the process of selecting one transformation set from the collection can be omitted. At this time, all transformation sets belonging to the collection can be rearranged considering the priority.
  • a small-length binary code to an index of a small value, such as a truncated unary code
  • different shuffling can be applied to each collection.
  • only some of them can be selectively rearranged.
  • the transformation kernel for the inverse transformation of the current block can be determined based on MTS (Multiple Transform Selection).
  • the MTS according to the present disclosure may use at least one of DST-7, DCT-8, DCT-5, DST-4, DST-1, or IDT (identity transform) as a transform kernel.
  • the MTS according to the present disclosure may further include a transform kernel of DCT-2.
  • a plurality of MTS sets for MTS can be defined. Based on the size of a current block and/or an intra prediction mode, one of the plurality of MTS sets can be determined. For example, in determining one MTS set, 16 transform block sizes can be considered, and for a directional mode, the shape of the transform block and the symmetry between the intra prediction modes can be considered. For the WAIP (Wide Angle Intra Prediction) mode (i.e., -1 to -14 (or -15), 67 to 80 (or 81)), an MTS set corresponding to mode 2 can be applied for modes -1 to -14 (or -15), and an MTS set corresponding to mode 66 can be applied for modes 67 to 80 (or 81). A separate MTS set can be allocated for the MIP (Matrix-based Intra Prediction) mode.
  • MIP Wide Angle Intra Prediction
  • MTS sets according to transform block size and intra prediction mode can be allocated/defined as shown in Table 4 below.
  • Block size Intra prediction mode width height [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
  • Table 4 shows the allocation of MTS sets according to 16 transform block sizes and intra prediction modes.
  • the number of pre-defined MTS sets is 80, and the index indicating one of the 80 MTS sets can have a value from 0 to 79, as shown in Table 4.
  • Table 5 shows transformation kernel candidates included in each MTS set examined in Table 4.
  • Each MTS set can be composed of six transformation kernel candidates.
  • the transformation kernel candidate index has a value of any one of 0 to 5 and can indicate any one of the six transformation kernel candidates.
  • each transformation kernel candidate can be a combination of a horizontal transformation kernel and a vertical transformation kernel for a separate transformation, and 25 transformation kernel candidates having indices of 0 to 24 can be defined.
  • Table 6 is an example of the 25 transform kernel candidates examined in Table 5. Specifically, the horizontal transformation and vertical transformation of the transform kernel candidate are indicated as (horizontal transformation, vertical transformation). For each transform kernel candidate index, the horizontal/vertical transformation when the intra prediction mode is less than 35 may be the opposite of the horizontal/vertical transformation when the intra prediction mode is 35 or more. When the value of the intra prediction mode is 35 or more, a mode symmetrical with respect to mode 34 may be derived, and an MTS set may be selected from Table 4 based on the mode. In addition, the symmetry of the block shape may be additionally considered. When the original transform block has a WxH size, the original transform block may be considered to have a HxW size by symmetrizing it, and an MTS set may be selected from Table 4.
  • the value of the intra prediction mode may be the value of the modified intra prediction mode. That is, as mode values for WAIP, -14 (or -15) to -1 are modified to mode 2, 67 to 80 (or 81) are modified to mode 66, and the remaining modes can be set to the values of the modified intra prediction modes as the values of the original intra prediction modes.
  • the extended modes for WAIP are also configured symmetrically around mode 34, the symmetry around mode 34 can be utilized for all directional modes except for the Planar mode and the DC mode.
  • an MTS set with an index of 72 can be selected, as defined in Table 4.
  • 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 symmetric block size considering the symmetry of the block shape. For example, when the MIP mode is applied for an 8x16 block, the 8x16 block may be regarded as a symmetrical 16x8 block thereto, and an MTS set having an index of 49 may be selected as defined in Table 4.
  • the intra prediction mode may be regarded as the Planar 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 flag may be used to indicate whether the MIP mode is applied in the transpose mode. If the MIP mode is applied to the current block of MxN and the flag indicates application of the transpose mode, the intra prediction mode is regarded as the Planar mode, and the current block of MxN may be regarded as an NxM block. That is, from Table 4, an MTS set corresponding to the block size of NxM and the Planar mode may be selected. As seen in Table 6, if the value of the intra prediction mode is 35 or more, the horizontal transformation and the vertical transformation are swapped, but since the intra prediction mode of the current block is regarded as the Planar mode, the horizontal transformation and the vertical transformation of the transformation kernel candidate may not be swapped.
  • the intra prediction mode is not regarded as the Planar mode, and the current block of MxN may be regarded as an NxM block. That is, from Table 4, an MTS set corresponding to the block size of NxM and the MIP mode may be selected.
  • a transformation kernel candidate selected by a transformation kernel candidate index may be set as a 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 both the width and the height of the current block are 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.
  • the vertical transformation of the selected transformation kernel candidate may be changed to an IDT (identity transformation). If the difference (or the absolute value of the difference) between the value of the intra prediction mode of the current block and the value of the vertical mode is less than or equal to a predetermined threshold, the horizontal transformation of the selected transformation kernel candidate may be changed to an IDT (identity transformation).
  • the threshold can be determined based on the width and height of the current block, as shown in Table 7 below.
  • Threshold width height 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
  • 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.
  • transform kernel candidates composing 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 via a bitstream.
  • a flag indicating whether the MTS set is available/applied (MTS enabled flag or MTS flag) can be signaled, and a 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 contexts) 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 the 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 the transform kernel candidate indices of 0 to 3 may be available. If AbsSum is greater than T2, six transform kernel candidates corresponding to the 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 having 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
  • a CABAC context other than the CABAC context allocated for the MTS flag may be allocated to each bin.
  • a CABAC context may not be allocated to the two bins and bypass coding may be applied.
  • AbsSum is greater than T2
  • the transform kernel candidate index has a value from 0 to 5, so the transform kernel candidate index cannot be expressed with only two bins.
  • the transform kernel candidate index may be expressed by allocating two or more bins, such as truncated binary coding.
  • a CABAC context may be allocated, or bypass coding may be applied without allocating a CABAC context.
  • a CABAC context may be allocated to some of a plurality of bins (e.g., the first bin, or the first and second bins), and bypass coding may be applied to the remaining bins.
  • 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 a current block may include at least one of 1) a process of determining a transformation set of the current block or 2) a process of 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 pre-defined 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 pre-defined 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 pre-defined 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 one transformation kernel candidate (i.e., the current block has one transformation kernel candidate available), the transformation kernel of the current block may be set to the corresponding transformation kernel candidate.
  • the transform set according to the present disclosure may mean the (non-separable) transform set in the aforementioned embodiment 1, or may mean the MTS set in the embodiment 2.
  • the transform set may be defined separately from the (non-separable) transform set in the embodiment 1 or the MTS set in the embodiment 2.
  • the transform set may include one or more specific transform kernels as transform kernel candidates.
  • One specific transform kernel may be defined as a pair of a transform kernel for horizontal transform and a transform kernel for vertical transform, or may be defined as one transform kernel that is equally applied to horizontal and vertical transforms.
  • 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 as a one-dimensional vector and configured as an input.
  • ROI Region Of Interest
  • a primary transform coefficient can be obtained.
  • a one-dimensional vector output can be obtained.
  • the non-separable transform kernel for NSPT may have a matrix dimension 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 NSPT is applied to a residual generated by intra prediction, can be adaptively determined according to the intra prediction mode. Since the statistical characteristics of the residual block can vary depending on the intra prediction mode, the compression efficiency can be improved by adaptively determining the NSPT kernel according to the intra prediction mode.
  • the non-separable transform set can be determined based on the intra prediction mode of the current block and the mapping table.
  • the mapping table can define a mapping relationship between the pre-defined intra prediction modes and the 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 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).
  • an intra prediction group may include modes having symmetry.
  • directional modes may be symmetrical with respect to the diagonal mode (i.e., intra prediction mode 34) of FIG. 5 described above.
  • two modes having symmetry may form one group (or pair).
  • modes 18 and 50 may be included in the same group because they are symmetrical with respect to mode 34.
  • a process of transposing a 2D input block and then forming a one-dimensional input vector may be added before applying the forward NSPT kernel.
  • a 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 it is and reading the input block in the column-first order.
  • Table 8 illustrates an example of an allocation mapping table for 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 from -14 to -1 and modes from 67 to 80 in Fig. 5
  • 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, 4, etc.
  • a kernel applied to a current block among one or more NSPT kernels included in the NSPT set may be signaled using an index.
  • the index may be referred to as an NSPT index.
  • 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 When the NSPT flag value is 1, NSPT may be applied. When the NSPT flag value is 0, NSPT may not be applied. When the NSPT flag is not signaled, the NSPT flag value may be inferred as 0. As an example, when 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., binarization method), a truncated unary binarization, a truncated binarization, and a fixed-length binarization method can be used.
  • the candidates can be specified by two bins.
  • the first, second, and third candidates can be binarized to 0, 10, and 11, respectively, and signaled.
  • 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 the row priority (or column priority).
  • 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 length, N is the height length)
  • 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 a dimension of 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 work 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 transform matrix
  • MN represents the number of columns of the transform matrix.
  • the value of r can be set to be less than or equal to MN. That is, the existing forward NSPT transform matrix includes MN rows, and each row is a 1 x MN row vector, which is a transform basis vector of the corresponding NSPT transform 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 configured by selecting r transformation basis vectors, which are some of the transformation basis vectors constituting the MN x MN forward NSPT kernel.
  • the transformation kernel can be referred to as a transformation type and a transformation matrix
  • the non-separable transformation 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 transformation basis vectors that are most important from the viewpoint of coding performance. Specifically, in terms of energy compaction through transformation, more energy can be concentrated on the transformation coefficients that appear first by multiplying the forward NSPT transformation matrix.
  • the transformation basis vectors located on the upper side of the forward NSPT transformation matrix can generate transformation coefficients having larger energy.
  • the r x MN forward RPT kernel can be configured (or derived) by taking r from the upper side of the forward NSPT kernel.
  • the RPT according to the present disclosure takes only a part (i.e., r) of the transform coefficients obtained by applying the existing NSPT, which may result in a loss of a part of the energy of the original signal. That is, distortion may occur between the original signal and the original signal through the process. Nevertheless, by applying the RPT, since only r transform coefficients are generated instead of MN, the amount 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 part of the transform coefficients obtained by applying the existing NSPT
  • the reverse 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 expression 4.
  • x and y can be MN x 1 column vectors.
  • G can have the form of 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. That is, 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.
  • MN sample signals i.e., MN sample signals
  • an RPT structure that defines an r value considering the statistical characteristics of a residual block, and derives a residual block of an existing transform block size from a residual block of a reduced size determined according to the defined r value. If an additional transformation (i.e., a secondary transform) is applied to predict a statistical distribution of primary transform coefficients, quantized non-zero coefficients may be concentrated in a relatively low frequency region since a quantization process is applied to the primary transform coefficients. Accordingly, a reduced secondary transform for statistical distribution of primary transform coefficients can define the statistical characteristics of primary transform coefficients relatively simply in the form of setting an r value for a given low frequency region.
  • a secondary transform for statistical distribution of primary transform coefficients can define the statistical characteristics of primary transform coefficients relatively simply in the form of setting an r value for a given low frequency region.
  • the RPT is a technique for defining an r value considering the statistical characteristics of samples in a residual block that have very different characteristics from the distribution of primary transform coefficients, and thus has a fundamental difference from the reduced secondary transform.
  • the RPT kernel which is a reduced-dimensional transformation matrix. In other words, we describe below a method for determining or defining the r value in the RPT.
  • memory usage can be considered as a measure of worst-case complexity.
  • memory usage and/or number of multiplications per sample can be considered as a measure of worst-case complexity. For example, if the maximum possible number of multiplications per sample is set to 16 for a 16x16 block, and the memory usage is set to 8KB or less per kernel (kernel coefficients are expressed in 1 byte), then 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 according to the size of the block.
  • the RPT kernel may be variably determined according to 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 about inter/intra prediction, intra prediction mode information, etc.
  • the r value may be determined based on signaled information (value of a syntax element).
  • the r value may be variably determined according to 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 the signaled information.
  • r transform coefficients can be obtained.
  • the obtained r transform coefficients can be arranged according to a scan order of the predefined transform coefficients (e.g., forward/backward zig-zag scan order, forward/backward horizontal scan order, forward/backward vertical scan order, forward/backward diagonal scan order, a scan order specified based on an intra prediction mode, etc.).
  • the transform coefficients obtained from the forward RPT application are arranged according to such a scan order (e.g., a scan order per coefficient group (CG) unit can also be applied), if the value of r is smaller than MN, the inside of the M x N block cannot be completely filled with the r transform coefficients, and thus a blank space may be generated.
  • a scan order e.g., a scan order per coefficient group (CG) unit can also be applied
  • CG scan order per coefficient group
  • the values of empty spaces can be filled using the values of available surrounding pixels.
  • the values of empty spaces can be filled based on the values of available surrounding pixels and the intra prediction mode.
  • the values of empty spaces can be predicted by performing intra prediction based on the values of available surrounding pixels and the intra prediction mode.
  • the empty space values can be filled in from available surrounding pixels using a predefined intra prediction mode (e.g., planar mode).
  • a predefined intra prediction mode e.g., planar mode
  • filling in the blank 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 blank 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 corresponding blank space, it may be considered that the RPT is not applied. In this case, signaling (or parsing) for a flag indicating whether to apply the RPT 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 corresponding blank 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 to apply RPT can be determined depending on the size and/or shape of a block.
  • the RPT kernel can be variably determined depending on the size and/or shape of the block. Since the r value can be different depending on the size and/or shape of the block (i.e., for each M x N block), the empty space can be different depending on the size and/or shape of the block. Accordingly, the area for checking whether a non-zero transform coefficient is detected depending on the size and/or shape of the block can be defined differently. In other words, the zero-out area can 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 4x4 sub-blocks (i.e., the upper right, lower left, and lower right sub-blocks), which are empty spaces, 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 a plurality of RPT kernel candidates may not be signaled.
  • non-zero RPT transform coefficients may be filled only for two CGs in the scan order.
  • the RPT transform coefficients may 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 may be determined as the remaining area excluding the two 4x4 sub-blocks.
  • the RPT kernel may be variably determined depending on the size and/or shape of the block, and as discussed above, the empty space may be determined differently for an 8x8 block and a 16x8 block.
  • the flag and/or index related to the RPT may not be signaled if it is detected that non-zero transform coefficients exist in CGs belonging to the empty space. That is, the transform coefficients within the CG may be scanned in a specified order for each CG, 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.
  • the conventional image compression technology since a flag for whether a non-zero transform coefficient exists within each CG is signaled first, whether to apply the RPT can be determined based on the information alone, which can reduce the signaling overhead and the related implementation complexity.
  • RPT may not be applied. In this case, signaling for information related to RPT may be omitted. However, since it is not possible to determine whether RPT is applied if a non-zero transform coefficient is not detected in the empty space area, the flag indicating whether RPT is applied may be parsed after parsing (or signaling) the related transform coefficients to finally determine 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 a region where the generated transform coefficients are located in an M x N block.
  • the region or a part of the region may be referred to as an ROI in terms of the forward secondary transform.
  • the backward secondary transform may be applied first and then the backward RPT may be applied.
  • a region or a part of the region 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 generated 16 transform coefficients may be located in the upper left 4x4 sub-block, and the sub-block region may be set as an ROI and the forward secondary transform may be applied to the ROI.
  • the RPT kernel can adjust the coefficient values considering operations such as integer operations or fixed-point operations. That is, the RPT kernel can be configured to perform a transformation through integer operations (or fixed-point operations) in a practical codec system by appropriately scaling the kernel coefficients belonging to the kernel, rather than a theoretical orthogonal transformation or non-orthogonal transformation (wherein, the orthogonal transformation and the non-orthogonal transformation represent transformations in which the norm of each transformation basis vector is 1).
  • the scaling factor multiplied can be equally reflected when applying the RPT.
  • a separable transformation or a non-separable transformation can be performed while maintaining other processes (e.g., quantization and dequantization processes) other than the transformation.
  • Integer coefficients of the RPT kernel can be obtained by multiplying the transformation basis vector by the scaling value described above.
  • multiplying the scaling value may include applying operations such as rounding, flooring, and ceilinging to each kernel coefficient. That is, the integerized RPT kernel obtained through the above-described method is defined and can be used in the transformation/inverse transformation process.
  • the maximum and minimum values can be obtained for all kernel coefficients, so that the number of bits that can express all kernel coefficients can be obtained from the maximum and minimum values. For example, if the maximum value is less than or equal to 127 and the minimum value is greater than or equal to -128, all integer kernel coefficients can be expressed with 8 bits (in particular, through 2's complement representation, etc.).
  • all integer kernel coefficients can be represented with N bits. If the maximum is greater than (2 (N-1) - 1) or the minimum is less than -2 (N-1) , then not all integer kernel coefficients can be represented with N bits. In this case, 1) all kernel coefficients can be additionally multiplied by a scaling factor to fit within the N-bit range, or 2) the number of bits required to represent the kernel coefficients can be increased (i.e., more than N+1 bits).
  • All kernel coefficients can be expressed as 8-bit, 9-bit, 10-bit, etc. using the method described above.
  • the scaling value of the kernel coefficients can be set differently for each block size or kernel, and the number of bits for expressing the kernel coefficients can be set differently.
  • the above-described NSPT can be applied based on at least one of the size, tree type, or component type of the current block. For example, whether to apply the NSPT can be determined based on at least one of the size, tree type, or component type of the current block.
  • An NSPT index can be signaled based on at least one of the size, tree type, or component type of the current block.
  • An NSPT set or an NSPT kernel can be derived based on at least one of the size, tree type, or component type of the current block.
  • Allowed transform block sizes defined in the decoding device can be broadly divided into two groups.
  • One of the two groups (hereinafter referred to as the first group) may mean a set of block sizes to which NSPT can be applied.
  • the first group may be composed of one of the allowed transform block sizes, or may be composed of two or more block sizes among the allowed block sizes.
  • the block size to which NSPT can be applied may be defined as a block size in which at least one of the width and the height is less than or equal to a predetermined threshold.
  • the block size to which NSPT can be applied may be defined as a block size in which the product of the width and the height is less than or equal to a predetermined threshold.
  • the block size to which NSPT can be applied may be defined as a block size in which the maximum value of the width and the height is less than or equal to a predetermined threshold.
  • the threshold may be an integer of 4, 8, 16, 32, 64, 128, or higher.
  • the other of the above two groups may mean a set of block sizes to which NSPT is not applied.
  • the above-described separable primary transformation may be applied to the block sizes belonging to the second group.
  • a non-separable secondary transformation may be applied to all or part of the block sizes belonging to the second group.
  • the reverse NSPT can be applied to the (dequantized) transform coefficients of the current block.
  • the reverse separable primary transform can be applied to the (dequantized) transform coefficients of the current block.
  • the reverse non-separable secondary transform e.g., low frequency non-separable transform, LFNST
  • the reverse separable primary transform e.g., DCT-2
  • the first group which is a set of block sizes to which NSPT can be applied, can be defined as a set of 4x4, 4x8, 8x4, 8x8.
  • the first group can be defined as a set of 4x8, 8x4, 8x8.
  • the first group can be defined as a set of 4x8, 8x4.
  • the first group can be defined as a set of 4x4, 4x8, 4x16, 8x4, 8x8, 16x4.
  • the first group can be defined as a set of 4x8, 4x16, 8x4, 8x8, 16x4.
  • the first group can be defined as a set of 4x8, 4x16, 8x4, 16x4.
  • 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 the set of 4x4, 4x8, 8x4, 8x8, 8x16, 16x8, 16x16, 16x32, 32x16.
  • the first group can be defined as the set of 4x8, 8x4, 8x8, 8x16, 16x8, 16x16, 16x32, 32x16.
  • the first group can be defined as the set of 4x8, 8x4, 8x16, 16x8, 16x16, 16x32, 32x16.
  • the first group can be defined as the set of 4x8, 8x4, 8x16, 16x8, 16x32, 32x16.
  • the first group can be defined as a set of 4x4, 4x8, 4x16, 8x4, 16x4.
  • the first group can be defined as a set of 4x4, 4x8, 4x16, 8x4, 8x8, 8x16, 16x4, 16x8.
  • the first group can be defined as a set of 4x8, 4x16, 8x4, 8x8, 8x16, 16x4, 16x8.
  • the first group can be defined as a set of 4x4, 4x8, 4x16, 8x4, 8x16, 16x4, 16x8.
  • the first group can be defined as the set of 4x8, 4x16, 8x4, 8x16, 16x4, 16x8.
  • the first group can be defined as the set of 4x4, 4x8, 4x16, 8x4, 8x8, 8x16, 16x4, 16x8, 16x16.
  • the first group can be defined as the set of 4x8, 4x16, 8x4, 8x8, 8x16, 16x4, 16x8, 16x16.
  • the first group can be defined as the 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 the 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 a reverse transformation matrix
  • the PxQ matrix represents a matrix in which the number of rows and the number of columns are P and Q, respectively.
  • an NSPT matrix of 16x16 may be applied.
  • an NSPT matrix of 32x20 may be applied.
  • an NSPT matrix of 64x24 may be applied.
  • an NSPT matrix of 64x32 may be applied.
  • an NSPT matrix of 128x40 may be applied.
  • an NSPT matrix of 256x44 may be applied.
  • an NSPT matrix of 128x36, 128x38, or 128x40 may be applied.
  • an NSPT matrix of 256x48 can be applied.
  • an NSPT matrix of 512x52 or 512x54 can be applied.
  • a Px1 output vector can be obtained by applying the PxQ matrix to the 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 the NSPT is applied.
  • the value of Q may mean the number of transform coefficients to which the 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.
  • the value of Q may be set to be the same 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 a transpose matrix of the PxQ matrix.
  • a QxP output vector can be obtained by applying the QxP matrix to the 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 the 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 induced through the NSPT.
  • the value of Q can mean the number of transform coefficients output through the 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.
  • 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, 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 NSPT can be applied to 8x16 blocks and 16x8 blocks, or NSPT can be applied to 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 the transpose operation is performed on the corresponding input block only for the ROI region by utilizing symmetry.
  • NSPT the transpose operation is performed on the entire block by utilizing symmetry. Therefore, in the case of NSPT, the corresponding NSPT kernel can be trained and applied by utilizing a more sophisticated symmetry, so performance improvement can be expected.
  • a 32x64 transformation matrix can be applied instead of a 16x64 transformation matrix from the perspective of forward transformation.
  • 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, and 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 component and chroma component 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 can be signaled, and the luma and chroma components of the current block can share the NSPT index.
  • the NSPT index can be an index for selecting any one of the transformation kernel candidates for the 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 can 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 luma component and the chroma component have independent partitioning and encoding structures. In this case, by signaling the NSPT index for each component, the characteristics of each component can be reflected and compression efficiency can be improved.
  • 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 an intra prediction mode of a current block or a block shape symmetrical to a 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 an intra prediction mode of a current block or a block shape symmetrical to a 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 a bitstream or can be derived based on the aforementioned symmetry.
  • Modes 2 to 66 may be named normal directional modes (which may be expressed as [2, 66]), and modes -14 to -1 (which may be expressed as [-14, -1]) and modes 67 to 80 (which may be expressed as [67, 80]) may be named wide directional modes.
  • the wide directional mode 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 mode 0 and mode 1 are symmetrical with respect to 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, the NSPT index, or the NSPT kernel. That is, at least one of the NSPT set, the NSPT index, or the NSPT kernel for one of the symmetric modes can be applied equally to another 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.
  • a 1D vector can be constructed in the row-first order for the MxM block, which is the input data, and the NSPT kernel can be applied to the 1D vector.
  • the construction of the 1D vector in the row-first order can be done by reading the input data from the MxM block, which is the input data, in units of rows, obtaining M columns, and arranging them in order to construct the 1D vector.
  • a 1D vector can be constructed in the column-first order and the same NSPT kernel can be applied to the 1D vector.
  • the configuration of the 1D vector according to the column-first order may be to read the input data in units of columns from the MxM block, which is the input data, to obtain M columns, and to sequentially arrange them to configure a 1D vector.
  • the 1D vector may be configured in the column-first order for the (66 - x) mode that is symmetric to the x-th mode, and the same NSPT kernel as that of 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.
  • non-square blocks in addition to the symmetry between intra prediction modes, symmetry between block shapes may be further considered.
  • a non-square block whose width and height are M and N, respectively, can be viewed as having a symmetry relationship with a non-square block whose width and height are N and M, respectively.
  • the xth 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 the column-major order is applied to the x-th mode, the row-major order can be applied to the mode that is symmetric to it. Alternatively, if the row-major order is applied to the x-th mode, the column-major order can be applied to the mode that is symmetric to it. Specifically, if the column-major order is applied to the x-th mode, the input data can be read from the MxN block of input data in units of columns to obtain M columns, which can be arranged in order to construct a 1D vector. Here, each column can have a length of N.
  • the input data can be read from the MxN block of input data in units of rows to obtain N rows, which can be arranged in order to construct a 1D vector.
  • each row can have a length of M.
  • the input data can be read from the MxN block of input data in units of rows to obtain N rows, which can be arranged in order to construct a 1D vector.
  • each row can have a length of M.
  • input data can be read column by column from the MxN block of input data to obtain M columns, and these can be arranged in order to form a 1D vector.
  • each column can have a length of N.
  • the NSPT set and/or the NSPT kernel of the current block can be determined based on at least one of an intra prediction mode symmetric to the x mode or a block size of NxM symmetric to the block size of MxN.
  • the NSPT kernel can be set as the NSPT kernel for the NxM block, not the NSPT kernel for the MxN block. That is, if the symmetry is utilized for the current block, the NSPT set and/or the NSPT kernel for the block having symmetry with the current block can be utilized in the same manner.
  • a 1D vector can be constructed from an input data block according to a predetermined priority order, and this can correspond to the 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, the 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, the 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.
  • the number of available NSPT sets may be different. For example, if symmetry is utilized, the number of available NSPT sets may be 35, and if symmetry is not utilized, the number of available NSPT sets may be 67.
  • Table 9 shows an example of how the NSPT set is determined using symmetry, and shows the mapping relationship between intra prediction modes and NSPT sets 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 can 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 or equal to 0 and less than or equal to 34, the NSPT set of the current block can be determined as the NSPT set having the NSPT set index of X among the 35 NSPT sets.
  • the NSPT set of the current block can be determined as the NSPT set having the NSPT set index of (68-X) among the 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 an 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 shows an example in which the NSPT set is determined without using symmetry, and shows the mapping relationship between intra prediction modes and NSPT sets 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 can be determined as the NSPT set having the NSPT set index of 2 among the 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 can be determined as the NSPT set having the NSPT set index of X among the 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 can be determined as the NSPT set having the NSPT set index of 66 among the 67 NSPT sets.
  • the memory size required for storing the transformation kernel can be saved while maintaining the performance according to the transformation application. For example, if 35 NSPT sets are used instead of 67 NSPT sets by utilizing the symmetry, the memory size required for storing the NSPT kernel 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 4x8 blocks and 8x4 blocks may be 19, and the number of available NSPT sets for 8x8 blocks may be 10.
  • the NSPT set for a 4x4 block may consist of three NSPT kernel candidates
  • the NSPT sets for 4x8 blocks and 8x4 blocks 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. Accordingly, by reducing the number of available NSPT sets and/or the number of NSPT kernel candidates belonging to the NSPT set, the memory size required for storing the transform kernel can be saved. In addition, as the block size increases, the residual signal characteristics within the corresponding block tend to become more generalized. Therefore, reducing the number of available NSPT sets and/or the number of NSPT kernel candidates belonging to the NSPT set can help maintain compression efficiency while reducing the implementation complexity by reflecting these statistical characteristics.
  • the NSPT kernel can be configured with 8-bit precision.
  • the range of the coefficients in the NSPT kernel can be greater than or equal to -128 and less than or equal to 127. If the precision is increased to more than 8 bits, the result obtained through matrix multiplication can be shifted to the right by the increased precision. For example, if the value obtained after matrix multiplication based on the NSPT kernel with 8-bit precision is shifted to the right by S bits and stored in the buffer, if the coefficients of the kernel are configured with N-bit precision, they can be shifted to the right by (S+(N-8)) bits and stored in the buffer.
  • the size of the NSPT kernel (or NSPT matrix) can be expressed as MN x r.
  • MN can mean the product of the width and the height of the current block. This can mean the output length of the NSPT or the number of residual samples generated by the NSPT.
  • r can mean the input length of the NSPT or the number of (inverse quantized) transform coefficients to which the NSPT is applied. r can be an integer greater than or equal to 0 and less than or equal to MN. The following is an example of the NSPT matrix of MN x r according to the block size.
  • the NSPT matrix for a 4x4 block can be composed of a 16x16 matrix.
  • the NSPT matrix for a 4x8 block and an 8x4 block can be composed of a 32x20 matrix, a 32x16 matrix, a 32x24 matrix, a 32x28 matrix, or a 32x32 matrix.
  • the NSPT matrix for an 8x8 block can be composed of a 64x16 matrix, a 64x24 matrix, a 64x32 matrix, a 64x40 matrix, a 64x48 matrix, a 64x56 matrix, or a 64x64 matrix.
  • the NSPT matrix for a 4x16 block and a 16x4 block can be composed of a 64x16 matrix, a 64x24 matrix, a 64x32 matrix, a 64x40 matrix, a 64x48 matrix, a 64x56 matrix, or a 64x64 matrix.
  • the NSPT matrix for 8x16 blocks and 16x8 blocks can be a 128x96 matrix, a 128x64 matrix, a 128x48 matrix, or a 128x32 matrix.
  • the NSPT matrix for 16x16 blocks can be a 256x128 matrix, a 256x96 matrix, or a 256x64 matrix.
  • the NSPT matrix for 16x32 blocks and 32x16 blocks can be a 512x256 matrix or a 512x128 matrix.
  • the NSPT matrix for 32x32 blocks can be a 1024x512 matrix, a 1024x256 matrix, or a 1024x128 matrix.
  • a 16x16 matrix can be applied for 4xN blocks and Nx4 blocks, where N can be an integer greater than or equal to 4.
  • a 64x16 matrix can be applied for 8x8 blocks.
  • a 64x32 matrix can be applied for 8xN blocks and Nx8 blocks, where N can be an integer greater than or equal to 16.
  • a 96x32 matrix can be applied for 16xN blocks and Nx16 blocks, where N can be an integer greater than or equal to 16.
  • the value of r in the NSPT matrix of MN x r may be determined according to a predetermined criterion.
  • the criterion may be (1) ensuring that the sum of the amount of computation for the first transformation and the amount of computation for the second transformation is below a certain level, and (2) ensuring that the number of multiplications per sample required for the NSPT operation is below a certain number.
  • a separate linear transformation is performed on an MxN block by matrix multiplication, (M+N) multiplications are required per sample to perform the linear transformation.
  • LFNST is applied to a certain ROI (Region-Of-Interest) area, assuming that the LFNST matrix of the reverse transformation is a PxQ matrix, (P*Q)/(M*N) multiplications are required per sample.
  • a PxQ matrix can mean a matrix in which the number of rows is P and the number of columns is Q.
  • the value of r that ensures that the number of multiplications per sample for applying NSPT is less than or equal to the number of multiplications per sample for applying DCT-2 transform and LFNST can be determined as follows.
  • the value of r in the NSPT matrix by block size can be set as follows.
  • mathematical expression 6 if the value of (P*Q)/(M*N) is not an integer, an integer close to the value of (P*Q)/(M*N) can be used.
  • a floor operation can be applied to the value of (P*Q)/(M*N).
  • r can be set to (M + N + floor((P*Q)/(M*N))).
  • floor(x) can mean the largest integer that does not exceed x.
  • a round operation can be applied to the value of (P*Q)/(M*N).
  • r can be set to (M + N + round((P*Q)/(M*N))).
  • round(x) can mean a rounded value of x.
  • a ceil operation can be applied to the value of (P*Q)/(M*N).
  • r can be set to (M + N + ceil((P*Q)/(M*N))).
  • ceil(x) can mean the smallest integer greater than or equal to x.
  • the maximum value of r is 24. However, the value of r must be less than or equal to 16, so the value of r can be set to 16.
  • the maximum value of r is 20.
  • the value of r can be set to 20.
  • the maximum value of r is 32.
  • the value of r can be set to 32.
  • the maximum value of r is 24.
  • the value of r can be set to 24.
  • the maximum value of r is 40.
  • the value of r can be set to 40.
  • the maximum value of r is 44.
  • the value of r can be set to 44.
  • the maximum value of r is 54.
  • the value of r can be set to 54.
  • the maximum value of r is 67.
  • the value of r can be set to 67.
  • the maximum value of r is 38.
  • the value of r can be set to 38.
  • the value of r can be set to 20.
  • the maximum value of r is 48.
  • the value of r can be set to 48.
  • the value of r can be set to 24.
  • the value of r is not a multiple of 4.
  • SIMD Single Instruction Multiple Data
  • the value of r can be set to 52 or 56 instead of 54.
  • the value of r can be set to 64 or 68 instead of 67.
  • the value of r can be set to 36 or 40 instead of 38.
  • the value of r can be set to be a multiple of K, where K can be an integer greater than or equal to 1.
  • K can be an integer greater than or equal to 1.
  • the value of r can be set to be a multiple of K that satisfies the inequality in the following mathematical expression (7).
  • func() can be floor, round, or ceil as described above.
  • the value of r according to the above-mentioned predetermined criterion is for the case where zero-out is not considered. That is, when forward LFNST is applied, the primary transformed transform coefficients of the remaining areas except for the area where LFNST is applied are zeroed out, so the actual amount of calculation required to apply DCT-2 and LFNST may be less than the above-mentioned amount of calculation. Therefore, when the above-mentioned zero-out is considered, the value of r may be set to a value smaller than the value of r according to the above-mentioned predetermined criterion.
  • the value of r can be set to a value less than or equal to 16.
  • zero-out can be performed on the remaining areas except for the upper left 4x4 block based on the forward transform, and a 16x16 matrix, which is the forward LFNST matrix, can be applied to the upper left 4x4 block.
  • the value of r when replacing the separable linear transform and LFNST with NSPT, the value of r can be set to a value less than or equal to 16, which is the sum of the number of sample-wise multiplications in the separable linear transform and the number of sample-wise multiplications in the LFNST. Since the same amount of computation is required when applying the reverse separable first-order transform and LFNST, the value of r can be set to a value less than or equal to 16.
  • zero-out can be performed on the remaining areas except for the upper left 4x4 block based on the forward transform, and a 16x16 matrix, which is the forward LFNST matrix, can be applied to the upper left 4x4 block.
  • the value of r when replacing the separable linear transform and LFNST with NSPT, the value of r can be set to a value less than or equal to 14, which is the sum of the number of sample-wise multiplications in the separable linear transform and the number of sample-wise multiplications in the LFNST. Since the same amount of computation is required when applying the reverse separable first-order transform and LFNST, the value of r can be set to a value less than or equal to 14.
  • zero-out may not be performed for the separable primary transform, in which case the value of r may be set to a value less than or equal to 32.
  • zero-out can be performed on the remaining areas except for the upper left 8x8 block based on the forward transform, and a 64x32 matrix, which is the forward LFNST matrix, can be applied to the upper left 8x8 block.
  • the value of r when replacing the separable linear transform and LFNST with NSPT, the value of r can be set to a value less than or equal to 32, which is the sum of the number of sample-wise multiplications in the separable linear transform and the number of sample-wise multiplications in the LFNST. Since the same amount of computation is required when applying the reverse separable primary transform and LFNST, the value of r can be set to a value less than or equal to 32.
  • zero-out can be performed on the remaining areas except for the upper left 8x8 block based on the forward transform, and a 64x32 matrix, which is the forward LFNST matrix, can be applied to the upper left 8x8 block.
  • the value of r when replacing the separable linear transform and LFNST with NSPT, the value of r can be set to a value less than or equal to 28, which is the sum of the number of sample-wise multiplications in the separable linear transform and the number of sample-wise multiplications in the LFNST. Since the same amount of computation is required when applying the reverse separable first-order transform and LFNST, the value of r can be set to a value less than or equal to 28.
  • zero-out can be performed on the remaining areas except for the upper left 12x12 block based on the forward transform, and a 96x32 matrix, which is the forward LFNST matrix, can be applied to the upper left 12x12 block.
  • the value of r when replacing the separable linear transform and LFNST with NSPT, the value of r can be set to a value less than or equal to 33, which is the sum of the number of sample-wise multiplications in the separable linear transform and the number of sample-wise multiplications in the LFNST. Since the same amount of computation is required when applying the reverse separable first-order transform and LFNST, the value of r can be set to a value less than or equal to 33.
  • zero-out can be performed on the remaining areas except for the upper left 4x4 block based on the forward transform, and a 16x16 matrix, which is the forward LFNST matrix, can be applied to the upper left 4x4 block.
  • the value of r when replacing the separable linear transform and LFNST with NSPT, the value of r can be set to a value less than or equal to 12, which is the sum of the number of sample-wise multiplications in the separable linear transform and the number of sample-wise multiplications in the LFNST. Since the same amount of computation is required when applying the reverse separable primary transform and LFNST, the value of r can be set to a value less than or equal to 12.
  • zero-out can be performed on the remaining areas except for the upper left 4x4 block based on the forward transform, and a 16x16 matrix, which is the forward LFNST matrix, can be applied to the upper left 4x4 block.
  • the value of r when replacing the separable linear transform and LFNST with NSPT, the value of r can be set to a value less than or equal to 9, which is the sum of the number of sample-wise multiplications in the separable linear transform and the number of sample-wise multiplications in the LFNST. Since the same amount of computation is required when applying the reverse separable first-order transform and LFNST, the value of r can be set to a value less than or equal to 9.
  • zero-out can be performed on the remaining areas except for the upper left 4x4 block based on the forward transform, and a 16x16 matrix, which is the forward LFNST matrix, can be applied to the upper left 4x4 block.
  • the value of r when replacing the separable linear transform and LFNST with NSPT, the value of r can be set to a value less than or equal to 10, which is the sum of the number of sample-wise multiplications in the separable linear transform and the number of sample-wise multiplications in the LFNST. Since the same amount of computation is required when applying the reverse separable first-order transform and LFNST, the value of r can be set to a value less than or equal to 10.
  • zero-out can be performed on the remaining areas except for the upper left 4x4 block based on the forward transform, and a 16x16 matrix, which is the forward LFNST matrix, can be applied to the upper left 4x4 block.
  • the value of r can be set to a value less than or equal to 6.5.
  • the value of r is a value that constitutes the matrix dimension, so it can be set to an integer of 6 or 7 instead of 6.5.
  • zero-out can be performed on the remaining areas except for the upper left 8x8 block based on the forward transform, and a 64x32 matrix, which is the forward LFNST matrix, can be applied to the upper left 8x8 block.
  • zero-out can be performed on the remaining areas except for the upper left 8x8 block based on the forward transform, and a 64x32 matrix, which is the forward LFNST matrix, can be applied to the upper left 8x8 block.
  • zero-out can be performed on the remaining areas except for the upper left 12x12 block based on the forward transform, and a 96x32 matrix, which is the forward LFNST matrix, can be applied to the upper left 12x12 block.
  • zero-out can be performed on the remaining areas except for the upper left 12x12 block based on the forward transform, and a 96x32 matrix, which is the forward LFNST matrix, can be applied to the upper left 12x12 block.
  • the value of r can be set to a value less than or equal to 19.5. Since the same amount of computation is required when applying the reverse separable first-order transform and LFNST, the value of r can be set to a value less than or equal to 19.5.
  • the value of r is a value that constitutes the matrix dimension, so it can be set to an integer of 19 or 20 instead of 19.5.
  • the value of r is not a multiple of K.
  • K may be 4.
  • the value of r may be set to be a multiple of K.
  • the value of r that is a multiple of K may be set as follows.
  • func() can be floor, round, or ceil as described above.
  • the value of r in the NSPT matrix for an MxN block may be different from the value of r in the NSPT matrix for an NxM block.
  • the reverse NSPT matrix for a 4x8 block may be a 32x16 matrix
  • the reverse NSPT matrix for an 8x4 block may be a 32x14 matrix.
  • the NSPT matrix may be determined by utilizing the symmetry between the MxN block and the NxM block.
  • the current block is an MxN block with x mode.
  • an NSPT matrix corresponding to at least one of a mode symmetric to the x mode or a block size of NxM symmetric to the block size of MxN may be applied.
  • the NSPT matrix corresponding to the block size of NxM for the current block may be applied as is.
  • the NSPT matrix corresponding to the block size of NxM may be applied, but the value of r may be the value of r in the NSPT matrix corresponding to the block size of MxN.
  • the reverse NSPT matrix for a 4x8 block may be a 32x16 matrix (i.e., the value of r in the NSPT matrix is 16), and the reverse NSPT matrix for an 8x4 block may be a 32x14 matrix (i.e., the value of r in the NSPT matrix is 14).
  • the NSPT matrix for at least one of a mode symmetric to mode x for the current block or a 4x8 block symmetric to the 8x4 block may be applied.
  • the 32x16 matrix which is the reverse NSPT matrix for the 4x8 block
  • a 32x14 matrix having the value of r in the reverse NSPT matrix for the 8x4 block may be used.
  • the 32x14 matrix may be derived by sampling 14 rows from the left in the 32x16 matrix. In this way, when a 32x14 matrix is applied to the current block with a block size of 8x4, the aforementioned criteria are satisfied.
  • an NSPT matrix for at least one of a mode symmetric to mode x for the current block or an 8x4 block symmetric to the 4x8 block can be applied.
  • a 32x14 matrix for an 8x4 block can be applied instead of a 32x16 matrix for a 4x8 block. This allows NSPT to be performed using fewer multiplications than are allowed for a 4x8 block.
  • the reverse NSPT matrix for MxN blocks and NxM blocks can be set to MN x max(r1, r2).
  • max(r1, r2) can mean selecting a value that is greater than or equal to r1 and r2.
  • the backward NSPT matrix for a 4x8 block can be a 32x16 matrix (i.e., the value of r in the NSPT matrix is 16), and the backward NSPT matrix for an 8x4 block can be a 32x14 matrix (i.e., the value of r in the NSPT matrix is 14).
  • the current block is a 4x8 block with mode x
  • the NSPT matrix for at least one of a mode symmetric to the x mode for the current block or an 8x4 block symmetric to the 4x8 block can be applied.
  • the 32x16 matrix which is the backward NSPT matrix for the 8x4 block, can be used.
  • the 32x14 matrix will be used as the NSPT matrix for the 8x4 block.
  • the NSPT matrix for 4x8 blocks and the NSPT matrix for 8x4 blocks are configured as 32 x max(16, 14) matrices, the 32x16 matrix can be fully applied.
  • the NSPT matrix for at least one of a mode symmetric to mode x for the current block or a 4x8 block symmetric to the 8x4 block may be applied.
  • a 32x16 matrix, which is the reverse NSPT matrix for the 4x8 block, or a 32x14 matrix may be used.
  • the 32x14 matrix can be derived by sampling 14 rows from the left in the 32x16 matrix.
  • a transformation consisting of the maximum number of transformation basis vectors can be applied while satisfying the above-mentioned conditions, thereby maximizing coding performance.
  • the value of r can be set to be a multiple of 16.
  • a 32x16 matrix instead of a 32x20 matrix can be applied.
  • the transform coefficients of the transform block can be encoded in units of a predetermined coefficient group (CG).
  • CG predetermined coefficient group
  • a CG can be defined as a group of 16 transform coefficients, and for example, a CG can be a sub-block of a size such as 4x4, 2x8, or 8x2.
  • Transform coefficients can be derived by applying forward NSPT to residual samples of an MxN block.
  • the number of derived transform coefficients can be less than or equal to the value of (M*N) due to zero-out. That is, the forward NSPT matrix can be defined as an r x (M*N) matrix, where r means the output length of NSPT or the number of transform coefficients induced through NSPT, and (M*N) means the input length of NSPT or the number of residual samples to which NSPT is applied.
  • the above-described derived transform coefficients can be arranged in an MxN block according to a predetermined scan order, and an area where the transform coefficients are not filled can be filled with 0 (i.e., zero-out). Therefore, during the process of scanning the transform coefficients in a decoding device, if a non-zero transform coefficient is found in an area that would have been filled with 0 if NSPT had been applied (or, if the scan position of the last valid coefficient in the MxN block is greater than or equal to r), it is considered that NSPT is not applied to the corresponding MxN block, and the NSPT index may not be signaled.
  • An index indicating a scan position of 0 may be assigned to the upper-left coefficient (i.e., the DC component coefficient) in the MxN block, and indices increased by 1 may be assigned to the remaining coefficients in the MxN block according to a predetermined order.
  • One or more values of r can be defined for the block sizes to which NSPT can be applied. For example, one or more values of r can be defined for each of the block sizes to which NSPT can be applied. Alternatively, one value of r can be defined for each block size to which NSPT can be applied, and the value of r for one of the block sizes to which NSPT can be applied can be different from the value of r for another one. Alternatively, one value of r can be defined for some of the block sizes to which NSPT can be applied, and two or more values of r can be defined for the rest.
  • an index specifying one of the multiple values of r or r itself can be signaled.
  • the index can be signaled in a high level syntax (HLS) such as VPS, SPS, PPS, PH, SH, or can be signaled at a block level such as CTU, CU, TU.
  • HLS high level syntax
  • VPS VPS
  • SPS SPS
  • PPS PPS
  • PH SH
  • block level such as CTU, CU, TU.
  • the value of r is within a specific range, it can be signaled by allocating enough bits to encompass the range. For example, when the value of r is within the range of 1 to 256, it can be signaled by designating 8 bits as a fixed-length.
  • the transformation kernel of the current block may be determined based on any one of the embodiments 1 to 3 described above. Alternatively, the transformation kernel of the current block may be determined based on a combination of at least two of the embodiments 1 to 3, within a range where the inventions according to the embodiments 1 to 3 described above do not conflict with each other.
  • a transform index for the inverse transform of the current block can be signaled.
  • the transform index can specify one or more transform kernels (or transform matrices) belonging to a transform set.
  • the transform index can mean an NSPT index specifying one or more NSPT kernels belonging to an NSPT set.
  • the transform index can mean an LFNST index specifying one or more LFNST kernels belonging to an LFNST set.
  • Whether the above transformation index corresponds to the NSPT index can be determined based on whether the size of the current block is one of the block sizes belonging to the first group described above. This is based on the assumption that the block sizes to which NSPT is applicable and the block sizes to which LFNST is applicable are distinguished from each other. In this case, if the size of the current block belongs to the first group, the transformation index signaled for the current block corresponds to the NSPT index, and the NSPT kernel can be determined from the NSPT set based on the transformation index.
  • the transformation index signaled for the current block corresponds to the LFNST index
  • the LFNST kernel can be determined from the LFNST set based on the transformation index. If the size of the current block does not belong to the first group, this may mean that the size of the current block belongs to the second group described above. Alternatively, if the size of the current block does not belong to the first group, this may mean that the size of the current block corresponds to a block size to which LFNST is applicable among the block sizes belonging to the second group. In this way, the NSPT index and the LFNST index can be configured as a single integrated syntax rather than as separate syntaxes.
  • NSPT can be applied instead of LFNST.
  • NSPT can be applied instead of the combination of separable primary transform (e.g., DCT-2, separable KLT) and LFNST.
  • the NSPT index can be signaled, and for the remaining block sizes (where LFNST is allowed), the LFNST index can be signaled.
  • the complexity of the implementation can also be reduced.
  • the NSPT index and LFNST index can be signaled separately as separate syntaxes.
  • the implementation complexity may increase somewhat, but compression performance can be improved by performing optimized entropy coding for each index.
  • the same binarization can be applied to the LFNST index and the NSPT index.
  • the same CABAC context (or CABAC context increment) can be assigned to the bins of the LFNST index and the NSPT index.
  • Different binarization and/or CABAC contexts may be used for the LFNST index and the NSPT index.
  • Different CABAC initial values may be assigned for the LFNST index and the NSPT index.
  • one of the LFNST index and the NSPT index may be binarized based on fixed-length binarization, and the other may be binarized based on truncated unary binarization. Even if the binarization of the LFNST index and the NSPT index are the same, different CABAC contexts and/or CABAC initial values may be assigned.
  • different binarization and/or CABAC contexts may be used for the LFNST index and the NSPT index.
  • the number of NSPT kernel candidates belonging to the NSPT set may be set differently for each block size.
  • the block sizes belonging to the first group may be divided into a plurality of subgroups.
  • the number of NSPT kernel candidates belonging to the NSPT set may be set differently for each of the plurality of subgroups.
  • at least one of the plurality of subgroups may include a plurality of different block sizes.
  • the binarization applied to the NSPT index may be different.
  • the NSPT index can have any one of 0 to 3. If the value of the NSPT index is 0, this may indicate that NSPT is not applied to the current block. If the value of the NSPT index is not 0, this may indicate an NSPT kernel candidate corresponding to the NSPT index among the three NSPT kernel candidates.
  • a bin can be assigned to distinguish between the cases where NSPT is applied and the cases where it is not. If the value of the bin is 0, it may correspond to the case where the value of the NSPT index is 0. On the other hand, if the value of the bin is 1, it may correspond to the case where the value of the NSPT index is 1, 2, or 3. In this case, truncated unary binarization can be applied to distinguish between the three NSPT kernel candidates. That is, by assigning two bins, the three NSPT kernel candidates can be distinguished as 0, 10, and 11.
  • the NSPT index can have any one of 0 to 2. If the value of the NSPT index is 0, it may indicate that NSPT is not applied to the current block. If the value of the NSPT index is not 0, it may indicate an NSPT kernel candidate corresponding to the NSPT index among the two NSPT kernel candidates. One bin can be assigned to distinguish between the cases where NSPT is applied and those where it is not. The two NSPT kernel candidates can be distinguished by assigning one bin representing one of the two NSPT kernel candidates.
  • the NSPT index can have either 0 or 1. If the value of the NSPT index is 0, it can indicate that NSPT is not applied to the current block. If the value of the NSPT index is 1, it can indicate 1 NSPT kernel candidate. In this case, whether NSPT is applied and the NSPT kernel candidate can be specified with only one bin.
  • the inverse transform of the current block may be a separable linear transform and/or 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 via the LFNST to derive residual samples.
  • a reverse LFNST may be applied to (inverse quantized) transform coefficients belonging to a part of the current block.
  • the part of the region means a part to which the forward LFNST is applied, and is referred to as a region of interest (ROI) hereinafter.
  • the transform coefficients derived via the LFNST may be arranged in the ROI region according to a predetermined scan order.
  • the predetermined scan order may be a row-first order or a column-first order.
  • a reverse separable primary transform may be applied to the transform coefficients derived through the LFNST and the transform coefficients belonging to the remaining area except the ROI area within the current block.
  • a reverse separable primary 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 locations belonging to the ROI area.
  • LFNST defined for a 4x8 block (hereinafter referred to as LFNST4x8) or LFNST defined for an 8x4 block (hereinafter referred to as LFNST8x4) can be applied.
  • LFNST4x8 is applied to the current block
  • the ROI area of the current block can be a 4x8 area within the current block.
  • the 4x8 area is a area including the upper left sample of the current block, and may mean a block whose width and height are 4 and 8, respectively.
  • the ROI area of the current block can be an 8x4 area within the current block.
  • the 8x4 area is a area including the upper left sample of the current block, and may mean a block whose width and height are 8 and 4, respectively.
  • the above LFNST4x8 can be applied only when the current block is a 4x8 block.
  • the LFNST4x8 can be applied when the current block is 4xN and N is greater than or equal to 8 (for example, when the current block is a 4x8, 4x16, 4x32, or larger block).
  • the LFNST4x8 can be applied when the current block is 4xN and N is greater than or equal to 8 and less than or equal to a predetermined threshold. For example, when the threshold is 16, the LFNST4x8 can be applied when the current block is a 4x8 or 4x16 block.
  • the above LFNST8x4 can be applied only when the current block is an 8x4 block.
  • the LFNST8x4 can be applied when the current block is Nx4 and N is greater than or equal to 8 (for example, when the current block is an 8x4, 16x4, 32x4, or larger block).
  • the LFNST8x4 can be applied when the current block is Nx4 and N is greater than or equal to 8 and less than or equal to a predetermined threshold. For example, when the threshold is 16, the LFNST8x4 can be applied when the current block is an 8x4 or 16x4 block.
  • LFNST (hereinafter referred to as LFNST-32) having an input length less than or equal to 32 and an output length of 32
  • the input length may mean the number of transform coefficients input to the LFNST.
  • the transform coefficients input to the LFNST may mean all transform coefficients derived based on the residual information of the current block, or may mean transform coefficients to which the forward LFNST is applied among the derived transform coefficients.
  • the output length may mean the number of transform coefficients derived through the LFNST.
  • the ROI area of the current block may consist of 32 sample locations.
  • the dimension (or size) of the transform matrix for the backward LFNST4x8 or LFNST8x4 may be 32xN.
  • N may be 16, 20, or 24. That is, the input length of LFNST-32 can be N, and the output length of LFNST-32 can be 32.
  • LFNST-32 can be applied to all or part of the transform coefficients belonging to a 4x8 region which is a ROI region within the current block.
  • the transform coefficients derived through LFNST-32 can be arranged in a predetermined scan order in the 4x8 region within the current block.
  • LFNST-32 can be applied to all or part of the transform coefficients belonging to an 8x4 region which is a ROI region within the current block.
  • the transform coefficients derived through LFNST-32 can be arranged in a predetermined scan order in the 8x4 region within the current block.
  • a transform kernel for LFNST-32 can be determined as one of one or more transform kernels (or LFNST kernel candidates) belonging to a transform set.
  • an index specifying one of a plurality of transform kernels belonging to a transform set can be used.
  • the index can be signaled through a bitstream.
  • the transform set of the current block can be determined as one of a plurality of pre-defined transform sets.
  • the transform set of the current block can be determined as one of 35 transform sets, and each transform set can include three transform kernels.
  • the transform set of the current block can be determined based on an intra prediction mode of the current block, as described above.
  • the plurality of transform sets for LFNST-32 can also be defined for LFNST4x8 and LFNST8x4, respectively.
  • LFNST4x8 and LFNST8x4 can be adaptively applied based on the size of the current block. If LFNST4x8 and LFNST8x4 are not applied to the current block, LFNST (hereinafter referred to as LFNST-16) having an input length less than or equal to 16 and an output length of 16 can be used. LFNST-16 can be applied to all or part of the transform coefficients belonging to the 4x4 region in the current block.
  • the 4x4 region in the current block may mean a block including the upper left sample of the current block and having a width and height of 4 and 4, respectively.
  • the transform coefficients derived through LFNST-16 can be arranged in a predetermined scan order in the 4x4 region in the current block.
  • a separable primary transform can be applied to residual samples of the current block to derive transform coefficients.
  • the forward LFNST can be applied to all of the derived transform coefficients or only to transform coefficients belonging to a part of the current block (i.e., the ROI region).
  • the transform coefficients derived through the LFNST can be arranged in a predetermined scan order in the ROI region of the current block. If the number of transform coefficients output from the LFNST is less than the number of transform coefficients input to the LFNST, there may be a region in the ROI region that is not filled with the transform coefficients derived through the LFNST. The region can be filled with transform coefficients that are 0. In addition, the remaining region of the current block excluding the ROI region (or the region to which the LFNST is not applied) can be filled with transform coefficients derived through the separable primary transform or can be filled with transform coefficients that are 0 through zero-out.
  • LFNST (hereinafter referred to as LFNST-32) having an input length of 32 and an output length less than or equal to 32
  • the input length may mean the number of transform coefficients input to the LFNST.
  • the input transform coefficients may be coefficients induced through a separable first-order transform.
  • the input length may mean the number of transform coefficients belonging to the ROI region of the current block.
  • the output length may mean the number of transform coefficients induced through LFNST.
  • the ROI region of the current block may consist of 32 sample positions.
  • the dimension of the transform matrix for the forward LFNST4x8 or LFNST8x4 may be Nx32.
  • N may be 16, 20, or 24. That is, the input length of LFNST-32 can be 32, and the output length of LFNST-32 can be N.
  • LFNST-32 can be applied to transform coefficients belonging to a 4x8 region, which is a ROI region within the current block.
  • the transform coefficients derived through LFNST-32 can be arranged in a predetermined scan order in the 4x8 region within the current block.
  • LFNST-32 can be applied to transform coefficients belonging to an 8x4 region, which is a ROI region within the current block.
  • the transform coefficients derived through LFNST-32 can be arranged in a predetermined scan order in the 8x4 region within the current block.
  • LFNST4x8 and LFNST8x4 can be adaptively applied based on the size of the current block. If LFNST4x8 and LFNST8x4 are not applied to the current block, LFNST (hereinafter referred to as LFNST-16) whose input length and output length are 16 and 16, respectively, can be used. LFNST-16 can be applied to transform coefficients belonging to a 4x4 area within the current block.
  • the 4x4 area within the current block refers to a block including the upper left sample of the current block and having a width and height of 4 and 4, respectively.
  • Transform coefficients derived through LFNST-16 can be arranged in a predetermined scan order in the 4x4 area within the current block.
  • the symmetry between the block shapes described above can be utilized.
  • the LFNST set and/or LFNST kernel for LFNST of the current block can be determined according to the symmetry between a 4xN block and an Nx4 block.
  • a 4xN block (or an Nx4 block) can equally utilize the LNFST set and/or LFNST kernel corresponding to an Nx4 block (or a 4xN block) that has symmetry therewith.
  • LFNST can be applied to a ROI region (i.e., a 4x8 region or an 8x4 region) within the current block by utilizing the symmetry described above.
  • LFNST for 8x16 block (hereinafter referred to as LFNST8x16) and LFNST for 16x8 block (hereinafter referred to as LFNST16x8) can be defined.
  • LFNST8x16 When LFNST8x16 is applied to the current block, the ROI region of the current block can be a 4x8, 4x16, 8x8, or 8x16 region within the current block.
  • the ROI region is a region including the upper left sample of the current block, and may mean a block having the corresponding width and height.
  • the ROI region of the current block can be an 8x4, 16x4, 8x8, or 16x8 region within the current block.
  • the ROI region is a region including the upper left sample of the current block, and may mean a block having the corresponding width and height.
  • the above ROI region may be identically preset for the encoding device and the decoding device for each of LFNST8x16 and LFNST16x8.
  • the same ROI region may be set for blocks whose width and height are 8 and N, respectively. Alternatively, at least one of the blocks whose width and height are 8 and N, respectively, may have a different ROI region from the other one.
  • the same ROI region may be set for blocks whose width and height are N and 8, respectively. Alternatively, at least one of the blocks whose width and height are N and 8, respectively, may have a different ROI region from the other one.
  • the above LFNST8x16 can be applied only when the current block is an 8x16 block.
  • the LFNST8x16 can be applied when the current block is 8xN and N is greater than or equal to 16 (for example, when the current block is an 8x16, 8x32, 8x64, or larger block).
  • the LFNST8x16 can be applied when the current block is 8xN and N is greater than or equal to 16 and less than or equal to a predetermined threshold. For example, when the threshold is 32, the LFNST8x16 can be applied when the current block is an 8x16 or 8x32 block.
  • the above LFNST16x8 can be applied only when the current block is a 16x8 block.
  • the LFNST16x8 can be applied when the current block is Nx8 and N is greater than or equal to 16 (for example, when the current block is a 16x8, 32x8, 64x8, or larger block).
  • the LFNST16x8 can be applied when the current block is Nx8 and N is greater than or equal to 16 and less than or equal to a predetermined threshold. For example, when the threshold is 32, the LFNST16x8 can be applied when the current block is a 16x8 or 32x8 block.
  • an LFNST (hereinafter referred to as LFNST-K) having an input length less than or equal to K and an output length K can be used.
  • the input length may mean the number of transform coefficients input to the LFNST.
  • the transform coefficients input to the LFNST may mean all transform coefficients derived based on the residual information of the current block, or may mean transform coefficients to which the forward LFNST is applied among the derived transform coefficients.
  • the output length may mean the number of transform coefficients derived through the LFNST.
  • the above K can be determined based on the size of the ROI region of the current block. For example, if the ROI region is 4x8 or 8x4, LFNST having an input length less than or equal to 32 and an output length of 32 (i.e., LFNST-32) can be used. If the ROI region is 4x16, 16x4, or 8x8, LFNST having an input length less than or equal to 64 and an output length of 64 (i.e., LFNST-64) can be used. If the ROI region is 8x16 or 16x8, LFNST having an input length less than or equal to 128 and an output length of 128 (i.e., LFNST-128) can be used.
  • LFNST-K can be applied to the ROI region within the current block.
  • K can be 32, 64, or 128, but this is just an example, and K can also be an integer greater than 128.
  • the ROI region of the current block can consist of 128 sample locations.
  • the dimension (or size) of the transformation matrix for the reverse LFNST8x16 or LFNST16x8 can be 128xN.
  • N can be 32, 40, or 48. That is, the input length of LFNST-128 can be N, and the output length of LFNST-128 can be 128.
  • LFNST-K can be applied to all or part of the transform coefficients belonging to the ROI region within the current block.
  • the transform coefficients derived through LFNST-K can be arranged in the ROI region within the current block according to a predetermined scan order.
  • LFNST-K can be applied to all or part of the transform coefficients belonging to the ROI region within the current block.
  • the transform coefficients derived through LFNST-K can be arranged in the ROI region within the current block according to a predetermined scan order.
  • a transform kernel for LFNST-128 can be determined as one of one or more transform kernels (or LFNST kernel candidates) belonging to a transform set.
  • an index specifying one of a plurality of transform kernels belonging to a transform set can be used.
  • the index can be signaled through a bitstream.
  • the transform set of the current block can be determined as one of a plurality of pre-defined transform sets.
  • the transform set of the current block can be determined as one of 35 transform sets, and each transform set can include three transform kernels.
  • the transform set of the current block can be determined based on an intra prediction mode of the current block, as described above.
  • the plurality of transform sets for LFNST-128 can also be defined for LFNST8x16 and LFNST16x8, respectively.
  • LFNST8x16 and LFNST16x8 can be adaptively applied based on the size of the current block. If LFNST8x16 and LFNST16x8 are not applied to the current block, LFNST (hereinafter referred to as LFNST-48) with an input length of 16 and an output length of 48 can be used. LFNST-48 can be applied to transform coefficients belonging to a 4x4 region within the current block.
  • the 4x4 region within the current block refers to a region including the upper left sample of the current block, and may mean a block with a width and height of 4 and 4, respectively.
  • Transform coefficients derived through LFNST-48 can be arranged in a predetermined scan order in three 4x4 regions within the current block.
  • the three 4x4 regions may be composed of a first 4x4 region containing the top left sample of the current block, a second 4x4 region adjacent to the right of the first 4x4 region, and a third 4x4 region adjacent to the bottom of the first 4x4 region.
  • a separable primary transform can be applied to residual samples of the current block to derive transform coefficients.
  • the forward LFNST can be applied to all of the derived transform coefficients or only to transform coefficients belonging to a part of the current block (i.e., the ROI region).
  • the transform coefficients derived through the LFNST can be arranged in a predetermined scan order in the ROI region of the current block. If the number of transform coefficients output from the LFNST is less than the number of transform coefficients input to the LFNST, there may be a region in the ROI region that is not filled with the transform coefficients derived through the LFNST. The region can be filled with transform coefficients that are 0. In addition, the remaining region of the current block excluding the ROI region (or the region to which the LFNST is not applied) can be filled with transform coefficients derived through the separable primary transform or can be filled with transform coefficients that are 0 through zero-out.
  • an LFNST having an input length of K and an output length less than or equal to K i.e., referred to as LFNST-K
  • the input length may mean the number of transform coefficients input to the LFNST.
  • the input transform coefficients may be coefficients induced through a separable first-order transform.
  • the input length may mean the number of transform coefficients belonging to the ROI region of the current block.
  • the output length may mean the number of transform coefficients induced through the LFNST.
  • the ROI region of the current block may consist of 128 sample positions.
  • the dimension of the transform matrix for the forward LFNST8x16 or LFNST16x8 may be Nx128.
  • N may be 32, 40, or 48. That is, the input length of LFNST-128 can be 128, and the output length of LFNST-128 can be N.
  • LFNST-K when the size of the current block is 8xN and N is greater than or equal to 16, LFNST-K can be applied to transform coefficients belonging to the ROI region within the current block.
  • the transform coefficients derived through LFNST-K can be arranged in the ROI region within the current block according to a predetermined scan order.
  • LFNST-K when the size of the current block is Nx8 and N is greater than or equal to 16, LFNST-K can be applied to transform coefficients belonging to the ROI region within the current block.
  • the transform coefficients derived through LFNST-K can be arranged in the ROI region within the current block according to a predetermined scan order.
  • LFNST8x16 and LFNST16x8 can be adaptively applied based on the size of the current block. If LFNST8x16 and LFNST16x8 are not applied to the current block, LFNST (i.e., LFNST-48) whose input length and output length are 48 and 16, respectively, can be used. LFNST-48 can be applied to transform coefficients belonging to three 4x4 regions in the current block. The three 4x4 regions can be composed of a first 4x4 region including the upper-left sample of the current block, a second 4x4 region adjacent to the right side of the first 4x4 region, and a third 4x4 region adjacent to the bottom of the first 4x4 region. Transform coefficients derived through LFNST-48 can be arranged in the 4x4 regions in the current block in a predetermined scan order.
  • the symmetry between the block shapes described above can be utilized.
  • the LFNST set and/or LFNST kernel for LFNST-K of the current block can be determined according to the symmetry between the 8xN block and the Nx8 block.
  • the 8xN block (or the Nx8 block) can equally utilize the LNFST set and/or LFNST kernel corresponding to the Nx8 block (or the 8xN block) that has symmetry therewith.
  • LFNST can be applied to the ROI region (i.e., the 8x16 region or the 16x8 region) within the current block by utilizing the symmetry described above.
  • LFNSTMx2M for Mx2M blocks and LFNST2MxM for 2MxM blocks can be defined.
  • LFNSTMx2M can be applied to the current block of MxN
  • LFNST2MxM can be applied to the current block of NxM.
  • N can be greater than or equal to (2*M).
  • M can be 16 and N can be greater than or equal to 32.
  • a ROI area can be defined, respectively, and an LFNST with a predetermined input length and output length can be defined/used.
  • the size of the ROI area can be determined based on the minimum value (i.e., M) of the width and height of the current block.
  • the size of the ROI area can be different depending on the value of M.
  • the ROI area of an MxN block can be an Mx2M area within the MxN block.
  • the Mx2M area is an area including the upper left sample of the current block, and may mean a block whose width and height are M and 2M, respectively.
  • the ROI area of an NxM block can be a 2MxM area within the NxM block.
  • the 2MxM area is an area including the upper left sample of the current block, and may mean a block whose width and height are 2M and M, respectively.
  • LFNSTMx2M or LFNST2MxM may be applied to the current block (or, ROI region of the current block).
  • at least one of the input length and the output length of LFNST for the LFNSTMx2M or LFNST2MxM may be determined based on at least one of the minimum value of the width and the height of the current block or the size of the ROI region.
  • the input length of LFNST may be less than or equal to (2*M*M), and the output length of LFNST may be (2*M*M).
  • the input length may mean the number of transform coefficients input to LFNST.
  • the transform coefficients input to LFNST may mean all transform coefficients derived based on the residual information of the current block, or may mean transform coefficients to which the forward LFNST is applied among the derived transform coefficients.
  • the output length may mean the number of transform coefficients derived through LFNST.
  • the ROI region of the current block can be composed of (2*M*M) sample locations.
  • the dimension (or size) of the transformation matrix for the reverse LFNSTMx2M or LFNST2MxM can be (2*M*M)xL. That is, the input length of LFNST can be L, and the output length of LFNST can be (2*M*M).
  • the value of L can be set to be less than or equal to (2*M*M).
  • LFNST can be applied to all or part of the transform coefficients belonging to an Mx2M region, which is a ROI region within the current block.
  • the transform coefficients derived through LFNST can be arranged in a predetermined scan order in the Mx2M region within the current block.
  • LFNST can be applied to all or part of the transform coefficients belonging to a 2MxM region, which is a ROI region within the current block.
  • the transform coefficients derived through LFNST can be arranged in a predetermined scan order in the 2MxM region within the current block.
  • the transform kernel for the LFNST can be determined as one of one or more transform kernels (or LFNST kernel candidates) belonging to a transform set.
  • an index specifying one of a plurality of transform kernels belonging to the transform set can be used.
  • the index can be signaled through a bitstream.
  • the transform set of the current block can be determined as one of a plurality of pre-defined transform sets.
  • the transform set of the current block can be determined as one of 35 transform sets, and each transform set can include three transform kernels.
  • the transform set of the current block can be determined based on an intra prediction mode of the current block, as described above.
  • the plurality of transform sets for the LFNST can be defined for LFNSTMx2M and LFNST2MxM, respectively.
  • a separable primary transform can be applied to residual samples of the current block to derive transform coefficients.
  • the forward LFNST can be applied to all of the derived transform coefficients or only to transform coefficients belonging to a part of the current block (i.e., the ROI region).
  • the transform coefficients derived through the LFNST can be arranged in a predetermined scan order in the ROI region of the current block. If the number of transform coefficients output from the LFNST is less than the number of transform coefficients input to the LFNST, there may be a region in the ROI region that is not filled with the transform coefficients derived through the LFNST. The region can be filled with transform coefficients that are 0. In addition, the remaining region of the current block excluding the ROI region (or the region to which the LFNST is not applied) can be filled with transform coefficients derived through the separable primary transform or can be filled with transform coefficients that are 0 through zero-out.
  • an LFNST having an input length of (2*M*M) and an output length less than or equal to (2*M*M) can be used.
  • the input length may mean the number of transform coefficients input to the LFNST.
  • the input transform coefficients may be coefficients induced through a separable first-order transform.
  • the input length may also mean the number of transform coefficients belonging to the ROI region of the current block.
  • the output length may mean the number of transform coefficients induced through the LFNST.
  • the ROI region of the current block may be composed of (2*M*M) sample positions.
  • the dimension of the transform matrix for the forward LFNSTMx2M or LFNST2MxM may be Lx(2*M*M). That is, the input length of the LFNST may be (2*M*M) and the output length of the LFNST may be L.
  • the value of L can be set to be less than or equal to (2*M*M).
  • LFNST can be applied to transform coefficients belonging to an Mx2M region, which is an ROI region within the current block.
  • the transform coefficients derived through LFNST can be arranged in a predetermined scan order in the Mx2M region within the current block.
  • LFNST can be applied to transform coefficients belonging to a 2MxM region, which is an ROI region within the current block.
  • the transform coefficients derived through LFNST can be arranged in a predetermined scan order in the 2MxM region within the current block.
  • the symmetry between the block shapes described above can be utilized.
  • the LFNST set and/or LFNST kernel for the LFNST of the current block can be determined according to the symmetry between the MxN block and the NxM block.
  • the MxN block (or the NxM block) can equally utilize the LNFST set and/or LFNST kernel corresponding to the NxM block (or the MxN block) that has symmetry therewith.
  • LFNST can be applied to the ROI region (i.e., the Mx2M region or the 2MxM region) within the current block by utilizing the symmetry described above.
  • LFNSTMxrM for M x rM blocks and LFNSTrMxM for rM x M blocks can be defined, where the value of r can be an integer greater than or equal to 2.
  • rM represents (r*M), which can be considered to have the same meaning hereinafter.
  • LFNSTMxrM can be applied to a current block of MxN
  • LFNSTrMxM can be applied to a current block of NxM, where N can be greater than or equal to (r*M).
  • a ROI region can be defined, respectively, and an LFNST with a predetermined input length and output length can be defined/used.
  • the size of the ROI region can be determined based on the minimum value (i.e., M) of the width and height of the current block.
  • the size of the ROI region can be different depending on the value of M.
  • the ROI region of an MxN block can be an M x rM region within the MxN block.
  • the M x rM region is a region including the upper left sample of the current block, and may mean a block whose width and height are M and rM, respectively.
  • the ROI region of an NxM block can be an rM x M region within the NxM block.
  • the rM x M region is a region including the upper left sample of the current block, and may mean a block whose width and height are rM and M, respectively.
  • LFNSTMxrM or LFNSTrMxM may be applied to the current block (or, ROI region of the current block).
  • at least one of the input length and the output length of LFNST for the LFNSTMxrM or LFNSTrMxM may be determined based on at least one of the minimum value of the width and the height of the current block or the size of the ROI region.
  • the input length of LFNST may be less than or equal to (r*M*M), and the output length of LFNST may be (r*M*M).
  • the input length may mean the number of transform coefficients input to LFNST.
  • the transform coefficients input to LFNST may mean all transform coefficients derived based on the residual information of the current block, or may mean transform coefficients to which the forward LFNST is applied among the derived transform coefficients.
  • the output length may mean the number of transform coefficients derived through LFNST.
  • the ROI region of the current block can be composed of (r*M*M) sample locations.
  • the dimension (or size) of the transformation matrix for the reverse LFNSTMxrM or LFNSTrMxM can be (r*M*M)xL. That is, the input length of LFNST can be L, and the output length of LFNST can be (r*M*M).
  • the value of L can be set to be less than or equal to (r*M*M).
  • LFNST can be applied to all or part of the transform coefficients belonging to the M x rM region, which is the ROI region within the current block.
  • the transform coefficients derived through LFNST can be arranged in a predetermined scan order in the M x rM region within the current block.
  • LFNST can be applied to all or part of the transform coefficients belonging to the rM x M region, which is the ROI region within the current block.
  • the transform coefficients derived through LFNST can be arranged in a predetermined scan order in the rM x M region within the current block.
  • the transform kernel for the LFNST can be determined as one of one or more transform kernels (or LFNST kernel candidates) belonging to a transform set.
  • an index specifying one of a plurality of transform kernels belonging to the transform set can be used.
  • the index can be signaled through a bitstream.
  • the transform set of the current block can be determined as one of a plurality of pre-defined transform sets.
  • the transform set of the current block can be determined as one of 35 transform sets, and each transform set can include three transform kernels.
  • the transform set of the current block can be determined based on an intra prediction mode of the current block, as described above.
  • the plurality of transform sets for the LFNST can be defined for LFNSTMxrM and LFNSTrMxM, respectively.
  • a separable primary transform can be applied to residual samples of the current block to derive transform coefficients.
  • the forward LFNST can be applied to all of the derived transform coefficients or only to transform coefficients belonging to a part of the current block (i.e., the ROI region).
  • the transform coefficients derived through the LFNST can be arranged in a predetermined scan order in the ROI region of the current block. If the number of transform coefficients output from the LFNST is less than the number of transform coefficients input to the LFNST, there may be a region in the ROI region that is not filled with the transform coefficients derived through the LFNST. The region can be filled with transform coefficients that are 0. In addition, the remaining region of the current block excluding the ROI region (or the region to which the LFNST is not applied) can be filled with transform coefficients derived through the separable primary transform or can be filled with transform coefficients that are 0 through zero-out.
  • an LFNST having an input length of (r*M*M) and an output length less than or equal to (r*M*M) can be used.
  • the input length may mean the number of transform coefficients input to the LFNST.
  • the input transform coefficients may be coefficients induced through a separable first-order transform.
  • the input length may also mean the number of transform coefficients belonging to the ROI region of the current block.
  • the output length may mean the number of transform coefficients induced through the LFNST.
  • the ROI region of the current block may be composed of (r*M*M) sample positions.
  • the dimension of the transform matrix for the forward LFNSTMxrM or LFNSTrMxM may be Lx(r*M*M). That is, the input length of the LFNST may be (r*M*M) and the output length of the LFNST may be L.
  • the value of L can be set to be less than or equal to (r*M*M).
  • LFNST can be applied to transform coefficients belonging to an M x rM region, which is a ROI region within the current block.
  • the transform coefficients derived through LFNST can be arranged in a predetermined scan order in the M x rM region within the current block.
  • LFNST can be applied to transform coefficients belonging to an rM x M region, which is a ROI region within the current block.
  • the transform coefficients derived through LFNST can be arranged in a predetermined scan order in the rM x M region within the current block.
  • the symmetry between the block shapes described above can be utilized.
  • the LFNST set and/or LFNST kernel for the LFNST of the current block can be determined according to the symmetry between the MxN block and the NxM block.
  • the MxN block (or the NxM block) can equally utilize the LNFST set and/or LFNST kernel corresponding to the NxM block (or the MxN block) that has the symmetry therewith.
  • the symmetry described above can be utilized as it is, and for the block where N is larger than rM, LFNST can be applied using the symmetry described above to the ROI region (i.e., the M x rM region or the rM x M region) within the current block.
  • LFNST4x16 and LFNST16x4 can be defined.
  • LFNST4x16 can be applied to a 4xN current block
  • LFNST16x4 can be applied to a Nx4 current block.
  • N can be greater than or equal to 16.
  • the ROI region of the current block can be a 4x16 region within the current block.
  • the 4x16 region can mean a block including the upper left sample of the current block and having a width and height of 4 and 16, respectively.
  • LFNST4x16 can be applied to the 4x16 region which is the ROI region within the current block.
  • the ROI region of the current block can be a 16x4 region within the current block.
  • the 16x4 region is a region that includes the upper left sample of the current block, and can mean a block with a width and height of 16 and 4, respectively.
  • LFNST16x4 can be applied to the 16x4 region, which is the ROI region within the current block.
  • the aforementioned LFNSTMxrM (or LFNSTrMxM) can be adaptively applied to the current block.
  • LFNSTMxrM (or LFNSTrMxM) may be applied to the current block.
  • LFNSTMxrM (or LFNSTrMxM) may not be applied to the current block.
  • NSPT may be applied to the current block.
  • the width or the height of the current block may be defined as a minimum value of the width or the height of the current block.
  • the threshold size may be defined as 8.
  • LFNST4x8 may be applied to the current block.
  • N may be an integer greater than or equal to 8.
  • LFNST8x16 or LFNST16x8
  • NSPT may be applied to the current block.
  • LFNSTMxrM (or LFNSTrMxM) may be applied to the current block.
  • LFNSTMxrM (or LFNSTrMxM) may not be applied to the current block.
  • NSPT may be applied to the current block.
  • the width or the height of the current block may be defined as a maximum value of the width or the height of the current block.
  • the threshold size may be defined as 16.
  • LFNST4x16 may be applied to the current block.
  • LFNST16x4 may be applied to the current block.
  • L may be an integer greater than or equal to 16.
  • L may be an integer greater than or equal to 16.
  • L may be an integer greater than or equal to 16.
  • L may be an integer greater than or equal to 16.
  • L may be an integer greater than or equal to 16.
  • L may be an integer greater than or equal to 16.
  • L may be an integer greater than or equal to 16.
  • LFNST4x8 or LFNST8x4
  • NSPT may be applied to the current block.
  • LFNSTMxrM (or LFNSTrMxM) may be applied to the current block.
  • LFNSTMxrM (or LFNSTrMxM) may not be applied to the current block.
  • NSPT may be applied to the current block.
  • the width or the height of the current block may be defined as a minimum value of the width or the height of the current block.
  • the threshold size may be defined as 8.
  • LFNST8x16 may be applied to the current block.
  • N may be an integer greater than or equal to 16.
  • NSPT can be applied to the current block.
  • LFNST4 means LFNST applied to a 4x4 block
  • the ROI area of LFNST4 can be a 4x4 block. That is, when LFNST is applied to a 4xN or Nx4 block, which is a block to which LFNST4x8 or LFNST8x4 can be applied, 16 transform coefficients are output, and the output 16 transform coefficients can be arranged in a 4x4 area within the 4xN or Nx4 block.
  • N can be an integer greater than or equal to 8.
  • N can be an integer of 8, 16, 32, or higher.
  • the 4x4 area can be an area including the upper left sample within the 4xN or Nx4 block, and has a width and height of 4 and 4, respectively.
  • the dimension (or size) of the transformation matrix for the above LFNST4x8 and LFNST8x4 may be configured the same as that of the above LFNST4.
  • the dimension of the transformation matrix for LFNST4x8 and LFNST8x4 may be a 16x16 matrix. That is, when LFNST is applied to a 4xN or Nx4 block, 16 transformation coefficients belonging to the ROI region (i.e., 4x4 region) within the 4xN or Nx4 block may be input to the LFNST, and 16 transformation coefficients may be output through the LFNST.
  • the present invention is not limited thereto, and the dimension of the transformation matrix for LFNST4x8 and LFNST8x4 may be configured differently from that of the above LFNST4.
  • the input length of LFNST for a 4x4 block may be different from the input length of LFNST for a 4xN or Nx4 block, and the output length of LFNST for a 4x4 block may be the same as the output length of LFNST for a 4xN or Nx4 block.
  • the input or output length of LFNST may mean the number of transform coefficients input to or output from the LFNST.
  • N can be an integer greater than or equal to 8.
  • N can be an integer of 8, 16, 32 or higher.
  • the 4x4 region can be an region including the upper left sample within the 4xN or Nx4 block, and can be an region with a width and height of 4 and 4, respectively.
  • the dimension (or size) of the transformation matrix for the above LFNST4x8 and LFNST8x4 may be configured the same as that of the above LFNST4.
  • the dimension of the transformation matrix for LFNST4x8 and LFNST8x4 may be a 16x16 matrix. That is, when LFNST is applied to a 4xN or Nx4 block, 16 transformation coefficients belonging to the ROI region (i.e., 4x4 region) within the 4xN or Nx4 block may be input to the LFNST, and 16 transformation coefficients may be output through the LFNST.
  • the present invention is not limited thereto, and the dimension of the transformation matrix for LFNST4x8 and LFNST8x4 may be configured differently from that of the above LFNST4.
  • the input length of LFNST for a 4x4 block may be the same as the input length of LFNST for a 4xN or Nx4 block, and the output length of LFNST for a 4x4 block may be different from the output length of LFNST for a 4xN or Nx4 block.
  • At least one of the transform sets for LFNST4x8 and LFNST8x4 may be configured identically to LFNST4.
  • the transform sets for 4x4 blocks, the number of transform kernels belonging to each transform set, or the determination method of the transform sets may be equally applied to the 4xN or Nx4 blocks.
  • LFNST8 means LFNST applied to an 8x8 block
  • the ROI area of LFNST8 can be an 8x8 block. That is, when LFNST is applied to an 8xN or Nx8 block, which is a block to which LFNST8x16 or LFNST16x8 can be applied, 64 transform coefficients are output, and the output 64 transform coefficients can be arranged in an 8x8 area within the 8xN or Nx8 block.
  • N can be an integer greater than or equal to 16.
  • N can be an integer greater than or equal to 16, 32, 64, or a higher integer.
  • the 8x8 area can be an area including the upper left sample within the 8xN or Nx8 block, and has a width and height of 8 and 8, respectively.
  • the dimension (or size) of the transformation matrix for the above LFNST8x16 and LFNST16x8 may be configured the same as that of the above LFNST8.
  • the dimension of the transformation matrix for LFNST8x16 and LFNST16x8 may be a 64x32 matrix. That is, when LFNST is applied to an 8xN or Nx8 block, 32 transformation coefficients belonging to the ROI region (i.e., 8x8 region) within the 8xN or Nx8 block may be input to the LFNST, and 64 transformation coefficients may be output through the LFNST.
  • the present invention is not limited thereto, and the dimension of the transformation matrix for LFNST8x16 and LFNST16x8 may be configured differently from that of the above LFNST8.
  • the input length of an LFNST for an 8x8 block can be different from the input length of an LFNST for an 8xN or Nx8 block, and the output length of an LFNST for an 8x8 block can be the same as the output length of an LFNST for an 8xN or Nx8 block.
  • the dimension of the transformation matrix for LFNST8 can be 64x16, and the dimensions of the transformation matrices for LFNST8x16 and LFNST16x8 can be 64x32 matrices. That is, the input length and output length of an LFNST for an 8x8 block can be 16 and 64, respectively.
  • the input length and output length of an LFNST for an 8xN or Nx8 block can be 32 and 64, respectively. This means that 32 transform coefficients belonging to the ROI region (i.e., 8x8 region) within an 8xN or Nx8 block can be input to LFNST, and 64 transform coefficients can be output through LFNST.
  • N can be an integer greater than or equal to 16.
  • N can be an integer greater than or equal to 16, 32, 64, or more.
  • the 8x8 area includes the upper left sample within the 8xN or Nx8 block, and can be an area with a width and height of 8 and 8, respectively.
  • the dimension (or size) of the transformation matrix for the above LFNST8x16 and LFNST16x8 may be configured the same as that of the above LFNST8.
  • the dimension of the transformation matrix for LFNST8x16 and LFNST16x8 may be a 32x64 matrix. That is, when LFNST is applied to an 8xN or Nx8 block, 64 transformation coefficients belonging to the ROI region (i.e., 8x8 region) within the 8xN or Nx8 block may be input to the LFNST, and 32 transformation coefficients may be output through the LFNST.
  • the present invention is not limited thereto, and the dimension of the transformation matrix for LFNST8x16 and LFNST16x8 may be configured differently from that of the above LFNST8.
  • the input length of an LFNST for an 8x8 block can be the same as the input length of an LFNST for an 8xN or Nx8 block, and the output length of an LFNST for an 8x8 block can be different from the output length of an LFNST for an 8xN or Nx8 block.
  • the dimension of the transformation matrix for LFNST8 can be 16x64, and the dimensions of the transformation matrices for LFNST8x16 and LFNST16x8 can be 32x64 matrices. That is, the input length and output length of an LFNST for an 8x8 block can be 64 and 16, respectively.
  • the input length and output length of an LFNST for an 8xN or Nx8 block can be 64 and 32, respectively. This means that 64 transform coefficients belonging to the ROI region (i.e., 8x8 region) within an 8xN or Nx8 block can be input to LFNST, and 32 transform coefficients can be output through LFNST.
  • At least one of the transform sets for LFNST8x16 and LFNST16x8, the number of transform kernels belonging to each transform set, or the determination of the transform sets may be configured identically to LFNST8.
  • the transform sets for 8x8 blocks, the number of transform kernels belonging to each transform set, or the determination method of the transform sets may be equally applied to the 8xN or Nx8 blocks.
  • LFNST16x32 and LFNST32x16 can be configured in the same manner as LFNST16.
  • LFNST16 means LFNST applied to a 16x16 block
  • the ROI area of LFNST16 can be configured with one or more 4x4 blocks.
  • the ROI area of LFNST16 can be configured with six 4x4 blocks within a 16x16 block.
  • the six 4x4 blocks can mean from the first 4x4 block to the sixth 4x4 block according to a predetermined scan order. That is, the ROI area of LFNST16 can be configured with 96 sample positions.
  • the scan order means an order according to a diagonal scan, but is not limited thereto, and vertical scan, horizontal scan, etc. may also be used.
  • N can be an integer greater than or equal to 32.
  • N can be an integer greater than or equal to 32, 64, or a larger integer.
  • the dimension (or size) of the transformation matrix for the above LFNST16x32 and LFNST32x16 may be configured the same as that of the above LFNST16.
  • the dimension of the transformation matrix for LFNST16x32 and LFNST32x16 may be a 96x32 matrix. That is, when LFNST is applied to a 16xN or Nx16 block, 32 transformation coefficients belonging to the ROI area within the 16xN or Nx16 block may be input to the LFNST, and 96 transformation coefficients may be output through the LFNST.
  • the present invention is not limited thereto, and the dimension of the transformation matrix for LFNST16x32 and LFNST32x16 may be configured differently from that of the above LFNST16.
  • the input length of an LFNST for a 16x16 block may be different from the input length of an LFNST for a 16xN or Nx16 block, and the output length of an LFNST for a 16x16 block may be the same as the output length of an LFNST for a 16xN or Nx16 block.
  • N can be an integer greater than or equal to 32.
  • N can be an integer greater than or equal to 32, 64, or a higher integer.
  • the dimension (or size) of the transformation matrix for the above LFNST16x32 and LFNST32x16 may be configured the same as that of the above LFNST16.
  • the dimension of the transformation matrix for LFNST16x32 and LFNST32x16 may be a 32x96 matrix. That is, when LFNST is applied to a 16xN or Nx16 block, 96 transformation coefficients belonging to the ROI area within the 16xN or Nx16 block may be input to the LFNST, and 32 transformation coefficients may be output through the LFNST.
  • the present invention is not limited thereto, and the dimension of the transformation matrix for LFNST16x32 and LFNST32x16 may be configured differently from that of the above LFNST16.
  • the input length of LFNST for a 16x16 block may be the same as the input length of LFNST for a 16xN or Nx16 block, and the output length of LFNST for a 16x16 block may be different from the output length of LFNST for a 16xN or Nx16 block.
  • At least one of the transform sets for LFNST16x32 and LFNST32x16, the number of transform kernels belonging to each transform set, or the determination of the transform sets may be configured identically to LFNST16.
  • the transform sets for the 16x16 block, the number of transform kernels belonging to each transform set, or the determination method of the transform sets may be equally applied to the 16xN or Nx16 blocks.
  • LFNST for square blocks or LFNST for non-square blocks can be applied.
  • M and N can be integers greater than or equal to 32, respectively.
  • M and N can be the same or different.
  • the LFNST for the square block can mean the aforementioned LFNST16.
  • the invention is not limited thereto, and the LFNST for the square block can mean LFNST4 or LFNST8.
  • the LFNST for the non-square block can mean the aforementioned LFNST16x32 (or LFNST32x16).
  • the invention is not limited thereto.
  • the LFNST for the non-square block can mean the aforementioned LFNST8x16 (or LFNST16x8) or LFNST4x8 (or LFNST8x4).
  • the LFNST for the square block can be defined as an LFNST having the same output length as the LFNST for the non-square block and a different input length from the LFNST for the non-square block.
  • the LFNST for the square block can be defined as an LFNST having different input lengths and output lengths from the LFNST for the non-square block.
  • the LFNST for the square block can be defined as an LFNST having the same input length as the LFNST for the non-square block and a different output length from the LFNST for the non-square block.
  • the LFNST for the square block can be defined as an LFNST having different input lengths and output lengths from the LFNST for the non-square block.
  • LFNST for square blocks can be applied to all blocks where M and N are greater than or equal to 32.
  • LFNST16 can be applied to all blocks where M and N are greater than or equal to 32.
  • LFNST8 can be applied to all blocks where M and N are greater than or equal to 32.
  • LFNST4 can be applied to all blocks where M and N are greater than or equal to 32.
  • LFNST for square blocks can be applied for blocks where M and N are greater than or equal to 32 and M and N are equal.
  • LFNST for non-square blocks can be applied for blocks where M and N are greater than or equal to 32 and M and N are different.
  • LFNST16 can be applied for 32x32 blocks, 64x64 blocks, or 128x128.
  • LFNST8 can be applied for 32x32 blocks, 64x64 blocks, or 128x128.
  • LFNST4 can be applied for 32x32 blocks, 64x64 blocks, or 128x128.
  • LFNST16x32 can be applied for 32x64 blocks, 32x128 blocks, or 64x128 blocks.
  • LFNST8x16 can be applied for 32x64 blocks, 32x128 blocks, or 64x128 blocks.
  • LFNST4x8 can be applied for 32x64 blocks, 32x128 blocks, or 64x128 blocks.
  • LFNST32x16 can be applied for 64x32 blocks, 128x32 blocks, or 128x64 blocks.
  • LFNST16x8 can be applied for 64x32 blocks, 128x32 blocks, or 128x64 blocks.
  • LFNST8x4 can be applied for 64x32 blocks, 128x32 blocks, or 128x64 blocks.
  • a method for constructing a non-separable transformation set is proposed.
  • constructing a non-separable transformation set at least one of the following methods may be applied.
  • Different non-separable transformation sets can be configured based on block sizes (e.g., size of coding blocks, size of transformation blocks). For example, the number of available non-separable transformation sets can be set differently depending on block sizes.
  • the method for constructing a non-separable transform set according to the present disclosure can be applied to at least one of a non-separable primary transform (NSPT) or a non-separable secondary transform (LFNST). That is, a non-separable primary transform set can be constructed, or a non-separable secondary transform set can be constructed.
  • the construction method that can be applied to a non-square block can also be applied to LFNST. This is because when a forward LFNST is applied, the region of interest (ROI) to which LFNST is applied can be non-square.
  • the composition of the NSPT/LFNST set for the specific block size(s) can be changed by applying NSPT or LFNST for the specific block size(s). For example, when LFNST is applied when the ISP mode is applied, the number of NSPT sets can be reduced.
  • the current block according to the present disclosure may be a transform block.
  • the coding block may be divided into a plurality of subpartitions, and prediction/transformation may be performed in units of subpartitions.
  • the current block may be any one of the plurality of subpartitions belonging to the coding block.
  • the ISP mode is not applied to the coding block to which the current block belongs, the current block may be a transform block having the same size as the coding block.
  • the non-separable transform set of the current block can be determined based on a mapping table that defines a mapping relationship between pre-defined intra prediction modes and the non-separable transform sets.
  • the intra prediction mode input into the above mapping table may be a mode derived based on intra prediction mode information signaled through a bitstream (hereinafter referred to as a signaled mode).
  • the intra prediction mode input into the above mapping table may be a mode according to application of wide angle intra prediction (WAIP) (hereinafter referred to as a WAIP mode).
  • WAIP wide angle intra prediction
  • either the signaled mode or the WAIP mode may be adaptively input into the mapping table.
  • the value of the WAIP mode can be set to (X+65), which is the value of the signaled mode (X) plus 65.
  • mode 2 can be converted to a WAIP mode of mode 67.
  • modes 2 through 7 can be converted to WAIP mode.
  • modes 2 through 11 can be converted to WAIP mode.
  • modes 2 through 13 can be converted to WAIP mode.
  • modes 2 through 15 can be converted to WAIP mode.
  • whRatio which represents the ratio of the width and height
  • Abs() represents a function that returns an absolute value
  • Log2 is a function that returns a logarithmic value with a base of 2
  • nW and nH represent the width and height of a reference block for determining whether to apply WAIP, respectively.
  • the reference block may be the current block. If the ISP mode is applied to the coding block to which the current block belongs, the reference block may be the coding block to which the current block belongs.
  • modes 2 to 7 can be converted to WAIP mode.
  • modes 2 to (7+2*whRatio) can be converted to WAIP mode.
  • the value of the WAIP mode can be set to (X-67), which is the value of the mode being signaled (X) minus 67.
  • mode 66 can be converted to WAIP mode -1.
  • modes 61 to 66 can be converted to WAIP mode.
  • modes 57 to 66 can be converted to WAIP mode.
  • modes 55 to 66 can be converted to WAIP mode.
  • modes 53 to 66 can be converted to WAIP mode.
  • whRatio which represents the ratio of the width and height
  • Abs() represents a function that returns an absolute value
  • Log2 is a function that returns a logarithmic value with a base of 2
  • nW and nH represent the width and height of a reference block for determining whether to apply WAIP, respectively.
  • the reference block may be the current block. If the ISP mode is applied to the coding block to which the current block belongs, the reference block may be the coding block to which the current block belongs.
  • modes 61 to 66 can be converted to WAIP mode.
  • modes (612*whRatio) to mode 66 can be converted to WAIP mode.
  • the modes to be converted to the WAIP mode can be determined based on the size of the coding block.
  • the modes to be converted to the WAIP mode can be determined based on the size of the transform block (i.e., the current block). For example, when the ISP mode is applied, the coding block is a 32x16 block, and the transform block is a 32x4 block (i.e., the 32x16 coding block is divided into four 32x4 subpartitions by horizontal division according to the ISP mode), nW and nH become 32 and 16, respectively, and modes 2 to 7 can be converted to the WAIP mode.
  • the value of the signaled mode is the value of the mode before being converted to the WAIP mode, and only when the above-mentioned conditions are satisfied, it is converted to the value of the WAIP mode so that the prediction and transformation processes can be performed.
  • the non-separable transformation set can be determined based on the mapping table according to Table 9 described above. At this time, it can be determined based on the value of the WAIP mode.
  • the mapping table of Table 9 shows the mapping relationship between the intra prediction mode and the non-separable transformation set when the number of available non-separable transformation sets is 35.
  • set-2 to set-7 may not be utilized. This is because symmetry may be utilized between the 4x32 block and the 32x4 block, and the WAIP mode does not cause any direction or angle predicted on the short side (i.e., the side with vertical length 4).
  • a non-separable transform set corresponding to the symmetric mode of the NxM block i.e., the mode symmetric about mode 34
  • the modes whose mode value is 35 or greater in the MxN block may be mapped for the modes whose mode value is 35 or greater in the MxN block.
  • modes 2 to 13 for a 32x4 block can be transformed to modes 67 to 78, respectively.
  • modes 67 to 78 in a 32x4 block can correspond to modes -1 to -12 in a 4x32 block, respectively. That is, since they correspond to modes that are symmetrical around mode 34, mode X for a 32x4 block can correspond to mode (66-X) for a 4x32 block.
  • mode X (-12 ⁇ X ⁇ -1) for a 32x4 block can be mapped to set-2 by Table 9.
  • modes to which WAIP is not applied can be mapped to set-0, set-1, set-14 to set-34 for 32x4 blocks or mapped to set-2 to set-33 of 4x32 blocks using symmetry.
  • modes 14 to 34 can be mapped to set-14 to set-34, respectively.
  • the modes where symmetry is used can be mode 35 to mode 66, and these can correspond to mode 33 to mode 2 for 4x32 blocks, respectively. That is, mode X for 32x4 blocks can correspond to mode (68-X) for 4x32 blocks. Therefore, mode X for 32x4 blocks can be mapped to set-(68-X) for mode (68-X). According to Table 9, mode X (35 ⁇ X ⁇ 66) for 32x4 blocks can be mapped to set-(68-X).
  • the WAIP mode can be determined based on the coding block to which the current block belongs as described above.
  • the WAIP mode can be determined based on a 32x16 coding block, and a non-separable transform set mapped to the corresponding WAIP mode can be determined from the mapping table of Table 9.
  • modes 2 to 7 can be converted into modes 67 to 72 as WAIP modes, respectively.
  • Modes 67 to 72 can correspond to modes -1 to -6 for a 4x32 block, respectively, due to symmetry. That is, mode X for a 32x4 block can correspond to mode (66-X) for a 4x32 block.
  • mode X (-1 ⁇ X ⁇ -6) for a 32x4 block can be mapped to set-2.
  • mode 0 When the ISP mode is applied, for the modes to which WAIP is not applied (mode 0, mode 1, mode 8 to mode 66), they can be mapped to set-0, set-1, set-8 to set-34 of a 32x4 block or mapped to set-2 to set-33 of a 4x32 block using symmetry. Specifically, mode 8 to mode 34 can be mapped to set-8 to set-34, respectively.
  • the modes where symmetry is used can be mode 35 to mode 66, and these can correspond to mode 33 to mode 2 for a 4x32 block, respectively. That is, mode X (35 ⁇ X ⁇ 66) for a 32x4 block can correspond to mode (68-X) for a 4x32 block. Therefore, mode X for a 32x4 block can be mapped to set-(68-X) for mode (68-X). According to Table 9, mode X (35 ⁇ X ⁇ 66) for 32x4 blocks can be mapped to set-(68-X).
  • non-separable transforms for 32x4 blocks can be composed of 29 non-separable transform sets, not 35 non-separable transform sets. That is, set-2 to set-7 can be excluded from the 35 non-separable transform sets.
  • mapping table of Table 9 can be used as is.
  • a separate mapping table for 32x4 blocks can be defined as in Table 11 below.
  • N.A. may mean that there is no non-separable transform set mapped to the intra prediction mode. That is, no mapping with the non-separable transform set occurs in the section of the corresponding intra prediction mode.
  • a non-separable transform set having a set index of the same value as the corresponding intra prediction mode (X) may be mapped.
  • a non-separable transform set having a set index equal to (X-6) may be mapped.
  • a non-separable transform set having a set index equal to (68-X) may be mapped.
  • a non-separable transform set having a set index of 2 may be mapped.
  • a non-separable transformation set for a 4x32 block can be mapped using the symmetry described above.
  • Table 11 is applied to map a non-separable transformation set for a 32x4 block, due to the symmetry, the mapping of a non-separable transformation set for a 4x32 block can also be defined as in Table 12.
  • Intra prediction mode Set Index X ⁇ 0 2 0 ⁇ X ⁇ 34 X 35 ⁇ X ⁇ 60 62 - X X > 60 N.A.
  • a non-separable transform set having a set index of 2 can be mapped.
  • a non-separable transform set having a set index of the same value as the corresponding intra prediction mode (X) can be mapped.
  • a non-separable transform set having a set index equal to (62-X) can be mapped.
  • no mapping with a non-separable transform set occurs.
  • the number of inseparable transformation sets available to the current block may vary depending on the size of the current block. Specifically, if the current block is a block of the first size, the number of inseparable transformation sets available to the current block may be M. On the other hand, if the current block is not a block of the first size, the number of inseparable transformation sets available to the current block may be N.
  • the block of the first size may mean a block having different widths and heights.
  • the block of the first size may mean a block having different widths and heights, but having a ratio of the widths and heights of R 1 :1 or 1:R 1 .
  • R 1 may be an integer greater than or equal to 8, 16, or the like.
  • M may be an integer less than N.
  • one or more mapping tables may be separately defined.
  • a first mapping table applied to a first-size block and a second mapping table applied to a block other than the first-size block may be defined, respectively.
  • At least one of the number of non-separable transformation sets constituting the first mapping table, the number of set indices, or the maximum value of the set indices may be different from that of the second mapping table.
  • the number of non-separable transformation sets (or the number of set indices) constituting the first mapping table may be less than the number of non-separable transformation sets (or the number of set indices) constituting the second mapping table.
  • the maximum value of the set indices constituting the first mapping table may be less than the maximum value of the set indices constituting the second mapping table. Any one of the plurality of mapping tables may be selectively used based on whether the current block is a first-size block.
  • non-separable transform For a non-separable transform for a 32x8 block, if a non-separable transform set is determined by the method described above (i.e., if the mapping table of Table 9 where symmetry is utilized is applied), all non-separable transform sets from set-0 to set-34 may be required. Specifically, if the current block is a 32x8 block and the ISP mode is not applied to the coding block to which the current block belongs, sets from set-2 to set-11 are not required for the non-separable transform for the 32x8 block.
  • the coding block to which the current block belongs may be a 32x32 square block. Since WAIP is not applied to square blocks, all non-separable transform sets from set-0 to set-34 may be required for the non-separable transform for the current block, which is a 32x8 block.
  • WAIP can be restricted from being applied when a non-separable transformation is applied to a block where such cases occur. If WAIP is restricted from being applied, cases where the signaled mode is converted to WAIP mode (i.e., a mode less than or equal to -1 or a mode greater than or equal to 67) will not occur, and cases where some non-separable transformation sets are not utilized will not occur.
  • the signaled mode of the current block may not be converted to the WAIP mode.
  • the signaled mode of the current block may not be converted to the WAIP mode regardless of whether a non-separable transformation is applied to the current block.
  • the block of the first size may mean a block having different widths and heights, as described above, or may mean a block having a ratio of width to height of R 1 :1 or 1:R 1 .
  • the input of the mapping table for determining the non-separable transformation set of the current block may be a signaled mode, not a WAIP mode.
  • the input of the mapping table for determining the non-separable transformation set of the current block may be a WAIP mode.
  • the signaled mode of the current block may not be converted to the WAIP mode.
  • the signaled mode of the current block may not be converted to the WAIP mode regardless of whether a non-separable transformation is applied to the current block.
  • the block of the second size may mean a block whose ratio of width to height is R 2 :1 or 1:R 2 .
  • R 2 may be at least one of 2 or 4.
  • the input of the mapping table for determining the non-separable transformation set of the current block may be a signaled mode rather than a WAIP mode.
  • the input of the mapping table for determining the non-separable transformation set of the current block may be a WAIP mode.
  • WAIP may be restricted from being applied to the coding block to which the current block belongs.
  • the transform kernel for the inverse transform of the current block may be determined based on the above-described MTS, or a DCT-2-based separable first-order transform may be performed on the current block.
  • the input of the mapping table for determining the NSPT set of the current block may be in signaled mode rather than WAIP mode.
  • the input of the mapping table for determining the NSPT set of the current block may be in WAIP mode.
  • the range of intra prediction modes converted to the WAIP mode is reduced. Specifically, when the ISP mode is not applied, modes 2 to 13 are converted to the WAIP mode for a 32x4 block, so the non-separable transform sets from set-2 to set-13 are not used, and the number of non-separable transform sets required for the non-separable transform of the 32x4 block is reduced to 23. Therefore, if the non-separable transform is configured not to be applied when the ISP mode is applied, the number of non-separable transform sets required for the non-separable transform can be further reduced.
  • the ISP mode when the ISP mode is applied, it can be configured so that NSPT is not applied and LFNST is applied. Or, when the ISP mode is applied, it can be configured so that only the separate first-order transformation is applied without applying both NSPT and LFNST. This configuration can further reduce the number of NSPT sets required for NSPT.
  • the number of non-separable transformation sets for non-square blocks whose width is larger than their height is reduced.
  • the number of non-separable transformation sets can be reduced by the number of modes being transformed due to WAIP.
  • the non-separable transformation sets that are not used for MxN blocks are as follows.
  • Whether to apply a non-separable transform to the current block can be determined based on whether the ISP mode is applied to the coding block to which the current block belongs. For example, if the ISP mode is applied to the coding block to which the current block belongs, NSPT may not be applied to the current block. In this case, LFNST may be applied to the current block. Alternatively, if the ISP mode is applied to the coding block to which the current block belongs, NSPT and LFNST may not be applied to the current block. If the ISP mode is not applied to the coding block to which the current block belongs, at least one of NSPT or LFNST may be applied to the current block. In this way, if a non-separable transform is adaptively applied depending on whether the ISP mode is applied, the amount of memory required to store a transform kernel for the corresponding non-separable transform can be reduced.
  • Whether to apply a non-separable transformation to the current block may be determined based on whether the ISP mode is applied to the coding block to which the current block belongs and/or the size of the subpartition (or the current block) according to the ISP mode. For example, if the ISP mode is not applied to the coding block to which the current block belongs, the non-separable transformation may be applied to the current block. Even if the ISP mode is applied to the coding block to which the current block belongs, the non-separable transformation may not be applied to the current block only if the size of the subpartition is larger than a predetermined threshold size.
  • the size of the subpartition may be defined as the width, the height, the product of the width and the height, and the ratio of the width and the height of the subpartition.
  • the NSPT may not be applied and the LFNST may be applied.
  • the subpartition according to the ISP mode is a 32x4 block, neither the NSPT nor the LFNST may be applied.
  • the subpartition according to the ISP mode is an 8x4 block, at least one of NSPT or LFNST can be applied.
  • the mode before conversion to WAIP mode i.e., the signaled mode
  • the input of the mapping table can be the signaled mode rather than the WAIP mode. This can prevent the case where a specific non-separable transformation set is not used.
  • mode 2 can be entered in the mapping table of Table 9, and set-2 corresponding to mode 2 can be selected as the non-separable transformation set of the MxN block. This can have the effect of allocating a non-separable transformation set that can be applied to residual data for a block predicted based on the WAIP mode.
  • a method of determining a non-separable transform set based on the mode before converting to WAIP mode can be adaptively applied based on the size of the current block and/or the coding block to which the current block belongs.
  • the non-separable transform set may be determined based on the mode before converting to the WAIP mode.
  • the non-separable transform set may not be determined based on the mode before converting to the WAIP mode. If the current block and/or the coding block to which the current block belongs are square blocks, the non-separable transform set may be determined based on the WAIP mode.
  • the non-separable transform sets may be determined based on the mode before converting to WAIP mode. For the remaining block sizes, the non-separable transform sets may not be determined based on the mode before converting to WAIP mode.
  • set-2 through set-7 may not be used.
  • set-2 through set-7 can be configured to apply to a specific WAIP mode.
  • any one of set-2 through set-7 can be mapped as a non-separable transform set applicable to a WAIP mode less than 0 or greater than or equal to 67.
  • modes 67 to 72 can be mapped to set-2 to set-7, respectively. That is, a non-separable transform set of set-(X-65) can be allocated for mode X.
  • sets-2 to set-7 for the 32x4 block allocated in this manner can be allocated for modes -1 to -6 for a 4x32 block, respectively.
  • a non-separable transform set of set-(1-X) can be allocated for mode X.
  • modes 67 through (65+Y) can be mapped to set-2 through set-Y, respectively. That is, set-(X-65) can be assigned to mode X.
  • modes -1 through -(Y-1) can be mapped to set-2 through set-Y, respectively. That is, set-(1-X) can be assigned to mode X.
  • the above-described embodiments can be applied not only to the case where the current block or the coding block to which the current block belongs is a non-square block, but also to the case where the current block is a square block.
  • the non-separable transformation set can be determined by using the mode before conversion to the WAIP mode as an input to the mapping table.
  • the coding block may be a non-square block or the current block (or, transform block) may be a square block.
  • the current block or, transform block
  • a 32x8 coding block may be divided into four 8x8 subpartitions (or, transform blocks) by vertical division.
  • the current block may have the WAIP mode, but the non-separable transform set for the current block may be determined by inputting the mode before being converted to the WAIP mode into the mapping table.
  • the ROI area to which LFNST is applied can be a square block.
  • the LFNST set to be applied to the ROI area can be determined by inputting the mode into the mapping table before converting to WAIP mode.
  • the ISP mode is applied to the coding block to which the current block belongs, and the current block is a square subpartition, it may be restricted that the non-separable transform is not applied to the current block.
  • NSPT may not be applied to the current block.
  • LFNST may be applied to the current block instead of NSPT.
  • the ISP mode is applied to the coding block to which the current block belongs, and the current block is a square subpartition, neither NSPT nor LFNST may be applied to the current block.
  • LFNST may be configured to be applied to the current block instead of NSPT.
  • the current block can be restored based on the residual sample of the current block (S420).
  • the prediction sample of the current block can be derived.
  • the restoration sample of the current block can be generated.
  • FIG. 6 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 (600), a residual sample derivation unit (610), and a restoration block generation unit (620).
  • the transform coefficient derivation unit (600) may be configured in the entropy decoding unit (310) of FIG. 3
  • the residual sample derivation unit (610) may be configured in the residual processing unit (320) of FIG. 3
  • the restoration block generation unit (620) may be configured in the adding unit (340) of FIG. 3.
  • the transform coefficient derivation unit (600) 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 (610) 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 (610) 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 (620) can restore the current block based on the residual sample of the current block.
  • FIG. 7 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 original samples of the current block.
  • the prediction samples can be derived based on a given intra prediction mode.
  • 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 (S710).
  • the transformation method according to the present disclosure can be understood as the reverse process of the inverse transformation examined with reference to Fig. 4.
  • the method of determining the transformation kernel for the above transformation is as examined 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.
  • one from the plurality of transformation sets can be selected as the transformation set of the current block.
  • 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 the selection can be signaled.
  • the transform kernel of the current block can be determined based on the MTS set.
  • One of the plurality of MTS sets can be selected based on at least one of the size of the current block or the intra prediction mode.
  • the selected MTS set can include one or more transform kernel candidates.
  • One of the one or more transform kernel candidates can be selected, and the transform kernel of the current block can be determined based on the selected transform kernel candidate.
  • the selection of the transform kernel candidate can 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 can be selected, and a transform kernel candidate index indicating the selected transform kernel candidate can be signaled.
  • the transform kernel of the current block may be determined based on a non-separable primary transform (NSPT) kernel.
  • NSPT non-separable primary 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 primary transform e.g., DCT-2
  • the forward LFNST may be additionally applied to all or part of the transform coefficients derived through the separable primary 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 can mean the input length of the NSPT or the number of residual samples to which the NSPT is applied as the product of the width and the height of the current block.
  • the method for determining the size of the NSPT kernel is as 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 for the LFNST index and NSPT index, and assignment of CABAC context and initial value are as described with reference to FIG. 4.
  • the method of configuring a non-separable transformation set according to the application of the WAIP mode with reference to FIG. 4, the limitation of using the WAIP mode according to the size of the current block, and the limitation of applying the non-separable transformation according to the ISP mode can be equally applied to the process of converting the residual sample of the current block.
  • a bitstream can be generated by encoding the transform coefficients of the current block (S720).
  • residual information about the transform coefficients can be generated, and a bitstream can be generated by encoding the residual information.
  • FIG. 8 illustrates a schematic configuration of an encoding device (200) that performs an image encoding method according to the present disclosure.
  • the encoding device (200) may include a residual sample derivation unit (800), a transform coefficient derivation unit (810), and a transform coefficient encoding unit (820).
  • the residual sample derivation unit (800) and the transform coefficient derivation unit (810) may be configured in the residual processing unit (230) of FIG. 2, and the transform coefficient encoding unit (820) may be configured in the entropy encoding unit (240) of FIG. 2.
  • the residual sample derivation unit (800) can derive a residual sample of the current block by differentiating a prediction sample from an original sample of the current block.
  • the prediction sample may be derived based on a predetermined intra prediction mode.
  • the transform coefficient derivation unit (810) 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 (810) can determine the transform kernel of the current block based on at least one of the above-described embodiments 1 to 3, and derive the transform coefficient by applying the transform kernel to the residual sample of the current block.
  • the transform coefficient encoding unit (820) can generate a bitstream by encoding the transform coefficient of the current block.
  • the methods are described based on a flow chart as a series of steps or blocks, but 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 than those described above. Furthermore, those skilled in the art will understand that the steps depicted in the flow chart are not exclusive, and other steps may be included or one or more steps of the flow chart may be deleted without affecting the scope of the embodiments of the present 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 the 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 may be implemented as a module (process, function, etc.) that performs the above-described function.
  • the module may be stored in a memory and executed by a processor.
  • the memory may be inside or outside the processor and may be connected to the processor by various well-known means.
  • the processor may include an application-specific integrated circuit (ASIC), another chipset, a logic circuit, and/or a data processing device.
  • the memory may include a read-only memory (ROM), a random access memory (RAM), a flash memory, a memory card, a storage medium, and/or other storage devices.
  • the embodiments described in this document may be implemented and performed on a processor, a microprocessor, a controller, or a chip.
  • the functional units illustrated in each drawing may 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 may be stored on a digital storage medium.
  • the decoding device and the encoding device to which the embodiment(s) of the present specification are applied may be included in a multimedia broadcasting transmitting/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 video (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/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
  • the OTT video (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), and the like.
  • 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 media implemented in the form of a carrier wave (for example, 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.
  • embodiment(s) of the present specification can be implemented as a computer program product by program code, and the program code can be executed on a computer by the embodiment(s) of the present specification.
  • the program code can be stored on a carrier readable by a computer.
  • FIG. 9 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, camcorders, etc. into digital data to generate a bitstream and transmits it to the streaming server.
  • multimedia input devices such as smartphones, cameras, camcorders, etc. directly generate a bitstream
  • 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 above 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 that informs the user of any available services.
  • the web server transmits it to the streaming server, and the streaming server transmits multimedia data to the user.
  • the content streaming system may include a separate control server, and in this case, the control server serves to control commands/responses between each device within the content streaming system.
  • the above streaming server can receive content from a media storage 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, in order 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 (head mounted displays)), 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 (head mounted displays)
  • 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 distributedly processed.

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) 영상과 같은 고해상도, 고품질의 영상에 대한 수요가 다양한 응용 분야에서 증가하고 있고, 이에 따라 고효율의 영상 압축 기술들이 논의되고 있다.
영상 압축 기술로 현재 픽쳐의 이전 또는 이후 픽쳐로부터 현재 픽쳐에 포함된 화소값을 예측하는 인터 예측 기술, 현재 픽쳐 내의 화소 정보를 이용하여 현재 픽쳐에 포함된 화소값을 예측하는 인트라 예측 기술, 출현 빈도가 높은 값에 짧은 부호를 할당하고 출현 빈도가 낮은 값에 긴 부호를 할당하는 엔트로피 부호화 기술 등 다양한 기술이 존재하고 이러한 영상 압축 기술을 이용해 영상 데이터를 효과적으로 압축하여 전송 또는 저장할 수 있다.
본 개시는, 비분리 일차 변환을 이용하여 변환을 수행하는 방법 및 장치를 제공하고자 한다.
본 개시는, 축소된 차원의 비분리 일차 변환 커널을 이용하여 변환을 수행하는 방법 및 장치를 제공하고자 한다.
본 개시는, 부호화 파라미터를 기반으로 비분리 변환 커널을 결정/시그날링하는 방법 및 장치 제공하고자 한다.
본 개시에 따른 영상 디코딩 방법 및 장치는, 비트스트림으로부터 레지듀얼 정보를 획득하고, 상기 레지듀얼 정보에 기초하여 현재 블록의 변환 계수들을 유도하고, 상기 현재 블록의 변환 계수들에 대해 역양자화 또는 역변환 중 적어도 하나를 수행하여, 상기 현재 블록의 레지듀얼 샘플들을 유도하고, 상기 현재 블록의 레지듀얼 샘플들을 기반으로 상기 현재 블록을 복원할 수 있다. 여기서, 상기 역변환은 비분리 변환 또는 분리 변환 중 적어도 하나를 기반으로 수행될 수 있다. 상기 비분리 변환을 위한 비분리 변환 세트는, 기-정의된 인트라 예측 모드들과 비분리 변환 세트들 간의 매핑 관계를 정의하는 매핑 테이블에 기초하여 결정될 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 현재 블록이 이용 가능한 비분리 변환 세트의 개수는, 상기 현재 블록이 제1 크기의 블록인지 여부에 기초하여 결정될 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 제1 크기의 블록은, 너비와 높이가 서로 상이한 블록 또는 너비와 높이의 비율이 8:1, 1:8, 16:1, 또는 1:16 중 적어도 하나인 블록을 포함할 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 제1 크기의 블록에 적용되는 하나 또는 그 이상의 제1 매핑 테이블과 상기 제1 크기의 블록이 아닌 블록에 적용되는 제2 매핑 테이블이 각각 정의될 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 현재 블록이 제2 크기의 블록인지 여부에 기초하여, 상기 현재 블록의 비분리 변환 세트를 결정하기 위한 매핑 테이블의 입력은, 비트스트림으로부터 시그날링되는 인트라 예측 모드 정보에 기초하여 유도 또는 와이드 앵글 인트라 예측 (WAIP) 모드 중 어느 하나로 결정될 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 제2 크기의 블록은, 너비와 높이의 비율이 2:1, 1:2, 4:1, 또는 1:4 중 적어도 하나인 블록을 포함할 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 현재 블록이 속한 코딩 블록에 인트라 서브파티션 모드가 적용되는지 여부에 기초하여 상기 비분리 변환의 적용 여부가 결정될 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 현재 블록이 인트라 서브파티션 모드에 따른 코딩 블록 내 복수의 서브파티션 중 어느 하나인 경우, 상기 비분리 변환의 적용 여부는 상기 현재 블록의 크기에 기초하여 결정될 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 매핑 테이블에 입력되는 인트라 예측 모드의 값이 67보다 크거나 같은 경우, 상기 비분리 변환을 위한 비분리 변환 세트는 상기 인트라 예측 모드의 값에서 65를 뺀 값과 동일한 세트 인덱스를 가질 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 매핑 테이블에 입력되는 인트라 예측 모드의 값이 -1보다 작거나 같은 경우, 상기 비분리 변환을 위한 비분리 변환 세트는 1에서 상기 인트라 예측 모드의 값을 뺀 값과 동일한 세트 인덱스를 가질 수 있다.
본 개시에 따른 영상 인코딩 방법 및 장치는, 현재 블록의 레지듀얼 샘플들을 유도하고, 상기 현재 블록의 레지듀얼 샘플들에 변환 또는 양자화 중 적어도 하나를 수행하여, 상기 현재 블록의 변환 계수들을 유도하고, 상기 현재 블록의 변환 계수들을 부호화할 수 있다. 여기서, 상기 변환은 비분리 변환 또는 분리 변환 중 적어도 하나를 기반으로 수행될 수 있다. 상기 비분리 변환을 위한 비분리 변환 세트는, 기-정의된 인트라 예측 모드들과 비분리 변환 세트들 간의 매핑 관계를 정의하는 매핑 테이블에 기초하여 결정될 수 있다.
본 개시에 따른 디코딩 장치에 의하여 영상 디코딩 방법을 수행하도록 야기하는 인코딩된 비디오/영상 정보가 저장된 컴퓨터 판독 가능한 디지털 저장 매체가 제공된다.
본 개시에 따른 영상 인코딩 방법에 따라 생성된 비디오/영상 정보가 저장된 컴퓨터 판독 가능한 디지털 저장 매체가 제공된다.
본 개시에 따른 영상 인코딩 방법에 따라 생성된 비디오/영상 정보를 전송하는 방법 및 장치가 제공된다.
본 개시는, 일차 변환으로서 비분리 일차 변환을 이용함으로써, 변환의 성능을 향상시킬 수 있다.
본 개시는, 축소된 차원의 비분리 일차 변환 커널을 이용하여 변환을 수행함으로써, 변환의 성능을 향상시킬 수 있다.
본 개시는, 부호화 파라미터를 기반으로 비분리 변환 커널을 효과적으로 결정 및/또는 시그날링함으로써, 부호화 효율을 향상시킬 수 있다.
도 1은 본 개시에 따른 비디오/영상 코딩 시스템을 도시한 것이다.
도 2는 본 개시의 실시예가 적용될 수 있고, 비디오/영상 신호의 인코딩이 수행되는 인코딩 장치의 개략적인 블록도를 나타낸다.
도 3은 본 개시의 실시예가 적용될 수 있고, 비디오/영상 신호의 디코딩이 수행되는 디코딩 장치의 개략적인 블록도를 나타낸다.
도 4는 본 개시에 따른 일실시예로서, 디코딩 장치(300)에 의해 수행되는 영상 디코딩 방법을 도시한 것이다.
도 5는 본 개시에 따른 인트라 예측 모드와 그 예측 방향을 예시적으로 나타낸다.
도 6은 본 개시에 따른 영상 디코딩 방법을 수행하는 디코딩 장치(300)의 개략적인 구성을 도시한 것이다.
도 7은 본 개시에 따른 일실시예로서, 인코딩 장치(200)에 의해 수행되는 영상 인코딩 방법을 도시한 것이다.
도 8은 본 개시에 따른 영상 인코딩 방법을 수행하는 인코딩 장치(200)의 개략적인 구성을 도시한 것이다.
도 9는 본 개시의 실시예들이 적용될 수 있는 컨텐츠 스트리밍 시스템의 예를 나타낸다.
본 개시는 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세하게 설명하고자 한다. 그러나, 이는 본 개시를 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 개시의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.
제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과 같다.
Figure PCTKR2024007916-appb-img-000001
상기 입력 데이터 X를 벡터 형태로 나타내는 경우, 벡터 X' 다음과 같이 나타내어질 수 있다.
Figure PCTKR2024007916-appb-img-000002
이 경우, 상기 비분리 변환은 다음 수학식 3과 같이 수행될 수 있다.
Figure PCTKR2024007916-appb-img-000003
수학식 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 세트가 할당될 수 있다.
Figure PCTKR2024007916-appb-img-000004
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와 같이 표현될 수 있다.
Figure PCTKR2024007916-appb-img-000005
수학식 4를 참조하면, x와 y는 MN x 1 열 벡터일 수 있다. G는 MN x MN 행렬의 형태를 가질 수 있다. 역방향 NSPT 과정은 같은 변수를 이용하여 다음의 수학식 5과 같이 표현될 수 있다.
Figure PCTKR2024007916-appb-img-000006
수학식 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 행렬이 적용될 수 있다.
상기 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 블록에 대해 행 우선(row-first) 순서에 따라 일차원 벡터(1D vector)를 구성하고, 해당 1D vector에 대해 NSPT 커널을 적용할 수 있다. 여기서, 행 우선 순서에 따른 1D vector의 구성은, 입력 데이터인 MxM 블록으로부터 행 단위로 입력 데이터를 읽어서 M개의 열을 획득하고, 이를 차례대로 배열하여 1D vector를 구성하는 것일 수 있다. 반면, x번 모드에 대칭인 (68 - x)번 모드에 대해서는 열 우선(column-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 커널 후보들의 개수를 줄이는 것은, 이런 통계적 특성을 반영하여 구현 복잡도를 줄이면서 압축 효율을 유지하는 데 도움이 될 수 있다.
NSPT 커널은 8-bit 정밀도(precision)로 구성될 수 있다. NSPT 커널 내 계수들의 범위는 -128보다 크거나 같고 127보다 작거나 같을 수 있다. 해당 정밀도를 8-bit보다 올리는 경우, 행렬 곱셈을 통해 얻어지는 결과값에 대해 올라간 정밀도만큼 오른쪽으로 쉬프트할 수 있다. 예를 들어, 8-bit 정밀도를 가진 NSPT 커널을 기반으로 행렬 곱셈 후 얻어진 값을 S 비트만큼 오른쪽으로 쉬프트하여 버퍼에 저장하는 경우, 만일 N-bit 정밀도로 커널의 계수를 구성한다면 (S+(N-8)) 비트만큼 오른쪽으로 쉬프트하여 버퍼에 저장할 수 있다.
8-bit 정밀도로 NSPT 커널을 구성하는 경우, 변환을 수행하는 부/복호화기 내 내부 정밀도의 과도한 상승을 막을 수 있어, 메모리 요구량과 연산량 관점에서 구현 복잡도를 저감하면서도 압축 효율의 하락을 최소화할 수 있다.
MxN 크기의 현재 블록에 대해 역방향의 NSPT를 적용하는 경우, NSPT 커널(또는, NSPT 행렬)의 크기는 MN x r으로 표현될 수 있다. 여기서, MN은 현재 블록의 너비와 높이의 곱을 의미할 수 있다. 이는, NSPT의 출력 길이 또는 NSPT에 의해 생성되는 레지듀얼 샘플의 개수를 의미할 수 있다. 또한, r은 NSPT의 입력 길이 또는 NSPT가 적용되는 (역양자화된) 변환 계수의 개수를 의미할 수 있다. r은 0보다 크거나 같고, MN보다 작거나 같은 정수일 수 있다. 다음은 블록 크기에 따른 MN x r의 NSPT 행렬에 대한 예이다.
4x4 블록에 대한 NSPT 행렬은 16x16 행렬로 구성될 수 있다. 4x8 블록과 8x4 블록에 대한 NSPT 행렬은 32x20 행렬, 32x16 행렬, 32x24 행렬, 32x28 행렬, 또는 32x32 행렬로 구성될 수 있다. 8x8 블록에 대한 NSPT 행렬은 64x16 행렬, 64x24 행렬, 64x32 행렬, 64x40 행렬, 64x48 행렬, 64x56 행렬, 또는 64x64 행렬로 구성될 수 있다. 4x16 블록과 16x4 블록에 대한 NSPT 행렬은 64x16 행렬, 64x24 행렬, 64x32 행렬, 64x40 행렬, 64x48 행렬, 64x56 행렬, 또는 64x64 행렬로 구성될 수 있다. 8x16 블록과 16x8 블록에 대한 NSPT 행렬은 128x96 행렬, 128x64 행렬, 128x48 행렬, 또는 128x32 행렬로 구성될 수 있다. 16x16 블록에 대한 NSPT 행렬은 256x128 행렬, 256x96 행렬, 또는 256x64 행렬로 구성될 수 있다. 16x32 블록과 32x16 블록에 대한 NSPT 행렬은 512x256 행렬 또는 512x128 행렬로 구성될 수 있다. 32x32 블록에 대한 NSPT 행렬은 1024x512 행렬, 1024x256 행렬, 또는 1024x128 행렬로 구성될 수 있다.
또는, 4xN 블록과 Nx4 블록에 대해서 16x16 행렬이 적용될 수 있다. 여기서, N은 4보다 크거나 같은 정수일 수 있다. 8x8 블록에 대해서 64x16 행렬이 적용될 수 있다. 8xN 블록과 Nx8 블록에 대해서 64x32 행렬이 적용될 수 있다. 여기서, N은 16보다 크거나 같은 정수일 수 있다. 16xN 블록과 Nx16 블록에 대해서 96x32 행렬이 적용될 수 있다. 여기서, N은 16보다 크거나 같은 정수일 수 있다.
또는, 소정의 기준에 따라 상기 MN x r의 NSPT 행렬에서 r의 값을 결정할 수도 있다. 여기서의 기준은, (1) 일차 변환에 대한 계산량과 이차 변환에 대한 계산량의 합이 일정 수준 이하가 되도록 하고, (2) NSPT 연산에 필요한 샘플 당 곱셈의 개수가 일정 개수 이하가 되도록 하는 것일 수 있다.
역방향의 변환을 기준으로, MxN 블록에 대해 분리 일차 변환을 행렬 곱셈으로 수행할 경우, 해당 일차 변환을 수행하는데 샘플 당 (M+N)개의 곱셈이 필요하게 된다. 또한, 일정 ROI(Region-Of-Interest) 영역에 대해 LFNST를 적용하는 경우, 역변환의 LFNST 행렬이 PxQ 행렬이라 가정하면, 샘플 당 (P*Q)/(M*N)개의 곱셈이 필요하게 된다. 여기서, PxQ 행렬은, 행의 개수가 P이고 열의 개수가 Q인 행렬을 의미할 수 있다.
MxN 블록에 대해 DCT-2 변환(또는, KLT와 같은 분리 변환)과 LFNST를 적용하는 대신 NSPT를 적용하는 경우, 해당 NSPT를 적용하는 경우에 대한 샘플 당 곱셈의 개수가 DCT-2 변환과 LFNST를 적용하는 경우에 대한 샘플 당 곱셈의 개수보다 작거나 같도록 하는 r의 값은 다음과 같이 결정될 수 있다.
Figure PCTKR2024007916-appb-img-000007
상기 수학식 6을 만족하면서 r의 값을 최대값으로 설정한다면(즉, r = M + N + (P*Q)/(M*N)), 블록 크기 별 NSPT 행렬에서 r의 값은 다음과 같이 설정될 수 있다. 수학식 6에서 (P*Q)/(M*N)의 값이 정수가 아닌 경우, (P*Q)/(M*N)의 값에 가까운 정수가 이용될 수 있다. 일예로, (P*Q)/(M*N)의 값에 floor 연산이 적용될 수 있다. 이 경우, r은 (M + N + floor((P*Q)/(M*N)))으로 설정될 수 있다. 여기서, floor(x)는 x를 넘지 않는 가장 큰 정수를 의미할 수 있다. 또는, (P*Q)/(M*N)의 값에 round 연산이 적용될 수 있다. 이 경우, r은 (M + N + round((P*Q)/(M*N)))으로 설정될 수 있다. 여기서, round(x)는 x을 반올림한 값을 의미할 수 있다. 또는, (P*Q)/(M*N)의 값에 ceil 연산이 적용될 수 있다. 이 경우, r은 (M + N + ceil((P*Q)/(M*N)))으로 설정될 수 있다. 여기서, ceil(x)는 x보다 크거나 같은 가장 작은 정수를 의미할 수 있다. floor 연산이 적용되는 경우, 상기 수학식 6의 부등식을 만족할 수 있다. 다만, round 연산 또는 ceil 연산이 적용되는 경우, 상기 수학식 6의 부등식을 만족하지 않을 수 있다.
4x4 블록에 대한 NSPT에 대해, r의 최대값은 24이다. 그러나, r의 값은 16보다 작거나 같아야 하므로 r의 값은 16으로 설정될 수 있다.
4x8 블록과 8x4 블록에 대한 NSPT에 대해, r의 최대값은 20이다. r의 값은 20으로 설정될 수 있다.
8x8 블록에 대한 NSPT에 대해, r의 최대값은 32이다. r의 값은 32로 설정될 수 있다.
4x16 블록과 16x4 블록에 대한 NSPT에 대해, r의 최대값은 24이다. r의 값은 24로 설정될 수 있다.
8x16 블록과 16x8 블록에 대한 NSPT에 대해, r의 최대값은 40이다. r의 값은 40으로 설정될 수 있다.
16x16 블록에 대한 NSPT에 대해, r의 최대값은 44이다. r의 값은 44로 설정될 수 있다.
16x32 블록과 32x16 블록에 대한 NSPT에 대해, r의 최대값은 54이다. r의 값은 54로 설정될 수 있다.
32x32 블록에 대한 NSPT에 대해, r의 최대값은 67이다. r의 값은 67로 설정될 수 있다.
4x32 블록과 32x4 블록에 대한 NSPT에 대해, r의 최대값은 38이다. r의 값은 38로 설정될 수 있다. 또는, r의 값은 20으로 설정될 수 있다.
8x32 블록과 32x8 블록에 대한 NSPT에 대해, r의 최대값은 48이다. r의 값은 48로 설정될 수 있다. 또는, r의 값은 24로 설정될 수 있다.
전술한 블록 크기 별 NSPT 행렬에서 r의 값이 4의 배수가 아닌 경우가 존재할 수 있다. 구현의 용이성을 위해, r의 값이 4의 배수인 것이 유리할 수도 있다. 예를 들어, SIMD (Single Instruction Multiple Data) 명령 등을 통한 병렬 처리를 구현하는데 있어서, 순방향의 NSPT를 적용하는 과정에서 4개의 변환 기저 벡터에 대한 내적을 동시에 처리하는 경우(즉, 변환 계수 4개를 동시에 생성하는 경우), r의 값을 4의 배수가 되도록 설정하는 것이 유리할 수 있다.
일예로, 16x32 블록과 32x16 블록에 대한 NSPT에 대해, r의 값은 54 대신에 52 또는 56으로 설정될 수 있다. 32x32 블록에 대한 NSPT에 대해, r의 값은 67 대신에 64 또는 68로 설정될 수 있다. 4x32 블록과 32x4 블록에 대한 NSPT에 대해, r의 값은 38 대신에 36 또는 40으로 설정될 수 있다.
보다 일반화하여, r의 값은 K의 배수가 되도록 설정될 수 있다. 여기서, K는 1보다 크거나 같은 정수일 수 있다. 일예로, r의 값은 다음 수학식 7의 부등식을 만족하는 K의 배수로 설정될 수 있다.
Figure PCTKR2024007916-appb-img-000008
상기 수학식 7에서 func()는 전술한 floor, round, 또는 ceil일 수 있다.
전술한 소정의 기준에 따른 r의 값은 zero-out을 고려하지 않은 경우에 대한 것이다. 즉, 순방향의 LFNST가 적용되는 경우, LFNST가 적용되는 영역을 제외한 나머지 영역의 일차 변환된 변환 계수들은 zero-out되기 때문에, DCT-2와 LFNST를 적용하는데 필요한 실질적인 계산량은 상기 계산량보다 적을 수 있다. 따라서, 상기 zero-out을 고려할 경우, r의 값은 상기 소정의 기준에 따른 r의 값보다 작은 값으로 설정될 수 있다.
4x4 블록에 대해서는 zero-out이 수행되지 않으므로, r의 값은 16보다 작거나 같은 값으로 설정될 수 있다.
4x8 블록에 대해서는, 순방향의 변환을 기준으로 좌상단 4x4 블록을 제외하고 나머지 영역에 대해서는 zero-out이 수행될 수 있고, 좌상단 4x4 블록에 대해서는 순방향의 LFNST 행렬인 16x16 행렬이 적용될 수 있다. 이와 같은 zero-out이 수행되는 경우, 순방향의 분리 일차 변환에서 필요한 샘플 당 곱셈의 개수는 8개(((4x4x8)+(4x8x4))/(4x8)=8)이고, LFNST에서 필요한 샘플 당 곱셈의 개수는 8개((16x16)/32=8)이다. 따라서, 분리 일차 변환과 LFNST를 NSPT로 대체할 경우, r의 값은 분리 일차 변환에서의 샘플 당 곱셈의 개수와 LFNST에서의 샘플 당 곱셈의 개수의 합인 16보다 작거나 같은 값으로 설정될 수 있다. 역방향의 분리 일차 변환과 LFNST를 적용하는 경우에도 동일한 계산량이 필요하므로, r의 값은 16보다 작거나 같은 값으로 설정될 수 있다.
8x4 블록에 대해서는 순방향의 변환을 기준으로 좌상단 4x4 블록을 제외하고 나머지 영역에 대해서는 zero-out이 수행될 수 있고, 좌상단 4x4 블록에 대해서는 순방향의 LFNST 행렬인 16x16 행렬이 적용될 수 있다. 이와 같은 zero-out이 수행되는 경우, 순방향의 분리 일차 변환에서 필요한 샘플 당 곱셈의 개수는 6개((4x8x4)+(4x4x4)/(8x4)=6)이고, LFNST에서 필요한 샘플 당 곱셈의 개수는 8개((16x16)/32=8)이다. 따라서, 분리 일차 변환과 LFNST를 NSPT로 대체할 경우, r의 값은 분리 일차 변환에서의 샘플 당 곱셈의 개수와 LFNST에서의 샘플 당 곱셈의 개수의 합인 14보다 작거나 같은 값으로 설정될 수 있다. 역방향의 분리 일차 변환과 LFNST를 적용하는 경우에도 동일한 계산량이 필요하므로, r의 값은 14보다 작거나 같은 값으로 설정될 수 있다.
8x8 블록에 대해서는 분리 일차 변환에 대해 zero-out이 수행되지 않을 수 있으며, 이 경우 r의 값은 32보다 작거나 같은 값으로 설정될 수 있다.
8x16 블록에 대해서는 순방향의 변환을 기준으로 좌상단 8x8 블록을 제외하고 나머지 영역에 대해서는 zero-out이 수행될 수 있고, 좌상단 8x8 블록에 대해서는 순방향의 LFNST 행렬인 64x32 행렬이 적용될 수 있다. 이와 같은 zero-out이 수행되는 경우, 순방향의 분리 일차 변환에서 필요한 샘플 당 곱셈의 개수는 16개((8x8x16)+(8x16x8)/(8x16)=16)이고, LFNST에서 필요한 샘플 당 곱셈의 개수는 16개((64x32)/128=16)이다. 따라서, 분리 일차 변환과 LFNST를 NSPT로 대체할 경우, r의 값은 분리 일차 변환에서의 샘플 당 곱셈의 개수와 LFNST에서의 샘플 당 곱셈의 개수의 합인 32보다 작거나 같은 값으로 설정될 수 있다. 역방향의 분리 일차 변환과 LFNST를 적용하는 경우에도 동일한 계산량이 필요하므로, r의 값은 32보다 작거나 같은 값으로 설정될 수 있다.
16x8 블록에 대해서는 순방향의 변환을 기준으로 좌상단 8x8 블록을 제외하고 나머지 영역에 대해서는 zero-out이 수행될 수 있고, 좌상단 8x8 블록에 대해서는 순방향의 LFNST 행렬인 64x32 행렬이 적용될 수 있다. 이와 같은 zero-out이 수행되는 경우, 순방향의 분리 일차 변환에서 필요한 샘플 당 곱셈의 개수는 12개((8x16x8)+(8x8x8)/(16x8)=12)이고, LFNST에서 필요한 샘플 당 곱셈의 개수는 16개((64x32)/128=16)이다. 따라서, 분리 일차 변환과 LFNST를 NSPT로 대체할 경우, r의 값은 분리 일차 변환에서의 샘플 당 곱셈의 개수와 LFNST에서의 샘플 당 곱셈의 개수의 합인 28보다 작거나 같은 값으로 설정될 수 있다. 역방향의 분리 일차 변환과 LFNST를 적용하는 경우에도 동일한 계산량이 필요하므로, r의 값은 28보다 작거나 같은 값으로 설정될 수 있다.
16x16 블록에 대해서는 순방향의 변환을 기준으로 좌상단 12x12 블록을 제외하고 나머지 영역에 대해서는 zero-out이 수행될 수 있고, 좌상단 12x12 블록에 대해서는 순방향의 LFNST 행렬인 96x32 행렬이 적용될 수 있다. 이와 같은 zero-out이 수행되는 경우, 순방향의 분리 일차 변환에서 필요한 샘플 당 곱셈의 개수는 21개((12x16x16)+(12x16x12)/(16x16)=21)이고, LFNST에서 필요한 샘플 당 곱셈의 개수는 12개((96x32)/256=12)이다. 따라서, 분리 일차 변환과 LFNST를 NSPT로 대체할 경우, r의 값은 분리 일차 변환에서의 샘플 당 곱셈의 개수와 LFNST에서의 샘플 당 곱셈의 개수의 합인 33보다 작거나 같은 값으로 설정될 수 있다. 역방향의 분리 일차 변환과 LFNST를 적용하는 경우에도 동일한 계산량이 필요하므로, r의 값은 33보다 작거나 같은 값으로 설정될 수 있다.
4x16 블록에 대해서는 순방향의 변환을 기준으로 좌상단 4x4 블록을 제외하고 나머지 영역에 대해서는 zero-out이 수행될 수 있고, 좌상단 4x4 블록에 대해서는 순방향의 LFNST 행렬인 16x16 행렬이 적용될 수 있다. 이와 같은 zero-out이 수행되는 경우, 순방향의 분리 일차 변환에서 필요한 샘플 당 곱셈의 개수는 8개(((4x4x16)+(4x16x4))/(4x16)=8)이고, LFNST에서 필요한 샘플 당 곱셈의 개수는 4개((16x16)/64=4)이다. 따라서, 분리 일차 변환과 LFNST를 NSPT로 대체할 경우, r의 값은 분리 일차 변환에서의 샘플 당 곱셈의 개수와 LFNST에서의 샘플 당 곱셈의 개수의 합인 12보다 작거나 같은 값으로 설정될 수 있다. 역방향의 분리 일차 변환과 LFNST를 적용하는 경우에도 동일한 계산량이 필요하므로, r의 값은 12보다 작거나 같은 값으로 설정될 수 있다.
16x4 블록에 대해서는 순방향의 변환을 기준으로 좌상단 4x4 블록을 제외하고 나머지 영역에 대해서는 zero-out이 수행될 수 있고, 좌상단 4x4 블록에 대해서는 순방향의 LFNST 행렬인 16x16 행렬이 적용될 수 있다. 이와 같은 zero-out이 수행되는 경우, 순방향의 분리 일차 변환에서 필요한 샘플 당 곱셈의 개수는 5개(((4x16x4)+(4x4x4))/(16x4)=5)이고, LFNST에서 필요한 샘플당 곱셈의 개수는 4개((16x16)/64=4)이다. 따라서, 분리 일차 변환과 LFNST를 NSPT로 대체할 경우, r의 값은 분리 일차 변환에서의 샘플 당 곱셈의 개수와 LFNST에서의 샘플 당 곱셈의 개수의 합인 9보다 작거나 같은 값으로 설정될 수 있다. 역방향의 분리 일차 변환과 LFNST를 적용하는 경우에도 동일한 계산량이 필요하므로, r의 값은 9보다 작거나 같은 값으로 설정될 수 있다.
4x32 블록에 대해서는 순방향의 변환을 기준으로 좌상단 4x4 블록을 제외하고 나머지 영역에 대해서는 zero-out이 수행될 수 있고, 좌상단 4x4 블록에 대해서는 순방향의 LFNST 행렬인 16x16 행렬이 적용될 수 있다. 이와 같은 zero-out이 수행되는 경우, 순방향의 분리 일차 변환에서 필요한 샘플 당 곱셈의 개수는 8개(((4x4x32)+(4x32x4))/(4x32)=8)이고, LFNST에서 필요한 샘플 당 곱셈의 개수는 2개((16x16)/128=2)이다. 따라서, 분리 일차 변환과 LFNST를 NSPT로 대체할 경우, r의 값은 분리 일차 변환에서의 샘플 당 곱셈의 개수와 LFNST에서의 샘플 당 곱셈의 개수의 합인 10보다 작거나 같은 값으로 설정될 수 있다. 역방향의 분리 일차 변환과 LFNST를 적용하는 경우에도 동일한 계산량이 필요하므로, r의 값은 10보다 작거나 같은 값으로 설정될 수 있다.
32x4 블록에 대해서는 순방향의 변환을 기준으로 좌상단 4x4 블록을 제외하고 나머지 영역에 대해서는 zero-out이 수행될 수 있고, 좌상단 4x4 블록에 대해서는 순방향의 LFNST 행렬인 16x16 행렬이 적용될 수 있다. 이와 같은 zero-out이 수행되는 경우, 순방향의 분리 일차 변환에서 필요한 샘플 당 곱셈의 개수는 4.5개(((4x32x4)+(4x4x4))/(32x4)=4.5)이고, LFNST에서 필요한 샘플 당 곱셈의 개수는 2개((16x16)/128=2)이다. 따라서, 분리 일차 변환과 LFNST를 NSPT로 대체할 경우, r의 값은 6.5보다 작거나 같은 값으로 설정될 수 있다. 역방향의 분리 일차 변환과 LFNST를 적용하는 경우에도 동일한 계산량이 필요하므로, r의 값은 6.5보다 작거나 같은 값으로 설정될 수 있다. 여기서, r의 값은 행렬 차원을 구성하는 값이므로, 6.5 대신에 6 또는 7의 정수로 설정될 수 있다.
8x32 블록에 대해서는 순방향의 변환을 기준으로 좌상단 8x8 블록을 제외하고 나머지 영역에 대해서는 zero-out이 수행될 수 있고, 좌상단 8x8 블록에 대해서는 순방향의 LFNST 행렬인 64x32 행렬이 적용될 수 있다. 이와 같은 zero-out이 수행되는 경우, 순방향의 분리 일차 변환에서 필요한 샘플 당 곱셈의 개수는 16개(((8x8x32)+(8x32x8))/(8x32)=16)이고, LFNST에서 필요한 샘플 당 곱셈의 개수는 8개((64x32)/256=8)이다. 따라서, 분리 일차 변환과 LFNST를 NSPT로 대체할 경우, r의 값은 24보다 작거나 같은 값으로 설정될 수 있다. 역방향의 분리 일차 변환과 LFNST를 적용하는 경우에도 동일한 계산량이 필요하므로, r의 값은 24보다 작거나 같은 값으로 설정될 수 있다.
32x8 블록에 대해서는 순방향의 변환을 기준으로 좌상단 8x8 블록을 제외하고 나머지 영역에 대해서는 zero-out이 수행될 수 있고, 좌상단 8x8 블록에 대해서는 순방향의 LFNST 행렬인 64x32 행렬이 적용될 수 있다. 이와 같은 zero-out이 수행되는 경우, 순방향의 분리 일차 변환에서 필요한 샘플 당 곱셈의 개수는 10개(((8x32x8)+(8x8x8))/(32x8)=10)이고, LFNST에서 필요한 샘플 당 곱셈의 개수는 8개((64x32)/256=8)이다. 따라서, 분리 일차 변환과 LFNST를 NSPT로 대체할 경우, r의 값은 18보다 작거나 같은 값으로 설정될 수 있다. 역방향의 분리 일차 변환과 LFNST를 적용하는 경우에도 동일한 계산량이 필요하므로, r의 값은 18보다 작거나 같은 값으로 설정될 수 있다.
16x32 블록에 대해서는 순방향의 변환을 기준으로 좌상단 12x12 블록을 제외하고 나머지 영역에 대해서는 zero-out이 수행될 수 있고, 좌상단 12x12 블록에 대해서는 순방향의 LFNST 행렬인 96x32 행렬이 적용될 수 있다. 이와 같은 zero-out이 수행되는 경우, 순방향의 분리 일차 변환에서 필요한 샘플 당 곱셈의 개수는 21개(((12x16x32)+(12x32x12))/(16x32)=21)이고, LFNST에서 필요한 샘플 당 곱셈의 개수는 6개((96x32)/512=6)이다. 따라서, 분리 일차 변환과 LFNST를 NSPT로 대체할 경우, r의 값은 27보다 작거나 같은 값으로 설정될 수 있다. 역방향의 분리 일차 변환과 LFNST를 적용하는 경우에도 동일한 계산량이 필요하므로, r의 값은 27보다 작거나 같은 값으로 설정될 수 있다.
32x16 블록에 대해서는 순방향의 변환을 기준으로 좌상단 12x12 블록을 제외하고 나머지 영역에 대해서는 zero-out이 수행될 수 있고, 좌상단 12x12 블록에 대해서는 순방향의 LFNST 행렬인 96x32 행렬이 적용될 수 있다. 이와 같은 zero-out이 수행되는 경우, 순방향의 분리 일차 변환에서 필요한 샘플 당 곱셈의 개수는 13.5개(((12x32x12)+(12x16x12))/(32x16)=13.5)이고, LFNST에서 필요한 샘플 당 곱셈의 개수는 6개((96x32)/512=6)이다. 따라서, 분리 일차 변환과 LFNST를 NSPT로 대체할 경우, r의 값은 19.5보다 작거나 같은 값으로 설정될 수 있다. 역방향의 분리 일차 변환과 LFNST를 적용하는 경우에도 동일한 계산량이 필요하므로, r의 값은 19.5보다 작거나 같은 값으로 설정될 수 있다. 여기서, r의 값은 행렬 차원을 구성하는 값이므로, 19.5 대신에 19 또는 20의 정수로 설정될 수 있다.
전술한 블록 크기 별 NSPT 행렬에서, r의 값이 K의 배수가 아닌 경우가 존재할 수 있다. 여기서, K는 4일 수 있다. 이 경우, 구현의 용이성을 위해 r의 값을 K의 배수가 되도록 설정할 수도 있다. 전술한 방법을 통해 기-설정된 r의 값을 rprev라 할 경우, K의 배수가 되는 r의 값은 다음과 같이 설정될 수 있다.
Figure PCTKR2024007916-appb-img-000009
상기 수학식 8에서 func()는 전술한 floor, round, 또는 ceil일 수 있다.
전술한 바와 같이, MxN 블록에 대한 NSPT 행렬에서의 r의 값은 NxM 블록에 대한 NSPT 행렬에서의 r의 값과 상이할 수 있다. 일예로, 4x8 블록에 대한 역방향의 NSPT 행렬은 32x16 행렬이고, 8x4 블록에 대한 역방향의 NSPT 행렬은 32x14 행렬일 수 있다. 이때, MxN 블록과 NxM 블록 간의 대칭성을 이용하여 NSPT 행렬이 결정될 수 있다.
현재 블록이 x번 모드를 가진 MxN 블록임을 가정한다. 현재 블록에 대해 전술한 대칭성을 이용하는 경우, x번 모드 또는 MxN의 블록 크기에 대응하는 NSPT 행렬이 적용되는 대신에, x번 모드에 대칭인 모드 또는 MxN의 블록 크기에 대칭인 NxM의 블록 크기 중 적어도 하나에 대응하는 NSPT 행렬이 적용될 수 있다. 이때, 현재 블록에 대해 NxM의 블록 크기에 대응하는 NSPT 행렬이 그대로 적용될 수 있다. 또는, NxM의 블록 크기에 대응하는 NSPT 행렬을 적용하되, r의 값은 MxN의 블록 크기에 대응하는 NSPT 행렬에서의 r의 값이 이용될 수 있다.
일예로, 4x8 블록에 대한 역방향의 NSPT 행렬은 32x16 행렬이고(즉, NSPT 행렬에서의 r의 값이 16임), 8x4 블록에 대한 역방향의 NSPT 행렬은 32x14 행렬일 수 있다(즉, NSPT 행렬에서의 r의 값은 14임). 현재 블록이 x번 모드를 가진 8x4 블록인 경우, 현재 블록에 대해 x번 모드에 대칭인 모드 또는 8x4 블록에 대칭인 4x8 블록 중 적어도 하나에 대한 NSPT 행렬이 적용될 수 있다. 이 경우, 4x8 블록에 대한 역방향의 NSPT 행렬인 32x16 행렬이 그대로 이용될 수도 있고, 8x4 블록에 대한 역방향의 NSPT 행렬에서의 r의 값을 가진 32x14 행렬이 이용될 수도 있다. 여기서, 32x14 행렬은, 32x16 행렬에서 왼쪽부터 14개의 행들을 샘플링하여 유도될 수 있다. 이와 같이, 8x4의 블록 크기를 가진 현재 블록에 대해 32x14 행렬을 적용할 경우, 전술한 소정의 기준을 만족하게 된다.
반대로, 현재 블록이 x번 모드를 가진 4x8 블록인 경우, 현재 블록에 대해 x번 모드에 대칭인 모드 또는 4x8 블록에 대칭인 8x4 블록 중 적어도 하나에 대한 NSPT 행렬이 적용될 수 있다. 이 경우, 현재 블록에 대해, 4x8 블록에 대한 32x16 행렬이 아닌, 8x4 블록에 대한 32x14 행렬이 적용될 수 있다. 이를 통해, 4x8 블록에 대해 허용되는 곱셈의 개수보다 적은 곱셈을 사용하여 NSPT가 수행될 수 있다.
MxN 블록과 NxM 블록에 대한 NSPT에 대해서 전술한 소정의 조건을 만족하는 r의 값이 각각 r1과 r2인 경우, MxN 블록과 NxM 블록에 대한 역방향의 NSPT 행렬은 MN x max(r1, r2)로 설정될 수 있다. 여기서, max(r1, r2)는 r1과 r2 중 크거나 같은 값을 선택하는 것을 의미할 수 있다.
일예로, 4x8 블록에 대한 역방향의 NSPT 행렬은 32x16 행렬이고(즉, NSPT 행렬에서의 r의 값이 16임), 8x4 블록에 대한 역방향의 NSPT 행렬은 32x14 행렬일 수 있다(즉, NSPT 행렬에서의 r의 값은 14임). 현재 블록이 x번 모드를 가진 4x8 블록인 경우, 현재 블록에 대해 x번 모드에 대칭인 모드 또는 4x8 블록에 대칭인 8x4 블록 중 적어도 하나에 대한 NSPT 행렬이 적용될 수 있다. 이 경우, 8x4 블록에 대한 역방향의 NSPT 행렬인 32x16 행렬이 이용될 수 있다. 만약 역방향의 NSPT 행렬을 MN x max(r1, r2)와 같이 구성하지 않았다면, 8x4 블록에 대한 NSPT 행렬로서 32x14 행렬을 이용될 것이다. 그러나, 4x8 블록에 대한 NSPT 행렬과 8x4 블록에 대한 NSPT 행렬을 32 x max(16, 14) 행렬로 구성할 경우, 32x16 행렬이 온전히 적용될 수 있다.
반대로, 현재 블록이 x번 모드를 가진 8x4 블록인 경우, 현재 블록에 대해 x번 모드에 대칭인 모드 또는 8x4 블록에 대칭인 4x8 블록 중 적어도 하나에 대한 NSPT 행렬이 적용될 수 있다. 이 경우, 4x8 블록에 대한 역방향의 NSPT 행렬인 32x16 행렬이 이용될 수도 있고, 32x14 행렬이 이용될 수도 있다. 여기서, 32x14 행렬은, 32x16 행렬에서 왼쪽부터 14개의 행들을 샘플링하여 유도될 수 있다.
전술한 바와 같이 NSPT 행렬을 구성할 경우, 상기 소정의 조건을 만족하면서 최대 개수의 변환 기저 벡터들로 구성된 변환을 적용할 수 있어서 코딩 성능을 극대화할 수 있다.
전술한 실시예에서 r의 값은 16의 배수가 되도록 설정될 수 있다. 일예로, 4x8 블록과 8x4 블록에 대한 역방향의 NSPT의 경우, 32x20 행렬이 아닌 32x16 행렬이 적용될 수 있다. 변환 블록의 변환 계수들은 소정의 계수 그룹(Coefficient Group, CG)의 단위로 부호화될 수 있다. 여기서, CG는 16개의 변환 계수들의 그룹으로 정의될 수 있고, 일예로 CG는 4x4, 2x8, 8x2와 같은 크기의 서브 블록일 수 있다. 하나의 CG 내에 넌-제로 변환 계수가 존재하지 않는 경우가 있을 수 있고, 이 경우 해당 CG에 대해서는 변환 계수의 부호화 과정이 스킵될 수 있다. 따라서, r의 값을 16의 배수로 설정할 경우, 구현의 복잡도가 낮아지는 장점이 있다.
MxN 블록의 레지듀얼 샘플들에 순방향의 NSPT를 적용하여 변환 계수들이 유도될 수 있다. 이때, 유도되는 변환 계수들의 개수는 zero-out에 의해 (M*N)의 값보다 작거나 같을 수 있다. 즉, 순방향의 NSPT 행렬은 r x (M*N) 행렬로 정의될 수 있고, 여기서 r은 NSPT의 출력 길이 또는 NSPT를 통해 유도되는 변환 계수의 개수를 의미하고 (M*N)은 NSPT의 입력 길이 또는 NSPT가 적용되는 레지듀얼 샘플의 개수를 의미할 수 있다.
상기 유도된 변환 계수들은 소정의 스캔 순서에 따라 MxN 블록 내부에 배열될 수 있고, 상기 변환 계수들이 채워지지 않은 영역은 0으로 채워질 수 있다(즉, zero-out). 따라서, 디코딩 장치에서 변환 계수들을 스캔하는 과정에서, NSPT가 적용되었다면 0으로 채워졌을 영역에서 넌-제로 변환 계수가 발견된 경우(또는, MxN 블록 내 마지막 유효 계수의 스캔 위치가 r보다 크거나 같은 경우), 해당 MxN 블록에 대해 NSPT가 적용되지 않은 것으로 간주되고, NSPT 인덱스가 시그날링되지 않을 수 있다. MxN 블록 내 좌상단 계수(즉, DC 성분 계수)에 0의 스캔 위치를 나타내는 인덱스가 할당되고, 소정의 순서에 따라 MxN 블록 내 나머지 계수에 1씩 증가된 인덱스가 할당될 수 있다.
NSPT가 적용될 수 있는 블록 크기들에 대해 이용 가능한 하나 또는 그 이상의 r의 값들이 정의될 수 있다. 일예로, NSPT가 적용될 수 있는 블록 크기들 각각에 대해서 하나 또는 그 이상의 r의 값들이 정의될 수 있다. 또는, NSPT가 적용될 수 있는 블록 크기 별로 하나의 r의 값이 정의될 수 있고, NSPT가 적용될 수 있는 블록 크기들 중 어느 하나에 대한 r의 값은, 다른 하나에 대한 r의 값과 상이할 수 있다. 또는, NSPT가 적용될 수 있는 블록 크기들 중 일부에 대해서는 하나의 r의 값이 정의되고, 나머지에 대해서는 둘 이상의 r의 값들이 정의될 수 있다.
복수의 r의 값들이 이용 가능한 경우, 복수의 r의 값들 중 어느 하나를 특정하는 인덱스 또는 r의 자체가 시그날링될 수 있다. 해당 인덱스는, VPS, SPS, PPS, PH, SH와 같은 하이 레벨 신택스(HLS)에서 시그날링되거나, CTU, CU, TU와 같은 블록 레벨에서 시그날링될 수도 있다. r의 값이 특정 범위에 속하는 값인 경우, 해당 범위를 포함할 수 있을만큼의 비트들을 할당하여 시그날링할 수 있다. 예를 들어, r의 값이 1 내지 256의 범위에 속하는 경우, 8-비트만큼을 fixed-length로 지정하여 시그날링할 수 있다.
현재 블록의 변환 커널은, 전술한 실시예 1 내지 3 중 어느 하나를 기반으로 결정될 수 있다. 또는, 현재 블록의 변환 커널은, 전술한 실시예 1 내지 3에 따른 발명이 서로 충돌되지 않는 범위 내에서, 실시예 1 내지 3 중 적어도 둘의 조합에 기초하여 결정될 수도 있다.
현재 블록의 역변환을 위한 변환 인덱스가 시그날링될 수 있다. 여기서, 변환 인덱스는, 변환 세트에 속한 하나 또는 그 이상의 변환 커널들(또는, 변환 행렬들) 중 어느 하나를 특정할 수 있다. 여기서, 변환 인덱스는, NSPT 세트에 속한 하나 또는 그 이상의 NSPT 커널들 중 어느 하나를 특정하는 NSPT 인덱스를 의미할 수 있다. 또는, 상기 변환 인덱스는, LFNST 세트에 속한 하나 또는 그 이상의 LFNST 커널들 중 어느 하나를 특정하는 LFNST 인덱스를 의미할 수도 있다.
상기 변환 인덱스가 NSPT 인덱스에 해당하는지 여부는, 현재 블록의 크기가 전술한 제1 그룹에 속한 블록 크기들 중 어느 하나인지 여부에 기초하여 결정될 수 있다. 이는, NSPT가 적용 가능한 블록 크기들과 LFNST가 적용 가능한 블록 크기들이 서로 구분되는 경우를 전제로 한다. 이 경우, 현재 블록의 크기가 제1 그룹에 속하면, 현재 블록에 대해 시그날링된 변환 인덱스는 NSPT 인덱스에 해당하고, 해당 변환 인덱스를 기반으로 NSPT 세트로부터 NSPT 커널이 결정될 수 있다. 반면, 현재 블록의 크기가 제1 그룹에 속하지 않는 경우, 현재 블록에 대해 시그날링된 변환 인덱스는 LFNST 인덱스에 해당하고, 해당 변환 인덱스를 기반으로 LFNST 세트로부터 LFNST 커널이 결정될 수 있다. 현재 블록의 크기가 제1 그룹에 속하지 않는 경우는, 현재 블록의 크기가 전술한 제2 그룹에 속하는 경우를 의미할 수 있다. 또는, 현재 블록의 크기가 제1 그룹에 속하지 않는 경우는, 현재 블록의 크기가 제2 그룹에 속한 블록 크기들 중 LFNST가 적용 가능한 블록 크기에 해당하는 경우를 의미할 수도 있다. 이와 같이, NSPT 인덱스와 LFNST 인덱스가 별개의 신택스로 구성되는 것이 아니라, 통합된 하나의 신택스로 구성될 수 있다.
일예로, 제1 그룹에 속한 NSPT가 적용 가능한 블록 크기들이 4x4, 4x8, 8x4, 8x8인 경우를 가정한다. 제1 그룹에 속한 블록 크기들에 대해서는 LFNST 대신에 NSPT가 적용될 수 있다. 구체적으로, 분리 일차 변환(e.g., DCT-2, separable KLT)과 LFNST의 조합 대신에 NSPT가 적용될 수 있다. 제1 그룹에 속한 4개의 블록 크기들에 대해서는 NSPT 인덱스가 시그날링될 수 있고, (LFNST가 허용되는) 나머지 블록 크기들에 대해서는 LFNST 인덱스가 시그날링될 수 있다.
이와 같이, NSPT 인덱스와 LFNST 인덱스를 통합된 하나의 신택스로 시그날링하는 경우, 부호화되는 정보량을 줄일 수 있다. 또한, 엔트로피 코딩을 위한 이진화, CABAC 컨텍스트, 또는 초기 값(initial value) 중 적어도 하나를 NSPT/LFNST 인덱스에 대해 동일하게 적용함으로써, 구현의 복잡도를 줄일 수도 있다.
또는, NSPT 인덱스와 LFNST 인덱스를 별개의 신택스로서 각각 시그날링할 수도 있다. 이 경우, 구현의 복잡도가 일부 증가될 수는 있으나, 각 인덱스에 대해 최적화된 엔트로피 코딩을 함으로써 압축 성능을 향상시킬 수 있다.
LFNST 세트에 속한 LFNST 커널 후보의 개수와 NSPT 세트에 속한 NSPT 커널 후보의 개수가 동일한 경우, LFNST 인덱스와 NSPT 인덱스에 대해 동일한 이진화(binarization)가 적용될 수 있다. LFNST 인덱스와 NSPT 인덱스의 빈(bin)들에 대해 동일한 CABAC 컨텍스트(또는, CABAC context increment)가 할당될 수도 있다.
LFNST 인덱스와 NSPT 인덱스에 대해 서로 다른 이진화 및/또는 CABAC 컨텍스트가 이용될 수 있다. LFNST 인덱스와 NSPT 인덱스에 대해 서로 다른 CABAC 초기 값이 할당될 수 있다. 일예로, LFNST 인덱스와 NSPT 인덱스 중 어느 하나는 fixed-length binarization을 기반으로 이진화되고, 다른 하나는 truncated unary binarization을 기반으로 이진화될 수 있다. LFNST 인덱스와 NSPT 인덱스의 이진화가 동일하더라도, 서로 다른 CABAC 컨텍스트 및/또는 CABAC 초기 값이 할당될 수 있다. LFNST 세트에 속한 LFNST 커널 후보의 개수와 NSPT 세트에 속한 NSPT 커널 후보의 개수가 서로 상이한 경우, LFNST 인덱스와 NSPT 인덱스에 대해 서로 다른 이진화 및/또는 CABAC 컨텍스트가 이용될 수 있다.
NSPT 세트에 속한 NSPT 커널 후보의 개수는, 블록 크기 별로 상이하게 설정될 수 있다. 또는, 상기 제1 그룹에 속한 블록 크기들은 복수의 서브 그룹으로 구분될 수 있다. 이 경우, NSPT 세트에 속한 NSPT 커널 후보의 개수는, 상기 복수의 서브 그룹 별로 상이하게 설정될 수 있다. 여기서, 복수의 서브 그룹 중 적어도 하나는 서로 다른 복수의 블록 크기들을 포함할 수 있다.
NSPT 세트에 속한 NSPT 커널 후보의 개수에 따라, NSPT 인덱스에 적용되는 이진화가 상이할 수 있다.
일예로, 특정 블록 크기에 대한 NSPT 세트 내 NSPT 커널 후보의 개수가 3개인 경우, NSPT 인덱스는 0 내지 3 중 어느 하나의 값을 가질 수 있다. NSPT 인덱스의 값이 0인 경우, 이는 현재 블록에 NSPT가 적용되지 않음을 나타낼 수 있다. NSPT 인덱스의 값이 0이 아닌 경우, 이는 3개의 NSPT 커널 후보들 중 해당 NSPT 인덱스에 대응하는 NSPT 커널 후보를 나타낼 수 있다. 하나의 빈(bin)을 할당하여 NSPT가 적용되는 경우와 그렇지 않은 경우를 구분할 수 있다. 해당 빈의 값이 0인 경우는 NSPT 인덱스의 값이 0인 경우에 해당할 수 있다. 반면, 해당 빈의 값이 1인 경우는 NSPT 인덱스의 값이 1, 2, 또는 3인 경우에 해당할 수 있다. 이 경우, 3개의 NSPT 커널 후보들을 구분하기 위해 truncated unary binarization이 적용될 수 있다. 즉, 2개의 빈들을 할당하여 0, 10, 11로 3개의 NSPT 커널 후보들을 구분할 수 있다.
특정 블록 크기에 대한 NSPT 세트 내 NSPT 커널 후보의 개수가 2개인 경우, NSPT 인덱스는 0 내지 2 중 어느 하나의 값을 가질 수 있다. NSPT 인덱스의 값이 0인 경우, 이는 현재 블록에 NSPT가 적용되지 않음을 나타낼 수 있다. NSPT 인덱스의 값이 0이 아닌 경우, 이는 2개의 NSPT 커널 후보들 중 해당 NSPT 인덱스에 대응하는 NSPT 커널 후보를 나타낼 수 있다. 하나의 빈(bin)을 할당하여 NSPT가 적용되는 경우와 그렇지 않은 경우를 구분할 수 있다. 2개의 NSPT 커널 후보들 중 어느 하나를 나타내는 하나의 빈을 할당하여, 2개의 NSPT 커널 후보들을 구분할 수 있다.
특정 블록 크기에 대한 NSPT 세트 내 NSPT 커널 후보의 개수가 1개인 경우, NSPT 인덱스는 0 또는 1 중 어느 하나의 값을 가질 수 있다. NSPT 인덱스의 값이 0인 경우, 이는 현재 블록에 NSPT가 적용되지 않음을 나타낼 수 있다. NSPT 인덱스의 값이 1인 경우, 이는 1개의 NSPT 커널 후보를 나타낼 수 있다. 이와 같은 경우, 하나의 빈만으로 NSPT의 적용 여부 및 NSPT 커널 후보를 특정할 수 있다.
상기 현재 블록의 역변환은 분리 일차 변환 및/또는 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 영역에 속한 샘플 위치들의 개수를 의미할 수도 있다.
상기 현재 블록에 대해, 4x8 블록에 대해 정의된 LFNST(이하, LFNST4x8라 함) 또는 8x4 블록에 대해 정의된 LFNST(이하, LFNST8x4라 함)가 적용될 수 있다. 현재 블록에 LFNST4x8이 적용되는 경우, 현재 블록의 ROI 영역은 현재 블록 내 4x8 영역일 수 있다. 여기서, 4x8 영역은, 현재 블록의 좌상단 샘플을 포함하는 영역으로서, 너비와 높이가 각각 4와 8인 블록을 의미할 수 있다. 현재 블록에 LFNST8x4가 적용되는 경우, 현재 블록의 ROI 영역은 현재 블록 내 8x4 영역일 수 있다. 여기서, 8x4 영역은, 현재 블록의 좌상단 샘플을 포함하는 영역으로서, 너비와 높이가 각각 8과 4인 블록을 의미할 수 있다.
상기 LFNST4x8는 현재 블록이 4x8 블록인 경우에만 적용될 수 있다. 또는, 상기 LFNST4x8는, 현재 블록이 4xN이고 N이 8보다 크거나 같은 경우(예를 들어, 현재 블록이 4x8, 4x16, 4x32, 또는 그 이상의 블록인 경우)에 적용될 수 있다. 또는, 상기 LFNST4x8는, 현재 블록이 4xN이고, N이 8보다 크거나 같고 소정의 문턱값보다 작거나 같은 경우에 적용될 수 있다. 일예로, 문턱값이 16인 경우, LFNST4x8는 현재 블록이 4x8 또는 4x16 블록인 경우에 적용될 수 있다.
상기 LFNST8x4는 현재 블록이 8x4 블록인 경우에만 적용될 수 있다. 또는, 상기 LFNST8x4는, 현재 블록이 Nx4이고 N이 8보다 크거나 같은 경우(예를 들어, 현재 블록이 8x4, 16x4, 32x4, 또는 그 이상의 블록인 경우)에 적용될 수 있다. 또는, 상기 LFNST8x4는, 현재 블록이 Nx4이고, N이 8보다 크거나 같고 소정의 문턱값보다 작거나 같은 경우에 적용될 수 있다. 일예로, 문턱값이 16인 경우, LFNST8x4는 현재 블록이 8x4 또는 16x4 블록인 경우에 적용될 수 있다.
구체적으로, 현재 블록에 대해서 LFNST4x8 또는 LFNST8x4이 적용되는 경우, 입력 길이가 32보다 작거나 같고, 출력 길이가 32인 LFNST(이하, LFNST-32라 함)가 이용될 수 있다. 상기 입력 길이는 LFNST로 입력되는 변환 계수들의 개수를 의미할 수 있다. 여기서, LFNST로 입력되는 변환 계수들은, 현재 블록의 레지듀얼 정보를 기반으로 유도된 변환 계수들 전부를 의미할 수도 있고, 상기 유도된 변환 계수들 중 순방향의 LFNST가 적용된 변환 계수들을 의미할 수도 있다. 상기 출력 길이는 LFNST를 통해 유도되는 변환 계수들의 개수를 의미할 수 있다. 현재 블록의 ROI 영역은 32개의 샘플 위치들로 구성될 수 있다. 이 경우, 역방향의 LFNST4x8 또는 LFNST8x4에 대한 변환 행렬의 차원(또는, 크기)은 32xN일 수 있다. 여기서, N은 16, 20, 또는 24일 수 있다. 즉, LFNST-32의 입력 길이는 N이고, LFNST-32의 출력 길이는 32일 수 있다.
일예로, 현재 블록의 크기가 4xN인 경우, LFNST-32는 현재 블록 내 ROI 영역인 4x8 영역에 속한 변환 계수들 전부 또는 일부에 대해 적용될 수 있다. LFNST-32를 통해 유도되는 변환 계수들은 상기 현재 블록 내 4x8 영역에 소정의 스캔 순서에 따라 배열될 수 있다. 또는, 현재 블록의 크기가 Nx4인 경우, LFNST-32는 현재 블록 내 ROI 영역인 8x4 영역에 속한 변환 계수들 전부 또는 일부에 대해 적용될 수 있다. LFNST-32를 통해 유도되는 변환 계수들은 상기 현재 블록 내 8x4 영역에 소정의 스캔 순서에 따라 배열될 수 있다.
LFNST-32를 위한 변환 커널은, 변환 세트에 속한 하나 또는 그 이상의 변환 커널들(또는, LFNST 커널 후보들) 중 어느 하나로 결정될 수 있다. 이를 위해, 변환 세트에 속한 복수의 변환 커널들 중 어느 하나를 특정하는 인덱스가 이용될 수 있다. 여기서, 인덱스는 비트스트림을 통해 시그날링될 수 있다. 상기 현재 블록의 변환 세트는, 기-정의된 복수의 변환 세트들 중 어느 하나로 결정될 수 있다. 일예로, 현재 블록의 변환 세트는 35개의 변환 세트들 중 어느 하나로 결정될 수 있고, 각 변환 세트는 3개의 변환 커널들을 포함할 수 있다. 상기 현재 블록의 변환 세트는, 현재 블록의 인트라 예측 모드에 기초하여 결정될 수 있으며, 이는 앞서 살펴본 바와 같다. LFNST-32를 위한 상기 복수의 변환 세트들은, LFNST4x8과 LFNST8x4에 대해서 각각 정의될 수도 있다.
다만, 전술한 바와 같이, LFNST4x8와 LFNST8x4는 현재 블록의 크기에 기초하여 적응적으로 적용될 수 있다. 현재 블록에 대해 LFNST4x8와 LFNST8x4가 적용되지 않는 경우, 입력 길이가 16보다 작거나 같고, 출력 길이가 16인 LFNST(이하, LFNST-16이라 함)가 이용될 수 있다. LFNST-16은 현재 블록 내 4x4 영역에 속한 변환 계수들 전부 또는 일부에 대해 적용될 수 있다. 현재 블록 내 4x4 영역은, 현재 블록의 좌상단 샘플을 포함하는 영역으로서, 너비와 높이가 각각 4와 4인 블록을 의미할 수 있다. LFNST-16을 통해 유도되는 변환 계수들은 상기 현재 블록 내 4x4 영역에 소정의 스캔 순서에 따라 배열될 수 있다.
순방향의 변환 관점에서 살펴보면, 현재 블록의 레지듀얼 샘플들에 분리 일차 변환을 적용하여 변환 계수들을 유도할 수 있다. 상기 유도된 변환 계수들 전부 또는 현재 블록 내 일부 영역(즉, ROI 영역)에 속한 변환 계수들에 대해서만 순방향의 LFNST가 적용될 수 있다. LFNST를 통해 유도되는 변환 계수들은 현재 블록 내 ROI 영역에 소정의 스캔 순서에 따라 배열될 수 있다. LFNST에서 출력되는 변환 계수의 개수가 LFNST로 입력되는 변환 계수의 개수보다 적은 경우, ROI 영역 내에 LFNST를 통해 유도되는 변환 계수들로 채워지지 않는 영역이 존재할 수 있다. 해당 영역은 0인 변환 계수들로 채워질 수 있다. 또한, 현재 블록에서 ROI 영역을 제외한 나머지 영역(또는, LFNST가 적용되지 않는 영역)은 분리 일차 변환을 통해 유도된 변환 계수들로 채워질 수도 있고, zero-out을 통해 0인 변환 계수들로 채워질 수도 있다.
구체적으로, 현재 블록 또는 현재 블록의 ROI 영역에 대해서 LFNST4x8 또는 LFNST8x4이 적용되는 경우, 입력 길이가 32이고, 출력 길이가 32보다 작거나 같은 LFNST(이하, LFNST-32라 함)가 이용될 수 있다. 여기서, 입력 길이는 LFNST로 입력되는 변환 계수들의 개수를 의미할 수 있다. 상기 입력되는 변환 계수들은 분리 일차 변환을 통해 유도된 계수들일 수 있다. 상기 입력 길이는, 현재 블록의 ROI 영역에 속한 변환 계수들의 개수를 의미할 수도 있다. 출력 길이는 LFNST를 통해 유도되는 변환 계수들의 개수를 의미할 수 있다. 현재 블록의 ROI 영역은 32개의 샘플 위치들로 구성될 수 있다. 이 경우, 순방향의 LFNST4x8 또는 LFNST8x4에 대한 변환 행렬의 차원은 Nx32일 수 있다. 여기서, N은 16, 20, 또는 24일 수 있다. 즉, LFNST-32의 입력 길이는 32이고, LFNST-32의 출력 길이는 N일 수 있다.
일예로, 현재 블록의 크기가 4xN인 경우, LFNST-32는 현재 블록 내 ROI 영역인 4x8 영역에 속한 변환 계수들에 대해 적용될 수 있다. LFNST-32를 통해 유도되는 변환 계수들은 상기 현재 블록 내 4x8 영역에 소정의 스캔 순서에 따라 배열될 수 있다. 또는, 현재 블록의 크기가 Nx4인 경우, LFNST-32는 현재 블록 내 ROI 영역인 8x4 영역에 속한 변환 계수들에 대해 적용될 수 있다. LFNST-32를 통해 유도되는 변환 계수들은 상기 현재 블록 내 8x4 영역에 소정의 스캔 순서에 따라 배열될 수 있다.
다만, 전술한 바와 같이, LFNST4x8와 LFNST8x4는 현재 블록의 크기에 기초하여 적응적으로 적용될 수 있다. 현재 블록에 대해 LFNST4x8와 LFNST8x4가 적용되지 않는 경우, 입력 길이와 출력 길이가 각각 16과 16인 LFNST(이하, LFNST-16이라 함)가 이용될 수 있다. LFNST-16은 현재 블록 내 4x4 영역에 속한 변환 계수들에 대해 적용될 수 있다. 현재 블록 내 4x4 영역은, 현재 블록의 좌상단 샘플을 포함하는 영역으로서, 너비와 높이가 각각 4와 4인 블록을 의미할 수 있다. LFNST-16을 통해 유도되는 변환 계수들은 상기 현재 블록 내 4x4 영역에 소정의 스캔 순서에 따라 배열될 수 있다.
현재 블록에 대해서 LFNST4x8 또는 LFNST8x4를 적용함에 있어서, 전술한 블록 형태 간의 대칭성이 이용될 수 있다. 일예로, 4xN 블록과 Nx4 블록 간의 대칭성에 따라 현재 블록의 LFNST를 위한 LFNST 세트 및/또는 LFNST 커널이 결정될 수 있다. 4xN 블록(또는, Nx4 블록)은, 이와 대칭성을 가진 Nx4 블록(또는, 4xN 블록)에 대응하는 LNFST 세트 및/또는 LFNST 커널을 동일하게 이용할 수 있다. N이 8인 블록에 대해서는 전술한 대칭성이 그대로 이용될 수 있고, N이 16보다 크거나 같은 블록에 대해서는 현재 블록 내 ROI 영역(즉, 4x8 영역 또는 8x4 영역)에 대해 전술한 대칭성을 이용하여 LFNST가 적용될 수 있다.
또한, 8x16 블록에 대한 LFNST(이하, LFNST8x16이라 함)와 16x8 블록에 대한 LFNST(이하, LFNST16x8이라 함)가 정의될 수 있다. 현재 블록에 LFNST8x16이 적용되는 경우, 현재 블록의 ROI 영역은 현재 블록 내 4x8, 4x16, 8x8, 또는 8x16 영역일 수 있다. 여기서, ROI 영역은, 현재 블록의 좌상단 샘플을 포함하는 영역으로서, 해당 너비와 높이를 가진 블록을 의미할 수 있다. 현재 블록에 LFNST16x8가 적용되는 경우, 현재 블록의 ROI 영역은 현재 블록 내 8x4, 16x4, 8x8, 또는 16x8 영역일 수 있다. 여기서, ROI 영역은, 현재 블록의 좌상단 샘플을 포함하는 영역으로서, 해당 너비와 높이를 가진 블록을 의미할 수 있다. 상기 ROI 영역은, LFNST8x16와 LFNST16x8 각각에 대해서 인코딩 장치와 디코딩 장치에 동일하게 기-설정된 것일 수 있다. 너비와 높이가 각각 8과 N인 블록들에 대해서 동일한 ROI 영역이 설정될 수 있다. 또는, 너비와 높이가 각각 8과 N인 블록들 중 적어도 하나는 다른 하나와 상이한 ROI 영역을 가질 수도 있다. 마찬가지로, 너비와 높이가 각각 N과 8인 블록들에 대해서 동일한 ROI 영역이 설정될 수 있다. 또는, 너비와 높이가 각각 N과 8인 블록들 중 적어도 하나는 다른 하나와 상이한 ROI 영역을 가질 수도 있다.
상기 LFNST8x16은 현재 블록이 8x16 블록인 경우에만 적용될 수 있다. 또는, 상기 LFNST8x16는, 현재 블록이 8xN이고 N이 16보다 크거나 같은 경우(예를 들어, 현재 블록이 8x16, 8x32, 8x64, 또는 그 이상의 블록인 경우)에 적용될 수 있다. 또는, 상기 LFNST8x16는, 현재 블록이 8xN이고, N이 16보다 크거나 같고 소정의 문턱값보다 작거나 같은 경우에 적용될 수 있다. 일예로, 문턱값이 32인 경우, LFNST8x16는 현재 블록이 8x16 또는 8x32 블록인 경우에 적용될 수 있다.
상기 LFNST16x8은 현재 블록이 16x8 블록인 경우에만 적용될 수 있다. 또는, 상기 LFNST16x8은, 현재 블록이 Nx8이고 N이 16보다 크거나 같은 경우(예를 들어, 현재 블록이 16x8, 32x8, 64x8, 또는 그 이상의 블록인 경우)에 적용될 수 있다. 또는, 상기 LFNST16x8은, 현재 블록이 Nx8이고, N이 16보다 크거나 같고 소정의 문턱값보다 작거나 같은 경우에 적용될 수 있다. 일예로, 문턱값이 32인 경우, LFNST16x8은 현재 블록이 16x8 또는 32x8 블록인 경우에 적용될 수 있다.
구체적으로, 현재 블록에 대해서 LFNST8x16 또는 LFNST16x8이 적용되는 경우, 입력 길이가 K보다 작거나 같고, 출력 길이가 K인 LFNST(이하, LFNST-K라 함)가 이용될 수 있다. 전술한 바와 같이, 상기 입력 길이는 LFNST로 입력되는 변환 계수들의 개수를 의미할 수 있다. 여기서, LFNST로 입력되는 변환 계수들은, 현재 블록의 레지듀얼 정보를 기반으로 유도된 변환 계수들 전부를 의미할 수도 있고, 상기 유도된 변환 계수들 중 순방향의 LFNST가 적용된 변환 계수들을 의미할 수도 있다. 상기 출력 길이는 LFNST를 통해 유도되는 변환 계수들의 개수를 의미할 수 있다.
상기 K는 현재 블록의 ROI 영역의 크기에 기초하여 결정될 수 있다. 일예로, ROI 영역이 4x8 또는 8x4인 경우, 입력 길이가 32보다 작거나 같고, 출력 길이가 32인 LFNST(즉, LFNST-32)가 이용될 수 있다. ROI 영역이 4x16, 16x4, 또는 8x8인 경우, 입력 길이가 64보다 작거나 같고, 출력 길이가 64인 LFNST(즉, LFNST-64)가 이용될 수 있다. ROI 영역이 8x16 또는 16x8 영역인 경우, 입력 길이가 128보다 작거나 같고, 출력 길이가 128인 LFNST(즉, LFNST-128)가 이용될 수 있다. 즉, 8xN 또는 Nx8의 현재 블록에 대해서 LFNST8x16 또는 LFNST16x8가 적용되는 경우, 현재 블록 내 ROI 영역에 대해 LFNST-K가 적용될 수 있다. 여기서, K는 32, 64, 또는 128일 수 있으나, 이는 일예에 불과하며, K는 128보다 큰 정수일 수도 있다. 현재 블록의 ROI 영역은 128개의 샘플 위치들로 구성될 수 있다. 이 경우, 역방향의 LFNST8x16 또는 LFNST16x8에 대한 변환 행렬의 차원(또는, 크기)은 128xN일 수 있다. 여기서, N은 32, 40, 또는 48일 수 있다. 즉, LFNST-128의 입력 길이는 N이고, LFNST-128의 출력 길이는 128일 수 있다.
현재 블록의 크기가 8xN인 경우, LFNST-K는 현재 블록 내 ROI 영역에 속한 변환 계수들 전부 또는 일부에 대해 적용될 수 있다. LFNST-K를 통해 유도되는 변환 계수들은 상기 현재 블록 내 ROI 영역에 소정의 스캔 순서에 따라 배열될 수 있다. 또는, 현재 블록의 크기가 Nx8인 경우, LFNST-K는 현재 블록 내 ROI 영역에 속한 변환 계수들 전부 또는 일부에 대해 적용될 수 있다. LFNST-K를 통해 유도되는 변환 계수들은 상기 현재 블록 내 ROI 영역에 소정의 스캔 순서에 따라 배열될 수 있다.
LFNST-128를 위한 변환 커널은, 변환 세트에 속한 하나 또는 그 이상의 변환 커널들(또는, LFNST 커널 후보들) 중 어느 하나로 결정될 수 있다. 이를 위해, 변환 세트에 속한 복수의 변환 커널들 중 어느 하나를 특정하는 인덱스가 이용될 수 있다. 여기서, 인덱스는 비트스트림을 통해 시그날링될 수 있다. 상기 현재 블록의 변환 세트는, 기-정의된 복수의 변환 세트들 중 어느 하나로 결정될 수 있다. 일예로, 현재 블록의 변환 세트는 35개의 변환 세트들 중 어느 하나로 결정될 수 있고, 각 변환 세트는 3개의 변환 커널들을 포함할 수 있다. 상기 현재 블록의 변환 세트는, 현재 블록의 인트라 예측 모드에 기초하여 결정될 수 있으며, 이는 앞서 살펴본 바와 같다. LFNST-128를 위한 상기 복수의 변환 세트들은, LFNST8x16과 LFNST16x8에 대해서 각각 정의될 수도 있다.
다만, 전술한 바와 같이, LFNST8x16과 LFNST16x8은 현재 블록의 크기에 기초하여 적응적으로 적용될 수 있다. 현재 블록에 대해 LFNST8x16과 LFNST16x8이 적용되지 않는 경우, 입력 길이가 16이고 출력 길이가 48인 LFNST(이하, LFNST-48이라 함)가 이용될 수 있다. LFNST-48은 현재 블록 내 4x4 영역에 속한 변환 계수들에 대해 적용될 수 있다. 현재 블록 내 4x4 영역은, 현재 블록의 좌상단 샘플을 포함하는 영역으로서, 너비와 높이가 각각 4와 4인 블록을 의미할 수 있다. LFNST-48을 통해 유도되는 변환 계수들은 상기 현재 블록 내 3개의 4x4 영역들에 소정의 스캔 순서에 따라 배열될 수 있다. 3개의 4x4 영역들은, 현재 블록의 좌상단 샘플을 포함하는 제1 4x4 영역, 제1 4x4 영역의 우측에 인접한 제2 4x4 영역 및 제1 4x4 영역의 하단에 인접한 제3 4x4 영역으로 구성될 수 있다.
순방향의 변환 관점에서 살펴보면, 현재 블록의 레지듀얼 샘플들에 분리 일차 변환을 적용하여 변환 계수들을 유도할 수 있다. 상기 유도된 변환 계수들 전부 또는 현재 블록 내 일부 영역(즉, ROI 영역)에 속한 변환 계수들에 대해서만 순방향의 LFNST가 적용될 수 있다. LFNST를 통해 유도되는 변환 계수들은 현재 블록 내 ROI 영역에 소정의 스캔 순서에 따라 배열될 수 있다. LFNST에서 출력되는 변환 계수의 개수가 LFNST로 입력되는 변환 계수의 개수보다 적은 경우, ROI 영역 내에 LFNST를 통해 유도되는 변환 계수들로 채워지지 않는 영역이 존재할 수 있다. 해당 영역은 0인 변환 계수들로 채워질 수 있다. 또한, 현재 블록에서 ROI 영역을 제외한 나머지 영역(또는, LFNST가 적용되지 않는 영역)은 분리 일차 변환을 통해 유도된 변환 계수들로 채워질 수도 있고, zero-out을 통해 0인 변환 계수들로 채워질 수도 있다.
구체적으로, 현재 블록 또는 현재 블록의 ROI 영역에 대해서 LFNST8x16 또는 LFNST16x8이 적용되는 경우, 입력 길이가 K이고, 출력 길이가 K보다 작거나 같은 LFNST(즉, LFNST-K라 함)가 이용될 수 있다. 여기서, 입력 길이는 LFNST로 입력되는 변환 계수들의 개수를 의미할 수 있다. 상기 입력되는 변환 계수들은 분리 일차 변환을 통해 유도된 계수들일 수 있다. 상기 입력 길이는, 현재 블록의 ROI 영역에 속한 변환 계수들의 개수를 의미할 수도 있다. 출력 길이는 LFNST를 통해 유도되는 변환 계수들의 개수를 의미할 수 있다. 현재 블록의 ROI 영역은 128개의 샘플 위치들로 구성될 수 있다. 이 경우, 순방향의 LFNST8x16 또는 LFNST16x8에 대한 변환 행렬의 차원은 Nx128일 수 있다. 여기서, N은 32, 40, 또는 48일 수 있다. 즉, LFNST-128의 입력 길이는 128이고, LFNST-128의 출력 길이는 N일 수 있다.
일예로, 현재 블록의 크기가 8xN이고 N이 16보다 크거나 같은 경우, LFNST-K는 현재 블록 내 ROI 영역에 속한 변환 계수들에 대해 적용될 수 있다. LFNST-K를 통해 유도되는 변환 계수들은 상기 현재 블록 내 ROI 영역에 소정의 스캔 순서에 따라 배열될 수 있다. 또는, 현재 블록의 크기가 Nx8이고 N이 16보다 크거나 같은 경우, LFNST-K는 현재 블록 내 ROI 영역에 속한 변환 계수들에 대해 적용될 수 있다. LFNST-K를 통해 유도되는 변환 계수들은 상기 현재 블록 내 ROI 영역에 소정의 스캔 순서에 따라 배열될 수 있다.
다만, 전술한 바와 같이, LFNST8x16와 LFNST16x8는 현재 블록의 크기에 기초하여 적응적으로 적용될 수 있다. 현재 블록에 대해 LFNST8x16와 LFNST16x8가 적용되지 않는 경우, 입력 길이와 출력 길이가 각각 48과 16인 LFNST(즉, LFNST-48이라 함)가 이용될 수 있다. LFNST-48은 현재 블록 내 3개의 4x4 영역에 속한 변환 계수들에 대해 적용될 수 있다. 3개의 4x4 영역들은, 현재 블록의 좌상단 샘플을 포함하는 제1 4x4 영역, 제1 4x4 영역의 우측에 인접한 제2 4x4 영역 및 제1 4x4 영역의 하단에 인접한 제3 4x4 영역으로 구성될 수 있다. LFNST-48을 통해 유도되는 변환 계수들은 상기 현재 블록 내 4x4 영역에 소정의 스캔 순서에 따라 배열될 수 있다.
현재 블록에 대해서 LFNST8x16 또는 LFNST16x8을 적용함에 있어서, 전술한 블록 형태 간의 대칭성이 이용될 수 있다. 일예로, 8xN 블록과 Nx8 블록 간의 대칭성에 따라 현재 블록의 LFNST-K를 위한 LFNST 세트 및/또는 LFNST 커널이 결정될 수 있다. 8xN 블록(또는, Nx8 블록)은, 이와 대칭성을 가진 Nx8 블록(또는, 8xN 블록)에 대응하는 LNFST 세트 및/또는 LFNST 커널을 동일하게 이용할 수 있다. N이 16인 블록에 대해서는 전술한 대칭성이 그대로 이용될 수 있고, N이 32보다 크거나 같은 블록에 대해서는 현재 블록 내 ROI 영역(즉, 8x16 영역 또는 16x8 영역)에 대해 전술한 대칭성을 이용하여 LFNST가 적용될 수 있다.
전술한 바와 같이, Mx2M 블록에 대한 LFNSTMx2M과 2MxM 블록에 대한 LFNST2MxM이 정의될 수 있다. MxN의 현재 블록에 대해서 LFNSTMx2M이 적용되고, NxM의 현재 블록에 대해서 LFNST2MxM이 적용될 수 있다. 여기서, N은 (2*M)보다 크거나 같을 수 있다. 일예로, M은 16이고, N은 32보다 크거나 같을 수 있다.
LFNSTMx2M과 LFNST2MxM에 대해서 각각 ROI 영역이 정의될 수 있고, 소정의 입력 길이와 출력 길이를 가진 LFNST가 정의/이용될 수 있다. ROI 영역의 크기는, 현재 블록의 너비와 높이 중 최소값(즉, M)에 기초하여 결정될 수 있다. M의 값에 따라 ROI 영역의 크기가 상이할 수 있다. 일예로, MxN 블록의 ROI 영역은 MxN 블록 내 Mx2M 영역일 수 있다. 여기서, Mx2M 영역은, 현재 블록의 좌상단 샘플을 포함하는 영역으로서, 너비와 높이가 각각 M과 2M인 블록을 의미할 수 있다. NxM 블록의 ROI 영역은 NxM 블록 내 2MxM 영역일 수 있다. 여기서, 2MxM 영역은 현재 블록의 좌상단 샘플을 포함하는 영역으로서, 너비와 높이가 각각 2M과 M인 블록을 의미할 수 있다.
상기 현재 블록(또는, 현재 블록의 ROI 영역)에 LFNSTMx2M 또는 LFNST2MxM이 적용될 수 있다. 이 경우, 상기 LFNSTMx2M 또는 LFNST2MxM를 위한 LFNST의 입력 길이와 출력 길이 중 적어도 하나는, 현재 블록의 너비와 높이 중 최소값 또는 ROI 영역의 크기 중 적어도 하나에 기초하여 결정될 수 있다. 일예로, LFNST의 입력 길이는 (2*M*M)보다 작거나 같고, LFNST의 출력 길이는 (2*M*M)일 수 있다. 상기 입력 길이는 LFNST로 입력되는 변환 계수들의 개수를 의미할 수 있다. 여기서, LFNST로 입력되는 변환 계수들은, 현재 블록의 레지듀얼 정보를 기반으로 유도된 변환 계수들 전부를 의미할 수도 있고, 상기 유도된 변환 계수들 중 순방향의 LFNST가 적용된 변환 계수들을 의미할 수도 있다. 상기 출력 길이는 LFNST를 통해 유도되는 변환 계수들의 개수를 의미할 수 있다. 현재 블록의 ROI 영역은 (2*M*M)개의 샘플 위치들로 구성될 수 있다. 이 경우, 역방향의 LFNSTMx2M 또는 LFNST2MxM에 대한 변환 행렬의 차원(또는, 크기)은 (2*M*M)xL일 수 있다. 즉, LFNST의 입력 길이는 L이고, LFNST의 출력 길이는 (2*M*M)일 수 있다. 여기서, L의 값은 (2*M*M)보다 작거나 같도록 설정될 수 있다.
현재 블록의 크기가 MxN인 경우, LFNST는 현재 블록 내 ROI 영역인 Mx2M 영역에 속한 변환 계수들 전부 또는 일부에 대해 적용될 수 있다. LFNST를 통해 유도되는 변환 계수들은 상기 현재 블록 내 Mx2M 영역에 소정의 스캔 순서에 따라 배열될 수 있다. 또는, 현재 블록의 크기가 NxM인 경우, LFNST는 현재 블록 내 ROI 영역인 2MxM 영역에 속한 변환 계수들 전부 또는 일부에 대해 적용될 수 있다. LFNST를 통해 유도되는 변환 계수들은 상기 현재 블록 내 2MxM 영역에 소정의 스캔 순서에 따라 배열될 수 있다.
상기 LFNST를 위한 변환 커널은, 변환 세트에 속한 하나 또는 그 이상의 변환 커널들(또는, LFNST 커널 후보들) 중 어느 하나로 결정될 수 있다. 이를 위해, 변환 세트에 속한 복수의 변환 커널들 중 어느 하나를 특정하는 인덱스가 이용될 수 있다. 여기서, 인덱스는 비트스트림을 통해 시그날링될 수 있다. 상기 현재 블록의 변환 세트는, 기-정의된 복수의 변환 세트들 중 어느 하나로 결정될 수 있다. 일예로, 현재 블록의 변환 세트는 35개의 변환 세트들 중 어느 하나로 결정될 수 있고, 각 변환 세트는 3개의 변환 커널들을 포함할 수 있다. 상기 현재 블록의 변환 세트는, 현재 블록의 인트라 예측 모드에 기초하여 결정될 수 있으며, 이는 앞서 살펴본 바와 같다. LFNST를 위한 상기 복수의 변환 세트들은, LFNSTMx2M과 LFNST2MxM에 대해서 각각 정의될 수도 있다.
순방향의 변환 관점에서 살펴보면, 현재 블록의 레지듀얼 샘플들에 분리 일차 변환을 적용하여 변환 계수들을 유도할 수 있다. 상기 유도된 변환 계수들 전부 또는 현재 블록 내 일부 영역(즉, ROI 영역)에 속한 변환 계수들에 대해서만 순방향의 LFNST가 적용될 수 있다. LFNST를 통해 유도되는 변환 계수들은 현재 블록 내 ROI 영역에 소정의 스캔 순서에 따라 배열될 수 있다. LFNST에서 출력되는 변환 계수의 개수가 LFNST로 입력되는 변환 계수의 개수보다 적은 경우, ROI 영역 내에 LFNST를 통해 유도되는 변환 계수들로 채워지지 않는 영역이 존재할 수 있다. 해당 영역은 0인 변환 계수들로 채워질 수 있다. 또한, 현재 블록에서 ROI 영역을 제외한 나머지 영역(또는, LFNST가 적용되지 않는 영역)은 분리 일차 변환을 통해 유도된 변환 계수들로 채워질 수도 있고, zero-out을 통해 0인 변환 계수들로 채워질 수도 있다.
구체적으로, 현재 블록 또는 현재 블록의 ROI 영역에 대해서 LFNSTMx2M 또는 LFNST2MxM이 적용되는 경우, 입력 길이가 (2*M*M)이고, 출력 길이가 (2*M*M)보다 작거나 같은 LFNST가 이용될 수 있다. 여기서, 입력 길이는 LFNST로 입력되는 변환 계수들의 개수를 의미할 수 있다. 상기 입력되는 변환 계수들은 분리 일차 변환을 통해 유도된 계수들일 수 있다. 상기 입력 길이는, 현재 블록의 ROI 영역에 속한 변환 계수들의 개수를 의미할 수도 있다. 출력 길이는 LFNST를 통해 유도되는 변환 계수들의 개수를 의미할 수 있다. 현재 블록의 ROI 영역은 (2*M*M)개의 샘플 위치들로 구성될 수 있다. 이 경우, 순방향의 LFNSTMx2M 또는 LFNST2MxM에 대한 변환 행렬의 차원은 Lx(2*M*M)일 수 있다. 즉, LFNST의 입력 길이는 (2*M*M)이고, LFNST의 출력 길이는 L일 수 있다. 여기서, L의 값은 (2*M*M)보다 작거나 같도록 설정될 수 있다.
현재 블록의 크기가 MxN인 경우, LFNST는 현재 블록 내 ROI 영역인 Mx2M 영역에 속한 변환 계수들에 대해 적용될 수 있다. LFNST를 통해 유도되는 변환 계수들은 상기 현재 블록 내 Mx2M 영역에 소정의 스캔 순서에 따라 배열될 수 있다. 또는, 현재 블록의 크기가 NxM인 경우, LFNST는 현재 블록 내 ROI 영역인 2MxM 영역에 속한 변환 계수들에 대해 적용될 수 있다. LFNST를 통해 유도되는 변환 계수들은 상기 현재 블록 내 2MxM 영역에 소정의 스캔 순서에 따라 배열될 수 있다.
현재 블록에 대해서 LFNSTMx2M 또는 LFNST2MxM를 적용함에 있어서, 전술한 블록 형태 간의 대칭성이 이용될 수 있다. 일예로, MxN 블록과 NxM 블록 간의 대칭성에 따라 현재 블록의 LFNST를 위한 LFNST 세트 및/또는 LFNST 커널이 결정될 수 있다. MxN 블록(또는, NxM 블록)은, 이와 대칭성을 가진 NxM 블록(또는, MxN 블록)에 대응하는 LNFST 세트 및/또는 LFNST 커널을 동일하게 이용할 수 있다. N이 2M인 블록에 대해서는 전술한 대칭성이 그대로 이용될 수 있고, N이 2M보다 큰 블록에 대해서는 현재 블록 내 ROI 영역(즉, Mx2M 영역 또는 2MxM 영역)에 대해 전술한 대칭성을 이용하여 LFNST가 적용될 수 있다.
M x rM 블록에 대한 LFNSTMxrM과 rM x M 블록에 대한 LFNSTrMxM이 정의될 수 있다. 여기서, r의 값은 2보다 크거나 같은 정수일 수 있다. rM은 (r*M)을 나타내며, 이하 동일한 의미로 간주될 수 있다. MxN의 현재 블록에 대해서 LFNSTMxrM이 적용되고, NxM의 현재 블록에 대해서 LFNSTrMxM이 적용될 수 있다. 여기서, N은 (r*M)보다 크거나 같을 수 있다.
LFNSTMxrM과 LFNSTrMxM에 대해서 각각 ROI 영역이 정의될 수 있고, 소정의 입력 길이와 출력 길이를 가진 LFNST가 정의/이용될 수 있다. ROI 영역의 크기는, 현재 블록의 너비와 높이 중 최소값(즉, M)에 기초하여 결정될 수 있다. M의 값에 따라 ROI 영역의 크기가 상이할 수 있다. 일예로, MxN 블록의 ROI 영역은 MxN 블록 내 M x rM 영역일 수 있다. 여기서, M x rM 영역은, 현재 블록의 좌상단 샘플을 포함하는 영역으로서, 너비와 높이가 각각 M과 rM인 블록을 의미할 수 있다. NxM 블록의 ROI 영역은 NxM 블록 내 rM x M 영역일 수 있다. 여기서, rM x M 영역은 현재 블록의 좌상단 샘플을 포함하는 영역으로서, 너비와 높이가 각각 rM과 M인 블록을 의미할 수 있다.
상기 현재 블록(또는, 현재 블록의 ROI 영역)에 LFNSTMxrM 또는 LFNSTrMxM이 적용될 수 있다. 이 경우, 상기 LFNSTMxrM 또는 LFNSTrMxM를 위한 LFNST의 입력 길이와 출력 길이 중 적어도 하나는, 현재 블록의 너비와 높이 중 최소값 또는 ROI 영역의 크기 중 적어도 하나에 기초하여 결정될 수 있다. 일예로, LFNST의 입력 길이는 (r*M*M)보다 작거나 같고, LFNST의 출력 길이는 (r*M*M)일 수 있다. 상기 입력 길이는 LFNST로 입력되는 변환 계수들의 개수를 의미할 수 있다. 여기서, LFNST로 입력되는 변환 계수들은, 현재 블록의 레지듀얼 정보를 기반으로 유도된 변환 계수들 전부를 의미할 수도 있고, 상기 유도된 변환 계수들 중 순방향의 LFNST가 적용된 변환 계수들을 의미할 수도 있다. 상기 출력 길이는 LFNST를 통해 유도되는 변환 계수들의 개수를 의미할 수 있다. 현재 블록의 ROI 영역은 (r*M*M)개의 샘플 위치들로 구성될 수 있다. 이 경우, 역방향의 LFNSTMxrM 또는 LFNSTrMxM에 대한 변환 행렬의 차원(또는, 크기)은 (r*M*M)xL일 수 있다. 즉, LFNST의 입력 길이는 L이고, LFNST의 출력 길이는 (r*M*M)일 수 있다. 여기서, L의 값은 (r*M*M)보다 작거나 같도록 설정될 수 있다.
현재 블록의 크기가 MxN인 경우, LFNST는 현재 블록 내 ROI 영역인 M x rM 영역에 속한 변환 계수들 전부 또는 일부에 대해 적용될 수 있다. LFNST를 통해 유도되는 변환 계수들은 상기 현재 블록 내 M x rM 영역에 소정의 스캔 순서에 따라 배열될 수 있다. 또는, 현재 블록의 크기가 NxM인 경우, LFNST는 현재 블록 내 ROI 영역인 rM x M 영역에 속한 변환 계수들 전부 또는 일부에 대해 적용될 수 있다. LFNST를 통해 유도되는 변환 계수들은 상기 현재 블록 내 rM x M 영역에 소정의 스캔 순서에 따라 배열될 수 있다.
상기 LFNST를 위한 변환 커널은, 변환 세트에 속한 하나 또는 그 이상의 변환 커널들(또는, LFNST 커널 후보들) 중 어느 하나로 결정될 수 있다. 이를 위해, 변환 세트에 속한 복수의 변환 커널들 중 어느 하나를 특정하는 인덱스가 이용될 수 있다. 여기서, 인덱스는 비트스트림을 통해 시그날링될 수 있다. 상기 현재 블록의 변환 세트는, 기-정의된 복수의 변환 세트들 중 어느 하나로 결정될 수 있다. 일예로, 현재 블록의 변환 세트는 35개의 변환 세트들 중 어느 하나로 결정될 수 있고, 각 변환 세트는 3개의 변환 커널들을 포함할 수 있다. 상기 현재 블록의 변환 세트는, 현재 블록의 인트라 예측 모드에 기초하여 결정될 수 있으며, 이는 앞서 살펴본 바와 같다. LFNST를 위한 상기 복수의 변환 세트들은, LFNSTMxrM과 LFNSTrMxM에 대해서 각각 정의될 수도 있다.
순방향의 변환 관점에서 살펴보면, 현재 블록의 레지듀얼 샘플들에 분리 일차 변환을 적용하여 변환 계수들을 유도할 수 있다. 상기 유도된 변환 계수들 전부 또는 현재 블록 내 일부 영역(즉, ROI 영역)에 속한 변환 계수들에 대해서만 순방향의 LFNST가 적용될 수 있다. LFNST를 통해 유도되는 변환 계수들은 현재 블록 내 ROI 영역에 소정의 스캔 순서에 따라 배열될 수 있다. LFNST에서 출력되는 변환 계수의 개수가 LFNST로 입력되는 변환 계수의 개수보다 적은 경우, ROI 영역 내에 LFNST를 통해 유도되는 변환 계수들로 채워지지 않는 영역이 존재할 수 있다. 해당 영역은 0인 변환 계수들로 채워질 수 있다. 또한, 현재 블록에서 ROI 영역을 제외한 나머지 영역(또는, LFNST가 적용되지 않는 영역)은 분리 일차 변환을 통해 유도된 변환 계수들로 채워질 수도 있고, zero-out을 통해 0인 변환 계수들로 채워질 수도 있다.
구체적으로, 현재 블록 또는 현재 블록의 ROI 영역에 대해서 LFNSTMxrM 또는 LFNSTrMxM이 적용되는 경우, 입력 길이가 (r*M*M)이고, 출력 길이가 (r*M*M)보다 작거나 같은 LFNST가 이용될 수 있다. 여기서, 입력 길이는 LFNST로 입력되는 변환 계수들의 개수를 의미할 수 있다. 상기 입력되는 변환 계수들은 분리 일차 변환을 통해 유도된 계수들일 수 있다. 상기 입력 길이는, 현재 블록의 ROI 영역에 속한 변환 계수들의 개수를 의미할 수도 있다. 출력 길이는 LFNST를 통해 유도되는 변환 계수들의 개수를 의미할 수 있다. 현재 블록의 ROI 영역은 (r*M*M)개의 샘플 위치들로 구성될 수 있다. 이 경우, 순방향의 LFNSTMxrM 또는 LFNSTrMxM에 대한 변환 행렬의 차원은 Lx(r*M*M)일 수 있다. 즉, LFNST의 입력 길이는 (r*M*M)이고, LFNST의 출력 길이는 L일 수 있다. 여기서, L의 값은 (r*M*M)보다 작거나 같도록 설정될 수 있다.
현재 블록의 크기가 MxN인 경우, LFNST는 현재 블록 내 ROI 영역인 M x rM 영역에 속한 변환 계수들에 대해 적용될 수 있다. LFNST를 통해 유도되는 변환 계수들은 상기 현재 블록 내 M x rM 영역에 소정의 스캔 순서에 따라 배열될 수 있다. 또는, 현재 블록의 크기가 NxM인 경우, LFNST는 현재 블록 내 ROI 영역인 rM x M 영역에 속한 변환 계수들에 대해 적용될 수 있다. LFNST를 통해 유도되는 변환 계수들은 상기 현재 블록 내 rM x M 영역에 소정의 스캔 순서에 따라 배열될 수 있다.
현재 블록에 대해서 LFNSTMxrM 또는 LFNSTrMxM를 적용함에 있어서, 전술한 블록 형태 간의 대칭성이 이용될 수 있다. 일예로, MxN 블록과 NxM 블록 간의 대칭성에 따라 현재 블록의 LFNST를 위한 LFNST 세트 및/또는 LFNST 커널이 결정될 수 있다. MxN 블록(또는, NxM 블록)은, 이와 대칭성을 가진 NxM 블록(또는, MxN 블록)에 대응하는 LNFST 세트 및/또는 LFNST 커널을 동일하게 이용할 수 있다. N이 rM인 블록에 대해서는 전술한 대칭성이 그대로 이용될 수 있고, N이 rM보다 큰 블록에 대해서는 현재 블록 내 ROI 영역(즉, M x rM 영역 또는 rM x M 영역)에 대해 전술한 대칭성을 이용하여 LFNST가 적용될 수 있다.
일예로, M의 값이 4이고 r의 값이 4인 경우, LFNST4x16과 LFNST16x4이 정의될 수 있다. 4xN의 현재 블록에 대해 LFNST4x16이 적용될 수 있고, Nx4의 현재 블록에 대해 LFNST16x4이 적용될 수 있다. 여기서, N은 16보다 크거나 같을 수 있다. 현재 블록이 4xN 블록인 경우, 현재 블록의 ROI 영역은 현재 블록 내 4x16 영역일 수 있다. 여기서, 4x16 영역은, 현재 블록의 좌상단 샘플을 포함하는 영역으로서, 너비와 높이가 각각 4과 16인 블록을 의미할 수 있다. 현재 블록 내 ROI 영역인 4x16 영역에 LFNST4x16이 적용될 수 있다. 또는, 현재 블록이 Nx4 블록인 경우, 현재 블록의 ROI 영역은 현재 블록 내 16x4 영역일 수 있다. 여기서, 16x4 영역은, 현재 블록의 좌상단 샘플을 포함하는 영역으로서, 너비와 높이가 각각 16과 4인 블록을 의미할 수 있다. 현재 블록 내 ROI 영역인 16x4 영역에 LFNST16x4이 적용될 수 있다.
현재 블록의 크기에 기초하여, 전술한 LFNSTMxrM(또는, LFNSTrMxM)은 현재 블록에 적응적으로 적용될 수 있다.
구체적으로, 현재 블록의 너비 또는 높이 중 어느 하나가 소정의 문턱크기보다 작은 경우, 현재 블록에 LFNSTMxrM(또는, LFNSTrMxM)가 적용될 수 있다. 반면, 현재 블록의 너비 또는 높이 중 어느 하나가 소정의 문턱크기보다 크거나 같은 경우, 현재 블록에 LFNSTMxrM(또는, LFNSTrMxM)가 적용되지 않을 수 있다. 현재 블록의 너비 또는 높이 중 어느 하나가 소정의 문턱크기보다 크거나 같은 경우, 현재 블록에 NSPT가 적용될 수 있다. 일예로, 상기 현재 블록의 너비 또는 높이 중 어느 하나는, 현재 블록의 너비 또는 높이 중 최소값으로 정의될 수 있다. 상기 문턱크기는 8로 정의될 수 있다. 이 경우, 현재 블록이 4xN 블록인 경우, 현재 블록에 대해서 LFNST4x8이 적용될 수 있다. 또는, 현재 블록이 Nx4 블록인 경우, 현재 블록에 대해서 LFNST8x4이 적용될 수 있다. 여기서, N은 8보다 크거나 같은 정수일 수 있다. 반면, 현재 블록이 8x16 블록(또는, 16x8 블록)인 경우, 현재 블록에 대해서 LFNST8x16(또는, LFNST16x8)이 적용되지 않을 수 있다. 현재 블록이 8x16 블록(또는, 16x8 블록)인 경우, 현재 블록에 대해서 NSPT가 적용될 수 있다.
또는, 현재 블록의 너비 또는 높이 중 어느 하나가 소정의 문턱크기보다 크거나 같은 경우, 현재 블록에 LFNSTMxrM(또는, LFNSTrMxM)가 적용될 수 있다. 반면, 현재 블록의 너비 또는 높이 중 어느 하나가 소정의 문턱크기보다 작은 경우, 현재 블록에 LFNSTMxrM(또는, LFNSTrMxM)가 적용되지 않을 수 있다. 현재 블록의 너비 또는 높이 중 어느 하나가 소정의 문턱크기보다 작은 경우, 현재 블록에 NSPT가 적용될 수 있다. 일예로, 상기 현재 블록의 너비 또는 높이 중 어느 하나는, 현재 블록의 너비 또는 높이 중 최대값으로 정의될 수 있다. 상기 문턱크기는 16으로 정의될 수 있다. 이 경우, 현재 블록이 4xL 블록인 경우, 현재 블록에 대해서 LFNST4x16이 적용될 수 있다. 또는, 현재 블록이 Lx4 블록인 경우, 현재 블록에 대해서 LFNST16x4이 적용될 수 있다. 여기서, L은 16보다 크거나 같은 정수일 수 있다. 반면, 현재 블록이 4x8 블록(또는, 8x4 블록)인 경우, 현재 블록에 대해서 LFNST4x8(또는, LFNST8x4)이 적용되지 않을 수 있다. 현재 블록이 4x8 블록(또는, 8x4 블록)인 경우, 현재 블록에 대해서 NSPT가 적용될 수 있다.
또는, 현재 블록의 너비 또는 높이 중 어느 하나가 소정의 문턱크기보다 크거나 같은 경우, 현재 블록에 LFNSTMxrM(또는, LFNSTrMxM)가 적용될 수 있다. 반면, 현재 블록의 너비 또는 높이 중 어느 하나가 소정의 문턱크기보다 작은 경우, 현재 블록에 LFNSTMxrM(또는, LFNSTrMxM)가 적용되지 않을 수 있다. 현재 블록의 너비 또는 높이 중 어느 하나가 소정의 문턱크기보다 작은 경우, 현재 블록에 NSPT가 적용될 수 있다. 일예로, 상기 현재 블록의 너비 또는 높이 중 어느 하나는, 현재 블록의 너비 또는 높이 중 최소값으로 정의될 수 있다. 상기 문턱크기는 8로 정의될 수 있다. 이 경우, 현재 블록이 8xN 블록인 경우, 현재 블록에 대해서 LFNST8x16이 적용될 수 있다. 또는, 현재 블록이 Nx8 블록인 경우, 현재 블록에 대해서 LFNST16x8이 적용될 수 있다. 여기서, N은 16보다 크거나 같은 정수일 수 있다. 반면, 현재 블록이 4x8 블록, 8x4 블록, 4x16 블록, 또는 16x4 블록인 경우, 현재 블록에 대해서 NSPT가 적용될 수 있다.
LFNST4x8과 LFNST8x4의 ROI 영역은 LFNST4와 동일하게 구성될 수 있다. 여기서, LFNST4는 4x4 블록에 적용되는 LFNST를 의미하고, LFNST4의 ROI 영역은 4x4 블록일 수 있다. 즉, LFNST4x8 또는 LFNST8x4가 적용될 수 있는 블록인 4xN 또는 Nx4 블록에 LFNST가 적용되는 경우, 16개의 변환 계수들이 출력되고, 출력된 16개의 변환 계수들은 4xN 또는 Nx4 블록 내 4x4 영역에 배열될 수 있다. 여기서, N은 8보다 크거나 같은 정수일 수 있음은 앞서 살펴본 바와 같다. 일예로, N은 8, 16, 32 또는 그 이상의 정수일 수 있다. 상기 4x4 영역은, 4xN 또는 Nx4 블록 내 좌상단 샘플을 포함하는 영역으로서, 너비와 높이가 각각 4와 4인 영역일 수 있다.
상기 LFNST4x8과 LFNST8x4에 대한 변환 행렬의 차원(또는, 크기)은 상기 LFNST4와 동일하게 구성될 수 있다. 일예로, LFNST4x8과 LFNST8x4을 위한 변환 행렬의 차원은 16x16 행렬일 수 있다. 즉, 4xN 또는 Nx4 블록에 LFNST가 적용되는 경우, 4xN 또는 Nx4 블록 내 ROI 영역(즉, 4x4 영역)에 속한 16개의 변환 계수들이 LFNST로 입력되고, LFNST를 통해 16개의 변환 계수들이 출력될 수 있다. 다만, 이에 한정되지 아니하며, LFNST4x8과 LFNST8x4에 대한 변환 행렬의 차원은 상기 LFNST4와 상이하게 구성될 수도 있다. 일예로, 4x4 블록에 대한 LFNST의 입력 길이는 4xN 또는 Nx4 블록에 대한 LFNST의 입력 길이와 상이할 수 있고, 4x4 블록에 대한 LFNST의 출력 길이는 4xN 또는 Nx4 블록에 대한 LFNST의 출력 길이와 동일할 수 있다. 앞서 설명한 바와 같이, LFNST의 입력 또는 출력 길이는, LFNST로 입력되는 또는 LFNST를 통해 출력되는 변환 계수들의 개수를 의미할 수 있다.
순방향의 변환 관점에서 살펴보면, LFNST4x8 또는 LFNST8x4가 적용될 수 있는 블록인 4xN 또는 Nx4 블록에 LFNST가 적용되는 경우, 4xN 또는 Nx4 블록 내 4x4 영역에 속한 16개의 변환 계수들이 LFNST로 입력될 수 있다. 여기서, N은 8보다 크거나 같은 정수일 수 있음은 앞서 살펴본 바와 같다. 일예로, N은 8, 16, 32 또는 그 이상의 정수일 수 있다. 상기 4x4 영역은, 4xN 또는 Nx4 블록 내 좌상단 샘플을 포함하는 영역으로서, 너비와 높이가 각각 4와 4인 영역일 수 있다.
상기 LFNST4x8과 LFNST8x4에 대한 변환 행렬의 차원(또는, 크기)은 상기 LFNST4와 동일하게 구성될 수 있다. 일예로, LFNST4x8과 LFNST8x4을 위한 변환 행렬의 차원은 16x16 행렬일 수 있다. 즉, 4xN 또는 Nx4 블록에 LFNST가 적용되는 경우, 4xN 또는 Nx4 블록 내 ROI 영역(즉, 4x4 영역)에 속한 16개의 변환 계수들이 LFNST로 입력되고, LFNST를 통해 16개의 변환 계수들이 출력될 수 있다. 다만, 이에 한정되지 아니하며, LFNST4x8과 LFNST8x4에 대한 변환 행렬의 차원은 상기 LFNST4와 상이하게 구성될 수도 있다. 일예로, 4x4 블록에 대한 LFNST의 입력 길이는 4xN 또는 Nx4 블록에 대한 LFNST의 입력 길이와 동일할 수 있고, 4x4 블록에 대한 LFNST의 출력 길이는 4xN 또는 Nx4 블록에 대한 LFNST의 출력 길이와 상이할 수 있다.
LFNST4x8과 LFNST8x4을 위한 변환 세트들, 각 변환 세트에 속한 변환 커널들의 개수, 또는 변환 세트의 결정 중 적어도 하나는, LFNST4와 동일하게 구성될 수도 있다. 다시 말해, 4x4 블록을 위한 변환 세트들, 각 변환 세트에 속한 변환 커널들의 개수, 또는 변환 세트의 결정 방법은, 상기 4xN 또는 Nx4 블록에 대해서도 동일하게 적용될 수 있다.
LFNST8x16과 LFNST16x8의 ROI 영역은 LFNST8과 동일하게 구성될 수 있다. 여기서, LFNST8은 8x8 블록에 적용되는 LFNST를 의미하고, LFNST8의 ROI 영역은 8x8 블록일 수 있다. 즉, LFNST8x16 또는 LFNST16x8이 적용될 수 있는 블록인 8xN 또는 Nx8 블록에 LFNST가 적용되는 경우, 64개의 변환 계수들이 출력되고, 출력된 64개의 변환 계수들은 8xN 또는 Nx8 블록 내 8x8 영역에 배열될 수 있다. 여기서, N은 16보다 크거나 같은 정수일 수 있음은 앞서 살펴본 바와 같다. 일예로, N은 16, 32, 64 또는 그 이상의 정수일 수 있다. 상기 8x8 영역은, 8xN 또는 Nx8 블록 내 좌상단 샘플을 포함하는 영역으로서, 너비와 높이가 각각 8과 8인 영역일 수 있다.
상기 LFNST8x16과 LFNST16x8에 대한 변환 행렬의 차원(또는, 크기)은 상기 LFNST8과 동일하게 구성될 수 있다. 일예로, LFNST8x16과 LFNST16x8을 위한 변환 행렬의 차원은 64x32 행렬일 수 있다. 즉, 8xN 또는 Nx8 블록에 LFNST가 적용되는 경우, 8xN 또는 Nx8 블록 내 ROI 영역(즉, 8x8 영역)에 속한 32개의 변환 계수들이 LFNST로 입력되고, LFNST를 통해 64개의 변환 계수들이 출력될 수 있다. 다만, 이에 한정되지 아니하며, LFNST8x16과 LFNST16x8에 대한 변환 행렬의 차원은 상기 LFNST8과 상이하게 구성될 수도 있다. 일예로, 8x8 블록에 대한 LFNST의 입력 길이는 8xN 또는 Nx8 블록에 대한 LFNST의 입력 길이와 상이할 수 있고, 8x8 블록에 대한 LFNST의 출력 길이는 8xN 또는 Nx8 블록에 대한 LFNST의 출력 길이와 동일할 수 있다. LFNST8을 위한 변환 행렬의 차원은 64x16이고, LFNST8x16과 LFNST16x8을 위한 변환 행렬의 차원은 64x32 행렬일 수 있다. 즉, 8x8 블록에 대한 LFNST의 입력 길이와 출력 길이는 각각 16과 64일 수 있다. 반면, 8xN 또는 Nx8 블록에 대한 LFNST의 입력 길이와 출력 길이는 각각 32와 64일 수 있다. 이는, 8xN 또는 Nx8 블록 내 ROI 영역(즉, 8x8 영역)에 속한 32개의 변환 계수들이 LFNST로 입력되고, LFNST를 통해 64개의 변환 계수들이 출력될 수 있음을 의미한다.
순방향의 변환 관점에서 살펴보면, LFNST8x16 또는 LFNST16x8이 적용될 수 있는 블록인 8xN 또는 Nx8 블록에 LFNST가 적용되는 경우, 8xN 또는 Nx8 블록 내 8x8 영역에 속한 64개의 변환 계수들이 LFNST로 입력될 수 있다. 여기서, N은 16보다 크거나 같은 정수일 수 있음은 앞서 살펴본 바와 같다. 일예로, N은 16, 32, 64 또는 그 이상의 정수일 수 있다. 상기 8x8 영역은, 8xN 또는 Nx8 블록 내 좌상단 샘플을 포함하는 영역으로서, 너비와 높이가 각각 8과 8인 영역일 수 있다.
상기 LFNST8x16과 LFNST16x8에 대한 변환 행렬의 차원(또는, 크기)은 상기 LFNST8과 동일하게 구성될 수 있다. 일예로, LFNST8x16과 LFNST16x8을 위한 변환 행렬의 차원은 32x64 행렬일 수 있다. 즉, 8xN 또는 Nx8 블록에 LFNST가 적용되는 경우, 8xN 또는 Nx8 블록 내 ROI 영역(즉, 8x8 영역)에 속한 64개의 변환 계수들이 LFNST로 입력되고, LFNST를 통해 32개의 변환 계수들이 출력될 수 있다. 다만, 이에 한정되지 아니하며, LFNST8x16과 LFNST16x8에 대한 변환 행렬의 차원은 상기 LFNST8과 상이하게 구성될 수도 있다. 일예로, 8x8 블록에 대한 LFNST의 입력 길이는 8xN 또는 Nx8 블록에 대한 LFNST의 입력 길이와 동일할 수 있고, 8x8 블록에 대한 LFNST의 출력 길이는 8xN 또는 Nx8 블록에 대한 LFNST의 출력 길이와 상이할 수 있다. LFNST8을 위한 변환 행렬의 차원은 16x64이고, LFNST8x16과 LFNST16x8을 위한 변환 행렬의 차원은 32x64 행렬일 수 있다. 즉, 8x8 블록에 대한 LFNST의 입력 길이와 출력 길이는 각각 64과 16일 수 있다. 반면, 8xN 또는 Nx8 블록에 대한 LFNST의 입력 길이와 출력 길이는 각각 64와 32일 수 있다. 이는, 8xN 또는 Nx8 블록 내 ROI 영역(즉, 8x8 영역)에 속한 64개의 변환 계수들이 LFNST로 입력되고, LFNST를 통해 32개의 변환 계수들이 출력될 수 있음을 의미한다.
LFNST8x16과 LFNST16x8을 위한 변환 세트들, 각 변환 세트에 속한 변환 커널들의 개수, 또는 변환 세트의 결정 중 적어도 하나는, LFNST8과 동일하게 구성될 수도 있다. 다시 말해, 8x8 블록을 위한 변환 세트들, 각 변환 세트에 속한 변환 커널들의 개수, 또는 변환 세트의 결정 방법은, 상기 8xN 또는 Nx8 블록에 대해서도 동일하게 적용될 수 있다.
LFNST16x32과 LFNST32x16의 ROI 영역은 LFNST16과 동일하게 구성될 수 있다. 여기서, LFNST16은 16x16 블록에 적용되는 LFNST를 의미하고, LFNST16의 ROI 영역은 하나 또는 그 이상의 4x4 블록들로 구성될 수 있다. 일예로, LFNST16의 ROI 영역은, 16x16 블록 내 6개의 4x4 블록들로 구성될 수 있다. 여기서, 6개의 4x4 블록들은, 소정의 스캔 순서에 따른 첫번째 4x4 블록부터 여섯번째 4x4 블록까지를 의미할 수 있다. 즉, LFNST16의 ROI 영역은 96개의 샘플 위치들로 구성될 수 있다. 상기 스캔 순서는 대각 스캔에 따른 순서를 의미하나, 이에 한정되지 아니하며 수직 스캔, 수평 스캔 등이 이용될 수도 있다.
다시 말해, LFNST16x32 또는 LFNST32x16이 적용될 수 있는 블록인 16xN 또는 Nx16 블록에 LFNST가 적용되는 경우, 96개의 변환 계수들이 출력되고, 출력된 96개의 변환 계수들은 16xN 또는 Nx16 블록 내 ROI 영역에 배열될 수 있다. 여기서, N은 32보다 크거나 같은 정수일 수 있음은 앞서 살펴본 바와 같다. 일예로, N은 32, 64 또는 그 이상의 정수일 수 있다.
상기 LFNST16x32와 LFNST32x16에 대한 변환 행렬의 차원(또는, 크기)은 상기 LFNST16과 동일하게 구성될 수 있다. 일예로, LFNST16x32와 LFNST32x16을 위한 변환 행렬의 차원은 96x32 행렬일 수 있다. 즉, 16xN 또는 Nx16 블록에 LFNST가 적용되는 경우, 16xN 또는 Nx16 블록 내 ROI 영역에 속한 32개의 변환 계수들이 LFNST로 입력되고, LFNST를 통해 96개의 변환 계수들이 출력될 수 있다. 다만, 이에 한정되지 아니하며, LFNST16x32와 LFNST32x16에 대한 변환 행렬의 차원은 상기 LFNST16과 상이하게 구성될 수도 있다. 일예로, 16x16 블록에 대한 LFNST의 입력 길이는 16xN 또는 Nx16 블록에 대한 LFNST의 입력 길이와 상이할 수 있고, 16x16 블록에 대한 LFNST의 출력 길이는 16xN 또는 Nx16 블록에 대한 LFNST의 출력 길이와 동일할 수 있다.
순방향의 변환 관점에서 살펴보면, LFNST16x32 또는 LFNST32x16이 적용될 수 있는 블록인 16xN 또는 Nx16 블록에 LFNST가 적용되는 경우, 16xN 또는 Nx16 블록 내 ROI 영역에 속한 96개의 변환 계수들이 LFNST로 입력될 수 있다. 여기서, N은 32보다 크거나 같은 정수일 수 있음은 앞서 살펴본 바와 같다. 일예로, N은 32, 64 또는 그 이상의 정수일 수 있다.
상기 LFNST16x32와 LFNST32x16에 대한 변환 행렬의 차원(또는, 크기)은 상기 LFNST16과 동일하게 구성될 수 있다. 일예로, LFNST16x32와 LFNST32x16을 위한 변환 행렬의 차원은 32x96 행렬일 수 있다. 즉, 16xN 또는 Nx16 블록에 LFNST가 적용되는 경우, 16xN 또는 Nx16 블록 내 ROI 영역에 속한 96개의 변환 계수들이 LFNST로 입력되고, LFNST를 통해 32개의 변환 계수들이 출력될 수 있다. 다만, 이에 한정되지 아니하며, LFNST16x32와 LFNST32x16에 대한 변환 행렬의 차원은 상기 LFNST16과 상이하게 구성될 수도 있다. 일예로, 16x16 블록에 대한 LFNST의 입력 길이는 16xN 또는 Nx16 블록에 대한 LFNST의 입력 길이와 동일할 수 있고, 16x16 블록에 대한 LFNST의 출력 길이는 16xN 또는 Nx16 블록에 대한 LFNST의 출력 길이와 상이할 수 있다.
LFNST16x32와 LFNST32x16을 위한 변환 세트들, 각 변환 세트에 속한 변환 커널들의 개수, 또는 변환 세트의 결정 중 적어도 하나는, LFNST16과 동일하게 구성될 수도 있다. 다시 말해, 16x16 블록을 위한 변환 세트들, 각 변환 세트에 속한 변환 커널들의 개수, 또는 변환 세트의 결정 방법은, 상기 16xN 또는 Nx16 블록에 대해서도 동일하게 적용될 수 있다.
MxN 블록에 대해서는 정방형 블록을 위한 LFNST 또는 비정방형 블록을 위한 LFNST가 적용될 수 있다. 여기서, M과 N은 각각 32보다 크거나 같은 정수일 수 있다. M과 N은 동일할 수도 있고, 서로 상이할 수도 있다. 상기 정방형 블록을 위한 LFNST는 전술한 LFNST16을 의미할 수 있다. 다만, 이에 한정되지 아니하며, 정방형 블록을 위한 LFNST는 LFNST4 또는 LFNST8을 의미할 수도 있다. 상기 비정방형 블록을 위한 LFNST는 전술한 LFNST16x32(또는, LFNST32x16)를 의미할 수 있다. 다만, 이에 한정되지 아니한다. 일예로, 비정방형 블록을 위한 LFNST는 전술한 LFNST8x16(또는, LFNST16x8)을 의미할 수도 있고, LFNST4x8(또는, LFNST8x4)를 의미할 수도 있다. 상기 정방형 블록을 위한 LFNST는, 비정방형 블록을 위한 LFNST와 동일한 출력 길이를 가지고, 비정방형 블록을 위한 LFNST와는 상이한 입력 길이를 가진 LFNST로 정의될 수 있다. 또는, 상기 정방형 블록을 위한 LFNST는, 비정방형 블록을 위한 LFNST와 상이한 입력 길이와 출력 길이를 가진 LFNST로 정의될 수 있다. 순방향의 변환 관점에서 살펴보면, 상기 정방형 블록을 위한 LFNST는, 비정방형 블록을 위한 LFNST와 동일한 입력 길이를 가지고, 비정방형 블록을 위한 LFNST와는 상이한 출력 길이를 가진 LFNST로 정의될 수 있다. 또는, 상기 정방형 블록을 위한 LFNST는, 비정방형 블록을 위한 LFNST와 상이한 입력 길이와 출력 길이를 가진 LFNST로 정의될 수 있다.
구체적으로, M과 N이 32보다 크거나 같은 모든 블록에 대해서 정방형 블록을 위한 LFNST가 적용될 수 있다. 일예로, M과 N이 32보다 크거나 같은 모든 블록에 대해서 LFNST16이 적용될 수 있다. 또는, M과 N이 32보다 크거나 같은 모든 블록에 대해서 LFNST8이 적용될 수 있다. 또는, M과 N이 32보다 크거나 같은 모든 블록에 대해서 LFNST4가 적용될 수 있다.
또는, M과 N이 32보다 크거나 같고 M과 N이 같은 블록에 대해서 정방형 블록을 위한 LFNST가 적용될 수 있다. 반면, M과 N이 32보다 크거나 같고 M과 N이 다른 블록에 대해서 비정방형 블록을 위한 LFNST가 적용될 수 있다. 일예로, 32x32 블록, 64x64 블록, 또는 128x128에 대해서 LFNST16이 적용될 수 있다. 또는, 32x32 블록, 64x64 블록, 또는 128x128에 대해서 LFNST8이 적용될 수 있다. 또는, 32x32 블록, 64x64 블록, 또는 128x128에 대해서 LFNST4가 적용될 수 있다. 32x64 블록, 32x128 블록, 또는 64x128 블록에 대해서 LFNST16x32가 적용될 수 있다. 또는, 32x64 블록, 32x128 블록, 또는 64x128 블록에 대해서 LFNST8x16이 적용될 수 있다. 또는, 32x64 블록, 32x128 블록, 또는 64x128 블록에 대해서 LFNST4x8가 적용될 수 있다. 64x32 블록, 128x32 블록, 또는 128x64 블록에 대해서 LFNST32x16이 적용될 수 있다. 또는, 64x32 블록, 128x32 블록, 또는 128x64 블록에 대해서 LFNST16x8이 적용될 수 있다. 또는, 64x32 블록, 128x32 블록, 또는 128x64 블록에 대해서 LFNST8x4가 적용될 수 있다.
본 개시에서는 비분리 변환 세트를 구성하는 방법을 제안한다. 비분리 변환 세트의 구성에 있어서, 다음과 같은 방법들 중 적어도 하나가 적용될 수 있다.
1. 블록 크기(예를 들어, 코딩 블록의 크기, 변환 블록의 크기)에 기초하여 서로 다른 비분리 변환 세트가 구성될 수 있다. 일예로, 블록 크기에 따라 이용 가능한 비분리 변환 세트의 개수가 상이하게 설정될 수 있다.
2. 본 개시에 따른 비분리 변환 세트의 구성 방법은, 비분리 일차 변환(NSPT) 또는 비분리 이차 변환(LFNST) 중 적어도 하나에 적용될 수 있다. 즉, 비분리 일차 변환 세트가 구성될 수도 있고, 비분리 이차 변환 세트가 구성될 수도 있다. 또한, 비정방형 블록에 대해 적용될 수 있는 구성 방법도 LFNST에 대해 적용될 수 있다. 이는 순방향의 LFNST가 적용될 때 LFNST가 적용되는 영역(ROI)이 비정방형일 수 있기 때문이다.
3. 특정 코딩 툴(coding tool)이 적용되는 경우, 특정 블록 크기(들)에 대해 NSPT 또는 LFNST를 적용하도록 하여 해당 블록 크기(들)에 대해 NSPT/LFNST 세트의 구성을 변화시킬 수 있다. 일예로, ISP 모드가 적용되는 경우에 LFNST를 적용하도록 하면, NSPT 세트의 개수를 줄일 수 있다.
본 개시에 따른 현재 블록은 변환 블록일 수 있다. 일예로, 현재 블록이 속한 코딩 블록에 인트라 서브파티션(intra subpartition, ISP) 모드가 적용된 경우, 코딩 블록은 복수의 서브파티션으로 분할될 수 있고, 서브파티션의 단위로 예측/변환이 수행될 수 있다. 이 경우, 현재 블록은 코딩 블록에 속한 복수의 서브파티션 중 어느 하나일 수 있다. 또는, 현재 블록이 속한 코딩 블록에 ISP 모드가 적용되지 않는 경우, 현재 블록은 코딩 블록과 동일한 크기를 가진 변환 블록일 수 있다.
현재 블록의 비분리 변환 세트는, 기-정의된 인트라 예측 모드들과 비분리 변환 세트들 간의 매핑 관계를 정의하는 매핑 테이블을 기반으로 결정될 수 있다.
상기 매핑 테이블로 입력되는 인트라 예측 모드는, 비트스트림을 통해 시그날링되는 인트라 예측 모드 정보에 기초하여 유도되는 모드(이하, 시그날링된 모드라 함)일 수 있다. 또는, 상기 매핑 테이블로 입력되는 인트라 예측 모드는, wide angle intra prediction (WAIP)의 적용에 따른 모드(이하, WAIP 모드라 함)일 수도 있다. 현재 블록이 속한 코딩 블록의 크기에 따라 시그날링된 모드 또는 WAIP 모드 중 어느 하나가 적응적으로 매핑 테이블로 입력될 수 있다. 먼저, WAIP 모드의 유도 방법에 대해서 자세히 살펴보도록 한다.
너비가 높이보다 큰 비정방형 블록의 경우, WAIP 모드의 값은 시그날링된 모드의 값(X)에 65를 더한 값인 (X+65)로 설정될 수 있다. 예를 들어, 모드 2는 모드 67의 WAIP 모드로 변환될 수 있다.
너비와 높이의 비율이 2:1인 경우, 모드 2부터 모드 7까지가 WAIP 모드로 변환될 수 있다. 너비와 높이의 비율이 4:1인 경우, 모드 2부터 모드 11까지가 WAIP 모드로 변환될 수 있다. 너비와 높이의 비율이 8:1인 경우, 모드 2부터 모드 13까지가 WAIP 모드로 변환될 수 있다. 너비와 높이의 비율이 16:1인 경우, 모드 2부터 모드 15까지가 WAIP 모드로 변환될 수 있다.
다시 말해, 너비와 높이의 비율을 나타내는 whRatio는 Abs( Log2( nW ) - Log2( nH ) )로 정의될 수 있다. 여기서, Abs()는 절대값을 리턴하는 함수를 나타낸다. Log2는 밑이 2인 로그값을 리턴하는 함수이고, nW과 nH는 각각 WAIP의 적용 여부를 결정하기 위한 기준 블록의 너비와 높이를 나타낸다. 전술한 바와 같이, 현재 블록이 속한 코딩 블록에 ISP 모드가 적용되지 않는 경우, 상기 기준 블록은 현재 블록일 수 있다. 현재 블록이 속한 코딩 블록에 ISP 모드가 적용된 경우, 상기 기준 블록은 현재 블록이 속한 코딩 블록일 수 있다.
WhRatio의 값이 1인 경우, 모드 2부터 모드 7까지가 WAIP 모드로 변환될 수 있다. WhRatio의 값이 1보다 큰 경우, 모드 2부터 모드 (7+2*whRatio)까지가 WAIP 모드로 변환될 수 있다.
높이가 너비보다 큰 비정방형 블록의 경우, WAIP 모드의 값은 시그날링되는 모드의 값(X)에서 67를 뺀 값인 (X-67)로 설정될 수 있다. 예를 들어, 모드 66은 모드 -1의 WAIP 모드로 변환될 수 있다.
높이와 너비의 비율이 2:1인 경우, 모드 61부터 모드 66까지가 WAIP 모드로 변환될 수 있다. 높이와 너비의 비율이 4:1인 경우, 모드 57부터 모드 66까지가 WAIP 모드로 변환될 수 있다. 높이와 너비의 비율이 8:1인 경우, 모드 55부터 모드 66까지가 WAIP 모드로 변환될 수 있다. 높이와 너비의 비율이 16:1인 경우, 모드 53부터 모드 66까지가 WAIP 모드로 변환될 수 있다.
다시 말해, 너비와 높이의 비율을 나타내는 whRatio는 Abs( Log2( nW ) - Log2( nH ) )로 정의될 수 있다. 여기서, Abs()는 절대값을 리턴하는 함수를 나타낸다. Log2는 밑이 2인 로그값을 리턴하는 함수이고, nW과 nH는 각각 WAIP의 적용 여부를 결정하기 위한 기준 블록의 너비와 높이를 나타낸다. 전술한 바와 같이, 현재 블록이 속한 코딩 블록에 ISP 모드가 적용되지 않는 경우, 상기 기준 블록은 현재 블록일 수 있다. 현재 블록이 속한 코딩 블록에 ISP 모드가 적용된 경우, 상기 기준 블록은 현재 블록이 속한 코딩 블록일 수 있다.
WhRatio의 값이 1인 경우, 모드 61부터 모드 66까지가 WAIP 모드로 변환될 수 있다. WhRatio의 값이 1보다 큰 경우, 모드 (612*whRatio)부터 모드 66까지가 WAIP 모드로 변환될 수 있다.
현재 블록이 속한 코딩 블록에 ISP 모드가 적용되는 경우, 코딩 블록에 크기에 기초하여 WAIP 모드로 변환되는 모드들이 결정될 수 있다. 현재 블록이 속한 코딩 블록에 ISP 모드가 적용되지 않는 경우, 변환 블록(즉, 현재 블록)의 크기에 기초하여 WAIP 모드로 변환되는 모드들이 결정될 수 있다. 예를 들어, ISP 모드가 적용되고, 코딩 블록이 32x16 블록이고, 변환 블록이 32x4 블록인 경우(즉, ISP 모드에 따른 수평 방향 분할에 의해 32x16 코딩 블록이 4개의 32x4 서브파티션으로 분할되는 경우), nW와 nH는 각각 32와 16이 되고, 모드 2부터 모드 7까지가 WAIP 모드로 변환될 수 있다. 시그날링되는 모드의 값은 WAIP 모드로 변환되기 전 모드의 값으로서, 전술한 조건들을 만족하는 경우에만 WAIP 모드의 값으로 변환되어 예측과 변환 과정이 수행될 수 있다.
전술한 WAIP 모드가 적용되는 경우, 특정 인트라 예측 모드가 적용되지 않는 경우가 발생하여 비분리 변환 세트의 구성이 달라질 수 있다.
일예로, 비분리 변환 세트는, 전술한 표 9에 따른 매핑 테이블을 기반으로 결정될 수 있다. 이때, WAIP 모드의 값을 기준으로 결정될 수 있다. 표 9의 매핑 테이블은, 이용 가능한 비분리 변환 세트의 개수가 35개인 경우, 인트라 예측 모드와 비분리 변환 세트 간의 매핑 관계를 보여준다.
앞서 살펴본 비분리 변환 세트의 구성, 전술한 WAIP 모드의 유도 방법 및 표 9의 매핑 테이블 하에서, 특정 블록 크기에 대해 일부 비분리 변환 세트가 이용되지 않을 수 있다. 이하, 설명의 편의를 위해 세트 인덱스가 #인 비분리 변환 세트를 set-#로 표기하기로 한다.
예를 들어, 32x4 블록에 대해서는 set-2부터 set-7까지는 이용되지 않을 수 있다. 이는, 4x32 블록과 32x4 블록 사이에 대칭성이 이용될 수 있고, WAIP 모드로 인해 짧은 변(즉, 세로 방향의 길이가 4인 변)쪽에서 예측되는 방향 또는 각도가 발생하지 않기 때문이다. 상기 대칭성이 이용되는 경우, MxN 블록에서 모드의 값이 35 이상인 모드에 대해서는 NxM 블록의 대칭 모드(즉, 모드 34를 중심으로 대칭인 모드)에 대응되는 비분리 변환 세트가 매핑될 수 있다.
ISP 모드가 적용되지 않는 경우, 32x4 블록에 대해 모드 2부터 모드 13까지는 각각 모드 67부터 모드 78까지로 변환될 수 있다. 대칭성을 이용하여 35개의 비분리 변환 세트로 구성된 비분리 변환을 적용하는 경우, 32x4 블록에서의 모드 67부터 모드 78까지는 4x32 블록에서의 모드 -1부터 모드 -12까지에 각각 대응될 수 있다. 즉, 모드 34를 중심으로 하여 대칭인 모드에 대응되므로, 32x4 블록에 대한 모드 X는 4x32 블록에 대한 모드 (66-X)에 대응될 수 있다. 표 9에 따르면, 32x4 블록에 대한 모드 X(-12≤X≤-1)는 표 9에 의해 set-2에 매핑될 수 있다.
ISP 모드가 적용되지 않는 경우, WAIP가 적용되지 않는 모드들(모드 0, 모드 1, 모드 14부터 모드 66까지)에 대해서는, 32x4 블록에 대한 set-0, set-1, set-14부터 set-34까지에 매핑되거나 대칭성을 이용하여 4x32블록의 set-2부터 set-33까지에 매핑될 수 있다. 구체적으로, 모드 14부터 모드 34까지는 set-14부터 set-34까지에 각각 매핑될 수 있다. 또한, 대칭성이 이용되는 모드들은 모드 35부터 모드 66까지일 수 있고, 이들은 4x32 블록에 대한 모드 33부터 모드 2까지에 각각 대응될 수 있다. 즉, 32x4 블록에 대한 모드 X는 4x32 블록에 대한 모드 (68-X)에 대응될 수 있다. 따라서, 32x4 블록에 대한 모드 X는 모드 (68-X)에 대한 set-(68-X)에 매핑될 수 있다. 표 9에 따르면, 32x4 블록에 대한 모드 X(35≤X≤66)는 set-(68-X)에 매핑될 수 있다.
ISP 모드가 적용되는 경우, 전술한 바와 같이 현재 블록이 속한 코딩 블록을 기준으로 WAIP 모드가 결정될 수 있다. 32x4 블록에 대해 비분리 변환이 적용되는 경우, 32x16 코딩 블록을 기준으로 WAIP 모드가 결정될 수 있고, 표 9의 매핑 테이블로부터 해당 WAIP 모드에 매핑되는 비분리 변환 세트가 결정될 수 있다. 여기서, 32x16 코딩 블록을 기준으로 할 경우, 모드 2부터 모드 7까지는 WAIP 모드로서 각각 모드 67부터 모드 72까지로 변환될 수 있다. 모드 67부터 모드 72까지는 대칭성에 의해 4x32 블록에 대한 모드 -1부터 모드 -6까지에 각각 대응될 수 있다. 즉, 32x4 블록에 대한 모드 X는 4x32 블록에 대한 모드 (66-X)에 대응될 수 있다. 표 9에 따르면, 32x4 블록에 대한 모드 X(-1≤X≤-6)는 set-2에 매핑될 수 있다.
ISP 모드가 적용되는 경우, WAIP가 적용되지 않는 모드들(모드 0, 모드 1, 모드 8부터 모드 66까지)에 대해서는, 32x4 블록의 set-0, set-1, set-8부터 set-34까지에 매핑되거나 대칭성을 이용하여 4x32 블록의 set-2부터 set-33까지에 매핑될 수 있다. 구체적으로, 모드 8부터 모드 34까지는 set-8부터 set-34까지에 각각 매핑될 수 있다. 또한, 대칭성이 이용되는 모드들은 모드 35부터 모드 66까지일 수 있고, 이들은 4x32 블록에 대한 모드 33부터 모드 2까지에 각각 대응될 수 있다. 즉, 32x4 블록에 대한 모드 X(35≤X≤66)는 4x32 블록에 대한 모드 (68-X)에 대응될 수 있다. 따라서, 32x4 블록에 대한 모드 X는 모드 (68-X)에 대한 set-(68-X)에 매핑될 수 있다. 표 9에 따르면, 32x4 블록에 대한 모드 X(35≤X≤66)는 set-(68-X)에 매핑될 수 있다.
ISP가 적용되는 경우와 그렇지 않은 경우를 모두 고려할 때, 32x4 블록에 대한 비분리 변환에 대해서 set-2부터 set-7까지는 어떠한 경우에도 이용되지 않음을 알 수 있다. 전술한 WAIP와 ISP 모드를 적용할 수 있는 구조 하에서, 32x4 블록에 대한 비분리 변환은 35개의 비분리 변환 세트가 아니라 29개의 비분리 변환 세트로 구성될 수 있다. 즉, set-2부터 set-7까지는 35개의 비분리 변환 세트로부터 제외될 수 있다.
상기 29개의 비분리 변환 세트에 대해 기존과 같이 0, 1, 8 내지 34의 세트 인덱스가 할당된다면(즉, 2부터 7까지만 제외), 표 9의 매핑 테이블이 그대로 이용될 수 있다. 또는, 29개의 비분리 변환 세트에 대해서 0 내지 28의 세트 인덱스가 할당된다면, 다음 표 11과 같이 32x4 블록을 위한 별도의 매핑 테이블이 정의될 수도 있다.
인트라 예측 모드 세트 인덱스
X < 0 N.A.
0 ≤ X ≤ 1 X
2 ≤ X ≤ 7 N.A.
8 ≤ X ≤ 34 X - 6
35 ≤ X ≤ 66 68 - X
X > 66 2
표 11을 참조하면, N.A.는 인트라 예측 모드에 매핑되는 비분리 변환 세트가 존재하지 않음을 의미할 수 있다. 즉, 해당 인트라 예측 모드의 구간에서는 비분리 변환 세트와의 매핑이 발생하지 않는다. 0보다 크거나 같고 1보다 작거나 같은 인트라 예측 모드(X)에 대해서는, 해당 인트라 예측 모드(X)와 동일한 값의 세트 인덱스를 가진 비분리 변환 세트가 매핑될 수 있다. 8보다 크거나 같고 34보다 작거나 같은 인트라 예측 모드(X)에 대해서는, (X-6)과 동일한 세트 인덱스를 가진 비분리 변환 세트가 매핑될 수 있다. 35보다 크거나 같고 66보다 작거나 같은 인트라 예측 모드(X)에 대해서는, (68-X)와 동일한 세트 인덱스를 가진 비분리 변환 세트가 매핑될 수 있다. 66보다 큰 인트라 예측 모드에 대해서는, 2의 세트 인덱스를 가진 비분리 변환 세트가 매핑될 수 있다.
상기 표 11에서 X의 값이 35보다 크거나 같은 경우에 대해서는 전술한 대칭성을 이용하여 4x32 블록에 대한 비분리 변환 세트가 매핑될 수 있다. 32x4 블록에 대한 비분리 변환 세트의 매핑을 위해 표 11이 적용될 경우, 대칭성으로 인해 4x32 블록에 대한 비분리 변환 세트의 매핑 역시 표 12와 같이 정의될 수 있다.
인트라 예측 모드 세트 인덱스
X < 0 2
0 ≤ X ≤ 34 X
35 ≤ X ≤ 60 62 - X
X > 60 N.A.
표 12를 참조하면, 0보다 작은 인트라 예측 모드(X)에 대해서는, 2의 세트 인덱스를 가진 비분리 변환 세트가 매핑될 수 있다. 0보다 크거나 같고 34보다 작거나 같은 인트라 예측 모드(X)에 대해서는, 해당 인트라 예측 모드(X)와 동일한 값의 세트 인덱스를 가진 비분리 변환 세트가 매핑될 수 있다. 35보다 크거나 같고 60보다 작거나 같은 인트라 예측 모드(X)에 대해서는, (62-X)과 동일한 세트 인덱스를 가진 비분리 변환 세트가 매핑될 수 있다. 60보다 큰 인트라 예측 모드에 대해서는 비분리 변환 세트와의 매핑이 발생하지 않는다.
앞서 살펴본 바와 같이, 현재 블록이 이용 가능한 비분리 변환 세트의 개수는, 현재 블록의 크기에 따라 상이할 수 있다. 구체적으로, 현재 블록이 제1 크기의 블록인 경우, 현재 블록이 이용 가능한 비분리 변환 세트의 개수는 M개일 수 있다. 반면, 현재 블록이 제1 크기의 블록이 아닌 경우, 현재 블록이 이용 가능한 비분리 변환 세트의 개수는 N개일 수 있다. 여기서, 제1 크기의 블록은, 너비와 높이가 서로 상이한 블록을 의미할 수 있다. 또는, 제1 크기의 블록은, 너비와 높이가 서로 상이하되, 너비와 높이의 비율이 R1:1 또는 1:R1인 블록을 의미할 수 있다. R1은 8, 16 또는 그 이상의 정수일 수 있다. M은 N보다 작은 정수일 수 있다.
상기 제1 크기의 블록에 대해서 하나 또는 그 이상의 매핑 테이블이 별도로 정의될 수 있다. 다시 말해, 제1 크기의 블록에 적용되는 제1 매핑 테이블과 제1 크기의 블록이 아닌 블록에 적용되는 제2 매핑 테이블이 각각 정의될 수 있다. 제1 매핑 테이블을 구성하는 비분리 변환 세트의 개수, 세트 인덱스의 개수, 또는 세트 인덱스의 최대값 중 적어도 하나는, 제2 매핑 테이블과 상이할 수 있다. 일예로, 제1 매핑 테이블을 구성하는 비분리 변환 세트의 개수(또는, 세트 인덱스의 개수)는 제2 매핑 테이블을 구성하는 비분리 변환 세트의 개수(또는, 세트 인덱스의 개수)보다 적을 수 있다. 제1 매핑 테이블을 구성하는 세트 인덱스의 최대값은 제2 매핑 테이블을 구성하는 세트 인덱스의 최대값보다 작을 수 있다. 현재 블록이 제1 크기의 블록인지 여부에 기초하여 상기 복수의 매핑 테이블 중 어느 하나가 선택적으로 이용될 수 있다.
32x8 블록에 대한 비분리 변환에 대해서 전술한 방법으로 비분리 변환 세트가 결정되는 경우(즉, 대칭성이 이용되는 표 9의 매핑 테이블이 적용되는 경우), set-0부터 set-34까지 모든 비분리 변환 세트가 필요할 수 있다. 구체적으로, 현재 블록이 32x8 블록이고 현재 블록이 속한 코딩 블록에 ISP 모드가 적용되지 않은 경우, 32x8 블록에 대한 비분리 변환을 위해 set-2부터 set-11까지는 필요하지 않게 된다. 다만, 현재 블록이 32x8 블록이고 현재 블록이 속한 코딩 블록에 ISP가 적용되는 경우, 현재 블록이 속한 코딩 블록은 32x32 정방형 블록일 수 있다. 정방형 블록에 대해서는 WAIP가 적용되지 않으므로 32x8 블록인 현재 블록에 대한 비분리 변환을 위해 set-0부터 set-34까지의 모든 비분리 변환 세트가 필요할 수 있다.
상기 예시와 같이, 특정 비분리 변환 세트가 이용되지 않는 경우가 발생하지 않도록 하기 위해서, 해당 경우가 발생하는 블록에 대해서 비분리 변환이 적용되는 경우, WAIP가 적용되지 않도록 제한할 수 있다. WAIP가 적용되지 않도록 제한될 경우, 시그날링된 모드가 WAIP 모드(즉, -1 이하의 모드 또는 67 이상의 모드)로 변환되는 경우가 발생하지 않게 되고, 일부 비분리 변환 세트가 이용되지 않는 경우가 발생하지 않게 된다.
일예로, 현재 블록이 제1 크기의 블록이고 현재 블록에 대해 비분리 변환이 적용되는 경우, 현재 블록의 시그날링된 모드는 WAIP 모드로 변환되지 않을 수 있다. 또는, 현재 블록이 상기 제1 크기의 블록인 경우, 현재 블록에 대해 비분리 변환이 적용되는지 여부와 관계없이, 현재 블록의 시그날링된 모드는 WAIP 모드로 변환되지 않을 수 있다. 여기서, 제1 크기의 블록은, 앞서 살펴본 바와 같이, 너비와 높이가 서로 상이한 블록을 의미할 수도 있고, 너비와 높이의 비율이 R1:1 또는 1:R1인 블록을 의미할 수도 있다.
현재 블록이 제1 크기의 블록인 경우, 현재 블록의 비분리 변환 세트를 결정하기 위한 매핑 테이블의 입력은 WAIP 모드가 아닌 시그날링된 모드일 수 있다. 반면, 현재 블록이 제1 크기의 블록이 아닌 경우, 현재 블록의 비분리 변환 세트를 결정하기 위한 매핑 테이블의 입력은 WAIP 모드일 수 있다.
또는, 현재 블록이 제2 크기의 블록이고 현재 블록에 대해 비분리 변환이 적용되는 경우, 현재 블록의 시그날링된 모드는 WAIP 모드로 변환되지 않을 수 있다. 또는, 현재 블록이 제2 크기의 블록인 경우, 현재 블록에 대해 비분리 변환이 적용되는지 여부와 관계없이, 현재 블록의 시그날링된 모드는 WAIP 모드로 변환되지 않을 수 있다. 여기서, 제2 크기의 블록은, 너비와 높이의 비율이 R2:1 또는 1:R2인 블록을 의미할 수 있다. R2은 2 또는 4 중 적어도 하나일 수 있다.
현재 블록이 제2 크기의 블록인 경우, 현재 블록의 비분리 변환 세트를 결정하기 위한 매핑 테이블의 입력은 WAIP 모드가 아닌 시그날링된 모드일 수 있다. 반면, 현재 블록이 제2 크기의 블록이 아닌 경우, 현재 블록의 비분리 변환 세트를 결정하기 위한 매핑 테이블의 입력은 WAIP 모드일 수 있다.
현재 블록이 제1 크기 및/또는 제2 크기의 블록이 아닌 경우라도, 현재 블록에 대해 비분리 변환이 적용되는 경우, 현재 블록이 속한 코딩 블록에 대해서 WAIP가 적용되지 않도록 제한될 수 있다.
일예로, 현재 블록의 크기에 관계없이, 현재 블록에 대해 NSPT가 적용되는 경우, 현재 블록이 속한 코딩 블록에 대해서 WAIP가 적용되지 않을 수 있다. 한편, 현재 블록에 대해 NSPT가 적용되지 않는 경우, 현재 블록이 속한 코딩 블록에 대해서 WAIP가 적용될 수 있다. 여기서, NSPT가 적용되지 않는 경우는, LFNST가 적용되는 경우와 LFNST가 적용되지 않는 경우로 구분될 수 있다. 각각의 경우에 대해 WAIP가 적용될 수도 있고, WAIP가 적용되지 않도록 제한될 수도 있다. 상기 LFNST가 적용되지 않는 경우, 현재 블록의 역변환을 위한 변환 커널은 전술한 MTS를 기반으로 결정되거나, 현재 블록에 대해 DCT-2 기반의 분리 일차 변환이 수행될 수 있다.
현재 블록에 대해 NSPT가 적용되는 경우, 현재 블록의 NSPT 세트를 결정하기 위한 매핑 테이블의 입력은 WAIP 모드가 아닌 시그날링된 모드일 수 있다. 반면, 현재 블록에 대해 NSPT가 적용되지 않는 경우, 현재 블록의 NSPT 세트를 결정하기 위한 매핑 테이블의 입력은 WAIP 모드일 수 있다.
앞서 살펴본 바와 같이, ISP 모드가 적용되는 경우, 현재 블록이 속한 코딩 블록에 기초하여 WAIP 모드로 변환되는 모드가 결정되기 때문에, WAIP 모드로 변환되는 인트라 예측 모드의 범위가 줄어들게 된다. 구체적으로, ISP 모드가 적용되지 않는 경우, 32x4 블록에 대해 모드 2부터 모드 13까지가 WAIP 모드로 변환되므로, set-2부터 set-13까지의 비분리 변환 세트가 이용되지 않게 되고, 32x4 블록의 비분리 변환을 위해 필요한 비분리 변환 세트의 개수가 23개로 줄어들게 된다. 따라서, ISP 모드가 적용되는 경우에 비분리 변환이 적용되지 않도록 구성할 경우, 비분리 변환을 위해 필요한 비분리 변환 세트의 개수를 더욱 줄일 수 있다.
일예로, ISP 모드가 적용되는 경우, NSPT가 적용되지 않고 LFNST가 적용되도록 구성할 수 있다. 또는, ISP 모드가 적용되는 경우, NSPT와 LFNST를 모두 적용하지 않고 분리 일차 변환만을 적용하도록 구성할 수 있다. 이러한 구성을 통해 NSPT를 위해 필요한 NSPT 세트의 개수를 더욱 줄일 수 있다.
또한, ISP 모드가 적용되는 경우, 비분리 변환이 적용되지 않도록 구성할 경우, 너비가 높이보다 큰 비정방형 블록에 대한 비분리 변환 세트의 개수가 줄어들게 된다. 예를 들어, WAIP로 인해 변환되는 모드들의 개수만큼 비분리 변환 세트의 개수가 줄어들 수 있다.
일예로, 표 9의 매핑 테이블에 정의된 35개의 비분리 변환 세트를 기준으로 살펴보면, MxN 블록(M>N)에 대해 사용되지 않는 비분리 변환 세트들은 다음과 같다.
M과 N의 비율이 2:1인 경우(예를 들어, 8x4, 16x8, 32x16, 64x32 등), 모드 2부터 모드 7까지가 WAIP 모드로 변환되므로, set-2부터 set-7까지가 사용되지 않을 수 있다. 따라서, 35개의 비분리 변환 세트 대신에 29개의 비분리 변환 세트만이 필요하게 된다.
M과 N의 비율이 4:1인 경우(예를 들어, 16x4, 32x8, 64x16 등), 모드 2부터 모드 11까지가 WAIP 모드로 변환되므로, set-2부터 set-11까지가 사용되지 않을 수 있다. 따라서, 35개의 비분리 변환 세트 대신에 25개의 비분리 변환 세트만이 필요하게 된다.
M과 N의 비율이 8:1인 경우(예를 들어, 32x8, 64x16 등), 모드 2부터 모드 13까지가 WAIP 모드로 변환되므로, set-2부터 set-13까지가 사용되지 않을 수 있다. 따라서, 35개의 비분리 변환 세트 대신에 23개의 비분리 변환 세트만이 필요하게 된다.
M과 N의 비율이 16:1인 경우(예를 들어, 64x4 등), 모드 2부터 모드 15까지가 WAIP 모드로 변환되므로, set-2부터 set-15까지가 사용되지 않을 수 있다. 따라서, 35개의 비분리 변환 세트 대신에 21개의 비분리 변환 세트만이 필요하게 된다.
다시 말해, M과 N의 비율이 2n:1인 경우(n > 1), 모드 2부터 모드 (7+2n)까지가 WAIP 모드로 변환되므로, set-2부터 set-(7+2n)까지가 사용되지 않을 수 있다. 따라서, 35개의 비분리 변환 세트 대신에 (29-2n)개의 비분리 변환 세트만이 필요하게 된다.
현재 블록이 속한 코딩 블록에 ISP 모드가 적용되는지 여부에 기초하여, 현재 블록에 비분리 변환의 적용 여부가 결정될 수 있다. 일예로, 현재 블록이 속한 코딩 블록에 ISP 모드가 적용되는 경우, 현재 블록에 대해 NSPT가 적용되지 않을 수 있다. 이 경우, 현재 블록에 대해 LFNST가 적용될 수 있다. 또는, 현재 블록이 속한 코딩 블록에 ISP 모드가 적용되는 경우, 현재 블록에 대해 NSPT 및 LFNST가 적용되지 않을 수 있다. 현재 블록이 속한 코딩 블록에 ISP 모드가 적용되지 않는 경우, 현재 블록에 대해 NSPT 또는 LFNST 중 적어도 하나가 적용될 수 있다. 이와 같이, ISP 모드의 적용 여부에 따라 비분리 변환을 적응적으로 적용할 경우, 해당 비분리 변환을 위한 변환 커널을 저장하는데 필요한 메모리양을 줄일 수 있다.
현재 블록이 속한 코딩 블록에 ISP 모드가 적용되는지 여부 및/또는 ISP 모드에 따른 서브파티션(또는, 현재 블록)의 크기에 기초하여, 현재 블록에 비분리 변환의 적용 여부가 결정될 수 있다. 일예로, 현재 블록이 속한 코딩 블록에 ISP 모드가 적용되지 않는 경우, 현재 블록에 대해 비분리 변환이 적용될 수 있다. 현재 블록이 속한 코딩 블록에 ISP 모드가 적용되는 경우라도, 서브파티션의 크기가 소정의 문턱크기보다 큰 경우에만 현재 블록에 대해 비분리 변환이 적용되지 않을 수 있다. 여기서, 서브파티션의 크기는, 서브파티션의 너비, 높이, 너비와 높이의 곱, 너비와 높이의 비율로 정의될 수 있다. 예를 들어, ISP 모드에 따른 서브파티션이 32x4 블록인 경우, NSPT가 적용되지 않고 LFNST가 적용될 수 있다. 또는, ISP 모드에 따른 서브파티션이 32x4 블록인 경우, NSPT 및 LFNST가 둘다 적용되지 않을 수 있다. 반면, ISP 모드에 따른 서브파티션이 8x4 블록인 경우, NSPT 또는 LFNST 중 적어도 하나가 적용될 수 있다.
전술한 매핑 테이블을 통해 비분리 변환 세트를 결정하는 과정에서, WAIP 모드로 변환하기 전 모드(즉, 시그날링된 모드)를 사용할 수 있다. 즉, 매핑 테이블의 입력은 WAIP 모드가 아닌 시그날링된 모드일 수 있다. 이를 통해, 특정 비분리 변환 세트가 사용되지 않는 경우가 발생하지 않도록 할 수 있다.
일예로, MxN 블록(M>N)에 대한 WAIP의 적용으로 인해 모드 2가 모드 67로 변환되더라도, 표 9의 매핑 테이블에 모드 2가 입력될 수 있고, 모드 2에 대응하는 set-2가 MxN 블록의 비분리 변환 세트로 선택될 수 있다. 이는, WAIP 모드를 기반으로 예측되는 블록에 대한 레지듀얼 데이터에 적용될 수 있는 비분리 변환 세트를 할당하는 효과를 가져올 수 있다.
WAIP 모드로 변환하기 전 모드를 기반으로 비분리 변환 세트를 결정하는 방법은 현재 블록 및/또는 현재 블록이 속한 코딩 블록의 크기에 기초하여 적응적으로 적용될 수 있다.
일예로, 현재 블록 및/또는 현재 블록이 속한 코딩 블록이 비정방형 블록인 경우, WAIP 모드로 변환하기 전 모드를 기반으로 비분리 변환 세트가 결정될 수 있다. 반면, 현재 블록 및/또는 현재 블록이 속한 코딩 블록이 정방형 블록인 경우, WAIP 모드로 변환하기 전 모드를 기반으로 비분리 변환 세트가 결정되지 않을 수 있다. 현재 블록 및/또는 현재 블록이 속한 코딩 블록이 정방형 블록인 경우, WAIP 모드를 기반으로 비분리 변환 세트가 결정될 수 있다.
전술한 바와 같이, 사용되지 않는 비분리 변환 세트가 발생하는 블록(예를 들어, 32x4 블록과 같은 제1 크기의 블록)에 대해서는, WAIP 모드로 변환하기 전 모드를 기반으로 비분리 변환 세트가 결정될 수 있다. 나머지 블록 크기에 대해서는, WAIP 모드로 변환하기 전 모드를 기반으로 비분리 변환 세트가 결정되지 않을 수 있다.
32x4 블록에 대한 비분리 변환에서, set-2부터 set-7까지가 사용되지 않을 수 있다. 이 경우, set-2부터 set-7는 특정 WAIP 모드에 적용되도록 구성될 수 있다. 예를 들어, 0보다 작거나 67 이상인 WAIP 모드에 적용되는 비분리 변환 세트로서 set-2부터 set-7 중 어느 하나를 매핑할 수 있다.
구체적으로, 32x4 블록에 대해 모드 67부터 모드 72는 set-2부터 set-7에 각각 매핑될 수 있다. 즉, 모드 X에 대해 set-(X-65)의 비분리 변환 세트가 할당될 수 있다. 또한, 이와 같이 할당된 32x4 블록에 대한 set-2부터 set-7을, 4x32 블록일 때의 모드 -1부터 모드 -6일 경우에 대해서 각각 할당할 수 있다. 여기서, 모드 X에 대해 set-(1-X)의 비분리 변환 세트가 할당될 수 있다. 대칭성이 이용되고 4x32 블록에 대해서 set-2부터 set-7 중 어느 하나를 적용하는 경우, 순방향의 NSPT를 적용하는 관점에서 입력 데이터를 transpose하여 해당 비분리 변환 세트에 속한 변환 커널을 적용할 수 있다. 4x32 블록일 때, 모드 -1부터 모드 -6까지는 모드 66부터 모드 61이 각각 WAIP 모드로 변환된 모드로서, 32x4 블록의 모드 67부터 모드 72와 대칭을 이루기 때문이다.
다시 말해, MxN 블록(M>N)에 대한 비분리 변환에서, 모드 67부터 모드 (65+Y)는 set-2부터 set-Y에 각각 매핑될 수 있다. 즉, 모드 X에 대해 set-(X-65)이 할당될 수 있다. NxM 블록에 때한 비분리 변환에서, 모드 -1부터 모드 -(Y-1)는 set-2부터 set-Y에 각각 매핑될 수 있다. 즉, 모드 X에 대해 set-(1-X)가 할당될 수 있다. 이는 전술한 대칭성이 이용된 경우로서, 순방향의 NSPT를 적용하는 관점에서 입력 데이터를 transpose하여 해당 비분리 변환 세트에 속한 변환 커널을 적용할 수 있다.
전술한 실시예들은 현재 블록 또는 현재 블록이 속한 코딩 블록이 비정방형 블록인 경우뿐만 아니라 정방형 블록인 경우에 대해서도 적용될 수 있다. 예를 들어, 정방형 블록의 경우에도 WAIP 모드로 변환하기 전 모드를 매핑 테이블의 입력으로 하여 비분리 변환 세트를 결정할 수 있다.
현재 블록이 속한 코딩 블록에 ISP 모드가 적용되는 경우, 코딩 블록은 비정방형 블록이나 현재 블록(또는, 변환 블록)은 정방형 블록일 수 있다. 예를 들어, 32x8의 코딩 블록이 수직 방향 분할에 의해 4개의 8x8 서브파티션(또는, 변환 블록)으로 분할될 수 있다. 이와 같이, 현재 블록이 정방형 블록이나, 코딩 블록이 비정방형 블록인 경우, 현재 블록은 WAIP 모드를 가질 수 있으나, 현재 블록에 대한 비분리 변환 세트는 WAIP 모드로 변환되기 전 모드를 매핑 테이블의 입력으로 하여 결정될 수 있다.
LFNST가 적용되는 ROI 영역이 정방형 블록일 수 있다. 해당 ROI 영역에 적용되는 LFNST 세트는 WAIP 모드로 변환하기 전 모드를 매핑 테이블의 입력으로 하여 결정될 수 있다.
현재 블록이 속한 코딩 블록에 ISP 모드가 적용되고, 상기 현재 블록이 정방형의 서브파티션인 경우, 현재 블록에 비분리 변환이 적용되지 않도록 제한될 수 있다. 일예로, 현재 블록이 속한 코딩 블록에 ISP 모드가 적용되고, 상기 현재 블록이 정방형의 서브파티션인 경우, 현재 블록에 NSPT가 적용되지 않을 수 있다. 다만, 현재 블록에 NSPT 대신에 LFNST가 적용될 수 있다. 또는, 현재 블록이 속한 코딩 블록에 ISP 모드가 적용되고, 상기 현재 블록이 정방형의 서브파티션인 경우, 현재 블록에 NSPT 및 LFNST가 둘다 적용되지 않을 수 있다. 현재 블록이 속한 코딩 블록은 비정방형 블록이나, 서브파티션인 현재 블록이 정방형 블록인 경우, 현재 블록에 대해 NSPT 대신에 LFNST가 적용되도록 구성될 수 있다.
도 4를 참조하면, 현재 블록의 레지듀얼 샘플을 기반으로 현재 블록을 복원할 수 있다(S420).
현재 블록의 인트라 예측 모드를 기반으로 현재 블록의 예측 샘플을 유도할 수 있다. 현재 블록의 예측 샘플과 레지듀얼 샘플을 기반으로, 현재 블록의 복원 샘플을 생성할 수 있다.
도 6은 본 개시에 따른 영상 디코딩 방법을 수행하는 디코딩 장치 (300)의 개략적인 구성을 도시한 것이다.
도 6을 참조하면, 본 개시에 따른 디코딩 장치(300)는, 변환 계수 유도부(600), 레지듀얼 샘플 유도부(610), 복원 블록 생성부(620)를 포함할 수 있다. 변환 계수 유도부(600)는 도 3의 엔트로피 디코딩부(310)에 구성될 수 있고, 레지듀얼 샘플 유도부(610)는 도 3의 레지듀얼 처리부(320)에 구성될 수 있고, 복원 블록 생성부(620)는 도 3의 가산부(340)에 구성될 수 있다.
변환 계수 유도부(600)는, 비트스트림으로부터 현재 블록의 레지듀얼 정보를 획득하고, 이를 복호화하여 현재 블록의 변환 계수를 유도할 수 있다.
레지듀얼 샘플 유도부(610)는, 현재 블록의 변환 계수에 역양자화 또는 역변환 중 적어도 하나를 수행하여, 현재 블록의 레지듀얼 샘플을 유도할 수 있다.
레지듀얼 샘플 유도부(610)는, 소정의 변환 커널 결정 방법을 통해 현재 블록의 역변환을 위한 변환 커널을 결정하고, 이를 기반으로 현재 블록의 레지듀얼 샘플을 유도할 수 있다. 이에 대해서는 도 4를 참조하여 살펴본 바와 같으며, 여기서 자세한 설명은 생략하기로 한다.
복원 블록 생성부(620)는, 현재 블록의 레지듀얼 샘플을 기반으로 현재 블록을 복원할 수 있다.
도 7은 본 개시에 따른 일실시예로서, 인코딩 장치(200)에 의해 수행되는 영상 인코딩 방법을 도시한 것이다.
도 7을 참조하면, 현재 블록의 레지듀얼 샘플(residual samples)을 유도할 수 있다(S700).
현재 블록의 레지듀얼 샘플은, 현재 블록의 원본 샘플(original samples)에서 예측 샘플(prediction samples)을 차분하여 유도될 수 있다. 여기서, 예측 샘플은, 소정의 인트라 예측 모드에 기초하여 유도된 것일 수 있다.
도 7을 참조하면, 현재 블록의 레지듀얼 샘플에 변환 또는 양자화 중 적어도 하나를 수행하여 현재 블록의 변환 계수(transform coefficients)를 유도할 수 있다(S710).
본 개시에 따른 변환 방법은 도 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를 참조하여 WAIP 모드의 적용에 따른 비분리 변환 세트의 구성 방법, 현재 블록의 크기에 따른 WAIP 모드의 이용 제한, 및 ISP 모드에 따른 비분리 변환의 적용 제한은 현재 블록의 레지듀얼 샘플을 변환하는 과정에서도 동일하게 적용될 수 있다.
도 7을 참조하면, 현재 블록의 변환 계수를 부호화하여 비트스트림을 생성할 수 있다(S720).
상기 현재 블록의 변환 계수를 기반으로, 상기 변환 계수에 관한 레지듀얼 정보가 생성될 수 있고, 레지듀얼 정보를 부호화하여 비트스트림이 생성될 수 있다.
도 8은 본 개시에 따른 영상 인코딩 방법을 수행하는 인코딩 장치(200)의 개략적인 구성을 도시한 것이다.
도 8을 참조하면, 본 개시에 따른 인코딩 장치(200)는, 래지듀얼 샘플 유도부(800), 변환 계수 유도부(810) 및 변환 계수 인코딩부(820)를 포함할 수 있다. 레지듀얼 샘플 유도부(800)와 변환 계수 유도부(810)는 도 2의 레지듀얼 처리부(230)에 구성될 수 있고, 변환 계수 인코딩부(820)는 도 2의 엔트로피 인코딩부(240)에 구성될 수 있다.
레지듀얼 샘플 유도부(800)는, 현재 블록의 원본 샘플에서 예측 샘플을 차분하여 현재 블록의 레지듀얼 샘플을 유도할 수 있다. 여기서, 예측 샘플은, 소정의 인트라 예측 모드에 기초하여 유도된 것일 수 있다.
변환 계수 유도부(810)는, 현재 블록의 레지듀얼 샘플에 변환 또는 양자화 중 적어도 하나를 수행하여 현재 블록의 변환 계수를 유도할 수 있다. 변환 계수 유도부(810)는, 전술한 실시예 1 내지 3 중 적어도 하나에 기초하여 현재 블록의 변환 커널을 결정하고, 현재 블록의 레지듀얼 샘플에 상기 변환 커널을 적용하여 변환 계수를 유도할 수 있다.
변환 계수 인코딩부(820)는, 현재 블록의 변환 계수를 부호화하여 비트스트림을 생성할 수 있다.
상술한 실시예에서, 방법들은 일련의 단계 또는 블록으로써 순서도를 기초로 설명되고 있지만, 해당 실시예는 단계들의 순서에 한정되는 것은 아니며, 어떤 단계는 상술한 바와 다른 단계와 다른 순서로 또는 동시에 발생할 수 있다. 또한, 당업자라면 순서도에 나타내어진 단계들이 배타적이지 않고, 다른 단계가 포함되거나 순서도의 하나 또는 그 이상의 단계가 본 문서의 실시예들의 범위에 영향을 미치지 않고 삭제될 수 있음을 이해할 수 있을 것이다.
상술한 본 문서의 실시예들에 따른 방법은 소프트웨어 형태로 구현될 수 있으며, 본 문서에 따른 인코딩 장치 및/또는 디코딩 장치는 예를 들어 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, 자기 테이프, 플로피 디스크 및 광학적 데이터 저장 장치를 포함할 수 있다. 또한, 상기 컴퓨터가 판독할 수 있는 기록 매체는 반송파(예를 들어, 인터넷을 통한 전송)의 형태로 구현된 미디어를 포함한다. 또한, 인코딩 방법으로 생성된 비트스트림이 컴퓨터가 판독할 수 있는 기록 매체에 저장되거나 유무선 통신 네트워크를 통해 전송될 수 있다.
또한, 본 명세서의 실시예(들)는 프로그램 코드에 의한 컴퓨터 프로그램 제품으로 구현될 수 있고, 상기 프로그램 코드는 본 명세서의 실시예(들)에 의해 컴퓨터에서 수행될 수 있다. 상기 프로그램 코드는 컴퓨터에 의해 판독가능한 캐리어 상에 저장될 수 있다.
도 9는 본 개시의 실시예들이 적용될 수 있는 컨텐츠 스트리밍 시스템의 예를 나타낸다.
도 9를 참조하면, 본 명세서의 실시예(들)이 적용되는 컨텐츠 스트리밍 시스템은 크게 인코딩 서버, 스트리밍 서버, 웹 서버, 미디어 저장소, 사용자 장치 및 멀티미디어 입력 장치를 포함할 수 있다.
상기 인코딩 서버는 스마트폰, 카메라, 캠코더 등과 같은 멀티미디어 입력 장치들로부터 입력된 컨텐츠를 디지털 데이터로 압축하여 비트스트림을 생성하고 이를 상기 스트리밍 서버로 전송하는 역할을 한다. 다른 예로, 스마트폰, 카메라, 캠코더 등과 같은 멀티미디어 입력 장치들이 비트스트림을 직접 생성하는 경우, 상기 인코딩 서버는 생략될 수 있다.
상기 비트스트림은 본 명세서의 실시예(들)이 적용되는 인코딩 방법 또는 비트스트림 생성 방법에 의해 생성될 수 있고, 상기 스트리밍 서버는 상기 비트스트림을 전송 또는 수신하는 과정에서 일시적으로 상기 비트스트림을 저장할 수 있다.
상기 스트리밍 서버는 웹 서버를 통한 사용자 요청에 기초하여 멀티미디어 데이터를 사용자 장치에 전송하고, 상기 웹 서버는 사용자에게 어떠한 서비스가 있는지를 알려주는 매개체 역할을 한다. 사용자가 상기 웹 서버에 원하는 서비스를 요청하면, 상기 웹 서버는 이를 스트리밍 서버에 전달하고, 상기 스트리밍 서버는 사용자에게 멀티미디어 데이터를 전송한다. 이때, 상기 컨텐츠 스트리밍 시스템은 별도의 제어 서버를 포함할 수 있고, 이 경우 상기 제어 서버는 상기 컨텐츠 스트리밍 시스템 내 각 장치 간 명령/응답을 제어하는 역할을 한다.
상기 스트리밍 서버는 미디어 저장소 및/또는 인코딩 서버로부터 컨텐츠를 수신할 수 있다. 예를 들어, 상기 인코딩 서버로부터 컨텐츠를 수신하게 되는 경우, 상기 컨텐츠를 실시간으로 수신할 수 있다. 이 경우, 원활한 스트리밍 서비스를 제공하기 위하여 상기 스트리밍 서버는 상기 비트스트림을 일정 시간동안 저장할 수 있다.
상기 사용자 장치의 예로는, 휴대폰, 스마트 폰(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항에 있어서,
    상기 현재 블록이 이용 가능한 비분리 변환 세트의 개수는, 상기 현재 블록이 제1 크기의 블록인지 여부에 기초하여 결정되는, 영상 디코딩 방법.
  3. 제2항에 있어서,
    상기 제1 크기의 블록은, 너비와 높이가 서로 상이한 블록 또는 너비와 높이의 비율이 8:1, 1:8, 16:1, 또는 1:16 중 적어도 하나인 블록을 포함하는, 영상 디코딩 방법.
  4. 제2항에 있어서,
    상기 제1 크기의 블록에 적용되는 하나 또는 그 이상의 제1 매핑 테이블과 상기 제1 크기의 블록이 아닌 블록에 적용되는 제2 매핑 테이블이 각각 정의되는, 영상 디코딩 방법.
  5. 제1항에 있어서,
    상기 현재 블록이 제2 크기의 블록인지 여부에 기초하여, 상기 현재 블록의 비분리 변환 세트를 결정하기 위한 매핑 테이블의 입력은, 비트스트림으로부터 시그날링되는 인트라 예측 모드 정보에 기초하여 유도 또는 와이드 앵글 인트라 예측 (WAIP) 모드 중 어느 하나로 결정되는, 영상 디코딩 방법.
  6. 제5항에 있어서,
    상기 제2 크기의 블록은, 너비와 높이의 비율이 2:1, 1:2, 4:1, 또는 1:4 중 적어도 하나인 블록을 포함하는, 영상 디코딩 방법.
  7. 제1항에 있어서,
    상기 현재 블록이 속한 코딩 블록에 인트라 서브파티션 모드가 적용되는지 여부에 기초하여 상기 비분리 변환의 적용 여부가 결정되는, 영상 디코딩 방법.
  8. 제1항에 있어서,
    상기 현재 블록이 인트라 서브파티션 모드에 따른 코딩 블록 내 복수의 서브파티션 중 어느 하나인 경우, 상기 비분리 변환의 적용 여부는 상기 현재 블록의 크기에 기초하여 결정되는, 영상 디코딩 방법.
  9. 제1항에 있어서,
    상기 매핑 테이블에 입력되는 인트라 예측 모드의 값이 67보다 크거나 같은 경우, 상기 비분리 변환을 위한 비분리 변환 세트는 상기 인트라 예측 모드의 값에서 65를 뺀 값과 동일한 세트 인덱스를 가진, 영상 디코딩 방법.
  10. 제1항에 있어서,
    상기 매핑 테이블에 입력되는 인트라 예측 모드의 값이 -1보다 작거나 같은 경우, 상기 비분리 변환을 위한 비분리 변환 세트는 1에서 상기 인트라 예측 모드의 값을 뺀 값과 동일한 세트 인덱스를 가진, 영상 디코딩 방법.
  11. 현재 블록의 레지듀얼 샘플들을 유도하는 단계;
    상기 현재 블록의 레지듀얼 샘플들에 변환 또는 양자화 중 적어도 하나를 수행하여, 상기 현재 블록의 변환 계수들을 유도하는 단계; 및
    상기 현재 블록의 변환 계수들을 부호화하는 단계를 포함하되,
    상기 변환은 비분리 변환 또는 분리 변환 중 적어도 하나를 기반으로 수행되고,
    상기 비분리 변환을 위한 비분리 변환 세트는, 기-정의된 인트라 예측 모드들과 비분리 변환 세트들 간의 매핑 관계를 정의하는 매핑 테이블에 기초하여 결정되는, 영상 인코딩 방법.
  12. 제11항에 따른 영상 인코딩 방법에 의해 생성된 비트스트림을 저장하는 컴퓨터 판독 가능한 저장 매체.
  13. 영상 정보에 대한 비트스트림을 획득하는 단계; 여기서, 상기 비트스트림은, 현재 블록의 레지듀얼 샘플들을 유도하고, 상기 현재 블록의 레지듀얼 샘플들에 변환 또는 양자화 중 적어도 하나를 수행하여 변환 계수들을 유도하고, 상기 현재 블록의 변환 계수를 부호화하여 생성됨, 및
    상기 비트스트림을 포함한 데이터를 전송하는 단계를 포함하되,
    상기 변환은 비분리 변환 또는 분리 변환 중 적어도 하나를 기반으로 수행되고,
    상기 비분리 변환을 위한 비분리 변환 세트는, 기-정의된 인트라 예측 모드들과 비분리 변환 세트들 간의 매핑 관계를 정의하는 매핑 테이블에 기초하여 결정되는, 데이터 전송 방법.
PCT/KR2024/007916 2023-06-08 2024-06-10 영상 인코딩/디코딩 방법 및 장치, 그리고 비트스트림을 저장한 기록 매체 Ceased WO2024253493A1 (ko)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP24819644.6A EP4727125A1 (en) 2023-06-08 2024-06-10 Image encoding/decoding method and device, and recording medium storing bitstream
KR1020267000448A KR20260035887A (ko) 2023-06-08 2024-06-10 영상 인코딩/디코딩 방법 및 장치, 그리고 비트스트림을 저장한 기록 매체
CN202480042106.XA CN121399938A (zh) 2023-06-08 2024-06-10 图像编码/解码方法和装置以及存储比特流的记录介质
MX2025014539A MX2025014539A (es) 2023-06-08 2024-06-10 Método y dispositivo de codificación/decodificación de imágenes, y medio de grabación que almacena flujo de bits

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US202363471970P 2023-06-08 2023-06-08
US63/471,970 2023-06-08

Publications (1)

Publication Number Publication Date
WO2024253493A1 true WO2024253493A1 (ko) 2024-12-12

Family

ID=93796305

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2024/007916 Ceased WO2024253493A1 (ko) 2023-06-08 2024-06-10 영상 인코딩/디코딩 방법 및 장치, 그리고 비트스트림을 저장한 기록 매체

Country Status (5)

Country Link
EP (1) EP4727125A1 (ko)
KR (1) KR20260035887A (ko)
CN (1) CN121399938A (ko)
MX (1) MX2025014539A (ko)
WO (1) WO2024253493A1 (ko)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200138804A (ko) * 2018-03-29 2020-12-10 프라운호퍼 게젤샤프트 쭈르 푀르데룽 데어 안겐반텐 포르슝 에. 베. 변환 세트
KR20210135320A (ko) * 2019-11-27 2021-11-12 텐센트 아메리카 엘엘씨 비디오 코딩 방법 및 장치
KR102435840B1 (ko) * 2017-06-29 2022-08-23 퀄컴 인코포레이티드 비분리형 변환들을 위한 메모리 감소
KR20230003639A (ko) * 2018-07-02 2023-01-06 텐센트 아메리카 엘엘씨 비디오 압축에서의 비-정사각형 블록들에 대한 인트라 예측을 위한 방법 및 장치
WO2023075353A1 (ko) * 2021-10-25 2023-05-04 엘지전자 주식회사 비분리 1차 변환 설계 방법 및 장치

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102435840B1 (ko) * 2017-06-29 2022-08-23 퀄컴 인코포레이티드 비분리형 변환들을 위한 메모리 감소
KR20200138804A (ko) * 2018-03-29 2020-12-10 프라운호퍼 게젤샤프트 쭈르 푀르데룽 데어 안겐반텐 포르슝 에. 베. 변환 세트
KR20230003639A (ko) * 2018-07-02 2023-01-06 텐센트 아메리카 엘엘씨 비디오 압축에서의 비-정사각형 블록들에 대한 인트라 예측을 위한 방법 및 장치
KR20210135320A (ko) * 2019-11-27 2021-11-12 텐센트 아메리카 엘엘씨 비디오 코딩 방법 및 장치
WO2023075353A1 (ko) * 2021-10-25 2023-05-04 엘지전자 주식회사 비분리 1차 변환 설계 방법 및 장치

Also Published As

Publication number Publication date
MX2025014539A (es) 2026-02-03
CN121399938A (zh) 2026-01-23
KR20260035887A (ko) 2026-03-13
EP4727125A1 (en) 2026-04-15

Similar Documents

Publication Publication Date Title
WO2021054796A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021086055A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021066598A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021096174A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021096290A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021066616A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021054798A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021010680A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021096293A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021060905A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021071282A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021096295A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021054783A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021137556A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021066601A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021141403A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021086149A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021054787A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021054799A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021071283A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021194199A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021141469A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021086151A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021071297A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021060827A1 (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: 24819644

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: MX/A/2025/014539

Country of ref document: MX

ENP Entry into the national phase

Ref document number: 2025571276

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 2025571276

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 202617000369

Country of ref document: IN

WWE Wipo information: entry into national phase

Ref document number: 2024819644

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2024819644

Country of ref document: EP

Effective date: 20260108

WWP Wipo information: published in national office

Ref document number: 202617000369

Country of ref document: IN

ENP Entry into the national phase

Ref document number: 2024819644

Country of ref document: EP

Effective date: 20260108

ENP Entry into the national phase

Ref document number: 2024819644

Country of ref document: EP

Effective date: 20260108

ENP Entry into the national phase

Ref document number: 2024819644

Country of ref document: EP

Effective date: 20260108

WWP Wipo information: published in national office

Ref document number: MX/A/2025/014539

Country of ref document: MX

ENP Entry into the national phase

Ref document number: 2024819644

Country of ref document: EP

Effective date: 20260108

WWP Wipo information: published in national office

Ref document number: 2024819644

Country of ref document: EP