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

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

Info

Publication number
WO2024080797A1
WO2024080797A1 PCT/KR2023/015764 KR2023015764W WO2024080797A1 WO 2024080797 A1 WO2024080797 A1 WO 2024080797A1 KR 2023015764 W KR2023015764 W KR 2023015764W WO 2024080797 A1 WO2024080797 A1 WO 2024080797A1
Authority
WO
WIPO (PCT)
Prior art keywords
kernel
transformation
transform
current block
candidates
Prior art date
Application number
PCT/KR2023/015764
Other languages
English (en)
French (fr)
Inventor
구문모
자오지에
임재현
김승환
Original Assignee
엘지전자 주식회사
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 엘지전자 주식회사 filed Critical 엘지전자 주식회사
Publication of WO2024080797A1 publication Critical patent/WO2024080797A1/ko

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/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/18Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a set of transform coefficients
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Definitions

  • the present invention relates to a video encoding/decoding method and device, and a recording medium storing a bitstream.
  • HD High Definition
  • UHD Ultra High Definition
  • Inter prediction technology that predicts the pixel value included in the current picture from pictures before or after the current picture as an image compression technology
  • intra prediction technology that predicts the pixel value included in the current picture using pixel information in the current picture
  • frequency of appearance There are various technologies, such as entropy coding technology, which assigns short codes to high values and long codes to values with low frequency of occurrence. Using these video compression technologies, video data can be effectively compressed and transmitted or stored.
  • the present disclosure seeks to provide a method and apparatus for configuring a predetermined transformation set for (inverse) transformation of a current block.
  • the present disclosure seeks to provide a method and apparatus for determining one or more transformation kernel candidates for a current block.
  • the present disclosure seeks to provide a method and device for signaling an index related to a transform kernel of a current block.
  • the video decoding method and device configure a transform set for the current block, and transform the current block from the transform set based on a transform kernel candidate index indicating one of the plurality of transform kernel candidates.
  • Determine a kernel perform inverse transformation on the current block based on the transformation kernel of the current block, derive a residual sample of the current block, and restore the current block based on the residual sample of the current block.
  • the transform set may include a plurality of transform kernel candidates for which the current block is available.
  • binarization of the transform kernel candidate index may be determined as either a truncated unary code or a fixed length code based on the number of transform kernel candidates included in the transform set.
  • the transform set may be configured by adding a specific transform kernel to a Multiple Transform Selection (MTS) set, where the specific transform kernel is a reference transform kernel or the reference transform It may include at least one of one or more conversion kernels derived based on the kernel.
  • MTS Multiple Transform Selection
  • the specific transform kernel may be added before the first transform kernel candidate in the MTS set or after the last transform kernel candidate in the MTS set.
  • one or more transform kernel candidates in the MTS set may be replaced by the added specific transform kernel.
  • the number of specific transform kernels added to the MTS set may be determined based on at least one of the context of the current block or the MTS set index.
  • the number of specific transform kernels added to the MTS set may be variably determined based on the sum of the absolute values of all or part of the transform coefficients in the current block.
  • the total number of transform kernel candidates available for the current block may be set differently depending on at least one of the context of the current block or the MTS set index.
  • the video encoding method and device configure a transform set for the current block, determine the transform kernel of the current block based on one of a plurality of transform kernel candidates in the transform set, and configure the transform kernel of the current block. Transformation can be performed on the current block based on a transform kernel, the transform coefficient of the current block can be derived, and residual information about the transform coefficient of the current block can be encoded.
  • the residual information includes a transform kernel candidate index indicating one of the plurality of transform kernel candidates, and the transform set may include a plurality of transform kernel candidates for which the current block is available.
  • a computer-readable digital storage medium storing encoded video/image information that causes performing an image decoding method by a decoding device according to the present disclosure is provided.
  • a computer-readable digital storage medium storing video/image information generated according to the image encoding method according to the present disclosure is provided.
  • a method and device for transmitting video/image information generated according to the video encoding method according to the present disclosure are provided.
  • transformation performance can be improved by configuring a transformation set including various transformation kernel candidates.
  • the present disclosure can improve transformation performance by additionally using a non-trigonometric function-based transformation kernel in addition to the trigonometric function-based transformation kernel.
  • the present disclosure can improve the coding efficiency of transformation-related information by effectively signaling an index related to the transformation kernel of the current block.
  • FIG. 1 shows a video/image coding system according to the present disclosure.
  • Figure 2 shows a schematic block diagram of an encoding device to which an embodiment of the present disclosure can be applied and encoding of video/image signals is performed.
  • Figure 3 shows a schematic block diagram of a decoding device to which an embodiment of the present disclosure can be applied and decoding of video/image signals is performed.
  • FIG. 4 illustrates an image decoding method performed by the decoding device 300 as an embodiment according to the present disclosure.
  • Figure 5 exemplarily shows an intra prediction mode and its prediction direction according to the present disclosure.
  • FIG. 6 shows a schematic configuration of a decoding device 300 that performs the video decoding method according to the present disclosure.
  • FIG. 7 illustrates an image encoding method performed by the encoding device 200 as an embodiment according to the present disclosure.
  • FIG. 8 shows a schematic configuration of an encoding device 200 that performs the video encoding method according to the present disclosure.
  • Figure 9 shows 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 above terms are used only for the purpose of distinguishing one component from another. For example, a first component may be referred to as a second component, and similarly, the second component may be referred to as a first component without departing from the scope of the present disclosure.
  • the term and/or includes any of a plurality of related stated items or a combination of a plurality of related stated items.
  • This disclosure relates to video/image coding.
  • the method/embodiment disclosed herein may be applied to the method disclosed in the versatile video coding (VVC) standard.
  • VVC versatile video coding
  • the method/embodiment disclosed in this specification is the EVC (essential video coding) standard, AV1 (AOMedia Video 1) standard, AVS2 (2nd generation of audio video coding standard), or next-generation video/image coding standard (ex. H.267). or H.268, etc.).
  • video may mean a set of a series of images over time.
  • a picture generally refers to a unit representing one image in a specific time period, and a slice/tile is a unit that forms part of a picture in coding.
  • a slice/tile may contain one or more coding tree units (CTUs).
  • CTUs coding tree units
  • One picture may consist of one or more slices/tiles.
  • One tile is a rectangular area composed of a plurality of CTUs within a specific tile row and a specific tile row of one picture.
  • a tile row is a rectangular area of CTUs with a height equal to the height of the picture and a width specified by the syntax requirements of the picture parameter set.
  • a tile row is a rectangular area of CTUs with a height specified by a picture parameter set and a width equal to the width of the picture.
  • CTUs within one tile may be arranged continuously according to a CTU raster scan, while tiles within one picture may be arranged continuously according to a raster scan of the tile.
  • One slice may contain an integer number of complete tiles or an integer number of consecutive complete CTU rows within a tile of a picture that may be contained exclusively in a single NAL unit. Meanwhile, one picture may be divided into two or more subpictures.
  • a subpicture may be a rectangular area of one or more slices within a picture.
  • a pixel, pixel, or pel may refer to the minimum unit that constitutes one picture (or video). Additionally, 'sample' may be used as a term corresponding to a pixel.
  • a sample may generally represent a pixel or a pixel value, and may represent only a pixel/pixel value of a luminance (luma) component, or only a pixel/pixel value of a chroma component.
  • a unit may represent the basic unit of image processing.
  • a unit may include at least one of a specific area of a picture and information related to the area.
  • One unit may include one luma block and two chroma (ex. cb, cr) blocks.
  • unit may be used interchangeably with terms such as block or area.
  • an MxN block may include a set (or array) of samples (or a sample array) or transform coefficients consisting of M columns and N rows.
  • a or B may mean “only A,” “only B,” or “both A and B.” In other words, in this specification, “A or B” may be interpreted as “A and/or B.”
  • A, B or C refers to “only A,” “only B,” “only C,” or “any and all combinations of A, B, and C ( It can mean “any combination of A, B and C)”.
  • the slash (/) or comma used in this specification may 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 may mean “only A,” “only B,” or “both A and B.”
  • the expression “at least one of A or B” or “at least one of A and/or B” means “at least one It can be interpreted the same as "at least one of A and B”.
  • At least one of A, B and C means “only A”, “only B”, “only C”, or “A, B and C”. It can mean “any combination of A, B and C.” Also, “at least one of A, B or C” or “at least one of A, B and/or C” means It may mean “at least one of A, B and C.”
  • parentheses used in this specification may mean “for example.” Specifically, when “prediction (intra prediction)” is displayed, “intra prediction” may be proposed as an example of “prediction.” In other words, “prediction” in this specification is not limited to “intra prediction,” and “intra prediction” may be proposed as an example of “prediction.” Additionally, even when “prediction (i.e., intra prediction)” is indicated, “intra prediction” may be proposed as an example of “prediction.”
  • FIG. 1 shows 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).
  • the source device can transmit encoded video/image information or data in file or streaming form to a receiving device through a digital storage medium or network.
  • the source device may include a video source, an encoding device, and a transmission unit.
  • the receiving device may include a receiving unit, 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.
  • a transmitter may be included in the encoding device.
  • a receiver may be included in the decoding device.
  • the renderer may include a display unit, and the display unit may be composed of a separate device or external component.
  • a video source can acquire video/image through the process of capturing, compositing, or creating video/image.
  • a video source may include a video/image capture device and/or a video/image generation device.
  • a video/image capture device may include one or more cameras, a video/image archive containing previously captured video/image, etc.
  • Video/image generating devices may include computers, tablets, and smartphones, and are capable of generating video/images (electronically). For example, a virtual video/image may be created through a computer, etc., and in this case, the video/image capture process may be replaced by the process of generating related data.
  • 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.
  • Encoded data (encoded video/image information) may be output in the form of a bitstream.
  • the transmitting unit may transmit the encoded video/image information or data output in the form of a bitstream to the receiving unit of the receiving device through a digital storage medium or network in the form of a file or streaming.
  • Digital storage media may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD.
  • the transmission unit may include elements for creating a media file through a predetermined file format and may include elements for transmission through a broadcasting/communication network.
  • the receiving unit may receive/extract the bitstream and transmit it to the decoding device.
  • the decoding device can decode the video/image by performing a series of procedures such as inverse quantization, inverse transformation, and prediction that correspond to the operation of the encoding device.
  • the renderer can render the decoded video/image.
  • the rendered video/image may be displayed through the display unit.
  • Figure 2 shows a schematic block diagram of an encoding device to which an embodiment of the present disclosure can be applied and encoding of video/image signals is performed.
  • the encoding device 200 includes an image partitioner (210), a predictor (220), a residual processor (230), an entropy encoder (240), It may be configured to include an adder (250), a filter (260), and a memory (270).
  • the prediction unit 220 may include an inter prediction unit 221 and an intra prediction unit 222.
  • the residual processing unit 230 may include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235.
  • the residual processing unit 230 may further include a subtractor 231.
  • the adder 250 may be called a reconstructor or a reconstructed block generator.
  • the above-described image segmentation unit 210, prediction unit 220, residual processing unit 230, entropy encoding unit 240, addition unit 250, and filtering unit 260 may include one or more hardware components (depending on the embodiment). For example, it may be configured by an encoding device chipset or processor). Additionally, the memory 270 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware component may further include a memory 270 as an internal/external component.
  • DPB decoded picture buffer
  • the image segmentation unit 210 may divide 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 will be split recursively according to the QTBTTT (Quad-tree binary-tree ternary-tree) structure from the coding tree unit (CTU) or the largest coding unit (LCU). You can.
  • QTBTTT Quad-tree binary-tree ternary-tree
  • one coding unit may be divided into a plurality of coding units with deeper depth based on a quad tree structure, binary tree structure, and/or ternary structure.
  • the quad tree structure may be applied first and the binary tree structure and/or 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 can be performed based on the final coding unit that is no longer divided. In this case, based on coding efficiency according to video characteristics, the largest coding unit can be directly used as the final coding unit, or, if necessary, the coding unit is recursively divided into lower-depth coding units to determine the optimal coding unit. A coding unit with a size of can be used as the final coding unit.
  • the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later.
  • the processing unit may further include a prediction unit (PU) or a transform unit (TU).
  • the prediction unit and the transform unit may each be divided 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 the transform coefficient.
  • an MxN block may represent a set of samples or transform coefficients consisting of M columns and N rows.
  • a sample may generally represent a pixel or a pixel value, and may represent only a pixel/pixel value of a luminance (luma) component, or only a pixel/pixel value of a chroma component.
  • a sample may be used as a term corresponding to a pixel or pel of one picture (or video).
  • the encoding device 200 subtracts the prediction signal (prediction block, prediction sample array) output from the inter prediction unit 221 or the intra prediction unit 222 from the input image signal (original block, original sample array) to generate a residual signal. (residual signal, residual block, residual sample array) can be generated, and the generated residual signal is transmitted to the converter 232.
  • the unit that subtracts the prediction signal (prediction block, prediction sample array) from the input image signal (original block, original sample array) within the encoding device 200 may be called the subtraction unit 231.
  • the prediction unit 220 may perform prediction on a block to be processed (hereinafter referred to as a current block) and generate a predicted block including prediction samples for the current block.
  • the prediction unit 220 may determine whether intra prediction or inter prediction is applied on a current block or CU basis.
  • the prediction unit 220 may generate various information related to prediction, such as prediction mode information, and transmit it to the entropy encoding unit 240, as will be described later in the description of each prediction mode.
  • Information about prediction may be encoded in 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 within the current picture.
  • the referenced samples may be located in the neighborhood of the current block, or may be located a certain distance away from the current block, depending on the prediction mode.
  • prediction modes may include one or more non-directional modes and multiple directional modes.
  • the non-directional mode may include at least one of DC mode or planar mode.
  • the directional mode may include 33 directional modes or 65 directional modes depending on the level of detail of the predicted direction. However, this is an example and more or less directional modes may be used depending on the setting.
  • the intra prediction unit 222 may determine the prediction mode applied to the current block using the prediction mode applied to the neighboring block.
  • the inter prediction unit 221 may derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector in the reference picture.
  • motion information can be predicted in blocks, subblocks, or samples based on the correlation of motion information between neighboring blocks and the current block.
  • the motion information may include a motion vector and a reference picture index.
  • the motion information may further include inter prediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.).
  • neighboring blocks may include a spatial neighboring block existing in the current picture and a temporal neighboring block existing in the reference picture.
  • a reference picture including the reference block and a reference picture including the temporal neighboring block may be the same or different.
  • the temporal neighboring block may be called a collocated reference block, a collocated reference block, a collocated CU (colCU), etc.
  • a reference picture including the temporal neighboring block may be called a collocated picture (colPic).
  • the inter prediction unit 221 constructs a motion information candidate list based on neighboring blocks, and provides information indicating which candidate is used to derive the motion vector and/or reference picture index of the current block. can be created. Inter prediction may be performed based on various prediction modes.
  • the inter prediction unit 221 may use motion information of neighboring blocks as motion information of the current block.
  • residual signals may not be transmitted.
  • MVP motion vector prediction
  • the motion vector of the surrounding block is used as a motion vector predictor and the motion vector difference is signaled to determine the motion vector of the current block. can be instructed.
  • the prediction unit 220 may generate a prediction signal based on various prediction methods described later.
  • the prediction unit can not only apply intra prediction or inter prediction for prediction of one block, but also can apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP) mode.
  • the prediction unit may be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block.
  • IBC prediction mode or palette mode can be used for content image/video coding such as games, such as screen content coding (SCC).
  • SCC screen content coding
  • IBC basically performs prediction within the current picture, but can be performed similarly to inter prediction in that it derives a reference block within the current picture. That is, IBC can use at least one of the inter prediction techniques described in this specification.
  • Palette mode can be viewed as an example of intra coding or intra prediction.
  • sample values within a picture can be signaled based on information about the palette table and palette index.
  • the prediction signal generated through the prediction unit 220 may be used to generate a restored signal or a residual signal.
  • the transform unit 232 may generate transform coefficients by applying a transform technique to the residual signal.
  • the transformation technique may be at least one of Discrete Cosine Transform (DCT), Discrete Sine Transform (DST), Karhunen-Loeve Transform (KLT), Graph-Based Transform (GBT), or Conditionally Non-linear Transform (CNT). It can be included.
  • DCT Discrete Cosine Transform
  • DST Discrete Sine Transform
  • KLT Karhunen-Loeve Transform
  • GBT Graph-Based Transform
  • CNT Conditionally Non-linear Transform
  • GBT refers to the transformation obtained from this graph when the relationship information between pixels is expressed as a graph.
  • CNT generates a prediction signal using all previously restored pixels, and refers to a transformation obtained based on it.
  • the conversion process may be applied to square pixel blocks of the same size, or to non-square blocks of 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 encodes the quantized signal (information about the quantized transform coefficients) and outputs it as a bitstream. there is. Information about the quantized transform coefficients may be called residual information.
  • the quantization unit 233 may rearrange the quantized transform coefficients in block form into a one-dimensional vector form based on the coefficient scan order, and perform the quantization based on the quantized transform coefficients in the one-dimensional vector form. Information about converted transformation coefficients can also be generated.
  • the entropy encoding unit 240 may perform various encoding methods such as exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC).
  • the entropy encoding unit 240 may encode information necessary for video/image restoration (eg, values of syntax elements, etc.) in addition to the quantized transformation coefficients together or separately.
  • Encoded information may be transmitted or stored in bitstream form in units of NAL (network abstraction layer) units.
  • the video/image information may further include information about 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). Additionally, the video/image information may further include general constraint information.
  • APS adaptation parameter set
  • PPS picture parameter set
  • SPS sequence parameter set
  • VPS video parameter set
  • 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 video/image information.
  • the video/image information may be encoded through the above-described encoding procedure and included in the bitstream.
  • the bitstream can be transmitted over 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.
  • a transmission unit (not shown) that transmits the signal output from the entropy encoding unit 240 and/or a storage unit (not shown) that stores the signal may be configured as internal/external elements of the encoding device 200, or the transmission unit may be configured as internal/external elements of the encoding device 200. It may also be included in the entropy encoding unit 240.
  • Quantized transform coefficients output from the quantization unit 233 can be used to generate a prediction signal.
  • a residual signal residual block or residual samples
  • the adder 250 adds the reconstructed residual signal to the prediction signal output from the inter prediction unit 221 or the intra prediction unit 222, thereby creating a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). can be created. If there is no residual for the block to be processed, such as when skip mode is applied, the predicted block can be used as a restoration block.
  • the addition unit 250 may be called a restoration unit or a restoration block generation unit.
  • the generated reconstructed 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 will be described later.
  • LMCS luma mapping with chroma scaling
  • the filtering unit 260 can improve subjective/objective image quality by applying filtering to the restored signal.
  • the filtering unit 260 may generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 270, specifically the memory 270. It can be saved in DPB.
  • the various filtering methods may include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.
  • the filtering unit 260 may generate various information regarding filtering and transmit it to the entropy encoding unit 240. Information about filtering may be encoded in the entropy encoding unit 240 and output in the form of a bitstream.
  • the modified reconstructed 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 in the encoding device 200 and the decoding device when inter prediction is applied, and can also improve encoding efficiency.
  • the DPB of the memory 270 can store the modified reconstructed picture to use it as a reference picture in the inter prediction unit 221.
  • the memory 270 may store motion information of a block from which motion information in the current picture is derived (or encoded) and/or motion information of blocks in an already restored picture.
  • the stored motion information can be transmitted to the inter prediction unit 221 to be used as motion information of spatial neighboring blocks or motion information of temporal neighboring blocks.
  • the memory 270 can store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 222.
  • Figure 3 shows a schematic block diagram of a decoding device to which an embodiment of the present disclosure can be applied and decoding of video/image signals is performed.
  • the decoding device 300 includes an entropy decoder (310), a residual processor (320), a predictor (330), an adder (340), and a filtering unit. It may be configured to include (filter, 350) and memory (memoery, 360).
  • the prediction unit 330 may include an inter prediction unit 331 and an intra prediction unit 332.
  • the residual processing unit 320 may include a dequantizer (321) and an inverse transformer (321).
  • the entropy decoding unit 310, residual processing unit 320, prediction unit 330, addition unit 340, and filtering unit 350 may include one hardware component (e.g., a decoding device chipset or It can be configured by a processor).
  • the memory 360 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium.
  • the hardware component may further include a memory 360 as an internal/external component.
  • the decoding device 300 may restore the image in response to the process in which the video/image information is processed in the encoding device of FIG. 2.
  • the decoding device 300 may derive units/blocks based on block division-related information obtained from the bitstream.
  • the decoding device 300 may 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, binary tree structure, and/or ternary tree structure.
  • One or more transformation units can be derived from a coding unit.
  • the restored video signal decoded and output through the decoding device 300 can be played through a playback device.
  • the decoding device 300 may receive the signal output from the encoding device of FIG. 2 in the form of a bitstream, and the received signal may be decoded through the entropy decoding unit 310.
  • the entropy decoder 310 may parse the bitstream to derive information (e.g. video/picture information) necessary for image restoration (or picture restoration).
  • the video/image information may further include information about 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). Additionally, the video/image information may further include general constraint information.
  • the decoding device may decode the picture further based on the information about the parameter set and/or the general restriction information.
  • Signaled/received information and/or syntax elements described later in this specification may be obtained from the bitstream by being decoded through the decoding procedure.
  • the entropy decoding unit 310 decodes information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and calculates the value of the syntax element required for image restoration and the quantized value of the transform coefficient for the residual. can be printed out.
  • the CABAC entropy decoding method receives bins corresponding to each syntax element from the bitstream, and receives decoding target syntax element information and decoding information of surrounding and decoding target blocks or information of symbols/bins decoded in the previous step.
  • the CABAC entropy decoding method can update the context model using information on the decoded symbol/bin for the context model of the next symbol/bin after determining the context model.
  • the residual processing unit 320 may derive a residual signal (residual block, residual samples, residual sample array). Additionally, information about filtering among the information decoded by the entropy decoding unit 310 may be provided to the filtering unit 350. Meanwhile, a receiving unit (not shown) that receives the signal output from the 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 the entropy decoding unit 310.
  • the decoding device may be called a video/image/picture decoding device, and the decoding device may include an information decoding device (video/image/picture information decoding device) and a sample decoding device (video/image/picture sample decoding It can also be classified by device).
  • the information decoding device may include the entropy decoding unit 310, and the sample decoding device may include the inverse quantization unit 321, the inverse transform unit 322, the adder 340, the filtering unit 350, and the memory. (360), and may include at least one of an inter prediction unit 332 and an intra prediction unit 331.
  • the inverse quantization unit 321 may inversely quantize the quantized transform coefficients and output the transform coefficients.
  • the inverse quantization unit 321 may rearrange the quantized transform coefficients into a two-dimensional block form. In this case, the rearrangement may be performed based on the coefficient scan order performed in the encoding device.
  • the inverse quantization unit 321 may perform inverse quantization on quantized transform coefficients using quantization parameters (eg, quantization step size information) and obtain transform coefficients.
  • the inverse transform unit 322 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).
  • the prediction unit 320 may perform prediction on the current block and generate a predicted block including prediction samples for the current block.
  • the prediction unit 320 may 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 determine a specific intra/inter prediction mode. You can.
  • the prediction unit 320 may generate a prediction signal based on various prediction methods described later. For example, the prediction unit 320 can not only apply intra prediction or inter prediction for prediction of one block, but also can apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP) mode. Additionally, the prediction unit may be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block.
  • IBC intra block copy
  • 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 in this specification.
  • Palette mode can be viewed as an example of intra coding or intra prediction. When the palette mode is applied, information about the palette table and palette index may be included and signaled in the video/image information.
  • the intra prediction unit 331 can predict the current block by referring to samples within the current picture.
  • the referenced samples may be located in the neighborhood of the current block, or may be located a certain distance away from the current block, depending on the prediction mode.
  • 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 using the prediction mode applied to the neighboring block.
  • the inter prediction unit 332 may derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector in the reference picture.
  • motion information can be predicted on a block, subblock, or sample basis based on the correlation of motion information between neighboring blocks and the current block.
  • the motion information may include a motion vector and a reference picture index.
  • the motion information may further include inter prediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.).
  • neighboring blocks may 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 may construct a motion information candidate list based on neighboring blocks and derive a motion vector and/or reference picture index of the current block based on the received candidate selection information. Inter prediction may be performed based on various prediction modes, and the information regarding the prediction may include information indicating the inter prediction mode for the current block.
  • the adder 340 adds the obtained 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) to produce a restored signal. (Restored picture, restored block, restored sample array) can be generated. If there is no residual for the block to be processed, such as when skip mode is applied, the prediction block can be used as a restoration block.
  • the addition unit 340 may be called a restoration unit or a restoration block generation unit.
  • the generated reconstructed signal may be used for intra prediction of the next processing target block in the current picture, may be output after filtering as described later, or may be used for inter prediction of the next picture.
  • LMCS luma mapping with chroma scaling
  • the filtering unit 350 can improve subjective/objective image quality by applying filtering to the restored signal.
  • the filtering unit 350 may generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 360, specifically the DPB of the memory 360. can be transmitted to
  • the various filtering methods may 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 may 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 an already restored picture.
  • the stored motion information can be transmitted to the inter prediction unit 260 to be used as motion information of spatial neighboring blocks or motion information of temporal neighboring blocks.
  • the memory 360 can store reconstructed samples of reconstructed blocks in the current picture and transmit 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 are the filtering unit 350 and the inter prediction unit of the decoding device 300, respectively. It may also be applied to the unit 332 and the intra prediction unit 331 in the same or corresponding manner.
  • FIG. 4 illustrates an image decoding method performed by the decoding device 300 as an embodiment according to the present disclosure.
  • transform coefficients of the current block can be derived from the bitstream (S400). That is, the bitstream may include residual information of the current block, and the transform coefficient of the current block can be derived by decoding the residual information.
  • residual samples of the current block can be derived by performing at least one of dequantization or inverse-transform on the transform coefficient of the current block (S410).
  • inverse transformation may be performed based on at least one of DCT-2, DST-7, or DCT-8.
  • DCT-2, DST-7, DCT-8, etc. may be called a conversion type, conversion kernel, or conversion core.
  • Inverse transformation in the present disclosure may mean separable transformation. However, it is not limited to this, and inverse transformation may mean non-separable transformation, or may be a concept including separate transformation and non-separable transformation. Additionally, inverse transformation in the present disclosure refers to primary transformation, but is not limited thereto, and may be transformed into the same/similar form and applied to secondary transformation.
  • non-separable transformation may be used, or non-separable transformation may be used in addition to at least one of DCT-2, DST-7, or DCT-8, or DCT- 2, non-separate transformation may replace one or more transformation kernels of DST-7, or DCT-8.
  • transformation kernel candidates for separate transformation (DCT-2, DCT-2), (DST-7, DST-7), (DCT-8, DST-7), (DST-7, DCT -8), If (DCT-8, DCT-8) exists, a non-separated transformation may replace or be added to one or more of the five transformation kernel candidates.
  • notations such as (transformation 1, transformation 2) indicate that transformation 1 is applied in the horizontal direction and transformation 2 is applied in the vertical direction. If non-separate transformation replaces some of the corresponding transformation kernel candidates, the remaining transformation kernel candidates except (DCT-2, DCT-2) and (DST-7, DST-7) can be replaced with non-separate transformation.
  • the transformation kernel candidate is only an example, and other types of DCT and/or DST may be included, and transform skip may be included as a transformation kernel candidate.
  • Non-separable transformation may mean transformation or inverse transformation based on a non-separable transform matrix.
  • non-separated transformation can perform horizontal and vertical transformation at once.
  • vector X' When the input data X is expressed in vector form, vector X' can be expressed as follows.
  • the non-separable transformation can be performed as in Equation 3 below.
  • Equation 3 F represents the transformation coefficient vector, T represents the 16x16 non-separable transformation matrix, and ⁇ means the multiplication of the matrix and the vector.
  • a 16x1 transform coefficient vector F can be derived through Equation 3, and F can be reconstructed into a 4x4 block according to a predetermined scan order.
  • the scan order may be horizontal scan, vertical scan, diagonal scan, z scan, raster scan, or pre-defined scan.
  • the non-separate transformation set and/or transformation kernel for the non-separate transformation includes the prediction mode (ex. intra mode, inter mode, etc.), the width, height, or number of pixels of the current block, the location of the sub-block within the current block, and It can be configured in various ways based on at least one of a syntactic element signaled by the target, statistical characteristics of surrounding samples, whether a quadratic transform is used, or a quantization parameter (QP).
  • the prediction mode ex. intra mode, inter mode, etc.
  • the non-separate transformation set and/or transformation kernel for the non-separate transformation includes the prediction mode (ex. intra mode, inter mode, etc.), the width, height, or number of pixels of the current block, the location of the sub-block within the current block, and It can be configured in various ways based on at least one of a syntactic element signaled by the target, statistical characteristics of surrounding samples, whether a quadratic transform is used, or a quantization parameter (
  • pre-defined intra prediction modes are grouped to correspond to n non-separated transform sets, and each non-separated transform set may include k transform kernel candidates.
  • n and k may be arbitrary constants according to rules (conditions) defined equally for the encoding device and the decoding device.
  • the number of non-separated transform sets and/or the number of transform kernel candidates included in the non-separated transform set 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 can be configured. Additionally, the number of non-separated transformation sets and the number of transformation kernel candidates included in each non-separated transformation set may be configured differently depending on the product of the width and height of the current block.
  • n 3 non-separable transformation sets and k 3 transformation kernel candidates can be constructed, otherwise, n 4 non-separable transformation sets can be constructed.
  • a set and k 4 transformation kernel candidates can be constructed. 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, so the number of non-separable transform sets and transform kernel candidates can be configured differently. For example, if a 4x8 or 8x4 block is divided into two 4x4 subblocks and a non-separable transform is applied to each subblock, n 5 non-separable transform sets and k 5 transform kernels for the top left 4x4 subblock. Candidates can be configured, and n 6 non-separated transform sets and k 6 transform kernel candidates can be configured for different 4x4 subblocks.
  • the number of non-separated transformation sets and transformation kernel candidates can be configured differently.
  • the syntax element information indicating one of a plurality of non-separable transformation configurations may be used. For example, if three kinds of non-separated transformation configurations are supported (i.e., n 7 non-separated transformation sets and k 7 transformation kernel candidates, n 8 non-separate transformation sets and k 8 transformation kernel candidates, n 9 k non-separate transformation sets and k 9 transformation kernel candidates), the corresponding syntax elements can have the values 0, 1, and 2, and the value of the signaled syntax element can determine the non-separate transformation configuration applied to the current block. there is.
  • the number of non-separated transformation sets and transformation kernel candidates may be configured differently. For example, when the secondary transformation is not applied, a non-separable transformation configuration including n 10 non-separable transformation sets and k 10 transformation kernel candidates can be applied. When a secondary transformation is applied, a non-separable transformation configuration including n 11 non-separable transformation sets and k 11 transformation kernel candidates can be applied.
  • non-separable transformation schemes can be applied. For example, when the QP value is small, a non-separable transformation configuration including n 12 non-separable transformation sets and k 12 transformation kernel candidates can be applied. On the other hand, when the QP value is large, a non-separable transformation configuration including n 13 non-separable transformation sets and k 13 transformation kernel candidates can be applied. If the QP value is below (or less than) the threshold value (eg, 32), the case can be classified as having a small QP value. Otherwise, the case can be classified as having a large QP value. Alternatively, the range of QP values can be divided into three or more, and a different non-separated transformation configuration can be applied to each range.
  • the threshold value eg, 32
  • the block For relatively large blocks, rather than using a non-separable transformation corresponding to the width and height of the block, you can divide the block into multiple sub-blocks and use a non-separating transformation corresponding to the width and height of the sub-blocks.
  • the 4x8 block when performing non-separable transformation on a 4x8 block, the 4x8 block can be divided into two 4x4 sub-blocks, and 4x4 block-based non-separable transformation can be used for each 4x4 sub-block.
  • an 8x16 block it can be divided into two 8x8 sub-blocks and use 8x8 block-based non-separable transformation.
  • the non-separated transform set may be determined based on the intra prediction mode and mapping table of the current block.
  • the mapping table may define a mapping relationship between pre-defined intra prediction modes and non-separate transform sets.
  • Pre-defined intra prediction modes may include 2 non-directional modes and 65 directional modes.
  • the size of the transformation kernel for non-separated transformation is larger than that for separated transformation. This means that the computational complexity required for the conversion process is high and the memory required to store the conversion kernel is large. Meanwhile, the separate transformation can only consider statistical characteristics that exist in the horizontal and/or vertical directions, while the non-separate transformation can simultaneously consider statistical characteristics in a two-dimensional space including the horizontal and vertical directions, providing better compression efficiency. .
  • the non-directional mode may include planar mode number 0 and DC mode number 1, and the directional mode may include intra prediction modes number 2 to 66. However, this is an example, and the present disclosure can be applied even when the number of pre-defined intra prediction modes is different.
  • the pre-defined intra prediction mode may further include -14 to -1 intra prediction modes and 67 to 80 intra prediction modes.
  • Figure 5 exemplarily shows an intra prediction mode and its prediction direction according to the present disclosure.
  • modes -14 to -1 and 2 to 33 and modes 35 to 80 are symmetrical in terms of prediction direction with mode 34 as the center.
  • modes 10 and 58 are symmetrical about the direction corresponding to mode 34
  • mode -1 is symmetrical with mode 67. Therefore, for the vertical directional mode that is symmetrical to the horizontal directional mode around mode 34, the input data can be transposed and used. Transposing 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.
  • the 16 pieces of data that make up the 4x4 block can be appropriately arranged to form a 16x1 one-dimensional vector.
  • a one-dimensional vector may be constructed in row-first order, or a one-dimensional vector may be constructed in column-first order.
  • a two-dimensional block can be formed by arranging the residual samples that are the result of non-separable transformation in the above order.
  • Mode number 34 can be considered neither a horizontal directional mode nor a vertical directional mode, but in the present disclosure, it is classified as belonging to the horizontal directional mode. That is, for modes -14 to -1 and 2 to 33, the input data sorting method for the horizontal directional mode, that is, row-first order, is used, and for the vertical directional mode that is symmetrical around mode 34, You can use it by transposing the input data.
  • symmetry between block types in a transpose relationship that is, symmetry between KxL blocks and LxK blocks, can also be utilized.
  • a symmetrical relationship exists between the KxL block predicted in P mode and the LxK block predicted in (68-P) mode.
  • a symmetrical relationship exists between the KxL block predicted in Q mode and the LxK block predicted in (66-Q) mode.
  • the same transformation kernel can be applied to the KxL block and the LxK block.
  • the (68-P) mode is used instead of the P mode applied to the LxK block.
  • a non-separable transformation set can be derived through a mapping table corresponding to the KxL block.
  • a non-separable transform set can be derived through a mapping table corresponding to the KxL block based on the (66-Q) mode instead of the Q mode applied to the LxK block.
  • a non-separable transformation set can be selected based on mode 2 instead of mode 66.
  • input data can be read according to a pre-determined order (e.g., row-first order or column-first order) to construct a one-dimensional vector, and then apply the corresponding non-separable transformation.
  • the LxK block the input data can be read according to the transpose order to construct a one-dimensional vector, and then the corresponding non-separable transformation can be applied.
  • the KxL block is read in row-first order
  • the LxK block can be read in column-first order.
  • an LxK block can be read in row-first order.
  • mode 34 when mode 34 is applied to the KxL block, a non-separable transformation set is determined based on mode 34, and the input data is read according to a pre-determined order to construct a one-dimensional vector to perform the non-separate transformation. You can.
  • mode 34 is applied to the LxK block, a non-separable transformation set is similarly determined based on mode 34, but the non-separable transformation can be performed by reading the input data in the transpose order and constructing a one-dimensional vector. .
  • a method of determining a non-separable transformation set and a method of configuring input data are described based on a KxL block, but the non-separable transformation can be performed by equally utilizing the above-described symmetry for the KxL block based on an LxK block.
  • a block whose width is greater than its height may be restricted to be used as a reference block.
  • symmetry may be restricted from being utilized.
  • the non-square block may use a different number of non-separate transform sets and/or transform kernel candidates than the square block, and the non-separate transform set may be selected using a different mapping table than that of the square block.
  • mapping table for selecting a non-separate transformation set is as follows.
  • Table 1 shows an example of allocating a non-separable transform set for each intra prediction mode when there are five non-separate 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-separated transformation set.
  • Table 1 it can be seen that the same non-separable transformation 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 transformation sets, and does not limit the total number of non-separable transformation sets for non-separate transformation.
  • non-separate transformation may not be applied to WAIP for compression performance.
  • a non-separate transform set corresponding to an adjacent intra prediction mode may be shared without configuring a separate non-separate transform set for WAIP.
  • predModeIntra TrSetIdx predModeIntra ⁇ 0
  • predModeIntra ⁇ 1 0
  • predModeIntra ⁇ 12
  • predModeIntra ⁇ 23
  • predModeIntra ⁇ 44 3
  • predModeIntra ⁇ 55 2 56
  • predModeIntra ⁇ 80
  • the non-separated transformation set may include a plurality of transformation kernel candidates, and any one of the plurality of transformation kernel candidates may be selectively used. For this purpose, an index signaled through the bitstream can be used.
  • one of a plurality of conversion kernel candidates may be implicitly determined based on context information of the current block.
  • the context information may mean the size of the current block or whether non-separable transformation is applied to neighboring blocks.
  • the size of the current block can be defined as width, height, maximum/minimum value of width and height, sum of width and height, or product of width and height.
  • inverse transformation can be divided into separate transformation and non-separate transformation.
  • Separate transformation means performing transformation separately in the horizontal and vertical directions for a 2D block
  • non-separate transformation means performing one transformation on the samples that make up the entire or partial region of the 2D block. can do.
  • separate transformation it can be expressed as a pair of a horizontal transformation kernel and a vertical transformation kernel, and in this disclosure, it is expressed as (horizontal transformation kernel, vertical transformation kernel).
  • Each transformation set may include one or more transformation kernel candidates.
  • a transform kernel may refer to one transform (e.g., DCT-2, DST-7) or two transform pairs (e.g., (DCT-2, DCT-2)). It may be possible.
  • a non-separable transformation applied as a primary transformation can be expressed as Non-Separable Primary Transform (NSPT).
  • NSPT Non-Separable Primary Transform
  • a plurality of non-separated transform sets may be configured, and each non-separated transform set may include one or more transform kernels as transform kernel candidates.
  • one of a plurality of non-separable transformation sets is selected depending on the intra prediction mode, and the plurality of non-separable transformation sets for NSPT can be expressed as an NSPT set list. This is the same as previously discussed, and detailed explanation will be omitted here.
  • a group of one or more transform sets for which the current block is available can be formed from a plurality of pre-defined transform sets.
  • the group of one or more transformation sets may be composed of units of a predetermined area to which the current block belongs, and will hereinafter be referred to as a collection.
  • the predetermined area unit may be at least one of a picture, a slice, a coding tree unit row (CTU row), or a coding tree unit (CTU).
  • a set of transforms consisting of (DCT-2, DCT-2) can be called S 1 , (DST-7, DST-7), (DCT-8, DST-7), (DST-7, DCT-8)
  • the transformation set consisting of (DCT-8, DCT-8) will be called S 2 , respectively.
  • the above-described NSPT set list may include N non-separable transformation sets, and the N non-separable transformation sets will be called S 3,1 , S 3,2 , ..., S 3,N, respectively.
  • N may be 35, but is not limited thereto.
  • the transform kernel applicable to the current block may belong to any of S 1 , S 2 , or S 3,13 there is.
  • the collection for which the current block is available can be expressed as ⁇ S 1 , S 2 , S 3,13 ⁇ .
  • the collection since the collection according to the present disclosure is a group of one or more transformation sets for which the current block is available, the collection may be configured differently depending on the context of the current block.
  • a collection may be constructed based on the context of the current block, and at this time, the 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. This can be done.
  • selection of the transformation set and transformation kernel candidate may be performed implicitly based on the context of the current block, or may be performed based on an explicitly signaled index.
  • the process of selecting one of a plurality of transformation sets belonging to the collection and the process of selecting one of a plurality of transformation kernel candidates belonging to the selected transformation set may be performed separately.
  • the index for selecting a transformation set is signaled first, and based on this, one of a plurality of transformation sets belonging to the collection can be selected.
  • an index indicating any one of a plurality of transformation kernel candidates belonging to the transformation set may be signaled, and any one transformation kernel candidate may be selected from the transformation set based on the signaled index.
  • the transformation kernel of the current block may be determined based on the selected transformation kernel candidate.
  • selection of any one transformation set from the collection may be performed implicitly based on the context of the current block, and selection of any one transformation kernel candidate from the selected transformation set may be performed based on a signaled index.
  • selection of any one transformation set from the collection may be performed based on a signaled index, and selection of any one transformation kernel candidate from the selected transformation set may be implicitly performed based on the context of the current block.
  • selection of any one transformation set from the collection may be performed implicitly based on the context of the current block, and selection of any one transformation kernel candidate from the selected transformation set may also be performed implicitly 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 conversion kernel candidates belonging to the current collection may be signaled.
  • the process of selecting any one transformation set from the collection can be omitted.
  • all transformation sets belonging to the collection can be rearranged considering priority. For example, when allocating a small-length binary code to a small-valued index, such as a truncated unary code, it may be advantageous to allocate a small-valued index to a conversion kernel candidate that is more advantageous for improving coding performance.
  • shuffling all transformation kernel candidates in a collection according to priority different shuffling can be applied to each collection. Additionally, rather than rearranging all conversion kernel candidates in the collection, only some can be selectively rearranged.
  • the transformation kernel for inverse transformation of the current block may be determined based on Multiple Transform Selection (MTS).
  • 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 transformation kernel. Additionally, the MTS according to the present disclosure may further include a DCT-2 conversion kernel.
  • multiple MTS sets for an MTS may be defined. Based on the size and/or intra prediction mode of the current block, one of a plurality of MTS sets may be determined. For example, in determining one MTS set, the size of 16 transform blocks can be considered, and for directional mode, the shape of the transform block and symmetry between intra prediction modes can be considered. For WAIP (Wide Angle Intra Prediction) mode (i.e. -1 to -14 (or -15), 67 to 80 (or 81)), -1 to -14 (or - For mode 15), the MTS set corresponding to mode 2 can be applied, and for modes 67 to 80 (or 81), the MTS set corresponding to mode 66 can be applied. A separate MTS set may be allocated for Matrix-based Intra Prediction (MIP) mode.
  • MIP Matrix-based Intra Prediction
  • the MTS set according to the transform block size and intra prediction mode can be allocated/defined as shown in Table 4 below.
  • Table 4 shows the allocation of MTS sets according to 16 transformation block sizes and intra prediction modes.
  • the number of pre-defined MTS sets is 80, and the index indicating any one of the 80 MTS sets can range from 0 to 79 as shown in Table 4.
  • Table 5 shows conversion kernel candidates included in each MTS set examined in Table 4.
  • Each MTS set may consist of six transformation kernel candidates.
  • the conversion kernel candidate index has a value between 0 and 5, and may indicate one of the six conversion kernel candidates.
  • each transformation kernel candidate may be a combination of a horizontal transformation kernel and a vertical transformation kernel for separate transformation, and 25 transformation kernel candidates with indices of 0 to 24 may be defined.
  • Table 6 is an example of the 25 conversion kernel candidates examined in Table 5.
  • the horizontal transformation and vertical transformation of the transformation kernel candidate are expressed as (horizontal transformation, vertical transformation).
  • the horizontal/vertical transformation when the intra prediction mode is less than 35 may be opposite to the horizontal/vertical transformation when the intra prediction mode is 35 or more.
  • a mode symmetrical around mode 34 can be derived, and an MTS set from Table 4 above can be selected based on the mode. Additionally, symmetry of the block shape can be additionally considered. If the original transform block has size WxH, the original transform block is symmetrically considered to have size HxW, and an MTS set can be selected from Table 4.
  • the value of the intra prediction mode may be the value of the modified intra prediction mode.
  • a mode value for WAIP -14 (or -15) to -1 are modified to mode 2
  • 67 to 80 (or 81) are modified to mode 66
  • the remaining modes are modified to mode 2.
  • the value of the original intra prediction mode can be set to the value of the modified intra prediction mode.
  • the extended modes for WAIP are also configured symmetrically around mode 34, symmetry around mode 34 can be used for all directional modes except planar mode and DC mode.
  • the MTS set with an index of 72 may be selected, as defined in Table 4.
  • the MTS set assigned to MIP mode may be selected based on the size of the current block without considering the symmetry of the block shape.
  • the MTS set allocated to the MIP mode may be selected based on the symmetric block size.
  • 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.
  • a flag indicating whether MIP mode is applied as transpose mode can be used. If MIP mode is applied to the current block of MxN and the flag indicates application of transpose mode, the intra prediction mode may be considered Planar mode, and the current block of MxN may be regarded as an NxM block. That is, from Table 4, the MTS set corresponding to the NxM block size and Planar mode can be selected. As seen in Table 6, if the value of the intra prediction mode is 35 or higher, the horizontal and vertical transformations are swapped. However, since the intra prediction mode of the current block is considered Planar mode, the horizontal and vertical transformations of the transformation kernel candidate are not swapped. It may not be possible.
  • the intra prediction mode is not considered a Planar mode, and the current block of MxN may be considered an NxM block. That is, from Table 4, an MTS set corresponding to the block size of NxM and MIP mode may be selected.
  • the transform kernel candidate selected by the transform kernel candidate index may be set as the transform kernel of the current block.
  • at least one of the horizontal transformation or 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 height of the current block are 16 or less, at least one of the horizontal transformation or vertical transformation of the transformation kernel candidate corresponding to the transformation kernel candidate index of 3 is performed by another transformation kernel. can be changed. At this time, horizontal transformation and vertical transformation can be changed independently of each other.
  • the vertical transformation of the selected transformation kernel candidate may be changed to IDT (identity transformation). If the difference (or absolute value of the difference) between the intra prediction mode value of the current block and the vertical mode value is less than or equal to a predetermined threshold, the horizontal transformation of the selected transformation kernel candidate may be changed to IDT (identity transformation).
  • the threshold value can be determined as shown in Table 7 below based on the width and height of the current block.
  • Table 7 is for changing the horizontal transformation and/or vertical transformation of the transformation kernel candidate selected by the transformation kernel candidate index to another transformation kernel, and defines a threshold according to the size of the transformation block.
  • the six transformation kernel candidates constituting one MTS set can be distinguished by a transformation kernel candidate index of 0 to 5 as defined in Table 5.
  • the corresponding conversion kernel candidate index may be signaled through a bitstream.
  • a flag (MTS enabled flag or MTS flag) indicating availability/application of the MTS set may be signaled, and if the flag indicates availability/application of the MTS set, a conversion kernel candidate index may be signaled.
  • the MTS flag may consist of one bin, and one or more contexts for CABAC-based entropy coding (hereinafter referred to as CABAC context) may be assigned to the bin. For example, different CABAC contexts may be allocated for non-MIP mode and MIP mode.
  • the number of transformation kernel candidates available for the current block may be set differently.
  • the sum of the absolute values of all or some transform coefficients in the current block may be considered.
  • the sum of the absolute values of the corresponding transformation coefficients will be referred to as AbsSum. If AbsSum is less than or equal to T1, only one transform kernel candidate corresponding to a transform kernel candidate index of 0 may be available. If AbsSum is greater than T1 and less than or equal to T2, four transform kernel candidates corresponding to transform kernel candidate indices of 0 to 3 may be available. If AbsSum is greater than T2, 6 transform kernel candidates corresponding to transform kernel candidate indices from 0 to 5 may be available.
  • T1 may be 6 and T2 may be 32, but this is only an example.
  • AbsSum is less than or equal to T1
  • the number of transformation kernel candidates available for the current block is 1, so without signaling the transformation kernel candidate index
  • the transformation kernel candidate corresponding to the transformation kernel candidate index of 0 is used for transformation of the current block.
  • AbsSum is greater than T1 and less than or equal to T2
  • four transformation kernel candidates are available, so any one of the four transformation kernel candidates can be selected based on the transformation kernel candidate index with two bins. That is, conversion kernel candidate indices of 0 to 3 may be signaled as 00, 01, 10, and 11, respectively. For the two bins, the Most Significant Bit (MSB) may be signaled first, and the Least Significant Bit (LSB) may be signaled later.
  • MSB Most Significant Bit
  • LSB Least Significant Bit
  • a different CABAC context can be assigned to each bean. For example, for two bins, a different CABAC context than the CABAC context allocated for the MTS flag can be assigned to each bin. Alternatively, CABAC context may not be assigned to the two bins and bypass coding may be applied.
  • AbsSum is greater than T2
  • the conversion kernel candidate index has a value of 0 to 5, so the conversion kernel candidate index cannot be expressed with only two bins.
  • the conversion kernel candidate index can be expressed by allocating two or more bins.
  • a CABAC context may be allocated, or bypass coding may be applied without allocation of a CABAC context.
  • a CABAC context may be allocated to some of the plurality of bins (for example, the first bin, or the first and second bins), and bypass coding may be applied to the remaining bins.
  • the transform kernel of the current block may be determined based on a transform set including one or more transform kernel candidates.
  • the transform kernel of the current block may be derived from one of one or more transform kernel candidates belonging to the transform set.
  • the process of determining the transform kernel of the current block may include at least one of the following: 1) determining the transform set of the current block or 2) selecting one transform kernel candidate from the transform set of the current block.
  • the process of determining the transform set may be a process of selecting one of a plurality of transform sets that are identically predefined for the encoding device and the decoding device.
  • the process of determining the transform set may include configuring one or more transform sets available to the current block among a plurality of transform sets that are pre-defined in the encoding device and the decoding device, and selecting one of the configured transform sets. It may be a process of selection.
  • the process of determining the transform set may be a process of configuring a transform set based on a transform kernel candidate available to the current block among a plurality of transform kernel candidates pre-defined equally for the encoding device and the decoding device. there is.
  • the transformation set of the current block includes a plurality of transformation kernel candidates
  • a process of selecting one of the plurality of transformation kernel candidates for the current block may be performed.
  • the transformation set of the current block includes one transformation kernel candidate (that is, when the current block has one available transformation kernel candidate)
  • 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 refer to the (non-separated) transform set in Embodiment 1 described above, or the MTS set in Embodiment 2.
  • the transform set may be defined separately from the (non-separated) transform set of Example 1 or the MTS set of Example 2.
  • the transformation set may include one or more specific transformation kernels as transformation kernel candidates.
  • One specific transformation kernel may be defined as a pair of a transformation kernel for horizontal transformation and a transformation kernel for vertical transformation, or may be defined as one transformation kernel that applies equally to horizontal and vertical transformation. Below, we will look at specific conversion kernels in detail.
  • the specific conversion kernel according to the present disclosure may be a conversion kernel that is pre-defined equally for the encoding device and the decoding device.
  • the specific transformation kernel may further include a transformation kernel derived based on the pre-defined transformation kernel.
  • a specific transform kernel may mean a transform kernel with a predetermined index within the (non-separated) transform set of Embodiment 1 or the MTS set of Embodiment 2 described above.
  • the specific transformation kernel may be defined as a combination of trigonometric function-based transformation kernels (e.g., DCT-2, DST-7, DCT-8, DCT-5, DST-4, DST-1).
  • the specific transformation kernel may be defined as a combination of transformation kernels based on non-trigonometric functions.
  • examples of non-trigonometric function-based transformation kernels may include KLT, SOT, orthogonal transform kernel, and non-orthogonal transform kernel.
  • KLT can also be expressed as a transformation kernel trained with training feature data, that is, a train-based transformation kernel.
  • the specific transformation kernel may be defined as a combination of a trigonometric function-based transformation kernel and a non-trigonometric function-based transformation kernel.
  • a specific transformation kernel is denoted as (T_h, T_v).
  • T_h is a horizontal transformation kernel and may be a train-based transformation kernel such as KLT.
  • T_v is a vertical transformation kernel and may be a trigonometric function-based transformation kernel such as DCT-2.
  • T_h may be KLT and T_v may be DST-7.
  • DST-7 and DCT-2 are allowed as T_h, and KLT 1 and KLT 2 corresponding to KLT are allowed as T_v, four specific conversion kernels can be defined as a combination of the allowed conversion kernels.
  • the specific transform kernel or the transform set based on the specific transform kernel can be used in a way that replaces the (non-separate) transform set of Embodiment 1 and/or the MTS set of Embodiment 2. Alternatively, it may be added as a transform set independent of the (non-separated) transform set of Example 1 and/or the MTS set of Example 2.
  • a flag indicating whether to apply a transformation set based on a specific transformation kernel may be defined. If the flag is a first value, a specific transformation kernel-based transformation set may be applied, and if the flag is a second value, the (non-separated) transformation set of Example 1 or the MTS set of Example 2 may be applied.
  • the flag may be signaled before a syntax element that specifies at least one transformation kernel candidate in the transformation set. For example, when the flag is the first value, a transformation set based on a specific transformation kernel may be applied, and an index indicating one of a plurality of specific transformation kernels belonging to the transformation set may be additionally signaled.
  • the (non-separated) transformation set of Example 1 or the MTS set of Example 2 may be applied, and an index indicating one of a plurality of transformation kernel candidates (i.e., transformation kernel candidate index) may be signaled additionally.
  • the specific transform kernel may be applied only to the luminance component of the current block, or may be applied to both the luminance component and the chrominance component of the current block.
  • a specific transformation kernel according to the present disclosure may be defined as a length-based transformation kernel. That is, a specific transformation kernel may be one or more transformation kernels with a predetermined length.
  • a transformation kernel with a length of K is referred to as a length-K transformation kernel.
  • K may be at least one of the integers 4, 8, 16, 32, 64, or more.
  • the length may mean the length of one side (width and/or height) that the transform block can have.
  • the width that a transform block can have may be referred to as an allowable width (s)
  • the height that a transform block can have may be referred to as an allowable height (s).
  • a length-to-M transformation kernel with a length equal to the width of the current block in the horizontal direction is applied, and a length-to-N transformation with a length equal to the height of the current block in the vertical direction. Kernel can be applied.
  • Separate transformation can be applied to MxN blocks of all sizes by allocating transformation kernels for each length. For example, if the current block is 4xN, a length-4 transformation kernel with a length equal to the width of the current block in the horizontal direction may be applied. If the current block is Nx4, a length-4 conversion kernel with a length equal to the height of the current block in the vertical direction can be applied.
  • N may be an integer of 4, 8, 16, 32, 64 or more.
  • the length-specific transformation kernel may be configured differently for the horizontal and vertical directions. That is, the length-4 horizontal transformation kernel and the length-4 vertical transformation kernel may be different from each other. If the number of allowable widths of transform blocks is P and the number of allowable widths of transform blocks is Q, one transform set may be composed of (P+Q) length-based transform kernels. For example, if the allowable width and allowable height of a transform block are 4, 8, 16, and 32, respectively, then for the horizontal and vertical directions, there are length-4 transform kernels, length-8 transform kernels, length-16 transform kernels, and length -32 A conversion kernel may be available. In this case, the P value and Q value are each 4, and one transformation set can be constructed based on a total of 8 length-based transformation kernels.
  • the eight length-based transformation kernels are: length-4 horizontal transformation kernel, length-8 horizontal transformation kernel, length-16 horizontal transformation kernel, length-32 horizontal transformation kernel, length-4 vertical transformation kernel, length-8 vertical transformation kernel. It can be a transform kernel, a length-16 vertical transform kernel, and a length-32 vertical transform kernel.
  • the transform kernel applied to the current block may be different depending on the size of the current block.
  • the size of the current block can be defined as any of the width, height, sum of width and height, product of width and height, or maximum/minimum value of width and height.
  • a length-M horizontal transformation kernel may be allocated for each allowable height of the transformation block.
  • a length-N vertical transform kernel can be assigned for each allowable width of the transform block.
  • M and N can both have values of 4, 8, 16, and 32
  • a length-4 horizontal transform kernel applied to a 4x8 block may be different from a length-4 horizontal transform kernel applied to a 4x16 block.
  • the allowable width and allowable height of the transform block may be divided into a plurality of groups, and the same length-based transform kernel may be assigned to each group.
  • the allowable width and allowable height of the transform block may be divided into two groups based on a predetermined threshold.
  • a first length-M horizontal transformation kernel can be allocated, and when the N value is greater than the first threshold, a second length-M horizontal transformation kernel can be allocated.
  • the first length-M horizontal transformation kernel and the second length-M horizontal transformation kernel have the same length, but may be different transformation kernels.
  • the first threshold may be an integer of 8, 16, or more.
  • the first length-N vertical transformation kernel can be assigned, and if the M value is greater than the second threshold, the second length-N vertical transformation kernel can be assigned.
  • the first length-N vertical transformation kernel and the second length-N vertical transformation kernel have the same length, but may be different transformation kernels.
  • the second threshold may be an integer of 8, 16, or more.
  • the allowable width and allowable height of the transform block may be divided into three or more groups based on at least two threshold values.
  • the allowable width and allowable height of the transformation block are 4, 8, 16, and 32, and that they are divided into three groups, namely ⁇ 4, 8 ⁇ , ⁇ 16 ⁇ , and ⁇ 32 ⁇ .
  • the first length-M horizontal transformation kernel can be assigned.
  • the N value is 16
  • a second length-M horizontal transformation kernel can be assigned.
  • a third length-M horizontal transformation kernel can be assigned.
  • the M value is 4 and 8
  • the first length-N vertical transformation kernel can be assigned.
  • a second length-N vertical transformation kernel can be assigned. If the M value is 32, a third length-N vertical transformation kernel can be assigned. In this way, any one of the first to third length-M horizontal transformation kernels may be applied depending on the height of the current block, and any one of the first to third length-N vertical transformation kernels may be applied depending on the width of the current block. You can.
  • Nine specific transformation kernels can be configured through a combination between the above-described first to third length-M horizontal transformation kernels and the first to third length-N vertical transformation kernels, and one transformation set for the current block is the above. It can consist of nine specific transformation kernels.
  • the length-specific transformation kernel may not be configured for the horizontal and vertical directions, respectively. That is, regardless of the horizontal and vertical directions, a transformation kernel with a length corresponding to the corresponding width or height can be applied.
  • the length-4 transformation kernel applied to the horizontal direction of a 4x8 block and the length-4 transformation kernel applied to the vertical direction of an 8x4 block may be the same.
  • a length-M transformation kernel with the same length is applied to one side of length M, one transformation is performed for each of the lengths of the allowable width and/or the allowable height of the transform block. Only the kernel may be requested.
  • the allowable width or allowable height of the transform block is 4, 8, 16, and 32, one transform set can be constructed based on four length-based transform kernels.
  • the four length-based transformation kernels may be a length-4 transformation kernel, a length-8 transformation kernel, a length-16 transformation kernel, and a length-32 transformation kernel.
  • the current block is an MxN block
  • a length-M conversion kernel may be applied in the horizontal direction
  • a length-N conversion kernel may be applied in the vertical direction.
  • the length-based transformation kernel may be limited, or the number of length-based transformation kernels available to the current block may be different.
  • the length-based conversion kernel is a non-trigonometric function-based conversion kernel such as the KLT described above, but is not limited thereto.
  • a non-trigonometric function-based transformation kernel may be applied to the direction of a side with a specific length, and a trigonometric function-based transformation kernel may be applied to other lengths.
  • the specific length may be determined based on the same pre-defined length for the encoding device and the decoding device.
  • a non-trigonometric function-based transformation kernel may be applied to either the horizontal direction or the vertical direction, and a trigonometric function-based transformation kernel may be applied to the other direction.
  • a non-trigonometric function-based transformation kernel is applied to that side, otherwise, a trigonometric function-based transformation kernel is applied to that side. You can.
  • a non-trigonometric function-based transformation kernel may be applied to the side, and otherwise, a trigonometric function-based transformation kernel may be applied to the side.
  • a non-trigonometric function-based transformation kernel may be applied to that side. Otherwise, a trigonometric function-based transformation kernel may be applied to that side. .
  • a non-trigonometric function-based transformation kernel may be applied to the side, and otherwise, a trigonometric function-based transformation kernel may be applied to the side.
  • a non-trigonometric function-based transformation kernel is restricted from being applied to a side of length p, for a block where one of the width or height is p and the other is not p, the following two There are several methods to consider.
  • the first non-trigonometric function-based conversion kernel is not applied to the direction with a length of p among width or height, and the non-trigonometric function-based conversion kernel is applied to the direction not having a length of p.
  • transformation kernels based on length-4 non-trigonometric functions may be restricted from being applied.
  • the length-4 non-trigonometric function-based transformation kernel is not applied to the direction of the side with a length of 4, and the length-4 trigonometric function-based transformation kernel is not applied.
  • a non-trigonometric function-based conversion kernel corresponding to the length may be applied.
  • a transformation kernel based on a length-4 non-trigonometric function may not be applied to a 4x4 block.
  • a non-trigonometric function-based transformation kernel corresponding to that length can be applied only to sides whose length is not 4.
  • a non-trigonometric function-based transformation kernel corresponding to the corresponding length in the horizontal and vertical directions is used. It can be applied.
  • a non-trigonometric function-based transformation kernel corresponding to the length can be applied only when both the width and height of the current block are greater than 4. In other words, if either the width or the height has a length of 4, the length-4 non-trigonometric function-based transformation kernel may not be applied to the horizontal and vertical directions.
  • length-4 and length-8 non-trigonometric function-based transformation kernels may be restricted from being applied.
  • the length-4 and length-8 non-trigonometric function-based transformation kernels are not applied to 4x4, 4x8, 8x4, and 8x8 blocks, and the length-4 and length-8 trigonometric function-based transformation kernels are not applied.
  • This can be applied.
  • a non-trigonometric function-based conversion kernel corresponding to that length can be applied only to the sides whose length is not 4 and 8.
  • a non-trigonometric function-based transformation kernel corresponding to the corresponding length can be applied in the horizontal and vertical directions.
  • the non-trigonometric function-based conversion kernel corresponding to the length is applied only when the width and height of the current block are both greater than 8 (e.g., 16x16, 16x32, 32x16, or 32x32 block, etc.) You can. In other words, if either the width or the height has a length of 4 or 8, transformation kernels based on length-4 and length-8 non-trigonometric functions may not be applied for the horizontal and vertical directions.
  • the length-32 non-trigonometric function-based transformation kernel may be restricted from being applied.
  • the length-32 non-trigonometric function-based transformation kernel may not be applied to the 32x32 block, but the length-32 trigonometric function-based transformation kernel may be applied.
  • a non-trigonometric function-based conversion kernel corresponding to that length can be applied only to sides whose length is not 32.
  • blocks of the remaining sizes e.g., 4x4, 4x8, 4x16, 8x4, 8x8, 8x16, 16x4, 16x8, 16x16
  • a non-trigonometric function-based transformation kernel corresponding to the corresponding length in the horizontal and vertical directions is used. It can be applied.
  • a non-trigonometric function-based transformation kernel corresponding to the length can be applied only when both the width and height of the current block are less than 32. That is, in the case of 4x32, 8x32, 16x32, 32x4, 32x8, 32x16, or 32x32 blocks, the length-32 non-trigonometric function-based transformation kernel may not be applied to the horizontal and vertical directions. For blocks of the remaining sizes (e.g., 4x4, 4x8, 4x16, 8x4, 8x8, 8x16, 16x4, 16x8, 16x16), a non-trigonometric function-based transformation kernel corresponding to the corresponding length is applied for the horizontal and vertical directions. You can.
  • the above-described embodiment can be adaptively performed based on the slice type of the current block.
  • the above-described example may apply when the slice type is I slice, and may not apply otherwise.
  • the first type of trigonometric function-based transformation kernel may be restricted from being applied to a specific length, and in this case, the second type of trigonometric function-based transformation kernel may be applied. That is, in the above-described embodiment, the non-trigonometric function-based transformation kernel and the trigonometric function-based transformation kernel are understood to be replaced by a first type of trigonometric function-based transformation kernel and a second type of trigonometric function-based transformation kernel. It can be.
  • the second type may be a heterogeneous conversion type different from the first type.
  • a transform set may be determined based on the context of the current block.
  • the transform set may be determined based on the intra prediction mode of the current block and may be composed of one or more transform kernel candidates.
  • the transform set of the present disclosure may be the (non-separated) transform set in Example 1 or the MTS set in Example 2.
  • the transform set of the present disclosure may include one or more length-based transform kernels with a predetermined length as transform kernel candidates.
  • mapping relationship between pre-defined intra prediction modes and transform sets can be defined.
  • the pre-defined intra prediction modes include planar mode, DC mode, directional mode, wide angle modes for WAIP, matrix-based intra prediction (MIP) mode, decoder-side intra mode derivation (DIMD) mode, Alternatively, it may include at least one of TIMD (template-based intra mode derivation) mode.
  • MIP matrix-based intra prediction
  • DIMD decoder-side intra mode derivation
  • TIMD template-based intra mode derivation
  • Each mode is assigned a mode value to identify the mode.
  • 0 and 1 are assigned to planar mode and DC mode, respectively, and 2 to 66 are assigned to directional mode, respectively.
  • Wide angle modes are assigned values less than 0 and values greater than 66, respectively.
  • a separate transform set may be mapped for each pre-defined intra prediction mode (or for each mode value).
  • the pre-defined intra prediction modes may be divided into at least two groups according to a predetermined rule, and a transformation set may be mapped for each group.
  • the predetermined rule may be any one of rules (1) to (7) described later, or a combination of at least the two.
  • Planar mode and DC mode can be grouped into one group.
  • Directional modes can be divided into a plurality of groups by grouping adjacent modes.
  • Wide angle modes can be grouped into one group.
  • modes with values less than 0 can be grouped into one group, and modes with values greater than 66 can be grouped into another group.
  • wide anlge modes like directional modes, can be divided into three or more groups by grouping adjacent modes.
  • wide angle modes less than 0 are angularly adjacent to mode 2, so wide angle modes less than 0 and mode 2 (or mode 2 and at least one directional mode adjacent to mode 2) (including) can be grouped into one group (Group A).
  • wide angle modes greater than 66 are angularly adjacent to mode 66, there must be one wide angle mode greater than 66 and one mode 66 (or at least one directional mode adjacent to mode 66 and mode 66). It can be grouped into groups (Group B). Group A and Group B may be merged into one group.
  • MIP mode it can be grouped into the same group as Planar mode, or a separate group can be formed with only MIP mode.
  • MIP mode may be considered Planar mode when mapping between intra prediction mode and transformation set.
  • a separate group can be formed with only the DIMD mode, or the intra prediction mode induced by the DIMD mode can be included in the group.
  • the intra prediction mode induced by the DIMD mode can be included in the group.
  • one of the plurality of intra prediction modes e.g., the first mode, the mode with the smallest value
  • the group to which it belongs may be included in the group to which it belongs.
  • a separate group can be formed with only the TIMD mode, or the intra prediction mode induced by the TIMD mode can be included in the group.
  • one of the plurality of intra prediction modes e.g., the first mode, the mode with the smallest value
  • the value of the intra prediction mode derived by the TIMD mode may be given based on 131 modes.
  • the mode value based on 131 modes can be converted to a mode value based on 67 modes. Any one value from 0 to 130 can be mapped/converted to any one value from 0 to 66 through the mapping function (MAP131TO67) according to Equation 4 below.
  • TIMD mode may be included in the group to which the changed mode value belongs.
  • Intra template matching mode it can be included in the group to which Planar mode belongs.
  • Intra template matching mode can be considered Planar mode when mapping between intra prediction mode and transformation set.
  • Intra prediction modes pre-defined according to the above-described rules may be divided into a plurality of groups, and a transformation set may be assigned to each group.
  • a mapping table that defines the transformation set assigned for each intra prediction mode (or for each group).
  • intra prediction modes especially directional modes
  • mode number 34 the mode symmetrical to mode p for an MxN block
  • mode symmetrical to mode q which is a wide angle mode
  • a block symmetrical to an MxN block may be an NxM block.
  • the mode corresponding to the r mode is called the s mode
  • the case where intra prediction is performed in the r mode for an MxN block and the case where intra prediction is performed in the s mode for an NxM block may have a symmetrical relationship.
  • the case where a length-M horizontal transformation kernel and a length-N vertical transformation kernel are applied to an MxN block are symmetrical to the case where a length-M vertical transformation kernel and a length-N horizontal transformation kernel are applied to an NxM block. You can.
  • the length-M horizontal transformation kernel of the MxN block and the length-M vertical transformation kernel of the NxM block can be set to be the same for the above two cases, and the length of the MxN block
  • the -N vertical transformation kernel and the length-N horizontal transformation kernel of NxM blocks can be set to be the same.
  • the intra prediction mode for an MxN block is a directional mode and a p mode greater than 34
  • a transform set mapped to the (68 - p) mode for an NxM block can be used.
  • the length-M vertical transformation kernel and length-N horizontal transformation kernel which are transformation kernel candidates belonging to the corresponding transformation set, can be used as the length-M horizontal transformation kernel and length-N vertical transformation kernel of the MxN block, respectively.
  • the transform set may include one or more transform kernel candidates, and the candidates selected among them may include a horizontal transform kernel and a vertical transform kernel.
  • the transform kernel candidates may be assigned to the lengths that one side of the transform block can have.
  • the transformation kernel of the MxN block predicted in r mode may be derived based on the symmetry between the intra prediction modes and/or block types described above. That is, the transformation set can be determined based on the s mode that is symmetrical to the r mode, and the transformation kernel of the current block can be derived from the transformation kernel candidate belonging to the transformation set.
  • the length-N horizontal transformation kernel from the transformation kernel candidate selected for the NxM block symmetrical to the MxN block can be applied as the length-N vertical transformation kernel for the MxN block.
  • a length-M vertical transformation kernel from a transformation kernel candidate selected for an NxM block symmetrical to an MxN block can be applied as a length-M horizontal transformation kernel for the MxN block.
  • the transformation set consists of length-based transformation kernels that are equally applied to the horizontal and vertical directions, the transformation kernel does not change as the horizontal transformation kernel is changed to the vertical transformation kernel.
  • a flag indicating whether prediction is performed in transpose may be defined, and the case where the flag is 0 may be symmetrical with the case where the flag is 1.
  • the length-M horizontal transformation kernel applied to the horizontal direction of the MxN block can be set to be the same as the length-M vertical transformation kernel applied to the vertical direction of the NxM block when the flag is 1. there is.
  • the horizontal transformation kernel and vertical transformation kernel to be applied to the MxN block may be set to the horizontal transformation kernel and vertical transformation kernel of the NxM block, respectively.
  • the horizontal and vertical transformation kernels to be applied to the MxN block are DST-7 and DCT-5, respectively. can be set. Only the conversion type is the same, and the length of the conversion kernel may be different. That is, length-N DST-7 can be applied as the horizontal transformation kernel in an NxM block, while length-M DST-7 can be applied as a horizontal transformation kernel in an MxN block.
  • a non-trigonometric function-based conversion kernel e.g., train-based conversion kernel
  • the application of the non-trigonometric function-based conversion kernel is the same, but other Since the length conversion kernel is applied, a different non-trigonometric function-based conversion kernel can be applied for each direction to the MxN block and NxM block.
  • the horizontal transformation kernel and vertical transformation kernel specified in the corresponding transformation set can be used as is.
  • One or more specific transformation kernels may be configured for the current block.
  • One or more transformation sets for the current block may be configured based on the one or more specific transformation kernels.
  • the transformation kernel of the current block may be determined based on at least one of a plurality of specific transformation kernels.
  • the horizontal transformation kernel (T_h) and the vertical transformation kernel (T_v), a non-trigonometric function-based transformation kernel such as KLT or a trigonometric function-based transformation kernel such as DCT-2 or DST-7 is used. It can be.
  • T_h is said to be a length-p horizontal transformation kernel
  • T_v is said to be a length-q vertical transformation kernel. If p and q are the same, T_h and T_v may be the same transformation kernel. Alternatively, even if p and q are the same, the horizontal transformation kernel may be a different kernel from the vertical transformation kernel.
  • the specific transformation kernel may include a predetermined reference transformation kernel. Additionally, the specific transformation kernel may include a transformation kernel derived based on the reference transformation kernel (hereinafter referred to as a derived transformation kernel).
  • the derived transformation kernel can be generated through pairing the reference transformation kernel and the trigonometric function-based transformation kernel.
  • the reference transform kernel is used to derive the derived transform kernel and may not be included in the specific transform kernel.
  • This specific transformation kernel can be used as a candidate transformation kernel for the current block.
  • the reference transformation kernel may be a non-trigonometric function-based transformation kernel.
  • the reference transformation kernel is assumed to be KLT and is denoted as (KLT_h, KLT_v).
  • the reference transform kernel (KLT_h, KLT_v) may be paired with DCT-2, in which case the specific transform kernel may be (KLT_h, KLT_v), (KLT_h, DCT-2), or (DCT-2, It may include at least one of KLT_v).
  • the reference conversion kernel (KLT_h, KLT_v) may be paired with DST-7, in which case the specific conversion kernel is (KLT_h, KLT_v), (KLT_h, DST-7), or (DST-7, KLT_v) It may include at least one of:
  • three transform kernel candidates from one transform kernel can constitute one transform set.
  • one transformation set may be configured that includes one or more transformation kernel candidates generated through pairing with DCT-2, and includes one or more transformation kernel candidates generated through pairing with DST-7.
  • Another set of transformations may be constructed.
  • one of the two transform sets may be selected based on the intra prediction mode of the current block, and one of the transform kernel candidates may be selected from the corresponding transform set.
  • an index indicating the corresponding transformation kernel candidate may be signaled, or one transformation kernel candidate may be implicitly selected based on the context of the current block.
  • the reference transformation kernel may be the first transformation kernel candidate in the MTS set of Example 2 described above.
  • the first conversion kernel candidate in the MTS set is denoted as (AMTS_h, AMTS_v).
  • the reference transform kernel (AMTS_h, AMTS_v) may be paired with DCT-2, in which case the specific transform kernel may be (AMTS_h, AMTS_v), (AMTS_h, DCT-2), or (DCT-2, AMTS_v) may be included.
  • the reference conversion kernel (AMTS_h, AMTS_v) may be paired with DST-7, in which case the specific conversion kernel is (AMTS_h, AMTS_v), (AMTS_h, DST-7), or (DST-7, AMTS_v) It may include at least one of:
  • the reference conversion kernel (AMTS_h, AMTS_v) may be paired with DST-4, in which case the specific conversion kernel is (AMTS_h, AMTS_v), (AMTS_h, DST-4), or (DST-4, AMTS_v) It may include at least one of:
  • the three specific transformation kernels determined through pairing with DCT-2 can be different transformation kernel candidates.
  • the (AMTS_h, AMTS_v) overlaps with the first conversion kernel candidate of the MTS set. .
  • a flag can be introduced to distinguish between conversion based on a specific conversion kernel and conversion based on the MTS set.
  • (AMTS_h, AMTS_v) can be included in a specific conversion kernel.
  • (AMTS_h, AMTS_v) may be excluded from a specific conversion kernel. In this case, either (AMTS_h, DCT-2) or (DCT-2, AMTS_v) can be selected, and an index consisting of one bin can be used for this selection.
  • AMTS_h or AMTS_v of the reference conversion kernel is DST-7 (or DST-4)
  • the conversion kernel derived through pairing with DST-7 (or DST-4) may overlap with the reference conversion kernel (AMTS_h, AMTS_v).
  • the (AMTS_h, AMTS_v) overlaps with the first conversion kernel candidate of the MTS set. do.
  • (AMTS_h, AMTS_v) may be included in a specific conversion kernel
  • (AMTS_h, AMTS_v) may be excluded from a specific conversion kernel.
  • a specific transformation kernel may be configured. Ultimately, when only one transformation kernel candidate is available, the transformation kernel of the current block can be determined based on the corresponding transformation kernel candidate without signaling a separate index.
  • (DST-7, DST-7) may be an effective transformation kernel. Accordingly, (DST-7, DST-7) can be used as a reference transformation kernel, and at least one derived transformation kernel can be generated through pairing with DCT-2. For example, by pairing the reference transformation kernel (DST-7, DST-7) with DCT-2, at least one of (DST-7, DCT-2) or (DCT-2, DST-7) will be generated. You can.
  • the specific conversion kernel may include at least one of (DST-7, DST-7), (DST-7, DCT-2), or (DCT-2, DST-7).
  • (DST-7, DST-7) may overlap with the first transformation kernel candidate in the MTS set.
  • (DST-7, DST-7) can be included in a specific conversion kernel or excluded from a specific conversion kernel. If only (DST-7, DCT-2) and (DCT-2, DST-7) are determined to be specific conversion kernels, one bin is additionally signaled to select one of the two specific conversion kernels. It can be.
  • a transformation kernel for the direction of the side may be determined, and a specific transformation kernel may be generated based on the determined transformation kernel. For example, for each width and height of the current block, you can choose DST-7 if the length is greater than or equal to 4 and less than or equal to 16, and DCT-2 otherwise. If the current block is a 32x8 block, DCT2 is selected for the horizontal direction of the current block, DST-7 is selected for the vertical direction of the current block, and a specific transformation kernel of (DCT-2, DST-7) is generated. It can be.
  • the specific conversion kernel according to the present disclosure may further include a pre-defined default conversion kernel in addition to the specific conversion kernel according to Method 4 described above.
  • the pre-defined default transformation kernel may be the reference transformation kernel in at least one of methods 1 to 3 above. That is, the default transformation kernel may include at least one of a non-trigonometric function-based transformation kernel, the first transformation kernel candidate in the MTS set, or (DST-7, DST-7). If the default conversion kernel overlaps with the first conversion kernel candidate in the MTS set, the default conversion kernel may be included in a specific conversion kernel or may be excluded from the specific conversion kernel.
  • the specific transformation kernel according to Method 4 may be added after the default transformation kernel is added to the transformation set. If a specific transformation kernel according to Method 4 overlaps with the default transformation kernel, the specific transformation kernel according to Method 4 may not be added to the transformation set. Alternatively, a default transformation kernel may be added after a specific transformation kernel according to Method 4 is added to the transformation set. If a specific transformation kernel according to method 4 overlaps with the default transformation kernel, the default transformation kernel may not be added to the transformation set.
  • the plurality of reference transformation kernels may include reference transformation kernels according to at least two of methods 1 to 3 above. If the number of reference transformation kernels available for the current block is N, the corresponding reference transformation kernels may be expressed as (T_h1, T_v1), (T_h2, T_v2), ..., (T_hN, T_vN).
  • each reference transformation kernel up to three specific transformation kernels (e.g., (T_hi, T_vi), (T_hi, DCT-2) can be configured through pairing with DCT-2, DST-7, or DST-4. ), (DCT-2, T_vi)) can be created, and some redundant conversion kernels can be removed.
  • the entire transformation kernel candidate can be formed.
  • (KLT_h1, KLT_v1) and (KLT_h2, KLT_v2) are used as (T_h1, T_v1), (T_h2, T_v2), each containing the following specific conversion kernels (1) to (4)
  • a set of transformations may be created.
  • one or more specific transformation kernels can be created through pairing with a trigonometric function-based transformation kernel such as DCT-2 or DST-7.
  • a trigonometric function-based transformation kernel such as DCT-2 or DST-7.
  • one or more specific transformation kernels may be generated based on each reference transformation kernel.
  • the corresponding reference transformation kernel may be included or the corresponding reference transformation kernel may not be included.
  • the number of transformation kernel candidates available to the current block may be different. For example, depending on the sum (AbsSum) of the absolute values of all or part of the transform coefficients in the current block, the number of transform kernel candidates available for the current block (or the size of the transform set) may be set differently. For convenience of explanation, in this example, it is assumed that the range of values that AbsSum can have is divided into three ranges, and that the maximum number of available conversion kernel candidates is three. Here, each conversion kernel candidate will be denoted as c1, c2, and c3, respectively.
  • the range of values that AbsSum can have is a first range (Range_1) in which the sum of the absolute values of the conversion coefficients is greater than or equal to 0 and less than or equal to 6, and a second range (Range_2) in which the sum of the absolute values ⁇ u200b ⁇ u200bof the conversion coefficients is greater than 6 and less than or equal to 32. ) and a third range (Range_3) in which the sum of the absolute values of the conversion coefficients is greater than 32.
  • the number/position of available conversion kernel candidates for each first and third range may be as shown in Table 16 below.
  • Range_1 Range_2 Range_3 Case 1 c1 c1, c2, c3 c1, c2, c3 Case 2 c1 c1 c1, c2, c3 Case 3 doesn't exist c1, c2, c3 c1, c2, c3 Case 4 doesn't exist c1 c1, c2, c3
  • the current block has 1.
  • the number of available conversion kernel candidates may be three (Case 1).
  • Range_1 if the sum of the absolute values of the transformation coefficients belongs to Range_1, there is no available transformation kernel candidate for the current block; otherwise (i.e., if it belongs to Range_2 or Range_3), there is no available transformation kernel candidate for the current block.
  • the number of can be 3 (Case 3).
  • the sum of the absolute values of the transform coefficients belongs to Range_1, there are no transform kernel candidates available for the current block, and if the sum of the absolute values of the transform coefficients belongs to Range_2, there are no transform kernel candidates available for the current block.
  • the number is 1, and if not (i.e., if it belongs to Range_3), the number of conversion kernel candidates available for the current block may be 3 (Case 4).
  • the corresponding transformation kernel candidate may be the candidate with the smallest index among the three transformation kernel candidates. If there are no transformation kernel candidates available for the current block, a transformation kernel other than the specific transformation kernel may be applied, or (inverse) transformation may be skipped.
  • the larger the sum of the absolute values of the transformation coefficients the more diverse statistical characteristics can be included in the transformation coefficient information, so the greater the number of specific transformation kernels. You can increase coding performance by allocating .
  • the smaller the sum of the absolute values of the transformation coefficients the simpler the statistical characteristics, so reducing the number of specific transformation kernels may be advantageous in terms of the trade-off between the signaling cost of the index and performance improvement.
  • the two specific transformation kernels can be reference transformation kernels using at least one of the above-described methods 1 to 3.
  • the two specific transform kernels may be specific transform kernels that have already been added to the transform set for the current block.
  • T_h, T_v transformation kernel for a current block of size MxN
  • length-M transformation kernels H1 and H2 may be used as T_h
  • length-N transformation kernels V1 and V2 may be used as T_v.
  • four specific transformation kernels such as (H1, V1), (H1, V2), (H2, V1), and (H2, V2) can be constructed.
  • a specific transformation kernel may be configured based on any one of methods 1 to 6, or a specific transformation kernel may be configured based on a combination of at least two of methods 1 to 6.
  • the transformation kernel of the current block may be determined based on any one of the four specific transformation kernels.
  • the index indicating one of the four specific conversion kernels may be signaled through a bitstream or may be implicitly derived based on the context of the current block.
  • a truncated unary code or a fixed-length code using two bins can be used as a binarization method for the index.
  • assigning an index using the fixed-length code it becomes 00, 01, 10, 11.
  • At least one of bypass coding or CABAC context-based coding may be applied to the corresponding bins.
  • T_h and T_v are two conversion kernels used, T_h and T_v, but is not limited to this.
  • p and q transformation kernels are available as T_h and T_v, respectively, up to (p*q) specific transformation kernels can be configured through their combination.
  • a transformation set can be constructed by selecting all or some of these (p*q) specific transformation kernels.
  • the index for selecting a specific transformation kernel from the corresponding transformation set may be signaled through a bitstream or may be implicitly derived based on the context of the current block.
  • a truncated unary code or a fixed-length code using two bins can be used as a binarization method for the index. When assigning an index using the fixed-length code, it becomes 00, 01, 10, 11. At least one of bypass coding or CABAC context-based coding may be applied to the corresponding bins.
  • the above-described (non-separated) transformation set or group (collection) of transformation sets may be defined in the encoding device and the decoding device together with the above-described MTS set, and any one of them may be selectively used.
  • a first flag may be signaled indicating whether a (non-separate) transform set is applied to the current block. If the first flag is a first value, the transform kernel of the current block may be determined based on a (non-separated) transform set, and if the first flag is a second value, the transform kernel of the current block may be determined based on the MTS set. there is.
  • a second flag indicating whether the collection is applied to the current block may be signaled. If the second flag is a first value, the transform kernel of the current block may be determined based on the collection, and if the second flag is a second value, the transform kernel of the current block may be determined based on the MTS set.
  • transformation set will be used, but this may be understood as being replaced with a non-separate transformation set.
  • the transform kernel of the current block may be determined based on one of a plurality of transform kernel candidates belonging to the transform set. At this time, an index for selecting one of a plurality of transformation kernel candidates belonging to the transformation set may be signaled.
  • the corresponding index is signaled as one bin. It can be.
  • the corresponding index may be signaled in various ways. Specifically, the following methods can be applied.
  • Method 1 If there are three transformation kernel candidates in the transformation set, the three transformation kernel candidates can be distinguished using an index consisting of two bins. Based on the first bin, one conversion kernel candidate and the remaining two conversion kernel candidates can be distinguished. For example, if the value of the first bin is 0, the one conversion kernel candidate is selected, and if the value of the first bin is 1, the second bin is signaled to select one of the remaining two conversion kernel candidates. It can be. Based on the second bin, one of the remaining two conversion kernel candidates can be specified.
  • the binarization method of the index may be truncated unary code. Since the one conversion kernel candidate classified based on the first bin can be designated as the shortest codeword, it may be the candidate that occurs most often or is most advantageous for improving coding performance. If the probability of occurrence of the one conversion kernel candidate is significantly high, a CABAC context may be allocated to code the first bin. When coding the second bin to select one of the remaining two conversion kernel candidates, if the difference in probability of occurrence between the remaining two conversion kernel candidates is large, a CABAC context may be assigned to the second bin as well.
  • (KLT_h, KLT_v) is used as the reference transform kernel (T_h, T_v) and paired with DCT-2
  • transform kernel candidates for the current block (KLT_h, KLT_v), (KLT_h, DCT-2) and (DCT-2, KLT_v)
  • the conversion kernel candidate (KLT_h, KLT_v) can be specified by the first bin, and either (KLT_h, DCT-2) or (DCT-2, KLT_v) can be specified by the second bin.
  • Method 2 If the number of transformation kernel candidates in the transformation set is the power of 2 (e.g., 4, 8, 16), the candidates are selected based on the fixed length code. can be distinguished. It may be advantageous to use a fixed-length code when the difference in probability of occurrence between transformation kernel candidates is not large. If the number of conversion kernel candidates is not a power of 2, a truncated unary code can be used, or a truncated binary code can be used, as in Method 1 above. At this time, coding performance can be improved by allocating short codes to conversion kernel candidates with a higher probability of occurrence.
  • the power of 2 e.g. 4, 8, 16
  • the number of transformation kernel candidates available for the current block may differ depending on the sum (AbsSum) of the absolute values of all or part of the transformation coefficients of the current block.
  • the range of values that AbsSum can have can be divided into a plurality of ranges. Depending on the range to which the AbsSum belongs, (a) the transform set is not applied, (b) the number of transform kernel candidates for which the current block is available in the transform set is 1, or (c) the current block is available in the transform set.
  • the number of available transform kernel candidates may be 2, or (d) the number of transform kernel candidates available for the current block in the transform set may be 3 or more. For example, this is as seen with reference to Table 16 in Example 5.
  • signaling of the first flag indicating whether the transform set is applied to the current block may be omitted.
  • the first flag can be derived as a second value, and the MTS set can be applied to the current block.
  • a first flag indicating whether the transform set is applied to the current block may be signaled.
  • the transform kernel of the current block may be determined based on one transform kernel candidate belonging to the transform set.
  • a first flag indicating whether a transform set is applied to the current block may be signaled, and an index indicating one of two transform kernel candidates may be signaled.
  • the index may consist of one bin.
  • a first flag indicating whether the transform set is applied to the current block is signaled, and an index indicating any one of three or more transform kernel candidates belonging to the transform set may be signaled.
  • the index may be signaled according to Method 1 described above.
  • the type and/or number of transformation kernel candidates available to the current block may be different based on the context of the current block. Therefore, the signaling method may vary depending on the context of the current block.
  • the number of conversion kernel candidates may be different depending on the AbsSum. If the number of conversion kernel candidates available for the current block is 1, signaling of the index to indicate the candidate may be omitted. If the number of transformation candidates available for the current block is 3, the index may be signaled according to Method 1 described above. Additionally, if there is no transform kernel candidate available for the current block, signaling of the first flag indicating whether the transform set is applied to the current block may also be omitted.
  • a transform set is applied to the current block or whether an MTS set is applied to the current block can be derived.
  • signaling of the first flag indicating whether the transform set is applied to the current block may be omitted. For example, if the sum of the absolute values of all or part of the transform coefficients in the current block is less than or equal to 6, it is derived that the transform set is applied to the current block, and signaling of the first flag may be omitted.
  • One transformation set or an updated MTS set may be configured by combining the specific transformation kernel in the above-described embodiment and the transformation kernel candidate of the MTS set.
  • one or more specific conversion kernels may be added to the above-described MTS set.
  • one or more transformation kernel candidates in the MTS set may be added to one or more specific transformation kernels.
  • the transform kernel of the current block may be determined based on one of a plurality of transform kernel candidates in the combined transform set or the updated MTS set.
  • the number of transform kernel candidates available to the current block within the combined transform set or updated MTS set may be increased.
  • An index indicating one of a plurality of transformation kernel candidates in the combined transformation set or the updated MTS set may be signaled.
  • the index may be encoded based on a plurality of transformation kernel candidates in the combined transformation set or the updated MTS set.
  • the index may be derived implicitly based on the context of the current block without explicit signaling.
  • an MTS set for the current block may be selected based on at least one of the size of the current block or intra prediction mode (including MIP mode).
  • One or more specific conversion kernels described above may be added to the selected MTS set.
  • the specific conversion kernel may be added in front of the first conversion kernel candidate in the MTS set.
  • the specific transformation kernel may have an index smaller than the first transformation kernel candidate in the MTS set.
  • the specific conversion kernel may be added after the last conversion kernel candidate in the MTS.
  • the fact that the specific conversion kernel is added in front means that the priority of the specific conversion kernel may be higher than the conversion kernel candidate in the MTS set.
  • adding the specific conversion kernel later means that the priority of the specific conversion kernel may be lower than the conversion kernel candidate in the MTS set.
  • the transformation kernel candidates of the MTS set and the specific transformation kernel may be shuffled. For example, a method of arranging the transformation kernel candidates of the MTS set and the specific transformation kernel alternately may be used.
  • the conversion kernel candidate of the MTS set may be arranged first, or a specific conversion kernel may be arranged first.
  • how to suffice with the conversion kernel candidates of the MTS set, etc. are determined by determining the pre-selected MTS set (or the index of the pre-selected MTS set, the conversion kernel candidate belonging to the pre-selected MTS set). It may be determined based on at least one of the number) or the context of the current block.
  • All of the pre-derived/generated specific transformation kernels may have the MTS set added, or only some of them may selectively have the MTS set added. This may differ depending on at least one of the pre-selected MTS set (or the index of the pre-selected MTS set, the number of transform kernel candidates belonging to the pre-selected MTS set) or the context of the current block.
  • the number of transform kernel candidates available for the current block is smaller than the number of total transform kernel candidates belonging to the MTS set, so only a portion of the specific transform kernel can be used. Can be added to the MTS set. This is intended to use a small number of transformation kernel candidates because the statistical characteristics are less diverse compared to Range_3, so the number of specific transformation kernels added may be limited.
  • the AbsSum of the current block belongs to the Range_1 or Range_2 since the number of transform kernel candidates available in the MTS set is small, it may be advantageous to add more specific transform kernels to the MTS set. In this case, you can add all specific conversion kernels, or you can add more than the number available in Range_3.
  • the total number of transformation kernel candidates in the MTS set and specific transformation kernels added may be limited.
  • the total number may vary depending on at least one of the context of the current block or the pre-selected MTS set (or the index of the pre-selected MTS set, the number of transformation kernel candidates belonging to the pre-selected MTS set).
  • the total number of conversion kernel candidates available for Range_1 may be limited to 2, and in this case, the number of specific conversion kernels added may be limited to 1 or less.
  • the total number of conversion kernel candidates available for Range_2 may be limited to 6, and in this case, the number of specific conversion kernels added may be limited to 2 or less.
  • a fixed-length code or a truncated unary code can be used as a binarization method for an index indicating one of the total transformation kernel candidates.
  • the fixed-length code may be advantageous when the difference in probability of occurrence between candidates is not large, and the truncated unary code may be advantageous when the difference in probability of occurrence between candidates is large.
  • truncated binary code or truncated unary code may be used as a binarization method for the index.
  • Bypass coding or CABAC context-based coding may be applied to the bins generated through the binarization.
  • All or part of the conversion kernel candidates in the MTS set may be replaced with the specific conversion kernel.
  • the position/number of conversion kernel candidates in the replaced MTS set is the context of the current block or the pre-selected MTS set (or the index of the pre-selected MTS set, the number of conversion kernel candidates belonging to the pre-selected MTS set) It may differ depending on at least one of the following.
  • one transformation kernel candidate in the MTS set is available, and that one transformation kernel candidate can be replaced with one specific transformation kernel.
  • the total number of available transformation kernel candidates for Range_2 may be limited to 4, and in this case, three transformation kernel candidates can be filled with transformation kernel candidates in the MTS set, and the remaining one can be filled with a specific transformation kernel.
  • the specific transform kernel corresponding to the remaining one may be filled after the three transform kernel candidates from the MTS set or before the three transform kernel candidates from the MTS set.
  • a specific conversion kernel that is added overlaps with conversion kernel candidates in the MTS set.
  • that particular conversion kernel may be restricted from being added.
  • candidates overlapping with the specific conversion kernel may be removed, and the specific conversion kernel may be placed at a predetermined position instead.
  • the predetermined position may be the same as the converted kernel candidate to be removed, or may be before the first converted kernel candidate or after the last converted kernel candidate in the MTS set.
  • one transformation kernel candidate in the MTS set can be replaced with one specific transformation kernel.
  • one specific transformation kernel may be added before or after one transformation kernel candidate in the MTS set.
  • an index indicating one of the two conversion kernel candidates may be signaled. The index may consist of one bin.
  • one specific transformation kernel can be added before or after the four transformation kernel candidates in the MTS set.
  • three specific transformation kernels may be added before or after the four transformation kernel candidates in the MTS set.
  • the last candidate among the four transformation kernel candidates in the MTS set can be replaced with one specific transformation kernel.
  • the last candidate among the four transformation kernel candidates in the MTS set may be removed, and one specific transformation kernel may be added in front of the remaining three transformation kernel candidates in the MTS set, or may be added as the second transformation kernel candidate. You can.
  • the remaining candidates except for one of the transformation kernel candidates in the MTS set may be removed, and three specific transformation kernels may be added before or after the remaining one transformation kernel candidate.
  • one, two, or three specific transformation kernels may be added before or after the six transformation kernel candidates in the MTS set.
  • one specific transformation kernel may be added as a second transformation kernel candidate, and the remaining specific transformation kernels may not be added to the MTS set or may be added last.
  • one specific transformation kernel may be a candidate with the smallest index among a plurality of specific transformation kernels.
  • the last one (or two or three) of the transformation kernel candidates in the MTS set is removed, and one (or , two or three) specific transformation kernels can be added to the MTS set.
  • the specific added conversion kernel may be added to the position of the removed conversion kernel candidate, or may be added in front of the remaining conversion kernel candidate in the MTS set.
  • the transformation kernel candidates in the MTS set may be left as is, and two specific transformation kernels may be added before or after the transformation kernel candidates in the MTS set. .
  • the candidate located last among the conversion kernel candidates in the MTS set may be removed, and three or more specific conversion kernels may be added before or after the remaining conversion kernel candidates in the MTS set.
  • the transformation kernel of the current block may be determined based on any one of the above-described embodiments 1 to 6.
  • the transform kernel of the current block may be determined based on a combination of at least two of Examples 1 to 6, to the extent that the inventions according to Examples 1 to 6 described above do not conflict with each other.
  • 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 based on the intra prediction mode of the current block. Based on the prediction sample and residual sample of the current block, a restored sample of the current block can be generated.
  • FIG. 6 shows a schematic configuration of a decoding device 300 that performs the video decoding method according to the present disclosure.
  • the decoding device 300 may include a transform coefficient deriving unit 600, a residual sample deriving unit 610, and a restored block generating unit 620.
  • the transform coefficient deriving unit 600 may be configured in the entropy decoding unit 310 of FIG. 3
  • the residual sample deriving unit 610 may be configured in the residual processing unit 320 of FIG. 3
  • the restored block generating unit ( 620 may be configured in the adder 340 of FIG. 3.
  • the transform coefficient deriving unit 600 may obtain residual information of the current block from the bitstream, decode it, and derive the transform coefficient of the current block.
  • the residual sample deriving unit 610 may perform at least one of inverse quantization and inverse transformation on the transform coefficient of the current block to derive the residual sample of the current block.
  • the residual sample deriving unit 610 may determine a transform kernel for inverse transform of the current block through a predetermined transform kernel determination method and derive the residual sample of the current block based on this.
  • the method for determining the conversion kernel is the same as that seen with reference to FIG. 4, and detailed description will be omitted here.
  • the restored block generator 620 may restore the current block based on the residual sample of the current block.
  • FIG. 7 illustrates an image encoding method performed by the encoding device 200 as an embodiment according to the present disclosure.
  • the residual sample of the current block can be derived by differentiating prediction samples from the original samples of the current block.
  • the prediction sample may be derived based on a predetermined 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 kernel for the transformation may be determined based on at least one of the above-described embodiments 1 to 6.
  • one or more transform sets for transforming the current block may be defined/configured, and each transform set may include one or more transform kernel candidates.
  • one of the plurality of transform sets may be selected as the transform set of the current block. Any one of a plurality of transformation kernel candidates belonging to the transformation set of the current block may be selected. The selection may be performed implicitly based on the context of the current block. Alternatively, the optimal transformation set and/or transformation kernel candidate for the current block may be selected, and an index indicating this may be signaled.
  • the transformation kernel of the current block may be determined based on the MTS set. Based on at least one of the size of the current block or the intra prediction mode, one of a plurality of MTS sets may be selected.
  • the selected MTS set may include one or more transformation kernel candidates. Any one of the one or more transform kernel candidates may be selected, and the transform kernel of the current block may be determined based on the selected transform kernel candidate. Selection of the transform kernel candidate may be performed using a transform kernel candidate index derived based on the context of the current block. Alternatively, the optimal transform kernel candidate for the current block may be selected, and a transform kernel candidate index indicating the selected transform kernel candidate may be signaled.
  • the transform kernel of the current block may be determined based on a transform set consisting of one or more specific transform kernels.
  • the transform kernel of the current block may be determined based on a mapping table that defines the mapping relationship between intra prediction modes and transform sets.
  • the mapping table may be defined in consideration of symmetry between intra prediction modes and/or block types.
  • a specific transform kernel may be configured based on any one of Methods 1 to 6 or a combination of at least two, and the transform kernel of the current block may be determined from the configured specific transform kernel.
  • the transform kernel of the current block may be determined by selectively using any one of a (non-separated) transform set, a group of transform sets, or an MTS set. At least one of a flag or index for this may be defined and signaled. Additionally, you can add specific conversion kernels to the MTS set or MTS. By adding one or more transform kernel candidates in the set, a combined transform set or an updated MTS set for the current block can be constructed. The transform kernel of the current block may be determined based on either the transform kernel candidate from this combined transform set or the updated MTS set.
  • the transformation kernel of the current block may be determined based on a combination of at least two of Examples 1 to 6.
  • a bitstream can be generated by encoding the transform coefficient of the current block (S720).
  • residual information regarding the transform coefficient can be generated, and a bitstream can be generated by encoding the residual information.
  • FIG. 8 shows a schematic configuration of an encoding device 200 that performs the video encoding method according to the present disclosure.
  • the encoding device 200 may include a residual sample deriving unit 800, a transform coefficient deriving unit 810, and a transform coefficient encoding unit 820.
  • the residual sample inducing unit 800 and the transform coefficient inducing 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. You can.
  • the residual sample deriving unit 800 may derive the residual sample of the current block by differentiating the prediction sample from the original sample of the current block.
  • the prediction sample may be derived based on a predetermined intra prediction mode.
  • the transform coefficient deriving unit 810 may derive the transform coefficient of the current block by performing at least one of transformation or quantization on the residual sample of the current block.
  • the transform coefficient inducing unit 810 determines the transform kernel of the current block based on any one of the above-described embodiments 1 to 6 or a combination of at least two, and applies the transform kernel to the residual sample of the current block to obtain the transform coefficient. can be derived.
  • the transform coefficient encoding unit 820 may generate a bitstream by encoding the transform coefficient of the current block.
  • the methods are described based on a flowchart as a series of steps or blocks, 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 as described above. You can. Additionally, those skilled in the art will understand that the steps shown in the flowchart are not exclusive and that other steps may be included or one or more steps in the flowchart 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 may be implemented in software form, and the encoding device and/or decoding device according to the present document may be used to encode images, such as TVs, computers, smartphones, set-top boxes, and display devices. It may be included in the device that performs the processing.
  • the above-described method may be implemented as a module (process, function, etc.) that performs the above-described function.
  • Modules are stored in memory and can be executed by a processor.
  • Memory may be internal or external to the processor and may be connected to the processor by a variety of well-known means.
  • a processor may include an application-specific integrated circuit (ASIC), other chipset, logic circuitry, and/or data processing devices.
  • Memory may include read-only memory (ROM), random access memory (RAM), flash memory, memory cards, storage media, and/or other storage devices. That is, the embodiments described in this document may be implemented and performed on a processor, microprocessor, controller, or chip.
  • the functional units shown in each drawing may be implemented and performed on a computer, processor, microprocessor, controller, or chip.
  • information for implementation (ex. information on instructions) or algorithm may be stored in a digital storage medium.
  • the decoding device and the encoding device to which the embodiment(s) of the present specification are applied include a multimedia broadcasting transmission and reception device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video chat device, and video communication.
  • Real-time communication devices mobile streaming devices, storage media, camcorders, video on demand (VoD) service provision devices, OTT video (Over the top video) devices, Internet streaming service provision devices, three-dimensional (3D) video devices, VR (virtual reality) ) devices, AR (argumente reality) devices, video phone video devices, transportation terminals (ex.
  • OTT video (Over the top video) devices may include game consoles, Blu-ray players, Internet-connected TVs, home theater systems, smartphones, tablet PCs, and digital video recorders (DVRs).
  • DVRs digital video recorders
  • the processing method to which the embodiment(s) of the present specification are applied may be produced in the form of a program executed by a computer and stored in a computer-readable recording medium.
  • Multimedia data having a data structure according to the embodiment(s) of the present specification may also be stored in a computer-readable recording medium.
  • the computer-readable recording medium includes all types of storage devices and distributed storage devices that store computer-readable data.
  • the computer-readable recording media include, for example, Blu-ray Disk (BD), Universal Serial Bus (USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical media. May include a data storage device.
  • the computer-readable recording medium includes media implemented in the form of a carrier wave (eg, transmitted via the Internet).
  • the bitstream generated by the encoding method may be stored in a computer-readable recording medium or transmitted through a wired or wireless communication network.
  • embodiment(s) of this specification may be implemented as a computer program product by program code, and the program code may be executed on a computer by the embodiment(s) of this specification.
  • the program code may be stored on a carrier readable by a computer.
  • Figure 9 shows an example of a content streaming system to which embodiments of the present disclosure can be applied.
  • the content streaming system may broadly 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, generates a bitstream, and transmits it to the streaming server.
  • multimedia input devices such as smartphones, cameras, camcorders, etc. directly generate bitstreams
  • the encoding server may be omitted.
  • the bitstream may be generated by an encoding method or a bitstream generation method to which the embodiment(s) of the present specification is applied, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream. You can.
  • the streaming server transmits multimedia data to the user device based on user requests through a web server, and the web server serves as a medium to inform the user of what services are available.
  • the web server delivers it to a 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 in the content streaming system.
  • the streaming server may receive content from a media repository and/or 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 may store the bitstream for a certain period of time.
  • Examples of the user devices include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation, slate PCs, Tablet PC, ultrabook, wearable device (e.g. smartwatch, smart glass, head mounted display), digital TV, desktop There may be computers, digital signage, etc.
  • PDAs personal digital assistants
  • PMPs portable multimedia players
  • navigation slate PCs
  • Tablet PC ultrabook
  • wearable device e.g. smartwatch, smart glass, head mounted display
  • digital TV desktop There may be computers, digital signage, etc.
  • Each server in the content streaming system may be operated as a distributed server, and in this case, data received from each server may be distributedly processed.

Abstract

본 개시에 따른 영상 디코딩 방법 및 장치는, 현재 블록에 대한 변환 세트를 구성하고, 복수의 변환 커널 후보 중 어느 하나를 지시하는 변환 커널 후보 인덱스에 기초하여 변환 세트로부터 현재 블록의 변환 커널을 결정하며, 현재 블록의 변환 커널을 기반으로 현재 블록에 역변환을 수행하여 현재 블록의 레지듀얼 샘플을 유도하고, 현재 블록의 레지듀얼 샘플을 기반으로 현재 블록을 복원할 수 있다.

Description

영상 인코딩/디코딩 방법 및 장치, 그리고 비트스트림을 저장한 기록 매체
본 발명은 영상 인코딩/디코딩 방법 및 장치, 그리고 비트스트림을 저장한 기록 매체에 관한 것이다.
최근 HD(High Definition) 영상 및 UHD(Ultra High Definition) 영상과 같은 고해상도, 고품질의 영상에 대한 수요가 다양한 응용 분야에서 증가하고 있고, 이에 따라 고효율의 영상 압축 기술들이 논의되고 있다.
영상 압축 기술로 현재 픽쳐의 이전 또는 이후 픽쳐로부터 현재 픽쳐에 포함된 화소값을 예측하는 인터 예측 기술, 현재 픽쳐 내의 화소 정보를 이용하여 현재 픽쳐에 포함된 화소값을 예측하는 인트라 예측 기술, 출현 빈도가 높은 값에 짧은 부호를 할당하고 출현 빈도가 낮은 값에 긴 부호를 할당하는 엔트로피 부호화 기술 등 다양한 기술이 존재하고 이러한 영상 압축 기술을 이용해 영상 데이터를 효과적으로 압축하여 전송 또는 저장할 수 있다.
본 개시는, 현재 블록의 (역)변환을 위한 소정의 변환 세트를 구성하는 방법 및 장치를 제공하고자 한다.
본 개시는, 현재 블록에 대한 하나 또는 그 이상의 변환 커널 후보를 결정하는 방법 및 장치를 제공하고자 한다.
본 개시는, 현재 블록의 변환 커널에 관한 인덱스를 시그날링하는 방법 및 장치 제공하고자 한다.
본 개시에 따른 영상 디코딩 방법 및 장치는, 현재 블록에 대한 변환 세트를 구성하고, 상기 복수의 변환 커널 후보 중 어느 하나를 지시하는 변환 커널 후보 인덱스에 기초하여, 상기 변환 세트로부터 상기 현재 블록의 변환 커널을 결정하며, 상기 현재 블록의 변환 커널을 기반으로 상기 현재 블록에 역변환을 수행하여, 상기 현재 블록의 레지듀얼 샘플을 유도하고, 상기 현재 블록의 레지듀얼 샘플을 기반으로 상기 현재 블록을 복원할 수 있다. 여기서, 상기 변환 세트는, 현재 블록이 이용 가능한 복수의 변환 커널 후보를 포함할 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 변환 커널 후보 인덱스의 이진화는, 상기 변환 세트에 포함된 변환 커널 후보의 개수에 기초하여, truncated unary 코드 또는 고정 길이 코드 중 어느 하나로 결정될 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 변환 세트는, Multiple Transform Selection (MTS) 세트에 특정 변환 커널을 추가하여 구성될 수 있고, 여기서, 특정 변환 커널은, 기준 변환 커널 또는 상기 기준 변환 커널을 기반으로 유도되는 하나 또는 그 이상의 변환 커널 중 적어도 하나를 포함할 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 특정 변환 커널은, 상기 MTS 세트 내 첫번째 변환 커널 후보의 앞 또는 상기 MTS 세트 내 마지막 변환 커널 후보의 뒤에 추가될 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 MTS 세트 내 하나 또는 그 이상의 변환 커널 후보는, 상기 추가되는 특정 변환 커널에 의해 대체될 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 MTS 세트에 추가되는 특정 변환 커널의 개수는, 상기 현재 블록의 컨텍스트 또는 상기 MTS 세트 인덱스 중 적어도 하나에 기초하여 결정될 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 MTS 세트에 추가되는 특정 변환 커널의 개수는, 상기 현재 블록 내 전부 또는 일부 변환 계수의 절대값의 합에 기초하여 가변적으로 결정될 수 있다.
본 개시에 따른 영상 디코딩 방법 및 장치에 있어서, 상기 현재 블록이 이용 가능한 변환 커널 후보의 총 개수는, 상기 현재 블록의 컨텍스트 또는 MTS 세트 인덱스 중 적어도 하나에 따라 상이하게 설정될 수 있다.
본 개시에 따른 영상 인코딩 방법 및 장치는, 현재 블록에 대한 변환 세트를 구성하고, 상기 변환 세트 내 복수의 변환 커널 후보 중 어느 하나를 기반으로 상기 현재 블록의 변환 커널을 결정하며, 상기 현재 블록의 변환 커널을 기반으로 상기 현재 블록에 변환을 수행하여, 상기 현재 블록의 변환 계수를 유도하고, 상기 현재 블록의 변환 계수에 관한 레지듀얼 정보를 부호화할 수 있다. 여기서, 레지듀얼 정보는, 상기 복수의 변환 커널 후보 중 어느 하나를 지시하는 변환 커널 후보 인덱스를 포함하고, 상기 변환 세트는, 현재 블록이 이용 가능한 복수의 변환 커널 후보를 포함할 수 있다.
본 개시에 따른 디코딩 장치에 의하여 영상 디코딩 방법을 수행하도록 야기하는 인코딩된 비디오/영상 정보가 저장된 컴퓨터 판독 가능한 디지털 저장 매체가 제공된다.
본 개시에 따른 영상 인코딩 방법에 따라 생성된 비디오/영상 정보가 저장된 컴퓨터 판독 가능한 디지털 저장 매체가 제공된다.
본 개시에 따른 영상 인코딩 방법에 따라 생성된 비디오/영상 정보를 전송하는 방법 및 장치가 제공된다.
본 개시에 따르면, 다양한 변환 커널 후보를 포함한 변환 세트를 구성함으로써, 변환의 성능을 향상시킬 수 있다.
본 개시는, 삼각함수 기반의 변환 커널 외에 넌-삼각함수 기반의 변환 커널을 추가적으로 이용함으로써, 변환의 성능을 향상시킬 수 있다.
본 개시는, 현재 블록의 변환 커널에 관한 인덱스를 효과적으로 시그날링함으로써, 변환 관련 정보의 부호화 효율을 향상시킬 수 있다.
도 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는 본 개시에 따른 일실시예로서, 디코딩 장치(300)에 의해 수행되는 영상 디코딩 방법을 도시한 것이다.
도 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 PCTKR2023015764-appb-img-000001
상기 입력 데이터 X를 벡터 형태로 나타내는 경우, 벡터 X' 다음과 같이 나타내어질 수 있다.
Figure PCTKR2023015764-appb-img-000002
이 경우, 상기 비분리 변환은 다음 수학식 3과 같이 수행될 수 있다.
Figure PCTKR2023015764-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 세트와 별개로 정의된 것일 수 있다. 이 경우, 상기 변환 세트는 변환 커널 후보로서 하나 또는 그 이상의 특정 변환 커널을 포함할 수 있다. 하나의 특정 변환 커널은, 수평 변환을 위한 변환 커널과 수직 변환을 위한 변환 커널의 쌍으로 정의되거나, 수평 및 수직 변환에 동일하게 적용되는 하나의 변환 커널로 정의될 수 있다. 이하 특정 변환 커널에 대해서 자세히 살펴보기로 한다.
본 개시에 따른 특정 변환 커널은, 인코딩 장치와 디코딩 장치에 동일하게 기-정의된 변환 커널일 수 있다. 또는, 특정 변환 커널은, 상기 기-정의된 변환 커널을 기반으로 유도되는 변환 커널을 더 포함할 수도 있다. 또는, 특정 변환 커널은, 전술한 실시예 1의 (비분리) 변환 세트 또는 실시예 2의 MTS 세트 내에서 소정의 인덱스를 가진 변환 커널을 의미할 수도 있다.
상기 특정 변환 커널은 삼각함수 기반의 변환 커널(e.g., DCT-2, DST-7, DCT-8, DCT-5, DST-4, DST-1)의 조합으로 정의될 수 있다. 또는, 상기 특정 변환 커널은, 넌-삼각함수 기반의 변환 커널의 조합으로 정의될 수 있다. 여기서, 넌-삼각함수 기반의 변환 커널의 예로, KLT, SOT, orthogonal transform kernel, non-orthogonal transform kernel 등이 있을 수 있다. KLT는 training feature 데이터를 가지고 train된 변환 커널 즉, train 기반 변환 커널로 표기될 수도 있다. 또는, 상기 특정 변환 커널은, 삼각함수 기반의 변환 커널과 넌-삼각함수 기반의 변환 커널의 조합으로 정의될 수도 있다.
예를 들어, 특정 변환 커널을 (T_h, T_v)로 표기하기로 한다. T_h는 수평 변환 커널로서, KLT와 같은 train 기반의 변환 커널일 수 있다. T_v는 수직 변환 커널로서, DCT-2와 같은 삼각함수 기반의 변환 커널일 수 있다. 또는, T_h는 KLT이고, T_v는 DST-7일 수 있다. 또는, T_h로 DST-7와 DCT-2이 허용되고, T_v로 KLT에 해당하는 KLT1과 KLT2이 허용되는 경우, 허용되는 변환 커널 간의 조합으로 4개의 특정 변환 커널이 정의될 수 있다.
상기 특정 변환 커널 또는 상기 특정 변환 커널에 기반한 변환 세트는, 실시예 1의 (비분리) 변환 세트 및/또는 실시예 2의 MTS 세트를 대체하는 방식으로 이용될 수 있다. 또는, 실시예 1의 (비분리) 변환 세트 및/또는 실시예 2의 MTS 세트와는 독립적인 변환 세트로서 추가될 수도 있다.
특정 변환 커널에 기반한 변환 세트의 적용 여부를 나타내는 플래그가 정의될 수 있다. 상기 플래그가 제1 값인 경우, 특정 변환 커널 기반의 변환 세트가 적용되고, 상기 플래그가 제2 값인 경우, 실시예 1의 (비분리) 변환 세트 또는 실시예 2의 MTS 세트가 적용될 수 있다. 상기 플래그는, 변환 세트 내 적어도 하나의 변환 커널 후보를 특정하는 신택스 요소보다 먼저 시그날링될 수 있다. 예를 들어, 상기 플래그가 제1 값인 경우, 특정 변환 커널에 기반한 변환 세트가 적용될 수 있고, 해당 변환 세트에 속한 복수의 특정 변환 커널 중 어느 하나를 지시하는 인덱스가 추가적으로 시그날링될 수 있다. 반면, 상기 플래그가 제2 값인 경우, 실시예 1의 (비분리) 변환 세트 또는 실시예 2의 MTS 세트가 적용될 수 있고, 복수의 변환 커널 후보 중 어느 하나를 지시하는 인덱스(즉, 변환 커널 후보 인덱스)가 추가적으로 시그날링될 수 있다.
상기 특정 변환 커널은 현재 블록의 휘도 성분에만 적용될 수도 있고, 현재 블록의 휘도 성분과 색차 성분에 모두 적용될 수도 있다.
본 개시에 따른 특정 변환 커널은 길이-기반 변환 커널로 정의될 수 있다. 즉, 특정 변환 커널은, 소정의 길이를 가진 하나 또는 그 이상의 변환 커널일 수 있다. 이하, 설명의 편의를 위해, K의 길이를 가진 변환 커널을 길이-K 변환 커널이라 표기한다. 여기서, K는 4, 8, 16, 32, 64 또는 그 이상의 정수 중 적어도 하나일 수 있다. 여기서, 길이는, 변환 블록이 가질 수 있는 한 변(너비 및/또는 높이)의 길이를 의미할 수 있다. 본 개시에서, 변환 블록이 가질 수 있는 너비는 허용 너비(allowable width(s))로 지칭될 수도 있고, 변환 블록이 가질 수 있는 높이는 허용 높이(allowable height(s))로 지칭될 수도 있다. MxN 크기의 현재 블록에 분리 변환이 적용되는 경우, 수평 방향으로 현재 블록의 너비와 동일한 길이를 가진 길이-M 변환 커널이 적용되고, 수직 방향으로 현재 블록의 높이와 동일한 길이를 가진 길이-N 변환 커널이 적용될 수 있다.
길이 별로 변환 커널을 할당하여 모든 크기의 MxN 블록들에 대해 분리 변환을 적용할 수 있다. 예를 들어, 현재 블록이 4xN인 경우, 수평 방향에 대해서 현재 블록의 너비와 동일한 길이를 가진 길이-4 변환 커널이 적용될 수 있다. 현재 블록이 Nx4인 경우, 수직 방향에 대해서 현재 블록의 높이와 동일한 길이를 가진 길이-4 변환 커널이 적용될 수 있다. 여기서, N은 4, 8, 16, 32, 64 또는 그 이상의 정수일 수 있다.
상기 길이 별 변환 커널은 수평 방향과 수직 방향에 대해서 서로 다르게 구성될 수 있다. 즉, 길이-4 수평 변환 커널과 길이-4 수직 변환 커널은 서로 상이할 수 있다. 변환 블록의 허용 너비의 개수가 P개이고, 변환 블록의 허용 너비의 개수가 Q개인 경우, 하나의 변환 세트는 (P+Q)개의 길이-기반 변환 커널로 구성될 수 있다. 예를 들어, 변환 블록의 허용 너비와 허용 높이가 각각 4, 8, 16 및 32인 경우, 수평 방향과 수직 방향에 대해 길이-4 변환 커널, 길이-8 변환 커널, 길이-16 변환 커널 및 길이-32 변환 커널이 이용 가능할 수 있다. 이 경우, 상기 P 값과 Q 값은 각각 4가 되고, 총 8개의 길이-기반 변환 커널을 기반으로 하나의 변환 세트가 구성될 수 있다. 이때, 8개의 길이-기반 변환 커널은, 길이-4 수평 변환 커널, 길이-8 수평 변환 커널, 길이-16 수평 변환 커널, 길이-32 수평 변환 커널, 길이-4 수직 변환 커널, 길이-8 수직 변환 커널, 길이-16 수직 변환 커널 및 길이-32 수직 변환 커널일 수 있다.
동일한 방향에 적용되는 동일한 길이를 가진 변환 커널이라도, 현재 블록의 크기에 따라 현재 블록에 적용되는 변환 커널이 상이할 수 있다. 여기서, 현재 블록의 크기는, 현재 블록의 너비, 높이, 너비와 높이의 합, 너비와 높이의 곱, 또는 너비와 높이의 최대값/최소값 중 어느 하나로 정의될 수 있다. 길이-M 수평 변환 커널은 상기 변환 블록의 허용 높이 각각에 대해서 할당될 수 있다. 마찬가지로, 길이-N 수직 변환 커널은 상기 변환 블록의 허용 너비 각각에 대해서 할당될 수 있다. 여기서, M과 N이 모두 4, 8, 16, 32의 값을 가질 수 있는 경우, Mx4, Mx8, Mx16 및 Mx32 블록에 대해 각기 다른 길이-M 수평 변환 커널을 할당하고, 4xN, 8xN, 16Xn 및 32xN 블록에 대해 각기 다른 길이-N 수직 변환 커널을 할당할 수 있다. 예를 들어, 4x8 블록에 적용되는 길이-4 수평 변환 커널은 4x16 블록에 적용되는 길이-4 수평 변환 커널과 상이할 수 있다.
또는, 변환 블록의 허용 너비와 허용 높이를 복수의 그룹으로 구분하고, 각 그룹 별로 동일한 길이-기반 변환 커널을 할당할 수도 있다.
예를 들어, 변환 블록의 허용 너비와 허용 높이는 소정의 문턱값을 기준으로 2개의 그룹으로 구분될 수 있다. MxN 블록에서 N 값이 제1 문턱값 이하인 경우, 제1 길이-M 수평 변환 커널을 할당하고, N 값이 제1 문턱값보다 큰 경우, 제2 길이-M 수평 변환 커널을 할당할 수 있다. 여기서, 제1 길이-M 수평 변환 커널과 제2 길이-M 수평 변환 커널은 동일한 길이를 가지나 서로 상이한 변환 커널일 수 있다. 상기 제1 문턱값은 8, 16 또는 그 이상의 정수일 수 있다. 마찬가지로, MxN 블록에서 M 값이 제2 문턱값 이하인 경우, 제1 길이-N 수직 변환 커널을 할당하고, M 값이 제2 문턱값보다 큰 경우, 제2 길이-N 수직 변환 커널을 할당할 수 있다. 여기서, 제1 길이-N 수직 변환 커널과 제2 길이-N 수직 변환 커널은 동일한 길이를 가지나 서로 상이한 변환 커널일 수 있다. 상기 제2 문턱값은 8, 16 또는 그 이상의 정수일 수 있다.
또는, 변환 블록의 허용 너비와 허용 높이는 적어도 둘의 문턱값을 기준으로 3개 이상의 그룹으로 구분될 수도 있다. 여기서, 변환 블록의 허용 너비와 허용 높이가 4, 8, 16 및 32이고, 이들은 3개의 그룹 즉, {4, 8}, {16}, {32}으로 구분됨을 가정한다. MxN 크기의 현재 블록에서 N 값이 4와 8인 경우, 제1 길이-M 수평 변환 커널을 할당할 수 있다. N 값이 16인 경우, 제2 길이-M 수평 변환 커널을 할당할 수 있다. N 값이 32인 경우, 제3 길이-M 수평 변환 커널을 할당할 수 있다. 마찬가지로, M 값이 4와 8인 경우, 제1 길이-N 수직 변환 커널을 할당할 수 있다. M 값이 16인 경우, 제2 길이-N 수직 변환 커널을 할당할 수 있다. M 값이 32인 경우, 제3 길이-N 수직 변환 커널을 할당할 수 있다. 이와 같이, 현재 블록의 높이에 따라 제1 내지 제3 길이-M 수평 변환 커널 중 어느 하나가 적용될 수 있고, 현재 블록의 너비에 따라 제1 내지 제3 길이-N 수직 변환 커널 중 어느 하나가 적용될 수 있다. 전술한 제1 내지 제3 길이-M 수평 변환 커널과 제1 내지 제3 길이-N 수직 변환 커널 간의 조합을 통해 9개의 특정 변환 커널이 구성될 수 있고, 현재 블록을 위한 하나의 변환 세트는 상기 9개의 특정 변환 커널로 구성될 수 있다.
또는, 길이 별 변환 커널은, 수평 및 수직 방향에 대해서 각각 구성되지 않을 수도 있다. 즉, 수평 및 수직 방향에 관계없이, 해당 너비 또는 높이에 대응하는 길이를 가진 변환 커널이 적용될 수 있다. 예를 들어, 4x8 블록의 수평 방향에 적용되는 길이-4 변환 커널과 8x4 블록의 수직 방향에 적용되는 길이-4 변환 커널은 동일할 수 있다.
수평 및 수직 방향에 관계없이, 길이가 M인 한 변에 대해서 이와 동일한 길이를 가진 길이-M 변환 커널이 적용되는 경우, 변환 블록의 허용 너비 및/또는 허용 높이의 길이들에 대해 각각 1개의 변환 커널만이 요구될 수 있다. 예를 들어, 변환 블록의 허용 너비 또는 허용 높이가 4, 8, 16 및 32인 경우, 4개의 길이-기반 변환 커널을 기반으로 하나의 변환 세트가 구성될 수 있다. 여기서, 4개의 길이-기반 변환 커널은, 길이-4 변환 커널, 길이-8 변환 커널, 길이-16 변환 커널 및 길이-32 변환 커널일 수 있다. 현재 블록이 MxN 블록인 경우, 수평 방향에 대해서 길이-M 변환 커널이 적용되고, 수직 방향으로 길이-N 변환 커널이 적용될 수 있다.
현재 블록의 컨텍스트에 따라 상기 길이-기반 변환 커널의 적용이 제한되거나, 현재 블록이 이용 가능한 길이-기반 변환 커널의 개수가 상이할 수 있다. 이하, 설명의 편의를 위해, 길이-기반 변환 커널은 전술한 KLT와 같은 넌-삼각함수 기반의 변환 커널임을 가정하나, 이에 한정되지 아니한다.
특정 길이를 가진 변의 방향에 대해서는 넌-삼각함수 기반의 변환 커널이 적용되고, 다른 길이에 대해서는 삼각함수 기반의 변환 커널이 적용될 수 있다. 여기서, 특정 길이는, 인코딩 장치와 디코딩 장치에 동일하게 기-정의된 길이에 기반하여 결정될 수 있다. 수평 방항 또는 수직 방향 중 어느 하나의 방향에 대해서는 넌-삼각함수 기반의 변환 커널이 적용되고, 다른 하나의 방향에 대해서는 삼각함수 기반의 변환 커널이 적용될 수 있다.
예를 들어, 현재 블록의 한 변의 길이가 8보다 크거나 같은 경우, 해당 변에 대해서 넌-삼각함수 기반의 변환 커널이 적용되고, 그렇지 않은 경우, 해당 변에 대해서 삼각함수 기반의 변환 커널이 적용될 수 있다. 또는, 현재 블록의 한 변의 길이가 8보다 작은 경우, 해당 변에 대해서 넌-삼각함수 기반의 변환 커널이 적용되고, 그렇지 않은 경우, 해당 변에 대해서 삼각함수 기반의 변환 커널이 적용될 수 있다. 또는, 현재 블록의 한 변의 길이가 16보다 작거나 같은 경우, 해당 변에 대해서 넌-삼각함수 기반의 변환 커널이 적용되고, 그렇지 않은 경우, 해당 변에 대해서 삼각함수 기반의 변환 커널이 적용될 수 있다. 또는, 현재 블록의 한 변의 길이가 16보다 큰 경우, 해당 변에 대해서 넌-삼각함수 기반의 변환 커널이 적용되고, 그렇지 않은 경우, 해당 변에 대해서 삼각함수 기반의 변환 커널이 적용될 수 있다. 이와 같이, 길이가 p인 변에 대해서 넌-삼각함수 기반의 변환 커널이 적용되지 않도록 제한될 경우에 있어서, 너비 또는 높이 중 어느 하나는 p이고 다른 하나는 p가 아닌 블록에 대해서 다음과 같은 두 가지 방법을 고려해 볼 수 있다.
(1) 너비 또는 높이 중 p의 길이를 가진 방향에 대해서는 넌-삼각함수 기반의 변환 커널이 적용되지 않고, p의 길이를 가지지 않는 방향에 대해서는 넌-삼각함수 기반의 변환 커널이 적용되는 제1 방법
(2) 너비 또는 높이 중 어느 하나라도 p의 길이를 가지는 경우, 수평 및 수직 방향에 대해서 넌-삼각함수 기반의 변환 커널이 적용되지 않는 제2 방법
예를 들어, 길이-4 넌-삼각함수 기반의 변환 커널이 적용되지 않도록 제한될 수 있다.
상기 제1 방법에 따르면, 너비 또는 높이가 4인 블록의 경우, 길이가 4인 변의 방향에 대해서는 길이-4 넌-삼각함수 기반의 변환 커널이 적용되지 않고, 길이-4 삼각함수 기반의 변환 커널이 적용될 수 있다. 한편, 길이가 4가 아닌 변의 방향에 대해서는 해당 길이에 대응하는 넌-삼각함수 기반의 변환 커널이 적용될 수 있다. 즉, 4x4 블록에는 길이-4 넌-삼각함수 기반의 변환 커널이 적용되지 않을 수 있다. 4x8, 4x16, 4x32, 8x4, 16x4, 또는 32x4 블록의 경우, 길이가 4가 아닌 변에 대해서만 해당 길이에 대응하는 넌-삼각함수 기반의 변환 커널이 적용될 수 있다. 나머지 크기의 블록들(e.g., 8x8, 8x16, 8x32, 16x8, 16x16, 16x32, 32x8, 32x16, 32x32 등)의 경우, 수평 및 수직 방향에 대해서 해당 길이에 대응하는 넌-삼각함수 기반의 변환 커널이 적용될 수 있다.
또는, 제2 방법에 따르면, 현재 블록의 너비와 높이가 둘다 4보다 큰 경우에 대해서만 해당 길이에 대응하는 넌-삼각함수 기반의 변환 커널이 적용될 수 있다. 다시 말해, 너비 또는 높이 중 어느 하나라도 길이가 4인 경우, 수평 및 수직 방향에 대해서 길이-4 넌-삼각함수 기반의 변환 커널이 적용되지 않을 수 있다.
또는, 길이-4 및 길이-8 넌-삼각함수 기반의 변환 커널이 적용되지 않도록 제한될 수 있다.
상기 제1 방법에 따르면, 4x4, 4x8, 8x4 및 8x8 블록에 대해서는 길이-4 및 길이-8 넌-삼각함수 기반의 변환 커널이 적용되지 않고, 길이-4 및 길이-8 삼각함수 기반의 변환 커널이 적용될 수 있다. 4x16, 4x32, 8x16, 8x32, 16x4, 16x8, 32x4 및 32x8 블록의 경우, 길이가 4와 8이 아닌 변에 대해서만 해당 길이에 대응하는 넌-삼각함수 기반의 변환 커널이 적용될 수 있다. 나머지 크기의 블록들(e.g., 16x16, 16x32, 32x16, 32x32 등)의 경우, 수평 방향과 수직 방향에 대해서 해당 길이에 대응하는 넌-삼각함수 기반의 변환 커널이 적용될 수 있다.
상기 제2 방법에 따르면, 현재 블록의 너비와 높이가 둘다 8보다 큰 경우(e.g., 16x16, 16x32, 32x16, 또는 32x32 블록 등)에 대해서만 해당 길이에 대응하는 넌-삼각함수 기반의 변환 커널이 적용될 수 있다. 다시 말해, 너비 또는 높이 중 어느 하나라도 길이가 4 또는 8인 경우, 수평 및 수직 방향에 대해서 길이-4 및 길이-8 넌-삼각함수 기반의 변환 커널이 적용되지 않을 수 있다.
또는, 길이-32 넌-삼각함수 기반의 변환 커널이 적용되지 않도록 제한될 수 있다.
상기 제1 방법에 따르면, 32x32 블록에 대해서는 길이-32 넌-삼각함수 기반의 변환 커널이 적용되지 않고, 길이-32 삼각함수 기반의 변환 커널이 적용될 수 있다. 4x32, 8x32, 16x32, 32x4, 32x8 및 32x16 블록의 경우, 길이가 32가 아닌 변에 대해서만 해당 길이에 대응하는 넌-삼각함수 기반의 변환 커널이 적용될 수 있다. 나머지 크기의 블록들(e.g., 4x4, 4x8, 4x16, 8x4, 8x8, 8x16, 16x4, 16x8, 16x16)의 경우, 수평 방향과 수직 방향에 대해서 해당 길이에 대응하는 넌-삼각함수 기반의 변환 커널이 적용될 수 있다.
상기 제2 방법에 따르면, 현재 블록의 너비와 높이가 둘다 32보다 작은 경우에 대해서만 해당 길이에 대응하는 넌-삼각함수 기반의 변환 커널이 적용될 수 있다. 즉, 4x32, 8x32, 16x32, 32x4, 32x8, 32x16, 또는 32x32 블록의 경우, 수평 및 수직 방향에 대해서 길이-32 넌-삼각함수 기반의 변환 커널이 적용되지 않을 수 있다. 나머지 크기의 블록들(e.g., 4x4, 4x8, 4x16, 8x4, 8x8, 8x16, 16x4, 16x8, 16x16)의 경우, 수평 및 수직 방향에 대해서 해당 길이에 대응하는 넌-삼각함수 기반의 변환 커널이 적용될 수 있다.
전술한 실시예는 현재 블록의 슬라이스 타입에 기초하여 적응적으로 수행될 수 있다. 예를 들어, 전술한 예시는 슬라이스 타입이 I 슬라이스인 경우에 적용되고, 그렇지 않은 경우에 적용되지 않을 수 있다.
또한, 전술한 실시예에서, 특정 길이에 대해서 넌-삼각함수 기반의 변환 커널의 적용이 제한되는 경우를 살펴보았으나, 이는 일예에 불과하다. 예를 들어, 특정 길이에 대해서 제1 타입의 삼각함수 기반의 변환 커널이 적용되지 않도록 제한될 수 있고, 이 경우 제2 타입의 삼각함수 기반의 변환 커널이 적용될 수 있다. 즉, 전술한 실시예에서, 넌-삼각함수 기반의 변환 커널과 삼각함수 기반의 변환 커널은, 제1 타입의 삼각함수 기반의 변환 커널과 제2 타입의 삼각함수 기반의 변환 커널로 대체되어 이해될 수 있다. 상기 제2 타입은 상기 제1 타입과는 다른 이종의 변환 타입일 수 있다.
실시예 4
현재 블록의 컨텍스트에 기초하여 변환 세트가 결정될 수 있다. 상기 변환 세트는 현재 블록의 인트라 예측 모드에 기초하여 결정될 수 있고 하나 또는 그 이상의 변환 커널 후보로 구성될 수 있다. 예를 들어, 본 개시의 변환 세트는 실시예 1의 (비분리) 변환 세트 또는 실시예 2에서의 MTS 세트일 수 있다. 본 개시의 변환 세트는, 실시예 3과 같이, 변환 커널 후보로서, 소정의 길이를 가진 하나 또는 그 이상의 길이-기반 변환 커널을 포함할 수 있다.
본 개시에서는, 기-정의된 인트라 예측 모드들과 변환 세트들 간의 매핑 관계가 정의될 수 있다.
상기 기-정의된 인트라 예측 모드들은, Planar 모드, DC 모드, 방향성 모드, WAIP를 위한 모드(wide angle modes), MIP(matrix-based intra prediction) 모드, DIMD(decoder-side intra mode derivation) 모드, 또는 TIMD(template-based intra mode derivation) 모드 중 적어도 하나를 포함할 수 있다.
각 모드에는 해당 모드를 식별하기 위한 모드 값이 할당되어 있다. Planar 모드와 DC 모드에 대해 0과 1이 각각 할당되고, 방향성 모드에 대해서는 2 내지 66이 각각 할당된다. wide angle modes에는 0보다 작은 값과 66보다 큰 값이 각각 할당된다.
상기 기-정의된 인트라 예측 모드마다(또는, 모드 값마다) 별도의 변환 세트가 매핑될 수 있다. 또는, 상기 기-정의된 인트라 예측 모드들은 소정의 규칙에 의해 적어도 둘의 그룹으로 구분될 수 있고, 각 그룹 별로 변환 세트가 매핑될 수 있다. 여기서, 소정의 규칙은, 후술하는 규칙들 (1) 내지 (7) 중 어느 하나이거나, 적어도 둘의 조합일 수 있다. 이하, 상기 기-정의된 인트라 예측 모드들을 그룹핑하는 소정의 규칙에 대해서 살펴보기로 한다.
(1) Planar 모드와 DC 모드를 하나의 그룹으로 묶을 수 있다.
(2) 방향성 모드들은 인접한 모드들끼리 묶어서 복수의 그룹들로 나누어질 수 있다.
(3) wide angle modes를 하나의 그룹으로 묶을 수 있다. 또는, 0보다 작은 값을 가지는 모드들을 하나의 그룹으로 묶고, 66보다 큰 값을 가지는 모드들을 다른 하나의 그룹으로 묶을 수 있다. 또는, wide anlge modes는, 방향성 모드들과 같이, 인접한 모드들끼리 묶어서 3개 이상의 그룹들로 나누어질 수 있다. 예를 들어, 0보다 작은 wide angle modes은 각도 상으로 2번 모드와 인접해 있으므로, 0보다 작은 wide angle modes와 2번 모드(또는, 2번 모드와 2번 모드에 인접한 적어도 하나의 방향성 모드까지 포함)를 하나의 그룹으로 묶을 수 있다(그룹 A). 66보다 큰 wide angle modes은 각도 상으로 66번 모드와 인접해 있으므로, 66보다 큰 wide angle modes와 66번 모드(또는, 66번 모드와 66번 모드에 인접한 적어도 하나의 방향성 모드까지 포함)를 하나의 그룹으로 묶을 수 있다(그룹 B). 상기 그룹 A와 그룹 B를 병합하여 하나의 그룹으로 묶을 수도 있다.
(4) MIP 모드의 경우, Planar 모드와 같은 그룹으로 묶거나, MIP 모드만으로 별도의 그룹을 형성할 수도 있다. 또는, MIP 모드는 인트라 예측 모드와 변환 세트 간의 매핑시 Planar 모드로 간주될 수도 있다.
(5) DIMD 모드의 경우, DIMD 모드만으로 별도 그룹을 형성하거나, DIMD 모드에 의해 유도되는 인트라 예측 모드가 속한 그룹에 포함시킬 수 있다. 또는, DIMD 모드에 의해 복수의 인트라 예측 모드가 유도되는 경우, 복수의 인트라 예측 모드 중 어느 하나(e.g., 첫번째 모드, 가장 작은 값을 가진 모드)가 속한 그룹에 포함시킬 수도 있다.
(6) TIMD 모드의 경우, TIMD 모드만으로 별도 그룹을 형성하거나, TIMD 모드에 의해 유도되는 인트라 예측 모드가 속한 그룹에 포함시킬 수 있다. 또는, TIMD 모드에 의해 복수의 인트라 예측 모드가 유도되는 경우, 복수의 인트라 예측 모드 중 어느 하나(e.g., 첫번째 모드, 가장 작은 값을 가진 모드)가 속한 그룹에 포함시킬 수도 있다. TIMD 모드에 의해 유도되는 인트라 예측 모드의 값은 131개 모드를 기준으로 부여된 것일 수 있다. 이 경우, 131개 모드 기준의 모드 값을 67개 모드 기준의 모드 값으로 변환할 수 있다. 다음 수학식 4에 따른 매핑 함수(MAP131TO67)를 통해, 0 내지 130 중 어느 하나의 값은 0 내지 66 중 어느 하나의 값으로 매핑/변환될 수 있다. TIMD 모드는, 상기 변경된 모드 값이 속한 그룹에 포함될 수 있다.
Figure PCTKR2023015764-appb-img-000004
(7) 인트라 템플릿 매칭 모드(Intra template matching mode)의 경우, Planar 모드가 속한 그룹에 포함시킬 수 있다. 인트라 템플릿 매칭 모드는 인트라 예측 모드와 변환 세트 간의 매핑시 Planar 모드로 간주될 수 있다.
전술한 소정의 규칙에 의해 기-정의된 인트라 예측 모드들은 복수의 그룹으로 나누어질 수 있고, 각 그룹에 변환 세트가 할당될 수 있다. 다음은 인트라 예측 모드 별(또는, 그룹 별) 할당된 변환 세트를 정의하는 매핑 테이블의 예시이다.
(1) 7-set
모드 값 (X) 변환 세트 인덱스
X < 0 1
0 ≤ X ≤ 1 0
2 ≤ X ≤ 12 1
13 ≤ X ≤ 23 2
24 ≤ X ≤ 34 3
35 ≤ X ≤ 44 4
45 ≤ X ≤ 55 5
56 ≤ X ≤ 66 6
X > 66 6
(2) 4-set
모드 값 (X) 변환 세트 인덱스
X < 0 1
0 ≤ X ≤ 1 0
2 ≤ X ≤ 23 1
24 ≤ X ≤ 44 2
45 ≤ X ≤ 66 3
X > 66 3
(3) 3-set
모드 값 (X) 변환 세트 인덱스
X < 0 1
0 ≤ X ≤ 1 0
2 ≤ X ≤ 34 1
35 ≤ X ≤ 66 2
X > 66 2
(4) 2-set
모드 값 (X) 변환 세트 인덱스
X < 0 1
0 ≤ X ≤ 1 0
2 ≤ X ≤ 66 1
X > 66 1
(5) 1-set
모드 값 (X) 변환 세트 인덱스
X < 0 0
0 ≤ X ≤ 66 0
X > 66 0
인트라 예측 모드 및/또는 블록 형태 간의 대칭성을 기반으로, 변환 세트를 결정할 수 있다. 도 5를 참조하여 살펴본 바와 같이, 인트라 예측 모드들 특히, 방향성 모드들은 34번의 모드를 중심으로 하여 대칭일 수 있다. 34번 모드를 기준으로 한 인트라 예측 모드 간의 대칭성에 따라, MxN 블록에 대해서 p번 모드에 대칭되는 모드는 (68 - p)번 모드가 되며, wide angle mode인 q번 모드에 대칭되는 모드는 (66 - q)번 모드가 될 수 있다. 또한, 블록 형태 간의 대칭성에 의해, MxN 블록에 대칭인 블록은 NxM 블록일 수 있다.
r번 모드에 대응되는 모드를 s번 모드라고 하면, MxN 블록에 대해 r번 모드로 인트라 예측이 수행된 경우와 NxM 블록에 대해 s번 모드로 인트라 예측이 수행되는 경우는 서로 대칭 관계일 수 있다. 또는, MxN 블록에 대해 길이-M 수평 변환 커널과 길이-N 수직 변환 커널이 적용되는 경우는, NxM 블록에 대해 길이-M 수직 변환 커널과 길이-N 수평 변환 커널이 적용되는 경우와 대칭 관계일 수 있다. 상기 두 경우에 대해 동일한 특정 변환 커널을 적용하고자 할 경우, 위 두 경우에 대해 MxN 블록의 길이-M 수평 변환 커널과 NxM 블록의 길이-M 수직 변환 커널을 동일하게 설정할 수 있고, MxN 블록의 길이-N 수직 변환 커널과 NxM 블록의 길이-N 수평 변환 커널을 동일하게 설정할 수 있다.
예를 들어, MxN 블록에 대해 인트라 예측 모드가 방향성 모드이면서 34보다 큰 p번 모드인 경우, NxM 블록에 대한 (68 - p)번 모드에 매핑되어 있는 변환 세트가 이용될 수 있다. 이 경우, 해당 변환 세트에 속한 변환 커널 후보인 길이-M 수직 변환 커널과 길이-N 수평 변환 커널이 MxN 블록의 길이-M 수평 변환 커널과 길이-N 수직 변환 커널로 각각 이용될 수 있다. 전술한 대칭성을 이용하는 경우, 서로 대칭적인 모드들 간에 동일한 변환 세트가 이용되며, 다음과 같이 인트라 예측 모드와 변환 세트 간의 매핑을 대칭적으로 설정할 수 있다.
(6) 4-set: 상기 (1)번 7-set에서 대칭을 적용한 경우
모드 값 (X) 변환 세트 인덱스
X < 0 1
0 ≤ X ≤ 1 0
2 ≤ X ≤ 12 1
13 ≤ X ≤ 23 2
24 ≤ X ≤ 44 3
45 ≤ X ≤ 55 2
56 ≤ X ≤ 66 1
X > 66 1
(7) 2-set: 상기 (3)번 3-set에서 대칭을 적용하는 경우
모드 값 (X) 변환 세트 인덱스
X < 0 1
0 ≤ X ≤ 1 0
2 ≤ X ≤ 66 1
X > 66 1
(8) 1-set: 상기 (5)번 1-set에서 대칭을 적용하는 경우
모드 값 (X) 변환 세트 인덱스
X < 0 0
0 ≤ X ≤ 66 0
X > 66 0
본 개시에서, 변환 세트는 하나 또는 그 이상의 변환 커널 후보를 포함할 수 있고, 이 중에서 선택된 후보는 수평 변환 커널과 수직 변환 커널을 포함할 수 있다. 상기 변환 커널 후보는 변환 블록의 한 변이 가질 수 있는 길이들에 대해서 각각 할당될 수 있다. 이 경우, r번 모드로 예측되는 MxN 블록의 변환 커널은, 전술한 인트라 예측 모드 및/또는 블록 형태 간의 대칭성을 기반으로 유도될 수 있다. 즉, r번 모드에 대칭되는 s번 모드를 기반으로 변환 세트를 결정할 수 있고, 변환 세트에 속한 변환 커널 후보로부터 현재 블록의 변환 커널을 유도할 수 있다. 이때, MxN 블록에 대칭되는 NxM 블록에 대해 선택된 변환 커널 후보로부터의 길이-N 수평 변환 커널을 MxN 블록에 대한 길이-N 수직 변환 커널로 적용할 수 있다. 마찬가지로, MxN 블록에 대칭되는 NxM 블록에 대해 선택된 변환 커널 후보로부터의 길이-M 수직 변환 커널을 MxN 블록에 대한 길이-M 수평 변환 커널로 적용할 수 있다. 다만, 실시예 3에서 살펴본 바와 같이, 변환 세트는 수평 및 수직 방향에 동일하게 적용되는 길이-기반 변환 커널로 구성되는 경우, 수평 변환 커널이 수직 변환 커널로 변경되면서 변환 커널이 변경되지는 않는다.
MIP 모드의 경우, transpose 형태로 예측이 수행되는지 여부를 나타내는 플래그가 정의될 수 있고, 상기 플래그가 0인 경우는 상기 플래그가 1인 경우와 대칭 관계일 수 있다. 상기 플래그가 0인 경우에 MxN 블록의 수평 방항에 적용되는 길이-M 수평 변환 커널은, 상기 플래그가 1인 경우에 NxM 블록의 수직 방향에 적용되는 길이-M 수직 변환 커널과 동일하게 설정될 수 있다.
또는, 상기 플래그가 1인 경우, MxN 블록에 적용할 수평 변환 커널과 수직 변환 커널은 NxM 블록의 수평 변환 커널과 수직 변환 커널로 각각 설정될 수 있다. 예를 들어, NxM 블록에 대한 수평 변환 커널과 수직 변환 커널로 DST-7과 DCT-5가 각각 적용된 경우, MxN 블록에 적용할 수평 변환 커널과 수직 변환 커널은 DST-7과 DCT-5로 각각 설정될 수 있다. 변환 타입이 동일할 뿐이고 변환 커널의 길이는 상이할 수 있다. 즉, NxM 블록에서의 수평 변환 커널로 길이-N DST-7이 적용되는 반면 MxN 블록에서의 수평 변환 커널로 길이-M DST-7이 적용될 수 있다.
MIP 모드에 대해 삼각함수 기반의 변환 커널이 아닌 넌-삼각함수 기반의 변환 커널(e.g., train 기반 변환 커널)이 적용되는 경우, 넌-삼각함수 기반의 변환 커널이 적용되는 것이 동일할 뿐, 다른 길이의 변환 커널이 적용되어 MxN 블록과 NxM 블록에 대해 방향 별로 다른 넌-삼각함수 기반의 변환 커널이 적용될 수 있다. MIP 모드의 경우, transpose의 적용 여부와 관계없이, 해당 변환 세트에서 지정되는 수평 변환 커널과 수직 변환 커널을 그대로 사용할 수 있다.
실시예 5
현재 블록에 대해 하나 또는 그 이상의 특정 변환 커널이 구성될 수 있다. 상기 하나 또는 그 이상의 특정 변환 커널을 기반으로 현재 블록에 대한 하나 또는 그 이상의 변환 세트가 구성될 수 있다. 복수의 특정 변환 커널 중 적어도 하나를 기반으로 현재 블록의 변환 커널이 결정될 수 있다.
상기 특정 변환 커널인 수평 변환 커널(T_h)과 수직 변환 커널(T_v)로서, KLT와 같이 넌-삼각함수 기반의 변환 커널이나, DCT-2 또는 DST-7과 같은 삼각함수 기반의 변환 커널이 이용될 수 있다. 이때, T_h가 길이-p 수평 변환 커널이고, T_v가 길이-q 수직 변환 커널이라 한다. 만일 p와 q가 동일한 경우, T_h와 T_v는 동일한 변환 커널일 수 있다. 또는, p와 q가 동일한 경우라도, 수평 변환 커널은 수직 변환 커널과 상이한 커널일 수 있다.
상기 특정 변환 커널은, 소정의 기준 변환 커널을 포함할 수 있다. 또한, 상기 특정 변환 커널은, 상기 기준 변환 커널을 기반으로 유도된 변환 커널(이하, 유도된 변환 커널이라 함)을 포함할 수 있다. 여기서, 유도된 변환 커널은, 상기 기준 변환 커널과 삼각함수 기반의 변환 커널과의 페어링(pairing)을 통해 생성될 수 있다. 상기 기준 변환 커널은 상기 유도된 변환 커널을 유도하기 위해 이용되고, 상기 특정 변환 커널에 포함되지 않을 수도 있다. 이와 같은 특정 변환 커널은 현재 블록의 변환 커널 후보로 이용될 수 있다. 이하, 본 개시에 따른 특정 변환 커널을 결정하는 방법에 대해서 살펴보기로 한다.
(방법 1) 상기 기준 변환 커널은 넌-삼각함수 기반의 변환 커널일 수 있다. 이하, 설명의 편의를 위해, 상기 기준 변환 커널을 KLT로 가정하고, (KLT_h, KLT_v)로 표기하기로 한다. 예를 들어, 상기 기준 변환 커널인 (KLT_h, KLT_v)은 DCT-2와 페어링될 수 있으며, 이 경우 특정 변환 커널은 (KLT_h, KLT_v), (KLT_h, DCT-2), 또는 (DCT-2, KLT_v) 중 적어도 하나를 포함할 수 있다. 또는, 상기 기준 변환 커널인 (KLT_h, KLT_v)은 DST-7과 페어링될 수 있으며, 이 경우 특정 변환 커널은 (KLT_h, KLT_v), (KLT_h, DST-7), 또는 (DST-7, KLT_v) 중 적어도 하나를 포함할 수 있다.
전술한 바와 같이, 하나의 변환 커널로부터의 3개의 변환 커널 후보가 하나의 변환 세트를 구성할 수 있다. 또는, DCT-2와의 페어링을 통해 생성된 하나 또는 그 이상의 변환 커널 후보를 포함하는 하나의 변환 세트가 구성될 수 있고, DST-7과의 페어링을 통해 생성된 하나 또는 그 이상의 변환 커널 후보를 포함하는 다른 하나의 변환 세트가 구성될 수 있다. 이 경우, 상기 실시예 4와 같이, 현재 블록의 인트라 예측 모드에 기초하여 둘 중 어느 하나의 변환 세트가 선택되고, 해당 변환 세트로부터 어느 하나의 변환 커널 후보가 선택될 수 있다. 이를 위해, 해당 변환 커널 후보를 지시하는 인덱스가 시그날링되거나, 현재 블록의 컨텍스트를 기반으로 묵시적으로 어느 하나의 변환 커널 후보가 선택될 수도 있다.
(방법 2) 상기 기준 변환 커널은 전술한 실시예 2의 MTS 세트 내 첫번째 변환 커널 후보일 수 있다. 여기서, 상기 MTS 세트 내 첫번째 변환 커널 후보를 (AMTS_h, AMTS_v)라 표기한다. 예를 들어, 상기 기준 변환 커널인 (AMTS_h, AMTS_v)은 DCT-2와 페어링될 수 있으며, 이 경우 특정 변환 커널은 (AMTS_h, AMTS_v), (AMTS_h, DCT-2), 또는 (DCT-2, AMTS_v) 중 적어도 하나를 포함할 수 있다. 또는, 상기 기준 변환 커널인 (AMTS_h, AMTS_v)은 DST-7과 페어링될 수 있으며, 이 경우 특정 변환 커널은 (AMTS_h, AMTS_v), (AMTS_h, DST-7), 또는 (DST-7, AMTS_v) 중 적어도 하나를 포함할 수 있다. 또는, 상기 기준 변환 커널인 (AMTS_h, AMTS_v)은 DST-4와 페어링될 수 있으며, 이 경우 특정 변환 커널은 (AMTS_h, AMTS_v), (AMTS_h, DST-4), 또는 (DST-4, AMTS_v) 중 적어도 하나를 포함할 수 있다.
상기 실시예 2에 따른 MTS 세트에서는, AMTS_h과 AMTS_v가 DCT-2인 경우가 존재하지 않는다. 따라서, DCT-2와의 페어링을 통해 결정되는 3개의 특정 변환 커널은 서로 다른 변환 커널 후보가 될 수 있다. 다만, 본 개시에 따른 특정 변환 커널을 기반으로 하는 변환 세트와 실시예 2에 따른 MTS 세트가 하나의 코덱 시스템에 공존하는 경우, 상기 (AMTS_h, AMTS_v)는 MTS 세트의 첫번째 변환 커널 후보와 중복된다. 이 경우, 플래그를 도입하여 특정 변환 커널 기반의 변환과 MTS 세트 기반의 변환을 구분할 수 있다. 또한, 해당 플래그가 0인 경우의 (AMTS_h, AMTS_v)를 지정하기 위한 시그날링 코스트와 해당 플래그가 1인 경우의 (AMTS_h, AMTS_v)를 지정하기 위한 시그날링 코스트가 서로 달라져서 RD (Rate-Distortion) cost의 비교를 통해 보다 유리한 경우를 선택하는 방식으로 코덱 시스템이 동작한다면, (AMTS_h, AMTS_v)는 특정 변환 커널에 포함될 수 있다. 또는, (AMTS_h, AMTS_v)는 MTS 세트에 첫번째 변환 커널 후보로 포함되어 있으므로, (AMTS_h, AMTS_v)는 특정 변환 커널에서 제외될 수도 있다. 이 경우, (AMTS_h, DCT-2)와 (DCT-2, AMTS_v) 중 어느 하나를 선택할 수 있고, 이러한 선택을 위해 1개의 빈(bin)으로 구성된 인덱스가 이용될 수 있다.
기준 변환 커널의 AMTS_h 또는 AMTS_v가 DST-7(또는 DST-4)인 경우, DST-7(또는 DST-4)와의 페어링을 통해 유도된 변환 커널이 기준 변환 커널인 (AMTS_h, AMTS_v)와 중복될 수 있다. 또한, 본 개시에 따른 특정 변환 커널을 기반으로 하는 변환 세트와 실시예 2에 따른 MTS 세트가 하나의 코덱 시스템에 공존하는 경우, 상기 (AMTS_h, AMTS_v)는 MTS 세트의 첫번째 변환 커널 후보와 중복되게 된다. 이러한 경우, 앞서 살펴본 바와 같이, (AMTS_h, AMTS_v)는 특정 변환 커널에 포함될 수도 있고, (AMTS_h, AMTS_v)는 특정 변환 커널에서 제외될 수도 있다. (AMTS_h, DST-7(또는 DST-4)) 및/또는 (DST-7(또는 DST-4), AMTS_v)가 (AMTS_h, AMTS_v)와 중복되는 경우, 중복되는 후보를 제외한 나머지 후보를 기반으로 특정 변환 커널이 구성될 수 있다. 최종적으로 한 개의 변환 커널 후보만이 이용 가능할 경우, 별도의 인덱스의 시그날링없이 해당 변환 커널 후보를 기반으로 현재 블록의 변환 커널이 결정될 수 있다.
(방법 3) 인트라 예측 모드로 예측된 블록의 경우에 대해서 (DST-7, DST-7)가 효과적인 변환 커널일 수 있다. 이에, (DST-7, DST-7)를 기준 변환 커널로 하고, DCT-2와의 페어링을 통해 적어도 하나의 유도된 변환 커널을 생성할 수 있다. 예를 들어, 기준 변환 커널인 (DST-7, DST-7)와 DCT-2와의 페어링을 통해 (DST-7, DCT-2) 또는 (DCT-2, DST-7) 중 적어도 하나가 생성될 수 있다. 이 경우, 특정 변환 커널은, (DST-7, DST-7), (DST-7, DCT-2), 또는 (DCT-2, DST-7) 중 적어도 하나를 포함할 수 있다.
마찬가지로 (DST-7, DST-7)이 MTS 세트에서의 첫번째 변환 커널 후보와 중복될 수 있다. 이 경우, (DST-7, DST-7)을 특정 변환 커널에 포함시킬 수도 있고 특정 변환 커널에서 제외시킬 수도 있다. 만일 (DST-7, DCT-2)와 (DCT-2, DST-7)만이 특정 변환 커널로 결정된 경우, 1개의 빈(bin)이 추가적으로 시그날링되어 상기 둘의 특정 변환 커널 중 어느 하나가 선택될 수 있다.
(방법 4) 현재 블록의 각 변의 길이에 기초하여 해당 변의 방향에 대한 변환 커널을 결정하고, 결정된 변환 커널을 기반으로 특정 변환 커널이 생성될 수 있다. 예를 들어, 현재 블록의 너비와 높이 각각에 대해서, 길이가 4 이상이고 16 이하이면 DST-7을 선택하고 그렇지 않으면 DCT-2를 선택할 수 있다. 현재 블록이 32x8 블록인 경우, 현재 블록의 수평 방향에 대해서는 DCT2가 선택되고, 현재 블록의 수직 방향에 대해서는 DST-7이 각각 선택되고, (DCT-2, DST-7)의 특정 변환 커널이 생성될 수 있다.
(방법 5) 본 개시에 따른 특정 변환 커널은, 전술한 방법 4에 따른 특정 변환 커널 외에 기-정의된 디폴트 변환 커널을 더 포함할 수 있다. 여기서, 기-정의된 디폴트 변환 커널은, 상기 방법 1 내지 3 중 적어도 하나에서의 기준 변환 커널일 수 있다. 즉, 디폴트 변환 커널은, 넌-삼각함수 기반의 변환 커널, MTS 세트 내 첫번째 변환 커널 후보, 또는 (DST-7, DST-7) 중 적어도 하나를 포함할 수 있다. 상기 디폴트 변환 커널이 MTS 세트 내 첫번째 변환 커널 후보와 중복되는 경우, 상기 디폴트 변환 커널을 특정 변환 커널에 포함시킬 수도 있고 특정 변환 커널에서 제외할 수도 있다.
한편, 방법 5에 따른 특정 변환 커널을 포함하는 변환 세트를 구성함에 있어서, 상기 디폴트 변환 커널이 변환 세트에 추가된 이후에 상기 방법 4에 따른 특정 변환 커널이 추가될 수 있다. 만일 방법 4에 따른 특정 변환 커널이 상기 디폴트 변환 커널과 중복되는 경우, 방법 4에 따른 특정 변환 커널은 상기 변환 세트에 추가되지 않을 수 있다. 또는, 상기 방법 4에 따른 특정 변환 커널이 상기 변환 세트에 추가된 이후에 디폴트 변환 커널이 추가될 수도 있다. 방법 4에 따른 특정 변환 커널이 상기 디폴트 변환 커널과 중복되는 경우, 상기 디폴트 변환 커널은 변환 세트에 추가되지 않을 수 있다.
상기 실시예에서, 하나의 기준 변환 커널 (T_h, T_v)로부터 최대 3개의 특정 변환 커널이 결정될 수 있음을 살펴보았다. 다만, 이는 일예에 불과하며, 복수의 기준 변환 커널이 정의될 수 있다. 여기서, 복수의 기준 변환 커널은, 상기 방법 1 내지 3 중 적어도 둘에 따른 기준 변환 커널을 포함할 수 있다. 현재 블록이 이용 가능한 기준 변환 커널의 개수가 N개인 경우, 해당 기준 변환 커널은 (T_h1, T_v1), (T_h2, T_v2), ... , (T_hN, T_vN)으로 표기될 수 있다. 전술한 바와 같이, 각 기준 변환 커널에 대해서, DCT-2, DST-7, 또는 DST-4 등과의 페어링을 통해 최대 3개의 특정 변환 커널(e.g., (T_hi, T_vi), (T_hi, DCT-2), (DCT-2, T_vi))이 생성될 수 있고, 일부 중복된 변환 커널이 제거될 수도 있다. 각 변환 세트는 (T_hi, T_vi)들로 구성될 수도 있고(i = 1, 2, ... , N), (T_hi, T_vi)를 기반으로 결정되는 최대 3개의 특정 변환 커널로 구성될 수도 있다. 예를 들어, (T_hi, T_vi)를 기반으로 결정되는 최대 3개의 특정 변환 커널은, S_i_1 = {(T_hi, T_vi)}, S_i_2 = {(T_hi, T_vi), (T_hi, DCT-2), (DCT-2, T_vi)}, S_i_3 = {(T_hi, T_vi), (T_hi, DCT-2)}, S_i_4 = {(T_hi, T_vi), (DCT-2, T_vi)}, S_i_5 = {(T_hi, DCT-2), (DCT-2, T_vi)}, S_i_6 = {(T_hi, DCT-2)}, S_i_7 = {(DCT-2, T_vi)}와 같을 수 있다. 본 예시는 DCT-2와의 페어링에 기초하나, DST-7 또는 DST-4와 같은 다른 삼각함수 기반의 변환 커널과의 페어링의 경우에도 동일하게 적용될 수 있다.
상기 (T_hi, T_vi)마다 이에 대응하는 S_i_pi(여기서, pi는 1, 2, 3, 4, 5, 6, 7 중 어느 하나임)를 기반으로 변환 세트를 구성함으로써, 전체 변환 커널 후보를 구성할 수 있다. 예를 들어, (T_h1, T_v1), (T_h2, T_v2)로 (KLT_h1, KLT_v1)과 (KLT_h2, KLT_v2)이 이용되는 경우, 다음과 같은 (1) 내지 (4)의 특정 변환 커널들을 각각 포함하는 변환 세트가 생성될 수 있다.
(1) (KLT_h1, KLT_v1), (KLT_h2, KLT_v2)
(2) (KLT_h1, KLT_v1), (KLT_h1, DCT-2), (DCT-2, KLT_v1), (KLT_h2, KLT_v2), (KLT_h2, DCT-2), (DCT-2, KLT_v2)
(3) (KLT_h1, KLT_v1), (KLT_h2, KLT_v2), (KLT_h2, DCT-2), (DCT-2, KLT_v2)
(4) (KLT_h1, KLT_v1), (KLT_h1, DCT-2), (DCT-2, KLT_v1), (KLT_h2, KLT_v2)
상기 예시에서 보듯이, DCT-2 또는 DST-7과 같은 삼각함수 기반의 변환 커널과의 페어링을 통해 하나 또는 그 이상의 특정 변환 커널이 생성될 수 있다. 마찬가지로, N개의 기준 변환 커널이 존재하는 경우, 각 기준 변환 커널을 기반으로 하나 또는 그 이상의 특정 변환 커널이 생성될 수 있다. 또한, 변환 세트에 따라서, 해당 기준 변환 커널이 포함될 수도 있고, 해당 기준 변환 커널이 포함되지 않을 수도 있다.
현재 블록의 컨텍스트에 따라, 현재 블록이 이용 가능한 변환 커널 후보의 개수가 상이할 수 있다. 예를 들어, 현재 블록 내 전부 또는 일부 변환 계수의 절대값의 합(AbsSum)에 따라, 현재 블록이 이용 가능한 변환 커널 후보의 개수(또는, 변환 세트의 크기)가 상이하게 설정될 수 있다. 설명의 편의를 위해, 본 예시에서는 AbsSum이 가질 수 있는 값의 범위가 3개의 범위로 구분되고, 이용 가능한 변환 커널 후보의 최대 개수가 3개임을 가정한다. 여기서, 각 변환 커널 후보를 c1, c2, c3로 각각 표기하기로 한다.
AbsSum이 가질 수 있는 값의 범위는, 변환 계수의 절대값의 합이 0보다 같거나 크고 6 이하인 제1 범위(Range_1), 변환 계수의 절대값의 합이 6보다 크고 32 이하인 제2 범위(Range_2) 및 변환 계수의 절대값의 합이 32보다 큰 제3 범위(Range_3)로 구분될 수 있다. 이 경우, 제1 및 제3 범위 별 이용 가능한 변환 커널 후보의 개수/위치는 다음 표 16과 같을 수 있다.
Range_1 Range_2 Range_3
Case 1 c1 c1, c2, c3 c1, c2, c3
Case 2 c1 c1 c1, c2, c3
Case 3 없음 c1, c2, c3 c1, c2, c3
Case 4 없음 c1 c1, c2, c3
표 16을 참조하면, 변환 계수의 절대값의 합이 Range_1에 속하는 경우, 현재 블록이 이용 가능한 변환 커널 후보의 개수는 1개이고, 그렇지 않은 경우(즉, Range_2 또는 Range_3에 속하는 경우), 현재 블록이 이용 가능한 변환 커널 후보의 개수는 3개일 수 있다(Case 1).
또는, 변환 계수의 절대값의 합이 Range_1 또는 Range_2에 속하는 경우, 현재 블록이 이용 가능한 변환 커널 후보의 개수는 1개이고, 그렇지 않은 경우(즉, Range_3에 속하는 경우), 현재 블록이 이용 가능한 변환 커널 후보의 개수는 3개일 수 있다(Case 2).
또는, 변환 계수의 절대값의 합이 Range_1에 속하는 경우, 현재 블록이 이용 가능한 변환 커널 후보가 존재하지 않고, 그렇지 않은 경우(즉, Range_2 또는 Range_3에 속하는 경우), 현재 블록이 이용 가능한 변환 커널 후보의 개수는 3개일 수 있다(Case 3).
또는, 변환 계수의 절대값의 합이 Range_1에 속하는 경우, 현재 블록이 이용 가능한 변환 커널 후보가 존재하지 않고, 변환 계수의 절대값의 합이 Range_2에 속하는 경우, 현재 블록이 이용 가능한 변환 커널 후보의 개수는 1개이고, 그렇지 않은 경우(즉, Range_3에 속하는 경우), 현재 블록이 이용 가능한 변환 커널 후보의 개수는 3개일 수 있다(Case 4).
현재 블록이 이용 가능한 변환 커널 후보의 개수가 1개인 경우, 해당 변환 커널 후보는 3개의 변환 커널 후보 중 가장 작은 인덱스를 가진 후보일 수 있다. 현재 블록이 이용 가능한 변환 커널 후보가 존재하지 않는 경우, 특정 변환 커널이 아닌 다른 변환 커널이 적용되거나, (역)변환이 스킵될 수도 있다.
상기 (T_h, T_v)가 (KLT_h, KLT_v)인 경우, 변환 커널 후보인 특정 변환 커널은 (KLT_h, KLT_v), (KLT_h, DCT-2), (DCT-2, KLT_v)일 수 있다. 표 16에서와 같이, 특정 범위에 대해 1개의 변환 커널 후보만이 이용 가능하고, 특정 변환 커널이 적용되는 경우, 상기 1개의 변환 커널 후보를 지시하기 위한 인덱스의 시그날링이 생략될 수 있다. 또한, 표 16에서와 같이, 특정 범위에 대해 특정 변환 커널이 적용되지 않을 수 있으며, 이 경우 특정 변환 커널의 적용 여부를 나타내는 플래그의 시그날링도 생략될 수 있다.
상기 변환 계수의 절대값의 합을 기반으로 범위를 구분하는 경우, 변환 계수의 절대값의 합이 클수록 변환 계수 정보에 통계적인 특성이 다양하게 포함되어 있다고 볼 수 있으므로, 보다 많은 개수의 특정 변환 커널을 할당하여 코딩 성능을 높일 수 있다. 반면, 변환 계수의 절대값의 합이 작을수록 해당 통계적 특성이 단순하다고 볼 수 있으므로, 특정 변환 커널의 개수를 줄이는 것이 인덱스의 시그날링 코스트와 성능 향상 간의 trade-off 관점에서 유리할 수 있다.
(방법 6) 2개의 특정 변환 커널 간의 조합으로부터 4개의 특정 변환 커널이 결정될 수 있다. 여기서, 2개의 특정 변환 커널은, 전술한 방법 1 내지 3 중 적어도 하나에 의한 기준 변환 커널일 수 있다. 또는, 상기 2개의 특정 변환 커널은, 현재 블록을 위한 변환 세트에 기-추가된 특정 변환 커널일 수 있다. 예를 들어, MxN 크기의 현재 블록에 대한 특정 변환 커널 (T_h, T_v)에서, T_h로서 길이-M 변환 커널 H1과 H2가 이용될 수 있고, T_v로서 길이-N 변환 커널 V1과 V2가 이용될 수 있다. 이 경우, 이들의 조합을 통해, (H1, V1), (H1, V2), (H2, V1), (H2, V2)와 같은 4개의 특정 변환 커널이 구성될 수 있다.
본 실시예에서, 방법 1 내지 6 중 어느 하나를 기반으로 특정 변환 커널이 구성될 수도 있고, 방법 1 내지 6 중 적어도 둘의 조합을 기반으로 특졍 변환 커널이 구성될 수도 있다.
상기 4개의 특정 변환 커널 중 어느 하나를 기반으로 현재 블록의 변환 커널이 결정될 수 있다. 이때, 4개의 특정 변환 커널 중 어느 하나를 지시하는 인덱스는, 비트스트림을 통해 시그날링되거나 현재 블록의 컨텍스트에 기초하여 묵시적으로 유도될 수도 있다. 여기서, 인덱스에 대한 이진화 방식으로 truncated unary code나 2개의 빈(bins)을 통한 fixed-length code 등이 이용될 수 있다. fixed-length code의 방식으로 인덱스를 할당할 경우, 00, 01, 10, 11이 된다. 해당 빈들에 대해 바이패스 코딩(bypass coding) 또는 CABAC context 기반의 코딩 중 적어도 하나가 적용될 수 있다.
상기 예시에서는 T_h와 T_v로서 각각 2개의 변환 커널이 이용되는 경우를 기반으로 하나, 이에 한정되지 아니한다. T_h과 T_v로서 각각 p개와 q개의 변환 커널이 이용 가능한 경우, 이들의 조합을 통해 최대 (p*q)개의 특정 변환 커널이 구성될 수 있다. 이러한 (p*q)개의 특정 변환 커널 전부 또는 일부를 선택하여 변환 세트가 구성될 수 있다. 해당 변환 세트에서 어느 하나의 특정 변환 커널을 선택하기 위한 인덱스는, 비트스트림을 통해 시그날링되거나, 현재 블록의 컨텍스트에 기초하여 묵시적으로 유도될 수 있다. 여기서, 인덱스에 대한 이진화 방식으로 truncated unary code나 2개의 빈(bins)을 통한 fixed-length code 등이 이용될 수 있다. fixed-length code의 방식으로 인덱스를 할당할 경우, 00, 01, 10, 11이 된다. 해당 빈들에 대해 바이패스 코딩(bypass coding) 또는 CABAC context 기반의 코딩 중 적어도 하나가 적용될 수 있다.
실시예 6
전술한 (비분리) 변환 세트 또는 변환 세트들의 그룹(컬렉션, collection)은, 전술한 MTS 세트와 함께 인코딩 장치와 디코딩 장치에 정의될 수 있고, 이 중 어느 하나를 선택적으로 이용할 수 있다. 예를 들어, 현재 블록에 (비분리) 변환 세트가 적용되는지 여부를 나타내는 제1 플래그가 시그날링될 수 있다. 제1 플래그가 제1 값인 경우, 현재 블록의 변환 커널은 (비분리) 변환 세트를 기반으로 결정되고, 상기 제1 플래그가 제2 값인 경우, 현재 블록의 변환 커널은 MTS 세트를 기반으로 결정될 수 있다. 또는, 현재 블록에 컬렉션이 적용되는지 여부를 나타내는 제2 플래그가 시그날링될 수 있다. 상기 제2 플래그가 제1 값인 경우, 현재 블록의 변환 커널은 상기 컬렉션을 기반으로 결정되고, 상기 제2 플래그가 제2 값인 경우, 현재 블록의 변환 커널은 MTS 세트를 기반으로 결정될 수 있다.
이하, 설명의 편의를 위해, 변환 세트라는 용어를 사용하나, 이는 비분리 변환 세트로 대체되어 이해될 수도 있다.
현재 블록에 변환 세트가 적용되는 것으로 결정된 경우, 변환 세트에 속한 복수의 변환 커널 후보 중 어느 하나를 기반으로 현재 블록의 변환 커널이 결정될 수 있다. 이때, 변환 세트에 속한 복수의 변환 커널 후보 중 어느 하나를 선택하기 위한 인덱스가 시그날링될 수 있다.
만일 변환 세트에 하나의 변환 커널 후보가 존재하는 경우, 해당 인덱스의 시그날링은 생략될 수 있고, 변환 세트에 2개의 변환 커널 후보가 존재하는 경우, 1개의 빈(bin)으로 해당 인덱스가 시그날링될 수 있다. 또는, 변환 세트에 3개 이상의 변환 커널 후보가 존재하는 경우, 다양한 방법으로 해당 인덱스가 시그날링될 수 있다. 구체적으로 다음과 같은 방법이 적용될 수 있다.
(방법 1) 변환 세트에 3개의 변환 커널 후보가 존재하는 경우, 2개의 빈(bins)으로 구성된 인덱스를 가지고 3개의 변환 커널 후보를 구분할 수 있다. 첫번째 빈을 기반으로 1개의 변환 커널 후보와 나머지 2개의 변환 커널 후보를 구분할 수 있다. 예를 들어, 첫번째 빈의 값이 0인 경우, 상기 1개의 변환 커널 후보가 선택되고, 첫번째 빈의 값이 1인 경우, 상기 나머지 2개의 변환 커널 후보 중 어느 하나를 선택하기 위한 두번째 빈이 시그날링될 수 있다. 상기 두번째 빈을 기반으로 나머지 2개의 변환 커널 후보 중 어느 하나를 특정할 수 있다.
이때, 상기 인덱스의 이진화 방식은 truncated unary code일 수 있다. 첫번째 빈을 기반으로 구분되는 상기 1개의 변환 커널 후보는 가장 짧은 코드워드(codeword)로 지정이 가능하므로, 확률적으로 가장 많이 발생하거나 코딩 성능 향상에 가장 유리한 후보일 수 있다. 만일 상기 1개의 변환 커널 후보가 발생할 확률이 상당히 높다면, 해당 첫번째 빈을 코딩하기 위해 CABAC context가 할당될 수 있다. 나머지 2개의 변환 커널 후보 중 어느 하나를 선택하기 위한 두번째 빈을 코딩할 때, 나머지 2개의 변환 커널 후보 간의 발생 확률의 차이가 크다면, 두번째 빈에 대해서도 CABAC context가 할당될 수 있다.
예를 들어, 기준 변환 커널 (T_h, T_v)으로 (KLT_h, KLT_v)가 이용되고, DCT-2와의 페어링되는 경우, 현재 블록에 대해 3개의 변환 커널 후보로서, (KLT_h, KLT_v), (KLT_h, DCT-2) 및 (DCT-2, KLT_v)이 이용될 수 있다. 이 경우, 첫번째 빈에 의해서 (KLT_h, KLT_v)의 변환 커널 후보가 특정될 수 있고, 두번째 빈에 의해 (KLT_h, DCT-2) 또는 (DCT-2, KLT_v) 중 어느 하나가 특정될 수 있다.
(방법 2) 변환 세트에 속한 변환 커널 후보의 개수가 2의 거듭제곱(Exponentiation)승인 경우(e.g., 4개, 8개, 16개), 고정 길이 코드(fixed length code)를 기반으로 해당 후보들이 구분될 수 있다. 고정 길이 코드는 변환 커널 후보들 간의 발생 확률의 차이가 크지 않은 경우에 사용하는 것이 유리할 수 있다. 변환 커널 후보의 개수가 2의 거듭제곱승이 아닌 경우, 상기 방법 1과 같이, truncated unary code가 이용되거나, truncated binary code가 이용될 수 있다. 이때, 보다 발생 확률이 높은 변환 커널 후보에 대해 짧은 코드를 할당함으로써 코딩 성능을 향상시킬 수 있다.
(방법 3) 현재 블록의 전부 또는 일부 변환 계수의 절대값의 합(AbsSum)에 따라 현재 블록이 이용 가능한 변환 커널 후보의 개수가 상이할 수 있다. 상기 AbsSum이 가질 수 있는 값의 범위는 복수의 범위로 구분될 수 있다. 상기 AbsSum이 속한 범위에 따라, (a) 상기 변환 세트가 적용되지 않거나, (b) 상기 변환 세트에 현재 블록이 이용 가능한 변환 커널 후보의 개수가 1개이거나, (c) 상기 변환 세트에 현재 블록이 이용 가능한 변환 커널 후보의 개수가 2개이거나, (d) 상기 변환 세트에 현재 블록이 이용 가능한 변환 커널 후보의 개수가 3개 또는 그 이상일 수 있다. 예를 들어, 이는 실시예 5의 표 16을 참조하여 살펴본 바와 같다.
상기 (a)의 경우, 현재 블록에 변환 세트가 적용되는지 여부를 나타내는 제1 플래그의 시그날링이 생략될 수 있다. 상기 제1 플래그는 제2 값으로 유도될 수 있고, 현재 블록에 MTS 세트가 적용될 수 있다. 상기 (b)의 경우, 현재 블록에 변환 세트가 적용되는지 여부를 나타내는 제1 플래그가 시그날링될 수 있다. 상기 변환 세트에 속한 1개의 변환 커널 후보를 기반으로 현재 블록의 변환 커널이 결정될 수 있다. 상기 (c)의 경우, 현재 블록에 변환 세트가 적용되는지 여부를 나타내는 제1 플래그가 시그날링되고, 2개의 변환 커널 후보 중 어느 하나를 나타내는 인덱스가 시그날링될 수 있다. 여기서, 인덱스는 1개의 빈으로 구성될 수 있다. 상기 (d)의 경우, 현재 블록에 변환 세트가 적용되는지 여부를 나타내는 제1 플래그가 시그날링되고, 변환 세트에 속한 3개 또는 그 이상의 변환 커널 후보 중 어느 하나를 나타내는 인덱스가 시그날링될 수 있다. 여기서, 인덱스는 전술한 방법 1에 따라 시그날링될 수 있다.
현재 블록이 이용 가능한 변환 커널 후보의 종류 및/또는 개수는 현재 블록의 컨텍스트에 기초하여 상이할 수 있다. 따라서, 현재 블록의 컨텍스트에 따라 시그날링 방식이 다를 수 있다.
예를 들어, 상기 AbsSum에 따라 변환 커널 후보의 개수가 상이할 수 있다. 현재 블록이 이용 가능한 변환 커널 후보의 개수가 1개인 경우, 해당 후보를 지시하기 위한 인덱스의 시그날링이 생략될 수 있다. 현재 블록이 이용 가능한 변환 후보의 개수가 3개인 경우, 전술한 방법 1에 따라 인덱스가 시그날링될 수 있다. 또한, 현재 블록이 이용 가능한 변환 커널 후보가 존재하지 않는 경우, 현재 블록에 변환 세트가 적용되는지 여부를 나타내는 제1 플래그의 시그날링 역시 생략될 수 있다.
현재 블록 내 전부 또는 일부 변환 계수의 절대값의 합을 기반으로, 현재 블록에 변환 세트가 적용되는지 여부 또는 현재 블록에 MTS 세트가 적용되는지 여부가 유도될 수 있다. 이 경우, 현재 블록에 변환 세트가 적용되는지 여부를 나타내는 제1 플래그의 시그날링이 생략될 수 있다. 예를 들어, 현재 블록 내 전부 또는 일부 변환 계수의 절대값 합이 6보다 작거나 같은 경우, 현재 블록에 변환 세트가 적용되는 것으로 유도되고, 상기 제1 플래그의 시그날링이 생략될 수 있다.
전술한 실시예에서의 특정 변환 커널과 MTS 세트의 변환 커널 후보를 조합한 하나의 변환 세트 또는 갱신된 MTS 세트가 구성될 수도 있다. 다시 말해, 전술한 MTS 세트에 하나 또는 그 이상의 특정 변환 커널이 추가될 수 있다. 반대로, 하나 또는 그 이상의 특정 변환 커널에 MTS 세트 내 하나 또는 그 이상의 변환 커널 후보가 추가될 수도 있다. 상기 조합된 변환 세트 또는 갱신된 MTS 세트 내 복수의 변환 커널 후보 중 어느 하나를 기반으로 현재 블록의 변환 커널이 결정될 수 있다.
현재 블록 내 전부 또는 일부 변환 계수의 절대값의 합(또는 해당 합이 속한 범위)에 따라, 조합된 변환 세트 또는 갱신된 MTS 세트 내에서 현재 블록이 이용 가능한 변환 커널 후보의 개수는 증가될 수 있다.
상기 조합된 변환 세트 또는 갱신된 MTS 세트 내 복수의 변환 커널 후보 중 어느 하나를 지시하는 인덱스가 시그날링될 수 있다. 이때, 해당 인덱스는 조합된 변환 세트 또는 갱신된 MTS 세트 내 복수의 변환 커널 후보를 기반으로 부호화된 것일 수 있다. 또는, 상기 인덱스는, 명시적인 시그날링없이, 현재 블록의 컨텍스트에 기초하여 묵시적으로 유도될 수도 있다.
이하, MTS 세트에 특정 변환 커널을 추가하는 방법에 대해서 자세히 살펴보도록 한다.
먼저, 현재 블록의 크기 또는 인트라 예측 모드(MIP 모드 포함) 중 적어도 하나에 기초하여, 현재 블록을 위한 MTS 세트가 선택될 수 있다. 선택된 MTS 세트에 전술한 하나 또는 그 이상의 특정 변환 커널이 추가될 수 있다.
구체적으로, 상기 특정 변환 커널은, MTS 세트 내 첫번째 변환 커널 후보의 앞에 추가될 수 있다. 이 경우, 상기 특정 변환 커널은 상기 MTS 세트 내 첫번째 변환 커널 후보보다 작은 값의 인덱스를 가질 수 있다. 또는, 상기 특정 변환 커널은, MTS 내 마지막 변환 커널 후보의 뒤에 추가될 수 있다. 상기 특정 변환 커널이 앞에 추가된다는 것은, 특정 변환 커널의 우선순위가 MTS 세트 내 변환 커널 후보보다 높을 수 있다는 것을 의미한다. 반면, 상기 특정 변환 커널이 뒤에 추가된다는 것은, 특정 변환 커널의 우선순위가 MTS 세트 내 변환 커널 후보보다 낮을 수 있다는 것을 의미한다. 또는, MTS 세트의 변환 커널 후보와 특정 변환 커널을 shuffling할 수 있으며, 예를 들어, MTS 세트의 변환 커널 후보와 특정 변환 커널을 번갈아가면서 배열하는 방식이 이용될 수 있다. 이때, MTS 세트의 변환 커널 후보가 가장 먼저 배열될 수도 있고, 특정 변환 커널이 가장 먼저 배열될 수도 있다. 특정 변환 커널을 어떤 위치에 추가할지, MTS 세트의 변환 커널 후보와 어떻게 suffling할지 등은, 기-선택된 MTS 세트(또는, 기-선택된 MTS 세트의 인덱스, 기-선택된 MTS 세트에 속한 변환 커널 후보의 개수) 또는 현재 블록의 컨텍스트 중 적어도 하나에 기초하여 결정될 수 있다.
기-유도된/생성된 특정 변환 커널 전부가 MTS 세트가 추가될 수도 있고, 일부만이 선택적으로 MTS 세트가 추가될 수도 있다. 이는, 기-선택된 MTS 세트(또는, 기-선택된 MTS 세트의 인덱스, 기-선택된 MTS 세트에 속한 변환 커널 후보의 개수) 또는 현재 블록의 컨텍스트 중 적어도 하나에 따라 상이할 수 있다.
예를 들어, 상기 현재 블록의 AbsSum이 상기 Range_1 또는 Range_2에 속하는 경우, 현재 블록이 이용 가능한 변환 커널 후보의 개수가 MTS 세트에 속한 전체 변환 커널 후보의 개수보다 작으므로, 상기 특정 변환 커널의 일부만이 MTS 세트에 추가될 수 있다. 이는, Range_3 대비 통계적 특성이 다양하지 못해 적은 개수의 변환 커널 후보를 이용하고자 하는 것이므로, 추가되는 특정 변환 커널의 개수도 제한될 수 있다. 반대로, 상기 현재 블록의 AbsSum이 상기 Range_1 또는 Range_2에 속하는 경우, MTS 세트에서 이용 가능한 변환 커널 후보의 개수가 적기 때문에, 보다 많은 특정 변환 커널을 MTS 세트에 추가하는 것이 유리할 수도 있다. 이 경우, 특정 변환 커널을 모두 추가할 수도 있고, Range_3에서의 이용 가능한 개수보다 많은 개수를 추가할 수도 있다.
MTS 세트의 변환 커널 후보와 추가되는 특정 변환 커널의 총 개수가 제한될 수 있다. 상기 총 개수는, 현재 블록의 컨텍스트 또는 기-선택된 MTS 세트(또는, 기-선택된 MTS 세트의 인덱스, 기-선택된 MTS 세트에 속한 변환 커널 후보의 개수) 중 적어도 하나에 따라 상이할 수 있다. 예를 들어, Range_1에 대해 이용 가능한 변환 커널 후보의 총 개수가 2개로 제한될 수 있고, 이 경우 추가되는 특정 변환 커널의 개수는 1개 이하로 제한될 수 있다. Range_2에 대해 이용 가능한 변환 커널 후보의 총 개수가 6개로 제한될 수 있고, 이 경우 추가되는 특정 변환 커널의 개수는 2개 이하로 제한될 수 있다.
상기 이용 가능한 변환 커널 후보의 총 개수가 2의 거듭제곱승인 경우, 전체 변환 커널 후보 중 어느 하나를 지시하는 인덱스에 대한 이진화 방식으로 고정 길이 코드가 이용되거나, truncated unary code가 이용될 수 있다. 상기 고정 길이 코드는 후보들 간 발생 확률의 차이가 크지 않은 경우에 유리할 수 있고, truncated unary code는 후보들 간 발생 확률의 차이가 큰 경우에 유리할 수 있다. 또는, 상기 이용 가능한 변환 커널 후보의 총 개수가 2의 거듭제곱승이 아닌 경우, 상기 인덱스에 대한 이진화 방식으로 truncated binary code 또는 truncated unary code가 이용될 수 있다. 상기 이진화를 통해 생성되는 빈(bins)에 대해서는 바이패스 코딩(bypass coding) 또는 CABAC context 기반의 코딩이 적용될 수 있다.
MTS 세트 내 변환 커널 후보 전부 또는 일부는 상기 특정 변환 커널로 대체될 수 있다. 이때, 대체되는 MTS 세트 내 변환 커널 후보의 위치/개수는, 현재 블록의 컨텍스트 또는 기-선택된 MTS 세트(또는, 기-선택된 MTS 세트의 인덱스, 기-선택된 MTS 세트에 속한 변환 커널 후보의 개수) 중 적어도 하나에 따라 상이할 수 있다. 예를 들어, Range_1에 대해서 MTS 세트 내 1개의 변환 커널 후보가 이용 가능하며, 해당 1개의 변환 커널 후보는 1개의 특정 변환 커널로 대체될 수 있다. Range_2에 대해서 이용 가능한 변환 커널 후보의 총 개수가 4개로 제한될 수 있고, 이 경우 3개의 변환 커널 후보는 MTS 세트 내 변환 커널 후보로 채우고, 나머지 1개는 특정 변환 커널로 채워질 수 있다. 상기 나머지 1개에 해당하는 특정 변환 커널은, MTS 세트로부터의 3개의 변환 커널 후보 다음에 채워지거나, MTS 세트로부터의 3개의 변환 커널 후보 이전에 채워질 수도 있다.
추가되는 특정 변환 커널이 MTS 세트 내 변환 커널 후보와 중복되는 경우가 발생할 수 있다. 이 경우, 해당 특정 변환 커널은 추가되지 않도록 제한될 수 있다. 또는, MTS 세트의 변환 커널 후보 중에서, 상기 특정 변환 커널과 중복되는 후보가 제거되고, 대신에 해당 특정 변환 커널을 소정의 위치에 배치할 수 있다. 이때, 소정의 위치는, 제거되는 변환 커널 후보와 동일한 위치이거나, MTS 세트 내 첫번째 변환 커널 후보 앞 또는 마지막 변환 커널 후보 뒤일 수 있다.
이하, 현재 블록의 AbsSum이 속하는 범위에 따라, 특정 변환 커널을 추가하는 방법에 대해서 자세히 살펴보기로 한다. 설명의 편의를 위해, 상기 AbsSum이 가질 수 있는 값의 범위는, 표 16에서 살펴본 3개의 범위 즉, Range_1, Range_2 및 Range_3로 구분됨을 가정한다.
Range_1에 대해서, MTS 세트 내 1개의 변환 커널 후보가 1개의 특정 변환 커널로 대체될 수 있다. 또는, MTS 세트 내 1개의 변환 커널 후보의 앞 또는 뒤에 1개의 특정 변환 커널이 추가될 수 있다. 이 경우, 2개의 변환 커널 후보 중 어느 하나를 지시하는 인덱스가 시그날링될 수 있다. 해당 인덱스는 1개의 빈(bin)으로 구성될 수 있다.
Range_2에 대해서, MTS 세트 내 4개의 변환 커널 후보의 앞 또는 뒤에 1개의 특정 변환 커널이 추가될 수 있다. 또는, Range_2에 대해서, MTS 세트 내 4개의 변환 커널 후보의 앞 또는 뒤에 3개의 특정 변환 커널이 추가될 수 있다. 또는, Range_2에 대해서, MTS 세트 내 4개의 변환 커널 후보 중 마지막 후보는 1개의 특정 변환 커널로 대체될 수 있다. 또는, Range_2에 대해서, MTS 세트 내 4개의 변환 커널 후보 중 마지막 후보는 제거될 수 있고, 1개의 특정 변환 커널이 MTS 세트 내 나머지 3개의 변환 커널 후보의 앞에 추가되거나, 두번째 변환 커널 후보로 추가될 수 있다. 또는, Range_2에 대해서, MTS 세트 내 변환 커널 후보 중 어느 하나를 제외한 나머지 후보들은 제거되고, 3개의 특정 변환 커널이 남겨진 1개의 변환 커널 후보의 앞 또는 뒤에 추가될 수 있다.
Range_3에 대해서, MTS 세트 내 6개의 변환 커널 후보의 앞 또는 뒤에 1개, 2개, 또는 3개의 특정 변환 커널이 추가될 수 있다. 또는, 어느 하나의 특정 변환 커널은 두번째 변환 커널 후보로 추가되고, 나머지 특정 변환 커널은 MTS 세트에 추가되지 않거나 마지막에 추가될 수 있다. 여기서, 상기 어느 하나의 특정 변환 커널은, 복수의 특정 변환 커널 중 가장 작은 인덱스를 가진 후보일 수 있다.
현재 블록이 이용 가능한 변환 커널 후보의 총 개수가 6개로 제한되는 경우, Range_3에 대해서 MTS 세트 내 변환 커널 후보 중 마지막 1개(또는, 2개 또는 3개)의 후보는 제거되고, 1개(또는, 2개 또는 3개)의 특정 변환 커널이 MTS 세트에 추가될 수 있다. 이 경우, 추가되는 특정 변환 커널은 제거된 변환 커널 후보의 위치에 추가되거나, MTS 세트 내 남겨진 변환 커널 후보의 앞에 추가될 수 있다.
현재 블록이 이용 가능한 변환 커널 후보의 총 개수가 8개로 제한되는 경우, Range_3에 대해서 MTS 세트 내 변환 커널 후보를 그대로 두고 2개의 특정 변환 커널이 MTS 세트 내 변환 커널 후보의 앞 또는 뒤에 추가될 수 있다. 또는, Range_3에 대해서 MTS 세트 내 변환 커널 후보 중 마지막에 위치한 후보는 제거되고, 3개 또는 그 이상의 특정 변환 커널이 MTS 세트 내 남겨진 변환 커널 후보의 앞 또는 뒤에 추가될 수 있다.
현재 블록의 변환 커널은, 전술한 실시예 1 내지 6 중 어느 하나를 기반으로 결정될 수 있다. 또는, 현재 블록의 변환 커널은, 전술한 실시예 1 내지 6에 따른 발명이 서로 충돌되지 않는 범위 내에서, 실시예 1 내지 6 중 적어도 둘의 조합에 기초하여 결정될 수도 있다.
도 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를 참조하여 살펴본 바와 같으며, 여기서 자세한 설명은 생략하기로 한다. 즉, 전술한 실시예 1 내지 6 중 적어도 하나에 기초하여, 상기 변환을 위한 변환 커널을 결정할 수 있다.
예를 들어, 실시예 1과 같이, 현재 블록의 변환을 위한 하나 또는 그 이상의 변환 세트가 정의/구성될 수 있고, 각 변환 세트는 하나 또는 그 이상의 변환 커널 후보를 포함할 수 있다. 이때, 복수의 변환 세트로부터 어느 하나가 현재 블록의 변환 세트로 선택될 수 있다. 현재 블록의 변환 세트에 속한 복수의 변환 커널 후보 중 어느 하나가 선택될 수 있다. 상기 선택은, 현재 블록의 컨텍스트를 기반으로 묵시적으로 수행될 수 있다. 또는, 현재 블록을 위한 최적의 변환 세트 및/또는 변환 커널 후보를 선택하고, 이를 지시하는 인덱스가 시그날링될 수도 있다.
또는, 실시예 2와 같이, 현재 블록의 변환 커널은 MTS 세트를 기반으로 결정될 수 있다. 현재 블록의 크기 또는 인트라 예측 모드 중 적어도 하나를 기반으로, 복수의 MTS 세트 중 어느 하나가 선택될 수 있다. 선택된 MTS 세트는 하나 또는 그 이상의 변환 커널 후보를 포함할 수 있다. 상기 하나 또는 그 이상의 변환 커널 후보 중 어느 하나가 선택될 수 있고, 선택된 변환 커널 후보를 기반으로 현재 블록의 변환 커널이 결정될 수 있다. 상기 변환 커널 후보의 선택은, 현재 블록의 컨텍스트를 기반으로 유도된 변환 커널 후보 인덱스를 이용하여 수행될 수 있다. 또는, 현재 블록을 위한 최적의 변환 커널 후보가 선택되고, 선택된 변환 커널 후보를 지시하는 변환 커널 후보 인덱스가 시그날링될 수도 있다.
또는, 실시예 3과 같이, 현재 블록의 변환 커널은 하나 또는 그 이상의 특정 변환 커널로 구성된 변환 세트를 기반으로 결정될 수 있다.
또는, 실시예 4와 같이, 현재 블록의 변환 커널은, 인트라 예측 모드들과 변환 세트들 간의 매핑 관계를 정의하는 매핑 테이블을 기반으로 결정될 수 있다. 여기서, 매핑 테이블은 인트라 예측 모드들 및/또는 블록 형태 간의 대칭성을 고려하여 정의된 것일 수 있다.
또는, 실시예 5와 같이, 방법 1 내지 방법 6 중 어느 하나 또는 적어도 둘의 조합에 기초하여 특정 변환 커널이 구성되고, 구성된 특정 변환 커널로부터 현재 블록의 변환 커널이 결정될 수 있다.
또는, 실시예 6과 같이, (비분리) 변환 세트, 변환 세트들의 그룹, 또는 MTS 세트 중 어느 하나를 선택적으로 이용하여 현재 블록의 변환 커널이 결정될 수 있다. 이를 위한 플래그 또는 인덱스 중 적어도 하나가 정의되고 시그날링될 수 있다. 또한, MTS 세트에 특정 변환 커널을 추가하거나 특졍 변환 커널에 MTS. 세트 내 하나 또는 그 이상의 변환 커널 후보를 추가하여, 현재 블록을 위한 조합된 변환 세트 또는 갱신된 MTS 세트가 구성될 수 있다. 이러한 조합된 변환 세트 또는 갱신된 MTS 세트로부터의 어느 하나의 변환 커널 후보를 기반으로 현재 블록의 변환 커널이 결정될 수도 있다.
또는, 실시예 1 내지 6 중 적어도 둘의 조합에 기초하여 현재 블록의 변환 커널이 결정될 수도 있다.
도 7을 참조하면, 현재 블록의 변환 계수를 부호화하여 비트스트림을 생성할 수 있다(S720).
상기 현재 블록의 변환 계수를 기반으로, 상기 변환 계수에 관한 레지듀얼 정보가 생성될 수 있고, 레지듀얼 정보를 부호화하여 비트스트림이 생성될 수 있다.
도 8은 본 개시에 따른 영상 인코딩 방법을 수행하는 인코딩 장치(200)의 개략적인 구성을 도시한 것이다.
도 8을 참조하면, 본 개시에 따른 인코딩 장치(200)는, 레지듀얼 샘플 유도부(800), 변환 계수 유도부(810) 및 변환 계수 인코딩부(820)를 포함할 수 있다. 레지듀얼 샘플 유도부(800)와 변환 계수 유도부(810)는 도 2의 레지듀얼 처리부(230)에 구성될 수 있고, 변환 계수 인코딩부(820)는 도 2의 엔트로피 인코딩부(240)에 구성될 수 있다.
레지듀얼 샘플 유도부(800)는, 현재 블록의 원본 샘플에서 예측 샘플을 차분하여 현재 블록의 레지듀얼 샘플을 유도할 수 있다. 여기서, 예측 샘플은, 소정의 인트라 예측 모드에 기초하여 유도된 것일 수 있다.
변환 계수 유도부(810)는, 현재 블록의 레지듀얼 샘플에 변환 또는 양자화 중 적어도 하나를 수행하여 현재 블록의 변환 계수를 유도할 수 있다. 변환 계수 유도부(810)는, 전술한 실시예 1 내지 6 중 어느 하나 또는 적어도 둘의 조합에 기초하여 현재 블록의 변환 커널을 결정하고, 현재 블록의 레지듀얼 샘플에 상기 변환 커널을 적용하여 변환 계수를 유도할 수 있다.
변환 계수 인코딩부(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 (11)

  1. 현재 블록에 대한 변환 세트를 구성하는 단계; 여기서, 상기 변환 세트는, 현재 블록이 이용 가능한 복수의 변환 커널 후보를 포함함,
    상기 복수의 변환 커널 후보 중 어느 하나를 지시하는 변환 커널 후보 인덱스에 기초하여, 상기 변환 세트로부터 상기 현재 블록의 변환 커널을 결정하는 단계;
    상기 현재 블록의 변환 커널을 기반으로 상기 현재 블록에 역변환을 수행하여, 상기 현재 블록의 레지듀얼 샘플을 유도하는 단계; 및
    상기 현재 블록의 레지듀얼 샘플을 기반으로 상기 현재 블록을 복원하는 단계를 포함하는, 영상 디코딩 방법.
  2. 제1항에 있어서,
    상기 변환 커널 후보 인덱스의 이진화는, 상기 변환 세트에 포함된 변환 커널 후보의 개수에 기초하여, truncated unary 코드 또는 고정 길이 코드 중 어느 하나로 결정되는, 영상 디코딩 방법.
  3. 제1항에 있어서,
    상기 변환 세트는, Multiple Transform Selection (MTS) 세트에 특정 변환 커널을 추가하여 구성되고,
    상기 특정 변환 커널은, 기준 변환 커널 또는 상기 기준 변환 커널을 기반으로 유도되는 하나 또는 그 이상의 변환 커널 중 적어도 하나를 포함하는, 영상 디코딩 방법.
  4. 제3항에 있어서,
    상기 특정 변환 커널은, 상기 MTS 세트 내 첫번째 변환 커널 후보의 앞 또는 상기 MTS 세트 내 마지막 변환 커널 후보의 뒤에 추가되는, 영상 디코딩 방법.
  5. 제3항에 있어서,
    상기 MTS 세트 내 하나 또는 그 이상의 변환 커널 후보는, 상기 추가되는 특정 변환 커널에 의해 대체되는, 영상 디코딩 방법.
  6. 제3항에 있어서,
    상기 MTS 세트에 추가되는 특정 변환 커널의 개수는, 상기 현재 블록의 컨텍스트 또는 상기 MTS 세트 인덱스 중 적어도 하나에 기초하여 결정되는, 영상 디코딩 방법.
  7. 제6항에 있어서,
    상기 MTS 세트에 추가되는 특정 변환 커널의 개수는, 상기 현재 블록 내 전부 또는 일부 변환 계수의 절대값의 합에 기초하여 가변적으로 결정되는, 영상 디코딩 방법.
  8. 제1항에 있어서,
    상기 현재 블록이 이용 가능한 변환 커널 후보의 총 개수는, 상기 현재 블록의 컨텍스트 또는 MTS 세트 인덱스 중 적어도 하나에 따라 상이하게 설정되는, 영상 디코딩 방법.
  9. 현재 블록에 대한 변환 세트를 구성하는 단계; 여기서, 상기 변환 세트는, 현재 블록이 이용 가능한 복수의 변환 커널 후보를 포함함,
    상기 변환 세트 내 복수의 변환 커널 후보 중 어느 하나를 기반으로 상기 현재 블록의 변환 커널을 결정하는 단계;
    상기 현재 블록의 변환 커널을 기반으로 상기 현재 블록에 변환을 수행하여, 상기 현재 블록의 변환 계수를 유도하는 단계; 및
    상기 현재 블록의 변환 계수에 관한 레지듀얼 정보를 부호화하는 단계를 포함하되,
    상기 레지듀얼 정보는, 상기 복수의 변환 커널 후보 중 어느 하나를 지시하는 변환 커널 후보 인덱스를 포함하는, 영상 인코딩 방법.
  10. 제9항에 따른 영상 인코딩 방법에 의해 생성된 비트스트림을 저장하는 컴퓨터 판독 가능한 저장 매체.
  11. 영상 정보에 대한 비트스트림을 획득하는 단계; 여기서, 상기 비트스트림은, 현재 블록에 대한 변환 세트를 구성하고, 상기 변환 세트 내 복수의 변환 커널 후보 중 어느 하나를 기반으로 상기 현재 블록의 변환 커널을 결정하고, 상기 현재 블록의 변환 커널을 기반으로 상기 현재 블록에 변환을 수행하여 상기 현재 블록의 변환 계수를 유도하고, 상기 현재 블록의 변환 계수에 관한 레지듀얼 정보를 부호화하여 생성됨, 및
    상기 비트스트림을 포함한 데이터를 전송하는 단계를 포함하되,
    상기 변환 세트는, 현재 블록이 이용 가능한 복수의 변환 커널 후보를 포함하고,
    상기 레지듀얼 정보는, 상기 복수의 변환 커널 후보 중 어느 하나를 지시하는 변환 커널 후보 인덱스를 포함하는, 데이터 전송 방법.
PCT/KR2023/015764 2022-10-12 2023-10-12 영상 인코딩/디코딩 방법 및 장치, 그리고 비트스트림을 저장한 기록 매체 WO2024080797A1 (ko)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US202263415615P 2022-10-12 2022-10-12
US63/415,615 2022-10-12

Publications (1)

Publication Number Publication Date
WO2024080797A1 true WO2024080797A1 (ko) 2024-04-18

Family

ID=90670006

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2023/015764 WO2024080797A1 (ko) 2022-10-12 2023-10-12 영상 인코딩/디코딩 방법 및 장치, 그리고 비트스트림을 저장한 기록 매체

Country Status (1)

Country Link
WO (1) WO2024080797A1 (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 프라운호퍼 게젤샤프트 쭈르 푀르데룽 데어 안겐반텐 포르슝 에. 베. 변환 세트
KR20200144511A (ko) * 2019-06-18 2020-12-29 한국전자통신연구원 2차 변환을 이용한 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
KR20210142642A (ko) * 2019-04-05 2021-11-25 퀄컴 인코포레이티드 비디오 코딩을 위한 확장된 다중 변환 선택
KR20220031030A (ko) * 2019-06-25 2022-03-11 브리티쉬브로드캐스팅코퍼레이션 비디오 코덱에서 시그널링하는 방법
US20220312040A1 (en) * 2019-05-31 2022-09-29 Interdigital Vc Holdings, Inc. Transform selection for implicit multiple transform selection

Patent 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 프라운호퍼 게젤샤프트 쭈르 푀르데룽 데어 안겐반텐 포르슝 에. 베. 변환 세트
KR20210142642A (ko) * 2019-04-05 2021-11-25 퀄컴 인코포레이티드 비디오 코딩을 위한 확장된 다중 변환 선택
US20220312040A1 (en) * 2019-05-31 2022-09-29 Interdigital Vc Holdings, Inc. Transform selection for implicit multiple transform selection
KR20200144511A (ko) * 2019-06-18 2020-12-29 한국전자통신연구원 2차 변환을 이용한 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
KR20220031030A (ko) * 2019-06-25 2022-03-11 브리티쉬브로드캐스팅코퍼레이션 비디오 코덱에서 시그널링하는 방법

Similar Documents

Publication Publication Date Title
WO2020009556A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2020213944A1 (ko) 영상 코딩에서 매트릭스 기반의 인트라 예측을 위한 변환
WO2020213946A1 (ko) 변환 인덱스를 이용하는 영상 코딩
WO2020162690A1 (ko) 축소된 변환을 사용하여 비디오 신호를 처리하기 위한 방법 및 장치
WO2020055014A1 (ko) 레지듀얼 코딩 방법 및 그 장치
WO2020213945A1 (ko) 인트라 예측 기반 영상 코딩에서의 변환
WO2021096172A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021096290A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021054783A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021060905A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2020256482A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021054798A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021054787A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021025530A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021137556A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021010680A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021086149A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021025526A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021096293A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021071283A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2020185005A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2020149594A1 (ko) 영상 코딩 시스템에서 고주파 제로잉을 기반으로 레지듀얼 정보를 코딩하는 영상 디코딩 방법 및 그 장치
WO2024080797A1 (ko) 영상 인코딩/디코딩 방법 및 장치, 그리고 비트스트림을 저장한 기록 매체
WO2024080795A1 (ko) 영상 인코딩/디코딩 방법 및 장치, 그리고 비트스트림을 저장한 기록 매체
WO2024080798A1 (ko) 영상 인코딩/디코딩 방법 및 장치, 그리고 비트스트림을 저장한 기록 매체