WO2020013541A1 - 비디오 신호를 처리하기 위한 방법 및 장치 - Google Patents

비디오 신호를 처리하기 위한 방법 및 장치 Download PDF

Info

Publication number
WO2020013541A1
WO2020013541A1 PCT/KR2019/008336 KR2019008336W WO2020013541A1 WO 2020013541 A1 WO2020013541 A1 WO 2020013541A1 KR 2019008336 W KR2019008336 W KR 2019008336W WO 2020013541 A1 WO2020013541 A1 WO 2020013541A1
Authority
WO
WIPO (PCT)
Prior art keywords
transform
block
transform block
transformation
inverse
Prior art date
Application number
PCT/KR2019/008336
Other languages
English (en)
French (fr)
Inventor
구문모
살레후메디
김승환
임재현
Original Assignee
엘지전자 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 엘지전자 주식회사 filed Critical 엘지전자 주식회사
Priority to KR1020237023593A priority Critical patent/KR102664785B1/ko
Priority to US17/258,973 priority patent/US11689744B2/en
Priority to KR1020247015003A priority patent/KR20240075908A/ko
Priority to KR1020217001000A priority patent/KR102555966B1/ko
Publication of WO2020013541A1 publication Critical patent/WO2020013541A1/ko
Priority to US18/197,529 priority patent/US20230379501A1/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/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • H04N19/122Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/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/129Scanning of coding units, e.g. zig-zag scan of transform coefficients or flexible macroblock ordering [FMO]
    • 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/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/18Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a set of transform coefficients
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/625Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using discrete cosine transform [DCT]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Definitions

  • the present invention relates to a method and apparatus for processing a video signal, and more particularly, to a method and apparatus for encoding and decoding a video signal by omitting the application of a non-separable secondary transform to a 4x4 sized transform block. It is about.
  • Compression coding refers to a series of signal processing techniques for transmitting digitized information through a communication line or for storing in a form suitable for a storage medium.
  • Media such as an image, an image, an audio, and the like may be a target of compression encoding.
  • a technique of performing compression encoding on an image is called video image compression.
  • Next-generation video content will be characterized by high spatial resolution, high frame rate and high dimensionality of scene representation. Processing such content would result in a tremendous increase in terms of memory storage, memory access rate, and processing power.
  • the video codec standard after the high efficiency video coding (HEVC) standard requires an efficient conversion technique in order to convert a spatial domain video signal into the frequency domain.
  • embodiments of the present invention seek to provide a video signal processing method and apparatus for performing a transformation with low complexity.
  • embodiments of the present invention provide a video signal processing method and apparatus capable of reducing a computational complexity by omitting a non-separable secondary transform.
  • the encoding method of a video signal comprises the steps of: identifying a transform block including residual samples excluding a predictive sample in a picture of the video signal; and based on the size of the transform block, the residual of the transform block Generating transform coefficients through transform on samples, and performing quantization and entropy coding on the transform coefficients, wherein generating the transform coefficients comprises: a transform block comprising the residual samples Applying a forward primary transform to each of the horizontal direction and the vertical direction of; and, if the size of the transform block is less than or equal to 4x4, the forward direction to the transform block to which the first transform is applied Skip the application of non-separable secondary transforms, and if the size of the transform block is greater than 4x4 ,
  • the forward ratio with respect to the conversion block may comprise the step of applying a separate secondary conversion.
  • applying a forward non-separated secondary transform to the transform block includes applying the forward non-separated secondary transform to the upper left 4x4 region of the transform block. can do.
  • the forward non-separated secondary transform is a reduced secondary transform (RST) which is an Lx16 matrix, where L is less than or equal to 16, and a sparse orthonormal transform (SOT) 16 that is a 16x16 matrix.
  • RST reduced secondary transform
  • SOT sparse orthonormal transform
  • the forward primary transform includes a horizontal transform and a vertical transform for a transform block, and the horizontal transform and the vertical transform are DCT-2, DST-7, And DCT-8.
  • a method of decoding a video signal comprising: generating a transform block including transform coefficients by performing entropy decoding and inverse quantization on the video signal, and converting the transform block based on a size of the transform block Generating residual signals through inverse transform on the transform coefficients of the block, and generating a reconstructed picture by generating a prediction signal through prediction from the residual signals, wherein performing the inverse transform includes: If the size of the transform block is less than or equal to 4x4, the application of an inverse non-separable secondary transform to the transform block is omitted, and the size of the transform block is greater than 4x4. Case, applying the inverse non-separated secondary transform to the transform block, and for the transform block , Separated by a horizontal and vertical direction may comprise the step of applying a reverse primary conversion (primary transform).
  • applying the reverse non-separated secondary transform to the transform block may include applying the reverse non-separated secondary transform to the upper left 4x4 region of the transform block. It may include.
  • the reverse non-separated secondary transform is a reduced secondary transform (RST) which is an Lx16 matrix, where L is less than or equal to 16, and a sparse orthonormal transform (SOT) 16 that is a 16x16 matrix.
  • RST reduced secondary transform
  • SOT sparse orthonormal transform
  • An apparatus for encoding a video signal may include a memory for storing the video signal, and an encoder functionally coupled with the memory and encoding the video signal.
  • An encoder according to an embodiment of the present invention identifies a transform block including residual samples excluding a prediction sample in a picture of the video signal, and performs transform on residual samples of the transform block based on the size of the transform block. Is configured to generate transform coefficients, perform quantization and entropy coding on the transform coefficients, and generate the transform coefficients through transform on residual samples of the transform block.
  • a forward primary transform is applied to each of a horizontal direction and a vertical direction of a transform block, and if the size of the transform block is less than or equal to 4x4, the transform block is applied to the transform block to which the first transform is applied. Omitting the application of the forward non-separable secondary transform, and the size of the transform block is greater than 4x4 If large, it may be set to apply the forward non-separated secondary transform to the transform block.
  • the encoder according to the embodiment of the present invention may be configured to apply the forward non-separated secondary transform to the upper left 4x4 region of the transform block when the size of the transform block is larger than 4x4.
  • a forward non-separated secondary transform is a reduced secondary transform (RST) that is an Lx16 matrix, where L is less than or equal to 16, and a sparse orthonormal transform (SOT) 16 that is a 16x16 matrix.
  • RST reduced secondary transform
  • SOT sparse orthonormal transform
  • the forward primary transformation includes a horizontal transformation and a vertical transformation for the transform block, and the horizontal transformation and the vertical transformation are DCT-2, DST-7, and DCT. Can be set by a combination of -8.
  • An apparatus for decoding a video signal may include a memory for storing the video signal, a decoder functionally coupled to the memory, and a decoder for decoding the video signal.
  • a decoder according to an embodiment of the present invention generates a transform block including transform coefficients by performing entropy decoding and inverse quantization on the video signal, and generates a transform block based on the size of the transform block. It can be set to generate a residual picture by generating residual signals through the inverse transform on, and generating a prediction signal through prediction from the residual signals.
  • the decoder When generating residual signals through inverse transform on the transform coefficients of the transform block, the decoder is inverse non-separated 2 for the transform block if the size of the transform block is less than or equal to 4x4. Omitting the application of the non-separable secondary transform, and if the size of the transform block is larger than 4 ⁇ 4, apply the inverse non-separated secondary transform to the transform block, and apply horizontal and It may be set to apply a reverse primary transform by separating in the vertical direction.
  • the decoder according to the embodiment of the present invention may be configured to apply the backward non-separated secondary transform to the upper left 4x4 region of the transform block when the size of the transform block is larger than 4x4.
  • the reverse non-separated secondary transform is a reduced secondary transform (RST) which is an Lx16 matrix, where L is less than or equal to 16, and a sparse orthonormal transform (SOT) 16 that is a 16x16 matrix.
  • RST reduced secondary transform
  • SOT sparse orthonormal transform
  • a transformation matrix can be designed with low complexity.
  • the amount of computation can be reduced by selectively applying a non-separable secondary transform according to the size of the transform block.
  • FIG. 1 is a schematic block diagram of an encoder in which encoding of a video signal is performed as an embodiment to which the present invention is applied.
  • FIG. 2 is a schematic block diagram of a decoder in which decoding of a video signal is performed as an embodiment to which the present invention is applied.
  • FIG. 3 is an embodiment to which the present invention can be applied.
  • FIG. 3A is a diagram illustrating block division structures using a quadtree
  • FIG. 3B is a binary tree
  • FIG. 3C is a ternary tree
  • FIG. 3D is an asymmetric tree.
  • FIG. 4 is a schematic block diagram of a transform and quantization unit, an inverse quantization unit, and an inverse transform unit in an encoder
  • FIG. 5 is a schematic block diagram of an inverse quantization and inverse transform unit in a decoder. Shows a figure.
  • 6A and 6B show examples of tables for determining a transform type for a horizontal direction and a vertical direction for each prediction mode.
  • FIG. 7 is a flowchart illustrating an encoding process in which multiple transform selection (MTS) is performed according to an embodiment to which the present invention is applied.
  • MTS multiple transform selection
  • FIG. 8 is a flowchart illustrating a decoding process in which an MTS is performed as an embodiment to which the present invention is applied.
  • FIG. 9 is a flowchart illustrating a process of encoding an MTS flag and an MTS index according to an embodiment to which the present invention is applied.
  • FIG. 10 is a flowchart illustrating a decoding process of applying a horizontal transform or a vertical transform to a row or a column based on an MTS flag and an MTS index according to an embodiment to which the present invention is applied.
  • FIG. 11 is an embodiment to which the present invention is applied and shows a flowchart of performing inverse transformation based on transformation related parameters.
  • FIG. 12 is a table illustrating an example in which a transform set is allocated to each intra prediction mode in an NSST according to an embodiment to which the present invention is applied.
  • FIG. 13 shows a calculation flow diagram for Givens rotation as an embodiment to which the present invention is applied.
  • FIG. 14 shows a round configuration in a 4x4 NSST composed of Givens rotation layer and permutations as an embodiment to which the present invention is applied.
  • FIG. 15 is a block diagram illustrating an operation of a forward reduced transform and a forward reduced transform in an embodiment to which the present invention is applied.
  • FIG. 16 illustrates an embodiment to which the present invention is applied and shows a process of performing a reverse scan from the 64 th to 17 th in the reverse scan order.
  • FIG. 17 shows three forward scan sequences for a transform coefficient block (transform block) as an embodiment to which the present invention is applied.
  • FIG. 18 shows an embodiment to which the present invention is applied and shows positions of transform coefficients and forward scan order for each 4x4 block when a diagonal scan is applied and a 4x4 RST is applied to the upper left 4x8 block.
  • FIG. 19 illustrates an embodiment to which the present invention is applied and combines valid transform coefficients of two 4x4 blocks into one 4x4 block when a diagonal scan is applied in the upper left 4x8 block and 4x4 RST is applied. .
  • FIG. 20 is a flowchart illustrating encoding a video signal based on a reduced secondary transform (RST) according to an embodiment to which the present invention is applied.
  • RST reduced secondary transform
  • FIG. 21 illustrates a flowchart of decoding a video signal based on a reduced secondary transform (RST) according to an embodiment to which the present invention is applied.
  • RST reduced secondary transform
  • FIG. 22 shows an example of a transform block and an upper left 4x4 area according to an embodiment of the present invention.
  • FIG. 23 shows an example of a table for determining a transform type for a horizontal direction and a vertical direction according to a prediction mode
  • FIG. 23A shows a transform pair applied to a residual generated through intra prediction
  • FIG. 23B shows a screen. Represents a transform pair applied to a residual generated through inter prediction.
  • 25 illustrates an example of a conversion process according to a size of a transform block in an encoding process of a video signal according to an embodiment of the present invention.
  • 26 is a flowchart of a decoding process of a video signal according to an embodiment of the present invention.
  • FIG. 27 shows an example of a conversion process according to a size of a transform block in a decoding process of a video signal according to an embodiment of the present invention.
  • FIG. 28 shows an example of a video coding system as an embodiment to which the present invention is applied.
  • FIG 29 shows an example of a video streaming system as an embodiment to which the present invention is applied.
  • the 'processing unit' refers to a unit in which a process of encoding / decoding such as prediction, transformation, and / or quantization is performed.
  • the processing unit may be interpreted to include a unit for a luma component and a unit for a chroma component.
  • the processing unit may correspond to a block, a coding unit (CU), a prediction unit (PU), or a transform unit (TU).
  • the processing unit may be interpreted as a unit for the luminance component or a unit for the chrominance component.
  • the processing unit may correspond to a CTB, CB, PU or TB for the luminance component.
  • the processing unit may correspond to a CTB, CB, PU or TB for the chrominance component.
  • the present invention is not limited thereto, and the processing unit may be interpreted to include a unit for a luminance component and a unit for a color difference component.
  • processing unit is not necessarily limited to square blocks, but may also be configured in a polygonal form having three or more vertices.
  • a pixel, a pixel, and the like are referred to collectively as samples.
  • using a sample may mean using a pixel value or a pixel value.
  • FIG. 1 is a schematic block diagram of an encoder in which encoding of a video signal is performed as an embodiment to which the present invention is applied.
  • the encoder 100 may include an image splitter 110, a transformer 120, a quantizer 130, an inverse quantizer 140, an inverse transformer 150, a filter 160, and a decoder.
  • a picture buffer (DPB) 170, an inter predictor 180, an intra predictor 185, and an entropy encoder 190 may be configured.
  • the image divider 110 may divide an input image (or a picture or a frame) input to the encoder 100 into one or more processing units.
  • the processing unit may be a coding tree unit (CTU), a coding unit (CU), a prediction unit (PU), or a transform unit (TU).
  • CTU coding tree unit
  • CU coding unit
  • PU prediction unit
  • TU transform unit
  • a transform unit (TU) which is a unit in which a transform is performed, is collectively referred to as a transform block.
  • the terms are only used for the convenience of description of the present invention, the present invention is not limited to the definition of the terms.
  • the term coding unit is used as a unit used in encoding or decoding a video signal, but the present invention is not limited thereto and may be appropriately interpreted according to the present invention.
  • the encoder 100 may generate a residual signal by subtracting a prediction signal output from the inter predictor 180 or the intra predictor 185 from the input image signal, and generate the residual signal. Is transmitted to the converter 120.
  • the transform unit 120 may generate a transform coefficient by applying a transform technique to the residual signal.
  • the transformation process may be applied to a block (square or rectangle) divided by a quadtree structured square block, a binarytree structure, a ternary tree structure, or an asymmetric structure.
  • the transform unit 120 may perform a transform based on a plurality of transforms (or transform combinations), and this transform scheme may be referred to as a multiple transform selection (MTS).
  • MTS multiple transform selection
  • the MTS may also be called adaptive multiple transform (AMT) or enhanced multiple transform (EMT).
  • AMT adaptive multiple transform
  • EMT enhanced multiple transform
  • MTS may refer to a transform scheme performed based on a transform (or transform combinations) adaptively selected from a plurality of transforms (or transform combinations).
  • the plurality of transforms may be determined based on a kernel of a discrete cosine transform (DCT) or a discrete sine transform (DST) type, as shown in FIGS. 6A and 6B.
  • DCT discrete cosine transform
  • DST discrete sine transform
  • the conversion type may be expressed as, for example, DCT-Type 2, DCT-II, DCT-2, or DCT2, and in the following description, it is referred to as DCT-2.
  • the conversion unit 120 may perform the following embodiments.
  • the transform unit 120 applies a forward primary transform to each of the horizontal direction and the vertical direction of the transform block including the residual samples.
  • the size of the transform block is less than or equal to 4 ⁇ 4, 1 Omit the application of the forward secondary transform to the transform block to which the transform is applied, and if the size of the transform block is larger than 4x4, the forward non-separable secondary transform for the transform block transform).
  • the transform unit 120 may be set to apply the forward non-separated secondary transform to the upper left 4x4 region of the transform block.
  • the quantization unit 130 may quantize the transform coefficients and transmit the quantized coefficients to the entropy encoding unit 190, and the entropy encoding unit 190 may entropy code the quantized signal and output the bitstream.
  • transform unit 120 and the quantization unit 130 are described as separate functional units, the present invention is not limited thereto and may be combined into one functional unit. In the case of the inverse quantization unit 140 and the inverse transform unit 150, the same may be combined into one functional unit.
  • the quantized signal output from the quantization unit 130 may be used to generate a prediction signal.
  • the quantized signal may reconstruct the residual signal by applying inverse quantization and inverse transformation through inverse quantization unit 140 and inverse transformation unit 150 in a loop.
  • the reconstructed signal may be generated by adding the reconstructed residual signal to the prediction signal output from the inter predictor 180 or the intra predictor 185.
  • deterioration of the block boundary may occur due to the quantization error generated in the above compression process. This phenomenon is called blocking artifacts, which is one of the important factors in evaluating image quality.
  • a filtering process may be performed. Through this filtering process, the image quality can be improved by removing the blocking degradation and reducing the error of the current picture.
  • the filtering unit 160 applies filtering to the reconstruction signal and outputs it to the reproduction apparatus or transmits it to the decoded picture buffer 170.
  • the filtered signal transmitted to the decoded picture buffer 170 may be used as the reference picture in the inter predictor 180. As such, by using the filtered picture as a reference picture in the inter prediction mode, not only image quality but also encoding efficiency may be improved.
  • the decoded picture buffer 170 may store the filtered picture for use as a reference picture in the inter prediction unit 180.
  • the inter prediction unit 180 performs temporal prediction and / or spatial prediction to remove temporal redundancy and / or spatial redundancy with reference to a reconstructed picture.
  • the reference picture used to perform the prediction is a transformed signal that has been quantized and dequantized in units of blocks at the time of encoding / decoding in the previous time, blocking artifacts or ringing artifacts may exist. have.
  • the inter prediction unit 180 may interpolate the signals between pixels in sub-pixel units by applying a lowpass filter to solve performance degradation due to discontinuity or quantization of such signals.
  • the subpixel refers to a virtual pixel generated by applying an interpolation filter
  • the integer pixel refers to an actual pixel existing in the reconstructed picture.
  • the interpolation method linear interpolation, bi-linear interpolation, wiener filter, or the like may be applied.
  • the interpolation filter may be applied to a reconstructed picture to improve the precision of prediction.
  • the inter prediction unit 180 generates an interpolation pixel by applying an interpolation filter to integer pixels, and uses an interpolated block composed of interpolated pixels as a prediction block. You can make predictions.
  • the intra predictor 185 may predict the current block by referring to samples around the block to which current encoding is to be performed.
  • the intra prediction unit 185 may perform the following process to perform intra prediction. First, reference samples necessary for generating a prediction signal may be prepared. The prediction signal may be generated using the prepared reference sample. Then, the prediction mode is encoded. In this case, the reference sample may be prepared through reference sample padding and / or reference sample filtering. Since the reference sample has been predicted and reconstructed, there may be a quantization error. Accordingly, a reference sample filtering process may be performed for each prediction mode used for intra prediction to reduce such an error.
  • the prediction signal generated by the inter predictor 180 or the intra predictor 185 may be used to generate a reconstruction signal or to generate a residual signal.
  • FIG. 2 is a schematic block diagram of a decoder in which decoding of a video signal is performed as an embodiment to which the present invention is applied.
  • the decoder 200 includes a parser (not shown), an entropy decoder 210, an inverse quantizer 220, an inverse transformer 230, a filter 240, and a decoded picture buffer (DPB). and a decoded picture buffer (250), an inter predictor 260, and an intra predictor 265.
  • the reconstructed video signal output through the decoder 200 may be reproduced through the reproducing apparatus.
  • the decoder 200 may receive a signal output from the encoder 100 of FIG. 1, and the received signal may be entropy decoded through the entropy decoding unit 210.
  • the inverse quantization unit 220 obtains a transform coefficient from the entropy decoded signal using the quantization step size information.
  • the inverse transform unit 230 inversely transforms the transform coefficient to obtain a residual signal.
  • the inverse transform unit 230 omits application of an inverse non-separable secondary transform to the transform block when the size of the transform block is smaller than or equal to 4 ⁇ 4. If the size of the transform block is larger than 4x4, apply the reverse non-separated secondary transform to the transform block, and apply the reverse primary transform by separating the transform block in the horizontal and vertical directions. Can be.
  • the inverse transform unit 230 according to an embodiment of the present invention may be configured to apply a reverse non-separated secondary transform to the upper left 4x4 region of the transform block when the size of the transform block is larger than 4x4.
  • the inverse quantization unit 220 and the inverse transform unit 230 are described as separate functional units, the present invention is not limited thereto and may be combined into one functional unit.
  • the reconstruction signal is generated by adding the obtained residual signal to the prediction signal output from the inter prediction unit 260 or the intra prediction unit 265.
  • the filtering unit 240 applies filtering to the reconstruction signal and outputs it to the reproduction apparatus or transmits it to the decoded picture buffer unit 250.
  • the filtered signal transmitted to the decoded picture buffer unit 250 may be used as the reference picture in the inter predictor 260.
  • the embodiments described in the transform unit 120 and the respective functional units of the encoder 100 may be equally applied to the inverse transform unit 230 and the corresponding functional units of the decoder, respectively.
  • FIG. 3 is an embodiment to which the present invention can be applied, FIG. 3A is a QT (QuadTree), FIG. 3B is a Binary Tree (BT), and FIG. 3C is a TT (Ternary). Tree, hereinafter referred to as 'TT' FIG. 3D is a diagram for describing block division structures by AT (Asymmetric Tree, hereinafter referred to as 'AT').
  • 'AT' Binary Tree
  • one block may be divided on a QT (QuadTree) basis.
  • one subblock divided by QT may be further divided recursively using QT.
  • Leaf blocks that are no longer QT split may be split by at least one of Binary Tree (BT), Ternary Tree (TT), and Asymmetric Tree (AT).
  • BT may have two types of divisions: horizontal BT (2NxN, 2NxN) and vertical BT (Nx2N, Nx2N).
  • the TT may have two types of partitions: horizontal TT (2Nx1 / 2N, 2NxN, 2Nx1 / 2N) and vertical TT (1 / 2Nx2N, Nx2N, 1 / 2Nx2N).
  • AT is horizontal-up AT (2Nx1 / 2N, 2Nx3 / 2N), horizontal-down AT (2Nx3 / 2N, 2Nx1 / 2N), vertical-left AT (1 / 2Nx2N, 3 / 2Nx2N), vertical-right AT (3 / 2Nx2N, 1 / 2Nx2N) can be divided into four types.
  • Each BT, TT, AT may be further recursively divided using BT, TT, AT.
  • Block A may be divided into four sub-blocks A0, A1, A2, A3 by QT.
  • the sub block A1 may be divided into four sub blocks B0, B1, B2, and B3 by QT.
  • Block B3 which is no longer divided by QT, may be divided into vertical BT (C0, C1) or horizontal BT (D0, D1). Like the block C0, each subblock may be further recursively divided into the form of horizontal BT (E0, E1) or vertical BT (F0, F1).
  • Block B3C shows an example of TT partitioning.
  • Block B3 which is no longer divided by QT, may be divided into vertical TT (C0, C1, C2) or horizontal TT (D0, D1, D2).
  • each subblock may be further recursively divided into a form of horizontal TT (E0, E1, E2) or vertical TT (F0, F1, F2).
  • Block B3 which is no longer divided by QT, may be divided into vertical AT (C0, C1) or horizontal AT (D0, D1). Like block C1, each subblock may be further recursively divided into the form of horizontal AT (E0, E1) or vertical TT (F0, F1).
  • a sub block divided by BT may be divided by TT or AT.
  • the sub-block divided by TT can be divided by BT or AT.
  • a sub block divided by AT may be divided by BT or TT.
  • each sub block may be divided into vertical BTs, or after the vertical BT division, each sub block may be divided into horizontal BTs.
  • the two types of division methods differ in the order of division, but have the same shape.
  • searching from left to right and from top to bottom, and searching for a block means an order of determining whether each divided sub-block is divided further, or when each sub-block is no longer divided
  • a coding order of a block may be referred to, or a search order when referring to information of another neighboring block in a subblock.
  • the transformation may be performed for each processing unit (or transform block) divided by the partitioning structure as illustrated in FIGS. 3A to 3D, and in particular, the transformation matrix may be applied by dividing according to the row direction and the column direction. .
  • different conversion types may be used depending on the length of the row direction or the column direction of the processing unit (or transform block).
  • FIG. 4 shows a schematic block diagram of a transform and quantization unit 120/130, an inverse quantization and inverse transform unit 140/150 in an encoder
  • FIG. Shows a schematic block diagram of the inverse quantization and inverse transform units 220/230 in the decoder.
  • the transform and quantization unit 120/130 may include a primary transform unit 121, a secondary transform unit 122, and a quantization unit 130. have.
  • the inverse quantization and inverse transform unit 140/150 may include an inverse quantization unit 140, an inverse secondary transform unit 151, and an inverse primary transform unit 152. Can be.
  • the inverse quantization and inverse transform units 220 and 230 may include an inverse quantization unit 220, an inverse secondary transform unit 231, and an inverse primary transform unit ( 232).
  • the transformation may be performed through a plurality of steps when performing the transformation.
  • two stages of a primary transform and a secondary transform may be applied as in FIG. 4, or more transformation steps may be used according to an algorithm.
  • the first transform may be called a core transform.
  • the primary transform unit 121 may apply a primary transform to the residual signal, where the primary transform may be defined as a table at the encoder and / or the decoder.
  • combinations of various transform types (DCT-2, DST-7, DCT-8) of MTS may be used.
  • the conversion type may be determined as shown in the tables illustrated in FIGS. 6A and 6B.
  • the secondary transform unit 122 may apply a secondary transform on the primary transformed signal, where the secondary transform may be defined as a table at the encoder and / or the decoder.
  • the secondary transform unit 122 when the size of the transform block is less than or equal to 4x4, performs a forward non-separable secondary transform on the transform block to which the primary transform is applied. , NSST) may be omitted, and if the size of the transform block is larger than 4 ⁇ 4, the forward non-separated secondary transform may be applied to the transform block.
  • the secondary transform unit 122 may be set to apply the forward non-separated secondary transform (NSST) to the upper left 4x4 region of the transform block.
  • the secondary transform may be conditionally applied to non-separated secondary transform (NSST).
  • NSST non-separated secondary transform
  • NSST is applied only to intra prediction blocks, and may have a transform set applicable to each prediction mode group.
  • the prediction mode group may be set based on symmetry with respect to the prediction direction. For example, since the prediction mode 52 and the prediction mode 16 are symmetrical based on the prediction mode 34 (diagonal direction), the same transform set may be applied by forming one group. In this case, when the transform for the prediction mode 52 is applied, the input data is transposed and then applied, since the prediction set 16 and the transform set are the same.
  • each since there is no symmetry in the direction, each has a transform set, and the transform set may be composed of two transforms. For the remaining directional mode, three transforms may be configured per transform set.
  • the quantization unit 130 may perform quantization on the quadratic transformed signal.
  • the inverse quantization and inverse transform unit 140/150 performs the above-described process in reverse, and redundant description thereof will be omitted.
  • FIG. 5 shows a schematic block diagram of inverse quantization and inverse transform units 220/230 in a decoder.
  • the inverse quantization and inverse transform units 220 and 230 may include an inverse quantization unit 220, an inverse secondary transform unit 231, and an inverse primary transform unit ( 232).
  • the inverse quantization unit 220 obtains a transform coefficient from an entropy decoded signal using the quantization step size information.
  • the inverse quadratic transform unit 231 performs inverse quadratic transformation on the transform coefficient.
  • the inverse secondary transform indicates an inverse transform of the secondary transform described with reference to FIG. 4.
  • the inverse secondary transform unit 231 When the size of the transform block is less than or equal to 4x4, the inverse secondary transform unit 231 according to an embodiment of the present invention performs inverse non-separable secondary transform on the transform block. If application is omitted and the size of the transform block is larger than 4x4, apply the reverse non-separated secondary transform to the transform block and separate the horizontal primary and vertical transforms with respect to the transform block. Can be set to apply.
  • the inverse quadratic transform unit 231 may be configured to apply a reverse non-separated quadratic transform to the upper left 4x4 region of the transform block when the size of the transform block is larger than 4x4. .
  • the inverse primary transform unit 232 performs inverse primary transform on the inverse secondary transformed signal (or block) and obtains a residual signal.
  • the inverse primary transform refers to an inverse transform of the primary transform described with reference to FIG. 4.
  • combinations of several transforms (DCT-2, DST-7, DCT-8) of MTS may be applied.
  • the conversion type may be determined as shown in the tables illustrated in FIGS. 6A and 6B.
  • FIG. 6A and 6B show examples of tables for determining a transform type for a horizontal direction and a vertical direction for each prediction mode.
  • FIG. 6A illustrates an example of a table for determining a transformation type for horizontal / vertical directions in an intra prediction mode
  • FIG. 6B illustrates an example of a table for determining a transformation type for a horizontal / vertical orientation in an inter prediction mode.
  • Shows. 6A and 6B illustrate MTS combinations applied to a joint exploration model (JEM) as an example of a combination table for determining a transform type, and other combinations may be used.
  • JEM joint exploration model
  • the table of FIG. 6B may be used for both intra prediction and inter prediction.
  • an example applied to the JEM will be described with reference to FIGS. 6A and 6B.
  • the application of the MTS can be turned on / off on a block basis (in CU case, in case of HEVC) by introducing a syntax element called EMT_CU_flag (or MTS_CU_flag). That is, in the intra prediction mode, when MTS_CU_flag is 0, DCT-2 or DST-7 (for 4x4 blocks) in the existing high efficiency video coding (HEVC) is used, and when MTS_CU_flag is 1, the MTS combination shown in FIG. 6A is used. do. Possible MTS combinations may vary depending on the intra prediction mode as shown in FIG. 6A.
  • DST-7 and DCT-5 in the horizontal direction and DST-7 and DCT- in the vertical direction for 14, 15, 16, 17, 18, 19, 20, 21, and 22 modes.
  • a total of four possible combinations are allowed.
  • One of four combinations is selected through two bits of MTS_TU_index.
  • FIG. 6B illustrates an MTS combination that can be applied in the inter prediction mode, and unlike FIG. 6A, a combination that can be performed only by DST-7 and DCT-8 is determined.
  • EMT_CU_flag may be used in place of MTS_CU_flag.
  • FIG. 7 is a flowchart illustrating an encoding process in which MTS is performed as an embodiment to which the present invention is applied.
  • Transform combinations of 6b may be used.
  • the methods proposed in this specification can be applied regardless of the first-order transform or the second-order 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 transforming the residual block first
  • the secondary transform may mean a transform for applying the transform to a block generated as a result of the primary transform.
  • the size of the transform block is less than or equal to 4x4
  • only the first transform may be applied while the second transform is omitted
  • the second transform when the size of the transform block is larger than 4x4, the second transform
  • the quadratic transformation can be applied to the left-top 4x4 region.
  • the encoder 100 may determine a transform setting group corresponding to the current block (S710).
  • the conversion setting group may be composed of combinations as shown in FIGS. 6A and 6B.
  • the encoder may perform transform on candidate transform combinations available in the transform configuration group (S720).
  • the encoder may determine or select a conversion combination having the least cost of RD (S730).
  • the encoder may encode a transform combination index corresponding to the selected transform combination (S740).
  • FIG. 8 is a flowchart illustrating a decoding process in which an MTS is performed as an embodiment to which the present invention is applied.
  • the decoder 200 may determine a transform setting group for the current block (S810).
  • the decoder 200 may parse (or obtain) a transform combination index from the video signal, where the transform combination index may correspond to any one of a plurality of transform combinations in the transform setting group (S820).
  • the conversion configuration group may include DCT-2, DST-7 or DCT-8.
  • the transform combination index may be referred to as an MTS index.
  • the transform setting group may be set based on at least one of a prediction mode, a block size, or a block shape of the current block.
  • the decoder 100 may induce a transform combination corresponding to the transform combination index (S830).
  • the transform combination may be configured as a horizontal transform and a vertical transform, and may include at least one of DCT-2, DST-7, or DCT-8.
  • the transform combination described in FIG. 6A or 6B may be used. That is, a configuration by other transform combinations according to another embodiment of the present specification is also possible.
  • the decoder 100 may perform inverse transform on the current block based on the derived transform combination (S840). If the transform combination consists of a row (horizontal) and a column (vertical) transform, then you can apply the row (horizontal) transform first and then apply the column (vertical) transform. However, the present invention is not limited thereto, and in the case of applying the opposite or non-separated transform, the non-separated transform may be applied immediately.
  • an inverse transform of DST-7 or an inverse transform of DCT-8 may be applied row by row after applying column by column.
  • different transformations may be applied to each row and / or each column.
  • the transform combination index may be obtained based on an MTS flag indicating whether MTS is performed. That is, the transform combination index may be obtained only when MTS is performed according to the MTS flag.
  • the decoder 100 may determine whether the number of non-zero coefficients is greater than a threshold value. In this case, the transform combination index may be obtained only when the number of non-zero transform coefficients is larger than a threshold.
  • the MTS flag or MTS index is a sequence, picture, slice, block, coding unit, transform unit, or prediction unit. ) May be defined at at least one level.
  • the inverse transform can be applied only when the width and height of the transform block are both 32 or less.
  • step S810 may be set and omitted in the encoder 100 and / or the decoder 200.
  • FIG. 9 is a flowchart illustrating a process of encoding an MTS flag and an MTS index according to an embodiment to which the present invention is applied.
  • the encoder 100 may determine whether MTS is applied to the current block (S910).
  • the encoder 100 may determine an MTS index based on at least one of a prediction mode, a horizontal transform, and a vertical transform of the current block.
  • the MTS index means an index indicating any one of a plurality of transform combinations for each intra prediction mode, and the MTS index may be transmitted for each transform block.
  • the encoder 100 may encode the MTS index determined in step S930 (S940).
  • FIG. 10 is a flowchart illustrating a decoding process of applying a horizontal transform or a vertical transform to a row or a column based on an MTS flag and an MTS index according to an embodiment to which the present invention is applied.
  • the decoder 200 may parse the MTS flag from the bitstream (S1010).
  • the MTS flag may indicate whether MTS is applied to the current block.
  • the decoder 200 may determine whether MTS is applied to the current block based on the MTS flag (S1020). For example, it may be checked whether the MTS flag is 1 or not.
  • the decoder 200 may determine whether the number of non-zero transform coefficients is greater than (or greater than) a threshold value (S1030). For example, the threshold for the number of transform coefficients may be set to 2, and the threshold may be set differently based on the block size or the size of the transform block.
  • the decoder 200 may parse the MTS index (S1040).
  • the MTS index means an index indicating any one of a plurality of transform combinations for each intra prediction mode or inter prediction mode.
  • the MTS index may be transmitted for each transform block.
  • the MTS index may mean an index indicating any one of the conversion combinations defined in the preset conversion combination table, and the preset conversion combination table may be set as shown in FIG. 6A or 6B. It is not limited to this.
  • the decoder 100 may derive or determine the horizontal transform and the vertical transform based on at least one of the MTS index and the prediction mode (S1050). In addition, the decoder 100 may induce a transform combination corresponding to the MTS index. For example, the decoder 100 may derive or determine the horizontal transform and the vertical transform corresponding to the MTS index.
  • the decoder 200 may apply a predetermined vertical inverse transform for each column (S1060).
  • the vertical inverse transform may be an inverse transform of DST-7.
  • the vertical inverse transform may be an inverse transform of the DCT-8.
  • the decoder may apply a predetermined horizontal inverse transformation for each row (S1070).
  • the horizontal inverse transform may be an inverse transform of DST-7.
  • the horizontal inverse transform may be an inverse transform of the DCT-8.
  • the transform type preset by the encoder 100 or the decoder 200 may be used.
  • a conversion type that is widely used for example, DCT-2, etc.
  • the decoder 200 may apply a predetermined vertical inverse for each column (S1080).
  • the vertical inverse transform may be an inverse transform of DCT-2.
  • the decoder 200 may apply a predetermined horizontal inverse for each row (S1090).
  • the horizontal inverse transform may be an inverse transform of DCT-2. That is, when the MTS flag is 0, a conversion type preset by the encoder or the decoder may be used. For example, a conversion type that is widely used may be used instead of being defined in the conversion combination table as shown in FIG. 6A or 6B.
  • FIG. 11 is an embodiment to which the present invention is applied and shows a flowchart of performing inverse transformation based on transformation related parameters.
  • the decoder 200 to which the present invention is applied may acquire sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag (S1110).
  • sps_mts_intra_enabled_flag indicates whether tu_mts_flag is present in a syntax for encoding a residual signal of an intra coding unit to which intra prediction is applied.
  • sps_mts_intra_enabled_flag 0 tu_mts_flag is not present in the syntax for encoding the residual signal of the coding unit to which intra prediction is applied
  • sps_mts_intra_enabled_flag 0 tu_mts_flag is the residual signal of the coding unit to which intra prediction is applied.
  • sps_mts_inter_enabled_flag indicates whether tu_mts_flag is present in a syntax for encoding a residual signal of an inter coding unit to which inter prediction is applied.
  • tu_mts_flag indicates whether the MTS is applied to the residual sample of the luma transform unit.
  • mts_idx indicates which transform kernel is applied to luma residual samples along the horizontal and / or vertical direction of the current transform block. For example, for mts_idx, at least one of the document embodiments may be applied. As a specific example, at least one of the embodiments of FIG. 6A, 6B, 44A, or 44B may be applied.
  • the decoder 200 may induce a transform kernel corresponding to mts_idx (S1140).
  • a transform kernel corresponding to mts_idx may be defined by being divided into a horizontal transform and a vertical transform.
  • transform kernels may be applied to the horizontal transform and the vertical transform.
  • present invention is not limited thereto, and the same transform kernel may be applied to the horizontal transform and the vertical transform.
  • mts_idx may be defined as shown in Table 1 below.
  • the decoder 200 may perform inverse transformation based on the transform kernel derived in operation S1140 (S1150).
  • an embodiment in which tu_mts_flag is acquired to determine whether MTS is applied and mts_idx is obtained based on the obtained tu_mts_flag value is determined based on an embodiment, but the present invention is not limited thereto.
  • the decoder 200 may directly parse mts_idx without determining tu_mts_flag to determine a conversion kernel. In this case, Table 1 described above may be used.
  • DCT-2 when the mts_idx value indicates 0, DCT-2 is applied in the horizontal / vertical direction, and when the mts_idx value indicates a value other than 0, DST-7 or DCT-8 may be applied according to the mts_idx value. .
  • the decoder 200 may check the transform size nTbS.
  • the transform size nTbS may be a variable representing a horizontal sample size of scaled transform coefficients.
  • the decoder 200 may check the transform kernel type trType.
  • the transform kernel type trType may be a variable indicating the type of the transform kernel, and various embodiments of the present disclosure may be applied.
  • the transform kernel type trType may include a horizontal transform kernel type trTypeHor and a vertical transform kernel type trTypeVer.
  • a translation kernel type (trType) of 0 may indicate DCT-2, 1 indicates DST-7, and 2 indicates DCT-8.
  • the decoder 200 may perform transform matrix multiplication based on at least one of a transform size nTbS or a transform kernel type.
  • the predetermined transform matrix 1 may be applied when performing the transform matrix multiplication.
  • the predetermined transform matrix 2 may be applied when performing the transform matrix multiplication.
  • the predetermined transform matrix 3 may be applied when performing the transform matrix multiplication.
  • the predefined transform matrix 4 may be applied.
  • the predefined transform matrices 5, 6, 7, and 8 can be applied, respectively.
  • the predefined conversion matrices (1) to (8) may respectively correspond to any one of various types of conversion matrices.
  • a transformation matrix of the type illustrated in FIGS. 6A and 6B may be applied.
  • the decoder 200 may derive the transform sample based on the transform matrix multiplication.
  • FIG. 12 is a table illustrating an example in which a transform set is allocated to each intra prediction mode in an NSST according to an embodiment to which the present invention is applied.
  • the secondary transform unit 122 may apply a secondary transform to the primary transformed signal, where the secondary transform may be defined as a table in the encoder 100 and / or the decoder 200.
  • the secondary transform may be subject to NSST conditional.
  • NSST is applied only to intra prediction blocks, and may have a transform set applicable to each prediction mode group.
  • NSST is omitted. If the size of the transform block is larger than 4x4, the NSST may be applied only to the 4x4 region on the upper left side.
  • the prediction mode group may be set based on symmetry with respect to the prediction direction. For example, since the prediction mode 52 and the prediction mode 16 are symmetrical based on the prediction mode 34 (diagonal direction), the same transform set may be applied by forming one group. In this case, when the transform for the prediction mode 52 is applied, the input data is transposed and then applied, since the prediction set 16 and the transform set are the same.
  • each transform set since there is no symmetry in the direction, each has a transform set, and the transform set may be composed of two transforms.
  • three transforms may be configured per transform set.
  • the present invention is not limited thereto, and each transform set may be composed of a plurality of transforms.
  • FIG. 13 shows a calculation flow diagram for Givens rotation as an embodiment to which the present invention is applied.
  • the NSST may not be applied to the entire first transformed block but may be applied only to a top-left 8 ⁇ 8 region.
  • the block size is 8x8 or more, 8x8 NSST is applied, and if the block size is less than 8x8, 4x4 NSST is applied.
  • 4x4 NSST is applied after dividing into 4x4 blocks.
  • NSST is omitted. If the size of the transform block is larger than 4x4, the NSST may be applied only to the 4x4 region on the upper left side.
  • 8x8 NSST and 4x4 NSST follow the transformation combination scheme described in this document, and because they are non-separable transforms, 8x8 NSST receives 64 data and outputs 64 data, and 4x4 NSST has 16 inputs and 16 Has outputs
  • Both 8x8 NSST and 4x4 NSST consist of a hierarchical combination of Givenns rotations.
  • a matrix corresponding to one Givens rotation is represented by Equation 1 below, and the matrix product is represented by Equation 2 below.
  • Givens rotation layer a bundle of 32 or 8 is used to form a Givens rotation layer.
  • Output data for one Givens rotation layer is passed as input data for the next Givens rotation layer.
  • FIG. 14 shows a round configuration in a 4x4 NSST composed of Givens rotation layer and permutations as an embodiment to which the present invention is applied.
  • Givens rotation layers are sequentially processed for the 4x4 NSST. As shown in FIG. 14, output data for one Givens rotation layer is transferred to input data for the next Givens rotation layer through i.e.shuffling.
  • the permutation pattern is regularly determined.
  • 4 ⁇ 4 NSST four Givens rotation layers and the permutations are combined to form a round.
  • the Givens rotation layers and permutations applied in the forward NSST are performed in the reverse order, and the rotation is performed by taking a negative value for each Givens rotation angle.
  • FIG. 15 is a block diagram illustrating an operation of a forward reduced transform and a forward reduced transform in an embodiment to which the present invention is applied.
  • Equation 3 When an orthogonal matrix representing a transform has an NxN form, a reduced transform (hereinafter, referred to as 'RT') leaves only R of N transform basis vectors (R ⁇ N).
  • 'RT' a reduced transform
  • the RT may be referred to as an 8x8 reduced quadratic transform (8x8 RST).
  • the forward 8x8 RST has a 16x64 matrix and the reverse 8x8 RST has a 64x16 matrix.
  • 8x8 RST the same transform set configuration as in FIG. 12 can be applied. That is, the corresponding 8x8 RST may be applied according to the transform set in FIG. 12.
  • one transform set when one transform set is composed of two or three transforms according to an intra prediction mode, one of up to four transforms may be selected, including not applying a quadratic transform. Can be configured to select.
  • one transform can be regarded as an identity matrix.
  • index 0 may be allocated to an identity matrix, that is, a case in which a quadratic transformation is not applied.
  • Equation 3 Applying the forward 8x8 RST as shown in Equation 3 generates 16 valid transform coefficients, it can be seen that 64 input data constituting the 8x8 region is reduced to 16 output data. From the perspective of the two-dimensional domain, only one quarter of the domain is filled with valid transform coefficients. Therefore, 16 output data obtained by applying the forward 8x8 RST can be filled in the 4x4 upper left region in FIG.
  • RST may also be referred to as a low frequency non-separable transform (LFNST).
  • LNNST low frequency non-separable transform
  • FIG. 16 illustrates an embodiment to which the present invention is applied and shows a process of performing a reverse scan from the 64 th to 17 th in the reverse scan order.
  • FIG. 16 illustrates scanning from the 17th coefficient to the 64th coefficient when the forward scan order starts from 1 (in the forward scan order). However, FIG. 16 shows a reverse scan, which indicates that the reverse scan is performed from the 64th to the 17th.
  • the upper left 4x4 region is a region of interest (ROI) to which a valid transform coefficient is assigned, and the remaining region is empty. That is, a value of 0 may be allocated to the remaining areas by default.
  • ROI region of interest
  • 8x8 RST may have been applied, so the NSST index is coded. can do.
  • conditional NSST index coding may be performed after the residual coding process because it is necessary to confirm the existence of non-zero transform coefficients.
  • NSST is omitted. If the size of the transform block is larger than 4x4, the NSST may be applied only to the 4x4 region on the upper left side.
  • FIG. 17 shows three forward scan sequences for a transform coefficient block (transform block) as an embodiment to which the present invention is applied.
  • Example 1-1 RST that can be applied to a 4x4 block
  • a non-separable transform that can be applied to one 4x4 block is a 16x16 transform.
  • a 16x1 vector may be formed, and a non-separated transform may be applied to the 16x1 vector. Can be applied.
  • the forward 16x16 transform consists of 16 row-direction transformed basis vectors, and if an inner product is applied to the 16x1 vector and each transformed basis vector, the transform coefficients for the transformed basis vector are obtained.
  • the process of obtaining the corresponding transform coefficients for all 16 transform basis vectors is equivalent to multiplying the 16x16 non-separated transform matrix by the input 16x1 vector.
  • the transform coefficients obtained by the matrix product have a 16 ⁇ 1 vector form, and statistical characteristics may be different for each transform coefficient. For example, when a 16x1 transform coefficient vector is composed of the 0 th element to the 15 th element, the variance of the 0 th element may be greater than the variance of the 15 th element. In other words, the larger the variance value is, the larger the element is.
  • the original 4x4 block signal may be recovered. If the forward 16x16 non-separated transform is an orthonormal transform, the corresponding reverse 16x16 transform may be obtained through a transpose matrix for the forward 16x16 transform.
  • elements constituting the 16 ⁇ 1 transform coefficient vector may have different statistical characteristics.
  • the inverse transform is applied to some of the transforming coefficients first without using all of the transform coefficients, so that the signal is quite close to the original signal. Can be restored.
  • the inverse 16x16 non-separation transform is composed of 16 column basis vectors, only 16 L column basis vectors may be left to form a 16xL matrix. If only L transform coefficients of the transform coefficients are left (Lx1 vector) and the 16xL matrix is multiplied with the Lx1 vector, the original input 16x1 vector data and the 16x1 vector having no large error may be restored.
  • the Lx1 transform coefficient vector may be obtained instead of the 16x1 transform coefficient vector when obtaining the transform coefficient. That is, by selecting L corresponding row direction transform vectors in the forward 16x16 non-separated transform matrix, constructing an Lx16 transform, and multiplying the 16x1 input vector, significant L transform coefficients may be obtained.
  • Example 1-2 4x4 RST Application Area Setup and Conversion Coefficient Arrangement
  • the 4x4 RST may be applied as a second order transform, and may be applied second to a block to which a primary transform such as DCT-2 is applied.
  • a primary transform such as DCT-2
  • the size of the block to which the first transform is applied is generally larger than 4x4. Therefore, when applying 4x4 RST to the NxN block, there are two methods as follows.
  • 4x4 RSTs are applied to NxN regions, but may be applied to only some regions.
  • 4x4 RST may be applied to each divided block.
  • the two methods may be mixed.
  • 4x4 RST may be applied to the divided MxM region.
  • the quadratic transformation is applied only to the upper left 8x8 region, 8x8 RST is applied when the NxN block is greater than or equal to 8x8, and second when the NxN block is smaller than 8x8 (4x4, 8x4, 4x8).
  • 4x4 RST may be applied to each of the 4x4 blocks after being divided into 4x4 blocks as in the embodiment.
  • coding starts from the position farthest from the DC position. This is to improve coding performance by taking advantage of the fact that the quantized coefficient value is zero or close to zero as it moves away from the DC position.
  • FIG. 17 illustrates three forward scan orders in units of a 4x4 transform group (CG) applied to HEVC.
  • CG 4x4 transform group
  • the present invention may be configured to determine the scan order according to the intra prediction mode in the same manner for the L transform coefficients.
  • FIG. 18 shows an embodiment to which the present invention is applied and shows positions of transform coefficients and forward scan order for each 4x4 block when a diagonal scan is applied and a 4x4 RST is applied to the upper left 4x8 block.
  • each 4x4 block may have a transform coefficient, and a value of 0 may be assigned by default for positions marked with X.
  • the L coding coefficients are placed for each 4x4 block according to the scan order shown in FIG. 17, and residual coding is applied assuming that the remaining (16-L) positions of each 4x4 block are filled with zeros. can do.
  • FIG. 19 illustrates an embodiment to which the present invention is applied and combines valid transform coefficients of two 4x4 blocks into one 4x4 block when a diagonal scan is applied in the upper left 4x8 block and 4x4 RST is applied. .
  • L transform coefficients arranged in two 4 ⁇ 4 blocks may be combined into one.
  • the transform coefficients of the two 4x4 blocks are summed up completely filling one 4x4 block, so that no transform coefficients remain in the other 4x4 block.
  • the corresponding coded_sub_block_flag may be coded as zero.
  • transform coefficients of two 4x4 blocks may be used. Although may be combined in any order, embodiments of the present invention may provide the following methods.
  • Transform coefficients for the first 4x4 block may be placed first, followed by transform coefficients for the second 4x4 block.
  • Example 1-3 Method of coding NSST index for 4x4 RST
  • 0 values may be filled from L + 1 to 16th according to the transform coefficient scan order for each 4x4 block.
  • any one of the two 4x4 blocks is a non-zero value among the L + 1st to 16th positions, it can be seen that 4x4 RST is not applied.
  • a transform index (which can be referred to as an NSST index in this embodiment) to which transform to apply may be signaled.
  • the decoder 200 may know the NSST index through bitstream parsing, and assume that bitstream parsing is performed after residual decoding.
  • the 4x4 RST is not applied and the NSST index may be set not to be parsed.
  • the NSST index can be selectively parsed only when necessary, thereby reducing the signaling cost.
  • 4x4 RST is applied to a plurality of 4x4 blocks in a specific region as shown in FIG. 18 (for example, all of the same 4x4 RST may be applied or different 4x4 RST may be applied), the NSST index may be used.
  • a 4x4 RST that applies to all 4x4 blocks can be specified. In this case, the same 4x4 RST may be specified, or 4x4 RST applied to each of all 4x4 blocks may be specified.
  • the residual decoding process determines whether a non-zero transform coefficient exists at L + 1 th to 16 th positions for all 4x4 blocks. You can check it. As a result, if a non-zero transform coefficient exists (L + 1 to 16th position) in a position that is not allowed in one 4x4 block, the NSST index may not be coded.
  • NSST indexes may be signaled separately for luma blocks and chroma blocks, and in the case of chroma blocks, separate NSST indexes may be signaled for Cb and Cr, and one NSST index is shared between luma blocks and chroma blocks. May be
  • 4x4 RST indicated by the same NSST index may be applied.
  • the 4x4 RST for Cb and Cr may be the same, and the NSST index is the same, but separate 4x4 RST may be used.
  • the signaling for the NSST index may be configured not to be performed.
  • Example 1-4 Optimization Method for Coding of NSST Indexes Before Residual Coding
  • whether to apply 4x4 RST may be configured to know through the NSST index. For example, if the NSST index is 0, 4x4 RST is not applied.
  • whether 4x4 RST is applied may be signaled through a separate syntax element (eg, NSST flag).
  • NSST flag a separate syntax element
  • the decoder 200 parses the NSST flag first and checks whether 4x4 RST is applied, and if the NSST flag value is 1, positions where no valid transform coefficient can exist. Residual coding can be omitted for.
  • the encoder 100 first codes the last non-zero transform coefficient position on the TU when performing residual coding. If the coding for the NSST index is performed after the last non-zero transform coefficient coding and the position of the last non-zero transform coefficient is assumed to apply 4x4 RST, the non-zero transform is performed. If the non-zero transform coefficient is found to be a location where it cannot occur, the encoder 100 may be configured not to apply the 4x4 RST without coding the NSST index.
  • no valid transform coefficients are located when 4x4 RST is applied (eg, zero values, etc. may be filled), so that encoder 100 is located in the region marked with X. If the last non-zero transform 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 of the NSST index may be performed.
  • the remaining residual coding portion may be performed using the following two methods. Can be processed.
  • sig_coeff_flag is an example of a flag indicating whether a non-zero transform coefficient exists at a corresponding position.
  • coded_sub_block_flag for a 4x4 block allocated to 0 may be omitted, and a corresponding value coded_sub_block_flag may be set to zero.
  • the x position (P x ) and y position (P y ) of the last nonzero transform coefficient are the x position (T x ) of the transform block, respectively.
  • NSST index coding is omitted when smaller than y position (T y ), and may be configured such that 4x4 RST is not applied.
  • the method of determining whether to code NSST index by comparing with the threshold may be applied differently to luma and chroma. For example, different T x and T y may be applied to luma and chroma, and a threshold may be applied to luma and not to chroma. Or vice versa.
  • the threshold value for the position coordinates of the last non-zero transform coefficient may be first checked, and then, whether the last non-zero transform coefficient is located in an area where no valid transform coefficient exists. Or you can change the order.
  • the methods presented in the fourth embodiment may also be applied to an 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 may be omitted, otherwise NSST index coding may be performed.
  • coding for the NSST index may be omitted.
  • the two methods may be applied together.
  • Example 1-5 Different NSST Index Coding and Residual Coding Schemes for Luma Block and Chroma Block in RST Application
  • the schemes of embodiments 1-4 may be applied to luma blocks, and the schemes of embodiments 1-3 may be applied to chroma blocks.
  • the conditional NSST index coding shown in Examples 1-3 or 1-4 may be applied to the luma block, and conditional NSST index coding may not be applied to the chroma block. Or vice versa.
  • RST reduced secondary transform
  • the encoder 100 may determine (or select) a forward secondary transform based on at least one of a prediction mode, a block shape, and / or a block size of the current block (S2010).
  • the candidate of the forward secondary transform may include at least one of the embodiments of FIG. 6 and / or 12.
  • the encoder 100 may determine an optimal forward secondary transform through rate-distortion optimization.
  • the optimal forward quadratic transform may correspond to one of a plurality of transform combinations, and the plurality of transform combinations may be defined by a transform index.
  • the encoder 100 may compare the results of performing forward quadratic transformation, quantization, residual coding, etc. on each candidate. At this time, or Formulas such as the above can be used, but the present invention is not limited thereto.
  • the encoder 100 may signal a secondary transform index corresponding to the optimal forward secondary transform (S2020).
  • S2020 optimal forward secondary transform
  • other embodiments described herein may be applied to the secondary transform index.
  • the transform set configuration of FIG. 12 may be used as the secondary transform index. Since one transform set is composed of two or three transforms according to the intra prediction mode, the transform set may be configured to select one of up to four transforms up to and including the case where no secondary transform is applied. Given an index of 0, 1, 2, and 3 for each of the 4 transforms, the encoder 100 may designate a transform to be applied by signaling the secondary transform index per transform coefficient block. In this case, the encoder 100 may allocate index 0 as an identity matrix, that is, when a quadratic transformation is not applied.
  • the signaling of the secondary transform index can be either: 1) before residual coding, 2) during residual coding intermediate (after the last non-zero transform coefficient position coding), or 3) after residual coding. Can be performed in a step.
  • the encoder 100 may determine the forward secondary transform.
  • the encoder 100 may code a secondary transform index corresponding to a forward secondary transform.
  • the encoder 100 may code the location of the last non-zero transform coefficient.
  • the encoder 100 may perform residual coding on syntax elements other than the position of the last non-zero transform coefficient.
  • the encoder 100 may determine the forward secondary transform.
  • the encoder 100 may code the location of the last non-zero transform coefficient.
  • the encoder 100 may code a secondary transform index corresponding to the forward secondary transform.
  • the specific region indicates the remaining region except for the position where the non-zero transform coefficient may exist when the transform coefficients are arranged in the scan order.
  • the present invention is not limited thereto.
  • the encoder 100 may perform residual coding on syntax elements other than the position of the last non-zero transform coefficient.
  • the encoder 100 may determine the forward secondary transform.
  • the encoder 100 may code the location of the last non-zero transform coefficient.
  • the encoder 100 may perform residual coding on syntax elements other than the position of the last non-zero transform coefficient.
  • the specific region represents the remaining region except for the position where the non-zero transform coefficient may exist when the transform coefficients are arranged according to the scan order when the reduced secondary transform is applied.
  • the present invention is not limited thereto.
  • the encoder 100 may code a secondary transform index corresponding to a forward secondary transform.
  • the encoder 100 may perform forward first order transform on the current block (residual block) (S2030).
  • step S2010 and / or step S2020 may be similarly applied.
  • the encoder 100 may perform forward secondary transform on the current block by using an optimal forward secondary transform (S2040).
  • the optimal forward quadratic transformation may be a reduced quadratic transformation.
  • the reduced secondary transform is a transform in which N residual data (Nx1 residual vector) is input and L (L ⁇ N) transform coefficient data (Lx1 transform coefficient vector) is output.
  • the reduced secondary transform may be applied to a specific area of the current block.
  • a specific region may mean an upper left N / 2xN / 2 region.
  • the present invention is not limited thereto and may be differently set according to at least one of a prediction mode, a block shape, or a block size.
  • the encoder 100 may generate a transform coefficient block by performing quantization on the current block (S2050).
  • the encoder 100 may perform entropy encoding on the transform coefficient block to generate a bitstream.
  • FIG. 21 illustrates a flowchart of decoding a video signal based on a reduced secondary transform (RST) according to an embodiment to which the present invention is applied.
  • RST reduced secondary transform
  • the decoder 200 may obtain a secondary transform index from the bitstream (S2110).
  • a secondary transform index may include at least one of the embodiments of FIGS. 6A, 6B and / or 12.
  • the obtaining of the secondary transform index can be performed either 1) before residual decoding, 2) during intermediate decoding (after the last non-zero transform coefficient position decoding), or 3) after residual decoding. It can be carried out in the step of.
  • the decoder 200 may induce a secondary transform corresponding to the secondary transform index (S2120).
  • the candidate of the secondary transform may include at least one of the embodiments of FIG. 6 and / or FIG. 12.
  • steps S2110 and S2120 are an embodiment, and the present invention is not limited thereto.
  • the decoder 200 may derive the secondary transform based on at least one of the prediction mode, the block shape, and / or the block size of the current block without obtaining the secondary transform index.
  • the decoder 200 may entropy decode the bitstream to obtain a transform coefficient block, and perform inverse quantization on the transform coefficient block (S2130).
  • the decoder 200 may perform inverse secondary transform on the dequantized transform coefficient block (S2140).
  • the reverse secondary transform may be a reduced secondary transform.
  • the reduced secondary transform refers to a transform in which N residual data (Nx1 residual vector) is input and L (L ⁇ N) transform coefficient data (Lx1 transform coefficient vector) is output.
  • the reduced secondary transform may be applied to a specific area of the current block.
  • a specific region may mean an upper left N / 2xN / 2 region.
  • the present invention is not limited thereto and may be differently set according to at least one of a prediction mode, a block shape, or a block size.
  • the decoder 200 may perform inverse first-order transform on the result of the inverse second-order transform (S2150).
  • the decoder 200 generates a residual block through operation S2150 and generates a reconstruction block by adding the residual block and the prediction block.
  • Example 2-1 No Quadratic Transformation for a 4x4 Transformation Block
  • FIG. 22 shows an example of a transform block and an upper left 4x4 area according to an embodiment of the present invention.
  • a non-separable transform when applied as a quadratic transform to the upper left 4x4 region, a large amount of computation may be generated as compared with a case where a separable transform is applied. For example, if a non-separated transform is given as a 16x16 matrix, applying a quadratic transform to the upper left 4x4 region requires a total of 256 multiplications.
  • the size of the transform block is 4x4, it is possible to force not to apply the quadratic transform. In other words, when the size of the transform block is 4x4, it may be set to apply only up to the first transform.
  • Example 2-2 Selection of Secondary Transformation in Example 2-1
  • Embodiment 2-1 a method of applying the quadratic transformation only to the upper left 4x4 region of the transform block is proposed.
  • Examples of quadratic transformations that can be applied in the configuration of the embodiment 2-1 are as follows.
  • RST Reduced secondary transform
  • JEM NSST that can be applied to the 4x4 region: A Givens rotation based transformation having 16 data inputs and 16 data outputs, which has been described with reference to FIGS. 13 to 15.
  • LGT Layered Givens transform
  • any other kind of secondary transform can be applied.
  • Example 2-3 Selection of the First-order Transform for the Transformation Block of 4x4 in the Configuration of Example 2-1
  • the quadratic transformation is not applied when the transform block is 4x4. Therefore, the case where the transform block is 4x4 may be configured to apply only the primary transform.
  • enumerating applicable primary transforms is as follows.
  • DST-7 or DCT-8 may be applied in the horizontal direction and DST-7 or DCT-8 may be applied in the vertical direction.
  • a translation pair may be constructed.
  • FIG. 23 shows an example of a table for determining a transform type for a horizontal direction and a vertical direction according to a prediction mode
  • FIG. 23A shows a transform pair applied to a residual generated through intra prediction
  • FIG. 23B shows a screen. Represents a transform pair applied to a residual generated through inter prediction.
  • a transform type corresponding to an index indicating a transform type has a horizontal direction. Can be determined for both and vertical directions, respectively.
  • DST-7 is determined as the transform type for the horizontal direction and the vertical direction
  • DCT-8 is determined as the transform type for the horizontal direction
  • DCT-8 is determined as the conversion type for the vertical direction
  • the MTS index is 3
  • the horizontal DCT-8 is determined as the conversion type for both the direction and the vertical direction.
  • a transform type corresponding to an index indicating a transform type has a horizontal direction. And for the vertical direction, respectively.
  • DCT-8 is determined as the conversion type for both the horizontal direction and the vertical direction
  • the MTS index is 1
  • the DST-7 is used as the conversion type for the horizontal direction.
  • DCT-8 is determined as the transform type for the MTS index and 2
  • the DCT-8 is determined as the transform type for the horizontal direction and DST-7 as the transform type for the vertical direction
  • the MTS index is 3
  • DST-7 is determined as the conversion type for both the horizontal direction and the vertical direction.
  • Example 2-4 Apply the second order transform of Example 2-2 and the first order transform of Example 2-3 in the configuration of Example 2-1
  • Example 2-1 one of the quadratic transforms presented in Example 2-2 may be applied to the upper left 4x4, and one of the primary transforms shown in Example 2-3 may be applied to the 4x4 transform block. have.
  • the primary transform for the case where the size of the transform block is not 4x4 may be the same as or different from the primary transform applied to the 4x4 transform block.
  • the table shown in FIGS. 23A and 23B may be used for the JEM MTS shown in FIGS. 6A and 6B, or a transform pair of the JEM MTS.
  • FIG. 24 is a flowchart of a method of encoding a video signal according to an embodiment of the present invention.
  • FIG. 24 shows an example of the operation of the encoder 100 of FIG. 1.
  • the encoder 100 may identify a transform block including residual samples after prediction.
  • the encoder 100 may derive the prediction samples through the prediction for the current block. For example, the encoder 100 may determine whether to perform inter-screen prediction or intra-screen prediction on the current block, and based on a rate-distortion cost, a specific prediction mode (specific inter-screen). Prediction mode or a specific intra prediction mode). According to the determined mode, the encoder 100 may derive prediction samples for the current block. The encoder 100 may then derive the residual samples by comparing the original samples and the predictive samples in the current block. For example, encoder 100 may derive residual samples by removing prediction samples from the current block. In addition, the encoder 100 may identify a transform block composed of residual samples.
  • the encoder 100 may generate transform coefficients through transform on residual samples included in the transform block. More specifically, the encoder 100 may generate transform coefficients of the frequency domain by applying at least one transform to residual samples of the spatial domain included in the transform block. A detailed conversion process according to an embodiment of the present invention will be described in detail with reference to FIG. 25.
  • the encoder 100 may perform quantization and entropy coding on the transform coefficients. More specifically, the encoder 100 may generate an encoded video signal by performing quantization and entropy coding on the transform samples generated in operation S2420.
  • the encoder 100 may encode image information including information about prediction and information about residual samples, and output the encoded image information in the form of a bitstream.
  • the information on the prediction may include prediction mode information and motion information (when inter prediction is applied) as information related to the prediction procedure.
  • the information about the residual samples may include information about the quantized transform coefficients.
  • the output bitstream may be delivered to the decoder 200 through a storage medium or a network.
  • the encoder 100 derives prediction samples through prediction on the current block, generates residual samples for the current block based on the prediction sample, and transforms through a transform (first-order / second-order transform) procedure. Coefficients may be derived, quantized transform coefficients may be derived through quantization, and image information including prediction information and residual information may be encoded.
  • FIG. 25 illustrates an example of a conversion process according to a size of a transform block in an encoding process of a video signal according to an embodiment of the present invention.
  • FIG. 25 shows an example of step S2420 of FIG. 24.
  • the encoder 100 may perform forward first order transform on a transform block including residual samples. More specifically, the encoder 100 may apply a forward first order transform to each of the horizontal direction and the vertical direction of the transform block including the residual samples.
  • the forward primary transform may be referred to as a separable primary transform.
  • the forward primary transformation may include a horizontal transformation and a vertical transformation.
  • the forward primary transform can also be determined by a combination of DCT-2, DST-7, or DCT-8.
  • the forward first order transform may be configured as shown in FIGS. 6A, 6B, or 24A, 24B.
  • the encoder 100 may determine whether the size of the transform block is less than or equal to 4 ⁇ 4.
  • the size of the transform block may mean the number of samples included in the transform block.
  • the size 4x4 of the transform block indicates that the number of samples in the horizontal direction and the vertical direction is four, respectively, which means that the horizontal block (row direction) is composed of four components and the vertical direction (column direction) is composed of four.
  • the transform block may be set such that the horizontal (row) size and the vertical (column) size are the same, in which case it is determined whether the transform horizontal size or the vertical size is less than or equal to four. Can be.
  • step S2530 the encoder 100 may omit the forward secondary transform. That is, when the size of the transform block is less than or equal to 4x4, the encoder 100 may perform quantization on the transform coefficients without performing additional transform on the transform coefficients generated by applying the forward first order transform. Can be.
  • the encoder 100 may proceed to step S2540.
  • the encoder 100 may apply a forward secondary transform.
  • the encoder 100 may generate modified transform coefficients by additionally applying a second transform on transform coefficients generated as a result of the forward primary transform.
  • a non-separable secondary transform may be used.
  • the forward quadratic transformation may be applied to the upper left 4x4 region of the transform block.
  • the non-separated secondary transform is a reduced secondary transform (RST) that is an Lx16 matrix, where L is a sparse orthonormal transform (SOT) that is less than or equal to 16 and a 16x16 matrix, 16 inputs and 16 outputs.
  • RST reduced secondary transform
  • SOT sparse orthonormal transform
  • FIG. 26 is a flowchart of a decoding process of a video signal according to an embodiment of the present invention.
  • FIG. 26 shows an example of the operation of the decoder 100 of FIG.
  • the decoder 100 may generate a transform block including transform coefficients through entropy decoding and inverse quantization.
  • the decoder 100 may generate a transform block composed of transform coefficients that are subject to inverse transform through entropy decoding and inverse quantization of a bitstream of a video signal to be decoded.
  • the decoder 100 may generate residual samples through inverse transform on the transform coefficients of the transform block.
  • the reverse conversion process according to the embodiment of the present invention will be described in detail with reference to FIG. 27.
  • the decoder 100 may generate a reconstructed picture through prediction from the residual samples.
  • the decoder 100 may derive prediction samples by performing inter-screen prediction or intra-picture prediction on the current block based on the prediction information.
  • the decoder 100 may generate the original picture by combining the residual samples generated through the inverse transform process and the prediction samples generated through the prediction process.
  • FIG. 27 shows an example of a conversion process according to a size of a transform block in a decoding process of a video signal according to an embodiment of the present invention.
  • FIG. 27 shows an example of step S2620 of FIG. 26.
  • the decoder 200 may determine whether the size of the transform block is less than or equal to 4 ⁇ 4.
  • the size of the transform block may mean the number of transform coefficients included in the transform block.
  • the size 4x4 of the transform block indicates that the number of samples in the horizontal direction and the vertical direction is four, respectively, which means that the horizontal block (row direction) is composed of four components and the vertical direction (column direction) is composed of four.
  • the transform block may be set such that the horizontal (row) size and the vertical (column) size are the same, in which case it is determined whether the transform horizontal size or the vertical size is less than or equal to four. Can be.
  • the decoder 100 may proceed to step S2720.
  • the decoder 200 may omit reverse secondary transform. That is, if the size of the transform block is less than or equal to 4x4, the decoder 100 proceeds to step S2740 without performing the inverse second transform and applies the inverse first transform to the residual samples generated as a result of the inverse first transform. Prediction can be performed.
  • the decoder 200 may proceed to step S2730.
  • the decoder 200 may apply inverse secondary transform.
  • the non-separable secondary transform may be used as the reverse secondary transform.
  • inverse second order transform may be applied to the upper left 4x4 region of the transform block.
  • the non-separated secondary transform is a reduced secondary transform (RST) that is an Lx16 matrix, where L is a sparse orthonormal transform (SOT) that is less than or equal to 16 and a 16x16 matrix, 16 inputs and 16 outputs.
  • RST reduced secondary transform
  • SOT sparse orthonormal transform
  • decoder 200 may generate a transform block that includes the modified transform coefficients.
  • the decoder 200 may proceed to step S2710.
  • the decoder 200 may perform inverse first-order transform on a transform block including transform coefficients generated by applying inverse quantization or modified transform coefficients generated by applying inverse second transform. More specifically, the decoder 200 may apply a reverse first order transform to each of the horizontal direction and the vertical direction of the transform block including the transform coefficients.
  • the reverse primary transform may be referred to as a separable primary transform.
  • the reverse first order transformation may include a horizontal direction transformation and a vertical direction transformation.
  • the reverse first order transformation may be determined based on DCT-2, DST-7, or DCT-8.
  • the reverse first order transformation may be configured as shown in FIGS. 6A, 6B, or 24A, 24B.
  • Secondary transform that can be applied to the present invention is not limited to the above-described transforms, and between a forward primary transform step and a quantization step based on an encoder, an inverse quantization step and an inverse primary order based on a decoder Various kinds of non-separated secondary transforms that can be applied between transformation steps can be applied to the present invention.
  • FIG. 28 shows an example of a video coding system as an embodiment to which the present invention is applied.
  • the video coding system can include a source device and a receiving device.
  • the source device may deliver the encoded video / image information or data to a receiving device through a digital storage medium or network in a file or streaming form.
  • the source device may include a video source, an encoding apparatus, and a transmitter.
  • the receiving device may include a receiver, a decoding apparatus, and a renderer.
  • the encoding device may be called a video / image encoding device, and the decoding device may be called a video / image decoding device.
  • the transmitter may be included in the encoding device.
  • the receiver may be included in the decoding device.
  • the renderer may include a display unit, and the display unit may be configured as a separate device or an external component.
  • the video source may acquire the video / image through a process of capturing, synthesizing, or generating the video / image.
  • the video source may comprise 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, video / image archives including previously captured video / images, and the like.
  • Video / image generation devices may include, for example, computers, tablets and smartphones, and may (electronically) generate video / images.
  • a virtual video / image may be generated through a computer or the like. In this case, the video / image capturing process may be replaced by a process of generating related data.
  • the encoding device may encode the input video / image.
  • the encoding apparatus may perform a series of procedures such as prediction, transform, and quantization for compression and coding efficiency.
  • the encoded data (encoded video / image information) may be output in the form of a bitstream.
  • the transmitter may transmit the encoded video / video information or data output in the form of a bitstream to the receiver of the receiving device through a digital storage medium or a network in the form of a file or streaming.
  • the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, and the like.
  • 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 extract the bitstream and transmit the extracted bitstream to the decoding apparatus.
  • the decoding apparatus may decode the video / image by performing a series of procedures such as inverse quantization, inverse transformation, and prediction corresponding to the operation of the encoding apparatus.
  • the renderer may render the decoded video / image.
  • the rendered video / image may be displayed through the display unit.
  • FIG 29 shows an example of a video streaming system as an embodiment to which the present invention is 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 compresses content input from multimedia input devices such as a smart phone, a camera, a camcorder, etc. into digital data to generate a bitstream and transmit the bitstream to the streaming server.
  • multimedia input devices such as smart phones, cameras, camcorders, etc. 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 the multimedia data to the user device based on the user's request through the web server, and the web server serves as a medium for informing the user of what service.
  • the web server delivers it to a streaming server, and the streaming server transmits multimedia data to the user.
  • the content streaming system may include a separate control server.
  • the control server plays a role of controlling a command / response between devices in the content streaming system.
  • the streaming server may receive content from a media store and / or an encoding server. For example, when the 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 digital broadcasting terminal, a personal digital assistant (PDA), a portable multimedia player (PMP), navigation, a slate PC, Tablet PCs, ultrabooks, wearable devices, such as smartwatches, glass glasses, head mounted displays, digital TVs, desktops Computer, digital signage, and the like.
  • PDA personal digital assistant
  • PMP portable multimedia player
  • slate PC slate PC
  • Tablet PCs ultrabooks
  • wearable devices such as smartwatches, glass glasses, head mounted displays, digital TVs, desktops Computer, digital signage, and the like.
  • Each server in the content streaming system may be operated as a distributed server, in which case data received from each server may be distributed.
  • Embodiments described in the present invention may be implemented and performed on a processor, a microprocessor, a controller, or a chip.
  • the functional units shown in each drawing may be implemented and performed on a computer, processor, microprocessor, controller, or chip.
  • the decoder and encoder to which the present invention is applied include a multimedia broadcasting transmitting and receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video chat device, a real time communication device such as video communication, a mobile streaming device, 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, video telephony video devices, and medical video devices. It can be used to process video signals or data signals.
  • the OTT video device may include a game console, a Blu-ray player, an internet access TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), and the like.
  • the processing method to which the present invention is applied can be produced in the form of a program executed by a computer, 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 may be, for example, a Blu-ray disc (BD), a universal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical disc. It may include a data storage device.
  • the computer-readable recording medium also includes media embodied in the form of a carrier wave (eg, transmission over 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, which may be performed on a computer by an embodiment of the present invention.
  • the program code may be stored on a carrier readable by a computer.
  • the embodiments described herein may be implemented and performed on a processor, microprocessor, controller, or chip.
  • the functional units shown in each drawing may be implemented and performed on a computer, processor, microprocessor, controller, or chip.
  • the decoder and encoder to which the present invention is applied include a multimedia broadcasting transmitting and receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video chat device, a real time communication device such as video communication, a mobile streaming device, 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, video telephony video devices, and medical video devices. It can be used to process video signals or data signals.
  • the OTT video device may include a game console, a Blu-ray player, an internet access TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), and the like.
  • the processing method to which the present invention is applied can be produced in the form of a program executed by a computer, 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 may be, for example, a Blu-ray disc (BD), a universal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical disc. It may include a data storage device.
  • the computer-readable recording medium also includes media embodied in the form of a carrier wave (eg, transmission over 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, which may be performed on a computer by an embodiment of the present invention.
  • the program code may be stored on a carrier readable by a computer.
  • each component or feature is to be considered optional unless stated otherwise.
  • Each component or feature may be embodied in a form that is not combined with other components or features. It is also possible to combine some of the components and / or features to form an embodiment of the invention.
  • the order of the operations described in the embodiments of the present invention may be changed. Some components or features of one embodiment may be included in another embodiment or may be replaced with corresponding components or features of another embodiment. It is obvious that the claims may be combined to form an embodiment by combining claims that do not have an explicit citation relationship in the claims or as new claims by post-application correction.
  • Embodiments according to the present invention may be implemented by various means, for example, hardware, firmware, software, or a combination thereof.
  • an embodiment of the present invention may include one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), and FPGAs ( field programmable gate arrays), processors, controllers, microcontrollers, microprocessors, and the like.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGAs field programmable gate arrays
  • an embodiment of the present invention may be implemented in the form of a module, procedure, function, etc. that performs the functions or operations described above.
  • the software code may be stored in memory and driven by the processor.
  • the memory may be located inside or outside the processor, and may exchange data with the processor by various known means.

Landscapes

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

Abstract

본 발명의 실시예들은 비디오 신호 처리 방법을 제공한다. 본 발명의 실시예에 따른 비디오 신호의 인코딩 방법은, 상기 비디오 신호의 픽처에서 예측 샘플을 제외한 잔차 샘플들을 포함하는 변환 블록을 확인하는 단계와, 상기 변환 블록의 사이즈에 기반하여 상기 변환 블록의 잔차 샘플들에 대한 변환을 통해 변환 계수들을 생성하는 단계와, 상기 변환 계수들에 대해 양자화 및 엔트로피 코딩을 수행하는 단계를 포함하고, 상기 변환 계수들을 생성하는 단계는, 상기 잔차 샘플들을 포함하는 변환 블록의 수평 방향 및 수직 방향 각각에 대해 순방향(forward) 1차 변환(primary transform)을 적용하는 단계와, 상기 변환 블록의 사이즈가 4x4 보다 작거나 같은 경우, 상기 1차 변환이 적용된 변환 블록에 대한 순방향(forward) 비-분리 2차 변환(non-separable secondary transform)을 적용하지 않고, 상기 변환 블록의 사이즈가 4x4 보다 큰 경우, 상기 변환 블록에 대해 상기 순방향 비-분리 2차 변환을 적용하는 단계를 포함할 수 있다.

Description

비디오 신호를 처리하기 위한 방법 및 장치
본 발명은 비디오 신호를 처리하기 위한 방법 및 장치에 관한 것으로서, 특히 4x4 사이즈의 변환 블록에 대하여 2차 변환(non-separable secondary transform)의 적용을 생략함으로써 비디오 신호를 인코딩 및 디코딩하기 위한 방법 및 장치에 관한 것이다.
압축 부호화란 디지털화한 정보를 통신 회선을 통해 전송하거나, 저장 매체에 적합한 형태로 저장하기 위한 일련의 신호 처리 기술을 의미한다. 영상, 이미지, 음성 등의 미디어가 압축 부호화의 대상이 될 수 있으며, 특히 영상을 대상으로 압축 부호화를 수행하는 기술을 비디오 영상 압축이라고 일컫는다.
차세대 비디오 컨텐츠는 고해상도(high spatial resolution), 고프레임율(high frame rate) 및 영상 표현의 고차원화(high dimensionality of scene representation)라는 특징을 갖게 될 것이다. 그러한 컨텐츠를 처리하기 위해서는 메모리 저장(memory storage), 메모리 액세스율(memory access rate) 및 처리 전력(processing power) 측면에서 엄청난 증가를 가져올 것이다.
따라서, 차세대 비디오 컨텐츠를 보다 효율적으로 처리하기 위한 코딩 툴을 디자인할 필요가 있다. 특히, HEVC(high efficiency video coding) 표준 이후의 비디오 코덱 표준은 공간 영역(spatial domain)의 비디오 신호를 주파수 영역(frequency domain)으로 변환시키기 위하여 효율적인 변환 기술을 필요로 한다.
효율적인 변환 기술의 구현을 위하여 저-복잡도(low-complexity)의 변환 기술을 제공하기 위한 방법 및 장치가 요구되고 있다.
따라서, 본 발명의 실시예들은, 낮은 복잡도로 변환을 수행하기 위한 비디오 신호 처리 방법 및 장치를 제공하고자 한다.
또한, 본 발명의 실시예들은, 비-분리 2차 변환(non-separable secondary transform)의 생략을 통해 연산 복잡도를 감소시킬 수 있는 비디오 신호 처리 방법 및 장치를 제공한다.
본 발명에서 이루고자 하는 기술적 과제들은 이상에서 언급한 기술적 과제들로 제한되지 않으며, 언급하지 않은 또 다른 기술적 과제들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.
본 발명의 실시예에 따른 비디오 신호의 인코딩 방법은, 상기 비디오 신호의 픽처에서 예측 샘플을 제외한 잔차 샘플들을 포함하는 변환 블록을 확인하는 단계와, 상기 변환 블록의 사이즈에 기반하여 상기 변환 블록의 잔차 샘플들에 대한 변환을 통해 변환 계수들을 생성하는 단계와, 상기 변환 계수들에 대해 양자화 및 엔트로피 코딩을 수행하는 단계를 포함하고, 상기 변환 계수들을 생성하는 단계는, 상기 잔차 샘플들을 포함하는 변환 블록의 수평 방향 및 수직 방향 각각에 대해 순방향(forward) 1차 변환(primary transform)을 적용하는 단계와, 상기 변환 블록의 사이즈가 4x4 보다 작거나 같은 경우, 상기 1차 변환이 적용된 변환 블록에 대한 순방향 비-분리 2차 변환(non-separable secondary transform)의 적용을 생략하고, 상기 변환 블록의 사이즈가 4x4 보다 큰 경우, 상기 변환 블록에 대해 상기 순방향 비-분리 2차 변환을 적용하는 단계를 포함할 수 있다.
본 발명의 실시예에 따르면, 상기 변환 블록에 대해 순방향 비-분리 2차 변환을 적용하는 단계는, 상기 변환 블록의 좌상측 4x4 영역에 대하여 상기 순방향 비-분리 2차 변환을 적용하는 단계를 포함할 수 있다.
또한, 본 발명의 실시예에 따른 순방향 비-분리 2차 변환은, Lx16 행렬인 RST(reduced secondary transform), 여기서 L은 16보다 작거나 같고, 16x16 형태의 행렬인 SOT(sparse orthonormal transform), 16개의 입력과 16개의 출력을 갖는 기븐스 로테이션(givens rotation) 기반의 변환, 또는 16개의 입력과 16개의 출력을 가지면서 두 인접한 기븐스 로테이션 레이어 사이에서 지정된 치환(permutation)을 적용하는 레이어드 기븐스 변환(layered givens transform) 중 적어도 하나를 포할 수 있다.
또한, 본 발명의 실시예에 따른 상기 순방향 1차 변환은, 변환 블록에 대한 수평 방향 변환과 수직 방향 변환을 포함하고, 상기 수평 방향 변환과 상기 수직 방향 변환은, DCT-2, DST-7, 및 DCT-8의 조합에 의해 설정될 수 있다.
본 발명의 실시예에 따른 비디오 신호의 디코딩 방법은, 상기 비디오 신호에 대한 엔트로피 디코딩 및 역양자화를 수행함으로써 변환 계수들을 포함하는 변환 블록을 생성하는 단계와, 상기 변환 블록의 사이즈에 기반하여 상기 변환 블록의 변환 계수들에 대한 역방향 변환을 통해 잔차 신호들을 생성하는 단계와, 상기 잔차 신호들로부터 예측을 통해 예측 신호를 생성함으로써 복원 픽처를 생성하는 단계를 포함하고, 상기 역변환을 수행하는 단계는, 상기 변환 블록의 사이즈가 4x4 보다 작거나 같은 경우, 상기 변환 블록에 대한 역방향(inverse) 비-분리 2차 변환(non-separable secondary transform)의 적용을 생략하고, 상기 변환 블록의 사이즈가 4x4 보다 큰 경우, 상기 변환 블록에 대해 상기 역방향 비-분리 2차 변환을 적용하는 단계와, 상기 변환 블록에 대해 수평 및 수직 방향으로 분리하여 역방향 1차 변환(primary transform)을 적용하는 단계를 포함할 수 있다.
본 발명의 실시예에 따르면, 상기 변환 블록에 대해 상기 역방향 비-분리 2차 변환을 적용하는 단계는, 상기 변환 블록의 좌상측 4x4 영역에 대해 상기 역방향 비-분리 2차 변환을 적용하는 단계를 포함할 수 있다.
본 발명의 실시예에 따른 역방향 비-분리 2차 변환은, Lx16 형태의 행렬인 RST(reduced secondary transform), 여기서 L은 16보다 작거나 같고, 16x16 형태의 행렬인 SOT(sparse orthonormal transform), 16개의 입력과 16개의 출력을 갖는 기븐스 로테이션(givens rotation) 기반의 변환, 또는 16개의 입력과 16개의 출력을 가지면서 두 인접한 기븐스 로테이션 레이어 사이에서 지정된 치환(permutation)을 적용하는 레이어드 기븐스 변환(layered givens transform) 중 적어도 하나를 포함하고, 상기 역방향 1차 변환은, 변환 블록에 대한 수평 방향 변환과 수직 방향 변환을 포함하고, 상기 수평 방향 변환과 상기 수직 방향 변환은, DCT-2, DST-7, 및 DCT-8의 조합에 의해 설정될 수 있다.
본 발명의 실시예에 따른 비디오 신호의 인코딩 장치는, 상기 비디오 신호를 저장하는 메모리와, 상기 메모리와 기능적으로 결합되고, 상기 비디오 신호를 인코딩 처리하는 인코더를 포함할 수 있다. 본 발명의 실시예에 따른 인코더는, 상기 비디오 신호의 픽처에서 예측 샘플을 제외한 잔차 샘플들을 포함하는 변환 블록을 확인하고, 상기 변환 블록의 사이즈에 기반하여 상기 변환 블록의 잔차 샘플들에 대한 변환을 통해 변환 계수들을 생성하고, 상기 변환 계수들에 대해 양자화 및 엔트로피 코딩을 수행하도록 설정되고, 상기 변환 블록의 잔차 샘플들에 대한 변환을 통해 변환 계수들을 생성할 때, 상기 인코더는, 상기 잔차 샘플들을 포함하는 변환 블록의 수평 방향 및 수직 방향 각각에 대해 순방향(forward) 1차 변환(primary transform)을 적용하고, 상기 변환 블록의 사이즈가 4x4 보다 작거나 같은 경우, 상기 1차 변환이 적용된 변환 블록에 대한 순방향 비-분리 2차 변환(non-separable secondary transform)의 적용을 생략하고, 상기 변환 블록의 사이즈가 4x4 보다 큰 경우, 상기 변환 블록에 대해 상기 순방향 비-분리 2차 변환을 적용하도록 설정될 수 있다.
본 발명의 실시예에 따른 인코더는, 상기 변환 블록의 사이즈가 4x4 보다 큰 경우, 상기 변환 블록의 좌상측 4x4 영역에 대하여 상기 순방향 비-분리 2차 변환을 적용하도록 설정될 수 있다.
본 발명의 실시예에 따른 순방향 비-분리 2차 변환은, Lx16 형태의 행렬인 RST(reduced secondary transform), 여기서 L은 16보다 작거나 같고, 16x16 형태의 행렬인 SOT(sparse orthonormal transform), 16개의 입력과 16개의 출력을 갖는 기븐스 로테이션(givens rotation) 기반의 변환, 또는 16개의 입력과 16개의 출력을 가지면서 두 인접한 기븐스 로테이션 레이어 사이에서 지정된 치환(permutation)을 적용하는 레이어드 기븐스 변환(layered givens transform) 중 적어도 하나를 포함할 수 있다.
본 발명의 실시예에 따른 상기 순방향 1차 변환은, 변환 블록에 대한 수평 방향 변환과 수직 방향 변환을 포함하고, 상기 수평 방향 변환과 상기 수직 방향 변환은, DCT-2, DST-7, 및 DCT-8의 조합에 의해 설정될 수 있다.
본 발명의 실시예에 따른 비디오 신호의 디코딩 장치는, 상기 비디오 신호를 저장하는 메모리와, 상기 메모리와 기능적으로 결합되고, 상기 비디오 신호를 디코딩 처리하는 디코더를 포함할 수 있다. 본 발명의 실시예에 따른 디코더는, 상기 비디오 신호에 대한 엔트로피 디코딩 및 역양자화를 수행함으로써 변환 계수들을 포함하는 변환 블록을 생성하고, 상기 변환 블록의 사이즈에 기반하여 상기 변환 블록의 변환 계수들에 대한 역방향 변환을 통해 잔차 신호들을 생성하고, 상기 잔차 신호들로부터 예측을 통해 예측 신호를 생성함으로써 복원 픽처를 생성하도록 설정될 수 있다. 상기 변환 블록의 변환 계수들에 대한 역방향 변환을 통해 잔차 신호들을 생성할 때, 상기 디코더는, 상기 변환 블록의 사이즈가 4x4 보다 작거나 같은 경우, 상기 변환 블록에 대한 역방향(inverse) 비-분리 2차 변환(non-separable secondary transform)의 적용을 생략하고, 상기 변환 블록의 사이즈가 4x4 보다 큰 경우, 상기 변환 블록에 대해 상기 역방향 비-분리 2차 변환을 적용하고, 상기 변환 블록에 대해 수평 및 수직 방향으로 분리하여 역방향 1차 변환(primary transform)을 적용하도록 설정될 수 있다.
본 발명의 실시예에 따른 디코더는, 상기 변환 블록의 사이즈가 4x4 보다 큰 경우, 상기 변환 블록의 좌상측 4x4 영역에 대해 상기 역방향 비-분리 2차 변환을 적용하도록 설정될 수 있다.
본 발명의 실시예에 따른 역방향 비-분리 2차 변환은, Lx16 형태의 행렬인 RST(reduced secondary transform), 여기서 L은 16보다 작거나 같고, 16x16 형태의 행렬인 SOT(sparse orthonormal transform), 16개의 입력과 16개의 출력을 갖는 기븐스 로테이션(givens rotation) 기반의 변환, 또는 16개의 입력과 16개의 출력을 가지면서 두 인접한 기븐스 로테이션 레이어 사이에서 지정된 치환(permutation)을 적용하는 레이어드 기븐스 변환(layered givens transform) 중 적어도 하나를 포함하고, 상기 역방향 1차 변환은, 변환 블록에 대한 수평 방향 변환과 수직 방향 변환을 포함하고, 상기 수평 방향 변환과 상기 수직 방향 변환은, DCT-2, DST-7, 및 DCT-8의 조합에 의해 설정될 수 있다.
본 발명의 실시예에 따르면, 낮은 복잡도로 변환 행렬을 설계할 수 있다.
또한, 본 발명의 실시예에 따르면, 변환 블록의 사이즈에 따라 선택적으로 비-분리 2차 변환(non-separable secondary transform)을 적용함으로써 연산량을 감소시킬 수 있다.
본 발명에서 얻을 수 있는 효과는 이상에서 언급한 효과로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.
본 발명에 관한 이해를 돕기 위해 상세한 설명의 일부로 포함되는, 첨부 도면은 본 발명에 대한 실시예를 제공하고, 상세한 설명과 함께 본 발명의 기술적 특징을 설명한다.
도 1은 본 발명이 적용되는 실시예로서, 비디오 신호의 인코딩이 수행되는 인코더의 개략적인 블록도를 나타낸다.
도 2는 본 발명이 적용되는 실시예로서, 비디오 신호의 디코딩이 수행되는 디코더의 개략적인 블록도를 나타낸다.
도 3은 본 발명이 적용될 수 있는 실시예들로서, 도 3a는 QuadTree, 도 3b는 Binary Tree, 도 3c는 Ternary Tree, 도 3d는 Asymmetric Tree에 의한 블록 분할 구조들을 설명하기 위한 도면이다.
도 4와 도 5는 본 발명이 적용되는 실시예들로서, 도 4는 인코더 내의 변환 및 양자화부, 역양자화 및 역변환부의 개략적인 블록도를 나타내고, 도 5는 디코더 내의 역양자화 및 역변환부의 개략적인 블록도를 나타낸다.
도 6a와 6b는 예측 모드별 수평 방향 및 수직 방향에 대한 변환 타입의 결정을 위한 테이블의 예를 나타낸다.
도 7은 본 발명이 적용되는 실시예로서, MTS(multiple transform selection)가 수행되는 인코딩 과정을 나타내는 흐름도이다.
도 8은 본 발명이 적용되는 실시예로서, MTS가 수행되는 디코딩 과정을 나타내는 흐름도이다.
도 9는 본 발명이 적용되는 실시예로서, MTS 플래그 및 MTS 인덱스를 인코딩하는 과정을 설명하기 위한 흐름도이다.
도 10은 본 발명이 적용되는 실시예로서, MTS 플래그 및 MTS 인덱스에 기초하여 수평 변환 또는 수직 변환을 행 또는 열에 적용하는 디코딩 과정을 설명하기 위한 흐름도이다.
도 11은 본 발명이 적용되는 실시예로서, 변환 관련 파라미터에 기초하여 역변환을 수행하는 흐름도를 나타낸다.
도 12는 본 발명이 적용되는 실시예로서, NSST에서 화면내 예측 모드마다 변환 집합(transform set)을 할당하는 것을 보여주는 테이블이다.
도 13은 본 발명이 적용되는 실시예로서, 기븐스 회전(Givens rotation)에 대한 계산 플로우 다이어그램을 나타낸다.
도 14는 본 발명이 적용되는 실시예로서, 기븐스 회전 레이어(Givens rotation layer)와 치환(permutation)들로 구성된 4x4 NSST에서의 한 라운드 구성을 보여준다.
도 15는 본 발명이 적용되는 실시예로서, 순방향 축소 변환(forward reduced transform) 및 역방향 축소 변환(forward reduced transform)의 동작을 설명하기 위한 블록도이다.
도 16은 본 발명이 적용되는 실시예로서, 역방향 스캔 순서에 따라 64번째부터 17번째까지 역방향 스캔을 수행하는 과정을 나타내는 도면이다.
도 17은 본 발명이 적용되는 실시예로서, 변환 계수 블록(변환 블록)에 대한 3가지 순방향 스캔 순서를 나타낸다.
도 18은 본 발명이 적용되는 실시예로서, 좌상측 4x8 블록에서 대각 스캔(diagonal scan)이 적용되고 4x4 RST 가 적용되었을 때 유효한 변환 계수들의 위치와 4x4 블록 별 순방향 스캔 순서를 나타낸다.
도 19는 본 발명이 적용되는 실시예로서, 좌상측 4x8 블록에서 대각 스캔(diagonal scan)이 적용되고 4x4 RST 가 적용되었을 때 두 4x4 블록의 유효한 변환 계수들을 하나의 4x4 블록으로 합치는 경우를 나타낸다.
도 20은 본 발명이 적용되는 실시예로서, 축소된 2차 변환(Reduced Secondary Transform, RST)에 기초하여 비디오 신호를 인코딩하는 흐름도를 나타낸다.
도 21은 본 발명이 적용되는 실시예로서, 축소된 2차 변환(Reduced Secondary Transform, RST)에 기초하여 비디오 신호를 디코딩하는 흐름도를 나타낸다.
도 22는 본 발명의 실시예에 따른 변환 블록과 좌상측 4x4 영역의 예를 도시한다.
도 23은 예측 모드에 따른 수평 방향 및 수직 방향에 대한 변환 타입의 결정을 위한 테이블의 예를 도시하며, 도 23a는 화면내 예측을 통해 생성된 잔차에 적용되는 변환 쌍을 나타내고, 도 23b는 화면간 예측을 통해 생성된 잔차에 적용되는 변환 쌍을 나타낸다.
도 24는 본 발명의 실시예에 따른 비디오 신호의 인코딩 방법의 흐름도를 도시한다.
도 25는 본 발명의 실시예에 따른 비디오 신호의 인코딩 과정에서 변환 블록의 사이즈에 따른 변환 과정의 예를 도시한다.
도 26은 본 발명의 실시예에 따른 비디오 신호의 디코딩 과정의 흐름도를 도시한다.
도 27은 본 발명의 실시예에 따른 비디오 신호의 디코딩 과정에서 변환 블록의 사이즈에 따른 변환 과정의 예를 도시한다.
도 28은 본 발명이 적용되는 실시예로서 비디오 코딩 시스템의 예를 도시한다.
도 29는 본 발명이 적용되는 실시예로서 비디오 스트리밍 시스템의 예를 도시한다.
이하, 본 발명에 따른 바람직한 실시 형태를 첨부된 도면을 참조하여 상세하게 설명한다. 첨부된 도면과 함께 이하에 개시될 상세한 설명은 본 발명의 예시적인 실시형태를 설명하고자 하는 것이며, 본 발명이 실시될 수 있는 유일한 실시형태를 나타내고자 하는 것이 아니다. 이하의 상세한 설명은 본 발명의 완전한 이해를 제공하기 위해서 구체적 세부사항을 포함한다. 그러나, 당업자는 본 발명이 이러한 구체적 세부사항 없이도 실시될 수 있음을 안다.
몇몇 경우, 본 발명의 개념이 모호해지는 것을 피하기 위하여 공지의 구조 및 장치는 생략되거나, 각 구조 및 장치의 핵심기능을 중심으로 한 블록도 형식으로 도시될 수 있다.
아울러, 본 발명에서 사용되는 용어는 가능한 한 현재 널리 사용되는 일반적인 용어를 선택하였으나, 특정한 경우는 출원인이 임의로 선정한 용어를 사용하여 설명한다. 그러한 경우에는 해당 부분의 상세 설명에서 그 의미를 명확히 기재하므로, 본 발명의 설명에서 사용된 용어의 명칭만으로 단순 해석되어서는 안 될 것이며 그 해당 용어의 의미까지 파악하여 해석되어야 함을 밝혀두고자 한다.
이하의 설명에서 사용되는 특정 용어들은 본 발명의 이해를 돕기 위해서 제공된 것이며, 이러한 특정 용어의 사용은 본 발명의 기술적 사상을 벗어나지 않는 범위에서 다른 형태로 변경될 수 있다. 예를 들어, 신호, 데이터, 샘플, 픽처, 프레임, 블록 등의 경우 각 코딩 과정에서 적절하게 대체되어 해석될 수 있을 것이다.
이하 본 명세서에서 '처리 유닛'은 예측, 변환 및/또는 양자화 등과 같은 인코딩/디코딩의 처리 과정이 수행되는 단위를 의미한다. 또한, 처리 유닛은 휘도(luma) 성분에 대한 단위와 색차(chroma) 성분에 대한 단위를 포함하는 의미로 해석될 수 있다. 예를 들어, 처리 유닛은 블록(block), 코딩 유닛(coding unit, CU), 예측 유닛(prediction unit, PU) 또는 변환 블록(transform unit, TU)에 해당될 수 있다.
또한, 처리 유닛은 휘도 성분에 대한 단위 또는 색차 성분에 대한 단위로 해석될 수 있다. 예를 들어, 처리 유닛은 휘도 성분에 대한 CTB, CB, PU 또는 TB에 해당될 수 있다. 또는, 처리 유닛은 색차 성분에 대한 CTB, CB, PU 또는 TB에 해당할 수 있다. 또한, 이에 한정되는 것은 아니며 처리 유닛은 휘도 성분에 대한 단위와 색차 성분에 대한 단위를 포함하는 의미로 해석될 수도 있다.
또한, 처리 유닛은 반드시 정사각형의 블록으로 한정되는 것은 아니며, 3개 이상의 꼭지점을 가지는 다각형 형태로 구성될 수도 있다.
또한, 이하 본 명세서에서 픽셀 또는 화소 등을 샘플로 통칭한다. 그리고, 샘플을 이용한다는 것은 픽셀 값 또는 화소 값 등을 이용한다는 것을 의미할 수 있다.
도 1은 본 발명이 적용되는 실시예로서, 비디오 신호의 인코딩이 수행되는 인코더의 개략적인 블록도를 나타낸다.
도 1을 참조하면, 인코더(100)는 영상 분할부(110), 변환부(120), 양자화부(130), 역양자화부(140), 역변환부(150), 필터링부(160), 복호 픽처 버퍼(DPB: decoded picture buffer)(170), 인터 예측부(180), 인트라 예측부(185) 및 엔트로피 인코딩부(190)를 포함하여 구성될 수 있다.
영상 분할부(110)는 인코더(100)에 입력된 입력 영상(input image)(또는, 픽처, 프레임)를 하나 이상의 처리 유닛으로 분할할 수 있다. 예를 들어, 상기 처리 유닛은 코딩 트리 유닛(CTU: coding tree unit), 코딩 유닛(CU: coding unit), 예측 유닛(PU: prediction unit) 또는 변환 유닛(TU: transform unit)일 수 있다. 이하의 설명에서, 변환이 수행되는 단위인 변환 유닛(TU)는 변환 블록으로 통칭하도록 한다.
다만, 상기 용어들은 본 발명에 대한 설명의 편의를 위해 사용할 뿐이며, 본 발명은 해당 용어의 정의에 한정되지 않는다. 또한, 본 명세서에서는 설명의 편의를 위해, 비디오 신호를 인코딩 또는 디코딩하는 과정에서 이용되는 단위로써 코딩 유닛이라는 용어를 사용하지만, 본 발명은 그에 한정되지 않으며 발명 내용에 따라 적절하게 해석 가능할 것이다.
인코더(100)는 입력 영상 신호에서 인터 예측부(180) 또는 인트라 예측부(185)로부터 출력된 예측 신호(prediction signal)를 감산하여 잔차 신호(residual signal)를 생성할 수 있고, 생성된 잔여 신호는 변환부(120)로 전송된다.
변환부(120)는 잔차 신호에 변환 기법을 적용하여 변환 계수(transform coefficient)를 생성할 수 있다. 변환 과정은 쿼드트리(quadtree) 구조의 정사각형 블록, 바이너리트리(binarytree) 구조, 삼진트리(ternary) 구조 또는 비대칭 트리(asymmetric) 구조에 의해 분할된 블록(정사각형 또는 직사각형)에 적용될 수 있다.
변환부(120)는 복수개의 변환(또는 변환 조합들)에 기초하여 변환을 수행할 수 있으며, 이러한 변환 방식을 MTS(multiple transform selection)라 부를 수 있다. MTS는 AMT(adaptive multiple transform) 또는 EMT(enhanced multiple transform)로 부를 수도 있다.
MTS(또는 AMT, EMT)는 복수개의 변환(또는 변환 조합들)로부터 적응적으로 선택되는 변환(또는 변환 조합들)에 기초하여 수행되는 변환 방식을 의미할 수 있다.
복수개의 변환(또는 변환 조합들)은 본 명세서의 도 6a, 6b에 도시된 것과 같이 DCT(discrete cosine transform) 또는 DST(discrete sine transform) 타입의 커널(kernel)에 기반하여 결정될 수 있다. 본 명세서에서, 변환 타입은, 예를 들어 DCT-Type 2, DCT-II, DCT-2, DCT2 와 같이 표기할 수 있으며, 이하 설명에서는 DCT-2로 통일하여 표기하도록 한다.
본 발명의 실시예에 따른 변환부(120)는 다음의 실시예들을 수행할 수 있다.
변환부(120)는 잔차 샘플들을 포함하는 변환 블록의 수평 방향 및 수직 방향 각각에 대해 순방향(forward) 1차 변환(primary transform)을 적용하고, 변환 블록의 사이즈가 4x4 보다 작거나 같은 경우, 1차 변환이 적용된 변환 블록에 대한 순방향 2차 변환(secondary transform)의 적용을 생략하고, 변환 블록의 사이즈가 4x4 보다 큰 경우, 변환 블록에 대해 순방향 비-분리(non-separable) 2차 변환(secondary transform)을 적용하도록 설정될 수 있다. 또한, 변환부(120)는, 변환 블록의 사이즈가 4x4 보다 큰 경우, 변환 블록의 좌상측 4x4 영역에 대하여 순방향 비-분리 2차 변환을 적용하도록 설정될 수 있다.
양자화부(130)는 변환 계수를 양자화하여 엔트로피 인코딩부(190)로 전송하고, 엔트로피 인코딩부(190)는 양자화된 신호(quantized signal)를 엔트로피 코딩하여 비트스트림으로 출력할 수 있다.
변환부(120)와 양자화부(130)는 별개의 기능 유닛으로 설명되지만, 본 발명은 이에 한정되지 않으며, 하나의 기능 유닛으로 결합될 수 있다. 상기 역양자화부(140)와 상기 역변환부(150)의 경우에도, 마찬가지로 하나의 기능 유닛으로 결합될 수 있다.
양자화부(130)로부터 출력된 양자화된 신호는 예측 신호를 생성하기 위해 이용될 수 있다. 예를 들어, 양자화된 신호는 루프 내의 역양자화부(140) 및 역변환부(150)를 통해 역양자화 및 역변환을 적용함으로써 잔여 신호를 복원할 수 있다. 복원된 잔여 신호를 인터 예측부(180) 또는 인트라 예측부(185)로부터 출력된 예측 신호에 더함으로써 복원 신호가 생성될 수 있다.
한편, 위와 같은 압축 과정에서 발생한 양자화 에러에 의해 블록 경계가 보이는 열화가 발생될 수 있다. 이러한 현상을 블록킹 열화(blocking artifacts)라고 하며, 이는 화질을 평가하는 중요한 요소 중의 하나이다. 이러한 열화를 줄이기 위해 필터링 과정을 수행할 수 있다. 이러한 필터링 과정을 통해 블록킹 열화를 제거함과 동시에 현재 픽처에 대한 오차를 줄임으로써 화질을 향상시킬 수 있게 된다.
필터링부(160)는 복원 신호에 필터링을 적용하여 이를 재생 장치로 출력하거나 복호 픽처 버퍼(170)에 전송한다. 복호 픽처 버퍼(170)에 전송된 필터링된 신호는 인터 예측부(180)에서 참조 픽처로 사용될 수 있다. 이처럼, 필터링된 픽처를 화면간 예측 모드에서 참조 픽처로 이용함으로써 화질뿐만 아니라 부호화 효율도 향상시킬 수 있다.
복호 픽처 버퍼(170)는 필터링된 픽처를 인터 예측부(180)에서의 참조 픽처로 사용하기 위해 저장할 수 있다.
인터 예측부(180)는 복원 픽처(reconstructed picture)를 참조하여 시간적 중복성 및/또는 공간적 중복성을 제거하기 위해 시간적 예측 및/또는 공간적 예측을 수행한다. 여기서, 예측을 수행하기 위해 이용되는 참조 픽처는 이전 시간에 부호화/복호화 시 블록 단위로 양자화와 역양자화를 거친 변환된 신호이기 때문에, 블로킹 아티팩트(blocking artifact)나 링잉 아티팩트(ringing artifact)가 존재할 수 있다.
따라서, 인터 예측부(180)는 이러한 신호의 불연속이나 양자화로 인한 성능 저하를 해결하기 위해, 로우패스 필터(lowpass filter)를 적용함으로써 픽셀들 사이의 신호를 서브 픽셀 단위로 보간할 수 있다. 여기서, 서브 픽셀은 보간 필터를 적용하여 생성된 가상의 화소를 의미하고, 정수 픽셀은 복원된 픽처에 존재하는 실제 화소를 의미한다. 보간 방법으로는 선형 보간, 양선형 보간(bi-linear interpolation), 위너 필터(wiener filter) 등이 적용될 수 있다.
보간 필터는 복원 픽처(reconstructed picture)에 적용되어 예측의 정밀도를 향상시킬 수 있다. 예를 들어, 인터 예측부(180)는 정수 픽셀에 보간 필터를 적용하여 보간 픽셀을 생성하고, 보간 픽셀들(interpolated pixels)로 구성된 보간 블록(interpolated block)을 예측 블록(prediction block)으로 사용하여 예측을 수행할 수 있다.
한편, 인트라 예측부(185)는 현재 부호화를 진행하려고 하는 블록의 주변에 있는 샘플들을 참조하여 현재 블록을 예측할 수 있다. 인트라 예측부(185)는 인트라 예측을 수행하기 위해 다음과 같은 과정을 수행할 수 있다. 먼저, 예측 신호를 생성하기 위해 필요한 참조 샘플을 준비할 수 있다. 그리고, 준비된 참조 샘플을 이용하여 예측 신호를 생성할 수 있다. 이후, 예측 모드를 부호화하게 된다. 이때, 참조 샘플은 참조 샘플 패딩 및/또는 참조 샘플 필터링을 통해 준비될 수 있다. 참조 샘플은 예측 및 복원 과정을 거쳤기 때문에 양자화 에러가 존재할 수 있다. 따라서, 이러한 에러를 줄이기 위해 화면내 예측(intra prediction)에 이용되는 각 예측 모드에 대해 참조 샘플 필터링 과정이 수행될 수 있다.
인터 예측부(180) 또는 인트라 예측부(185)를 통해 생성된 예측 신호(prediction signal)는 복원 신호를 생성하기 위해 이용되거나 잔차 신호를 생성하기 위해 이용될 수 있다.
도 2는 본 발명이 적용되는 실시예로서, 비디오 신호의 디코딩이 수행되는 디코더의 개략적인 블록도를 나타낸다.
도 2를 참조하면, 디코더(200)는 파싱부(미도시), 엔트로피 디코딩부(210), 역양자화부(220), 역변환부(230), 필터링부(240), 복호 픽처 버퍼(DPB: decoded picture buffer)(250), 인터 예측부(260) 및 인트라 예측부(265)를 포함하여 구성될 수 있다.
그리고, 디코더(200)를 통해 출력된 복원 영상 신호(reconstructed video signal)는 재생 장치를 통해 재생될 수 있다.
디코더(200)는 도 1의 인코더(100)로부터 출력된 신호을 수신할 수 있고, 수신된 신호는 엔트로피 디코딩부(210)를 통해 엔트로피 디코딩될 수 있다.
역양자화부(220)에서는 양자화 스텝 사이즈 정보를 이용하여 엔트로피 디코딩된 신호로부터 변환 계수(transform coefficient)를 획득한다.
역변환부(230)에서는 변환 계수를 역변환하여 잔여 신호(residual signal)를 획득하게 된다.
본 발명의 실시예에 따른 역변환부(230)는 변환 블록의 사이즈가 4x4 보다 작거나 같은 경우, 변환 블록에 대한 역방향(inverse) 비-분리 2차 변환(non-separable secondary transform)의 적용을 생략하고, 변환 블록의 사이즈가 4x4 보다 큰 경우, 변환 블록에 대해 역방향 비-분리 2차 변환을 적용하고, 변환 블록에 대해 수평 및 수직 방향으로 분리하여 역방향 1차 변환(primary transform)을 적용하도록 설정될 수 있다. 본 발명의 실시예에 따른 역변환부(230)는, 변환 블록의 사이즈가 4x4 보다 큰 경우, 변환 블록의 좌상측 4x4 영역에 대해 역방향 비-분리 2차 변환을 적용하도록 설정될 수 있다.
역양자화부(220)와 역변환부(230)는 별개의 기능 유닛으로 설명되지만, 본 발명은 이에 한정되지 않으며, 하나의 기능 유닛으로 결합될 수 있다.
획득된 잔차 신호를 인터 예측부(260) 또는 인트라 예측부(265)로부터 출력된 예측 신호에 더함으로써 복원 신호가 생성된다.
필터링부(240)는 복원 신호에 필터링을 적용하여 이를 재생 장치로 출력하거나 복호 픽처 버퍼부(250)에 전송한다. 복호 픽처 버퍼부(250)에 전송된 필터링된 신호는 인터 예측부(260)에서 참조 픽처로 사용될 수 있다.
본 명세서에서, 인코더(100)의 변환부(120) 및 각 기능 유닛들에서 설명된 실시예들은 각각 디코더의 역변환부(230) 및 대응되는 기능 유닛들에도 동일하게 적용될 수 있다.
도 3은 본 발명이 적용될 수 있는 실시예들로서, 도 3a는 QT(QuadTree, 이하 'QT'라 함), 도 3b는 BT(Binary Tree, 이하 'BT'라 함), 도 3c는 TT(Ternary Tree, 이하 'TT'라 함) 도 3d는 AT(Asymmetric Tree, 이하 'AT'라 함)에 의한 블록 분할 구조들을 설명하기 위한 도면이다.
비디오 코딩에서 하나의 블록은 QT(QuadTree) 기반으로 분할될 수 있다. 또한, QT에 의해서 분할된 하나의 서브 블록(subblock)은 QT를 사용하여 재귀적으로 더 분할될 수 있다. 더 이상 QT 분할되지 않는 리프 블록 (leaf block)은 BT(Binary Tree), TT(Ternary Tree) 또는 AT(Asymmetric Tree) 중 적어도 하나의 방식에 의해서 분할될 수 있다. BT는 horizontal BT (2NxN, 2NxN)과 vertical BT (Nx2N, Nx2N)의 두 가지 형태의 분할을 가질 수 있다. TT는 horizontal TT (2Nx1/2N, 2NxN, 2Nx1/2N)와 vertical TT (1/2Nx2N, Nx2N, 1/2Nx2N)의 두 가지 형태의 분할을 가질 수 있다. AT는 horizontal-up AT (2Nx1/2N, 2Nx3/2N), horizontal-down AT (2Nx3/2N, 2Nx1/2N), vertical-left AT (1/2Nx2N, 3/2Nx2N), vertical-right AT (3/2Nx2N, 1/2Nx2N)의 네 가지 형태의 분할을 가질 수 있다. 각각의 BT, TT, AT는 BT, TT, AT를 사용하여 재귀적으로 더 분할될 수 있다.
도 3a는 QT 분할의 예를 보여준다. 블록 A는 QT에 의해서 4개의 서브 블록 (A0, A1, A2, A3)으로 분할될 수 있다. 서브 블록 A1은 다시 QT에 의해서 4개의 서브 블록 (B0, B1, B2, B3)로 분할될 수 있다.
도 3b는 BT 분할의 예를 보여준다. QT에 의해서 더 이상 분할되지 않는 블록 B3은 vertical BT (C0, C1) 또는 horizontal BT (D0, D1)으로 분할될 수 있다. 블록 C0와 같이 각각의 서브 블록은 horizontal BT (E0, E1) 또는 vertical BT (F0, F1)의 형태와 같이 재귀적으로 더 분할될 수 있다.
도 3c는 TT 분할의 예를 보여준다. QT에 의해서 더 이상 분할되지 않는 블록 B3은 vertical TT (C0, C1, C2) 또는 horizontal TT (D0, D1, D2)으로 분할될 수 있다. 블록 C1와 같이 각각의 서브 블록은 horizontal TT (E0, E1, E2) 또는 vertical TT (F0, F1, F2)의 형태와 같이 재귀적으로 더 분할될 수 있다.
도 3d는 AT 분할의 예를 보여준다. QT에 의해서 더 이상 분할되지 않는 블록 B3은 vertical AT (C0, C1) 또는 horizontal AT (D0, D1)으로 분할 될 수 있다. 블록 C1와 같이 각각의 서브 블록은 horizontal AT (E0, E1) 또는 vertical TT (F0, F1)의 형태와 같이 재귀적으로 더 분할 될 수 있다.
한편, BT, TT, AT 분할은 함께 사용하여 분할이 가능하다. 예를 들어, BT에 의해 분할된 서브 블록은 TT 또는 AT에 의한 분할이 가능하다. 또한, TT에 의해 분할된 서브 블록은 BT 또는 AT에 의한 분할이 가능하다. AT에 의해 분할된 서브 블록은 BT 또는 TT에 의한 분할이 가능하다. 예를 들어, horizontal BT 분할 이후, 각각의 서브 블록이 vertical BT로 분할될 수 있고, 또는 vertical BT 분할 이후, 각각의 서브 블록이 horizontal BT로 분할될 수도 있다. 상기 두 종류의 분할 방법은 분할 순서는 다르지만 최종적으로 분할되는 모양은 동일하다.
또한, 블록이 분할되면 블록을 탐색하는 순서를 다양하게 정의할 수 있다. 일반적으로, 좌측에서 우측으로, 상단에서 하단으로 탐색을 수행하며, 블록을 탐색한다는 것은 각 분할된 서브 블록의 추가적인 블록 분할 여부를 결정하는 순서를 의미하거나, 블록이 더 이상 분할되지 않을 경우 각 서브 블록의 부호화 순서를 의미하거나, 또는 서브 블록에서 다른 이웃 블록의 정보를 참조할 때의 탐색 순서를 의미할 수 있다.
도 3a 내지 3d과 같은 분할 구조에 의해 분할된 처리 유닛(또는, 변환 블록) 별로 변환이 수행될 수 있으며, 특히, 행(row) 방향과 열(column) 방향 별로 분할되어 변환 행렬이 적용될 수 있다. 본 발명의 실시예에 따르면, 처리 유닛(또는 변환 블록)의 행 방향 또는 열 방향의 길이에 따라 다른 변환 타입이 사용될 수 있다.
도 4 및 도 5는 본 발명이 적용되는 실시예들로서, 도 4는 인코더 내의 변환 및 양자화부 (120/130), 역양자화 및 역변환부 (140/150)의 개략적인 블록도를 나타내고, 도 5는 디코더 내의 역양자화 및 역변환부 (220/230)의 개략적인 블록도를 나타낸다.
도 4를 살펴보면, 변환 및 양자화부 (120/130)는 1차 변환부(primary transform unit)(121), 2차 변환부(secondary transform unit)(122) 및 양자화부(130)을 포함할 수 있다. 역양자화 및 역변환부 (140/150)는 역양자화부(140), 역 2차 변환부(inverse secondary transform unit)(151) 및 역 1차 변환부(inverse primary transform unit)(152)를 포함할 수 있다.
도 5를 살펴보면, 역양자화 및 역변환부 (220/230)는 역양자화부(220), 역 2차 변환부(inverse secondary transform unit)(231) 및 역 1차 변환부(inverse primary transform unit)(232)를 포함할 수 있다.
본 발명에서, 변환을 수행할 때 복수의 단계를 통해 변환을 수행할 수 있다. 예를 들어, 도 4에서와 같이 1차 변환(primary transform), 2차 변환(secondary transform)의 2단계를 적용할 수 있고, 또는 알고리즘에 따라 그 이상의 변환 단계가 이용될 수도 있다. 여기서, 상기 1차 변환은 주요 변환(core transform)이라고 부를 수도 있다.
1차 변환부(121)는 잔차 신호에 대해 1차 변환을 적용할 수 있으며, 여기서 1차 변환은 인코더 및/또는 디코더에서 테이블로 기정의될 수 있다.
또한, 1차 변환의 경우, MTS의 여러 변환 타입들(DCT-2, DST-7, DCT-8)의 조합들이 사용될 수도 있다. 예를 들어, 도 6a, 도 6b에서 도시된 테이블과 같이 변환 타입이 결정될 수 있다.
2차 변환부(122)는 1차 변환된 신호에 대해 2차 변환을 적용할 수 있으며, 여기서 2차 변환은 인코더 및/또는 디코더에서 테이블로 기정의될 수 있다.
본 발명의 실시예에 따르면, 2차 변환부(122)는 변환 블록의 사이즈가 4x4 보다 작거나 같은 경우, 1차 변환이 적용된 변환 블록에 대한 순방향 비-분리 2차 변환(non-separable secondary transform, NSST)의 적용을 생략하고, 상기 변환 블록의 사이즈가 4x4 보다 큰 경우, 상기 변환 블록에 대해 상기 순방향 비-분리 2차 변환을 적용하도록 설정될 수 있다. 또한, 2차 변환부(122)는 변환 블록의 좌상측 4x4 영역에 대하여 순방향 비-분리 2차 변환(NSST)을 적용하도록 설정될 수 있다.
일 실시예에서, 2차 변환은 비-분리 2차 변환(NSST)이 조건적으로 적용될 수 있다. 예를 들어, NSST는 화면내 예측 블록일 경우에만 적용되며, 예측 모드 그룹마다 적용 가능한 변환 셋을 가질 수 있다.
여기서, 예측 모드 그룹은 예측 방향에 대한 대칭성에 기초하여 설정될 수 있다. 예를 들어, 예측 모드 52와 예측 모드 16은 예측 모드 34 (대각 방향)를 기준으로 대칭이므로, 하나의 그룹을 형성하여 동일한 변환 셋(transform set)이 적용될 수 있다. 이때, 예측 모드 52에 대한 변환을 적용할 때 입력 데이터를 전치(transpose)한 후 적용하며, 이는 예측 모드 16과 변환 셋이 동일하기 때문이다.
한편, 플래너 모드(Planar mode)와 DC 모드(DC mode)의 경우 방향에 대한 대칭성이 존재하지 않으므로 각자의 변환 셋을 가지며, 해당 변환 셋은 2개의 변환들로 구성될 수 있다. 나머지 방향성 모드에 대해서는 변환 셋마다 3개의 변환들로 구성될 수 있다.
양자화부(130)는 2차 변환된 신호에 대해 양자화를 수행할 수 있다.
역양자화 및 역변환부 (140/150)는 앞서 설명된 과정을 역으로 수행하며, 중복되는 설명은 생략하도록 한다.
도 5는 디코더 내의 역양자화 및 역변환부 (220/230)의 개략적인 블록도를 나타낸다.
도 5를 살펴보면, 역양자화 및 역변환부 (220/230)는 역양자화부(220), 역 2차 변환부(inverse secondary transform unit)(231) 및 역 1차 변환부(inverse primary transform unit)(232)를 포함할 수 있다.
역양자화부(220)에서는 양자화 스텝 사이즈 정보를 이용하여 엔트로피 디코딩된 신호로부터 변환 계수를 획득한다.
역 2차 변환부(231)에서는 상기 변환 계수에 대해 역 2차 변환을 수행한다. 여기서, 상기 역 2차 변환은 도 4에서 설명한 상기 2차 변환의 역변환을 나타낸다.
본 발명의 실시예에 따른 역 2차 변환부(231)는 변환 블록의 사이즈가 4x4 보다 작거나 같은 경우, 변환 블록에 대한 역방향(inverse) 비-분리 2차 변환(non-separable secondary transform)의 적용을 생략하고, 변환 블록의 사이즈가 4x4 보다 큰 경우, 변환 블록에 대해 역방향 비-분리 2차 변환을 적용하고, 변환 블록에 대해 수평 및 수직 방향으로 분리하여 역방향 1차 변환(primary transform)을 적용하도록 설정될 수 있다. 본 발명의 실시예에 따른 역 2차 변환부(231)는, 변환 블록의 사이즈가 4x4 보다 큰 경우, 변환 블록의 좌상측 4x4 영역에 대해 역방향 비-분리 2차 변환을 적용하도록 설정될 수 있다.
역 1차 변환부(232)는 역 2차 변환된 신호(또는 블록)에 대해 역 1차 변환을 수행하고, 잔차 신호(residual signal)를 획득하게 된다. 여기서, 역 1차 변환은 도 4에서 설명한 상기 1차 변환(primary transform)의 역변환을 나타낸다.
일 실시예에서, 1차 변환의 경우, MTS의 여러 변환들(DCT-2, DST-7, DCT-8)의 조합들이 적용될 수도 있다. 예를 들어, 도 6a, 도 6b에서 도시된 테이블과 같이 변환 타입이 결정될 수 있다.
도 6a와 6b는 예측 모드별 수평 방향 및 수직 방향에 대한 변환 타입의 결정을 위한 테이블의 예를 나타낸다. 도 6a는 화면 내 예측 모드에서 수평/수직 방향에 대한 변환 타입의 결정을 위한 테이블의 예를 도시하고, 도 6b는 화면간 예측 모드에서 수평/수직 방향에 대한 변환 타입의 결정을 위한 테이블의 예를 도시한다. 도 6a와 6b는 변환 타입의 결정을 위한 조합 테이블의 예로서 JEM(joint exploration model)에 적용된 MTS 조합을 나타내며, 다른 조합도 사용될 수 있다. 예를 들어, 화면 내 예측과 화면간 예측 모두에 대하여 도 6b의 테이블이 사용될 수 있다. 이하 도 6a와 6b를 참조하여 JEM에 적용된 예가 중심적으로 설명된다.
JEM에서, EMT_CU_flag(또는 MTS_CU_flag)라는 신택스 엘레먼트가 도입됨으로써 MTS의 적용이 블록 단위로(HEVC의 경우, CU 단위로) 온/오프(on/off)될 수 있다. 즉, 화면 내 예측 모드에서 MTS_CU_flag가 0이면 기존 HEVC(high efficiency video coding)에서의 DCT-2 또는 DST-7(4x4 블록에 대하여)이 사용되고, MTS_CU_flag가 1이면 도 6a에서 제시하는 MTS 조합이 사용된다. 가능한 MTS 조합은 도 6a와 같이 화면 내 예측 모드에 따라 다를 수 있다. 예를 들어, 14, 15, 16, 17, 18, 19, 20, 21, 22 모드에 대하여 수평(horizontal) 방향으로 DST-7과 DCT-5, 수직(vertical) 방향으로 DST-7과 DCT-8이 사용됨으로써, 총 4개의 가능한 조합이 허용된다. 따라서, 4개의 조합들 중 어느 조합이 사용되는지에 대한 정보의 시그널링(signaling)이 필요하다. 2 비트의 MTS_TU_index를 통하여 4개의 조합들 중 하나가 선택된다. 도 6b는 화면간 예측 모드에서 적용될 수 있는 MTS 조합을 나타내며, 도 6a와 달리 DST-7과 DCT-8만으로 가능한 조합이 결정된다. 본 발명의 실시예에 따르면, MTS_CU_flag를 대신하여 EMT_CU_flag가 사용될 수 있다.
도 7은 본 발명이 적용되는 실시예로서, MTS가 수행되는 인코딩 과정을 나타내는 흐름도이다.
본 명세서에서는 기본적으로 수평 방향과 수직 방향에 대해 분리해서 변환을 적용하는 실시예를 설명하고 있으나, 변환 조합은 비분리 변환(non-separable transform)들로도 구성이 가능하다.
또는, 분리가능한 변환들과 비분리 변환들의 혼합으로도 구성될 수 있다. 이 경우, 비분리 변환이 이용되면 행/열(row/column)별 변환 선택이나 수평/수직(horizontal/vertical) 방향별 선택은 불필요해지며, 분리가능한 변환이 선택되는 경우에만 상기 도 6a 또는 도 6b의 변환 조합들이 이용될 수 있다.
또한, 본 명세서에서 제안하는 방식들은 1차 변환이나 2차 변환에 관계없이 적용할 수 있다. 즉, 둘 중 어느 한쪽에만 적용되어야 한다는 제약이 없으며, 둘 다 적용될 수 있다. 여기서, 1차 변환은 잔차 블록을 맨 처음에 변환하기 위한 변환을 의미할 수 있고, 2차 변환은 상기 1차 변환의 결과로 생성된 블록에 대해 변환을 적용하기 위한 변환을 의미할 수 있다. 본 발명의 실시예에 따르면, 변환 블록의 사이즈가 4x4 보다 작거나 같은 경우, 2차 변환이 생략된 상태로 1차 변환만이 적용될 수 있으며, 변환 블록의 사이즈가 4x4 보다 큰 경우, 2차 변환은 좌-상측 4x4 영역에 대하여 2차 변환이 적용될 수 있다.
먼저, 인코더(100)는 현재 블록에 대응되는 변환 설정 그룹을 결정할 수 있다(S710). 여기서, 변환 설정 그룹은 상기 도 6a, 도 6b와 같은 조합들로 구성될 수도 있다.
상기 인코더는 상기 변환 설정 그룹 내 이용가능한 후보 변환 조합들에 대해 변환을 수행할 수 있다(S720).
상기 변환 수행 결과, 상기 인코더는 RD(rate distortion) 비용이 가장 작은 변환 조합을 결정 또는 선택할 수 있다(S730).
상기 인코더는 상기 선택된 변환 조합에 대응되는 변환 조합 인덱스를 인코딩할 수 있다(S740).
도 8은 본 발명이 적용되는 실시예로서, MTS가 수행되는 디코딩 과정을 나타내는 흐름도이다.
먼저, 디코더(200)는 현재 블록을 위한 변환 설정 그룹을 결정할 수 있다(S810). 디코더(200)는 비디오 신호로부터 변환 조합 인덱스를 파싱(또는 획득)할 수 있으며, 여기서 상기 변환 조합 인덱스는 상기 변환 설정 그룹 내 복수개의 변환 조합들 중 어느 하나에 대응될 수 있다(S820). 예를 들어, 상기 변환 설정 그룹은 DCT-2, DST-7 또는 DCT-8을 포함할 수 있다. 상기 변환 조합 인덱스는 MTS 인덱스로 부를 수 있다. 일 실시예에서, 변환 설정 그룹은 현재 블록의 예측 모드, 블록 크기 또는 블록 모양 중 적어도 하나에 기초하여 설정될 수 있다.
디코더(100)는 변환 조합 인덱스에 대응되는 변환 조합을 유도할 수 있다(S830). 여기서, 변환 조합은 수평 변환 및 수직 변환으로 구성되고, DCT-2, DST-7 또는 DCT-8중 적어도 하나를 포함할 수 있다. 또한, 변환 조합은 상기 도 6a 또는 도 6b에서 설명한 변환 조합이 사용될 수 있다. 즉, 본 명세서 내 다른 실시예에 따른 다른 변환 조합에 의한 구성도 가능하다.
디코더(100)는 유도된 변환 조합에 기초하여 현재 블록에 대해 역변환을 수행할 수 있다(S840). 변환 조합이 행(수평) 변환과 열(수직) 변환으로 구성된 경우, 행(수평) 변환을 먼저 적용한 후 열(수직) 변환을 적용할 수 있다. 다만, 본 발명은 이에 한정되지 않으며, 반대로 적용되거나, 또는 비분리 변환들로 구성된 경우에는 바로 비분리 변환이 적용될 수 있다.
일 실시예에서, 수직 변환 또는 수평 변환이 DST-7 또는 DCT-8인 경우, DST-7의 역변환 또는 DCT-8의 역변환을 열마다 적용하고 난 이후 행마다 적용할 수 있다. 또한, 수직 변환 또는 수평 변환은, 각 행마다 및/또는 각 열마다 다른 변환이 적용될 수 있다.
일 실시예에서, 변환 조합 인덱스는 MTS가 수행되는지 여부를 나타내는 MTS 플래그에 기초하여 획득될 수 있다. 즉, 변환 조합 인덱스는 MTS 플래그에 따라 MTS가 수행되는 경우 한하여 획득될 수 있다. 또한, 디코더(100)는 0이 아닌 변환 계수(non-zero coefficient)의 개수가 임계값보다 큰지 여부를 확인할 수 있다. 이때, 변환 조합 인덱스는 상기 0이 아닌 변환 계수의 개수가 임계값보다 큰 경우에 한하여 획득될 수 있다.
일 실시예에서, MTS 플래그 또는 MTS 인덱스는 시퀀스(sequence), 픽처(picture), 슬라이스(slice), 블록(block), 코딩 유닛(coding unit), 변환 유닛(transform unit), 또는 예측 유닛(prediction) 중 적어도 하나의 레벨에서 정의될 수 있다.
일 실시예에서, 역변환은 변환 블록의 너비와 높이가 모두 32 이하일 경우에만 적용될 수 있다.
한편, 다른 실시예로, 변환 설정 그룹을 결정하는 과정과 변환 조합 인덱스를 파싱하는 과정은 동시에 수행될 수 있다. 또는 S810 단계는 인코더(100) 및/또는 디코더(200)에서 기설정되어 생략될 수 있다.
도 9는 본 발명이 적용되는 실시예로서, MTS 플래그 및 MTS 인덱스를 인코딩하는 과정을 설명하기 위한 흐름도이다.
인코더(100)는 현재 블록에 대해 MTS가 적용되는지 여부를 결정할 수 있다(S910).
만약, MTS가 적용되는 경우, 인코더(100)는 MTS 플래그 = 1 로 인코딩할 수 있다(S920).
그리고, 인코더(100)는 상기 현재 블록의 예측 모드, 수평 변환, 수직 변환 중 적어도 하나에 기초하여 MTS 인덱스를 결정할 수 있다(S930). 여기서, MTS 인덱스는 각 화면내 예측 모드에 대해 복수개의 변환 조합들 중 어느 하나를 가리키는 인덱스를 의미하며, MTS 인덱스는 변환 블록마다 전송될 수 있다.
MTS 인덱스가 결정되면, 인코더(100)는 S930 단계에서 결정된 MTS 인덱스를 인코딩할 수 있다(S940).
한편, MTS가 적용되지 않는 경우, 인코더(100)는 MTS 플래그 = 0으로 인코딩할 수 있다(S950).
도 10은 본 발명이 적용되는 실시예로서, MTS 플래그 및 MTS 인덱스에 기초하여 수평 변환 또는 수직 변환을 행 또는 열에 적용하는 디코딩 과정을 설명하기 위한 흐름도이다.
디코더(200)는 비트스트림으로부터 MTS 플래그를 파싱할 수 있다(S1010). 여기서, MTS 플래그는 현재 블록에 대해 MTS가 적용되는지 여부를 나타낼 수 있다.
디코더(200)는 MTS 플래그에 기반하여 현재 블록에 대해 MTS가 적용되는지 여부를 확인할 수 있다(S1020). 예를 들어, MTS 플래그가 1인지 여부를 확인할 수 있다.
만약, MTS 플래그가 1인 경우, 디코더(200)는 0이 아닌 변환 계수의 개수가 임계값보다 큰지(또는 이상인지) 여부를 확인할 수 있다(S1030). 예를 들어, 변환 계수의 개수에 대한 임계값은 2로 설정될 수 있으며, 임계값은 블록 크기 또는 변환 블록의 크기에 기초하여 다르게 설정될 수 있다.
0이 아닌 변환 계수의 개수가 임계값보다 큰 경우, 디코더(200)는 MTS 인덱스를 파싱할 수 있다(S1040). 여기서, MTS 인덱스는 각 화면내 예측 모드 또는 화면간 예측 모드에 대해 복수개의 변환 조합들 중 어느 하나를 가리키는 인덱스를 의미한다. MTS 인덱스는 변환 블록마다 전송될 수 있다. 또한, MTS 인덱스는 기설정된 변환 조합 테이블에 정의된 어느 하나의 변환 조합을 가리키는 인덱스를 의미할 수 있으며, 여기서 기설정된 변환 조합 테이블은 상기 도 6a 또는 도 6b와 같이 설정될 수 있으나, 본 발명은 이에 한정되지 않는다.
디코더(100)는 MTS 인덱스 또는 예측 모드 중 적어도 하나에 기초하여 수평 변환 및 수직 변환을 유도 또는 결정할 수 있다(S1050). 또한, 디코더(100)는 MTS 인덱스에 대응되는 변환 조합을 유도할 수 있다. 예를 들어, 디코더(100)는 MTS 인덱스에 대응되는 수평 변환 및 수직 변환을 유도 또는 결정할 수 있다.
한편, 0이 아닌 변환 계수의 개수가 임계값보다 크지 않은 경우, 디코더(200)는 기설정된 수직 역변환을 열마다 적용할 수 있다(S1060). 예를 들어, 수직 역변환은 DST-7의 역변환일 수 있다. 또한, 수직 역변환은 DCT-8의 역변환일 수 있다
그리고, 상기 디코더는 기설정된 수평 역변환을 행마다 적용할 수 있다(S1070). 예를 들어, 상기 수평 역변환은 DST-7의 역변환일 수 있다. 또한, 수평 역변환은 DCT-8의 역변환일 수 있다.
즉, 0이 아닌 변환 계수의 개수가 임계값보다 크지 않은 경우에는 인코더(100) 또는 디코더(200)에서 기설정된 변환 타입이 이용될 수 있다. 예를 들어, 상기 도 6a 또는 도 6b와 같은 변환 조합 테이블에서 정의된 것이 아니라, 많이 이용되는 변환 타입(예를 들어, DCT-2 등)이 이용될 수 있다.
한편, MTS 플래그가 0인 경우, 디코더(200)는 기설정된 수직 역변환을 열마다 적용할 수 있다(S1080). 예를 들어, 수직 역변환은 DCT-2의 역변환일 수 있다.
그리고, 디코더(200)는 기설정된 수평 역변환을 행마다 적용할 수 있다(S1090). 예를 들어, 수평 역변환은 DCT-2의 역변환일 수 있다. 즉, MTS 플래그가 0인 경우에는 인코더 또는 디코더에서 기설정된 변환 타입이 이용될 수 있다. 예를 들어, 상기 도 6a, 또는 도 6b와 같은 변환 조합 테이블에서 정의된 것이 아니라, 많이 이용되는 변환 타입이 이용될 수 있다.
도 11은 본 발명이 적용되는 실시예로서, 변환 관련 파라미터에 기초하여 역변환을 수행하는 흐름도를 나타낸다.
본 발명이 적용되는 디코더(200)는, sps_mts_intra_enabled_flag 또는 sps_mts_inter_enabled_flag를 획득할 수 있다(S1110). 여기서, sps_mts_intra_enabled_flag는 tu_mts_flag가 화면내 예측이 적용되는 코딩 유닛(intra coding unit)의 잔차 신호의 부호화를 위한 신택스(residual coding syntax)에 존재하는지 여부를 나타낸다. 예를 들어, sps_mts_intra_enabled_flag = 0이면, tu_mts_flag 가 화면내 예측이 적용되는 코딩 유닛의 잔차 신호의 부호화를 위한 신택스에 존재하지 않고, sps_mts_intra_enabled_flag = 0이면, tu_mts_flag가 화면내 예측이 적용되는 코딩 유닛의 잔차 신호의 부호화를 위한 신택스에 존재한다. 그리고, sps_mts_inter_enabled_flag는 tu_mts_flag 가 화면간 예측이 적용되는 코딩 유닛(inter coding unit)의 잔차 신호의 부호화를 위한 신택스(residual coding syntax)에 존재하는지 여부를 나타낸다. 예를 들어, sps_mts_inter_enabled_flag = 0이면, tu_mts_flag가 화면간 예측이 적용되는 코딩 유닛의 잔차 신호의 부호화를 위한 신택스에 존재하지 않고, sps_mts_inter_enabled_flag = 0 이면, tu_mts_flag 가 화면내 예측이 적용되는 코딩 유닛의 잔차 신호의 부호화를 위한 신택스에 존재한다.
디코더(200)는 sps_mts_intra_enabled_flag 또는 sps_mts_inter_enabled_flag에 기초하여 tu_mts_flag를 획득할 수 있다(S1120). 예를 들어, sps_mts_intra_enabled_flag = 1 또는 sps_mts_inter_enabled_flag = 1일 때, 디코더(200)는 tu_mts_flag를 획득할 수 있다. 여기서, tu_mts_flag는 MTS가 루마 변환 블록(luma transform unit)의 잔차 샘플에 적용되는지 여부를 나타낸다. 예를 들어, tu_mts_flag = 0이면 MTS가 루마 변환 블록의 잔차 샘플에 적용되지 않고, tu_mts_flag = 1이면 MTS가 루마 변환 블록의 잔차 샘플에 적용된다. tu_mts_flag = 1에 대해 본 문서에서 설명되는 실시예들 중 적어도 하나가 적용될 수 있다.
디코더(200)는 tu_mts_flag에 기초하여 mts_idx를 획득할 수 있다(S1130). 예를 들어, tu_mts_flag = 1일 때, 상기 디코더는 mts_idx를 획득할 수 있다. 여기서, mts_idx는 어떤 변환 커널이 현재 변환 블록의 수평 및/또는 수직 방향에 따른 루마 잔차 샘플들에 적용되는지를 나타낸다. 예를 들어, mts_idx에 대해, 본 문서 실시예들 중 적어도 하나가 적용될 수 있다. 구체적 예로, 상기 도 6a, 도 6b, 도 44a, 또는 도 44b의 실시예들 중 적어도 하나가 적용될 수 있다.
디코더(200)는 mts_idx에 대응되는 변환 커널을 유도할 수 있다(S1140). 예를 들어, mts_idx에 대응되는 변환 커널은 수평 변환 및 수직 변환으로 구분되어 정의될 수 있다.
다른 예로, 상기 수평 변환 및 수직 변환은 서로 다른 변환 커널이 적용될 수 있다. 다만, 본 발명은 이에 한정되지 않으며, 상기 수평 변환 및 수직 변환은 동일한 변환 커널이 적용될 수도 있다.
일 실시예에서, mts_idx는 아래 표 1과 같이 정의될 수 있다.
Figure PCTKR2019008336-appb-img-000001
그리고, 디코더(200)는 S1140 단계에서 유도된 변환 커널에 기초하여 역변환을 수행할 수 있다(S1150).
도 11에서는, MTS의 적용 여부를 결정하기 위해 tu_mts_flag를 획득하고, 이후 획득된 tu_mts_flag 값에 따라 mts_idx를 획득하여 변환 커널을 결정하는 실시예를 위주로 설명하였으나, 본 발명은 이에 한정되지 않는다. 일 예로, 디코더(200)는 tu_mts_flag 파싱 없이 mts_idx를 곧바로 파싱하여 변환 커널을 결정할 수 있다. 이 경우, 상술한 표 1이 이용될 수 있다. 즉, mts_idx 값이 0을 지시하는 경우 수평/수직 방향으로 DCT-2를 적용하고, mts_idx 값이 0 이외의 값을 지시하는 경우, mts_idx 값에 따라 DST-7, 또는 DCT-8이 적용될 수 있다.
본 발명의 다른 실시예로, 변환 과정을 수행하는 디코딩 과정을 설명한다.
디코더(200)는, 변환 크기(nTbS)를 확인할 수 있다. 여기서, 변환 크기(nTbS)는 스케일된 변환 계수들의 수평 샘플 크기를 나타내는 변수일 수 있다.
디코더(200)는, 변환 커널 타입(trType)을 확인할 수 있다. 여기서, 변환 커널 타입(trType)은 변환 커널의 타입을 나타내는 변수일 수 있으며, 본 문서의 다양한 실시예들이 적용될 수 있다. 상기 변환 커널 타입(trType)은 수평 변환 커널 타입(trTypeHor)과 수직 변환 커널 타입(trTypeVer)을 포함할 수 있다.
표 1을 참고하면, 변환 커널 타입(trType)이 0이면 DCT-2를 나타내고, 1이면 DST-7을 나타내고, 2이면 DCT-8을 나타낼 수 있다.
디코더(200)는, 변환 크기(nTbS) 또는 변환 커널 타입 중 적어도 하나에 기초하여 변환 행렬 곱셈을 수행할 수 있다.
다른 예로, 변환 커널 타입이 1이고 변환 크기가 4이면, 변환 행렬 곱셈 수행시 기결정된 변환 행렬(1)이 적용될 수 있다.
다른 예로, 변환 커널 타입이 1이고 변환 크기가 8이면, 변환 행렬 곱셈 수행시 기결정된 변환 행렬(2)가 적용될 수 있다.
다른 예로, 변환 커널 타입이 1이고 변환 크기가 16이면, 변환 행렬 곱셈 수행시 기결정된 변환 행렬(3)이 적용될 수 있다.
다른 예로, 변환 커널 타입이 1이고 변환 크기가 32이면, 기정의된 변환 행렬(4)가 적용될 수 있다.
마찬가지로, 변환 커널 타입이 2이고 변환 크기가 4, 8, 16, 또는 32이면, 각각 기정의된 변환 행렬(5), (6), (7), (8)이 적용될 수 있다.
여기서, 상기 기정의된 변환 행렬들 (1)~(8)은 각각 다양한 타입의 변환 행렬들 중 어느 하나에 대응될 수 있다. 일예로, 상기 도 6a 및 도 6b에서 예시된 타입의 변환 행렬이 적용될 수 있다.
상기 디코더(200)는, 변환 행렬 곱셈에 기초하여 변환 샘플을 유도할 수 있다.
상기 실시예는 각각 이용될 수 있으나, 본 발명은 이에 한정되지 않으며, 위 실시예 및 본 명세서의 다른 실시예와 결합하여 이용될 수 있다.
도 12는 본 발명이 적용되는 실시예로서, NSST에서 화면내 예측 모드마다 변환 세트(transform set)를 할당하는 것을 보여주는 테이블이다.
2차 변환부(122)는 1차 변환된 신호에 대해 2차 변환을 적용할 수 있으며, 여기서 2차 변환은 인코더(100) 및/또는 디코더(200)에서 테이블로 기정의될 수 있다.
일 실시예에서, 2차 변환은 NSST가 조건적으로 적용될 수 있다. 예를 들어, NSST는 화면내 예측 블록일 경우에만 적용되며, 예측 모드 그룹마다 적용 가능한 변환 셋을 가질 수 있다.
본 발명의 실시예에 따르면, 변환 블록의 크기가 4x4에 해당하면, NSST가 생략되고, 변환 블록의 크기가 4x4 보다 크면, 좌상측의 4x4 영역에 대하여만 NSST가 적용될 수 있다.
여기서, 상기 예측 모드 그룹은 예측 방향에 대한 대칭성에 기초하여 설정될 수 있다. 예를 들어, 예측 모드 52와 예측 모드 16은 예측 모드 34 (대각 방향)를 기준으로 대칭이므로, 하나의 그룹을 형성하여 동일한 변환 셋(transform set)이 적용될 수 있다. 이때, 상기 예측 모드 52에 대한 변환을 적용할 때 입력 데이터를 전치한 후 적용하며, 이는 예측 모드 16과 변환 셋이 동일하기 때문이다.
한편, 플래너 모드(Planar mode)와 DC 모드(DC mode)의 경우 방향에 대한 대칭성이 존재하지 않으므로 각자의 변환 셋을 가지며, 해당 변환 셋은 2개의 변환들로 구성될 수 있다. 나머지 방향성 모드에 대해서는 변환 셋마다 3개의 변환들로 구성될 수 있다. 다만, 본 발명은 이에 한정되지 않으며, 각 변환 셋은 복수개의 변환들로 구성될 수 있다.
도 13은 본 발명이 적용되는 실시예로서, 기븐스 회전(Givens rotation)에 대한 계산 플로우 다이어그램을 나타낸다.
다른 실시예로, NSST는 1차 변환된 블록 전체에 대해 적용되는 것이 아니라 좌상측(top-left) 8x8 영역에 대해서만 적용될 수 있다. 예를 들어, 블록의 크기가 8x8 이상인 경우는 8x8 NSST가 적용되며, 8x8 미만인 경우는 4x4 NSST가 적용되는데, 이때 4x4 블록들로 나눈 후 각기 4x4 NSST가 적용된다. 본 발명의 실시예에 따르면, 변환 블록의 크기가 4x4에 해당하면, NSST가 생략되고, 변환 블록의 크기가 4x4 보다 크면, 좌상측의 4x4 영역에 대하여만 NSST가 적용될 수 있다.
다른 실시예로, 4xN/Nx4 (N >= 16)인 경우에도 4x4 NSST가 적용될 수 있다.
8x8 NSST와 4x4 NSST 모두 본 문서에서 설명하는 변환 조합 구성을 따르며, 비분리 변환(non-separable transform)이므로 8x8 NSST는 64개의 데이터를 입력 받아 64개의 데이터를 출력하며 4x4 NSST는 16개의 입력과 16개의 출력을 갖는다.
8x8 NSST와 4x4 NSST 모두 기븐스 회전(Givens rotation)들의 계층적 조합으로 구성된다. 하나의 기븐스 회전(Givens rotation)에 해당하는 행렬은 다음 수학식 1과 같으며, 행렬 곱은 다음 수학식 2와 같다.
Figure PCTKR2019008336-appb-img-000002
Figure PCTKR2019008336-appb-img-000003
도 13과 같이, 하나의 기븐스 회전(Givens rotation)은 2개의 데이터를 회전시키는 것이기 때문에 64개 (8x8 NSST의 경우) 또는 16개의 (4x4 NSST의 경우) 데이터를 처리하기 위해서는 각기 총 32개 또는 8개의 기븐스 회전(Givens rotation)이 필요하다.
따라서, 32개 또는 8개를 묶음으로 하여 기븐스 회전 레이어(Givens rotation layer)를 이룬다. 한 기븐스 회전 레이어에 대한 출력 데이터가 정해진 치환(permutation)을 다음 기븐스 회전 레이어에 대한 입력 데이터로 전달된다.
도 14는 본 발명이 적용되는 실시예로서, 기븐스 회전 레이어(Givens rotation layer)와 치환(permutation)들로 구성된 4x4 NSST에서의 한 라운드 구성을 보여준다.
도 14를 살펴보면, 4x4 NSST의 경우에 대해 4개의 기븐스 회전 레이어가 순차적으로 처리되는 모습을 보이고 있다. 도 14에서와 같이 한 기븐스 회전 레이어에 대한 출력 데이터가 정해진 치환(i.e. shuffling)을 거쳐 다음 기븐스 회전 레이어에 대한 입력 데이터로 전달된다.
도 14에서와 같이 치환되는 패턴은 규칙적으로 정해져 있으며 4x4 NSST의 경우는 4개의 기븐스 회전 레이어와 해당 치환들을 합쳐 하나의 라운드(round)를 이룬다.
8x8 NSST의 경우는 6개의 기븐스 회전 레이어와 해당 치환들이 하나의 라운드를 형성한다. 4x4 NSST는 2번의 라운드를 거치게 되며, 8x8 NSST는 4번의 라운드를 거치게 된다. 서로 다른 라운드들끼리는 동일한 치환 패턴을 사용하지만 적용되는 기븐스 회전 각도들은 각기 다르다. 따라서, 각 변환을 구성하는 모든 기븐스 회전에 대한 각도 데이터를 저장하여야 한다.
맨 마지막 단계로 기븐스 회전 레이어들을 거쳐 출력된 데이터에 대해 최종적으로 한 번의 치환을 더 수행하게 되며, 해당 치환 정보는 변환마다 별도로 저장되어 있다. 순방향 NSST에서는 맨 마지막에 해당 치환이 수행되며, 역방향 NSST에서는 반대로 맨 처음에 해당 역 치환이 적용된다.
역방향 NSST의 경우는 순방향 NSST에서 적용되었던 기븐스 회전 레이어들과 치환들을 역순으로 수행하면 되며, 각 기븐스 회전의 각도에 대해서도 (-) 값을 취해 회전시킨다.
도 15는 본 발명이 적용되는 실시예로서, 순방향 축소 변환(forward reduced transform) 및 역방향 축소 변환(forward reduced transform)의 동작을 설명하기 위한 블록도이다.
Reduced Secondary Transform (RST)
한 변환을 나타내는 직교 행렬이 NxN 형태를 갖는다고 했을 때, 축소 변환(Reduced Transform, 이하 'RT'라 함)는 N개의 변환 기저 벡터들 중에 R개만을 남기는 것이다 (R < N). 변환 계수를 생성하는 순방향 RT에 대한 행렬은 다음 수학식 3과 같이 주어진다.
Figure PCTKR2019008336-appb-img-000004
역방향 RT에 대한 행렬은 순방향 RT 행렬의 전치 행렬(transpose matrix)이 되므로, 순방향 RT와 역방향 RT의 적용을 도식화하면 도 15와 같다.
1차 변환을 거친 변환 블록의 좌상단 8x8 블록에 대해 RT를 적용하는 경우를 가정하면, 상기 RT를 8x8 축소 2차 변환 (8x8 RST)이라 명명할 수 있다.
수학식 3에서의 R 값을 16이라 할 때, 순방향 8x8 RST는 16x64 행렬 형태를 가지며 역방향 8x8 RST는 64x16 행렬 형태를 가진다.
또한, 8x8 RST에 대해서도, 도 12에서와 동일한 변환 세트 구성을 적용할 수 있다. 즉, 도 12에서의 변환 세트에 따라 대응되는 8x8 RST가 적용될 수 있다.
일실시예로, 도 12에서 하나의 변환 세트가 인트라 예측 모드에 따라 2개 또는 3개의 변환들로 구성되어 있을 때, 2차 변환을 적용하지 않는 경우를 포함하여 최대 4개의 변환들 중 하나를 선택하도록 구성될 수 있다. 여기서, 하나의 변환은 항등 행렬이라고 볼 수 있다.
4개의 변환에 대해 각각 0, 1, 2, 3의 인덱스를 부여할 때, NSST 인덱스라는 신택스 요소(syntax element)를 변환 블록마다 시그널링하여 대응되는 변환을 지정할 수 있다. 즉, NSST 인덱스를 통해 8x8 좌상단 블록에 대해, NSST의 경우는 8x8 NSST를 지정할 수 있고, RST 구성에서는 8x8 RST를 지정할 수 있다. 또한, 이때, 0번 인덱스를 항등 행렬, 즉 2차 변환을 적용하지 않는 경우로 할당할 수 있다.
수학식 3과 같은 순방향 8x8 RST를 적용하게 되면 16개의 유효한 변환 계수가 생성되므로, 8x8 영역을 구성하는 64개의 입력 데이터가 16개의 출력 데이터로 축소된다고 볼 수 있다. 2차원 영역 관점에서 보면 1/4만큼의 영역에만 유효한 변환 계수가 채워지게 된다. 따라서, 순방향 8x8 RST를 적용하여 얻은 16개의 출력 데이터를 도 16에서의 4x4 좌상단 영역에 채울 수 있다.
한편, 상술한 RST는 LFNST(low frequency non-separable transform)으로도 지칭될 수 있다.
도 16은 본 발명이 적용되는 실시예로서, 역방향 스캔 순서에 따라 64번째부터 17번째까지 역방향 스캔을 수행하는 과정을 나타내는 도면이다.
도 16은 순방향 스캔 순서가 1부터 시작된다고 할 때 (순방향 스캔 순서 상) 17번째 계수에서 64번째 계수에 대한 스캐닝을 수행하는 것을 나타낸다. 다만, 도 16에서는 역방향 스캔을 보여주고 있는 바, 이는 64번째부터 17번째까지 역방향 스캐닝을 수행하는 것을 나타낸다.
도 16을 살펴보면, 좌상단 4x4 영역이 유효한 변환 계수가 할당되는 관심 영역 (region of interest, ROI)이고, 나머지 영역은 비워지게 된다. 즉, 나머지 영역에는 0 값이 디폴트로 할당될 수 있다.
만약, 도 16의 ROI 영역 이외에 0이 아닌 유효한 변환 계수가 존재한다면 8x8 RST가 적용되지 않는 것을 의미하므로, 이 경우 그에 대응되는 NSST 인덱스 코딩을 생략할 수 있다.
반대로, 도 16의 ROI 영역 이외에서 0이 아닌 변환 계수가 존재하지 않는다면(8x8 RST가 적용되는 경우, ROI 이외의 영역에 대해서는 0으로 할당될 때) 8x8 RST가 적용되었을 가능성이 있으므로 NSST 인덱스를 코딩할 수 있다.
이와 같이, 조건적 NSST 인덱스 코딩은 0이 아닌 변환 계수의 존재 유무를 확인하여야 하므로 레지듀얼 코딩 과정 이후에 수행될 수 있다.
본 발명의 실시예에 따르면, 변환 블록의 크기가 4x4에 해당하면, NSST가 생략되고, 변환 블록의 크기가 4x4 보다 크면, 좌상측의 4x4 영역에 대하여만 NSST가 적용될 수 있다.
도 17은 본 발명이 적용되는 실시예로서, 변환 계수 블록(변환 블록)에 대한 3가지 순방향 스캔 순서를 나타낸다.
실시예 1-1: 4x4 블록에 적용될 수 있는 RST
하나의 4x4 블록에 적용될 수 있는 비-분리 변환(non-separable transform)은 16x16 변환이다. 즉, 4x4 블록을 구성하는 데이터 요소들을 행 우선(row-first) 또는 열 우선(column-first) 순서로 일렬로 늘어 놓게 되면 16x1 벡터가 형성될 수 있고, 해당 16x1 벡터에 대해 비-분리 변환이 적용될 수 있다.
순방향 16x16 변환은 16개의 행(row) 방향 변환 기저 벡터들로 구성되며, 16x1 벡터와 각 변환 기저 벡터에 대해 내적(inner product)이 적용되면, 변환 기저 벡터에 대한 변환 계수가 획득된다. 16개의 변환 기저 벡터들에 대해 모두 대응되는 변환 계수를 얻는 과정은, 16x16 비-분리 변환 행렬과 상기 입력 16x1 벡터를 곱하는 것과 같다.
행렬 곱으로 얻어지는 변환 계수들은 16x1 벡터 형태를 가지는데, 변환 계수 별로 통계적 특성이 다를 수 있다. 예를 들어, 16x1 변환 계수 벡터가 0번째 요소부터 15번째 요소로 이루어졌다고 했을 때, 0번째 요소의 분산은 15번째 요소의 분산보다 클 수 있다. 즉, 앞에 위치한 요소일수록 해당 분산 값이 커서 큰 에너지 값을 가질 수 있다.
16x1 변환 계수에 대해 역방향 16x16 비-분리 변환이 적용되면, 원래의 4x4 블록 신호가 복원될 수 있다. 순방향 16x16 비-분리 변환이 정규직교 변환(orthonormal transform)이라면 해당 역방향 16x16 변환은 순방향 16x16 변환에 대한 전치 행렬을 통해 획득될 수 있다.
역방향 16x16 비-분리 변환 행렬이 16x1 변환 계수 벡터에 곱해지면, 16x1 벡터 형태의 데이터가 획득되고, 처음 적용했었던 행 우선(row-first) 또는 열 우선(column-first) 순서로 배열함으로써 4x4 블록 신호가 복원될 수 있다.
상술한 바와 같이, 16x1 변환 계수 벡터를 이루는 요소들은 각기 통계적 특성이 다를 수 있다.
앞쪽에 배치된 (0번째 요소와 가까운) 변환 계수들이 보다 큰 에너지를 가진다면, 모든 변환 계수들을 사용하지 않고 먼저 등장하는 일부의 변환 계수들에 역방향 변환을 적용하여도 원래의 신호와 상당히 가까운 신호를 복원할 수 있다. 예를 들어, 역방향 16x16 비-분리 변환이 16개의 열 기저 벡터(column basis vector)들로 구성된다고 했을 때, L개의 열 기저 벡터만 남겨 16xL 행렬을 구성할 수 있다. 그리고, 변환 계수들 중 중요한 L개의 변환 계수들만을 남긴 후 (Lx1 벡터), 16xL 행렬과 Lx1 벡터를 곱하게 되면 원래의 입력 16x1 벡터 데이터와 오차가 크지 않은 16x1 벡터가 복원될 수 있다.
결과적으로, L개의 계수들만이 데이터 복원에 이용되기 때문에, 변환 계수를 얻을 때도 16x1 변환 계수 벡터가 아니라 Lx1 변환 계수 벡터를 구하면 된다. 즉, 순방향 16x16 비분리 변환 행렬에서 L개의 해당 행(row) 방향 변환 벡터들을 골라서 Lx16 변환을 구성한 후 16x1 입력 벡터와 곱하게 되면 중요한 L개의 변환 계수들이 획득될 수 있다.
L 값은 1<=L<16의 범위를 갖게 되고, 일반적으로 16개의 변환 기저 벡터들 중에 임의의 방법으로 L개가 선택될 수 있으나, 부호화와 복호화 관점에서는 신호의 에너지 측면에서 중요도가 높은 변환 기저 벡터들이 선택되는 것이 부호화 효율 관점에서 유리할 수 있다.
실시예 1-2: 4x4 RST의 적용 영역 설정과 변환 계수의 배치
4x4 RST는 2차 변환으로 적용될 수 있으며, 이때 DCT-2 등의 1차 변환(primary transform)이 적용된 블록에 대해 2차적으로 적용될 수 있다. 1차 변환이 적용된 블록의 크기를 NxN이라 할때, 일반적으로 1차 변환이 적용된 블록의 크기는 4x4보다 크다. 따라서, 4x4 RST를 상기 NxN 블록에 적용할 때는 다음과 같은 두 가지 방법이 있을 수 있다.
첫번째 방법으로서, NxN 영역에 대해 모두 4x4 RST가 적용되는 것이 아니라 일부 영역에만 적용될 수 있다. 예를 들어, 좌상측 MxM 영역에 대해서만 4x4 RST가 적용될 수 있다 (M <= N).
두번째 방법으로서, 2차 변환이 적용될 영역을 4x4 블록들로 분할한 후 각 분할된 블록에 대해 4x4 RST가 적용될 수 있다.
일실시예로, 위 두가지 방법이 혼합될 수 있다. 예를 들어, 좌상측 MxM 영역만 4x4 블록들로 분할된 후, 분할된 MxM 영역에 대해 4x4 RST가 적용될 수 있다.
일실시예로, 좌상측 8x8 영역에 대해서만 2차 변환이 적용되고, NxN 블록이 8x8보다 같거나 큰 경우에는 8x8 RST가 적용되며, NxN 블록이 8x8보다 작은 경우(4x4, 8x4, 4x8)에는 두번째 실시예와 같이 4x4 블록들로 분할된 후 각각의 4x4 블록들에 대해 4x4 RST가 적용될 수 있다. 또한, 4xN/Nx4 (N >= 16)인 경우에도 4x4 RST가 적용될 수 있다.
4x4 RST를 적용한 후 L개(1<=L<16)의 변환 계수가 생성되었을 때, 상기 L개의 변환 계수를 어떻게 배치할지에 대한 자유도가 생긴다. 그러나, 레지듀얼 코딩(residual coding) 단계에서 변환 계수를 처리할 때 정해진 순서가 존재할 것이므로, L개의 변환 계수를 2-차원 블록에 어떻게 배치하는가에 따라 코딩 성능이 달라질 수 있다.
예를 들어, HEVC의 레지듀얼 코딩의 경우, DC 위치에서 가장 멀리 떨어진 위치에서부터 코딩이 시작된다. 이는 DC 위치에서 멀리 떨어질수록 양자화를 거친 계수 값이 0이거나 0에 가깝다는 사실을 이용하여 코딩 성능을 높이기 위함이다.
따라서, L개의 변환 계수들에 대해서도 높은 에너지를 가진 보다 중요한 계수를 레지듀얼 코딩의 순서상 나중에 코딩되도록 배치하는 것이 코딩 성능 면에서 유리할 수 있다.
도 17은 HEVC에서 적용되고 있는 4x4 변환 블록(coefficient group, CG) 단위의 3가지 순방향 스캔 순서를 나타낸다. 레지듀얼 코딩에서는 도 17의 스캔 순서의 역순을 따른다 (즉, 16부터 1의 순서로 코딩함).
도 17에서 제시하는 3가지 스캔 순서는 인트라 예측 모드에 따라 선택되므로, 본 발명은 L개의 변환 계수들에 대해서도 동일하게 인트라 예측 모드에 따라 스캔 순서를 결정하도록 구성할 수 있다.
도 18은 본 발명이 적용되는 실시예로서, 좌상측 4x8 블록에서 대각 스캔(diagonal scan)이 적용되고 4x4 RST 가 적용되었을 때 유효한 변환 계수들의 위치와 4x4 블록 별 순방향 스캔 순서를 나타낸다.
도 17에서의 대각 스캔(diagonal scan) 순서를 따르고 좌상측 4x8 블록을 4x4 블록들로 분할하여 각기 4x4 RST를 적용할 때, L 값이 8이라면 (즉, 16개 중에 8개의 변환 계수만을 남긴다면) 도 18과 같이 변환 계수들이 위치할 수 있다.
각 4x4 블록의 절반만이 변환 계수를 가질 수 있으며, X가 표시된 위치들에 대해서는 디폴트로 0 값이 할당될 수 있다.
따라서, 도 17에서 제시된 스캔 순서에 따라 L개의 변환 계수를 각 4x4 블록에 대해 배치시키고, 각 4x4 블록의 남은 (16 - L)개의 위치들에 대해서는 0으로 채워진다는 것을 가정하고 레지듀얼 코딩을 적용할 수 있다.
도 19는 본 발명이 적용되는 실시예로서, 좌상측 4x8 블록에서 대각 스캔(diagonal scan)이 적용되고 4x4 RST 가 적용되었을 때 두 4x4 블록의 유효한 변환 계수들을 하나의 4x4 블록으로 합치는 경우를 나타낸다.
도 19를 살펴보면, 2개의 4x4 블록에 배치시켰던 L개의 변환 계수들을 하나로 합칠 수 있다. 특히 L 값이 8인 경우 두 4x4 블록의 변환 계수들이 하나의 4x4 블록을 완전히 채우면서 합쳐지므로, 다른 하나의 4x4 블록에는 어떠한 변환 계수도 남아 있지 않게 된다.
따라서, 이렇게 비워진 4x4 블록에 대해서는 대부분의 레지듀얼 코딩이 불필요하므로, 대응되는 coded_sub_block_flag는 0으로 코딩될 수 있다.
또한, 일실시예로, 2개의 4x4 블록의 변환 계수들이 혼합되는 다양한 방식이 사용될 수 있다. 임의의 순서를 따라 합칠 수도 있지만, 본 발명의 실시예는 다음과 같은 방법들을 제공할 수 있다.
1) 2개의 4x4 블록의 변환 계수를 스캔 순서대로 번갈아 가면서 섞는다. 즉, 상기 도 18에서 상측 블록에 대한 변환 계수를
Figure PCTKR2019008336-appb-img-000005
이라고 하고 하측 블록의 변환 계수를
Figure PCTKR2019008336-appb-img-000006
이라고 할 때,
Figure PCTKR2019008336-appb-img-000007
와 같이 하나씩 번갈아 가며 섞일 수 있다. 또는,
Figure PCTKR2019008336-appb-img-000008
Figure PCTKR2019008336-appb-img-000009
의 순서가 바뀔 수도 있다. 즉,
Figure PCTKR2019008336-appb-img-000010
이 먼저 나오도록 설정될 수 있다.
2) 첫 번째 4x4 블록에 대한 변환 계수들이 먼저 배치되고 뒤이어 두 번째 4x4 블록에 대한 변환 계수들이 배치될 수 있다. 즉,
Figure PCTKR2019008336-appb-img-000011
과 같이 연결하여 배치할 수 있다. 또는,
Figure PCTKR2019008336-appb-img-000012
와 같이 순서를 바꿀 수도 있다.
실시예 1-3: 4x4 RST에 대한 NSST 인덱스를 코딩하는 방법
도 18과 같이 4x4 RST가 적용되면 각 4x4 블록에 대해 변환 계수 스캔 순서에 따라 L+1번째부터 16번째까지는 0 값이 채워질 수 있다.
따라서, 만약 두 4x4 블록 중 하나라도 L+1번째부터 16번째 위치 중에 0이 아닌 값이 발생한다면, 4x4 RST가 적용되지 않는 경우라고 알 수 있게 된다.
4x4 RST도 NSST와 같이 준비된 변환 세트 중에서 하나를 선택해서 적용하는 구조를 갖는다면, 어떤 변환을 적용할지에 대한 변환 인덱스(본 실시예에서는 NSST 인덱스라고 명명할 수 있음)가 시그널링될 수 있다.
일 실시예에서, 디코더(200)는 비트스트림 파싱을 통해 NSST 인덱스를 알 수 있고, 비트스트림 파싱은 레지듀얼 디코딩 이후에 수행된다고 가정한다.
만약, 레지듀얼 디코딩이 수행되어 L+1번째부터 16번째 사이에 0이 아닌 변환 계수가 하나라도 존재하는 것이 확인된다면, 4x4 RST는 적용되지 않으므로 NSST 인덱스는 파싱되지 않도록 설정될 수 있다.
따라서, 필요한 경우에 대해서만 선택적으로 NSST 인덱스가 파싱되어 시그널링 비용을 줄일 수 있다.
도 18과 같이 특정 영역 내에서 복수개의 4x4 블록에 대해 4x4 RST가 적용된다고 한다면(예를 들어, 모두 동일한 4x4 RST가 적용될 수도 있고 각기 다른 4x4 RST가 적용될 수도 있다), 하나의 NSST 인덱스를 통해 상기 모든 4x4 블록들에 적용되는 4x4 RST가 지정될 수 있다. 이 경우, 동일한 4x4 RST가 지정될 수도 있고, 또는 모든 4x4 블록들 각각에 적용되는 4x4 RST가 지정될 수 있다.
하나의 NSST 인덱스에 의해 모든 4x4 블록들에 대한 4x4 RST 및 적용 여부가 결정되므로, 모든 4x4 블록들에 대해 L+1번째부터 16번째까지의 위치에서 0이 아닌 변환 계수가 존재하는지를 레지듀얼 디코딩 과정 중에 확인할 수 있다. 확인 결과, 하나의 4x4 블록에서라도 허용되지 않는 위치에 (L+1번째부터 16번째까지의 위치) 0이 아닌 변환 계수가 존재하게 되면 NSST 인덱스가 코딩되지 않도록 구성될 수 있다.
NSST 인덱스는 루마 블록과 크로마 블록에 대해 각기 따로 시그널링될 수도 있고, 크로마 블록의 경우 Cb와 Cr에 대해 각각 별도의 NSST 인덱스가 시그널링될 수도 있으며, 하나의 NSST 인덱스가 루마 블록과 크로마 블록 사이에 공유될 수도 있다.
Cb와 Cr에 대해 하나의 NSST 인덱스가 공유되는 경우, 동일한 NSST 인덱스에 의해 지시되는 4x4 RST가 적용될 수 있다. 이 경우, Cb와 Cr에 대한 4x4 RST가 동일할 수도 있고, NSST 인덱스는 같으나 개별적인 4x4 RST가 사용될 수 있다.
공유 NSST 인덱스에 대해 상술한 조건적 시그널링을 적용하려면, Cb와 Cr에 대한 모든 4x4 블록들에 대해 L+1번째부터 16번째까지 0이 아닌 변환 계수가 존재하는지를 확인함으로써, 만약 0이 아닌 변환 계수가 존재하면 NSST 인덱스에 대한 시그널링이 수행되지 않도록 구성될 수 있다.
도 19에서와 같이, 2개의 4x4 블록에 대한 변환 계수들을 합치는 경우에 대해서도, 4x4 RST가 적용되었을 때 유효한 변환 계수가 존재하지 않는 위치에 0이 아닌 변환 계수가 존재하는지를 확인한 후 NSST 인덱스에 대한 시그널링 여부가 결정될 수 있다.
예를 들어, 도 19의 (b)에서와 같이 L 값이 8이어서 4x4 RST 적용 시 하나의 4x4 블록에 대해서는 유효한 변환 계수들이 존재하지 않는 경우(X로 표시된 블록), 유효한 변환 계수들이 존재하지 않는 블록의 coded_sub_block_flag가 확인될 수 있다. 이때, coded_sub_block_flag 가 1이면 NSST 인덱스를 시그널링하지 않도록 설정될 수 있다.
실시예 1-4: NSST 인덱스에 대한 코딩을 레지듀얼 코딩 이전에 수행하는 경우에 대한 최적화 방법
NSST 인덱스에 대한 코딩이 레지듀얼 코딩 이전에 수행되는 경우, 4x4 RST의 적용 여부가 미리 결정되므로 변환 계수가 0으로 할당되는 위치들에 대해서는 레지듀얼 코딩이 생략될 수 있다.
여기서, 4x4 RST 적용 여부는 NSST 인덱스를 통해 알 수 있도록 구성될 수 있다. 예를 들어, NSST 인덱스가 0이면 4x4 RST가 적용되지 않는다.
또는, 4x4 RST 적용 여부가 별도의 신택스 요소(예를 들어, NSST flag)를 통해 시그널링될 수도 있다. 예를 들어, 별도의 신택스 요소를 NSST flag라 하면, 디코더(200)는 NSST flag를 먼저 파싱하여 4x4 RST 적용 여부를 확인한 후, 만약 NSST flag 값이 1이면, 유효한 변환 계수가 존재할 수 없는 위치들에 대해서는 레지듀얼 코딩을 생략할 수 있다.
일실시예로, 인코더(100)는 레지듀얼 코딩 수행 시 TU 상에서의 마지막 0이 아닌 변환 계수 위치를 가장 첫 번째로 코딩하게 된다. 만약, NSST 인덱스에 대한 코딩을 마지막 0이 아닌 변환 계수 위치(last non-zero transform coefficient) 코딩 이후에 수행하고 마지막 0이 아닌 변환 계수의 위치가 4x4 RST의 적용을 가정했을 때, 0이 아닌 변환 계수(non-zero transform coefficient)가 발생할 수 없는 위치로 판명되었다면, 인코더(100)는 NSST 인덱스를 코딩하지 않고 4x4 RST를 적용하지 않도록 구성할 수 있다.
예를 들어, 도 18에서 X로 표시된 위치들의 경우 4x4 RST가 적용되었을 때 유효한 변환 계수들이 위치하지 않으므로(예를 들어, 0 값 등이 채워질 수 있다), 인코더(100)는 X로 표시된 영역에 마지막 0이 아닌 변환 계수가 위치하게 되면 NSST 인덱스에 대한 코딩을 생략할 수 있다. 만약 X로 표시된 영역에 마지막 0이 아닌 변환 계수가 위치하지 않는다면, NSST 인덱스에 대한 코딩이 수행될 수 있다.
일실시예로, 마지막 0이 아닌 변환 계수 위치에 대한 코딩 이후에 조건적으로 NSST 인덱스를 코딩하여 4x4 RST의 적용 여부를 확인하는 경우, 남은 레지듀얼 코딩 부분은 다음과 같은 두 가지 방식을 이용하여 처리될 수 있다.
1) 4x4 RST가 적용되지 않는 경우, 일반적인 레지듀얼 코딩을 그대로 사용된다. 즉, 마지막 0이 아닌 변환 계수 위치부터 DC에 해당하는 위치까지 어떤 위치도 0이 아닌 변환 계수가 존재할 수 있다는 가정 하에서 코딩을 수행한다.
2) 4x4 RST가 적용되는 경우, 특정 위치 또는 특정 4x4 블록에 대해서는 변환 계수가 존재하지 않으므로 (예를 들어, 상기 도 18의 X 위치, 디폴트로 0으로 채워질 수 있음), 변환 계수가 존재하지 않는 위치 또는 블록에 대한 레지듀얼 코딩이 수행되지 않을 수 있다.
예를 들어, 도 18에서 X로 표시된 위치에 도달하는 경우, sig_coeff_flag에 대한 코딩이 생략될 수 있다. 여기서, sig_coeff_flag는 대응되는 위치에 0이 아닌 변환 계수가 존재하는지 여부를 나타내는 플래그의 예이다.
도 19와 같이 2개 블록의 변환 계수들이 하나의 블록에 합쳐지는 경우, 0으로 할당된 4x4 블록에 대한 coded_sub_block_flag에 대한 코딩이 생략되고, 대응되는 값(coded_sub_block_flag)은 0으로 설정될 수 있다.
마지막 0이 아닌 변환 계수 위치에 대한 코딩 이후에 NSST 인덱스가 코딩되는 경우, 마지막 0이 아닌 변환 계수의 x 위치(P x)와 y 위치(P y)가 각기 변환 블록의 x 위치(T x)와 y 위치(T y)보다 작을 때 NSST 인덱스 코딩이 생략되고, 4x4 RST가 적용되지 않도록 구성될 수 있다.
예를 들어, T x = 1, T y = 1인 경우, 마지막 0이 아닌 변환 계수가 DC 위치에 존재하는 경우에 대해서는 NSST 인덱스 코딩이 생략된다는 것을 의미한다.
이와 같은 임계값과의 비교를 통해 NSST 인덱스 코딩 여부를 결정하는 방식은 루마와 크로마에 각기 달리 적용될 수 있다. 예를 들어, 루마와 크로마에 대해 각기 다른 T x, T y를 적용할 수도 있고, 루마에는 임계값을 적용하고 크로마에는 적용하지 않을 수도 있다. 또는 그 반대의 경우도 가능하다.
상술한 2가지 방법, 즉 첫째 마지막 0이 아닌 변환 계수가 유효한 변환 계수가 존재하지 않는 영역에 위치하는 경우 NSST 인덱스 코딩 생략하는 방법, 둘째 마지막 0이 아닌 변환 계수에 대한 X 좌표와 Y 좌표가 각기 어떤 임계값보다 작을 때 NSST 인덱스 코딩을 생략하는 방법을 함께 적용할 수도 있다.
예를 들어, 마지막 0이 아닌 변환 계수의 위치 좌표에 대한 임계값을 먼저 확인한 후, 마지막 0이 아닌 변환 계수가 유효한 변환 계수가 존재하지 않는 영역에 위치하는지 여부를 확인할 수 있다. 또는 순서를 바꿀 수도 있다.
본 실시예 4에서 제시하는 방법들은 8x8 RST에 대해서도 적용될 수 있다. 즉, 마지막 0이 아닌 변환 계수가 좌상측 8x8 영역 내에서 좌상측 4x4가 아닌 영역에 위치하게 된다면 NSST 인덱스에 대한 코딩을 생략할 수 있고, 그렇지 않다면 NSST 인덱스 코딩을 수행할 수 있다.
또한, 마지막 0이 아닌 변환 계수 위치에 대한 X, Y 좌표 값이 모두 임계값 미만일 경우 NSST 인덱스에 대한 코딩을 생략할 수 있다. 또는, 2가지 방법을 함께 적용할 수도 있다.
실시예 1-5: RST 적용 시 루마 블록과 크로마 블록에 대해 각기 다른 NSST 인덱스 코딩 및 레지듀얼 코딩 방식 적용
상술한 실시예 1-3과 실시예 1-4에 기술된 방식들이 루마와 크로마에 각기 다르게 적용될 수 있다. 즉, 루마와 크로마에 대한 NSST 인덱스 코딩 및 레지듀얼 코딩 방식이 다르게 적용될 수 있다.
예를 들어, 실시예 1-4의 방식이 루마 블록에 대해서 적용되고, 실시예 1-3의 방식이 크로마 블록에 대해서 적용될 수 있다. 또는, 루마 블록에 대하여 실시예 1-3 또는 실시예 1-4에 제시된 조건적 NSST 인덱스 코딩이 적용되고, 크로마 블록에 대해서 조건적 NSST 인덱스 코딩이 적용되지 않을 수 있다. 또는 그 반대도 가능하다.
도 20은 본 발명이 적용되는 실시예로서, 축소된 2차 변환(reduced secondary transform, RST)에 기초하여 비디오 신호를 인코딩하는 흐름도를 나타낸다.
인코더(100)는 현재 블록의 예측 모드, 블록 모양 및/또는 블록 크기 중 적어도 하나에 기초하여 순방향 2차 변환을 결정(또는 선택)할 수 있다(S2010). 이때, 상기 순방향 2차 변환의 후보는 도 6 및/또는 도 12의 실시예들 중 적어도 하나를 포함할 수 있다.
인코더(100)는 RD 최적화(rate-distortion optimization)를 통해 최적의 순방향 2차 변환을 결정할 수 있다. 최적의 순방향 2차 변환은 복수개의 변환 조합 중 하나에 대응될 수 있고, 복수개의 변환 조합은 변환 인덱스에 의해 정의될 수 있다. 예를 들어, RD 최적화를 위해, 인코더(100)는 각 후보들에 대해 순방향 2차 변환, 양자화, 레지듀얼 코딩 등을 모두 수행한 결과를 비교할 수 있다. 이때,
Figure PCTKR2019008336-appb-img-000013
또는
Figure PCTKR2019008336-appb-img-000014
등의 수식이 이용될 수 있지만, 본 발명은 이에 한정되지 않는다.
인코더(100)는 최적의 순방향 2차 변환에 대응되는 2차 변환 인덱스를 시그널링할 수 있다(S2020). 여기서, 2차 변환 인덱스는 본 명세서에서 설명한 다른 실시예들이 적용될 수 있다.
예를 들어, 2차 변환 인덱스는 도 12의 변환 세트 구성이 사용될 수 있다. 하나의 변환 세트는 인트라 예측 모드에 따라 2개 또는 3개의 변환들로 구성되어 있으므로, 2차 변환을 적용하지 않는 경우까지 포함하여 최대 4개의 변환들 중 하나를 선택하도록 구성될 수 있다. 4개의 변환들에 대해 각각 0, 1, 2, 3의 인덱스를 부여한다고 했을 때, 인코더(100)는 2차 변환 인덱스를 변환 계수 블록마다 시그널링함으로써 적용될 변환을 지정할 수 있다. 이때, 인코더(100)는 0번 인덱스를 항등 행렬, 즉 2차 변환을 적용하지 않는 경우로 할당할 수 있다.
다른 일실시예로, 2차 변환 인덱스의 시그널링은, 1) 레지듀얼 코딩 이전, 2) 레지듀얼 코딩 중간 (마지막 0이 아닌 변환 계수 위치 코딩 이후), 또는 3) 레지듀얼 코딩 이후 중 어느 하나의 단계에서 수행될 수 있다. 위 실시예들을 구체적으로 설명하면 다음과 같다.
1) 레지듀얼 코딩 이전에 2차 변환 인덱스를 시그널링하는 방법
인코더(100)는 순방향 2차 변환을 결정할 수 있다.
인코더(100)는 순방향 2차 변환에 대응되는 2차 변환 인덱스를 코딩할 수 있다.
인코더(100)는 마지막 0이 아닌 변환 계수의 위치를 코딩할 수 있다.
인코더(100)는 마지막 0이 아닌 변환 계수의 위치 이외의 신택스 요소들에 대한 레지듀얼 코딩을 수행할 수 있다.
2) 레지듀얼 코딩 중간에 2차 변환 인덱스를 시그널링하는 방법
인코더(100)는 순방향 2차 변환을 결정할 수 있다.
인코더(100)는 마지막 0이 아닌 변환 계수의 위치를 코딩할 수 있다.
마지막 0이 아닌 변환 계수가 특정 영역에 위치하지 않는 경우, 인코더(100)는 순방향 2차 변환에 대응되는 2차 변환 인덱스를 코딩할 수 있다. 여기서, 특정 영역은, 축소된 2차 변환이 적용되는 경우, 스캔 순서에 따라 변환 계수들을 배치하였을 때 0이 아닌 변환 계수가 존재할 수 있는 위치를 제외한 나머지 영역을 나타낸다. 다만, 본 발명은 이에 한정되지 않는다.
인코더(100)는 마지막 0이 아닌 변환 계수의 위치 이외의 신택스 요소들에 대한 레지듀얼 코딩을 수행할 수 있다.
3) 레지듀얼 코딩 이후에 2차 변환 인덱스를 시그널링하는 방법
인코더(100)는 순방향 2차 변환을 결정할 수 있다.
인코더(100)는 마지막 0이 아닌 변환 계수의 위치를 코딩할 수 있다.
상기 마지막 0이 아닌 변환 계수가 특정 영역에 위치하지 않는 경우, 인코더(100)는 마지막 0이 아닌 변환 계수의 위치 이외의 신택스 요소들에 대한 레지듀얼 코딩을 수행할 수 있다. 여기서, 특정 영역은 축소된 2차 변환이 적용되는 경우 스캔 순서에 따라 변환 계수들을 배치하였을 때 0이 아닌 변환 계수가 존재할 수 있는 위치를 제외한 나머지 영역을 나타낸다. 다만, 본 발명은 이에 한정되지 않는다.
인코더(100)는 순방향 2차 변환에 대응되는 2차 변환 인덱스를 코딩할 수 있다.
한편, 인코더(100)는 현재 블록(레지듀얼 블록)에 대해 순방향 1차 변환을 수행할 수 있다(S2030). 여기서, 순방향 1차 변환은 상기 S2010 단계 및/또는 S2020 단계가 유사하게 적용될 수 있다.
인코더(100)는 최적의 순방향 2차 변환을 이용하여 현재 블록에 대해 순방향 2차 변환을 수행할 수 있다(S2040). 예를 들어, 최적의 순방향 2차 변환은 축소된 2차 변환일 수 있다. 축소된 2차 변환은 N개의 레지듀얼 데이터(Nx1 레지듀얼 벡터)가 입력되어 L개(L<N)의 변환 계수 데이터(Lx1 변환 계수 벡터)가 출력되는 변환을 의미한다.
일실시예로, 축소된 2차 변환은 현재 블록의 특정 영역에 적용될 수 있다. 예를 들어, 현재 블록이 NxN 일때, 특정 영역은 좌상측 N/2xN/2 영역을 의미할 수 있다. 그러나, 본 발명은 이에 한정되지 않으며, 예측 모드, 블록 모양, 또는 블록 크기 중 적어도 하나에 따라 다르게 설정될 수 있다. 예를 들어, 현재 블록이 NxN 일때, 특정 영역은 좌상측 MxM 영역(M<=N)을 의미할 수 있다.
한편, 인코더(100)는, 현재 블록에 대해 양자화를 수행함으로써, 변환 계수 블록을 생성할 수 있다(S2050).
인코더(100)는, 변환 계수 블록에 대해 엔트로피 인코딩을 수행하여, 비트스트림을 생성할 수 있다.
도 21은 본 발명이 적용되는 실시예로서, 축소된 2차 변환(Reduced Secondary Transform, RST)에 기초하여 비디오 신호를 디코딩하는 흐름도를 나타낸다.
디코더(200)는 비트스트림으로부터 2차 변환 인덱스를 획득할 수 있다(S2110). 여기서, 2차 변환 인덱스는 본 명세서에서 설명한 다른 실시예들이 적용될 수 있다. 예를 들어, 상기 2차 변환 인덱스는 상기 도 6a, 6b 및/또는 도 12의 실시예들 중 적어도 하나를 포함할 수 있다.
다른 일실시예로, 2차 변환 인덱스의 획득 단계는, 1) 레지듀얼 디코딩 이전, 2) 레지듀얼 디코딩 중간 (마지막 0이 아닌 변환 계수 위치 디코딩 이후), 또는 3) 레지듀얼 디코딩 이후 중 어느 하나의 단계에서 수행될 수 있다.
디코더(200)는 2차 변환 인덱스에 대응되는 2차 변환을 유도할 수 있다(S2120). 이때, 상기 2차 변환의 후보는 상기 도 6 및/또는 도 12의 실시예들 중 적어도 하나를 포함할 수 있다.
다만, S2110 및 S2120 단계는 일실시예이며, 본 발명은 이에 한정되지 않는다. 예를 들어, 디코더(200)는 2차 변환 인덱스를 획득하지 않고, 현재 블록의 예측 모드, 블록 모양 및/또는 블록 크기 중 적어도 하나에 기초하여 2차 변환을 유도할 수 있다.
한편, 디코더(200)는 비트스트림을 엔트로피 디코딩하여 변환 계수 블록을 획득하고, 상기 변환 계수 블록에 대해 역양자화를 수행할 수 있다(S2130).
디코더(200)는 역양자화된 변환 계수 블록에 대해 역방향 2차 변환을 수행할 수 있다(S2140). 예를 들어, 역방향 2차 변환은 축소된 2차 변환일 수 있다. 축소된 2차 변환은 N개의 레지듀얼 데이터(Nx1 레지듀얼 벡터)가 입력되고, L개(L<N)의 변환 계수 데이터(Lx1 변환 계수 벡터)가 출력되는 변환을 의미한다.
일실시예로, 축소된 2차 변환은 현재 블록의 특정 영역에 적용될 수 있다. 예를 들어, 현재 블록이 NxN 일때, 특정 영역은 좌상측 N/2xN/2 영역을 의미할 수 있다. 그러나, 본 발명은 이에 한정되지 않으며, 예측 모드, 블록 모양, 또는 블록 크기 중 적어도 하나에 따라 다르게 설정될 수 있다. 예를 들어, 현재 블록이 NxN 일 때, 특정 영역은 좌상측 MxM 영역(M<=N) 또는 MxL (M<=N, L<=N)을 의미할 수 있다.
그리고, 디코더(200)는 역방향 2차 변환된 결과에 대해 역방향 1차 변환을 수행할 수 있다(S2150).
디코더(200)는 S2150 단계를 통해 레지듀얼 블록을 생성하고, 레지듀얼 블록과 예측 블록을 더함으로써 복원 블록을 생성한다.
상술한 실시예 1-1 내지 1-5를 통하여, 4x4 블록에 대하여 RST 적용함으로써 부호화 효율을 개선하는 과정을 살펴보았다. 이하 실시예에서는, 4x4 사이즈를 갖는 변환 블록에 대하여는 2차 변환을 생략함으로써 연산 복잡도를 감소시키는 방법 및 장치에 대하여 설명한다.
실시예 2-1: 4x4 변환 블록에 대한 2차 변환 미적용
도 22는 본 발명의 실시예에 따른 변환 블록과 좌상측 4x4 영역의 예를 도시한다.
도 22에 도시된 것과 같이, 2차 변환은 width x height (width >= 4, height >=4)의 사이즈를 갖는 변환 블록(변환 유닛 또는 TU)의 좌상측(top-left) 4x4 영역에 대하여만 적용되도록 설정될 수 있다.
이때, 좌상측 4x4 영역에 대해 2차 변환으로서 비-분리 변환(non-separable transform)이 적용되는 경우, 분리가능한 변환(separable transform)이 적용되는 경우에 비해 많은 계산량이 발생될 수 있다. 예를 들어, 비-분리 변환이 16x16 행렬로 주어지는 경우, 좌상측 4x4 영역에 2차 변환을 적용하면 총 256번의 곱셈이 요구된다.
만약, 최악의 경우(worst case)로서 하나의 픽처(picture)가 모두 4x4 변환 블록들로 분할되는 경우, 각 4x4 변환 블록에 대해 2차 변환이 적용되면 (행렬 형태의 2차 변환의 경우) 256번의 곱셈이 요구될 수 있으므로, 1차 변환과 비교했을 때 많은 계산량이 필요하게 된다. 예를 들어, 4x4 변환 블록에 대해 1차 변환으로 분리가능한 변환이 행렬 곱셈 형태로 적용되는 경우, 총 2 x 4 3 = 128번의 곱셈량이 필요하다. 만약, 1차 변환과 2차 변환을 각각 파이프라인(pipeline) 단계로 설정함으로써 1차 변환과 2차 변환이 파이프라이닝(pipelining) 형태로 수행되는 경우, 2차 변환의 계산량이 훨씬 크기 때문에 2차 변환이 파이프라이닝에서의 임계 경로(critical path)가 되기 때문에 전반적인 성능 저하가 발생할 수 있다.
따라서, 변환 블록의 사이즈가 4x4인 경우에 대해서는 2차 변환을 적용하지 않도록 강제할 수 있다. 다시 말해, 변환 블록의 사이즈가 4x4인 경우, 1차 변환까지만 적용되도록 설정할 수 있다.
실시예 2-2: 실시예 2-1에서 2차 변환의 선택
실시예 2-1에서, 변환 블록의 좌상측 4x4 영역에 대해서만 2차 변환을 적용하는 방법이 제안된다. 실시예 2-1의 구성에서 적용될 수 있는 2차 변환들의 예는 아래와 같다.
1) 4x4 영역에 적용될 수 있는 RST(reduced secondary transform): L x 16 (L <= 16) 형태의 행렬이다. (순방향 변환에 해당함)
2) 4x4 영역에 적용될 수 있는 SOT(sparse orthonormal transform) 또는 KLT: 1)번에서 L = 16인 경우에 해당한다고 볼 수 있으며, 계산량 관점에서는 16 x 16 행렬 형태의 변환으로 볼 수 있다.
3) 4x4 영역에 적용될 수 있는 JEM NSST: 16개의 데이터 입력과 16개의 데이터 출력을 갖는 기븐스 회전(Givens rotation) 기반의 변환으로서, 도 13 내지 도 15를 통해 설명되었다.
4) 4x4 영역에 적용될 수 있는 LGT(layered Givens transform): 3)번과 마찬가지로 16개의 데이터 입력과 16개의 데이터 출력을 갖는 기븐스 회전 기반의 변환이나, 두 인접한 기븐스 회전 레이어 사이에서 지정된 치환(permutation)을 적용하는 특징을 가진다.
기본적으로 상술한 2차 변환 이외에도 다른 어떠한 종류의 2차 변환도 적용 가능하다.
실시예 2-3: 실시예 2-1의 구성에서 변환 블록이 4x4인 경우에 대한 1차 변환의 선택
실시예 2-1의 구성에서 변환 블록이 4x4인 경우에 대해서는 2차 변환이 적용되지 않는다. 따라서, 변환 블록이 4x4인 경우에 대해서는 1차 변환만 적용되도록 구성될 수 있는데, 이때 적용될 수 있는 1차 변환을 열거하면 다음과 같다.
1) JEM에 적용된 MTS(EMT, 또는 AMT) 조합으로서, 도 6a, 6b를 통해 설명된 변환의 적용
2) 수평 변환(horizontal transform)과 수직 변환(vertical transform) 모두 DCT-2를 적용
3) 수평 방향으로 DST-7 또는 DCT-8을 적용할 수 있고, 수직 방향으로도 DST-7 또는 DCT-8이 적용될 수 있다. 화면내 예측을 통해 생성된 잔차(residual) 샘플들에 적용되는 변환 쌍(transform pair)들과, 화면간 예측을 통해 생성된 잔차 샘플들에 적용될 수 있는 변환 쌍으로서, 각각 도 23a와 도 23b와 같이 변환 쌍이 구성될 수 있다.
4) 수평 변환과 수직 변환으로 모두 DST-7을 적용
도 23은 예측 모드에 따른 수평 방향 및 수직 방향에 대한 변환 타입의 결정을 위한 테이블의 예를 도시하며, 도 23a는 화면내 예측을 통해 생성된 잔차에 적용되는 변환 쌍을 나타내고, 도 23b는 화면간 예측을 통해 생성된 잔차에 적용되는 변환 쌍을 나타낸다.
도 23a를 참고하면, 화면내 예측을 통해 생성된 잔차 신호에 대한 변환 또는 역양자화 되거나 역 2차 변환된 신호에 대한 역변환이 적용되는 경우, 변환 타입을 지시하는 인덱스에 대응하는 변환 타입이 수평 방향과 수직 방향 모두에 대하여 각각 결정될 수 있다. 예를 들어, MTS index가 0인 경우, 수평 방향과 수직 방향에 대하여 DST-7이 변환 타입으로서 결정되고, MTS index가 1인 경우, 수평 방향에 대한 변환 타입으로서 DCT-8, 수직 방향에 대한 변환 타입으로서 DST-7이 결정되고, MTS index가 2인 경우, 수평 방향에 대한 변환 타입으로서 DST-7, 수직 방향에 대한 변환 타입으로서 DCT-8이 결정되고, MTS index가 3인 경우, 수평 방향과 수직 방향 모두에 대하여 DCT-8이 변환 타입으로서 결정된다.
도 23b를 참고하면, 화면간 예측을 통해 생성된 잔차 신호에 대한 변환 또는 역양자화 되거나 역 2차 변환된 신호에 대한 역변환이 적용되는 경우, 변환 타입을 지시하는 인덱스에 대응하는 변환 타입이 수평 방향과 수직 방향에 대하여 각각 결정될 수 있다. 예를 들어, MTS index가 0인 경우, 수평 방향과 수직 방향 모두에 대하여 DCT-8이 변환 타입으로서 결정되고, MTS index가 1인 경우, 수평 방향에 대한 변환 타입으로서 DST-7, 수직 방향에 대한 변환 타입으로서 DCT-8이 결정되고, MTS index가 2인 경우, 수평 방향에 대한 변환 타입으로서 DCT-8, 수직 방향에 대한 변환 타입으로서 DST-7이 결정되고, MTS index가 3인 경우, 수평 방향과 수직 방향 모두에 대하여 DST-7이 변환 타입으로서 결정된다.
실시예 2-4: 실시예 2-1의 구성에서 실시예 2-2의 2차 변환과 실시예 2-3의 1차 변환을 적용
실시예 2-1의 구성에서, 실시예 2-2에서 제시된 2차 변환들 중 하나가 좌상측 4x4에 적용되며, 실시예 2-3에서 제시된 1차 변환들 중 하나가 4x4 변환 블록에 적용될 수 있다. 변환 블록의 크기가 4x4가 아닌 경우에 대한 1차 변환은, 4x4 변환 블록에 적용되는 1차 변환과 같을 수도 있고, 다를 수도 있다. 변환 블록의 크기가 4x4가 아닌 경우에 대한 1차 변환으로, 도 6a와 6b에 도시된 JEM MTS, 또는 JEM MTS의 변환 쌍에 대해서 도 23a와 23b에 도시된 테이블이 사용될 수 있다.
도 24는 본 발명의 실시예에 따른 비디오 신호의 인코딩 방법의 흐름도를 도시한다. 도 24는 도 1의 인코더(100)의 동작의 예를 도시한다.
S2410 단계에서, 인코더(100)는 예측 이후의 잔차 샘플들을 포함하는 변환 블록을 확인할 수 있다. 인코더(100)는 현재 블록에 대한 예측을 통하여 예측 샘플들을 도출할 수 있다. 예를 들어, 인코더(100)는 현재 블록에 화면간 예측을 수행할지 또는 화면내 예측을 수행할 지 여부를 결정할 수 있고, RD 비용(rate-distortion cost)에 기반하여 구체적인 예측 모드(구체적인 화면간 예측 모드 또는 구체적인 화면내 예측 모드)를 결정할 수 있다. 결정된 모드에 따라 인코더(100)는 현재 블록에 대한 예측 샘플들을 도출할 수 있다. 이후, 인코더(100)는 현재 블록에서 원본 샘플들과 예측 샘플들을 비교함으로써 잔차 샘플들을 도출할 수 있다. 예를 들어, 인코더(100)는 현재 블록에서 예측 샘플들을 제거함으로써 잔차 샘플들을 도출할 수 있다. 또한, 인코더(100)는 잔차 샘플들로 구성된 변환 블록을 확인할 수 있다.
S2420 단계에서, 인코더(100)는 변환 블록에 포함된 잔차 샘플들에 대한 변환을 통해 변환 계수들을 생성할 수 있다. 보다 구체적으로, 인코더(100)는 변환 블록에 포함된 공간 도메인의 잔차 샘플들에 대해 적어도 하나의 변환을 적용함으로써 주파수 도메인의 변환 계수들을 생성할 수 있다. 본 발명의 실시예에 따른 구체적인 변환 과정은 도 25를 통해 상세히 설명한다.
S2430 단계에서, 인코더(100)는 변환 계수들에 대한 양자화 및 엔트로피 코딩을 수행할 수 있다. 보다 구체적으로, 인코더(100)는 S2420 단계에서 생성된 변환 샘플들에 대하여 양자화 및 엔트로피 코딩을 수행함으로써 인코딩된 비디오 신호를 생성할 수 있다. 예를 들어, 인코더(100)는 예측에 대한 정보와 잔차 샘플들에 대한 정보를 포함하는 영상 정보를 인코딩하고, 인코딩된 영상 정보를 비트스트림 형태로 출력할 수 있다. 여기서, 예측에 대한 정보는 예측 절차와 관련된 정보들로 예측 모드 정보와 움직임 정보(화면간 예측이 적용되는 경우) 등을 포함할 수 있다. 잔차 샘플들에 대한 정보는 양자화된 변환 계수들에 대한 정보를 포함할 수 있다. 출력된 비트스트림은 저장매체 또는 네트워크를 통하여 디코더(200)로 전달될 수 있다.
다시 말해, 인코더(100)는 현재 블록에 대한 예측을 통하여 예측 샘플들을 도출하고, 예측 샘플을 기반으로 현재 블록에 대한 잔차 샘플들을 생성하고, 변환(1차 변환/2차 변환) 절차를 통하여 변환 계수들을 도출하고, 양자화를 통하여 양자화된 변환 계수들을 도출하고, 예측 정보 및 레지듀얼 정보를 포함하는 영상 정보를 인코딩할 수 있다.
도 25는 본 발명의 실시예에 따른 비디오 신호의 인코딩 과정에서 변환 블록의 사이즈에 따른 변환 과정의 예를 도시한다. 도 25는 도 24의 S2420 단계의 한 예를 도시한다.
S2510 단계에서, 인코더(100)는 잔차 샘플들을 포함하는 변환 블록에 대한 순방향 1차 변환을 수행할 수 있다. 보다 구체적으로, 인코더(100)는 잔차 샘플들을 포함하는 변환 블록의 수평 방향 및 수직 방향 각각에 대해 순방향 1차 변환을 적용할 수 있다. 여기서, 순방향 1차 변환은 분리가능한 1차 변환(separable primary transform)으로 지칭될 수 있다. 본 발명의 실시예에 따르면, 순방향 1차 변환은 수평 방향 변환과 수직 방향 변환을 포함할 수 있다. 또한 순방향 1차 변환은, DCT-2, DST-7, 또는 DCT-8의 조합에 의해 결정될 수 있다. 예를 들어, 순방향 1차 변환은 도 6a, 6b, 또는 도 24a, 24b와 같이 구성될 수 있다.
S2520 단계에서, 인코더(100)는 변환 블록의 사이즈가 4x4보다 작거나 같은지 여부를 결정할 수 있다. 여기서, 변환 블록의 사이즈는 변환 블록에 포함된 샘플들의 개수를 의미할 수 있다. 변환 블록의 사이즈 4x4는 수평 방향과 수직 방향에 대한 샘플 개수가 각각 4개임을 나타내는 것으로서, 수평 방향(행 방향) 성분이 4개, 수직 방향(열 방향)이 4개로 구성됨을 의미한다. 일 실시예에서, 변환 블록은 수평 방향(행 방향) 사이즈와 수직 방향(열 방향) 사이즈가 동일하도록 설정될 수 있고, 이 경우 변환 수평 방향 사이즈 또는 수직 방향 사이즈가 4보다 작거나 같은지 여부가 확인될 수 있다. 또 다른 실시예에서, 변환 블록은 수평 방향(행 방향) 사이즈와 수직 방향(열 방향) 사이즈가 서로 다를 수 있도록 설정될 수 있고, 이 경우 변환 블록에 포함된 전체 샘플들의 개수가 4 x 4 = 16 보다 작거나 같은지 여부가 확인될 수 있다.
변환 블록의 사이즈가 4x4 보다 작거나 같은 경우, 인코더(100)는 S2530 단계로 진행할 수 있다. S2530 단계에서, 인코더(100)는 순방향 2차 변환을 생략할 수 있다. 즉, 변환 블록의 사이즈가 4x4 보다 작거나 같은 경우, 순방향 1차 변환을 적용함으로써 생성된 변환 계수들에 대한 추가적인 변환이 수행되지 않은 상태로 인코더(100)는 변환 계수들에 대한 양자화를 수행할 수 있다.
변환 블록의 사이즈가 4x4 보다 큰 경우, 인코더(100)는 S2540 단계로 진행할 수 있다. S2540 단계에서, 인코더(100)는 순방향 2차 변환을 적용할 수 있다. 다시 말해, 인코더(100)는 순방향 1차 변환의 결과로서 생성된 변환 계수들에 대하여 추가적으로 2차 변환을 적용함으로써 수정된 변환 계수들을 생성할 수 있다. 여기서, 순방향 2차 변환은 비-분리 2차 변환(non-separable secondary transform)이 사용될 수 있다. 본 발명의 실시예에 따르면, 순방향 2차 변환은 변환 블록의 좌상측 4x4 영역에 대하여 적용될 수 있다. 여기서, 비-분리 2차 변환은, Lx16 형태의 행렬인 RST(reduced secondary transform), 여기서 L은 16보다 작거나 같고, 16x16 형태의 행렬인 SOT(sparse orthonormal transform), 16개의 입력과 16개의 출력을 갖는 기븐스 로테이션(givens rotation) 기반의 변환, 또는 16개의 입력과 16개의 출력을 가지면서 두 인접한 기븐스 로테이션 레이어 사이에서 지정된 치환(permutation)을 적용하는 레이어드 기븐스 변환(layered givens transform) 중 적어도 하나를 포함할 수 있다.
도 26은 본 발명의 실시예에 따른 비디오 신호의 디코딩 과정의 흐름도를 도시한다. 도 26는 도 2의 디코더(100)의 동작의 예를 도시한다.
S2610 단계에서, 디코더(100)는 엔트로피 디코딩 및 역양자화를 통해 변환 계수들을 포함하는 변환 블록을 생성할 수 있다. 디코더(100)는 복호화하고자 하는 비디오 신호의 비트스트림에 대하여 엔트로피 디코딩 및 역양자화를 통해 역방향 변환의 대상이 되는 변환 계수들로 구성된 변환 블록을 생성할 수 있다.
S2620 단계에서, 디코더(100)는 변환 블록의 변환 계수들에 대한 역방향 변환을 통해 잔차 샘플들을 생성할 수 있다. 본 발명의 실시예에 따른 역방향 변환 과정은 도 27을 통해 상세히 설명한다.
S2630 단계에서, 디코더(100)는 잔차 샘플들로부터 예측을 통해 복원 픽처를 생성할 수 있다. 디코더(100)는 예측 정보에 기반하여 현재 블록에 대한 화면간 예측 또는 화면내 예측을 수행함으로써 예측 샘플들을 도출할 수 있다. 디코더(100)는 역변환 과정을 통해 생성된 잔차 샘플들과 예측 과정을 통해 생성된 예측 샘플들을 합침으로써 원본 픽처를 생성할 수 있다.
도 27은 본 발명의 실시예에 따른 비디오 신호의 디코딩 과정에서 변환 블록의 사이즈에 따른 변환 과정의 예를 도시한다. 도 27은 도 26의 S2620 단계의 한 예를 도시한다.
S2710 단계에서, 디코더(200)는 변환 블록의 사이즈가 4x4보다 작거나 같은지 여부를 결정할 수 있다. 여기서, 변환 블록의 사이즈는 변환 블록에 포함된 변환 계수들의 개수를 의미할 수 있다. 변환 블록의 사이즈 4x4는 수평 방향과 수직 방향에 대한 샘플 개수가 각각 4개임을 나타내는 것으로서, 수평 방향(행 방향) 성분이 4개, 수직 방향(열 방향)이 4개로 구성됨을 의미한다. 일 실시예에서, 변환 블록은 수평 방향(행 방향) 사이즈와 수직 방향(열 방향) 사이즈가 동일하도록 설정될 수 있고, 이 경우 변환 수평 방향 사이즈 또는 수직 방향 사이즈가 4보다 작거나 같은지 여부가 확인될 수 있다. 또 다른 실시예에서, 변환 블록은 수평 방향(행 방향) 사이즈와 수직 방향(열 방향) 사이즈가 서로 다를 수 있도록 설정될 수 있고, 이 경우 변환 블록에 포함된 전체 계수들의 개수가 4 x 4 = 16 보다 작거나 같은지 여부가 확인될 수 있다.
변환 블록의 사이즈가 4x4 보다 작거나 같은 경우, 디코더(100)는 S2720 단계로 진행할 수 있다. S2720 단계에서, 디코더(200)는 역방향 2차 변환을 생략할 수 있다. 즉, 변환 블록의 사이즈가 4x4 보다 작거나 같은 경우, 디코더(100)는 역방향 2차 변환없이 S2740 단계로 진행하여 역방향 1차 변환을 적용하고, 역방향 1차 변환의 결과로서 생성된 잔차 샘플들에 대한 예측을 수행할 수 있다.
변환 블록의 사이즈가 4x4 보다 큰 경우, 디코더(200)는 S2730 단계로 진행할 수 있다. S2730 단계에서, 디코더(200)는 역방향 2차 변환을 적용할 수 있다. 여기서, 역방향 2차 변환은 비-분리 2차 변환(non-separable secondary transform)이 사용될 수 있다. 본 발명의 실시예에 따르면, 역방향 2차 변환은 변환 블록의 좌상측 4x4 영역에 대하여 적용될 수 있다. 여기서, 비-분리 2차 변환은, Lx16 형태의 행렬인 RST(reduced secondary transform), 여기서 L은 16보다 작거나 같고, 16x16 형태의 행렬인 SOT(sparse orthonormal transform), 16개의 입력과 16개의 출력을 갖는 기븐스 로테이션(givens rotation) 기반의 변환, 또는 16개의 입력과 16개의 출력을 가지면서 두 인접한 기븐스 로테이션 레이어 사이에서 지정된 치환(permutation)을 적용하는 레이어드 기븐스 변환(layered givens transform) 중 적어도 하나를 포함할 수 있다. 역방향 2차 변환의 결과로서, 디코더(200)는 수정된 변환 계수들을 포함하는 변환 블록을 생성할 수 있다.
S2720 단계와 같이 역방향 2차 변환이 생략되거나, S2730 단계와 같이 역방향 2차 변환이 적용된 이후, 디코더(200)는 S2710 단계로 진행할 수 있다. S2710 단계에서, 디코더(200)는 역 양자화를 적용함으로써 생성된 변환 계수들 또는 역방향 2차 변환을 적용함으로써 생성된 수정된 변환 계수들을 포함하는 변환 블록에 대한 역방향 1차 변환을 수행할 수 있다. 보다 구체적으로, 디코더(200)는 변환 계수들을 포함하는 변환 블록의 수평 방향 및 수직 방향 각각에 대해 역방향 1차 변환을 적용할 수 있다. 여기서, 역방향 1차 변환은 분리가능한 1차 변환(separable primary transform)으로 지칭될 수 있다. 본 발명의 실시예에 따르면, 역방향 1차 변환은 수평 방향 변환과 수직 방향 변환을 포함할 수 있다. 또한, 역방향 1차 변환은, DCT-2, DST-7, 또는 DCT-8에 기반하여 결정될 수 있다. 예를 들어, 역방향 1차 변환은 도 6a, 6b, 또는 도 24a, 24b와 같이 구성될 수 있다.
본 발명에 적용될 수 있는 2차 변환은 상술한 변환들에 한정되지 않으며, 인코더를 기준으로 순방향(forward) 1차 변환 단계와 양자화 단계 사이, 디코더를 기준으로 역양자화 단계와 역방향(inverse) 1차 변환 단계 사이에 적용될 수 있는 다양한 종류의 비분리 2차 변환이 본 발명에 적용될 수 있다.
도 28은 본 발명이 적용되는 실시예로서 비디오 코딩 시스템의 예를 도시한다.
비디오 코딩 시스템은 소스 디바이스(source device) 및 수신 디바이스(receiving device)를 포함할 수 있다. 소스 디바이스는 인코딩된 비디오/영상 정보 또는 데이터를 파일 또는 스트리밍 형태로 디지털 저장매체 또는 네트워크를 통하여 수신 디바이스로 전달할 수 있다.
상기 소스 디바이스는 비디오 소스(video source), 인코딩 장치(encoding apparatus), 전송부(transmitter)를 포함할 수 있다. 상기 수신 디바이스는 수신부(receiver), 디코딩 장치(decoding apparatus) 및 렌더러(renderer)를 포함할 수 있다. 상기 인코딩 장치는 비디오/영상 인코딩 장치라고 불릴 수 있고, 상기 디코딩 장치는 비디오/영상 디코딩 장치라고 불릴 수 있다. 송신기는 인코딩 장치에 포함될 수 있다. 수신기는 디코딩 장치에 포함될 수 있다. 렌더러는 디스플레이부를 포함할 수도 있고, 디스플레이부는 별개의 디바이스 또는 외부 컴포넌트로 구성될 수도 있다.
비디오 소스는 비디오/영상의 캡쳐, 합성 또는 생성 과정 등을 통하여 비디오/영상을 획득할 수 있다. 비디오 소스는 비디오/영상 캡쳐 디바이스 및/또는 비디오/영상 생성 디바이스를 포함할 수 있다. 비디오/영상 캡쳐 디바이스는 예를 들어, 하나 이상의 카메라, 이전에 캡쳐된 비디오/영상을 포함하는 비디오/영상 아카이브 등을 포함할 수 있다. 비디오/영상 생성 디바이스는 예를 들어 컴퓨터, 타블렛 및 스마트폰 등을 포함할 수 있으며 (전자적으로) 비디오/영상을 생성할 수 있다. 예를 들어, 컴퓨터 등을 통하여 가상의 비디오/영상이 생성될 수 있으며, 이 경우 관련 데이터가 생성되는 과정으로 비디오/영상 캡쳐 과정이 갈음될 수 있다.
인코딩 장치는 입력 비디오/영상을 인코딩할 수 있다. 인코딩 장치는 압축 및 코딩 효율을 위하여 예측, 변환, 양자화 등 일련의 절차를 수행할 수 있다. 인코딩된 데이터(인코딩된 비디오/영상 정보)는 비트스트림(bitstream) 형태로 출력될 수 있다.
전송부는 비트스트림 형태로 출력된 인코딩된 비디오/영상 정보 또는 데이터를 파일 또는 스트리밍 형태로 디지털 저장매체 또는 네트워크를 통하여 수신 디바이스의 수신부로 전달할 수 있다. 디지털 저장 매체는 USB, SD, CD, DVD, 블루레이, HDD, SSD 등 다양한 저장 매체를 포함할 수 있다. 전송부는 미리 정해진 파일 포멧을 통하여 미디어 파일을 생성하기 위한 엘레먼트를 포함할 수 있고, 방송/통신 네트워크를 통한 전송을 위한 엘레멘트를 포함할 수 있다. 수신부는 상기 비트스트림을 추출하여 디코딩 장치로 전달할 수 있다.
디코딩 장치는 인코딩 장치의 동작에 대응하는 역양자화, 역변환, 예측 등 일련의 절차를 수행하여 비디오/영상을 디코딩할 수 있다.
렌더러는 디코딩된 비디오/영상을 렌더링할 수 있다. 렌더링된 비디오/영상은 디스플레이부를 통하여 디스플레이될 수 있다.
도 29는 본 발명이 적용되는 실시예로서 비디오 스트리밍 시스템의 예를 도시한다.
도 29를 참조하면, 본 발명이 적용되는 컨텐츠 스트리밍 시스템은 크게 인코딩 서버, 스트리밍 서버, 웹 서버, 미디어 저장소, 사용자 장치 및 멀티미디어 입력 장치를 포함할 수 있다.
상기 인코딩 서버는 스마트폰, 카메라, 캠코더 등과 같은 멀티미디어 입력 장치들로부터 입력된 컨텐츠를 디지털 데이터로 압축하여 비트스트림을 생성하고 이를 상기 스트리밍 서버로 전송하는 역할을 한다. 다른 예로, 스마트폰, 카메라, 캠코더 등과 같은 멀티미디어 입력 장치들이 비트스트림을 직접 생성하는 경우, 상기 인코딩 서버는 생략될 수 있다.
상기 비트스트림은 본 발명이 적용되는 인코딩 방법 또는 비트스트림 생성 방법에 의해 생성될 수 있고, 상기 스트리밍 서버는 상기 비트스트림을 전송 또는 수신하는 과정에서 일시적으로 상기 비트스트림을 저장할 수 있다.
상기 스트리밍 서버는 웹 서버를 통한 사용자 요청에 기초하여 멀티미디어 데이터를 사용자 장치에 전송하고, 상기 웹 서버는 사용자에게 어떠한 서비스가 있는지를 알려주는 매개체 역할을 한다. 사용자가 상기 웹 서버에 원하는 서비스를 요청하면, 상기 웹 서버는 이를 스트리밍 서버에 전달하고, 상기 스트리밍 서버는 사용자에게 멀티미디어 데이터를 전송한다. 이때, 상기 컨텐츠 스트리밍 시스템은 별도의 제어 서버를 포함할 수 있고, 이 경우 상기 제어 서버는 상기 컨텐츠 스트리밍 시스템 내 각 장치 간 명령/응답을 제어하는 역할을 한다.
상기 스트리밍 서버는 미디어 저장소 및/또는 인코딩 서버로부터 컨텐츠를 수신할 수 있다. 예를 들어, 상기 인코딩 서버로부터 컨텐츠를 수신하게 되는 경우, 상기 컨텐츠를 실시간으로 수신할 수 있다. 이 경우, 원활한 스트리밍 서비스를 제공하기 위하여 상기 스트리밍 서버는 상기 비트스트림을 일정 시간동안 저장할 수 있다.
상기 사용자 장치의 예로는, 휴대폰, 스마트 폰(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, 데스크탑 컴퓨터, 디지털 사이니지 등이 있을 수 있다.
상기 컨텐츠 스트리밍 시스템 내 각 서버들은 분산 서버로 운영될 수 있으며, 이 경우 각 서버에서 수신하는 데이터는 분산 처리될 수 있다.
본 발명에서 설명한 실시예들은 프로세서, 마이크로 프로세서, 컨트롤러 또는 칩 상에서 구현되어 수행될 수 있다. 예를 들어, 각 도면에서 도시한 기능 유닛들은 컴퓨터, 프로세서, 마이크로 프로세서, 컨트롤러 또는 칩 상에서 구현되어 수행될 수 있다.
또한, 본 발명이 적용되는 디코더 및 인코더는 멀티미디어 방송 송수신 장치, 모바일 통신 단말, 홈 시네마 비디오 장치, 디지털 시네마 비디오 장치, 감시용 카메라, 비디오 대화 장치, 비디오 통신과 같은 실시간 통신 장치, 모바일 스트리밍 장치, 저장 매체, 캠코더, 주문형 비디오(VoD) 서비스 제공 장치, OTT 비디오(Over the top video) 장치, 인터넷 스트리밍 서비스 제공 장치, 3차원(3D) 비디오 장치, 화상 전화 비디오 장치, 및 의료용 비디오 장치 등에 포함될 수 있으며, 비디오 신호 또는 데이터 신호를 처리하기 위해 사용될 수 있다. 예를 들어, OTT 비디오(Over the top video) 장치로는 게임 콘솔, 블루레이 플레이어, 인터넷 접속 TV, 홈시어터 시스템, 스마트폰, 태블릿 PC, DVR(Digital Video Recoder) 등을 포함할 수 있다.
또한, 본 발명이 적용되는 처리 방법은 컴퓨터로 실행되는 프로그램의 형태로 생산될 수 있으며, 컴퓨터가 판독할 수 있는 기록 매체에 저장될 수 있다. 본 발명에 따른 데이터 구조를 가지는 멀티미디어 데이터도 또한 컴퓨터가 판독할 수 있는 기록 매체에 저장될 수 있다. 상기 컴퓨터가 판독할 수 있는 기록 매체는 컴퓨터로 읽을 수 있는 데이터가 저장되는 모든 종류의 저장 장치 및 분산 저장 장치를 포함한다. 상기 컴퓨터가 판독할 수 있는 기록 매체는, 예를 들어, 블루레이 디스크(BD), 범용 직렬 버스(USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크 및 광학적 데이터 저장 장치를 포함할 수 있다. 또한, 상기 컴퓨터가 판독할 수 있는 기록 매체는 반송파(예를 들어, 인터넷을 통한 전송)의 형태로 구현된 미디어를 포함한다. 또한, 인코딩 방법으로 생성된 비트스트림이 컴퓨터가 판독할 수 있는 기록 매체에 저장되거나 유무선 통신 네트워크를 통해 전송될 수 있다.
또한, 본 발명의 실시예는 프로그램 코드에 의한 컴퓨터 프로그램 제품으로 구현될 수 있고, 상기 프로그램 코드는 본 발명의 실시예에 의해 컴퓨터에서 수행될 수 있다. 상기 프로그램 코드는 컴퓨터에 의해 판독가능한 캐리어 상에 저장될 수 있다.
상기 기술된 것과 같이, 본 발명에서 설명한 실시예들은 프로세서, 마이크로 프로세서, 컨트롤러 또는 칩 상에서 구현되어 수행될 수 있다. 예를 들어, 각 도면에서 도시한 기능 유닛들은 컴퓨터, 프로세서, 마이크로 프로세서, 컨트롤러 또는 칩 상에서 구현되어 수행될 수 있다.
또한, 본 발명이 적용되는 디코더 및 인코더는 멀티미디어 방송 송수신 장치, 모바일 통신 단말, 홈 시네마 비디오 장치, 디지털 시네마 비디오 장치, 감시용 카메라, 비디오 대화 장치, 비디오 통신과 같은 실시간 통신 장치, 모바일 스트리밍 장치, 저장 매체, 캠코더, 주문형 비디오(VoD) 서비스 제공 장치, OTT 비디오(Over the top video) 장치, 인터넷 스트리밍 서비스 제공 장치, 3차원(3D) 비디오 장치, 화상 전화 비디오 장치, 및 의료용 비디오 장치 등에 포함될 수 있으며, 비디오 신호 또는 데이터 신호를 처리하기 위해 사용될 수 있다. 예를 들어, OTT 비디오(Over the top video) 장치로는 게임 콘솔, 블루레이 플레이어, 인터넷 접속 TV, 홈시어터 시스템, 스마트폰, 태블릿 PC, DVR(Digital Video Recoder) 등을 포함할 수 있다.
또한, 본 발명이 적용되는 처리 방법은 컴퓨터로 실행되는 프로그램의 형태로 생산될 수 있으며, 컴퓨터가 판독할 수 있는 기록 매체에 저장될 수 있다. 본 발명에 따른 데이터 구조를 가지는 멀티미디어 데이터도 또한 컴퓨터가 판독할 수 있는 기록 매체에 저장될 수 있다. 상기 컴퓨터가 판독할 수 있는 기록 매체는 컴퓨터로 읽을 수 있는 데이터가 저장되는 모든 종류의 저장 장치 및 분산 저장 장치를 포함한다. 상기 컴퓨터가 판독할 수 있는 기록 매체는, 예를 들어, 블루레이 디스크(BD), 범용 직렬 버스(USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크 및 광학적 데이터 저장 장치를 포함할 수 있다. 또한, 상기 컴퓨터가 판독할 수 있는 기록 매체는 반송파(예를 들어, 인터넷을 통한 전송)의 형태로 구현된 미디어를 포함한다. 또한, 인코딩 방법으로 생성된 비트스트림이 컴퓨터가 판독할 수 있는 기록 매체에 저장되거나 유무선 통신 네트워크를 통해 전송될 수 있다.
또한, 본 발명의 실시예는 프로그램 코드에 의한 컴퓨터 프로그램 제품으로 구현될 수 있고, 상기 프로그램 코드는 본 발명의 실시예에 의해 컴퓨터에서 수행될 수 있다. 상기 프로그램 코드는 컴퓨터에 의해 판독가능한 캐리어 상에 저장될 수 있다.
이상에서 설명된 실시예들은 본 발명의 구성요소들과 특징들이 소정 형태로 결합된 것들이다. 각 구성요소 또는 특징은 별도의 명시적 언급이 없는 한 선택적인 것으로 고려되어야 한다. 각 구성요소 또는 특징은 다른 구성요소나 특징과 결합되지 않은 형태로 실시될 수 있다. 또한, 일부 구성요소들 및/또는 특징들을 결합하여 본 발명의 실시예를 구성하는 것도 가능하다. 본 발명의 실시예들에서 설명되는 동작들의 순서는 변경될 수 있다. 어느 실시예의 일부 구성이나 특징은 다른 실시예에 포함될 수 있고, 또는 다른 실시예의 대응하는 구성 또는 특징과 교체될 수 있다. 특허청구범위에서 명시적인 인용 관계가 있지 않은 청구항들을 결합하여 실시예를 구성하거나 출원 후의 보정에 의해 새로운 청구항으로 포함시킬 수 있음은 자명하다.
본 발명에 따른 실시예는 다양한 수단, 예를 들어, 하드웨어, 펌웨어(firmware), 소프트웨어 또는 그것들의 결합 등에 의해 구현될 수 있다. 하드웨어에 의한 구현의 경우, 본 발명의 일 실시예는 하나 또는 그 이상의 ASICs(application specific integrated circuits), DSPs(digital signal processors), DSPDs(digital signal processing devices), PLDs(programmable logic devices), FPGAs(field programmable gate arrays), 프로세서, 콘트롤러, 마이크로 콘트롤러, 마이크로 프로세서 등에 의해 구현될 수 있다.
펌웨어나 소프트웨어에 의한 구현의 경우, 본 발명의 일 실시예는 이상에서 설명된 기능 또는 동작들을 수행하는 모듈, 절차, 함수 등의 형태로 구현될 수 있다. 소프트웨어 코드는 메모리에 저장되어 프로세서에 의해 구동될 수 있다. 상기 메모리는 상기 프로세서 내부 또는 외부에 위치하여, 이미 공지된 다양한 수단에 의해 상기 프로세서와 데이터를 주고받을 수 있다.
본 발명은 본 발명의 필수적 특징을 벗어나지 않는 범위에서 다른 특정한 형태로 구체화될 수 있음은 당업자에게 자명하다. 따라서, 상술한 상세한 설명은 모든 면에서 제한적으로 해석되어서는 아니 되고 예시적인 것으로 고려되어야 한다. 본 발명의 범위는 첨부된 청구항의 합리적 해석에 의해 결정되어야 하고, 본 발명의 등가적 범위 내에서의 모든 변경은 본 발명의 범위에 포함된다.
이상, 전술한 본 발명의 바람직한 실시예는, 예시의 목적을 위해 개시된 것으로, 당업자라면 이하 첨부된 특허청구범위에 개시된 본 발명의 기술적 사상과 그 기술적 범위 내에서, 다양한 다른 실시예들을 개량, 변경, 대체 또는 부가등이 가능할 것이다.

Claims (14)

  1. 비디오 신호를 인코딩하기 위한 방법에 있어서,
    상기 비디오 신호의 픽처에서 예측 샘플을 제외한 잔차 샘플들을 포함하는 변환 블록을 확인하는 단계;
    상기 변환 블록의 사이즈에 기반하여 상기 변환 블록의 잔차 샘플들에 대한 변환을 통해 변환 계수들을 생성하는 단계; 및
    상기 변환 계수들에 대해 양자화 및 엔트로피 코딩을 수행하는 단계를 포함하고,
    상기 변환 계수들을 생성하는 단계는,
    상기 잔차 샘플들을 포함하는 변환 블록의 수평 방향 및 수직 방향 각각에 대해 순방향(forward) 1차 변환(primary transform)을 적용하는 단계; 및
    상기 변환 블록의 사이즈가 4x4 보다 작거나 같은 경우, 상기 1차 변환이 적용된 변환 블록에 대한 순방향(forward) 비-분리 2차 변환(non-separable secondary transform)을 적용하지 않고, 상기 변환 블록의 사이즈가 4x4 보다 큰 경우, 상기 변환 블록에 대해 상기 순방향 비-분리 2차 변환을 적용하는 단계를 포함하는, 비디오 신호 처리 방법.
  2. 제1항에 있어서,
    상기 변환 블록에 대해 순방향 비-분리 2차 변환을 적용하는 단계는,
    상기 변환 블록의 좌상측 4x4 영역에 대하여 상기 순방향 비-분리 2차 변환을 적용하는 단계를 포함하는, 비디오 신호 처리 방법.
  3. 제1항에 있어서,
    상기 순방향 비-분리 2차 변환은,
    Lx16 형태의 행렬인 LFNST(low frequency non-separable transform), 여기서 LFNST는 좌상측 특정 영역에 대해 적용되는 비분리 변환을 나타내며 L은 16보다 작거나 같고, 16x16 형태의 행렬인 SOT(sparse orthonormal transform), 16개의 입력과 16개의 출력을 갖는 기븐스 로테이션(givens rotation) 기반의 변환, 또는 16개의 입력과 16개의 출력을 가지면서 두 인접한 기븐스 로테이션 레이어 사이에서 지정된 치환(permutation)을 적용하는 레이어드 기븐스 변환(layered givens transform) 중 적어도 하나를 포함하는, 비디오 신호 처리 방법.
  4. 제1항에 있어서,
    상기 순방향 1차 변환은,
    변환 블록에 대한 수평 방향 변환과 수직 방향 변환을 포함하고,
    상기 수평 방향 변환과 상기 수직 방향 변환은,
    각각 DCT-2로 설정되거나, DST-7와 DCT-8의 조합에 의해 설정되는, 비디오 신호 처리 방법.
  5. 비디오 신호를 디코딩하기 위한 방법에 있어서,
    상기 비디오 신호에 대한 엔트로피 디코딩 및 역양자화를 수행함으로써 변환 계수들을 포함하는 변환 블록을 생성하는 단계;
    상기 변환 블록의 사이즈에 기반하여 상기 변환 블록의 변환 계수들에 대한 역방향 변환을 통해 잔차 신호들을 생성하는 단계;
    상기 잔차 신호들로부터 예측을 통해 예측 신호를 생성함으로써 복원 픽처를 생성하는 단계를 포함하고,
    상기 역변환을 수행하는 단계는,
    상기 변환 블록의 사이즈가 4x4 보다 작거나 같은 경우, 상기 변환 블록에 대한 역방향(inverse) 비-분리 2차 변환(non-separable secondary transform)을 적용하지 않고, 상기 변환 블록의 사이즈가 4x4 보다 큰 경우, 상기 변환 블록에 대해 상기 역방향 비-분리 2차 변환을 적용하는 단계; 및
    상기 변환 블록에 대해 수평 및 수직 방향으로 분리하여 역방향 1차 변환(primary transform)을 적용하는 단계를 포함하는, 비디오 신호 처리 방법.
  6. 제5항에 있어서,
    상기 변환 블록에 대해 상기 역방향 비-분리 2차 변환을 적용하는 단계는,
    상기 변환 블록의 좌상측 4x4 영역에 대해 상기 역방향 비-분리 2차 변환을 적용하는 단계를 포함하는, 비디오 신호 처리 방법.
  7. 제5항에 있어서,
    상기 역방향 비-분리 2차 변환은,
    Lx16 형태의 행렬인 LFNST(low frequency non-separable transform), 여기서 LFNST는 좌상측 특정 영역에 대해 적용되는 비분리 변환을 나타내며 L은 16보다 작거나 같고, 16x16 형태의 행렬인 SOT(sparse orthonormal transform), 16개의 입력과 16개의 출력을 갖는 기븐스 로테이션(givens rotation) 기반의 변환, 또는 16개의 입력과 16개의 출력을 가지면서 두 인접한 기븐스 로테이션 레이어 사이에서 지정된 치환(permutation)을 적용하는 레이어드 기븐스 변환(layered givens transform) 중 적어도 하나를 포함하고,
    상기 역방향 1차 변환은,
    변환 블록에 대한 수평 방향 변환과 수직 방향 변환을 포함하고,
    상기 수평 방향 변환과 상기 수직 방향 변환은,
    각각 DCT-2로 설정되거나, DST-7와 DCT-8의 조합에 의해 설정되는, 비디오 신호 처리 방법.
  8. 비디오 신호를 인코딩하기 위한 장치에 있어서,
    상기 비디오 신호를 저장하는 메모리와,
    상기 메모리와 기능적으로 결합되고, 상기 비디오 신호를 인코딩 처리하는 인코더를 포함하고,
    상기 인코더는,
    상기 비디오 신호의 픽처에서 예측 샘플을 제외한 잔차 샘플들을 포함하는 변환 블록을 확인하고,
    상기 변환 블록의 사이즈에 기반하여 상기 변환 블록의 잔차 샘플들에 대한 변환을 통해 변환 계수들을 생성하고,
    상기 변환 계수들에 대해 양자화 및 엔트로피 코딩을 수행하도록 설정되고,
    상기 변환 블록의 잔차 샘플들에 대한 변환을 통해 변환 계수들을 생성할 때, 상기 인코더는,
    상기 잔차 샘플들을 포함하는 변환 블록의 수평 방향 및 수직 방향 각각에 대해 순방향(forward) 1차 변환(primary transform)을 적용하고,
    상기 변환 블록의 사이즈가 4x4 보다 작거나 같은 경우, 상기 1차 변환이 적용된 변환 블록에 대한 순방향(forward) 비-분리 2차 변환(non-separable secondary transform)을 적용하지 않고, 상기 변환 블록의 사이즈가 4x4 보다 큰 경우, 상기 변환 블록에 대해 상기 순방향 비-분리 2차 변환을 적용하도록 설정되는, 비디오 신호 처리 장치.
  9. 제8항에 있어서,
    상기 인코더는,
    상기 변환 블록의 사이즈가 4x4 보다 큰 경우, 상기 변환 블록의 좌상측 4x4 영역에 대하여 상기 순방향 비-분리 2차 변환을 적용하도록 설정되는, 비디오 신호 처리 방법.
  10. 제8항에 있어서,
    상기 순방향 비-분리 2차 변환은,
    Lx16 형태의 행렬인 LFNST(low frequency non-separable transform), 여기서 LFNST는 좌상측 특정 영역에 대해 적용되는 비분리 변환을 나타내며 L은 16보다 작거나 같고, 16x16 형태의 행렬인 SOT(sparse orthonormal transform), 16개의 입력과 16개의 출력을 갖는 기븐스 로테이션(givens rotation) 기반의 변환, 또는 16개의 입력과 16개의 출력을 가지면서 두 인접한 기븐스 로테이션 레이어 사이에서 지정된 치환(permutation)을 적용하는 레이어드 기븐스 변환(layered givens transform) 중 적어도 하나를 포함하는, 비디오 신호 처리 장치.
  11. 제8항에 있어서,
    상기 순방향 1차 변환은,
    변환 블록에 대한 수평 방향 변환과 수직 방향 변환을 포함하고,
    상기 수평 방향 변환과 상기 수직 방향 변환은,
    각각 DCT-2로 설정되거나, DST-7와 DCT-8의 조합에 의해 설정되는, 비디오 신호 처리 장치.
  12. 비디오 신호를 디코딩하기 위한 장치에 있어서,
    상기 비디오 신호를 저장하는 메모리와,
    상기 메모리와 기능적으로 결합되고, 상기 비디오 신호를 디코딩 처리하는 디코더를 포함하고,
    상기 디코더는,
    상기 비디오 신호에 대한 엔트로피 디코딩 및 역양자화를 수행함으로써 변환 계수들을 포함하는 변환 블록을 생성하고,
    상기 변환 블록의 사이즈에 기반하여 상기 변환 블록의 변환 계수들에 대한 역방향 변환을 통해 잔차 신호들을 생성하고,
    상기 잔차 신호들로부터 예측을 통해 예측 신호를 생성함으로써 복원 픽처를 생성하도록 설정되고,
    상기 변환 블록의 변환 계수들에 대한 역방향 변환을 통해 잔차 신호들을 생성할 때, 상기 디코더는,
    상기 변환 블록의 사이즈가 4x4 보다 작거나 같은 경우, 상기 변환 블록에 대한 역방향(inverse) 비-분리 2차 변환(non-separable secondary transform)을 적용하지 않고, 상기 변환 블록의 사이즈가 4x4 보다 큰 경우, 상기 변환 블록에 대해 상기 역방향 비-분리 2차 변환을 적용하고,
    상기 변환 블록에 대해 수평 및 수직 방향으로 분리하여 역방향 1차 변환(primary transform)을 적용하도록 설정된, 비디오 신호 처리 장치.
  13. 제12항에 있어서,
    상기 디코더는,
    상기 변환 블록의 사이즈가 4x4 보다 큰 경우, 상기 변환 블록의 좌상측 4x4 영역에 대해 상기 역방향 비-분리 2차 변환을 적용하도록 설정된, 비디오 신호 처리 장치.
  14. 제10항에 있어서,
    상기 역방향 비-분리 2차 변환은,
    Lx16 형태의 행렬인 LFNST(low frequency non-separable transform), 여기서 LFNST는 좌상측 특정 영역에 대해 적용되는 비분리 변환을 나타내며 L은 16보다 작거나 같고, 16x16 형태의 행렬인 SOT(sparse orthonormal transform), 16개의 입력과 16개의 출력을 갖는 기븐스 로테이션(givens rotation) 기반의 변환, 또는 16개의 입력과 16개의 출력을 가지면서 두 인접한 기븐스 로테이션 레이어 사이에서 지정된 치환(permutation)을 적용하는 레이어드 기븐스 변환(layered givens transform) 중 적어도 하나를 포함하고,
    상기 역방향 1차 변환은,
    변환 블록에 대한 수평 방향 변환과 수직 방향 변환을 포함하고,
    상기 수평 방향 변환과 상기 수직 방향 변환은,
    각각 DCT-2로 설정되거나, DST-7와 DCT-8의 조합에 의해 설정되는, 비디오 신호 처리 장치.
PCT/KR2019/008336 2018-07-12 2019-07-08 비디오 신호를 처리하기 위한 방법 및 장치 WO2020013541A1 (ko)

Priority Applications (5)

Application Number Priority Date Filing Date Title
KR1020237023593A KR102664785B1 (ko) 2018-07-12 2019-07-08 비디오 신호를 처리하기 위한 방법 및 장치
US17/258,973 US11689744B2 (en) 2018-07-12 2019-07-08 Methods and apparatuses for processing video signal
KR1020247015003A KR20240075908A (ko) 2018-07-12 2019-07-08 비디오 신호를 처리하기 위한 방법 및 장치
KR1020217001000A KR102555966B1 (ko) 2018-07-12 2019-07-08 비디오 신호를 처리하기 위한 방법 및 장치
US18/197,529 US20230379501A1 (en) 2018-07-12 2023-05-15 Methods and apparatuses for processing video signal

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201862697388P 2018-07-12 2018-07-12
US62/697,388 2018-07-12

Related Child Applications (2)

Application Number Title Priority Date Filing Date
US17/258,973 A-371-Of-International US11689744B2 (en) 2018-07-12 2019-07-08 Methods and apparatuses for processing video signal
US18/197,529 Continuation US20230379501A1 (en) 2018-07-12 2023-05-15 Methods and apparatuses for processing video signal

Publications (1)

Publication Number Publication Date
WO2020013541A1 true WO2020013541A1 (ko) 2020-01-16

Family

ID=69141782

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2019/008336 WO2020013541A1 (ko) 2018-07-12 2019-07-08 비디오 신호를 처리하기 위한 방법 및 장치

Country Status (3)

Country Link
US (2) US11689744B2 (ko)
KR (3) KR102664785B1 (ko)
WO (1) WO2020013541A1 (ko)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020013541A1 (ko) * 2018-07-12 2020-01-16 엘지전자 주식회사 비디오 신호를 처리하기 위한 방법 및 장치
US11882311B2 (en) * 2019-03-11 2024-01-23 Sony Group Corporation Image processing device and method
WO2020216303A1 (en) * 2019-04-23 2020-10-29 Beijing Bytedance Network Technology Co., Ltd. Selective use of secondary transform in coded video
GB2585030A (en) * 2019-06-25 2020-12-30 British Broadcasting Corp Method of signalling in a video codec
US11575896B2 (en) * 2019-12-16 2023-02-07 Panasonic Intellectual Property Corporation Of America Encoder, decoder, encoding method, and decoding method
KR20230150292A (ko) * 2021-02-24 2023-10-30 엘지전자 주식회사 영상 코딩 방법 및 그 장치

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130098360A (ko) * 2010-09-08 2013-09-04 삼성전자주식회사 내부 예측을 위한 적응적 이산 코사인 변환 및 이산 사인 변환을 이용한 낮은 복잡도의 변환 코딩
KR101529650B1 (ko) * 2013-07-02 2015-06-19 성균관대학교산학협력단 영상 압축을 위한 선택적 변환 방법 및 장치, 및 역변환 방법 및 장치
WO2018044125A1 (ko) * 2016-09-01 2018-03-08 엘지전자(주) 레이어드 기븐스 변환을 이용하여 변환을 수행하는 방법 및 장치
US20180103252A1 (en) * 2016-10-12 2018-04-12 Qualcomm Incorporated Primary transform and secondary transform in video coding

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012023632A (ja) * 2010-07-15 2012-02-02 Sony Corp 符号化装置および符号化方法、並びに、復号装置および復号方法
US10681379B2 (en) * 2015-09-29 2020-06-09 Qualcomm Incorporated Non-separable secondary transform for video coding with reorganizing
US11303928B2 (en) * 2017-09-28 2022-04-12 Sharp Kabushiki Kaisha Image decoding apparatus and image coding apparatus
WO2020013541A1 (ko) * 2018-07-12 2020-01-16 엘지전자 주식회사 비디오 신호를 처리하기 위한 방법 및 장치

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130098360A (ko) * 2010-09-08 2013-09-04 삼성전자주식회사 내부 예측을 위한 적응적 이산 코사인 변환 및 이산 사인 변환을 이용한 낮은 복잡도의 변환 코딩
KR101529650B1 (ko) * 2013-07-02 2015-06-19 성균관대학교산학협력단 영상 압축을 위한 선택적 변환 방법 및 장치, 및 역변환 방법 및 장치
WO2018044125A1 (ko) * 2016-09-01 2018-03-08 엘지전자(주) 레이어드 기븐스 변환을 이용하여 변환을 수행하는 방법 및 장치
US20180103252A1 (en) * 2016-10-12 2018-04-12 Qualcomm Incorporated Primary transform and secondary transform in video coding

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
KOO, MOONMO: "CE 6.2.5: Layered Givens Transform (LGT)", 11. JVET MEETING; 20180711 - 20180718; LJUBLJANA; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), no. JVET-K0098, 10 July 2010 (2010-07-10), Ljubljana , SI, pages 1 - 6, XP030199194 *

Also Published As

Publication number Publication date
US11689744B2 (en) 2023-06-27
KR20230108355A (ko) 2023-07-18
US20230379501A1 (en) 2023-11-23
KR20210013758A (ko) 2021-02-05
KR20240075908A (ko) 2024-05-29
KR102664785B1 (ko) 2024-05-17
US20210321134A1 (en) 2021-10-14
KR102555966B1 (ko) 2023-07-17

Similar Documents

Publication Publication Date Title
WO2019235797A1 (ko) 축소된 변환을 이용하여 비디오 신호를 처리하는 방법 및 장치
WO2020060364A1 (ko) 비디오 신호의 부호화/복호화 방법 및 이를 위한 장치
WO2019235887A1 (ko) 인트라 예측 모드에 기초하여 변환 인덱스 코딩을 수행하는 방법 및 이를 위한 장치
WO2020050665A1 (ko) 비디오 신호의 부호화/복호화 방법 및 이를 위한 장치
WO2020009434A1 (ko) 이차 변환을 기반으로 비디오 신호를 처리하는 방법 및 장치
WO2020013541A1 (ko) 비디오 신호를 처리하기 위한 방법 및 장치
WO2020046086A1 (ko) 영상 신호를 처리하기 위한 방법 및 장치
WO2020162732A1 (ko) 비디오 신호를 처리하기 위한 방법 및 장치
WO2020036390A1 (ko) 영상 신호를 처리하기 위한 방법 및 장치
WO2020050668A1 (ko) 영상 신호를 처리하기 위한 방법 및 장치
WO2020162690A1 (ko) 축소된 변환을 사용하여 비디오 신호를 처리하기 위한 방법 및 장치
WO2020166977A1 (ko) 비디오 신호를 처리하기 위한 방법 및 장치
WO2020130680A1 (ko) 인트라 예측을 사용하여 비디오 신호를 처리하기 위한 방법 및 장치
WO2021060847A1 (ko) 컬러 포맷에 기반하여 분할 모드를 결정하는 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법
WO2021054796A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021060844A1 (ko) 팔레트 모드를 이용한 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법
WO2020171647A1 (ko) 영상 코딩 시스템에서 인트라 예측을 사용하는 영상 디코딩 방법 및 그 장치
WO2021096290A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021172914A1 (ko) 레지듀얼 코딩에 대한 영상 디코딩 방법 및 그 장치
WO2021054798A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021060905A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2018143496A1 (ko) 예측 모드를 유도하여 비디오 신호를 인코딩, 디코딩하는 방법 및 장치
WO2020009400A1 (ko) 인트라 예측을 사용하여 비디오 신호를 처리하기 위한 방법 및 장치
WO2021167421A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2021054783A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치

Legal Events

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

Ref document number: 19834311

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 20217001000

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19834311

Country of ref document: EP

Kind code of ref document: A1