WO2023096472A1 - 비디오 신호 처리 방법 및 이를 위한 장치 - Google Patents

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

Info

Publication number
WO2023096472A1
WO2023096472A1 PCT/KR2022/019116 KR2022019116W WO2023096472A1 WO 2023096472 A1 WO2023096472 A1 WO 2023096472A1 KR 2022019116 W KR2022019116 W KR 2022019116W WO 2023096472 A1 WO2023096472 A1 WO 2023096472A1
Authority
WO
WIPO (PCT)
Prior art keywords
current block
block
samples
template
mode
Prior art date
Application number
PCT/KR2022/019116
Other languages
English (en)
French (fr)
Inventor
김경용
김동철
손주형
곽진삼
Original Assignee
주식회사 윌러스표준기술연구소
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 윌러스표준기술연구소 filed Critical 주식회사 윌러스표준기술연구소
Publication of WO2023096472A1 publication Critical patent/WO2023096472A1/ko

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

Definitions

  • the present invention relates to a method and apparatus for processing a video signal, and more particularly, to a method and apparatus for processing a video signal for encoding or decoding a video signal.
  • Compression coding refers to a series of signal processing techniques for transmitting digitized information through a communication line or storing it in a form suitable for a storage medium.
  • Targets of compression coding include voice, video, text, and the like, and in particular, a technique of performing compression coding for video is called video image compression.
  • Compression encoding of a video signal is performed by removing redundant information in consideration of spatial correlation, temporal correlation, and stochastic correlation.
  • a more highly efficient video signal processing method and apparatus are required.
  • An object of the present specification is to increase coding efficiency of a video signal by providing a video signal processing method and an apparatus therefor.
  • the present specification provides a video signal processing method and apparatus therefor.
  • a video signal decoding apparatus includes a processor, and the processor configures a template including neighboring blocks of a current block, and adjusts the luminance of the neighboring blocks based on a color format of a current picture including the current block.
  • the processor may perform high-frequency filtering or low-frequency filtering on the neighboring blocks included in the template.
  • a video signal encoding device includes a processor, and the processor obtains a bitstream decoded by a decoding method.
  • a computer-readable non-transitory storage medium stores a bitstream.
  • the bitstream is decoded by a decoding method.
  • the decoding method includes constructing a template including neighboring blocks of a current block; down-sampling luma component samples of the neighboring blocks based on a color format of a current picture including the current block; deriving a first linear model and a second linear model based on the downsampled luminance component samples; and predicting a chrominance component sample at a position corresponding to a position of a first sample among luminance component samples of the current block based on one of the first linear model and the second linear model; ,
  • the one linear model is characterized in that it is determined by comparing the value of the first sample with a threshold value.
  • the decoding method includes performing high-frequency filtering or low-frequency filtering on the neighboring blocks included in the template.
  • the threshold is characterized in that the average value of the values of the restored luminance component blocks within the current block.
  • the threshold is characterized in that it is an average value of color difference component samples of the neighboring blocks.
  • the threshold is characterized in that it is determined based on threshold information included in the bitstream.
  • the neighboring blocks included in the template are first blocks adjacent to the upper side of the current block, second blocks adjacent to the left side of the current block, or the first blocks and the second blocks.
  • the neighboring blocks included in the template are determined based on an intra prediction direction mode of the current block.
  • the neighboring blocks included in the template are determined by comparing a first quantization parameter value used for reconstruction of the first blocks and a second quantization parameter value used for reconstruction of the second blocks characterized by
  • the neighboring blocks included in the template are determined based on the size of the current block.
  • the neighboring blocks included in the template are based on whether cross-component linear model (CCLM) or multi-model linear mode (MMLM) is applied to the first blocks and the second blocks. characterized by being determined.
  • CCLM cross-component linear model
  • MMLM multi-model linear mode
  • the neighboring blocks included in the template are characterized in that they are determined based on neighboring block information included in the bitstream.
  • the neighboring blocks included in the template are blocks on a line spaced apart by a specific sample from the current block or blocks on a line less than the specific sample interval from the current block.
  • the present specification provides a method for efficiently processing a video signal.
  • FIG. 1 is a schematic block diagram of a video signal encoding apparatus according to an embodiment of the present invention.
  • FIG. 2 is a schematic block diagram of a video signal decoding apparatus according to an embodiment of the present invention.
  • FIG. 3 shows an embodiment in which a coding tree unit within a picture is divided into coding units.
  • FIG. 4 illustrates one embodiment of a method for signaling splitting of quad trees and multi-type trees.
  • 5 and 6 show the intra prediction method according to an embodiment of the present invention in more detail.
  • FIG. 7 is a diagram illustrating positions of neighboring blocks used to construct a motion candidate list in inter prediction.
  • FIG. 8 is a diagram showing how CCLM is performed according to an embodiment of the present specification.
  • FIG. 9 is a diagram illustrating a template used for deriving a linear model according to an embodiment of the present specification.
  • FIG. 10 is a diagram illustrating a method of deriving two linear models according to an embodiment of the present specification.
  • FIG. 11 is a diagram illustrating a method of signaling an intra prediction directional mode for a chrominance component block according to an embodiment of the present specification.
  • FIGS. 12 and 13 are diagrams illustrating a context model according to an embodiment of the present specification.
  • FIG. 14 is a diagram illustrating a method of deriving an intra prediction mode of a current block using neighboring blocks according to an embodiment of the present specification.
  • 15 is a diagram illustrating a method of obtaining a color difference prediction block according to an embodiment of the present specification.
  • 16 is a diagram illustrating a reference region used to generate a linear model according to an embodiment of the present specification.
  • 17 is a diagram illustrating a method of processing a video signal according to an embodiment of the present specification.
  • 'A and/or B' may be interpreted as meaning 'including at least one of A or B'.
  • Coding can be interpreted as either encoding or decoding, as the case may be.
  • a device that performs encoding (encoding) of a video signal to generate a video signal bitstream is referred to as an encoding device or an encoder
  • a device that performs decoding (decoding) of a video signal bitstream to restore a video signal is referred to as a decoding device.
  • a device or decoder a video signal processing apparatus is used as a conceptual term including both an encoder and a decoder.
  • a 'unit' is used to indicate a basic unit of image processing or a specific location of a picture, and refers to an image area including at least one of a luma component and a chroma component.
  • a 'block' refers to an image area including a specific component among luminance components and chrominance components (ie, Cb and Cr).
  • terms such as 'unit', 'block', 'partition', 'signal' and 'region' may be used interchangeably depending on embodiments.
  • a 'current block' means a block currently scheduled to be encoded
  • a 'reference block' means a block that has already been coded or decoded and is used as a reference in the current block.
  • terms such as 'luma', 'luma', 'luminance', and 'Y' may be used interchangeably.
  • terms such as 'chroma', 'chroma', 'color difference', and 'Cb or Cr' may be used interchangeably.
  • a unit may be used as a concept including all of a coding unit, a prediction unit, and a transform unit.
  • a picture refers to a field or a frame, and the terms may be used interchangeably depending on embodiments. Specifically, when a photographed image is an interlace image, one frame is divided into an odd (or odd, top) field and an even (or even, bottom) field, and each field is composed of one picture unit. and can be encoded or decoded. If the photographed image is a progressive image, one frame may be configured as a picture and encoded or decoded. Also, in this specification, terms such as 'error signal', 'residual signal', 'residual signal', 'residual signal', and 'difference signal' may be used interchangeably.
  • POC Picture Order Count
  • the encoding apparatus 100 of the present invention includes a transform unit 110, a quantization unit 115, an inverse quantization unit 120, an inverse transform unit 125, a filtering unit 130, and a prediction unit 150. ) and an entropy coding unit 160.
  • the transform unit 110 transforms the residual signal, which is the difference between the received video signal and the prediction signal generated by the predictor 150, to obtain a transform coefficient value.
  • a discrete cosine transform DCT
  • DST discrete sine transform
  • Discrete cosine transform and discrete sine transform perform conversion by dividing an input picture signal into blocks.
  • coding efficiency may vary according to the distribution and characteristics of values within a transformation domain.
  • a transform kernel used for transforming a residual block may be a transform kernel having separable characteristics of vertical transform and horizontal transform. In this case, transformation of the residual block may be performed by dividing the vertical transformation and the horizontal transformation.
  • the encoder may perform vertical transform by applying a transform kernel in the vertical direction of the residual block.
  • the encoder may perform horizontal transformation by applying a transformation kernel in the horizontal direction of the residual block.
  • a transform kernel may be used as a term referring to a set of parameters used for transforming a residual signal, such as a transform matrix, a transform array, a transform function, and a transform.
  • the conversion kernel may be any one of a plurality of available kernels.
  • transform kernels based on different transform types may be used for each of the vertical transform and the horizontal transform.
  • an error signal may exist only in a partial region in a coding block.
  • the conversion process may be performed only on an arbitrary partial area.
  • an error signal may exist only in the first 2NxN block in a block having a size of 2Nx2N, and a conversion process is performed only in the first 2NxN block, but the conversion process is not performed on the second 2NxN block and may not be encoded or decoded.
  • N can be any positive integer.
  • the encoder may perform additional transforms before the transform coefficients are quantized.
  • the transform method described above is referred to as a primary transform, and an additional transform may be referred to as a secondary transform.
  • Secondary transformation may be selective for each residual block.
  • the encoder may improve coding efficiency by performing secondary transform on a region in which it is difficult to concentrate energy in a low frequency region with only the primary transform.
  • secondary transformation may be additionally performed on a block having large residual values in a direction other than the horizontal or vertical direction of the residual block. Unlike the first conversion, the secondary conversion may not be performed separately into vertical conversion and horizontal conversion.
  • This secondary transform may be referred to as a Low Frequency Non-Separable Transform (LFNST).
  • LFNST Low Frequency Non-Separable Transform
  • the quantization unit 115 quantizes the transform coefficient value output from the transform unit 110 .
  • a picture signal is not coded as it is, but a picture is predicted using an area already coded through the prediction unit 150, and a residual value between the original picture and the predicted picture is added to the predicted picture to obtain a reconstructed picture.
  • a method for obtaining is used.
  • the decoder when the encoder performs prediction, the decoder must also use available information. To this end, the encoder performs a process of restoring the encoded current block again.
  • the inverse quantization unit 120 inversely quantizes the transform coefficient value, and the inverse transform unit 125 restores the residual value using the inverse quantized transform coefficient value.
  • the filtering unit 130 performs a filtering operation to improve quality and coding efficiency of a reconstructed picture.
  • a deblocking filter For example, a deblocking filter, a Sample Adaptive Offset (SAO), and an adaptive loop filter may be included.
  • a picture that has undergone filtering is stored in a decoded picture buffer (DPB, 156) to be output or used as a reference picture.
  • DPB decoded picture buffer
  • a deblocking filter is a filter for removing distortion within a block generated at a boundary between blocks in a reconstructed picture.
  • the encoder may determine whether to apply a deblocking filter to a corresponding edge through a distribution of pixels included in several columns or rows based on an arbitrary edge in a block.
  • the encoder may apply a long filter, a strong filter, or a weak filter according to the strength of the deblocking filtering.
  • horizontal direction filtering and vertical direction filtering can be processed in parallel.
  • the sample adaptive offset (SAO) may be used to correct an offset from an original image in units of pixels for a residual block to which a deblocking filter is applied.
  • the encoder In order to correct the offset for a specific picture, the encoder divides the pixels included in the image into a certain number of areas, determines the area to perform offset correction, and uses a method (Band Offset) to apply the offset to the area. can Alternatively, the encoder may use a method (Edge Offset) of applying an offset in consideration of edge information of each pixel.
  • An adaptive loop filter is a method of dividing pixels included in an image into predetermined groups, determining one filter to be applied to the group, and performing filtering differentially for each group. Information related to whether to apply ALF may be signaled in units of coding units, and the shape and filter coefficients of an ALF filter to be applied may vary according to each block. In addition, the ALF filter of the same form (fixed form) may be applied regardless of the characteristics of the target block to be applied.
  • the prediction unit 150 includes an intra prediction unit 152 and an inter prediction unit 154.
  • the intra prediction unit 152 performs intra prediction within the current picture, and the inter prediction unit 154 predicts the current picture using the reference picture stored in the decoded picture buffer 156. Do it.
  • the intra prediction unit 152 performs intra prediction on reconstructed regions in the current picture and transfers intra-encoding information to the entropy coding unit 160 .
  • the intra encoding information may include at least one of an intra prediction mode, a most probable mode (MPM) flag, an MPM index, and information about a reference sample.
  • the inter prediction unit 154 may again include a motion estimation unit 154a and a motion compensation unit 154b.
  • the motion estimation unit 154a refers to a specific region of the reconstructed reference picture to find a part most similar to the current region and obtains a motion vector value that is a distance between the regions.
  • Motion information reference direction indication information (L0 prediction, L1 prediction, bi-directional prediction), reference picture index, motion vector information, etc.) for the reference region acquired by the motion estimation unit 154a is transferred to the entropy coding unit 160. so that it can be included in the bitstream.
  • the motion compensation unit 154b performs inter-motion compensation using the motion information transmitted from the motion estimation unit 154a to generate a prediction block for the current block.
  • the inter prediction unit 154 transfers inter encoding information including motion information on the reference region to the entropy coding unit 160 .
  • the predictor 150 may include an intra block copy (IBC) predictor (not shown).
  • the IBC prediction unit performs IBC prediction from reconstructed samples in the current picture and transfers IBC encoding information to the entropy coding unit 160 .
  • the IBC prediction unit refers to a specific region in the current picture and obtains a block vector value indicating a reference region used for prediction of the current region.
  • the IBC prediction unit may perform IBC prediction using the obtained block vector value.
  • the IBC prediction unit transfers the IBC encoding information to the entropy coding unit 160 .
  • the IBC encoding information may include at least one of size information of a reference region and block vector information (index information for predicting a block vector of a current block in a motion candidate list and block vector difference information).
  • the transform unit 110 obtains a transform coefficient value by transforming a residual value between an original picture and a predicted picture.
  • transformation may be performed in units of a specific block within a picture, and the size of a specific block may vary within a preset range.
  • the quantization unit 115 quantizes the transform coefficient values generated by the transform unit 110 and transfers the quantized transform coefficients to the entropy coding unit 160 .
  • the quantized transform coefficients in the form of a two-dimensional array may be rearranged into a form of a one-dimensional array for entropy coding.
  • a scanning method for quantized transform coefficients may be determined according to a size of a transform block and an intra-prediction mode. As an embodiment, diagonal, vertical, and horizontal scans may be applied. Such scan information may be signaled in units of blocks and may be derived according to pre-determined rules.
  • the entropy coding unit 160 generates a video signal bitstream by entropy coding information representing quantized transform coefficients, intra-encoding information, and inter-encoding information.
  • a variable length coding (VLC) method and an arithmetic coding method may be used.
  • VLC variable length coding
  • a variable length coding (VLC) method converts input symbols into continuous codewords, the length of which can be variable. For example, frequently occurring symbols are represented by short codewords, and infrequently occurring symbols are represented by long codewords.
  • a context-based adaptive variable length coding (CAVLC) scheme may be used as a variable length coding scheme.
  • Arithmetic coding converts successive data symbols into a single prime number using a probability distribution of each data symbol. Arithmetic coding can obtain an optimal number of decimal bits required to represent each symbol.
  • As arithmetic coding context-based adaptive binary arithmetic code (CABAC) may be used.
  • CABAC context-based adaptive binary arithmetic code
  • CABAC is a method of encoding binary arithmetic through several context models generated based on probabilities obtained through experiments.
  • a context model may be described as a context model.
  • the encoder binarizes each symbol using exp-Golomb or the like.
  • a binarized 0 or 1 can be described as a bin.
  • the CABAC initialization process is divided into context initialization and arithmetic coding initialization.
  • Context initialization is a process of initializing the occurrence probability of each symbol, and is determined according to the symbol type, quantization parameter (QP), and slice type (whether I, P, or B).
  • QP quantization parameter
  • slice type whether I, P, or B
  • the context model provides information (valMPS) about the probability of occurrence of a least probable symbol (LPS) or most probable symbol (MPS) for a symbol to be currently coded and which bin value among 0 and 1 corresponds to the MPS.
  • valMPS information about the probability of occurrence of a least probable symbol (LPS) or most probable symbol (MPS) for a symbol to be currently coded and which bin value among 0 and 1 corresponds to the MPS.
  • LPS least probable symbol
  • MPS most probable symbol
  • One of several context models is selected through a context index (ctxIdx), and the context index can be derived through information of a block to be currently encoded or information of neighboring blocks.
  • Initialization for binary arithmetic coding is performed based on the probability model selected in the context model.
  • Binary arithmetic encoding is performed by dividing into probability intervals through the occurrence probabilities of 0 and 1, and then the probability interval corresponding to the bin to be processed becomes the entire probability interval for
  • Position information within the probability interval where the last bin was processed is output.
  • a renormalization process is performed to widen the probability interval and corresponding location information is output.
  • a probability update process may be performed in which a probability of a next bin to be processed is newly set based on information of the processed bin.
  • the generated bitstream is encapsulated in a network abstraction layer (NAL) unit as a basic unit.
  • the NAL unit is divided into a VCL (Video Coding Layer) NAL unit including video data and a non-VCL NAL unit including parameter information for decoding video data.
  • VCL Video Coding Layer
  • non-VCL NAL unit including parameter information for decoding video data.
  • the NAL unit is composed of NAL header information and data, RBSP (Raw Byte Sequence Payload), and the NAL header information includes summary information about the RBSP.
  • the RBSP of the VCL NAL unit includes a coded integer number of coding tree units.
  • the bitstream In order to decode a bitstream in a video decoder, the bitstream must first be divided into NAL unit units and then each separated NAL unit must be decoded. Meanwhile, information necessary for decoding a video signal bitstream is included in a Picture Parameter Set (PPS), a Sequence Parameter Set (SPS), a Video Parameter Set (VPS), etc. and transmitted.
  • PPS Picture Parameter Set
  • SPS Sequence Parameter Set
  • VPS Video Parameter Set
  • FIG. 1 shows the encoding apparatus 100 according to an embodiment of the present invention, and the separately displayed blocks logically distinguish elements of the encoding apparatus 100. Accordingly, the elements of the encoding apparatus 100 described above may be mounted as one chip or as a plurality of chips according to the design of the device. According to one embodiment, the operation of each element of the above-described encoding device 100 may be performed by a processor (not shown).
  • the decoding apparatus 200 of the present invention includes an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 225, a filtering unit 230, and a prediction unit 250.
  • the entropy decoding unit 210 entropy-decodes the video signal bitstream and extracts transform coefficient information, intra-encoding information, and inter-encoding information for each region. For example, the entropy decoding unit 210 may obtain a binarization code for transform coefficient information of a specific region from a video signal bitstream. Also, the entropy decoding unit 210 inversely binarizes the binary code to obtain quantized transform coefficients. The inverse quantization unit 220 inversely quantizes the quantized transform coefficient, and the inverse transform unit 225 restores a residual value using the inverse quantized transform coefficient. The video signal processing apparatus 200 restores an original pixel value by adding the residual value obtained from the inverse transform unit 225 to the prediction value obtained from the predictor 250.
  • the filtering unit 230 improves picture quality by performing filtering on pictures. This may include a deblocking filter to reduce block distortion and/or an adaptive loop filter to remove distortion of the entire picture.
  • the filtered picture is output or stored in the decoded picture buffer (DPB) 256 to be used as a reference picture for the next picture.
  • DPB decoded picture buffer
  • the prediction unit 250 includes an intra prediction unit 252 and an inter prediction unit 254 .
  • the prediction unit 250 generates a predicted picture by utilizing the coding type decoded through the above-described entropy decoding unit 210, transform coefficients for each region, intra/inter coding information, and the like.
  • a current picture including the current block or a decoded area of other pictures may be used.
  • a picture (or tile/slice) that can be performed is called an inter picture (or tile/slice).
  • a picture (or tile/slice) using up to one motion vector and reference picture index to predict sample values of each block among inter-pictures (or tiles/slices) is called a predictive picture or a P picture (or , tile/slice), and a picture (or tile/slice) using up to two motion vectors and a reference picture index is called a bi-predictive picture or B picture (or tile/slice).
  • a P picture (or tile/slice) uses at most one set of motion information to predict each block
  • a B picture (or tile/slice) uses at most two sets of motion information to predict each block.
  • the motion information set includes one or more motion vectors and one reference picture index.
  • the intra prediction unit 252 generates a prediction block using intra encoding information and reconstructed samples in a current picture.
  • the intra encoding information may include at least one of an intra prediction mode, a most probable mode (MPM) flag, and an MPM index.
  • the intra predictor 252 predicts sample values of the current block by using reconstructed samples located on the left side and/or above the current block as reference samples.
  • reconstructed samples, reference samples, and samples of a current block may represent pixels. Also, sample values may represent pixel values.
  • reference samples may be samples included in neighboring blocks of the current block.
  • the reference samples may be samples adjacent to the left boundary of the current block and/or samples adjacent to the upper boundary of the current block.
  • the reference samples are samples located on a line within a preset distance from the left boundary of the current block among samples of neighboring blocks of the current block and/or located on a line within a preset distance from the upper boundary of the current block.
  • the neighboring blocks of the current block may be a left (L) block, an upper (A) block, a below left (BL) block, an above right (AR) block, or an above left (Above Left) block adjacent to the current block.
  • AL may include at least one of the blocks.
  • the inter prediction unit 254 generates a prediction block using a reference picture stored in the decoded picture buffer 256 and inter encoding information.
  • the inter-encoding information may include a motion information set (reference picture index, motion vector information, etc.) of a current block with respect to a reference block.
  • Inter prediction may include L0 prediction, L1 prediction, and bi-prediction.
  • L0 prediction refers to prediction using one reference picture included in the L0 picture list
  • L1 prediction refers to prediction using one reference picture included in the L1 picture list.
  • one set of motion information eg, a motion vector and a reference picture index
  • up to two reference regions can be used, and these two reference regions may exist in the same reference picture or in different pictures.
  • the bi-prediction method up to two sets of motion information (eg, a motion vector and a reference picture index) can be used, and the two motion vectors may correspond to the same reference picture index or to different reference picture indices. may correspond.
  • the reference pictures are pictures positioned before or after the current picture in terms of time, and may be pictures that have already been reconstructed.
  • two reference regions used in the bi-prediction method may be regions selected from each of the L0 picture list and the L1 picture list.
  • the inter prediction unit 254 may obtain a reference block of the current block by using the motion vector and the reference picture index.
  • the reference block exists in a reference picture corresponding to a reference picture index.
  • a sample value of a block specified by a motion vector or an interpolated value thereof may be used as a predictor of a current block.
  • an 8-tap interpolation filter for a luminance signal and a 4-tap interpolation filter for a chrominance signal may be used.
  • an interpolation filter for motion prediction in units of subpels is not limited thereto.
  • the inter prediction unit 254 performs motion compensation for predicting the texture of the current unit from the previously reconstructed picture.
  • the inter prediction unit may use the motion information set.
  • the prediction unit 250 may include an IBC prediction unit (not shown).
  • the IBC prediction unit may reconstruct the current region by referring to a specific region including reconstructed samples in the current picture.
  • the IBC prediction unit may perform IBC prediction using the IBC encoding information obtained from the entropy decoding unit 210 .
  • IBC encoding information may include block vector information.
  • a reconstructed video picture is generated by adding the prediction value output from the intra prediction unit 252 or the inter prediction unit 254 and the residual value output from the inverse transform unit 225. That is, the video signal decoding apparatus 200 reconstructs the current block by using the prediction block generated by the prediction unit 250 and the residual obtained from the inverse transform unit 225.
  • FIG. 2 shows the decoding apparatus 200 according to an embodiment of the present invention, and the separately displayed blocks logically distinguish elements of the decoding apparatus 200. Accordingly, elements of the decoding apparatus 200 described above may be mounted as one chip or as a plurality of chips according to the design of the device. According to one embodiment, the operation of each element of the decoding apparatus 200 described above may be performed by a processor (not shown).
  • the technology proposed in this specification is a technology applicable to both encoder and decoder methods and devices, and parts described as signaling and parsing may be described for convenience of description.
  • signaling is for encoding each syntax from an encoder point of view
  • parsing is for interpreting each syntax from a decoder point of view. That is, each syntax may be included in a bitstream from the encoder and signaled, and the decoder may parse the syntax and use it in the restoration process.
  • a sequence of bits for each syntax arranged according to a defined hierarchical configuration may be referred to as a bitstream.
  • One picture may be coded after being divided into sub-pictures, slices, tiles, and the like.
  • a subpicture may contain one or more slices or tiles. When one picture is divided into several slices or tiles and encoded, all slices or tiles in the picture must be decoded before being displayed on the screen. On the other hand, when one picture is coded with several subpictures, only a certain subpicture can be decoded and displayed on the screen.
  • a slice may contain multiple tiles or subpictures. Alternatively, a tile may include multiple subpictures or slices. Since subpictures, slices, and tiles can be encoded or decoded independently of each other, it is effective in improving parallel processing and processing speed. However, since coded information of other adjacent subpictures, other slices, and other tiles cannot be used, the amount of bits increases.
  • Subpictures, slices, and tiles may be coded after being divided into several Coding Tree Units (CTUs).
  • CTUs Coding Tree Units
  • a coding tree unit may include a luma coding tree block (CTB), two chroma coding tree blocks, and encoded syntax information thereof.
  • CB luma coding tree block
  • One coding tree unit may be composed of one coding unit, or one coding tree unit may be divided into several coding units.
  • One coding unit may include a luminance coding block (CB), two color difference coding blocks, and their encoded syntax information.
  • One coding block may be divided into several sub coding blocks.
  • One coding unit may be composed of one transform unit (TU), or one coding unit may be divided into several transform units.
  • One transform unit may include a luminance transform block (TB), two color difference transform blocks, and encoded syntax information thereof.
  • a coding tree unit may be divided into a plurality of coding units.
  • a coding tree unit may be a leaf node without being split. In this case, the coding tree unit itself may be a coding unit.
  • a coding unit refers to a basic unit for processing a picture in the process of processing a video signal described above, that is, intra/inter prediction, transformation, quantization, and/or entropy coding.
  • the size and shape of a coding unit within one picture may not be constant.
  • a coding unit may have a square or rectangular shape.
  • a rectangular coding unit (or rectangular block) includes a vertical coding unit (or vertical block) and a horizontal coding unit (or horizontal block).
  • a vertical block is a block whose height is greater than its width
  • a horizontal block is a block whose width is greater than its height.
  • a non-square block may refer to a rectangular block, but the present invention is not limited thereto.
  • the coding tree unit is first divided into a quad tree (QT) structure. That is, in the quad tree structure, one node having a size of 2NX2N may be divided into four nodes having a size of NXN.
  • a quad tree may also be referred to as a quaternary tree. Quad tree splitting can be done recursively, and not all nodes need to be split to the same depth.
  • the leaf node of the aforementioned quad tree may be further divided into a multi-type tree (MTT) structure.
  • MTT multi-type tree
  • one node in a multi-type tree structure, one node may be split into a binary (binary) or ternary (ternary) tree structure of horizontal or vertical split. That is, there are four partition structures of vertical binary partitioning, horizontal binary partitioning, vertical ternary partitioning, and horizontal ternary partitioning in the multi-type tree structure.
  • both the width and height of a node in each tree structure may have a power of 2 value.
  • a node having a size of 2NX2N is divided into two NX2N nodes by vertical binary partitioning and divided into two 2NXN nodes by horizontal binary partitioning.
  • a node of size 2NX2N is divided into nodes of (N/2)X2N, NX2N and (N/2)X2N by vertical ternary division, and horizontal ternary division It can be divided into 2NX(N/2), 2NXN and 2NX(N/2) nodes by partitioning.
  • This multi-type tree partitioning can be performed recursively.
  • a leaf node of a multi-type tree can be a coding unit. If the coding unit is not large compared to the maximum transform length, the coding unit may be used as a unit of prediction and/or transformation without further division. As an embodiment, when the width or height of the current coding unit is greater than the maximum transform length, the current coding unit may be divided into a plurality of transform units without explicit signaling regarding division. Meanwhile, in the aforementioned quad tree and multi-type tree, at least one of the following parameters may be defined in advance or may be transmitted through a higher level set of RBSPs such as PPS, SPS, and VPS.
  • RBSPs such as PPS, SPS, and VPS.
  • Preset flags may be used to signal splitting of the aforementioned quad tree and multi-type tree.
  • a flag 'split_cu_flag' indicating whether a node is split
  • a flag 'split_qt_flag' indicating whether a quad tree node is split
  • a flag 'mtt_split_cu_vertical_flag' indicating a split direction of a multi-type tree node
  • At least one of flags 'mtt_split_cu_binary_flag' indicating a split shape of a type tree node may be used.
  • 'split_cu_flag' which is a flag indicating whether to split a current node, may be signaled first. If the value of 'split_cu_flag' is 0, it indicates that the current node is not split, and the current node becomes a coding unit.
  • the coding tree unit includes one undivided coding unit.
  • the current node is a quad tree node 'QT node'
  • the current node is a leaf node 'QT leaf node' of the quad tree and becomes a coding unit.
  • the current node is a multi-type tree node 'MTT node'
  • the current node is a leaf node 'MTT leaf node' of the multi-type tree and becomes a coding unit.
  • the current node may be split into quad tree or multi-type tree nodes according to the value of 'split_qt_flag'.
  • a coding tree unit is a root node of a quad tree, and can be first partitioned into a quad tree structure. In the quad tree structure, 'split_qt_flag' is signaled for each node 'QT node'.
  • quad tree partitioning may be limited according to the type of current node. Quad tree splitting may be allowed if the current node is a coding tree unit (root node of a quad tree) or a quad tree node, and quad tree splitting may not be allowed if the current node is a multi-type tree node.
  • Each quad tree leaf node 'QT leaf node' can be further partitioned into a multi-type tree structure. As described above, when 'split_qt_flag' is 0, the current node may be split into multi-type nodes. In order to indicate the split direction and split shape, 'mtt_split_cu_vertical_flag' and 'mtt_split_cu_binary_flag' may be signaled.
  • a luminance block and a chrominance block may be equally divided. That is, the chrominance block may be divided by referring to the division form of the luminance block. If the size of the current chrominance block is smaller than a predetermined size, the chrominance block may not be divided even if the luminance block is divided.
  • the luminance block and the chrominance block may have different shapes.
  • partition information for the luminance block and partition information for the chrominance block may be signaled respectively.
  • encoding information of the luminance block and the chrominance block as well as partition information may be different.
  • at least one intra encoding mode of the luminance block and the chrominance block, encoding information about motion information, and the like may be different.
  • Nodes to be divided into the smallest units can be processed as one coding block.
  • the coding block may be divided into several sub-blocks (sub-coding blocks), and the prediction information of each sub-block may be the same or different.
  • the intra prediction modes of each sub-block may be the same or different.
  • motion information of each sub-block may be identical to or different from each other.
  • each sub-block may be independently encoded or decoded.
  • Each sub-block may be identified through a sub-block index (sbIdx).
  • a coding unit when a coding unit is divided into sub-blocks, it may be divided in a horizontal or vertical direction or diagonally.
  • ISP Intra Sub Partitions
  • a mode in which the current coding block is divided into oblique lines in the inter mode is called a geometric partitioning mode (GPM).
  • GPM geometric partitioning mode
  • the position and direction of the oblique line are derived using a predetermined angle table, and index information of the angle table is signaled.
  • Picture prediction (motion compensation) for coding is performed for a coding unit (that is, a leaf node of a coding tree unit) that is not further divided.
  • a basic unit that performs such prediction is hereinafter referred to as a prediction unit or a prediction block.
  • the term unit used in this specification may be used as a substitute for the prediction unit, which is a basic unit for performing prediction.
  • the present invention is not limited thereto, and may be understood as a concept including the coding unit in a more broad sense.
  • the intra prediction unit predicts sample values of the current block by using reconstructed samples located on the left side and/or above the current block as reference samples.
  • FIG. 5 shows an example of reference samples used for prediction of a current block in intra prediction mode.
  • the reference samples may be samples adjacent to a left boundary and/or an upper boundary of the current block.
  • the size of the current block is WXH and samples of a single reference line adjacent to the current block are used for intra prediction, up to 2W+2H+1 located on the left and/or upper side of the current block Reference samples may be set using the number of neighboring samples.
  • pixels of multiple reference lines may be used for intra prediction of the current block.
  • Multiple reference lines may be composed of n lines located within a predetermined range from the current block.
  • separate index information indicating lines to be set as reference pixels may be signaled, and this may be referred to as a reference line index.
  • the intra prediction unit may obtain reference samples by performing a reference sample padding process. Also, the intra prediction unit may perform a reference sample filtering process to reduce intra prediction errors. That is, filtered reference samples may be obtained by filtering the neighboring samples and/or the reference samples obtained through the reference sample padding process. The intra predictor predicts samples of the current block using the reference samples obtained in this way. The intra predictor predicts samples of the current block using unfiltered reference samples or filtered reference samples.
  • neighboring samples may include samples on at least one reference line.
  • the neighboring samples may include neighboring samples on a line adjacent to the boundary of the current block.
  • FIG. 6 shows an embodiment of prediction modes used for intra prediction.
  • intra prediction mode information indicating an intra prediction direction may be signaled.
  • the intra prediction mode information indicates one of a plurality of intra prediction modes constituting an intra prediction mode set. If the current block is an intra prediction block, the decoder receives intra prediction mode information of the current block from the bitstream. The intra prediction unit of the decoder performs intra prediction on the current block based on the extracted intra prediction mode information.
  • the intra prediction mode set may include all intra prediction modes used for intra prediction (eg, a total of 67 intra prediction modes). More specifically, the intra prediction mode set may include a planar mode, a DC mode, and multiple (eg, 65) angular modes (ie, directional modes). Each intra prediction mode may be indicated through a preset index (ie, an intra prediction mode index). For example, as shown in FIG. 6 , an intra prediction mode index 0 indicates a planar mode, and an intra prediction mode index 1 indicates a DC mode.
  • intra prediction mode indices 2 to 66 may indicate different angular modes, respectively. The angle modes each indicate different angles within a preset angle range.
  • the angle mode may indicate an angle within an angle range between 45 degrees and -135 degrees in a clockwise direction (ie, the first angle range).
  • the angle mode may be defined based on the 12 o'clock direction.
  • the intra prediction mode index 2 indicates a horizontal diagonal (HDIA) mode
  • the intra prediction mode index 18 indicates a horizontal (HOR) mode
  • the intra prediction mode index 34 indicates a diagonal (DIA) mode.
  • an intra prediction mode index of 50 indicates a vertical (VER) mode
  • an intra prediction mode index of 66 indicates a vertical diagonal (VDIA) mode.
  • the preset angle range may be set differently according to the shape of the current block. For example, when the current block is a rectangular block, a wide-angle mode indicating an angle exceeding 45 degrees or less than -135 degrees in a clockwise direction may be additionally used. If the current block is a horizontal block, the angle mode may indicate an angle within an angular range (ie, a second angle range) between (45+offset1) degrees and (-135+offset1) degrees clockwise. At this time, angle modes 67 to 76 outside the first angle range may be additionally used.
  • the angle mode may indicate an angle within an angular range (ie, a third angle range) between (45-offset2) and (-135-offset2) degrees clockwise.
  • angle modes -10 to -1 outside the first angle range may be additionally used.
  • the values of offset1 and offset2 may be determined differently according to the ratio between the width and height of the rectangular block. Also, offset1 and offset2 may be positive numbers.
  • the plurality of angular modes constituting the intra prediction mode set may include a basic angular mode and an extended angular mode.
  • the extended angle mode may be determined based on the basic angle mode.
  • the basic angle mode is a mode corresponding to an angle used in intra prediction of an existing High Efficiency Video Coding (HEVC) standard
  • the extended angle mode corresponds to an angle newly added in intra prediction of a next-generation video codec standard. It may be a mode that More specifically, the default angular mode is the intra prediction mode ⁇ 2, 4, 6, ... , 66 ⁇ , and the extended angle mode is an intra prediction mode ⁇ 3, 5, 7, . . . , 65 ⁇ . That is, the extended angular mode may be an angular mode between basic angular modes within the first angular range. Accordingly, an angle indicated by the extended angle mode may be determined based on an angle indicated by the basic angle mode.
  • HEVC High Efficiency Video Coding
  • the basic angle mode may be a mode corresponding to an angle within a preset first angle range
  • the extended angle mode may be a wide angle mode outside the first angle range. That is, the default angle mode is the intra prediction mode ⁇ 2, 3, 4, ... , 66 ⁇ , and the extended angle mode is an intra prediction mode ⁇ -14, -13, -12, . . . , -1 ⁇ and ⁇ 67, 68, ... , 80 ⁇ .
  • An angle indicated by the extended angle mode may be determined as an angle opposite to an angle indicated by the corresponding basic angle mode. Accordingly, an angle indicated by the extended angle mode may be determined based on an angle indicated by the basic angle mode.
  • the number of expansion angle modes is not limited thereto, and additional expansion angles may be defined according to the size and/or shape of the current block.
  • the total number of intra prediction modes included in the intra prediction mode set may vary according to the configuration of the basic angular mode and the extended angular mode.
  • the interval between the extended angle modes may be set based on the interval between the corresponding basic angle modes.
  • extended angle modes ⁇ 3, 5, 7, ... , 65 ⁇ corresponds to the corresponding basic angle modes ⁇ 2, 4, 6, ... , 66 ⁇ .
  • the extended angle modes ⁇ -14, -13, . . . , -1 ⁇ the corresponding opposite fundamental angle modes ⁇ 53, 53, ... , 66 ⁇ , and the expansion angle modes ⁇ 67, 68, . . . , 80 ⁇ corresponds to the opposite fundamental angle modes ⁇ 2, 3, 4, ... , 15 ⁇ .
  • An angular interval between extended angular modes may be set to be the same as an angular interval between corresponding basic angular modes.
  • the number of extended angular modes in the intra prediction mode set may be set to be less than or equal to the number of basic angular modes.
  • the extended angle mode may be signaled based on the basic angle mode.
  • the wide-angle mode ie, the extended angle mode
  • the wide-angle mode may replace at least one angle mode (ie, the basic angle mode) within the first angle range.
  • the default angular mode that is replaced may be an angular mode that corresponds to the opposite side of the wide-angle mode. That is, the replaced basic angle mode is an angle mode corresponding to an angle in a direction opposite to the angle indicated by the wide angle mode or an angle different from the angle in the opposite direction by a predetermined offset index.
  • the preset offset index is 1.
  • the intra prediction mode index corresponding to the replaced basic angle mode may be mapped back to the wide-angle mode to signal the corresponding wide-angle mode.
  • wide-angle mode ⁇ -14, -13, ... , -1 ⁇ is the intra prediction mode index ⁇ 52, 53, ... , 66 ⁇
  • the wide-angle mode ⁇ 67, 68, . . . , 80 ⁇ is the intra prediction mode index ⁇ 2, 3, ... , 15 ⁇ , respectively.
  • the intra prediction mode index for the basic angular mode signals the extended angular mode, so even if the configurations of the angular modes used for intra prediction of each block are different, the same set of intra prediction mode indexes are used for intra prediction mode signaling. can be used Accordingly, signaling overhead according to a change in intra prediction mode configuration can be minimized.
  • whether to use the extended angle mode may be determined based on at least one of the shape and size of the current block. According to an embodiment, if the size of the current block is larger than a preset size, the extended angle mode is used for intra prediction of the current block, otherwise only the basic angle mode is used for intra prediction of the current block. According to another embodiment, when the current block is a non-square block, the extended angle mode is used for intra prediction of the current block, and when the current block is a square block, only the basic angle mode is used for intra prediction of the current block.
  • the intra prediction unit determines reference samples to be used for intra prediction of the current block and/or interpolated reference samples based on intra prediction mode information of the current block.
  • the intra prediction mode index indicates a specific angle mode
  • a reference sample corresponding to the specific angle from the current sample of the current block or an interpolated reference sample is used to predict the current pixel. Accordingly, different sets of reference samples and/or interpolated reference samples may be used for intra prediction according to the intra prediction mode.
  • the decoder restores sample values of the current block by adding the residual signal of the current block obtained from the inverse transform unit to the intra prediction value of the current block. .
  • Motion (motion) information used for inter prediction may include reference direction indication information (inter_pred_idc), reference picture indices (ref_idx_l0, ref_idx_l1), and motion (motion) vectors (mvL0, mvL1).
  • Reference picture list utilization information predFlagL0, predFlagL1 may be set according to the reference direction indication information.
  • the coding unit may be divided into several sub-blocks, and prediction information of each sub-block may be the same or different.
  • the intra prediction modes of each sub-block may be the same or different.
  • motion information of each sub-block may be identical to or different from each other.
  • each sub-block may be independently encoded or decoded.
  • Each sub-block may be identified through a sub-block index (sbIdx).
  • the motion vector of the current block is highly likely to be similar to the motion vectors of neighboring blocks. Accordingly, motion vectors of neighboring blocks may be used as motion vector predictors (mvp), and motion vectors of the current block may be derived using motion vectors of neighboring blocks.
  • mvp motion vector predictors
  • a motion vector difference (mvd) between an optimal motion vector of the current block found as an original image and a motion prediction value may be signaled by the encoder.
  • the motion vector may have various resolutions, and the resolution of the motion vector may vary on a block-by-block basis.
  • the motion vector resolution may be expressed in integer units, half-pixel units, 1/4 pixel units, 1/16 pixel units, 4 integer pixel units, and the like. Since an image such as screen content is in the form of a simple graphic such as text, an interpolation filter does not need to be applied, and thus an integer unit and an integer pixel unit of 4 may be selectively applied in block units.
  • Blocks encoded in affine mode capable of expressing rotation and scale vary greatly in shape, so integer units, 1/4 pixel units, and 1/16 pixel units can be selectively applied on a block basis.
  • Information on whether to selectively apply motion vector resolution in block units is signaled as amvr_flag. If applied, which motion vector resolution to apply to the current block is signaled by amvr_precision_idx.
  • the same or different weights between two prediction blocks may be applied when weight average is applied, and information about weights is signaled through bcw_idx.
  • a merge or advanced motion vector prediction (AMVP) method may be selectively used in units of blocks.
  • the merge method is a method of configuring the motion information of the current block to be the same as the motion information of neighboring blocks adjacent to the current block, and has the advantage of increasing the encoding efficiency of motion information by propagating motion information spatially without change in a homogeneous motion domain.
  • the AMVP method is a method of predicting motion information in L0 and L1 prediction directions, respectively, and signaling the most optimal motion information in order to express accurate motion information.
  • the decoder uses a reference block located in motion information derived from a reference picture as a prediction block for the current block.
  • a method of deriving motion information in Merge or AMVP may be a method in which a motion candidate list is constructed using prediction values of motion information derived from neighboring blocks of the current block, and then index information on an optimal motion candidate is signaled.
  • AMVP since motion candidate lists for L0 and L1 are derived, optimal motion candidate indices (mvp_l0_flag and mvp_l1_flag) for L0 and L1 are signaled.
  • merge since one motion candidate list is derived, one merge index (merge_idx) is signaled.
  • Motion candidate lists derived from one coding unit may vary, and a motion candidate index or merge index may be signaled for each motion candidate list. In this case, a mode in which there is no information about a residual block in a block encoded in the Merge mode may be referred to as a MergeSkip mode.
  • Symmetric MVD is a method of reducing the amount of bits of transmitted motion information by making Motion Vector Difference (MVD) values of L0 and L1 directions symmetrical in the case of bi-directional prediction.
  • MVD information in the L1 direction that is symmetrical with the L0 direction is not transmitted, and reference picture information in the L0 and L1 directions is not transmitted and is derived in the decoding process.
  • OBMC Overlapped Block Motion Compensation
  • merge motion candidates have low motion accuracy.
  • a Merge mode with MVD (MMVD) method may be used.
  • the MMVD method is a method of correcting motion information using one candidate selected from several motion difference value candidates.
  • Information on a compensation value of motion information obtained through the MMVD method (eg, an index indicating one selected from among motion differential value candidates) may be included in a bitstream and transmitted to a decoder.
  • the amount of bits can be saved by including the information on the compensation value of the motion information in the bitstream.
  • the TM (Template Matching) method is a method of compensating motion information by constructing a template using neighboring pixels of a current block and finding a matching area having the highest similarity with the template.
  • Template matching is a method of performing motion prediction in a decoder without including motion information in a bitstream in order to reduce the size of an encoded bitstream. In this case, the decoder may roughly derive motion information for the current block using the already reconstructed neighboring blocks since there is no original image.
  • the DMVR (Decoder-side Motion Vector Refinement) method is a method of correcting motion information through correlation of previously reconstructed reference images to find more accurate motion information. This is a method of using, as a new bi-directional motion, a point where the reference blocks in a reference picture are best matched within a predetermined area.
  • the encoder corrects motion information by performing DMVR in one block unit, then divides the block into sub-blocks and performs DMVR in each sub-block unit to correct motion information of the sub-block again.
  • MP-DMVR Multi-pass DMVR
  • the Local Illumination Compensation (LIC) method is a method of compensating for a luminance change between blocks. After deriving a linear model using neighboring pixels adjacent to the current block, the luminance information of the current block is compensated for through the linear model.
  • BDOF Bi-Directional Optical Flow
  • the motion of the current block may be corrected using the motion information derived from the BDOF of the VVC.
  • PROF Prediction refinement with optical flow
  • PROF is a technique for improving the accuracy of affine motion prediction in sub-block units to be similar to that of pixel-unit motion prediction. Similar to BDOF, PROF is a technique for obtaining a final prediction signal by calculating correction values in units of pixels for pixel values affine motion compensated in units of sub-blocks based on optical-flow.
  • the CIIP (Combined Inter-/Intra-picture Prediction) method when generating a prediction block for the current block, weights the prediction block generated by the intra-prediction method and the prediction block generated by the inter-prediction method to obtain the final prediction block. how to create
  • An intra block copy (IBC) method is a method in which a part most similar to a current block is found in an already reconstructed region within a current picture, and a corresponding reference block is used as a prediction block for the current block.
  • information related to a block vector which is a distance between the current block and the reference block, may be included in the bitstream.
  • the decoder may calculate or set a block vector for the current block by parsing information related to the block vector included in the bitstream.
  • BCW Bi-prediction with CU-level Weights
  • a multi-hypothesis prediction (MHP) method is a method of performing weight prediction through various prediction signals by transmitting additional motion information to unidirectional and bidirectional motion information during inter-screen prediction.
  • Cross-component linear model is a method of constructing a linear model using a high correlation between a luminance signal and a chrominance signal located at the same position as the luminance signal, and then predicting the chrominance signal through the linear model.
  • parameters for the linear model are derived through the template.
  • the current luminance block reconstructed according to the size of the chrominance block selectively according to the image format is downsampled.
  • the chrominance component block of the current block is predicted using the downsampled luminance component block (sample) and the corresponding linear model.
  • MMLM Multi-model Linear mode
  • Convolutional cross-component model is a method of constructing a nonlinear model using a high correlation between a luminance signal and a chrominance signal located at the same location as the luminance signal, and then predicting the chrominance signal through the nonlinear model.
  • GLM Gradient Linear Model
  • CCLM Code Division Multiple Access
  • t' k for the reconstructed coefficient t k depends only on the associated quantization index q k . That is, a quantization index for a certain reconstructed coefficient has a different value from quantization indices for other reconstructed coefficients.
  • t' k may be a value including a quantization error in t k , and may be different or the same according to quantization parameters.
  • t' k may be referred to as a reconstructed transform coefficient or an inverse quantized transform coefficient
  • a quantization index may be referred to as a quantized transform coefficient.
  • reconstructed coefficients have a characteristic of being equally spaced.
  • the distance between two adjacent restoration values may be referred to as a quantization step size.
  • 0 may be included, and the entire set of usable reconstructed values may be uniquely defined according to the size of the quantization step.
  • the quantization step size may vary depending on the quantization parameter.
  • a simple vector quantization method used in video encoding includes sign data hiding. This is a method in which the encoder does not encode the sign of one non-zero coefficient, and the decoder determines the sign of the corresponding coefficient according to whether the sum of the absolute values of all coefficients is an even number or an odd number.
  • at least one coefficient may be increased or decreased by '1', which is selected so that at least one coefficient is optimal in terms of cost for rate-distortion, and the value is can be adjusted As an example, a coefficient having a value close to the boundary of the quantization interval may be selected.
  • Another vector quantization method includes trellis-coded quantization, and in video encoding, it is used as an optimal path search technique for obtaining an optimized quantization value in dependent quantization.
  • quantization candidates for all coefficients in the block are placed in the Trellis graph, and the optimal Trellis path between the optimized quantization candidates is considered at the cost of rate-distortion.
  • dependent quantization applied to video encoding may be designed such that a set of allowable reconstructed transform coefficients for a transform coefficient depends on the value of a transform coefficient that precedes the current transform coefficient in the reconstruction order. In this case, by selectively using a plurality of quantizers according to transform coefficients, an average error between an original image and a reconstructed image is minimized, thereby increasing coding efficiency.
  • the MIP (Matrix Intra Prediction) method is a matrix-based intra prediction method. Unlike prediction methods that have directionality from pixels of neighboring blocks adjacent to the current block, the MIP (Matrix Intra Prediction) method is a matrix-based matrix in which pixels on the left and top of neighboring blocks are predefined. This is a method of obtaining a prediction signal using the offset value and .
  • the decoder may generate a prediction template for a template using neighboring pixels (references) adjacent to the template, and may use an intra prediction mode in which a prediction template most similar to a previously reconstructed template is generated to reconstruct a current block. This method may be referred to as template intra mode derivation (TIMD).
  • TMD template intra mode derivation
  • an encoder may determine a prediction mode for generating a prediction block and generate a bitstream including information about the determined prediction mode.
  • the decoder may set the intra prediction mode by parsing the received bitstream.
  • the amount of bits of information about the prediction mode may be about 10% of the size of the entire bitstream.
  • the encoder may not include information about the intra prediction mode in the bitstream. Accordingly, the decoder may derive (determine) an intra prediction mode for reconstruction of the current block using characteristics of neighboring blocks, and may reconstruct the current block using the derived intra prediction mode.
  • the decoder infers directional information by applying Sobel filters in horizontal and vertical directions to neighboring pixels (pixels) adjacent to the current block, and converts the directional information into the intra prediction mode.
  • a mapping method can be used.
  • a method in which a decoder derives an intra prediction mode using neighboring blocks may be described as decoder side intra mode derivation (DIMD).
  • FIG. 7 is a diagram illustrating positions of neighboring blocks used to construct a motion candidate list in inter prediction.
  • Neighboring blocks may be spatially positioned blocks or temporally positioned blocks. Neighboring blocks that are spatially adjacent to the current block are Left (A1) blocks, Left Below (A0) blocks, Above (B1) blocks, Above Right (B0) blocks, or Above Left (Above Left) blocks. , B2) may be at least one block.
  • a neighboring block temporally adjacent to the current block may be a block including a position of an upper left pixel of a bottom right (BR) block of the current block in a collocated picture.
  • TMVP Temporal Motion Vector Predictor
  • sbTMVP sub-block temporal motion vector predictor
  • slice type information eg, I slice, P slice, or B slice
  • slice type information eg, I slice, P slice, or B slice
  • whether it is a tile, whether it is a sub picture the size of the current block, the depth of the coding unit, and the current block. It may be determined based on at least one of information about whether the luminance block is a chrominance block, whether it is a reference frame or a non-reference frame, a temporal layer according to a reference order, and a layer.
  • Information used to determine whether or not the methods described in this specification will be applied may be information previously agreed upon between the decoder and the encoder. Also, these pieces of information may be determined according to profiles and levels.
  • Such information may be expressed as a variable value, and information on the variable value may be included in a bitstream. That is, the decoder may determine whether the above-described methods are applied by parsing information on variable values included in the bitstream. For example, whether the methods described herein are to be applied may be determined based on a horizontal length or a vertical length of a coding unit. If the horizontal length or the vertical length is 32 or more (eg, 32, 64, 128, etc.), the above methods can be applied. In addition, the methods described in this specification may be applied when the horizontal or vertical length is less than 32 (eg, 2, 4, 8, or 16). In addition, when the horizontal length or the vertical length is 4 or 8, the methods described in this specification may be applied.
  • the residual signal may be a signal for a difference between an original signal and a prediction signal generated through inter-prediction or intra-prediction.
  • Energy for the residual signal may be distributed over the entire pixel domain. Therefore, when the decoder encodes the pixel value itself of the residual signal, compression efficiency may decrease. Accordingly, a process of concentrating the energy of the residual signal of the pixel domain into a low-frequency region of the frequency domain using transform coding is required.
  • DCT-II discrete cosine transform type-II
  • DST-VII discrete sine transform type-VII
  • FIG. 8 is a diagram showing how CCLM is performed according to an embodiment of the present specification.
  • a template may be configured using a restored block among neighboring blocks adjacent to the current block.
  • a video signal processing device eg, decoder or encoder
  • a luminance component block (sample) reconstructed according to the size of the chrominance component block may be selectively downsampled.
  • the video signal processing apparatus may predict the chrominance component block (sample) of the current block using the downsampled luminance component block (sample) and the linear model.
  • two or more linear models may be used, and a method in which two or more linear models are used may be described as a multi-model linear mode (MMLM).
  • MMLM multi-model linear mode
  • FIG. 9 is a diagram illustrating a template used for deriving a linear model according to an embodiment of the present specification.
  • the video signal processing apparatus may derive parameters for a linear model using only some of neighboring samples adjacent to the current block.
  • a part represented in dark gray in FIG. 9 may be a position of a sample used for deriving parameters for a linear model.
  • the chrominance component block is 1/4 the size of the luminance component block. Accordingly, for 1:1 matching between the luminance component sample and the chrominance component sample, the downsampled luminance component sample may be used to derive parameters for the linear model.
  • Two types of filters can be used to derive the downsampled luminance component samples.
  • the encoder may obtain a bitstream including filter type information about which type of filter is used.
  • Type 1 of FIG. 9 is a method of deriving a center luminance component sample among upper samples using six samples.
  • the video signal processing apparatus may generate a downsampled luminance component sample by applying type 1 to position A in FIG. 9 .
  • Type 2 of FIG. 9 is a method of deriving a luminance component sample at a center position among 5 samples using 5 samples.
  • the video signal processing apparatus may generate a downsampled luminance component sample by applying type 2 to position C.
  • the template used to derive the parameters for the linear model may consist of downsampled luminance component samples. A method of configuring a template will be described below.
  • the video signal processing apparatus may configure a template with down-sampled luma component samples by referring to samples in the current luma component block.
  • the upper three samples may be samples of neighboring blocks adjacent to the current block, and the lower three samples 901 are the current block. It may be a sample of a reconstructed luma component block within a block.
  • the position of the finally generated luminance component sample may be a hatched position 902 of B in FIG. 9 .
  • type 2 is used at location D in FIG. 9 to generate downsampled luminance component samples. That is, the X position sample 903 of D of FIG.
  • the position of the finally generated luminance component sample may be a hatched position 904 of D in FIG. 9 .
  • the video signal processing apparatus may configure a template with downsampled luma component samples by referring only to samples of neighboring blocks excluding samples within the current luma component block. Referring to position B of FIG. 9, when type 1 is used to generate downsampled luma component samples, the video signal processing apparatus only uses the upper three samples (ie, excluding the reconstructed luma component sample 901 in the current block). ) to obtain a downsampled luminance component sample and construct a template. In this case, the position of the finally generated luminance component sample may be a hatched position 902 of B in FIG. 9 . The same is true when type 2 is used at location D in FIG. 9 to generate downsampled luminance component samples.
  • the video signal processing apparatus downsamples the luminance component sample using the remaining 4 samples (surrounding samples adjacent to the current block) excluding the sample in the current luminance component block (the X position sample 903 in D of FIG. 9). can be obtained, and the template can be configured.
  • the position of the finally generated luminance component sample may be a hatched position 904 of D in FIG. 9 .
  • the video signal processing apparatus may generate a downsampled luminance sample using three consecutive lines including one line adjacent to the current block.
  • the video signal processing apparatus may configure a template using only one line closest to the current block to save memory on the line buffer.
  • Samples of one adjacent line (line 1) may be padded with a second line and a third line so that type 1 and type 2 filters may be applied.
  • the second and third lines may be padded with a value to which an arbitrary weight is applied to the samples of the first line.
  • samples existing at positions with good efficiency may be included in the template.
  • the template may include samples with good efficiency among left and upper neighboring samples of the current block.
  • the encoder may obtain a bitstream including information about which samples are included.
  • the decoder may construct a template by parsing information on which samples are included. A method of signaling by including information on which samples are included in a bitstream has a problem of increasing the amount of bits.
  • a method of implicitly determining which samples are included in the template will be described.
  • Positions of samples included in the template may be determined based on the intra prediction direction mode of the current block. That is, when the intra prediction directional mode is a direction close to the upper samples of the current block or a predetermined first mode, only the upper samples may be included in the template. When the intra prediction directional mode is a direction close to the left samples of the current block or an arbitrary second mode, only the left samples may be included in the template.
  • the first mode may be an intra prediction directional mode corresponding to an index greater than 50.
  • the second mode may be an intra prediction directional mode corresponding to an index smaller than 18.
  • the template may include both upper samples of the current block and left samples of the current block.
  • a template may be constructed by comparing a quantization parameter value used when reconstructing a neighboring block adjacent to the left side of the current block with a quantization parameter value used when reconstructing a neighboring block adjacent to the upper side of the current block. For example, samples of neighboring blocks using a smaller quantization parameter value among the quantization parameter value used when reconstructing a neighboring block adjacent to the left of the current block and the quantization parameter value used when reconstructing a neighboring block adjacent to the upper side of the current block are included.
  • a template may be configured.
  • a template including samples of neighboring blocks using a larger quantization parameter value among the quantization parameter value used when reconstructing a neighboring block adjacent to the left of the current block and the quantization parameter value used when reconstructing a neighboring block adjacent to the upper side of the current block. can be configured.
  • the samples of the neighboring block adjacent to the left of the current block and the current block A template including samples of neighboring blocks adjacent to an upper side of the block may be configured.
  • the left side of the current block A template including samples of neighboring blocks adjacent to the current block and samples of neighboring blocks adjacent to the upper side of the current block may be configured.
  • samples included in the template may be determined by comparing the size of the current block (eg, the product of the width and height of the current block (ie, the number of samples)) with a specific value. When the size of the current block is smaller than a specific value, left neighboring samples of the current block and upper neighboring samples of the current block may be included in the template. Conversely, if the size of the current block is equal to or greater than a specific value, left neighboring samples of the current block and upper neighboring samples of the current block may be included in the template.
  • the specific value is a value determined based on the sum of horizontal and vertical sizes of the current block, and may be an integer of 1 or more.
  • samples included in the template may be determined according to the ratio of the horizontal and vertical lengths of the current block. For example, when the horizontal length of the current block is longer than the vertical length, left (or upper) neighboring samples of the current block may be included in the template. Conversely, when the horizontal length of the current block is shorter than the vertical length, upper (or left) neighboring samples of the current block may be included in the template. When the horizontal length and the vertical length of the current block are the same, left neighboring samples and upper neighboring samples of the current block may be included in the template.
  • the template may be determined based on whether CCLM and MMLM are applied to the left and upper neighboring blocks of the current block. Samples of blocks to which CCLM and MMLM are applied may be included in the template. For example, when CCLM and MMLM are not applied to a left neighboring block of the current block and CCLM and MMLM are applied to an upper neighboring block of the current block, upper neighboring samples of the current block may be included in the template.
  • samples included in the template may be determined based on the number of reference sample padding performed. For example, if the number of samples for which reference sample padding is performed among the samples of the left neighboring block of the current block is greater than or equal to a specific number, the left neighboring sample of the current block may not be included in the template. That is, the upper neighboring samples of the current block may be included in the template. Similarly, if the number of samples for which reference sample padding is performed among samples of upper neighboring blocks of the current block is greater than or equal to a specific number, the upper neighboring samples of the current block may not be included in the template. That is, samples around the left side of the current block may be included in the template. In this case, the specific number may be an integer of 1 or more.
  • CCLM and MMLM may not be applied to the current block.
  • the decoder may set CCLM and MMLM not to be used in the current block without parsing information related to CCLM and MMLM in the current block.
  • a linear model for predicting the chrominance component block of the current block is formed in advance. It may be a linear model to which defined basic parameters are applied. This is because it is difficult to derive a linear model when the number of samples is small.
  • the arbitrary number and the specific size may be an integer of 1 or more.
  • CCLM and MMLM may not be applied to the current block.
  • the decoder does not parse information related to CCLM and MMLM in the current block, and CCLM and MMLM are not used in the current block can be set to
  • Neighboring samples of the current block included in the template may be samples before deblocking filtering is applied.
  • LMCS Luma Mapping with Chroma Scaling
  • the video signal processing apparatus may derive parameters for a linear model using a template.
  • One or more linear models may be used per block, and information on how many linear models are to be used per block may be included in the bitstream.
  • the decoder parses information about how many linear models are to be used for each block and can use it to derive linear models for the current block.
  • a method for deriving a linear model may include a Least-Mean-Square (LMS) method and a min/max method.
  • LMS Least-Mean-Square
  • the video signal processing device obtains values for two smaller samples (X 0 A , X 1 A ) and values for two larger samples (X 0 B , X 1 B ) is determined first.
  • the video signal processing apparatus uses the luminance sample values (Y 0 A , Y 1 A , Y 0 B , Y 1 B ) corresponding to the four samples of pre-arranged positions in the template, respectively, to average the small values.
  • (X a , Y a ) and the average of large values (X b , Y b ) can be derived.
  • Equation 1 may be used to derive the average of small values (X a , Y a ) and the average of large values (X b , Y b ).
  • X a may be an average of values (X 0 A , X 1 A ) of two smaller samples among 4 samples at a prearranged position in the template.
  • Y a is the number of averages of Y 0 A and Y 1 A , which are the values of the luminance samples respectively corresponding to the values (X 0 A , X 1 A ) of the smaller 2 samples among the 4 samples at prearranged locations in the template. there is.
  • X b may be an average of values (X 0 B , X 1 B ) of two large samples out of four samples at prearranged locations in the template.
  • Y b is the number of averages of Y 0 B and Y 1 B , which are the values of luminance samples respectively corresponding to the values (X 0 B , X 1 B ) of the larger 2 samples among the 4 samples at prearranged locations in the template.
  • the video signal processing apparatus may calculate the linear model parameters ⁇ and ⁇ using Equation 2.
  • the video signal processing apparatus may predict the chrominance block by calculating each sample value (pred c ) of the chrominance block using the linear model parameters ( ⁇ , ⁇ ) and the (downsampled) luminance sample value (rec L ').
  • Each sample value of the color difference block may be calculated as in Equation 3.
  • (i, j) in Equation 3 may mean coordinates when the coordinates of the top-left sample of the current block are (0, 0). That is, pred c (i, j) may mean the sample value of the color difference block at the position (i, j).
  • the video signal processing apparatus may calculate the linear model parameters ⁇ and ⁇ according to Equations 4 and 5 according to the LMS method.
  • Rec C (i) and Rec' L (i) in Equations 4 and 5 mean the values of the chrominance sample and the downsampled luminance sample in the template, respectively, and I means the number of samples in the template.
  • the sample in the template may be a sample at a position indicated in gray in FIG. 9 .
  • the video signal processing apparatus may predict the color difference block by calculating each sample value (pred c ) of the color difference block by applying ⁇ and ⁇ obtained through Equations 4 and 5 to Equation 3. ⁇ can be expressed as a fraction.
  • the video signal processing apparatus may use two or more linear models instead of only one linear model. That is, the video signal processing apparatus may mix and use a conventional CCLM mode using only one linear model and an MMLM mode using two or more linear models.
  • information related to whether the CCLM mode or the MMLM mode is used may be included in the bitstream, and whether the CCLM mode or the MMLM mode is used may be determined in units of CUs.
  • FIG. 10 is a diagram illustrating a method of deriving two linear models according to an embodiment of the present specification.
  • the video signal processing apparatus may select samples for deriving two linear models using one template.
  • the sample may be selected based on a threshold value.
  • the threshold may be an average value of the restored luminance component samples in the template or a value obtained using the same.
  • Two linear models using the threshold may be as shown in Equation 6.
  • [x, y] in Equation 6 may mean coordinates when the coordinates of the top-left sample of the current block are (0, 0). That is, Pred c [x, y] may mean the sample value of the color difference block at the (x, y) position.
  • Rec' L (i) may mean a down-sampled luminance sample in the template.
  • the video signal processing apparatus may acquire (calculate) an average value of luminance component samples in the template and an average value of chrominance component samples in the template.
  • the average value of the luminance component samples and the average value of the chrominance component samples may be average values of scaled samples in a range determined based on the number of samples of each template. This is to more accurately distinguish the two linear models.
  • An average value of luma samples in the template may be calculated using downsampled luma samples or luma samples before downsampling.
  • the decoder parses information indicating which sample is used among the downsampled luminance samples included in the bitstream and the luminance samples before downsampling, and adaptively downsampled luminance samples and luminance components before downsampling. It is possible to determine/set which of the samples is used. Parameters for linear models can be set to default values.
  • ⁇ 1 and ⁇ 2 may be set to 0, and ⁇ 1 and ⁇ 2 may be set to half of the maximum value of the range of the current video format.
  • ⁇ 1 and ⁇ 2 may be set to 128.
  • a shift value for restoring the scaled value to its original value may be set to '0'.
  • two linear models set as the basic parameters may be selected. Any given number may be an integer greater than or equal to 1, for example 4.
  • chrominance samples located at the same position as each of the luminance samples may be divided into two groups.
  • the number of samples in each group may be a multiple of 2. If it is not a multiple of 2, the video signal processing apparatus may perform padding using neighboring samples so that the number of samples in each group is a multiple of 2. If the number of samples in each group is smaller than a predetermined number, padding may not be performed.
  • the video signal processing apparatus may calculate parameters for the linear model for each group using Equations 4 and 5. When the number of samples in each group is less than a predetermined number, a difference value obtained by subtracting the average value of luminance component samples in the template from the average value of chrominance component samples in the template may be the parameter ⁇ for the linear model. Also, when the number of samples in each group is smaller than a predetermined number, only one linear model may be derived and used. Any given number may be an integer greater than or equal to 1, for example 4.
  • the video signal processing apparatus may use a method described below to derive parameters for a more accurate linear model.
  • a threshold for deriving the linear model may be obtained (calculated) based on an average value of reconstructed luma component samples in the current block instead of an average value of luma component samples in templates of neighboring blocks adjacent to the current block.
  • the threshold for deriving the linear model may be obtained (calculated) based on a value obtained by averaging the average value of the restored luma component samples in the current block and the average value of the luma component samples in the template.
  • an average value of the reconstructed luma component samples in the current block may be an average value of samples of the downsampled luma component block.
  • the threshold for deriving the linear model may be obtained (calculated) based on an average value of chrominance component samples in the template instead of an average value of luminance component samples in the template.
  • two linear models for each of the two color difference components (Cb component and Cr component) may be derived.
  • An average value of each color difference component sample in the template may be used to derive a linear model for each color difference component.
  • Thresholds for applying two linear models to the reconstructed luminance component samples in the current block may be classified into two using the average value of chrominance component samples in the template.
  • the encoder may obtain a bitstream including information about the threshold.
  • the decoder can obtain a threshold for deriving two linear models by parsing information about the threshold.
  • the information on the threshold may directly indicate the threshold.
  • the information on the threshold may indicate an index of a preset table. That is, a table for thresholds respectively mapped to one or more indexes is set in advance, and information on the thresholds may indicate any one of the one or more indexes.
  • the decoder may use a threshold corresponding to an index indicated by information on the threshold.
  • Thresholds included in the table may include predefined values or thresholds used in neighboring blocks. Thresholds included in the table may be a predetermined number (eg, one or more) of thresholds, and may be configured through a first in, first out (FIFO) format.
  • the table may be configured in such a way that threshold values used for neighboring blocks of the current block are included in the table.
  • Information on the threshold may be signaled in units of each block, and the threshold may be applied in units of each block. In this case, information on each block unit may be included in the bitstream and signaled.
  • the decoder may set a threshold for each block by parsing information on a block basis.
  • the decoder may predict the chroma component block using one linear model. This is because the current block is highly likely to be a block that changes linearly.
  • the decoder can predict the chroma component block using one or two linear models. there is.
  • the decoder uses syntax elements related to CCLM and MMLM (for example, information about thresholds, whether CCLM mode is used or MMLM mode is used, information about how many linear models will be used per block, etc.) Parsing of can be determined based on the reference line index.
  • the decoder may not parse syntax elements related to CCLM and MMLM if the reference line index is greater than or equal to 1.
  • the decoder can infer that CCLM using one linear model is used for prediction of a chrominance component block if the reference line index is greater than or equal to 1.
  • Syntax related to CCLM and MMLM (e.g., information about thresholds, whether CCLM mode or MMLM mode is used, how many linear models are used per block, etc.) is included in the bitstream It may not be. If the reference line index is 0, then the encoder has syntax elements related to CCLM and MMLM (e.g., information about the threshold, whether CCLM mode or MMLM mode is used, how many linear models are used per block, information, etc.) may be obtained. When the reference line index is 0, the decoder may parse syntax elements related to CCLM and MMLM. iii) The number of linear models for predicting the chrominance component block may be determined based on the size of the current block.
  • the decoder may predict the chrominance component block using one linear model.
  • the decoder divides the current block into a plurality of subblocks and predicts a color difference component block by applying a linear model to each of the plurality of subblocks.
  • a template for deriving a linear model of each sub-block may include reconstructed samples of neighboring blocks located closest to the corresponding sub-block. For example, as shown in FIG. 9 , a current block may be divided into 4 sub-blocks.
  • the decoder may derive a linear model for the first sub-block using both the left and top templates.
  • the decoder can derive a linear model for the second sub-block using the upper template.
  • the decoder can derive a linear model for the third sub-block using the left template.
  • the decoder may derive a linear model for the 4th sub-block using an upper template used to derive a linear model for the 2nd sub-block and a left template used to derive a linear model for the 3rd sub-block. there is.
  • the number of linear models for predicting the chrominance component block is selected from among the intra prediction mode of the current luminance component block, the coefficient distribution of the residual block of the current luminance component block, the quantization parameter of the current block, and the use of CCLM and MMLM of neighboring blocks. It can be determined based on at least one or more. For example, when one or more blocks to which MMLM is applied exist among neighboring blocks of the current block, MMLM may be applied to the current block as well. Also, if CCLM is applied to all neighboring blocks of the current block, CCLM may be applied to the current block. vi) The decoder may acquire a new linear model based on the two linear models for the current block signaled to apply MMLM.
  • the decoder resets the current block so that the CCLM mode is applied and predicts the color difference component block using one new linear model.
  • the decoder may obtain two linear models for the current block, and obtain a new one linear model based on the similarity of parameter values of the two linear models.
  • the similarity of parameter values for the two linear models may be determined based on at least one of the similarity between ⁇ 1 and ⁇ 2 and the similarity between ⁇ 1 and ⁇ 2 in Equation 6. If the difference between the absolute value of the similarity between ⁇ 1 and ⁇ 2 and the absolute value of the similarity between ⁇ 1 and ⁇ 2 is less than an arbitrary value (eg, an integer greater than or equal to 1), the parameter values for the two linear models are similar. may be judged to be Since there are two color difference components (ie, a Cb component and a Cr component), the number of linear models may vary for each of the two color difference components.
  • the same intra prediction directivity mode may be applied to two color difference components.
  • the same number of linear models may be applied to the two color difference components.
  • each intra-prediction mode may be signaled for each color difference component, and the number of linear models applied to each color difference component may also vary.
  • a horizontal intra-screen mode may be applied to the Cb color difference component, and a prediction mode using two linear models may be applied to the Cr color difference component.
  • information on whether LM mode (CCLM or MMLM) is applied to two color difference components may be signaled, and information on whether CCLM or MMLM mode is applied to each color difference component may be additionally signaled.
  • the video signal processing apparatus may use two intra prediction directional modes to generate a luminance prediction block in the TIMD mode.
  • the TIMD coding mode may be useful for blocks where directional characteristics do not clearly exist. That is, if the TIMD mode is applied to the current block, the intra prediction mode of the chrominance component block of the current block may be implicitly set to CCLM or MMLM mode. In this case, information on whether CCLM or MMLM is applied to the chrominance component block of the current block may be signaled. In this case, information on whether CCLM or MMLM is applied to each color difference component block may be included in a bitstream and signaled.
  • the decoder may determine the mode applied to each chrominance component block by parsing information on whether CCLM or MMLM is applied. Alternatively, information on whether CCLM or MMLM is applied to each chrominance component block may not be separately signaled. At this time, the decoder implicitly sets that MMLM is applied to each color-difference component block, and uses the above-described method (method of acquiring one new linear model based on similarity of parameter values for two linear models). It can be reset by applying CCLM to the color difference component block. These methods may be applied not only to blocks encoded in TIMD mode, but also to blocks encoded in MIP and DIMD modes.
  • the decoder may generate a prediction block using the two intra prediction directional modes, and then perform a weight average of each prediction block to generate a final prediction luminance block.
  • the decoder may generate a reconstructed luma block by summing the final predicted luma block with the residual block.
  • the decoder must perform CCLM or MMLM using the reconstructed luminance block to generate the chrominance component block. This method has a problem that the processing speed is slow due to the large number of processing steps.
  • a decoder may generate a chrominance block by applying CCLM or MMLM to a final predicted luminance block rather than a reconstructed luminance block.
  • a method of generating a chrominance block by applying CCLM or MMLM to a final predicted luminance block may be less accurate than a method of generating a chrominance block by applying CCLM or MMLM to a reconstructed luminance block. Accordingly, information on whether to apply CCLM or MMLM to the final predicted luminance block or to apply CCLM or MMLM to the reconstructed luminance block may be included in the bitstream and signaled.
  • the decoder parses information on whether to apply CCLM or MMLM to the final predicted luminance block included in the bitstream or to apply CCLM or MMLM to the restored luminance block to determine a block to which CCLM or MMLM is applied. .
  • the intra prediction directional mode applied to the chrominance component block may be a derived mode or direct mode (DM) mode, an explicit mode (EM) mode, or a linear model (LM) mode.
  • the DM mode may be a mode in which an intra prediction directional mode of a luminance component block is used as an intra prediction directional mode of a chrominance component block.
  • the EM mode may be a mode in which an intra prediction directional mode of a chrominance component block is designated as one of a planar mode, a DC mode, a horizontal mode, and a vertical mode.
  • the EM mode may be set so that the intra-prediction directivity mode of the chrominance component block is not the same as the intra-prediction directivity mode of the luma component block.
  • the EM mode can be described as non-direct mode.
  • the LM mode is a mode for predicting a chrominance component block using a restored luminance component block and a linear model, and has characteristics different from conventional angular modes and non-angular modes (Planar mode and DC mode).
  • FIG. 11 is a diagram illustrating a method of signaling an intra prediction directional mode for a chrominance component block according to an embodiment of the present specification.
  • a method of signaling an intra prediction directional mode for a chrominance component block of a current block will be described.
  • whether the LM mode is applied on the prediction of the chrominance component block may be signaled first.
  • information on whether the DM mode and/or the EM mode are applied may be signaled.
  • the LM mode is applied to predict the chrominance component block
  • information related to whether the CCLM mode or MMLM mode is applied to predict the chrominance component block and information about a template for deriving a linear model may be signaled.
  • information on the template may be information on whether the template includes left samples, upper samples, or both the left sample and the upper samples of the current block.
  • information on the template may be information on whether the template includes left samples, upper samples, or both the left sample and the upper samples of the current block.
  • the decoder determines whether the LM mode is applied for prediction of the chrominance component block by parsing a syntax element (lm_flag) indicating whether the LM mode is applied for prediction of the chrominance component block.
  • a syntax element lm_flag
  • lm_flag a syntax element indicating whether the LM mode is applied for prediction of the chrominance component block.
  • a value of lm_flag of 1 indicates that the LM mode is applied, and a value of lm_flag of 0 indicates that the LM mode is not applied.
  • lm_flag indicates that LM mode is not applied for prediction of chrominance component blocks (eg, the value of lm_flag is 0)
  • the decoder determines whether EM mode and/or DM mode is applied for prediction of chrominance component blocks. information about can be parsed.
  • lm_flag indicates that LM mode is applied for prediction of color-difference component blocks (for example, if the value of lm_flag is 1)
  • the decoder uses a syntax element (mmlm_flag) indicating whether MMLM mode is used for prediction of color-difference component blocks. can be parsed. A value of mmlm_flag of 1 indicates that MMLM mode is used, and a value of mmlm_flag of 0 indicates that CCLM mode is used.
  • the decoder may additionally parse a syntax element (template_idx) indicating which template is used. For example, if the value of template_idx is 1, the left samples and the upper samples of the current block may be included in the template, and the video signal processing apparatus may derive a linear model using the left samples and the upper samples of the current block. there is. If the value of template_idx is 00, the left samples of the current block may be included in the template, and the video signal processing apparatus may derive a linear model using only the left samples of the current block.
  • template_idx syntax element
  • templates above the current block may be included in the template, and the video signal processing apparatus may derive a linear model using only samples above the current block. If the value of mmlm_flag is 0, it may indicate that the CCLM mode is used for prediction of the chrominance component block. In this case, the video signal processing apparatus may parse template_idx and predict a chrominance component block based on samples indicated by template_idx.
  • the decoder can parse lm_flag. If lm_flag indicates that LM mode is not used for prediction of color-difference component blocks (for example, if lm_flag has a value of 0), the decoder determines whether EM mode and/or DM mode are applied for prediction of color-difference component blocks. information can be parsed.
  • lm_flag indicates that the LM mode is applied for prediction of color-difference component blocks (eg, when the value of lm_flag is 1)
  • the decoder may parse mmlm_flag. If mmlm_flag indicates that MMLM mode is used for prediction of the color-difference component block (for example, if the value of mmlm_flag is 1), template_idx is not parsed, and the value of template_idx is the left samples and the upper side of the current block for linear model derivation. A value (eg, 1) indicating that samples are used may be inferred. This is because in MMLM mode, it is more efficient to use left samples and top samples.
  • the decoder can additionally parse template_idx. For example, if the value of template_idx is 1, the left samples and the upper samples of the current block may be included in the template, and the video signal processing apparatus may derive a linear model using the left samples and the upper samples of the current block. there is. If the value of template_idx is 00, the left samples of the current block may be included in the template, and the video signal processing apparatus may derive a linear model using only the left samples of the current block.
  • templates above the current block may be included in the template, and the video signal processing apparatus may derive a linear model using only samples above the current block.
  • the value of mmlm_flag is 1, the intra prediction mode of the current luma component block, the size of the coding block, the characteristics of the residual block, the quantization parameter, whether the CCLM mode and / or MMLM mode is used for the neighboring block, the reference line index Using at least one of them, whether or not to parse template_idx may be determined, or the value of template_idx may be inferred as an arbitrary value.
  • template_idx is not parsed, and the values of template_idx are left samples and top samples of the current block for linear model derivation. may be inferred as a value (e.g., 1) indicating that they are used.
  • the decoder may parse lm_flag.
  • lm_flag indicates that the LM mode is not applied (eg, if the value of lm_flag is 0)
  • the decoder can parse information on whether the EM mode and/or the DM mode are applied. If lm_flag indicates that LM mode is applied (eg, if the value of lm_flag is 1), the decoder can parse template_idx.
  • the left samples and the upper samples of the current block may be included in the template, and the video signal processing apparatus may derive a linear model using the left samples and the upper samples of the current block.
  • the value of template_idx is 00
  • the left samples of the current block may be included in the template, and the video signal processing apparatus may derive a linear model using only the left samples of the current block.
  • the value of template_idx is 01
  • samples above the current block may be included in the template, and the video signal processing apparatus may derive a linear model using only samples above the current block.
  • the decoder since the syntax element for which mode of the CCLM mode or the MMLM mode is used is not parsed, the decoder derives two linear models for the CCLM mode and the MMLM mode, and the two linear models Based on the similarity to the model, a mode (CCLM mode or MMLM mode) applied for prediction of a chrominance block may be determined.
  • FIGS. 12 and 13 are diagrams illustrating a context model according to an embodiment of the present specification.
  • mmlm_flag and template_idx may be entropy coded using context adaptive binary arithmetic coding (CABAC).
  • CABAC context adaptive binary arithmetic coding
  • the context model for mmlm_flag and template_idx can be defined as values obtained through experiments (see FIGS. 12 and 13).
  • InitValue in FIGS. 12(a) and 13(a) represents context models for mmlm_flag and context models for template_idx, respectively. shiftIdx can be used when updating the probability for mmlm_flag and template_idx.
  • initValue may be determined according to the type of the current slice. That is, initValue may be determined according to whether the current slice is an I slice, a P slice, or a B slice. 12(b) and 13(b) show context models that can be used according to each slice type. Referring to FIG. 12(b), the initialization type (initType) of mmlm_flag may be determined according to the current slice type, and initValue may be determined according to the initialization type.
  • the initialization type (initType) of template_idx may be determined according to the current slice type, and initValue may be determined according to the initialization type.
  • the value of initType may be 0 to 2.
  • the value of initType may be 3 to 5.
  • the value of initType may be 6 to 8.
  • the value of initType determined according to the slice type may be the same as the value of ctxIdx of mmlm_flag in FIG. 12(a) and the value of ctxIdx of template_idx in FIG. 13(a).
  • initValue may be determined as a value corresponding to FIGS. 12(a) and 13(a) according to the value of initType determined according to each type of the current slice.
  • initType may be determined as one value.
  • the value of initType may be 0.
  • the value of initType may be 3.
  • the value of initType may be 6.
  • initValue may be determined as a value corresponding to FIG. 12(a) according to the value of initType, which is determined as one value according to each type of the current slice. For example, if the value of initType is 0, the value of ctxIdx of mmlm_flag may be 0, the value of initValue may be 20, and the value of shiftIdx may be 4 according to FIG. 12(a).
  • the value of initType is 0, the value of ctxIdx of template_idx may be 0, the value of initValue may be 17, and the value of shiftIdx may be 1 according to FIG. 13(a). If the value of initType is 3, the value of ctxIdx of mmlm_flag may be 3, the value of initValue may be 35, and the value of shiftIdx may be 4 according to FIG. 12(a). If the value of initType is 3, the value of ctxIdx of template_idx may be 3, the value of initValue may be 0, and the value of shiftIdx may be 1 according to FIG. 13(a).
  • initType the value of ctxIdx of mmlm_flag may be 6, the value of initValue may be 38, and the value of shiftIdx may be 4 according to FIG. 12(a). If the value of initType is 6, the value of ctxIdx of template_idx may be 6, the value of initValue may be 0, and the value of shiftIdx may be 1 according to FIG. 13(a).
  • initType may be selectively applied for each slice.
  • the order of using initType values may vary according to the value of sh_cabac_init_flag defined in the slice header.
  • the value of initType may be 6.
  • the value of sh_cabac_init_flag is 1 and the type of the current slice is B slice
  • the value of initType may be 3.
  • the value of sh_cabac_init_flag is 0 and the type of the current slice is P slice
  • the value of initType may be 3.
  • the value of sh_cabac_init_flag is 0 and the current slice type is B slice
  • the value of initType may be 6.
  • the video signal processing device selects the symbol of mmlm_flag to be currently coded or parsed among several context models, such as the intra prediction mode of the current luminance component block, the horizontal or vertical size of the coding block (or the horizontal and vertical ratio, or the horizontal and vertical difference, etc.) ), quantization parameter, whether CCLM and / or MMLM are used for neighboring blocks, characteristics of residual blocks (information whether residual signals are present in luminance component blocks, position information of the last transform coefficient), motion information differential values, and reference line indexes, at least You can select using more than one.
  • context models such as the intra prediction mode of the current luminance component block, the horizontal or vertical size of the coding block (or the horizontal and vertical ratio, or the horizontal and vertical difference, etc.) ), quantization parameter, whether CCLM and / or MMLM are used for neighboring blocks, characteristics of residual blocks (information whether residual signals are present in luminance component blocks, position information of the last transform coefficient), motion information differential values, and reference line indexes, at least You can
  • the video signal processing apparatus may select a context index of a symbol of mmlm_flag based on mmlm_flag information of neighboring blocks of the current block.
  • the mmlm_flag information may mean a value of mmlm_flag.
  • the value of mmlm_flag can be 0 or 1. If the value of mmlm_flag is 0, it indicates that MMLM is not used in the corresponding block, and if the value of mmlm_flag is 1, it can indicate that MMLM is used in the corresponding block.
  • the context index of the mmlm_flag symbol may be determined through the sum of mmlm_flag information of a left neighboring block adjacent to the current block and mmlm_flag information of an upper neighboring block adjacent to the current block. That is, the context index may have a value of 0 to 2. At this time, if the neighboring block is in an unusable position, 0 may be added to the context index.
  • the video signal processing apparatus may select a context index of a symbol of mmlm_flag based on the size of the current block. For example, if the size of the current block is larger than the first value, the context index may be 2, and if the size of the current block is smaller than the second value, the context index may be 0, and the size of the current block is The context index may be 1 when it is equal to or greater than the second value and equal to or less than the first value.
  • the first value and the second value are preset values, and the first value may be 32 x 32, and the second value may be 16 x 16. Also, the first value and the second value may be set based on the sum of horizontal and vertical sizes of the current block.
  • the video signal processing apparatus may select the context index of the mmlm_flag symbol based on the difference between the horizontal and vertical sizes of the current block.
  • the context index may be 0. If the horizontal size of the current block is greater than the vertical size, the context index may be 1. If the horizontal size of the current block is smaller than the vertical size, the context index may be 2.
  • the video signal processing apparatus may perform binary arithmetic encoding in the form of a bypass using a fixed probability interval without performing binary arithmetic encoding on mmlm_flag through a context model.
  • the video signal processing apparatus may binary arithmetic code mmlm_flag using only one context model. In this case, since each slice type has only one context model, a context model index is not derived and a context model fixed to all blocks of the slice can be used.
  • the video signal processing device selects the symbol of template_idx to be currently coded or parsed among several context models, such as the intra prediction mode of the current luminance component block, the horizontal or vertical size of the coding block (or the horizontal and vertical ratio, or the horizontal and vertical difference, etc.) ), quantization parameter, whether CCLM and / or MMLM are used for neighboring blocks, characteristics of residual blocks (information whether residual signals are present in luminance component blocks, position information of the last transform coefficient), motion information differential values, and reference line indexes, at least You can select using more than one.
  • context models such as the intra prediction mode of the current luminance component block, the horizontal or vertical size of the coding block (or the horizontal and vertical ratio, or the horizontal and vertical difference, etc.) ), quantization parameter, whether CCLM and / or MMLM are used for neighboring blocks, characteristics of residual blocks (information whether residual signals are present in luminance component blocks, position information of the last transform coefficient), motion information differential values, and reference line indexes, at least You can select using
  • template_idx may consist of two bins, a context model technique may be applied to the first bin, and binary arithmetic coding in a bypass form may be performed or a fixed context model may be used for the second bin.
  • a method for the video signal processing apparatus to select a symbol of template_idx from among several context models will be described.
  • the video signal processing apparatus may select the context index of the symbol of template_idx based on the size of the current block. For example, if the size of the current block is larger than the first value, the context index may be 2, and if the size of the current block is smaller than the second value, the context index may be 0, and the size of the current block is The context index may be 1 when it is equal to or greater than the second value and equal to or less than the first value.
  • the first value and the second value are preset values, and the first value may be 32 x 32, and the second value may be 16 x 16. Also, the first value and the second value may be set based on the sum of horizontal and vertical sizes of the current block.
  • the video signal processing apparatus may select the context index of the symbol of template_idx based on the difference between the horizontal and vertical sizes of the current block.
  • the context index may be 0. If the horizontal size of the current block is greater than the vertical size, the context index may be 1. If the horizontal size of the current block is smaller than the vertical size, the context index may be 2.
  • the video signal processing apparatus may perform binary arithmetic encoding of a bypass type using a fixed probability interval without performing binary arithmetic encoding on template_idx through a context model.
  • the video signal processing apparatus may binary arithmetic code template_idx using only one context model. In this case, since each slice type has only one context model, a context model index is not derived and a context model fixed to all blocks of the slice can be used.
  • the LM mode uses a reconstructed luminance block and a linear model, the LM mode can be applied to a block coded in an intra mode or a chrominance block of a block coded in an inter mode.
  • the inter mode has the advantage of high processing speed due to low dependence on neighboring blocks, whereas the LM mode has the disadvantage of low processing speed due to high dependence on neighboring blocks. Therefore, if LM mode is applied to inter mode, it will not be applied to encoding modes with low processing speed (e.g., GPM, Affine, sbTMVP, BCW, PROF, BDOF, TM, MP-DMVR, OBMC, MHP, LIC).
  • the LM mode may be applied to chrominance component blocks encoded in an encoding mode (eg, Merge, MergeSkip, MMVD, AMVP, SMVD, or CIIP) having a relatively high decoding processing speed for luma component blocks.
  • an encoding mode eg, Merge, MergeSkip, MMVD, AMVP, SMVD, or CIIP
  • information on whether the LM mode is applied to the color difference component block may be signaled. That is, the decoder may determine whether the LM mode is applied to the chrominance component block of a block encoded in the inter mode by parsing information on whether the LM mode is applied to the chrominance component block in the bitstream.
  • Methods of predicting a block can be largely divided into an intra prediction method using spatial correlation and an inter prediction method using temporal correlation. If the intra prediction method is applied to the current block, information related to intra prediction may be included in the bitstream, but information related to inter prediction may not be included. Conversely, if the inter prediction method is applied to the current block, information related to inter prediction may be included in the bitstream, but information related to intra prediction may not be included. Encoding information of the current block (whether inter-prediction method or intra-prediction method is applied) may be predicted based on encoding information of neighboring blocks. For example, when intra prediction is applied to the current block, prediction of the current block may be performed based on intra prediction information of neighboring blocks of the current block.
  • a video signal processing apparatus may increase intra prediction efficiency of a block to be processed next by including intra prediction information on a neighboring block on which inter prediction is performed in a bitstream.
  • a method of deriving intra prediction information for a block on which inter prediction has been performed may use the fact that the current block is highly likely to have similar image characteristics to the reference block. That is, intra prediction information of the reference block may be used as intra prediction information for the current block.
  • FIG. 14 is a diagram illustrating a method of deriving an intra prediction mode of a current block using neighboring blocks according to an embodiment of the present specification.
  • neighboring blocks of the current block may have various sizes.
  • the video signal processing apparatus may construct an MPM list using the intra prediction modes of neighboring blocks of the current block and then encode the intra prediction mode for the current block using the MPM list. there is.
  • the video signal processing apparatus may derive the intra prediction mode of the current block from a reference picture using motion information of the neighboring block. .
  • an intra prediction mode stored at a position moved by motion information of a neighboring block based on a position corresponding to a position of an upper left pixel of a neighboring block of a reference picture may be included in the MPM list.
  • the intra prediction mode of the neighboring block Ne-A2/A3 of FIG. 14 may be the intra prediction mode of M4 or O5 of the reference picture, and the stored intra prediction mode of M4 or O5 may be included in the MPM list.
  • the intra-prediction mode of the current block may be similar to that of neighboring blocks, and the accuracy of the intra-prediction mode may increase as the location used to derive the intra-prediction mode of the neighboring block is closer to the current block. Accordingly, the position used to derive the intra prediction mode of the neighboring block may be reset to a position close to the current block.
  • the intra prediction mode of the neighboring block Ne-L3 of FIG. 14 may be an intra prediction mode of J16 or J17 located closer to the current block than H16 or I17.
  • the video signal processing apparatus may derive an intra prediction mode from a reference picture by projecting motion information of neighboring blocks based on a position of the current block.
  • the intra prediction mode of the position of the current block may be derived and used without using the intra prediction mode of M4, which is a position moved by the motion information of the neighboring block A2/A3. That is, in order to derive the intra prediction mode for Ne-A2/A3 neighboring blocks, the video signal processing apparatus uses motion information of Ne-A2/A3 neighboring blocks based on a position corresponding to the central pixel position of the current block in the reference picture.
  • the intra prediction mode of M10 which is a position moved by , can be derived and used as the intra prediction mode of Ne-A2/A3 neighboring blocks.
  • the derived intra prediction mode may be included in constructing the MPM list of the current block.
  • the video signal processing apparatus may derive an intra prediction mode of a position moved by motion information of a neighboring block based on an arbitrary position in the current block, not the position of the center pixel of the current block.
  • the arbitrary location may be one of upper left, upper center, upper right, left center, lower left, lower center, lower right, and right center of the current block.
  • the video signal processing apparatus may generate an intra prediction block of a corresponding sub-block by using at least one of several intra prediction modes derived from motion information of several neighboring blocks.
  • the video signal processing apparatus may use one of a median value, an average value, a minimum value, and a maximum value as an optimal intra prediction mode among several intra prediction modes.
  • the above method can be applied even when the color difference component block of the current block is coded in the LM mode.
  • the video signal processing apparatus may derive an intra prediction mode for a chrominance component block of the current block from a reference picture by projecting motion information of neighboring blocks with reference to a location of the current block.
  • the video signal processing apparatus when the derived intra prediction mode is the LM mode, provides information on which mode among CCLM, MMLM, CCCM, and GLM is applied to the neighboring block, which samples (left samples, upper samples) At least one of filter coefficient information and information on whether chrominance is used may be obtained from a reference picture and used to predict the current chrominance block. For this, all LM encoding information for the corresponding chrominance block in the reference picture must be stored.
  • the CIIP mode is a method of weight averaging each prediction block after performing both intra prediction and inter prediction on the current block.
  • the video signal processing apparatus may use the motion information of the current block when deriving an intra prediction mode from a reference picture.
  • the intra prediction mode of the chrominance component block derived from the reference picture is any one of LM, CCLM, MMLM, CCCM, and GLM modes
  • the chrominance component block of the current block is predicted in the coding mode of the chrominance component block of the reference block.
  • the video signal processing apparatus in order to increase the processing speed of the block encoded in the CIIP mode, the video signal processing apparatus generates a prediction block by performing intra prediction and inter prediction on only the luminance component block and then averaging the weight, and the chrominance component block is LM A prediction block can be generated only in the color difference coding mode of the corresponding reference block. That is, since the video signal processing apparatus does not have to perform inter prediction on the chrominance component block, processing speed can be increased.
  • the method of deriving parameters for the linear model described above may use only samples at a predetermined position. Accordingly, the accuracy of the linear model may vary according to the accuracy of the samples at the promised position.
  • noise may occur in a sample at an arbitrary position, and when the sample at a position where such noise is generated is used to derive parameters of a linear model, there is a problem that the accuracy of the linear model is lowered. . A method for solving this problem will be described below.
  • 15 is a diagram illustrating a method of obtaining a color difference prediction block according to an embodiment of the present specification.
  • the video signal processing apparatus may configure a first template including neighboring samples of the current block.
  • the video signal processing apparatus may selectively perform low-frequency filtering between neighboring samples in the template to make the neighboring samples similar to each other. That is, the video signal processing apparatus may configure a second template including neighboring samples similar to each other.
  • the video signal processing apparatus may perform high-frequency filtering on neighboring samples in the template to clearly distinguish noise, determine samples corresponding to a certain threshold or higher as noise, and remove them from the template.
  • the sample that is determined to be noise and removed may be padded using one of the neighboring pixels or may be set as a weighted average value of the neighboring pixels.
  • the video signal processing apparatus may configure the third template by padding a sample that is determined to be noise and removed using one of the neighboring pixels or setting a value obtained by weighting the average of the neighboring pixels. Filtering and noise removal may be selectively performed for each SPS, PPS, PH, Slice, Tile, CU, and sub-block level. In this case, information on whether filtering and noise cancellation is performed may be included in the bitstream and signaled, and the decoder may determine whether filtering and noise cancellation are performed by parsing information on whether filtering and noise cancellation are performed. there is.
  • the video signal processing apparatus may derive parameters for a linear model based on samples in the second template or the third template, and obtain a first linear model.
  • the video signal processing apparatus may perform verification on the first linear model using samples in the first template.
  • the video signal processing apparatus determines whether the ratio between the samples within the error value and all the samples in the first template is within a predetermined error value (eg, an integer greater than or equal to 1). Verification may be performed based on whether it is greater than or equal to a predetermined ratio (eg, a value between 0 and 1). At this time, if the ratio between the samples within the error value and all the samples in the first template is smaller than a predetermined ratio, a second linear model is derived using samples other than the samples used to derive the first linear model.
  • a predetermined error value eg, an integer greater than or equal to 1
  • Verification may be performed based on whether it is greater than or equal to a predetermined ratio (eg, a value between 0 and 1).
  • the video signal processing apparatus may derive an n-th linear model by repeatedly performing a linear model derivation process. At this time, the linear model derivation process is repeated until all samples in the first template are used in the derivation process or the number of remaining samples that can be used for linear model derivation is within a certain number (eg, an integer greater than or equal to 1). can Further, the video signal processing apparatus may perform the method described in this specification to obtain a downsampled luminance component block (sample) and predict a chrominance component block (sample).
  • 16 is a diagram illustrating a reference region used to generate a linear model according to an embodiment of the present specification.
  • the video signal processing apparatus may use a type 1 or type 2 filter to generate a downsampled luminance component sample.
  • a dark gray sample in FIG. 16 is a position where a down-sampled luminance component sample is generated, and a light gray sample represents surrounding samples used to generate a luminance component sample at a dark gray position.
  • the gray samples may be described as a reference region.
  • a decoder can use one or more reference lines to predict the current block.
  • the encoder may generate a bitstream including information about which line is used among one or more reference lines.
  • information on which line is used may be an index of a reference line.
  • the decoder may predict the current block using a reference line corresponding to an index obtained by parsing information about which line is used.
  • the decoder may use the reference region of FIG. 16(a) to derive a linear model for predicting color difference component samples.
  • the line adjacent to the current block may be up to a line spaced apart from the current block by n samples.
  • n may be 3 as an integer greater than or equal to 1. That is, referring to FIG. 16(a), the decoder can use samples on reference lines 0, 1, and 2 corresponding to indices 0, 1, and 2 as a reference region (when n is 3).
  • the decoder may use the reference region of FIG. 16(b) to derive a linear model for predicting color difference component samples.
  • the line not adjacent to the current block may be a line subsequent to a line spaced apart from the current block by k samples.
  • k may be 3 as an integer greater than or equal to 1. That is, referring to FIG. 16(b), the decoder can use samples on the reference line after reference line 2 corresponding to index 2 as a reference region (when k is 3).
  • the video signal processing apparatus may derive (use) two linear models when chrominance component samples are predicted through the MMLM method. At this time, the video signal processing apparatus may derive a first linear model using the reference region of FIG. 16 (a) and derive a second linear model using the reference region of FIG. 16 (b). If the above-described information on which line is used does not indicate an index of a line adjacent to the current block (eg, indicates an index greater than 1), a linear model may be derived in different reference regions.
  • the derived linear model can better express the characteristics of the current block. Therefore, a more effective linear model can be derived as samples adjacent to the current block are used. If the sample used to predict the luma component sample for the current block is a sample of a line not adjacent to the current block, noise may be included. This noise may prevent the decoder from deriving an effective linear model. That is, the decoder can determine whether to use or activate CCLM, MMLM, GLM, CCCM, etc. according to the line of the reference sample used to predict the luma component sample for the current block.
  • the decoder CCLM, MMLM for prediction of the current block if the index of the line of the sample used to predict the luma component sample for the current block is greater than an arbitrary value (eg, 3 as an integer greater than 1) , GLM, CCCM, etc. may not be used. That is, syntax related to CCLM, MMLM, GLM, and CCCM is not parsed, and syntax related to CCLM, MMLM, GLM, and CCCM is inferred to indicate that CCLM, MMLM, GLM, and CCCM are not used or activated. can Can be inferred (implied) as unparsed and unused.
  • 17 is a diagram illustrating a method of processing a video signal according to an embodiment of the present specification.
  • the video signal processing apparatus may configure a template including neighboring blocks of the current block (S1710).
  • the video signal processing apparatus may down-sample luminance component samples of the neighboring blocks based on the color format of the current picture including the current block (S1720).
  • the video signal processing apparatus may derive a first linear model and a second linear model based on the downsampled luminance component samples (S1730).
  • the video signal processing apparatus may predict a chrominance component sample at a position corresponding to the position of the first sample among luminance component samples of the current block based on one of the first linear model and the second linear model. Yes (S1740). Any one of the linear models may be determined by comparing the value of the first sample with a threshold value.
  • the video signal processing apparatus may perform high-frequency filtering or low-frequency filtering on the neighboring blocks included in the template.
  • the threshold may be an average value of values of restored luma component blocks in the current block.
  • the threshold may be an average value of chrominance component samples of the neighboring blocks.
  • the threshold may be determined based on threshold information included in the bitstream.
  • the neighboring blocks included in the template may be first blocks adjacent to an upper side of the current block, second blocks adjacent to a left side of the current block, or the first blocks and the second blocks.
  • the neighboring blocks included in the template may be determined based on an intra prediction direction mode of the current block.
  • the neighboring blocks included in the template may be determined by comparing a first quantization parameter value used to reconstruct the first blocks with a second quantization parameter value used to reconstruct the second blocks.
  • the neighboring blocks included in the template may be determined based on the size of the current block.
  • the neighboring blocks included in the template may be determined based on whether cross-component linear model (CCLM) or multi-model linear mode (MMLM) is applied to the first blocks and the second blocks.
  • CCLM cross-component linear model
  • MMLM multi-model linear mode
  • the neighboring blocks included in the template may be determined based on neighboring block information included in the bitstream.
  • the neighboring blocks included in the template may be blocks on a line separated by a specific sample from the current block or blocks on a line less than the specific sample interval from the current block.
  • the methods (video signal processing methods) described above in this specification may be performed through a processor of a decoder or encoder.
  • the encoder may generate a bitstream that is decoded by a video signal processing method.
  • the bitstream generated by the encoder may be stored in a computer-readable non-transitory storage medium (recording medium).
  • parsing in this specification has been described focusing on the process of obtaining information from a bitstream, but from the encoder side, it can be interpreted as constructing corresponding information in a bitstream. Therefore, the term parsing is not limited to a decoder operation, but can also be interpreted as an act of constructing a bitstream in an encoder. In addition, such a bitstream may be configured by being stored in a computer readable recording medium.
  • embodiments of the present invention may be implemented through various means.
  • embodiments of the present invention may be implemented by hardware, firmware, software, or a combination thereof.
  • the method according to the embodiments of the present invention includes one or more ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSPDs (Digital Signal Processing Devices), PLDs (Programmable Logic Devices) , Field Programmable Gate Arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, etc.
  • ASICs Application Specific Integrated Circuits
  • DSPs Digital Signal Processors
  • DSPDs Digital Signal Processing Devices
  • PLDs Programmable Logic Devices
  • FPGAs Field Programmable Gate Arrays
  • processors controllers, microcontrollers, microprocessors, etc.
  • the method according to the embodiments of the present invention may be implemented in the form of a module, procedure, or function that performs the functions or operations described above.
  • the software code can be stored in memory and run by a processor.
  • the memory may be located inside or outside the processor, and may exchange data with the processor by various means known in the art.
  • Computer readable media can be any available media that can be accessed by a computer and includes both volatile and nonvolatile media, removable and non-removable media. Also, computer readable media may include both computer storage media and communication media. Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Communication media typically includes computer readable instructions, data structures or other data in a modulated data signal, such as program modules, or other transport mechanism, and includes any information delivery media.

Landscapes

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

Abstract

비디오 신호 처리 방법은, 현재 블록의 주변 블록들을 포함하는 템플릿을 구성하는 단계; 상기 현재 블록이 포함된 현재 픽쳐의 컬러 포맷에 기초하여 상기 주변 블록들의 휘도 성분 샘플들을 다운 샘플링하는 단계; 상기 다운 샘플링된 휘도 성분 샘플들에 기초하여 제1 선형 모델 및 제2 선형 모델을 유도하는 단계; 및 상기 제1 선형 모델 및 상기 제2 선형 모델 중 어느 하나의 선형 모델에 기초하여 상기 현재 블록의 휘도 성분 샘플들 중 제1 샘플의 위치에 대응되는 위치의 색차 성분 샘플을 예측하는 단계를 포함하고, 상기 어느 하나의 선형 모델은 상기 제1 샘플의 값과 임계치를 비교하여 결정되는 것을 특징으로 한다.

Description

비디오 신호 처리 방법 및 이를 위한 장치
본 발명은 비디오 신호의 처리 방법 및 장치에 관한 것으로, 보다 상세하게는 비디오 신호를 인코딩하거나 디코딩하는 비디오 신호 처리 방법 및 장치에 관한 것이다.
압축 부호화란 디지털화한 정보를 통신 회선을 통해 전송하거나, 저장 매체에 적합한 형태로 저장하기 위한 일련의 신호 처리 기술을 의미한다. 압축 부호화의 대상에는 음성, 영상, 문자 등의 대상이 존재하며, 특히 영상을 대상으로 압축 부호화를 수행하는 기술을 비디오 영상 압축이라고 일컫는다. 비디오 신호에 대한 압축 부호화는 공간적인 상관관계, 시간적인 상관관계, 확률적인 상관관계 등을 고려하여 잉여 정보를 제거함으로써 이루어진다. 그러나 최근의 다양한 미디어 및 데이터 전송 매체의 발전으로 인해, 더욱 고효율의 비디오 신호 처리 방법 및 장치가 요구되고 있다.
본 명세서는 비디오 신호 처리 방법 및 이를 위한 장치를 제공하여 비디오 신호의 코딩 효율을 높이기 위한 목적이 있다.
본 명세서는 비디오 신호 처리 방법 및 이를 위한 장치를 제공한다.
본 명세서에 있어서, 비디오 신호 디코딩 장치는 프로세서를 포함하며, 상기 프로세서는 현재 블록의 주변 블록들을 포함하는 템플릿을 구성하고, 상기 현재 블록이 포함된 현재 픽쳐의 컬러 포맷에 기초하여 상기 주변 블록들의 휘도 성분 샘플들을 다운 샘플링하고, 상기 다운 샘플링된 휘도 성분 샘플들에 기초하여 제1 선형 모델 및 제2 선형 모델을 유도하고, 상기 제1 선형 모델 및 상기 제2 선형 모델 중 어느 하나의 선형 모델에 기초하여 상기 현재 블록의 휘도 성분 샘플들 중 제1 샘플의 위치에 대응되는 위치의 색차 성분 샘플을 예측하고, 상기 어느 하나의 선형 모델은 상기 제1 샘플의 값과 임계치를 비교하여 결정되는 것을 특징으로 한다.
또한 상기 프로세서는 상기 템플릿에 포함되는 상기 주변 블록들에 대해 고주파 필터링 또는 저주파 필터링을 수행하는 것을 특징으로 한다.
본 명세서에 있어서, 비디오 신호 인코딩 장치는 프로세서를 포함하며, 상기 프로세서는 디코딩 방법에 의해 디코딩되는 비트스트림을 획득한다.
본 명세서에 있어서, 컴퓨터 판독 가능한 비 일시적 저장 매체는 비트스트림을 저장한다. 상기 비트스트림은 디코딩 방법에 의해 디코딩된다.
본 명세서에 있어서, 디코딩 방법은, 현재 블록의 주변 블록들을 포함하는 템플릿을 구성하는 단계; 상기 현재 블록이 포함된 현재 픽쳐의 컬러 포맷에 기초하여 상기 주변 블록들의 휘도 성분 샘플들을 다운 샘플링하는 단계; 상기 다운 샘플링된 휘도 성분 샘플들에 기초하여 제1 선형 모델 및 제2 선형 모델을 유도하는 단계; 및 상기 제1 선형 모델 및 상기 제2 선형 모델 중 어느 하나의 선형 모델에 기초하여 상기 현재 블록의 휘도 성분 샘플들 중 제1 샘플의 위치에 대응되는 위치의 색차 성분 샘플을 예측하는 단계를 포함하고, 상기 어느 하나의 선형 모델은 상기 제1 샘플의 값과 임계치를 비교하여 결정되는 것을 특징으로 한다.
또한, 본 명세서에 있어서, 상기 디코딩 방법은 상기 템플릿에 포함되는 상기 주변 블록들에 대해 고주파 필터링 또는 저주파 필터링을 수행하는 단계를 포함한다.
본 명세서에 있어서, 상기 임계치는 상기 현재 블록 내 복원된 휘도 성분 블록들의 값의 평균 값인 것을 특징으로 한다.
본 명세서에 있어서, 상기 임계치는 상기 주변 블록의 색차 성분 샘플들의 평균 값인 것을 특징으로 한다.
본 명세서에 있어서, 상기 임계치는 비트스트림에 포함되는 임계치 정보에 기초하여 결정되는 것을 특징으로 한다.
본 명세서에 있어서, 상기 템플릿에 포함되는 상기 주변 블록들은 상기 현재 블록의 상측에 인접한 제1 블록들이거나 상기 현재 블록의 좌측에 인접한 제2 블록들이거나 상기 제1 블록들 및 상기 제2 블록들인 것을 특징으로 한다.
본 명세서에 있어서, 상기 템플릿에 포함되는 상기 주변 블록들은 상기 현재 블록의 인트라 예측 방향성 모드에 기초하여 결정되는 것을 특징으로 한다.
본 명세서에 있어서, 상기 템플릿에 포함되는 상기 주변 블록들은 상기 제1 블록들의 복원을 위해 사용된 제1 양자화 파라미터 값과 상기 제2 블록들의 복원을 위해 사용된 제2 양자화 파라미터 값을 비교하여 결정되는 것을 특징으로 한다.
본 명세서에 있어서, 상기 템플릿에 포함되는 상기 주변 블록들은 상기 현재 블록의 크기에 기초하여 결정되는 것을 특징으로 한다.
본 명세서에 있어서, 상기 템플릿에 포함되는 상기 주변 블록들은 상기 제1 블록들 및 상기 제2 블록들에 CCLM(Cross-component linear model) 또는 MMLM(Multi-model Linear mode)이 적용되는지 여부에 기초하여 결정되는 것을 특징으로 한다.
본 명세서에 있어서, 상기 템플릿에 포함되는 상기 주변 블록들은 비트스트림에 포함되는 주변 블록 정보에 기초하여 결정되는 것을 특징으로 한다.
본 명세서에 있어서, 상기 템플릿에 포함되는 상기 주변 블록들은 상기 현재 블록으로부터 특정 샘플만큼 이격된 라인 상의 블록들이거나 상기 현재 블록으로부터 상기 특정 샘플 간격 이하의 라인 상의 블록들인 것을 특징으로 한다.
본 명세서는 효율적으로 비디오 신호를 처리하기 위한 방법을 제공한다.
본 명세서에서 얻을 수 있는 효과는 이상에서 언급한 효과들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.
도 1은 본 발명의 일 실시예에 따른 비디오 신호 인코딩 장치의 개략적인 블록도이다.
도 2는 본 발명의 일 실시예에 따른 비디오 신호 디코딩 장치의 개략적인 블록도이다.
도 3은 픽쳐 내에서 코딩 트리 유닛이 코딩 유닛들로 분할되는 실시예를 도시한다.
도 4는 쿼드 트리 및 멀티-타입 트리의 분할을 시그널링하는 방법의 일 실시예를 도시한다.
도 5 및 도 6은 본 발명의 실시예에 따른 인트라 예측 방법을 더욱 구체적으로 도시한다.
도 7은 인터 예측에서 움직임 후보 리스트를 구성하기 위해 사용되는 주변 블록들의 위치를 나타낸 도면이다.
도 8은 본 명세서의 일 실시예에 따른 CCLM이 수행되는 방법을 나타내는 도면이다.
도 9는 본 명세서의 일 실시예에 따른 선형 모델의 유도를 위해 사용되는 템플릿을 나타내는 도면이다.
도 10은 본 명세서의 일 실시예에 따른 2개의 선형 모델을 유도하는 방법을 나타내는 도면이다.
도 11은 본 명세서의 일 실시예에 따른 색차 성분 블록에 대한 인트라 예측 방향성 모드를 시그널링하는 방법을 나타내는 도면이다.
도 12 및 도 13은 본 명세서의 일 실시예에 따른 문맥 모델을 나타내는 도면이다.
도 14는 본 명세서의 일 실시예에 따른 주변 블록을 이용하여 현재 블록의 인트라 예측 모드를 유도하는 방법을 나타내는 도면이다.
도 15는 본 명세서의 일 실시예에 따른 색차 예측 블록을 획득하는 방법을 나타내는 도면이다.
도 16은 본 명세서의 일 실시예에 따른 선형 모델을 생성하기 위해 사용되는 참조 영역을 나타내는 도면이다.
도 17은 본 명세서의 일 실시예에 따른 비디오 신호를 처리하는 방법을 나타내는 도면이다.
본 명세서에서 사용되는 용어는 본 발명에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어를 선택하였으나, 이는 당 분야에 종사하는 기술자의 의도, 관례 또는 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한 특정 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 발명의 설명 부분에서 그 의미를 기재할 것이다. 따라서 본 명세서에서 사용되는 용어는, 단순한 용어의 명칭이 아닌 그 용어가 가진 실질적인 의미와 본 명세서의 전반에 걸친 내용을 토대로 해석되어야 함을 밝혀두고자 한다.
본 명세서에서 'A 및/또는 B'는 'A 또는 B 중 적어도 하나를 포함하는'과 같은 의미로 해석될 수 있다.
본 명세서에서 일부 용어들은 다음과 같이 해석될 수 있다. 코딩은 경우에 따라 인코딩 또는 디코딩으로 해석될 수 있다. 본 명세서에서 비디오 신호의 인코딩(부호화)을 수행하여 비디오 신호 비트스트림을 생성하는 장치는 인코딩 장치 또는 인코더로 지칭되며, 비디오 신호 비트스트림의 디코딩(복호화)을 수행하여 비디오 신호를 복원하는 장치는 디코딩 장치 또는 디코더로 지칭된다. 또한, 본 명세서에서 비디오 신호 처리 장치는 인코더 및 디코더를 모두 포함하는 개념의 용어로 사용된다. 정보(information)는 값(values), 파라미터(parameter), 계수(coefficients), 성분(elements) 등을 모두 포함하는 용어로서, 경우에 따라 의미는 달리 해석될 수 있으므로 본 발명은 이에 한정되지 아니한다. '유닛'은 영상 처리의 기본 단위 또는 픽쳐의 특정 위치를 지칭하는 의미로 사용되며, 휘도(luma) 성분 및 색차(chroma) 성분 중 적어도 하나를 포함하는 이미지 영역을 가리킨다. 또한, '블록'은 휘도 성분 및 색차 성분들(즉, Cb 및 Cr) 중 특정 성분을 포함하는 이미지 영역을 가리킨다. 다만, 실시예에 따라서 '유닛', '블록', '파티션', '신호' 및 '영역' 등의 용어는 서로 혼용하여 사용될 수 있다. 또한, 본 명세서에서 '현재 블록'은 현재 부호화를 진행할 예정인 블록을 의미하며, '참조 블록'은 이미 부호화 또는 복호화가 완료된 블록으로 현재 블록에서 참조로 사용되는 블록을 의미한다. 또한, 본 명세서에서 '루마', 'luma', '휘도', 'Y' 등의 용어는 서로 혼용하여 사용될 수 있다. 또한, 본 명세서에서 '크로마', 'chroma' '색차', 'Cb 또는 Cr' 등의 용어는 서로 혼용하여 사용될 수 있으며, 색차 성분은 Cb와 Cr 2가지로 나누어지므로 각 색차 성분은 구분되어 사용될 수 있다. 또한, 본 명세서에서 유닛은 코딩 유닛, 예측 유닛, 변환 유닛을 모두 포함하는 개념으로 사용될 수 있다. 픽쳐는 필드 또는 프레임을 가리키며, 실시예에 따라 상기 용어들은 서로 혼용하여 사용될 수 있다. 구체적으로 촬영된 영상이 비월주사식(interlace) 영상일 경우, 하나의 프레임은 홀수(또는 기수, top) 필드와 짝수(또는 우수, bottom) 필드로 분리되어, 각 필드는 하나의 픽쳐 단위로 구성되어 부호화 또는 복호화 될 수 있다. 만일 촬영된 영상이 순차주사(progressive) 영상일 경우, 하나의 프레임이 픽쳐로서 구성되어 부호화 또는 복호화 될 수 있다. 또한, 본 명세서에서 '오차 신호', '레지듀얼 신호', '잔차 신호', '잔여 신호' 및 '차분 신호' 등의 용어는 서로 혼용하여 사용될 수 있다. 또한, 본 명세서에서 '인트라 예측 모드', '인트라 예측 방향성 모드', '화면 내 예측 모드' 및 '화면 내 예측 방향성 모드' 등의 용어는 서로 혼용하여 사용될 수 있다. 또한, 본 명세서에서 '모션', '움직임' 등의 용어는 서로 혼용하여 사용될 수 있다. 또한, 본 명세서에서 '좌측', '좌상측', '상측', '우상측', '우측', '우하측', '하측', '좌하측'은 '좌단', '좌상단', '상단', '우상단', '우단', '우하단', '하단', '좌하단'와 서로 혼용하여 사용될 수 있다. 또한, 원소(element), 멤버(member)는 서로 혼용하여 사용될 수 있다. POC(Picture Order Count)는 픽쳐(또는 프레임)의 시간적 위치 정보를 나타내며, 화면에 출력되는 재생 순서가 될 수 있으며, 픽쳐마다 고유의 POC를 가질 수 있다.
도 1은 본 발명의 일 실시예에 따른 비디오 신호 인코딩 장치(100)의 개략적인 블록도이다. 도 1을 참조하면, 본 발명의 인코딩 장치(100)는 변환부(110), 양자화부(115), 역양자화부(120), 역변환부(125), 필터링부(130), 예측부(150) 및 엔트로피 코딩부(160)를 포함한다.
변환부(110)는 입력 받은 비디오 신호와 예측부(150)에서 생성된 예측 신호의 차이인 레지듀얼 신호를 변환하여 변환 계수 값을 획득한다. 예를 들어, 이산 코사인 변환(Discrete Cosine Transform, DCT), 이산 사인 변환(Discrete Sine Transform, DST) 또는 웨이블릿 변환(Wavelet Transform) 등이 사용될 수 있다. 이산 코사인 변환 및 이산 사인 변환은 입력된 픽쳐 신호를 블록 형태로 나누어 변환을 수행하게 된다. 변환에 있어서 변환 영역 내의 값들의 분포와 특성에 따라서 코딩 효율이 달라질 수 있다. 레지듀얼 블록에 대한 변환에 사용되는 변환 커널은 수직 변환 및 수평 변환의 분리 가능한 특성을 가지는 변환 커널일 수 있다. 이 경우, 레지듀얼 블록에 대한 변환은 수직 변환 및 수평 변환으로 분리되어 수행될 수 있다. 예를 들어, 인코더는 레지듀얼 블록의 수직 방향으로 변환 커널을 적용하여 수직 변환을 수행할 수 있다. 또한, 인코더는 레지듀얼 블록의 수평 방향으로 변환 커널을 적용하여 수평 변환을 수행할 수 있다. 본 개시에서, 변환 커널은 변환 매트릭스, 변환 어레이, 변환 함수, 변환과 같이 레지듀얼 신호의 변환에 사용되는 파라미터 세트를 지칭하는 용어로 사용될 수 있다. 예를 들어, 변환 커널은 복수의 사용 가능한 커널들 중 어느 하나일 수 있다. 또한, 수직 변환 및 수평 변환 각각에 대해 서로 다른 변환 타입에 기반한 변환 커널이 사용될 수도 있다.
변환계수는 블록의 좌상단으로 갈수록 높은 계수가 분포하고, 블록의 우하단으로 갈수록 '0'에 가까운 계수가 분포한다. 현재 블록의 크기가 커질수록 우하단 영역에서 계수 '0'이 많이 존재할 가능성이 있다. 크기가 큰 블록의 변환 복잡도를 감소시키기 위해서, 임의의 좌상단 영역만을 남기고 나머지 영역은 '0'으로 재설정될 수 있다.
또한, 코딩 블록에서 일부 영역에만 오차 신호가 존재할 수 있다. 이 경우, 임의의 일부 영역에 대해서만 변환 과정이 수행될 수 있다. 실시 일 예로, 2Nx2N 크기의 블록에서 첫번째 2NxN 블록에만 오차 신호가 존재할 수 있으며, 첫번째 2NxN블록에만 변환과정이 수행되지만 두번째 2NxN 블록은 변환과정이 수행되지 않고 인코딩 또는 디코딩되지 않을 수 있다. 여기서 N은 임의의 양의 정수가 될 수 있다.
인코더는 변환 계수가 양자화되기 전에 추가적인 변환을 수행할 수 있다. 전술한 변환 방법은 1차 변환(primary transform)으로 지칭되고, 추가적인 변환은 2차 변환(secondary transform)으로 지칭될 수 있다. 2차 변환은 레지듀얼 블록 별로 선택적일 수 있다. 일 실시예에 따라, 인코더는 1차 변환만으로 저주파 영역에 에너지를 집중시키기 어려운 영역에 대해 2차 변환을 수행하여 코딩 효율을 향상시킬 수 있다. 예를 들어, 레지듀얼 값들이 레지듀얼 블록의 수평 또는 수직 방향 이외의 방향에서 크게 나타나는 블록에 대해 2차 변환이 추가로 수행될 수 있다. 2차 변환은 1차 변환과 달리 수직 변환 및 수평 변환으로 분리되어 수행되지 않을 수 있다. 이러한 2차 변환은 저대역 비-분리 변환(Low Frequency Non-Separable Transform, LFNST)으로 지칭될 수 있다.
양자화부(115)는 변환부(110)에서 출력된 변환 계수 값을 양자화한다.
코딩 효율을 높이기 위하여 픽쳐 신호를 그대로 코딩하는 것이 아니라, 예측부(150)를 통해 이미 코딩된 영역을 이용하여 픽쳐를 예측하고, 예측된 픽쳐에 원본 픽쳐와 예측 픽쳐 간의 레지듀얼 값을 더하여 복원 픽쳐를 획득하는 방법이 사용된다. 인코더와 디코더에서 미스매치가 발생되지 않도록 하기 위해, 인코더에서 예측을 수행할 때에는 디코더에서도 사용 가능한 정보를 사용해야 한다. 이를 위해, 인코더에서는 부호화한 현재 블록을 다시 복원하는 과정을 수행한다. 역양자화부(120)에서는 변환 계수 값을 역양자화하고, 역변환부(125)에서는 역양자화된 변환 계수값을 이용하여 레지듀얼 값을 복원한다. 한편, 필터링부(130)는 복원된 픽쳐의 품질 개선 및 부호화 효율 향상을 위한 필터링 연산을 수행한다. 예를 들어, 디블록킹 필터, 샘플 적응적 오프셋(Sample Adaptive Offset, SAO) 및 적응적 루프 필터 등이 포함될 수 있다. 필터링을 거친 픽쳐는 출력되거나 참조 픽쳐로 이용하기 위하여 복호 픽쳐 버퍼(Decoded Picture Buffer, DPB, 156)에 저장된다.
디블록킹 필터(deblocking filter)는 복원된 픽쳐에서 블록 간의 경계에 생성된 블록 내의 왜곡을 제거하기 위한 필터이다. 인코더는 블록 내의 임의 경계(edge)를 기준으로 몇 개의 열 또는 행에 포함된 픽셀들의 분포를 통해, 해당 경계에 디블록킹 필터를 적용할지 여부를 판단할 수 있다. 블록에 디블록킹 필터를 적용되는 경우, 인코더는 디블록킹 필터링 강도에 따라 긴 필터(Long Filter), 강한 필터(Strong Filter) 또는 약한 필터(Weak Filter)를 적용할 수 있다. 또한, 수평 방향 필터링 및 수직 방향 필터링이 병렬적으로 처리될 수 있다. 샘플 적응적 오프셋(SAO)은 디블록킹 필터가 적용된 레지듀얼 블록에 대하여, 픽셀 단위로 원본 영상과의 오프셋을 보정하는데 사용될 수 있다. 인코더는 특정 픽쳐에 대한 오프셋을 보정하기 위하여 영상에 포함된 픽셀을 일정한 수의 영역으로 구분한 후, 오프셋 보정을 수행할 영역을 결정하고, 해당 영역에 오프셋을 적용하는 방법(Band Offset)을 사용할 수 있다. 또는 인코더는 각 픽셀의 에지 정보를 고려하여 오프셋을 적용하는 방법(Edge Offset)을 사용할 수 있다. 적응적 루프 필터(Adaptive Loop Filter, ALF)는 영상에 포함된 픽셀을 소정의 그룹으로 나눈 후, 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행하는 방법이다. ALF를 적용할지 여부에 관련된 정보는 코딩 유닛 단위로 시그널링될 수 있고, 각각의 블록에 따라 적용될 ALF 필터의 모양 및 필터 계수가 달라질 수 있다. 또한, 적용할 대상 블록의 특성에 관계없이 동일한 형태(고정된 형태)의 ALF 필터가 적용될 수도 있다.
예측부(150)는 인트라 예측부(152)와 인터 예측부(154)를 포함한다. 인트라 예측부(152)에서는 현재 픽쳐 내에서 인트라(intra) 예측을 수행하며, 인터 예측부(154)에서는 복호 픽쳐 버퍼(156)에 저장된 참조 픽쳐를 이용하여 현재 픽쳐를 예측하는 인터(inter) 예측을 수행한다. 인트라 예측부(152)는 현재 픽쳐 내의 복원된 영역들로부터 인트라 예측을 수행하여, 인트라 부호화 정보를 엔트로피 코딩부(160)에 전달한다. 인트라 부호화 정보는 인트라 예측 모드, MPM(Most Probable Mode) 플래그, MPM 인덱스, 참조 샘플에 관한 정보 중 적어도 하나를 포함할 수 있다. 인터 예측부(154)는 다시 모션 추정부(154a) 및 모션 보상부(154b)를 포함하여 구성될 수 있다. 모션 추정부(154a)에서는 복원된 참조 픽쳐의 특정 영역을 참조하여 현재 영역과 가장 유사한 부분을 찾고 영역 간의 거리인 모션 벡터 값을 획득한다. 모션 추정부(154a)에서 획득한 참조 영역에 대한 모션 정보(참조 방향 지시 정보(L0 예측, L1 예측, 양방향 예측), 참조 픽쳐 인덱스, 모션 벡터 정보 등) 등을 엔트로피 코딩부(160)로 전달하여 비트스트림에 포함될 수 있도록 한다. 모션 추정부(154a)에서 전달된 모션 정보를 이용하여 모션 보상부(154b)에서는 인터 모션 보상을 수행하여 현재 블록을 위한 예측 블록을 생성한다. 인터 예측부(154)는 참조 영역에 대한 모션 정보를 포함하는 인터 부호화 정보를 엔트로피 코딩부(160)에 전달한다.
추가적인 실시예에 따라, 예측부(150)는 인트라 블록 카피(Intra block copy, IBC) 예측부(미도시)를 포함할 수 있다. IBC 예측부는 현재 픽쳐 내의 복원된 샘플들로부터 IBC 예측을 수행하여, IBC 부호화 정보를 엔트로피 코딩부(160)에 전달한다. IBC 예측부는 현재 픽쳐 내의 특정 영역을 참조하여 현재 영역의 예측에 이용되는 참조 영역을 지시하는 블록 벡터값을 획득한다. IBC 예측부는 획득된 블록 벡터값을 이용하여 IBC 예측을 수행할 수 있다. IBC 예측부는 IBC 부호화 정보를 엔트로피 코딩부(160)로 전달한다. IBC 부호화 정보는 참조 영역의 크기 정보, 블록 벡터 정보(움직임 후보 리스트 내에서 현재 블록의 블록 벡터 예측을 위한 인덱스 정보, 블록 벡터 차분 정보) 중에서 적어도 하나를 포함할 수 있다.
위와 같은 픽쳐 예측이 수행될 경우, 변환부(110)는 원본 픽쳐와 예측 픽쳐 간의 레지듀얼 값을 변환하여 변환 계수 값을 획득한다. 이때, 변환은 픽쳐 내에서 특정 블록 단위로 수행될 수 있으며, 특정 블록의 크기는 기 설정된 범위 내에서 가변할 수 있다. 양자화부(115)는 변환부(110)에서 생성된 변환 계수 값을 양자화하여 양자화된 변환 계수를 엔트로피 코딩부(160)로 전달한다.
상기 2차원 배열 형태의 양자화된 변환 계수는 엔트로피 코딩을 위해 1차원의 배열 형태로 재정렬될 수 있다. 양자화된 변환 계수를 스캐닝하는 방법은 변환 블록의 크기 및 화면 내 예측 모드에 따라 어떠한 스캔 방법이 사용될지 여부가 결정될 수 있다. 실시 일 예로, 대각(Diagonal), 수직(vertical), 수평(horizontal) 스캔이 적용될 수 있다. 이러한 스캔 정보는 블록 단위로 시그널링될 수 있으며, 이미 정해진 규칙에 따라 유도될 수 있다.
엔트로피 코딩부(160)는 양자화된 변환 계수를 나타내는 정보, 인트라 부호화 정보, 및 인터 부호화 정보 등을 엔트로피 코딩하여 비디오 신호 비트스트림을 생성한다. 엔트로피 코딩부(160)에서는 가변 길이 코딩(Variable Length Coding, VLC) 방식과 산술 코딩(arithmetic coding) 방식 등이 사용될 수 있다. 가변 길이 코딩(VLC) 방식은 입력되는 심볼들을 연속적인 코드워드로 변환하는데, 코드워드의 길이는 가변적일 수 있다. 예를 들어, 자주 발생하는 심볼들을 짧은 코드워드로, 자주 발생하지 않은 심볼들은 긴 코드워드로 표현하는 것이다. 가변 길이 코딩 방식으로서 컨텍스트 기반 적응형 가변 길이 코딩(Context-based Adaptive Variable Length Coding, CAVLC) 방식이 사용될 수 있다. 산술 코딩은 각 데이터 심볼들의 확률 분포를 이용하여 연속적인 데이터 심볼들을 하나의 소수로 변환하는데, 산술 코딩은 각 심볼을 표현하기 위하여 필요한 최적의 소수 비트를 얻을 수 있다. 산술 코딩으로서 컨텍스트 기반 적응형 산술 부호화(Context-based Adaptive Binary Arithmetic Code, CABAC)가 이용될 수 있다.
CABAC은 실험을 통해 얻은 확률을 기반으로 생성된 여러 개의 문맥 모델(context model)을 통해 이진 산술 부호화하는 방법이다. 본 명세서에서 문맥 모델은 컨텍스트 모델이라 기술될 수 있다. 먼저, 심볼이 이진 형태가 아닐 경우, 인코더는 exp-Golomb 등을 사용하여 각 심볼을 이진화한다. 이진화된 0 또는 1은 빈(bin)으로 기술될 수 있다. CABAC 초기화 과정은 문맥 초기화와 산술 코딩 초기화로 구분된다. 문맥 초기화는 각 심볼의 발생 확률을 초기화하는 과정으로, 심볼의 종류, 양자화 파라미터(QP), 슬라이스 타입(I, P, B 인지)에 따라 결정된다. 이러한 초기화 정보를 가지는 문맥 모델은 실험을 통해 얻은 확률 기반 값을 사용할 수 있다. 문맥 모델은 현재 코딩하려는 심볼에 대한 LPS(Least Probable Symbol) 또는 MPS(Most Probable Symbol)의 발생 확률과 0과 1중에서 어떤 빈 값이 MPS에 해당되는지에 대한 정보(valMPS)를 제공한다. 문맥 인덱스(Context index, ctxIdx)를 통해 여러 개의 문맥 모델 중에서 하나가 선택되며, 문맥 인덱스는 현재 부호화할 블록의 정보 또는 주변 블록의 정보를 통해 유도될 수 있다. 문맥 모델에서 선택된 확률 모델을 기반으로 이진 산술 코딩을 위한 초기화가 수행된다. 이진 산술 부호화는 0과 1의 발생 확률을 통해 확률 구간으로 분할한 후, 처리할 빈에 해당하는 확률 구간이 다음에 처리될 빈에 대한 전체 확률 구간이 되는 과정을 통해 부호화가 진행된다. 마지막 빈이 처리된 확률 구간 안의 위치 정보가 출력된다. 단, 확률 구간이 무한정 분할될 수 없으므로, 일정 크기 이내로 줄어들 경우에는 재규격화(renormalization)과정이 수행되어 확률 구간이 넓어지고 해당 위치 정보가 출력된다. 또한, 각 빈이 처리된 후, 처리된 빈의 정보를 통해 다음 처리될 빈에 대한 확률이 새롭게 설정되는 확률 업데이트 과정이 수행될 수 있다.
상기 생성된 비트스트림은 NAL(Network Abstraction Layer) 유닛을 기본 단위로 캡슐화 된다. NAL 유닛은 영상 데이터를 포함하는 VCL(Video Coding Layer) NAL 유닛과 영상 데이터를 디코딩하기 위한 파라미터 정보를 포함하는 non-VCL NAL 유닛으로 구분되며, 다양한 종류의 VCL 또는 non-VCL NAL 유닛이 존재한다. NAL 유닛은 NAL 헤더 정보와 데이터인 RBSP(Raw Byte Sequence Payload)로 구성되며, NAL 헤더 정보에는 RBSP에 대한 요약 정보가 포함된다. VCL NAL 유닛의 RBSP에는 부호화된 정수 개의 코딩 트리 유닛(coding tree unit)을 포함한다. 비디오 디코더에서 비트스트림을 복호화하기 위해서는 먼저 비트스트림을 NAL 유닛 단위로 분리한 후, 분리된 각각의 NAL 유닛을 복호화해야 한다. 한편, 비디오 신호 비트스트림의 복호화를 위해 필요한 정보들은 픽쳐 파라미터 세트(Picture Parameter Set, PPS), 시퀀스 파라미터 세트(Sequence Parameter Set, SPS), 비디오 파라미터 세트(Video Parameter Set, VPS) 등에 포함되어 전송될 수 있다.
한편, 도 1의 블록도는 본 발명의 일 실시예에 따른 인코딩 장치(100)를 나타낸 것으로서, 분리하여 표시된 블록들은 인코딩 장치(100)의 엘리먼트들을 논리적으로 구별하여 도시한 것이다. 따라서 전술한 인코딩 장치(100)의 엘리먼트들은 디바이스의 설계에 따라 하나의 칩으로 또는 복수의 칩으로 장착될 수 있다. 일 실시예에 따르면, 전술한 인코딩 장치(100)의 각 엘리먼트의 동작은 프로세서(미도시)에 의해 수행될 수 있다.
도 2는 본 발명의 일 실시예에 따른 비디오 신호 디코딩 장치(200)의 개략적인 블록도이다. 도 2를 참조하면 본 발명의 디코딩 장치(200)는 엔트로피 디코딩부(210), 역양자화부(220), 역변환부(225), 필터링부(230) 및 예측부(250)를 포함한다.
엔트로피 디코딩부(210)는 비디오 신호 비트스트림을 엔트로피 디코딩하여, 각 영역에 대한 변환 계수 정보, 인트라 부호화 정보, 인터 부호화 정보 등을 추출한다. 예를 들어, 엔트로피 디코딩부(210)는 비디오 신호 비트스트림으로부터 특정 영역의 변환 계수 정보에 대한 이진화 코드를 획득할 수 있다. 또한, 엔트로피 디코딩부(210)는 이진화 코드를 역 이진화하여 양자화된 변환 계수를 획득한다. 역양자화부(220)는 양자화된 변환 계수를 역양자화하고, 역변환부(225)는 역양자화된 변환 계수를 이용하여 레지듀얼 값을 복원한다. 비디오 신호 처리 장치(200)는 역변환부(225)에서 획득된 레지듀얼 값을 예측부(250)에서 획득된 예측 값과 합산하여 원래의 화소값을 복원한다.
한편, 필터링부(230)는 픽쳐에 대한 필터링을 수행하여 화질을 향상시킨다. 여기에는 블록 왜곡 현상을 감소시키기 위한 디블록킹 필터 및/또는 픽쳐 전체의 왜곡 제거를 위한 적응적 루프 필터 등이 포함될 수 있다. 필터링을 거친 픽쳐는 출력되거나 다음 픽쳐에 대한 참조 픽쳐로 이용하기 위하여 복호 픽쳐 버퍼(DPB, 256)에 저장된다.
예측부(250)는 인트라 예측부(252) 및 인터 예측부(254)를 포함한다. 예측부(250)는 전술한 엔트로피 디코딩부(210)를 통해 복호화된 부호화 타입, 각 영역에 대한 변환 계수, 인트라/인터 부호화 정보 등을 활용하여 예측 픽쳐를 생성한다. 복호화가 수행되는 현재 블록을 복원하기 위해서, 현재 블록이 포함된 현재 픽쳐 또는 다른 픽쳐들의 복호화된 영역이 이용될 수 있다. 복원에 현재 픽쳐만을 이용하는, 즉 인트라 예측 또는 인트라 BC 예측을 수행하는 픽쳐(또는, 타일/슬라이스)를 인트라 픽쳐 또는 I 픽쳐(또는, 타일/슬라이스), 인트라 예측, 인터 예측 및 인트라 BC 예측을 모두 수행할 수 있는 픽쳐(또는, 타일/슬라이스)를 인터 픽쳐(또는, 타일/슬라이스)라고 한다. 인터 픽쳐(또는, 타일/슬라이스) 중 각 블록의 샘플값들을 예측하기 위하여 최대 하나의 모션 벡터 및 참조 픽쳐 인덱스를 이용하는 픽쳐(또는, 타일/슬라이스)를 예측 픽쳐(predictive picture) 또는 P 픽쳐(또는, 타일/슬라이스)라고 하며, 최대 두 개의 모션 벡터 및 참조 픽쳐 인덱스를 이용하는 픽쳐(또는, 타일/슬라이스)를 쌍예측 픽쳐(Bi-predictive picture) 또는 B 픽쳐(또는, 타일/슬라이스) 라고 한다. 다시 말해서, P 픽쳐(또는, 타일/슬라이스)는 각 블록을 예측하기 위해 최대 하나의 모션 정보 세트를 이용하고, B 픽쳐(또는, 타일/슬라이스)는 각 블록을 예측하기 위해 최대 두 개의 모션 정보 세트를 이용한다. 여기서, 모션 정보 세트는 하나 이상의 모션 벡터와 하나의 참조 픽쳐 인덱스를 포함한다.
인트라 예측부(252)는 인트라 부호화 정보 및 현재 픽쳐 내의 복원된 샘플들을 이용하여 예측 블록을 생성한다. 전술한 바와 같이, 인트라 부호화 정보는 인트라 예측 모드, MPM(Most Probable Mode) 플래그, MPM 인덱스 중 적어도 하나를 포함할 수 있다. 인트라 예측부(252)는 현재 블록의 좌측 및/또는 상측에 위치한 복원된 샘플들을 참조 샘플들로 이용하여 현재 블록의 샘플 값들을 예측한다. 본 개시에서, 복원된 샘플들, 참조 샘플들 및 현재 블록의 샘플들은 픽셀들을 나타낼 수 있다. 또한, 샘플 값(sample value)들은 픽셀 값들을 나타낼 수 있다.
일 실시예에 따르면, 참조 샘플들은 현재 블록의 주변 블록에 포함된 샘플들일 수 있다. 예를 들어, 참조 샘플들은 현재 블록의 좌측 경계에 인접한 샘플들 및/또는 상측 경계에 인접한 샘플들일 수 있다. 또한, 참조 샘플들은 현재 블록의 주변 블록의 샘플들 중 현재 블록의 좌측 경계로부터 기 설정된 거리 이내의 라인 상에 위치하는 샘플들 및/또는 현재 블록의 상측 경계로부터 기 설정된 거리 이내의 라인 상에 위치하는 샘플들일 수 있다. 이때, 현재 블록의 주변 블록은 현재 블록에 인접한 좌측(L) 블록, 상측(A) 블록, 하좌측(Below Left, BL) 블록, 상우측(Above Right, AR) 블록 또는 상좌측(Above Left, AL) 블록 중 적어도 하나를 포함할 수 있다.
인터 예측부(254)는 복호 픽쳐 버퍼(256)에 저장된 참조 픽쳐 및 인터 부호화 정보를 이용하여 예측 블록을 생성한다. 인터 부호화 정보는 참조 블록에 대한 현재 블록의 모션 정보 세트(참조 픽쳐 인덱스, 모션 벡터 정보 등)를 포함할 수 있다. 인터 예측에는 L0 예측, L1 예측 및 쌍예측(Bi-prediction)이 있을 수 있다. L0 예측은 L0 픽쳐 리스트에 포함된 1개의 참조 픽쳐를 이용한 예측이고, L1 예측은 L1 픽쳐 리스트에 포함된 1개의 참조 픽쳐를 이용한 예측을 의미한다. 이를 위해서는 1세트의 모션 정보(예를 들어, 모션 벡터 및 참조 픽쳐 인덱스)가 필요할 수 있다. 쌍예측 방식에서는 최대 2개의 참조 영역을 이용할 수 있는데, 이 2개의 참조 영역은 동일한 참조 픽쳐에 존재할 수도 있고, 서로 다른 픽쳐에 각각 존재할 수도 있다. 즉, 쌍예측 방식에서는 최대 2세트의 모션 정보(예를 들어, 모션 벡터 및 참조 픽쳐 인덱스)가 이용될 수 있는데, 2개의 모션 벡터가 동일한 참조 픽쳐 인덱스에 대응될 수도 있고 서로 다른 참조 픽쳐 인덱스에 대응될 수도 있다. 이때, 참조 픽쳐들은 현재 픽쳐를 기준으로 시간적으로 이전 또는 이후에 위치하는 픽쳐로서, 이미 복원된 완료된 픽쳐가 될 수 있다. 일 실시예에 따라, 쌍예측 방식에서는 사용되는 2개의 참조 영역은 L0 픽쳐 리스트 및 L1 픽쳐 리스트 각각에서 선택된 영역일 수 있다.
인터 예측부(254)는 모션 벡터 및 참조 픽쳐 인덱스를 이용하여 현재 블록의 참조 블록을 획득할 수 있다. 상기 참조 블록은 참조 픽쳐 인덱스에 대응하는 참조 픽쳐 내에 존재한다. 또한, 모션 벡터에 의해서 특정된 블록의 샘플 값 또는 이의 보간(interpolation)된 값이 현재 블록의 예측자(predictor)로 이용될 수 있다. 서브펠(sub-pel) 단위의 픽셀 정확도를 갖는 모션 예측을 위하여 이를 테면, 휘도 신호에 대하여 8-탭 보간 필터가, 색차 신호에 대하여 4-탭 보간 필터가 사용될 수 있다. 다만, 서브펠 단위의 모션 예측을 위한 보간 필터는 이에 한정되지 않는다. 이와 같이 인터 예측부(254)는 이전에 복원된 픽쳐로부터 현재 유닛의 텍스쳐를 예측하는 모션 보상(motion compensation)을 수행한다. 이때, 인터 예측부는 모션 정보 세트를 이용할 수 있다.
추가적인 실시예에 따라, 예측부(250)는 IBC 예측부(미도시)를 포함할 수 있다. IBC 예측부는 현재 픽쳐 내의 복원된 샘플들을 포함하는 특정 영역을 참조하여 현재 영역을 복원할 수 있다. IBC 예측부는 엔트로피 디코딩부(210)로부터 획득된 IBC 부호화 정보를 이용하여 IBC 예측을 수행할 수 있다. IBC 부호화 정보는 블록 벡터 정보를 포함할 수 있다.
상기 인트라 예측부(252) 또는 인터 예측부(254)로부터 출력된 예측값, 및 역변환부(225)로부터 출력된 레지듀얼 값이 더해져서 복원된 비디오 픽쳐가 생성된다. 즉, 비디오 신호 디코딩 장치(200)는 예측부(250)에서 생성된 예측 블록과 역변환부(225)로부터 획득된 레지듀얼을 이용하여 현재 블록을 복원한다.
한편, 도 2의 블록도는 본 발명의 일 실시예에 따른 디코딩 장치(200)를 나타낸 것으로서, 분리하여 표시된 블록들은 디코딩 장치(200)의 엘리먼트들을 논리적으로 구별하여 도시한 것이다. 따라서 전술한 디코딩 장치(200)의 엘리먼트들은 디바이스의 설계에 따라 하나의 칩으로 또는 복수의 칩으로 장착될 수 있다. 일 실시예에 따르면, 전술한 디코딩 장치(200)의 각 엘리먼트의 동작은 프로세서(미도시)에 의해 수행될 수 있다.
한편, 본 명세서에서 제안된 기술은 인코더와 디코더의 방법 및 장치에 모두 적용 가능한 기술이며, 시그널링과 파싱으로 기술된 부분은 설명의 편의를 위해 기술한 것일 수 있다. 일반적으로 시그널링은 인코더 관점에서 각 신택스(syntax)를 부호화하기 위한 것이고, 파싱은 디코더 관점에서 각 신택스의 해석을 위한 것으로 설명될 수 있다. 즉, 각 신택스는 인코더로부터 비트스트림에 포함되어 시그널링될 수 있으며, 디코더에서는 신택스를 파싱하여 복원과정에서 사용할 수 있다. 이때, 규정된 계층적 구성대로 나열한 각 신택스에 대한 비트의 시퀀스를 비트스트림이라고 할 수 있다.
하나의 픽쳐는 서브 픽쳐(sub-picture), 슬라이스(slice), 타일(tile) 등으로 분할되어 부호화될 수 있다. 서브 픽쳐는 하나 이상의 슬라이스 또는 타일을 포함할 수 있다. 하나의 픽쳐가 여러 개의 슬라이스 또는 타일로 분할되어 부호화되었을 경우, 픽쳐 내의 모든 슬라이스 또는 타일이 디코딩이 완료되어야만 화면에 출력이 가능하다. 반면에, 하나의 픽쳐가 여러 개의 서브 픽쳐로 부호화되었을 경우, 임의의 서브 픽쳐만 디코딩되어 화면에 출력될 수 있다. 슬라이스는 여러 개의 타일 또는 서브 픽쳐를 포함할 수 있다. 또는 타일은 여러 개의 서브 픽쳐 또는 슬라이스를 포함할 수 있다. 서브 픽쳐, 슬라이스, 타일은 서로 독립적으로 인코딩 또는 디코딩이 가능하므로 병렬처리 및 처리 속도 향상에 효과적이다. 하지만, 인접한 다른 서브 픽쳐, 다른 슬라이스, 다른 타일의 부호화된 정보를 이용할 수 없으므로 비트량이 증가되는 단점이 있다. 서브 픽쳐, 슬라이스, 타일은 여러 개의 코딩 트리 유닛(Coding Tree Unit, CTU)으로 분할되어 부호화될 수 있다.
도 3은 픽쳐 내에서 코딩 트리 유닛(Coding Tree Unit, CTU)이 코딩 유닛들(Coding Units, CUs)로 분할되는 실시예를 도시한다. 비디오 신호의 코딩 과정에서, 픽쳐는 코딩 트리 유닛(CTU)들의 시퀀스로 분할될 수 있다. 코딩 트리 유닛은 휘도(luma) 코딩 트리 블록(Coding Tree Block, CTB)와 2개의 색차(chroma) 코딩 트리 블록들, 그리고 그것의 부호화된 신택스(syntax) 정보로 구성될 수 있다. 하나의 코딩 트리 유닛은 하나의 코딩 유닛으로 구성될 수 있으며, 또는 하나의 코딩 트리 유닛은 여러 개의 코딩 유닛으로 분할될 수 있다. 하나의 코딩 유닛은 휘도 코딩 블록(Coding Block, CB)과 2개의 색차 코딩 블록들, 그리고 그것의 부호화된 신택스 정보로 구성될 수 있다. 하나의 코딩 블록은 여러 개의 서브 코딩 블록으로 분할될 수 있다. 하나의 코딩 유닛은 하나의 변환 유닛(Transform Unit, TU)으로 구성될 수 있으며, 또는 하나의 코딩 유닛은 여러 개의 변환 유닛으로 분할될 수 있다. 하나의 변환 유닛은 휘도 변환 블록(Transform Block, TB)과 2개의 색차 변환 블록들, 그리고 그것의 부호화된 신택스 정보로 구성될 수 있다. 코딩 트리 유닛은 복수의 코딩 유닛들로 분할될 수 있다. 코딩 트리 유닛은 분할되지 않고 리프 노드가 될 수도 있다. 이 경우, 코딩 트리 유닛 자체가 코딩 유닛이 될 수 있다.
코딩 유닛은 상기에서 설명한 비디오 신호의 처리 과정, 즉 인트라/인터 예측, 변환, 양자화 및/또는 엔트로피 코딩 등의 과정에서 픽쳐를 처리하기 위한 기본 단위를 가리킨다. 하나의 픽쳐 내에서 코딩 유닛의 크기 및 모양은 일정하지 않을 수 있다. 코딩 유닛은 정사각형 또는 직사각형의 모양을 가질 수 있다. 직사각형 코딩 유닛(또는, 직사각형 블록)은 수직 코딩 유닛(또는, 수직 블록)과 수평 코딩 유닛(또는, 수평 블록)을 포함한다. 본 명세서에서, 수직 블록은 높이가 너비보다 큰 블록이며, 수평 블록은 너비가 높이보다 큰 블록이다. 또한, 본 명세서에서 정사각형이 아닌(non-square) 블록은 직사각형 블록을 가리킬 수 있지만, 본 발명은 이에 한정되지 않는다.
도 3을 참조하면, 코딩 트리 유닛은 먼저 쿼드 트리(Quad Tree, QT) 구조로 분할된다. 즉, 쿼드 트리 구조에서 2NX2N 크기를 가지는 하나의 노드는 NXN 크기를 가지는 네 개의 노드들로 분할될 수 있다. 본 명세서에서 쿼드 트리는 4진(quaternary) 트리로도 지칭될 수 있다. 쿼드 트리 분할은 재귀적으로 수행될 수 있으며, 모든 노드들이 동일한 깊이로 분할될 필요는 없다.
한편, 전술한 쿼드 트리의 리프 노드(leaf node)는 멀티-타입 트리(Multi-Type Tree, MTT) 구조로 더욱 분할될 수 있다. 본 발명의 실시예에 따르면, 멀티 타입 트리 구조에서는 하나의 노드가 수평 또는 수직 분할의 2진(binary, 바이너리) 또는 3진(ternary, 터너리) 트리 구조로 분할될 수 있다. 즉, 멀티-타입 트리 구조에는 수직 바이너리 분할, 수평 바이너리 분할, 수직 터너리 분할 및 수평 터너리 분할의 4가지 분할 구조가 존재한다. 본 발명의 실시예에 따르면, 상기 각 트리 구조에서 노드의 너비 및 높이는 모두 2의 거듭제곱 값을 가질 수 있다. 예를 들어, 바이너리 트리(Binary Tree, BT) 구조에서, 2NX2N 크기의 노드는 수직 바이너리 분할에 의해 2개의 NX2N 노드들로 분할되고, 수평 바이너리 분할에 의해 2개의 2NXN 노드들로 분할될 수 있다. 또한, 터너리 트리(Ternary Tree, TT) 구조에서, 2NX2N 크기의 노드는 수직 터너리 분할에 의해 (N/2)X2N, NX2N 및 (N/2)X2N의 노드들로 분할되고, 수평 터너리 분할에 의해 2NX(N/2), 2NXN 및 2NX(N/2)의 노드들로 분할될 수 있다. 이러한 멀티-타입 트리 분할은 재귀적으로 수행될 수 있다.
멀티-타입 트리의 리프 노드는 코딩 유닛이 될 수 있다. 코딩 유닛이 최대 변환 길이에 비해 크지 않은 경우, 해당 코딩 유닛은 더 이상의 분할 없이 예측 및/또는 변환의 단위로 사용될 수 있다. 일 실시예로서, 현재 코딩 유닛의 너비 또는 높이가 최대 변환 길이보다 큰 경우, 현재 코딩 유닛은 분할에 관한 명시적 시그널링 없이 복수의 변환 유닛으로 분할될 수 있다. 한편, 전술한 쿼드 트리 및 멀티-타입 트리에서 다음의 파라메터들 중 적어도 하나가 사전에 정의되거나 PPS, SPS, VPS 등과 같은 상위 레벨 세트의 RBSP를 통해 전송될 수 있다. 1) CTU 크기: 쿼드 트리의 루트 노드(root node) 크기, 2) 최소 QT 크기(MinQtSize): 허용된 최소 QT 리프 노드 크기, 3) 최대 BT 크기(MaxBtSize): 허용된 최대 BT 루트 노드 크기, 4) 최대 TT 크기(MaxTtSize): 허용된 최대 TT 루트 노드 크기, 5) 최대 MTT 깊이(MaxMttDepth): QT의 리프 노드로부터의 MTT 분할의 최대 허용 깊이, 6) 최소 BT 크기(MinBtSize): 허용된 최소 BT 리프 노드 크기, 7) 최소 TT 크기(MinTtSize): 허용된 최소 TT 리프 노드 크기.
도 4는 쿼드 트리 및 멀티-타입 트리의 분할을 시그널링하는 방법의 일 실시예를 도시한다. 전술한 쿼드 트리 및 멀티-타입 트리의 분할을 시그널링하기 위해 기 설정된 플래그들이 사용될 수 있다. 도 4를 참조하면, 노드의 분할 여부를 지시하는 플래그 'split_cu_flag', 쿼드 트리 노드의 분할 여부를 지시하는 플래그 'split_qt_flag', 멀티-타입 트리 노드의 분할 방향을 지시하는 플래그 'mtt_split_cu_vertical_flag' 또는 멀티-타입 트리 노드의 분할 모양을 지시하는 플래그 'mtt_split_cu_binary_flag' 중 적어도 하나가 사용될 수 있다.
본 발명의 실시예에 따르면, 현재 노드의 분할 여부를 지시하는 플래그인 'split_cu_flag'가 먼저 시그널링될 수 있다. 'split_cu_flag'의 값이 0인 경우, 현재 노드가 분할되지 않는 것을 나타내며, 현재 노드는 코딩 유닛이 된다. 현재 노드가 코팅 트리 유닛인 경우, 코딩 트리 유닛은 분할되지 않은 하나의 코딩 유닛을 포함한다. 현재 노드가 쿼드 트리 노드 'QT node'인 경우, 현재 노드는 쿼드 트리의 리프 노드 'QT leaf node'이며 코딩 유닛이 된다. 현재 노드가 멀티-타입 트리 노드 'MTT node'인 경우, 현재 노드는 멀티-타입 트리의 리프 노드 'MTT leaf node'이며 코딩 유닛이 된다.
'split_cu_flag'의 값이 1인 경우, 현재 노드는 'split_qt_flag'의 값에 따라 쿼드 트리 또는 멀티-타입 트리의 노드들로 분할될 수 있다. 코딩 트리 유닛은 쿼드 트리의 루트 노드이며, 쿼드 트리 구조로 우선 분할될 수 있다. 쿼드 트리 구조에서는 각각의 노드 'QT node' 별로 'split_qt_flag'가 시그널링된다. 'split_qt_flag'의 값이 1인 경우 해당 노드는 4개의 정사각형 노드들로 분할되며, 'split_qt_flag'의 값이 0인 경우 해당 노드는 쿼드 트리의 리프 노드 'QT leaf node'가 되며, 해당 노드는 멀티-타입 노드들로 분할된다. 본 발명의 실시예에 따르면, 현재 노드의 종류에 따라서 쿼드 트리 분할은 제한될 수 있다. 현재 노드가 코딩 트리 유닛(쿼트 트리의 루트 노드) 또는 쿼트 트리 노드인 경우에 쿼드 트리 분할이 허용될 수 있으며, 현재 노드가 멀티-타입 트리 노드인 경우 쿼트 트리 분할은 허용되지 않을 수 있다. 각각의 쿼드 트리 리프 노드 'QT leaf node'는 멀티-타입 트리 구조로 더 분할될 수 있다. 상술한 바와 같이, 'split_qt_flag'가 0인 경우 현재 노드는 멀티-타입 노드들로 분할될 수 있다. 분할 방향 및 분할 모양을 지시하기 위하여, 'mtt_split_cu_vertical_flag' 및 'mtt_split_cu_binary_flag'가 시그널링될 수 있다. 'mtt_split_cu_vertical_flag'의 값이 1인 경우 노드 'MTT node'의 수직 분할이 지시되며, 'mtt_split_cu_vertical_flag'의 값이 0인 경우 노드 'MTT node'의 수평 분할이 지시된다. 또한, 'mtt_split_cu_binary_flag'의 값이 1인 경우 노드 'MTT node'는 2개의 직사각형 노드들로 분할되며, 'mtt_split_cu_binary_flag'의 값이 0인 경우 노드 'MTT node'는 3개의 직사각형 노드들로 분할된다.
트리 분할 구조는 휘도 블록과 색차 블록이 동일한 형태로 분할될 수 있다. 즉, 색차 블록은 휘도 블록의 분할 형태를 참조하여 색차 블록을 분할할 수 있다. 현재 색차 블록이 임의의 정해진 크기보다 적다면, 휘도 블록이 분할되었더라도 색차 블록은 분할되지 않을 수 있다.
트리 분할 구조는 휘도 블록과 색차 블록이 서로 다른 형태를 가질 수 있다. 이때, 휘도 블록에 대한 분할 정보와 색차 블록에 대한 분할 정보가 각각 시그널링될 수 있다. 또한, 분할 정보 뿐만 아니라 휘도 블록과 색차 블록의 부호화 정보도 다를 수 있다. 실시 일 예로, 휘도 블록과 색차 블록의 인트라 부호화 모드, 움직임 정보에 대한 부호화 정보 등이 적어도 하나 이상 다를 수 있다.
가장 작은 단위로 분할될 노드는 하나의 코딩 블록으로 처리될 수 있다. 현재 블록이 코딩 블록일 경우, 코딩 블록은 여러 개의 서브 블록(서브 코딩 블록)으로 분할될 수 있으며, 각 서브 블록의 예측 정보는 서로 같거나 또는 다를 수 있다. 실시 일 예로, 코딩 유닛이 인트라 모드일 경우, 각 서브 블록의 인트라 예측 모드는 서로 같거나 또는 다를 수 있다. 또한, 코딩 유닛이 인터 모드일 경우, 각 서브 블록의 움직임 정보는 서로 같거나 또는 다를 수 있다. 또한, 각 서브 블록은 서로 독립적으로 인코딩 또는 디코딩이 가능할 수 있다. 각각의 서브 블록은 서브 블록 인덱스(sub-block index, sbIdx)를 통해 구분될 수 있다. 또한 코딩 유닛이 서브 블록으로 분할될 때, 수평 또는 수직 방향으로 분할되거나 사선으로 분할될 수 있다. 인트라 모드에서 현재 코딩 유닛을 수평 또는 수직 방향으로 2개 또는 4개의 서브 블록으로 분할하는 모드를 ISP(Intra Sub Partitions)이라 한다. 인터 모드에서 현재 코딩 블록을 사선으로 분할하는 모드를 GPM(Geometric partitioning mode)이라 한다. GPM모드에서 사선의 위치와 방향은 미리 정해진 각도 테이블을 사용하여 유도하고, 각도 테이블의 인덱스 정보가 시그널링된다.
코딩을 위한 픽쳐 예측(모션 보상)은 더 이상 나누어지지 않는 코딩 유닛(즉 코딩 트리 유닛의 리프 노드)을 대상으로 이루어진다. 이러한 예측을 수행하는 기본 단위를 이하에서는 예측 유닛(prediction unit) 또는 예측 블록(prediction block)이라고 한다.
이하, 본 명세서에서 사용되는 유닛이라는 용어는 예측을 수행하는 기본 단위인 상기 예측 유닛을 대체하는 용어로 사용될 수 있다. 다만, 본 발명이 이에 한정되는 것은 아니며, 더욱 광의적으로는 상기 코딩 유닛을 포함하는 개념으로 이해될 수 있다.
도 5 및 도 6은 본 발명의 실시예에 따른 인트라 예측 방법을 더욱 구체적으로 도시한다. 전술한 바와 같이, 인트라 예측부는 현재 블록의 좌측 및/또는 상측에 위치한 복원된 샘플들을 참조 샘플들로 이용하여 현재 블록의 샘플 값들을 예측한다.
먼저, 도 5는 인트라 예측 모드에서 현재 블록의 예측을 위해 사용되는 참조 샘플들의 일 실시예를 도시한다. 일 실시예에 따르면, 참조 샘플들은 현재 블록의 좌측 경계에 인접한 샘플들 및/또는 상측 경계에 인접한 샘플들일 수 있다. 도 5에 도시된 바와 같이, 현재 블록의 크기가 WXH이고 현재 블록에 인접한 단일 참조 라인(line)의 샘플들이 인트라 예측에 사용될 경우, 현재 블록의 좌측 및/또는 상측에 위치한 최대 2W+2H+1개의 주변 샘플들을 사용하여 참조 샘플들이 설정될 수 있다.
한편, 현재 블록의 인트라 예측을 위해 다중 참조 라인의 픽셀들이 사용될 수 있다. 다중 참조 라인은 현재 블록으로부터 기 설정된 범위 이내에 위치한 n개의 라인들로 구성될 수 있다. 일 실시예에 따르면, 인트라 예측을 위해 다중 참조 라인의 픽셀들이 사용될 경우, 참조 픽셀들로 설정될 라인들을 지시하는 별도의 인덱스 정보가 시그널링될 수 있으며, 이를 참조 라인 인덱스라고 명명할 수 있다.
또한, 참조 샘플로 사용될 적어도 일부의 샘플이 아직 복원되지 않은 경우, 인트라 예측부는 참조 샘플 패딩 과정을 수행하여 참조 샘플을 획득할 수 있다. 또한, 인트라 예측부는 인트라 예측의 오차를 줄이기 위해 참조 샘플 필터링 과정을 수행할 수 있다. 즉, 주변 샘플들 및/또는 참조 샘플 패딩 과정에 의해 획득된 참조 샘플들에 필터링을 수행하여 필터링된 참조 샘플들을 획득할 수 있다. 인트라 예측부는 이와 같이 획득된 참조 샘플들을 이용하여 현재 블록의 샘플들을 예측한다. 인트라 예측부는 필터링되지 않은 참조 샘플들 또는 필터링된 참조 샘플들을 이용하여 현재 블록의 샘플들을 예측한다. 본 개시에서, 주변 샘플들은 적어도 하나의 참조 라인 상의 샘플들을 포함할 수 있다. 예를 들어, 주변 샘플들은 현재 블록의 경계에 인접한 라인 상의 인접 샘플들을 포함할 수 있다.
다음으로, 도 6은 인트라 예측에 사용되는 예측 모드들의 일 실시예를 도시한다. 인트라 예측을 위해, 인트라 예측 방향을 지시하는 인트라 예측 모드 정보가 시그널링될 수 있다. 인트라 예측 모드 정보는 인트라 예측 모드 세트를 구성하는 복수의 인트라 예측 모드들 중 어느 하나를 지시한다. 현재 블록이 인트라 예측 블록일 경우, 디코더는 비트스트림으로부터 현재 블록의 인트라 예측 모드 정보를 수신한다. 디코더의 인트라 예측부는 추출된 인트라 예측 모드 정보에 기초하여 현재 블록에 대한 인트라 예측을 수행한다.
본 발명의 실시예에 따르면, 인트라 예측 모드 세트는 인트라 예측에 사용되는 모든 인트라 예측 모드들(예, 총 67개의 인트라 예측 모드들)을 포함할 수 있다. 더욱 구체적으로, 인트라 예측 모드 세트는 평면 모드, DC 모드 및 복수의(예, 65개의) 각도 모드들(즉, 방향 모드들)을 포함할 수 있다. 각각의 인트라 예측 모드는 기 설정된 인덱스(즉, 인트라 예측 모드 인덱스)를 통해 지시될 수 있다. 예를 들어, 도 6에 도시된 바와 같이 인트라 예측 모드 인덱스 0은 평면(planar) 모드를 지시하고, 인트라 예측 모드 인덱스 1은 DC 모드를 지시한다. 또한, 인트라 예측 모드 인덱스 2 내지 66은 서로 다른 각도 모드들을 각각 지시할 수 있다. 각도 모드들은 기 설정된 각도 범위 이내의 서로 다른 각도들을 각각 지시한다. 예를 들어, 각도 모드는 시계 방향으로 45도에서 -135도 사이의 각도 범위(즉, 제1 각도 범위) 이내의 각도를 지시할 수 있다. 상기 각도 모드는 12시 방향을 기준으로 정의될 수 있다. 이때, 인트라 예측 모드 인덱스 2는 수평 대각(Horizontal Diagonal, HDIA) 모드를 지시하고, 인트라 예측 모드 인덱스 18은 수평(Horizontal, HOR) 모드를 지시하고, 인트라 예측 모드 인덱스 34는 대각(Diagonal, DIA) 모드를 지시하고, 인트라 예측 모드 인덱스 50은 수직(Vertical, VER) 모드를 지시하며, 인트라 예측 모드 인덱스 66은 수직 대각(Vertical Diagonal, VDIA) 모드를 지시한다.
한편, 기 설정된 각도 범위는 현재 블록의 모양에 따라 서로 다르게 설정될 수 있다. 예를 들어, 현재 블록이 직사각형 블록일 경우 시계 방향으로 45도를 초과하거나 -135도 미만 각도를 지시하는 광각 모드가 추가적으로 사용될 수 있다. 현재 블록이 수평 블록일 경우, 각도 모드는 시계 방향으로 (45+offset1)도에서 (-135+offset1)도 사이의 각도 범위(즉, 제2 각도 범위) 이내의 각도를 지시할 수 있다. 이때, 제1 각도 범위를 벗어나는 각도 모드 67 내지 76이 추가적으로 사용될 수 있다. 또한, 현재 블록이 수직 블록일 경우, 각도 모드는 시계 방향으로 (45-offset2)도에서 (-135-offset2)도 사이의 각도 범위(즉, 제3 각도 범위) 이내의 각도를 지시할 수 있다. 이때, 제1 각도 범위를 벗어나는 각도 모드 -10 내지 -1이 추가적으로 사용될 수 있다. 본 발명의 실시예에 따르면, offset1 및 offset2의 값은 직사각형 블록의 너비와 높이 간의 비율에 따라 서로 다르게 결정될 수 있다. 또한, offset1 및 offset2는 양수일 수 있다.
본 발명의 추가적인 실시예에 따르면, 인트라 예측 모드 세트를 구성하는 복수의 각도 모드들은 기본 각도 모드와 확장 각도 모드를 포함할 수 있다. 이때, 확장 각도 모드는 기본 각도 모드에 기초하여 결정될 수 있다.
일 실시예에 따르면, 기본 각도 모드는 기존 HEVC(High Efficiency Video Coding) 표준의 인트라 예측에서 사용되는 각도에 대응하는 모드이고, 확장 각도 모드는 차세대 비디오 코덱 표준의 인트라 예측에서 새롭게 추가되는 각도에 대응하는 모드일 수 있다. 더욱 구체적으로, 기본 각도 모드는 인트라 예측 모드 {2, 4, 6, …, 66} 중 어느 하나에 대응하는 각도 모드이고, 확장 각도 모드는 인트라 예측 모드 {3, 5, 7, …, 65} 중 어느 하나에 대응하는 각도 모드일 수 있다. 즉, 확장 각도 모드는 제1 각도 범위 내에서 기본 각도 모드들 사이의 각도 모드일 수 있다. 따라서, 확장 각도 모드가 지시하는 각도는 기본 각도 모드가 지시하는 각도에 기초하여 결정될 수 있다.
다른 실시예에 따르면, 기본 각도 모드는 기 설정된 제1 각도 범위 이내의 각도에 대응하는 모드이고, 확장 각도 모드는 상기 제1 각도 범위를 벗어나는 광각 모드일 수 있다. 즉, 기본 각도 모드는 인트라 예측 모드 {2, 3, 4, …, 66} 중 어느 하나에 대응하는 각도 모드이고, 확장 각도 모드는 인트라 예측 모드 {-14, -13, -12, …, -1} 및 {67, 68, …, 80} 중 어느 하나에 대응하는 각도 모드일 수 있다. 확장 각도 모드가 지시하는 각도는 대응하는 기본 각도 모드가 지시하는 각도의 반대편 각도로 결정될 수 있다. 따라서, 확장 각도 모드가 지시하는 각도는 기본 각도 모드가 지시하는 각도에 기초하여 결정될 수 있다. 한편, 확장 각도 모드들의 개수는 이에 한정되지 않으며, 현재 블록의 크기 및/또는 모양에 따라 추가적인 확장 각도들이 정의될 수 있다. 한편, 인트라 예측 모드 세트에 포함되는 인트라 예측 모드들의 총 개수는 전술한 기본 각도 모드와 확장 각도 모드의 구성에 따라 가변할 수 있다.
상기 실시예에서, 확장 각도 모드들 간의 간격은 대응하는 기본 각도 모드들 간의 간격에 기초하여 설정될 수 있다. 예를 들어, 확장 각도 모드들 {3, 5, 7, …, 65} 간의 간격은 대응하는 기본 각도 모드들 {2, 4, 6, …, 66} 간의 간격에 기초하여 결정될 수 있다. 또한, 확장 각도 모드들 {-14, -13, …, -1} 간의 간격은 대응하는 반대편의 기본 각도 모드들 {53, 53, …, 66} 간의 간격에 기초하여 결정되고, 확장 각도 모드들 {67, 68, …, 80} 간의 간격은 대응하는 반대편의 기본 각도 모드들 {2, 3, 4, …, 15} 간의 간격에 기초하여 결정될 수 있다. 확장 각도 모드들 간의 각도 간격은 대응하는 기본 각도 모드들 간의 각도 간격과 동일하도록 설정될 수 있다. 또한, 인트라 예측 모드 세트에서 확장 각도 모드들의 개수는 기본 각도 모드들의 개수 이하로 설정될 수 있다.
본 발명의 실시예에 따르면, 확장 각도 모드는 기본 각도 모드를 기초로 시그널링될 수 있다. 예를 들어, 광각 모드(즉, 확장 각도 모드)는 제1 각도 범위 이내의 적어도 하나의 각도 모드(즉, 기본 각도 모드)를 대체할 수 있다. 대체되는 기본 각도 모드는 광각 모드의 반대편에 대응하는 각도 모드일 수 있다. 즉, 대체되는 기본 각도 모드는 광각 모드가 지시하는 각도의 반대 방향의 각도에 대응하거나 또는 상기 반대 방향의 각도로부터 기 설정된 오프셋 인덱스만큼 차이 나는 각도에 대응하는 각도 모드이다. 본 발명의 실시예에 따르면, 기 설정된 오프셋 인덱스는 1이다. 대체되는 기본 각도 모드에 대응하는 인트라 예측 모드 인덱스는 광각 모드에 다시 매핑되어 해당 광각 모드를 시그널링할 수 있다. 예를 들어, 광각 모드 {-14, -13, …, -1}은 인트라 예측 모드 인덱스 {52, 53, …, 66}에 의해 각각 시그널링될 수 있고, 광각 모드 {67, 68, …, 80}은 인트라 예측 모드 인덱스 {2, 3, …, 15}에 의해 각각 시그널링될 수 있다. 이와 같이 기본 각도 모드를 위한 인트라 예측 모드 인덱스가 확장 각도 모드를 시그널링하도록 함으로, 각 블록의 인트라 예측에 사용되는 각도 모드들의 구성이 서로 다르더라도 동일한 세트의 인트라 예측 모드 인덱스들이 인트라 예측 모드의 시그널링에 사용될 수 있다. 따라서, 인트라 예측 모드 구성의 변화에 따른 시그널링 오버헤드가 최소화될 수 있다.
한편, 확장 각도 모드의 사용 여부는 현재 블록의 모양 및 크기 중 적어도 하나에 기초하여 결정될 수 있다. 일 실시예에 따르면, 현재 블록의 크기가 기 설정된 크기보다 클 경우 확장 각도 모드가 현재 블록의 인트라 예측을 위해 사용되고, 그렇지 않을 경우 기본 각도 모드만 현재 블록의 인트라 예측을 위해 사용될 수 있다. 다른 실시예에 따르면, 현재 블록이 정사각형이 아닌 블록인 경우 확장 각도 모드가 현재 블록의 인트라 예측을 위해 사용되고, 현재 블록이 정사각형 블록인 경우 기본 각도 모드만 현재 블록의 인트라 예측을 위해 사용될 수 있다.
인트라 예측부는 현재 블록의 인트라 예측 모드 정보에 기초하여, 현재 블록의 인트라 예측에 사용될 참조 샘플들 및/또는 보간된 참조 샘플들을 결정한다. 인트라 예측 모드 인덱스가 특정 각도 모드를 지시할 경우, 현재 블록의 현재 샘플로부터 상기 특정 각도에 대응하는 참조 샘플 또는 보간된 참조 샘플이 현재 픽셀의 예측에 사용된다. 따라서, 인트라 예측 모드에 따라 서로 다른 세트의 참조 샘플들 및/또는 보간된 참조 샘플들이 인트라 예측에 사용될 수 있다. 참조 샘플들 및 인트라 예측 모드 정보를 이용하여 현재 블록의 인트라 예측이 수행되고 나면, 디코더는 역변환부로부터 획득된 현재 블록의 잔차 신호를 현재 블록의 인트라 예측 값과 더하여 현재 블록의 샘플 값들을 복원한다.
인터 예측에 사용되는 움직임(모션) 정보에는 참조 방향 지시 정보(inter_pred_idc), 참조 픽쳐 인덱스(ref_idx_l0, ref_idx_l1), 움직임(모션) 벡터(mvL0, mvL1)이 포함될 수 있다. 참조 방향 지시 정보에 따라 참조 픽쳐 리스트 활용 정보(predFlagL0, predFlagL1)가 설정될 수 있다. 실시 일 예로, L0 참조 픽쳐를 사용하는 단방향 예측인 경우, predFlagL0=1, predFlagL1=0로 설정될 수 있다. L1 참조 픽쳐를 사용하는 단방향 예측인 경우, predFlagL0=0, predFlagL1=1로 설정될 수 있다. L0와 L1 참조 픽쳐를 모두 사용하는 양방향 예측인 경우, predFlagL0=1, predFlagL1=1로 설정될 수 있다.
현재 블록이 코딩 유닛일 경우, 코딩 유닛은 여러 개의 서브 블록으로 분할될 수 있으며, 각 서브 블록의 예측 정보는 서로 같거나 또는 다를 수 있다. 실시 일 예로, 코딩 유닛이 인트라 모드일 경우, 각 서브 블록의 인트라 예측 모드는 서로 같거나 또는 다를 수 있다. 또한, 코딩 유닛이 인터 모드일 경우, 각 서브 블록의 움직임 정보는 서로 같거나 또는 다를 수 있다. 또한, 각 서브 블록은 서로 독립적으로 인코딩 또는 디코딩이 가능할 수 있다. 각각의 서브 블록은 서브 블록 인덱스(sub-block index, sbIdx)를 통해 구분될 수 있다.
현재 블록의 움직임 벡터는 주변 블록의 움직임 벡터와 유사할 가능성이 높다. 따라서, 주변 블록의 움직임 벡터는 움직임 예측 값(motion vector predictor, mvp)으로 사용될 수 있고, 현재 블록의 움직임 벡터는 주변 블록의 움직임 벡터를 이용하여 유도될 수 있다. 또한, 움직임 벡터의 정확성을 높이기 위해서, 인코더에서 원본 영상으로 찾은 현재 블록의 최적의 움직임 벡터와 움직임 예측 값 간의 움직임 벡터의 차이(motion vector difference, mvd)가 시그널링될 수 있다.
움직임 벡터는 다양한 해상도를 가질 수 있으며, 블록 단위로 움직임 벡터의 해상도가 달라질 수 있다. 움직임 벡터 해상도는 정수 단위, 반화소 단위, 1/4 화소 단위, 1/16 화소 단위, 4의 정수 화소 단위 등으로 표현될 수 있다. 스크린 콘텐츠와 같은 영상은 문자와 같은 단순한 그래픽 형태이므로 보간(interpolation) 필터를 적용하지 않아도 되므로, 정수 단위와 4의 정수 화소 단위가 블록 단위 선택적으로 적용될 수 있다. 회전 및 스케일을 표현할 수 있는 어파인(Affine) 모드로 부호화된 블록은 형태의 변화가 심하므로, 정수 단위, 1/4 화소 단위, 1/16 화소 단위가 블록 기반 선택적으로 적용될 수 있다. 블록 단위로 움직임 벡터 해상도를 선택적으로 적용할 지에 대한 여부 정보는 amvr_flag으로 시그널링된다. 만일 적용되는 경우, 어떠한 움직임 벡터 해상도를 현재 블록에 적용할지는 amvr_precision_idx으로 시그널링된다.
양방향 예측이 적용되는 블록의 경우, 가중치 평균을 적용할 때 2개의 예측 블록 간의 가중치를 같거나 또는 다르게 적용할 수 있으며, 가중치에 대한 정보는 bcw_idx를 통해 시그널링된다.
움직임 예측 값의 정확도를 높이기 위해서, 머지(Merge) 또는 AMVP(dvanced motion vector prediction) 방법이 블록 단위 선택적으로 사용될 수 있다. Merge 방법은 현재 블록의 움직임 정보를 현재 블록에 인접한 주변 블록의 움직임 정보와 동일하게 구성하는 방법으로, 동질성을 갖는 움직임 영역에서 움직임 정보가 변화없이 공간적으로 전파됨으로써 움직임 정보의 부호화 효율을 증가시키는 장점이 있다. 반면에 AMVP 방법은 정확한 움직임 정보를 표현하기 위해 L0 및 L1 예측 방향으로 각각 움직임 정보를 예측하고 가장 최적의 움직임 정보를 시그널링하는 방법이다. 디코더는 AMVP 또는 Merge 방법을 통해 현재 블록에 대한 움직임 정보를 유도한 후, 참조 픽쳐(reference picture)에서 유도한 움직임 정보에 위치한 참조 블록을 현재 블록을 위한 예측 블록으로 사용한다.
Merge 또는 AMVP에서 움직임 정보를 유도하는 방법은 현재 블록의 주변 블록으로부터 유도된 움직임 정보의 예측 값을 사용하여 움직임 후보 리스트를 구성한 후, 최적의 움직임 후보에 대한 인덱스 정보가 시그널링되는 방법일 수 있다. AMVP의 경우, L0와 L1 각각 움직임 후보 리스트가 유도되므로, L0와 L1 각각에 대한 최적의 움직임 후보 인덱스(mvp_l0_flag, mvp_l1_flag)가 시그널링된다. Merge의 경우, 하나의 움직임 후보 리스트가 유도되므로, 하나의 머지 인덱스(merge_idx)가 시그널링된다. 하나의 코딩 유닛에서 유도되는 움직임 후보 리스트는 다양할 수 있으며, 각 움직임 후보 리스트마다 움직임 후보 인덱스 또는 머지 인덱스가 시그널링될 수 있다. 이때, Merge 모드로 부호화된 블록에서 잔여 블록에 대한 정보가 없는 모드를 머지 스킵(MergeSkip) 모드라고 할 수 있다.
SMVD(Symmetric MVD)는 양방향 예측(bi-directional prediction)의 경우에, L0 방향과 L1 방향의 MVD(Motion Vector Difference) 값이 대칭을 이루도록 하여 전송되는 움직임 정보의 비트량을 줄이는 방법이다. L0 방향과 대칭을 이루는 L1 방향의 MVD 정보는 전송하지 않으며, 더불어 L0 및 L1 방향의 참조 픽쳐 정보도 전송하지 않고 복호화 과정에서 유도한다.
OBMC(Overlapped Block Motion Compensation)는 블록 간의 움직임 정보가 서로 다른 경우, 주변 블록들의 움직임 정보를 사용하여 현재 블록에 대한 예측 블록들을 생성한 후, 예측 블록들을 가중치 평균하여 현재 블록에 대한 최종 예측 블록을 생성하는 방법이다. 이는 움직임 보상된 영상의 블록 경계에서 발생되는 블록킹 현상을 줄여주는 효과가 있다.
일반적으로 머지 움직임 후보는 움직임의 정확도가 낮다. 이러한 머지 움직임 후보의 정확도를 높이기 위해서, MMVD(Merge mode with MVD) 방법이 사용될 수 있다. MMVD 방법은 몇 개의 움직임 차분 값 후보들 중에서 선택된 하나의 후보를 이용하여 움직임 정보를 보정하는 방법이다. MMVD 방법을 통해 획득되는 움직임 정보의 보정 값에 대한 정보(예를 들어, 움직임 차분 값 후보들 중에서 선택된 하나의 후보를 지시하는 인덱스 등)은 비트스트림에 포함되어 디코더로 전송될 수 있다. 기존의 움직임 정보 차분 값을 비트스트림에 포함하는 것에 비해 움직임 정보의 보정 값에 대한 정보를 비트스트림에 포함함으로써 비트량을 절약할 수 있다.
TM(Template Matching) 방법은 현재 블록의 주변 화소를 통해 템플릿을 구성하여 템플릿과 가장 유사도가 높은 매칭 영역을 찾아서 움직임 정보를 보정하는 방법이다. TM(Template matching)은 부호화되는 비트스트림의 크기를 줄이기 위해서, 움직임 정보를 비트스트림에 포함하지 않고 디코더에서 움직임 예측을 수행하는 방법이다. 이때, 디코더는 원본 영상이 없으므로 이미 복원된 주변 블록을 사용하여 현재 블록에 대한 움직임 정보를 개략적으로 유도할 수 있다.
DMVR(Decoder-side Motion Vector Refinement) 방법은 조금 더 정확한 움직임 정보를 찾기 위해 이미 복원된 참조 영상들의 상관성을 통해 움직임 정보를 보정하는 방법으로써, 현재 블록의 양방향 움직임 정보를 사용하여 2개의 참조 픽쳐의 임의의 정해진 영역 내에서 참조 픽쳐 내의 참조 블록 간의 가장 매칭이 잘되는 지점을 새로운 양방향 움직임으로 사용하는 방법이다. 이러한 DMVR이 수행될 때, 인코더는 하나의 블록 단위에서 DMVR을 수행하여 움직임 정보를 보정한 후, 다시 블록을 서브 블록으로 분할하여 각 서브 블록 단위에서 DMVR을 수행하여 서브 블록의 움직임 정보를 다시 보정할 수 있으며, 이를 MP-DMVR(Multi-pass DMVR)이라 할 수 있다.
LIC(Local Illumination Compensation) 방법은 블록 간의 휘도 변화를 보상하는 방법으로, 현재 블록에 인접한 주변 화소들을 사용하여 선형 모델을 유도한 후, 선형 모델을 통해 현재 블록의 휘도 정보를 보상하는 방법이다.
기존 비디오 부호화 방법들은 상하좌우의 평행 이동만을 고려한 움직임 보상을 수행하기 때문에, 현실에서 일반적으로 접하는 확대, 축소, 회전 등과 같은 움직임 포함하고 있는 비디오들의 부호화 시 부호화 효율이 저하된다. 이러한 확대, 축소, 회전에 대한 움직임을 표현하기 위하여, 4개(회전) 또는 6개(확대, 축소, 회전) 파라미터 모델을 이용하는 Affine 모델 기반 움직임 예측 기술이 적용될 수 있다.
BDOF(Bi-Directional Optical Flow)는 양방향 움직임으로 구성된 블록의 참조 블록으로부터 광-흐름(optical-flow) 기반으로 화소의 변화량을 추정하여 예측 블록을 보정하는데 사용된다. 이러한 VVC의 BDOF에서 유도된 움직임 정보를 이용하여 현재 블록의 움직임을 보정할 수 있다.
PROF(Prediction refinement with optical flow)는 서브 블록 단위 Affine 움직임 예측의 정확도를 픽셀 단위 움직임 예측의 정확도와 유사하도록 개선하기 위한 기술이다. PROF는 BDOF와 유사하게 광-흐름(optical-flow)에 기반하여 서브 블록 단위로 Affine 움직임 보상된 픽셀 값들에 대해 픽셀 단위로 보정 값을 계산하여 최종 예측 신호를 획득하는 기술이다.
CIIP(Combined Inter-/Intra-picture Prediction)방법은 현재 블록에 대한 예측 블록을 생성할 때, 화면 내 예측 방법으로 생성한 예측 블록과 화면 간 예측 방법으로 생성한 예측 블록들을 가중치 평균하여 최종 예측 블록을 생성하는 방법이다.
IBC(Intra Block Copy) 방법은 현재 블록과 가장 유사한 부분을 현재 픽쳐 내의 이미 복원된 영역에서 찾아서, 해당 참조 블록을 현재 블록에 대한 예측 블록으로 사용하는 방법이다. 이때, 현재 블록과 참조 블록 간의 거리인 블록 벡터(Block Vector)와 관련된 정보는 비트스트림에 포함될 수 있다. 디코더는 비스트스림에 포함된 블록 벡터와 관련된 정보를 파싱하여 현재 블록을 위한 블록 벡터를 계산하거나 설정할 수 있다.
BCW(Bi-prediction with CU-level Weights) 방법은 서로 다른 참조 픽쳐로 부터 움직임 보상된 두 개의 예측 블록에 대하여, 평균으로 예측 블록을 생성하지 않고, 블록 단위로 적응적으로 가중치를 적용하여 움직임 보상된 두 개의 예측 블록에 가중치 평균을 수행하는 방법이다.
MHP(Multi-hypothesis prediction) 방법은 화면 간 예측 시 단방향 및 양방향 움직임 정보에 추가적인 움직임 정보를 전송함으로써, 다양한 예측 신호를 통한 가중치 예측을 수행하는 방법이다.
CCLM(Cross-component linear model)은 휘도 신호와 해당 휘도 신호와 동일한 위치에 있는 색차 신호 간의 높은 상관성을 이용하여 선형 모델을 구성한 후, 해당 선형 모델을 통해 색차 신호를 예측하는 방법이다. 현재 블록에 인접한 주변 블록 중에서 복원이 완료된 블록을 사용하여 템플릿을 구성한 후, 템플릿을 통해 선형 모델에 대한 파라미터가 유도된다. 다음으로, 영상 포맷에 따라 선택적으로 색차 블록의 크기에 맞게 복원된 현재 휘도 블록이 다운 샘플링된다. 마지막으로, 다운 샘플링된 휘도 성분 블록(샘플과 해당 선형 모델을 이용하여 현재 블록의 색차 성분 블록을 예측한다. 이때, 2개 이상의 선형 모델을 사용하는 방법을 MMLM(Multi-model Linear mode)이라고 한다.
CCCM(Convolutional cross-component model)은 휘도 신호와 해당 휘도 신호와 동일한 위치에 있는 색차 신호 간의 높은 상관성을 이용하여 비선형 모델을 구성한 후, 해당 비선형 모델을 통해 색차 신호를 예측하는 방법이다.
GLM(Gradient Linear Model)은 CCLM과 같은 선형 모델에서 휘도 샘플의 기울기를 추가로 반영하여 모델을 구성한 후, 해당 모델을 통해 색차 신호를 예측하는 방법이다.독립 스칼라 양자화(independent scalar quantization)에서, 입력된 계수 tk에 대한 복원된 계수 t'k는 관련된 양자화 인덱스(quantization index) qk에만 의존적이다. 즉, 임의의 복원된 계수에 대한 양자화 인덱스(quantization index)는 다른 복원된 계수들에 대한 양자화 인덱스들과는 다른 값을 가진다. 이때 t'k는 tk에서 양자화 오차가 포함된 값일 수 있으며, 양자화 파라미터에 따라 서로 다르거나 또는 같을 수 있다. 여기서, t'k는 복원된 변환 계수 또는 역양자화된 변환계수라고 명명할 수 있으며, 양자화 인덱스를 양자화된 변환 계수라고 명명할 수도 있다.
균일 복원 양자화(URQ; Uniform Reconstruction Quantizers)에서, 복원된 계수들은 동일한 간격으로 배치되는 특성을 지닌다. 이때 인접하는 두 복원 값들 사이의 거리를 양자화 단계 크기(quantization step size)라고 할 수 있다. 복원된 값 중에는 0을 포함할 수 있으며, 사용 가능한 복원 값들의 전체 집합(set)은 양자화 단계 크기에 따라 고유하게 정의될 수 있다. 양자화 단계 크기는 양자화 파라미터에 따라 달라질 수 있다.
기존 방법에서는 양자화로 인해 허용 가능한 복원된 변환 계수들의 집합(세트)이 감소하며, 이러한 집합의 원소(element)는 유한 개일 수 있다. 이로 인해, 원본 영상과 복원된 영상 간의 평균적인 오차를 최소화하는데 한계가 존재한다. 이러한 평균적인 오차를 최소화하기 위한 방법으로 벡터 양자화(Vector Quantization)를 사용할 수 있다.
비디오 부호화에서 사용되는 간단한 형태의 벡터 양자화 방법에는 부호 데이터 은닉(sign data hiding)이 있다. 이는 인코더에서 0이 아닌 하나의 계수에 대한 부호를 부호화하지 않고, 디코더에서는 해당 계수에 대한 부호를 모든 계수들에 대한 절대값의 합이 짝수인지 또는 홀수인지에 따라 결정하는 방법이다. 이를 위해 인코더에서는 적어도 하나의 계수가 '1'이 증가되거나 또는 감소될 수 있으며, 이는 율-왜곡(rate-distortion)에 대한 비용(Cost) 관점에서 최적이 되도록 적어도 하나의 계수가 선택되어 값이 조정될 수 있다. 실시 일 예로, 양자화 간격의 경계에 가까운 값을 가지는 계수가 선택될 수 있다.
또 다른 벡터 양자화 방법에는 트렐리스 부호화된 양자화(Trellis-Coded Quantization)가 있으며, 비디오 부호화에서는 종속 양자화(dependent quantization)에서 최적화된 양자화 값을 얻기 위한 최적의 경로 탐색 기법으로 활용된다. 블록 단위로, 블록 내 모든 계수들에 대한 양자화 후보들을 트렐리스 그래프에 배치하고, 최적화된 양자화 후보들 간의 최적의 트렐리스 경로를 율-왜곡(rate-distortion)에 대한 비용(Cost)을 고려하여 탐색한다. 구체적으로, 비디오 부호화에 적용된 종속 양자화는 변환 계수에 대한 허용 가능한 복원된 변환 계수들의 집합이 복원 순서에서 현재 변환 계수에 선행하는 변환 계수의 값에 의존하도록 설계될 수 있다. 이때, 여러 개의 양자화기를 변환 계수에 따라 선택적으로 사용하게 함으로써, 원본 영상과 복원된 영상 간의 평균적인 오차를 최소화하여 부호화 효율을 높이는 효과가 있다.
인트라 예측 부호화 기술 중에서 MIP(Matrix Intra Prediction) 방법은 행렬 기반 인트라 예측 방법으로 현재 블록에 인접한 주변 블록의 픽셀로부터 방향성을 가지는 예측 방법과 달리, 주변 블록의 좌측 및 상단의 픽셀들을 미리 정의된 행렬 매트릭스와 오프셋 값을 이용하여 예측 신호를 구하는 방법이다.
현재 블록의 인트라 예측 모드를 유도하기 위해서, 현재 블록에 인접하면서 복원된 임의의 영역인 템플릿(template)을 기반으로, 해당 템플릿의 주변 픽셀을 통해 유도된 템플릿에 대한 인트라 예측 모드가 현재 블록의 복원을 위해 이용할 수 있다. 우선, 디코더는 템플릿에 인접한 주변 픽셀(reference)을 이용하여 템플릿에 대한 예측 템플릿을 생성하고, 이미 복원된 템플릿과 가장 유사한 예측 템플릿을 생성한 인트라 예측 모드를 현재 블록의 복원을 위해 사용할 수 있다. 이러한 방법을 TIMD(Template intra mode derivation)이라고 할 수 있다.
일반적으로 인코더는 예측 블록을 생성하기 위한 예측 모드를 결정하여 결정된 예측 모드에 대한 정보가 포함된 비트스트림을 생성할 수 있다. 디코더는 수신한 비트스트림을 파싱하여 인트라 예측 모드를 설정할 수 있다. 이때, 예측 모드에 대한 정보의 비트량은 전체 비트스트림 크기의 10% 정도일 수 있다. 예측 모드에 대한 정보의 비트량을 감소시키기 위해 인코더는 비트스트림에 인트라 예측 모드에 대한 정보를 포함하지 않을 수 있다. 이에, 디코더는 주변 블록의 특성을 이용하여 현재 블록의 복원을 위한 인트라 예측 모드를 유도(결정)할 수 있고, 유도된 인트라 예측 모드를 이용하여 현재 블록을 복원할 수 있다. 이때, 디코더는 인트라 예측 모드를 유도하기 위해 현재 블록에 인접한 주변 화소(픽셀)들마다 소벨(Sobel) 필터를 가로 및 세로 방향으로 적용하여 방향성 정보를 유추한 후, 해당 방향성 정보를 인트라 예측 모드로 매핑하는 방법을 이용할 수 있다. 디코더가 주변 블록을 이용하여 인트라 예측 모드를 유도하는 방법은 DIMD(Decoder side intra mode derivation)로 기술될 수 있다.
도 7은 인터 예측에서 움직임 후보 리스트를 구성하기 위해 사용되는 주변 블록들의 위치를 나타낸 도면이다.
주변 블록들은 공간적인 위치의 블록이거나 시간적인 위치의 블록일 수 있다. 현재 블록에 공간적으로 인접한 주변 블록은 좌측(Left, A1) 블록, 좌하측(Left Below, A0) 블록, 상측(Above, B1) 블록, 상우측(Above Right, B0) 블록 또는 상좌측(Above Left, B2) 블록 중 적어도 하나가 될 수 있다. 현재 블록에 시간적으로 인접한 주변 블록은 대응되는 픽쳐(Collocated picture)에서 현재 블록의 하우측(bottom Right, BR) 블록의 좌상단 픽셀 위치를 포함하는 블록이 될 수 있다. 상기 현재 블록에 시간적으로 인접한 주변 블록이 인트라 모드로 부호화되거나 상기 현재 블록에 시간적으로 인접한 주변 블록이 사용할 수 없는 위치에 존재하면, 현재 픽쳐에 대응되는 픽쳐(Collocated picture)에서 현재 블록의 가로 및 세로의 중앙(Center, Ctr) 픽셀 위치를 포함하는 블록이 시간적 주변 블록으로 사용될 수 있다. 대응되는 픽쳐에서 유도된 움직임 후보 정보는 TMVP(Temporal Motion Vector Predictor)라 지칭될 수 있다. TMVP는 하나의 블록에서 하나만 유도될 수 있고, 하나의 블록을 여러 개의 서브 블록으로 분할한 후, 각 서브 블록마다 각각의 TMVP 후보가 유도될 수 있다. 서브 블록 단위의 TMVP 유도 방법은 sbTMVP(sub-block Temporal Motion Vector Predictor)로 지칭될 수 있다.
본 명세서에서 설명하는 방법들이 적용될 것인지 여부는 슬라이스 타입 정보 (예, I 슬라이스, P 슬라이스, B 슬라이스 인지 여부), 타일인지 여부, 서브 픽쳐인지 여부, 현재 블록의 크기, 코딩 유닛의 깊이, 현재 블록이 휘도 블록인지 색차 블록인지 여부, 참조 프레임인지 비참조 프레임인지 여부, 참조 순서 및 계층에 따른 시간적인 계층 등에 대한 정보들 중 적어도 어느 하나에 기초하여 결정될 수 있다. 본 명세서에서 설명하는 방법들이 적용될 것인지 여부를 결정하기 위해 사용되는 정보들은 디코더 및 인코더 간 미리 약속된 정보일 수 있다. 또한, 이러한 정보들은 프로파일 및 레벨에 따라 결정되어 있을 수 있다. 이러한 정보들은 변수 값으로 표현될 수 있고, 비트스트림에는 변수 값에 대한 정보가 포함될 수 있다. 즉, 디코더는 비트스트림에 포함된 변수 값에 대한 정보를 파싱하여 상술한 방법들이 적용되는지 여부를 결정할 수 있다. 예를 들어, 코딩 유닛의 가로의 길이 또는 세로의 길이에 기초하여 본 명세서에서 설명하는 방법들이 적용될 것인지 여부가 결정될 수 있다. 가로의 길이 또는 세로의 길이가 32 이상(예, 32, 64, 128 등)이면 상술한 방법들은 적용될 수 있다. 또한 가로의 길이 또는 세로의 길이가 32 보다 작은 경우(예, 2, 4, 8, 16)에 본 명세서에서 설명하는 방법들이 적용될 수 있다. 또한 가로의 길이 또는 세로의 길이가 4 또는 8인 경우 본 명세서에서 설명하는 방법들이 적용될 수 있다.
잔차 신호는 원본 신호와 화면간 예측 또는 화면내 예측을 통해 생성한 예측 신호의 차이에 대한 신호일 수 있다. 잔차 신호에 대한 에너지는 픽셀 도메인 전 영역에 분산되어 있을 수 있다. 따라서, 디코더가 잔차 신호의 픽셀 값 자체를 부호화하는 경우, 압축 효율이 떨어지는 문제가 발생할 수 있다. 이에 변환 부호화를 이용하여 픽셀 도메인의 잔차 신호의 에너지를 주파수 도메인의 저주파 영역으로 집중시키는 과정이 필요하다.
HEVC (high efficiency video coding) 표준에서는 신호가 픽셀 도메인에서 고르게 분포하는 경우(이웃하는 픽셀 값이 유사한 경우)에 효율적인 DCT-II (discrete cosine transform type-II)를 대부분 사용하고, 화면내 예측된 4x4 블록에만 DST-VII (discrete sine transform type-VII)을 한정적으로 사용하여 픽셀 도메인의 잔차 신호를 주파수 영역으로 변환하였다. DCT-II 변환의 경우, 화면간 예측을 통해 생성한 잔차 신호 (픽셀 도메인에서 에너지가 고르게 분포하는 경우)에 적합할 수 있으나, 화면내 예측을 통해 생성한 잔차 신호의 경우, 현재 부호화 유닛 주변의 복원된 참조 샘플을 사용하여 예측하는 화면내 예측의 특성 상, 참조 샘플과 멀어질수록 잔차 신호의 에너지가 증가하는 경향을 보일 수 있으므로 DCT-II 변환만을 사용하는 경우, 높은 부호화 효율을 달성할 수 없다.
도 8은 본 명세서의 일 실시예에 따른 CCLM이 수행되는 방법을 나타내는 도면이다.
도 8을 참조하면 현재 블록에 인접한 주변 블록 중에서 복원이 완료된 블록을 사용하여 템플릿이 구성될 수 있다. 비디오 신호 처리 장치(예, 디코더, 인코더)는 템플릿을 이용하여 선형 모델에 대한 파라미터를 유도할 수 있다. 영상 포맷에 따라 선택적으로 색차 성분 블록의 크기에 맞게 복원된 휘도 성분 블록(샘플)이 다운 샘플링될 수 있다. 비디오 신호 처리 장치는 다운 샘플링된 휘도 성분 블록(샘플)과 선형 모델을 이용하여 현재 블록의 색차 성분 블록(샘플)을 예측할 수 있다. 이때, 2개 이상의 선형 모델이 사용될 수 있는데, 2개 이상의 선형 모델이 사용되는 방법은 MMLM(Multi-model Linear mode)이라 기술될 수 있다.
도 9는 본 명세서의 일 실시예에 따른 선형 모델의 유도를 위해 사용되는 템플릿을 나타내는 도면이다.
비디오 신호 처리 장치는 현재 블록에 인접한 주변 샘플들 중에서 일부만을 이용하여 선형 모델에 대한 파라미터를 유도할 수 있다. 도 9의 짙은 회색으로 표현된 부분이 선형 모델에 대한 파라미터 유도를 위해 사용되는 샘플의 위치일 수 있다. 4:2:0 포맷의 경우 색차 성분 블록은 휘도 성분 블록의 1/4 크기이다. 따라서, 휘도 성분 샘플과 색차 성분 샘플 간의 1:1 매칭을 위해서 다운 샘플링된 휘도 성분 샘플이 선형 모델에 대한 파라미터 유도를 위해 사용될 수 있다. 다운 샘플링된 휘도 성분 샘플을 유도하기 위해 2가지 타입의 필터가 사용될 수 있다. 인코더는 어떠한 타입의 필터가 사용되는지에 대한 필터 타입 정보를 포함하는 비트스트림을 획득할 수 있다. 또한, 어떠한 단위에서 필터가 사용되는지에 따라(예를 들어, SPS 레벨, PPS 레벨, 픽쳐 헤더(Picture Header, PH)레벨, 슬라이스 레벨, 타일 레벨, CU 레벨, 서브-블록 레벨 등) 필터의 타입(타입 1 또는 타입 2)이 결정될 수 있다. 디코더는 비트스트림에 포함되는 필터 타입 정보를 파싱하여 적응적으로 휘도 성분 샘플을 유도하기 위한 필터의 타입을 결정/설정할 수 있다. 도 9의 타입 1은 6개의 샘플을 사용하여 상측 샘플 중 가운데 휘도 성분 샘플을 유도하는 방법이다. 비디오 신호 처리 장치는 도 9의 A 위치에 타입 1을 적용하여 다운 샘플링된 휘도 성분 샘플을 생성할 수 있다. 도 9의 타입 2는 5개 샘플을 사용하여 5개 샘플 중 정 가운데 위치의 휘도 성분 샘플을 유도하는 방법이다. 비디오 신호 처리 장치는 C 위치에 타입 2를 적용하여 다운 샘플링된 휘도 성분 샘플을 생성할 수 있다. 선형 모델에 대한 파라미터를 유도하기 위해 사용되는 템플릿은 다운 샘플링된 휘도 성분 샘플로 구성될 수 있다. 이하에서 템플릿을 구성하는 방법에 대해 설명한다.
또한, 비디오 신호 처리 장치는 현재 휘도 성분 블록 내의 샘플을 참조하여 다운 샘플링된 휘도 성분 샘플로 템플릿을 구성할 수 있다. 도 9의 B 위치를 참조하면 다운 샘플링된 휘도 성분 샘플을 생성하기 위해 타입 1이 사용되는 경우 상측 3개 샘플은 현재 블록에 인접한 주변 블록의 샘플일 수 있고, 하측 3개 샘플(901)은 현재 블록 내의 복원된 휘도 성분 블록의 샘플일 수 있다. 이때, 최종 생성되는 휘도 성분 샘플의 위치는 도 9의 B의 빗금 친 위치(902)일 수 있다. 다운 샘플링된 휘도 성분 샘플을 생성하기 위해 타입 2가 도 9의 D 위치에 사용되는 경우에도 마찬가지이다. 즉, 도 9의 D의 X 위치 샘플(903)은 현재 블록 내의 복원된 휘도 성분 블록의 샘플일 수 있고, 나머지 4개의 샘플들은 현재 블록에 인접한 주변 블록의 샘플일 수 있다. 이때, 최종 생성되는 휘도 성분 샘플의 위치는 도 9의 D의 빗금 친 위치(904)일 수 있다.
또한, 비디오 신호 처리 장치는 현재 휘도 성분 블록 내의 샘플을 제외한 주변 블록의 샘플만을 참조하여 다운 샘플링된 휘도 성분 샘플로 템플릿을 구성할 수 있다. 도 9의 B 위치를 참조하면 다운 샘플링된 휘도 성분 샘플을 생성하기 위해 타입 1이 사용되는 경우 비디오 신호 처리 장치는 상측 3개 샘플만(즉, 현재 블록 내의 복원된 휘도 성분 샘플(901)은 제외)을 사용하여 다운 샘플링된 휘도 성분 샘플을 획득하고, 템플릿을 구성할 수 있다. 이때, 최종 생성되는 휘도 성분 샘플의 위치는 도 9의 B의 빗금 친 위치(902)일 수 있다. 다운 샘플링된 휘도 성분 샘플을 생성하기 위해 타입 2가 도 9의 D 위치에 사용되는 경우에도 마찬가지이다. 즉, 비디오 신호 처리 장치는 현재 휘도 성분 블록 내의 샘플(도 9의 D의 X 위치 샘플(903))을 제외한 나머지 4개의 샘플들(현재 블록에 인접한 주변 샘플)을 이용하여 다운 샘플링된 휘도 성분 샘플을 획득하고, 템플릿을 구성할 수 있다. 이때, 최종 생성되는 휘도 성분 샘플의 위치는 도 9의 D의 빗금 친 위치(904)일 수 있다.
또한, 도 9를 참조하면 비디오 신호 처리 장치는 현재 블록에 인접한 1개 라인을 포함하여 연속된 3개 라인을 이용하여 다운 샘플링된 휘도 샘플을 생성할 수 있다. 이때, 현재 블록의 상단 경계가 CTU 경계일 경우, 비디오 신호 처리 장치는 라인 버퍼 상의 메모리 절약을 위해 현재 블록에 가장 인접한 1개 라인만을 사용하여 템플릿을 구성할 수 있다. 타입 1, 타입 2의 필터가 적용될 수 있도록, 인접한 1개 라인(1번째 라인)의 샘플들은 2번째 라인과 3번째 라인으로 패딩될 수 있다. 또는 1번째 라인의 샘플에 임의의 가중치가 적용된 값으로 2번째 라인과 3번째 라인으로 패딩될 수 있다.
현재 블록의 인접한 샘플들 중 효율이 좋은 위치에 존재하는 샘플들이 템플릿에 포함될 수 있다. 구체적으로, 템플릿은 현재 블록의 좌측 주변 샘플들, 상측 주변 샘플들 중에서 효율이 좋은 샘플들을 포함할 수 있다. 이때, 인코더는 어떠한 샘플들이 포함되는지에 대한 정보를 포함하는 비스트스트림을 획득할 수 있다. 그리고 디코더는 어떠한 샘플들이 포함되는지에 대한 정보를 파싱하여 템플릿을 구성할 수 있다. 이러한 어떠한 샘플들이 포함되는지에 대한 정보를 비트스트림에 포함하여 시그널링하는 방법은 비트량을 증가되는 문제가 있다. 이하에서는, 어떠한 샘플들이 템플릿에 포함되는지 암묵적으로 결정하는 방법에 대해 설명한다.
현재 블록의 인트라 예측 방향성 모드에 기초하여 템플릿에 포함되는 샘플들의 위치가 결정될 수 있다. 즉, 인트라 예측 방향성 모드가 현재 블록의 상측 샘플들과 가까운 방향이거나 임의의 정해진 제1 모드일 경우, 상측 샘플들만이 템플릿에 포함될 수 있다. 인트라 예측 방향성 모드가 현재 블록의 좌측 샘플들 가까운 방향이거나 임의의 정해진 제2 모드일 경우, 좌측 샘플들만이 템플릿에 포함될 수 있다. 이때, 제1 모드는 50보다 큰 인덱스에 대응되는 인트라 예측 방향성 모드일 수 있다. 제2 모드는 18보다 작은 인덱스에 대응되는 인트라 예측 방향성 모드일 수 있다. 또한, 인트라 예측 방향성 모드가 인덱스 18 이상 50 이하의 인덱스에 대응되는 인트라 예측 방향성 모드인 경우, 템플릿은 현재 블록의 상측 샘플들 및 현재 블록의 좌측 샘플들을 모두 포함할 수 있다.
정확한 템플릿을 구성하기 위해서는 보다 높은 화질로 복원된 샘플이 필요할 수 있다. 따라서, 현재 블록의 좌측에 인접한 주변 블록을 복원할 때 사용한 양자화 파라미터 값과 현재 블록의 상측에 인접한 주변 블록을 복원할 때 사용한 양자화 파라미터 값을 비교하여 템플릿은 구성될 수 있다. 예를 들어, 현재 블록의 좌측에 인접한 주변 블록을 복원할 때 사용한 양자화 파라미터 값과 현재 블록의 상측에 인접한 주변 블록을 복원할 때 사용한 양자화 파라미터 값 중 작은 양자화 파라미터 값을 사용한 주변 블록의 샘플들을 포함하는 템플릿이 구성될 수 있다. 반대로, 현재 블록의 좌측에 인접한 주변 블록을 복원할 때 사용한 양자화 파라미터 값과 현재 블록의 상측에 인접한 주변 블록을 복원할 때 사용한 양자화 파라미터 값 중 큰 양자화 파라미터 값을 사용한 주변 블록의 샘플들을 포함하는 템플릿이 구성될 수 있다. 현재 블록의 좌측에 인접한 주변 블록을 복원할 때 사용한 양자화 파라미터 값과 현재 블록의 상측에 인접한 주변 블록을 복원할 때 사용한 양자화 파라미터 값이 동일한 경우, 현재 블록의 좌측에 인접한 주변 블록의 샘플들 및 현재 블록의 상측에 인접한 주변 블록의 샘플들을 포함하는 템플릿이 구성될 수 있다. 또한, 현재 블록의 좌측에 인접한 주변 블록을 복원할 때 사용한 양자화 파라미터 값과 현재 블록의 상측에 인접한 주변 블록을 복원할 때 사용한 양자화 파라미터 값의 차이가 기 설정된 값 이내인 경우, 현재 블록의 좌측에 인접한 주변 블록의 샘플들 및 현재 블록의 상측에 인접한 주변 블록의 샘플들을 포함하는 템플릿이 구성될 수 있다.
또한, 템플릿에 포함되는 샘플들은 현재 블록의 크기(예를 들어, 현재 블록의 가로와 세로의 곱(즉, 샘플 수))를 특정 값과 비교하여 결정될 수 있다. 현재 블록의 크기가 특정 값보다 작은 경우 현재 블록의 좌측 주변 샘플들 및 현재 블록의 상측 주변 샘플들이 템플릿에 포함될 수 있다. 반대로, 현재 블록의 크기가 특정 값보다 같거나 큰 경우 현재 블록의 좌측 주변 샘플들 및 현재 블록의 상측 주변 샘플들이 템플릿에 포함될 수 있다. 특정 값은 현재 블록의 가로 또는 세로의 크기의 합에 기초하여 결정되는 값으로 1 이상의 정수일 수 있다.
또한, 현재 블록의 가로와 세로의 길이의 비율에 따라 템플릿에 포함되는 샘플들이 결정될 수 있다. 예를 들어 현재 블록의 가로의 길이가 세로의 길이보다 긴 경우, 현재 블록의 좌측(또는 상측) 주변 샘플들이 템플릿에 포함될 수 있다. 반대로, 현재 블록의 가로의 길이가 세로의 길이보다 짧은 경우, 현재 블록의 상측(또는 좌측) 주변 샘플들이 템플릿에 포함될 수 있다. 현재 블록의 가로의 길이와 세로의 길이가 동일한 경우, 현재 블록의 좌측 주변 샘플들 및 상측 주변 샘플들이 템플릿에 포함될 수 있다.
또한, 현재 블록의 좌측 및 상측 주변 블록에 CCLM, MMLM이 적용되었는지 여부에 기초하여 템플릿은 결정될 수 있다. CCLM, MMLM이 적용된 블록의 샘플들이 템플릿에 포함될 수 있다. 예를 들어, 현재 블록의 좌측 주변 블록은 CCLM, MMLM이 적용되지 않고, 현재 블록의 상측 주변 블록은 CCLM, MMLM이 적용된 경우, 현재 블록의 상측 주변 샘플들이 템플릿에 포함될 수 있다.
또한, 참조 샘플 패딩이 수행된 개수에 기초하여 템플릿에 포함되는 샘플들이 결정될 수 있다. 예를 들어, 현재 블록의 좌측 주변 블록의 샘플들 중에서 참조 샘플 패딩이 수행된 샘플 수가 특정 개수 이상인 경우, 현재 블록의 좌측 주변 샘플은 템플릿에 포함되지 않을 수 있다. 즉, 현재 블록의 상측 주변 샘플이 템플릿에 포함될 수 있다. 마찬가지로, 현재 블록의 상측 주변 블록의 샘플들 중에서 참조 샘플 패딩이 수행된 샘플 수가 특정 개수 이상인 경우, 현재 블록의 상측 주변 샘플은 템플릿에 포함되지 않을 수 있다. 즉, 현재 블록의 좌측 주변 샘플이 템플릿에 포함될 수 있다. 이때, 특정 개수는 1이상의 정수 일 수 있다. 한편, 현재 블록의 상측 주변 샘플 및 좌측 주변 샘플 모두 템플릿에 포함되지 않는 경우, 좌측 및 상단 템플릿이 모두 참조할 수 없음으로 설정된 경우에는 현재 블록에 CCLM, MMLM이 적용되지 않을 수 있다. 또한, 디코더는 좌측 및 상단 템플릿이 모두 참조할 수 없음으로 설정된 경우에는 현재 블록에 CCLM, MMLM과 관련된 정보를 파싱하지 않고, 현재 블록에 CCLM, MMLM이 사용되지 않음으로 설정할 수 있다.
한편, 상술한 방법 등을 적용하여 구성되는 템플릿에 포함되는 샘플들의 개수가 임의의 개수보다 작은 경우 또는 현재 블록의 크기가 특정 크기 이하인 경우, 현재 블록의 색차 성분 블록의 예측을 위한 선형 모델은 미리 정의된 기본 파라미터가 적용된 선형 모델일 수 있다. 샘플들의 개수가 작을 경우, 선형 모델이 유도되기 어렵기 때문이다. 이때, 임의의 개수 및 특정 크기는 1 이상의 정수일 수 있다. 또는 상기 샘플들의 개수가 임의의 개수보다 작은 경우 또는 현재 블록의 크기가 특정 크기 이하인 경우, 현재 블록에 CCLM, MMLM이 적용되지 않을 수 있다. 또한, 디코더는 상기 샘플들의 개수가 임의의 개수보다 작은 경우 또는 현재 블록의 크기가 특정 크기 이하인 경우, 현재 블록에 CCLM, MMLM과 관련된 정보를 파싱하지 않고, 현재 블록에 CCLM, MMLM이 사용되지 않음으로 설정할 수 있다.
템플릿에 포함되는 현재 블록의 주변 샘플들은 디블록킹 필터링이 적용되기 전의 샘플일 수 있다. 또는, 현재 블록에 LMCS(Luma Mapping with Chroma Scaling)가 적용되는 경우, 현재 블록의 주변 샘플들은 역매핑 전의 샘플들이거나 역매핑이 수행된 샘플들일 수 있다.
비디오 신호 처리 장치는 템플릿을 이용하여 선형 모델에 대한 파라미터를 유도할 수 있다. 블록 당 1개 이상의 선형 모델이 사용될 수 있고, 블록 마다 몇 개의 선형 모델이 사용될지에 대한 정보는 비트스트림에 포함될 수 있다. 디코더에서는 블록 마다 몇 개의 선형 모델이 사용될지에 대한 정보를 파싱하여 현재 블록에 대한 선형 모델들을 유도하는데 사용할 수 있다. 선형 모델을 유도하는 방법은 Least-Mean-Square (LMS) 방법과 min/max 방법 등이 있을 수 있다. 이하에서 선형 모델을 유도하는 방법에 대해 설명한다.
먼저, min/max 방법에 대해 설명한다. 비디오 신호 처리 장치는 템플릿 내 미리 약속된 위치의 4개의 색차 샘플들 중 작은 2개 샘플에 대한 값(X0 A, X1 A)과 큰 2개 샘플에 대한 값(X0 B, X1 B)을 먼저 결정한다. 그리고, 비디오 신호 처리 장치는 템플릿 내 미리 약속된 위치의 4개 샘플에 각각 대응되는 휘도 샘플의 값(Y0 A, Y1 A, Y0 B, Y1 B)을 사용하여, 작은 값들의 평균(Xa, Ya)과 큰 값들의 평균(Xb, Yb)이 유도할 수 있다. 이때, 작은 값들의 평균(Xa, Ya)과 큰 값들의 평균(Xb, Yb)을 유도하기 위해 수학식 1이 사용될 수 있다. 수학식 1을 참조하면, Xa는 템플릿 내 미리 약속된 위치의 4개 샘플들 중 작은 2개 샘플에 대한 값 (X0 A, X1 A)의 평균일 수 있다. Ya는 템플릿 내 미리 약속된 위치의 4개 샘플들 중 작은 2개 샘플에 대한 값(X0 A, X1 A)에 각각 대응되는 휘도 샘플의 값인 Y0 A, Y1 A의 평균일 수 있다. Xb는 템플릿 내 미리 약속된 위치의 4개 샘플들 중 큰 2개 샘플에 대한 값(X0 B, X1 B)의 평균일 수 있다. Yb는 템플릿 내 미리 약속된 위치의 4개 샘플들 중 큰 2개 샘플에 대한 값(X0 B, X1 B)에 각각 대응되는 휘도 샘플의 값인 Y0 B, Y1 B의 평균일 수 있다. 비디오 신호 처리 장치는 선형 모델 파라미터 α, β를 수학식 2를 이용하여 계산할 수 있다. 비디오 신호 처리 장치는 선형 모델 파라미터(α, β)와 (다운 샘플링된) 휘도 샘플 값(recL')을 사용하여 색차 블록의 각 샘플 값(predc)을 계산하여 색차 블록을 예측할 수 있다. 색차 블록의 각 샘플 값은 수학식 3과 같이 계산될 수 있다. 수학식 3의 (i, j)는 현재 블록의 좌-상단 샘플의 좌표를 (0, 0)이라 하였을 때의 좌표를 의미할 수 있다. 즉 predc(i, j)는 (i, j)위치의 색차 블록의 샘플 값을 의미할 수 있다.
Figure PCTKR2022019116-appb-img-000001
Figure PCTKR2022019116-appb-img-000002
Figure PCTKR2022019116-appb-img-000003
다음으로, LMS 방법에 대해 설명한다. 비디오 신호 처리 장치는 LMS 방법에 따라 선형 모델 파라미터 α, β를 수학식 4와 수학식 5와 같이 계산할 수 있다. 수학식 4, 5의 RecC(i)와 Rec'L(i)는 각각 템플릿에서의 색차 샘플과 다운 샘플링된 휘도 샘플의 값을 의미하고, I는 템플릿 내의 샘플 개수를 의미한다. 예를 들어, 템플릿 내 샘플은 도 9의 회색으로 표시된 위치의 샘플일 수 있다. 비디오 신호 처리 장치는 수학식 4, 5를 통해 획득되는 α, β를 수학식 3에 적용하여 색차 블록의 각 샘플 값(predc)을 계산하여 색차 블록을 예측할 수 있다. α는 분수로 표시될 수 있다.
Figure PCTKR2022019116-appb-img-000004
Figure PCTKR2022019116-appb-img-000005
선형 모델(CCLM, MMLM) 모드의 부호화 효율을 향상시키기 위해서, 비디오 신호 처리 장치는 하나의 선형 모델만이 아닌 2개 이상의 선형 모델을 사용할 수 있다. 즉, 비디오 신호 처리 장치는 기존의 하나의 선형 모델만을 사용하는 CCLM 모드와 2개 이상의 선형 모델을 사용하는 MMLM 모드를 혼합하여 사용할 수 있다. 이때, CCLM 모드가 사용되는지 MMLM 모드가 사용되는지 여부와 관련된 정보는 비트스트림에 포함될 수 있고, CCLM 모드가 사용되는지 MMLM 모드가 사용되는지 여부는 CU 단위로 결정될 수 있다.
도 10은 본 명세서의 일 실시예에 따른 2개의 선형 모델을 유도하는 방법을 나타내는 도면이다.
다수의 선형 모델이 사용되는 경우, 비디오 신호 처리 장치의 계산 복잡도가 증가할 수 있으므로, 이하에서는 2개의 선형 모델이 사용되는 경우에 대해서 설명한다.
도 10을 참조하면 비디오 신호 처리 장치는 하나의 템플릿을 이용하여 2개의 선형 모델을 유도하기 위한 샘플을 선택할 수 있다. 이때, 샘플은 임계치에 기초하여 선택될 수 있다. 임계치는 템플릿 내 복원된 휘도 성분 샘플들의 평균 값이거나, 이를 이용하여 획득되는 값일 수 있다. 임계치를 사용한 2개의 선형 모델은 수학식 6과 같을 수 있다. 수학식 6의 [x, y]는 현재 블록의 좌-상단 샘플의 좌표를 (0, 0)이라 하였을 때의 좌표를 의미할 수 있다. 즉 Predc[x, y]는 (x, y)위치의 색차 블록의 샘플 값을 의미할 수 있다. Rec'L(i)는 템플릿에서의 다운 샘플링된 휘도 샘플을 의미할 수 있다.
Figure PCTKR2022019116-appb-img-000006
이하에서 2개의 선형 모델에 대한 파라미터(α1, α2, β1, β2)를 유도하기 위한 방법에 대해 설명한다.
비디오 신호 처리 장치는 템플릿 내의 휘도 성분 샘플들에 대한 평균 값과 템플릿 내의 색차 성분 샘플들에 대한 평균 값을 획득(계산)할 수 있다. 이때, 휘도 성분 샘플들에 대한 평균 값과 색차 성분 샘플들에 대한 평균 값은 각 템플릿의 샘플 수에 기초하여 확정된 범위의 스케일된 샘플들의 평균 값일 수 있다. 이는 2개의 선형 모델을 보다 정확하게 구분하기 위함이다. 템플릿 내 휘도 성분 샘플들에 대한 평균 값은 다운 샘플링된 휘도 성분 샘플 또는 다운 샘플링되기 전의 휘도 성분 샘플들을 이용하여 계산될 수 있다. 또한, 다운 샘플링된 휘도 성분 샘플과 다운 샘플링되기 전의 휘도 성분 샘플들 중에서 어떠한 샘플이 사용되는지는 SPS 레벨, PPS 레벨, 픽쳐 헤더(Picture Header, PH)레벨, 슬라이스 레벨, 타일 레벨, CU 레벨, 서브-블록 레벨에 따라 달라질 수 있다. 디코더는 비트스트림에 포함된 다운 샘플링된 휘도 성분 샘플과 다운 샘플링되기 전의 휘도 성분 샘플들 중에서 어떠한 샘플이 사용되는지를 나타내는 정보를 파싱하여 적응적으로 다운 샘플링된 휘도 성분 샘플과 다운 샘플링되기 전의 휘도 성분 샘플들 중에서 어떠한 샘플이 사용되는지를 결정/설정할 수 있다. 선형 모델에 대한 파라미터는 기본 값으로 설정될 수 있다. 예를 들어, α1 및 α2는 0으로 설정되고, β1 및 β2는 현재 영상 포맷의 범위의 최대 값의 절반으로 설정될 수 있다. 영상 포맷의 범위의 최대 값이 8비트인 경우, β1 및 β2는 128로 설정될 수 있다. 또한, 스케일된 값을 원래대로 복원하기 위한 shift 값은 '0'으로 설정될 수 있다. 템플릿 내의 샘플 수가 임의의 정해진 개수보다 작을 경우, 상기 기본 파라미터로 설정되는 2개의 선형 모델이 선택될 수 있다. 임의의 정해진 개수는 1 이상의 정수로, 예를 들어 4일 수 있다. 한편, 템플릿 내 휘도 성분 샘플들에 대한 스케일된 평균 값을 기준으로 휘도 샘플들 각각과 동일한 위치의 색차 샘플들은 2개의 그룹으로 나누어질 수 있다. 이때, 각 그룹 내 샘플들의 수는 2의 배수일 수 있다. 2의 배수가 아니라면 비디오 신호 처리 장치는 각 그룹 내 샘플들의 수가 2의 배수가 되도록 주변 샘플을 이용한 패딩을 수행할 수 있다. 각 그룹 내 샘플들의 수가 임의의 정해진 개수보다 작을 경우, 패딩은 수행되지 않을 수 있다. 비디오 신호 처리 장치는 각 그룹마다 선형 모델에 대한 파라미터를 수학식 4와 수학식 5를 이용하여 계산할 수 있다. 각 그룹 내의 샘플의 수가 임의의 정해진 개수보다 작을 경우, 템플릿 내 색차 성분 샘플들에 대한 평균 값에서 템플릿 내 휘도 성분 샘플들에 대한 평균 값을 뺀 차이 값이 선형 모델에 대한 파라미터 β일 수 있다. 또한, 각 그룹 내의 샘플의 수가 임의의 정해진 개수보다 작을 경우, 1개의 선형 모델만 유도되어 사용될 수 있다. 임의의 정해진 개수는 1 이상의 정수로, 예를 들어 4일 수 있다.
MMLM이 적용될 때 비디오 신호 처리 장치는 보다 정확한 선형 모델에 대한 파라미터를 유도하기 위해서 후술하는 방법을 사용할 수 있다.
선형 모델을 유도하기 위한 임계치는 현재 블록에 인접한 주변 블록의 템플릿 내 휘도 성분 샘플의 평균 값 대신 현재 블록 내의 복원된 휘도 성분 샘플의 평균 값에 기초하여 획득(계산)될 수 있다. 또는 선형 모델을 유도하기 위한 임계치는 현재 블록 내의 복원된 휘도 성분 샘플들의 평균 값과 템플릿 내 휘도 성분 샘플들의 평균 값을 평균한 값에 기초하여 획득(계산)될 수 있다. 컬러 포맷에 따라 현재 블록 내의 복원된 휘도 성분 샘플들의 평균 값은 다운 샘플링 된 휘도 성분 블록의 샘플들에 대한 평균 값일 수 있다. 또는 선형 모델을 유도하기 위한 임계치는 템플릿 내 휘도 성분 샘플들의 평균 값 대신 템플릿 내 색차 성분 샘플들의 평균 값에 기초하여 획득(계산)될 수 있다. 이때, 2개의 색차 성분(Cb 성분, Cr 성분) 각각에 대한 2개의 선형 모델이 유도될 수 있다. 색차 성분의 각각에 대한 선형 모델을 유도하기 위해 템플릿 내 각 색차 성분 샘플들의 평균 값이 사용될 수 있다. 현재 블록 내의 복원된 휘도 성분 샘플에 대한 2개의 선형 모델을 적용하기 위한 임계치는 템플릿 내 색차 성분 샘플들의 평균 값을 사용하여 2개로 분류될 수 있다. 인코더는 임계치에 대한 정보를 포함하는 비트스트림을 획득할 수 있다. 디코더는 임계치에 대한 정보를 파싱하여 2개 선형 모델을 유도하기 위한 임계치를 획득할 수 있다. 이때, 임계치에 대한 정보는 임계치를 직접 지시할 수도 있다. 그러나, 임계치를 직접 지시하는 경우 비트량이 증가하는 문제가 있으므로, 임계치에 대한 정보는 기 설정된 테이블의 인덱스를 나타낼 수 있다. 즉, 하나 이상의 인덱스에 각각 매핑되는 임계치들에 대한 테이블이 미리 설정되고, 임계치에 대한 정보는 하나 이상의 인덱스 중 어느 하나의 인덱스를 지시할 수 있다. 디코더는 임계치에 대한 정보가 지시하는 인덱스에 대응되는 임계치를 사용할 수 있다. 테이블에 포함되는 임계치들은 미리 정의된 값이거나 주변 블록들에 사용된 임계치를 포함할 수 있다. 테이블에 포함되는 임계치들은 미리 정해진 개수(예, 1개 이상)의 임계치들일 수 있고, FIFO(First in, First out) 형식을 통해 구성될 수 있다. 즉 현재 블록의 주변 블록에 사용된 임계치가 테이블에 포함되는 방식으로 테이블은 구성될 수 있다. 임계치에 대한 정보는 각 블록 단위로 시그널링될 수 있고, 각 블록 단위로 임계치는 적용될 수 있다. 이때 각 블록 단위에 대한 정보는 비트스트림에 포함되어 시그널링될 수 있다. 디코더는 블록 단위에 대한 정보를 파싱하여 각 블록 단위로 임계치를 설정할 수 있다.
이하에서는 색차 성분 블록의 예측 위해 몇 개(1개 또는 2개)의 선형 모델이 사용되는지 결정하는 방법에 대해 구체적으로 설명한다.
i) 현재 휘도 성분 블록의 샘플들을 구성하기 위한 참조 라인 인덱스가 1보다 같거나 큰 경우, 디코더는 1개의 선형 모델을 이용하여 색차 성분 블록을 예측할 수 있다. 현재 블록이 선형적으로 변화하는 블록일 가능성이 높기 때문이다. ii) 현재 휘도 성분 블록의 샘플들을 구성하는데 사용한 참조 라인 인덱스가 0인 경우(현재 블록에 인접한 라인 상에서 샘플들이 구성된 경우), 디코더는 1개 또는 2개의 선형 모델을 이용하여 색차 성분 블록을 예측할 수 있다. 즉, 디코더는 CCLM 및 MMLM과 관련된 신택스 요소(예를 들어, 임계치에 대한 정보, CCLM 모드가 사용되는지 MMLM 모드가 사용되는지 여부와 관련된 정보, 블록 마다 몇 개의 선형 모델이 사용될지에 대한 정보 등)의 파싱 여부를 참조 라인 인덱스에 기초하여 결정할 수 있다. 디코더는 참조 라인 인덱스가 1보다 같거나 크면 CCLM 및 MMLM과 관련된 신택스 요소를 파싱하지 않을 수 있다. 디코더는 참조 라인 인덱스가 1과 같거나 크면 색차 성분 블록의 예측을 위해 1개의 선형 모델을 이용하는 CCLM이 사용되는 것으로 추론할 수 있다. CCLM 및 MMLM과 관련된 신택스(예를 들어, 임계치에 대한 정보, CCLM 모드가 사용되는지 MMLM 모드가 사용되는지 여부와 관련된 정보, 블록 마다 몇 개의 선형 모델이 사용될지에 대한 정보 등)는 비트스트림에 포함되지 않을 수 있다. 인코더는 참조 라인 인덱스가 0이면 CCLM 및 MMLM과 관련된 신택스 요소(예를 들어, 임계치에 대한 정보, CCLM 모드가 사용되는지 MMLM 모드가 사용되는지 여부와 관련된 정보, 블록 마다 몇 개의 선형 모델이 사용될지에 대한 정보 등)를 포함하는 비트스트림을 획득할 수 있다. 디코더는 참조 라인 인덱스가 0인 경우, CCLM 및 MMLM과 관련된 신택스 요소를 파싱할 수 있다. iii) 색차 성분 블록을 예측하기 위한 선형 모델의 개수는 현재 블록의 크기에 기초하여 결정될 수 있다. 예를 들어, 현재 블록의 가로 또는 세로의 크기가 임의의 값(예를 들어, 1 이상의 정수)보다 작은 경우, 디코더는 1개의 선형 모델을 이용하여 색차 성분 블록을 예측할 수 있다. iv) 현재 블록의 크기가 임의의 값 이상인 경우, 디코더는 현재 블록을 복수 개의 서브 블록으로 분할하고, 복수 개의 서브 블록 각각마다 선형 모델을 적용하여 색차 성분 블록을 예측할 수 있다. 이때, 각 서브 블록의 선형 모델을 유도하기 위한 템플릿은 해당 서브 블록을 기준으로 가장 가깝게 위치한 주변 블록의 복원된 샘플들을 포함할 수 있다. 예를 들어, 도 9와 같이 현재 블록이 4개의 서브 블록으로 분할될 수 있다. 이때, 디코더는 좌측 및 상측 템플릿을 모두 사용하여 1번째 서브 블록에 대한 선형 모델을 유도할 수 있다. 디코더는 상측 템플릿을 사용하여 2번째 서브 블록에 대한 선형 모델을 유도할 수 있다. 디코더는 좌측 템플릿을 사용하여 3번째 서브 블록에 대한 선형 모델을 유도할 수 있다. 디코더는 2번째 서브 블록에 대한 선형 모델을 유도하기 위해 사용되는 상측 템플릿과 3번째 서브 블록에 대한 선형 모델을 유도하기 위해 사용되는 좌측 템플릿을 이용하여 4번째 서브 블록에 대한 선형 모델을 유도할 수 있다. v) 색차 성분 블록을 예측하기 위한 선형 모델의 개수는 현재 휘도 성분 블록의 인트라 예측 모드, 현재 휘도 성분 블록의 잔여 블록의 계수 분포, 현재 블록의 양자화 파라미터, 주변 블록의 CCLM, MMLM의 사용 여부 중에서 적어도 하나 이상에 기초하여 결정될 수 있다. 예를 들어, 현재 블록의 주변 블록 중에서 MMLM이 적용된 블록이 하나 이상 존재하는 경우, 현재 블록에도 MMLM이 적용될 수 있다. 또한, 현재 블록의 주변 블록들 모두에 CCLM이 적용되었다면 현재 블록에는 CCLM이 적용될 수 있다. vi) 디코더는 MMLM이 적용되도록 시그널링된 현재 블록에 대한 2개의 선형 모델에 기초하여 새로운 1개의 선형 모델을 획득할 수 있다. 즉, 디코더는 현재 블록을 CCLM 모드가 적용되도록 재설정하고, 새로운 1개의 선형 모델을 이용하여 색차 성분 블록을 예측할 수 있다. 디코더는 현재 블록에 대한 2개의 선형 모델을 획득하고, 2개의 선형 모델에 대한 파라미터 값의 유사성에 기초하여, 새로운 1개의 선형 모델을 획득할 수 있다. 이때, 2개의 선형 모델에 대한 파라미터 값의 유사성은 수학식 6의 α1과 α2간의 유사성 및 β1과 β2간의 유사성 중 적어도 하나 이상에 기초하여 결정될 수 있다. α1과 α2간의 유사성의 절대값과 β1과 β2간의 유사성의 절대값의 차이가 임의의 값(예를 들어, 1 이상의 정수) 보다 작은 경우, 2개의 선형 모델에 대한 파라미터 값은 유사하다고 판단될 수 있다. 색차 성분은 2개가 존재하므로(즉, Cb 성분, Cr 성분), 2개의 색차 성분마다 선형 모델의 개수는 달라질 수 있다.
일반적으로 2개의 색차 성분에 대해서는 동일한 인트라 예측 방향성 모드가 적용될 수 있다. 2개의 색차 성분에 대해 동일한 개수의 선형 모델이 적용될 수 있다. 한편, 부호화 효율을 높이기 위해서 각 색차 성분마다 화면 내 예측 모드가 각각 시그널링 될 수 있으며, 각 색차 성분마다 적용되는 선형 모델의 개수도 달라질 수 있다. 예를 들어, Cb 색차 성분에는 수평 방향의 화면 내 모드가 적용될 수 있으며, Cr 색차 성분에는 2개의 선형 모델을 사용한 예측 모드가 적용될 수 있다. 또한, 2개의 색차 성분에 LM모드(CCLM 또는 MMLM)가 적용되는지 여부에 대한 정보가 시그널링되고, 각각의 색차 성분마다 CCLM 또는 MMLM 중에서 어떠한 모드가 적용되는지에 대한 정보가 추가적으로 시그널링될 수 있다. 또한, 2개의 색차 성분에 모두 MMLM이 적용되는지 여부에 대한 정보가 시그널링되고, 비디오 신호 처리 장치는 각 색차 성분마다 유도된 2개의 선형 모델의 유사성을 판단하여, 각 색차 성분마다 CCLM 또는 MMLM이 적용되는지 여부를 암묵적으로 결정할 수 있다. 이 경우, 각 색차 성분에 대한 추가적인 정보가 시그널링되지 않으므로, 비트량이 감소되는 효과가 있다.
비디오 신호 처리 장치는 TIMD 모드에 있어서 휘도 예측 블록을 생성하는 데 2개의 인트라 예측 방향성 모드를 사용할 수 있다. TIMD 부호화 모드는 방향성 특성이 명확하게 존재하지 않는 블록에 유용할 수 있다. 즉, 현재 블록에 TIMD 모드가 적용되었다면, 현재 블록의 색차 성분 블록에 대한 인트라 예측 모드는 CCLM 또는 MMLM 모드로 암묵적으로 설정될 수 있다. 이때, 현재 블록의 색차 성분 블록에 대해 CCLM 또는 MMLM이 적용되는지 여부에 대한 정보가 시그널링될 수 있다. 이때, 각 색차 성분 블록마다 CCLM 또는 MMLM이 적용되는지 여부에 대한 정보는 비트스트림에 포함되어 시그널링될 수 있다. 디코더는 현재 블록에 TIMD 모드가 적용되는 경우, CCLM 또는 MMLM이 적용되는지 여부에 대한 정보를 파싱하여 각 색차 성분 블록에 적용되는 모드를 결정할 수 있다. 또는, 각 색차 성분 블록에 CCLM 또는 MMLM이 적용되는지 여부에 대한 정보는 별도로 시그널링되지 않을 수 있다. 이때 디코더는 각 색차 성분 블록에 MMLM이 적용되는 것으로 암묵적으로 설정하고, 상술한 방법(2개의 선형 모델에 대한 파라미터 값의 유사성에 기초하여, 새로운 1개의 선형 모델을 획득하는 방법)을 이용하여 각 색차 성분 블록에 CCLM이 적용되는 것으로 재설정할 수 있다. 이러한 방법들은 TIMD 모드로 부호화되는 블록뿐 아니라, MIP 및 DIMD 모드로 부호화되는 블록에 대해서도 적용될 수 있다.
현재 블록에 TIMD 및 DIMD 부호화 모드가 적용되는 경우, 디코더는 2개의 인트라 예측 방향성 모드를 사용하여 예측 블록을 각각 생성한 후, 각 예측 블록들을 가중치 평균하여 최종 예측 휘도 블록을 생성할 수 있다. 디코더는 최종 예측 휘도 블록을 잔차 블록과 합하여 복원된 휘도 블록을 생성할 수 있다. 디코더는 색차 성분 블록을 생성하기 위해 복원된 휘도 블록을 사용하여 CCLM 또는 MMLM을 수행해야 한다. 이러한 방법은 처리 단계가 많음에 따라 처리 속도가 느리다는 문제가 있다. 따라서, 처리 속도를 향상시키기 위해 디코더는 복원된 휘도 블록이 아닌 최종 예측 휘도 블록에 CCLM 또는 MMLM을 적용하여 색차 블록을 생성할 수 있다. 최종 예측 휘도 블록에 CCLM 또는 MMLM을 적용하여 색차 블록을 생성하는 방법은 복원된 휘도 블록에 CCLM 또는 MMLM을 적용하여 색차 블록을 생성하는 방법 대비 정확도가 떨어질 수 있다. 따라서, 최종 예측 휘도 블록에 CCLM 또는 MMLM을 적용할 것인지, 복원된 휘도 블록에 CCLM 또는 MMLM을 적용할 것인지에 대한 정보가 비트스트림에 포함되어 시그널링될 수 있다. 즉, 디코더는 비트스트림에 포함된 최종 예측 휘도 블록에 CCLM 또는 MMLM을 적용할 것인지, 복원된 휘도 블록에 CCLM 또는 MMLM을 적용할 것인지에 대한 정보를 파싱하여 CCLM 또는 MMLM을 적용할 블록을 결정할 수 있다.
색차 성분 블록에 적용되는 인트라 예측 방향성 모드는 DM(Derived Mode 또는 Direct Mode) 모드, EM(Explicit Mode) 모드, LM(Linear Model) 모드일 수 있다. DM 모드는 휘도 성분 블록의 인트라 예측 방향성 모드가 색차 성분 블록의 인트라 예측 방향성 모드로 사용되는 모드일 수 있다. EM 모드는 색차 성분 블록의 인트라 예측 방향성 모드가 평면(Planar) 모드, DC 모드, 수평 방향 모드, 수직 방향 모드 중 어느 하나로 지정되는 모드일 수 있다. EM 모드는 색차 성분 블록의 인트라 예측 방향성 모드가 휘도 성분 블록의 인트라 예측 방향성 모드와 동일하지 않게 설정될 수 있다. EM 모드는 Non-direct 모드로 기술될 수 있다. LM 모드는 복원된 휘도 성분 블록과 선형 모델을 사용하여 색차 성분 블록을 예측하는 모드로서, 기존의 각도 모드 및 비각도 모드(Planar 모드, DC 모드)와는 다른 특징을 가진다.
도 11은 본 명세서의 일 실시예에 따른 색차 성분 블록에 대한 인트라 예측 방향성 모드를 시그널링하는 방법을 나타내는 도면이다.
이하에서 현재 블록의 색차 성분 블록에 대한 인트라 예측 방향성 모드를 시그널링하는 방법에 대해 설명한다. 먼저, 색차 성분 블록의 예측을 위에 LM 모드가 적용되는지 여부가 먼저 시그널링될 수 있다. 이때, 색차 성분 블록의 예측을 위해 LM 모드가 적용되지 않는 경우에는 DM 모드 및/또는 EM 모드가 적용되는지 여부에 대한 정보가 시그널링될 수 있다. 색차 성분 블록의 예측을 위해 LM 모드가 적용되는 경우 색차 성분 블록의 예측을 위해 CCLM 모드 또는 MMLM 모드가 적용되는지와 관련된 정보와 선형 모델을 유도하기 위한 템플릿에 대한 정보가 시그널링될 수 있다. 이때, 템플릿에 대한 정보는 템플릿이 현재 블록의 좌측 샘플들을 포함하는지, 상측 샘플들을 포함하는지, 좌측 샘플 및 상측 샘플들을 모두 포함하는지에 대한 정보일 수 있다. 이하에서 현재 블록의 색차 성분 블록에 대한 인트라 예측 방향성 모드를 시그널링하는 방법에 대해 보다 자세하게 살펴본다.
도 11(a)를 참조하면, 디코더는 색차 성분 블록의 예측을 위해 LM 모드가 적용되는지 여부를 지시하는 신택스 요소(lm_flag)를 파싱하여 색차 성분 블록의 예측을 위해 LM 모드가 적용되는지 여부를 결정할 수 있다. lm_flag의 값이 1이면 LM 모드가 적용됨을 나타내고, lm_flag의 값이 0이면 LM 모드가 적용되지 않음을 나타낼 수 있다. lm_flag가 색차 성분 블록의 예측을 위해 LM 모드가 적용되지 않음을 나타내면(예를 들어, lm_flag의 값이 0이면), 디코더는 색차 성분 블록의 예측을 위해 EM 모드 및/또는 DM 모드가 적용되는지 여부에 대한 정보를 파싱할 수 있다. lm_flag가 색차 성분 블록의 예측을 위해 LM 모드가 적용됨을 나타내면(예를 들어, lm_flag의 값이 1이면), 디코더는 색차 성분 블록의 예측을 위해 MMLM 모드가 사용되는지 여부를 나타내는 신택스 요소(mmlm_flag)를 파싱할 수 있다. mmlm_flag의 값이 1이면 MMLM 모드가 사용됨을 나타내고, mmlm_flag이 값이 0이면 CCLM 모드가 사용됨을 나타낼 수 있다. mmlm_flag가 색차 성분 블록의 예측을 위해 MMLM 모드가 사용됨을 나타내면(예를 들어, mmlm_flag의 값이 1이면), 디코더는 어떠한 템플릿이 사용되는지를 나타내는 신택스 요소(template_idx)를 추가적으로 파싱할 수 있다. 예를 들어, template_idx의 값이 1이면, 현재 블록의 좌측 샘플들 및 상측 샘플들이 템플릿에 포함될 수 있고, 비디오 신호 처리 장치는 현재 블록의 좌측 샘플들 및 상측 샘플들을 이용하여 선형 모델을 유도할 수 있다. template_idx의 값이 00이면, 현재 블록의 좌측 샘플들이 템플릿에 포함될 수 있고, 비디오 신호 처리 장치는 현재 블록의 좌측 샘플들만을 이용하여 선형 모델을 유도할 수 있다. template_idx의 값이 01이면, 현재 블록의 상측 샘플들이 템플릿에 포함될 수 있고, 비디오 신호 처리 장치는 현재 블록의 상측 샘플들만을 이용하여 선형 모델을 유도할 수 있다. mmlm_flag의 값이 0이면, 색차 성분 블록의 예측을 위해 CCLM 모드가 사용됨을 나타낼 수 있다. 이때, 비디오 신호 처리 장치는 template_idx를 파싱하여 template_idx가 나타내는 샘플들에 기초하여 색차 성분 블록을 예측할 수 있다.
또한, MMLM 모드의 경우 2개 이상의 선형 모델이 필요하므로, 많은 개수의 샘플들이 필요할 수 있다. 따라서, 현재 블록의 좌측 샘플들 및 상측 샘플들이 모두 사용되는 것이 효과적일 수 있다. 따라서, 도11(a)의 시그널링 방법은 다음과 같이 변형될 수 있다. 우선, 디코더는 lm_flag를 파싱할 수 있다. lm_flag가 색차 성분 블록의 예측 위해 LM 모드가 사용되지 않음을 나타내면(예를 들어, lm_flag의 값이 0이면) 디코더는 색차 성분 블록의 예측을 위해 EM 모드 및/또는 DM 모드가 적용되는지 여부에 대한 정보를 파싱할 수 있다. lm_flag가 색차 성분 블록의 예측 위해 LM 모드가 적용됨을 나타내면(예를 들어, lm_flag의 값이 1이면) 디코더는 mmlm_flag를 파싱할 수 있다. mmlm_flag가 색차 성분 블록의 예측을 위해 MMLM 모드가 사용됨을 나타내면(예를 들어, mmlm_flag의 값이 1이면) template_idx는 파싱되지 않고, template_idx의 값은 선형 모델 유도를 위해 현재 블록의 좌측 샘플들 및 상측 샘플들이 사용됨을 나타내는 값(예를 들어, 1)으로 추론(infer)될 수 있다. MMLM 모드에서는 좌측 샘플들 및 상측 샘플들이 사용되는 것이 보다 효율적이기 때문이다. mmlm_flag가 MMLM이 모드가 아닌 CCLM 모드가 적용됨을 나타내면(mmlm_flag의 값이 0이면), 디코더는 template_idx를 추가적으로 파싱할 수 있다. 예를 들어, template_idx의 값이 1이면, 현재 블록의 좌측 샘플들 및 상측 샘플들이 템플릿에 포함될 수 있고, 비디오 신호 처리 장치는 현재 블록의 좌측 샘플들 및 상측 샘플들을 이용하여 선형 모델을 유도할 수 있다. template_idx의 값이 00이면, 현재 블록의 좌측 샘플들이 템플릿에 포함될 수 있고, 비디오 신호 처리 장치는 현재 블록의 좌측 샘플들만을 이용하여 선형 모델을 유도할 수 있다. template_idx의 값이 01이면, 현재 블록의 상측 샘플들이 템플릿에 포함될 수 있고, 비디오 신호 처리 장치는 현재 블록의 상측 샘플들만을 이용하여 선형 모델을 유도할 수 있다. 한편, mmlm_flag의 값이 1이면, 현재 휘도 성분 블록의 인트라 예측 모드, 부호화 블록의 크기, 잔차 블록의 특성, 양자화 파라미터, 주변 블록에 대해 CCLM 모드 및/또는 MMLM 모드가 사용되는지 여부, 참조 라인 인덱스 중에서 적어도 하나 이상을 사용하여 template_idx에 대한 파싱 여부가 결정되거나 template_idx의 값이 임의의 값으로 추론될 수 있다. 예를 들어, 현재 블록의 크기가 임의의 정해진 값(예를 들어, 1 이상의 정수)보다 작은 경우, template_idx는 파싱되지 않고, template_idx의 값은 선형 모델 유도를 위해 현재 블록의 좌측 샘플들 및 상측 샘플들이 사용됨을 나타내는 값(예를 들어, 1)으로 추론(infer)될 수 있다.
또한, 도 11(b)를 참조하면, 디코더는 lm_flag를 파싱할 수 있다. 이때, lm_flag가 LM 모드가 적용되지 않음을 나타내면(예를 들어, lm_flag의 값이 0이면) 디코더는 EM 모드 및/또는 DM 모드가 적용되는지 여부에 대한 정보를 파싱할 수 있다. lm_flag가 LM 모드가 적용됨을 나타내면(예를 들어, lm_flag의 값이 1이면) 디코더는 template_idx를 파싱할 수 있다. 예를 들어, template_idx의 값이 1이면, 현재 블록의 좌측 샘플들 및 상측 샘플들이 템플릿에 포함될 수 있고, 비디오 신호 처리 장치는 현재 블록의 좌측 샘플들 및 상측 샘플들을 이용하여 선형 모델을 유도할 수 있다. template_idx의 값이 00이면, 현재 블록의 좌측 샘플들이 템플릿에 포함될 수 있고, 비디오 신호 처리 장치는 현재 블록의 좌측 샘플들만을 이용하여 선형 모델을 유도할 수 있다. template_idx의 값이 01이면, 현재 블록의 상측 샘플들이 템플릿에 포함될 수 있고, 비디오 신호 처리 장치는 현재 블록의 상측 샘플들만을 이용하여 선형 모델을 유도할 수 있다. 도 11(a)의 방법과는 달리 CCLM 모드 또는 MMLM 모드 중 어떠한 모드가 사용되는지에 대한 신택스 요소가 파싱되지 않으므로, 디코더는 CCLM 모드 및 MMLM 모드에 대한 2개의 선형 모델을 유도하고, 2개의 선형 모델에 대한 유사성에 기초하여 색차 블록의 예측을 위해 적용되는 모드(CCLM 모드 또는 MMLM 모드)를 결정할 수 있다.
도 12 및 도 13은 본 명세서의 일 실시예에 따른 문맥 모델을 나타내는 도면이다.
mmlm_flag와 template_idx는 CABAC(Context adaptive binary arithmetic coding)을 사용하여 엔트로피 코딩될 수 있다. mmlm_flag와 template_idx에 대한 문맥 모델은 실험을 통해 얻은 값(도 12 및 도 13 참조)으로 정의될 수 있다.
도 12(a) 및 도 13(a)의 initValue는 각각 mmlm_flag에 대한 문맥 모델들과 template_idx에 대한 문맥 모델들을 나타낸다. shiftIdx는 mmlm_flag와 template_idx에 대한 확률 업데이트시 사용될 수 있다. initValue는 현재 슬라이스의 타입에 따라 결정될 수 있다. 즉 initValue는 현재 슬라이스가 I 슬라이스인지 P 슬라이스인지 B 슬라이스인지에 따라 결정될 수 있다. 도 12(b)와 도 13(b)는 각 슬라이스 타입에 따라 사용될 수 있는 문맥 모델을 나타낸다. 도 12(b)를 참조하면 현재 슬라이스 타입에 따라 mmlm_flag의 초기화 타입(initType)이 결정되고, 초기화 타입에 따라 initValue는 결정될 수 있다. 도 13(b)를 참조하면 현재 슬라이스 타입에 따라 template_idx의 초기화 타입(initType)이 결정되고, 초기화 타입에 따라 initValue는 결정될 수 있다. 예를 들어, 현재 슬라이스의 타입이 I 슬라이스일 경우, initType의 값은 0 내지 2일 수 있다. 현재 슬라이스의 타입이 P 슬라이스일 경우, initType의 값은 3 내지 5일 수 있다. 현재 슬라이스의 타입이 B 슬라이스일 경우, initType의 값은 6 내지 8일 수 있다. 슬라이스 타입에 따라 결정되는 initType의 값은 도 12(a)의 mmlm_flag의 ctxIdx의 값과 같을 수 있고, 도 13(a)의 template_idx의 ctxIdx의 값과 같을 수 있다. initValue는 현재 슬라이스의 각 타입에 따라 결정되는 initType의 값에 따라 도 12(a) 및 도 13(a)에 대응되는 값으로 결정될 수 있다.
한편 각 슬라이스 타입마다 initType는 하나의 값으로 결정될 수 있다. 예를 들어, 현재 슬라이스의 타입이 I 슬라이스일 경우, initType의 값은 0일 수 있다. 현재 슬라이스의 타입이 P 슬라이스일 경우, initType의 값은 3일 수 있다. 현재 슬라이스의 타입이 B 슬라이스일 경우, initType의 값은 6일 수 있다. initValue는 현재 슬라이스 각 타입에 따라 하나의 값으로 결정되는 initType의 값에 따라 도 12(a)에 대응되는 값으로 결정될 수 있다. 예를 들어, initType의 값이 0이면 mmlm_flag의 ctxIdx의 값은 0일 수 있고, 도 12(a)에 따라 initValue의 값은 20이고, shiftIdx의 값은 4일 수 있다. initType의 값이 0이면 template_idx의 ctxIdx의 값은 0일 수 있고, 도 13(a)에 따라 initValue의 값은 17이고, shiftIdx의 값은 1일 수 있다. initType의 값이 3이면 mmlm_flag의 ctxIdx의 값은 3일 수 있고, 도 12(a)에 따라 initValue의 값은 35이고, shiftIdx의 값은 4일 수 있다. initType의 값이 3이면 template_idx의 ctxIdx의 값은 3일 수 있고, 도 13(a)에 따라 initValue의 값은 0이고, shiftIdx의 값은 1일 수 있다. initType의 값이 6이면 mmlm_flag의 ctxIdx의 값은 6일 수 있고, 도 12(a)에 따라 initValue의 값은 38이고, shiftIdx의 값은 4일 수 있다. initType의 값이 6이면 template_idx의 ctxIdx의 값은 6일 수 있고, 도 13(a)에 따라 initValue의 값은 0이고, shiftIdx의 값은 1일 수 있다.
또한, 슬라이스 타입에 따른 initType의 사용은 슬라이스마다 선택적으로 적용될 수 있다. 예를 들어, 슬라이스 헤더에 정의된 sh_cabac_init_flag의 값에 따라 initType의 값의 사용 순서가 달라질 수 있다. sh_cabac_init_flag의 값이 1이고 현재 슬라이스의 타입이 P 슬라이스인 경우, initType의 값은 6일 수 있다. sh_cabac_init_flag의 값이 1이고 현재 슬라이스의 타입이 B 슬라이스인 경우, initType의 값은 3일 수 있다. sh_cabac_init_flag의 값이 0이고 현재 슬라이스의 타입이 P 슬라이스인 경우, initType의 값은 3일 수 있다. sh_cabac_init_flag의 값이 0이고 현재 슬라이스의 타입이 B 슬라이스인 경우, initType의 값은 6일 수 있다.
비디오 신호 처리 장치는 현재 코딩하거나 파싱할 mmlm_flag의 심볼을 여러 개의 문맥 모델 중에서 현재 휘도 성분 블록의 인트라 예측 모드, 부호화 블록의 가로 또는 세로의 크기(또는 가로 및 세로의 비율 또는 가로와 세로의 차이 등), 양자화 파라미터, 주변 블록에 CCLM 및/또는 MMLM이 사용되는지 여부, 잔차 블록의 특성(휘도 성분 블록의 잔차 신호 여부 정보, 마지막 변환 계수의 위치 정보), 움직임 정보 차분 값 및 참조 라인 인덱스 중에서 적어도 하나 이상을 사용하여 선택할 수 있다. 이하에서 비디오 신호 처리 장치가 mmlm_flag의 심볼을 여러 개의 문맥 모델 중에서 선택하는 방법 대해 설명한다.
비디오 신호 처리 장치는 현재 블록의 주변 블록의 mmlm_flag 정보에 기초하여 mmlm_flag의 심볼의 문맥 인덱스를 선택할 수 있다. mmlm_flag 정보는 mmlm_flag의 값을 의미할 수 있다. 예를 들어, mmlm_flag의 값은 0 또는 1일 수 있고, mmlm_flag의 값이 0이면 해당 블록에 MMLM이 사용되지 않음을 나타내고, mmlm_flag의 값이 1이면 해당 블록에 MMLM이 사용됨을 나타낼 수 있다. 예를 들어, 현재 블록에 인접한 좌측 주변 블록의 mmlm_flag 정보와 현재 블록에 인접한 상측 주변 블록의 mmlm_flag 정보의 합을 통해 mmlm_flag 심볼의 문맥 인덱스가 결정될 수 있다. 즉, 문맥 인덱스는 0 내지 2의 값일 수 있다. 이때, 주변 블록이 사용 불가능한 위치에 있다면, 문맥 인덱스에 0이 더해질 수 있다.
비디오 신호 처리 장치는 현재 블록의 크기에 기초하여 mmlm_flag의 심볼의 문맥 인덱스를 선택할 수 있다. 예를 들어, 현재 블록의 크기가 제1 값보다 크다면, 문맥 인덱스는 2가 될 수 있으며, 현재 블록의 크기가 제2 값보다 작다면 문맥 인덱스는 0이 될 수 있으며, 현재 블록의 크기가 제2 값 이상이고 제1 값 이하인 경우 문맥 인덱스는 1이 될 수 있다. 이때, 제1 값 및 제2 값은 기 설정된 값으로 제1 값은 32 x 32일 수 있고, 제2 값은 16 x 16일 수 있다. 또한, 제1 값 및 제2 값은 현재 블록의 가로 및 세로의 크기의 합에 기초하여 설정될 수 있다.
비디오 신호 처리 장치는 현재 블록의 가로와 세로의 크기의 차이에 기초하여 mmlm_flag의 심볼의 문맥 인덱스를 선택할 수 있다. 현재 블록의 가로와 세로의 크기가 동일한 경우 문맥 인덱스는 0일 수 있다. 현재 블록의 가로의 크기가 세로의 크기보다 크다면 문맥 인덱스는 1일 수 있다. 현재 블록의 가로의 크기가 세로의 크기보다 작다면 문맥 인덱스는 2일 수 있다.
비디오 신호 처리 장치는 mmlm_flag를 문맥 모델을 통한 이진 산술 부호화를 수행하지 않고, 고정된 확률 구간을 사용하는 바이패스(bypass) 형태의 이진 산술 부호화를 수행할 수 있다.
비디오 신호 처리 장치는 단 하나의 문맥 모델만을 사용하여 mmlm_flag를 이진 산술 부호화할 수 있다. 이 경우, 슬라이스 타입에 따라 각각 하나의 문맥 모델만을 가지므로, 문맥 모델 인덱스는 유도되지 않고, 슬라이스의 모든 블록에 고정된 문맥 모델이 사용될 수 있다.
비디오 신호 처리 장치는 현재 코딩하거나 파싱할 template_idx의 심볼을 여러 개의 문맥 모델 중에서 현재 휘도 성분 블록의 인트라 예측 모드, 부호화 블록의 가로 또는 세로의 크기(또는 가로 및 세로의 비율 또는 가로와 세로의 차이 등), 양자화 파라미터, 주변 블록에 CCLM 및/또는 MMLM이 사용되는지 여부, 잔차 블록의 특성(휘도 성분 블록의 잔차 신호 여부 정보, 마지막 변환 계수의 위치 정보), 움직임 정보 차분 값 및 참조 라인 인덱스 중에서 적어도 하나 이상을 사용하여 선택할 수 있다. template_idx는 2개의 빈(bin)으로 구성될 수 있고, 첫번째 빈에 대해서는 문맥 모델 기법이 적용되고, 두번째 빈에 대해서는 바이패스 형태의 이진 산술 부호화가 수행되거나 고정된 문맥 모델이 사용될 수 있다. 이하에서 비디오 신호 처리 장치가 template_idx의 심볼을 여러 개의 문맥 모델 중에서 선택하는 방법 대해 설명한다.
비디오 신호 처리 장치는 현재 블록의 크기에 기초하여 template_idx의 심볼의 문맥 인덱스를 선택할 수 있다. 예를 들어, 현재 블록의 크기가 제1 값보다 크다면, 문맥 인덱스는 2가 될 수 있으며, 현재 블록의 크기가 제2 값보다 작다면 문맥 인덱스는 0이 될 수 있으며, 현재 블록의 크기가 제2 값 이상이고 제1 값 이하인 경우 문맥 인덱스는 1이 될 수 있다. 이때, 제1 값 및 제2 값은 기 설정된 값으로 제1 값은 32 x 32일 수 있고, 제2 값은 16 x 16일 수 있다. 또한, 제1 값 및 제2 값은 현재 블록의 가로 및 세로의 크기의 합에 기초하여 설정될 수 있다.
비디오 신호 처리 장치는 현재 블록의 가로와 세로의 크기의 차이에 기초하여 template_idx의 심볼의 문맥 인덱스를 선택할 수 있다. 현재 블록의 가로와 세로의 크기가 동일한 경우 문맥 인덱스는 0일 수 있다. 현재 블록의 가로의 크기가 세로의 크기보다 크다면 문맥 인덱스는 1일 수 있다. 현재 블록의 가로의 크기가 세로의 크기보다 작다면 문맥 인덱스는 2일 수 있다.
비디오 신호 처리 장치는 template_idx를 문맥 모델을 통한 이진 산술 부호화를 수행하지 않고, 고정된 확률 구간을 사용하는 바이패스(bypass) 형태의 이진 산술 부호화를 수행할 수 있다.
비디오 신호 처리 장치는 단 하나의 문맥 모델만을 사용하여 template_idx를 이진 산술 부호화할 수 있다. 이 경우, 슬라이스 타입에 따라 각각 하나의 문맥 모델만을 가지므로, 문맥 모델 인덱스는 유도되지 않고, 슬라이스의 모든 블록에 고정된 문맥 모델이 사용될 수 있다.
LM 모드는 복원된 휘도 블록과 선형 모델이 사용되므로, LM 모드는 인트라 모드로 부호화 된 블록이나 인터 모드로 부호화된 블록의 색차 블록에 적용될 수 있다. 인터 모드는 주변 블록과의 의존성이 낮으므로 처리 속도가 높다는 장점이 있는 반면, LM 모드는 주변 블록의 의존성이 크므로 처리 속도가 낮다는 단점이 있다. 따라서 LM 모드가 인터 모드에 적용되는 경우, 처리 속도가 낮은 부호화 모드(예를 들어, GPM, Affine, sbTMVP, BCW, PROF, BDOF, TM, MP-DMVR, OBMC, MHP, LIC)에는 적용되지 않을 수 있다. LM 모드는 휘도 성분 블록에 대한 복호화 처리 속도가 상대적으로 높은 부호화 모드(예를 들어, Merge, MergeSkip, MMVD, AMVP, SMVD, CIIP)로 부호화된 색차 성분 블록에 적용될 수 있다. 이때, 색차 성분 블록에 LM 모드가 적용되는지 여부에 대한 정보가 시그널링될 수 있다. 즉, 디코더는 비트스트림에서 색차 성분 블록에 LM 모드가 적용되는지 여부에 대한 정보를 파싱하여 인터 모드로 부호화된 블록의 색차 성분 블록에 LM 모드가 적용되는지 여부를 결정할 수 있다.
블록을 예측하는 방법은 크게 공간적인 상관성을 이용한 인트라 예측 방법과 시간적인 상관성을 이용한 인터 예측 방법으로 나누어질 수 있다. 현재 블록에 인트라 예측 방법이 적용된다면, 비트스트림에는 인트라 예측과 관련된 정보가 포함되고, 인터 예측과 관련된 정보는 포함되지 않을 수 있다. 반대로 현재 블록에 인터 예측 방법이 적용된다면 비트스트림에는 인터 예측과 관련된 정보가 포함되고, 인트라 예측과 관련된 정보는 포함되지 않을 수 있다. 현재 블록의 부호화 정보(인터 예측 방법이 적용되는지 인트라 예측 방법이 적용되는지)는 주변 블록의 부호화 정보에 기초하여 예측될 수 있다. 예를 들어, 현재 블록에 인트라 예측이 적용되는 경우, 현재 블록의 주변 블록의 인트라 예측 정보에 기초하여 현재 블록에 대한 예측이 수행될 수 있다. 하지만, 주변 블록이 모두 인터 예측이 적용되는 블록인 경우, 현재 블록에 인트라 예측이 적용되면 효율이 낮아진다는 문제가 있다. 이러한 문제를 해결하기 위해, 비디오 신호 처리 장치는 비트스트림에 인터 예측이 수행된 주변 블록에 대한 인트라 예측 정보를 포함함으로써, 다음에 처리될 블록의 인트라 예측 효율을 높일 수 있다. 인터 예측이 수행된 블록에 대한 인트라 예측 정보를 유도하는 방법은 현재 블록이 참조 블록의 영상 특성과 유사할 가능성이 높다는 점을 이용할 수 있다. 즉, 참조 블록의 인트라 예측 정보가 현재 블록에 대한 인트라 예측 정보로 사용될 수 있다.
도 14는 본 명세서의 일 실시예에 따른 주변 블록을 이용하여 현재 블록의 인트라 예측 모드를 유도하는 방법을 나타내는 도면이다.
도 14를 참조하면 현재 블록의 주변 블록들은 서로 다양한 크기를 가질 수 있다. 현재 블록이 인트라 예측 모드로 부호화되는 경우, 비디오 신호 처리 장치는 현재 블록의 주변 블록의 인트라 예측 모드를 사용하여 MPM 리스트를 구성한 후, MPM 리스트를 이용하여 현재 블록에 대한 인트라 예측 모드를 부호화할 수 있다. 주변 블록의 인트라 예측 모드를 유도할 때, 주변 블록이 인터 예측으로 부호화된 블록인 경우, 비디오 신호 처리 장치는 주변 블록의 움직임 정보를 사용하여 참조 픽쳐로부터 현재 블록의 인트라 예측 모드를 유도할 수 있다. 구체적으로, 참조 픽쳐의 주변 블록의 좌상단 픽셀 위치에 대응되는 위치를 기준으로 주변 블록의 움직임 정보만큼 이동한 위치에 저장된 인트라 예측 모드가 MPM 리스트에 포함될 수 있다. 예를 들어, 도 14의 Ne-A2/A3 주변 블록의 인트라 예측 모드는, 참조 픽쳐의 M4 또는 O5의 인트라 예측 모드일 수 있고, M4 또는 O5의 저장된 인트라 예측 모드가 MPM 리스트에 포함될 수 있다.
현재 블록의 인트라 예측 모드는 주변 블록의 인트라 예측 모드와 유사할 수 있으며, 주변 블록의 인트라 예측 모드를 유도하기 위해 사용되는 위치는 현재 블록과 가까울수록 인트라 예측 모드의 정확도가 더욱 높아질 수 있다. 따라서, 주변 블록의 인트라 예측 모드를 유도하기 위해 사용되는 위치는 현재 블록과 가까운 위치로 재설정될 수 있다. 예를 들어, 도 14의 Ne-L3 주변 블록의 인트라 예측 모드는 H16 또는 I17보다는 현재 블록과 가까운 위치의 J16 또는 J17의 인트라 예측 모드일 수 있다. 또한, 비디오 신호 처리 장치는 주변 블록의 움직임 정보를 현재 블록의 위치 기준으로 투영(projection)하여 참조 픽쳐로부터 인트라 예측 모드를 유도할 수 있다. 예를 들어 비디오 신호 처리 장치는 도 14의 Ne-A2/A3 주변 블록에 대한 인트라 예측 모드를 유도하기 위해서, 참조 픽쳐에서 Ne-A2/A3 주변 블록의 좌상단 픽셀 위치에 대응되는 위치를 기준으로 Ne-A2/A3 주변 블록의 움직임 정보만큼 이동한 위치인 M4의 인트라 예측 모드를 사용하지 않고, 현재 블록의 위치의 인트라 예측 모드를 유도하여 사용할 수 있다. 즉, Ne-A2/A3 주변 블록에 대한 인트라 예측 모드를 유도하기 위해서, 비디오 신호 처리 장치는 참조 픽쳐에서 현재 블록의 중앙 픽셀 위치에 대응되는 위치를 기준으로 Ne-A2/A3 주변 블록의 움직임 정보만큼 이동한 위치인 M10의 인트라 예측 모드를 유도하여 Ne-A2/A3 주변 블록의 인트라 예측 모드로 사용할 수 있다. 유도된 인트라 예측 모드는 현재 블록의 MPM 리스트를 구성하는데 포함될 수 있다. 이때, 비디오 신호 처리 장치는 현재 블록의 중앙 픽셀의 위치가 아닌 현재 블록 내의 임의의 위치를 기준으로 주변 블록의 움직임 정보만큼 이동한 위치의 인트라 예측 모드를 유도할 수 있다. 예를 들어, 임의의 위치는 현재 블록의 좌상단, 상단 중앙, 우상단, 좌측 중앙, 좌하단, 하측 중앙, 우하단, 우측 중앙 중에서 하나 일 수 있다. 이때, 비디오 신호 처리 장치는 여러 개의 주변 블록들의 움직임 정보로 유도된 여러 개의 인트라 예측 모드 중에서 적어도 하나를 사용하여 해당 서브 블록의 인트라 예측 블록을 생성할 수 있다. 비디오 신호 처리 장치는 여러 개의 인트라 예측 모드 중에서 중앙값, 평균값, 최소값, 최대값 중에서 하나를 최적의 인트라 예측 모드로 사용할 수 있다. 상술한 방법은 현재 블록의 색차 성분 블록이 LM 모드로 부호화되는 경우에도 적용될 수 있다. 예를 들어, 비디오 신호 처리 장치는 주변 블록의 움직임 정보를 현재 블록의 위치 기준으로 투영(projection)하여 참조 픽쳐로부터 현재 블록의 색차 성분 블록에 대한 인트라 예측 모드를 유도할 수 있다. 이때, 유도된 인트라 예측 모드가 LM 모드인 경우, 비디오 신호 처리 장치는 주변 블록에 CCLM, MMLM, CCCM, GLM 중 어떠한 모드가 적용되었는지에 대한 정보, 어떠한 샘플들(좌측 샘플들, 상측 샘플들)이 사용되었는지에 대한 정보, 필터 계수 정보들 중에서 적어도 하나를 참조 픽쳐로부터 얻어와서 현재 색차 블록을 예측하는데 사용할 수 있다. 이를 위해서는 참조 픽쳐에서 해당 색차 블록에 대한 LM 부호화 정보가 모두 저장되어 있어야 한다.
CIIP 모드는 현재 블록에 대해 인트라 예측과 인터 예측을 모두 수행한 후 각 예측 블록을 가중치 평균하는 방법이다. 현재 블록에 CIIP 모드가 적용되는 경우 비트스트림에는 현재 블록에 대한 움직임 정보가 이미 포함되어 있으므로, 비디오 신호 처리 장치는 참조 픽쳐로부터 인트라 예측 모드를 유도할 때, 현재 블록의 움직임 정보를 사용할 수 있다. 이때, 참조 픽쳐로부터 유도된 색차 성분 블록의 인트라 예측 모드가 LM, CCLM, MMLM, CCCM, GLM 모드 중 어느 하나인 경우, 현재 블록의 색차 성분 블록은 참조 블록의 색차 성분 블록의 부호화 모드로 예측될 수 있다. 이때, CIIP 모드로 부호화된 블록에 대한 처리 속도를 높이기 위해서, 비디오 신호 처리 장치는 휘도 성분 블록에 대해서만, 인트라 예측과 인터 예측을 수행한 후 가중치 평균하여 예측 블록을 생성하고, 색차 성분 블록은 LM해당 참조 블록의 색차 부호화 모드로만 예측 블록을 생성할 수 있다. 즉, 비디오 신호 처리 장치는 색차 성분 블록에 대해서는 인터 예측을 수행하지 않아도 되므로 처리 속도를 높일 수 있다.
상술한 선형 모델에 대한 파라미터의 유도 방법은 약속된 위치의 샘플들만을 사용할 수 있다. 따라서, 약속된 위치의 샘플들의 정확성에 따라 선형 모델의 정확도가 달라질 수 있다. 일반적으로 카메라로 촬영된 영상의 경우, 임의의 위치의 샘플에 잡음이 발생할 수 있으며, 이러한 잡음이 발생된 위치의 샘플을 선형 모델의 파라미터 유도에 사용할 경우, 선형 모델의 정확도가 낮아진다는 문제가 있다. 이하 이러한 문제를 해결하기 위한 방법에 대해 설명한다.
도 15는 본 명세서의 일 실시예에 따른 색차 예측 블록을 획득하는 방법을 나타내는 도면이다.
도 15를 참조하면 비디오 신호 처리 장치는 현재 블록의 주변 샘플들을 포함하는 제1 템플릿을 구성할 수 있다. 비디오 신호 처리 장치는 템플릿 내 주변 샘플들 간에 저주파 필터링을 선택적으로 수행하여 주변 샘플들을 서로 유사하게 만들 수 있다. 즉, 비디오 신호 처리 장치는 서로 유사한 주변 샘플들을 포함하는 제2 템플릿을 구성할 수 있다. 또는 비디오 신호 처리 장치는 템플릿 내 주변 샘플들에 고주파 필터링을 수행하여 잡음을 명확하게 구분한 후 임의의 임계치 이상에 해당하는 샘플을 잡음으로 판단하여 템플릿에서 제거할 수 있다. 이때, 잡음으로 판단되어 제거된 샘플은 주변 픽셀 중의 하나를 사용하여 패딩되거나 주변 픽셀들에 가중치 평균한 값으로 설정될 수 있다. 즉, 비디오 신호 처리 장치는, 잡음으로 판단되어 제거된 샘플을 주변 픽셀 중의 하나를 사용하여 패딩하거나 주변 픽셀들에 가중치 평균한 값으로 설정하여 제3 템플릿을 구성할 수 있다. 필터링 및 잡음 제거는 SPS, PPS, PH, Slice, Tile, CU, sub-block 레벨 별로 선택적으로 수행될 수 있다. 이때, 필터링 및 잡음 제거가 수행되는지 여부에 대한 정보는 비트스트림에 포함되어 시그널링될 수 있고, 디코더는 필터링 및 잡음 제거가 수행되는지 여부에 대한 정보를 파싱하여 필터링 및 잡음 제거의 수행 여부를 결정할 수 있다. 비디오 신호 처리 장치는 제2 템플릿 또는 제3 템플릿 내 샘플들에 기초하여 선형 모델에 대한 파라미터를 유도하고, 제1 선형 모델을 획득할 수 있다. 비디오 신호 처리 장치는 제1 템플릿 내 샘플들을 사용하여 제1 선형 모델에 대한 검증을 수행할 수 있다. 비디오 신호 처리 장치는 제1 템플릿 내 샘플들이 제1 선형 모델에 적용될 때 임의의 정해진 오차 값(예를 들어, 1 이상의 정수) 이내인지 오차 값 이내의 샘플들과 제1 템플릿 내 전체 샘플 간의 비율이 임의의 정해진 비율(예를 들어, 0 내지 1 사이의 값) 이상인지에 기초하여 검증을 수행할 수 있다. 이때, 오차 값 이내의 샘플들과 제1 템플릿 내 전체 샘플 간의 비율이 임의의 정해진 비율보다 작다면, 제1 선형 모델을 유도하는데 사용된 샘플들을 제외한 다른 샘플들을 사용하여 제2 선형 모델을 유도할 수 있다. 비디오 신호 처리 장치는 선형 모델 유도 과정을 반복적으로 수행하여 제n 선형 모델 유도할 수 있다. 이때, 선형 모델 유도 과정은 제1 템플릿 내 샘플들이 모두 유도 과정에 사용되거나 선형 모델 유도에 사용될 수 있는 남은 샘플의 개수가 임의의 개수(예를 들어, 1 이상의 정수) 이내가 될 때까지 반복될 수 있다. 그리고 비디오 신호 처리 장치는 본 명세서에서 설명한 방법을 수행하여 다운 샘플링된 휘도 성분 블록(샘플)을 획득하고, 색차 성분 블록(샘플)을 예측할 수 있다.
도 16은 본 명세서의 일 실시예에 따른 선형 모델을 생성하기 위해 사용되는 참조 영역을 나타내는 도면이다.
도 9를 참조하여 설명한 바와 같이 비디오 신호 처리 장치는 다운 샘플링된 휘도 성분 샘플을 생성하기 위해서 타입 1 또는 타입 2의 필터를 사용할 수 있다. 도 16의 짙은 회색 샘플은 다운 샘플링된 휘도 성분 샘플이 생성되는 위치이고, 옅은 회색 샘플은 짙은 회색 위치의 휘도 성분 샘플을 생성하기 위해서 사용되는 주변 샘플들을 나타낸다. 이때, 회색 샘플들은 참조 영역이라 기술될 수 있다. 디코더는 현재 블록을 예측하기 위해 하나 이상의 참조 라인(reference line)들을 이용할 수 있다. 이때, 인코더는 하나 이상의 참조 라인 중 어떠한 라인이 사용되는지에 대한 정보를 포함하는 비트스트림을 생성할 수 있다. 이때, 어떠한 라인이 사용되는지에 대한 정보는 참조 라인의 인덱스일 수 있다. 디코더는 어떠한 라인이 사용되는지에 대한 정보를 파싱하여 획득한 인덱스에 대응되는 참조 라인을 사용하여 현재 블록을 예측할 수 있다. 현재 블록의 예측을 위해 사용되는 참조 라인이 현재 블록과 인접한 라인인 경우, 디코더는 색차 성분 샘플을 예측하기 위한 선형 모델을 유도하기 위해서 도 16(a)의 참조 영역을 사용할 수 있다. 이때, 현재 블록과 인접한 라인은 현재 블록과 n샘플 만큼 이격된 라인까지일 수 있다. 이때 n은 1 이상의 정수로 3일 수 있다. 즉, 도 16(a)를 참조하면 디코더는 인덱스 0, 1, 2에 대응되는 참조 라인(reference line 0, 1, 2)상의 샘플들이 참조 영역이 될 수 있다(n이 3인 경우). 현재 블록의 예측을 위해 사용되는 참조 라인이 현재 블록과 인접하지 않은 라인인 경우, 디코더는 색차 성분 샘플을 예측하기 위한 선형 모델을 유도하기 위해서 도 16(b)의 참조 영역을 사용할 수 있다. 이때, 현재 블록과 인접하지 않은 라인은 현재 블록과 k샘플만큼 이격된 라인 이후의 라인일 수 있다. 이때 k는 1이상의 정수로 3일 수 있다. 즉, 도 16(b)를 참조하면 디코더는 인덱스 2에 대응되는 참조 라인(reference line 2)이후 참조 라인상의 샘플들이 참조 영역이 될 수 있다(k는 3인 경우).
비디오 신호 처리 장치는 MMLM 방법을 통해 색차 성분 샘플을 예측하는 경우 2개의 선형 모델을 유도(사용)할 수 있다. 이때, 비디오 신호 처리 장치는 도 16(a)의 참조 영역을 이용하여 제1 선형 모델을 유도하고, 도 16(b)의 참조 영역을 이용하여 제2 선형 모델을 유도할 수 있다. 상술한 어떠한 라인이 사용되는지에 대한 정보가 현재 블록과 인접한 라인의 인덱스를 나타내지 않는 경우(예를 들어, 1보다 큰 인덱스를 나타내는 경우) 서로 다른 참조 영역에서 선형 모델을 유도할 수 있다.
색차 성분 샘플을 예측하기 위해 사용되는 선형 모델을 유도하기 위해 사용되는 샘플이 현재 블록에 인접할수록 유도되는 선형 모델은 현재 블록의 특성을 잘 표현할 수 있다. 따라서, 현재 블록에 인접한 샘플들이 사용될수록 보다 효과적인 선형 모델이 유도될 수 있다. 현재 블록에 대한 휘도 성분 샘플을 예측하는데 사용한 샘플이 현재 블록에 인접하지 않은 라인의 샘플이면, 잡음이 포함되어 있을 수 있다. 이러한 잡음으로 인해 디코더는 효과적인 선형 모델을 유도하지 못할 수도 있다. 즉, 디코더는 현재 블록에 대한 휘도 성분 샘플을 예측하기 위해 사용된 참조 샘플의 라인에 따라 CCLM, MMLM, GLM, CCCM 등의 사용 여부 또는 활성화 여부를 결정할 수 있다. 예를 들어, 디코더는 현재 블록에 대한 휘도 성분 샘플을 예측하기 위해 사용된 샘플의 라인의 인덱스가 임의의 값(에를 들어, 1 이상의 정수로 3)보다 크다면 현재 블록의 예측을 위해 CCLM, MMLM, GLM, CCCM 등을 사용하지 않을 수 있다. 즉, CCLM, MMLM, GLM, CCCM과 관련된 신택스는 파싱되지 않고, CCLM, MMLM, GLM, CCCM과 관련된 신택스는 CCLM, MMLM, GLM, CCCM이 사용되지 않거나 활성화되지 않음을 나타내도록 추론(infer)될 수 있다. 파싱되지 않고 사용되지 않음으로 추론(암시)될 수 있다.
도 17은 본 명세서의 일 실시예에 따른 비디오 신호를 처리하는 방법을 나타내는 도면이다.
이하에서 도 17을 참조하여 도 1 내지 도 16을 통해 설명한 비디오 신호를 처리하는 방법에 대해 설명한다.
비디오 신호 처리 장치는 현재 블록의 주변 블록들을 포함하는 템플릿을 구성할 수 있다(S1710). 비디오 신호 처리 장치는 상기 현재 블록이 포함된 현재 픽쳐의 컬러 포맷에 기초하여 상기 주변 블록들의 휘도 성분 샘플들을 다운 샘플링할 수 있다(S1720). 비디오 신호 처리 장치는 상기 다운 샘플링된 휘도 성분 샘플들에 기초하여 제1 선형 모델 및 제2 선형 모델을 유도할 수 있다(S1730). 비디오 신호 처리 장치는 상기 제1 선형 모델 및 상기 제2 선형 모델 중 어느 하나의 선형 모델에 기초하여 상기 현재 블록의 휘도 성분 샘플들 중 제1 샘플의 위치에 대응되는 위치의 색차 성분 샘플을 예측할 수 있다(S1740). 상기 어느 하나의 선형 모델은 상기 제1 샘플의 값과 임계치를 비교하여 결정될 수 있다.
또한, 비디오 신호 처리 장치는 상기 템플릿에 포함되는 상기 주변 블록들에 대해 고주파 필터링 또는 저주파 필터링을 수행할 수 있다.
상기 임계치는 상기 현재 블록 내 복원된 휘도 성분 블록들의 값의 평균 값일 수 있다.
상기 임계치는 상기 주변 블록의 색차 성분 샘플들의 평균 값일 수 있다.
상기 임계치는 비트스트림에 포함되는 임계치 정보에 기초하여 결정될 수 있다.
상기 템플릿에 포함되는 상기 주변 블록들은 상기 현재 블록의 상측에 인접한 제1 블록들이거나 상기 현재 블록의 좌측에 인접한 제2 블록들이거나 상기 제1 블록들 및 상기 제2 블록들일 수 있다.
상기 템플릿에 포함되는 상기 주변 블록들은 상기 현재 블록의 인트라 예측 방향성 모드에 기초하여 결정될 수 있다.
상기 템플릿에 포함되는 상기 주변 블록들은 상기 제1 블록들의 복원을 위해 사용된 제1 양자화 파라미터 값과 상기 제2 블록들의 복원을 위해 사용된 제2 양자화 파라미터 값을 비교하여 결정될 수 있다.
상기 템플릿에 포함되는 상기 주변 블록들은 상기 현재 블록의 크기에 기초하여 결정될 수 있다.
상기 템플릿에 포함되는 상기 주변 블록들은 상기 제1 블록들 및 상기 제2 블록들에 CCLM(Cross-component linear model) 또는 MMLM(Multi-model Linear mode)이 적용되는지 여부에 기초하여 결정될 수 있다.
상기 템플릿에 포함되는 상기 주변 블록들은 비트스트림에 포함되는 주변 블록 정보에 기초하여 결정될 수 있다.
상기 템플릿에 포함되는 상기 주변 블록들은 상기 현재 블록으로부터 특정 샘플만큼 이격된 라인 상의 블록들이거나 상기 현재 블록으로부터 상기 특정 샘플 간격 이하의 라인 상의 블록들일 수 있다.
본 명세서에서 상술한 방법(비디오 신호 처리 방법)들은 디코더 또는 인코더의 프로세서를 통해 수행될 수 있다. 또한, 인코더는 비디오 신호 처리 방법에 의해 디코딩되는 비트스트림을 생성할 수 있다. 또한, 인코더가 생성한 비트스트림은 컴퓨터 판독 가능한 비 일시적 저장 매체(기록 매체)에 저장될 수 있다.
본 명세서는 주로 디코더 관점에서 기술되었으나 인코더에서도 동일하게 동작될 수 있다. 본 명세서의 파싱이라는 용어는 비트스트림으로부터 정보를 획득하는 과정을 중점으로하여 설명되었으나 인코더 측면에서는 비트스트림에 해당 정보를 구성하는 것으로 해석될 수 있다. 따라서 파싱이라는 용어는 디코더 동작으로만 한정되지 않고 인코더에서는 비트스트림을 구성하는 행위로까지 해석될 수 있다. 또한, 이러한 비트스트림은 컴퓨터 판독 가능한 기록 매체에 저장되어 구성될 수 있다.
상술한 본 발명의 실시예들은 다양한 수단을 통해 구현될 수 있다. 예를 들어, 본 발명의 실시예들은 하드웨어, 펌웨어(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 (20)

  1. 비디오 신호 디코딩 장치에 있어서,
    프로세서를 포함하며,
    상기 프로세서는,
    현재 블록의 주변 블록들을 포함하는 템플릿을 구성하고,
    상기 현재 블록이 포함된 현재 픽쳐의 컬러 포맷에 기초하여 상기 주변 블록들의 휘도 성분 샘플들을 다운 샘플링하고,
    상기 다운 샘플링된 휘도 성분 샘플들에 기초하여 제1 선형 모델 및 제2 선형 모델을 유도하고,
    상기 제1 선형 모델 및 상기 제2 선형 모델 중 어느 하나의 선형 모델에 기초하여 상기 현재 블록의 휘도 성분 샘플들 중 제1 샘플의 위치에 대응되는 위치의 색차 성분 샘플을 예측하고,
    상기 어느 하나의 선형 모델은 상기 제1 샘플의 값과 임계치를 비교하여 결정되는 것을 특징으로 하는 비디오 신호 디코딩 장치.
  2. 제 1항에 있어서,
    상기 임계치는 상기 현재 블록 내 복원된 휘도 성분 블록들의 값의 평균 값인 것을 특징으로 하는 비디오 신호 디코딩 장치.
  3. 제 1항에 있어서,
    상기 임계치는 상기 주변 블록의 색차 성분 샘플들의 평균 값인 것을 특징으로 하는 비디오 신호 디코딩 장치.
  4. 제 1항에 있어서,
    상기 임계치는 비트스트림에 포함되는 임계치 정보에 기초하여 결정되는 것을 특징으로 하는 비디오 신호 디코딩 장치.
  5. 제 1항에 있어서,
    상기 템플릿에 포함되는 상기 주변 블록들은 상기 현재 블록의 상측에 인접한 제1 블록들이거나 상기 현재 블록의 좌측에 인접한 제2 블록들이거나 상기 제1 블록들 및 상기 제2 블록들인 것을 특징으로 하는 비디오 신호 디코딩 장치.
  6. 제 5항에 있어서,
    상기 템플릿에 포함되는 상기 주변 블록들은 상기 현재 블록의 인트라 예측 방향성 모드에 기초하여 결정되는 것을 특징으로 하는 비디오 신호 디코딩 장치.
  7. 제 5항에 있어서,
    상기 템플릿에 포함되는 상기 주변 블록들은 상기 제1 블록들의 복원을 위해 사용된 제1 양자화 파라미터 값과 상기 제2 블록들의 복원을 위해 사용된 제2 양자화 파라미터 값을 비교하여 결정되는 것을 특징으로 하는 비디오 신호 디코딩 장치.
  8. 제 5항에 있어서,
    상기 템플릿에 포함되는 상기 주변 블록들은 상기 현재 블록의 크기에 기초하여 결정되는 것을 특징으로 하는 비디오 신호 디코딩 장치.
  9. 제 5항에 있어서,
    상기 템플릿에 포함되는 상기 주변 블록들은 상기 제1 블록들 및 상기 제2 블록들에 CCLM(Cross-component linear model) 또는 MMLM(Multi-model Linear mode)이 적용되는지 여부에 기초하여 결정되는 것을 특징으로 하는 비디오 신호 디코딩 장치.
  10. 제 5항에 있어서,
    상기 템플릿에 포함되는 상기 주변 블록들은 비트스트림에 포함되는 주변 블록 정보에 기초하여 결정되는 것을 특징으로 하는 비디오 신호 디코딩 장치.
  11. 제 5항에 있어서,
    상기 템플릿에 포함되는 상기 주변 블록들은 상기 현재 블록으로부터 특정 샘플만큼 이격된 라인 상의 블록들이거나 상기 현재 블록으로부터 상기 특정 샘플 간격 이하의 라인 상의 블록들인 것을 특징으로 하는 비디오 신호 디코딩 장치.
  12. 제 1항에 있어서,
    상기 프로세서는,
    상기 템플릿에 포함되는 상기 주변 블록들에 대해 고주파 필터링 또는 저주파 필터링을 수행하는 것을 특징으로 하는 비디오 신호 디코딩 장치.
  13. 비디오 신호 인코딩 장치에 있어서,
    프로세서를 포함하며,
    상기 프로세서는,
    디코딩 방법에 의해 디코딩되는 비트스트림을 획득하고,
    상기 디코딩 방법은,
    현재 블록의 주변 블록들을 포함하는 템플릿을 구성하는 단계;
    상기 현재 블록이 포함된 현재 픽쳐의 컬러 포맷에 기초하여 상기 주변 블록들의 휘도 성분 샘플들을 다운 샘플링하는 단계;
    상기 다운 샘플링된 휘도 성분 샘플들에 기초하여 제1 선형 모델 및 제2 선형 모델을 유도하는 단계; 및
    상기 제1 선형 모델 및 상기 제2 선형 모델 중 어느 하나의 선형 모델에 기초하여 상기 현재 블록의 휘도 성분 샘플들 중 제1 샘플의 위치에 대응되는 위치의 색차 성분 샘플을 예측하는 단계를 포함하고,
    상기 어느 하나의 선형 모델은 상기 제1 샘플의 값과 임계치를 비교하여 결정되는 것을 특징으로 하는 비디오 신호 인코딩 장치.
  14. 제 13항에 있어서,
    상기 임계치는 상기 현재 블록 내 복원된 휘도 성분 블록들의 값의 평균 값인 것을 특징으로 하는 비디오 신호 인코딩 장치.
  15. 제 13항에 있어서,
    상기 임계치는 상기 주변 블록의 색차 성분 샘플들의 평균 값인 것을 특징으로 하는 비디오 신호 인코딩 장치.
  16. 제 13항에 있어서,
    상기 템플릿에 포함되는 상기 주변 블록들은 상기 현재 블록의 상측에 인접한 제1 블록들이거나 상기 현재 블록의 좌측에 인접한 제2 블록들이거나 상기 제1 블록들 및 상기 제2 블록들인 것을 특징으로 하는 비디오 신호 인코딩 장치.
  17. 제 16항에 있어서,
    상기 템플릿에 포함되는 상기 주변 블록들은 상기 현재 블록의 인트라 예측 방향성 모드에 기초하여 결정되는 것을 특징으로 하는 비디오 신호 인코딩 장치.
  18. 제 16항에 있어서,
    상기 템플릿에 포함되는 상기 주변 블록들은 상기 제1 블록들의 복원을 위해 사용된 제1 양자화 파라미터 값과 상기 제2 블록들의 복원을 위해 사용된 제2 양자화 파라미터 값을 비교하여 결정되는 것을 특징으로 하는 비디오 신호 인코딩 장치.
  19. 제 16항에 있어서,
    상기 템플릿에 포함되는 상기 주변 블록들은 상기 현재 블록의 크기에 기초하여 결정되는 것을 특징으로 하는 비디오 신호 인코딩 장치.
  20. 비트스트림을 저장하는 컴퓨터 판독 가능한 비 일시적 저장 매체에 있어서, 상기 비트스트림은 디코딩 방법에 의해 디코딩되고,
    상기 디코딩 방법은,
    현재 블록의 주변 블록들을 포함하는 템플릿을 구성하는 단계;
    상기 현재 블록이 포함된 현재 픽쳐의 컬러 포맷에 기초하여 상기 주변 블록들의 휘도 성분 샘플들을 다운 샘플링하는 단계;
    상기 다운 샘플링된 휘도 성분 샘플들에 기초하여 제1 선형 모델 및 제2 선형 모델을 유도하는 단계; 및
    상기 제1 선형 모델 및 상기 제2 선형 모델 중 어느 하나의 선형 모델에 기초하여 상기 현재 블록의 휘도 성분 샘플들 중 제1 샘플의 위치에 대응되는 위치의 색차 성분 샘플을 예측하는 단계를 포함하고,
    상기 어느 하나의 선형 모델은 상기 제1 샘플의 값과 임계치를 비교하여 결정되는 것을 특징으로 하는 저장 매체.
PCT/KR2022/019116 2021-11-29 2022-11-29 비디오 신호 처리 방법 및 이를 위한 장치 WO2023096472A1 (ko)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
KR10-2021-0167427 2021-11-29
KR20210167427 2021-11-29
KR10-2022-0130960 2022-10-12
KR20220130960 2022-10-12

Publications (1)

Publication Number Publication Date
WO2023096472A1 true WO2023096472A1 (ko) 2023-06-01

Family

ID=86540240

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2022/019116 WO2023096472A1 (ko) 2021-11-29 2022-11-29 비디오 신호 처리 방법 및 이를 위한 장치

Country Status (1)

Country Link
WO (1) WO2023096472A1 (ko)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101516006B1 (ko) * 2011-03-09 2015-05-19 니폰덴신뎅와 가부시키가이샤 영상 부호화/복호 방법, 영상 부호화/복호 장치 및 그 프로그램
KR20190055819A (ko) * 2016-10-05 2019-05-23 퀄컴 인코포레이티드 조명 보상을 위해 템플릿 사이즈를 적응적으로 결정하는 시스템들 및 방법들
WO2019198997A1 (ko) * 2018-04-11 2019-10-17 엘지전자 주식회사 인트라 예측에 기반한 영상 코딩 방법 및 그 장치
KR20210083353A (ko) * 2018-11-05 2021-07-06 인터디지털 브이씨 홀딩스 인코포레이티드 이웃 샘플 의존 파라메트릭 모델에 기초한 코딩 모드의 단순화
KR20210113188A (ko) * 2018-12-21 2021-09-15 브이아이디 스케일, 인크. 템플릿 기반 비디오 코딩을 위한 개선된 선형 모델 추정에 관한 방법들, 아키텍처들, 장치들 및 시스템들

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101516006B1 (ko) * 2011-03-09 2015-05-19 니폰덴신뎅와 가부시키가이샤 영상 부호화/복호 방법, 영상 부호화/복호 장치 및 그 프로그램
KR20190055819A (ko) * 2016-10-05 2019-05-23 퀄컴 인코포레이티드 조명 보상을 위해 템플릿 사이즈를 적응적으로 결정하는 시스템들 및 방법들
WO2019198997A1 (ko) * 2018-04-11 2019-10-17 엘지전자 주식회사 인트라 예측에 기반한 영상 코딩 방법 및 그 장치
KR20210083353A (ko) * 2018-11-05 2021-07-06 인터디지털 브이씨 홀딩스 인코포레이티드 이웃 샘플 의존 파라메트릭 모델에 기초한 코딩 모드의 단순화
KR20210113188A (ko) * 2018-12-21 2021-09-15 브이아이디 스케일, 인크. 템플릿 기반 비디오 코딩을 위한 개선된 선형 모델 추정에 관한 방법들, 아키텍처들, 장치들 및 시스템들

Similar Documents

Publication Publication Date Title
WO2019125093A1 (ko) 비디오 신호 처리 방법 및 장치
WO2020162737A1 (ko) 이차 변환을 이용하는 비디오 신호 처리 방법 및 장치
WO2019190211A1 (ko) 모션 보상을 이용하는 비디오 신호 처리 방법 및 장치
WO2012081879A1 (ko) 인터 예측 부호화된 동영상 복호화 방법
WO2019147087A1 (ko) 비디오 신호 처리 방법 및 장치
WO2020050702A1 (ko) 다중 변환 커널을 사용하는 비디오 신호 처리 방법 및 장치
WO2020130600A1 (ko) 예측 모드를 시그널링하는 비디오 신호 처리 방법 및 장치
WO2021167340A1 (ko) 크로마 신호의 리샘플링에 기반하는 영상 부호화 및 복호화
WO2021251787A1 (ko) 루마 매핑 크로마 스케일링을 이용하는 영상 부호화 및 복호화
WO2021201463A1 (ko) 인루프 필터링 기반 영상 코딩 장치 및 방법
WO2021118297A1 (ko) 필터링을 위한 정보의 시그널링 기반 영상 코딩 장치 및 방법
WO2023096472A1 (ko) 비디오 신호 처리 방법 및 이를 위한 장치
WO2020256329A1 (ko) 움직임 예측에 기반한 영상 코딩 방법 및 장치
WO2023055147A1 (ko) Mhp(multi-hypothesis prediction)모드에 기초한 비디오 신호 처리 방법 및 이를 위한 장치
WO2023043296A1 (ko) Obmc를 이용한 비디오 신호 처리 방법 및 이를 위한 장치
WO2023132660A1 (ko) 종속 양자화를 이용한 비디오 신호 처리 방법 및 이를 위한 장치
WO2023277535A1 (ko) 인트라 예측을 이용한 비디오 신호 처리 방법 및 이를 위한 장치
WO2024053987A1 (ko) 기하학적 분할을 이용하는 비디오 신호 처리 방법 및 이를 위한 장치
WO2023033617A1 (ko) Lic(local illumination compensation) 모드를 이용한 비디오 신호 처리 방법 및 이를 위한 장치
WO2023055220A1 (ko) 참조 픽쳐를 기초로 인트라 예측 모드를 결정하는 비디오 신호 처리 방법 및 이를 위한 장치
WO2023182781A1 (ko) 템플릿 매칭에 기초한 비디오 신호 처리 방법 및 이를 위한 장치
WO2023219290A1 (ko) 크로마 성분별 인트라 예측모드의 부호화를 위한 방법 및 장치
WO2024010430A1 (ko) 선형 모델을 이용한 비디오 신호 처리 방법 및 이를 위한 장치
WO2022197137A1 (ko) 성분별 적응적 공간해상도를 갖는 움직임벡터를 이용하는 비디오 코딩방법 및 장치
WO2023106603A1 (ko) 템플릿 매칭 기반 이차적인 mpm 리스트를 이용하는 비디오 코딩을 위한 방법 및 장치

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: 22899154

Country of ref document: EP

Kind code of ref document: A1