WO2020050651A1 - Multiple transform selection-based image coding method and device therefor - Google Patents

Multiple transform selection-based image coding method and device therefor Download PDF

Info

Publication number
WO2020050651A1
WO2020050651A1 PCT/KR2019/011486 KR2019011486W WO2020050651A1 WO 2020050651 A1 WO2020050651 A1 WO 2020050651A1 KR 2019011486 W KR2019011486 W KR 2019011486W WO 2020050651 A1 WO2020050651 A1 WO 2020050651A1
Authority
WO
WIPO (PCT)
Prior art keywords
transform
kernel
information
index
mts
Prior art date
Application number
PCT/KR2019/011486
Other languages
French (fr)
Korean (ko)
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 WO2020050651A1 publication Critical patent/WO2020050651A1/en

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/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/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/18Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a set of transform coefficients
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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 an image coding technique, and more particularly, to an image coding method and apparatus based on multiple transform selection in an image coding system.
  • VR Virtual Reality
  • AR Artificial Realtiy
  • holograms video / video having video characteristics different from reality videos such as game videos.
  • the broadcast for is increasing.
  • a high-efficiency video / video compression technology is required to effectively compress, transmit, store, and reproduce information of a high-resolution, high-quality video / video having various characteristics as described above.
  • An object of the present invention is to provide a method and apparatus for improving image coding efficiency.
  • Another technical problem of the present invention is to provide a method and apparatus for increasing conversion efficiency.
  • Another technical problem of the present invention is to provide an image coding method and apparatus based on multiple transform selection.
  • Another technical problem of the present invention is to provide a method and apparatus for coding information on multiple transform selection that can increase coding efficiency.
  • an image decoding method performed by a decoding apparatus includes obtaining prediction mode information, residual information, and transform index information from a bitstream, deriving a prediction mode for a current block based on the prediction mode information, and when the prediction mode is an intra prediction mode, Deriving prediction samples by performing intra prediction on the current block, deriving quantized transform coefficients for the current block based on the residual information, and performing inverse quantization based on the quantized transform coefficients Deriving transform coefficients, deriving a horizontal transform kernel and a vertical transform kernel based on the transform index information, and performing inverse transform on the transform coefficients based on the horizontal transform kernel and the vertical transform kernel to Deriving residual samples for the current block, and phase And generating a reconstructed picture based on the predicted samples and the residual samples, and deriving the horizontal transform kernel and the vertical transform kernel include transforms corresponding to the transform index information from a plurality of transform combinations. And selecting the combination, and deriving the horizontal transform kernel and the vertical transform kernel include transforms corresponding to the transform index
  • an image encoding method performed by an encoding device includes deriving a prediction mode for a current block, when the prediction mode is an intra prediction mode, performing intra prediction on the current block to derive prediction samples, and based on the prediction samples Deriving residual samples for, deriving a horizontal transform kernel and a vertical transform kernel applied to residual samples of the current block, and generating transform index information based on the horizontal transform kernel and the vertical transform kernel Performing transformation on the residual samples based on the horizontal transform kernel and the vertical transform kernel to derive transform coefficients for the current block, and quantized by performing quantization based on the transform coefficients Deriving transform coefficients, based on the quantized transform coefficients Generating residual information, and encoding image information including the prediction mode information, the residual information, and the transform index information, wherein the transform index information is the horizontal transform among a plurality of transform combinations. Characterized in that it represents a combination of a transformation including a kernel and the vertical transformation kernel.
  • FIG. 1 schematically shows an example of a video / image coding system to which the present invention can be applied.
  • FIG. 2 is a diagram schematically illustrating a configuration of a video / video encoding apparatus to which the present invention can be applied.
  • FIG. 3 is a diagram schematically illustrating a configuration of a video / video decoding apparatus to which the present invention can be applied.
  • FIG. 4 is a diagram schematically illustrating a multiplexing technique according to the present invention.
  • FIG. 5 is a flowchart illustrating a process of determining a transform combination according to whether multiple transform selection (MTS or EMT) is applied according to an embodiment of the present invention.
  • FIGS. 6 and 7 are diagrams for explaining a non-separated quadratic transform (NSST) according to an embodiment of the present invention.
  • FIG 8 and 9 are views for explaining RST according to an embodiment of the present invention.
  • FIG. 10 is a flowchart illustrating an encoding process in which multiple transform selection is performed according to an embodiment of the present invention.
  • FIG. 11 is a flowchart illustrating a decoding process in which multiple transform selection is performed according to an embodiment of the present invention.
  • AMT flag multiple conversion selection flag
  • AMT index multiple conversion index
  • FIG. 13 is a flowchart illustrating a decoding process of applying a horizontal transform or a vertical transform to a row or column based on a multiple transform selection flag (AMT flag) and a multiple transform index (AMT index) according to an embodiment of the present invention.
  • AMT flag multiple transform selection flag
  • AMT index multiple transform index
  • FIG. 14 shows three forward scan sequences that can be applied to a 4x4 transform coefficient or a transform coefficient block (4x4 block, Coefficient Group (CG)) applied in the HEVC standard.
  • CG Coefficient Group
  • 15 and 16 are diagrams illustrating mapping of transform coefficients according to a diagonal scan order according to an embodiment of the present invention.
  • 17 is a flowchart schematically illustrating a decoding method for performing inverse transform according to an embodiment of the present invention.
  • FIG. 18 shows related components of a decoding apparatus for performing inverse transform according to an embodiment of the present invention.
  • 19 is a flowchart schematically illustrating a video / video encoding method by an encoding device according to an embodiment of the present invention.
  • FIG. 20 is a flowchart schematically illustrating a video / video decoding method by a decoding apparatus according to an embodiment of the present invention.
  • FIG. 21 shows an example of a content streaming system to which the invention disclosed in this document can be applied.
  • each configuration in the drawings described in the present invention is shown independently for convenience of description of the different characteristic functions, it does not mean that each configuration is implemented in separate hardware or separate software from each other.
  • two or more of each configuration may be combined to form one configuration, or one configuration may be divided into a plurality of configurations.
  • Embodiments in which each configuration is integrated and / or separated are also included in the scope of the present invention without departing from the spirit of the present invention.
  • VVC versatile video coding
  • EVC essential video coding
  • AV1 AOMedia Video 1
  • AVS2 2nd generation of audio video coding standard
  • next-generation video It can be applied to the method disclosed in the video coding standard (ex. H.267 or H.268, etc.).
  • video may refer to a set 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 constituting a part of a picture in coding.
  • a slice / tile may include one or more coding tree units (CTUs).
  • CTUs coding tree units
  • One picture may be composed of one or more slices / tiles.
  • One picture may be composed of one or more tile groups.
  • One tile group may include one or more tiles. The brick may represent a rectangular region of CTU rows within a tile in a picture.
  • Tiles can be partitioned into multiple bricks, and each brick can be composed of one or more CTU rows in the tile (A tile may be partitioned into multiple bricks, each of which consisting of one or more CTU rows within the tile ).
  • a tile that is not partitioned into multiple bricks may be also referred to as a brick.
  • a brick scan can indicate a specific sequential ordering of CTUs partitioning a picture, the CTUs can be aligned with a CTU raster scan within a brick, and the bricks in a tile can be aligned sequentially with a raster scan of the bricks of the tile.
  • A, and tiles in a picture can be sequentially aligned with a raster scan of the tiles of the picture
  • a brick scan is a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a brick , bricks within a tile are ordered consecutively in a raster scan of the bricks of the tile, and tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture).
  • a tile is a rectangular region of CTUs within a particular tile column and a particular tile row in a picture.
  • the tile column is a rectangular area of CTUs, the rectangular area has a height equal to the height of the picture, and the width can be specified by syntax elements in a picture parameter set (The tile column is a rectangular region of CTUs having a height equal to the height of the picture and a width specified by syntax elements in the picture parameter set).
  • the tile row is a rectangular region of CTUs, the rectangular region has a width specified by syntax elements in a picture parameter set, and the height can be the same as the height of the picture (The tile row is a rectangular region of CTUs having a height specified by syntax elements in the picture parameter set and a width equal to the width of the picture).
  • a tile scan can indicate a specific sequential ordering of CTUs partitioning a picture, the CTUs can be successively aligned with a CTU raster scan within a tile, and the tiles in a picture have been successively aligned with a raster scan of the tiles of the picture.
  • a tile scan is a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a tile whereas tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture).
  • a slice may include an integer number of bricks of a picture, and the integer number of bricks may be included in one NAL unit (A slice includes an integer number of bricks of a picture that may be exclusively contained in a single NAL unit). A slice may consist of either a number of complete tiles or only a consecutive sequence of complete bricks of one tile ).
  • Tile groups and slices can be used interchangeably in this document.
  • the tile group / tile group header in this document may be referred to as a slice / slice header.
  • a pixel or pel may mean a minimum unit constituting one picture (or image).
  • 'sample' may be used as a term corresponding to a pixel.
  • the sample may generally represent a pixel or a pixel value, may represent only a pixel / pixel value of a luma component, or may represent only a pixel / pixel value of a chroma component.
  • the sample may mean a pixel value in the spatial domain, or a conversion coefficient in the frequency domain when the pixel value is converted into the frequency domain.
  • the unit may represent a basic unit of image processing.
  • the unit may include at least one of a specific region of a picture and information related to the region.
  • One unit may include one luma block and two chroma (ex. Cb, cr) blocks.
  • the unit may be used interchangeably with terms such as a block or area depending on the case.
  • the MxN block may include samples (or sample arrays) of M columns and N rows or a set (or array) of transform coefficients.
  • a / B / C may mean” at least one of A, B, and / or C.
  • Also A / B / C “may mean” at least one of A, B, and / or C.
  • FIG. 1 schematically shows an example of a video / image coding system to which the present invention can be applied.
  • a video / image coding system may include a first device (source device) and a second device (receiving device).
  • the source device may transmit the encoded video / image information or data to a receiving device through a digital storage medium or network in the form of a file or streaming.
  • 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 apparatus, and a renderer.
  • the encoding device may be called a video / video encoding device, and the decoding device may be called a video / video decoding device.
  • the transmitter can be included in the encoding device.
  • the receiver may be included in the decoding device.
  • the renderer may include a display unit, and the display unit may be configured as a separate device or an external component.
  • the video source may acquire a video / image through a capture, synthesis, or generation process of the video / image.
  • the video source may include a video / image capture device and / or a video / image generation device.
  • the video / image capture device may include, for example, one or more cameras, a video / image archive including previously captured video / images, and the like.
  • the video / image generating device may include, for example, a computer, a tablet and a smart phone, and the like (electronically) to generate the video / image.
  • a virtual video / image may be generated through a computer or the like, and in this case, the video / image capture process may be replaced by a process in which related data is generated.
  • the encoding device can encode the input video / video.
  • the encoding apparatus may perform a series of procedures such as prediction, transformation, and quantization for compression and coding efficiency.
  • the encoded data (encoded video / video information) may be output in the form of a bitstream.
  • the transmitting unit may transmit the encoded video / video information or data output in the form of a bitstream to a receiving unit of a receiving device through a digital storage medium or a network in a file or streaming format.
  • the digital storage media may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD.
  • the transmission unit may include an element for generating a media file through a predetermined file format, and may include an element for transmission through a broadcast / communication network.
  • the receiver may receive / extract the bitstream and deliver it to a decoding device.
  • the decoding apparatus may decode a video / image by performing a series of procedures such as inverse quantization, inverse transformation, and prediction corresponding to the operation of the encoding apparatus.
  • the renderer can render the decoded video / image.
  • the rendered video / image may be displayed through the display unit.
  • the video encoding device may include a video encoding device.
  • the encoding device 200 includes an image partitioner 210, a predictor 220, a residual processor 230, and an entropy encoder 240. It may be configured to include an adder (250), a filtering unit (filter, 260) and a memory (memory, 270).
  • the prediction unit 220 may include an inter prediction unit 221 and an intra prediction unit 222.
  • the residual processing unit 230 may include a transform unit 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 recontructged block generator.
  • the above-described image segmentation unit 210, prediction unit 220, residual processing unit 230, entropy encoding unit 240, adding unit 250, and filtering unit 260 may include one or more hardware components (for example, it may be configured by an encoder chipset or processor). Also, the memory 270 may include a decoded picture buffer (DPB), or 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 division unit 210 may divide the input image (or picture, frame) input to the encoding apparatus 200 into one or more processing units.
  • the processing unit may be called a coding unit (CU).
  • the coding unit is recursively divided according to a quad-tree binary-tree ternary-tree (QTBTTT) structure from a coding tree unit (CTU) or a largest coding unit (LCU). You can.
  • QTBTTT quad-tree binary-tree ternary-tree
  • CTU coding tree unit
  • LCU largest coding unit
  • one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad tree structure, a binary tree structure, and / or a ternary structure.
  • a quad tree structure may be applied first, and a binary tree structure and / or a ternary structure may be applied later.
  • a binary tree structure may be applied first.
  • the coding procedure according to the present invention can be performed based on the final coding unit that is no longer split.
  • the maximum coding unit may be directly used as a final coding unit based on coding efficiency according to image characteristics, or the coding unit may be recursively divided into coding units having a lower depth than optimal if necessary.
  • the coding unit of the size of can be used as the final coding unit.
  • the coding procedure may include procedures such as prediction, transformation, and reconstruction, 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 be partitioned or partitioned from the above-described final coding unit, respectively.
  • the prediction unit may be a unit of sample prediction
  • the transformation unit may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from the transform coefficient.
  • the unit may be used interchangeably with terms such as a block or area depending on the case.
  • the MxN block may represent samples of M columns and N rows or a set of transform coefficients.
  • the sample may generally represent a pixel or a pixel value, and may indicate only a pixel / pixel value of a luma component or only a pixel / pixel value of a saturation component.
  • the sample may be used as a term for one picture (or image) corresponding to a pixel or pel.
  • the encoding apparatus 200 subtracts a prediction signal (a predicted block, a 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).
  • a signal residual signal, residual block, residual sample array
  • the generated residual signal is transmitted to the conversion unit 232.
  • a unit for subtracting a prediction signal (a prediction block, a prediction sample array) from an input image signal (original block, original sample array) in the encoder 200 may be referred to as a subtraction unit 231.
  • the prediction unit 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 may determine whether intra prediction or inter prediction is applied in units of a current block or CU. As described later in the description of each prediction mode, the prediction unit may generate various information regarding prediction, such as prediction mode information, and transmit it to the entropy encoding unit 240.
  • the prediction information may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
  • the intra prediction unit 222 may predict the current block by referring to samples in the current picture.
  • the referenced samples may be located in the neighborhood of the current block or may be located apart depending on a prediction mode.
  • prediction modes may include a plurality of non-directional modes and a plurality of directional modes.
  • the non-directional mode may include, for example, a DC mode and a planar mode (Planar mode).
  • the directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the degree of detail of the prediction direction. However, this is an example, and more or less directional prediction modes may be used depending on the setting.
  • the intra prediction unit 222 may determine a prediction mode applied to the current block using a prediction mode applied to neighboring blocks.
  • the inter prediction unit 221 may derive the predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on the reference picture.
  • motion information may be predicted in units of blocks, subblocks, or samples based on the correlation of motion information between a neighboring block and a current block.
  • the motion information may include a motion vector and a reference picture index.
  • the motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information.
  • the neighboring block may include a spatial neighboring block existing in the current picture and a temporal neighboring block present in the reference picture.
  • the reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different.
  • the temporal neighboring block may be referred to by a name such as a collocated reference block or a colCU, and 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 candidates are 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. For example, in the case of the skip mode and the merge mode, the inter prediction unit 221 may use motion information of neighboring blocks as motion information of the current block.
  • the residual signal may not be transmitted.
  • a motion vector of a current block is obtained by using a motion vector of a neighboring block as a motion vector predictor and signaling a motion vector difference. I can order.
  • the prediction unit 220 may generate a prediction signal based on various prediction methods described below.
  • the prediction unit may apply intra prediction or inter prediction as well as intra prediction and inter prediction at the same time for prediction for one block. This can be called combined inter and intra prediction (CIIP).
  • the prediction unit may be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block.
  • the IBC prediction mode or palette mode may be used for content video / video coding such as a game, such as screen content coding (SCC).
  • SCC screen content coding
  • IBC basically performs prediction in the current picture, but may be performed similarly to inter prediction in that a reference block is derived in the current picture. That is, the IBC can use at least one of the inter prediction techniques described in this document.
  • the palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, a sample value in a picture may be signaled based on information on the palette table and palette index.
  • the prediction signal generated through the prediction unit may be used to generate a reconstructed signal or may be used to generate a residual signal.
  • the transform unit 232 may generate transform coefficients by applying a transform technique to the residual signal.
  • the transformation technique is DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT ( ), GBT (Graph-Based Transform), or CNT (Conditionally Non-linear Transform).
  • GBT refers to a transformation obtained from this graph when it is said that the relationship information between pixels is graphed.
  • CNT means a transform obtained by generating a prediction signal using all previously reconstructed pixels and based on it.
  • the transform process may be applied to pixel blocks having the same size of a square, or may be applied to blocks of variable sizes other than squares.
  • 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 quantized transform coefficients) and outputs it as a bitstream. have. Information about the quantized transform coefficients may be called residual information.
  • the quantization unit 233 may rearrange block-type quantized transform coefficients into a one-dimensional vector form based on a coefficient scan order, and quantize the quantized transform coefficients based on the one-dimensional vector form. Information regarding transform coefficients may be generated.
  • the entropy encoding unit 240 may perform various encoding methods such as exponential Golomb (CAVLC), context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC).
  • CAVLC exponential Golomb
  • CAVLC context-adaptive variable length coding
  • CABAC context-adaptive binary arithmetic coding
  • the entropy encoding unit 240 may encode information necessary for video / image reconstruction (eg, a value of syntax elements, etc.) together with the quantized transform coefficients together or separately.
  • the encoded information (ex. Encoded video / video information) may be transmitted or stored in units of network abstraction layer (NAL) units in the form of a bitstream.
  • NAL network abstraction layer
  • the video / image information may further include information regarding 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). Also, 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 / video information.
  • the video / video 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 on 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, SSD.
  • the signal output from the entropy encoding unit 240 may be configured as an internal / external element of the encoding unit 200 by a transmitting unit (not shown) and / or a storing unit (not shown) for storing, or the transmitting unit It may be included in the entropy encoding unit 240.
  • the quantized transform coefficients output from the quantization unit 233 may be used to generate a prediction signal.
  • a residual signal residual block or residual samples
  • the adder 155 adds the reconstructed residual signal to the predicted signal output from the inter predictor 221 or the intra predictor 222, so that the reconstructed signal (restored picture, reconstructed block, reconstructed sample array) Can be created. If there is no residual for the block to be processed, such as when the skip mode is applied, the predicted block may be used as a reconstructed block.
  • the adder 250 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, or may be used for inter prediction of the next picture through filtering as described below.
  • LMCS luma mapping with chroma scaling
  • the filtering unit 260 may improve subjective / objective image quality by applying filtering to the reconstructed signal.
  • the filtering unit 260 may generate a modified restoration picture by applying various filtering methods to the restoration picture, and the modified restoration picture may be a DPB of the memory 270, specifically, the memory 270. Can be stored in.
  • the various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, and the like.
  • the filtering unit 260 may generate various information regarding filtering as described later in the description of each filtering method, and transmit it to the entropy encoding unit 240.
  • the filtering information may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
  • the modified reconstructed picture transmitted to the memory 270 may be used as a reference picture in the inter prediction unit 221.
  • inter prediction When the inter prediction is applied through the encoding apparatus, prediction mismatch between the encoding apparatus 100 and the decoding apparatus can be avoided, and encoding efficiency can be improved.
  • the memory 270 DPB may store the modified reconstructed picture for use 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 a current picture is derived (or encoded) and / or motion information of blocks in a picture that has already been reconstructed.
  • the stored motion information may be transmitted to the inter prediction unit 221 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block.
  • the memory 270 may store reconstructed samples of blocks reconstructed in the current picture, and may transmit the reconstructed samples to the intra prediction unit 222.
  • FIG. 3 is a diagram schematically illustrating a configuration of a video / video decoding apparatus to which the present invention can be applied.
  • the decoding apparatus 300 includes an entropy decoder (310), a residual processor (320), a prediction unit (predictor, 330), an adder (340), and a filtering unit (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 deequantizer 321 and an inverse transformer 321.
  • the entropy decoding unit 310, the residual processing unit 320, the prediction unit 330, the adding unit 340, and the filtering unit 350 described above may include one hardware component (eg, a decoder chipset or processor) according to an embodiment. ).
  • the memory 360 may include a decoded picture buffer (DPB), or may be configured by a digital storage medium.
  • the hardware component may further include a memory 360 as an internal / external component.
  • the decoding apparatus 300 may restore an image in response to a process in which the video / image information is processed in the encoding apparatus of FIG. 2.
  • the decoding apparatus 300 may derive units / blocks based on block partitioning related information obtained from the bitstream.
  • the decoding apparatus 300 may perform decoding using a processing unit applied in the encoding apparatus.
  • the processing unit of decoding may be, for example, a coding unit, and the coding unit may be divided along a quad tree structure, a binary tree structure and / or a ternary tree structure from a coding tree unit or a largest coding unit.
  • One or more transform units can be derived from the coding unit. Then, the decoded video signal decoded and output through the decoding device 300 may be reproduced through the reproduction device.
  • the decoding apparatus 300 may receive the signal output from the encoding apparatus of FIG. 2 in the form of a bitstream, and the received signal may be decoded through the entropy decoding unit 310.
  • the entropy decoding unit 310 may parse the bitstream to derive information (eg, video / image information) necessary for image reconstruction (or picture reconstruction).
  • the video / image information may further include information regarding various parameter sets such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS).
  • the video / image information may further include general constraint information.
  • the decoding apparatus may decode a picture further based on the information on the parameter set and / or the general restriction information.
  • Signaling / receiving information and / or syntax elements described later in this document may be decoded through the decoding procedure and obtained from the bitstream.
  • the entropy decoding unit 310 decodes information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and quantizes a value of a syntax element required for image reconstruction and a transform coefficient for residual.
  • a coding method such as exponential Golomb coding, CAVLC, or CABAC
  • the CABAC entropy decoding method receives bins corresponding to each syntax element in the bitstream, and decodes the syntax element information to be decoded and decoding information of neighboring and decoding target blocks or information of symbols / bins decoded in the previous step.
  • the context model is determined by using, and the probability of occurrence of the bin is predicted according to the determined context model, and arithmetic decoding of the bin is performed to generate a symbol corresponding to the value of each syntax element. have.
  • the CABAC entropy decoding method may update the context model using the decoded symbol / bin information for the next symbol / bin context model after determining the context model.
  • prediction information is provided to a prediction unit (inter prediction unit 332 and intra prediction unit 331), and the entropy decoding unit 310 performs entropy decoding.
  • the dual value that is, quantized transform coefficients and related parameter information, may be input to the residual processing unit 320.
  • the residual processor 320 may derive a residual signal (residual block, residual samples, residual sample array). Also, information related to filtering among information decoded by the entropy decoding unit 310 may be provided to the filtering unit 350. Meanwhile, a receiving unit (not shown) that receives a 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 / picture / picture decoding device, and the decoding device may be classified into an information decoder (video / picture / picture information decoder) and a sample decoder (video / picture / picture sample decoder). It might be.
  • the information decoder may include the entropy decoding unit 310, and the sample decoder may include the inverse quantization unit 321, an inverse transformation unit 322, an addition unit 340, a filtering unit 350, and a memory 360 ), At least one of an inter prediction unit 332 and an intra prediction unit 331.
  • the inverse quantization unit 321 may inverse quantize the quantized transform coefficients to output transform coefficients.
  • the inverse quantization unit 321 may rearrange the quantized transform coefficients in a two-dimensional block form. In this case, the reordering may be performed based on the coefficient scan order performed by the encoding device.
  • the inverse quantization unit 321 may perform inverse quantization on the quantized transform coefficients using a quantization parameter (for example, quantization step size information), and obtain transform coefficients.
  • a quantization parameter for example, quantization step size information
  • the inverse transform unit 322 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).
  • the prediction unit may perform prediction on the current block and generate a predicted block including prediction samples for the current block.
  • the prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on information about the prediction output from the entropy decoding unit 310, and may determine a specific intra / inter prediction mode.
  • the prediction unit 320 may generate a prediction signal based on various prediction methods described below.
  • the prediction unit may apply intra prediction or inter prediction as well as intra prediction and inter prediction at the same time for prediction for one block. This can be called combined inter and intra prediction (CIIP).
  • the prediction unit may be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block.
  • the IBC prediction mode or palette mode may be used for content video / video coding such as a game, such as screen content coding (SCC).
  • SCC screen content coding
  • IBC basically performs prediction in the current picture, but may be performed similarly to inter prediction in that a reference block is derived in the current picture. That is, the IBC can use at least one of the inter prediction techniques described in this document.
  • the palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, information on the palette table and palette index may be signaled by being included in the video / image information.
  • the intra prediction unit 331 may predict the current block by referring to samples in the current picture.
  • the referenced samples may be located in the neighborhood of the current block or may be located apart depending on a prediction mode.
  • prediction modes may include a plurality of non-directional modes and a plurality of directional modes.
  • the intra prediction unit 331 may determine a prediction mode applied to the current block using a prediction mode applied to neighboring blocks.
  • the inter prediction unit 332 may derive the predicted block for the current block based on the reference block (reference sample array) specified by the motion vector on the reference picture.
  • motion information may be predicted in units of blocks, subblocks, or samples based on the correlation of motion information between a neighboring block and a current block.
  • the motion information may include a motion vector and a reference picture index.
  • the motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information.
  • the neighboring block may include a spatial neighboring block existing in the current picture and a temporal neighboring block present 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 information on the prediction may include information indicating a mode of inter prediction for the current block.
  • the adder 340 reconstructs the obtained residual signal by adding it to the prediction signal (predicted block, prediction sample array) output from the prediction unit (including the inter prediction unit 332 and / or the intra prediction unit 331).
  • a signal (restored picture, reconstructed block, reconstructed sample array) can be generated. If there is no residual for the block to be processed, such as when the skip mode is applied, the predicted block may be used as a reconstructed block.
  • the adding 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 a next processing target block in a current picture, may be output through filtering as described below, or may be used for inter prediction of a next picture.
  • LMCS luma mapping with chroma scaling
  • the filtering unit 350 may improve subjective / objective image quality by applying filtering to the reconstructed signal.
  • the filtering unit 350 may generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and the modified reconstructed picture may be a DPB of the memory 360, specifically, the memory 360 Can be transferred to.
  • the various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, and the like.
  • the (corrected) reconstructed picture stored in the DPB of the memory 360 may 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 a current picture is derived (or decoded) and / or motion information of blocks in a picture that has already been reconstructed.
  • the stored motion information may be transmitted to the inter prediction unit 332 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block.
  • the memory 360 may store reconstructed samples of blocks reconstructed in the current picture, and may transmit the reconstructed samples 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 respectively the filtering unit 350 and the inter prediction of the decoding device 300.
  • the unit 332 and the intra prediction unit 331 may be applied to the same or corresponding.
  • a predicted block including prediction samples for a current block as a block to be coded can be generated.
  • the predicted block includes prediction samples in a spatial domain (or pixel domain).
  • the predicted block is derived equally from an encoding device and a decoding device, and the encoding device decodes information (residual information) about the residual between the original block and the predicted block, not the original sample value itself of the original block. Signaling to the device can improve video coding efficiency.
  • the decoding apparatus may derive a residual block including residual samples based on the residual information, and combine the residual block and the predicted block to generate a reconstructed block including reconstructed samples, and reconstruct the reconstructed blocks.
  • a reconstructed picture can be generated.
  • the residual information may be generated through a transform and quantization procedure.
  • the encoding device derives a residual block between the original block and the predicted block, and performs transformation procedures on residual samples (residual sample array) included in the residual block to derive transformation coefficients. And, by performing a quantization procedure on the transform coefficients, the quantized transform coefficients are derived to signal related residual information (via a bitstream) to a decoding apparatus.
  • the residual information may include value information of the quantized transform coefficients, location information, a transform technique, a transform kernel, quantization parameters, and the like.
  • the decoding apparatus may perform an inverse quantization / inverse transformation procedure based on the residual information and derive residual samples (or residual blocks).
  • the decoding apparatus may generate a reconstructed picture based on the predicted block and the residual block.
  • the encoding apparatus may also inverse quantize / inverse transform quantized transform coefficients for reference for inter prediction of a picture to derive a residual block, and generate a reconstructed picture based thereon.
  • the vertical component and the horizontal component can be separated and separately transformed.
  • the transform kernel for the vertical direction and the transform kernel for the horizontal direction may be selected separately. This can be called multiple transform selection (MTS).
  • FIG. 4 is a diagram schematically illustrating a multiplexing technique according to the present invention.
  • the transform unit may correspond to the transform unit in the encoding apparatus of FIG. 2 described above, and the inverse transform unit may correspond to the inverse transform unit in the encoding apparatus of FIG. 2 described above or the inverse transform unit in the decoding apparatus of FIG. 3. .
  • the transform unit may derive (primary) transform coefficients by performing a primary transform based on residual samples (residual sample array) in the residual block (S410).
  • the primary transform may be referred to as a core transform.
  • the primary transform may be based on multiple transform selection (MTS), and may be referred to as a multiple core transform when multiple transforms are applied as the primary transform.
  • MTS multiple transform selection
  • the transform unit may derive (secondary) transform coefficients by performing a second transform based on the (primary) transform coefficients (S420).
  • (Secondary) transform coefficients can be referred to as modified transform coefficients.
  • the first-order transform is a transformation from the spatial domain to the frequency domain
  • the second-order transform means transforming into a more compressed expression by using a correlation existing between (first-order) transform coefficients.
  • the second order transform may include a non-separable transform.
  • the secondary transform may be called a non-separable secondary transform (NSST) or a reduced secondary transform (RST).
  • the transform unit may selectively perform the second transform.
  • the second (inverse) transform is described based on the performance, but the second transform may be omitted.
  • the transform unit may transmit the (second order) transform coefficients derived by performing the second transform to the quantization unit.
  • the quantization unit may quantize transform coefficients by performing quantization on (secondary) transform coefficients. Then, the quantized transform coefficients may be encoded, signaled to a decoding device, and transmitted to an inverse quantization / inverse conversion unit in the encoding device.
  • (primary) transform coefficients which are outputs of the primary transform, may be derived as quantized transform coefficients through a quantization unit. And the quantized transform coefficients are encoded and signaled to a decoding apparatus, and can also be transmitted to an inverse quantization / inverse transform unit in the encoding apparatus.
  • the inverse transform unit may perform a series of procedures in the reverse order of the procedure performed by the above-described transform unit.
  • the inverse transform unit receives (inverse quantized) transform coefficients, performs a second (inverse) transform to derive (first) transform coefficients (S450), and performs a first (inverse) transform of the (first) transform coefficients.
  • the residual block residual samples
  • the primary transform coefficients may be referred to as modified transform coefficients from the viewpoint of the inverse transform unit.
  • the encoding device and the decoding device can generate a reconstructed block based on the residual block and the predicted block, and generate a reconstructed picture based on the residual block.
  • the inverse transform unit may receive (inverse quantized) transform coefficients to perform a first inverse transform to obtain residual blocks (residual samples).
  • the encoding device and the decoding device can generate a reconstructed block based on the residual block and the predicted block, and generate a reconstructed picture based on the residual block.
  • a primary transform and a secondary transform may be performed using a DCT (Discrete Cosine Transform) and / or a DST (Discrete Sine Transform) transform type.
  • DCT type 2 may be applied to the first transform as in HEVC, or DST type 7 may be applied to a specific case.
  • DST type 7 may be applied only to a specific case such as a 4X4 block.
  • multiple transform selection may be applied to the first transform, and in this case, a combination of multiple transforms may be applied.
  • a primary transform based on multiple transform selection may be referred to as an explicit multiple transform (EMT).
  • EMT explicit multiple transform
  • a combination of conversion types such as DST type 7 (DST7), DCT type 8 (DCT8), DST type 1 (DST1), DCT type 5 (DCT5), and DCT type 2 (DCT2) is used. Can be used.
  • Table 1 and Table 2 below exemplarily show a combination of transforms used in multiple transform selection (explicit multiple transform).
  • Table 1 shows the combinations of multiple transform selections applied in the intra prediction mode
  • Table 2 shows the combinations of multiple transform selections applied in the inter prediction mode.
  • a transform set when the intra prediction mode is applied, a transform set may be configured according to the intra prediction mode, and each transform set may include a plurality of transform combination candidates.
  • the transform set may be composed of five sets (Set0 to Set4) according to the intra prediction mode, and each transform set (Set0 to Set4) may include transform combination candidates with an index value of 0 to 3 set. have.
  • Each transform combination candidates may be composed of a horizontal transform applied to a row and a vertical transform applied to a column, and horizontal based on a combination of DST7, DCT8, DST1, and DCT5. The type of transform and vertical transform can be determined.
  • a transform combination when the inter prediction mode is applied, a transform combination may be configured differently according to whether to apply a multiple transform selection to a corresponding block (eg, EMT_CU_Flag). For example, if multiple transform selection is not applied to a corresponding block (for example, EMT_CU_Flag is 0), a transform combination set that applies DCT2 to horizontal transform and vertical transform can be used. Alternatively, when multiple transform selection is applied to a corresponding block (for example, when EMT_CU_Flag is 1), a transform combination set including 4 transform combination candidates may be used. In this case, the transform combination set may include transform combination candidates in which index values of 0 to 3 are set, and the types of horizontal transform and vertical transform may be determined for each transform combination candidate based on the combination of DST7 and DCT8.
  • FIG. 5 is a flowchart illustrating a process of determining a transform combination according to whether multiple transform selection (MTS or EMT) is applied according to an embodiment of the present invention.
  • application of multiple transform selection in block units eg, in CU units in the case of HEVC
  • using a syntax element indicating whether to apply multiple transform selection to the current block Can decide may use EMT_CU_flag.
  • EMT_CU_flag When EMT_CU_flag is 0 in the intra prediction mode, it may be determined that multiple transform selection is not applied to the current block. At this time, DCT2 or 4x4 DST7 may be applied as in the case of using a single transform (eg, HEVC). When EMT_CU_flag is 1 in the intra prediction mode, it may be determined to apply multiple transform selection to the current block. At this time, the multiple conversion combinations presented in Table 1 above can be applied. The possible multiple transform combinations may vary depending on the intra prediction mode as shown in Table 1 above.For example, when the intra prediction mode is 14, 15, 16, 17, 18, 19, 20, 21, 22, the horizontal direction By applying DST7 and DCT5 and DST7 and DCT8 in the vertical direction, a total of four possible combinations can be allowed. Therefore, it is necessary to separately signal which of the four combinations to apply. To this end, 2 bits of index information may be used, and, for example, one of 4 transform combinations may be signaled through signaling of the 2 bits of the EMT_TU_
  • DCT2 may be applied as shown in Table 2
  • EMT_CU_flag 1
  • multiple transform combinations shown in Table 2 may be applied. For example, four possible combinations can be used by applying DST7 and DCT8 as shown in Table 2 above.
  • the decoding apparatus may acquire and parse (entropy decode) the EMT_CU_flag syntax element (S500). Then, the decoding apparatus may determine whether to apply the multiple transform selection according to the result value of the parsed EMT_CU_flag (S510).
  • the decoding apparatus determines that multiple transform selection is not applied, and may perform transformation by applying DCT2 to the current block (S515).
  • the decoding apparatus determines to apply the multiple transform selection, so whether the number of non-zero transform coefficients is less than or equal to a certain threshold value (eg, 2) for transform coefficients in the current block. It can be determined (S520).
  • a certain threshold value eg, 2
  • the decoding apparatus When the number of non-zero transform coefficients is equal to or less than a certain threshold, the decoding apparatus omits parsing for EMT_TU_index, sets the EMT_TU_index value to 0, and applies DST7 to the current block as shown in Table 1 above. It can be performed (S525).
  • the decoding apparatus may parse (entropy decode) the EMT_TU_index syntax element (S530).
  • the decoding apparatus may perform a transformation by determining a combination of horizontal and vertical transformations for the current block according to the parsed EMT_TU_index value (S535).
  • multiple transforms may be performed by selecting horizontal transforms and vertical transforms corresponding to EMT_TU_index values based on the transform combinations shown in Tables 1 and 2 above.
  • a block size to which multiple transform selection is applied may be limited. For example, it is possible to limit the block size to 64x64, and if it is larger than 64x64, multiple conversions may not be applied.
  • the second transform may be additionally applied.
  • the second transform may use a non-separable secondary transform (NSST) or a reduced secondary transform (RST).
  • NSST is applied only in the intra prediction mode, and each intra prediction mode has a transform set applicable.
  • Table 3 shows an example in which a transform set for each intra prediction mode is allocated in NSST.
  • the transform set in NSST may be established using symmetry for the prediction direction.
  • intra prediction modes 52 and 16 are symmetric based on intra prediction mode 34 (diagonal direction)
  • the same transform set can be applied as shown in Table 3 above.
  • intra prediction modes that are symmetrical to each other using the symmetry of the prediction direction may be formed as a group to allocate the same transform set.
  • input data is input to any one mode (eg, a vertical direction mode such as mode 52). It can be applied after transpose.
  • the intra prediction mode may include two non-directinoal (or non-angular) intra prediction modes and 65 directional (or angular) intra prediction modes.
  • the intra prediction mode No. 67 may be further used, and the intra prediction mode No. 67 may represent a linear model (LM) mode.
  • LM linear model
  • these intra prediction modes are used, a total of 35 transform sets may be configured as shown in Table 3 above.
  • the non-directional planar mode (planar) mode (0) and DC mode (1) since there is no symmetry, each transform set has a transform set, and each transform set includes two transforms. Can be.
  • FIGS. 6 and 7 are diagrams for explaining a non-separated quadratic transform (NSST) according to an embodiment of the present invention.
  • NSST is not applied to the entire block to which the first transform is applied (eg, TU in the case of HEVC), but can be applied only to the top-left 8x8 region of the block. Of course, it can be applied to the entire area for blocks of size 8x8 or less.
  • 8x8 NSST receives 64 data and outputs 64 data
  • 4x4 NSST has 16 inputs and 16 outputs.
  • Both 8x8 NSST and 4x4 NSST can be configured with a hierarchical combination of Givens rotations.
  • the matrix corresponding to one Givens rotation may be equal to Equation 1.
  • Equation 6 is a diagram of the matrix product of Equation (1). As shown in FIG. 6, since one Givens rotation rotates two data, in order to process 64 (for 8x8 NSST) or 16 (for 4x4 NSST) data, a total of 32 or 8 Givens rotation respectively This is necessary. Therefore, a bundle of 32 or 8 is formed to form a Givens rotation layer.
  • FIG. 7 shows a process in which four Givens rotation layers are sequentially processed for the 4x4 NSST.
  • the output data for one Givens rotation layer is transmitted as input data for the next Givens rotation layer through a predetermined permutation (shuffling).
  • the permutation pattern is determined regularly, and in the case of 4x4 NSST, one round is formed by combining the four Givens rotation layers and the permutations.
  • 8x8 NSST 6 Givens rotation layers and corresponding permutations form a round.
  • 4x4 NSST goes through 2 rounds, and 8x8 NSST goes through 4 rounds. Different rounds use the same permutation pattern, but the Givens rotation angles applied are different. Therefore, angle data for all Givens rotations constituting each transformation should be stored.
  • one permutation is finally performed on the data output through the Givens rotation layers, and the permutation information is separately stored for each transformation.
  • forward NSST the permutation is performed last, and in reverse NSST, the reverse permutation is applied first.
  • the Givens rotation layers and permutations applied in the forward NSST can be performed in reverse order, and the angle of each Givens rotation is taken and rotated.
  • the NSST or a reduced secondary transform (RST) described later may be used.
  • FIG 8 and 9 are views for explaining RST according to an embodiment of the present invention.
  • RT may be applied to the upper left 8x8 block of a block (hereinafter, a transform coefficient block) composed of transform coefficients that have undergone first-order transformation.
  • a transform coefficient block composed of transform coefficients that have undergone first-order transformation.
  • RT can be named 8x8 RST.
  • 8x8 RST When the R value in Equation 2 is set to 16, 8x8 RST has a 16x64 matrix form in the case of forward 8x8 RST and 64x16 matrix form in the case of reverse 8x8 RST.
  • the same transform set configuration as in Table 3 above can be applied. That is, the corresponding 8x8 RST may be applied according to the transform set in Table 3 above.
  • one transform set is composed of two or three transforms according to the intra prediction mode, it can be configured to select one of up to four transforms, including when a second transform is not applied (one transform) Is the identity matrix).
  • a second transform is not applied (one transform) Is the identity matrix).
  • indexes of 0, 1, 2, and 3 are assigned to each of the 4 transforms (for example, index 0 can be assigned to an identity matrix, that is, when the second transform is not applied)
  • NSST index Signaling the syntax element (syntax element) for each transform coefficient block may be applied to designate a transform applied. That is, for the 8x8 upper left block through the NSST index, in the case of NSST, 8x8 NSST may be designated, and in the RST configuration, 8x8 RST may be designated.
  • FIG. 9 is a view showing a transform coefficient scan order, and when the forward scan order is assigned from 1 (on the forward scan order), it shows scanning from the 17th coefficient to the 64th coefficient. Since the reverse scan is shown in FIG. 9, it can be seen that the reverse scan is performed from the 64th to the 17th (see arrow direction).
  • the upper left 4x4 region of the transform coefficient block is an ROI (Region Of Interest) region in which a valid transform coefficient is filled, and the rest of the region is vacated.
  • the blanked area may be filled with a value of 0 by default. If it is found that a valid non-zero transform coefficient is found in addition to the ROI region of FIG. 9, since it is certain that 8x8 RST is not applied, the corresponding NSST index coding can be omitted. Conversely, if a non-zero transform coefficient is not found outside the ROI region of FIG.
  • multiple transform selection may be referred to as an explicit multiple transform (EMT) or an adaptive multiple transform (AMT).
  • EMT explicit multiple transform
  • AMT adaptive multiple transform
  • the present specification basically describes an embodiment in which transforms are applied separately for horizontal and vertical directions, such combinations of transforms (horizontal and vertical transform combinations) are also used as non-separable transforms. Configuration is possible. Alternatively, it may be composed of a mixture of separable transforms and non-separable transforms. In this case, if a non-separable transform is used, selection by a row / column transformation or selection by a horizontal / vertical direction becomes unnecessary, and a separable transform The conversion combinations of Tables 1 and 2 above can be used only when is selected.
  • the schemes proposed in this specification can be applied regardless of a primary transform or a secondary transform. That is, there is no restriction that it should be applied to either one, and both can be applied.
  • the primary transform may mean a transform for initially transforming a residual block
  • the secondary transform transforms a block generated as a result of the primary transform. It may mean a transformation for applying.
  • FIG. 10 is a flowchart illustrating an encoding process in which multiple transform selection is performed according to an embodiment of the present invention.
  • the encoding device may determine a transform group corresponding to the current block (S1010).
  • the transform group may refer to the transform groups of Table 1 and Table 2, but the present invention is not limited thereto and may be composed of other transform combinations.
  • the encoding apparatus may perform transformation on candidate transformation combinations available in the transformation group (S1020).
  • the encoding apparatus may determine or select a conversion combination having the smallest RD (Rate Distortion) cost (S1030).
  • the encoding device may encode a transform combination index corresponding to the selected transform combination (S1040).
  • FIG. 11 is a flowchart illustrating a decoding process in which multiple transform selection is performed according to an embodiment of the present invention.
  • the decoding apparatus may determine a transform group for the current block (S1110).
  • the decoding apparatus may parse the transform combination index (S1120).
  • the transform combination index may correspond to any one of a plurality of transform combinations in the transform group.
  • the decoding apparatus may derive a transform combination corresponding to the transform combination index (S1130).
  • the conversion combination may mean the conversion combination described in Tables 1 and 2, but the present invention is not limited to this, and other conversion combinations may also be used.
  • the decoding apparatus may perform inverse transform on the current block based on the transform combination (S1140). If the transformation combination consists of a row transformation and a column transformation, the row transformation can be applied first and then the column transformation. However, the present invention is not limited to this, and may be applied on the contrary, or when the non-separation transformations are configured, the non-separation transformation may be directly applied.
  • a process of determining a transform group and a process of parsing a transform combination index may be performed simultaneously.
  • AMT flag multiple conversion selection flag
  • AMT index multiple conversion index
  • the encoding apparatus may determine whether adaptive multiple transforms (AMT) are applied to the current block (S1210).
  • AMT adaptive multiple transforms
  • the encoding device may encode the AMT flag to 1 (S1220).
  • the encoding device may determine the AMT index based on at least one of a prediction mode, a horizontal transform, and a vertical transform of the current block (S1230).
  • the AMT index refers to an index indicating any one of a plurality of transform combinations for each intra prediction mode, and the AMT index may be transmitted for each transform unit.
  • the encoding device may encode the AMT index (S1240).
  • the encoding apparatus may encode the AMT flag to 0 (S1250).
  • FIG. 13 is a flowchart illustrating a decoding process of applying a horizontal transform or a vertical transform to a row or column based on a multiple transform selection flag (AMT flag) and a multiple transform index (AMT index) according to an embodiment of the present invention.
  • AMT flag multiple transform selection flag
  • AMT index multiple transform index
  • the decoding apparatus may parse the AMT flag from the bitstream (S1310).
  • the AMT flag may indicate whether adaptive multiple transforms (AMT) are applied to the current block.
  • the decoding device may check whether AMT is applied to the current block based on the AMT flag (S1320). For example, it is possible to check whether the AMT flag is 1.
  • the decoding apparatus may check whether the number of non-zero transform coefficients is greater than or equal to a threshold (S1330).
  • a threshold can be set to 2, which can be set differently based on the block size or the size of the transform unit.
  • the decoding apparatus may parse the AMT index (S1340).
  • the AMT index refers to an index indicating any one of a plurality of transform combinations for each intra prediction mode or inter prediction mode, and the AMT index may be transmitted for each transformation unit.
  • the AMT index may mean an index indicating any one of the conversion combinations defined in the preset conversion combination table, where the preset conversion combination table may mean Tables 1 and 2, but the present invention It is not limited.
  • the decoding apparatus may derive or determine the horizontal transform and the vertical transform based on at least one of the AMT index or prediction mode (S1350).
  • the decoding device may derive a transform combination corresponding to the AMT index.
  • the decoding apparatus may derive or determine the horizontal transform and vertical transform corresponding to the AMT index.
  • the decoding apparatus may apply a preset vertical inverse transform for each column (S1360).
  • the vertical inverse transform may be an inverse transform of DST7.
  • the decoding apparatus may apply a predetermined horizontal inverse transform for each row (S1370).
  • the horizontal inverse transform may be an inverse transform of DST7.
  • a transform kernel preset in the encoding device or the decoding device may be used.
  • a conversion kernel that is widely used may be used.
  • the decoding apparatus may apply a predetermined vertical inverse transform for each column (S1380).
  • the vertical inverse transform may be an inverse transform of DCT2.
  • the decoding apparatus may apply a predetermined horizontal inverse transform for each row (S1390).
  • the horizontal inverse transform may be an inverse transform of DCT2.
  • a conversion kernel preset in the encoding device or the decoding device may be used.
  • a conversion kernel that is widely used may be used.
  • the present invention proposes an RST that can be applied to a 4x4 block.
  • a non-separable transform or RST that can be applied to one 4x4 block, that is, a 4x4 transform block to be transformed is a 16x16 transform. That is, if the data elements constituting the 4x4 block are arranged in a row in a row-first or column-first order, a 16x1 vector can be applied, and non-separated transformation or RST can be applied to the block. .
  • the forward 16x16 transform is composed of 16 row direction transform basis vectors, and when an inner product is taken for the 16x1 vector and each transform base vector, a transform coefficient for the transform base vector is obtained. do.
  • the process of obtaining the corresponding transform coefficients for the 16 transform base vectors is the same as multiplying the 16x16 non-separated transform or RST matrix by the input 16x1 vector.
  • the transform coefficients obtained by matrix multiplication have a 16x1 vector form, and statistical characteristics may be different for each transform coefficient. For example, when the 16x1 transform coefficient vector is composed of 0th to 15th elements, the variance of the 0th element may be greater than that of the 15th element. That is, the larger the element located in front, the larger the corresponding variance value and the larger the energy value.
  • the original 4x4 block signal can be restored before the transform.
  • the forward 16x16 non-separated transform is an orthonormal transform
  • the corresponding backward 16x16 transform can be obtained by taking a transpose of a matrix for the forward 16x16 transform. For simplicity, multiplying the inverse 16x16 non-separated transform matrix by a 16x1 transform coefficient vector yields data in the form of a 16x1 vector, and arranging it in the row-first or column-first order that was applied first can restore the 4x4 block signal.
  • elements constituting the 16x1 transform coefficient vector may have different statistical characteristics.
  • the inverse transform inverse transform
  • the transform coefficients arranged near the front have a larger energy
  • the inverse transform is applied to some transform coefficients that appear first without using all transform coefficients. It is also possible to restore a signal that is fairly close to the original signal.
  • the present invention proposes a method of setting an application area of 4x4 RST and arranging transform coefficients.
  • 4x4 RST may be applied as a secondary transform, and at this time, may be applied secondary to a block to which a primary transform such as DCT-type 2 is applied.
  • a primary transform such as DCT-type 2
  • 4x4 RST may be applied when NxN is equal to or larger than 4x4. Therefore, an example of applying 4x4 RST to an NxN block is as follows.
  • 4x4 RST may be applied to each divided block.
  • the second transform is applied only to the upper left 8x8 region, when the NxN block is equal to or greater than 8x8, 8x8 RST is applied, and when the NxN block is smaller than 8x8 (4x4, 8x4, 4x8), 2) After dividing into 4x4 blocks, each 4x4 RST can be applied.
  • L transform coefficients (1 ⁇ ⁇ 16) are generated after applying 4x4 RST, there is a degree of freedom in how to place L transform coefficients (ie, how to map transform coefficients in a target block).
  • coding performance may vary depending on how the L transform coefficients are arranged in a 2D block.
  • the residual coding in HEVC starts coding from the position farthest from the DC position. This is to increase coding performance by taking advantage of the fact that the farther away from the DC position, the quantized coefficient value is zero or close to zero. Therefore, it may be advantageous in terms of coding performance to arrange more important coefficients having high energy for the L transform coefficients to be coded later in the order of residual coding.
  • FIG. 14 shows three forward scan sequences that can be applied to a 4x4 transform coefficient or a transform coefficient block (4x4 block, Coefficient Group (CG)) applied in the HEVC standard.
  • (a) is a diagonal scan
  • (b) is a horizontal scan
  • (c) is a vertical scan.
  • the reverse order of the scan order in FIG. 14 is followed, that is, it is coded in the order of 16 to 1. Since the three scan orders illustrated in FIG. 14 are selected according to the intra prediction mode, the L transform coefficients may be configured to determine the scan order according to the intra prediction mode.
  • 15 and 16 are diagrams illustrating mapping of transform coefficients according to a diagonal scan order according to an embodiment of the present invention. 15 and 16 show an example of placing valid transform coefficients in a diagonal scan order when 4x4 RST is applied to a 4x8 block.
  • FIG. 15 when a 4x4 RST is applied by dividing the upper left 4x8 block into 4x4 blocks according to the diagonal scan order, and the L value is 8 (that is, if only 8 transform coefficients are left out of 16), FIG. 15 As shown, transform coefficients may be located. For example, as shown in FIG. 15, a transform coefficient may be mapped to a half area of each 4x4 block, and a value of 0 may be filled in by default for positions marked with X.
  • L transform coefficients are arranged for each 4x4 block according to the scan order shown in FIG. 14, and it is assumed that the remaining (16-L) positions of each 4x4 block are filled with 0, corresponding residual coding.
  • Can be applied eg, residual coding in existing HEVC.
  • L transform coefficients that are respectively placed in two 4x4 blocks may be combined and arranged in one 4x4 block as shown in FIG. 16 (b).
  • the L value is 8 since the transform coefficients of two 4x4 blocks are disposed in one 4x4 block and completely filled in one 4x4 block, no other transform coefficients are left in the other 4x4 block. Therefore, since most residual coding is unnecessary for a 4x4 block vacated like this, in the case of HEVC, the corresponding coded_sub_block_flag can be coded as 0.
  • coded_sub_block_flag applied to HEVC is flag information for specifying the position of a sub-block that is a 4x4 array for 16 transform coefficient levels in the current transform block, and "0" for a 4x4 block in which no residual remains. It may be signaled as.
  • the transform coefficients for the first 4x4 block can be arranged first, followed by the transform coefficients for the second 4x4 block.
  • It can be arranged by connecting as follows. naturally, You can also change the order like so:
  • the first method is a case where the NSST index is coded after residual coding
  • the second method is a case where the NSST index is coded before residual coding.
  • the NSST index can be coded after residual coding.
  • 0 values may be filled from L + 1 to 16th according to a transform coefficient scan order for each 4x4 block. Therefore, if any one of the two 4x4 blocks has a non-zero value in the L + 1th to 16th positions, it corresponds to a case where 4x4 RST is not applied. If the 4x4 RST also has a structure to select and apply one of the prepared transform sets such as NSST, an index (which may be referred to as a transform index, an RST index, or an NSST index) to which a transform is applied may be signaled.
  • an index which may be referred to as a transform index, an RST index, or an NSST index
  • the decoding apparatus can know the NSST index through bitstream parsing, and perform this parsing process after residual coding.
  • residual coding is performed and it turns out that there is at least one non-zero transform coefficient between L + 1th to 16th, it is certain that 4x4 RST is not applied as described above, so the NSST index is not parsed. Can be set to not. Accordingly, in this method, the NSST index is selectively parsed only when necessary, thereby reducing signaling cost.
  • 4x4 RST is applied to multiple 4x4 blocks within a specific region as shown in FIG. 15 (both the same 4x4 RST may be applied or different 4x4 RSTs may be applied), through one NSST index A 4x4 RST (same or separate) applied to all 4x4 blocks may be designated. Since 4x4 RST and whether or not to apply to all the 4x4 blocks are determined by one NSST index, it is residual whether the non-zero transform coefficient exists at positions L + 1 to 16 for all 4x4 blocks. By investigating during the coding process, if a non-zero transform coefficient is present in a position that is not allowed even in one 4x4 block (L + 1 to 16th positions), the NSST index can be configured not to be coded.
  • NSST indices may be separately signaled for Luminance blocks and Chrominance blocks, and in the case of chroma blocks, they may signal separate NSST indices for Cb and Cr, respectively, and signaling the NSST index only once One NSST index can be shared.
  • 4x4 RST indicated by the same NSST index may be applied (the 4x4 RST itself for Cb and Cr may be the same, and the NSST index is the same but has individual 4x4 RST). May be).
  • the conditional signaling described above for the shared NSST index it is checked whether there is a non-zero transform coefficient from L + 1 to 16th for all 4x4 blocks for Cb and Cr. If a non-conversion coefficient is found, it can be configured to omit signaling for the NSST index.
  • the NSST index It is possible to determine whether or not signaling.
  • the L value is 8 as shown in FIG. 16 and there are no valid transform coefficients for one 4x4 block when 4x4 RST is applied (block indicated by X in FIG. 12B)
  • coded_sub_block_flag of a block without valid transform coefficients By checking, if the value is 1, the NSST index may not be signaled.
  • the NSST index when coding the NSST index, in the present invention, can be coded before residual coding.
  • whether or not 4x4 RST is applied may be configured to be known through an NSST index value (for example, if the NSST index is 0, 4x4 RST is not applied), or may be signaled through a separate syntax element.
  • a separate syntax element is an NSST flag
  • the NSST flag is parsed first to determine whether 4x4 RST is applied, and if NSST flag value is 1, residual coding is omitted for locations where a valid transform coefficient cannot exist. can do.
  • the last non-zero coefficient position on the TU is coded. If the coding for the NSST index is performed after the last non-zero transform coefficient position coding and the position of the last non-zero transform coefficient is assumed to be a position where the non-zero transform coefficient cannot occur when assuming application of 4x4 RST , 4x4 RST can be applied without coding the NSST index. For example, in the case of positions indicated by X in FIG.
  • Coding NSST index conditionally after coding for the last non-zero transform coefficient position (as described above, if the position of the last non-zero transform coefficient is an unacceptable position assuming the application of 4x4 RST, coding for the NSST index)
  • the remaining residual coding part can be processed in the following two ways.
  • coded_sub_block_flag existing in HEVC
  • coding for coded_sub_block_flag can be omitted for a 4x4 block emptied as 0, and a corresponding value can be derived as 0, and for a corresponding 4x4 block All can be filled with zero values without coding.
  • NSST index coding can be omitted and configured not to apply 4x4 RST.
  • NSST index coding is omitted for the case where the last non-zero transform coefficient is present in the DC position.
  • the method of determining whether to encode the NSST index through comparison with the threshold can be applied to luma and chroma differently. For example, different Tx and Ty may be applied to luma and chroma, and a threshold value may be applied to luma (or chroma) and not applied to chroma (or luma).
  • NSST index coding there are two ways to omit the NSST index coding (if the last non-zero transform coefficient is located in an area where no valid transform coefficient exists, how to omit the NSST index coding, the X coordinate for the last non-zero transform coefficient And how to omit the NSST index coding when the Y coordinate is less than a certain threshold, respectively. For example, it is possible to first perform a threshold check for the last non-zero transform coefficient position coordinate, and then check whether the last non-zero transform coefficient is located in a region where a valid transform coefficient does not exist and vice versa. Purity is possible.
  • the method of coding the NSST index before the residual coding described above can also be applied to 8x8 RST. That is, if the last non-zero transform coefficient is located in a region other than the upper left 4x4 in the upper left 8x8 region, coding for the NSST index can be omitted, otherwise coding for the NSST index can be performed. In addition, if the X and Y coordinate values for the last non-zero transform coefficient position are less than a certain threshold, coding for the NSST index can be omitted. Of course, both methods can be applied together.
  • RST index coding and residual coding schemes may be applied to luma and chroma when RST is applied.
  • the first method (method 1) in which NSST index coding is performed after residual coding and the method (method 2) in which NSST index coding is performed before and residual coding may be applied differently to luma and chroma, respectively.
  • luma follows the method described in method 2, and method 1 can be applied to chroma.
  • conditional NSST index coding may be applied to luma according to method 1 or method 2
  • conditional NSST index coding may not be applied to chroma, and vice versa. That is, NSST index coding may be applied conditionally according to method 1 or method 2 to chroma, and conditional NSST index coding may not be applied to luma.
  • multiple transforms may be applied based on a method of reduced transform (RT). This may also be referred to as terms such as Reduced Explicit Multiple Transform (REMT) or Reduced Adaptive Multiple Transform (RAMT).
  • RT reduced transform
  • RMT Reduced Explicit Multiple Transform
  • RAMT Reduced Adaptive Multiple Transform
  • the (M> R) transform block of RxR Only calculations for can be performed.
  • Table 4 below shows three examples of a reduced adaptive multiple transform (RAMT) using a predefined R value for each primary transform size.
  • the RT factor reduced transform factor (R) may be determined depending on the corresponding primary transform.
  • the primary transform is DCT2
  • the calculation amount is relatively simple compared to other primary transforms
  • the decrease in encoding performance can be minimized by not using RT for a small block or by using a relatively large R value.
  • other RT factors may be used as shown in Table 5 below. Table 5 shows an example of a RAMT using different RT factors for each conversion size.
  • an EMT (or AMT) core transform may be selected according to an intra prediction mode.
  • one of four combinations of EMT indexes (0,1,2,3) may be selected through EMT_TU_index of 2 bits.
  • a transform type to be applied to the corresponding primary transform can be selected.
  • Table 6 below is an example of a mapping table for selecting a transformation type applied to the corresponding primary transformation for the horizontal and vertical directions based on the EMT_index value.
  • the horizontal (Hor) mode indicates modes 2 to 33
  • the vertical (Ver) mode indicates directions 34 to 66. Mode.
  • Table 8 shows an example in which different mappings are used for horizontal mode groups. As described above, in the method of deriving the first order transform based on EMT_TU_index, another mapping table may be used based on the intra prediction direction.
  • EMT_TU_index available for each intra prediction mode is not the same and may be defined differently.
  • Table 9 below shows an example in which available EMT_TU_index values depend on intra prediction modes.
  • the following two encoding methods are proposed to more efficiently encode the values of EMT_TU_index distributed differently for each of the above-described intra prediction modes.
  • EMT (AMT) TU index value When the EMT (AMT) TU index value is binarized, it can be encoded using a truncated unary method rather than a fixed length binarization method. Table 10 below shows examples of fixed length and truncated unary binarization.
  • a context model may be determined using information of an intra prediction mode.
  • Table 11 shows three embodiments (method 1, method 2, method 3) in which intra prediction modes are mapped according to context.
  • the context modeling method for each intra prediction mode specified in the present invention may be considered together with other factors such as block size.
  • a syntax element indicating whether multiple transformation selection is available may be used in performing the transformation.
  • a syntax element indicating whether multiple transformation selection is available.
  • Table 12 shows an example of a syntax table that signals information for indicating whether multi-conversion selection is available in a sequence parameter set.
  • Table 13 shows an example of a semantics table that defines information represented by the syntax elements of Table 12.
  • sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag syntax elements may be used as information indicating whether multiple transform selection is available in performing the transform.
  • sps_mts_intra_enabled_flag is information indicating whether a transform based on multiple transform selection is available for an intra coding block
  • sps_mts_inter_enabled_flag is information indicating whether a transform based on multiple transform selection is available for an inter coding block.
  • the intra coding block refers to a block coded in intra prediction mode
  • the inter coding block refers to a block coded in inter prediction mode.
  • the encoding apparatus sets and signals whether a transform based on multiple transform selection is available for an intra coding block through sps_mts_intra_enabled_flag, and the decoding apparatus decodes the signaled sps_mts_intra_enabled_flag to multiple for the intra coding block It is possible to determine whether a conversion selection is available.
  • the encoding apparatus sets and signals whether a transform based on multiple transform selection is available for an inter-coding block through sps_mts_inter_enabled_flag, and the decoding apparatus decodes the signaled sps_mts_inter_enabled_flag to select multiple transforms for the inter-coding block Can determine if it is available.
  • the multiple transform selection is available for the corresponding intra coding block or the corresponding inter coding block based on sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag
  • information indicating whether to apply multiple transform selection to be described later for example, cu_mts_flag
  • multiple transform selection Information indicating the transform kernel used at the time (eg, mts_idx) may be additionally signaled.
  • the sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag syntax element is shown in Table 12 as being signaled at the sequence level (i.e., sequence parameter set), but is signaled through the slice level (i.e., slice header) or picture level (i.e., picture parameter set), etc. It might be.
  • a higher level for example, a sequence parameter set, etc.
  • Table 12 shows that the transformation based on multiple transform selection is available
  • the lower level In the example (eg, residual coding syntax, transform unit syntax, etc.), information indicating whether multiple transform selection is applied to the corresponding block may be additionally signaled.
  • Table 14 below shows information indicating whether multiple transform selections are additionally applied at a lower level (e.g., transform unit syntax) based on syntax elements explicitly signaled at a higher level (e.g., sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag) (e.g. cu_mts_flag).
  • a syntax table for signaling is shown.
  • Table 15 shows an example of a semantics table defining information represented by the syntax element of Table 14.
  • information indicating whether multi-conversion selection is available eg, sps_mts_intra_enabled_flag, sps_mts_inter_enabled_flag
  • information indicating whether multi-conversion selection is applied eg, cu_mts_flag
  • Table 16 shows an example of a syntax table signaling information indicating a transform kernel applied when multiple transforms are selected.
  • Table 17 shows an example of a semantics table that defines information represented by the syntax element of Table 16.
  • mts_idx syntax element may be used as information indicating a transform kernel used when selecting multiple transforms.
  • the mts_idx syntax element may be set to an index value indicating one combination applied to a current block among specific combinations configured for horizontal direction transformation and vertical direction transformation used in multiple transformation, such as the transformation set described above. .
  • the mts_idx syntax element when explicitly instructing to apply multiple transform selection for the current block through syntax elements such as sps_mts_intra_enabled_flag, sps_mts_inter_enabled_flag, cu_mts_flag, the mts_idx syntax element signals information required to perform the transformation of the current block
  • the level may be transmitted through residual coding syntax or transform unit syntax.
  • the decoding device may obtain mts_idx syntax elements from the encoding device, derive transformation kernels (horizontal direction transformation kernel and vertical direction transformation kernel) applied to the current block based on the index value indicated by mts_idx, and perform multiple transformations. have.
  • combinations of the horizontal transform kernel and the vertical transform kernel used for multiple transform selection may be preset, and each combination may respectively correspond to an index value of mts_idx. Accordingly, the decoding apparatus selects a combination corresponding to the index value of mts_idx among the combinations of the preset horizontal direction conversion kernel and vertical direction conversion kernel, and the horizontal direction conversion kernel and vertical direction conversion kernel of the selected combination are assigned to the current block. It can be derived from the set of transform kernels to be applied.
  • FIG. 17 is a flowchart schematically illustrating a decoding method for performing inverse transform according to an embodiment of the present invention.
  • the method disclosed in FIG. 17 shows a process of performing inverse transformation based on the syntax elements described in Tables 12 to 17 above.
  • the decoding apparatus may acquire sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag (S1700).
  • the decoding device may obtain cu_mts_flag based on sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag (S1710).
  • the decoding device may acquire cu_mts_flag.
  • at least one of the embodiments described in Table 25 or other embodiments described later with respect to cu_mts_flag may be applied.
  • the decoding apparatus may obtain mts_idx based on cu_mts_flag (S1720).
  • the decoding apparatus may obtain mts_idx.
  • the mts_idx syntax element indicates which transform kernel is applied to luma residual samples along the horizontal and / or vertical direction of the current transform block. For example, at least one of the embodiments described in Tables 18 to 25 or other embodiments described later with respect to mts_idx may be applied.
  • the decoding device may derive a transform kernel corresponding to mts_idx (S1730).
  • the transform kernel corresponding to mts_idx may be defined by being divided into horizontal transform and vertical transform.
  • different transformation kernels may be applied to the horizontal transformation and the vertical transformation.
  • the present invention is not limited thereto, and the same transform kernel may be applied to horizontal transform and vertical transform.
  • the decoding apparatus may perform inverse transform based on the transform kernel (S1740).
  • MTS may be expressed as an Adaptive Mutliple Transform (AMT) or (Explicit Multiple Transform, EMT).
  • AMT Adaptive Mutliple Transform
  • EMT Extended Multiple Transform
  • mts_idx may also be expressed as AMT_idx, EMT_idx, AMT_TU_idx EMT_TU_idx, etc. It is not limited to expression.
  • FIG. 18 shows related components of a decoding apparatus for performing inverse transform according to an embodiment of the present invention.
  • the related component of the decoding apparatus disclosed in FIG. 18 may perform the method of FIG. 17 above.
  • the decoding apparatus of FIG. 18 may be the decoding apparatus disclosed in FIG. 3.
  • the decoding apparatus 300 derives an element 1800 for obtaining a sequence parameter, an element 1810 for obtaining a multiple transform selection flag, an element 1820 for obtaining a multiple transform selection index, and a transformation kernel Element 1830.
  • the element 1800 for obtaining sequence parameters may obtain sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag.
  • the sps_mts_intra_enabled_flag syntax element indicates whether cu_mts_flag is present in the residual coding syntax of the intra coding unit
  • the sps_mts_inter_enabled_flag syntax element indicates whether cu_mts_flag is present in the residual coding syntax of the inter coding unit.
  • the description of FIG. 17 may be applied.
  • the cu_mts_flag syntax element indicates whether multiple transform selection (hereinafter referred to as 'MTS') is applied to the residual sample of the luma transform block. As a specific example, the description of FIG. 17 may be applied.
  • the mts_idx syntax element indicates which transform kernel is applied to luma residual samples along the horizontal and / or vertical direction of the current transform block. As a specific example, the description of FIG. 17 may be applied.
  • the element 1830 that derives the transform kernel may derive the transform kernel corresponding to mts_idx.
  • the decoding apparatus 300 may perform inverse transformation based on the transformation kernel.
  • combinations of transform kernels used for multiple transform selection may be configured in various ways.
  • combinations of transform kernels may be referred to as multiple transform selection candidates (hereinafter, MTS candidates).
  • combinations of transform kernels represent multiple transform kernel sets, and the multiple transform kernel sets may be derived by combining a transform kernel type corresponding to a vertical transform kernel and a transform kernel type corresponding to a horizontal transform kernel. You can. At this time, there may be a plurality of conversion kernel types that can be used for multiple conversion selection.
  • the conversion kernel type corresponding to the vertical conversion kernel is one of the plurality of conversion kernel types
  • the conversion kernel type corresponding to the horizontal conversion kernel is It may be one of the plurality of conversion kernel types.
  • multiple transform kernel sets ie, MTS candidates
  • MTS candidates may be configured by combining a plurality of transform kernel types.
  • DST7, DCT8, DCT2, DST1, DCT5, etc. can be used, and multiple conversion kernel sets ( That is, MTS candidates).
  • These multiple transform kernel sets (ie, MTS candidates) may be variously configured in consideration of transform efficiency.
  • a plurality of MTS candidates are configured by combining them using DST7 and DCT8 as transform kernel types, and an MTS index value (eg, mts_idx) corresponds to each of the plurality of MTS candidates. ).
  • MTS candidates that is, a set of transform kernels
  • DST7 the transform kernel types corresponding to the vertical transform kernel
  • DCT8 the transform kernel type corresponding to the horizontal transform kernel
  • an MTS candidate that is, a transform kernel type corresponding to the vertical transform kernel is selected as DCT8 and a transform kernel type corresponding to the horizontal transform kernel is selected as DST7 and combined
  • Transform kernel set For the third index value (eg, index value 2) of the MTS index, an MTS candidate (that is, a transform kernel type corresponding to the vertical transform kernel is selected as DCT8 and a transform kernel type corresponding to the horizontal transform kernel is selected as DST7 and combined) , Transform kernel set).
  • MTS candidates ie, a set of transform kernels
  • the combined MTS candidates may be represented as a transform kernel type corresponding to a vertical transform kernel and a horizontal transform kernel according to the MTS index values as shown in Table 18 below.
  • MTS candidates ie, a set of transform kernels that are selected by combining both a transform kernel type corresponding to a vertical transform kernel and a horizontal transform kernel with DST7 ) Can be mapped.
  • the MTS candidate that is, the transform kernel type corresponding to the vertical transform kernel is selected as DCT8 and the transform kernel type corresponding to the horizontal transform kernel is selected as DST7 and combined).
  • Transform kernel set The combined MTS candidates may be represented as a transform kernel type corresponding to a vertical transform kernel and a horizontal transform kernel according to the MTS index values as shown in Table 19 below.
  • the first index value (eg, index value 0) of the MTS index includes MTS candidates (that is, transform kernels) selected by combining both the transform kernel types corresponding to the vertical transform kernel and the horizontal transform kernel with DST7. Set).
  • MTS candidates that is, transform kernels
  • DST7 For the second index value (eg, index value 1) of the MTS index, an MTS candidate (that is, a transform kernel type corresponding to the vertical transform kernel is selected as DST7 and a transform kernel type corresponding to the horizontal transform kernel is selected as DCT8 and combined).
  • Transform kernel set The combined MTS candidates may be represented by a transform kernel type corresponding to a vertical transform kernel and a horizontal transform kernel according to the MTS index values as shown in Table 20 below.
  • a transform kernel type corresponding to a vertical transform kernel and a transform kernel type corresponding to a horizontal transform kernel are mapped according to the index value of the MTS index.
  • DST7 is indicated when the converted kernel type value is 1
  • DCT8 is indicated when the converted kernel type value is 2.
  • the MTS index syntax element is not signaled.
  • the decoding apparatus infers the value of the MTS index to -1 as shown in Tables 18 to 20 above, and the corresponding conversion kernel type 0 is the conversion kernel type of the current block (that is, the vertical conversion kernel and the horizontal conversion). Kernel). At this time, the transform kernel type 0 may indicate DCT2.
  • the present invention may configure MTS candidates in consideration of the directionality of the intra prediction mode.
  • 4 MTS candidates shown in Table 18 above may be used for 2 non-directional modes (eg, DC mode and planner mode), and a mode having horizontal directionality
  • a horizontal group mode including the (eg, mode 2 to 34) two MTS candidates shown in Table 19 above can be used, and a vertical group mode (eg, mode 35) including modes with vertical directionality (# 66 mode), two MTS candidates shown in Table 20 above may be used.
  • 3 MTS candidates may be used for 2 non-directional modes (eg, DC mode and planner mode), and horizontal directionality may be used as shown in Table 21 below.
  • a horizontal group mode including excitation modes eg, 2 to 34 modes
  • two MTS candidates may be used as shown in Table 22 below
  • a vertical group mode including modes with vertical directionality eg : Modes 35 to 66
  • two MTS candidates may be used.
  • Table 21 shows an example of a transform kernel type corresponding to a vertical transform kernel and a horizontal transform kernel according to MTS index values as MTS candidates used for two non-directional modes (eg, DC mode, planner mode).
  • the first index value (eg, index value 0) of the MTS index includes MTS candidates (that is, transforms) selected by combining both the transform kernel types corresponding to the vertical transform kernel and the horizontal transform kernel with DST7. Kernel set).
  • MTS candidates that is, transforms
  • Kernel set For the second index value (eg, index value 1) of the MTS index, an MTS candidate (that is, a transform kernel type corresponding to the vertical transform kernel is selected as DST7 and a transform kernel type corresponding to the horizontal transform kernel is selected as DCT8 and combined).
  • Transform kernel set For the second index value (eg, index value 1) of the MTS index, an MTS candidate (that is, a transform kernel type corresponding to the vertical transform kernel is selected as DST7 and a transform kernel type corresponding to the horizontal transform kernel is selected as DCT8 and combined).
  • an MTS candidate that is, a transform kernel type corresponding to the vertical transform kernel is selected as DCT8 and a transform kernel type corresponding to the horizontal transform kernel is selected as DST7 and combined
  • Transform kernel set For the third index value (eg, index value 2) of the MTS index, an MTS candidate (that is, a transform kernel type corresponding to the vertical transform kernel is selected as DCT8 and a transform kernel type corresponding to the horizontal transform kernel is selected as DST7 and combined) , Transform kernel set).
  • Table 22 below shows MTS candidates used for a horizontal group mode (eg, modes 2 to 34) including modes with horizontal directionality, and a transform corresponding to a vertical transform kernel and a horizontal transform kernel according to the MTS index value.
  • a horizontal group mode eg, modes 2 to 34
  • a transform corresponding to a vertical transform kernel and a horizontal transform kernel according to the MTS index value.
  • a kernel type e.g., modes 2 to 34
  • the first index value (eg, index value 0) of the MTS index includes MTS candidates (that is, transforms) selected by combining both the transform kernel types corresponding to the vertical transform kernel and the horizontal transform kernel with DST7. Kernel set).
  • the MTS candidate that is, the transform kernel type corresponding to the vertical transform kernel is selected as DCT8 and the transform kernel type corresponding to the horizontal transform kernel is selected as DST7 and combined).
  • Transform kernel set For the second index value of the MTS index (eg, index value 1), the MTS candidate (that is, the transform kernel type corresponding to the vertical transform kernel is selected as DCT8 and the transform kernel type corresponding to the horizontal transform kernel is selected as DST7 and combined).
  • Table 23 below shows MTS candidates used for a vertical group mode (eg, 35 to 66 modes) including vertically oriented modes, and transforms corresponding to a vertical transform kernel and a horizontal transform kernel according to the MTS index value.
  • a vertical group mode eg, 35 to 66 modes
  • transforms corresponding to a vertical transform kernel and a horizontal transform kernel according to the MTS index value e.g., 35 to 66 modes
  • a kernel type e.g., 35 to 66 modes
  • the first index value (eg, index value 0) of the MTS index includes MTS candidates (that is, transforms) selected by converting both the transform kernel types corresponding to the vertical transform kernel and the horizontal transform kernel to DST7. Kernel set).
  • MTS candidates that is, transforms
  • Kernel set For the second index value (eg, index value 1) of the MTS index, an MTS candidate (that is, a transform kernel type corresponding to the vertical transform kernel is selected as DST7 and a transform kernel type corresponding to the horizontal transform kernel is selected as DCT8 and combined).
  • Transform kernel set For the second index value (eg, index value 1) of the MTS index, an MTS candidate (that is, a transform kernel type corresponding to the vertical transform kernel is selected as DST7 and a transform kernel type corresponding to the horizontal transform kernel is selected as DCT8 and combined).
  • DST7 is indicated when the converted kernel type value is 1
  • DCT8 is indicated when the converted kernel type value is 2.
  • the MTS index syntax element is not signaled. That is, when it is determined that the MTS-based transform is not available (for example, when sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag is 0) or when it is determined that the MTS-based transform is not applied (for example, when cu_mts_flag is 0), MTS index information May not exist.
  • the decoding apparatus infers the value of the MTS index to -1 as shown in Tables 21 to 23 above, and the corresponding conversion kernel type 0 is the conversion kernel type of the current block (ie, vertical conversion kernel and horizontal conversion). Kernel). At this time, the transform kernel type 0 may indicate DCT2.
  • the present invention can configure MTS candidates for all intra prediction modes without considering the directionality of the intra prediction mode.
  • three MTS candidates may be configured for all intra prediction modes, and an MTS index value (eg, mts_idx) may be allocated to each of the three MTS candidates.
  • MTS candidates ie, a set of transform kernels
  • DST7 that is, the transform kernel set
  • DCT8 a transform kernel type corresponding to the horizontal transform kernel
  • an MTS candidate that is, a transform kernel type corresponding to the vertical transform kernel is selected as DCT8 and a transform kernel type corresponding to the horizontal transform kernel is selected as DST7 and combined
  • the combined MTS candidates may be represented by a transform kernel type corresponding to a vertical transform kernel and a horizontal transform kernel according to the MTS index values as shown in Table 24 below.
  • the transform kernel type corresponding to the vertical transform kernel and the transform kernel type corresponding to the horizontal transform kernel are mapped according to the index value of the MTS index.
  • DST7 is indicated when the converted kernel type value is 1
  • DCT8 is indicated when the converted kernel type value is 2.
  • the MTS index syntax element is not signaled. That is, when it is determined that the MTS-based transform is not available (for example, when sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag is 0) or when it is determined that the MTS-based transform is not applied (for example, when cu_mts_flag is 0), MTS index information May not exist.
  • the decoding apparatus infers the value of the MTS index to -1 as shown in Table 24 above, and the corresponding transform kernel type 0 is converted to the transform kernel type of the current block (ie, the vertical transform kernel and the horizontal transform kernel). Can be used.
  • the transform kernel type 0 may indicate DCT2.
  • the present invention can configure MTS candidate (s) applied to all prediction modes (ie, intra prediction mode and inter prediction mode).
  • one MTS candidate may be configured for the intra prediction mode and the inter prediction mode, and an MTS index value (eg, mts_idx) may be allocated.
  • flag information can be used instead of the MTS index to reduce the number of bits.
  • a transform kernel type indicated by one MTS candidate may be mapped. That is, when the flag information (eg, cu_mts_flag) is 1, both the transform kernel type corresponding to the vertical transform kernel and the transform kernel type corresponding to the horizontal transform kernel can be mapped to DST7.
  • Table 25 shows an example of mapping the transform kernel type corresponding to the vertical transform kernel and the horizontal transform kernel based on the flag information (eg, cu_mts_flag).
  • the transform kernel type corresponding to the vertical transform kernel and the horizontal transform kernel is used. All 1 values can be derived.
  • the flag information (eg, cu_mts_flag) is 0, a value of 0 may be derived as both a transform kernel type corresponding to a vertical transform kernel and a horizontal transform kernel.
  • the conversion kernel type is 1, it may mean that DST7 is used, and when the conversion kernel type is 0, it may mean that DCT2 is used.
  • flag information eg, cu_mts_flag
  • flag information may not be signaled when it is determined that MTS-based conversion is not available (eg, when sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag is 0).
  • the decoding device infers the flag information (eg, cu_mts_flag) to 0 as shown in Table 25 above, and the corresponding conversion kernel type 0 corresponds to the conversion kernel type of the current block (ie, vertical conversion kernel and horizontal conversion kernel). ).
  • DST7 and DCT8 are used as the conversion kernel type, but this is only an example.
  • multiple transforms can be performed by configuring a transform kernel set for multiple transform selection using various transform kernel types (eg, DCT2, DCT4, DCT5, DCT7, DCT8, DST1, DST4, DST7, etc.).
  • DCT / DST conversion kernel types such as DCT2, DCT4, DCT5, DCT7, DCT8, DST1, DST4, and DST7 may be defined based on basis functions, and basis functions may be represented as in Table 26 below.
  • the conversion kernel type described herein may be referred to as a conversion type.
  • 19 is a flowchart schematically illustrating a video / video encoding method by an encoding device according to an embodiment of the present invention.
  • the method disclosed in FIG. 19 may be performed by the encoding apparatus 200 disclosed in FIG. 2. Specifically, steps S1900 to S1910 of FIG. 19 may be performed by the prediction unit 220 and the intra prediction unit 222 illustrated in FIG. 2, and step S1920 of FIG. 19 may be performed by the subtraction unit 231 illustrated in FIG. 2. 19, steps S1930 to S1950 of FIG. 19 may be performed by the conversion unit 232 illustrated in FIG. 2, and step S1960 of FIG. 19 may be performed by the quantization unit 233 illustrated in FIG. 2. 19, steps S1970 to S1980 of FIG. 19 may be performed by the entropy encoding unit 240 illustrated in FIG. 2. In addition, the method disclosed in FIG. 19 may include the above-described embodiments herein. Therefore, in FIG. 19, a detailed description of contents overlapping with the above-described embodiments will be omitted or simplified.
  • the encoding device may derive a prediction mode for a current block (S1900). That is, the encoding apparatus may determine whether to apply the intra prediction mode or the inter prediction mode to the current block, and derive the determined prediction mode of the current block.
  • the encoding device may perform prediction according to the prediction mode of the current block.
  • the encoding apparatus may perform intra prediction on the current block to derive prediction samples (S1910).
  • the prediction mode for the current block is the inter prediction mode
  • the encoding device may perform inter prediction on the current block and derive predicted samples of the current block as a prediction result.
  • the encoding apparatus may derive residual samples for the current block based on the prediction samples of the current block (S1920). That is, the encoding apparatus may derive residual samples based on a difference between original samples and prediction samples for the current block.
  • the encoding device may derive a horizontal transform kernel and a vertical transform kernel applied to residual samples of the current block (S1930), and generate transform index information based on the derived horizontal transform kernel and vertical transform kernel (S1940). .
  • the encoding apparatus performs multi-transform selection (MTS; or AMT; or EMT) that applies transforms for horizontal and vertical directions separately to residual samples of the current block in consideration of conversion efficiency You can decide whether or not. If it is decided to apply multiple transform selection, the encoding apparatus may determine a transform type (transformation kernel) applied to the horizontal direction and the vertical direction respectively.
  • MTS multi-transform selection
  • AMT AMT
  • EMT EMT
  • the encoding apparatus may perform transformation on a plurality of transform combinations, and select an optimal transform combination from the plurality of transform combinations based on a rate of RD (Rate Distortion). Then, the encoding apparatus may generate transform index information corresponding to the selected optimal transform combination.
  • RD Rate Distortion
  • the plurality of transform combinations are composed of combinations of a horizontal transform kernel and a vertical transform kernel, and may include transform combination candidates disclosed in Tables 18 to 25 above.
  • a plurality of transform combinations can be represented by transform kernel sets consisting of a horizontal transform kernel and a vertical transform kernel, and each transform combination combines a transform type corresponding to a horizontal transform kernel and a transform type corresponding to a vertical transform kernel.
  • the transform type corresponding to the horizontal transform kernel and the transform type corresponding to the vertical transform kernel may be one of a plurality of transform types. For example, DCT2, DCT4, DCT5, DCT7, DCT8, DST1, DST4, DST7, etc.
  • a plurality of conversion types may be combined to form a plurality of conversion types.
  • Transform combinations (combination candidates of the vertical transform kernel and the horizontal transform kernel) can be derived.
  • a plurality of transform combinations can be derived by using DST7 and DCT8 transform types and combining them into a horizontal transform kernel and a vertical transform kernel.
  • a plurality of transform combinations may be mapped to index values (ie, transform index information).
  • a plurality of transform combinations may be mapped to transform index information having first to fifth index values.
  • the transform combination corresponding to the first index value (eg, the index value 0) may be DCT type 2 in a vertical transform kernel and a horizontal transform kernel.
  • the transform combination corresponding to the second index value (eg, the index value 1) may have a vertical transform kernel and a horizontal transform kernel of DST type 7.
  • the transform combination corresponding to the third index value may be a vertical transform kernel of DST type 7 and a horizontal transform kernel of DCT type 8.
  • the transform combination corresponding to the fourth index value (eg, index value 3) may be a DCT type 8 vertical transformation kernel and a DST type 7 horizontal transformation kernel.
  • the transform combination corresponding to the fifth index value (eg, the index value 4) may be DCT type 8 in the vertical transform kernel and the horizontal transform kernel.
  • a plurality of transform combinations may be configured and mapped to transform index information in consideration of the directionality of the intra prediction mode.
  • the intra prediction mode of the current block is a non-directional mode (eg, DC mode or planner mode)
  • multiple transform selection is performed by configuring transform combinations corresponding to the first to fifth index values as in the example above. It can also be applied to poetry.
  • the intra prediction mode of the current block is a directional mode (for example, a horizontal directional mode including 2 to 34 modes or a vertical directional mode including 35 to 66 modes).
  • different transformation combinations from the above example are configured. Therefore, it can be applied when selecting multiple transforms.
  • a method of configuring a plurality of transform combinations in consideration of the directionality of the intra prediction mode has been described in detail through Tables 18 to 23 above.
  • the encoding device converts vertical and horizontal directions based on transform combinations corresponding to the first to fifth index values. And select an optimal transform combination among these transform combinations.
  • the encoding device may generate index values by deriving index values corresponding to the selected combination of transforms.
  • the encoding apparatus may perform transformation on residual samples of the current block based on the horizontal transform kernel and the vertical transform kernel, and derive transform coefficients for the current block (S1950).
  • the encoding apparatus performs horizontal and vertical transforms on residual samples of the current block using a transform kernel (horizontal transform kernel and vertical transform kernel) selected as an optimal transform combination among a plurality of transform combinations.
  • a transform kernel horizontal transform kernel and vertical transform kernel
  • the transform kernel selected as the optimal transform combination refers to a horizontal transform kernel and a vertical transform kernel indicated by the transform index information.
  • the encoding apparatus may derive quantized transform coefficients by performing quantization based on the transform coefficients of the current block (S1960). Then, the encoding apparatus may generate residual information based on quantized transform coefficients for the current block (S1970).
  • the encoding device may encode image information including prediction mode information, residual information, and transform index information for the current block (S1970).
  • the prediction mode information is information about a prediction mode applied when the current block is predicted, and may be information about an intra prediction mode or an inter prediction mode.
  • the residual information may include value information of quantized transform coefficients, location information, a transform technique, transform kernel, quantization parameter, and the like.
  • the transform index information may be an index value indicating a transform combination including a horizontal transform kernel and a vertical transform kernel applied to the current block among a plurality of transform combinations.
  • the encoding device may determine whether multiple transform selection is available for the current block, and generate the determined information as the multiple transform selection available flag information.
  • the multiple transform selection available flag information may be defined as intra available flag information and inter available flag information according to the prediction mode of the current block.
  • the intra-available flag information may be a sps_mts_intra_enabled_flag syntax element disclosed in Tables 12 and 13 above, and indicates whether a multiple transform selection-based transform is available for an intra coding block.
  • the inter-available flag information may be a sps_mts_inter_enabled_flag syntax element disclosed in Tables 12 and 13 above, and indicates whether a multiple transform selection-based transform is available for an inter coding block.
  • encoding may be performed by setting intra available flag information (eg, sps_mts_intra_enabled_flag) to a value of 1 and including it in video information. have.
  • intra available flag information eg, sps_mts_intra_enabled_flag
  • inter available flag information eg, sps_mts_inter_enabled_flag
  • the encoding apparatus may encode by setting intra available flag information (eg, sps_mts_intra_enabled_flag) to a value of 0 and including it in video information.
  • intra available flag information eg, sps_mts_intra_enabled_flag
  • the encoding device may encode by setting inter-available flag information (eg, sps_mts_inter_enabled_flag) to a value of 0 and including it in video information.
  • intra-available flag information eg, sps_mts_intra_enabled_flag
  • inter-available flag information eg, sps_mts_inter_enabled_flag
  • SPS sequence parameter set
  • the encoding device determines the transform kernel (horizontal transform kernel and vertical transform kernel) applied to the current block. It is possible to encode and signal the indicated transform index information. At this time, the transform index information may be signaled through residual coding syntax or transform unit syntax. In other words, when the intra-available flag information or the inter-available flag information indicates 1, a syntax element for transform index information may exist in a bitstream including encoded image information.
  • the encoding apparatus may determine whether to apply a transform based on multiple transform selection to the current block, and generate the determined information as multiple transform selection flag information.
  • the multiple conversion selection flag information may be the cu_mts_flag syntax element disclosed in Tables 14 and 15 above.
  • the multiple transform selection flag information eg, cu_mts_flag
  • the encoding apparatus may encode by setting the multiple transform selection flag information (eg, cu_mts_flag) to a value of 1 and including it in video information.
  • the encoding apparatus may encode the multi-conversion selection flag information (eg, cu_mts_flag) as a value of 0 and include it in the video information.
  • the encoding device may generate and signal transformation index information representing transform kernels (horizontal transform kernels and vertical transform kernels) applied to the current block.
  • the encoding device may not signal the decoding device by not generating a syntax element for the conversion index information.
  • the encoding apparatus may encode the multi-conversion selection flag by including it in the video information. have.
  • the method of encoding and signaling a syntax element for the intra available flag information, inter available flag information, multiple conversion selection flag information, and conversion index information may include contents disclosed in Tables 12 to 17.
  • the encoded image information may be output in the form of a bitstream.
  • the bitstream may be transmitted to a decoding device through a network or storage medium.
  • FIG. 20 is a flowchart schematically illustrating a video / video decoding method by a decoding apparatus according to an embodiment of the present invention.
  • the method disclosed in FIG. 20 may be performed by the decoding apparatus 300 disclosed in FIG. 3. Specifically, step S2000 of FIG. 20 may be performed by the entropy decoding unit 310 illustrated in FIG. 3, and steps S2010 to S2020 of FIG. 20 may include a prediction unit 330 and an intra prediction unit 331 illustrated in FIG. 3. 20, step S2030 in FIG. 20 may be performed by the entropy decoding unit 310 illustrated in FIG. 3, and step S2040 in FIG. 20 may be performed by the inverse quantization unit 321 illustrated in FIG. 3. 20, steps S2050 to S2060 in FIG. 20 may be performed by the inverse transform unit 322 illustrated in FIG. 3, and step S2070 in FIG. 20 may be performed by the adder 340 illustrated in FIG. 3.
  • the method disclosed in FIG. 20 may include the embodiments described herein. Therefore, in FIG. 20, a detailed description of content overlapping with the above-described embodiments will be omitted or simplified.
  • the decoding apparatus may obtain prediction mode information, residual information, and transform index information from a bitstream (S2000).
  • the decoding apparatus may derive the prediction mode for the current block based on the prediction mode information obtained from the bitstream (S2010).
  • the prediction mode information is information about a prediction mode applied when the current block is predicted, and may be information about an intra prediction mode or an inter prediction mode.
  • the decoding apparatus may perform prediction on the current block according to the prediction mode information.
  • the prediction mode for the current block is an intra prediction mode
  • the decoding apparatus may perform intra prediction on the current block to derive prediction samples (S2020).
  • the prediction mode for the current block is an inter prediction mode
  • the decoding apparatus may perform inter prediction on the current block and derive predicted samples of the current block as a prediction result.
  • the decoding apparatus may derive quantized transform coefficients for the current block based on residual information obtained from the bitstream (S2030).
  • the residual information may include value information of quantized transform coefficients, location information, a transform technique, a transform kernel, and quantization parameters.
  • the decoding apparatus may derive transform coefficients by performing inverse quantization based on the quantized transform coefficients of the current block (S2040).
  • the decoding apparatus may derive a horizontal transform kernel and a vertical transform kernel based on the transform index information obtained from the bitstream (S2050).
  • the decoding apparatus may select a transform combination corresponding to transform index information from a plurality of transform combinations, and derive a horizontal transform kernel and a vertical transform kernel included in the selected transform combination.
  • the plurality of transform combinations are composed of combinations of a horizontal transform kernel and a vertical transform kernel, and may include transform combination candidates disclosed in Tables 18 to 25 above.
  • a plurality of transform combinations can be represented by transform kernel sets consisting of a horizontal transform kernel and a vertical transform kernel, and each transform combination combines a transform type corresponding to a horizontal transform kernel and a transform type corresponding to a vertical transform kernel.
  • the transform type corresponding to the horizontal transform kernel and the transform type corresponding to the vertical transform kernel may be one of a plurality of transform types. For example, DCT2, DCT4, DCT5, DCT7, DCT8, DST1, DST4, DST7, etc.
  • a plurality of conversion types may be combined to form a plurality of conversion types.
  • Transform combinations (combination candidates of the vertical transform kernel and the horizontal transform kernel) can be derived.
  • a plurality of transform combinations can be derived by using DST7 and DCT8 transform types and combining them into a horizontal transform kernel and a vertical transform kernel.
  • a plurality of transform combinations may be mapped to index values (ie, transform index information).
  • a plurality of transform combinations may be mapped to transform index information having first to fifth index values.
  • the transform combination corresponding to the first index value (eg, the index value 0) may be DCT type 2 in a vertical transform kernel and a horizontal transform kernel.
  • the transform combination corresponding to the second index value (eg, the index value 1) may have a vertical transform kernel and a horizontal transform kernel of DST type 7.
  • the transform combination corresponding to the third index value may be a vertical transform kernel of DST type 7 and a horizontal transform kernel of DCT type 8.
  • the transform combination corresponding to the fourth index value (eg, index value 3) may be a DCT type 8 vertical transformation kernel and a DST type 7 horizontal transformation kernel.
  • the transform combination corresponding to the fifth index value (eg, the index value 4) may be DCT type 8 in the vertical transform kernel and the horizontal transform kernel.
  • a plurality of transform combinations may be configured and mapped to transform index information in consideration of the directionality of the intra prediction mode.
  • the intra prediction mode of the current block is a non-directional mode (eg, DC mode or planner mode)
  • multiple transform selection is performed by configuring transform combinations corresponding to the first to fifth index values as in the example above. It can also be applied to poetry.
  • the intra prediction mode of the current block is a directional mode (for example, a horizontal directional mode including 2 to 34 modes or a vertical directional mode including 35 to 66 modes).
  • different transformation combinations from the above example are configured. Therefore, it can be applied when selecting multiple transforms.
  • a method of configuring a plurality of transform combinations in consideration of the directionality of the intra prediction mode has been described in detail through Tables 18 to 23 above.
  • the decoding apparatus uses transform index information generated based on transform combinations corresponding to the first to fifth index values.
  • a conversion combination corresponding to an index value indicated by the conversion index information may be derived from conversion combinations obtained from an encoding device and corresponding to the first to fifth index values.
  • the decoding apparatus may derive a transform combination corresponding to the second index value.
  • the transform combination may include a vertical transform kernel and a horizontal transform kernel indicated by DST type 7.
  • the decoding apparatus may derive residual samples for the current block by performing inverse transform on transform coefficients of the current block based on the horizontal transform kernel and the vertical transform kernel (S2060).
  • the decoding apparatus may generate a reconstructed picture based on residual samples and prediction samples of the current block (S2070).
  • the decoding apparatus may obtain reconstruction samples by combining residual samples of the current block and prediction samples. Based on these reconstruction samples, a current picture may be reconstructed. Thereafter, as described above, the decoding apparatus may apply an in-loop filtering procedure, such as deblocking filtering, SAO, and / or ALF procedure, to the reconstructed picture in order to improve subjective / objective image quality as needed.
  • an in-loop filtering procedure such as deblocking filtering, SAO, and / or ALF procedure
  • the decoding apparatus may obtain information (that is, multiple transform selection available flag information) indicating whether multiple transform selection is available for the current block from the bitstream.
  • the multiple transform selection available flag information may be defined as intra available flag information and inter available flag information according to the prediction mode of the current block.
  • the intra-available flag information may be a sps_mts_intra_enabled_flag syntax element disclosed in Tables 12 and 13 above, and indicates whether a multiple transform selection-based transform is available for an intra coding block.
  • the inter-available flag information may be a sps_mts_inter_enabled_flag syntax element disclosed in Tables 12 and 13 above, and indicates whether a multiple transform selection-based transform is available for an inter coding block.
  • the decoding apparatus may determine that multiple transform selection is available for the current block, and from the bitstream Conversion index information may be further obtained.
  • the decoding apparatus may determine that multiple transform selection is available for the current block, and transform index information from the bitstream You can acquire more.
  • the decoding apparatus may perform an inverse transform by deriving a transform kernel (vertical and horizontal transform kernel) indicated by transform index information obtained from the bitstream.
  • the conversion index information is not explicitly signaled from the encoding device.
  • a syntax element eg, mts_idx
  • the conversion index information can be inferred as a preset index value. For example, when transform combinations corresponding to the first to fifth index values are applied, the transform index information may be inferred as the first index value.
  • the decoding apparatus infers transform index information into a first index value when a syntax element (eg, mts_idx) indicating transform index information is not obtained from a bitstream, and transform combinations (vertical and horizontal) corresponding to the first index value Transform kernel).
  • a syntax element eg, mts_idx
  • transform combinations vertical and horizontal
  • the transform combination corresponding to the first index value may include a vertical transform kernel and a horizontal transform kernel indicated by DCT type 2.
  • the intra available flag information (eg, sps_mts_intra_enabled_flag) and inter available flag information (eg, sps_mts_inter_enabled_flag) may be signaled at a sequence parameter set (SPS) level.
  • SPS sequence parameter set
  • the conversion index information obtained when the intra available flag information or the inter available flag information is 1 may be signaled through a residual coding syntax level or a conversion unit syntax level.
  • the decoding apparatus may obtain information (that is, multiple conversion selection flag information) indicating whether multiple conversion selection is applied to the current block from the bitstream.
  • the multiple conversion selection flag information may be the cu_mts_flag syntax element disclosed in Tables 14 and 15 above.
  • the multiple transform selection flag information eg, cu_mts_flag
  • the multiple transform selection flag information is 1, it may indicate that an inverse transform based on multiple transform selection is applied to the current block.
  • the decoding apparatus may determine that the inverse transform based on the multiple transform selection is applied to the current block when the multiple transform selection flag information (eg, cu_mts_flag) is 1, and further obtains and decodes transform index information from the bitstream can do.
  • the multiple transform selection flag information eg, cu_mts_flag
  • the conversion index information is not explicitly signaled from the encoding device.
  • a syntax element eg, mts_idx
  • the conversion index information can be inferred as a preset index value. For example, when transform combinations corresponding to the first to fifth index values are applied, the transform index information may be inferred as the first index value.
  • the decoding apparatus infers transform index information into a first index value when a syntax element (eg, mts_idx) indicating transform index information is not obtained from a bitstream, and transform combinations (vertical and horizontal) corresponding to the first index value Transform kernel).
  • a syntax element eg, mts_idx
  • transform combinations vertical and horizontal
  • the transform combination corresponding to the first index value may include a vertical transform kernel and a horizontal transform kernel indicated by DCT type 2.
  • the decoding apparatus may obtain and decode the multi-conversion selection flag information from the bitstream. That is, when the intra-available flag information indicates 1 or the inter-available flag information indicates 1, the encoding device encodes the syntax element related to the multiple conversion selection flag information or the conversion index information and signals it to the decoding device.
  • multiple transform selection flag information and transform index information may be additionally obtained according to the intra available flag information or the inter available flag information.
  • syntax elements for the intra-available flag information, inter-available flag information, multiple conversion selection flag information, and conversion index information may include the contents disclosed in Tables 12 to 17.
  • the above-described method according to the present invention can be implemented in software form, and the encoding device and / or decoding device according to the present invention performs image processing such as TV, computer, smartphone, set-top box, display device, etc. Device.
  • the above-described method may be implemented as a module (process, function, etc.) that performs the above-described functions.
  • Modules are stored in memory and can be executed by a processor.
  • the memory may be internal or external to the processor, and may be connected to the processor by various well-known means.
  • the processor may include an application-specific integrated circuit (ASIC), other chipsets, logic circuits, and / or data processing devices.
  • the memory may include read-only memory (ROM), random access memory (RAM), flash memory, memory cards, storage media and / or other storage devices. That is, the embodiments described in the present invention may be implemented and implemented on a processor, microprocessor, controller, or chip.
  • the functional units illustrated in each drawing may be implemented and implemented on a computer, processor, microprocessor, controller, or chip. In this case, information for implementation (ex. Information on instructions) or an algorithm may be stored in a digital storage medium.
  • the decoding device and the encoding device to which the present invention is applied are a multimedia broadcast transmission / reception device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video communication device, a real-time communication device such as video communication, mobile streaming Devices, storage media, camcorders, video-on-demand (VoD) service providing devices, OTT video (Over the top video) devices, Internet streaming service providing devices, 3D (3D) video devices, VR (virtual reality) devices, AR (argumente) reality) devices, video telephony video devices, transportation terminal (ex.
  • a multimedia broadcast transmission / reception device a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video communication device, a real-time communication device such as video communication, mobile streaming Devices, storage media, camcorders, video-on-demand (VoD) service providing devices, OTT video (Over the top video) devices, Internet streaming service providing devices, 3D (3
  • the OTT video (Over the top video) device may include a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smartphone, a tablet PC, and a digital video recorder (DVR).
  • a game console a Blu-ray player
  • an Internet-connected TV a home theater system
  • a smartphone a tablet PC
  • DVR digital video recorder
  • the processing method to which the present invention is applied can be produced in the form of a computer-implemented program, and can be stored in a computer-readable recording medium.
  • Multimedia data having a data structure according to the present invention can also be stored in a computer-readable recording medium.
  • the computer-readable recording medium includes all kinds of storage devices and distributed storage devices in which computer-readable data is stored.
  • the computer-readable recording medium includes, for example, Blu-ray Disc (BD), Universal Serial Bus (USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, magnetic tape, floppy disk and optical. It may include a data storage device.
  • the computer-readable recording medium includes media implemented in the form of a carrier wave (for example, transmission 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.
  • an embodiment of the present invention may be implemented as a computer program product by program code, and the program code may be executed on a computer by an embodiment of the present invention.
  • the program code can be stored on a computer readable carrier.
  • FIG. 21 shows an example of a content streaming system to which the invention disclosed in this document can be applied.
  • a content streaming system to which the present invention is applied may largely include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
  • the encoding server serves to compress a content input from multimedia input devices such as a smartphone, a camera, and a camcorder into digital data to generate a bitstream and transmit it to the streaming server.
  • multimedia input devices such as a smartphone, a camera, and a camcorder directly generate a bitstream
  • the encoding server may be omitted.
  • the bitstream may be generated by an encoding method or a bitstream generation method to which the present invention is applied, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
  • the streaming server transmits multimedia data to a user device based on a user request through a web server, and the web server serves as an intermediary to inform the user of the service.
  • the web server delivers it to the streaming server, and the streaming server transmits multimedia data to the user.
  • the content streaming system may include a separate control server, in which case the control server serves to control commands / responses between devices in the content streaming system.
  • the streaming server may receive content from a media storage and / or encoding server. For example, when content is received from the encoding server, the content may 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 predetermined time.
  • Examples of the user device include a mobile phone, a smart phone, a laptop computer, a terminal for digital broadcasting, a personal digital assistants (PDA), a portable multimedia player (PMP), navigation, a slate PC, Tablet PC, ultrabook, wearable device (e.g., smartwatch, smart glass, head mounted display (HMD)), digital TV, desktop Computers, digital signage, and the like.
  • PDA personal digital assistants
  • PMP portable multimedia player
  • slate PC slate PC
  • Tablet PC tablet
  • ultrabook ultrabook
  • wearable device e.g., smartwatch, smart glass, head mounted display (HMD)
  • digital TV desktop Computers, digital signage, and the like.
  • Each server in the content streaming system can be operated as a distributed server, and in this case, data received from each server can be distributed.

Abstract

An image decoding method according to the present invention comprises: acquiring prediction mode information, residual information, and transform index information from a bitstream; deriving a prediction mode for the current block on the basis of the prediction mode information; deriving prediction samples by performing intra-prediction for the current block when the prediction mode is an intra-prediction mode; deriving quantized transform coefficients for the current block on the basis of the residual information; deriving transform coefficients by performing dequantization on the basis of the quantized transform coefficients; deriving a horizontal transform kernel and a vertical transform kernel on the basis of the transform index information; deriving residual samples for the current block by performing inverse transformation of the transform coefficients on the basis of the horizontal transform kernel and the vertical transform kernel; and producing a reconstruction picture on the basis of the prediction samples and the residual samples.

Description

다중 변환 선택에 기반한 영상 코딩 방법 및 그 장치Image coding method and apparatus based on multiple transform selection
본 발명은 영상 코딩 기술에 관한 것으로서, 보다 상세하게는 영상 코딩 시스템에서 다중 변환 선택에 기반한 영상 코딩 방법 및 그 장치에 관한 것이다.The present invention relates to an image coding technique, and more particularly, to an image coding method and apparatus based on multiple transform selection in an image coding system.
최근 4K 또는 8K 이상의 UHD(Ultra High Definition) 영상/비디오와 같은 고해상도, 고품질의 영상/비디오에 대한 수요가 다양한 분야에서 증가하고 있다. 영상/비디오 데이터가 고해상도, 고품질이 될수록 기존의 영상/비디오 데이터에 비해 상대적으로 전송되는 정보량 또는 비트량이 증가하기 때문에 기존의 유무선 광대역 회선과 같은 매체를 이용하여 영상 데이터를 전송하거나 기존의 저장 매체를 이용해 영상/비디오 데이터를 저장하는 경우, 전송 비용과 저장 비용이 증가된다. Recently, demand for high-resolution, high-quality video / video, such as 4K or 8K or higher Ultra High Definition (UHD) video / video, is increasing in various fields. As the video / video data becomes high-resolution and high-quality, the amount of information or bits transmitted relative to the existing video / video data increases, so the video data is transmitted using a medium such as a conventional wired / wireless broadband line or an existing storage medium. When using to store video / video data, transmission cost and storage cost increase.
또한, 최근 VR(Virtual Reality), AR(Artificial Realtiy) 컨텐츠나 홀로그램 등의 실감 미디어(Immersive Media)에 대한 관심 및 수요가 증가하고 있으며, 게임 영상과 같이 현실 영상과 다른 영상 특성을 갖는 영상/비디오에 대한 방송이 증가하고 있다.In addition, recently, interest and demand for immersive media such as VR (Virtual Reality), AR (Artificial Realtiy) content, or holograms is increasing, and video / video having video characteristics different from reality videos such as game videos. The broadcast for is increasing.
이에 따라, 상기와 같은 다양한 특성을 갖는 고해상도 고품질의 영상/비디오의 정보를 효과적으로 압축하여 전송하거나 저장하고, 재생하기 위해 고효율의 영상/비디오 압축 기술이 요구된다.Accordingly, a high-efficiency video / video compression technology is required to effectively compress, transmit, store, and reproduce information of a high-resolution, high-quality video / video having various characteristics as described above.
본 발명의 기술적 과제는 영상 코딩 효율을 높이는 방법 및 장치를 제공함에 있다.An object of the present invention is to provide a method and apparatus for improving image coding efficiency.
본 발명의 다른 기술적 과제는 변환 효율을 높이는 방법 및 장치를 제공함에 있다.Another technical problem of the present invention is to provide a method and apparatus for increasing conversion efficiency.
본 발명의 또 다른 기술적 과제는 다중 변환 선택(Multiple Transform Selection)에 기반한 영상 코딩 방법 및 장치를 제공함에 있다.Another technical problem of the present invention is to provide an image coding method and apparatus based on multiple transform selection.
본 발명의 또 다른 기술적 과제는 코딩 효율을 증가시킬 수 있는 다중 변환 선택에 관한 정보를 코딩하는 방법 및 장치를 제공함에 있다.Another technical problem of the present invention is to provide a method and apparatus for coding information on multiple transform selection that can increase coding efficiency.
본 발명의 일 실시예에 따르면, 디코딩 장치에 의하여 수행되는 영상 디코딩 방법이 제공된다. 상기 방법은 비트스트림으로부터 예측 모드 정보, 레지듀얼 정보 및 변환 인덱스 정보를 획득하는 단계, 상기 예측 모드 정보를 기반으로 현재 블록에 대한 예측 모드를 도출하는 단계, 상기 예측 모드가 인트라 예측 모드인 경우, 상기 현재 블록에 대해 인트라 예측을 수행하여 예측 샘플들을 도출하는 단계, 상기 레지듀얼 정보를 기반으로 상기 현재 블록에 대한 양자화된 변환 계수들을 도출하는 단계, 상기 양자화된 변환 계수들을 기반으로 역양자화를 수행하여 변환 계수들을 도출하는 단계, 상기 변환 인덱스 정보를 기반으로 수평 변환 커널 및 수직 변환 커널을 도출하는 단계, 상기 수평 변환 커널 및 상기 수직 변환 커널을 기반으로 상기 변환 계수들에 대해 역변환을 수행하여 상기 현재 블록에 대한 레지듀얼 샘플들을 도출하는 단계, 및 상기 예측 샘플들 및 상기 레지듀얼 샘플들을 기반으로 복원 픽처를 생성하는 단계를 포함하며, 상기 수평 변환 커널 및 상기 수직 변환 커널을 도출하는 단계는, 복수의 변환 조합들로부터 상기 변환 인덱스 정보에 대응되는 변환 조합을 선택하고, 상기 선택된 변환 조합에 포함된 상기 수평 변환 커널 및 상기 수직 변환 커널을 도출하는 것을 특징으로 한다. According to an embodiment of the present invention, an image decoding method performed by a decoding apparatus is provided. The method includes obtaining prediction mode information, residual information, and transform index information from a bitstream, deriving a prediction mode for a current block based on the prediction mode information, and when the prediction mode is an intra prediction mode, Deriving prediction samples by performing intra prediction on the current block, deriving quantized transform coefficients for the current block based on the residual information, and performing inverse quantization based on the quantized transform coefficients Deriving transform coefficients, deriving a horizontal transform kernel and a vertical transform kernel based on the transform index information, and performing inverse transform on the transform coefficients based on the horizontal transform kernel and the vertical transform kernel to Deriving residual samples for the current block, and phase And generating a reconstructed picture based on the predicted samples and the residual samples, and deriving the horizontal transform kernel and the vertical transform kernel include transforms corresponding to the transform index information from a plurality of transform combinations. And selecting the combination, and deriving the horizontal transform kernel and the vertical transform kernel included in the selected transform combination.
본 발명의 다른 일 실시예에 따르면, 인코딩 장치에 의하여 수행되는 영상 인코딩 방법이 제공된다. 상기 방법은 현재 블록에 대한 예측 모드를 도출하는 단계, 상기 예측 모드가 인트라 예측 모드인 경우, 상기 현재 블록에 대해 인트라 예측을 수행하여 예측 샘플들을 도출하는 단계, 상기 예측 샘플들을 기반으로 상기 현재 블록에 대한 레지듀얼 샘플들을 도출하는 단계, 상기 현재 블록의 레지듀얼 샘플들에 적용되는 수평 변환 커널 및 수직 변환 커널을 도출하는 단계, 상기 수평 변환 커널 및 상기 수직 변환 커널을 기반으로 변환 인덱스 정보를 생성하는 단계, 상기 수평 변환 커널 및 상기 수직 변환 커널을 기반으로 상기 레지듀얼 샘플들에 대해 변환을 수행하여 상기 현재 블록에 대한 변환 계수들을 도출하는 단계, 상기 변환 계수들을 기반으로 양자화를 수행하여 양자화된 변환 계수들을 도출하는 단계, 상기 양자화된 변환 계수들을 기반으로 레지듀얼 정보를 생성하는 단계, 및 상기 예측 모드 정보, 상기 레지듀얼 정보 및 상기 변환 인덱스 정보를 포함하는 영상 정보를 인코딩하는 단계를 포함하며, 상기 변환 인덱스 정보는 복수의 변환 조합들 중 상기 수평 변환 커널 및 상기 수직 변환 커널을 포함하는 변환 조합을 나타내는 것을 특징으로 한다. According to another embodiment of the present invention, an image encoding method performed by an encoding device is provided. The method includes deriving a prediction mode for a current block, when the prediction mode is an intra prediction mode, performing intra prediction on the current block to derive prediction samples, and based on the prediction samples Deriving residual samples for, deriving a horizontal transform kernel and a vertical transform kernel applied to residual samples of the current block, and generating transform index information based on the horizontal transform kernel and the vertical transform kernel Performing transformation on the residual samples based on the horizontal transform kernel and the vertical transform kernel to derive transform coefficients for the current block, and quantized by performing quantization based on the transform coefficients Deriving transform coefficients, based on the quantized transform coefficients Generating residual information, and encoding image information including the prediction mode information, the residual information, and the transform index information, wherein the transform index information is the horizontal transform among a plurality of transform combinations. Characterized in that it represents a combination of a transformation including a kernel and the vertical transformation kernel.
본 발명에 따르면 전반적인 영상/비디오 압축 효율을 높일 수 있다.According to the present invention, overall image / video compression efficiency can be improved.
본 발명에 따르면 효율적인 변환을 통하여 레지듀얼 처리를 위해 전송되어야 하는 데이터량을 줄일 수 있고, 레지듀얼 코딩 효율을 높일 수 있다.According to the present invention, it is possible to reduce the amount of data to be transmitted for residual processing through efficient conversion, and to increase residual coding efficiency.
본 발명에 따르면 다중 변환 선택을 적용함에 있어서 변환 효율에 따라 수평 및 수직 방향에 서로 다른 변환 커널들을 적용할 수 있으므로, 전반적인 코딩 효율을 향상시킬 수 있다. According to the present invention, when applying multiple transform selection, since different transform kernels can be applied in the horizontal and vertical directions according to the transform efficiency, overall coding efficiency can be improved.
도 1은 본 발명을 적용될 수 있는 비디오/영상 코딩 시스템의 예를 개략적으로 나타낸다.1 schematically shows an example of a video / image coding system to which the present invention can be applied.
도 2는 본 발명이 적용될 수 있는 비디오/영상 인코딩 장치의 구성을 개략적으로 설명하는 도면이다.2 is a diagram schematically illustrating a configuration of a video / video encoding apparatus to which the present invention can be applied.
도 3은 본 발명이 적용될 수 있는 비디오/영상 디코딩 장치의 구성을 개략적으로 설명하는 도면이다.3 is a diagram schematically illustrating a configuration of a video / video decoding apparatus to which the present invention can be applied.
도 4는 본 발명에 따른 다중 변환 기법을 개략적으로 설명하는 도면이다. 4 is a diagram schematically illustrating a multiplexing technique according to the present invention.
도 5는 본 발명의 일 실시예에 따른 다중 변환 선택(MTS 또는 EMT)의 적용 여부에 따라 변환 조합을 결정하는 과정을 나타내는 흐름도이다. 5 is a flowchart illustrating a process of determining a transform combination according to whether multiple transform selection (MTS or EMT) is applied according to an embodiment of the present invention.
도 6 및 도 7은 본 발명의 일 실시예에 따른 비분리 2차 변환(NSST)을 설명하기 위한 도면이다.6 and 7 are diagrams for explaining a non-separated quadratic transform (NSST) according to an embodiment of the present invention.
도 8 및 도 9는 본 발명의 일 실시예에 따른 RST를 설명하기 위한 도면이다. 8 and 9 are views for explaining RST according to an embodiment of the present invention.
도 10은 본 발명의 일 실시예에 따라 다중 변환 선택이 수행되는 인코딩 과정을 설명하기 위한 흐름도를 나타낸다. 10 is a flowchart illustrating an encoding process in which multiple transform selection is performed according to an embodiment of the present invention.
도 11은 본 발명의 일 실시예에 따라 다중 변환 선택이 수행되는 디코딩 과정을 설명하기 위한 흐름도를 나타낸다. 11 is a flowchart illustrating a decoding process in which multiple transform selection is performed according to an embodiment of the present invention.
도 12는 본 발명의 일 실시예에 따라 다중 변환 선택 플래그(AMT 플래그) 및 다중 변환 인덱스(AMT 인덱스)를 인코딩하는 과정을 설명하기 위한 흐름도를 나타낸다. 12 is a flowchart illustrating a process of encoding a multiple conversion selection flag (AMT flag) and multiple conversion index (AMT index) according to an embodiment of the present invention.
도 13은 본 발명의 일 실시예에 따라 다중 변환 선택 플래그(AMT 플래그) 및 다중 변환 인덱스(AMT 인덱스)에 기초하여 수평 변환 또는 수직 변환을 행 또는 열에 적용하는 디코딩 과정을 설명하기 위한 흐름도를 나타낸다.13 is a flowchart illustrating a decoding process of applying a horizontal transform or a vertical transform to a row or column based on a multiple transform selection flag (AMT flag) and a multiple transform index (AMT index) according to an embodiment of the present invention. .
도 14는 HEVC 표준에서 적용되고 있는 4x4 변환 계수 또는 변환 계수 블록(4x4 블록, Coefficient Group (CG))에 적용될 수 있는 세 가지 순방향 스캔 순서를 나타내고 있다.14 shows three forward scan sequences that can be applied to a 4x4 transform coefficient or a transform coefficient block (4x4 block, Coefficient Group (CG)) applied in the HEVC standard.
도 15 및 도 16은 본 발명의 일 실시예에 따라 대각선 스캔 순서에 따른 변환 계수들의 매핑을 도시한 도면이다.15 and 16 are diagrams illustrating mapping of transform coefficients according to a diagonal scan order according to an embodiment of the present invention.
도 17은 본 발명의 일 실시예에 따라 역변환을 수행하는 디코딩 방법을 개략적으로 나타내는 흐름도이다.17 is a flowchart schematically illustrating a decoding method for performing inverse transform according to an embodiment of the present invention.
도 18은 본 발명의 일 실시예에 따라 역변환을 수행하는 디코딩 장치의 관련 컴포넌트를 나타낸다.18 shows related components of a decoding apparatus for performing inverse transform according to an embodiment of the present invention.
도 19는 본 발명의 실시예에 따른 인코딩 장치에 의한 비디오/영상 인코딩 방법을 개략적으로 나타내는 흐름도이다. 19 is a flowchart schematically illustrating a video / video encoding method by an encoding device according to an embodiment of the present invention.
도 20은 본 발명의 실시예에 따른 디코딩 장치에 의한 비디오/영상 디코딩 방법을 개략적으로 나타내는 흐름도이다. 20 is a flowchart schematically illustrating a video / video decoding method by a decoding apparatus according to an embodiment of the present invention.
도 21은 본 문서에서 개시된 발명이 적용될 수 있는 컨텐츠 스트리밍 시스템의 예를 나타낸다.21 shows an example of a content streaming system to which the invention disclosed in this document can be applied.
본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정 실시예에 한정하려고 하는 것이 아니다. 본 명세서에서 상용하는 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명의 기술적 사상을 한정하려는 의도로 사용되는 것은 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서 "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성 요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성 요소, 부품 도는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The present invention can be applied to various changes and can have various embodiments, and specific embodiments will be illustrated in the drawings and described in detail. However, this is not intended to limit the invention to the specific examples. Terms used in this specification are only used to describe specific embodiments, and are not intended to limit the technical spirit of the present invention. Singular expressions include plural expressions unless the context clearly indicates otherwise. In this specification, the terms “include” or “have” are intended to indicate that a feature, number, step, operation, component, part, or combination thereof described in the specification exists, or that one or more other features or It should be understood that numbers, steps, operations, components, parts, or combinations thereof are not excluded in advance of the presence or addition possibilities.
한편, 본 발명에서 설명되는 도면상의 각 구성들은 서로 다른 특징적인 기능들에 관한 설명의 편의를 위해 독립적으로 도시된 것으로서, 각 구성들이 서로 별개의 하드웨어나 별개의 소프트웨어로 구현된다는 것을 의미하지는 않는다. 예컨대, 각 구성 중 두 개 이상의 구성이 합쳐져 하나의 구성을 이룰 수도 있고, 하나의 구성이 복수의 구성으로 나뉘어질 수도 있다. 각 구성이 통합 및/또는 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리범위에 포함된다.On the other hand, each configuration in the drawings described in the present invention is shown independently for convenience of description of the different characteristic functions, it does not mean that each configuration is implemented in separate hardware or separate software from each other. For example, two or more of each configuration may be combined to form one configuration, or one configuration may be divided into a plurality of configurations. Embodiments in which each configuration is integrated and / or separated are also included in the scope of the present invention without departing from the spirit of the present invention.
이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 이하, 도면상의 동일한 구성 요소에 대해서는 동일한 참조 부호를 사용하고 동일한 구성 요소에 대해서 중복된 설명은 생략될 수 있다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. Hereinafter, the same reference numerals are used for the same components in the drawings, and duplicate descriptions for the same components may be omitted.
이 문서는 비디오/영상 코딩에 관한 것이다. 예를 들어 이 문서에서 개시된 방법/실시예는 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 등)에 개시되는 방법에 적용될 수 있다.This document is about video / video coding. For example, the methods / embodiments disclosed in this document may include a versatile video coding (VVC) standard, an essential video coding (EVC) standard, an AOMedia Video 1 (AV1) standard, a 2nd generation of audio video coding standard (AVS2), or next-generation video / It can be applied to the method disclosed in the video coding standard (ex. H.267 or H.268, etc.).
이 문서에서는 비디오/영상 코딩에 관한 다양한 실시예들을 제시하며, 다른 언급이 없는 한 상기 실시예들은 서로 조합되어 수행될 수도 있다. In this document, various embodiments of video / image coding are proposed, and the above embodiments may be performed in combination with each other unless otherwise specified.
이 문서에서 비디오(video)는 시간의 흐름에 따른 일련의 영상(image)들의 집합을 의미할 수 있다. 픽처(picture)는 일반적으로 특정 시간대의 하나의 영상을 나타내는 단위를 의미하며, 슬라이스(slice)/타일(tile)는 코딩에 있어서 픽처의 일부를 구성하는 단위이다. 슬라이스/타일은 하나 이상의 CTU(coding tree unit)을 포함할 수 있다. 하나의 픽처는 하나 이상의 슬라이스/타일로 구성될 수 있다. 하나의 픽처는 하나 이상의 타일 그룹으로 구성될 수 있다. 하나의 타일 그룹은 하나 이상의 타일들을 포함할 수 있다. 브릭은 픽처 내 타일 이내의 CTU 행들의 사각 영역을 나타낼 수 있다(a brick may represent a rectangular region of CTU rows within a tile in a picture). 타일은 다수의 브릭들로 파티셔닝될 수 있고, 각 브릭은 상기 타일 내 하나 이상의 CTU 행들로 구성될 수 있다(A tile may be partitioned into multiple bricks, each of which consisting of one or more CTU rows within the tile). 다수의 브릭들로 파티셔닝되지 않은 타일은 또한 브릭으로 불릴 수 있다(A tile that is not partitioned into multiple bricks may be also referred to as a brick). 브릭 스캔은 픽처를 파티셔닝하는 CTU들의 특정한 순차적 오더링을 나타낼 수 있으며, 상기 CTU들은 브릭 내에서 CTU 래스터 스캔으로 정렬될 수 있고, 타일 내 브릭들은 상기 타일의 상기 브릭들의 래스터 스캔으로 연속적으로 정렬될 수 있고, 그리고 픽처 내 타일들은 상기 픽처의 상기 타일들의 래스터 스캔으로 연속적으로 정렬될 수 있다(A brick scan is a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a brick, bricks within a tile are ordered consecutively in a raster scan of the bricks of the tile, and tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture). 타일은 특정 타일 열 및 특정 타일 열 이내의 CTU들의 사각 영역이다(A tile is a rectangular region of CTUs within a particular tile column and a particular tile row in a picture). 상기 타일 열은 CTU들의 사각 영역이고, 상기 사각 영역은 상기 픽처의 높이와 동일한 높이를 갖고, 너비는 픽처 파라미터 세트 내의 신택스 요소들에 의하여 명시될 수 있다(The tile column is a rectangular region of CTUs having a height equal to the height of the picture and a width specified by syntax elements in the picture parameter set). 상기 타일 행은 CTU들의 사각 영역이고, 상기 사각 영역은 픽처 파라미터 세트 내의 신택스 요소들에 의하여 명시되는 너비를 갖고, 높이는 상기 픽처의 높이와 동일할 수 있다(The tile row is a rectangular region of CTUs having a height specified by syntax elements in the picture parameter set and a width equal to the width of the picture). 타일 스캔은 픽처를 파티셔닝하는 CTU들의 특정 순차적 오더링을 나타낼 수 있고, 상기 CTU들은 타일 내 CTU 래스터 스캔으로 연속적으로 정렬될 수 있고, 픽처 내 타일들은 상기 픽처의 상기 타일들의 래스터 스캔으로 연속적으로 정렬될 수 있다(A tile scan is a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a tile whereas tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture). 슬라이스는 픽처의 정수개의 브릭들을 포함할 수 있고, 상기 정수개의 브릭들은 하나의 NAL 유닛에 포함될 수 있다(A slice includes an integer number of bricks of a picture that may be exclusively contained in a single NAL unit). 슬라이스는 다수의 완전한 타일들로 구성될 수 있고, 또는 하나의 타일의 완전한 브릭들의 연속적인 시퀀스일 수도 있다(A slice may consists of either a number of complete tiles or only a consecutive sequence of complete bricks of one tile). 이 문서에서 타일 그룹과 슬라이스는 혼용될 수 있다. 예를 들어 본 문서에서 tile group/tile group header는 slice/slice header로 불리 수 있다. In this document, video may refer to a set 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 constituting a part of a picture in coding. A slice / tile may include one or more coding tree units (CTUs). One picture may be composed of one or more slices / tiles. One picture may be composed of one or more tile groups. One tile group may include one or more tiles. The brick may represent a rectangular region of CTU rows within a tile in a picture. Tiles can be partitioned into multiple bricks, and each brick can be composed of one or more CTU rows in the tile (A tile may be partitioned into multiple bricks, each of which consisting of one or more CTU rows within the tile ). A tile that is not partitioned into multiple bricks may be also referred to as a brick. A brick scan can indicate a specific sequential ordering of CTUs partitioning a picture, the CTUs can be aligned with a CTU raster scan within a brick, and the bricks in a tile can be aligned sequentially with a raster scan of the bricks of the tile. A, and tiles in a picture can be sequentially aligned with a raster scan of the tiles of the picture (A brick scan is a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a brick , bricks within a tile are ordered consecutively in a raster scan of the bricks of the tile, and tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture). A tile is a rectangular region of CTUs within a particular tile column and a particular tile row in a picture. The tile column is a rectangular area of CTUs, the rectangular area has a height equal to the height of the picture, and the width can be specified by syntax elements in a picture parameter set (The tile column is a rectangular region of CTUs having a height equal to the height of the picture and a width specified by syntax elements in the picture parameter set). The tile row is a rectangular region of CTUs, the rectangular region has a width specified by syntax elements in a picture parameter set, and the height can be the same as the height of the picture (The tile row is a rectangular region of CTUs having a height specified by syntax elements in the picture parameter set and a width equal to the width of the picture). A tile scan can indicate a specific sequential ordering of CTUs partitioning a picture, the CTUs can be successively aligned with a CTU raster scan within a tile, and the tiles in a picture have been successively aligned with a raster scan of the tiles of the picture. (A tile scan is a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a tile whereas tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture). A slice may include an integer number of bricks of a picture, and the integer number of bricks may be included in one NAL unit (A slice includes an integer number of bricks of a picture that may be exclusively contained in a single NAL unit). A slice may consist of either a number of complete tiles or only a consecutive sequence of complete bricks of one tile ). Tile groups and slices can be used interchangeably in this document. For example, the tile group / tile group header in this document may be referred to as a slice / slice header.
픽셀(pixel) 또는 펠(pel)은 하나의 픽처(또는 영상)을 구성하는 최소의 단위를 의미할 수 있다. 또한, 픽셀에 대응하는 용어로서 '샘플(sample)'이 사용될 수 있다. 샘플은 일반적으로 픽셀 또는 픽셀의 값을 나타낼 수 있으며, 루마(luma) 성분의 픽셀/픽셀값만을 나타낼 수도 있고, 크로마(chroma) 성분의 픽셀/픽셀 값만을 나타낼 수도 있다. 또는 샘플은 공간 도메인에서의 픽셀값을 의미할 수도 있고, 이러한 픽셀값이 주파수 도메인으로 변환되면 주파수 도메인에서의 변환 계수를 의미할 수도 있다.A pixel or pel may mean a minimum unit constituting one picture (or image). In addition, 'sample' may be used as a term corresponding to a pixel. The sample may generally represent a pixel or a pixel value, may represent only a pixel / pixel value of a luma component, or may represent only a pixel / pixel value of a chroma component. Alternatively, the sample may mean a pixel value in the spatial domain, or a conversion coefficient in the frequency domain when the pixel value is converted into the frequency domain.
유닛(unit)은 영상 처리의 기본 단위를 나타낼 수 있다. 유닛은 픽처의 특정 영역 및 해당 영역에 관련된 정보 중 적어도 하나를 포함할 수 있다. 하나의 유닛은 하나의 루마 블록 및 두개의 크로마(ex. cb, cr) 블록을 포함할 수 있다. 유닛은 경우에 따라서 블록(block) 또는 영역(area) 등의 용어와 혼용하여 사용될 수 있다. 일반적인 경우, MxN 블록은 M개의 열과 N개의 행으로 이루어진 샘플들(또는 샘플 어레이) 또는 변환 계수(transform coefficient)들의 집합(또는 어레이)을 포함할 수 있다.The unit may represent a basic unit of image processing. The unit may include at least one of a specific region of a picture and information related to the region. One unit may include one luma block and two chroma (ex. Cb, cr) blocks. The unit may be used interchangeably with terms such as a block or area depending on the case. In the general case, the MxN block may include samples (or sample arrays) of M columns and N rows or a set (or array) of transform coefficients.
이 문서에서 "/"와 ","는 "및/또는"으로 해석된다. 예를 들어, "A/B"는 "A 및/또는 B"로 해석되고, "A, B"는 "A 및/또는 B"로 해석된다. 추가적으로, "A/B/C"는 "A, B 및/또는 C 중 적어도 하나"를 의미한다. 또한, "A, B, C"도 "A, B 및/또는 C 중 적어도 하나"를 의미한다. (In this document, the term "/" and "," should be interpreted to indicate "and/or." For instance, the expression "A/B" may mean "A and/or B." Further, "A, B" may mean "A and/or B." Further, "A/B/C" may mean "at least one of A, B, and/or C." Also, "A/B/C" may mean "at least one of A, B, and/or C.") In this document, "/" and "," are interpreted as "and / or". For example, “A / B” is interpreted as “A and / or B”, and “A, B” is interpreted as “A and / or B”. Additionally, “A / B / C” means “at least one of A, B and / or C”. Also, “A, B, and C” means “at least one of A, B, and / or C”. (In this document, the term "/" and "," should be interpreted to indicate "and / or." For instance, the expression "A / B" may mean "A and / or B." Further, "A, B "may mean" A and / or B. "Further," A / B / C "may mean" at least one of A, B, and / or C. "Also," A / B / C "may mean" at least one of A, B, and / or C. ")
추가적으로, 본 문서에서 "또는"는 "및/또는"으로 해석된다. 예를 들어, "A 또는 B"은, 1) "A" 만을 의미하고, 2) "B" 만을 의미하거나, 3) "A 및 B"를 의미할 수 있다. 달리 표현하면, 본 문서의 "또는"은 "추가적으로 또는 대체적으로(additionally or alternatively)"를 의미할 수 있다. (Further, in the document, the term "or" should be interpreted to indicate "and/or." For instance, the expression "A or B" may comprise 1) only A, 2) only B, and/or 3) both A and B. In other words, the term "or" in this document should be interpreted to indicate "additionally or alternatively.")Additionally, "or" in this document is interpreted as "and / or." For example, “A or B” may mean 1) only “A”, 2) only “B”, or 3) “A and B”. In other words, “or” in this document may mean “additionally or alternatively”. (Further, in the document, the term "or" should be interpreted to indicate "and / or." For instance, the expression "A or B" may comprise 1) only A, 2) only B, and / or 3) both A and B. In other words, the term "or" in this document should be interpreted to indicate "additionally or alternatively.")
도 1은 본 발명을 적용될 수 있는 비디오/영상 코딩 시스템의 예를 개략적으로 나타낸다.1 schematically shows an example of a video / image coding system to which the present invention can be applied.
도 1을 참조하면, 비디오/영상 코딩 시스템은 제1 장치(소스 디바이스) 및 제2 장치(수신 디바이스)를 포함할 수 있다. 소스 디바이스는 인코딩된 비디오(video)/영상(image) 정보 또는 데이터를 파일 또는 스트리밍 형태로 디지털 저장매체 또는 네트워크를 통하여 수신 디바이스로 전달할 수 있다. Referring to FIG. 1, a video / image coding system may include a first device (source device) and a second device (receiving device). The source device may transmit the encoded video / image information or data to a receiving device through a digital storage medium or network in the form of a file or streaming.
상기 소스 디바이스는 비디오 소스, 인코딩 장치, 전송부를 포함할 수 있다. 상기 수신 디바이스는 수신부, 디코딩 장치 및 렌더러를 포함할 수 있다. 상기 인코딩 장치는 비디오/영상 인코딩 장치라고 불릴 수 있고, 상기 디코딩 장치는 비디오/영상 디코딩 장치라고 불릴 수 있다. 송신기는 인코딩 장치에 포함될 수 있다. 수신기는 디코딩 장치에 포함될 수 있다. 렌더러는 디스플레이부를 포함할 수도 있고, 디스플레이부는 별개의 디바이스 또는 외부 컴포넌트로 구성될 수도 있다. 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 apparatus, and a renderer. The encoding device may be called a video / video encoding device, and the decoding device may be called a video / video decoding device. The transmitter can be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display unit, and the display unit may be configured as a separate device or an external component.
비디오 소스는 비디오/영상의 캡쳐, 합성 또는 생성 과정 등을 통하여 비디오/영상을 획득할 수 있다. 비디오 소스는 비디오/영상 캡쳐 디바이스 및/또는 비디오/영상 생성 디바이스를 포함할 수 있다. 비디오/영상 캡쳐 디바이스는 예를 들어, 하나 이상의 카메라, 이전에 캡쳐된 비디오/영상을 포함하는 비디오/영상 아카이브 등을 포함할 수 있다. 비디오/영상 생성 디바이스는 예를 들어 컴퓨터, 타블렛 및 스마트폰 등을 포함할 수 있으며 (전자적으로) 비디오/영상을 생성할 수 있다. 예를 들어, 컴퓨터 등을 통하여 가상의 비디오/영상이 생성될 수 있으며, 이 경우 관련 데이터가 생성되는 과정으로 비디오/영상 캡쳐 과정이 갈음될 수 있다.The video source may acquire a video / image through a capture, synthesis, or generation process of the video / image. The video source may include a video / image capture device and / or a video / image generation device. The video / image capture device may include, for example, one or more cameras, a video / image archive including previously captured video / images, and the like. The video / image generating device may include, for example, a computer, a tablet and a smart phone, and the like (electronically) to generate the video / image. For example, a virtual video / image may be generated through a computer or the like, and in this case, the video / image capture process may be replaced by a process in which related data is generated.
인코딩 장치는 입력 비디오/영상을 인코딩할 수 있다. 인코딩 장치는 압축 및 코딩 효율을 위하여 예측, 변환, 양자화 등 일련의 절차를 수행할 수 있다. 인코딩된 데이터(인코딩된 비디오/영상 정보)는 비트스트림(bitstream) 형태로 출력될 수 있다.The encoding device can encode the input video / video. The encoding apparatus may perform a series of procedures such as prediction, transformation, and quantization for compression and coding efficiency. The encoded data (encoded video / video information) may be output in the form of a bitstream.
전송부는 비트스트림 형태로 출력된 인코딩된 비디오/영상 정보 또는 데이터를 파일 또는 스트리밍 형태로 디지털 저장매체 또는 네트워크를 통하여 수신 디바이스의 수신부로 전달할 수 있다. 디지털 저장 매체는 USB, SD, CD, DVD, 블루레이, HDD, SSD 등 다양한 저장 매체를 포함할 수 있다. 전송부는 미리 정해진 파일 포멧을 통하여 미디어 파일을 생성하기 위한 엘리먼트를 포함할 수 있고, 방송/통신 네트워크를 통한 전송을 위한 엘리먼트를 포함할 수 있다. 수신부는 상기 비트스트림을 수신/추출하여 디코딩 장치로 전달할 수 있다.The transmitting unit may transmit the encoded video / video information or data output in the form of a bitstream to a receiving unit of a receiving device through a digital storage medium or a network in a file or streaming format. The digital storage media may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD. The transmission unit may include an element for generating a media file through a predetermined file format, and may include an element for transmission through a broadcast / communication network. The receiver may receive / extract the bitstream and deliver it to a decoding device.
디코딩 장치는 인코딩 장치의 동작에 대응하는 역양자화, 역변환, 예측 등 일련의 절차를 수행하여 비디오/영상을 디코딩할 수 있다. The decoding apparatus may decode a video / image by performing a series of procedures such as inverse quantization, inverse transformation, and prediction corresponding to the operation of the encoding apparatus.
렌더러는 디코딩된 비디오/영상을 렌더링할 수 있다. 렌더링된 비디오/영상은 디스플레이부를 통하여 디스플레이될 수 있다.The renderer can render the decoded video / image. The rendered video / image may be displayed through the display unit.
도 2는 본 발명이 적용될 수 있는 비디오/영상 인코딩 장치의 구성을 개략적으로 설명하는 도면이다. 이하 비디오 인코딩 장치라 함은 영상 인코딩 장치를 포함할 수 있다. 2 is a diagram schematically illustrating a configuration of a video / video encoding apparatus to which the present invention can be applied. Hereinafter, the video encoding device may include a video encoding device.
도 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)을 내/외부 컴포넌트로 더 포함할 수도 있다.Referring to FIG. 2, the encoding device 200 includes an image partitioner 210, a predictor 220, a residual processor 230, and an entropy encoder 240. It may be configured to include an adder (250), a filtering unit (filter, 260) and a memory (memory, 270). The prediction unit 220 may include an inter prediction unit 221 and an intra prediction unit 222. The residual processing unit 230 may include a transform unit 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 recontructged block generator. The above-described image segmentation unit 210, prediction unit 220, residual processing unit 230, entropy encoding unit 240, adding unit 250, and filtering unit 260 may include one or more hardware components ( For example, it may be configured by an encoder chipset or processor). Also, the memory 270 may include a decoded picture buffer (DPB), or may be configured by a digital storage medium. The hardware component may further include a memory 270 as an internal / external component.
영상 분할부(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)를 유도하는 단위일 수 있다. The image division unit 210 may divide the input image (or picture, frame) input to the encoding apparatus 200 into one or more processing units. For example, the processing unit may be called a coding unit (CU). In this case, the coding unit is recursively divided according to a quad-tree binary-tree ternary-tree (QTBTTT) structure from a coding tree unit (CTU) or a largest coding unit (LCU). You can. For example, one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad tree structure, a binary tree structure, and / or a ternary structure. In this case, for example, a quad tree structure may be applied first, and a binary tree structure and / or a ternary structure may be applied later. Alternatively, a binary tree structure may be applied first. The coding procedure according to the present invention can be performed based on the final coding unit that is no longer split. In this case, the maximum coding unit may be directly used as a final coding unit based on coding efficiency according to image characteristics, or the coding unit may be recursively divided into coding units having a lower depth than optimal if necessary. The coding unit of the size of can be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and reconstruction, which will be described later. As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may be partitioned or partitioned from the above-described final coding unit, respectively. The prediction unit may be a unit of sample prediction, and the transformation unit may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from the transform coefficient.
유닛은 경우에 따라서 블록(block) 또는 영역(area) 등의 용어와 혼용하여 사용될 수 있다. 일반적인 경우, MxN 블록은 M개의 열과 N개의 행으로 이루어진 샘플들 또는 변환 계수(transform coefficient)들의 집합을 나타낼 수 있다. 샘플은 일반적으로 픽셀 또는 픽셀의 값을 나타낼 수 있으며, 휘도(luma) 성분의 픽셀/픽셀값만을 나타낼 수도 있고, 채도(chroma) 성분의 픽셀/픽셀 값만을 나타낼 수도 있다. 샘플은 하나의 픽처(또는 영상)을 픽셀(pixel) 또는 펠(pel)에 대응하는 용어로서 사용될 수 있다.The unit may be used interchangeably with terms such as a block or area depending on the case. In a general case, the MxN block may represent samples of M columns and N rows or a set of transform coefficients. The sample may generally represent a pixel or a pixel value, and may indicate only a pixel / pixel value of a luma component or only a pixel / pixel value of a saturation component. The sample may be used as a term for one picture (or image) corresponding to a pixel or pel.
인코딩 장치(200)는 입력 영상 신호(원본 블록, 원본 샘플 어레이)에서 인터 예측부(221) 또는 인트라 예측부(222)로부터 출력된 예측 신호(예측된 블록, 예측 샘플 어레이)를 감산하여 레지듀얼 신호(residual signal, 잔여 블록, 잔여 샘플 어레이)를 생성할 수 있고, 생성된 레지듀얼 신호는 변환부(232)로 전송된다. 이 경우 도시된 바와 같이 인코더(200) 내에서 입력 영상 신호(원본 블록, 원본 샘플 어레이)에서 예측 신호(예측 블록, 예측 샘플 어레이)를 감산하는 유닛은 감산부(231)라고 불릴 수 있다. 예측부는 처리 대상 블록(이하, 현재 블록이라 함)에 대한 예측을 수행하고, 상기 현재 블록에 대한 예측 샘플들을 포함하는 예측된 블록(predicted block)을 생성할 수 있다. 예측부는 현재 블록 또는 CU 단위로 인트라 예측이 적용되는지 또는 인터 예측이 적용되는지 결정할 수 있다. 예측부는 각 예측모드에 대한 설명에서 후술하는 바와 같이 예측 모드 정보 등 예측에 관한 다양한 정보를 생성하여 엔트로피 인코딩부(240)로 전달할 수 있다. 예측에 관한 정보는 엔트로피 인코딩부(240)에서 인코딩되어 비트스트림 형태로 출력될 수 있다. The encoding apparatus 200 subtracts a prediction signal (a predicted block, a 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). A signal (residual signal, residual block, residual sample array) may be generated, and the generated residual signal is transmitted to the conversion unit 232. In this case, as illustrated, a unit for subtracting a prediction signal (a prediction block, a prediction sample array) from an input image signal (original block, original sample array) in the encoder 200 may be referred to as a subtraction unit 231. The prediction unit 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 may determine whether intra prediction or inter prediction is applied in units of a current block or CU. As described later in the description of each prediction mode, the prediction unit may generate various information regarding prediction, such as prediction mode information, and transmit it to the entropy encoding unit 240. The prediction information may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
인트라 예측부(222)는 현재 픽처 내의 샘플들을 참조하여 현재 블록을 예측할 수 있다. 상기 참조되는 샘플들은 예측 모드에 따라 상기 현재 블록의 주변(neighbor)에 위치할 수 있고, 또는 떨어져서 위치할 수도 있다. 인트라 예측에서 예측 모드들은 복수의 비방향성 모드와 복수의 방향성 모드를 포함할 수 있다. 비방향성 모드는 예를 들어 DC 모드 및 플래너 모드(Planar 모드)를 포함할 수 있다. 방향성 모드는 예측 방향의 세밀한 정도에 따라 예를 들어 33개의 방향성 예측 모드 또는 65개의 방향성 예측 모드를 포함할 수 있다. 다만, 이는 예시로서 설정에 따라 그 이상 또는 그 이하의 개수의 방향성 예측 모드들이 사용될 수 있다. 인트라 예측부(222)는 주변 블록에 적용된 예측 모드를 이용하여, 현재 블록에 적용되는 예측 모드를 결정할 수도 있다.The intra prediction unit 222 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located apart depending on a prediction mode. In intra prediction, prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The non-directional mode may include, for example, a DC mode and a planar mode (Planar mode). The directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the degree of detail of the prediction direction. However, this is an example, and more or less directional prediction modes may be used depending on the setting. The intra prediction unit 222 may determine a prediction mode applied to the current block using a prediction mode applied to neighboring blocks.
인터 예측부(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)을 시그널링함으로써 현재 블록의 움직임 벡터를 지시할 수 있다.The inter prediction unit 221 may derive the predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on the reference picture. At this time, to reduce the amount of motion information transmitted in the inter prediction mode, motion information may be predicted in units of blocks, subblocks, or samples based on the correlation of motion information between a neighboring block and a current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring block may include a spatial neighboring block existing in the current picture and a temporal neighboring block present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be referred to by a name such as a collocated reference block or a colCU, and a reference picture including the temporal neighboring block may be called a collocated picture (colPic). It might be. For example, the inter prediction unit 221 constructs a motion information candidate list based on neighboring blocks, and provides information indicating which candidates are 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. For example, in the case of the skip mode and the merge mode, the inter prediction unit 221 may use motion information of neighboring blocks as motion information of the current block. In the skip mode, unlike the merge mode, the residual signal may not be transmitted. In the case of a motion vector prediction (MVP) mode, a motion vector of a current block is obtained by using a motion vector of a neighboring block as a motion vector predictor and signaling a motion vector difference. I can order.
예측부(220)는 후술하는 다양한 예측 방법을 기반으로 예측 신호를 생성할 수 있다. 예를 들어, 예측부는 하나의 블록에 대한 예측을 위하여 인트라 예측 또는 인터 예측을 적용할 수 있을 뿐 아니라, 인트라 예측과 인터 예측을 동시에 적용할 수 있다. 이는 combined inter and intra prediction (CIIP)라고 불릴 수 있다. 또한, 예측부는 블록에 대한 예측을 위하여 인트라 블록 카피(intra block copy, IBC) 예측 모드에 기반할 수도 있고 또는 팔레트 모드(palette mode)에 기반할 수도 있다. 상기 IBC 예측 모드 또는 팔레트 모드는 예를 들어 SCC(screen content coding) 등과 같이 게임 등의 컨텐츠 영상/동영상 코딩을 위하여 사용될 수 있다. IBC는 기본적으로 현재 픽처 내에서 예측을 수행하나 현재 픽처 내에서 참조 블록을 도출하는 점에서 인터 예측과 유사하게 수행될 수 있다. 즉, IBC는 본 문서에서 설명되는 인터 예측 기법들 중 적어도 하나를 이용할 수 있다. 팔레트 모드는 인트라 코딩 또는 인트라 예측의 일 예로 볼 수 있다. 팔레트 모드가 적용되는 경우 팔레트 테이블 및 팔레트 인덱스에 관한 정보를 기반으로 픽처 내 샘플 값을 시그널링할 수 있다. The prediction unit 220 may generate a prediction signal based on various prediction methods described below. For example, the prediction unit may apply intra prediction or inter prediction as well as intra prediction and inter prediction at the same time for prediction for one block. This can be called combined inter and intra prediction (CIIP). Also, the prediction unit may be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode may be used for content video / video coding such as a game, such as screen content coding (SCC). IBC basically performs prediction in the current picture, but may be performed similarly to inter prediction in that a reference block is derived in the current picture. That is, the IBC can use at least one of the inter prediction techniques described in this document. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, a sample value in a picture may be signaled based on information on the palette table and palette index.
상기 예측부 (인터 예측부(221) 및/또는 상기 인트라 예측부(222) 포함)를 통해 생성된 예측 신호는 복원 신호를 생성하기 위해 이용되거나 레지듀얼 신호를 생성하기 위해 이용될 수 있다. 변환부(232)는 레지듀얼 신호에 변환 기법을 적용하여 변환 계수들(transform coefficients)를 생성할 수 있다. 예를 들어, 변환 기법은 DCT(Discrete Cosine Transform), DST(Discrete Sine Transform), KLT(
Figure PCTKR2019011486-appb-I000001
), GBT(Graph-Based Transform), 또는 CNT(Conditionally Non-linear Transform) 중 적어도 하나를 포함할 수 있다. 여기서, GBT는 픽셀 간의 관계 정보를 그래프로 표현한다고 할 때 이 그래프로부터 얻어진 변환을 의미한다. CNT는 이전에 복원된 모든 픽셀(all previously reconstructed pixel)를 이용하여 예측 신호를 생성하고 그에 기초하여 획득되는 변환을 의미한다. 또한, 변환 과정은 정사각형의 동일한 크기를 갖는 픽셀 블록에 적용될 수도 있고, 정사각형이 아닌 가변 크기의 블록에도 적용될 수 있다.
The prediction signal generated through the prediction unit (including the inter prediction unit 221 and / or the intra prediction unit 222) may be used to generate a reconstructed signal or may be used to generate a residual signal. The transform unit 232 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transformation technique is DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT (
Figure PCTKR2019011486-appb-I000001
), GBT (Graph-Based Transform), or CNT (Conditionally Non-linear Transform). Here, GBT refers to a transformation obtained from this graph when it is said that the relationship information between pixels is graphed. CNT means a transform obtained by generating a prediction signal using all previously reconstructed pixels and based on it. Also, the transform process may be applied to pixel blocks having the same size of a square, or may be applied to blocks of variable sizes other than squares.
양자화부(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)에 포함될 수도 있다.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 quantized transform coefficients) and outputs it as a bitstream. have. Information about the quantized transform coefficients may be called residual information. The quantization unit 233 may rearrange block-type quantized transform coefficients into a one-dimensional vector form based on a coefficient scan order, and quantize the quantized transform coefficients based on the one-dimensional vector form. Information regarding transform coefficients may be generated. The entropy encoding unit 240 may perform various encoding methods such as exponential Golomb (CAVLC), 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 reconstruction (eg, a value of syntax elements, etc.) together with the quantized transform coefficients together or separately. The encoded information (ex. Encoded video / video information) may be transmitted or stored in units of network abstraction layer (NAL) units in the form of a bitstream. The video / image information may further include information regarding 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). Also, the video / image information may further include general constraint information. In this document, information and / or syntax elements transmitted / signaled from an encoding device to a decoding device may be included in video / video information. The video / video 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 on a digital storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD. The signal output from the entropy encoding unit 240 may be configured as an internal / external element of the encoding unit 200 by a transmitting unit (not shown) and / or a storing unit (not shown) for storing, or the transmitting unit It may be included in the entropy encoding unit 240.
양자화부(233)로부터 출력된 양자화된 변환 계수들은 예측 신호를 생성하기 위해 이용될 수 있다. 예를 들어, 양자화된 변환 계수들에 역양자화부(234) 및 역변환부(235)를 통해 역양자화 및 역변환을 적용함으로써 레지듀얼 신호(레지듀얼 블록 or 레지듀얼 샘플들)를 복원할 수 있다. 가산부(155)는 복원된 레지듀얼 신호를 인터 예측부(221) 또는 인트라 예측부(222)로부터 출력된 예측 신호에 더함으로써 복원(reconstructed) 신호(복원 픽처, 복원 블록, 복원 샘플 어레이)가 생성될 수 있다. 스킵 모드가 적용된 경우와 같이 처리 대상 블록에 대한 레지듀얼이 없는 경우, 예측된 블록이 복원 블록으로 사용될 수 있다. 가산부(250)는 복원부 또는 복원 블록 생성부라고 불릴 수 있다. 생성된 복원 신호는 현재 픽처 내 다음 처리 대상 블록의 인트라 예측을 위하여 사용될 수 있고, 후술하는 바와 같이 필터링을 거쳐서 다음 픽처의 인터 예측을 위하여 사용될 수도 있다. The quantized transform coefficients output from the quantization unit 233 may be used to generate a prediction signal. For example, a residual signal (residual block or residual samples) may be reconstructed by applying inverse quantization and inverse transformation through the inverse quantization unit 234 and the inverse transformation unit 235 to the quantized transform coefficients. The adder 155 adds the reconstructed residual signal to the predicted signal output from the inter predictor 221 or the intra predictor 222, so that the reconstructed signal (restored picture, reconstructed block, reconstructed sample array) Can be created. If there is no residual for the block to be processed, such as when the skip mode is applied, the predicted block may be used as a reconstructed block. The adder 250 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, or may be used for inter prediction of the next picture through filtering as described below.
한편 픽처 인코딩 및/또는 복원 과정에서 LMCS (luma mapping with chroma scaling)가 적용될 수도 있다.Meanwhile, LMCS (luma mapping with chroma scaling) may be applied during picture encoding and / or reconstruction.
필터링부(260)는 복원 신호에 필터링을 적용하여 주관적/객관적 화질을 향상시킬 수 있다. 예를 들어 필터링부(260)은 복원 픽처에 다양한 필터링 방법을 적용하여 수정된(modified) 복원 픽처를 생성할 수 있고, 상기 수정된 복원 픽처를 메모리(270), 구체적으로 메모리(270)의 DPB에 저장할 수 있다. 상기 다양한 필터링 방법은 예를 들어, 디블록킹 필터링, 샘플 적응적 오프셋(sample adaptive offset), 적응적 루프 필터(adaptive loop filter), 양방향 필터(bilateral filter) 등을 포함할 수 있다. 필터링부(260)은 각 필터링 방법에 대한 설명에서 후술하는 바와 같이 필터링에 관한 다양한 정보를 생성하여 엔트로피 인코딩부(240)로 전달할 수 있다. 필터링 관한 정보는 엔트로피 인코딩부(240)에서 인코딩되어 비트스트림 형태로 출력될 수 있다. The filtering unit 260 may improve subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filtering unit 260 may generate a modified restoration picture by applying various filtering methods to the restoration picture, and the modified restoration picture may be a DPB of the memory 270, specifically, the memory 270. Can be stored in. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, and the like. The filtering unit 260 may generate various information regarding filtering as described later in the description of each filtering method, and transmit it to the entropy encoding unit 240. The filtering information may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
메모리(270)에 전송된 수정된 복원 픽처는 인터 예측부(221)에서 참조 픽처로 사용될 수 있다. 인코딩 장치는 이를 통하여 인터 예측이 적용되는 경우, 인코딩 장치(100)와 디코딩 장치에서의 예측 미스매치를 피할 수 있고, 부호화 효율도 향상시킬 수 있다. The modified reconstructed picture transmitted to the memory 270 may be used as a reference picture in the inter prediction unit 221. When the inter prediction is applied through the encoding apparatus, prediction mismatch between the encoding apparatus 100 and the decoding apparatus can be avoided, and encoding efficiency can be improved.
메모리(270) DPB는 수정된 복원 픽처를 인터 예측부(221)에서의 참조 픽처로 사용하기 위해 저장할 수 있다. 메모리(270)는 현재 픽처 내 움직임 정보가 도출된(또는 인코딩된) 블록의 움직임 정보 및/또는 이미 복원된 픽처 내 블록들의 움직임 정보를 저장할 수 있다. 상기 저장된 움직임 정보는 공간적 주변 블록의 움직임 정보 또는 시간적 주변 블록의 움직임 정보로 활용하기 위하여 인터 예측부(221)에 전달할 수 있다. 메모리(270)는 현재 픽처 내 복원된 블록들의 복원 샘플들을 저장할 수 있고, 인트라 예측부(222)에 전달할 수 있다.The memory 270 DPB may store the modified reconstructed picture for use 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 a current picture is derived (or encoded) and / or motion information of blocks in a picture that has already been reconstructed. The stored motion information may be transmitted to the inter prediction unit 221 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 270 may store reconstructed samples of blocks reconstructed in the current picture, and may transmit the reconstructed samples to the intra prediction unit 222.
도 3은 본 발명이 적용될 수 있는 비디오/영상 디코딩 장치의 구성을 개략적으로 설명하는 도면이다.3 is a diagram schematically illustrating a configuration of a video / video decoding apparatus to which the present invention can be applied.
도 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)을 내/외부 컴포넌트로 더 포함할 수도 있다.Referring to FIG. 3, the decoding apparatus 300 includes an entropy decoder (310), a residual processor (320), a prediction unit (predictor, 330), an adder (340), and a filtering unit (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 deequantizer 321 and an inverse transformer 321. The entropy decoding unit 310, the residual processing unit 320, the prediction unit 330, the adding unit 340, and the filtering unit 350 described above may include one hardware component (eg, a decoder chipset or processor) according to an embodiment. ). Also, the memory 360 may include a decoded picture buffer (DPB), or may be configured by a digital storage medium. The hardware component may further include a memory 360 as an internal / external component.
비디오/영상 정보를 포함하는 비트스트림이 입력되면, 디코딩 장치(300)는 도 2의 인코딩 장치에서 비디오/영상 정보가 처리된 프로세스에 대응하여 영상을 복원할 수 있다. 예를 들어, 디코딩 장치(300)는 상기 비트스트림으로부터 획득한 블록 분할 관련 정보를 기반으로 유닛들/블록들을 도출할 수 있다. 디코딩 장치(300)는 인코딩 장치에서 적용된 처리 유닛을 이용하여 디코딩을 수행할 수 있다. 따라서 디코딩의 처리 유닛은 예를 들어 코딩 유닛일 수 있고, 코딩 유닛은 코딩 트리 유닛 또는 최대 코딩 유닛으로부터 쿼드 트리 구조, 바이너리 트리 구조 및/또는 터너리 트리 구조를 따라서 분할될 수 있다. 코딩 유닛으로부터 하나 이상의 변환 유닛이 도출될 수 있다. 그리고, 디코딩 장치(300)를 통해 디코딩 및 출력된 복원 영상 신호는 재생 장치를 통해 재생될 수 있다.When a bitstream including video / image information is input, the decoding apparatus 300 may restore an image in response to a process in which the video / image information is processed in the encoding apparatus of FIG. 2. For example, the decoding apparatus 300 may derive units / blocks based on block partitioning related information obtained from the bitstream. The decoding apparatus 300 may perform decoding using a processing unit applied in the encoding apparatus. Thus, the processing unit of decoding may be, for example, a coding unit, and the coding unit may be divided along a quad tree structure, a binary tree structure and / or a ternary tree structure from a coding tree unit or a largest coding unit. One or more transform units can be derived from the coding unit. Then, the decoded video signal decoded and output through the decoding device 300 may be reproduced through the reproduction device.
디코딩 장치(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) 중 적어도 하나를 포함할 수 있다.The decoding apparatus 300 may receive the signal output from the encoding apparatus of FIG. 2 in the form of a bitstream, and the received signal may be decoded through the entropy decoding unit 310. For example, the entropy decoding unit 310 may parse the bitstream to derive information (eg, video / image information) necessary for image reconstruction (or picture reconstruction). The video / image information may further include information regarding 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). Also, the video / image information may further include general constraint information. The decoding apparatus may decode a picture further based on the information on the parameter set and / or the general restriction information. Signaling / receiving information and / or syntax elements described later in this document may be decoded through the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 decodes information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and quantizes a value of a syntax element required for image reconstruction and a transform coefficient for residual. Can output In more detail, the CABAC entropy decoding method receives bins corresponding to each syntax element in the bitstream, and decodes the syntax element information to be decoded and decoding information of neighboring and decoding target blocks or information of symbols / bins decoded in the previous step. The context model is determined by using, and the probability of occurrence of the bin is predicted according to the determined context model, and arithmetic decoding of the bin is performed to generate a symbol corresponding to the value of each syntax element. have. At this time, the CABAC entropy decoding method may update the context model using the decoded symbol / bin information for the next symbol / bin context model after determining the context model. Among the information decoded by the entropy decoding unit 310, prediction information is provided to a prediction unit (inter prediction unit 332 and intra prediction unit 331), and the entropy decoding unit 310 performs entropy decoding. The dual value, that is, quantized transform coefficients and related parameter information, may be input to the residual processing unit 320. The residual processor 320 may derive a residual signal (residual block, residual samples, residual sample array). Also, information related to filtering among information decoded by the entropy decoding unit 310 may be provided to the filtering unit 350. Meanwhile, a receiving unit (not shown) that receives a 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. Meanwhile, the decoding device according to this document may be called a video / picture / picture decoding device, and the decoding device may be classified into an information decoder (video / picture / picture information decoder) and a sample decoder (video / picture / picture sample decoder). It might be. The information decoder may include the entropy decoding unit 310, and the sample decoder may include the inverse quantization unit 321, an inverse transformation unit 322, an addition unit 340, a filtering unit 350, and a memory 360 ), At least one of an inter prediction unit 332 and an intra prediction unit 331.
역양자화부(321)에서는 양자화된 변환 계수들을 역양자화하여 변환 계수들을 출력할 수 있다. 역양자화부(321)는 양자화된 변환 계수들을 2차원의 블록 형태로 재정렬할 수 있다. 이 경우 상기 재정렬은 인코딩 장치에서 수행된 계수 스캔 순서를 기반하여 재정렬을 수행할 수 있다. 역양자화부(321)는 양자화 파라미터(예를 들어 양자화 스텝 사이즈 정보)를 이용하여 양자화된 변환 계수들에 대한 역양자화를 수행하고, 변환 계수들(transform coefficient)를 획득할 수 있다. The inverse quantization unit 321 may inverse quantize the quantized transform coefficients to output transform coefficients. The inverse quantization unit 321 may rearrange the quantized transform coefficients in a two-dimensional block form. In this case, the reordering may be performed based on the coefficient scan order performed by the encoding device. The inverse quantization unit 321 may perform inverse quantization on the quantized transform coefficients using a quantization parameter (for example, quantization step size information), and obtain transform coefficients.
역변환부(322)에서는 변환 계수들를 역변환하여 레지듀얼 신호(레지듀얼 블록, 레지듀얼 샘플 어레이)를 획득하게 된다. The inverse transform unit 322 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).
예측부는 현재 블록에 대한 예측을 수행하고, 상기 현재 블록에 대한 예측 샘플들을 포함하는 예측된 블록(predicted block)을 생성할 수 있다. 예측부는 엔트로피 디코딩부(310)로부터 출력된 상기 예측에 관한 정보를 기반으로 상기 현재 블록에 인트라 예측이 적용되는지 또는 인터 예측이 적용되는지 결정할 수 있고, 구체적인 인트라/인터 예측 모드를 결정할 수 있다. The prediction unit may perform prediction on the current block and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on information about the prediction output from the entropy decoding unit 310, and may determine a specific intra / inter prediction mode.
예측부(320)는 후술하는 다양한 예측 방법을 기반으로 예측 신호를 생성할 수 있다. 예를 들어, 예측부는 하나의 블록에 대한 예측을 위하여 인트라 예측 또는 인터 예측을 적용할 수 있을 뿐 아니라, 인트라 예측과 인터 예측을 동시에 적용할 수 있다. 이는 combined inter and intra prediction (CIIP)라고 불릴 수 있다. 또한, 예측부는 블록에 대한 예측을 위하여 인트라 블록 카피(intra block copy, IBC) 예측 모드에 기반할 수도 있고 또는 팔레트 모드(palette mode)에 기반할 수도 있다. 상기 IBC 예측 모드 또는 팔레트 모드는 예를 들어 SCC(screen content coding) 등과 같이 게임 등의 컨텐츠 영상/동영상 코딩을 위하여 사용될 수 있다. IBC는 기본적으로 현재 픽처 내에서 예측을 수행하나 현재 픽처 내에서 참조 블록을 도출하는 점에서 인터 예측과 유사하게 수행될 수 있다. 즉, IBC는 본 문서에서 설명되는 인터 예측 기법들 중 적어도 하나를 이용할 수 있다. 팔레트 모드는 인트라 코딩 또는 인트라 예측의 일 예로 볼 수 있다. 팔레트 모드가 적용되는 경우 팔레트 테이블 및 팔레트 인덱스에 관한 정보가 상기 비디오/영상 정보에 포함되어 시그널링될 수 있다. The prediction unit 320 may generate a prediction signal based on various prediction methods described below. For example, the prediction unit may apply intra prediction or inter prediction as well as intra prediction and inter prediction at the same time for prediction for one block. This can be called combined inter and intra prediction (CIIP). Also, the prediction unit may be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode may be used for content video / video coding such as a game, such as screen content coding (SCC). IBC basically performs prediction in the current picture, but may be performed similarly to inter prediction in that a reference block is derived in the current picture. That is, the IBC can use at least one of the inter prediction techniques described in this document. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, information on the palette table and palette index may be signaled by being included in the video / image information.
인트라 예측부(331)는 현재 픽처 내의 샘플들을 참조하여 현재 블록을 예측할 수 있다. 상기 참조되는 샘플들은 예측 모드에 따라 상기 현재 블록의 주변(neighbor)에 위치할 수 있고, 또는 떨어져서 위치할 수도 있다. 인트라 예측에서 예측 모드들은 복수의 비방향성 모드와 복수의 방향성 모드를 포함할 수 있다. 인트라 예측부(331)는 주변 블록에 적용된 예측 모드를 이용하여, 현재 블록에 적용되는 예측 모드를 결정할 수도 있다.The intra prediction unit 331 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located apart depending on a prediction mode. In intra prediction, prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 331 may determine a prediction mode applied to the current block using a prediction mode applied to neighboring blocks.
인터 예측부(332)는 참조 픽처 상에서 움직임 벡터에 의해 특정되는 참조 블록(참조 샘플 어레이)을 기반으로, 현재 블록에 대한 예측된 블록을 유도할 수 있다. 이때, 인터 예측 모드에서 전송되는 움직임 정보의 양을 줄이기 위해 주변 블록과 현재 블록 간의 움직임 정보의 상관성에 기초하여 움직임 정보를 블록, 서브블록 또는 샘플 단위로 예측할 수 있다. 상기 움직임 정보는 움직임 벡터 및 참조 픽처 인덱스를 포함할 수 있다. 상기 움직임 정보는 인터 예측 방향(L0 예측, L1 예측, Bi 예측 등) 정보를 더 포함할 수 있다. 인터 예측의 경우에, 주변 블록은 현재 픽처 내에 존재하는 공간적 주변 블록(spatial neighboring block)과 참조 픽처에 존재하는 시간적 주변 블록(temporal neighboring block)을 포함할 수 있다. 예를 들어, 인터 예측부(332)는 주변 블록들을 기반으로 움직임 정보 후보 리스트를 구성하고, 수신한 후보 선택 정보를 기반으로 상기 현재 블록의 움직임 벡터 및/또는 참조 픽처 인덱스를 도출할 수 있다. 다양한 예측 모드를 기반으로 인터 예측이 수행될 수 있으며, 상기 예측에 관한 정보는 상기 현재 블록에 대한 인터 예측의 모드를 지시하는 정보를 포함할 수 있다. The inter prediction unit 332 may derive the predicted block for the current block based on the reference block (reference sample array) specified by the motion vector on the reference picture. At this time, to reduce the amount of motion information transmitted in the inter prediction mode, motion information may be predicted in units of blocks, subblocks, or samples based on the correlation of motion information between a neighboring block and a current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring block may include a spatial neighboring block existing in the current picture and a temporal neighboring block present in the reference picture. For example, 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 information on the prediction may include information indicating a mode of inter prediction for the current block.
가산부(340)는 획득된 레지듀얼 신호를 예측부(인터 예측부(332) 및/또는 인트라 예측부(331) 포함)로부터 출력된 예측 신호(예측된 블록, 예측 샘플 어레이)에 더함으로써 복원 신호(복원 픽처, 복원 블록, 복원 샘플 어레이)를 생성할 수 있다. 스킵 모드가 적용된 경우와 같이 처리 대상 블록에 대한 레지듀얼이 없는 경우, 예측된 블록이 복원 블록으로 사용될 수 있다.The adder 340 reconstructs the obtained residual signal by adding it to the prediction signal (predicted block, prediction sample array) output from the prediction unit (including the inter prediction unit 332 and / or the intra prediction unit 331). A signal (restored picture, reconstructed block, reconstructed sample array) can be generated. If there is no residual for the block to be processed, such as when the skip mode is applied, the predicted block may be used as a reconstructed block.
가산부(340)는 복원부 또는 복원 블록 생성부라고 불릴 수 있다. 생성된 복원 신호는 현재 픽처 내 다음 처리 대상 블록의 인트라 예측을 위하여 사용될 수 있고, 후술하는 바와 같이 필터링을 거쳐서 출력될 수도 있고 또는 다음 픽처의 인터 예측을 위하여 사용될 수도 있다. The adding 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 a next processing target block in a current picture, may be output through filtering as described below, or may be used for inter prediction of a next picture.
한편, 픽처 디코딩 과정에서 LMCS (luma mapping with chroma scaling)가 적용될 수도 있다.Meanwhile, LMCS (luma mapping with chroma scaling) may be applied in a picture decoding process.
필터링부(350)는 복원 신호에 필터링을 적용하여 주관적/객관적 화질을 향상시킬 수 있다. 예를 들어 필터링부(350)는 복원 픽처에 다양한 필터링 방법을 적용하여 수정된(modified) 복원 픽처를 생성할 수 있고, 상기 수정된 복원 픽처를 메모리(360), 구체적으로 메모리(360)의 DPB에 전송할 수 있다. 상기 다양한 필터링 방법은 예를 들어, 디블록킹 필터링, 샘플 적응적 오프셋(sample adaptive offset), 적응적 루프 필터(adaptive loop filter), 양방향 필터(bilateral filter) 등을 포함할 수 있다. The filtering unit 350 may improve subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filtering unit 350 may generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and the modified reconstructed picture may be a DPB of the memory 360, specifically, the memory 360 Can be transferred to. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, and the like.
메모리(360)의 DPB에 저장된 (수정된) 복원 픽처는 인터 예측부(332)에서 참조 픽쳐로 사용될 수 있다. 메모리(360)는 현재 픽처 내 움직임 정보가 도출된(또는 디코딩된) 블록의 움직임 정보 및/또는 이미 복원된 픽처 내 블록들의 움직임 정보를 저장할 수 있다. 상기 저장된 움직임 정보는 공간적 주변 블록의 움직임 정보 또는 시간적 주변 블록의 움직임 정보로 활용하기 위하여 인터 예측부(332)에 전달할 수 있다. 메모리(360)는 현재 픽처 내 복원된 블록들의 복원 샘플들을 저장할 수 있고, 인트라 예측부(331)에 전달할 수 있다.The (corrected) reconstructed picture stored in the DPB of the memory 360 may 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 a current picture is derived (or decoded) and / or motion information of blocks in a picture that has already been reconstructed. The stored motion information may be transmitted to the inter prediction unit 332 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 360 may store reconstructed samples of blocks reconstructed in the current picture, and may transmit the reconstructed samples to the intra prediction unit 331.
본 명세서에서, 인코딩 장치(200)의 필터링부(260), 인터 예측부(221) 및 인트라 예측부(222)에서 설명된 실시예들은 각각 디코딩 장치(300)의 필터링부(350), 인터 예측부(332) 및 인트라 예측부(331)에도 동일 또는 대응되도록 적용될 수 있다.In the present specification, 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 respectively the filtering unit 350 and the inter prediction of the decoding device 300. The unit 332 and the intra prediction unit 331 may be applied to the same or corresponding.
상술한 바와 같이 비디오 코딩을 수행함에 있어 압축 효율을 높이기 위하여 예측을 수행한다. 이를 통하여 코딩 대상 블록인 현재 블록에 대한 예측 샘플들을 포함하는 예측된 블록을 생성할 수 있다. 여기서 상기 예측된 블록은 공간 도메인(또는 픽셀 도메인)에서의 예측 샘플들을 포함한다. 상기 예측된 블록은 인코딩 장치 및 디코딩 장치에서 동일하게 도출되며, 상기 인코딩 장치는 원본 블록의 원본 샘플 값 자체가 아닌 상기 원본 블록과 상기 예측된 블록 간의 레지듀얼에 대한 정보(레지듀얼 정보)를 디코딩 장치로 시그널링함으로써 영상 코딩 효율을 높일 수 있다. 디코딩 장치는 상기 레지듀얼 정보를 기반으로 레지듀얼 샘플들을 포함하는 레지듀얼 블록을 도출하고, 상기 레지듀얼 블록과 상기 예측된 블록을 합하여 복원 샘플들을 포함하는 복원 블록을 생성할 수 있고, 복원 블록들을 포함하는 복원 픽처를 생성할 수 있다.As described above, in performing video coding, prediction is performed to improve compression efficiency. Through this, a predicted block including prediction samples for a current block as a block to be coded can be generated. Here, the predicted block includes prediction samples in a spatial domain (or pixel domain). The predicted block is derived equally from an encoding device and a decoding device, and the encoding device decodes information (residual information) about the residual between the original block and the predicted block, not the original sample value itself of the original block. Signaling to the device can improve video coding efficiency. The decoding apparatus may derive a residual block including residual samples based on the residual information, and combine the residual block and the predicted block to generate a reconstructed block including reconstructed samples, and reconstruct the reconstructed blocks. A reconstructed picture can be generated.
상기 레지듀얼 정보는 변환 및 양자화 절차를 통하여 생성될 수 있다. 예를 들어, 인코딩 장치는 상기 원본 블록과 상기 예측된 블록 간의 레지듀얼 블록을 도출하고, 상기 레지듀얼 블록에 포함된 레지듀얼 샘플들(레지듀얼 샘플 어레이)에 변환 절차를 수행하여 변환 계수들을 도출하고, 상기 변환 계수들에 양자화 절차를 수행하여 양자화된 변환 계수들을 도출하여 관련된 레지듀얼 정보를 (비트스트림을 통하여) 디코딩 장치로 시그널링할 수 있다. 여기서 상기 레지듀얼 정보는 상기 양자화된 변환 계수들의 값 정보, 위치 정보, 변환 기법, 변환 커널, 양자화 파라미터 등의 정보를 포함할 수 있다. 디코딩 장치는 상기 레지듀얼 정보를 기반으로 역양자화/역변환 절차를 수행하고 레지듀얼 샘플들(또는 레지듀얼 블록)을 도출할 수 있다. 디코딩 장치는 예측된 블록과 상기 레지듀얼 블록을 기반으로 복원 픽처를 생성할 수 있다. 인코딩 장치는 또한 이후 픽처의 인터 예측을 위한 참조를 위하여 양자화된 변환 계수들을 역양자화/역변환하여 레지듀얼 블록을 도출하고, 이를 기반으로 복원 픽처를 생성할 수 있다.The residual information may be generated through a transform and quantization procedure. For example, the encoding device derives a residual block between the original block and the predicted block, and performs transformation procedures on residual samples (residual sample array) included in the residual block to derive transformation coefficients. And, by performing a quantization procedure on the transform coefficients, the quantized transform coefficients are derived to signal related residual information (via a bitstream) to a decoding apparatus. Here, the residual information may include value information of the quantized transform coefficients, location information, a transform technique, a transform kernel, quantization parameters, and the like. The decoding apparatus may perform an inverse quantization / inverse transformation procedure based on the residual information and derive residual samples (or residual blocks). The decoding apparatus may generate a reconstructed picture based on the predicted block and the residual block. The encoding apparatus may also inverse quantize / inverse transform quantized transform coefficients for reference for inter prediction of a picture to derive a residual block, and generate a reconstructed picture based thereon.
한편, 본 발명에 따르면 변환을 수행함에 있어서 수직 성분과 수평 성분을 구분하여 분리 변환할 수 있으며, 이 경우 수직 방향에 대한 변환 커널과 수평 방향에 대한 변환 커널을 구분하여 선택할 수 있다. 이는 다중 변환 선택(multiple transform selection, MTS)이라고 불릴 수 있다.On the other hand, according to the present invention, in performing the transformation, the vertical component and the horizontal component can be separated and separately transformed. In this case, the transform kernel for the vertical direction and the transform kernel for the horizontal direction may be selected separately. This can be called multiple transform selection (MTS).
도 4는 본 발명에 따른 다중 변환 기법을 개략적으로 설명하는 도면이다. 4 is a diagram schematically illustrating a multiplexing technique according to the present invention.
도 4를 참조하면, 변환부는 상술한 도 2의 인코딩 장치 내의 변환부에 대응될 수 있고, 역변환부는 상술한 도 2의 인코딩 장치 내의 역변환부 또는 도 3의 디코딩 장치 내의 역변환부에 대응될 수 있다. Referring to FIG. 4, the transform unit may correspond to the transform unit in the encoding apparatus of FIG. 2 described above, and the inverse transform unit may correspond to the inverse transform unit in the encoding apparatus of FIG. 2 described above or the inverse transform unit in the decoding apparatus of FIG. 3. .
변환부는 레지듀얼 블록 내의 레지듀얼 샘플들(레지듀얼 샘플 어레이)을 기반으로 1차 변환을 수행하여 (1차) 변환 계수들을 도출할 수 있다(S410). 여기서, 1차 변환(primary transform)은 핵심 변환(core transform)으로 지칭될 수 있다. 1차 변환은 다중 변환 선택(multiple transform selection; MTS)에 기반할 수 있으며, 1차 변환으로 다중 변환이 적용될 경우 다중 핵심 변환으로 지칭될 수 있다. The transform unit may derive (primary) transform coefficients by performing a primary transform based on residual samples (residual sample array) in the residual block (S410). Here, the primary transform may be referred to as a core transform. The primary transform may be based on multiple transform selection (MTS), and may be referred to as a multiple core transform when multiple transforms are applied as the primary transform.
변환부는 (1차) 변환 계수들을 기반으로 2차 변환을 수행하여 (2차) 변환 계수들을 도출할 수 있다(S420). (2차) 변환 계수들은 수정된(modified) 변환 계수들이라고 불릴 수 있다. The transform unit may derive (secondary) transform coefficients by performing a second transform based on the (primary) transform coefficients (S420). (Secondary) transform coefficients can be referred to as modified transform coefficients.
1차 변환은 공간 도메인에서 주파수 도메인으로의 변환이고, 2차 변환은 (1차) 변환 계수들 사이에 존재하는 상관 관계(correlation)을 이용하여 보다 압축적인 표현으로 변환하는 것을 의미한다. 여기서, 2차 변환은 비분리 변환(non- separable transform)을 포함할 수 있다. 이 경우 상기 2차 변환은 비분리 2차 변환(non-separable secondary transform, NSST) 또는 RST(reduced secondary transform)이라고 불릴 수 있다.The first-order transform is a transformation from the spatial domain to the frequency domain, and the second-order transform means transforming into a more compressed expression by using a correlation existing between (first-order) transform coefficients. Here, the second order transform may include a non-separable transform. In this case, the secondary transform may be called a non-separable secondary transform (NSST) or a reduced secondary transform (RST).
2차 변환은 변환 성능을 더 높이기 위하여 수행되는 것이므로, 변환부는 2차 변환을 선택적으로 수행할 수 있다. 도 4의 실시예에서는 2차 (역)변환이 수행되는 것을 기반으로 설명하였으나, 2차 변환은 생략될 수 있다. Since the second transform is performed to further improve the transform performance, the transform unit may selectively perform the second transform. In the embodiment of FIG. 4, the second (inverse) transform is described based on the performance, but the second transform may be omitted.
변환부는 2차 변환을 수행하여 도출된 (2차) 변환 계수들을 양자화부로 전달할 수 있다. 양자화부는 (2차) 변환 계수들에 양자화를 수행하여 양자화된 변환 계수들을 도출할 수 있다. 그리고, 양자화된 변환 계수들은 인코딩되어 디코딩 장치로 시그널링되고 또한 인코딩 장치 내의 역양자화/역변환부로 전달될 수 있다. The transform unit may transmit the (second order) transform coefficients derived by performing the second transform to the quantization unit. The quantization unit may quantize transform coefficients by performing quantization on (secondary) transform coefficients. Then, the quantized transform coefficients may be encoded, signaled to a decoding device, and transmitted to an inverse quantization / inverse conversion unit in the encoding device.
2차 변환이 생략되는 경우, 1차 변환의 출력인 (1차) 변환 계수들이 양자화부를 통하여 양자화된 변환 계수들로 도출될 수 있다. 그리고 양자화된 변환 계수들은 인코딩되어 디코딩 장치로 시그널링되고 또한 인코딩 장치 내의 역양자화/역변환부로 전달될 수 있다. When the secondary transform is omitted, (primary) transform coefficients, which are outputs of the primary transform, may be derived as quantized transform coefficients through a quantization unit. And the quantized transform coefficients are encoded and signaled to a decoding apparatus, and can also be transmitted to an inverse quantization / inverse transform unit in the encoding apparatus.
역변환부는 상술한 변환부에서 수행된 절차의 역순으로 일련의 절차를 수행할 수 있다. 역변환부는 (역양자화된) 변환 계수들을 수신하여, 2차 (역)변환을 수행하여 (1차) 변환 계수들을 도출하고(S450), (1차) 변환 계수들에 대하여 1차 (역)변환을 수행하여 레지듀얼 블록(레지듀얼 샘플들)을 획득할 수 있다(S460).The inverse transform unit may perform a series of procedures in the reverse order of the procedure performed by the above-described transform unit. The inverse transform unit receives (inverse quantized) transform coefficients, performs a second (inverse) transform to derive (first) transform coefficients (S450), and performs a first (inverse) transform of the (first) transform coefficients. By performing, the residual block (residual samples) may be obtained (S460).
여기서, 1차 변환 계수들은 역변환부 입장에서 수정된(modified) 변환 계수들로 불릴 수 있다. 인코딩 장치 및 디코딩 장치는 상기 레지듀얼 블록과 예측된 블록을 기반으로 복원 블록을 생성하고, 이를 기반으로 복원 픽처를 생성할 수 있음은 상술한 바와 같다.Here, the primary transform coefficients may be referred to as modified transform coefficients from the viewpoint of the inverse transform unit. As described above, the encoding device and the decoding device can generate a reconstructed block based on the residual block and the predicted block, and generate a reconstructed picture based on the residual block.
2차 (역)변환이 생략되는 경우, 역변환부는 (역양자화된) 변환 계수들을 수신하여 1차 역변환을 수행하여 레지듀얼 블록(레지듀얼 샘플들)을 획득할 수 있다. 인코딩 장치 및 디코딩 장치는 상기 레지듀얼 블록과 예측된 블록을 기반으로 복원 블록을 생성하고, 이를 기반으로 복원 픽처를 생성할 수 있음은 상술한 바와 같다.When the second (inverse) transform is omitted, the inverse transform unit may receive (inverse quantized) transform coefficients to perform a first inverse transform to obtain residual blocks (residual samples). As described above, the encoding device and the decoding device can generate a reconstructed block based on the residual block and the predicted block, and generate a reconstructed picture based on the residual block.
한편, 상술한 바와 같이 변환 적용 시에 여러 단계의 변환을 수행할 수 있다. 상기 도 4에서 설명한 바와 같이, 1차 변환과 2차 변환의 두 단계를 적용할 수도 있고, 알고리즘에 따라 더 많은 변환 단계를 추가할 수도 있다. 1차 변환은 DCT(Discrete Cosine Transform) 및/또는 DST(Discrete Sine Transform) 변환 타입을 사용하여 수행될 수 있다. 일 실시예로, 1차 변환은 HEVC에서와 같이 DCT 타입 2를 적용하거나, 특정 경우에 한정하여 DST 타입 7을 적용할 수도 있다. 예를 들어, 인트라 예측 모드에서 4X4 블록과 같은 특정 경우에 한하여 DST 타입 7을 적용할 수 있다. 다른 실시예로, 1차 변환은 다중 변환 선택이 적용될 수 있으며, 이 경우 여러 변환들의 조합을 적용할 수 있다. 이때, 다중 변환 선택을 기반으로 하는 1차 변환은 명시적 다중 변환(Explicit Multiple Transform; EMT)으로 불릴 수 있다. 예를 들어, 명시적 다중 변환에서는 DST 타입 7(DST7), DCT 타입 8(DCT8), DST 타입 1(DST1), DCT 타입 5(DCT5), DCT 타입 2(DCT2) 등의 변환 타입들의 조합을 사용할 수 있다. On the other hand, as described above, it is possible to perform various stages of conversion when applying the conversion. As described above with reference to FIG. 4, two steps may be applied: a primary transform and a secondary transform, or more transform stages may be added according to an algorithm. The primary transform may be performed using a DCT (Discrete Cosine Transform) and / or a DST (Discrete Sine Transform) transform type. In an embodiment, DCT type 2 may be applied to the first transform as in HEVC, or DST type 7 may be applied to a specific case. For example, in the intra prediction mode, DST type 7 may be applied only to a specific case such as a 4X4 block. In another embodiment, multiple transform selection may be applied to the first transform, and in this case, a combination of multiple transforms may be applied. In this case, a primary transform based on multiple transform selection may be referred to as an explicit multiple transform (EMT). For example, in explicit multiplex conversion, a combination of conversion types such as DST type 7 (DST7), DCT type 8 (DCT8), DST type 1 (DST1), DCT type 5 (DCT5), and DCT type 2 (DCT2) is used. Can be used.
아래 표 1 및 표 2는 다중 변환 선택(명시적 다중 변환)에서 사용되는 변환들의 조합을 예시적으로 나타낸 것이다. 표 1은 인트라 예측 모드 시에 적용되는 다중 변환 선택의 조합들을 나타낸 것이고, 표 2는 인터 예측 모드 시에 적용되는 다중 변환 선택의 조합들을 나타낸 것이다.Table 1 and Table 2 below exemplarily show a combination of transforms used in multiple transform selection (explicit multiple transform). Table 1 shows the combinations of multiple transform selections applied in the intra prediction mode, and Table 2 shows the combinations of multiple transform selections applied in the inter prediction mode.
Figure PCTKR2019011486-appb-T000001
Figure PCTKR2019011486-appb-T000001
Figure PCTKR2019011486-appb-T000002
Figure PCTKR2019011486-appb-T000002
상기 표 1을 참조하면, 인트라 예측 모드가 적용되는 경우, 인트라 예측 모드에 따라 변환 세트가 구성될 수 있고, 각 변환 세트에는 복수의 변환 조합 후보들을 포함할 수 있다. 예를 들어, 변환 세트는 인트라 예측 모드에 따라 5개의 세트(Set0 ~ Set4)로 구성될 수 있고, 각 변환 세트(Set0 ~ Set4)에는 0 ~ 3의 인덱스 값이 설정된 변환 조합 후보들을 포함할 수 있다. 각 변환 조합 후보들은 행(row)에 적용되는 수평 변환(horizontal transform)과 열(column)에 적용되는 수직 변환(vertical transform)으로 이루어질 수 있으며, DST7, DCT8, DST1, DCT5의 조합을 기반으로 수평 변환 및 수직 변환의 타입이 결정될 수 있다.Referring to Table 1, when the intra prediction mode is applied, a transform set may be configured according to the intra prediction mode, and each transform set may include a plurality of transform combination candidates. For example, the transform set may be composed of five sets (Set0 to Set4) according to the intra prediction mode, and each transform set (Set0 to Set4) may include transform combination candidates with an index value of 0 to 3 set. have. Each transform combination candidates may be composed of a horizontal transform applied to a row and a vertical transform applied to a column, and horizontal based on a combination of DST7, DCT8, DST1, and DCT5. The type of transform and vertical transform can be determined.
상기 표 2를 참조하면, 인터 예측 모드가 적용되는 경우, 해당 블록에 대해 다중 변환 선택을 적용할지 여부(예: EMT_CU_Flag)에 따라 변환 조합을 다르게 구성할 수 있다. 예를 들어, 해당 블록에 대해 다중 변환 선택을 적용하지 않는 경우(예: EMT_CU_Flag가 0인 경우), 수평 변환 및 수직 변환에 DCT2를 적용하는 변환 조합 세트를 사용할 수 있다. 또는, 해당 블록에 대해 다중 변환 선택을 적용하는 경우(예: EMT_CU_Flag가 1인 경우), 4개의 변환 조합 후보들을 포함하는 변환 조합 세트를 사용할 수 있다. 이 경우, 변환 조합 세트는 0 ~ 3의 인덱스 값이 설정된 변환 조합 후보들을 포함할 수 있으며, 각 변환 조합 후보들은 DST7, DCT8의 조합을 기반으로 수평 변환 및 수직 변환의 타입이 결정될 수 있다. Referring to Table 2, when the inter prediction mode is applied, a transform combination may be configured differently according to whether to apply a multiple transform selection to a corresponding block (eg, EMT_CU_Flag). For example, if multiple transform selection is not applied to a corresponding block (for example, EMT_CU_Flag is 0), a transform combination set that applies DCT2 to horizontal transform and vertical transform can be used. Alternatively, when multiple transform selection is applied to a corresponding block (for example, when EMT_CU_Flag is 1), a transform combination set including 4 transform combination candidates may be used. In this case, the transform combination set may include transform combination candidates in which index values of 0 to 3 are set, and the types of horizontal transform and vertical transform may be determined for each transform combination candidate based on the combination of DST7 and DCT8.
도 5는 본 발명의 일 실시예에 따른 다중 변환 선택(MTS 또는 EMT)의 적용 여부에 따라 변환 조합을 결정하는 과정을 나타내는 흐름도이다. 5 is a flowchart illustrating a process of determining a transform combination according to whether multiple transform selection (MTS or EMT) is applied according to an embodiment of the present invention.
본 발명의 일 실시예에 따르면, 현재 블록에 대해 다중 변환 선택을 적용할지 여부를 나타내는 신택스 요소(syntax element)를 사용하여, 블록 단위(예컨대, HEVC의 경우 CU 단위)로 다중 변환 선택의 적용을 결정할 수 있다. 일례로, 상기 신택스 요소는 EMT_CU_flag를 사용할 수 있다. According to an embodiment of the present invention, application of multiple transform selection in block units (eg, in CU units in the case of HEVC), using a syntax element indicating whether to apply multiple transform selection to the current block Can decide. As an example, the syntax element may use EMT_CU_flag.
인트라 예측 모드에서 EMT_CU_flag가 0이면 현재 블록에 대해 다중 변환 선택을 적용하지 않는 것으로 결정할 수 있다. 이때, 단일 변환을 사용하는 경우(예컨대, HEVC 경우)에서와 같이 DCT2 또는 4x4 DST7를 적용할 수 있다. 인트라 예측 모드에서 EMT_CU_flag가 1이면 현재 블록에 대해 다중 변환 선택을 적용하는 것으로 결정할 수 있다. 이때, 상기 표 1에서 제시하는 다중 변환 조합을 적용할 수 있다. 가능한 다중 변환 조합은 상기 표 1에서와 같이 인트라 예측 모드에 따라 달라질 수 있으며, 예를 들어 인트라 예측 모드가 14, 15, 16, 17, 18, 19, 20, 21, 22 모드인 경우에는 수평 방향으로 DST7과 DCT5, 수직 방향으로 DST7과 DCT8을 적용하여, 총 4개의 가능한 조합을 허용할 수 있다. 따라서, 4개의 조합 중 어떠한 조합을 적용할지를 별도로 시그널링해주는 것이 필요하다. 이를 위해서 2 비트의 인덱스 정보를 사용할 수 있으며, 예컨대 2 비트의 EMT_TU_index 신택스 요소를 통해 4개의 변환 조합 중 하나를 선택하여 시그널링할 수 있다. When EMT_CU_flag is 0 in the intra prediction mode, it may be determined that multiple transform selection is not applied to the current block. At this time, DCT2 or 4x4 DST7 may be applied as in the case of using a single transform (eg, HEVC). When EMT_CU_flag is 1 in the intra prediction mode, it may be determined to apply multiple transform selection to the current block. At this time, the multiple conversion combinations presented in Table 1 above can be applied. The possible multiple transform combinations may vary depending on the intra prediction mode as shown in Table 1 above.For example, when the intra prediction mode is 14, 15, 16, 17, 18, 19, 20, 21, 22, the horizontal direction By applying DST7 and DCT5 and DST7 and DCT8 in the vertical direction, a total of four possible combinations can be allowed. Therefore, it is necessary to separately signal which of the four combinations to apply. To this end, 2 bits of index information may be used, and, for example, one of 4 transform combinations may be signaled through signaling of the 2 bits of the EMT_TU_index syntax element.
인터 예측 모드에서 EMT_CU_flag가 0이면 상기 표 2에서 제시된 것처럼 DCT2를 적용할 수 있고, EMT_CU_flag가 1이면 상기 표 2에서 제시하는 다중 변환 조합을 적용할 수 있다. 예를 들어, 가능한 다중 변환 조합은 상기 표 2에서와 같이 DST7과 DCT8을 적용하여 총 4개의 가능한 조합을 사용할 수 있다.In the inter prediction mode, if EMT_CU_flag is 0, DCT2 may be applied as shown in Table 2, and if EMT_CU_flag is 1, multiple transform combinations shown in Table 2 may be applied. For example, four possible combinations can be used by applying DST7 and DCT8 as shown in Table 2 above.
보다 구체적으로 도 5를 참조하면, 디코딩 장치는 EMT_CU_flag 신택스 요소를 획득하여 파싱(엔트로피 디코딩)할 수 있다(S500). 그리고, 디코딩 장치는 파싱한 EMT_CU_flag의 결과 값에 따라 다중 변환 선택의 적용 여부를 결정할 수 있다(S510).More specifically, referring to FIG. 5, the decoding apparatus may acquire and parse (entropy decode) the EMT_CU_flag syntax element (S500). Then, the decoding apparatus may determine whether to apply the multiple transform selection according to the result value of the parsed EMT_CU_flag (S510).
EMT_CU_flag가 0인 경우, 디코딩 장치는 다중 변환 선택을 적용하지 않는 것으로 결정하여, 현재 블록에 대해 DCT2를 적용하여 변환을 수행할 수 있다(S515). When EMT_CU_flag is 0, the decoding apparatus determines that multiple transform selection is not applied, and may perform transformation by applying DCT2 to the current block (S515).
EMT_CU_flag가 1인 경우, 디코딩 장치는 다중 변환 선택을 적용하는 것으로 결정하여, 현재 블록 내의 변환 계수들에 대해 0이 아닌 변환 계수의 개수가 특정 임계(threshold) 값(예컨대, 2) 이하가 되는지 여부를 판단할 수 있다(S520).When EMT_CU_flag is 1, the decoding apparatus determines to apply the multiple transform selection, so whether the number of non-zero transform coefficients is less than or equal to a certain threshold value (eg, 2) for transform coefficients in the current block. It can be determined (S520).
0이 아닌 변환 계수의 개수가 특정 임계값 이하가 되는 경우, 디코딩 장치는 EMT_TU_index에 대한 파싱을 생략하고 EMT_TU_index 값을 0으로 설정하고, 상기 표 1에 제시된 것처럼 현재 블록에 대해 DST7을 적용하여 변환을 수행할 수 있다(S525).When the number of non-zero transform coefficients is equal to or less than a certain threshold, the decoding apparatus omits parsing for EMT_TU_index, sets the EMT_TU_index value to 0, and applies DST7 to the current block as shown in Table 1 above. It can be performed (S525).
0이 아닌 변환 계수의 개수가 특정 임계값 이하가 아닌 경우, 디코딩 장치는 EMT_TU_index 신택스 요소를 획득하여 파싱(엔트로피 디코딩)할 수 있다(S530). If the number of non-zero transform coefficients is not equal to or less than a specific threshold, the decoding apparatus may parse (entropy decode) the EMT_TU_index syntax element (S530).
디코딩 장치는 파싱한 EMT_TU_index 값에 따라 현재 블록에 대해 수평 방향 및 수직 방향 변환 조합을 결정하여 변환을 수행할 수 있다(S535). 이때, 상기 표 1 및 표 2에 제시된 변환 조합들을 기초로 EMT_TU_index 값에 대응하는 수평 변환 및 수직 변환을 선택하여 다중 변환을 수행할 수 있다.The decoding apparatus may perform a transformation by determining a combination of horizontal and vertical transformations for the current block according to the parsed EMT_TU_index value (S535). In this case, multiple transforms may be performed by selecting horizontal transforms and vertical transforms corresponding to EMT_TU_index values based on the transform combinations shown in Tables 1 and 2 above.
한편, 다중 변환 선택을 적용함에 있어서, 다중 변환 선택을 적용하는 블록 크기를 제한할 수 있다. 예컨대 64x64 블록 크기까지 제한할 수 있으며, 64x64 크기보다 큰 경우에는 다중 변환을 적용하지 않을 수 있다.Meanwhile, in applying multiple transform selection, a block size to which multiple transform selection is applied may be limited. For example, it is possible to limit the block size to 64x64, and if it is larger than 64x64, multiple conversions may not be applied.
상기 도 4에서 설명한 바와 같이, 변환을 수행함에 있어 1차 변환을 적용한 이후에 2차 변환을 추가적으로 적용할 수 있다. 여기서, 2차 변환은 비분리 2차 변환(non-separable secondary transform, NSST) 또는 RST(reduced secondary transform)를 사용할 수 있다. As described with reference to FIG. 4, in performing the transformation, after applying the first transform, the second transform may be additionally applied. Here, the second transform may use a non-separable secondary transform (NSST) or a reduced secondary transform (RST).
NSST는 인트라 예측 모드일 경우에만 적용되며, 인트라 예측 모드마다 적용 가능한 변환 세트를 가지고 있다. 아래 표 3은 NSST에서 인트라 예측 모드별 변환 세트를 할당한 일례를 나타낸 것이다.NSST is applied only in the intra prediction mode, and each intra prediction mode has a transform set applicable. Table 3 below shows an example in which a transform set for each intra prediction mode is allocated in NSST.
Figure PCTKR2019011486-appb-T000003
Figure PCTKR2019011486-appb-T000003
일 실시예로, NSST에서의 변환 세트는 예측 방향에 대한 대칭성을 이용하여 설정될 수 있다. 예를 들어 인트라 예측 모드 52와 16은 인트라 예측 모드 34(대각 방향)을 기준으로 대칭이므로, 상기 표 3에서와 같이 동일한 변환 세트를 적용할 수 있다. 이와 같이 예측 방향의 대칭성을 이용하여 서로 대칭이 되는 인트라 예측 모드들은 하나의 그룹으로 형성하여 동일한 변환 세트를 할당할 수 있다. 단, 대각 방향을 기준으로 서로 대칭이 되는 인트라 예측 모드들(예: 모드 52와 16)에 변환을 적용함에 있어서, 어느 하나의 모드(예: 모드 52와 같은 수직 방향 모드)에 대해서는 입력 데이터를 트랜스포즈(transpose)한 후 적용할 수 있다. In one embodiment, the transform set in NSST may be established using symmetry for the prediction direction. For example, since intra prediction modes 52 and 16 are symmetric based on intra prediction mode 34 (diagonal direction), the same transform set can be applied as shown in Table 3 above. In this way, intra prediction modes that are symmetrical to each other using the symmetry of the prediction direction may be formed as a group to allocate the same transform set. However, in applying the transformation to intra prediction modes (eg, modes 52 and 16) that are symmetrical to each other based on the diagonal direction, input data is input to any one mode (eg, a vertical direction mode such as mode 52). It can be applied after transpose.
인트라 예측 모드는 2개의 비방향성(non-directinoal, 또는 비각도성(non-angular)) 인트라 예측 모드들과 65개의 방향성(directional, 또는 각도성(angular)) 인트라 예측 모드들을 포함할 수 있다. 경우에 따라 67번 인트라 예측 모드가 더 사용될 수 있으며, 상기 67번 인트라 예측 모드는 LM(linear model) 모드를 나타낼 수 있다. 이와 같은 인트라 예측 모드들이 사용되는 경우, 상기 표 3에서와 같이 총 35개의 변환 세트를 구성할 수 있다. 여기서, 비방향성 모드인 플래너(planar) 모드(0번) 및 DC 모드(1번)의 경우에는 대칭성이 존재하지 않으므로, 각자의 변환 세트를 갖게 되며, 각 변환 세트에는 2개의 변환을 포함하여 구성될 수 있다. 나머지 방향성 모드들에 대해서는 변환 세트당 3개의 변환을 포함하여 구성될 수 있다. 따라서, 총 가능한 변환의 개수는 (2x2+33x3)=103개가 될 수 있다. The intra prediction mode may include two non-directinoal (or non-angular) intra prediction modes and 65 directional (or angular) intra prediction modes. In some cases, the intra prediction mode No. 67 may be further used, and the intra prediction mode No. 67 may represent a linear model (LM) mode. When these intra prediction modes are used, a total of 35 transform sets may be configured as shown in Table 3 above. Here, in the non-directional planar mode (planar) mode (0) and DC mode (1), since there is no symmetry, each transform set has a transform set, and each transform set includes two transforms. Can be. For the remaining directional modes, it may be configured to include 3 transforms per transform set. Therefore, the total number of possible transforms can be (2x2 + 33x3) = 103.
도 6 및 도 7은 본 발명의 일 실시예에 따른 비분리 2차 변환(NSST)을 설명하기 위한 도면이다.6 and 7 are diagrams for explaining a non-separated quadratic transform (NSST) according to an embodiment of the present invention.
NSST는 1차 변환이 적용된 블록(예컨대, HEVC의 경우 TU) 전체에 대해 적용되는 것이 아니라, 블록의 좌상단(top-left) 8x8 영역에 대해서만 적용될 수 있다. 물론, 8x8 이하 크기의 블록에 대해서는 전체 영역에 대해 적용될 수 있다. NSST is not applied to the entire block to which the first transform is applied (eg, TU in the case of HEVC), but can be applied only to the top-left 8x8 region of the block. Of course, it can be applied to the entire area for blocks of size 8x8 or less.
즉, 블록의 크기가 8x8 이상인 경우는 8x8 NSST가 적용되며, 8x8 미만인 경우는 4x4 NSST가 적용되는데 이 경우 4x4 블록들로 나눈 후 각기 4x4 NSST가 적용될 수 있다. 8x8 NSST와 4x4 NSST 모두 상술한 표 3의 변환 세트 구성을 따르며, 비분리 변환인만큼 8x8 NSST는 64개의 데이터를 입력 받아 64개의 데이터를 출력하며 4x4 NSST는 16개의 입력과 16개의 출력을 갖는다.That is, if the size of the block is 8x8 or more, 8x8 NSST is applied, and if it is less than 8x8, 4x4 NSST is applied. In this case, 4x4 NSST may be applied after dividing into 4x4 blocks. Both 8x8 NSST and 4x4 NSST follow the transformation set configuration of Table 3 described above. As a non-separated transform, 8x8 NSST receives 64 data and outputs 64 data, and 4x4 NSST has 16 inputs and 16 outputs.
8x8 NSST와 4x4 NSST는 모두 Givens rotation들의 계층적 조합으로 구성될 수 있다. 하나의 Givens rotation에 해당하는 행렬은 수학식 1과 같을 수 있다. Both 8x8 NSST and 4x4 NSST can be configured with a hierarchical combination of Givens rotations. The matrix corresponding to one Givens rotation may be equal to Equation 1.
Figure PCTKR2019011486-appb-M000001
Figure PCTKR2019011486-appb-M000001
상기 수학식 1에 기반한 Givens rotation에 대한 계산은 도 6과 같이 도시될 수 있다. 도 6은 상기 수학식 1의 행렬 곱을 다이어그램을 표현한 것이다. 도 6에서와 같이 하나의 Givens rotation은 2개의 데이터를 회전시키는 것이기 때문에, 64개 (8x8 NSST의 경우) 또는 16개의 (4x4 NSST의 경우) 데이터를 처리하기 위해서는 각기 총 32개 또는 8개의 Givens rotation이 필요하다. 따라서, 32개 또는 8개를 묶음으로 하여 Givens rotation layer를 이룬다. The calculation for Givens rotation based on Equation 1 may be illustrated as in FIG. 6. 6 is a diagram of the matrix product of Equation (1). As shown in FIG. 6, since one Givens rotation rotates two data, in order to process 64 (for 8x8 NSST) or 16 (for 4x4 NSST) data, a total of 32 or 8 Givens rotation respectively This is necessary. Therefore, a bundle of 32 or 8 is formed to form a Givens rotation layer.
도 7은 4x4 NSST의 경우에 대해 4개의 Givens rotation layer가 순차적으로 처리되는 과정을 도시한 것이다. 도 7에서와 같이 한 Givens rotation layer에 대한 출력 데이터가 정해진 permutation을 (shuffling을) 거쳐 다음 Givens rotation layer에 대한 입력 데이터로 전달된다. 도 7에서와 같이 permutation되는 패턴은 규칙적으로 정해져 있으며, 4x4 NSST의 경우는 4개의 Givens rotation layer와 해당 permutation들을 합쳐 하나의 round를 이룬다. 8x8 NSST의 경우는 6개의 Givens rotation layer와 해당 permutation들이 하나의 round를 형성한다. 4x4 NSST는 2번의 round를 거치게 되며, 8x8 NSST는 4번의 round를 거치게 된다. 서로 다른 round들끼리는 동일한 permutation 패턴을 사용하지만 적용되는 Givens rotation 각도들은 각기 다르다. 따라서, 각 변환을 구성하는 모든 Givens rotation에 대한 각도 데이터를 저장해 놓아야 한다.7 shows a process in which four Givens rotation layers are sequentially processed for the 4x4 NSST. As shown in FIG. 7, the output data for one Givens rotation layer is transmitted as input data for the next Givens rotation layer through a predetermined permutation (shuffling). As shown in FIG. 7, the permutation pattern is determined regularly, and in the case of 4x4 NSST, one round is formed by combining the four Givens rotation layers and the permutations. In the case of 8x8 NSST, 6 Givens rotation layers and corresponding permutations form a round. 4x4 NSST goes through 2 rounds, and 8x8 NSST goes through 4 rounds. Different rounds use the same permutation pattern, but the Givens rotation angles applied are different. Therefore, angle data for all Givens rotations constituting each transformation should be stored.
맨 마지막 단계로 Givens rotation layer들을 거쳐 출력된 데이터에 대해 최종적으로 한 번의 permutation을 더 수행하게 되며, 해당 permutation 정보는 변환마다 별도로 저장되어 있다. 순방향(Forward) NSST에서는 맨 마지막에 해당 permutation이 수행되며, 역방향(inverse) NSST에서는 반대로 맨 처음에 해당 역 permutation이 적용된다. 역방향 NSST의 경우는 순방향 NSST에서 적용되었던 Givens rotation layer들과 permutation들을 역순으로 수행하면 되며, 각 Givens rotation의 각도에 대해서도 - 값을 취해 회전시킨다.As the last step, one permutation is finally performed on the data output through the Givens rotation layers, and the permutation information is separately stored for each transformation. In forward NSST, the permutation is performed last, and in reverse NSST, the reverse permutation is applied first. In the case of the reverse NSST, the Givens rotation layers and permutations applied in the forward NSST can be performed in reverse order, and the angle of each Givens rotation is taken and rotated.
상술한 바와 같이 2차 변환을 수행함에 있어, 상기 NSST 또는 후술할 RST(reduced secondary transform)를 사용할 수 있다. In performing the secondary transform as described above, the NSST or a reduced secondary transform (RST) described later may be used.
도 8 및 도 9는 본 발명의 일 실시예에 따른 RST를 설명하기 위한 도면이다. 8 and 9 are views for explaining RST according to an embodiment of the present invention.
하나의 변환을 나타내는 직교(orthogonal) 행렬이 NxN 형태를 갖는다고 했을 때, RT(Reduced Transform)는 N개의 변환 기저 벡터들 중에 R개만을 남기는 것이다(여기서, R < N). 변환 계수를 생성하는 순방향(forward) RT에 대한 행렬은 수학식 2와 같이 주어진다.Assuming that an orthogonal matrix representing one transform has an NxN form, RT (Reduced Transform) leaves only R among N transform base vectors (here, R <N). The matrix for the forward RT that produces the transform coefficients is given by Equation 2.
Figure PCTKR2019011486-appb-M000002
Figure PCTKR2019011486-appb-M000002
역방향(Inverse) RT에 대한 행렬은 순방향 RT 행렬의 transpose 행렬이 되므로, 순방향 RT와 역방향 RT의 적용을 도식화하면 도 8과 같다. Since the matrix for the inverse RT becomes a transpose matrix of the forward RT matrix, the application of the forward RT and the reverse RT is schematically illustrated in FIG. 8.
일 실시예로, RT는 1차 변환을 거친 변환 계수들로 구성된 블록(이하, 변환 계수 블록)의 좌상단 8x8 블록에 대해 적용할 수 있다. 이 경우 RT를 8x8 RST로 명명할 수 있다. 상기 수학식 2에서의 R 값을 16으로 두었을 때, 8x8 RST는 순방향 8x8 RST의 경우는 16x64 행렬 형태를 가지며 역방향 8x8 RST의 경우는 64x16 행렬 형태를 가진다. 또한, 8x8 RST에 대해서도, 상기 표 3에서와 동일한 변환 세트 구성을 적용할 수 있다. 즉, 상기 표 3에서의 변환 세트에 따라 해당 8x8 RST가 적용될 수 있다. 하나의 변환 세트는 인트라 예측 모드에 따라 2개 또는 3개의 변환들로 구성되어 있으므로, 2차 변환을 적용하지 않는 경우까지 포함하여 최대 4개의 변환 중 하나를 선택하도록 구성될 수 있다(하나의 변환은 항등 행렬이라고 볼 수 있다). 4개의 변환에 대해 각기 0, 1, 2, 3의 인덱스를 부여한다고 했을 때 (예를 들어, 0번 인덱스를 항등 행렬, 즉 2차 변환을 적용하지 않는 경우로 할당할 수 있다), NSST 인덱스라는 신택스 요소(syntax element)를 변환 계수 블록마다 시그널링하여 적용되는 변환을 지정할 수 있다. 즉, NSST 인덱스를 통해 8x8 좌상단 블록에 대해서, NSST의 경우는 8x8 NSST를 지정할 수 있고, RST 구성에서는 8x8 RST를 지정할 수 있다.In one embodiment, RT may be applied to the upper left 8x8 block of a block (hereinafter, a transform coefficient block) composed of transform coefficients that have undergone first-order transformation. In this case, RT can be named 8x8 RST. When the R value in Equation 2 is set to 16, 8x8 RST has a 16x64 matrix form in the case of forward 8x8 RST and 64x16 matrix form in the case of reverse 8x8 RST. Also, for 8x8 RST, the same transform set configuration as in Table 3 above can be applied. That is, the corresponding 8x8 RST may be applied according to the transform set in Table 3 above. Since one transform set is composed of two or three transforms according to the intra prediction mode, it can be configured to select one of up to four transforms, including when a second transform is not applied (one transform) Is the identity matrix). Assuming that indexes of 0, 1, 2, and 3 are assigned to each of the 4 transforms (for example, index 0 can be assigned to an identity matrix, that is, when the second transform is not applied), NSST index Signaling the syntax element (syntax element) for each transform coefficient block may be applied to designate a transform applied. That is, for the 8x8 upper left block through the NSST index, in the case of NSST, 8x8 NSST may be designated, and in the RST configuration, 8x8 RST may be designated.
상기 수학식 2와 같은 순방향 8x8 RST를 적용하게 되면 16개의 유효한 변환 계수가 생성되므로, 8x8 영역을 구성하는 64개의 입력 데이터가 16개의 출력 데이터로 축소된다고 볼 수 있다. 이는 2차원 영역 관점에서 보면 1/4만큼의 영역에만 유효한 변환 계수가 채워지게 된다. 따라서, 순방향 8x8 RST를 적용하여 얻은 16개의 출력 데이터를 변환 계수 블록의 좌상단 영역에 채울 수 있다. When the forward 8x8 RST as in Equation 2 is applied, 16 valid transform coefficients are generated, so it can be seen that 64 input data constituting the 8x8 region are reduced to 16 output data. From the perspective of the two-dimensional domain, a transform coefficient that is valid only for a quarter of the domain is filled. Therefore, 16 output data obtained by applying the forward 8x8 RST can be filled in the upper left area of the transform coefficient block.
도 9는 변환 계수 스캔 순서를 도시한 도면으로, 순방향 스캔 순서가 1부터 매겨진다고 했을 때 (순방향 스캔 순서 상에서) 17번째 계수에서 64번째 계수에 대한 스캐닝을 도시하고 있다. 도 9에서는 역방향 스캔을 보이고 있으므로, 64번째부터 17번째까지 역방향 스캔을 수행하고 있는 것으로 볼 수 있다(화살표 방향 참조).FIG. 9 is a view showing a transform coefficient scan order, and when the forward scan order is assigned from 1 (on the forward scan order), it shows scanning from the 17th coefficient to the 64th coefficient. Since the reverse scan is shown in FIG. 9, it can be seen that the reverse scan is performed from the 64th to the 17th (see arrow direction).
도 9를 참조하면, 변환 계수 블록의 좌상단 4x4 영역이 유효한 변환 계수가 채워지는 ROI(Region Of Interest) 영역이고 나머지 영역은 비워지게 된다. 비워지는 영역에는 0 값이 디폴트로 채워질 수 있다. 만약, 도 9의 ROI 영역 이외에 0이 아닌 유효한 변환 계수가 발견되었다고 하면 8x8 RST가 적용되지 않은 것이 확실하므로 해당 NSST 인덱스 코딩을 생략할 수 있다. 반대로 도 9의 ROI 영역 이외에서 0이 아닌 변환 계수가 발견되지 않았다면 (8x8 RST가 적용되는 경우, ROI 이외의 영역에 대해서는 0으로 채웠다고 했을 때) 8x8 RST가 적용되었을 가능성이 있으므로 NSST 인덱스를 코딩할 수 있다. 이와 같은 조건적 NSST 인덱스 코딩은 0이 아닌 변환 계수의 존재 유무를 체크해야 하므로 레지듀얼 코딩 과정 이후에 수행될 수 있다.Referring to FIG. 9, the upper left 4x4 region of the transform coefficient block is an ROI (Region Of Interest) region in which a valid transform coefficient is filled, and the rest of the region is vacated. The blanked area may be filled with a value of 0 by default. If it is found that a valid non-zero transform coefficient is found in addition to the ROI region of FIG. 9, since it is certain that 8x8 RST is not applied, the corresponding NSST index coding can be omitted. Conversely, if a non-zero transform coefficient is not found outside the ROI region of FIG. 9 (when 8x8 RST is applied, and if it is filled with 0 for a region other than the ROI), it is possible that 8x8 RST was applied, so the NSST index is coded. can do. Such conditional NSST index coding needs to be checked for the presence or absence of a non-zero transform coefficient, and thus can be performed after the residual coding process.
이하에서는 다중 변환 선택(MTS)이 수행되는 인코딩/디코딩 과정에 대하여 기술한다. 본 명세서에서 다중 변환 선택(MTS)은 명시적 다중 변환(Explicit Multiple Transform; EMT) 또는 적응적 다중 변환(Adaptive Multiple Transform; AMT)으로 불릴 수도 있다. Hereinafter, an encoding / decoding process in which multiple transform selection (MTS) is performed will be described. In this specification, multiple transform selection (MTS) may be referred to as an explicit multiple transform (EMT) or an adaptive multiple transform (AMT).
또한, 본 명세서에서는 기본적으로 수평 방향과 수직 방향에 대해 분리해서 변환을 적용하는 실시예를 설명하고 있으나, 이러한 변환 조합(수평 방향과 수직 방향 변환 조합)은 비분리 변환(non-separable transform)들로도 구성이 가능하다. 또는, 분리가능한 변환(separable transform)들과 비분리 변환(non-separable transform)들의 혼합으로도 구성될 수 있다. 이 경우, 비분리 변환(non-separable transform)이 이용되면 행/열(row/column)별 변환 선택이나 수평/수직(horizontal/vertical) 방향별 선택은 불필요해지며, 분리가능한 변환(separable transform)이 선택되는 경우에만 상기 표 1 및 표2의 변환 조합들이 이용될 수 있다.In addition, although the present specification basically describes an embodiment in which transforms are applied separately for horizontal and vertical directions, such combinations of transforms (horizontal and vertical transform combinations) are also used as non-separable transforms. Configuration is possible. Alternatively, it may be composed of a mixture of separable transforms and non-separable transforms. In this case, if a non-separable transform is used, selection by a row / column transformation or selection by a horizontal / vertical direction becomes unnecessary, and a separable transform The conversion combinations of Tables 1 and 2 above can be used only when is selected.
또한, 본 명세서에서 제안하는 방식들은 1차 변환(primary transform)이나 2차 변환(secondary transform)에 관계 없이 적용할 수 있다. 즉, 둘 중 어느 한쪽에만 적용되어야 한다는 제약이 없으며, 둘 다 적용될 수 있다. 여기서, 1차 변환(primary transform)은 잔차(residual) 블록을 맨 처음에 변환하기 위한 변환을 의미할 수 있고, 2차 변환(secondary transform)은 상기 1차 변환의 결과로 생성된 블록에 대해 변환을 적용하기 위한 변환을 의미할 수 있다.In addition, the schemes proposed in this specification can be applied regardless of a primary transform or a secondary transform. That is, there is no restriction that it should be applied to either one, and both can be applied. Here, the primary transform may mean a transform for initially transforming a residual block, and the secondary transform transforms a block generated as a result of the primary transform. It may mean a transformation for applying.
도 10은 본 발명의 일 실시예에 따라 다중 변환 선택이 수행되는 인코딩 과정을 설명하기 위한 흐름도를 나타낸다. 10 is a flowchart illustrating an encoding process in which multiple transform selection is performed according to an embodiment of the present invention.
도 10을 참조하면, 인코딩 장치는 현재 블록에 대응되는 변환 그룹을 결정할 수 있다(S1010). 여기서, 변환 그룹은 상기 표 1 및 표 2의 변환 그룹을 의미할 수 있으나, 본 발명은 이에 한정되지 않으며 다른 변환 조합들로 구성될 수도 있다. Referring to FIG. 10, the encoding device may determine a transform group corresponding to the current block (S1010). Here, the transform group may refer to the transform groups of Table 1 and Table 2, but the present invention is not limited thereto and may be composed of other transform combinations.
인코딩 장치는 변환 그룹 내 이용가능한 후보 변환 조합들에 대해 변환을 수행할 수 있다(S1020).The encoding apparatus may perform transformation on candidate transformation combinations available in the transformation group (S1020).
상기 변환 수행 결과, 인코딩 장치는 RD(Rate Distortion) 비용이 가장 작은 변환 조합을 결정 또는 선택할 수 있다(S1030).As a result of the conversion, the encoding apparatus may determine or select a conversion combination having the smallest RD (Rate Distortion) cost (S1030).
인코딩 장치는 선택된 변환 조합에 대응되는 변환 조합 인덱스를 인코딩할 수 있다(S1040).The encoding device may encode a transform combination index corresponding to the selected transform combination (S1040).
도 11은 본 발명의 일 실시예에 따라 다중 변환 선택이 수행되는 디코딩 과정을 설명하기 위한 흐름도를 나타낸다. 11 is a flowchart illustrating a decoding process in which multiple transform selection is performed according to an embodiment of the present invention.
도 11을 참조하면, 디코딩 장치는 현재 블록을 위한 변환 그룹을 결정할 수 있다(S1110).Referring to FIG. 11, the decoding apparatus may determine a transform group for the current block (S1110).
디코딩 장치는 변환 조합 인덱스를 파싱할 수 있다(S1120). 여기서, 변환 조합 인덱스는 변환 그룹 내 복수개의 변환 조합들 중 어느 하나에 대응될 수 있다.The decoding apparatus may parse the transform combination index (S1120). Here, the transform combination index may correspond to any one of a plurality of transform combinations in the transform group.
디코딩 장치는 변환 조합 인덱스에 대응되는 변환 조합을 유도할 수 있다(S1130). 여기서, 변환 조합은 상기 표 1 및 표 2에서 설명한 변환 조합을 의미할 수 있으나, 본 발명은 이에 한정되지 않으며 다른 변환 조합에 의한 구성도 가능하다.The decoding apparatus may derive a transform combination corresponding to the transform combination index (S1130). Here, the conversion combination may mean the conversion combination described in Tables 1 and 2, but the present invention is not limited to this, and other conversion combinations may also be used.
디코딩 장치는 변환 조합에 기초하여 현재 블록에 대해 역변환을 수행할 수 있다(S1140). 변환 조합이 행 변환과 열 변환으로 구성된 경우, 행 변환을 먼저 적용한 후 열 변환을 적용할 수 있다. 다만, 본 발명은 이에 한정되지 않으며, 반대로 적용되거나, 또는 비분리 변환들로 구성된 경우에는 바로 비분리 변환이 적용될 수 있다.The decoding apparatus may perform inverse transform on the current block based on the transform combination (S1140). If the transformation combination consists of a row transformation and a column transformation, the row transformation can be applied first and then the column transformation. However, the present invention is not limited to this, and may be applied on the contrary, or when the non-separation transformations are configured, the non-separation transformation may be directly applied.
한편, 다른 실시예로, 변환 그룹을 결정하는 과정과 변환 조합 인덱스를 파싱하는 과정은 동시에 수행될 수 있다.Meanwhile, in another embodiment, a process of determining a transform group and a process of parsing a transform combination index may be performed simultaneously.
도 12는 본 발명의 일 실시예에 따라 다중 변환 선택 플래그(AMT 플래그) 및 다중 변환 인덱스(AMT 인덱스)를 인코딩하는 과정을 설명하기 위한 흐름도를 나타낸다. 12 is a flowchart illustrating a process of encoding a multiple conversion selection flag (AMT flag) and multiple conversion index (AMT index) according to an embodiment of the present invention.
도 12를 참조하면, 인코딩 장치는 현재 블록에 대해 다중 변환 선택(Adaptive Multiple Transforms; AMT)이 적용되는지 여부를 결정할 수 있다(S1210).Referring to FIG. 12, the encoding apparatus may determine whether adaptive multiple transforms (AMT) are applied to the current block (S1210).
만약, AMT가 적용되는 경우, 인코딩 장치는 AMT 플래그를 1로 인코딩할 수 있다(S1220).If AMT is applied, the encoding device may encode the AMT flag to 1 (S1220).
그리고, 상기 인코딩 장치는 현재 블록의 예측 모드, 수평 변환, 수직 변환 중 적어도 하나에 기초하여 AMT 인덱스를 결정할 수 있다(S1230). 여기서, AMT 인덱스는 각 인트라 예측 모드에 대해 복수개의 변환 조합들 중 어느 하나를 가리키는 인덱스를 의미하며, AMT 인덱스는 변환 단위(transform unit)마다 전송될 수 있다.Then, the encoding device may determine the AMT index based on at least one of a prediction mode, a horizontal transform, and a vertical transform of the current block (S1230). Here, the AMT index refers to an index indicating any one of a plurality of transform combinations for each intra prediction mode, and the AMT index may be transmitted for each transform unit.
AMT 인덱스가 결정되면, 인코딩 장치는 AMT 인덱스를 인코딩할 수 있다(S1240).When the AMT index is determined, the encoding device may encode the AMT index (S1240).
한편, AMT가 적용되지 않는 경우, 인코딩 장치는 AMT 플래그를 0으로 인코딩할 수 있다(S1250).Meanwhile, when AMT is not applied, the encoding apparatus may encode the AMT flag to 0 (S1250).
도 13은 본 발명의 일 실시예에 따라 다중 변환 선택 플래그(AMT 플래그) 및 다중 변환 인덱스(AMT 인덱스)에 기초하여 수평 변환 또는 수직 변환을 행 또는 열에 적용하는 디코딩 과정을 설명하기 위한 흐름도를 나타낸다.13 is a flowchart illustrating a decoding process of applying a horizontal transform or a vertical transform to a row or column based on a multiple transform selection flag (AMT flag) and a multiple transform index (AMT index) according to an embodiment of the present invention. .
도 13을 참조하면, 디코딩 장치는 비트스트림으로부터 AMT 플래그를 파싱할 수 있다(S1310). 여기서, AMT 플래그는 현재 블록에 대해 다중 변환 선택(Adaptive Multiple Transforms; AMT)이 적용되는지 여부를 나타낼 수 있다.Referring to FIG. 13, the decoding apparatus may parse the AMT flag from the bitstream (S1310). Here, the AMT flag may indicate whether adaptive multiple transforms (AMT) are applied to the current block.
디코딩 장치는 AMT 플래그에 기초하여 현재 블록에 대해 AMT가 적용되는지 여부를 확인할 수 있다(S1320). 예를 들어, AMT 플래그가 1인지 여부를 확인할 수 있다.The decoding device may check whether AMT is applied to the current block based on the AMT flag (S1320). For example, it is possible to check whether the AMT flag is 1.
만약, AMT 플래그가 1인 경우, 디코딩 장치는 0이 아닌 변환 계수의 개수가 임계값보다 큰지(또는 이상인지) 여부를 확인할 수 있다(S1330). 예를 들어, 상기 임계값은 2 로 설정될 수 있으며, 이는 블록 크기 또는 변환 유닛의 크기에 기초하여 다르게 설정될 수 있다.If the AMT flag is 1, the decoding apparatus may check whether the number of non-zero transform coefficients is greater than or equal to a threshold (S1330). For example, the threshold can be set to 2, which can be set differently based on the block size or the size of the transform unit.
0이 아닌 변환 계수의 개수가 임계값보다 큰 경우, 디코딩 장치는 AMT 인덱스를 파싱할 수 있다(S1340). 여기서, AMT 인덱스는 각 인트라 예측 모드 또는 인터 예측 모드에 대해 복수개의 변환 조합들 중 어느 하나를 가리키는 인덱스를 의미하며, AMT 인덱스는 변환 단위(transform unit)마다 전송될 수 있다. 또는, AMT 인덱스는 기설정된 변환 조합 테이블에 정의된 어느 하나의 변환 조합을 가리키는 인덱스를 의미할 수 있으며, 여기서 기설정된 변환 조합 테이블은 상기 표 1 및 표2를 의미할 수 있으나, 본 발명은 이에 한정되지 않는다.If the number of non-zero transform coefficients is greater than the threshold, the decoding apparatus may parse the AMT index (S1340). Here, the AMT index refers to an index indicating any one of a plurality of transform combinations for each intra prediction mode or inter prediction mode, and the AMT index may be transmitted for each transformation unit. Alternatively, the AMT index may mean an index indicating any one of the conversion combinations defined in the preset conversion combination table, where the preset conversion combination table may mean Tables 1 and 2, but the present invention It is not limited.
디코딩 장치는 AMT 인덱스 또는 예측 모드 중 적어도 하나에 기초하여 수평 변환 및 수직 변환을 유도 또는 결정할 수 있다(S1350).The decoding apparatus may derive or determine the horizontal transform and the vertical transform based on at least one of the AMT index or prediction mode (S1350).
또는, 디코딩 장치는 AMT 인덱스에 대응되는 변환 조합을 유도할 수 있다. 예를 들어, 디코딩 장치는 AMT 인덱스에 대응되는 수평 변환 및 수직 변환을 유도 또는 결정할 수 있다. Alternatively, the decoding device may derive a transform combination corresponding to the AMT index. For example, the decoding apparatus may derive or determine the horizontal transform and vertical transform corresponding to the AMT index.
한편, 0이 아닌 변환 계수의 개수가 임계값보다 크지 않은 경우, 디코딩 장치는 기설정된 수직 역변환을 열마다 적용할 수 있다(S1360). 예를 들어, 수직 역변환은 DST7의 역변환일 수 있다. 그리고, 디코딩 장치는 기설정된 수평 역변환을 행마다 적용할 수 있다(S1370). 예를 들어, 수평 역변환은 DST7의 역변환일 수 있다. Meanwhile, when the number of non-zero transform coefficients is not greater than the threshold, the decoding apparatus may apply a preset vertical inverse transform for each column (S1360). For example, the vertical inverse transform may be an inverse transform of DST7. Then, the decoding apparatus may apply a predetermined horizontal inverse transform for each row (S1370). For example, the horizontal inverse transform may be an inverse transform of DST7.
즉, 상기 0이 아닌 변환 계수의 개수가 임계값보다 크지 않은 경우에는 인코딩 장치 또는 디코딩 장치에서 기설정된 변환 커널이 이용될 수 있다. 예를 들어, 상기 표 1 및 표2와 같은 변환 조합 테이블에서 정의된 것이 아니라, 많이 이용되는 변환 커널이 이용될 수 있다.That is, when the number of non-zero transform coefficients is not greater than the threshold, a transform kernel preset in the encoding device or the decoding device may be used. For example, not defined in the conversion combination table such as Table 1 and Table 2, a conversion kernel that is widely used may be used.
한편, AMT 플래그가 0인 경우, 디코딩 장치는 기설정된 수직 역변환을 열마다 적용할 수 있다(S1380). 예를 들어, 수직 역변환은 DCT2의 역변환일 수 있다. 그리고, 디코딩 장치는 기설정된 수평 역변환을 행마다 적용할 수 있다(S1390). 예를 들어, 수평 역변환은 DCT2의 역변환일 수 있다. Meanwhile, when the AMT flag is 0, the decoding apparatus may apply a predetermined vertical inverse transform for each column (S1380). For example, the vertical inverse transform may be an inverse transform of DCT2. Then, the decoding apparatus may apply a predetermined horizontal inverse transform for each row (S1390). For example, the horizontal inverse transform may be an inverse transform of DCT2.
즉, AMT 플래그가 0인 경우에는 인코딩 장치 또는 디코딩 장치에서 기설정된 변환 커널이 이용될 수 있다. 예를 들어, 상기 표 1 및 표2와 같은 변환 조합 테이블에서 정의된 것이 아니라, 많이 이용되는 변환 커널이 이용될 수 있다.That is, when the AMT flag is 0, a conversion kernel preset in the encoding device or the decoding device may be used. For example, not defined in the conversion combination table such as Table 1 and Table 2, a conversion kernel that is widely used may be used.
이하에서는 상술한 RST 구조로부터 4x4 블록에 적용될 수 있는 RST의 설계 및 연관 최적화 방법들에 대하여 기술한다. 당연히 일부 개념들에 대해서는 4x4 RST 뿐만 아니라 8x8 RST 또는 다른 형태의 변환에도 적용될 수 있다.Hereinafter, the design and associated optimization methods of RST that can be applied to a 4x4 block from the above-described RST structure will be described. Naturally, some concepts can be applied not only to 4x4 RST, but also to 8x8 RST or other forms of transformation.
RST를 적용함에 있어서, 본 발명에서는 4x4 블록에 적용될 수 있는 RST를 제안한다.In applying RST, the present invention proposes an RST that can be applied to a 4x4 block.
본 발명의 일 실시예에 있어서, 하나의 4x4 블록, 즉 변환 대상이 되는 4x4 변환 블록에 적용될 수 있는 비분리 변환(non-separable transform) 또는 RST은 16x16 변환이다. 즉, 해당 4x4 블록을 구성하는 데이터 요소들을 행 우선(row-first) 또는 열 우선(column-first) 순서로 일렬로 늘어 놓게 되면 16x1 벡터가 되어 해당 블록에 비분리 변환 또는 RST를 적용할 수 있다. 순방향 16x16 변환은 16개의 행 방향 변환 기저 벡터(transform basis vector)들로 구성되며, 상기 16x1 벡터와 각 변환 기저 벡터에 대해 내적(inner product)을 취하게 되면 해당 변환 기저 벡터에 대한 변환 계수를 얻게 된다. 16개의 변환 기저 벡터들에 대한 해당 변환 계수를 얻는 과정은, 16x16 비분리 변환 또는 RST 행렬과 상기 입력 16x1 벡터를 곱하는 것과 같다. 행렬 곱으로 얻어지는 변환 계수들은 16x1 벡터 형태를 가지는데, 변환 계수 별로 통계적 특성이 다를 수 있다. 예를 들어, 16x1 변환 계수 벡터가 0번째 요소부터 15번째 요소로 이루어졌다고 했을 때, 0번째 요소의 분산은 15번째 요소의 분산보다 클 수 있다. 즉, 앞에 위치한 요소일수록 해당 분산 값이 커서 큰 에너지 값을 가질 수 있다.In one embodiment of the present invention, a non-separable transform or RST that can be applied to one 4x4 block, that is, a 4x4 transform block to be transformed, is a 16x16 transform. That is, if the data elements constituting the 4x4 block are arranged in a row in a row-first or column-first order, a 16x1 vector can be applied, and non-separated transformation or RST can be applied to the block. . The forward 16x16 transform is composed of 16 row direction transform basis vectors, and when an inner product is taken for the 16x1 vector and each transform base vector, a transform coefficient for the transform base vector is obtained. do. The process of obtaining the corresponding transform coefficients for the 16 transform base vectors is the same as multiplying the 16x16 non-separated transform or RST matrix by the input 16x1 vector. The transform coefficients obtained by matrix multiplication have a 16x1 vector form, and statistical characteristics may be different for each transform coefficient. For example, when the 16x1 transform coefficient vector is composed of 0th to 15th elements, the variance of the 0th element may be greater than that of the 15th element. That is, the larger the element located in front, the larger the corresponding variance value and the larger the energy value.
16x1 변환 계수로부터 역방향 16x16 비분리 변환 또는 역방향 RST을 적용하게 되면 (양자화나 정수화 계산 등의 효과를 무시했을 때) 변환 전 원래의 4x4 블록 신호를 복원할 수 있다. 순방향 16x16 비분리 변환이 직교 변환(orthonormal transform)이라면 해당 역방향 16x16 변환은, 순방향 16x16 변환에 대한 행렬의 트랜스포즈(transpose)를 취해 구할 수 있다. 단순하게는 역방향 16x16 비분리 변환 행렬을 16x1 변환 계수 벡터에 곱해주게 되면 16x1 벡터 형태의 데이터를 얻게 되고, 처음 적용했었던 행 우선 또는 열 우선 순서로 배열해 주면 4x4 블록 신호를 복원할 수 있다.By applying the inverse 16x16 non-separated transform or the inverse RST from the 16x1 transform coefficient (when ignoring effects such as quantization or integer calculation), the original 4x4 block signal can be restored before the transform. If the forward 16x16 non-separated transform is an orthonormal transform, the corresponding backward 16x16 transform can be obtained by taking a transpose of a matrix for the forward 16x16 transform. For simplicity, multiplying the inverse 16x16 non-separated transform matrix by a 16x1 transform coefficient vector yields data in the form of a 16x1 vector, and arranging it in the row-first or column-first order that was applied first can restore the 4x4 block signal.
상술하였듯이 16x1 변환 계수 벡터를 이루는 요소들은 각기 통계적 특성이 다를 수 있다. 앞선 예시에서와 같이 앞쪽에 배치된 (0번째 요소와 가까운) 변환 계수들이 보다 큰 에너지를 가진다면, 모든 변환 계수들을 사용하지 않고 먼저 등장하는 일부의 변환 계수들에 역방향 변환(역변환)을 적용하여도 원래의 신호와 상당히 가까운 신호를 복원할 수 있다. 예를 들어, 역방향 16x16 비분리 변환이 16개의 열 기저 벡터(column basis vector)들로 구성된다고 했을 때, L개의 열 기저 벡터만 남겨 16xL 행렬을 구성하고, 변환 계수들 중에서도 보다 중요한 L개의 변환 계수들만을 남긴 후 (Lx1 벡터, 앞선 예시에서와 같이 먼저 등장할 수 있다), 16xL 행렬과 Lx1 벡터를 곱하게 되면 원래의 입력 16x1 벡터 데이터와 오차가 크지 않은 16x1 벡터를 복원할 수 있다. 결과적으로 L개의 계수들만이 데이터 복원에 개입하기 때문에, 변환 계수를 얻을 때도 16x1 변환 계수 벡터가 아니라 Lx1 변환 계수 벡터를 구하면 된다. 즉, 순방향 16x16 비분리 변환 행렬에서 L개의 해당 행 방향 변환 벡터들을 골라서 Lx16 변환을 구성한 후 16x1 입력 벡터와 곱하게 되면 L개의 중요 변환 계수들을 얻을 수 있다.As described above, elements constituting the 16x1 transform coefficient vector may have different statistical characteristics. As in the previous example, if the transform coefficients arranged near the front (closer to the 0th element) have a larger energy, the inverse transform (inverse transform) is applied to some transform coefficients that appear first without using all transform coefficients. It is also possible to restore a signal that is fairly close to the original signal. For example, when the inverse 16x16 non-separation transform is composed of 16 column basis vectors, only the L column base vectors are left to form the 16xL matrix, and L transform coefficients, which are more important among transform coefficients After leaving only the fields (Lx1 vector, which may appear first as in the previous example), multiplying the 16xL matrix by the Lx1 vector can restore the original input 16x1 vector data and the 16x1 vector with little error. As a result, since only L coefficients are involved in data restoration, it is only necessary to obtain an Lx1 transform coefficient vector, not a 16x1 transform coefficient vector, when obtaining a transform coefficient. That is, L significant transform coefficients can be obtained by selecting L corresponding row direction transform vectors from the forward 16x16 non-separated transform matrix and constructing the Lx16 transform and multiplying with the 16x1 input vector.
여기서, L 값은 1<=L<16의 범위를 갖게 되며 일반적으로는 16개의 변환 기저 벡터들 중에 임의의 방법으로 L개를 선택할 수 있으나, 부호화와 복호화 관점에서는 앞서 제시한 예시에서와 같이 신호의 에너지 측면에서 중요도가 높은 변환 기저 벡터들을 선택하는 것이 부호화 효율 관점에서 유리할 수 있다.Here, the L value has a range of 1 <= L <16, and in general, L can be selected by an arbitrary method among 16 transform base vectors, but in terms of encoding and decoding, a signal as in the example presented above It may be advantageous from the viewpoint of encoding efficiency to select transform base vectors having high importance in terms of energy.
또한 RST를 적용함에 있어서, 본 발명에서는 4x4 RST의 적용 영역을 설정하고 변환 계수를 배치하는 방법을 제안한다.In addition, in applying RST, the present invention proposes a method of setting an application area of 4x4 RST and arranging transform coefficients.
본 발명의 일 실시예에 있어서, 4x4 RST는 2차 변환으로 적용될 수 있으며, 이때 DCT-타입 2 등의 1차 변환이 적용된 블록에 대해 2차적으로 적용될 수 있다. 1차 변환이 적용된 블록의 크기를 NxN으로 가정할 때, 통상적으로 NxN이 4x4보다 같거나 클 때 4x4 RST를 적용할 수 있다. 따라서, 4x4 RST를 NxN 블록에 적용하는 예는 다음과 같다. In one embodiment of the present invention, 4x4 RST may be applied as a secondary transform, and at this time, may be applied secondary to a block to which a primary transform such as DCT-type 2 is applied. When the size of a block to which the first transform is applied is assumed to be NxN, 4x4 RST may be applied when NxN is equal to or larger than 4x4. Therefore, an example of applying 4x4 RST to an NxN block is as follows.
1) NxN 의 모든 영역이 아닌 일부 영역에만 4x4 RST를 적용할 수 있다. 예를 들어, 좌상단(top-left) MxM 영역에 대해만 적용할 수 있다 (M <=N).1) 4x4 RST can be applied only to some areas, not all areas of NxN. For example, it can be applied only to the top-left MxM region (M <= N).
2) 2차 변환이 적용될 영역을 4x4 블록들로 분할한 후 각 분할된 블록에 대해 4x4 RST를 적용할 수 있다.2) After the region to which the second transform is applied is divided into 4x4 blocks, 4x4 RST may be applied to each divided block.
3) 상기 1)과 2)를 혼합하여 적용할 수 있다. 예를 들어, 좌상단 MxM 영역을 4x4 블록들로 분할한 후 분할된 영역에 4x4 RST를 적용할 수 있다.3) The above 1) and 2) can be mixed and applied. For example, after dividing the upper left MxM area into 4x4 blocks, 4x4 RST may be applied to the divided area.
구체적인 실시 예로, 좌상단 8x8 영역에 대해서만 2차 변환을 적용하고, NxN 블록이 8x8보다 같거나 큰 경우에는 8x8 RST를 적용하며, NxN 블록이 8x8보다 작은 경우에는 (4x4, 8x4, 4x8) 상기 2)와 같이 4x4 블록들로 나눈 후 각기 4x4 RST를 적용할 수 있다.As a specific example, the second transform is applied only to the upper left 8x8 region, when the NxN block is equal to or greater than 8x8, 8x8 RST is applied, and when the NxN block is smaller than 8x8 (4x4, 8x4, 4x8), 2) After dividing into 4x4 blocks, each 4x4 RST can be applied.
4x4 RST를 적용하고 나서 L개의 변환 계수가 (1헚<16) 생성되었다고 했을 때, L개의 변환 계수를 어떻게 배치할지(즉, 변환 계수를 대상 블록 내 매핑하는 방법)에 대한 자유도가 생긴다. 하지만, 레지듀얼 코딩 파트에서 변환 계수를 읽어서 처리할 때 정해진 순서가 존재할 것이므로, 상기 L개의 변환 계수를 2차원 블록에 어떻게 배치하는가에 따라 코딩 성능이 달라질 수 있다. HEVC에서의 레지듀얼 코딩은 DC 위치에서 가장 멀리 떨어진 위치에서부터 코딩을 시작한다. 이는 DC 위치에서 멀리 떨어질수록 양자화를 거친 계수 값이 0이거나 0에 가깝다는 사실을 이용하여 코딩 성능을 높이기 위해서이다. 따라서, 상기 L개의 변환 계수들에 대해서도 높은 에너지를 가진 보다 중요한 계수를 레지듀얼 코딩의 순서상 나중에 코딩되도록 배치하는 것이 코딩 성능 면에서 유리할 수 있다.When L transform coefficients (1 헚 <16) are generated after applying 4x4 RST, there is a degree of freedom in how to place L transform coefficients (ie, how to map transform coefficients in a target block). However, since a predetermined order will exist when the transform coefficients are read and processed in the residual coding part, coding performance may vary depending on how the L transform coefficients are arranged in a 2D block. The residual coding in HEVC starts coding from the position farthest from the DC position. This is to increase coding performance by taking advantage of the fact that the farther away from the DC position, the quantized coefficient value is zero or close to zero. Therefore, it may be advantageous in terms of coding performance to arrange more important coefficients having high energy for the L transform coefficients to be coded later in the order of residual coding.
도 14는 HEVC 표준에서 적용되고 있는 4x4 변환 계수 또는 변환 계수 블록(4x4 블록, Coefficient Group (CG))에 적용될 수 있는 세 가지 순방향 스캔 순서를 나타내고 있다. (a)는 대각선 스캔(diagonal scan), (b)는 수평 스캔(horizontal scan), (c)는 수직 스캔(vertical scan)을 나타낸다.14 shows three forward scan sequences that can be applied to a 4x4 transform coefficient or a transform coefficient block (4x4 block, Coefficient Group (CG)) applied in the HEVC standard. (a) is a diagonal scan, (b) is a horizontal scan, and (c) is a vertical scan.
레지듀얼 코딩에서는 도 14 스캔 순서의 역순을 따르게 된다, 즉, 16부터 1의 순서로 코딩된다. 도 14에 도시되어 있는 세 가지 스캔 순서는 인트라 예측 모드에 따라 선택되므로, 상기 L개의 변환 계수들에 대해서도 동일하게 인트라 예측 모드에 따라 스캔 순서를 결정하도록 구성할 수 있다.In the residual coding, the reverse order of the scan order in FIG. 14 is followed, that is, it is coded in the order of 16 to 1. Since the three scan orders illustrated in FIG. 14 are selected according to the intra prediction mode, the L transform coefficients may be configured to determine the scan order according to the intra prediction mode.
도 15 및 도 16은 본 발명의 일 실시예에 따라 대각선 스캔 순서에 따른 변환 계수들의 매핑을 도시한 도면이다. 도 15 및 도 16의 실시예에서는 4x8 블록에 대해 4x4 RST를 적용하였을 때 대각선 스캔 순서에 따라 유효한 변환 계수들을 위치시키는 예시를 나타낸다. 15 and 16 are diagrams illustrating mapping of transform coefficients according to a diagonal scan order according to an embodiment of the present invention. 15 and 16 show an example of placing valid transform coefficients in a diagonal scan order when 4x4 RST is applied to a 4x8 block.
일 실시예로, 대각선 스캔 순서를 따르고 좌상단 4x8 블록을 4x4 블록들로 분할하여 각기 4x4 RST를 적용한다고 했을 때, L 값이 8이라면 (즉, 16개 중에 8개의 변환 계수만을 남긴다면) 도 15와 같이 변환 계수들이 위치할 수 있다. 예를 들어, 도 15에 도시된 것처럼 각 4x4 블록의 절반 영역에 변환 계수가 매핑될 수 있으며, X가 표시된 위치들에 대해서는 디폴트로 0 값이 채워질 수 있다. In one embodiment, when a 4x4 RST is applied by dividing the upper left 4x8 block into 4x4 blocks according to the diagonal scan order, and the L value is 8 (that is, if only 8 transform coefficients are left out of 16), FIG. 15 As shown, transform coefficients may be located. For example, as shown in FIG. 15, a transform coefficient may be mapped to a half area of each 4x4 block, and a value of 0 may be filled in by default for positions marked with X.
따라서, 도 14에서 제시한 스캔 순서를 따라 L개의 변환 계수를 각 4x4 블록에 대해 배치시키고, 각 4x4 블록의 남은 (16 - L)개의 위치들에 대해서는 0으로 채워진다는 것을 가정하고 해당 레지듀얼 코딩을 (예컨대, 기존 HEVC에서의 레지듀얼 코딩) 적용할 수 있다.Accordingly, it is assumed that L transform coefficients are arranged for each 4x4 block according to the scan order shown in FIG. 14, and it is assumed that the remaining (16-L) positions of each 4x4 block are filled with 0, corresponding residual coding. Can be applied (eg, residual coding in existing HEVC).
다른 일 실시예로, 도 16의 (a)에 도시된 것처럼 두개의 4x4 블록에 각각 배치시켰던 L개의 변환 계수들을 도 16의 (b)에 도시된 것처럼 하나의 4x4 블록에 합쳐서 배치시킬 수 있다. 특히 L 값이 8인 경우 두 4x4 블록의 변환 계수들이 하나의 4x4 블록에 배치되어 하나의 4x4 블록에 완전히 채워지므로, 다른 하나의 4x4 블록에는 어떠한 변환 계수도 남아 있지 않는다. 따라서, 이렇게 비워진 4x4 블록에 대해서는 대부분의 레지듀얼 코딩이 불필요해 지므로, HEVC의 경우 해당 coded_sub_block_flag를 0으로 코딩할 수 있다. 여기서, HEVC(또는 VVC)에 적용되는 coded_sub_block_flag은 현재 변환 블록 내에 16 변환 계수 레벨에 대한 4x4 어레이인 서브 블록의 위치를 명시하기 위한 플래그 정보로써, 레지듀얼이 남아 있지 않은 4x4 블록에 대하여 "0"으로 시그널링될 수 있다.In another embodiment, as shown in FIG. 16 (a), L transform coefficients that are respectively placed in two 4x4 blocks may be combined and arranged in one 4x4 block as shown in FIG. 16 (b). In particular, when the L value is 8, since the transform coefficients of two 4x4 blocks are disposed in one 4x4 block and completely filled in one 4x4 block, no other transform coefficients are left in the other 4x4 block. Therefore, since most residual coding is unnecessary for a 4x4 block vacated like this, in the case of HEVC, the corresponding coded_sub_block_flag can be coded as 0. Here, coded_sub_block_flag applied to HEVC (or VVC) is flag information for specifying the position of a sub-block that is a 4x4 array for 16 transform coefficient levels in the current transform block, and "0" for a 4x4 block in which no residual remains. It may be signaled as.
또한, 두 4x4 블록의 변환 계수들을 어떻게 섞을지에 대해서도 다양한 방식이 가능하다. 일반적으로 임의의 순서를 따라 합칠 수 있지만, 실질적인 예들로 다음과 같은 방법들을 들 수 있다.In addition, various methods are possible for mixing the transform coefficients of two 4x4 blocks. In general, they can be combined in any order, but the following methods are practical examples.
(1) 두 4x4 블록의 변환 계수를 스캔 순서대로 번갈아 가면서 섞는다. 즉, 도 11에서의 상위 블록에 대한 변환 계수를
Figure PCTKR2019011486-appb-I000002
이라고 하고 하위 블록의 변환 계수를
Figure PCTKR2019011486-appb-I000003
이라고 할 때,
Figure PCTKR2019011486-appb-I000004
와 같이 하나씩 번갈아 가며 섞을 수 있다. 물론
Figure PCTKR2019011486-appb-I000005
이 먼저 배치되도록
Figure PCTKR2019011486-appb-I000006
Figure PCTKR2019011486-appb-I000007
의 순서를 바꿀 수 있다.
(1) The transform coefficients of two 4x4 blocks are mixed alternately in the scan order. That is, the transform coefficient for the upper block in FIG. 11 is
Figure PCTKR2019011486-appb-I000002
And the transform coefficient of the sub-block
Figure PCTKR2019011486-appb-I000003
When I say,
Figure PCTKR2019011486-appb-I000004
You can mix them one by one as shown. sure
Figure PCTKR2019011486-appb-I000005
So that it is placed first
Figure PCTKR2019011486-appb-I000006
Wow
Figure PCTKR2019011486-appb-I000007
You can change the order.
(2) 첫 번째 4x4 블록에 대한 변환 계수들을 먼저 배치시키고 뒤이어 두 번째 4x4 블록에 대한 변환 계수들을 배치시킬 수 있다. 즉,
Figure PCTKR2019011486-appb-I000008
과 같이 연결하여 배치할 수 있다. 당연히,
Figure PCTKR2019011486-appb-I000009
와 같이 순서를 바꿀 수도 있다.
(2) The transform coefficients for the first 4x4 block can be arranged first, followed by the transform coefficients for the second 4x4 block. In other words,
Figure PCTKR2019011486-appb-I000008
It can be arranged by connecting as follows. naturally,
Figure PCTKR2019011486-appb-I000009
You can also change the order like so:
이하에서는 4x4 RST에 대한 NSST 인덱스를 코딩하는 방법에 대하여 기술한다. 첫 번째 방법은 NSST 인덱스를 레지듀얼 코딩 이후에 코딩하는 경우이고, 두 번째 방법은 NSST 인덱스를 레지듀얼 코딩 이전에 코딩하는 경우이다.Hereinafter, a method of coding an NSST index for 4x4 RST will be described. The first method is a case where the NSST index is coded after residual coding, and the second method is a case where the NSST index is coded before residual coding.
NSST 인덱스를 코딩함에 있어서, 본 발명에서는 레지듀얼 코딩 이후에 NSST 인덱스를 코딩할 수 있다.In coding the NSST index, in the present invention, the NSST index can be coded after residual coding.
도 15에서 설명한 바와 같이 4x4 RST가 적용되면 각 4x4 블록에 대해 변환 계수 스캔 순서에 따라 L+1번째부터 16번째까지는 0 값이 채워질 수 있다. 따라서, 만약 두 4x4 블록 중 하나라도 L+1번째부터 16번째 위치 중에 0이 아닌 값이 발생한다면, 4x4 RST가 적용되지 않는 경우에 해당한다. 4x4 RST도 NSST와 같이 준비된 변환 세트 중에서 하나를 선택해서 적용하는 구조를 갖는다면, 어떤 변환을 적용할지에 대한 인덱스(변환 인덱스, RST 인덱스 또는 NSST 인덱스로 명명될 수 있음)를 시그널링할 수 있다.As illustrated in FIG. 15, when 4x4 RST is applied, 0 values may be filled from L + 1 to 16th according to a transform coefficient scan order for each 4x4 block. Therefore, if any one of the two 4x4 blocks has a non-zero value in the L + 1th to 16th positions, it corresponds to a case where 4x4 RST is not applied. If the 4x4 RST also has a structure to select and apply one of the prepared transform sets such as NSST, an index (which may be referred to as a transform index, an RST index, or an NSST index) to which a transform is applied may be signaled.
만약, 디코딩 장치에서 NSST 인덱스를 비트스트림 파싱을 통해 알 수 있다고 하고 이러한 파싱 과정을 레지듀얼 코딩 이후에 수행한다고 하자. 이 경우, 레지듀얼 코딩이 수행되어 L+1번째부터 16번째 사이에 0이 아닌 변환 계수가 하나라도 존재하는 것이 밝혀졌다면, 상술한 바와 같이 4x4 RST가 적용되지 않는 것이 확실하므로 NSST 인덱스를 파싱하지 않도록 설정할 수 있다. 따라서, 이러한 방식에서는 필요한 경우에 대해서만 NSST 인덱스를 선택적으로 파싱하게 되어 시그널링 비용을 줄일 수 있다.Suppose that the decoding apparatus can know the NSST index through bitstream parsing, and perform this parsing process after residual coding. In this case, if residual coding is performed and it turns out that there is at least one non-zero transform coefficient between L + 1th to 16th, it is certain that 4x4 RST is not applied as described above, so the NSST index is not parsed. Can be set to not. Accordingly, in this method, the NSST index is selectively parsed only when necessary, thereby reducing signaling cost.
예를 들어, 도 15에서와 같이 특정 영역 내에서 여러 개의 4x4 블록에 대해 4x4 RST가 적용된다고 한다면 (모두 동일한 4x4 RST가 적용될 수도 있고 각기 다른 4x4 RST가 적용될 수도 있다), 하나의 NSST 인덱스를 통해 상기 모든 4x4 블록들에 적용되는 (동일한 혹은 각자의) 4x4 RST가 지정될 수 있다. 하나의 NSST 인덱스에 의해 상기 모든 4x4 블록들에 대한 4x4 RST 및 적용 여부가 결정되므로, 상기 모든 4x4 블록들에 대해 L+1번째부터 16번째까지의 위치에서 0이 아닌 변환 계수가 존재하는지를 레지듀얼 코딩 과정 중에 조사하여, 하나의 4x4 블록에서라도 허용되지 않는 위치에 (L+1번째부터 16번째까지의 위치) 0이 아닌 변환 계수가 존재하게 되면 NSST 인덱스를 코딩하지 않도록 구성할 수 있다.For example, if 4x4 RST is applied to multiple 4x4 blocks within a specific region as shown in FIG. 15 (both the same 4x4 RST may be applied or different 4x4 RSTs may be applied), through one NSST index A 4x4 RST (same or separate) applied to all 4x4 blocks may be designated. Since 4x4 RST and whether or not to apply to all the 4x4 blocks are determined by one NSST index, it is residual whether the non-zero transform coefficient exists at positions L + 1 to 16 for all 4x4 blocks. By investigating during the coding process, if a non-zero transform coefficient is present in a position that is not allowed even in one 4x4 block (L + 1 to 16th positions), the NSST index can be configured not to be coded.
이러한 NSST 인덱스는 루마(Luminance) 블록과 크로마(Chrominance) 블록에 대해 각기 따로 시그널링할 수도 있고, 크로마 블록의 경우 Cb와 Cr에 대해 각기 별도의 NSST 인덱스를 시그널링할 수도 있으며, NSST 인덱스를 한번만 시그널링하여 하나의 NSST 인덱스를 공유할 수도 있다.These NSST indices may be separately signaled for Luminance blocks and Chrominance blocks, and in the case of chroma blocks, they may signal separate NSST indices for Cb and Cr, respectively, and signaling the NSST index only once One NSST index can be shared.
Cb와 Cr에 대해 하나의 NSST 인덱스를 공유하는 경우, 동일한 NSST 인덱스가 지시하는 4x4 RST가 적용될 수 있다 (Cb와 Cr에 대한 4x4 RST 자체가 동일할 수도 있고, NSST 인덱스는 같으나 개별적인 4x4 RST를 가질 수도 있다). 이때, 공유 NSST 인덱스에 대해 상술한 조건적 시그널링을 적용하려면 Cb와 Cr에 대한 모든 4x4 블록들에 대해 L+1번째부터 16번째까지 0이 아닌 변환 계수가 존재하는지를 체크하여, 만약 하나라도 0이 아닌 변환 계수가 발견되면 NSST 인덱스에 대한 시그널링을 생략하도록 구성할 수 있다.When one NSST index is shared for Cb and Cr, 4x4 RST indicated by the same NSST index may be applied (the 4x4 RST itself for Cb and Cr may be the same, and the NSST index is the same but has individual 4x4 RST). May be). At this time, in order to apply the conditional signaling described above for the shared NSST index, it is checked whether there is a non-zero transform coefficient from L + 1 to 16th for all 4x4 blocks for Cb and Cr. If a non-conversion coefficient is found, it can be configured to omit signaling for the NSST index.
다른 예로, 도 16에서와 같이 두 4x4 블록에 대한 변환 계수들을 합치는 경우에 대해서도, 4x4 RST가 적용되었을 때 유효한 변환 계수가 존재하지 않는 위치에 0이 아닌 변환 계수가 등장하는지 체크한 후 NSST 인덱스에 대한 시그널링 여부를 결정할 수 있다. 특히, 도 16에서와 같이 L 값이 8이어서 4x4 RST 적용 시 하나의 4x4 블록에 대해서는 유효한 변환 계수들이 없는 경우(도 12의 (b)에서 X로 표시된 블록), 유효한 변환 계수들이 없는 블록의 coded_sub_block_flag를 체크하여 그 값이 1이면 NSST 인덱스를 시그널링하지 않도록 설정할 수 있다.As another example, in the case of combining the transform coefficients for two 4x4 blocks as shown in FIG. 16, after checking whether a non-zero transform coefficient appears at a position where a valid transform coefficient does not exist when 4x4 RST is applied, the NSST index It is possible to determine whether or not signaling. In particular, when the L value is 8 as shown in FIG. 16 and there are no valid transform coefficients for one 4x4 block when 4x4 RST is applied (block indicated by X in FIG. 12B), coded_sub_block_flag of a block without valid transform coefficients By checking, if the value is 1, the NSST index may not be signaled.
또한 NSST 인덱스를 코딩함에 있어서, 본 발명에서는 레지듀얼 코딩 이전에 NSST 인덱스를 코딩할 수 있다. In addition, when coding the NSST index, in the present invention, the NSST index can be coded before residual coding.
본 발명의 일 실시예에 따라 NSST 인덱스에 대한 코딩이 레지듀얼 코딩 이전에 수행되는 경우, 4x4 RST의 적용 여부가 미리 결정되므로 변환 계수가 0으로 채워지는 것이 확실한 위치들에 대해서는 레지듀얼 코딩을 생략할 수 있다. When coding for the NSST index is performed before residual coding according to an embodiment of the present invention, since whether to apply 4x4 RST is predetermined, residual coding is omitted for locations where it is certain that the transform coefficient is filled with 0. can do.
여기서 4x4 RST 적용 여부는 NSST 인덱스 값을 통해 알 수 있도록 (예를 들어, NSST 인덱스가 0이면 4x4 RST 적용하지 않음) 구성될 수도 있고, 아니면 별도의 신택스 요소(syntax element)를 통해 시그널링 될 수도 있다. 예를 들어, 별도의 신택스 요소가 NSST flag라고 하면 NSST flag를 먼저 파싱하여 4x4 RST 적용 여부를 파악한 후, 만약 NSST flag 값이 1이라면 유효한 변환 계수가 존재할 수 없는 위치들에 대해서는 레지듀얼 코딩을 생략할 수 있다.Here, whether or not 4x4 RST is applied may be configured to be known through an NSST index value (for example, if the NSST index is 0, 4x4 RST is not applied), or may be signaled through a separate syntax element. . For example, if a separate syntax element is an NSST flag, the NSST flag is parsed first to determine whether 4x4 RST is applied, and if NSST flag value is 1, residual coding is omitted for locations where a valid transform coefficient cannot exist. can do.
HEVC의 경우 레지듀얼 코딩 수행 시 가장 첫 번째로 TU 상에서의 마지막 0이 아닌 변환 계수(last non-zero coefficient) 위치를 코딩하게 된다. 만약, NSST 인덱스에 대한 코딩을 마지막 0이 아닌 변환 계수 위치 코딩 이후에 수행하고 마지막 0이 아닌 변환 계수의 위치가 4x4 RST의 적용을 가정했을 때 0이 아닌 변환 계수가 발생할 수 없는 위치로 파악된다면, NSST 인덱스를 코딩하지 않고 4x4 RST를 적용하지 않도록 할 수 있다. 예를 들어, 도 15에서 X로 표시된 위치들의 경우 4x4 RST가 적용되었을 때 유효한 변환 계수들이 위치하지 않으므로 (예를 들어, 0 값 등이 채워질 수 있다), X로 표시된 영역에 마지막 0이 아닌 변환 계수가 위치하게 되면 NSST 인덱스에 대한 코딩을 생략할 수 있다. 만약 X로 표시된 영역에 마지막 0이 아닌 변환 계수가 위치하지 않는다면, NSST 인덱스에 대한 코딩을 수행할 수 있다.In the case of HEVC, first, when performing residual coding, the last non-zero coefficient position on the TU is coded. If the coding for the NSST index is performed after the last non-zero transform coefficient position coding and the position of the last non-zero transform coefficient is assumed to be a position where the non-zero transform coefficient cannot occur when assuming application of 4x4 RST , 4x4 RST can be applied without coding the NSST index. For example, in the case of positions indicated by X in FIG. 15, when 4x4 RST is applied, since valid conversion coefficients are not located (for example, a value of 0 may be filled), the last non-zero conversion in the area indicated by X When the coefficient is located, coding for the NSST index can be omitted. If the last non-zero transform coefficient is not located in the region indicated by X, coding for the NSST index can be performed.
마지막 0이 아닌 변환 계수 위치에 대한 코딩 이후에 조건적으로 NSST 인덱스를 코딩하여(상술하였듯이 마지막 0이 아닌 변환 계수의 위치가 4x4 RST의 적용을 가정했을 때 허용되지 않는 위치라면 NSST 인덱스에 대한 코딩 생략 가능) 4x4 RST의 적용 여부를 알게 된 경우, 이하 남은 레지듀얼 코딩 부분에 대해서는 다음과 같은 두 가지 방식으로 처리될 수 있다.Coding NSST index conditionally after coding for the last non-zero transform coefficient position (as described above, if the position of the last non-zero transform coefficient is an unacceptable position assuming the application of 4x4 RST, coding for the NSST index) When it is known whether to apply 4x4 RST, the remaining residual coding part can be processed in the following two ways.
(1) 4x4 RST를 적용하지 않는 경우에 대해서는 일반적인 레지듀얼 코딩을 그대로 유지할 수 있다. 즉, 마지막 0이 아닌 변환 계수 위치부터 DC 위치까지 어떤 위치도 0이 아닌 변환 계수가 존재할 수 있다는 가정 하에서 코딩을 수행한다.(1) In case 4x4 RST is not applied, general residual coding may be maintained. That is, coding is performed under the assumption that a non-zero transform coefficient may exist at any position from the last non-zero transform coefficient position to the DC position.
(2) 4x4 RST를 적용하는 경우 특정 위치 또는 특정 4x4 블록에 대해서는 (예를 들어, 도 15의 X 위치) 해당 변환 계수가 존재하지 않을 수 밖에 없으므로 (디폴트로 0으로 채워질 수 있다), 해당 위치 또는 블록에 대해서는 레지듀얼 코딩을 생략할 수 있다. 예를 들어, 도 15에서 X로 표시된 위치에 도달하는 경우는 sig_coeff_flag에 (HEVC 및 VVC에 적용되는 해당 위치에 0이 아닌 변환 계수가 존재하는지 여부에 대한 flag) 대한 코딩을 생략할 수 있다. 또한, 도 16에서와 같이 두 블록의 변환 계수를 합치는 경우 0으로 비워진 4x4 블록에 대해서는 coded_sub_block_flag에 (HEVC에 존재) 대한 코딩을 생략하고 해당 값을 0으로 유도할 수 있으며, 해당 4x4 블록에 대해서는 별도 코딩 없이 모두 0 값으로 채울 수 있다.(2) In the case of applying 4x4 RST, for a specific position or a specific 4x4 block (for example, X position in FIG. 15), the corresponding conversion coefficient has no choice but to be present (it may be filled with 0 by default). Alternatively, residual coding may be omitted for a block. For example, when the position indicated by X in FIG. 15 is reached, coding for sig_coeff_flag (a flag for whether a non-zero transform coefficient exists in a corresponding position applied to HEVC and VVC) may be omitted. In addition, when the transform coefficients of two blocks are combined as shown in FIG. 16, coding for coded_sub_block_flag (existing in HEVC) can be omitted for a 4x4 block emptied as 0, and a corresponding value can be derived as 0, and for a corresponding 4x4 block All can be filled with zero values without coding.
한편, 마지막 0이 아닌 변환 계수 위치에 대한 코딩 이후에 NSST 인덱스를 코딩하는 경우, 마지막 0이 아닌 변환 계수의 x 위치(Px)와 y 위치(Py)가 각각 Tx, Ty(특정 임계값)보다 작은 경우에는 NSST 인덱스 코딩을 생략하고 4x4 RST를 적용하지 않도록 구성할 수 있다. 예를 들어, Tx = 1, Ty = 1인 경우, 마지막 0이 아닌 변환 계수가 DC 위치에 존재하는 경우에 대하여 NSST 인덱스 코딩을 생략한다는 것을 의미한다. 이와 같은 임계값과의 비교를 통해 NSST 인덱스 코딩 여부를 결정하는 방식은 루마와 크로마에 각기 달리 적용될 수 있다. 예를 들어 루마와 크로마에 대해 각기 다른 Tx, Ty를 적용할 수도 있고, 루마에는 (또는 크로마에는) 임계값을 적용하고 크로마에는 (또는 루마에는) 적용하지 않을 수도 있다.On the other hand, when coding the NSST index after coding for the last non-zero transform coefficient position, the x position (Px) and the y position (Py) of the last non-zero transform coefficient are greater than Tx and Ty (specific threshold values), respectively. In small cases, NSST index coding can be omitted and configured not to apply 4x4 RST. For example, when Tx = 1 and Ty = 1, it means that NSST index coding is omitted for the case where the last non-zero transform coefficient is present in the DC position. The method of determining whether to encode the NSST index through comparison with the threshold can be applied to luma and chroma differently. For example, different Tx and Ty may be applied to luma and chroma, and a threshold value may be applied to luma (or chroma) and not applied to chroma (or luma).
물론, NSST 인덱스 코딩을 생략하는 두 가지 방법을 (마지막 0이 아닌 변환 계수가 유효한 변환 계수가 존재하지 않는 영역에 위치하는 경우 NSST 인덱스 코딩을 생략하는 방법, 마지막 0이 아닌 변환 계수에 대한 X 좌표와 Y 좌표가 각기 어떤 임계값(threshold)보다 작을 때 NSST 인덱스 코딩을 생략하는 방법) 모두 적용할 수도 있다. 예를 들어, 마지막 0이 아닌 변환 계수 위치 좌표에 대한 임계값 체크를 먼저 수행한 후, 마지막 0이 아닌 변환 계수가 유효한 변환 계수가 존재하지 않는 영역에 위치하는지 여부를 체크할 수 있고, 그 반대 순도 가능하다.Of course, there are two ways to omit the NSST index coding (if the last non-zero transform coefficient is located in an area where no valid transform coefficient exists, how to omit the NSST index coding, the X coordinate for the last non-zero transform coefficient And how to omit the NSST index coding when the Y coordinate is less than a certain threshold, respectively. For example, it is possible to first perform a threshold check for the last non-zero transform coefficient position coordinate, and then check whether the last non-zero transform coefficient is located in a region where a valid transform coefficient does not exist and vice versa. Purity is possible.
상술한 레지듀얼 코딩 이전에 NSST 인덱스를 코딩하는 방법은 8x8 RST에 대해서도 적용될 수 있다. 즉, 마지막 0이 아닌 변환 계수가 좌상단 8x8 영역 내에서 좌상단 4x4가 아닌 영역에 위치하게 된다면 NSST 인덱스에 대한 코딩을 생략할 수 있으며, 그렇지 않으면 NSST 인덱스에 코딩을 수행할 수 있다. 또한, 마지막 0이 아닌 변환 계수 위치에 대한 X, Y 좌표 값이 모두 어떤 임계값 미만이라고 한다면 NSST 인덱스에 대한 코딩을 생략할 수 있다. 당연히 두 가지 방법을 함께 적용할 수도 있다.The method of coding the NSST index before the residual coding described above can also be applied to 8x8 RST. That is, if the last non-zero transform coefficient is located in a region other than the upper left 4x4 in the upper left 8x8 region, coding for the NSST index can be omitted, otherwise coding for the NSST index can be performed. In addition, if the X and Y coordinate values for the last non-zero transform coefficient position are less than a certain threshold, coding for the NSST index can be omitted. Of course, both methods can be applied together.
또한 NSST 인덱스를 코딩함에 있어서, 본 발명에서는 RST 적용 시 루마와 크로마에 대해 각각 다른 NSST 인덱스 코딩 및 레지듀얼 코딩 방식을 적용할 수 있다. In addition, in coding the NSST index, in the present invention, different RST index coding and residual coding schemes may be applied to luma and chroma when RST is applied.
상술한 바와 같은 NSST 인덱스 코딩이 레지듀얼 코딩 이후에 이루어지는 첫 번째 방법(방법 1)과 NSST 인덱스 코딩이 및 레지듀얼 코딩 이전에 이루어지는 방법(방법 2)을 루마와 크로마에 각각 다르게 적용할 수 있다. The first method (method 1) in which NSST index coding is performed after residual coding and the method (method 2) in which NSST index coding is performed before and residual coding may be applied differently to luma and chroma, respectively.
예를 들어, 루마는 방법 2에 기술된 방식을 따르고, 크로마에는 방법 1을 적용할 수 있다. 또는 루마에는 방법 1 또는 방법 2에 따라 조건적으로 NSST 인덱스 코딩을 적용하고, 크로마에는 조건적 NSST 인덱스 코딩을 적용하지 않을 수 있으며, 반대도 가능하다. 즉, 크로마에는 방법 1 또는 방법 2에 따라 조건적으로 NSST 인덱스 코딩을 적용하고, 루마에는 조건적 NSST 인덱스 코딩을 적용하지 않을 수 있다.For example, luma follows the method described in method 2, and method 1 can be applied to chroma. Alternatively, conditional NSST index coding may be applied to luma according to method 1 or method 2, conditional NSST index coding may not be applied to chroma, and vice versa. That is, NSST index coding may be applied conditionally according to method 1 or method 2 to chroma, and conditional NSST index coding may not be applied to luma.
이하에서는 1차 변환으로 다중 변환을 적용하는 경우에 대한 최적화 방법에 관하여 기술한다. Hereinafter, an optimization method for a case of applying multiple transforms as a first order transform will be described.
다중 변환을 적용함에 있어서, 본 발명에서는 RT(Reduced transform)의 방법을 기반으로 다중 변환을 적용할 수 있다. 이는 REMT(Reduced Explicit Multiple Transform) 또는 RAMT(Reduced Adaptive Multiple Transform) 등의 용어로 지칭될 수도 있다. In applying multiple transforms, in the present invention, multiple transforms may be applied based on a method of reduced transform (RT). This may also be referred to as terms such as Reduced Explicit Multiple Transform (REMT) or Reduced Adaptive Multiple Transform (RAMT).
상술한 바와 같이 다중 변환 선택(혹은 Explicit Multiple Transform; Adaptive Multiple Transform)에서와 같이 여러 변환들(DCT2, DST7, DCT8, DST1, DCT5 등)의 조합들이 선택적으로 1차 변환에 사용되는 경우, 복잡도 감소를 위해 모든 경우에 대하여 변환을 수행하는것이 아니라, 미리 정의된 영역에 대해서만 변환을 적용함으로써 worst case 복잡도를 현저하게 감소시킬 수 있다. As described above, when a combination of multiple transforms (DCT2, DST7, DCT8, DST1, DCT5, etc.) is selectively used for the primary transform, as in the multiple transform selection (or Explicit Multiple Transform; Adaptive Multiple Transform), complexity is reduced. For this, the worst case complexity can be significantly reduced by applying the transformation only to a predefined region, rather than performing the transformation in all cases.
예를 들면, 앞에서 설명한 RT(Reduced transform)의 방법을 기반으로 MxM 크기의 화소블록에 대해서 1차 변환을 적용했을 경우, MxM 크기의 변환 블록을 얻는 대신, RxR의 (M>=R) 변환 블록에 대한 계산만을 수행할 수 있다. 결과적으로, RxR 영역에 대해서만 유효한 0이 아닌 변환 계수(non-zero coefficients)들이 존재하게 되며, 그 외의 영역에 존재할 변환 계수에 대해서는 계산을 수행하지 않고 0 값으로 간주할 수 있다. 다음 표 4는 1차 변환 크기별로 미리 정의된 R값을 사용하는 RAMT(reduced adaptive multiple transform)의 3가지 예를 나타낸다. For example, when the first transform is applied to an MxM-sized pixel block based on the aforementioned method of RT (Reduced transform), instead of obtaining a MxM-sized transform block, the (M> = R) transform block of RxR Only calculations for can be performed. As a result, there are non-zero coefficients that are valid only for the RxR region, and it can be regarded as a zero value without performing calculation for the transformation coefficients that will exist in other regions. Table 4 below shows three examples of a reduced adaptive multiple transform (RAMT) using a predefined R value for each primary transform size.
Figure PCTKR2019011486-appb-T000004
Figure PCTKR2019011486-appb-T000004
상술한 RAMT(또는 REMT)를 적용함에 있어, 본 발명에서는 RT 팩터(reduced transform factor) (R)가 해당 1차 변환에 따라서 의존적으로 결정될 수 있다. In applying the above-described RAMT (or REMT), in the present invention, the RT factor (reduced transform factor) (R) may be determined depending on the corresponding primary transform.
예를 들면, 1차 변환이 DCT2인 경우, 다른 1차 변환들에 비해서 계산량이 비교적 간단하므로 작은 블록에 대해서는 RT을 사용하지 않거나, 상대적으로 큰 R값을 사용함으로써 부호화 성능의 감소를 최소화할 수 있다. 예를 들면, DCT2의 경우와 그 이외의 변환인 경우, 다음 표 5와 같이 다른 RT 팩터를 사용할 수 있다. 표 5는 변환 크기별로 다른 RT 팩터를 사용하는 RAMT의 예시를 나타낸다.For example, when the primary transform is DCT2, since the calculation amount is relatively simple compared to other primary transforms, the decrease in encoding performance can be minimized by not using RT for a small block or by using a relatively large R value. have. For example, in the case of DCT2 and other conversions, other RT factors may be used as shown in Table 5 below. Table 5 shows an example of a RAMT using different RT factors for each conversion size.
Figure PCTKR2019011486-appb-T000005
Figure PCTKR2019011486-appb-T000005
또한 다중 변환을 적용함에 있어서, 본 발명에서는 인트라 예측 모드에 따라 EMT(혹은 AMT) 핵심 변환을 선택할 수 있다. 상기 표 1 및 표 2에 제시된 바와 같이 EMT_CU_Flag = 1 (또는 AMT_CU_Flag=1)인 경우, 2 비트의 EMT_TU_index 를 통해 4개 조합의 EMT 인덱스(0,1,2,3) 중 하나를 선택할 수 있으며, 주어진 EMT 인덱스를 기반으로 해당 1차 변환에 적용될 변환 타입을 선택할 수 있다. 다음 표 6은 EMT_index 값을 기준으로 수평 및 수직 방향에 대해 해당 1차 변환에 적용되는 변환 타입을 선택하는 매핑(mapping) 테이블의 일예이다.In addition, in applying multiple transforms, in the present invention, an EMT (or AMT) core transform may be selected according to an intra prediction mode. As shown in Table 1 and Table 2, when EMT_CU_Flag = 1 (or AMT_CU_Flag = 1), one of four combinations of EMT indexes (0,1,2,3) may be selected through EMT_TU_index of 2 bits, Based on the given EMT index, a transform type to be applied to the corresponding primary transform can be selected. Table 6 below is an example of a mapping table for selecting a transformation type applied to the corresponding primary transformation for the horizontal and vertical directions based on the EMT_index value.
Figure PCTKR2019011486-appb-T000006
Figure PCTKR2019011486-appb-T000006
본 발명에서는 인트라 예측 모드에 따라서 발생하는 1차 변환들의 통계를 분석하였고, 이를 기반으로 보다 효율적인 EMT 핵심 변환 매핑(core transform mapping) 방법을 제안한다. 먼저 다음 표 7은 인트라 예측 모드별로 EMT_TU_index의 분포를 백분율(%)로 나타내었다.In the present invention, statistics of primary transforms occurring according to the intra prediction mode are analyzed, and based on this, a more efficient EMT core transform mapping method is proposed. First, the following Table 7 shows the distribution of EMT_TU_index for each intra prediction mode as a percentage (%).
Figure PCTKR2019011486-appb-T000007
Figure PCTKR2019011486-appb-T000007
67 모드를 사용하는 인트라 예측 모드를 기반으로 했을때, 상기 표 7에서 수평 방향(Hor) 모드는 모드 2번부터 33번 모드까지를 나타내고 수직 방향(Ver) 모드는 34번부터 66번까지의 방향 모드를 나타낸다. Based on the intra prediction mode using 67 mode, in Table 7 above, the horizontal (Hor) mode indicates modes 2 to 33, and the vertical (Ver) mode indicates directions 34 to 66. Mode.
상기 표 7에서 알 수 있듯이, 수직 방향(Hor) 모드(2<=모드<=33)의 경우 EMT_TU_index = 2가 EMT_TU_index = 1보다 매우 높은 확률을 보이고 있다. 따라서 본 발명에서는 다음 표 8과 같은 매핑 테이블을 제안한다. As can be seen from Table 7, EMT_TU_index = 2 in the vertical direction (Hor) mode (2 <= mode <= 33) shows a much higher probability than EMT_TU_index = 1. Therefore, the present invention proposes a mapping table as shown in Table 8 below.
Figure PCTKR2019011486-appb-T000008
Figure PCTKR2019011486-appb-T000008
상기 표 8에서는 수평 방향(Hor) 모드 그룹들에 대해서는 다른 매핑을 사용한 예를 나타내었다. 위와 같이 EMT_TU_index를 기반으로 1차 변환을 유도하는 방법에서는 인트라 예측 방향을 기반으로 다른 매핑 테이블을 사용할 수도 있다.Table 8 shows an example in which different mappings are used for horizontal mode groups. As described above, in the method of deriving the first order transform based on EMT_TU_index, another mapping table may be used based on the intra prediction direction.
또한 본 발명에서는, 인트라 예측 모드별로 이용가능한 (available) EMT_TU_index가 동일하지 않고 서로 다르게 정의될 수 있다. 예를 들면, 상기 표 7에 나타난 바와 같이 플래너(Planar) 모드의 경우 EMT_TU_index = 3의 경우(방향성(anglular) 모드의 경우 EMT_TU_index >1인 경우)가 발생 확률이 상대적으로 낮기 때문에, 이러한 발생 확률이 낮은 인덱스 부분을 배제함으로써 보다 효율적인 부호화가 가능하다. 다음 표 9는 이용가능한 EMT_TU_index 값이 인트라 예측 모드별로 의존적인 경우를 예시적으로 나타내었다. Also, in the present invention, EMT_TU_index available for each intra prediction mode is not the same and may be defined differently. For example, as shown in Table 7, the probability of occurrence is relatively low in the case of EMT_TU_index = 3 in the planar mode (in the case of EMT_TU_index> 1 in the angular mode), this probability of occurrence More efficient encoding is possible by excluding the lower index portion. Table 9 below shows an example in which available EMT_TU_index values depend on intra prediction modes.
Figure PCTKR2019011486-appb-T000009
Figure PCTKR2019011486-appb-T000009
본 발명에서는 상술한 인트라 예측 모드별로 다르게 분포하는 EMT_TU_index의 값을 보다 효율적으로 부호화하기 위하여 다음과 같은 두가지의 부호화 방법을 제안한다. In the present invention, the following two encoding methods are proposed to more efficiently encode the values of EMT_TU_index distributed differently for each of the above-described intra prediction modes.
1) EMT(AMT) TU 인덱스 값을 이진화(binarization)할 때, 고정된 길이(fixed length) 이진화 방법보다는 Truncated unary 방법을 사용하여 부호화할 수 있다. 다음 표 10은 고정된 길이(fixed length)와 truncated unary 이진화의 예를 나타내었다.1) When the EMT (AMT) TU index value is binarized, it can be encoded using a truncated unary method rather than a fixed length binarization method. Table 10 below shows examples of fixed length and truncated unary binarization.
Figure PCTKR2019011486-appb-T000010
Figure PCTKR2019011486-appb-T000010
2) EMT TU 인덱스 값을 컨텍스트 모델링(context modeling)을 통하여 부호화할 때, 인트라 예측 모드의 정보를 이용하여 컨텍스트 모델(context model)을 결정할 수 있다. 다음 표 11은 컨텍스트에 따라 인트라 예측 모드를 매핑한 실시예 3개(방법1, 방법2, 방법3)를 나타낸다. 특히, 본 발명에서 명시한 인트라 예측 모드별 컨텍스트 모델링 방법은 블록 크기와 같은 다른 요소들과 함께 고려될 수도 있다.2) When encoding the EMT TU index value through context modeling, a context model may be determined using information of an intra prediction mode. Table 11 shows three embodiments (method 1, method 2, method 3) in which intra prediction modes are mapped according to context. In particular, the context modeling method for each intra prediction mode specified in the present invention may be considered together with other factors such as block size.
Figure PCTKR2019011486-appb-T000011
Figure PCTKR2019011486-appb-T000011
이하에서는 본 발명에 따라 AMT(또는 EMT) 방식에서 다중 변환 선택(MTS)을 적용하여 변환을 수행하는 과정을 제안하되, 다중 변환 선택의 적용을 위한 신택스 요소를 제안하고 다중 변환에 사용되는 변환 커널(변환 타입)을 결정하는 방법을 제안한다. Hereinafter, according to the present invention, a process of performing transformation by applying multiple transformation selection (MTS) in an AMT (or EMT) method is proposed, but a syntax element for applying multiple transformation selection and a transformation kernel used for multiple transformation We propose a method for determining (conversion type).
본 발명의 일 실시예로, 변환을 수행함에 있어 다중 변환 선택이 가용한지 여부를 나타내는 신택스 요소를 사용할 수 있다. 이러한 신택스 요소를 사용함으로써, 현재 코딩 대상 블록에 대해 다중 변환 선택을 사용하여 변환을 수행할 수 있는지 여부를 명시적으로 인코딩 장치에서 디코딩 장치로 시그널링할 수 있다. 다음 표 12는 다중 변환 선택의 가용 여부를 나타내기 위한 정보를 시퀀스 파라미터 세트(sequence parameter set)에서 시그널링하는 신택스 테이블의 예를 나타낸다. 표 13은 표 12의 신택스 요소들이 나타내는 정보를 정의하는 시멘틱스(Semantics) 테이블의 예를 나타낸다.In one embodiment of the present invention, in performing the transformation, a syntax element indicating whether multiple transformation selection is available may be used. By using such a syntax element, it is possible to explicitly signal from the encoding apparatus to the decoding apparatus whether or not transformation can be performed using multiple transform selection for the current block to be coded. Table 12 below shows an example of a syntax table that signals information for indicating whether multi-conversion selection is available in a sequence parameter set. Table 13 shows an example of a semantics table that defines information represented by the syntax elements of Table 12.
Figure PCTKR2019011486-appb-T000012
Figure PCTKR2019011486-appb-T000012
Figure PCTKR2019011486-appb-T000013
Figure PCTKR2019011486-appb-T000013
상기 표 12 및 표 13을 참조하면, 변환을 수행함에 있어 다중 변환 선택이 가용한지 여부를 나타내는 정보로서, sps_mts_intra_enabled_flag 또는 sps_mts_inter_enabled_flag 신택스 요소를 사용할 수 있다. 예를 들어, sps_mts_intra_enabled_flag는 인트라 코딩 블록에 대해 다중 변환 선택을 기반으로 한 변환이 가용한지 여부를 나타내는 정보이고, sps_mts_inter_enabled_flag는 인터 코딩 블록에 대해 다중 변환 선택을 기반으로 한 변환이 가용한지 여부를 나타내는 정보일 수 있다. 여기서, 인트라 코딩 블록은 인트라 예측 모드로 코딩된 블록을 말하며, 인터 코딩 블록은 인터 예측 모드로 코딩된 블록을 말한다. Referring to Table 12 and Table 13, sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag syntax elements may be used as information indicating whether multiple transform selection is available in performing the transform. For example, sps_mts_intra_enabled_flag is information indicating whether a transform based on multiple transform selection is available for an intra coding block, and sps_mts_inter_enabled_flag is information indicating whether a transform based on multiple transform selection is available for an inter coding block. Can be Here, the intra coding block refers to a block coded in intra prediction mode, and the inter coding block refers to a block coded in inter prediction mode.
일 실시예로, 인코딩 장치에서 sps_mts_intra_enabled_flag를 통해서 인트라 코딩 블록에 대해 다중 변환 선택을 기반으로 한 변환이 가용한지 여부를 설정하여 시그널링하고, 디코딩 장치에서는 시그널링된 sps_mts_intra_enabled_flag를 디코딩하여 해당 인트라 코딩 블록에 대해 다중 변환 선택이 가용한지 여부를 판단할 수 있다. 또는, 인코딩 장치에서 sps_mts_inter_enabled_flag를 통해서 인터 코딩 블록에 대해 다중 변환 선택을 기반으로 한 변환이 가용한지 여부를 설정하여 시그널링하고, 디코딩 장치에서는 시그널링된 sps_mts_inter_enabled_flag를 디코딩하여 해당 인터 코딩 블록에 대해 다중 변환 선택이 가용한지 여부를 판단할 수 있다. 이와 같이, sps_mts_intra_enabled_flag 또는 sps_mts_inter_enabled_flag를 기반으로 해당 인트라 코딩 블록 또는 해당 인터 코딩 블록이 다중 변환 선택이 가용한 것으로 판단된 경우, 후술할 다중 변환 선택의 적용 여부를 나타내는 정보(예: cu_mts_flag) 또는 다중 변환 선택 시에 사용되는 변환 커널을 지시하는 정보(예: mts_idx)를 추가적으로 시그널링할 수 있다. In one embodiment, the encoding apparatus sets and signals whether a transform based on multiple transform selection is available for an intra coding block through sps_mts_intra_enabled_flag, and the decoding apparatus decodes the signaled sps_mts_intra_enabled_flag to multiple for the intra coding block It is possible to determine whether a conversion selection is available. Alternatively, the encoding apparatus sets and signals whether a transform based on multiple transform selection is available for an inter-coding block through sps_mts_inter_enabled_flag, and the decoding apparatus decodes the signaled sps_mts_inter_enabled_flag to select multiple transforms for the inter-coding block Can determine if it is available. As described above, when it is determined that the multiple transform selection is available for the corresponding intra coding block or the corresponding inter coding block based on sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag, information indicating whether to apply multiple transform selection to be described later (for example, cu_mts_flag) or multiple transform selection Information indicating the transform kernel used at the time (eg, mts_idx) may be additionally signaled.
여기서, sps_mts_intra_enabled_flag 또는 sps_mts_inter_enabled_flag 신택스 요소는 시퀀스 레벨(즉, 시퀀스 파라미터 세트)에서 시그널링되는 것으로 표 12에 나타내었으나, 슬라이스 레벨(즉, 슬라이스 헤더) 또는 픽처 레벨(즉, 픽처 파라미터 세트) 등을 통해서 시그널링될 수도 있다. Here, the sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag syntax element is shown in Table 12 as being signaled at the sequence level (i.e., sequence parameter set), but is signaled through the slice level (i.e., slice header) or picture level (i.e., picture parameter set), etc. It might be.
또한 본 발명의 일 실시예에서, 상기 표 12에서와 같이 상위 레벨(예: 시퀀스 파라미터 세트 등)을 통해서 시그널링된 sps_mts_intra_enabled_flag 또는 sps_mts_inter_enabled_flag가 다중 변환 선택을 기반으로 한 변환이 가용한 것으로 나타난 경우, 하위 레벨(예: 레지듀얼 코딩 신택스, 변환 유닛 신택스 등)에서 해당 블록에 다중 변환 선택이 적용되는지 여부를 지시하는 정보를 추가적으로 시그널링할 수도 있다. 다음 표 14는 상위 레벨에서 명시적으로 시그널링된 신택스 요소(예: sps_mts_intra_enabled_flag 또는 sps_mts_inter_enabled_flag)를 기반으로 하위 레벨(예: 변환 유닛 신텍스)에서 추가적으로 다중 변환 선택의 적용 여부를 나타내는 정보(예: cu_mts_flag)를 시그널링하는 신택스 테이블의 예를 나타낸다. 표 15는 표 14의 신택스 요소가 나타내는 정보를 정의하는 시멘틱스 테이블의 예를 나타낸다.In addition, in one embodiment of the present invention, when the sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag signaled through a higher level (for example, a sequence parameter set, etc.) as shown in Table 12 above shows that the transformation based on multiple transform selection is available, the lower level In the example (eg, residual coding syntax, transform unit syntax, etc.), information indicating whether multiple transform selection is applied to the corresponding block may be additionally signaled. Table 14 below shows information indicating whether multiple transform selections are additionally applied at a lower level (e.g., transform unit syntax) based on syntax elements explicitly signaled at a higher level (e.g., sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag) (e.g. cu_mts_flag). An example of a syntax table for signaling is shown. Table 15 shows an example of a semantics table defining information represented by the syntax element of Table 14.
Figure PCTKR2019011486-appb-T000014
Figure PCTKR2019011486-appb-T000014
Figure PCTKR2019011486-appb-T000015
Figure PCTKR2019011486-appb-T000015
또한 본 발명의 일 실시예에서, 상기 표 12 및 표 14에서와 같이 다중 변환 선택의 가용 여부를 나타내는 정보(예: sps_mts_intra_enabled_flag, sps_mts_inter_enabled_flag) 또는 다중 변환 선택의 적용 여부를 나타내는 정보(예: cu_mts_flag)를 기반으로 다중 변환 선택 시에 사용되는 변환 커널을 지시하는 정보를 시그널링할 수 있다. 다음 표 16은 다중 변환 선택 시에 적용되는 변환 커널을 지시하는 정보를 시그널링하는 신택스 테이블의 예를 나타낸다. 표 17은 표 16의 신택스 요소가 나타내는 정보를 정의하는 시멘틱스 테이블의 예를 나타낸다. In addition, in one embodiment of the present invention, information indicating whether multi-conversion selection is available (eg, sps_mts_intra_enabled_flag, sps_mts_inter_enabled_flag) or information indicating whether multi-conversion selection is applied (eg, cu_mts_flag), as shown in Tables 12 and 14, is provided. Based on this, information indicating a transform kernel used when selecting multiple transforms may be signaled. Table 16 below shows an example of a syntax table signaling information indicating a transform kernel applied when multiple transforms are selected. Table 17 shows an example of a semantics table that defines information represented by the syntax element of Table 16.
Figure PCTKR2019011486-appb-T000016
Figure PCTKR2019011486-appb-T000016
Figure PCTKR2019011486-appb-I000010
Figure PCTKR2019011486-appb-I000010
Figure PCTKR2019011486-appb-I000011
Figure PCTKR2019011486-appb-I000011
Figure PCTKR2019011486-appb-T000017
Figure PCTKR2019011486-appb-T000017
상기 표 16 및 표 17을 참조하면, 다중 변환 선택 시에 사용되는 변환 커널을 지시하는 정보로서, mts_idx 신택스 요소를 사용할 수 있다. mts_idx 신택스 요소는 상술한 변환 세트와 같이 다중 변환 시에 사용되는 수평 방향 변환 및 수직 방향 변환을 위해 구성되어 있는 특정 조합들 중에서 현재 블록에 적용되는 하나의 조합을 지시하는 인덱스 값으로 설정될 수 있다. Referring to Tables 16 and 17, mts_idx syntax element may be used as information indicating a transform kernel used when selecting multiple transforms. The mts_idx syntax element may be set to an index value indicating one combination applied to a current block among specific combinations configured for horizontal direction transformation and vertical direction transformation used in multiple transformation, such as the transformation set described above. .
예를 들어, sps_mts_intra_enabled_flag, sps_mts_inter_enabled_flag, cu_mts_flag 등의 신택스 요소를 통해 현재 블록에 대해 다중 변환 선택을 적용하는 것으로 명시적으로 지시하는 경우, mts_idx 신택스 요소는 현재 블록의 변환을 수행하기 위해 필요한 정보를 시그널링하는 레벨인 레지듀얼 코딩 신택스 또는 변환 유닛 신택스 등을 통해 전달될 수 있다. 디코딩 장치는 인코딩 장치로부터 mts_idx 신택스 요소를 획득하여, mts_idx가 지시하는 인덱스 값을 기반으로 현재 블록에 적용되는 변환 커널들(수평 방향 변환 커널 및 수직 방향 변환 커널)을 도출하여 다중 변환을 수행할 수 있다. For example, when explicitly instructing to apply multiple transform selection for the current block through syntax elements such as sps_mts_intra_enabled_flag, sps_mts_inter_enabled_flag, cu_mts_flag, the mts_idx syntax element signals information required to perform the transformation of the current block The level may be transmitted through residual coding syntax or transform unit syntax. The decoding device may obtain mts_idx syntax elements from the encoding device, derive transformation kernels (horizontal direction transformation kernel and vertical direction transformation kernel) applied to the current block based on the index value indicated by mts_idx, and perform multiple transformations. have.
이때, 다중 변환 선택을 위해 사용되는 수평 방향 변환 커널 및 수직 방향 변환 커널의 조합들을 미리 설정해 둘 수 있으며, 각 조합들은 mts_idx의 인덱스 값에 각각 대응될 수 있다. 따라서, 디코딩 장치는 미리 설정되어 있는 수평 방향 변환 커널 및 수직 방향 변환 커널의 조합들 중에서 mts_idx의 인덱스 값에 대응되는 조합을 선택하고, 선택된 조합의 수평 방향 변환 커널 및 수직 방향 변환 커널을 현재 블록에 적용할 변환 커널 세트로 도출할 수 있다. In this case, combinations of the horizontal transform kernel and the vertical transform kernel used for multiple transform selection may be preset, and each combination may respectively correspond to an index value of mts_idx. Accordingly, the decoding apparatus selects a combination corresponding to the index value of mts_idx among the combinations of the preset horizontal direction conversion kernel and vertical direction conversion kernel, and the horizontal direction conversion kernel and vertical direction conversion kernel of the selected combination are assigned to the current block. It can be derived from the set of transform kernels to be applied.
도 17은 본 발명의 일 실시예에 따라 역변환을 수행하는 디코딩 방법을 개략적으로 나타내는 흐름도이다. 도 17에 개시된 방법은 상기 표 12 내지 표 17에서 설명한 신택스 요소를 기반으로 역변환을 수행하는 과정을 나타낸 것이다. 17 is a flowchart schematically illustrating a decoding method for performing inverse transform according to an embodiment of the present invention. The method disclosed in FIG. 17 shows a process of performing inverse transformation based on the syntax elements described in Tables 12 to 17 above.
도 17을 참조하면, 디코딩 장치는 sps_mts_intra_enabled_flag 또는 sps_mts_inter_enabled_flag 를 획득할 수 있다(S1700). Referring to FIG. 17, the decoding apparatus may acquire sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag (S1700).
여기서, sps_mts_intra_enabled_flag 신택스 요소는 cu_mts_flag 가 인트라 코딩 유닛의 레지듀얼 코딩 신택스에 존재하는지 여부를 나타낸다. 예를 들어, sps_mts_intra_enabled_flag = 0 이면, cu_mts_flag 가 인트라 코딩 유닛의 레지듀얼 코딩 신택스에 존재하지 않고, sps_mts_intra_enabled_flag = 1 이면, cu_mts_flag 가 인트라 코딩 유닛의 레지듀얼 코딩 신택스에 존재한다. 그리고, sps_mts_inter_enabled_flag 신택스 요소는 cu_mts_flag 가 인터 코딩 유닛의 레지듀얼 코딩 신택스에 존재하는지 여부를 나타낸다. 예를 들어, sps_mts_inter_enabled_flag = 0 이면, cu_mts_flag 가 인터 코딩 유닛의 레지듀얼 코딩 신택스에 존재하지 않고, sps_mts_inter_enabled_flag = 1 이면, cu_mts_flag 가 인터 코딩 유닛의 레지듀얼 코딩 신택스에 존재한다.Here, the sps_mts_intra_enabled_flag syntax element indicates whether cu_mts_flag exists in the residual coding syntax of the intra coding unit. For example, if sps_mts_intra_enabled_flag = 0, cu_mts_flag is not present in the residual coding syntax of the intra coding unit, and if sps_mts_intra_enabled_flag = 1, cu_mts_flag is present in the residual coding syntax of the intra coding unit. And, the sps_mts_inter_enabled_flag syntax element indicates whether cu_mts_flag exists in the residual coding syntax of the inter coding unit. For example, if sps_mts_inter_enabled_flag = 0, cu_mts_flag is not present in the residual coding syntax of the inter coding unit, and if sps_mts_inter_enabled_flag = 1, cu_mts_flag is present in the residual coding syntax of the inter coding unit.
디코딩 장치는 sps_mts_intra_enabled_flag 또는 sps_mts_inter_enabled_flag에 기초하여 cu_mts_flag 를 획득할 수 있다(S1710). The decoding device may obtain cu_mts_flag based on sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag (S1710).
예를 들어, sps_mts_intra_enabled_flag = 1 또는 sps_mts_inter_enabled_flag = 1 일때, 디코딩 장치는 cu_mts_flag 를 획득할 수 있다. 여기서, cu_mts_flag 신택스 요소는 다중 변환 선택(multiple transform selection, 이하 'MTS'라 함)이 루마 변환 블록의 레지듀얼 샘플에 적용되는지 여부를 나타낸다. 예를 들어, cu_mts_flag = 0 이면 MTS가 루마 변환 블록의 레지듀얼 샘플에 적용되지 않고, cu_mts_flag = 1 이면 MTS가 루마 변환 블록의 레지듀얼 샘플에 적용된다. 다른 예로, cu_mts_flag 에 대해 후술할 표 25에서 설명되는 실시예 또는 다른 실시예들 중 적어도 하나가 적용될 수 있다.For example, when sps_mts_intra_enabled_flag = 1 or sps_mts_inter_enabled_flag = 1, the decoding device may acquire cu_mts_flag. Here, the cu_mts_flag syntax element indicates whether multiple transform selection (hereinafter referred to as 'MTS') is applied to the residual sample of the luma transform block. For example, if cu_mts_flag = 0, MTS is not applied to the residual sample of the luma transform block, and if cu_mts_flag = 1, MTS is applied to the residual sample of the luma transform block. As another example, at least one of the embodiments described in Table 25 or other embodiments described later with respect to cu_mts_flag may be applied.
디코딩 장치는 cu_mts_flag 에 기초하여 mts_idx 를 획득할 수 있다(S1720). The decoding apparatus may obtain mts_idx based on cu_mts_flag (S1720).
예를 들어, cu_mts_flag = 1 일때, 디코딩 장치는 mts_idx 를 획득할 수 있다. 여기서, mts_idx 신택스 요소는 어떤 변환 커널이 현재 변환 블록의 수평 및/또는 수직 방향에 따른 루마 레지듀얼 샘플들에 적용되는지를 나타낸다. 예를 들어, mts_idx 에 대해 후술할 표 18 내지 표 25에서 설명되는 실시예들 또는 다른 실시예들 중 적어도 하나가 적용될 수 있다.For example, when cu_mts_flag = 1, the decoding apparatus may obtain mts_idx. Here, the mts_idx syntax element indicates which transform kernel is applied to luma residual samples along the horizontal and / or vertical direction of the current transform block. For example, at least one of the embodiments described in Tables 18 to 25 or other embodiments described later with respect to mts_idx may be applied.
디코딩 장치는 mts_idx 에 대응되는 변환 커널을 유도할 수 있다(S1730). The decoding device may derive a transform kernel corresponding to mts_idx (S1730).
예를 들어, mts_idx에 대응되는 변환 커널은 수평 변환 및 수직 변환으로 구분되어 정의될 수 있다. 다른 예로, 수평 변환 및 수직 변환은 서로 다른 변환 커널이 적용될 수 있다. 다만, 본 발명은 이에 한정되지 않으며, 수평 변환 및 수직 변환은 동일한 변환 커널이 적용될 수도 있다. For example, the transform kernel corresponding to mts_idx may be defined by being divided into horizontal transform and vertical transform. As another example, different transformation kernels may be applied to the horizontal transformation and the vertical transformation. However, the present invention is not limited thereto, and the same transform kernel may be applied to horizontal transform and vertical transform.
그리고, 디코딩 장치는 변환 커널에 기초하여 역변환을 수행할 수 있다(S1740).Then, the decoding apparatus may perform inverse transform based on the transform kernel (S1740).
또한, 본 문서에서 MTS는 AMT(Adaptive Mutliple Transform, AMT) 또는 (Explicit Multiple Transform, EMT)로도 표현될 수 있으며, 마찬가지로, mts_idx 도 AMT_idx, EMT_idx, AMT_TU_idx EMT_TU_idx 등과 같이 표현될 수 있으며, 본 발명은 이러한 표현에 한정되지 않는다.In addition, in this document, MTS may be expressed as an Adaptive Mutliple Transform (AMT) or (Explicit Multiple Transform, EMT). Similarly, mts_idx may also be expressed as AMT_idx, EMT_idx, AMT_TU_idx EMT_TU_idx, etc. It is not limited to expression.
도 18은 본 발명의 일 실시예에 따라 역변환을 수행하는 디코딩 장치의 관련 컴포넌트를 나타낸다. 도 18에 개시된 디코딩 장치의 관련 컴포넌트는 상기 도 17의 방법을 수행할 수 있다. 또한, 도 18의 디코딩 장치는 도 3에서 개시된 디코딩 장치일 수 있다. 18 shows related components of a decoding apparatus for performing inverse transform according to an embodiment of the present invention. The related component of the decoding apparatus disclosed in FIG. 18 may perform the method of FIG. 17 above. Also, the decoding apparatus of FIG. 18 may be the decoding apparatus disclosed in FIG. 3.
도 18을 참조하면, 디코딩 장치(300)는 시퀀스 파라미터를 획득하는 요소(1800), 다중 변환 선택 플래그를 획득하는 요소(1810), 다중 변환 선택 인덱스를 획득하는 요소(1820) 및 변환 커널을 유도하는 요소(1830)를 포함할 수 있다.Referring to FIG. 18, the decoding apparatus 300 derives an element 1800 for obtaining a sequence parameter, an element 1810 for obtaining a multiple transform selection flag, an element 1820 for obtaining a multiple transform selection index, and a transformation kernel Element 1830.
시퀀스 파라미터를 획득하는 요소(1800)는 sps_mts_intra_enabled_flag 또는 sps_mts_inter_enabled_flag를 획득할 수 있다. 여기서, sps_mts_intra_enabled_flag 신택스 요소는 cu_mts_flag가 인트라 코딩 유닛의 레지듀얼 코딩 신택스에 존재하는지 여부를 나타내고, sps_mts_inter_enabled_flag 신택스 요소는 cu_mts_flag가 인터 코딩 유닛의 레지듀얼 코딩 신택스에 존재하는지 여부를 나타낸다. 구체적인 예는 상기 도 17의 설명이 적용될 수 있다.The element 1800 for obtaining sequence parameters may obtain sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag. Here, the sps_mts_intra_enabled_flag syntax element indicates whether cu_mts_flag is present in the residual coding syntax of the intra coding unit, and the sps_mts_inter_enabled_flag syntax element indicates whether cu_mts_flag is present in the residual coding syntax of the inter coding unit. As a specific example, the description of FIG. 17 may be applied.
다중 변환 선택 플래그를 획득하는 요소(1810)는 sps_mts_intra_enabled_flag 또는 sps_mts_inter_enabled_flag에 기초하여 cu_mts_flag 를 획득할 수 있다. 예를 들어, sps_mts_intra_enabled_flag = 1 또는 sps_mts_inter_enabled_flag = 1 일때, 다중 변환 선택 플래그를 획득하는 요소(1810)는 cu_mts_flag를 획득할 수 있다. 여기서, cu_mts_flag 신택스 요소는 다중 변환 선택(multiple transform selection, 이하 'MTS'라 함)이 루마 변환 블록의 레지듀얼 샘플에 적용되는지 여부를 나타낸다. 구체적인 예는 상기 도 17의 설명이 적용될 수 있다.The element 1810 for obtaining the multiple transform selection flag may acquire cu_mts_flag based on sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag. For example, when sps_mts_intra_enabled_flag = 1 or sps_mts_inter_enabled_flag = 1, the element 1810 acquiring the multiple transform selection flag may acquire cu_mts_flag. Here, the cu_mts_flag syntax element indicates whether multiple transform selection (hereinafter referred to as 'MTS') is applied to the residual sample of the luma transform block. As a specific example, the description of FIG. 17 may be applied.
다중 변환 선택 인덱스를 획득하는 요소(1820)는 cu_mts_flag에 기초하여 mts_idx를 획득할 수 있다. 예를 들어, cu_mts_flag = 1 일때, 다중 변환 선택 인덱스를 획득하는 요소(1820)는 mts_idx를 획득할 수 있다. 여기서, mts_idx 신택스 요소는 어떤 변환 커널이 현재 변환 블록의 수평 및/또는 수직 방향에 따른 루마 레지듀얼 샘플들에 적용되는지를 나타낸다. 구체적인 예는 상기 도 17의 설명이 적용될 수 있다.The element 1820 that acquires the multiple transform selection index may obtain mts_idx based on cu_mts_flag. For example, when cu_mts_flag = 1, the element 1820 obtaining a multiple transform selection index may obtain mts_idx. Here, the mts_idx syntax element indicates which transform kernel is applied to luma residual samples along the horizontal and / or vertical direction of the current transform block. As a specific example, the description of FIG. 17 may be applied.
변환 커널을 유도하는 요소(1830)는 mts_idx에 대응되는 변환 커널을 유도할 수 있다. The element 1830 that derives the transform kernel may derive the transform kernel corresponding to mts_idx.
그리고, 상기 디코딩 장치(300)는 변환 커널에 기초하여 역변환을 수행할 수 있다.Also, the decoding apparatus 300 may perform inverse transformation based on the transformation kernel.
한편, 본 발명의 실시예에 따르면 다중 변환 선택을 위해 사용되는 변환 커널들의 조합들을 다양한 방식으로 구성할 수 있다. 여기서, 변환 커널들의 조합들은 다중 변환 선택 후보(이하, MTS 후보)들이란 용어로 지칭될 수도 있다. 또한 변환 커널들의 조합들(즉, MTS 후보들)은 다중 변환 커널 세트들을 나타내는 것으로, 다중 변환 커널 세트들은 수직 변환 커널에 대응하는 변환 커널 타입 및 수평 변환 커널에 대응하는 변환 커널 타입을 조합하여 도출될 수 있다. 이때, 다중 변환 선택에 사용될 수 있는 변환 커널 타입은 복수 개일 수 있으며, 이 경우 수직 변환 커널에 대응하는 변환 커널 타입은 상기 복수 개의 변환 커널 타입들 중 하나이고 수평 변환 커널에 대응하는 변환 커널 타입은 상기 복수 개의 변환 커널 타입들 중 하나일 수 있다. 다시 말해서, 다중 변환 커널 세트들(즉, MTS 후보들)은 복수 개의 변환 커널 타입들을 조합하여 구성될 수 있다. 예컨대, 다중 변환 선택에 사용될 수 있는 변환 커널 타입으로는, DST7, DCT8, DCT2, DST1, DCT5 등을 사용할 수 있으며, 이들 중 복수 개를 선택하고 선택된 복수 개의 타입들을 조합하여 다중 변환 커널 세트들(즉, MTS 후보들)로 구성할 수 있다. 이러한 다중 변환 커널 세트들(즉, MTS 후보들)은 변환 효율을 고려하여 다양하게 구성될 수 있다.Meanwhile, according to an embodiment of the present invention, combinations of transform kernels used for multiple transform selection may be configured in various ways. Here, combinations of transform kernels may be referred to as multiple transform selection candidates (hereinafter, MTS candidates). Also, combinations of transform kernels (that is, MTS candidates) represent multiple transform kernel sets, and the multiple transform kernel sets may be derived by combining a transform kernel type corresponding to a vertical transform kernel and a transform kernel type corresponding to a horizontal transform kernel. You can. At this time, there may be a plurality of conversion kernel types that can be used for multiple conversion selection. In this case, the conversion kernel type corresponding to the vertical conversion kernel is one of the plurality of conversion kernel types, and the conversion kernel type corresponding to the horizontal conversion kernel is It may be one of the plurality of conversion kernel types. In other words, multiple transform kernel sets (ie, MTS candidates) may be configured by combining a plurality of transform kernel types. For example, as the conversion kernel type that can be used for multiple conversion selection, DST7, DCT8, DCT2, DST1, DCT5, etc. can be used, and multiple conversion kernel sets ( That is, MTS candidates). These multiple transform kernel sets (ie, MTS candidates) may be variously configured in consideration of transform efficiency.
MTS 후보들을 구성함에 있어서, 본 발명의 일 실시예에서는 변환 커널 타입으로 DST7 및 DCT8을 사용하여 이들을 조합함으로써 복수의 MTS 후보들을 구성하고, 복수의 MTS 후보들 각각에 대응하여 MTS 인덱스 값(예: mts_idx)을 할당할 수 있다. In configuring MTS candidates, in one embodiment of the present invention, a plurality of MTS candidates are configured by combining them using DST7 and DCT8 as transform kernel types, and an MTS index value (eg, mts_idx) corresponds to each of the plurality of MTS candidates. ).
일 실시예로, MTS 인덱스의 제1 인덱스 값(예: 인덱스 값 0)에는, 수직 변환 커널 및 수평 변환 커널에 대응하는 변환 커널 타입을 모두 DST7로 선택하여 조합한 MTS 후보(즉, 변환 커널 세트)를 매핑시킬 수 있다. MTS 인덱스의 제2 인덱스 값(예: 인덱스 값 1)에는, 수직 변환 커널에 대응하는 변환 커널 타입을 DST7로 선택하고 수평 변환 커널에 대응하는 변환 커널 타입을 DCT8로 선택하여 조합한 MTS 후보(즉, 변환 커널 세트)를 매핑시킬 수 있다. MTS 인덱스의 제3 인덱스 값(예: 인덱스 값 2)에는, 수직 변환 커널에 대응하는 변환 커널 타입을 DCT8로 선택하고 수평 변환 커널에 대응하는 변환 커널 타입을 DST7로 선택하여 조합한 MTS 후보(즉, 변환 커널 세트)를 매핑시킬 수 있다. MTS 인덱스의 제4 인덱스 값(예: 인덱스 값 3)에는, 수직 변환 커널 및 수평 변환 커널에 대응하는 변환 커널 타입을 모두 DCT8로 선택하여 조합한 MTS 후보(즉, 변환 커널 세트)를 매핑시킬 수 있다. 이와 같이 조합된 MTS 후보들은 다음 표 18과 같이 MTS 인덱스 값에 따라 수직 변환 커널 및 수평 변환 커널에 대응하는 변환 커널 타입으로 나타낼 수 있다. In one embodiment, in the first index value of the MTS index (eg, index value 0), MTS candidates (that is, a set of transform kernels) are selected by combining both the transform kernel types corresponding to the vertical transform kernel and the horizontal transform kernel with DST7. ) Can be mapped. For the second index value (eg, index value 1) of the MTS index, an MTS candidate (that is, a transform kernel type corresponding to the vertical transform kernel is selected as DST7 and a transform kernel type corresponding to the horizontal transform kernel is selected as DCT8 and combined). , Transform kernel set). For the third index value (eg, index value 2) of the MTS index, an MTS candidate (that is, a transform kernel type corresponding to the vertical transform kernel is selected as DCT8 and a transform kernel type corresponding to the horizontal transform kernel is selected as DST7 and combined) , Transform kernel set). In the fourth index value (eg, index value 3) of the MTS index, MTS candidates (ie, a set of transform kernels) that are combined by selecting a transform kernel type corresponding to both the vertical transform kernel and the horizontal transform kernel as DCT8 can be mapped. have. The combined MTS candidates may be represented as a transform kernel type corresponding to a vertical transform kernel and a horizontal transform kernel according to the MTS index values as shown in Table 18 below.
Figure PCTKR2019011486-appb-T000018
Figure PCTKR2019011486-appb-T000018
다른 실시예로, MTS 인덱스의 제1 인덱스 값(예: 인덱스 값 0)에는, 수직 변환 커널 및 수평 변환 커널에 대응하는 변환 커널 타입을 모두 DST7로 선택하여 조합한 MTS 후보(즉, 변환 커널 세트)를 매핑시킬 수 있다. MTS 인덱스의 제2 인덱스 값(예: 인덱스 값 1)에는, 수직 변환 커널에 대응하는 변환 커널 타입을 DCT8로 선택하고 수평 변환 커널에 대응하는 변환 커널 타입을 DST7로 선택하여 조합한 MTS 후보(즉, 변환 커널 세트)를 매핑시킬 수 있다. 이와 같이 조합된 MTS 후보들은 다음 표 19와 같이 MTS 인덱스 값에 따라 수직 변환 커널 및 수평 변환 커널에 대응하는 변환 커널 타입으로 나타낼 수 있다. In another embodiment, in the first index value of the MTS index (eg, index value 0), MTS candidates (ie, a set of transform kernels) that are selected by combining both a transform kernel type corresponding to a vertical transform kernel and a horizontal transform kernel with DST7 ) Can be mapped. For the second index value of the MTS index (eg, index value 1), the MTS candidate (that is, the transform kernel type corresponding to the vertical transform kernel is selected as DCT8 and the transform kernel type corresponding to the horizontal transform kernel is selected as DST7 and combined). , Transform kernel set). The combined MTS candidates may be represented as a transform kernel type corresponding to a vertical transform kernel and a horizontal transform kernel according to the MTS index values as shown in Table 19 below.
Figure PCTKR2019011486-appb-T000019
Figure PCTKR2019011486-appb-T000019
또 다른 실시예로, MTS 인덱스의 제1 인덱스 값(예: 인덱스 값 0)에는, 수직 변환 커널 및 수평 변환 커널에 대응하는 변환 커널 타입을 모두 DST7로 선택하여 조합한 MTS 후보(즉, 변환 커널 세트)를 매핑시킬 수 있다. MTS 인덱스의 제2 인덱스 값(예: 인덱스 값 1)에는, 수직 변환 커널에 대응하는 변환 커널 타입을 DST7로 선택하고 수평 변환 커널에 대응하는 변환 커널 타입을 DCT8로 선택하여 조합한 MTS 후보(즉, 변환 커널 세트)를 매핑시킬 수 있다. 이와 같이 조합된 MTS 후보들은 다음 표 20과 같이 MTS 인덱스 값에 따라 수직 변환 커널 및 수평 변환 커널에 대응하는 변환 커널 타입으로 나타낼 수 있다. In another embodiment, the first index value (eg, index value 0) of the MTS index includes MTS candidates (that is, transform kernels) selected by combining both the transform kernel types corresponding to the vertical transform kernel and the horizontal transform kernel with DST7. Set). For the second index value (eg, index value 1) of the MTS index, an MTS candidate (that is, a transform kernel type corresponding to the vertical transform kernel is selected as DST7 and a transform kernel type corresponding to the horizontal transform kernel is selected as DCT8 and combined). , Transform kernel set). The combined MTS candidates may be represented by a transform kernel type corresponding to a vertical transform kernel and a horizontal transform kernel according to the MTS index values as shown in Table 20 below.
Figure PCTKR2019011486-appb-T000020
Figure PCTKR2019011486-appb-T000020
상기 표 18 내지 표 20을 참조하면, MTS 인덱스의 인덱스 값에 따라 수직 변환 커널에 대응하는 변환 커널 타입 및 수평 변환 커널에 대응하는 변환 커널 타입이 매핑되어 있다. 여기서, 변환 커널 타입 값이 1인 경우에 DST7을 나타내고, 변환 커널 타입 값이 2인 경우에 DCT8을 나타낸 것이다. 경우에 따라, MTS 인덱스 신택스 요소가 시그널링되지 않는 경우가 있다. 즉, MTS 기반의 변환이 가용하지 않는 것으로 결정된 경우(예: sps_mts_intra_enabled_flag 또는 sps_mts_inter_enabled_flag가 0인 경우)나 MTS 기반의 변환을 적용하지 않는 겻으로 결정된 경우(예: cu_mts_flag가 0인 경우)에 MTS 인덱스 정보가 존재하지 않을 수 있다. 이 경우, 디코딩 장치에서는 상기 표 18 내지 표 20에서 나타난 바와 같이 MTS 인덱스의 값을 -1로 유추하고, 이에 대응하는 변환 커널 타입 0을 현재 블록의 변환 커널 타입(즉, 수직 변환 커널 및 수평 변환 커널)으로 사용할 수 있다. 이때, 변환 커널 타입 0은 DCT2를 나타낼 수 있다. Referring to Tables 18 to 20, a transform kernel type corresponding to a vertical transform kernel and a transform kernel type corresponding to a horizontal transform kernel are mapped according to the index value of the MTS index. Here, DST7 is indicated when the converted kernel type value is 1, and DCT8 is indicated when the converted kernel type value is 2. In some cases, the MTS index syntax element is not signaled. That is, when it is determined that the MTS-based transform is not available (for example, when sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag is 0) or when it is determined that the MTS-based transform is not applied (for example, when cu_mts_flag is 0), MTS index information May not exist. In this case, the decoding apparatus infers the value of the MTS index to -1 as shown in Tables 18 to 20 above, and the corresponding conversion kernel type 0 is the conversion kernel type of the current block (that is, the vertical conversion kernel and the horizontal conversion). Kernel). At this time, the transform kernel type 0 may indicate DCT2.
또한, 실시예에 따라서 본 발명은 인트라 예측 모드의 방향성을 고려하여 MTS 후보들을 구성할 수도 있다. Also, according to an embodiment, the present invention may configure MTS candidates in consideration of the directionality of the intra prediction mode.
일 실시예로, 67개의 인트라 예측 모드가 적용되는 경우, 2개의 비방향성 모드(예: DC 모드, 플래너 모드)에 대해서는 상기 표 18에 나타난 4개의 MTS 후보들을 사용할 수 있고, 수평 방향성을 가진 모드들을 포함하는 수평 그룹 모드(예: 2번 모드부터 34번 모드)에 대해서는 상기 표 19에 나타난 2개의 MTS 후보들을 사용할 수 있고, 수직 방향성을 가진 모드들을 포함하는 수직 그룹 모드(예: 35번 모드부터 66번 모드)에 대해서는 상기 표 20에 나타난 2개의 MTS 후보들을 사용할 수 있다. In one embodiment, when 67 intra prediction modes are applied, 4 MTS candidates shown in Table 18 above may be used for 2 non-directional modes (eg, DC mode and planner mode), and a mode having horizontal directionality For the horizontal group mode including the (eg, mode 2 to 34), two MTS candidates shown in Table 19 above can be used, and a vertical group mode (eg, mode 35) including modes with vertical directionality (# 66 mode), two MTS candidates shown in Table 20 above may be used.
다른 실시예로, 67개의 인트라 예측 모드가 적용되는 경우, 2개의 비방향성 모드(예: DC 모드, 플래너 모드)에 대해서는 다음 표 21에 나타난 바와 같이 3개의 MTS 후보들을 사용할 수 있고, 수평 방향성을 가진 모드들을 포함하는 수평 그룹 모드(예: 2번 모드부터 34번 모드)에 대해서는 다음 표 22에 나타난 바와 같이 2개의 MTS 후보들을 사용할 수 있고, 수직 방향성을 가진 모드들을 포함하는 수직 그룹 모드(예: 35번 모드부터 66번 모드)에 대해서는 상기 표 23에 나타난 바와 같이 2개의 MTS 후보들을 사용할 수 있다. In another embodiment, when 67 intra prediction modes are applied, 3 MTS candidates may be used for 2 non-directional modes (eg, DC mode and planner mode), and horizontal directionality may be used as shown in Table 21 below. For a horizontal group mode including excitation modes (eg, 2 to 34 modes), two MTS candidates may be used as shown in Table 22 below, and a vertical group mode including modes with vertical directionality (eg : Modes 35 to 66), as shown in Table 23 above, two MTS candidates may be used.
다음 표 21은 2개의 비방향성 모드(예: DC 모드, 플래너 모드)에 대해 사용되는 MTS 후보들로서, MTS 인덱스 값에 따른 수직 변환 커널 및 수평 변환 커널에 대응하는 변환 커널 타입의 예시를 나타낸 것이다. Table 21 below shows an example of a transform kernel type corresponding to a vertical transform kernel and a horizontal transform kernel according to MTS index values as MTS candidates used for two non-directional modes (eg, DC mode, planner mode).
Figure PCTKR2019011486-appb-T000021
Figure PCTKR2019011486-appb-T000021
상기 표 21을 참조하면, MTS 인덱스의 제1 인덱스 값(예: 인덱스 값 0)에는, 수직 변환 커널 및 수평 변환 커널에 대응하는 변환 커널 타입을 모두 DST7로 선택하여 조합한 MTS 후보(즉, 변환 커널 세트)를 매핑시킬 수 있다. MTS 인덱스의 제2 인덱스 값(예: 인덱스 값 1)에는, 수직 변환 커널에 대응하는 변환 커널 타입을 DST7로 선택하고 수평 변환 커널에 대응하는 변환 커널 타입을 DCT8로 선택하여 조합한 MTS 후보(즉, 변환 커널 세트)를 매핑시킬 수 있다. MTS 인덱스의 제3 인덱스 값(예: 인덱스 값 2)에는, 수직 변환 커널에 대응하는 변환 커널 타입을 DCT8로 선택하고 수평 변환 커널에 대응하는 변환 커널 타입을 DST7로 선택하여 조합한 MTS 후보(즉, 변환 커널 세트)를 매핑시킬 수 있다.Referring to Table 21, the first index value (eg, index value 0) of the MTS index includes MTS candidates (that is, transforms) selected by combining both the transform kernel types corresponding to the vertical transform kernel and the horizontal transform kernel with DST7. Kernel set). For the second index value (eg, index value 1) of the MTS index, an MTS candidate (that is, a transform kernel type corresponding to the vertical transform kernel is selected as DST7 and a transform kernel type corresponding to the horizontal transform kernel is selected as DCT8 and combined). , Transform kernel set). For the third index value (eg, index value 2) of the MTS index, an MTS candidate (that is, a transform kernel type corresponding to the vertical transform kernel is selected as DCT8 and a transform kernel type corresponding to the horizontal transform kernel is selected as DST7 and combined) , Transform kernel set).
다음 표 22는 수평 방향성을 가진 모드들을 포함하는 수평 그룹 모드(예: 2번 모드부터 34번 모드)에 대해 사용되는 MTS 후보들로서, MTS 인덱스 값에 따른 수직 변환 커널 및 수평 변환 커널에 대응하는 변환 커널 타입의 예시를 나타낸 것이다. Table 22 below shows MTS candidates used for a horizontal group mode (eg, modes 2 to 34) including modes with horizontal directionality, and a transform corresponding to a vertical transform kernel and a horizontal transform kernel according to the MTS index value. Here is an example of a kernel type.
Figure PCTKR2019011486-appb-T000022
Figure PCTKR2019011486-appb-T000022
상기 표 22를 참조하면, MTS 인덱스의 제1 인덱스 값(예: 인덱스 값 0)에는, 수직 변환 커널 및 수평 변환 커널에 대응하는 변환 커널 타입을 모두 DST7로 선택하여 조합한 MTS 후보(즉, 변환 커널 세트)를 매핑시킬 수 있다. MTS 인덱스의 제2 인덱스 값(예: 인덱스 값 1)에는, 수직 변환 커널에 대응하는 변환 커널 타입을 DCT8로 선택하고 수평 변환 커널에 대응하는 변환 커널 타입을 DST7로 선택하여 조합한 MTS 후보(즉, 변환 커널 세트)를 매핑시킬 수 있다. Referring to Table 22, the first index value (eg, index value 0) of the MTS index includes MTS candidates (that is, transforms) selected by combining both the transform kernel types corresponding to the vertical transform kernel and the horizontal transform kernel with DST7. Kernel set). For the second index value of the MTS index (eg, index value 1), the MTS candidate (that is, the transform kernel type corresponding to the vertical transform kernel is selected as DCT8 and the transform kernel type corresponding to the horizontal transform kernel is selected as DST7 and combined). , Transform kernel set).
다음 표 23은 수직 방향성을 가진 모드들을 포함하는 수직 그룹 모드(예: 35번 모드부터 66번 모드)에 대해 사용되는 MTS 후보들로서, MTS 인덱스 값에 따른 수직 변환 커널 및 수평 변환 커널에 대응하는 변환 커널 타입의 예시를 나타낸 것이다. Table 23 below shows MTS candidates used for a vertical group mode (eg, 35 to 66 modes) including vertically oriented modes, and transforms corresponding to a vertical transform kernel and a horizontal transform kernel according to the MTS index value. Here is an example of a kernel type.
Figure PCTKR2019011486-appb-T000023
Figure PCTKR2019011486-appb-T000023
상기 표 23을 참조하면, MTS 인덱스의 제1 인덱스 값(예: 인덱스 값 0)에는, 수직 변환 커널 및 수평 변환 커널에 대응하는 변환 커널 타입을 모두 DST7로 선택하여 조합한 MTS 후보(즉, 변환 커널 세트)를 매핑시킬 수 있다. MTS 인덱스의 제2 인덱스 값(예: 인덱스 값 1)에는, 수직 변환 커널에 대응하는 변환 커널 타입을 DST7로 선택하고 수평 변환 커널에 대응하는 변환 커널 타입을 DCT8로 선택하여 조합한 MTS 후보(즉, 변환 커널 세트)를 매핑시킬 수 있다. Referring to Table 23, the first index value (eg, index value 0) of the MTS index includes MTS candidates (that is, transforms) selected by converting both the transform kernel types corresponding to the vertical transform kernel and the horizontal transform kernel to DST7. Kernel set). For the second index value (eg, index value 1) of the MTS index, an MTS candidate (that is, a transform kernel type corresponding to the vertical transform kernel is selected as DST7 and a transform kernel type corresponding to the horizontal transform kernel is selected as DCT8 and combined). , Transform kernel set).
상기 표 21 내지 표 23에서, 변환 커널 타입 값이 1인 경우에 DST7을 나타내고, 변환 커널 타입 값이 2인 경우에 DCT8을 나타낸 것이다. 경우에 따라, MTS 인덱스 신택스 요소가 시그널링되지 않는 경우가 있다. 즉, MTS 기반의 변환이 가용하지 않는 것으로 결정된 경우(예: sps_mts_intra_enabled_flag 또는 sps_mts_inter_enabled_flag가 0인 경우)나 MTS 기반의 변환을 적용하지 않는 겻으로 결정된 경우(예: cu_mts_flag가 0인 경우)에 MTS 인덱스 정보가 존재하지 않을 수 있다. 이 경우, 디코딩 장치에서는 상기 표 21 내지 표 23에 나타난 바와 같이 MTS 인덱스의 값을 -1로 유추하고, 이에 대응하는 변환 커널 타입 0을 현재 블록의 변환 커널 타입(즉, 수직 변환 커널 및 수평 변환 커널)으로 사용할 수 있다. 이때, 변환 커널 타입 0은 DCT2를 나타낼 수 있다. In Tables 21 to 23, DST7 is indicated when the converted kernel type value is 1, and DCT8 is indicated when the converted kernel type value is 2. In some cases, the MTS index syntax element is not signaled. That is, when it is determined that the MTS-based transform is not available (for example, when sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag is 0) or when it is determined that the MTS-based transform is not applied (for example, when cu_mts_flag is 0), MTS index information May not exist. In this case, the decoding apparatus infers the value of the MTS index to -1 as shown in Tables 21 to 23 above, and the corresponding conversion kernel type 0 is the conversion kernel type of the current block (ie, vertical conversion kernel and horizontal conversion). Kernel). At this time, the transform kernel type 0 may indicate DCT2.
물론, 본 발명은 인트라 예측 모드의 방향성을 고려하지 않고 모든 인트라 예측 모드들에 대해 MTS 후보들을 구성할 수 있다. 일 실시예로, 모든 인트라 예측 모드들에 대해 3개의 MTS 후보들을 구성하고, 3개의 MTS 후보들 각각에 대응하여 MTS 인덱스 값(예: mts_idx)을 할당할 수 있다. Of course, the present invention can configure MTS candidates for all intra prediction modes without considering the directionality of the intra prediction mode. In one embodiment, three MTS candidates may be configured for all intra prediction modes, and an MTS index value (eg, mts_idx) may be allocated to each of the three MTS candidates.
예를 들어, MTS 인덱스의 제1 인덱스 값(예: 인덱스 값 0)에는, 수직 변환 커널 및 수평 변환 커널에 대응하는 변환 커널 타입을 모두 DST7로 선택하여 조합한 MTS 후보(즉, 변환 커널 세트)를 매핑시킬 수 있다. MTS 인덱스의 제2 인덱스 값(예: 인덱스 값 1)에는, 수직 변환 커널에 대응하는 변환 커널 타입을 DST7로 선택하고 수평 변환 커널에 대응하는 변환 커널 타입을 DCT8로 선택하여 조합한 MTS 후보(즉, 변환 커널 세트)를 매핑시킬 수 있다. MTS 인덱스의 제3 인덱스 값(예: 인덱스 값 2)에는, 수직 변환 커널에 대응하는 변환 커널 타입을 DCT8로 선택하고 수평 변환 커널에 대응하는 변환 커널 타입을 DST7로 선택하여 조합한 MTS 후보(즉, 변환 커널 세트)를 매핑시킬 수 있다. 이와 같이 조합된 MTS 후보들은 다음 표 24와 같이 MTS 인덱스 값에 따라 수직 변환 커널 및 수평 변환 커널에 대응하는 변환 커널 타입으로 나타낼 수 있다. For example, in the first index value of the MTS index (for example, index value 0), MTS candidates (ie, a set of transform kernels) that are selected by combining both the transform kernel types corresponding to the vertical transform kernel and the horizontal transform kernel with DST7 (that is, the transform kernel set) Can be mapped. For the second index value (eg, index value 1) of the MTS index, an MTS candidate (that is, a transform kernel type corresponding to the vertical transform kernel is selected as DST7 and a transform kernel type corresponding to the horizontal transform kernel is selected as DCT8 and combined). , Transform kernel set). For the third index value (eg, index value 2) of the MTS index, an MTS candidate (that is, a transform kernel type corresponding to the vertical transform kernel is selected as DCT8 and a transform kernel type corresponding to the horizontal transform kernel is selected as DST7 and combined) , Transform kernel set). The combined MTS candidates may be represented by a transform kernel type corresponding to a vertical transform kernel and a horizontal transform kernel according to the MTS index values as shown in Table 24 below.
Figure PCTKR2019011486-appb-T000024
Figure PCTKR2019011486-appb-T000024
상기 표 24를 참조하면, MTS 인덱스의 인덱스 값에 따라 수직 변환 커널에 대응하는 변환 커널 타입 및 수평 변환 커널에 대응하는 변환 커널 타입이 매핑되어 있다. 여기서, 변환 커널 타입 값이 1인 경우에 DST7을 나타내고, 변환 커널 타입 값이 2인 경우에 DCT8을 나타낸 것이다. 경우에 따라, MTS 인덱스 신택스 요소가 시그널링되지 않는 경우가 있다. 즉, MTS 기반의 변환이 가용하지 않는 것으로 결정된 경우(예: sps_mts_intra_enabled_flag 또는 sps_mts_inter_enabled_flag가 0인 경우)나 MTS 기반의 변환을 적용하지 않는 겻으로 결정된 경우(예: cu_mts_flag가 0인 경우)에 MTS 인덱스 정보가 존재하지 않을 수 있다. 이 경우, 디코딩 장치에서는 상기 표 24에서 나타난 바와 같이 MTS 인덱스의 값을 -1로 유추하고, 이에 대응하는 변환 커널 타입 0을 현재 블록의 변환 커널 타입(즉, 수직 변환 커널 및 수평 변환 커널)으로 사용할 수 있다. 이때, 변환 커널 타입 0은 DCT2를 나타낼 수 있다. Referring to Table 24, the transform kernel type corresponding to the vertical transform kernel and the transform kernel type corresponding to the horizontal transform kernel are mapped according to the index value of the MTS index. Here, DST7 is indicated when the converted kernel type value is 1, and DCT8 is indicated when the converted kernel type value is 2. In some cases, the MTS index syntax element is not signaled. That is, when it is determined that the MTS-based transform is not available (for example, when sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag is 0) or when it is determined that the MTS-based transform is not applied (for example, when cu_mts_flag is 0), MTS index information May not exist. In this case, the decoding apparatus infers the value of the MTS index to -1 as shown in Table 24 above, and the corresponding transform kernel type 0 is converted to the transform kernel type of the current block (ie, the vertical transform kernel and the horizontal transform kernel). Can be used. At this time, the transform kernel type 0 may indicate DCT2.
또한, 본 발명은 모든 예측 모드(즉, 인트라 예측 모드 및 인터 예측 모드)에 대해서 적용되는 MTS 후보(들)을 구성할 수 있다. 일 실시예로, 인트라 예측 모드 및 인터 예측 모드에 대해서 1개의 MTS 후보를 구성하고, MTS 인덱스 값(예: mts_idx)을 할당할 수 있다. 이 경우, 1개의 MTS 후보를 사용하는 것이기 때문에, 비트 수의 감소를 위해서 MTS 인덱스 대신에 플래그 정보를 사용할 수 있다. In addition, the present invention can configure MTS candidate (s) applied to all prediction modes (ie, intra prediction mode and inter prediction mode). In one embodiment, one MTS candidate may be configured for the intra prediction mode and the inter prediction mode, and an MTS index value (eg, mts_idx) may be allocated. In this case, since one MTS candidate is used, flag information can be used instead of the MTS index to reduce the number of bits.
예를 들어, 플래그 정보(예: cu_mts_flag)가 1인 경우, 1개의 MTS 후보가 지시하는 변환 커널 타입을 매핑시킬 수 있다. 즉, 플래그 정보(예: cu_mts_flag)가 1인 경우, 수직 변환 커널에 대응하는 변환 커널 타입 및 수평 변환 커널에 대응하는 변환 커널 타입을 모두 DST7로 매핑시킬 수 있다. For example, when the flag information (eg, cu_mts_flag) is 1, a transform kernel type indicated by one MTS candidate may be mapped. That is, when the flag information (eg, cu_mts_flag) is 1, both the transform kernel type corresponding to the vertical transform kernel and the transform kernel type corresponding to the horizontal transform kernel can be mapped to DST7.
다음 표 25는 플래그 정보(예: cu_mts_flag)를 기초로 수직 변환 커널 및 수평 변환 커널에 대응하는 변환 커널 타입을 매핑시킨 예시를 나타낸 것이다. Table 25 below shows an example of mapping the transform kernel type corresponding to the vertical transform kernel and the horizontal transform kernel based on the flag information (eg, cu_mts_flag).
Figure PCTKR2019011486-appb-T000025
Figure PCTKR2019011486-appb-T000025
상기 표 25를 참조하면, 플래그 정보(예: cu_mts_flag)가 1인 경우, 예측 모드(즉, 인트라 예측 모드인지 인터 예측 모드인지)에 상관없이 수직 변환 커널 및 수평 변환 커널에 대응하는 변환 커널 타입으로 모두 1 값을 도출할 수 있다. 또는 플래그 정보(예: cu_mts_flag)가 0인 경우, 수직 변환 커널 및 수평 변환 커널에 대응하는 변환 커널 타입으로 모두 0 값을 도출할 수 있다. 여기서, 변환 커널 타입이 1인 경우 DST7을 이용하는 것을 의미할 수 있고, 변환 커널 타입이 0인 경우 DCT2를 이용하는 것을 의미할 수 있다. 상술한 바와 같이 경우에 따라, 플래그 정보(예: cu_mts_flag)가 시그널링되지 않을 수 있다. 예컨대, MTS 기반의 변환이 가용하지 않는 것으로 결정된 경우(예: sps_mts_intra_enabled_flag 또는 sps_mts_inter_enabled_flag가 0인 경우)에 플래그 정보(예: cu_mts_flag)가 시그널링되지 않을 수 있다. 이 경우, 디코딩 장치에서는 상기 표 25에 나타난 바와 같이 플래그 정보(예: cu_mts_flag)를 0으로 유추하고, 이에 대응하는 변환 커널 타입 0을 현재 블록의 변환 커널 타입(즉, 수직 변환 커널 및 수평 변환 커널)으로 사용할 수 있다.Referring to Table 25, when the flag information (eg, cu_mts_flag) is 1, regardless of the prediction mode (that is, intra prediction mode or inter prediction mode), the transform kernel type corresponding to the vertical transform kernel and the horizontal transform kernel is used. All 1 values can be derived. Alternatively, when the flag information (eg, cu_mts_flag) is 0, a value of 0 may be derived as both a transform kernel type corresponding to a vertical transform kernel and a horizontal transform kernel. Here, when the conversion kernel type is 1, it may mean that DST7 is used, and when the conversion kernel type is 0, it may mean that DCT2 is used. As described above, in some cases, flag information (eg, cu_mts_flag) may not be signaled. For example, flag information (eg, cu_mts_flag) may not be signaled when it is determined that MTS-based conversion is not available (eg, when sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag is 0). In this case, the decoding device infers the flag information (eg, cu_mts_flag) to 0 as shown in Table 25 above, and the corresponding conversion kernel type 0 corresponds to the conversion kernel type of the current block (ie, vertical conversion kernel and horizontal conversion kernel). ).
상술한 실시예들에서는 변환 커널 타입으로 DST7 및 DCT8을 사용하는 것으로 설명하였으나, 이는 하나의 예시일 뿐이다. 본 발명에서는 다양한 변환 커널 타입(예: DCT2, DCT4, DCT5, DCT7, DCT8, DST1, DST4, DST7 등)을 사용하여 다중 변환 선택을 위한 변환 커널 세트를 구성하여 다중 변환을 수행할 수 있다. In the above-described embodiments, DST7 and DCT8 are used as the conversion kernel type, but this is only an example. In the present invention, multiple transforms can be performed by configuring a transform kernel set for multiple transform selection using various transform kernel types (eg, DCT2, DCT4, DCT5, DCT7, DCT8, DST1, DST4, DST7, etc.).
한편, 상기 DCT2, DCT4, DCT5, DCT7, DCT8, DST1, DST4, DST7 등과 같은 DCT/DST 변환 커널 타입들은 기저 함수들을 기반으로 정의될 수 있으며, 기저 함수들은 다음 표 26과 같이 나타내어질 수 있다. 본 명세서에서 기재된 변환 커널 타입은 변환 타입으로 지칭될 수도 있다. Meanwhile, DCT / DST conversion kernel types such as DCT2, DCT4, DCT5, DCT7, DCT8, DST1, DST4, and DST7 may be defined based on basis functions, and basis functions may be represented as in Table 26 below. The conversion kernel type described herein may be referred to as a conversion type.
Figure PCTKR2019011486-appb-T000026
Figure PCTKR2019011486-appb-T000026
도 19는 본 발명의 실시예에 따른 인코딩 장치에 의한 비디오/영상 인코딩 방법을 개략적으로 나타내는 흐름도이다. 19 is a flowchart schematically illustrating a video / video encoding method by an encoding device according to an embodiment of the present invention.
도 19에서 개시된 방법은 도 2에서 개시된 인코딩 장치(200)에 의하여 수행될 수 있다. 구체적으로, 도 19의 단계 S1900 ~ S1910은 도 2에 개시된 예측부(220) 및 인트라 예측부(222)에 의하여 수행될 수 있고, 도 19의 단계 S1920은 도 2에 개시된 감산부(231)에 의하여 수행될 수 있고, 도 19의 단계 S1930 ~ S1950은 도 2에 개시된 변환부(232)에 의하여 수행될 수 있고, 도 19의 단계 S1960은 도 2에 개시된 양자화부(233)에 의하여 수행될 수 있고, 도 19의 단계 S1970 ~ S1980은 도 2에 개시된 엔트로피 인코딩부(240)에 의하여 수행될 수 있다. 또한, 도 19에서 개시된 방법은 본 명세서에서 상술한 실시예들을 포함할 수 있다. 따라서, 도 19에서는 상술한 실시예들과 중복되는 내용에 관해서 구체적인 설명을 생략하거나 간단히 하기로 한다. The method disclosed in FIG. 19 may be performed by the encoding apparatus 200 disclosed in FIG. 2. Specifically, steps S1900 to S1910 of FIG. 19 may be performed by the prediction unit 220 and the intra prediction unit 222 illustrated in FIG. 2, and step S1920 of FIG. 19 may be performed by the subtraction unit 231 illustrated in FIG. 2. 19, steps S1930 to S1950 of FIG. 19 may be performed by the conversion unit 232 illustrated in FIG. 2, and step S1960 of FIG. 19 may be performed by the quantization unit 233 illustrated in FIG. 2. 19, steps S1970 to S1980 of FIG. 19 may be performed by the entropy encoding unit 240 illustrated in FIG. 2. In addition, the method disclosed in FIG. 19 may include the above-described embodiments herein. Therefore, in FIG. 19, a detailed description of contents overlapping with the above-described embodiments will be omitted or simplified.
도 19를 참조하면, 인코딩 장치는 현재 블록에 대한 예측 모드를 도출할 수 있다(S1900). 즉, 인코딩 장치는 현재 블록에 대해 인트라 예측 모드를 적용할지 또는 인터 예측 모드를 적용할지 결정하고, 결정된 현재 블록의 예측 모드를 도출할 수 있다. Referring to FIG. 19, the encoding device may derive a prediction mode for a current block (S1900). That is, the encoding apparatus may determine whether to apply the intra prediction mode or the inter prediction mode to the current block, and derive the determined prediction mode of the current block.
인코딩 장치는 현재 블록의 예측 모드에 따라 예측을 수행할 수 있다. 이때, 현재 블록에 대한 예측 모드가 인트라 예측 모드인 경우, 인코딩 장치는 현재 블록에 대해 인트라 예측을 수행하여 예측 샘플들을 도출할 수 있다(S1910). 또는, 현재 블록에 대한 예측 모드가 인터 예측 모드인 경우, 인코딩 장치는 현재 블록에 대해 인터 예측을 수행하고, 예측 결과로 현재 블록의 예측된 샘플들을 도출할 수 있다. The encoding device may perform prediction according to the prediction mode of the current block. At this time, when the prediction mode for the current block is an intra prediction mode, the encoding apparatus may perform intra prediction on the current block to derive prediction samples (S1910). Alternatively, when the prediction mode for the current block is the inter prediction mode, the encoding device may perform inter prediction on the current block and derive predicted samples of the current block as a prediction result.
인코딩 장치는 현재 블록의 예측 샘플들을 기반으로 현재 블록에 대한 레지듀얼 샘플들을 도출할 수 있다(S1920). 즉, 인코딩 장치는 현재 블록에 대한 원본 샘플들 및 예측 샘플들을 간의 차이를 기반으로 레지듀얼 샘플들을 도출할 수 있다. The encoding apparatus may derive residual samples for the current block based on the prediction samples of the current block (S1920). That is, the encoding apparatus may derive residual samples based on a difference between original samples and prediction samples for the current block.
인코딩 장치는 현재 블록의 레지듀얼 샘플들에 적용되는 수평 변환 커널 및 수직 변환 커널을 도출하고(S1930), 도출된 수평 변환 커널 및 수직 변환 커널을 기반으로 변환 인덱스 정보를 생성할 수 있다(S1940).The encoding device may derive a horizontal transform kernel and a vertical transform kernel applied to residual samples of the current block (S1930), and generate transform index information based on the derived horizontal transform kernel and vertical transform kernel (S1940). .
일 실시예로, 인코딩 장치는 변환 효율을 고려하여 현재 블록의 레지듀얼 샘플들에 대해 수평 방향과 수직 방향에 대한 변환을 분리해서 적용하는 다중 변환 선택(MTS; 또는 AMT; 또는 EMT)을 수행할지 여부를 결정할 수 있다. 다중 변환 선택을 적용하기로 결정한 경우, 인코딩 장치는 수평 방향 및 수직 방향에 대해 각기 적용되는 변환 타입(변환 커널)을 결정할 수 있다. In one embodiment, the encoding apparatus performs multi-transform selection (MTS; or AMT; or EMT) that applies transforms for horizontal and vertical directions separately to residual samples of the current block in consideration of conversion efficiency You can decide whether or not. If it is decided to apply multiple transform selection, the encoding apparatus may determine a transform type (transformation kernel) applied to the horizontal direction and the vertical direction respectively.
보다 구체적으로, 인코딩 장치는 복수의 변환 조합들에 대해 변환을 수행하고, RD(Rate Distortion) 비용을 기반으로 복수의 변환 조합들 중에서 최적의 변환 조합을 선택할 수 있다. 그리고, 인코딩 장치는 선택된 최적의 변환 조합에 대응하는 변환 인덱스 정보를 생성할 수 있다. More specifically, the encoding apparatus may perform transformation on a plurality of transform combinations, and select an optimal transform combination from the plurality of transform combinations based on a rate of RD (Rate Distortion). Then, the encoding apparatus may generate transform index information corresponding to the selected optimal transform combination.
여기서, 복수의 변환 조합들이라 함은 수평 변환 커널 및 수직 변환 커널의 조합들을 포함하여 구성된 것으로, 예컨대 상기 표 18 내지 표 25에서 개시된 변환 조합 후보들을 포함할 수 있다. 다시 말해서, 복수의 변환 조합들은 수평 변환 커널 및 수직 변환 커널로 이루어진 변환 커널 세트들로 표현될 수 있으며, 각 변환 조합은 수평 변환 커널에 대응하는 변환 타입 및 수직 변환 커널에 대응하는 변환 타입을 조합하여 도출될 수 있다. 이때, 수평 변환 커널에 대응하는 변환 타입 및 수직 변환 커널에 대응하는 변환 타입은 복수의 변환 타입들 중 하나일 수 있다. 예를 들어, 변환 타입은 DCT2, DCT4, DCT5, DCT7, DCT8, DST1, DST4, DST7 등을 사용할 수 있으며, 이러한 변환 타입들 중 복수 개(예: DST7, DCT8)의 변환 타입을 조합하여 복수의 변환 조합들(수직 변환 커널 및 수평 변환 커널의 조합 후보들)을 도출할 수 있다. Here, the plurality of transform combinations are composed of combinations of a horizontal transform kernel and a vertical transform kernel, and may include transform combination candidates disclosed in Tables 18 to 25 above. In other words, a plurality of transform combinations can be represented by transform kernel sets consisting of a horizontal transform kernel and a vertical transform kernel, and each transform combination combines a transform type corresponding to a horizontal transform kernel and a transform type corresponding to a vertical transform kernel. Can be derived. In this case, the transform type corresponding to the horizontal transform kernel and the transform type corresponding to the vertical transform kernel may be one of a plurality of transform types. For example, DCT2, DCT4, DCT5, DCT7, DCT8, DST1, DST4, DST7, etc. may be used as the conversion type, and a plurality of conversion types (for example, DST7, DCT8) may be combined to form a plurality of conversion types. Transform combinations (combination candidates of the vertical transform kernel and the horizontal transform kernel) can be derived.
일 실시예로, 복수의 변환 조합들은 DST7 및 DCT8의 변환 타입을 사용하여 이들을 수평 변환 커널 및 수직 변환 커널로 조합함으로써 도출될 수 있다. 또한, 복수의 변환 조합들은 인덱스 값(즉, 변환 인덱스 정보)에 매핑될 수 있다. 예를 들어, 복수의 변환 조합들은 제1 내지 제5 인덱스 값을 가지는 변환 인덱스 정보에 매핑될 수 있다. 제1 인덱스 값(예: 인덱스 값 0)에 대응하는 변환 조합은, 수직 변환 커널 및 수평 변환 커널이 DCT 타입 2일 수 있다. 제2 인덱스 값(예: 인덱스 값 1)에 대응하는 변환 조합은, 수직 변환 커널 및 수평 변환 커널이 DST 타입 7일 수 있다. 제3 인덱스 값(예: 인덱스 값 2)에 대응하는 변환 조합은, 수직 변환 커널이 DST 타입 7이고 수평 변환 커널이 DCT 타입 8일 수 있다. 제4 인덱스 값(예: 인덱스 값 3)에 대응하는 변환 조합은, 수직 변환 커널이 DCT 타입 8이고 수평 변환 커널이 DST 타입 7일 수 있다. 제5 인덱스 값(예: 인덱스 값 4)에 대응하는 변환 조합은, 수직 변환 커널 및 수평 변환 커널이 DCT 타입 8일 수 있다. In one embodiment, a plurality of transform combinations can be derived by using DST7 and DCT8 transform types and combining them into a horizontal transform kernel and a vertical transform kernel. Also, a plurality of transform combinations may be mapped to index values (ie, transform index information). For example, a plurality of transform combinations may be mapped to transform index information having first to fifth index values. The transform combination corresponding to the first index value (eg, the index value 0) may be DCT type 2 in a vertical transform kernel and a horizontal transform kernel. The transform combination corresponding to the second index value (eg, the index value 1) may have a vertical transform kernel and a horizontal transform kernel of DST type 7. The transform combination corresponding to the third index value (eg, index value 2) may be a vertical transform kernel of DST type 7 and a horizontal transform kernel of DCT type 8. The transform combination corresponding to the fourth index value (eg, index value 3) may be a DCT type 8 vertical transformation kernel and a DST type 7 horizontal transformation kernel. The transform combination corresponding to the fifth index value (eg, the index value 4) may be DCT type 8 in the vertical transform kernel and the horizontal transform kernel.
실시예에 따라서 인트라 예측 모드의 방향성을 고려하여 복수의 변환 조합들을 구성하고 변환 인덱스 정보에 매핑시킬 수도 있다. 예를 들어, 현재 블록의 인트라 예측 모드가 비방향성 모드(예: DC 모드 또는 플래너 모드)인 경우, 위의 예시에서와 같이 제1 내지 제5 인덱스 값에 대응하는 변환 조합들을 구성하여 다중 변환 선택시에 적용할 수도 있다. 현재 블록의 인트라 예측 모드가 방향성 모드(예: 2번 내지 34번 모드를 포함하는 수평 방향성 모드 또는 35번 내지 66번 모드를 포함하는 수직 방향성 모드)인 경우, 위의 예시와 다른 변환 조합들을 구성하여 다중 변환 선택시에 적용할 수도 있다. 이와 같이 인트라 예측 모드의 방향성을 고려하여 복수의 변환 조합들을 구성하는 방식은 상기 표 18 내지 표 23을 통해서 상세히 설명한 바 있다. According to an embodiment, a plurality of transform combinations may be configured and mapped to transform index information in consideration of the directionality of the intra prediction mode. For example, when the intra prediction mode of the current block is a non-directional mode (eg, DC mode or planner mode), multiple transform selection is performed by configuring transform combinations corresponding to the first to fifth index values as in the example above. It can also be applied to poetry. When the intra prediction mode of the current block is a directional mode (for example, a horizontal directional mode including 2 to 34 modes or a vertical directional mode including 35 to 66 modes), different transformation combinations from the above example are configured. Therefore, it can be applied when selecting multiple transforms. As described above, a method of configuring a plurality of transform combinations in consideration of the directionality of the intra prediction mode has been described in detail through Tables 18 to 23 above.
예를 들어, 현재 블록의 인트라 예측 모드가 비방향성 모드(예: DC 모드 또는 플래너 모드)라면, 인코딩 장치는 상기 제1 내지 제5 인덱스 값에 대응하는 변환 조합들을 기초로 수직 방향 및 수평 방향 변환을 수행하고, 이러한 변환 조합들 중 최적의 변환 조합을 선택할 수 있다. 그리고, 인코딩 장치는 선택된 변환 조합에 대응하는 인덱스 값을 도출하여 변환 인덱스 정보로 생성할 수 있다. For example, if the intra prediction mode of the current block is a non-directional mode (eg, DC mode or planner mode), the encoding device converts vertical and horizontal directions based on transform combinations corresponding to the first to fifth index values. And select an optimal transform combination among these transform combinations. In addition, the encoding device may generate index values by deriving index values corresponding to the selected combination of transforms.
인코딩 장치는 수평 변환 커널 및 수직 변환 커널을 기반으로 현재 블록의 레지듀얼 샘플들에 대해 변환을 수행하여, 현재 블록에 대한 변환 계수들을 도출할 수 있다(S1950).The encoding apparatus may perform transformation on residual samples of the current block based on the horizontal transform kernel and the vertical transform kernel, and derive transform coefficients for the current block (S1950).
일 실시예로, 인코딩 장치는 복수의 변환 조합들 중 최적의 변환 조합으로 선택된 변환 커널(수평 변환 커널 및 수직 변환 커널)을 이용하여 현재 블록의 레지듀얼 샘플들에 대해 수평 방향 및 수직 방향 변환을 수행할 수 있다. 여기서, 최적의 변환 조합으로 선택된 변환 커널은 상기 변환 인덱스 정보에 의해 지시되는 수평 변환 커널 및 수직 변환 커널을 말하는 것이다. In one embodiment, the encoding apparatus performs horizontal and vertical transforms on residual samples of the current block using a transform kernel (horizontal transform kernel and vertical transform kernel) selected as an optimal transform combination among a plurality of transform combinations. Can be done. Here, the transform kernel selected as the optimal transform combination refers to a horizontal transform kernel and a vertical transform kernel indicated by the transform index information.
인코딩 장치는 현재 블록의 변환 계수들을 기반으로 양자화를 수행하여 양자화된 변환 계수들을 도출할 수 있다(S1960). 그리고, 인코딩 장치는 현재 블록에 대한 양자화된 변환 계수들을 기반으로 레지듀얼 정보를 생성할 수 있다(S1970).The encoding apparatus may derive quantized transform coefficients by performing quantization based on the transform coefficients of the current block (S1960). Then, the encoding apparatus may generate residual information based on quantized transform coefficients for the current block (S1970).
인코딩 장치는 현재 블록에 대한 예측 모드 정보, 레지듀얼 정보, 및 변환 인덱스 정보를 포함하는 영상 정보를 인코딩할 수 있다(S1970).The encoding device may encode image information including prediction mode information, residual information, and transform index information for the current block (S1970).
여기서, 예측 모드 정보는 현재 블록의 예측 시에 적용되는 예측 모드에 관한 정보로서, 인트라 예측 모드 또는 인터 예측 모드에 관한 정보일 수 있다. Here, the prediction mode information is information about a prediction mode applied when the current block is predicted, and may be information about an intra prediction mode or an inter prediction mode.
또한, 레지듀얼 정보는 양자화된 변환 계수들의 값 정보, 위치 정보, 변환 기법, 변환 커널, 양자화 파라미터 등의 정보를 포함할 수 있다.Also, the residual information may include value information of quantized transform coefficients, location information, a transform technique, transform kernel, quantization parameter, and the like.
또한, 변환 인덱스 정보는 복수의 변환 조합들 중 현재 블록에 적용되는 수평 변환 커널 및 수직 변환 커널을 포함하는 변환 조합을 나타내는 인덱스 값일 수 있다. In addition, the transform index information may be an index value indicating a transform combination including a horizontal transform kernel and a vertical transform kernel applied to the current block among a plurality of transform combinations.
영상 정보를 인코딩함에 있어서, 인코딩 장치는 현재 블록에 대해 다중 변환 선택의 가용 여부를 결정하고, 결정된 정보를 다중 변환 선택 가용 플래그 정보로 생성할 수 있다. 이때, 다중 변환 선택 가용 플래그 정보는 현재 블록의 예측 모드에 따라 인트라 가용 플래그 정보 및 인터 가용 플래그 정보로서 정의될 수 있다. 인트라 가용 플래그 정보는 상기 표 12 및 표 13에서 개시된 sps_mts_intra_enabled_flag 신택스 요소일 수 있고, 인트라 코딩 블록에 대해 다중 변환 선택 기반 변환이 가용한지 여부를 나타낸다. 인터 가용 플래그 정보는 상기 표 12 및 표 13에서 개시된 sps_mts_inter_enabled_flag 신택스 요소일 수 있고, 인터 코딩 블록에 대해 다중 변환 선택 기반 변환이 가용한지 여부를 나타낸다.In encoding the video information, the encoding device may determine whether multiple transform selection is available for the current block, and generate the determined information as the multiple transform selection available flag information. At this time, the multiple transform selection available flag information may be defined as intra available flag information and inter available flag information according to the prediction mode of the current block. The intra-available flag information may be a sps_mts_intra_enabled_flag syntax element disclosed in Tables 12 and 13 above, and indicates whether a multiple transform selection-based transform is available for an intra coding block. The inter-available flag information may be a sps_mts_inter_enabled_flag syntax element disclosed in Tables 12 and 13 above, and indicates whether a multiple transform selection-based transform is available for an inter coding block.
즉, 인코딩 장치는 현재 블록이 인트라 예측 모드로 코딩된 블록이고 다중 변환 선택이 가용한 것으로 판단한 경우, 인트라 가용 플래그 정보(예: sps_mts_intra_enabled_flag)를 1 값으로 설정하고 이를 영상 정보에 포함시켜 인코딩할 수 있다. 또는 인코딩 장치는 현재 블록이 인터 예측 모드로 코딩된 블록이고 다중 변환 선택이 가용한 것으로 판단한 경우, 인터 가용 플래그 정보(예: sps_mts_inter_enabled_flag)를 1 값으로 설정하고 이를 영상 정보에 포함시켜 인코딩할 수 있다. 또한, 인코딩 장치는 인트라 코딩 블록에 대해 다중 변환 선택이 가용하지 않는 것으로 판단한 경우, 인트라 가용 플래그 정보(예: sps_mts_intra_enabled_flag)를 0 값으로 설정하고 이를 영상 정보에 포함시켜 인코딩할 수 있다. 또는 인코딩 장치는 인터 코딩 블록에 대해 다중 변환 선택이 가용하지 않는 것으로 판단한 경우, 인터 가용 플래그 정보(예: sps_mts_inter_enabled_flag)를 0 값으로 설정하고 이를 영상 정보에 포함시켜 인코딩할 수 있다. 이때, 인트라 가용 플래그 정보(예: sps_mts_intra_enabled_flag) 및 인터 가용 플래그 정보(예: sps_mts_inter_enabled_flag)는 시퀀스 파라미터 세트(sequence parameter set; SPS) 레벨에서 시그널링될 수 있다. That is, if it is determined that the current block is a block coded in intra prediction mode and multiple transform selection is available, encoding may be performed by setting intra available flag information (eg, sps_mts_intra_enabled_flag) to a value of 1 and including it in video information. have. Alternatively, if it is determined that the current block is a block coded in the inter prediction mode and multiple transform selection is available, encoding may be performed by setting inter available flag information (eg, sps_mts_inter_enabled_flag) to a value of 1 and including it in video information. . In addition, when it is determined that multiple transform selection is not available for the intra coding block, the encoding apparatus may encode by setting intra available flag information (eg, sps_mts_intra_enabled_flag) to a value of 0 and including it in video information. Alternatively, if it is determined that multiple transform selection is not available for the inter-coding block, the encoding device may encode by setting inter-available flag information (eg, sps_mts_inter_enabled_flag) to a value of 0 and including it in video information. At this time, intra-available flag information (eg, sps_mts_intra_enabled_flag) and inter-available flag information (eg, sps_mts_inter_enabled_flag) may be signaled at a sequence parameter set (SPS) level.
현재 블록에 대해서 다중 변환 선택이 가용한 것으로 결정한 경우(즉, 인트라 가용 플래그 정보 또는 인터 가용 플래그 정보가 1 값인 경우), 인코딩 장치는 현재 블록에 적용된 변환 커널(수평 변환 커널 및 수직 변환 커널)을 나타내는 변환 인덱스 정보를 인코딩하고 시그널링할 수 있다. 이때, 변환 인덱스 정보는 레지듀얼 코딩 신택스 또는 변환 유닛 신택스를 통해 시그널링될 수 있다. 다시 말해서, 인트라 가용 플래그 정보 또는 인터 가용 플래그 정보가 1을 나타내는 경우, 변환 인덱스 정보에 대한 신택스 요소는 인코딩된 영상 정보를 포함하는 비트스트림에 존재할 수 있다. If it is determined that multiple transform selection is available for the current block (i.e., the intra available flag information or the inter available flag information is 1 value), the encoding device determines the transform kernel (horizontal transform kernel and vertical transform kernel) applied to the current block. It is possible to encode and signal the indicated transform index information. At this time, the transform index information may be signaled through residual coding syntax or transform unit syntax. In other words, when the intra-available flag information or the inter-available flag information indicates 1, a syntax element for transform index information may exist in a bitstream including encoded image information.
또한 영상 정보를 인코딩함에 있어서, 인코딩 장치는 현재 블록에 대해 다중 변환 선택 기반의 변환을 적용할지 여부를 결정하고, 결정된 정보를 다중 변환 선택 플래그 정보로 생성할 수 있다. 예를 들어, 다중 변환 선택 플래그 정보는 상기 표 14 및 표 15에서 개시된 cu_mts_flag 신택스 요소일 수 있다. 다중 변환 선택 플래그 정보(예: cu_mts_flag)가 1인 경우, 현재 블록에 대해 다중 변환 선택 기반의 변환이 적용됨을 나타낼 수 있다. In addition, in encoding video information, the encoding apparatus may determine whether to apply a transform based on multiple transform selection to the current block, and generate the determined information as multiple transform selection flag information. For example, the multiple conversion selection flag information may be the cu_mts_flag syntax element disclosed in Tables 14 and 15 above. When the multiple transform selection flag information (eg, cu_mts_flag) is 1, it may indicate that a multiple transform selection based transform is applied to the current block.
즉, 인코딩 장치는 현재 블록에 대해 다중 변환 선택 기반의 변환이 적용되는 것으로 판단한 경우, 다중 변환 선택 플래그 정보(예: cu_mts_flag)를 1 값으로 설정하고 이를 영상 정보에 포함시켜 인코딩할 수 있다. 또는, 인코딩 장치는 현재 블록에 대해 다중 변환 선택 기반의 변환이 적용되지 않는 것으로 판단한 경우, 다중 변환 선택 플래그 정보(예: cu_mts_flag)를 0 값으로 설정하고 이를 영상 정보에 포함시켜 인코딩할 수 있다.That is, when it is determined that the multiple transform selection-based transform is applied to the current block, the encoding apparatus may encode by setting the multiple transform selection flag information (eg, cu_mts_flag) to a value of 1 and including it in video information. Alternatively, if it is determined that a multi-conversion selection-based transform is not applied to the current block, the encoding apparatus may encode the multi-conversion selection flag information (eg, cu_mts_flag) as a value of 0 and include it in the video information.
이때, 다중 변환 선택 플래그 정보(예: cu_mts_flag)가 1을 나타내는 경우, 인코딩 장치는 현재 블록에 적용된 변환 커널(수평 변환 커널 및 수직 변환 커널)을 나타내는 변환 인덱스 정보를 생성하여 시그널링할 수 있다. 다중 변환 선택 플래그 정보(예: cu_mts_flag)가 0을 나타내는 경우, 인코딩 장치는 변환 인덱스 정보에 대한 신택스 요소를 생성하지 않음으로써 이를 디코딩 장치로 시그널링하지 않을 수 있다. At this time, when the multiple transform selection flag information (eg, cu_mts_flag) represents 1, the encoding device may generate and signal transformation index information representing transform kernels (horizontal transform kernels and vertical transform kernels) applied to the current block. When the multi-conversion selection flag information (eg, cu_mts_flag) indicates 0, the encoding device may not signal the decoding device by not generating a syntax element for the conversion index information.
실시예에 따라, 다중 변환 선택 플래그를 인코딩함에 있어서, 인트라 가용 플래그 정보가 1을 나타내거나 또는 인터 가용 플래그 정보가 1을 나타내는 경우, 인코딩 장치는 다중 변환 선택 플래그를 영상 정보에 포함시켜 인코딩할 수 있다. According to an embodiment, in encoding the multi-conversion selection flag, when the intra-available flag information represents 1 or the inter-available flag information represents 1, the encoding apparatus may encode the multi-conversion selection flag by including it in the video information. have.
상기 인트라 가용 플래그 정보, 인터 가용 플래그 정보, 다중 변환 선택 플래그 정보, 변환 인덱스 정보에 대한 신택스 요소를 인코딩하여 시그널링하는 방법은 상기 표 12 내지 표 17에서 개시된 내용을 포함할 수 있다. The method of encoding and signaling a syntax element for the intra available flag information, inter available flag information, multiple conversion selection flag information, and conversion index information may include contents disclosed in Tables 12 to 17.
상술한 바와 같이 인코딩된 영상 정보는 비트스트림 형태로 출력될 수 있다. 상기 비트스트림은 네트워크 또는 저장매체를 통하여 디코딩 장치로 전송될 수 있다.As described above, the encoded image information may be output in the form of a bitstream. The bitstream may be transmitted to a decoding device through a network or storage medium.
도 20은 본 발명의 실시예에 따른 디코딩 장치에 의한 비디오/영상 디코딩 방법을 개략적으로 나타내는 흐름도이다. 20 is a flowchart schematically illustrating a video / video decoding method by a decoding apparatus according to an embodiment of the present invention.
도 20에서 개시된 방법은 도 3에서 개시된 디코딩 장치(300)에 의하여 수행될 수 있다. 구체적으로, 도 20의 단계 S2000은 도 3에 개시된 엔트로피 디코딩부(310)에 의하여 수행될 수 있고, 도 20의 단계 S2010 ~ S2020은 도 3에 개시된 예측부(330) 및 인트라 예측부(331)에 의하여 수행될 수 있고, 도 20의 단계 S2030은 도 3에 개시된 엔트로피 디코딩부(310)에 의하여 수행될 수 있고, 도 20의 단계 S2040은 도 3에 개시된 역양자화부(321)에 의하여 수행될 수 있고, 도 20의 단계 S2050 ~ S2060은 도 3에 개시된 역변환부(322)에 의하여 수행될 수 있고, 도 20의 단계 S2070은 도 3에 개시된 가산부(340)에 의하여 수행될 수 있다. 또한, 도 20에 개시된 방법은 본 명세서에서 상술한 실시예들을 포함할 수 있다. 따라서, 도 20에서는 상술한 실시예들과 중복되는 내용에 관해서 구체적인 설명을 생략하거나 간단히 하기로 한다.The method disclosed in FIG. 20 may be performed by the decoding apparatus 300 disclosed in FIG. 3. Specifically, step S2000 of FIG. 20 may be performed by the entropy decoding unit 310 illustrated in FIG. 3, and steps S2010 to S2020 of FIG. 20 may include a prediction unit 330 and an intra prediction unit 331 illustrated in FIG. 3. 20, step S2030 in FIG. 20 may be performed by the entropy decoding unit 310 illustrated in FIG. 3, and step S2040 in FIG. 20 may be performed by the inverse quantization unit 321 illustrated in FIG. 3. 20, steps S2050 to S2060 in FIG. 20 may be performed by the inverse transform unit 322 illustrated in FIG. 3, and step S2070 in FIG. 20 may be performed by the adder 340 illustrated in FIG. 3. In addition, the method disclosed in FIG. 20 may include the embodiments described herein. Therefore, in FIG. 20, a detailed description of content overlapping with the above-described embodiments will be omitted or simplified.
도 20을 참조하면, 디코딩 장치는 비트스트림으로부터 예측 모드 정보, 레지듀얼 정보, 및 변환 인덱스 정보를 획득할 수 있다(S2000).Referring to FIG. 20, the decoding apparatus may obtain prediction mode information, residual information, and transform index information from a bitstream (S2000).
디코딩 장치는 비트스트림으로부터 획득된 예측 모드 정보를 기반으로 현재 블록에 대한 예측 모드를 도출할 수 있다(S2010).The decoding apparatus may derive the prediction mode for the current block based on the prediction mode information obtained from the bitstream (S2010).
여기서, 예측 모드 정보는 현재 블록의 예측 시에 적용되는 예측 모드에 관한 정보로서, 인트라 예측 모드 또는 인터 예측 모드에 관한 정보일 수 있다. Here, the prediction mode information is information about a prediction mode applied when the current block is predicted, and may be information about an intra prediction mode or an inter prediction mode.
디코딩 장치는 예측 모드 정보에 따라 현재 블록에 대해 예측을 수행할 수 있다. 이때, 현재 블록에 대한 예측 모드가 인트라 예측 모드인 경우, 디코딩 장치는 현재 블록에 대해 인트라 예측을 수행하여 예측 샘플들을 도출할 수 있다(S2020). 또는, 현재 블록에 대한 예측 모드가 인터 예측 모드인 경우, 디코딩 장치는 현재 블록에 대해 인터 예측을 수행하고, 예측 결과로 현재 블록의 예측된 샘플들을 도출할 수 있다. The decoding apparatus may perform prediction on the current block according to the prediction mode information. At this time, when the prediction mode for the current block is an intra prediction mode, the decoding apparatus may perform intra prediction on the current block to derive prediction samples (S2020). Alternatively, when the prediction mode for the current block is an inter prediction mode, the decoding apparatus may perform inter prediction on the current block and derive predicted samples of the current block as a prediction result.
디코딩 장치는 비트스트림으로부터 획득된 레지듀얼 정보를 기반으로 현재 블록에 대한 양자화된 변환 계수들을 도출할 수 있다(S2030).The decoding apparatus may derive quantized transform coefficients for the current block based on residual information obtained from the bitstream (S2030).
여기서, 레지듀얼 정보는 양자화된 변환 계수들의 값 정보, 위치 정보, 변환 기법, 변환 커널, 양자화 파라미터 등을 포함할 수 있다. Here, the residual information may include value information of quantized transform coefficients, location information, a transform technique, a transform kernel, and quantization parameters.
디코딩 장치는 현재 블록의 양자화된 변환 계수들을 기반으로 역양자화를 수행하여 변환 계수들을 도출할 수 있다(S2040).The decoding apparatus may derive transform coefficients by performing inverse quantization based on the quantized transform coefficients of the current block (S2040).
디코딩 장치는 비트스트림으로부터 획득된 변환 인덱스 정보를 기반으로 수평 변환 커널 및 수직 변환 커널을 도출할 수 있다(S2050). The decoding apparatus may derive a horizontal transform kernel and a vertical transform kernel based on the transform index information obtained from the bitstream (S2050).
일 실시예로, 디코딩 장치는 복수의 변환 조합들로부터 변환 인덱스 정보에 대응하는 변환 조합을 선택하고, 선택된 변환 조합에 포함된 수평 변환 커널 및 수직 변환 커널을 도출할 수 있다. In one embodiment, the decoding apparatus may select a transform combination corresponding to transform index information from a plurality of transform combinations, and derive a horizontal transform kernel and a vertical transform kernel included in the selected transform combination.
여기서, 복수의 변환 조합들이라 함은 수평 변환 커널 및 수직 변환 커널의 조합들을 포함하여 구성된 것으로, 예컨대 상기 표 18 내지 표 25에서 개시된 변환 조합 후보들을 포함할 수 있다. 다시 말해서, 복수의 변환 조합들은 수평 변환 커널 및 수직 변환 커널로 이루어진 변환 커널 세트들로 표현될 수 있으며, 각 변환 조합은 수평 변환 커널에 대응하는 변환 타입 및 수직 변환 커널에 대응하는 변환 타입을 조합하여 도출될 수 있다. 이때, 수평 변환 커널에 대응하는 변환 타입 및 수직 변환 커널에 대응하는 변환 타입은 복수의 변환 타입들 중 하나일 수 있다. 예를 들어, 변환 타입은 DCT2, DCT4, DCT5, DCT7, DCT8, DST1, DST4, DST7 등을 사용할 수 있으며, 이러한 변환 타입들 중 복수 개(예: DST7, DCT8)의 변환 타입을 조합하여 복수의 변환 조합들(수직 변환 커널 및 수평 변환 커널의 조합 후보들)을 도출할 수 있다. Here, the plurality of transform combinations are composed of combinations of a horizontal transform kernel and a vertical transform kernel, and may include transform combination candidates disclosed in Tables 18 to 25 above. In other words, a plurality of transform combinations can be represented by transform kernel sets consisting of a horizontal transform kernel and a vertical transform kernel, and each transform combination combines a transform type corresponding to a horizontal transform kernel and a transform type corresponding to a vertical transform kernel. Can be derived. In this case, the transform type corresponding to the horizontal transform kernel and the transform type corresponding to the vertical transform kernel may be one of a plurality of transform types. For example, DCT2, DCT4, DCT5, DCT7, DCT8, DST1, DST4, DST7, etc. may be used as the conversion type, and a plurality of conversion types (for example, DST7, DCT8) may be combined to form a plurality of conversion types. Transform combinations (combination candidates of the vertical transform kernel and the horizontal transform kernel) can be derived.
일 실시예로, 복수의 변환 조합들은 DST7 및 DCT8의 변환 타입을 사용하여 이들을 수평 변환 커널 및 수직 변환 커널로 조합함으로써 도출될 수 있다. 또한, 복수의 변환 조합들은 인덱스 값(즉, 변환 인덱스 정보)에 매핑될 수 있다. 예를 들어, 복수의 변환 조합들은 제1 내지 제5 인덱스 값을 가지는 변환 인덱스 정보에 매핑될 수 있다. 제1 인덱스 값(예: 인덱스 값 0)에 대응하는 변환 조합은, 수직 변환 커널 및 수평 변환 커널이 DCT 타입 2일 수 있다. 제2 인덱스 값(예: 인덱스 값 1)에 대응하는 변환 조합은, 수직 변환 커널 및 수평 변환 커널이 DST 타입 7일 수 있다. 제3 인덱스 값(예: 인덱스 값 2)에 대응하는 변환 조합은, 수직 변환 커널이 DST 타입 7이고 수평 변환 커널이 DCT 타입 8일 수 있다. 제4 인덱스 값(예: 인덱스 값 3)에 대응하는 변환 조합은, 수직 변환 커널이 DCT 타입 8이고 수평 변환 커널이 DST 타입 7일 수 있다. 제5 인덱스 값(예: 인덱스 값 4)에 대응하는 변환 조합은, 수직 변환 커널 및 수평 변환 커널이 DCT 타입 8일 수 있다. In one embodiment, a plurality of transform combinations can be derived by using DST7 and DCT8 transform types and combining them into a horizontal transform kernel and a vertical transform kernel. Also, a plurality of transform combinations may be mapped to index values (ie, transform index information). For example, a plurality of transform combinations may be mapped to transform index information having first to fifth index values. The transform combination corresponding to the first index value (eg, the index value 0) may be DCT type 2 in a vertical transform kernel and a horizontal transform kernel. The transform combination corresponding to the second index value (eg, the index value 1) may have a vertical transform kernel and a horizontal transform kernel of DST type 7. The transform combination corresponding to the third index value (eg, index value 2) may be a vertical transform kernel of DST type 7 and a horizontal transform kernel of DCT type 8. The transform combination corresponding to the fourth index value (eg, index value 3) may be a DCT type 8 vertical transformation kernel and a DST type 7 horizontal transformation kernel. The transform combination corresponding to the fifth index value (eg, the index value 4) may be DCT type 8 in the vertical transform kernel and the horizontal transform kernel.
실시예에 따라서 인트라 예측 모드의 방향성을 고려하여 복수의 변환 조합들을 구성하고 변환 인덱스 정보에 매핑시킬 수도 있다. 예를 들어, 현재 블록의 인트라 예측 모드가 비방향성 모드(예: DC 모드 또는 플래너 모드)인 경우, 위의 예시에서와 같이 제1 내지 제5 인덱스 값에 대응하는 변환 조합들을 구성하여 다중 변환 선택시에 적용할 수도 있다. 현재 블록의 인트라 예측 모드가 방향성 모드(예: 2번 내지 34번 모드를 포함하는 수평 방향성 모드 또는 35번 내지 66번 모드를 포함하는 수직 방향성 모드)인 경우, 위의 예시와 다른 변환 조합들을 구성하여 다중 변환 선택시에 적용할 수도 있다. 이와 같이 인트라 예측 모드의 방향성을 고려하여 복수의 변환 조합들을 구성하는 방식은 상기 표 18 내지 표 23을 통해서 상세히 설명한 바 있다. According to an embodiment, a plurality of transform combinations may be configured and mapped to transform index information in consideration of the directionality of the intra prediction mode. For example, when the intra prediction mode of the current block is a non-directional mode (eg, DC mode or planner mode), multiple transform selection is performed by configuring transform combinations corresponding to the first to fifth index values as in the example above. It can also be applied to poetry. When the intra prediction mode of the current block is a directional mode (for example, a horizontal directional mode including 2 to 34 modes or a vertical directional mode including 35 to 66 modes), different transformation combinations from the above example are configured. Therefore, it can be applied when selecting multiple transforms. As described above, a method of configuring a plurality of transform combinations in consideration of the directionality of the intra prediction mode has been described in detail through Tables 18 to 23 above.
예를 들어, 현재 블록의 인트라 예측 모드가 비방향성 모드(예: DC 모드 또는 플래너 모드)라면, 디코딩 장치는 상기 제1 내지 제5 인덱스 값에 대응하는 변환 조합들을 기초로 생성된 변환 인덱스 정보를 인코딩 장치로부터 획득하고, 상기 제1 내지 제5 인덱스 값에 대응하는 변환 조합들 중에서 상기 변환 인덱스 정보가 지시하는 인덱스 값에 해당하는 변환 조합을 도출할 수 있다. 일례로, 변환 인덱스 정보가 제2 인덱스 값을 나타내는 경우, 디코딩 장치는 제2 인덱스 값에 대응하는 변환 조합을 도출할 수 있다. 이때, 변환 조합은 DST 타입 7로 지시된 수직 변환 커널 및 수평 변환 커널을 포함할 수 있다.For example, if the intra prediction mode of the current block is a non-directional mode (eg, a DC mode or a planner mode), the decoding apparatus uses transform index information generated based on transform combinations corresponding to the first to fifth index values. A conversion combination corresponding to an index value indicated by the conversion index information may be derived from conversion combinations obtained from an encoding device and corresponding to the first to fifth index values. In one example, when the transform index information indicates a second index value, the decoding apparatus may derive a transform combination corresponding to the second index value. At this time, the transform combination may include a vertical transform kernel and a horizontal transform kernel indicated by DST type 7.
디코딩 장치는 수평 변환 커널 및 수직 변환 커널을 기반으로 현재 블록의 변환 계수들에 대해 역변환을 수행하여 현재 블록에 대한 레지듀얼 샘플들을 도출할 수 있다(S2060).The decoding apparatus may derive residual samples for the current block by performing inverse transform on transform coefficients of the current block based on the horizontal transform kernel and the vertical transform kernel (S2060).
디코딩 장치는 현재 블록의 레지듀얼 샘플들 및 예측 샘플들을 기반으로 복원 픽처를 생성할 수 있다(S2070). The decoding apparatus may generate a reconstructed picture based on residual samples and prediction samples of the current block (S2070).
일 실시예로, 디코딩 장치는 현재 블록의 레지듀얼 샘플들과 예측 샘플들을 결합하여 복원 샘플들을 획득할 수 있다. 이러한 복원 샘플들을 기반으로 현재 픽처를 복원할 수 있다. 이후, 디코딩 장치는 필요에 따라 주관적/객관적 화질을 향상시키기 위하여 디블록킹 필터링, SAO 및/또는 ALF 절차와 같은 인루프 필터링 절차를 상기 복원 픽처에 적용될 수 있음은 상술한 바와 같다.In one embodiment, the decoding apparatus may obtain reconstruction samples by combining residual samples of the current block and prediction samples. Based on these reconstruction samples, a current picture may be reconstructed. Thereafter, as described above, the decoding apparatus may apply an in-loop filtering procedure, such as deblocking filtering, SAO, and / or ALF procedure, to the reconstructed picture in order to improve subjective / objective image quality as needed.
실시예에 따라, 디코딩 장치는 비트스트림으로부터 현재 블록에 대해 다중 변환 선택의 가용 여부를 나타내는 정보(즉, 다중 변환 선택 가용 플래그 정보)를 획득할 수 있다. 이때, 다중 변환 선택 가용 플래그 정보는 현재 블록의 예측 모드에 따라 인트라 가용 플래그 정보 및 인터 가용 플래그 정보로서 정의될 수 있다. 인트라 가용 플래그 정보는 상기 표 12 및 표 13에서 개시된 sps_mts_intra_enabled_flag 신택스 요소일 수 있고, 인트라 코딩 블록에 대해 다중 변환 선택 기반 변환이 가용한지 여부를 나타낸다. 인터 가용 플래그 정보는 상기 표 12 및 표 13에서 개시된 sps_mts_inter_enabled_flag 신택스 요소일 수 있고, 인터 코딩 블록에 대해 다중 변환 선택 기반 변환이 가용한지 여부를 나타낸다.According to an embodiment, the decoding apparatus may obtain information (that is, multiple transform selection available flag information) indicating whether multiple transform selection is available for the current block from the bitstream. At this time, the multiple transform selection available flag information may be defined as intra available flag information and inter available flag information according to the prediction mode of the current block. The intra-available flag information may be a sps_mts_intra_enabled_flag syntax element disclosed in Tables 12 and 13 above, and indicates whether a multiple transform selection-based transform is available for an intra coding block. The inter-available flag information may be a sps_mts_inter_enabled_flag syntax element disclosed in Tables 12 and 13 above, and indicates whether a multiple transform selection-based transform is available for an inter coding block.
예를 들어, 인트라 가용 플래그 정보(예: sps_mts_intra_enabled_flag)가 1이고 현재 블록의 예측 모드가 인트라 예측 모드인 경우, 디코딩 장치는 현재 블록에 대해 다중 변환 선택이 가용한 것으로 판단할 수 있고, 비트스트림으로부터 변환 인덱스 정보를 더 획득할 수 있다. 또는 인터 가용 플래그 정보(예: sps_mts_inter_enabled_flag)가 1이고 현재 블록의 예측 모드가 인터 예측 모드인 경우, 디코딩 장치는 현재 블록에 대해 다중 변환 선택이 가용한 것으로 판단할 수 있고, 비트스트림으로부터 변환 인덱스 정보를 더 획득할 수 있다. 이와 같은 경우, 디코딩 장치는 비트스트림으로부터 획득된 변환 인덱스 정보가 지시하는 변환 커널(수직 및 수평 변환 커널)을 도출하여 역변환을 수행할 수 있다. For example, when the intra available flag information (eg, sps_mts_intra_enabled_flag) is 1 and the prediction mode of the current block is the intra prediction mode, the decoding apparatus may determine that multiple transform selection is available for the current block, and from the bitstream Conversion index information may be further obtained. Alternatively, when the inter available flag information (eg, sps_mts_inter_enabled_flag) is 1 and the prediction mode of the current block is the inter prediction mode, the decoding apparatus may determine that multiple transform selection is available for the current block, and transform index information from the bitstream You can acquire more. In this case, the decoding apparatus may perform an inverse transform by deriving a transform kernel (vertical and horizontal transform kernel) indicated by transform index information obtained from the bitstream.
만일, 인트라 가용 플래그 정보(예: sps_mts_intra_enabled_flag)가 0이거나, 또는 인터 가용 플래그 정보(예: sps_mts_inter_enabled_flag)가 0인 경우, 변환 인덱스 정보가 인코딩 장치로부터 명시적으로 시그널링 되지 않는다. 다시 말해, 변환 인덱스 정보를 나타내는 신택스 요소(예: mts_idx)가 비트스트림에 존재하지 않을 수 있다. 이 경우, 변환 인덱스 정보는 기설정된 인덱스 값으로 유추될 수 있다. 예를 들어, 상기 제1 내지 제5 인덱스 값에 대응하는 변환 조합들을 적용하는 경우, 변환 인덱스 정보는 제1 인덱스 값으로 유추될 수 있다. 디코딩 장치는 비트스트림으로부터 변환 인덱스 정보를 나타내는 신택스 요소(예: mts_idx)를 획득하지 못한 경우에 변환 인덱스 정보를 제1 인덱스 값으로 유추하고, 상기 제1 인덱스 값에 대응하는 변환 조합(수직 및 수평 변환 커널)을 역변환에 사용할 수 있다. 이때, 제1 인덱스 값에 대응하는 변환 조합은 DCT 타입 2로 지시된 수직 변환 커널 및 수평 변환 커널을 포함할 수 있다.If the intra available flag information (eg sps_mts_intra_enabled_flag) is 0 or the inter available flag information (eg sps_mts_inter_enabled_flag) is 0, the conversion index information is not explicitly signaled from the encoding device. In other words, a syntax element (eg, mts_idx) representing transform index information may not be present in the bitstream. In this case, the conversion index information can be inferred as a preset index value. For example, when transform combinations corresponding to the first to fifth index values are applied, the transform index information may be inferred as the first index value. The decoding apparatus infers transform index information into a first index value when a syntax element (eg, mts_idx) indicating transform index information is not obtained from a bitstream, and transform combinations (vertical and horizontal) corresponding to the first index value Transform kernel). At this time, the transform combination corresponding to the first index value may include a vertical transform kernel and a horizontal transform kernel indicated by DCT type 2.
상기 인트라 가용 플래그 정보(예: sps_mts_intra_enabled_flag) 및 인터 가용 플래그 정보(예: sps_mts_inter_enabled_flag)는 시퀀스 파라미터 세트(sequence parameter set; SPS) 레벨에서 시그널링될 수 있다. 인트라 가용 플래그 정보 또는 인터 가용 플래그 정보가 1 값인 경우에 획득되는 변환 인덱스 정보는 레지듀얼 코딩 신택스 레벨 또는 변환 유닛 신택스 레벨을 통해 시그널링될 수 있다. The intra available flag information (eg, sps_mts_intra_enabled_flag) and inter available flag information (eg, sps_mts_inter_enabled_flag) may be signaled at a sequence parameter set (SPS) level. The conversion index information obtained when the intra available flag information or the inter available flag information is 1 may be signaled through a residual coding syntax level or a conversion unit syntax level.
또한 실시예에 따라, 디코딩 장치는 비트스트림으로부터 현재 블록에 대해 다중 변환 선택의 적용 여부를 나타내는 정보(즉, 다중 변환 선택 플래그 정보)를 획득할 수 있다. 예를 들어, 다중 변환 선택 플래그 정보는 상기 표 14 및 표 15에서 개시된 cu_mts_flag 신택스 요소일 수 있다. 예를 들어, 다중 변환 선택 플래그 정보(예: cu_mts_flag)가 1인 경우, 현재 블록에 대해 다중 변환 선택 기반의 역변환이 적용됨을 나타낼 수 있다. Also, according to an embodiment, the decoding apparatus may obtain information (that is, multiple conversion selection flag information) indicating whether multiple conversion selection is applied to the current block from the bitstream. For example, the multiple conversion selection flag information may be the cu_mts_flag syntax element disclosed in Tables 14 and 15 above. For example, when the multiple transform selection flag information (eg, cu_mts_flag) is 1, it may indicate that an inverse transform based on multiple transform selection is applied to the current block.
따라서, 디코딩 장치는 다중 변환 선택 플래그 정보(예: cu_mts_flag)가 1인 경우에 현재 블록에 대해 다중 변환 선택 기반의 역변환이 적용되는 것으로 판단할 수 있고, 비트스트림으로부터 변환 인덱스 정보를 더 획득하여 디코딩할 수 있다. Accordingly, the decoding apparatus may determine that the inverse transform based on the multiple transform selection is applied to the current block when the multiple transform selection flag information (eg, cu_mts_flag) is 1, and further obtains and decodes transform index information from the bitstream can do.
만일, 다중 변환 선택 플래그 정보(예: cu_mts_flag)가 0을 나타내는 경우, 변환 인덱스 정보가 인코딩 장치로부터 명시적으로 시그널링 되지 않는다. 다시 말해, 변환 인덱스 정보를 나타내는 신택스 요소(예: mts_idx)가 비트스트림에 존재하지 않을 수 있다. 이 경우, 변환 인덱스 정보는 기설정된 인덱스 값으로 유추될 수 있다. 예를 들어, 상기 제1 내지 제5 인덱스 값에 대응하는 변환 조합들을 적용하는 경우, 변환 인덱스 정보는 제1 인덱스 값으로 유추될 수 있다. 디코딩 장치는 비트스트림으로부터 변환 인덱스 정보를 나타내는 신택스 요소(예: mts_idx)를 획득하지 못한 경우에 변환 인덱스 정보를 제1 인덱스 값으로 유추하고, 상기 제1 인덱스 값에 대응하는 변환 조합(수직 및 수평 변환 커널)을 역변환에 사용할 수 있다. 이때, 제1 인덱스 값에 대응하는 변환 조합은 DCT 타입 2로 지시된 수직 변환 커널 및 수평 변환 커널을 포함할 수 있다.If the multiple conversion selection flag information (eg, cu_mts_flag) indicates 0, the conversion index information is not explicitly signaled from the encoding device. In other words, a syntax element (eg, mts_idx) representing transform index information may not be present in the bitstream. In this case, the conversion index information can be inferred as a preset index value. For example, when transform combinations corresponding to the first to fifth index values are applied, the transform index information may be inferred as the first index value. The decoding apparatus infers transform index information into a first index value when a syntax element (eg, mts_idx) indicating transform index information is not obtained from a bitstream, and transform combinations (vertical and horizontal) corresponding to the first index value Transform kernel). At this time, the transform combination corresponding to the first index value may include a vertical transform kernel and a horizontal transform kernel indicated by DCT type 2.
다중 변환 선택 플래그 정보를 디코딩함에 있어서, 인트라 가용 플래그 정보가 1을 나타내거나 또는 인터 가용 플래그 정보가 1을 나타내는 경우, 디코딩 장치는 비트스트림으로부터 다중 변환 선택 플래그 정보를 획득하여 디코딩할 수 있다. 즉, 인트라 가용 플래그 정보가 1을 나타내거나 또는 인터 가용 플래그 정보가 1을 나타내는 경우에, 인코딩 장치가 다중 변환 선택 플래그 정보 또는 변환 인덱스 정보에 관한 신택스 요소를 인코딩하여 디코딩 장치로 시그널링하므로, 디코딩 장치는 인트라 가용 플래그 정보 또는 인터 가용 플래그 정보에 따라 추가적으로 다중 변환 선택 플래그 정보 및 변환 인덱스 정보를 획득할 수 있다. In decoding the multi-conversion selection flag information, if the intra-available flag information represents 1 or the inter-available flag information represents 1, the decoding apparatus may obtain and decode the multi-conversion selection flag information from the bitstream. That is, when the intra-available flag information indicates 1 or the inter-available flag information indicates 1, the encoding device encodes the syntax element related to the multiple conversion selection flag information or the conversion index information and signals it to the decoding device. In addition, multiple transform selection flag information and transform index information may be additionally obtained according to the intra available flag information or the inter available flag information.
상기 인트라 가용 플래그 정보, 인터 가용 플래그 정보, 다중 변환 선택 플래그 정보, 변환 인덱스 정보에 대한 신택스 요소가 시그널링되는 방법은 상기 표 12 내지 표 17에서 개시된 내용을 포함할 수 있다.How the syntax elements for the intra-available flag information, inter-available flag information, multiple conversion selection flag information, and conversion index information are signaled may include the contents disclosed in Tables 12 to 17.
한편, 본 명세서에서 전술된 다중 변환 선택 기반의 (역)변환을 수행하는 방법은, 아래 표 27과 같은 스펙(spec)에 따라 구현될 수 있다.Meanwhile, the method of performing the (inverse) transform based on the multiple transform selection described above in this specification may be implemented according to a specification as shown in Table 27 below.
Figure PCTKR2019011486-appb-T000027
Figure PCTKR2019011486-appb-T000027
Figure PCTKR2019011486-appb-I000012
Figure PCTKR2019011486-appb-I000012
상술한 실시예에서, 방법들은 일련의 단계 또는 블록으로써 순서도를 기초로 설명되고 있지만, 본 발명은 단계들의 순서에 한정되는 것은 아니며, 어떤 단계는 상술한 바와 다른 단계와 다른 순서로 또는 동시에 발생할 수 있다. 또한, 당업자라면 순서도에 나타내어진 단계들이 배타적이지 않고, 다른 단계가 포함되거나 순서도의 하나 또는 그 이상의 단계가 본 발명의 범위에 영향을 미치지 않고 삭제될 수 있음을 이해할 수 있을 것이다.In the above-described embodiment, the methods are described based on a flow chart as a series of steps or blocks, but the present invention is not limited to the order of steps, and some steps may occur in a different order or simultaneously with other steps as described above. have. In addition, those skilled in the art will understand that the steps shown in the flowchart are not exclusive, other steps may be included or one or more steps in the flowchart may be deleted without affecting the scope of the present invention.
상술한 본 발명에 따른 방법은 소프트웨어 형태로 구현될 수 있으며, 본 발명에 따른 인코딩 장치 및/또는 디코딩 장치는 예를 들어 TV, 컴퓨터, 스마트폰, 셋톱박스, 디스플레이 장치 등의 영상 처리를 수행하는 장치에 포함될 수 있다.The above-described method according to the present invention can be implemented in software form, and the encoding device and / or decoding device according to the present invention performs image processing such as TV, computer, smartphone, set-top box, display device, etc. Device.
본 발명에서 실시예들이 소프트웨어로 구현될 때, 상술한 방법은 상술한 기능을 수행하는 모듈(과정, 기능 등)로 구현될 수 있다. 모듈은 메모리에 저장되고, 프로세서에 의해 실행될 수 있다. 메모리는 프로세서 내부 또는 외부에 있을 수 있고, 잘 알려진 다양한 수단으로 프로세서와 연결될 수 있다. 프로세서는 ASIC(application-specific integrated circuit), 다른 칩셋, 논리 회로 및/또는 데이터 처리 장치를 포함할 수 있다. 메모리는 ROM(read-only memory), RAM(random access memory), 플래쉬 메모리, 메모리 카드, 저장 매체 및/또는 다른 저장 장치를 포함할 수 있다. 즉, 본 발명에서 설명한 실시예들은 프로세서, 마이크로 프로세서, 컨트롤러 또는 칩 상에서 구현되어 수행될 수 있다. 예를 들어, 각 도면에서 도시한 기능 유닛들은 컴퓨터, 프로세서, 마이크로 프로세서, 컨트롤러 또는 칩 상에서 구현되어 수행될 수 있다. 이 경우 구현을 위한 정보(ex. information on instructions) 또는 알고리즘이 디지털 저장 매체에 저장될 수 있다.When embodiments are implemented in software in the present invention, the above-described method may be implemented as a module (process, function, etc.) that performs the above-described functions. Modules are stored in memory and can be executed by a processor. The memory may be internal or external to the processor, and may be connected to the processor by various well-known means. The processor may include an application-specific integrated circuit (ASIC), other chipsets, logic circuits, and / or data processing devices. The memory may include read-only memory (ROM), random access memory (RAM), flash memory, memory cards, storage media and / or other storage devices. That is, the embodiments described in the present invention may be implemented and implemented on a processor, microprocessor, controller, or chip. For example, the functional units illustrated in each drawing may be implemented and implemented on a computer, processor, microprocessor, controller, or chip. In this case, information for implementation (ex. Information on instructions) or an algorithm may be stored in a digital storage medium.
또한, 본 발명이 적용되는 디코딩 장치 및 인코딩 장치는 멀티미디어 방송 송수신 장치, 모바일 통신 단말, 홈 시네마 비디오 장치, 디지털 시네마 비디오 장치, 감시용 카메라, 비디오 대화 장치, 비디오 통신과 같은 실시간 통신 장치, 모바일 스트리밍 장치, 저장 매체, 캠코더, 주문형 비디오(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 Recoder) 등을 포함할 수 있다.In addition, the decoding device and the encoding device to which the present invention is applied are a multimedia broadcast transmission / reception device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video communication device, a real-time communication device such as video communication, mobile streaming Devices, storage media, camcorders, video-on-demand (VoD) service providing devices, OTT video (Over the top video) devices, Internet streaming service providing devices, 3D (3D) video devices, VR (virtual reality) devices, AR (argumente) reality) devices, video telephony video devices, transportation terminal (ex. vehicles (including self-driving vehicles) terminals, airplane terminals, ship terminals, etc.) and medical video devices, and can be used to process video signals or data signals You can. For example, the OTT video (Over the top video) device may include a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smartphone, a tablet PC, and a digital video recorder (DVR).
또한, 본 발명이 적용되는 처리 방법은 컴퓨터로 실행되는 프로그램의 형태로 생산될 수 있으며, 컴퓨터가 판독할 수 있는 기록 매체에 저장될 수 있다. 본 발명에 따른 데이터 구조를 가지는 멀티미디어 데이터도 또한 컴퓨터가 판독할 수 있는 기록 매체에 저장될 수 있다. 상기 컴퓨터가 판독할 수 있는 기록 매체는 컴퓨터로 읽을 수 있는 데이터가 저장되는 모든 종류의 저장 장치 및 분산 저장 장치를 포함한다. 상기 컴퓨터가 판독할 수 있는 기록 매체는, 예를 들어, 블루레이 디스크(BD), 범용 직렬 버스(USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크 및 광학적 데이터 저장 장치를 포함할 수 있다. 또한, 상기 컴퓨터가 판독할 수 있는 기록 매체는 반송파(예를 들어, 인터넷을 통한 전송)의 형태로 구현된 미디어를 포함한다. 또한, 인코딩 방법으로 생성된 비트스트림이 컴퓨터가 판독할 수 있는 기록 매체에 저장되거나 유무선 통신 네트워크를 통해 전송될 수 있다.Further, the processing method to which the present invention is applied can be produced in the form of a computer-implemented program, and can be stored in a computer-readable recording medium. Multimedia data having a data structure according to the present invention can also be stored in a computer-readable recording medium. The computer-readable recording medium includes all kinds of storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable recording medium includes, for example, Blu-ray Disc (BD), Universal Serial Bus (USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, magnetic tape, floppy disk and optical. It may include a data storage device. In addition, the computer-readable recording medium includes media implemented in the form of a carrier wave (for example, transmission via the Internet). In addition, 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.
또한, 본 발명의 실시예는 프로그램 코드에 의한 컴퓨터 프로그램 제품으로 구현될 수 있고, 상기 프로그램 코드는 본 발명의 실시예에 의해 컴퓨터에서 수행될 수 있다. 상기 프로그램 코드는 컴퓨터에 의해 판독가능한 캐리어 상에 저장될 수 있다.Further, an embodiment of the present invention may be implemented as a computer program product by program code, and the program code may be executed on a computer by an embodiment of the present invention. The program code can be stored on a computer readable carrier.
도 21은 본 문서에서 개시된 발명이 적용될 수 있는 컨텐츠 스트리밍 시스템의 예를 나타낸다.21 shows an example of a content streaming system to which the invention disclosed in this document can be applied.
도 21을 참조하면, 본 발명이 적용되는 컨텐츠 스트리밍 시스템은 크게 인코딩 서버, 스트리밍 서버, 웹 서버, 미디어 저장소, 사용자 장치 및 멀티미디어 입력 장치를 포함할 수 있다.Referring to FIG. 21, a content streaming system to which the present invention is applied may largely include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
상기 인코딩 서버는 스마트폰, 카메라, 캠코더 등과 같은 멀티미디어 입력 장치들로부터 입력된 컨텐츠를 디지털 데이터로 압축하여 비트스트림을 생성하고 이를 상기 스트리밍 서버로 전송하는 역할을 한다. 다른 예로, 스마트폰, 카메라, 캠코더 등과 같은 멀티미디어 입력 장치들이 비트스트림을 직접 생성하는 경우, 상기 인코딩 서버는 생략될 수 있다.The encoding server serves to compress a content input from multimedia input devices such as a smartphone, a camera, and a camcorder into digital data to generate a bitstream and transmit it to the streaming server. As another example, when multimedia input devices such as a smartphone, a camera, and a camcorder directly generate a bitstream, the encoding server may be omitted.
상기 비트스트림은 본 발명이 적용되는 인코딩 방법 또는 비트스트림 생성 방법에 의해 생성될 수 있고, 상기 스트리밍 서버는 상기 비트스트림을 전송 또는 수신하는 과정에서 일시적으로 상기 비트스트림을 저장할 수 있다.The bitstream may be generated by an encoding method or a bitstream generation method to which the present invention is applied, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
상기 스트리밍 서버는 웹 서버를 통한 사용자 요청에 기초하여 멀티미디어 데이터를 사용자 장치에 전송하고, 상기 웹 서버는 사용자에게 어떠한 서비스가 있는지를 알려주는 매개체 역할을 한다. 사용자가 상기 웹 서버에 원하는 서비스를 요청하면, 상기 웹 서버는 이를 스트리밍 서버에 전달하고, 상기 스트리밍 서버는 사용자에게 멀티미디어 데이터를 전송한다. 이때, 상기 컨텐츠 스트리밍 시스템은 별도의 제어 서버를 포함할 수 있고, 이 경우 상기 제어 서버는 상기 컨텐츠 스트리밍 시스템 내 각 장치 간 명령/응답을 제어하는 역할을 한다.The streaming server transmits multimedia data to a user device based on a user request through a web server, and the web server serves as an intermediary to inform the user of the service. When a user requests a desired service from the web server, the web server delivers it to the streaming server, and the streaming server transmits multimedia data to the user. In this case, the content streaming system may include a separate control server, in which case the control server serves to control commands / responses between devices in the content streaming system.
상기 스트리밍 서버는 미디어 저장소 및/또는 인코딩 서버로부터 컨텐츠를 수신할 수 있다. 예를 들어, 상기 인코딩 서버로부터 컨텐츠를 수신하게 되는 경우, 상기 컨텐츠를 실시간으로 수신할 수 있다. 이 경우, 원활한 스트리밍 서비스를 제공하기 위하여 상기 스트리밍 서버는 상기 비트스트림을 일정 시간동안 저장할 수 있다.The streaming server may receive content from a media storage and / or encoding server. For example, when content is received from the encoding server, the content may 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 predetermined time.
상기 사용자 장치의 예로는, 휴대폰, 스마트 폰(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, 데스크탑 컴퓨터, 디지털 사이니지 등이 있을 수 있다.Examples of the user device include a mobile phone, a smart phone, a laptop computer, a terminal for digital broadcasting, a personal digital assistants (PDA), a portable multimedia player (PMP), navigation, a slate PC, Tablet PC, ultrabook, wearable device (e.g., smartwatch, smart glass, head mounted display (HMD)), digital TV, desktop Computers, digital signage, and the like.
상기 컨텐츠 스트리밍 시스템 내 각 서버들은 분산 서버로 운영될 수 있으며, 이 경우 각 서버에서 수신하는 데이터는 분산 처리될 수 있다.Each server in the content streaming system can be operated as a distributed server, and in this case, data received from each server can be distributed.

Claims (14)

  1. 디코딩 장치에 의하여 수행되는 영상 디코딩 방법에 있어서,In the video decoding method performed by the decoding device,
    비트스트림으로부터 예측 모드 정보, 레지듀얼 정보 및 변환 인덱스 정보를 획득하는 단계;Obtaining prediction mode information, residual information, and transform index information from the bitstream;
    상기 예측 모드 정보를 기반으로 현재 블록에 대한 예측 모드를 도출하는 단계; Deriving a prediction mode for the current block based on the prediction mode information;
    상기 예측 모드가 인트라 예측 모드인 경우, 상기 현재 블록에 대해 인트라 예측을 수행하여 예측 샘플들을 도출하는 단계;If the prediction mode is an intra prediction mode, performing intra prediction on the current block to derive prediction samples;
    상기 레지듀얼 정보를 기반으로 상기 현재 블록에 대한 양자화된 변환 계수들을 도출하는 단계;Deriving quantized transform coefficients for the current block based on the residual information;
    상기 양자화된 변환 계수들을 기반으로 역양자화를 수행하여 변환 계수들을 도출하는 단계; Deriving transform coefficients by performing inverse quantization based on the quantized transform coefficients;
    상기 변환 인덱스 정보를 기반으로 수평 변환 커널 및 수직 변환 커널을 도출하는 단계;Deriving a horizontal transform kernel and a vertical transform kernel based on the transform index information;
    상기 수평 변환 커널 및 상기 수직 변환 커널을 기반으로 상기 변환 계수들에 대해 역변환을 수행하여 상기 현재 블록에 대한 레지듀얼 샘플들을 도출하는 단계; 및Deriving residual samples for the current block by performing an inverse transform on the transform coefficients based on the horizontal transform kernel and the vertical transform kernel; And
    상기 예측 샘플들 및 상기 레지듀얼 샘플들을 기반으로 복원 픽처를 생성하는 단계를 포함하며,And generating a reconstructed picture based on the prediction samples and the residual samples,
    상기 수평 변환 커널 및 상기 수직 변환 커널을 도출하는 단계는,Deriving the horizontal transform kernel and the vertical transform kernel,
    복수의 변환 조합들로부터 상기 변환 인덱스 정보에 대응되는 변환 조합을 선택하고, 상기 선택된 변환 조합에 포함된 상기 수평 변환 커널 및 상기 수직 변환 커널을 도출하는 것을 특징으로 하는 영상 디코딩 방법. And selecting the transform combination corresponding to the transform index information from a plurality of transform combinations, and deriving the horizontal transform kernel and the vertical transform kernel included in the selected transform combination.
  2. 제1항에 있어서,The method of claim 1,
    상기 비트스트림으로부터 인트라 코딩 블록에 대한 다중 변환 선택의 가용 여부를 나타내는 인트라 가용 플래그 정보 및 인터 코딩 블록에 대한 다중 변환 선택의 가용 여부를 나타내는 인터 가용 플래그 정보를 획득하는 단계를 더 포함하되,The method further includes obtaining, from the bitstream, intra available flag information indicating whether multiple transform selection is available for an intra coding block and inter available flag information indicating whether multiple transform selection is available for an inter coding block,
    상기 인트라 가용 플래그 정보가 1 또는 상기 인터 가용 플래그 정보가 1을 나타내는 경우, 상기 변환 인덱스 정보를 획득하여 상기 현재 블록에 적용되는 상기 수평 변환 커널 및 상기 수직 변환 커널을 도출하는 것을 특징으로 하는 영상 디코딩 방법. When the intra-available flag information is 1 or the inter-available flag information is 1, the decoding index information is obtained to derive the horizontal transform kernel and the vertical transform kernel applied to the current block. Way.
  3. 제2항에 있어서,According to claim 2,
    상기 인트라 가용 플래그 정보가 1 또는 상기 인터 가용 플래그 정보가 1을 나타내는 경우, 상기 비트스트림으로부터 상기 현재 블록에 대한 다중 변환 선택의 적용 여부를 나타내는 다중 변환 선택 플래그 정보를 획득하는 단계를 더 포함하되,If the intra-available flag information is 1 or the inter-available flag information is 1, further comprising obtaining multiple transform selection flag information indicating whether multiple transform selection is applied to the current block from the bitstream,
    상기 다중 변환 선택 플래그 정보가 1을 나타내는 경우, 상기 비트스트림으로부터 상기 변환 인덱스 정보를 획득하여 디코딩하는 것을 특징으로 하는 영상 디코딩 방법. And when the multiple conversion selection flag information indicates 1, obtaining and decoding the conversion index information from the bitstream.
  4. 제1항에 있어서,The method of claim 1,
    상기 현재 블록의 인트라 예측 모드가 비방향성 모드인 경우, 상기 복수의 변환 조합들은 제1 내지 제5 인덱스 값을 가지는 변환 인덱스 정보에 대응하는 것을 특징으로 하는 영상 디코딩 방법. When the intra prediction mode of the current block is a non-directional mode, the plurality of transform combinations correspond to transform index information having first to fifth index values.
  5. 제4항에 있어서,According to claim 4,
    상기 제1 인덱스 값에 대응하는 변환 조합은 상기 수직 변환 커널 및 상기 수평 변환 커널이 DCT 타입 2이고, In the transform combination corresponding to the first index value, the vertical transform kernel and the horizontal transform kernel are DCT type 2,
    상기 제2 인덱스 값에 대응하는 변환 조합은 상기 수직 변환 커널 및 상기 수평 변환 커널이 DST 타입 7이고,In the conversion combination corresponding to the second index value, the vertical conversion kernel and the horizontal conversion kernel are DST type 7,
    상기 제3 인덱스 값에 대응하는 변환 조합은 상기 수직 변환 커널이 DST 타입 7이고 상기 수평 변환 커널이 DCT 타입 8이고, The transform combination corresponding to the third index value is the vertical transform kernel is DST type 7 and the horizontal transform kernel is DCT type 8,
    상기 제4 인덱스 값에 대응하는 변환 조합은 상기 수직 변환 커널이 DCT 타입 8이고 상기 수평 변환 커널이 DST 타입 7이고,The transform combination corresponding to the fourth index value is DCT type 8 in the vertical transform kernel and DST type 7 in the horizontal transform kernel,
    상기 제5 인덱스 값에 대응하는 변환 조합은 상기 수직 변환 커널 및 상기 수평 변환 커널이 DCT 타입 8인 것을 특징으로 하는 영상 디코딩 방법. The combination of transforms corresponding to the fifth index value is a video decoding method, characterized in that the vertical transform kernel and the horizontal transform kernel are DCT type 8.
  6. 제3항에 있어서,According to claim 3,
    상기 다중 변환 선택 플래그 정보가 0을 나타내는 경우, 상기 변환 인덱스 정보를 나타내는 신택스 요소가 상기 비트스트림에 존재하지 않는 것을 특징으로 하는 영상 디코딩 방법. When the multiplex conversion selection flag information indicates 0, a syntax element indicating the conversion index information does not exist in the bitstream.
  7. 제6항에 있어서,The method of claim 6,
    상기 변환 인덱스 정보를 나타내는 신택스 요소가 상기 비트스트림에 존재하지 않는 경우, When a syntax element representing the transform index information does not exist in the bitstream,
    상기 변환 인덱스 정보는 기설정된 인덱스 값으로 유추되는 것을 특징으로 하는 영상 디코딩 방법. The transform index information is inferred as a predetermined index value, the video decoding method.
  8. 제5항에 있어서,The method of claim 5,
    상기 변환 인덱스 정보를 나타내는 신택스 요소가 상기 비트스트림에 존재하지 않는 경우,When a syntax element representing the transform index information does not exist in the bitstream,
    상기 변환 인덱스 정보는 상기 제1 인덱스 값으로 유추되는 것을 특징으로 하는 영상 디코딩 방법. The transform index information is inferred as the first index value, the video decoding method.
  9. 인코딩 장치에 의하여 수행되는 영상 인코딩 방법에 있어서,In the video encoding method performed by the encoding device,
    현재 블록에 대한 예측 모드를 도출하는 단계;Deriving a prediction mode for the current block;
    상기 예측 모드가 인트라 예측 모드인 경우, 상기 현재 블록에 대해 인트라 예측을 수행하여 예측 샘플들을 도출하는 단계;If the prediction mode is an intra prediction mode, performing intra prediction on the current block to derive prediction samples;
    상기 예측 샘플들을 기반으로 상기 현재 블록에 대한 레지듀얼 샘플들을 도출하는 단계;Deriving residual samples for the current block based on the prediction samples;
    상기 현재 블록의 레지듀얼 샘플들에 적용되는 수평 변환 커널 및 수직 변환 커널을 도출하는 단계;Deriving a horizontal transform kernel and a vertical transform kernel applied to residual samples of the current block;
    상기 수평 변환 커널 및 상기 수직 변환 커널을 기반으로 변환 인덱스 정보를 생성하는 단계;Generating transform index information based on the horizontal transform kernel and the vertical transform kernel;
    상기 수평 변환 커널 및 상기 수직 변환 커널을 기반으로 상기 레지듀얼 샘플들에 대해 변환을 수행하여 상기 현재 블록에 대한 변환 계수들을 도출하는 단계;Deriving transform coefficients for the current block by performing transform on the residual samples based on the horizontal transform kernel and the vertical transform kernel;
    상기 변환 계수들을 기반으로 양자화를 수행하여 양자화된 변환 계수들을 도출하는 단계; Deriving quantized transform coefficients by performing quantization based on the transform coefficients;
    상기 양자화된 변환 계수들을 기반으로 레지듀얼 정보를 생성하는 단계; 및Generating residual information based on the quantized transform coefficients; And
    상기 예측 모드 정보, 상기 레지듀얼 정보 및 상기 변환 인덱스 정보를 포함하는 영상 정보를 인코딩하는 단계를 포함하며,And encoding image information including the prediction mode information, the residual information, and the transform index information,
    상기 변환 인덱스 정보는 복수의 변환 조합들 중 상기 수평 변환 커널 및 상기 수직 변환 커널을 포함하는 변환 조합을 나타내는 것을 특징으로 하는 영상 인코딩 방법.The transform index information indicates a transform combination including the horizontal transform kernel and the vertical transform kernel among a plurality of transform combinations.
  10. 제9항에 있어서,The method of claim 9,
    상기 영상 정보를 인코딩하는 단계는,Encoding the video information,
    인트라 코딩 블록에 대한 다중 변환 선택의 가용 여부를 나타내는 인트라 가용 플래그 정보 및 인터 코딩 블록에 대한 다중 변환 선택의 가용 여부를 나타내는 인터 가용 플래그 정보를 상기 영상 정보에 포함시켜 인코딩하되,Encoding is performed by including intra available flag information indicating whether multi-conversion selection is available for the intra coding block and inter available flag information indicating whether multi-conversion selection is available for the inter coding block, in the video information, and encoding is performed.
    상기 인트라 가용 플래그 정보가 1 또는 상기 인터 가용 플래그 정보가 1을 나타내는 경우, 상기 변환 인덱스 정보에 대한 신택스 요소는 상기 인코딩된 영상 정보를 포함하는 비트스트림에 존재하는 것을 특징으로 하는 영상 인코딩 방법.When the intra available flag information indicates 1 or the inter available flag information indicates 1, a syntax element for the transform index information is present in a bitstream including the encoded video information.
  11. 제10항에 있어서,The method of claim 10,
    상기 영상 정보를 인코딩하는 단계는,Encoding the video information,
    상기 인트라 가용 플래그 정보가 1 또는 상기 인터 가용 플래그 정보가 1을 나타내는 경우, 상기 현재 블록에 대한 다중 변환 선택의 적용 여부를 나타내는 다중 변환 선택 플래그 정보를 상기 영상 정보에 포함시켜 인코딩하되,When the intra available flag information indicates 1 or the inter available flag information indicates 1, encoding is performed by including, in the video information, multiple conversion selection flag information indicating whether multiple conversion selection is applied to the current block,
    상기 다중 변환 선택 플래그 정보가 1을 나타내는 경우, 상기 변환 인덱스 정보를 생성하여 시그널링하는 것을 특징으로 하는 영상 인코딩 방법.When the multi-conversion selection flag information indicates 1, the video encoding method characterized by generating and signaling the conversion index information.
  12. 제9항에 있어서,The method of claim 9,
    상기 현재 블록의 인트라 예측 모드가 비방향성 모드인 경우, 상기 복수의 변환 조합들은 제1 내지 제5 인덱스 값을 가지는 변환 인덱스 정보에 대응하는 것을 특징으로 하는 영상 인코딩 방법.When the intra prediction mode of the current block is a non-directional mode, the plurality of transform combinations correspond to transform index information having first to fifth index values.
  13. 제12항에 있어서,The method of claim 12,
    상기 제1 인덱스 값에 대응하는 변환 조합은 상기 수직 변환 커널 및 상기 수평 변환 커널이 DCT 타입 2이고, In the transform combination corresponding to the first index value, the vertical transform kernel and the horizontal transform kernel are DCT type 2,
    상기 제2 인덱스 값에 대응하는 변환 조합은 상기 수직 변환 커널 및 상기 수평 변환 커널이 DST 타입 7이고,In the conversion combination corresponding to the second index value, the vertical conversion kernel and the horizontal conversion kernel are DST type 7,
    상기 제3 인덱스 값에 대응하는 변환 조합은 상기 수직 변환 커널이 DST 타입 7이고 상기 수평 변환 커널이 DCT 타입 8이고, The transform combination corresponding to the third index value is the vertical transform kernel is DST type 7 and the horizontal transform kernel is DCT type 8,
    상기 제4 인덱스 값에 대응하는 변환 조합은 상기 수직 변환 커널이 DCT 타입 8이고 상기 수평 변환 커널이 DST 타입 7이고,The transform combination corresponding to the fourth index value is DCT type 8 in the vertical transform kernel and DST type 7 in the horizontal transform kernel,
    상기 제5 인덱스 값에 대응하는 변환 조합은 상기 수직 변환 커널 및 상기 수평 변환 커널이 DCT 타입 8인 것을 특징으로 하는 영상 인코딩 방법. The combination of transforms corresponding to the fifth index value is characterized in that the vertical transform kernel and the horizontal transform kernel are DCT type 8.
  14. 제11항에 있어서,The method of claim 11,
    상기 다중 변환 선택 플래그 정보가 0을 나타내는 경우, 상기 변환 인덱스 정보에 대한 신택스 요소가 디코딩 장치로 시그널링되지 않는 것을 특징으로 하는 영상 인코딩 방법. When the multi-conversion selection flag information indicates 0, a syntax element for the conversion index information is not signaled to a decoding device.
PCT/KR2019/011486 2018-09-05 2019-09-05 Multiple transform selection-based image coding method and device therefor WO2020050651A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201862727524P 2018-09-05 2018-09-05
US62/727,524 2018-09-05

Publications (1)

Publication Number Publication Date
WO2020050651A1 true WO2020050651A1 (en) 2020-03-12

Family

ID=69721702

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2019/011486 WO2020050651A1 (en) 2018-09-05 2019-09-05 Multiple transform selection-based image coding method and device therefor

Country Status (1)

Country Link
WO (1) WO2020050651A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112533000A (en) * 2020-10-16 2021-03-19 腾讯科技(深圳)有限公司 Video decoding method and device, computer readable medium and electronic equipment
CN114079772A (en) * 2020-08-21 2022-02-22 腾讯科技(深圳)有限公司 Video decoding method and device, computer readable medium and electronic equipment
US20220070458A1 (en) * 2019-03-09 2022-03-03 Hangzhou Hikvision Digital Technology Co., Ltd. Coding and decoding methods, coder and decoder, and storage medium
WO2022063033A1 (en) * 2020-09-27 2022-03-31 腾讯科技(深圳)有限公司 Video decoding method and apparatus, video coding method and apparatus, computer-readable medium, and electronic device
US20220109877A1 (en) * 2018-12-21 2022-04-07 Samsung Electronics Co., Ltd. Video encoding method and device, and video decoding method and device
US20230099505A1 (en) * 2021-09-29 2023-03-30 Qualcomm Incorporated Adaptive determination of multiple transform candidates for video coding
WO2023056190A1 (en) * 2021-09-29 2023-04-06 Qualcomm Incorporated Adaptive determination of multiple transform candidates for video coding
US11938439B2 (en) 2020-12-09 2024-03-26 Suzhou Jingtian Airen Environmental Technology Co. Ltd. Apparatus for separating and removing dust from exhaust gas

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101549914B1 (en) * 2011-10-17 2015-09-03 주식회사 케이티 Adaptive transform method based on in-screen rediction and apparatus using the method
US20170280162A1 (en) * 2016-03-22 2017-09-28 Qualcomm Incorporated Constrained block-level optimization and signaling for video coding tools
KR20180025284A (en) * 2016-08-31 2018-03-08 주식회사 케이티 Method and apparatus for processing a video signal
US20180205949A1 (en) * 2017-01-13 2018-07-19 Mediatek Inc. Method and Apparatus of Transform Coding
KR20180085526A (en) * 2017-01-19 2018-07-27 가온미디어 주식회사 A method for encoding and decoding video using a processing of an efficent transform

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101549914B1 (en) * 2011-10-17 2015-09-03 주식회사 케이티 Adaptive transform method based on in-screen rediction and apparatus using the method
US20170280162A1 (en) * 2016-03-22 2017-09-28 Qualcomm Incorporated Constrained block-level optimization and signaling for video coding tools
KR20180025284A (en) * 2016-08-31 2018-03-08 주식회사 케이티 Method and apparatus for processing a video signal
US20180205949A1 (en) * 2017-01-13 2018-07-19 Mediatek Inc. Method and Apparatus of Transform Coding
KR20180085526A (en) * 2017-01-19 2018-07-27 가온미디어 주식회사 A method for encoding and decoding video using a processing of an efficent transform

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220109877A1 (en) * 2018-12-21 2022-04-07 Samsung Electronics Co., Ltd. Video encoding method and device, and video decoding method and device
US20220070458A1 (en) * 2019-03-09 2022-03-03 Hangzhou Hikvision Digital Technology Co., Ltd. Coding and decoding methods, coder and decoder, and storage medium
CN114079772A (en) * 2020-08-21 2022-02-22 腾讯科技(深圳)有限公司 Video decoding method and device, computer readable medium and electronic equipment
CN114079772B (en) * 2020-08-21 2023-04-07 腾讯科技(深圳)有限公司 Video decoding method and device, computer readable medium and electronic equipment
WO2022063033A1 (en) * 2020-09-27 2022-03-31 腾讯科技(深圳)有限公司 Video decoding method and apparatus, video coding method and apparatus, computer-readable medium, and electronic device
CN112533000A (en) * 2020-10-16 2021-03-19 腾讯科技(深圳)有限公司 Video decoding method and device, computer readable medium and electronic equipment
WO2022078163A1 (en) * 2020-10-16 2022-04-21 腾讯科技(深圳)有限公司 Video decoding method, video encoding method, and related device
EP4113997A4 (en) * 2020-10-16 2023-09-13 Tencent Technology (Shenzhen) Company Limited Video decoding method, video encoding method, and related device
US11938439B2 (en) 2020-12-09 2024-03-26 Suzhou Jingtian Airen Environmental Technology Co. Ltd. Apparatus for separating and removing dust from exhaust gas
US20230099505A1 (en) * 2021-09-29 2023-03-30 Qualcomm Incorporated Adaptive determination of multiple transform candidates for video coding
WO2023056190A1 (en) * 2021-09-29 2023-04-06 Qualcomm Incorporated Adaptive determination of multiple transform candidates for video coding

Similar Documents

Publication Publication Date Title
WO2020149648A1 (en) Image coding method and device using transform skip flag
WO2020050651A1 (en) Multiple transform selection-based image coding method and device therefor
WO2020046091A1 (en) Image coding method based on multiple transform selection and device therefor
WO2020009556A1 (en) Transform-based image coding method and device
WO2020246806A1 (en) Matrix-based intra prediction device and method
WO2021040484A1 (en) Cross-component adaptive loop filtering-based image coding apparatus and method
WO2020213946A1 (en) Image coding using transform index
WO2020213944A1 (en) Transform for matrix-based intra-prediction in image coding
WO2020171592A1 (en) Video decoding method using residual information in video coding system, and apparatus thereof
WO2020246805A1 (en) Matrix-based intra prediction device and method
WO2020246803A1 (en) Matrix-based intra prediction device and method
WO2021040483A1 (en) Apparatus and method for coding image
WO2021096172A1 (en) Image coding method based on transform, and device therefor
WO2020130661A1 (en) Video coding method on basis of secondary transform, and device for same
WO2021040410A1 (en) Method for decoding video for residual coding and device therefor
WO2021172912A1 (en) Method and apparatus for decoding imaging related to sign data hiding
WO2021025530A1 (en) Method and apparatus for image coding based on transform
WO2021040487A1 (en) Image decoding method for residual data coding in image coding system, and apparatus therefor
WO2021040482A1 (en) Adaptive loop filtering-based image coding device and method
WO2021006700A1 (en) Image decoding method using flag for residual coding method in image coding system, and device for same
WO2020256482A1 (en) Transform-based image coding method and device therefor
WO2021054783A1 (en) Image coding method on basis of transform, and apparatus therefor
WO2021054787A1 (en) Transform-based image coding method and device therefor
WO2020242183A1 (en) Image coding method and device on basis of wide-angle intra prediction and transform
WO2021006697A1 (en) Image decoding method for residual coding and apparatus therefor

Legal Events

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

Ref document number: 19858409

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19858409

Country of ref document: EP

Kind code of ref document: A1