WO2026005507A1 - 비디오 신호 처리 방법 및 이를 위한 장치 - Google Patents
비디오 신호 처리 방법 및 이를 위한 장치Info
- Publication number
- WO2026005507A1 WO2026005507A1 PCT/KR2025/008998 KR2025008998W WO2026005507A1 WO 2026005507 A1 WO2026005507 A1 WO 2026005507A1 KR 2025008998 W KR2025008998 W KR 2025008998W WO 2026005507 A1 WO2026005507 A1 WO 2026005507A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- mode
- block
- prediction
- template
- prediction mode
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/103—Selection of coding mode or of prediction mode
- H04N19/105—Selection 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/117—Filters, e.g. for pre-processing or post-processing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/124—Quantisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/132—Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods 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/136—Incoming video signal characteristics or properties
- H04N19/137—Motion inside a coding unit, e.g. average field, frame or block difference
- H04N19/139—Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods 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/146—Data rate or code amount at the encoder output
- H04N19/147—Data rate or code amount at the encoder output according to rate distortion criteria
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods 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/157—Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods 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/186—Methods 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
- H04N19/51—Motion estimation or motion compensation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/70—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
Definitions
- the present invention relates to a video signal processing method and a device therefor, and more particularly, to a video signal processing method and device for encoding or decoding a video signal.
- Compression coding refers to a series of signal processing techniques for transmitting digitized information over communication lines or storing it in a format suitable for storage media.
- Objects subject to compression coding include audio, video, and text, and the technology that performs compression coding on video in particular is called video compression.
- Compression coding of video signals is achieved by removing redundant information by considering spatial, temporal, and probabilistic correlations.
- the purpose of this specification is to provide a video signal processing method and a device therefor to improve the coding efficiency of a video signal.
- the present specification provides a video signal processing method and a device therefor.
- a video signal decoding device includes a processor, wherein the processor can predict a first block based on a first prediction mode and predict a second block based on a second prediction mode.
- the first block and the second block can be predicted in parallel.
- a video signal encoding device includes a processor, and the processor can obtain a bitstream to be decoded by a decoding method.
- a computer-readable non-transitory storage medium can store a bitstream decoded by a decoding method.
- a decoding method may include a step of predicting a first block based on a first prediction mode; and a step of predicting a second block based on a second prediction mode.
- the first block and the second block may be predicted in parallel.
- the first block and the second block are blocks within a template prediction region, and if at least one of the first peripheral samples adjacent to the first block does not exist within the template prediction region, the first prediction mode may be a template-based prediction mode, and if all of the first peripheral samples exist within the template prediction region, the first prediction mode may be a mode other than the template-based prediction mode, and if at least one of the second peripheral samples adjacent to the second block does not exist within the template prediction region, the second prediction mode may be a template-based prediction mode, and if all of the second peripheral samples exist within the template prediction region, the second prediction mode may be a mode other than the template-based prediction mode.
- the above template prediction region can be determined by a syntax element included in the bitstream.
- the first prediction mode is a prediction mode within a first candidate list
- the second prediction mode is a prediction mode within a second candidate list
- the first candidate list and the second candidate list may be the same.
- the first candidate list and the second candidate list may be lists related to any one of an intra TMP (Template Matching Prediction) mode, a DIMD (Decoder side intra mode derivation) mode, a TIMD (Template intra mode derivation) mode, a CCP (Cross-Component Prediction) merge mode, and an EIP (Extrapolation filter-based Intra Prediction) merge.
- TMP Temporal Matching Prediction
- DIMD Decoder side intra mode derivation
- TIMD Temporal intra mode derivation
- CCP Cross-Component Prediction
- EIP Extrapolation filter-based Intra Prediction
- the LIC Local Illumination Compensation
- the OBMC Overlapped Block Motion Compensation
- the first bidirectional motion information may be motion information obtained by converting the first unidirectional information
- the second bidirectional motion information may be motion information obtained by converting the second unidirectional information
- the first prediction mode is a prediction mode within a first prediction mode group including a plurality of prediction modes
- the second prediction mode is a prediction mode within a second prediction mode group including a plurality of prediction modes
- whether the first prediction mode is activated is determined based on whether the first prediction mode group unit is activated
- whether the second prediction mode is activated can be determined based on whether the second prediction mode group unit is activated.
- This specification provides a method for efficiently processing a video signal.
- FIG. 1 is a schematic block diagram of a video signal encoding device according to one embodiment of the present specification.
- FIG. 2 is a schematic block diagram of a video signal decoding device according to one embodiment of the present specification.
- Figure 3 illustrates an embodiment in which a coding tree unit within a picture is divided into coding units.
- FIG. 4 illustrates a method for signaling the splitting of a quad tree and a multi-type tree according to one embodiment of the present specification.
- FIG. 5 and FIG. 6 illustrate the intra prediction method according to an embodiment of the present specification in more detail.
- FIG. 7 shows the locations of surrounding blocks used to construct a motion candidate list in inter prediction according to one embodiment of the present specification.
- FIG. 8 illustrates a method for determining a reference pixel line based on a template according to one embodiment of the present specification.
- FIG. 9 is a diagram illustrating a block vector related to an IBC encoding method according to one embodiment of the present specification.
- FIG. 10 illustrates a method for predicting a current block using RRIBC in the horizontal direction according to one embodiment of the present specification.
- FIG. 11 illustrates a method for predicting a current block using RRIBC in the vertical direction according to one embodiment of the present specification.
- FIG. 12 illustrates a block vector of a block encoded in Intra TMP mode according to one embodiment of the present specification.
- FIG. 13 illustrates a case where a current block is divided by GPM mode according to one embodiment of the present specification and the divided area is encoded by IBC mode.
- FIG. 14 illustrates how a current block is encoded in IBC-CIIP mode according to one embodiment of the present specification.
- FIG. 15 illustrates an example of a reference region and filter shape used to derive CCCM parameters according to one embodiment of the present specification.
- FIG. 16 illustrates types of transform kernels that can be used in video coding according to one embodiment of the present specification.
- FIG. 17 illustrates a transformation set table for LFNST and NSPT transformations according to one embodiment of the present specification.
- FIG. 18 illustrates a method for deriving a multi-transform set and a LFNST/NSPT set according to one embodiment of the present specification.
- Figure 19 illustrates a mapping table according to one embodiment of the present specification.
- Figure 20 illustrates a conversion type set table according to one embodiment of the present specification.
- Figure 21 illustrates a conversion type combination table according to one embodiment of the present specification.
- FIG. 22 illustrates a threshold value table for an IDT conversion type according to one embodiment of the present specification.
- FIG. 23 illustrates block boundaries and samples around the boundaries in a deblocking filtering process according to one embodiment of the present specification.
- FIG. 24 illustrates an intra prediction mode based on an extrapolation filter according to one embodiment of the present specification.
- FIG. 25 is a diagram showing a Region of Interest (ROI) after LFNST transformation according to one embodiment of the present specification.
- ROI Region of Interest
- FIG. 26 is a diagram illustrating a process of generating a prediction block using DIMD (Decoder side intra mode derivation) according to one embodiment of the present specification.
- DIMD Decoder side intra mode derivation
- FIG. 27 is a diagram showing the locations of surrounding pixels used to derive directional information according to one embodiment of the present specification.
- FIG. 28 is a diagram illustrating a method for mapping directional modes according to one embodiment of the present specification.
- FIG. 29 is a diagram showing a histogram for deriving an intra prediction directional mode according to one embodiment of the present specification.
- FIG. 30 is a diagram illustrating a method for generating a prediction sample for restoring a current block according to one embodiment of the present specification.
- FIG. 32 is a diagram illustrating a method for generating prediction samples using intra prediction directional mode information and weights according to one embodiment of the present specification.
- FIGS. 33 and 34 are diagrams illustrating templates used to derive an intra prediction mode of a current block according to one embodiment of the present specification.
- FIG. 35 is a diagram illustrating a method for generating prediction samples (pixels) based on a plurality of reference pixel lines according to one embodiment of the present specification.
- FIG. 36 illustrates a method for predicting a sample using multiple reference pixel lines according to one embodiment of the present disclosure.
- FIG. 37 is a structural diagram illustrating a method for determining an optimal reference pixel line using a plurality of reference pixel lines based on a template according to one embodiment of the present specification.
- FIG. 38 illustrates a method for generating prediction samples using planar mode according to one embodiment of the present disclosure.
- FIG. 39 illustrates a method for constructing an MPM list using a multi-prediction mode according to one embodiment of the present specification.
- FIG. 40 illustrates a method of using a candidate list based on multiple prediction modes according to one embodiment of the present specification.
- FIG. 41 illustrates a method for selecting an optimal intra prediction mode combination according to one embodiment of the present specification.
- Figures 42 and 43 illustrate neighboring blocks of a current block according to one embodiment of the present specification.
- FIG. 44 illustrates a search area for obtaining a block vector in intra TMP mode according to one embodiment of the present specification.
- FIG. 45 illustrates a template used to find a block vector in intra TMP mode according to one embodiment of the present specification.
- FIG. 46 illustrates a method for determining whether a template-based encoding method is acceptable according to one embodiment of the present specification.
- FIG. 47 illustrates a method for signaling syntax elements related to the size of a template prediction region according to one embodiment of the present specification.
- FIG. 48 illustrates constraint flags related to a template prediction region included in a general_constraint_info() syntax structure according to one embodiment of the present specification.
- Figure 49 shows the TER size according to the sps_log2_parallel_template_level_minus2 value according to one embodiment of the present specification.
- FIG. 50 illustrates a method for prediction using a location-based model in EIP mode according to one embodiment of the present specification.
- FIG. 52 illustrates a matrix-based intra prediction method according to one embodiment of the present specification.
- Figure 53 shows the order in which the TM method is performed according to one embodiment of the present specification.
- FIG. 54 illustrates a method for setting a search area for a TM method based on initial motion information according to one embodiment of the present specification.
- FIG. 55 illustrates the location of a motion candidate searched within a search area according to one embodiment of the present specification.
- Figure 56 illustrates a process for searching for the location of a motion candidate according to one embodiment of the present specification.
- Figure 57 illustrates a process for evaluating search candidates according to one embodiment of the present specification.
- Figure 60 illustrates a process of performing multiple DMVR according to one embodiment of the present specification.
- Figure 61 illustrates a temporal hierarchy according to one embodiment of the present specification.
- FIG. 62 illustrates a method for performing OBMC on a CU basis according to one embodiment of the present specification.
- Figure 63 illustrates bidirectional motion information according to one embodiment of the present specification.
- FIG. 64 illustrates a method for changing unidirectional motion information into bidirectional or bi-predictive motion information according to one embodiment of the present specification.
- FIGS. 65 and 66 illustrate a method of using only some samples in the process of calculating a cost for a difference between reference blocks according to one embodiment of the present disclosure.
- FIG. 67 is a flowchart illustrating a video signal processing method according to one embodiment of the present specification.
- 'A and/or B' may be interpreted to mean 'comprising at least one of A or B'.
- Coding may be interpreted as encoding or decoding, depending on the case.
- a device that encodes a video signal to generate a video signal bitstream is referred to as an encoding device or encoder
- a device that decodes a video signal bitstream to restore a video signal is referred to as a decoding device or decoder.
- a video signal processing device is used as a term that includes both an encoder and a decoder.
- Information is a term that includes values, parameters, coefficients, elements, etc., and since the meaning may be interpreted differently depending on the case, the present invention is not limited thereto.
- 'Unit' is used to mean a basic unit of image processing or a specific location of a picture, and refers to an image area that includes at least one of a luminance component and a chroma component.
- 'block' refers to an image area including specific components among luminance components and chrominance components (i.e., Cb and Cr).
- terms such as 'unit', 'block', 'partition', 'signal', and 'region' may be used interchangeably.
- 'current block' means a block that is currently scheduled to be encoded
- 'reference block' means a block that has already been encoded or decoded and is used as a reference in the current block.
- the captured 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 configured as one picture unit and can be encoded or decoded.
- the captured image is a progressive image
- one frame is configured as a picture and can be encoded or decoded.
- the terms 'error signal', 'residual signal', 'residual signal', 'residual signal', and 'differential signal' may be used interchangeably.
- the terms 'intra prediction mode', 'intra prediction directional mode', 'intra-screen prediction mode', and 'intra-screen prediction directional mode' may be used interchangeably.
- the terms 'motion', 'movement', and the like may be used interchangeably.
- POC Picture Order Count
- bit depth is the range of sample values expressed in bit units. When the bit depth is 8 bits, the range of sample values is from 0 to 255.
- the internal bit depth refers to the bit depth when the bit depth is expanded to effectively encode an image in a video signal processing device (e.g., encoder, decoder).
- a video signal processing device expands the bit depth before encoding an image and reduces the bit depth to the bit depth of the input original image when outputting after decoding. For example, an image with an 8-bit depth is expanded to an image with a 10-bit depth and then encoded and decoded.
- FIG. 1 is a schematic block diagram of a video signal encoding device (100) according to one embodiment of the present specification.
- the encoding device (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), a prediction unit (150), and an entropy coding unit (160).
- the transform unit (110) obtains a transform coefficient value by transforming the residual signal, which is the difference between the input video signal and the prediction signal generated by the prediction unit (150).
- a discrete cosine transform DCT
- DST discrete sine transform
- the discrete cosine transform and the discrete sine transform divide the input picture signal into blocks and perform the transformation.
- the coding efficiency may vary depending on the distribution and characteristics of the values within the transform domain during the transformation.
- the transform kernel used for the transformation on the residual block may be a transform kernel having separable characteristics of vertical transformation and horizontal transformation. In this case, the transformation on the residual block may be performed separately as vertical transformation and horizontal transformation.
- the encoder may perform vertical transformation by applying the transform kernel in the vertical direction of the residual block.
- the encoder can perform horizontal transformation by applying a transformation kernel in the horizontal direction of the residual block.
- the transformation kernel may be used as a term referring to a set of parameters used for transformation of the residual signal, such as a transformation matrix, a transformation array, a transformation function, or a transformation.
- the transformation kernel may be any one of a plurality of available kernels. Additionally, transformation kernels based on different transformation types may be used for each of the vertical transformation and the horizontal transformation.
- the transformation coefficients are distributed in a way that increases toward the upper left corner of the block, and decreases toward 0 toward the lower right corner. As the current block size increases, there is a high probability of a significant number of 0 coefficients in the lower right corner. To reduce the transformation complexity of large blocks, the remaining regions can be reset to 0, leaving only the upper left corner as an arbitrary region.
- error signals may exist only in some regions of a coding block.
- the conversion process may be performed only on some arbitrary regions.
- an error signal may exist only in the first 2NxN block, and the conversion process may be performed only on the first 2NxN block, but the conversion process may not be performed on the second 2NxN block and may not be encoded or decoded.
- N can be any positive integer.
- the encoder may perform an additional transform before the transform coefficients are quantized.
- the aforementioned transform method may be referred to as a primary transform, and the additional transform may be referred to as a secondary transform.
- the secondary transform may be optional for each residual block.
- the encoder may improve coding efficiency by performing the secondary transform on areas where it is difficult to concentrate energy in the low-frequency region using only the primary transform.
- the secondary transform may be additionally performed on blocks where residual values appear large in directions other than the horizontal or vertical direction of the residual block.
- the secondary transform may not be performed separately into a vertical transform and a horizontal transform.
- Such a secondary transform may be referred to as a Low Frequency Non-Separable Transform (LFNST).
- LTNST Low Frequency Non-Separable Transform
- the quantization unit (115) quantizes the transformation coefficient value output from the transformation unit (110).
- a method is used to predict a picture using an already coded area through a prediction unit (150), and to obtain a restored picture by adding the residual value between the original picture and the predicted picture to the predicted picture.
- a prediction unit 150
- the encoder performs prediction, information that is also available to the decoder must be used. To this end, the encoder performs a process of restoring the encoded current block.
- 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 the quality of the restored picture and enhance the coding efficiency.
- a deblocking filter For example, a sample adaptive offset (SAO), and an adaptive loop filter may be included.
- the filtered picture is stored in the Decoded Picture Buffer (DPB, 156) to be output or used as a reference picture.
- DPB Decoded Picture Buffer
- a deblocking filter is a filter that removes distortion within blocks generated at the boundaries between blocks in a reconstructed picture.
- the encoder can determine whether to apply a deblocking filter to a certain boundary based on the distribution of pixels in several columns or rows based on an arbitrary boundary (edge) within the block.
- the encoder can apply a long filter, a strong filter, or a weak filter depending on the deblocking filtering strength.
- horizontal and vertical filtering can be processed in parallel.
- Sample adaptive offset (SAO) can be used to correct the offset from the original image on a pixel-by-pixel basis for the residual block to which the deblocking filter has been applied.
- the encoder can divide the pixels contained in the image into a certain number of regions, determine the regions to perform offset correction, and apply the offset to those regions (Band Offset).
- the encoder can use a method (Edge Offset) that applies an offset by considering the edge information of each pixel.
- CC-SAO cross component SAO
- the video signal processing device can classify the restored samples into categories, similar to the existing SAO, and derive an offset for each category and add it to the restored samples.
- the adaptive loop filter is a method that divides the pixels included in the image into a predetermined group, determines one filter to be applied to the group, and performs filtering differentially for each group.
- Information related to whether to apply the ALF can be signaled in units of coding units, and the shape and filter coefficients of the ALF filter to be applied can vary depending on each block.
- the same form (fixed form) of the ALF filter can be applied regardless of the characteristics of the target block to which it is applied.
- BF (Bilateral Filter) filtering is a method of applying a sample-by-sample offset derived from the difference in change between surrounding samples.
- 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 a current picture
- the inter prediction unit (154) performs inter prediction to predict the current picture using a reference picture stored in a decoded picture buffer (156).
- the intra prediction unit (152) performs intra prediction from reconstructed regions within 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, an MPM (Most Probable Mode) flag, an MPM index, and information about a reference sample.
- the inter prediction unit (154) may be configured to include a motion estimation unit (154a) and a motion compensation unit (154b).
- the motion estimation unit (154a) refers to a specific area of the restored reference picture to find the part most similar to the current area and obtains a motion vector value, which is the distance between the areas.
- the motion information (reference direction indication information (L0 prediction, L1 prediction, bidirectional prediction), reference picture index, motion vector information, etc.) for the reference area obtained 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) uses the motion information transferred from the motion estimation unit (154a), performs inter-motion compensation to generate a prediction block for the current block.
- the inter-prediction unit (154) transfers inter-encoding information including motion information for the reference area to the entropy coding unit (160).
- the prediction unit (150) may include an intra block copy (IBC) prediction unit (not shown).
- the IBC prediction unit performs IBC prediction on reconstructed samples in the current picture and transfers IBC encoding information to the entropy coding unit (160).
- the IBC prediction unit obtains a block vector value indicating a reference region used for prediction of the current region by referring to a specific region in the current picture.
- 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 the reference region, block vector information (index information for block vector prediction of the current block within a motion candidate list, and block vector difference information).
- the transformation unit (110) obtains a transformation coefficient value by transforming the residual value between the original picture and the predicted picture.
- the transformation can be performed in units of specific blocks within the picture, and the size of the specific block can be varied within a preset range.
- the quantization unit (115) quantizes the transformation coefficient value generated by the transformation unit (110) and transfers the quantized transformation coefficient to the entropy coding unit (160).
- the quantized transform coefficients in the form of a two-dimensional array can be rearranged into a one-dimensional array for entropy coding.
- the method of scanning the quantized transform coefficients can be determined by which scanning method is used depending on the size of the transform block and the prediction mode within the screen. For example, diagonal, vertical, and horizontal scanning can be applied.
- This scanning information can be signaled on a block-by-block basis and can be derived according to predetermined rules.
- the entropy coding unit (160) entropy-codes information representing quantized transform coefficients, intra-coding information, inter-coding information, etc. to generate a video signal bitstream.
- the entropy coding unit (160) may use a variable length coding (VLC) method and an arithmetic coding method.
- VLC variable length coding
- the variable length coding (VLC) method converts input symbols into continuous codewords, and the length of the codewords may be variable. For example, frequently occurring symbols are expressed as short codewords, and infrequently occurring symbols are expressed as long codewords.
- a context-based adaptive variable length coding (CAVLC) method may be used as a variable length coding method.
- Arithmetic coding converts continuous data symbols into a single prime number by using the probability distribution of each data symbol, and arithmetic coding can obtain the optimal prime number bits required to express each symbol.
- Context-based Adaptive Binary Arithmetic Coding (CABAC) can be used as an arithmetic coding.
- CABAC is a binary arithmetic coding method that uses multiple context models generated based on experimentally obtained probabilities.
- the context models can also be referred to as context models.
- the encoder binarizes each symbol using exp-Golomb, etc.
- the 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 the process of initializing the occurrence probability of each symbol, and is determined by the symbol type, quantization parameter (QP), and slice type (I, P, B).
- QP quantization parameter
- I, P, B slice type
- the context model provides the occurrence probability of the Least Probable Symbol (LPS) or Most Probable Symbol (MPS) for the symbol to be currently encoded, as well as information (valMPS) on which bin value corresponds to the MPS between 0 and 1.
- LPS Least Probable Symbol
- MPS Most Probable Symbol
- valMPS information on which bin value corresponds to the MPS between 0 and 1.
- One of several context models is selected through the context index (ctxIdx), and the context index can be derived from information about the current block to be encoded or information about the surrounding blocks. Initialization for binary arithmetic coding is performed based on the probability model selected from the context model.
- Binary arithmetic coding is performed by dividing the data into probability intervals based on the occurrence probabilities of 0 and 1, and then encoding is performed through a process in which the probability interval corresponding to the bin to be processed becomes the entire probability interval for the bin to be processed next.
- the location information within the probability interval in which the last bin has been processed is output.
- a renormalization process is performed to expand the probability interval and output the corresponding location information.
- a probability update process can be performed in which the probability for the next bin to be processed is newly set based on the information of the processed bin.
- a video signal processing device can perform entropy coding by setting the probability of 0 or 1 occurring to '0.5' without a context model, and this can be described as a bypass mode.
- a bitstream may consist of one or more coded video sequences (CVSs), and a CVS may be encoded independently of other CVSs.
- CVS may consist of one or more layers, and each layer may represent a specific quality, a specific resolution, or a general image, a depth map, or a transparency map.
- a coded layer video sequence may mean a layer-wise CVS composed of consecutive (in decoding order) PUs within the same layer. For example, there may be a CLVS for a specific quality layer, and there may be a CLVS for a depth map.
- NAL Network Abstraction Layer
- NAL units are divided into VCL (Video Coding Layer) NAL units containing video data and non-VCL NAL units containing parameter information for decoding video data, and there are various types of VCL or non-VCL NAL units.
- a NAL unit consists of NAL header information and RBSP (Raw Byte Sequence Payload) data, and the NAL header information includes summary information about the RBSP.
- the RBSP of a VCL NAL unit includes an integer number of encoded coding tree units. In order to decode a bitstream in a video decoder, the bitstream must first be divided into NAL unit units, and then each divided NAL unit must be decoded.
- VPS Video Parameter Set
- SPS Sequence Parameter Set
- PPS Picture Parameter Set
- APS Adaptation Parameter Set
- An RBSP of a VCL NAL unit may include an integer number of coding tree units.
- a VPS is a parameter set configured with a common syntax by extracting duplicate parameters from an SPS parameter set signaled for each layer in a bitstream that supports image quality, resolution, and frame rate scalability or a bitstream that supports multi-view.
- SPS is a parameter set that includes at least one of the following: Profile, which contains information about acceptable coding tools (or algorithms) and video formats; Level, which contains information about the decoder's processing capabilities, such as the resolution and frame rate of processable video and the allowable memory size; Tier, which contains information about the maximum bit rate that can be processed; and information about the resolution, bit depth, and whether or not a function can be enabled.
- PPS is a parameter set that includes at least one of the following: resolution of the video, tile division information, whether or not to enable weight prediction, quantization parameters, and filtering-related information.
- APS is a parameter set that includes one of the following: ALF filter coefficient information, LMCS-related parameters, and quantization scale parameters, depending on the APS type.
- Non-VCL NAL units include SEI (Supplemental Enhancement Information) NAL units, and SEI NAL units can include metadata that is not necessary for picture restoration. SEI NAL units can be used for picture output time, error loss detection and concealment, etc.
- AU Access Unit
- a CRA (Clean Random Access) picture is a VCL NAL unit that does not refer to other pictures other than itself for inter prediction during the decoding process.
- a CRA picture can be the first picture in the output order and can be an intra picture.
- An IDR (Instantaneous Decoding Refresh) picture is a VCL NAL unit that, like a CRA picture, does not reference other pictures for inter prediction during the decoding process.
- An IDR picture can be the first picture in the output order and can be an intra picture.
- Pictures decoded after an IDR picture in the decoding order cannot reference pictures decoded before the IDR picture.
- Pictures decoded after a CRA picture in the decoding order but output before the CRA picture in the output order can reference pictures decoded before the CRA picture.
- An IRAP (Intra Random Access Point) picture is a randomly accessible picture and can be a CRA picture or an IDR picture.
- FIG. 1 illustrates an encoding device (100) according to one embodiment of the present specification, and the blocks shown separately logically distinguish elements of the encoding device (100). Accordingly, the elements of the encoding device (100) described above may be mounted as one chip or as multiple chips depending on the design of the device. According to one embodiment, the operations of each element of the encoding device (100) described above may be performed by a processor (not shown).
- Fig. 2 is a schematic block diagram of a video signal decoding device (200) according to one embodiment of the present specification.
- the decoding device (200) of the present invention includes an entropy decoding unit (210), an inverse quantization unit (220), an inverse transformation unit (225), a filtering unit (230), and a prediction unit (250).
- the entropy decoding unit (210) entropy decodes the video signal bitstream to extract transform coefficient information, intra-coding information, inter-coding information, etc. for each region. For example, the entropy decoding unit (210) can obtain a binarization code for transform coefficient information of a specific region from the video signal bitstream. In addition, the entropy decoding unit (210) inversely binarizes the binarization code to obtain a quantized transform coefficient. The inverse quantization unit (220) inversely quantizes the quantized transform coefficient, and the inverse transform unit (225) restores the residual value using the inverse quantized transform coefficient. The video signal processing device (200) restores the original pixel value by adding the residual value obtained by the inverse transform unit (225) and the prediction value obtained by the prediction unit (250).
- the filtering unit (230) performs filtering on the picture to improve the image quality. This may include a deblocking filter to reduce block distortion and/or an adaptive loop filter to remove distortion from 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.
- the prediction unit (250) includes an intra prediction unit (252) and an inter prediction unit (254).
- the prediction unit (250) generates a prediction picture by utilizing the encoding type decoded through the entropy decoding unit (210) described above, the transform coefficients for each region, intra/inter encoding information, etc.
- the decoded region of the current picture or other pictures including the current block may be used.
- a picture (or tile/slice) that uses only the current picture for restoration, i.e., performs intra prediction or intra BC prediction, is called an intra picture or I picture (or tile/slice), and a picture (or tile/slice) that can perform all of intra prediction, inter prediction, and intra BC prediction is called an inter picture (or tile/slice).
- a picture (or tile/slice) that uses at most 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 P-picture (or tile/slice), and a picture (or tile/slice) that uses at most two motion vectors and reference picture indices is called a bi-predictive picture or B-picture (or tile/slice).
- a P-picture (or tile/slice) uses at most one motion information set to predict each block
- a B-picture (or tile/slice) uses at most two motion information sets to predict each block.
- a 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 within the current picture. Specifically, a sample within the current block can be predicted using a reference sample derived using the sample position within the current block and the directionality of the intra prediction mode. If the position of the reference sample is not an integer unit sample, the prediction can be made using an interpolated reference sample through an interpolation method using adjacent reference samples, which can be referred to as linear-based intra prediction.
- the intra encoding information can include at least one of an intra prediction mode, a Most Probable Mode (MPM) flag, and an MPM index.
- the intra prediction unit (252) predicts sample values of the current block using reconstructed samples located on the left and/or above the current block as reference samples.
- the reconstructed samples, the reference samples, and the samples of the current block can represent pixels.
- the sample values can represent pixel values.
- the reference samples may be samples included in a neighboring block 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.
- the reference samples may be samples located on a line within a preset distance from the left boundary of the current block and/or samples located on a line within a preset distance from the upper boundary of the current block among the samples of the neighboring blocks of the current block.
- the neighboring blocks of the current block may include at least one of a left (L) block, an upper (A) block, a lower left (BL) block, an above right (AR) block, or an above left (AL) block adjacent to the current block.
- the neighboring blocks of the current block may be reference blocks for predicting the current block.
- the inter prediction unit (254) generates a prediction block using the reference picture and inter encoding information stored in the decoded picture buffer (256).
- the inter encoding information may include a set of motion information (reference picture index, motion vector information, etc.) of the current block with respect to the reference block.
- Inter prediction may include L0 prediction, L1 prediction, and bi-prediction.
- L0 prediction is prediction using one reference picture included in the L0 picture list
- L1 prediction means prediction using one reference picture included in the L1 picture list.
- one set of motion information e.g., motion vector and reference picture index
- up to two reference areas can be used, and these two reference areas may exist in the same reference picture or may exist in different pictures, respectively.
- the bi-prediction method up to two sets of motion information (e.g., motion vectors and reference picture indices) can be used, and the two motion vectors may correspond to the same reference picture index or may correspond to different reference picture indices.
- the reference pictures are pictures that are located temporally before or after the current picture, and may be completed pictures that have already been restored.
- the two reference areas used in the bi-prediction method may be areas selected from each of the L0 picture list and the L1 picture list.
- a prediction method that uses only reference pictures having a POC smaller than the POC of the current picture or uses only reference pictures having a POC larger than the POC of the current picture based on the POC (picture order count) indicating the display order of the current picture can be called uni-directional prediction.
- a prediction method that uses both a reference picture with a POC (picture order count) smaller than that of the current picture and a reference picture with a POC larger than that of the current picture based on the POC indicating the display order of the current picture can be called bi-directional prediction.
- a prediction method that uses only one reference picture in uni-directional prediction can be called uni-prediction
- a prediction method that uses two reference pictures in uni-directional prediction can be called bi-prediction or bi-prediction.
- the inter prediction unit (254) can obtain a reference block of the current block using a motion vector and a reference picture index.
- the reference block exists in a reference picture corresponding to the reference picture index.
- a sample value of a block specified by the motion vector or an interpolated value thereof can be used as a predictor of the current block.
- an 8-tap interpolation filter can be used for a luminance signal and a 4-tap interpolation filter can be used for a chrominance signal.
- the interpolation filter for sub-pel unit motion prediction is not limited thereto. In this way, the inter prediction unit (254) performs motion compensation to predict the texture of the current unit from a previously restored picture. At this time, the inter prediction unit can use a 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 within the current picture.
- the IBC prediction unit may perform IBC prediction using IBC encoding information obtained from the entropy decoding unit (210).
- the IBC encoding information may include block vector information.
- a restored video picture is generated by adding the predicted value output from the intra prediction unit (252) or inter prediction unit (254) and the residual value output from the inverse transformation unit (225). That is, the video signal decoding device (200) restores the current block using the predicted block generated from the prediction unit (250) and the residual obtained from the inverse transformation unit (225).
- FIG. 2 illustrates a decoding device (200) according to one embodiment of the present specification, and the blocks shown separately illustrate logically distinguishing elements of the decoding device (200). Accordingly, the elements of the aforementioned decoding device (200) may be mounted as one chip or as multiple chips depending on the design of the device. According to one embodiment, the operations of each element of the aforementioned decoding device (200) may be performed by a processor (not shown).
- signaling can be described as encoding each syntax from the encoder's perspective
- parsing can be described as interpreting each syntax from the decoder's perspective. That is, each syntax can be included in the bitstream from the encoder and signaled, and the decoder can parse the syntax and use it in the restoration process.
- sequence of bits for each syntax listed in the prescribed hierarchical structure can be referred to as a bitstream.
- a picture can be encoded by dividing it into sub-pictures, slices, tiles, etc.
- a sub-picture can include one or more slices or tiles. When a picture is encoded by dividing it into multiple slices or tiles, all slices or tiles within the picture must be decoded before it can be displayed on the screen. On the other hand, when a picture is encoded into multiple sub-pictures, only any sub-picture can be decoded and displayed on the screen.
- a slice can include multiple tiles or sub-pictures, or a tile can include multiple sub-pictures or slices.
- Sub-pictures, slices, and tiles can be encoded or decoded independently, which is effective for parallel processing and improving processing speed. However, there is a disadvantage in that the amount of bits increases because the encoded information of adjacent sub-pictures, slices, and tiles cannot be used.
- Sub-pictures, slices, and tiles can be encoded by dividing them into multiple coding tree units (CTUs).
- CTUs coding tree units
- FIG. 3 illustrates an embodiment in which a Coding Tree Unit (CTU) within a picture is divided into Coding Units (CUs).
- CTU Coding Tree Unit
- CU Coding Unit
- a Coding Tree Unit may be composed of a luminance (luma) Coding Tree Block (CTB), two chroma (chroma) Coding Tree Blocks, and their encoded syntax information.
- CB luminance Coding Tree Block
- chroma chroma Coding Tree Blocks
- One Coding Tree Unit may be composed of one Coding Unit, or one Coding Tree Unit may be split into multiple Coding Units.
- One Coding Unit may be composed of a luminance Coding Block (CB), two chroma Coding Blocks, and their encoded syntax information.
- CB luminance Coding Block
- One Coding Block may be split into multiple Sub-Coding Blocks.
- One Coding Unit may be composed of one Transform Unit (TU), or one Coding Unit may be split into multiple Transform Units.
- a single transform unit may consist of a luminance transform block (TB), two chrominance transform blocks, and their encoded syntax information.
- a coding tree unit may be divided into multiple coding units.
- a coding tree unit may not be divided and may also be a leaf node. 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 video signal processing described above, such as intra/inter prediction, transformation, quantization, and/or entropy coding.
- the size and shape of a coding unit within a 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 in the present specification may refer to a rectangular block, but the present invention is not limited thereto.
- the coding tree unit is first partitioned into a Quad Tree (QT) structure. That is, in the Quad Tree structure, one node with a size of 2NX2N can be partitioned into four nodes with a size of NXN.
- the Quad Tree may also be referred to as a quaternary tree.
- the Quad Tree partitioning can be performed recursively, and not all nodes need to be partitioned to the same depth.
- the leaf node of the aforementioned quad tree can be further split into a multi-type tree (MTT) structure.
- MTT multi-type tree
- one node can be split into a binary or ternary tree structure of horizontal or vertical split. That is, the multi-type tree structure has four split structures: vertical binary split, horizontal binary split, vertical ternary split, and horizontal ternary split.
- the width and height of the node can both have a power of 2 value.
- a node of size 2NX2N can be split into two NX2N nodes by vertical binary split, and can be split into two 2NXN nodes by horizontal binary split.
- a node of size 2NX2N can be split into nodes of size (N/2)X2N, NX2N, and (N/2)X2N by vertical ternary splitting, and into nodes of size 2NX(N/2), 2NXN, and 2NX(N/2) by horizontal ternary splitting.
- This multi-type tree splitting can be performed recursively.
- a leaf node of a multi-type tree can be a coding unit. If the coding unit is not larger than the maximum transformation length, the coding unit can be used as a unit of prediction and/or transformation without further splitting. In one embodiment, if the width or height of the current coding unit is larger than the maximum transformation length, the current coding unit can be split into multiple transformation units without explicit signaling regarding the splitting. Meanwhile, in the quad tree and multi-type tree described above, at least one of the following parameters can be predefined or transmitted through an RBSP of a higher-level set, such as a PPS, an SPS, or a VPS.
- CTU size The size of the root node of the quad tree
- MinQtSize The minimum allowed QT leaf node size
- MaxBtSize The maximum allowed BT root node size
- MaxTT size MaxTtSize
- MaxMttDepth The maximum allowed depth of an MTT split from a leaf node of a QT
- MinBT size MinBtSize
- MinTT size MinTtSize
- Fig. 4 illustrates one embodiment of a method for signaling splitting of a quad tree and a multi-type tree.
- Pre-configured flags may be used to signal splitting of the quad tree and the multi-type tree described above.
- a flag 'split_cu_flag' indicating whether a current node is split 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. If the current node is a coding tree unit, the coding tree unit includes one coding unit that is not split. If 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. If 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 can be split into nodes of a quad tree or a multi-type tree depending on the value of 'split_qt_flag'.
- the coding tree unit is the root node of the quad tree and can be first split into a quad tree structure. In the quad tree structure, 'split_qt_flag' is signaled for each node 'QT node'.
- quad tree splitting can be limited depending on the type of the 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' may be further split into a multi-type tree structure. As described above, if 'split_qt_flag' is 0, the current node may be split into multi-type nodes. To indicate the splitting direction and splitting shape, 'mtt_split_cu_vertical_flag' and 'mtt_split_cu_binary_flag' may be signaled.
- 'mtt_split_cu_vertical_flag' a vertical split of the node 'MTT node' is indicated, and if the value of 'mtt_split_cu_vertical_flag' is 0, a horizontal split of the node 'MTT node' is indicated. Additionally, if the value of 'mtt_split_cu_binary_flag' is 1, the node 'MTT node' is split into two rectangular nodes, and if the value of 'mtt_split_cu_binary_flag' is 0, the node 'MTT node' is split into three rectangular nodes.
- the tree partitioning structure allows luminance blocks and chrominance blocks to be partitioned in the same manner. That is, the chrominance blocks can be partitioned by referring to the partitioning form of the luminance blocks. If the current chrominance block is smaller than a predetermined size, the chrominance block may not be partitioned even if the luminance block is partitioned.
- the luminance block and the chrominance block may have the same tree partitioning structure, which may be referred to as a single tree. If the current block is encoded with a single tree, the partitioning structure, encoding mode information, motion information, etc. of the luminance block and the chrominance block may be the same, and information related to other error signals may be different between the luminance block and the chrominance block. In addition, the luminance block and the chrominance block may have different tree partitioning structures, which may be referred to as a dual tree. If the current block is encoded with a dual tree, the partitioning structure, encoding mode information, motion information, etc. of the luminance block and the chrominance block may be different in at least one or more.
- the encoder and decoder can use the segmentation information, encoding mode information, and motion information of the luminance block to encode the chrominance block.
- a node to be divided into the smallest unit can be processed as a single coding block.
- the coding block can be divided into multiple sub-blocks (sub-coding blocks), and the prediction information of each sub-block can be the same or different.
- the coding unit is an intra mode
- the intra prediction modes of each sub-block can be the same or different.
- the coding unit is an inter mode
- the motion information of each sub-block can be the same or different.
- each sub-block can be encoded or decoded independently.
- Each sub-block can be distinguished by a sub-block index (sbIdx).
- a coding unit when a coding unit is divided into sub-blocks, it can be divided horizontally, vertically, or diagonally.
- ISP Intra Sub-Partitions
- GPM Gaometric partitioning mode
- the position and direction of the diagonal line are derived using a predefined angle table, and the index information of the angle table is signaled.
- the motion information may include one or more of reference direction indication information, reference picture information, motion vector, motion resolution, affine model, CPMV (control point motion vector), block vector, block vector resolution, MHP information, LIC information, filtering information, BCW information, and RRIBC information.
- the reference direction indication information is composed of L0 prediction, L1 prediction, L0 and L1 prediction, and L0 prediction and L1 prediction are uni-prediction and unidirectional prediction, and L0 and L1 prediction are bi-prediction. And L0 and L1 prediction can be uni-prediction or bi-directional prediction.
- L0 prediction is predicted using reference pictures in the L0 reference picture list
- L1 prediction can be predicted using reference pictures in the L1 reference picture list.
- a reference picture with a POC smaller than the POC of the current picture can be added to the reference picture list based on the POC of the current picture.
- the L0 reference picture list can be composed in order from a reference picture with a POC closer to the POC of the current picture to a reference picture with a POC farther from the POC.
- a reference picture with a POC larger than the POC of the current picture can be added to the reference picture list based on the POC of the current picture.
- the L1 reference picture list can be organized in the order of reference pictures with a POC closer to the POC of the current picture to reference pictures with a POC farther away.
- the L0 and L1 reference picture lists can vary for each slice, subpicture, and picture.
- the L0 reference picture list can include reference pictures of the L1 reference picture list.
- the L1 reference picture list can include reference pictures of the L0 reference picture list.
- Reference picture information may vary for each block and may be index information indicating which reference picture in the L0 reference picture list and/or the L1 reference picture list is used to predict the current block.
- the reference picture information may include one or more of L0 reference picture information and L1 reference picture information.
- a motion vector is information that indicates the block that best matches the current block in a reference picture. It is a value that represents the distance to the reference block in horizontal and vertical coordinates based on the upper left position of the current block in the picture.
- Motion resolution represents the resolution of the motion vector, and motion resolution can be expressed in units of 4 pixels, 1 pixel (integer pixel), 1/2 pixel, 1/4 pixel, 1/8 pixel, 1/16 pixel, etc.
- a block vector is information indicating the block that best matches the current block in the already restored area within the current picture. It is a value that represents the distance to the reference block in horizontal and vertical coordinates based on the upper left position of the current block within the picture.
- Block vector resolution can be expressed in units of 4 pixels, 1 pixel (integer pixel), 1/2 pixel, 1/4 pixel, 1/8 pixel, 1/16 pixel, etc.
- MHP information may include whether additional motion information is applied and additional motion information.
- LIC information may include whether LIC applies to the current block.
- Filtering information may include filtering type and coefficient information applied according to the motion resolution of the current block.
- BCW information may include whether BCW is applied to the current block.
- RRIBC information may include information about whether RRIBC is applied and the RRIBC type if the current block is encoded in IBC mode.
- Picture prediction (motion compensation) for coding is performed on coding units that are no longer divisible (i.e., leaf nodes of a coding tree unit).
- the basic unit performing this prediction is referred to below as a prediction unit or prediction block.
- unit used in this specification may be used as a replacement for the prediction unit, which is the basic unit for performing prediction.
- the present invention is not limited thereto, and can be understood more broadly as a concept that includes the coding unit.
- Figures 5 and 6 illustrate an intra prediction method according to an embodiment of the present disclosure in more detail.
- the intra prediction unit predicts sample values of the current block using reconstructed samples located to the left and/or above the current block as reference samples.
- FIG. 5 illustrates an embodiment of reference samples used for prediction of a current block in an intra prediction mode.
- the reference samples may be samples adjacent to a left boundary of the current block and/or samples adjacent to an upper boundary.
- reference samples may be set using at most 2W+2H+1 surrounding samples located on the left and/or upper sides of the current block.
- pixels of multiple reference lines may be used for intra prediction of the current block.
- the multiple reference lines may be composed of n lines located within a preset range from the current block.
- separate index information indicating the 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 perform a reference sample padding process to obtain a reference sample.
- the intra prediction unit may perform a reference sample filtering process to reduce an error in intra prediction. That is, filtering may be performed on the surrounding samples and/or the reference samples obtained by the reference sample padding process to obtain filtered reference samples.
- the intra prediction unit predicts samples of the current block using the reference samples obtained in this manner.
- the intra prediction unit predicts samples of the current block using unfiltered reference samples or filtered reference samples.
- the surrounding samples may include samples on at least one reference line.
- the surrounding samples may include adjacent samples on a line adjacent to a boundary of the current block.
- FIG. 6 illustrates 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 any 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.
- an intra prediction mode set may include all intra prediction modes used for intra prediction (e.g., a total of 67 intra prediction modes). More specifically, the intra prediction mode set may include a planar mode, a DC mode, and a plurality of (e.g., 65) angular modes (i.e., directional modes). Each intra prediction mode may be indicated by a preset index (i.e., an intra prediction mode index). For example, as illustrated 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 each indicate different angular modes. The angular modes each indicate different angles within a preset angular range.
- an angular mode may indicate an angle within an angular range from 45 degrees to -135 degrees clockwise (i.e., a first angular range).
- the angular mode may be defined based on the 12 o'clock direction.
- intra prediction mode index 2 indicates horizontal diagonal (HDIA) mode
- intra prediction mode index 18 indicates horizontal (HOR) mode
- intra prediction mode index 34 indicates diagonal (DIA) mode
- intra prediction mode index 50 indicates vertical (VER) mode
- intra prediction mode index 66 indicates vertical diagonal (VDIA) mode.
- the preset angle range may be set differently depending on the shape of the current block. For example, if 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 angle range (i.e., a second angle range) between (45+offset1) degrees and (-135+offset1) degrees in a clockwise direction. At this time, angle modes 67 to 76 that are outside the first angle range may be additionally used.
- an angle range i.e., a second angle range
- the angle mode may indicate an angle within an angle range (i.e., a third angle range) between (45-offset2) degrees and (-135-offset2) degrees in a clockwise direction.
- angle modes -10 to -1 that are outside the first angle range may be additionally used.
- the values of offset1 and offset2 may be determined differently depending on the ratio between the width and height of the rectangular block. Also, offset1 and offset2 can be positive.
- the plurality of angular modes constituting the intra prediction mode set may include a basic angular mode and an extended angular mode.
- the extended angular mode may be determined based on the basic angular mode.
- the basic angle mode may be a mode corresponding to an angle used in intra prediction of the existing HEVC (High Efficiency Video Coding) standard
- the extended angle mode may be a mode corresponding to an angle newly added in intra prediction of the next-generation video codec standard.
- the basic angle mode may be an angle mode corresponding to any one of the intra prediction modes ⁇ 2, 4, 6, ... , 66 ⁇
- the extended angle mode may be an angle mode corresponding to any one of the intra prediction modes ⁇ 3, 5, 7, ... , 65 ⁇ . That is, the extended angle mode may be an angle mode between the basic angle modes within the first angle range. Therefore, the angle indicated by the extended angle mode may be determined based on the angle indicated by the basic angle mode.
- 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 basic angle mode may be an angle mode corresponding to any one of the intra prediction modes ⁇ 2, 3, 4, ... , 66 ⁇
- the extended angle mode may be an angle mode corresponding to any one of the intra prediction modes ⁇ -14, –13, –12, ... , –1 ⁇ and ⁇ 67, 68, ... , 80 ⁇ .
- the angle indicated by the extended angle mode may be determined as an opposite angle to the angle indicated by the corresponding basic angle mode. Accordingly, the angle indicated by the extended angle mode may be determined based on the angle indicated by the basic angle mode.
- the number of extended angle modes is not limited thereto, and additional extended angles may be defined according to the size and/or shape of the current block. Meanwhile, the total number of intra prediction modes included in the intra prediction mode set may vary depending on the configuration of the basic angle mode and the extended angle mode described above.
- the spacing between the extended angular modes may be set based on the spacing between the corresponding basic angular modes.
- the spacing between the extended angular modes ⁇ 3, 5, 7, ... , 65 ⁇ may be determined based on the spacing between the corresponding basic angular modes ⁇ 2, 4, 6, ... , 66 ⁇ .
- the spacing between the extended angular modes ⁇ -14, -13, ... , -1 ⁇ may be determined based on the spacing between the corresponding opposite basic angular modes ⁇ 53, 53, ... , 66 ⁇ , and the spacing between the extended angular modes ⁇ 67, 68, ... , 80 ⁇ may be determined based on the spacing between the corresponding opposite basic angular modes ⁇ 2, 3, 4, ... , 15 ⁇ .
- the angular spacing between the extended angular modes may be set to be equal to the angular spacing between the corresponding basic angular modes.
- the number of the extended angular modes in the intra prediction mode set may be set to be less than or equal to the number of the basic angular modes.
- an extended angular mode may be signaled based on a base angular mode.
- a wide-angle mode i.e., an extended angular mode
- the replaced base angular mode may be an angular mode corresponding to an opposite side of the wide-angle mode. That is, the replaced base angular mode is an angular mode corresponding to an angle in an opposite direction to an angle indicated by the wide-angle mode or an angle that is different from the angle in the opposite direction by a preset offset index.
- the preset offset index is 1.
- An intra prediction mode index corresponding to the replaced base angular mode may be remapped to the wide-angle mode to signal the corresponding wide-angle mode.
- the wide-angle modes ⁇ -14, -13, ... , -1 ⁇ may be signaled by intra prediction mode indices ⁇ 52, 53, ... , 66 ⁇
- the wide-angle modes ⁇ 67, 68, ... , 69 ⁇ may be signaled by intra prediction mode indices ⁇ 52, 53, ... , 66 ⁇ , respectively.
- 80 ⁇ can be signaled by intra prediction mode indices ⁇ 2, 3, ... , 15 ⁇ , respectively.
- the intra prediction mode index for the basic angular mode signal the extended angular mode in this way, even if the configurations of the angular modes used for intra prediction of each block are different, the same set of intra prediction mode indices can be used to signal the intra prediction mode. Therefore, the signaling overhead due to changes in the 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.
- the extended angle mode may be used for intra prediction of the current block, and otherwise, only the default angle mode may be used for intra prediction of the current block.
- the extended angle mode may be used for intra prediction of the current block, and if the current block is a square block, only the default angle mode may be used for intra prediction of the current block.
- the intra prediction unit determines reference samples and/or interpolated reference samples to be used for intra prediction of the current block based on intra prediction mode information of the current block. If the intra prediction mode index indicates a specific angular mode, the reference sample or interpolated reference sample corresponding to the specific angle from the current sample of the current block is used for prediction of the current pixel. Therefore, different sets of reference samples and/or interpolated reference samples can be used for intra prediction depending on the intra prediction mode.
- the decoder restores the 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 information used for inter prediction may include reference direction indication information (inter_pred_idc), reference picture indexes (ref_idx_l0, ref_idx_l1), and motion vectors (mvL0, mvL1).
- Reference picture list utilization information predFlagL0, predFlagL1 may be set according to the reference direction indication information.
- the coding unit can be divided into multiple sub-blocks, and the prediction information of each sub-block can be the same or different.
- the prediction information of each sub-block can be the same or different.
- the coding unit is an intra mode
- the intra prediction modes of each sub-block can be the same or different.
- the coding unit is an inter mode
- the motion information of each sub-block can be the same or different.
- each sub-block can be encoded or decoded independently.
- Each sub-block can be distinguished through a sub-block index (sbIdx).
- the motion vector of the current block is likely to be similar to that of the surrounding blocks. Therefore, the motion vectors of the surrounding blocks can be used as motion vector predictors (mvp), and the motion vector of the current block can be derived using the motion vectors of the surrounding blocks. Furthermore, to improve the accuracy of the motion vector, the difference in motion vectors (mvd) between the optimal motion vector of the current block, found from the original image by the encoder, and the motion predictor can be signaled.
- mvp motion vector predictors
- Motion vectors can have various resolutions, and the resolution of motion vectors can vary on a block-by-block basis.
- Motion vector resolution can be expressed in integer units, half-pixel units, quarter-pixel units, sixteenth-pixel units, and integer-4 pixel units. Since images such as screen content are in simple graphical forms such as characters, interpolation filters do not need to be applied, integer units and integer-4 pixel units can be selectively applied on a block-by-block basis.
- Blocks encoded in affine mode which can express rotation and scale, have significant shape changes, so integer units, quarter-pixel units, and sixteenth-pixel units can be selectively applied on a block-by-block basis.
- Information on whether to selectively apply motion vector resolution on a block-by-block basis is signaled with amvr_flag. If applicable, which motion vector resolution to apply to the current block is signaled with amvr_precision_idx.
- the weights between the two prediction blocks can be applied equally or differently when applying weighted average, and information about the weights is signaled through bcw_idx.
- the Merge method configures the motion information of the current block to be identical to the motion information of the adjacent blocks to the current block, and has the advantage of increasing the encoding efficiency of the motion information by spatially propagating the motion information without change in the homogeneous motion region.
- the AMVP method predicts motion information in the L0 and L1 prediction directions respectively to express accurate motion information and signals the most optimal motion information.
- a method for deriving motion information in Merge or AMVP may be to construct a motion candidate list using motion prediction values derived from neighboring blocks of the current block, and then signal the index information for the optimal motion candidate.
- AMVP since motion candidate lists are derived for each of L0 and L1, the optimal motion candidate indices (mvp_l0_flag, mvp_l1_flag) for each of L0 and L1 are signaled.
- merge index (merge_idx) is signaled.
- the 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.
- MergeSkip mode a mode in which there is no information about the remaining blocks in a block encoded in Merge mode.
- Bidirectional motion information for the current block can be derived using a combination of AMVP and Merge modes.
- motion information in the L0 direction can be derived using AMVP
- motion information in the L1 direction can be derived using Merge.
- Merge can be applied to L0
- AMVP can be applied to L1.
- This encoding mode can be referred to as AMVP-merge mode.
- the motion candidates and motion information candidates in this specification may have the same meaning. Furthermore, the motion candidate list and motion information candidate list in this specification may have the same meaning.
- SMVD Symmetric MVD
- MVD Motion Vector Difference
- OBMC Overlapped Block Motion Compensation
- a video signal processing device can divide a current block into multiple sub-blocks and then determine whether to apply OBMC and an OBMC mode for each sub-block.
- the OBMC mode can be determined based on different weights. Whether to apply OBMC and the OBMC mode can be determined through a reference template configured using neighboring samples adjacent to the current sub-block.
- the video signal processing device can predict a template using motion information of the current sub-block and motion information of neighboring blocks of the current sub-block, and then determine whether to apply OBMC and the OBMC mode based on a SAD or MR-SAD cost between the predicted template and the reference template.
- An OBMC mode using a template can be referred to as TM OBMC (Template Matching OBMC).
- merge motion candidates have low motion accuracy.
- the MMVD (Merge mode with MVD) method can be used.
- the MMVD method is a method of compensating motion information using one candidate selected from several motion difference value candidates.
- Information about the compensation value of the motion information obtained through the MMVD method e.g., an index indicating one candidate selected from among the motion difference value candidates
- the inclusion of information about the compensation value of the motion information in the bitstream can save bits.
- MBVD (merge mode with block vector differences) mode is a mode that encodes the differential value for a block vector, similar to MMVD, which is a mode that encodes the differential value for a motion vector in merge mode.
- the MBVD method is a method that determines a block vector by using one candidate selected from several block vector difference value candidates.
- Information about the differential value of the block vector obtained through the MBVD method e.g., an index indicating one candidate selected from among the block vector difference value candidates
- the amount of bits can be saved by including only a part of the information about the differential value of the block vector in the bitstream.
- TM Temporal Matching
- BM Breast Matching
- BM Bilateral Matching
- the DMVR (Decoder-side Motion Vector Refinement) method is a method of compensating motion information through the correlation of already restored reference images to find slightly more accurate motion information. It is a method of using the bidirectional motion information of the current block to use the best matching point between reference blocks within an arbitrary set area of two reference pictures as a new bidirectional motion.
- the encoder performs DMVR on a block basis to compensate for the motion information, and then divides the block into sub-blocks and performs DMVR on each sub-block basis to compensate for the motion information of the sub-block again.
- MP-DMVR Multi-pass DMVR
- a video signal processing device can construct an initial motion candidate list and compensate for each motion candidate within the initial motion candidate list using the TM or DMVR method.
- the video signal processing device can then reorder the compensated motion candidates based on template costs to obtain a reordered motion candidate list. This can be referred to as Adaptive Reordering of Merge Candidates (ARMC).
- ARMC Adaptive Reordering of Merge Candidates
- the LIC (Local Illumination Compensation) method is a method of compensating for luminance changes between blocks. It is a method of deriving a linear model using neighboring pixels adjacent to the current block, and then compensating for the luminance information of the current block through the linear model.
- Existing video encoding methods perform motion compensation that only considers parallel translation in all directions, which reduces encoding efficiency when encoding videos containing motions commonly encountered in the real world, such as zooming in, zooming out, and rotation.
- an affine model-based motion prediction technique utilizing a four-parameter (rotation) or six-parameter (zoom in, zoom out, rotation) model can be applied.
- Bi-Directional Optical Flow is used to compensate for predicted blocks by estimating pixel changes based on optical flow from a reference block of a block composed of bidirectional motion.
- the motion information derived from BDOF in VVC can be used to compensate for the motion of the current block.
- PROF Prediction Refinement with Optical Flow
- PROF calculates a correction value on a pixel-by-pixel basis for affine motion-compensated pixel values on a sub-block-by-subblock basis based on optical flow to obtain a final prediction signal.
- the CIIP (Combined Inter-/Intra-picture Prediction) method is a method of generating a final prediction block by weighting and averaging prediction blocks generated by the intra-picture prediction method and prediction blocks generated by the inter-picture prediction method when generating a prediction block for the current block.
- the Intra Block Copy (IBC) method finds the most similar part to the current block in a previously restored area within the current picture and uses that reference block as a prediction block for the current block. At this time, information related to the block vector, which represents the distance between the current block and the reference block, can be included in the bitstream.
- the decoder can parse the block vector information contained in the BeastStream to calculate or set the block vector for the current block.
- the BCW (Bi-prediction with CU-level Weights) method is a method that performs a weighted average on two motion-compensated prediction blocks by adaptively applying weights on a block-by-block basis, rather than generating a prediction block by averaging two motion-compensated prediction blocks from different reference pictures.
- the Intra TMP (Template Matching Prediction) method is a method in which a video signal processing device constructs a reference template using pixel values of neighboring blocks adjacent to the current block, finds the part most similar to the constructed reference template in an already restored area within the current picture, and then uses the reference block (the part found in the already restored area) as a prediction block for the current block.
- the MHP (Multi-hypothesis prediction) method is a method of performing weight prediction using various prediction signals by transmitting additional motion information to unidirectional and bidirectional motion information during inter-screen prediction.
- CCLM Cross-component linear model
- MMLM Multi-model Linear mode
- GLM Gradient Linear Model
- CCP Cross-Component Prediction
- the CCP merge method is a method of predicting the chrominance block of the current block using the CCP model (models such as CCLM, MMLM, and CCCM) used in the surrounding blocks.
- encoding modes prediction modes
- CCLM mode may be described as the CCLM method or CCLM.
- the reconstructed coefficient t' k for an input coefficient t k depends only on the associated quantization index q k . That is, the quantization index for any reconstructed coefficient has a different value from the quantization indices for other reconstructed coefficients.
- t' k may be a value of t k that includes quantization error, and may be different or the same depending on the quantization parameter.
- t' k can be named a reconstructed transform coefficient or an inverse quantized transform coefficient
- the quantization index can also be named a quantized transform coefficient.
- the reconstructed coefficients are spaced at equal intervals.
- the distance between two adjacent reconstructed values is referred to as the quantization step size.
- Reconstructed values can include zeros, and the entire set of available reconstructed values can be uniquely defined by the quantization step size.
- the quantization step size can vary depending on the quantization parameter.
- quantization reduces the set of acceptable reconstructed transform coefficients, and the number of elements in this set can be finite. This limits the ability to minimize the average error between the original and reconstructed images.
- Vector quantization can be used as a method to minimize this average error.
- a simple form of vector quantization used in video encoding is sign data hiding. This is a method in which the encoder does not encode the sign of a non-zero coefficient, and the decoder determines the sign of the coefficient based on whether the sum of the absolute values of all coefficients is even or odd. To achieve this, the encoder may increase or decrease the value of at least one coefficient, and at least one coefficient may be selected and adjusted to be optimal in terms of rate-distortion cost. In one implementation, a coefficient having a value close to the boundary of the quantization interval may be selected.
- Another vector quantization method is trellis-coded quantization, which is used in video coding as an optimal path search technique to obtain optimized quantization values in dependent quantization.
- Block-wise, quantization candidates for all coefficients in the block are arranged in a trellis graph, and the optimal trellis path between the optimized quantization candidates is searched for by considering the cost for rate-distortion.
- dependent quantization applied to video coding can be designed so that the set of allowable reconstructed transform coefficients for a transform coefficient depends on the value of the transform coefficient preceding the current transform coefficient in the restoration order. At this time, by selectively using multiple quantizers according to the transform coefficients, the average error between the original image and the reconstructed image can be minimized, thereby increasing the encoding efficiency.
- the MIP (Matrix Intra Prediction) method is a matrix-based intra prediction method. Unlike the prediction method that has directionality from the pixels of the surrounding blocks adjacent to the current block, it is a method of obtaining a prediction signal using a predefined matrix and offset values for the pixels on the left and top of the surrounding blocks.
- a template which is a random region adjacent to the current block and reconstructed, is used.
- the intra-prediction mode derived from the template's surrounding pixels can be used to reconstruct the current block.
- the decoder generates a prediction template for the template using the surrounding pixels (reference) adjacent to the template.
- the intra-prediction mode that generates the prediction template most similar to the already reconstructed template can then be used to reconstruct the current block. This method is called TIMD (Template intra-mode derivation).
- TIMD merge mode is a mode in which TIMD information is inherited from neighboring blocks encoded with TIMD or TIMD merge mode and used in the current block.
- TIMD information may include at least one of an intra prediction directionality mode, information on whether to apply a weighted average, weight information for each intra prediction mode, and transformation type information.
- a video signal processing device may construct a TIMD merge list using TIMD information used in neighboring blocks, and the video signal processing device may add a predetermined maximum number of TIMD information derived from neighboring blocks to the TIMD merge list in order from a position closest to the current block to a position farther away from the current block.
- the predetermined maximum number may be a positive integer greater than or equal to 1, and may be 5.
- an encoder can determine a prediction mode for generating a prediction block and generate a bitstream containing information about the determined prediction mode.
- a decoder can parse the received bitstream to set an intra-prediction mode.
- the bit amount of information about the prediction mode may be about 10% of the total bitstream size.
- the encoder may not include information about the intra-prediction mode in the bitstream. Accordingly, the decoder can derive (determine) an intra-prediction mode for restoring the current block using the characteristics of the surrounding blocks, and can restore the current block using the derived intra-prediction mode.
- the decoder can use a method of applying a Sobel filter in the horizontal and vertical directions to each neighboring pixel (pixel) of the current block to infer directional information, and then mapping the directional information to the intra-prediction mode to derive the intra-prediction mode.
- the method by which the decoder derives the intra prediction mode using surrounding blocks can be described as Decoder side intra mode derivation (DIMD).
- the video signal processing device can derive an intra prediction mode through the DIMD and TIMD methods. If the current block is a chroma block, since there is an already reconstructed luminance block corresponding to the chroma block, the video signal processing device can derive an intra prediction mode by applying the DIMD and TIMD methods using the reconstructed luminance block, and then use the derived intra prediction mode as the intra prediction mode of the chroma block. That is, the video signal processing device can derive directional information if the current block is a luminance block, and may not derive directional information if the current block is a chroma block, and can apply the directional information found in the luminance block to the chroma block. This mode can be referred to as the "DIMD Chroma" mode or the "TIMD Chroma" mode.
- Figure 7 is a diagram showing the locations of surrounding blocks used to construct a motion candidate list in inter prediction.
- the neighboring blocks can be blocks of spatial position or blocks of temporal position.
- the neighboring block spatially adjacent to the current block can be at least one of a left (A1) block, a left below (A0) block, an above (B1) block, an above right (B0) block, and an above left (B2) block.
- the neighboring block temporally adjacent to the current block can be a block that includes an upper left pixel position of a bottom right (BR) block of the current block in a corresponding picture (Collocated picture).
- a block that includes a horizontal and vertical center (Center, Ctr) pixel position of the current block in the picture corresponding to the current picture (Collocated picture) can be used as the temporal neighboring block.
- Motion candidate information derived from corresponding pictures can be referred to as a Temporal Motion Vector Predictor (TMVP). Only one TMVP can be derived from a single block, or a block can be divided into multiple sub-blocks, and then a separate TMVP candidate can be derived for each sub-block.
- the method for deriving TMVPs at the sub-block level can be referred to as a sub-block Temporal Motion Vector Predictor (sbTMVP).
- Whether the methods described in this specification are applied can be determined based on at least one of information about the slice type (e.g., whether it is an I slice, a P slice, or a B slice), whether it is a tile, whether it is a subpicture, the size of the current block, the depth of the coding unit, whether the current block is a luminance block or a chrominance block, whether it is a reference frame or a non-reference frame, the temporal hierarchy according to the reference order and layer, etc.
- the information used to determine whether the methods described in this specification are applied can be information agreed upon in advance between the decoder and the encoder. In addition, such information can be determined according to a profile and a level.
- Such information can be expressed as a variable value, and information about the variable value can be included in the bitstream. That is, the decoder can determine whether the above-described methods are applied by parsing information about the variable value included in the bitstream. For example, whether the above-described methods are applied can be determined based on the horizontal length or the vertical length of the coding unit. The above-described methods can be applied if the horizontal or vertical length is 32 or more (e.g., 32, 64, 128, etc.). In addition, the above-described methods can be applied if the horizontal or vertical length is less than 32 (e.g., 2, 4, 8, 16). In addition, the above-described methods can be applied if the horizontal or vertical length is 4 or 8.
- FIG. 8 illustrates a method for determining a reference pixel line based on a template according to one embodiment of the present specification.
- the reference pixel line may have the same meaning as the reference sample line.
- a video signal processing device can construct a reference template using reference pixel lines adjacent to a current block.
- the video signal processing device can generate prediction samples for the positions of the reference template using reference pixel lines 1, 2, 3, etc.
- the video signal processing device can calculate a cost between the generated prediction samples and samples of the reference template.
- the cost can be calculated using a method such as SAD (Sum of Absolute Differences) or MRSAD (Mean-Removed SAD).
- the reference pixel corresponding to the minimum cost may be the optimal reference pixel.
- the encoder can rearrange the calculated costs in ascending order, construct a list for reference pixel lines, and then generate and signal a bitstream including information on an index for the optimal reference pixel line.
- the decoder can construct a list for reference pixel lines using the above-described method, parse the index for the optimal reference pixel line included in the bitstream, and generate a prediction sample using the reference pixel line indicated by the index.
- a method for a video signal processing device to determine a reference pixel line based on a template can be described as a Template-based Multiple Reference Line (TMRL) method or a TMRL intra prediction method.
- TMRL Template-based Multiple Reference Line
- the video signal processing device can use any one of SAD, SATD, MR-SAD, and MR-SATD.
- SAD Sud of Absolute Difference
- SATD Sud of Absolute Transformed Difference
- MR-SAD Magnetic Removal SAD
- SATD Magnetic Removal SATD
- FIG. 9 is a diagram illustrating a block vector related to an IBC encoding method according to one embodiment of the present specification.
- the IBC coding method is a method of finding the part (reference block) that is most similar to the current block in an already reconstructed area within the current picture and using the reference block as a prediction block for the current block.
- the encoder can generate a bitstream that includes information related to a block vector, which is the distance between the current block and the reference block.
- the decoder can parse information related to the block vector included in the BeastStream to calculate or set the block vector for the current block.
- the IBC coding method can be applied to chrominance blocks.
- the block vector of the luminance block corresponding to the chrominance block can be used as the block vector of the chrominance block without finding a new block vector, and this coding method can be called DBV (Direct Block Vector) mode.
- DBV Direct Block Vector
- the RRIBC (Reconstruction-Reordered IBC) encoding mode can be used in IBC blocks (blocks to which the IBC encoding method is applied).
- RRIBC can be composed of vertical flips and horizontal flips.
- the reconstructed block of a block to which RRIBC is applied is flipped according to the RRIBC type of the current block.
- the encoder can flip the original block to be encoded before finding the most similar part to the current block from the reference picture. That is, the most similar part from the reference picture is found using the flipped original block. Therefore, the prediction block uses a block that has not been flipped, and the residual block can also be a block that has not been flipped.
- the decoder can flip the final reconstructed block according to the RRIBC type of the current block.
- Figure 10 illustrates a method for predicting the current block using RRIBC in the horizontal direction.
- Figure 11 illustrates a method for predicting the current block using RRIBC in the vertical direction.
- (Xn, Yn) represents the center position of the surrounding blocks
- (Xc, Yc) represents the center position of the current block
- BV n h and BV n v represent the horizontal block vector and the vertical block vector of the surrounding blocks, respectively
- BV C h and BV C v represent the horizontal block vector and the vertical block vector of the current block, respectively.
- BV C h can be calculated as 2 * (Xn - Xc) + BV n h , and as shown in FIG.
- BV C v can be calculated as 2 * (y n - y c ) + BV n v .
- the signs of BV n h and BV n v can be negative.
- the video signal processing device can determine an optimal block vector by constructing a block vector candidate list. At this time, the video signal processing device can construct the block vector candidate list according to the RRIBC type of the current block. For example, when the RRIBC type of the current block is horizontal, the video signal processing device can construct the block vector candidate list using only the neighboring blocks of the current block encoded with RRIBC in the horizontal direction. In addition, the video signal processing device can construct the block vector candidate list regardless of the RRIBC type of the current block.
- the block vector candidate list can be constructed using not only the neighboring blocks of the current block encoded with RRIBC in the horizontal direction, but also the neighboring blocks of the current block encoded with RRIBC in the vertical direction, and/or blocks encoded with general motion, and/or blocks encoded with block vectors.
- the video signal processing device can construct a motion candidate list depending on whether the neighboring blocks of the current block are encoded in the IBC mode or the RRIBC mode. At this time, if the neighboring blocks of the current block are encoded in the RRIBC mode, the video signal processing device can construct the motion candidate list by additionally considering the RRIBC type. For example, when the video signal processing device constructs a motion candidate list for the current block, if the encoding mode of the neighboring blocks of the current block is the RRIBC mode and the RRIBC type is the vertical direction or the horizontal direction, the block vector of the neighboring blocks may not be included in the motion candidate list.
- the video signal processing device when the video signal processing device predicts the current block using general motion, the video signal processing device can construct a motion candidate list regardless of the encoding mode of the neighboring blocks of the current block. In other words, the video signal processing device can construct a motion candidate list regardless of whether the neighboring blocks of the current block are encoded in the IBC mode or the RRIBC mode.
- the video signal processing device may include block vectors of the surrounding blocks in the motion candidate list even if the encoding mode of the surrounding blocks of the current block is the IBC mode and the RRIBC type is the vertical direction or the horizontal direction.
- the RRIBC encoding method is effective for images with symmetrical characteristics.
- Symmetry can mean perfect horizontal (or vertical) symmetry with equal distances between the current block and the reference block around a central axis.
- the vertical (or horizontal) direction (symmetry axis) of the current block can be colinear with the vertical (or horizontal) direction (symmetry axis) of the reference block.
- the block vector in the vertical (or horizontal) direction can be set to '0'
- the block vector in the horizontal direction can be set to any negative value other than '0'.
- the current block and the reference block can be configured to be symmetric with different distances apart from one central axis between the current block and the reference block, and the current block and the reference block can be located on different vertical lines.
- the block vector in the vertical direction can be set to any negative value other than '0'. That is, the video signal processing device can encode or decode the current block using a symmetric block having a block vector value of an arbitrary negative value other than '0' in both the horizontal and vertical directions.
- FIG. 12 illustrates a block vector of a block encoded in Intra TMP mode according to one embodiment of the present specification.
- the Intra TMP method is a method in which a video signal processing device constructs a reference template using pixel values of neighboring blocks adjacent to a current block, then finds the most similar part to the reference template in an already reconstructed area (reference block) within the current picture, and then uses the reference block (Ref. luma block of FIG. 12) as a prediction block for the current block.
- the reference block Ref. luma block of FIG. 12
- the video signal processing device can generate a prediction block for the luminance block by weighting and averaging the reference blocks predicted from the two block vectors of the current luminance block. This can be referred to as a fusion mode.
- the video signal processing device can derive a block vector from a luminance block corresponding to the chrominance block, and then generate a chrominance prediction block using the block vector.
- the block vector of the chrominance block may be the same as or different from the block vector derived from the luminance block.
- the video signal processing device can derive filter coefficients using the correlation between samples around the reference block indicated by the block vector and samples around the current block, and apply filtering to the reference block indicated by the block vector using the derived filter coefficients.
- the video signal processing device can use the filtered reference block as a prediction block of the current block. This can be referred to as the Intra TMP filtering mode.
- the video signal processing device can apply compensation to the current prediction block through the block vector similar to the LIC method using motion information.
- the current block is divided into two regions using a diagonal line such as GPM mode, and both of the divided regions are predicted using the intra prediction mode (or IBC mode, or Intra TMP), this can be called Spatial GPM (SGPM) mode.
- the combination of modes that can be used for the two divided regions can be one of (Intra prediction mode, Intra prediction mode), (Intra prediction mode, IBC mode), (IBC mode, Intra prediction mode), (IBC mode, IBC mode).
- the IBC mode can be changed to the Intra TMP mode, and the combination of (IBC mode, Intra TMP mode) can also be possible.
- the current block can be encoded or decoded in IBC-GPM mode.
- IBC-GPM mode may mean a mode in which the current block is divided using GPM mode, and the divided region is encoded in intra prediction mode or IBC prediction mode.
- the current block can be divided into two regions based on a dotted line.
- one of the divided regions can be encoded in intra prediction mode, and the other can be encoded in IBC prediction mode.
- the left region among the divided regions can be encoded in intra prediction mode, and the right region can be encoded in IBC prediction mode.
- the region encoded in IBC prediction mode can be encoded in Intra TMP prediction mode, and this can be described as IntraTMP-GPM mode.
- a video signal processing device can predict the current block using a weighted average between a block predicted in Intra mode and a block predicted in IBC mode, which can be referred to as IBC-CIIP mode.
- a block predicted in Intra TMP mode can be used instead of a block predicted in IBC mode, which can be referred to as Intra TMP-CIIP mode.
- a video signal processing device can obtain a reconstructed luminance block by adding a residual signal for a luminance prediction block of a current block and a luminance block, and can configure a CCP model by using a correlation between the reconstructed luminance block and the luminance prediction block.
- the CCP model can be one of CCLM, MMLM, GLM, CCCM, MM-CCCM, GL-CCCM, CCCM-ND, and CCCM-MDF.
- the CCP model derived from the luminance block can be applied to a chrominance prediction block to generate a first chrominance prediction block to which the CCP model is applied.
- a final chrominance block can be generated by adding an error signal for the first chrominance prediction block and the chrominance block.
- the video signal processing device can derive a CCP model through the correlation between the luminance block and the chrominance block of the reference block indicated by the block vector of the current luminance block.
- the derived CCP model and the currently reconstructed luminance block can be used to generate Cb and Cr prediction blocks, which are chrominance prediction blocks for the current block. This is referred to as BVG CCP (block vector guided cross component prediction).
- the type of a CCP model may include at least one of CCLM, MMLM, GLM, MM-GLM, CCCM, MM-CCCM, GL-CCCM, MM-GL-CCCM, CCCM-ND, MM-CCCM-ND, CCCM-MDF, MM-CCCM-MDF, chroma fusion, BVG-CCCM, and CCP merge.
- An MMLM may be composed of two CCLMs. If the types of CCP models between CCP models are different, they may be considered different CCP models. If the types of CCP models between CCP models are the same but the parameters between the CCP models are different, they may be considered different CCP models.
- CCP models between CCP models may be considered different CCP models.
- the type of a CCP model may be referred to as a CCP mode.
- a video signal processing device can predict a chrominance signal through a weighted average between a chrominance block predicted through intra prediction mode and the current luminance block, without using the linear model (LM) mode.
- the weight parameters can be derived using the CCCM method.
- GLM Gradient Linear Model
- a video processing device constructs a model by additionally reflecting the gradient between a luminance sample corresponding to a chrominance sample in a linear model and surrounding luminance samples adjacent to the luminance sample, and can predict a chrominance signal through the model.
- the CCP model used to predict a chroma block can construct a CCP candidate list using the CCP models used in the surrounding blocks of the current block, and derive the optimal CCP candidate from the CCP candidate list. This can be called CCP merge mode.
- FIG. 15 illustrates an example of a reference region and filter shape used to derive CCCM parameters according to one embodiment of the present specification.
- CCCM Convolutional cross-component intra prediction model
- Fig. 15(a) shows the positional relationship between reference samples (vertical hatching, 1520) for applying CCCM to the current prediction block (diagonal hatching, 1510) and side samples (horizontal hatching) required when applying a cross-shaped filter.
- the current prediction block (MxN) can be composed of reference samples in the upper 6 rows (2Mx6), reference samples in the left 6 rows (6x2N), and 6x6 reference samples in the upper left, where the ratio of the number of chroma to luma samples is 1:1.
- a video signal processing device applies a cross-shaped sample (Fig. 15(b)) filter to a chroma sample prediction relationship (Fig. 15(c)) for CCCM, cases where the reference sample area is exceeded may occur. At this time, additionally required samples may be side samples.
- the chroma sample prediction relationship of Fig. 15(c) may be applied to each chroma component (i.e., Cb, Cr). The sample at the C (Center) position in Fig.
- Fig. 15(c) may be a luma sample corresponding to the Cb and Cr chroma samples, and N (North), E (East), S (South), and W (West) may be luma samples adjacent to the luma sample at the C position. Side samples may additionally require one sample for an area other than the reference sample depending on the position of the C sample. If the sample value existing at the position of the side sample is not available, the sample value at the unavailable position may be padded with the C sample value.
- the B value can be an integer offset value as a bias value.
- the B value can be an intermediate value of bitDepth (bit depth). In the case of 10-bit content, the B value can be 512.
- MM-CCCM (multi-model CCCM) is a method that derives two CCCM parameters based on the average value of the reference area (or the restored current luminance block).
- GL-CCCM Gradient and location based convolutional cross-component model
- the video signal processing device can derive the chrominance sample for the current block using the luminance sample at the corresponding position from the predicted chrominance sample position, four samples around the luminance sample, and coefficient information.
- the video signal processing device can derive the chrominance sample for the current block by reflecting the vertical and horizontal differences for the luminance sample at the corresponding position from the predicted chrominance sample position and eight samples around the luminance sample, and also using the position value of the current luminance sample and its coefficient information.
- the video signal processing device can apply a downsampling filter to match the resolution difference between the luminance block and the chrominance block. This is to reduce the resolution of the luminance block to that of the chrominance block.
- the mode that applies the downsampling filter can be described as CCCM-MDF (CCCM with multiple downsampling filters).
- the video signal processing device can derive linear and nonlinear models between the luminance prediction block (Y') derived using the motion information of the current block and the first chrominance prediction block (Cb', Cr') derived using the motion information of the current block (Derive filter), and then generate a reconstructed luminance block of the current block using the luminance residual block of the current block, and apply the derived linear and nonlinear models to the reconstructed luminance block of the current block (Apply filter) to generate a second chrominance prediction block of the current block.
- the video signal processing device can add the chrominance residual block to the second chrominance prediction block of the current block predicted using the linear and nonlinear models to finally generate the chrominance block (Cb, Cr) of the current block.
- This method can be described as a cross-component residual model (CCRM).
- CCRM, Inter CCCM, and Inter CCP may have the same meaning.
- a method may be used in which the transform coefficient values obtained by transforming the residual signal are quantized and the quantized transform coefficients are coded.
- the transform unit may obtain the transform coefficient values by transforming the residual signal.
- the residual signal of a specific block may be distributed across the entire region of the current block. Accordingly, by performing a frequency-domain transformation on the residual signal, energy can be concentrated in the low-frequency region, thereby improving coding efficiency.
- the encoder can obtain at least one residual block containing a residual signal for the current block.
- the residual block may be the current block or one of the blocks split from the current block.
- the residual block may be described as a residual array or a residual matrix containing residual samples of the current block.
- the residual block may represent a block having the same size as the size of a transform unit or a transform block.
- An encoder can transform a residual block using a transform kernel.
- the transform kernel used for transforming the residual block may be a transform kernel having separable vertical and horizontal transform properties.
- the transform for the residual block may be performed separately as a vertical transform and a horizontal transform.
- the encoder may perform a vertical transform by applying a transform kernel in the vertical direction of the residual block.
- the encoder may perform a horizontal transform by applying a transform 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, or a transform.
- the transform kernel may be any one of a plurality of available kernels. Additionally, transform kernels based on different transform types may be used for each of the vertical and horizontal transforms. That is, before performing the first transformation, the transformation method for the vertical and horizontal directions can be derived using at least one or more of the intra prediction mode of the current block, the encoding mode, the transformation method parsed from the bitstream, and the size information of the current block. In addition, in order to reduce the computational complexity in the transformation process for large blocks, a process of processing the high-frequency region as '0' while leaving only the low-frequency region can be performed. This process is called high-frequency zeroing, and the transformation size at the time of the actual first transformation can be set for this zeroing. In the high-frequency zeroing process, the low-frequency region can be set to an arbitrary fixed size, and for example, the horizontal or vertical size can be a combination of 4, 8, 16, 32, etc.
- the encoder can quantize the transform block transformed from the residual block by passing it to the quantization unit.
- the transform block can include multiple transform coefficients.
- the transform block can be composed of multiple transform coefficients arranged in a two-dimensional array.
- the size of the transform block like the residual block, can be the same as either the current block or a block split from the current block.
- the transform coefficients passed to the quantization unit can be expressed as quantized values.
- the encoder may perform an additional transform before the transform coefficients are quantized.
- the aforementioned transform method may be referred to as a primary transform, and the additional transform may be referred to as a secondary transform.
- the secondary transform may be optional for each residual block.
- the encoder may perform the secondary transform for areas where it is difficult to focus energy in the low-frequency region using only the primary transform, thereby improving coding efficiency.
- the secondary transform may be added for blocks in which the residual values appear significantly in directions other than the horizontal or vertical directions of the residual block.
- the residual values of an intra-predicted block may be more likely to change in directions other than the horizontal or vertical directions compared to the residual values of an inter-predicted block.
- the encoder may additionally perform the secondary transform on the residual signal of the intra-predicted block. Additionally, the encoder may omit the secondary transform on the residual signal of an inter-predicted block. High-frequency zeroing in the first conversion can also be performed in the second conversion process.
- whether to perform a secondary transform may be determined based on the size of the current block or the remaining block.
- transform kernels of different sizes may be used based on the size of the current block or the remaining block.
- an 8X8 secondary transform may be applied to a block in which the length of a shorter side among the width or the height is greater than or equal to a first preset length.
- a 4X4 secondary transform may be applied to a block in which the length of a shorter side among the width or the height is greater than or equal to a second preset length and less than the first preset length.
- the first preset length may be a value greater than the second preset length, but the present disclosure is not limited thereto.
- the secondary transform may not be performed separately into a vertical transform and a horizontal transform.
- Such a secondary transform may be referred to as a low frequency non-separable transform (LFNST).
- transform for the residual signal in a specific region may be omitted.
- Whether or not to perform transform for the residual signal in a specific region may be determined by a syntax element related to the transform of the specific region.
- the syntax element may include transform skip information.
- the transform skip information may be a transform skip flag. If the transform skip information for a residual block indicates transform skip, transform for the corresponding residual block is not performed. In this case, the encoder can immediately quantize the residual signal in the region where the transform is not performed.
- the aforementioned transformation-related syntax elements may be information parsed from a video signal bitstream.
- a decoder may entropy decode the video signal bitstream to obtain the transformation-related syntax elements.
- an encoder may entropy code the transformation-related syntax elements to generate a video signal bitstream.
- the decoder can obtain encoding information necessary for decoding by parsing the transmitted bitstream.
- information related to the transformation process includes index information for the first and second transformation types and quantized transformation coefficients.
- the inverse transformation unit can obtain a residual signal by inversely transforming the inverse quantized transformation coefficients.
- the inverse transformation unit can detect whether an inverse transformation is performed for a specific region from a transformation-related syntax element of the specific region. According to one embodiment, if a transformation-related syntax element for a specific transformation block indicates a transformation skip, the transformation for the corresponding transformation block may be skipped. In this case, both the first inverse transformation and the second inverse transformation for the transformation block may be skipped.
- the inverse quantized transformation coefficients can be used as a residual signal.
- the decoder can use the inverse quantized transformation coefficients as a residual signal to reconstruct the current block.
- the second inverse transform may be performed and the first inverse transform may be omitted, and the second inverse transformed value may be used as the residual signal.
- the first inverse transform described above represents the inverse transform for the first transform and may be referred to as the inverse primary transform.
- the second inverse transform represents the inverse transform for the second transform and may be referred to as the inverse secondary transform or the inverse LFNST.
- the first (inverse) transform may be referred to as the first (inverse) transform
- the second (inverse) transform may be referred to as the second (inverse) transform.
- FIG. 16 illustrates types of transform kernels that can be used in video coding according to one embodiment of the present specification.
- Fig. 16 shows the formulas of DCT-II, DCT-V (discrete cosine transform type-V), DCT-VIII (discrete cosine transform type-VIII), DST-I (discrete sine transform type-I), and DST-VII kernels applied to MTS.
- DCT and DST can be expressed as functions of cosine and sine, respectively, and when the basis function of the transform kernel for the number of samples N is expressed as Ti(j), the index i represents the index in the frequency domain, and the index j represents the index within the basis function. That is, as i becomes smaller, it represents a low-frequency basis function, and as i becomes larger, it represents a high-frequency basis function.
- the basis function Ti(j) When the basis function Ti(j) is expressed as a two-dimensional matrix, it can represent the j-th element of the i-th row, and since the transform kernels illustrated in Fig. 16 all have a separable characteristic, they can perform transformations in the horizontal and vertical directions respectively for the residual signal X. That is, when the residual signal block is X and the transform kernel matrix is T, the transform for the residual signal X can be expressed as TXT'.
- T' means the transpose of the transform kernel matrix T. Since DCT and DST are in decimal form, not integer form, it is burdensome to implement them as they are in hardware encoders and decoders. Therefore, the decimal form transform kernel must be approximated to an integer form transform kernel through scaling and rounding.
- the integer precision of the transform kernel can be determined as 8-bit or 10-bit, but if the precision is low, the encoding efficiency may decrease. Depending on the approximation, the orthonormal property of DCT and DST may not be maintained, but since the encoding efficiency loss due to this is not large, approximating the transform kernel to an integer form is advantageous in terms of implementing a hardware encoder and decoder.
- IDTR Identity Transform
- identity transformation constructs a transformation matrix by setting '1' at positions where rows and columns have the same value. However, here, the identity transformation uses an arbitrary fixed value other than '1' to increase or decrease the value of the input residual signal equally.
- the transform is calculated by applying the transform kernel to the vertical and horizontal directions of the error block respectively, so it can be said to be a separable transform method.
- the transform is calculated by applying the transform kernel only once without applying the transform kernel to the vertical and horizontal directions respectively, so it can be said to be a non-separable transform method.
- the above-mentioned second-order transform is additionally applied to the first-order transformed transform coefficients of the block to which the DCT-2 transform is applied, so it can be said to be a two-step transform technique.
- the above-mentioned second-order transform has high encoding efficiency, but it has the disadvantage of being complex because the transform kernel is applied a total of three times.
- the NSPT (Non-separable primary transform) method which is a method of applying the transform using only the second-order transform method, can be applied.
- the NSPT transform method is a non-separable transform method, and is calculated by applying the transform kernel only once to the vertical and horizontal directions of the error block, without applying the transform kernel separately.
- the error block of the current block can be transformed or inversely transformed using one of the following transform methods: MTS, DCT2 + LFNST, or NSPT transform.
- NSPT transform can be a transform method that replaces the existing DCT2 + LFNST transform method.
- NSPT4x4 (16x16 kernel), NSPT4x8 (32x20 kernel), NSPT8x4 (32x20 kernel), NSPT8x8 (64x32 kernel), NSPT4x16 (64x24 kernel), NSPT16x4 (64x24 kernel), NSPT8x16 (128x40 kernel), NSPT16x8 (128x40 kernel), NSPT4x32 (128x20 kernel), NSPT32x4 (128x20 kernel), NSPT8x32 (256x24 kernel), NSPT32x8 (256x24 kernel).
- NSPT similar to LFNST, consists of 35 sets of transform kernels, each of which can have three candidates.
- the encoder can derive a set of transform kernels according to the intra prediction mode, and then generate and signal a bitstream containing information about the index of the optimal candidate among the three candidates.
- the decoder can parse the information about the signaled index, and then use the transform kernel candidate indicated by the index information among the set of transform kernels derived using the intra prediction mode to inversely transform the current transform coefficients and obtain a residual block. Zero-out may not be performed on a 4x4 block to which NSPT is applied. In addition, the number of coefficients to be zeroed out may vary depending on the size of the NSPT kernel.
- NSPT with a size of 32x20 can be applied to a 4x8 block or an 8x4 block. Therefore, out of the 32 transform coefficients, only 20 transform coefficients can be zeroed out, while the remaining 12 transform coefficients can be zeroed out.
- FIG. 17 illustrates a transformation set table for LFNST and NSPT transformations according to one embodiment of the present specification.
- the video signal processing device can derive the transform set index of the LFNST and NSPT transforms corresponding to the intra prediction mode (see FIG. 6) by referring to the transform set table of FIG. 17.
- the LFNST and NSPT transform sets can vary depending on the intra prediction mode, information on whether the current block is a luminance block or a chrominance block, the horizontal and vertical sizes of the current block, and whether the intra prediction directional mode of the current block is an extended angle mode.
- the arbitrary number can be an integer greater than or equal to 1, and can be 3.
- the encoder can signal the index information for the optimal transform matrix among multiple transform matrices in the transform set by including it in the bitstream. After the decoder parses the index for the optimal transformation matrix, it can apply the inverse transformation using the transformation matrix corresponding to the index in the transformation set.
- FIG. 18 illustrates a method for deriving a multi-transform set and a LFNST/NSPT set according to one embodiment of the present specification.
- the encoder can select which one of MTS, DCT2 + LFNST, and NSPT to apply to the residual block, and can transform the residual block and obtain transform coefficients based on the selected transform method.
- the encoder can signal information on which transform method was applied by including it in the bitstream. If the MTS transform is applied to the residual block, the transform coefficients of the residual block can be obtained by applying the MTS transform, and LFNST and NSPT transforms may not be applied. If the DCT2 + LFNST transform is applied to the residual block, the encoder can apply the DCT2 transform to the residual block to obtain the first transform coefficients, and apply the LFNST transform to the first transform coefficients to obtain the second transform coefficients.
- the MTS and NSPT transforms may not be applied.
- the video encoder can output transform coefficients by applying the NSPT transform to the residual block, and at this time, the MTS and DCT2 + LFNST transforms may not be applied to the residual block.
- the decoder can parse information on which transform method was applied from the bitstream, and determine whether to apply one of the inverse transform methods among MTS, DCT2 + LFNST, and NSPT to the current transform coefficient based on the parsed information. Then, the decoder can perform an inverse transform on the transform coefficient based on the determined transform method and obtain a residual block. If the MTS transform is applied to the current transform coefficient, the decoder can perform an inverse MTS transform on the transform coefficient to obtain a residual block, and at this time, the LFNST and NSPT inverse transforms may not be applied.
- the decoder can perform an inverse LFNST transform on the secondary transform coefficient to output a primary transform coefficient, and perform an inverse DCT2 transform on the primary transform coefficient to obtain a residual block, and at this time, the MTS and NSPT transforms may not be applied. If the NSPT transform is applied to the current transform coefficients, the decoder can obtain a residual block by performing the NSPT inverse transform on the current transform coefficients, and at this time, the MTS and DCT2 + LFNST transforms may not be applied.
- a video signal processing device can derive a transform kernel for each of MTS, LFNST, and NSPT transforms (or inverse transforms) using an intra prediction mode.
- the video signal processing device can determine which transform (or inverse transform) is applied among MTS, DCT2 + LFNST, and NSPT.
- IBC Intra TMP
- Merge e.g., AMVP, GPM, SGPM, CCLM, CCCM
- Figure 19 illustrates a mapping table according to one embodiment of the present specification.
- Figure 20 illustrates a conversion type set table according to one embodiment of the present specification.
- Figure 21 illustrates a conversion type combination table according to one embodiment of the present specification.
- FIG. 22 illustrates a threshold value table for an IDT conversion type according to one embodiment of the present specification.
- a method for selecting a set of multiple transforms available to the current block in a video signal processing device is described.
- the video signal processing device can derive the nSzIdxW and nSzIdxH values based on the size of the current block to map the horizontal and vertical sizes of the current block into a single variable.
- nSzIdxW can be the minimum value among the logarithm of 2 calculated for the width of the current block, the difference of 2 with the decimal places discarded, and the three.
- nSzIdxH can be the minimum value among the logarithm of 2 calculated for the height of the current block, the difference of 2 with the decimal places discarded, and the three.
- the video signal processing device can derive the intra-directional mode (predMode) of the current block.
- predMode intra-directional mode
- the number of intra-prediction modes expanded from the existing 67 to 131 can be used, reducing the precision of the existing 67 modes.
- the video signal processing device can derive the ucMode, nMdIdx, and isTrTransposed values.
- ucMode can be set to '0'
- nMdIdx can be set to '35'
- isTrTransposed can be set to a value derived from MIP.
- ucMode can be set to the intra directional mode (predMode) of the current block.
- predMode can mean an index value of the intra directional mode.
- predMode can be determined through an extended angle mode according to the aspect ratio of the current block.
- the video signal processing device can clip predMode to a value between 2 and 66. If predMode is greater than the 34th angle mode, which is a diagonal mode, the isTrTransposed value can be set to 1, and if predMode is less than or equal to 34, the isTrTransposed value can be set to 0.
- predMode is greater than 34
- the video signal processing device resets the value of predMode to a value that is a difference between 67 (the maximum value of the intra directional mode index) plus 1. For example, if predMode is 35, the video signal processing device can reset the 35th angle mode to the 33rd angle mode (67+1-35(predMode)). If predMode is 66, the video signal processing device can reset the 66th angle mode to the 2nd angle mode (67+1-66(predMode)). That is, by making it symmetrical with respect to the 34th angle mode, which is a diagonal mode, there is an effect of reducing the size of the transformation mapping table of FIG. 19 by about half.
- the video signal processing device can derive the nSzIdx value through nSzIdxW, nSzIdxH, and isTrTransposed values. If the isTrTransposed value is '1', the value obtained by multiplying nSzIdxH by 4 and then adding nSzIdxW can be set to nSzIdx. If the isTrTransposed value is '0', the value obtained by multiplying nSzIdxW by 4 and then adding nSzIdxH can be set to nSzIdx.
- the video signal processing device can derive nTrSet, which is an index of an available transformation type set, according to the predefined table of FIG. 19 using nSzIdx, which is the size information of the current block, and nMdIdx, which is the intra-directional mode information of the current block.
- FIG. 19 defines an index of a transformation type set according to the intra-screen directional mode (0 to 34 and MIP) of the current block and the size index (0 to 15) of the current block.
- nTrSet can be 80, and if the size of the current block is 4x8 and the intra-screen directional mode of the current block is 13, nTrSet can be '7'.
- the video signal processing device can derive a set of transformation types corresponding to nTrSet from the table of FIG. 20 by parsing mts_idx included in the bitstream.
- the transformation types in the vertical and horizontal directions are set differently depending on whether predMode is a value greater than the 34th angle mode, which is a diagonal mode.
- 0 to 79 in the gray-shaded vertical column of FIG. 20 may correspond to nTrSet, and 0 to 3 in the gray-shaded horizontal column may correspond to mts_idx. Referring to FIG. 20, if nTrSet is 7 and the value of mts_idx is 3, 22 may be selected from (2, 17, 18, 22).
- DST1 and DCT5 corresponding to index 22 of the transformation type combination table of FIG. 21 are selected, and the vertical transformation type of the current block may be set to DST1 and the horizontal transformation type may be set to DCT5.
- the gray-shaded horizontal rows 0 to 24 in Fig. 21 represent indices selected through Fig. 20, and the gray-shaded vertical rows 0 to 1 may represent vertical and horizontal transformation types, respectively. If the predicted directionality mode within the screen of the current block is greater than 34, which is a diagonal mode, the vertical and horizontal transformation types may be interchanged.
- the vertical or horizontal transformation type can be reset to the IDT transformation type through the process described below.
- the vertical transformation type may be reset to the IDT transformation type. If the absolute difference between the index of the on-screen prediction directional mode of the current block and the index of the horizontal mode, 50, is less than any predetermined value, the horizontal transformation type may be reset to the IDT transformation type.
- the predetermined value may be an integer and may be determined based on the horizontal or vertical size of the current block. For example, the predetermined value may be determined through the table of Fig. 19. The table of Fig. 22(a) represents a case where the threshold value is set differently whenever the horizontal or vertical size differs by 4, and the table of Fig.
- the video signal processing device may not reset the vertical transformation type to the IDT transformation type, but may maintain the existing transformation type as is.
- the encoder and decoder can reduce the amount of bits for encoding mts_idx by adaptively changing the number of transform type sets for each block.
- the encoder and decoder can determine the number of transform type sets to be one, four, or six, depending on the sum of the absolute values of the transform coefficients of the current transform block. If the number of transform type sets changes, the maximum number of bins for signaling mts_idx may change. If the sum of the absolute values of the transform coefficients is less than or equal to 6, the number of transform type sets is one. Therefore, the encoder may not signal mts_idx. In this case, the decoder may not parse mts_idx.
- the number of transform type sets may be four. If the sum of the absolute values of the transform coefficients is greater than 32, the number of transform kernel candidates may be six.
- the encoder can signal mts_idx based on the maximum number of transformation type sets. Additionally, the decoder can parse mts_idx based on the maximum number of transformation type sets.
- the encoder and decoder can use one of four transform kernel sets: ⁇ (DST7, DST7), (DST7, DCT8), (DCT8, DST7), (DCT8, DCT8) ⁇ .
- the encoder can signal an index of which transform kernel set it used.
- the decoder can parse the index to determine which transform kernel set to use for the current transform block.
- the configured transform kernel set is (DST7, DCT8)
- the encoder and decoder transform or inversely transform the current block using DST7 in the horizontal direction, and transform or inversely transform the current block using DCT8 in the vertical direction.
- the encoder and decoder can set the maximum CU size to which Inter MTS can be applied to 32x32 for images larger than 1920x1080 resolution.
- the encoder and decoder set the maximum CU size to which Inter MTS can be applied to images with a resolution other than 1920x1080 to 16x16. Therefore, the encoder and decoder can apply DCT2 transform in the horizontal and vertical directions without applying Inter MTS to transform blocks larger than 16x16, for example, transform blocks of size 32x32.
- the encoder and decoder can use separable KLT instead of DST7 and DCT8 in transform and inverse transform of transform blocks of size equal to or smaller than 16x16.
- FIG. 23 illustrates block boundaries and samples around the boundaries in a deblocking filtering process according to one embodiment of the present specification.
- the part indicated by the dotted line between the P block and the Q block may denote a block boundary.
- the block boundary may exist at any fixed size, and a block boundary may exist at every size of 4.
- Figure 23(b) shows samples for which filtering is performed based on block boundaries.
- the video signal processing device can perform a process of alleviating blocking artifacts occurring at block boundaries by performing deblocking filtering on the currently restored block.
- the deblocking filtering process can include a process of determining a transform block boundary, determining a sub-block boundary, determining a length of a filter to perform filtering, determining a filtering strength (bS), determining a filtering parameter, determining whether to perform filtering, and determining a filtering type.
- FIG. 24 illustrates an intra prediction mode based on an extrapolation filter according to one embodiment of the present specification.
- FIG. 24 illustrates an EIP (Extrapolation filter-based Intra Prediction) mode, which is an intra prediction mode based on an extrapolation filter according to one embodiment of the present specification.
- EIP Extrapolation filter-based Intra Prediction
- FIG. 24 A method for performing EIP mode by a video signal processing device is described through Fig. 24.
- a video signal processing device can derive non-linear model parameters using a template configured using neighboring samples adjacent to a current block.
- the template may be configured (L-shape) with left neighboring samples and upper neighboring samples of the current block, the template may be configured (left-only) with left samples of the current block, and the template may be configured (above-only) with upper samples of the current block.
- the non-linear model may be CCCM. Referring to Fig.
- a filter shape used to derive non-linear model parameters may be one of a square shape, a horizontally elongated (longer than wide) rectangular shape, and a vertically elongated (longer than wide) rectangular shape.
- An encoder can obtain a bitstream including first information indicating a template type and a filter shape, and a decoder can determine the template type and the filter shape through the first information of the bitstream.
- a video signal processing device can derive non-linear model parameters based on the template type and the filter shape, and can predict a current block sample by sample using the derived non-linear model parameters. When predicting the current block sample by sample, the video signal processing device can predict diagonally.
- the video signal processing device can perform filtering on a predicted block using the EIP mode.
- the encoder can generate and signal a bitstream including information indicating whether filtering is to be applied to a block predicted in the EIP mode.
- the information indicating whether filtering is to be applied to the predicted block can be parsed to set whether filtering is to be applied to the predicted block.
- the filtering can be as shown in Table 1 below. Table 1 shows filtering related to a 3x3 kernel and a 5x5 kernel according to one embodiment of the present invention.
- a video signal processing device can derive an intra prediction mode using a block predicted in the EIP mode for a residual signal of a block encoded in the EIP mode, and then derive a transform kernel for MTS, NSPT, LFNST, etc. using the derived intra prediction mode.
- the video signal processing device can use the DIMD method or a method similar to DIMD.
- the EIP merge mode may be a mode in which a video signal processing device constructs an EIP merge list using filter shapes and filter coefficients of neighboring blocks previously encoded in the EIP mode, and then determines an EIP merge candidate having an optimal filter shape and filter coefficients for the current block.
- the EIP merge candidate (optimal filter shape and filter coefficient) may be determined through an index included in the bitstream.
- the EIP merge list may be constructed using adjacent spatial candidates, non-adjacent spatial candidates, temporal candidates, shifted temporal candidates, and history-based candidates of the current block.
- the EIP merge list may be reordered based on a template cost.
- the video signal processing device may store any one of the planar mode, the DC mode, the derived DIMD mode, and the intra prediction mode at the position indicated by the block vector (BV) for the intra prediction mode of the current block.
- the derived DIMD mode may be an intra prediction mode derived by the DIMD method using pre-reconstructed samples adjacent to the current block.
- the derived DIMD mode may be an intra prediction mode derived by the DIMD method using the current prediction block.
- the derived DIMD mode may be an intra prediction mode derived by the DIMD method using samples of the current block that have been reconstructed after the reconstruction of the current block is completed.
- the intra prediction mode indicated by the BV may be an intra prediction mode of a reference block indicated by the BV used for intra TMP prediction.
- the stored intra prediction mode may be used to derive an MPM list for intra prediction of the next block.
- the video signal processing device can use the intra prediction mode of the reference block indicated by the BV to derive an intra prediction mode to be stored for a block encoded in the IBC or intra TMP mode.
- the intra prediction mode of the block adjacent to the current block can be derived as any one of the planar mode, the DC mode, the derived DIMD mode, and the intra prediction mode at the position indicated by the BV.
- the video signal processing device may set a value obtained by converting an angle of a diagonal line dividing the current block into an intra prediction mode as the intra prediction mode of the current block when the current block is encoded in either the Spatial Geometry Partitioning Mode (SGPM) or the Geometry Partitioning Mode (GPM).
- SGPM Spatial Geometry Partitioning Mode
- GPSM Geometry Partitioning Mode
- the intra prediction mode representing the current block may be the intra prediction mode applied to the region encoded in the intra prediction mode among the two regions.
- the intra prediction mode representing the current block may be an intra prediction mode corresponding to the directional mode (any one of modes 2 to 66). If the intra prediction mode is not a directional mode (one of modes 2 to 66), the intra prediction mode representing the current block may be a value obtained by converting the angle of the diagonal line used in the segmentation process of the current block into the intra prediction mode.
- the encoding mode of a neighboring block of a current block is one of SGPM and GPM, and one of two divided regions of the current block can be encoded with an intra prediction mode.
- the intra prediction mode of a region encoded with an intra prediction mode among two divided regions of the neighboring block of the current block can be set to the intra prediction mode of the neighboring block.
- the intra prediction mode is a directional mode (any one of modes 2 to 66)
- the intra prediction mode of the neighboring block can be an intra prediction mode of the directional mode (any one of modes 2 to 66).
- the intra prediction mode is not a directional mode (any one of modes 2 to 66)
- the value can be obtained by converting the angle of the diagonal line used in the segmentation process of the current block into the intra prediction mode.
- the derived intra prediction mode of the neighboring block can be added to the MPM list.
- the intra prediction mode of the current block can be one of the derived DIMD mode and the intra prediction mode at the position indicated by the BV.
- the derived DIMD mode can be an intra prediction mode derived by the DIMD method using already reconstructed samples adjacent to the current block.
- the derived DIMD mode can be an intra prediction mode derived by the DIMD method using the current prediction block.
- the derived DIMD mode can be an intra prediction mode derived by the DIMD method using samples of the current block that have been reconstructed after the current block has been reconstructed.
- the intra prediction mode indicated by the BV can be an intra prediction mode of a reference block indicated by the BV that is used for IBC prediction. If the coding mode of the current block is the RRIBC coding mode, the intra prediction mode of the reference block indicated by the BV can be converted according to the flip direction of the current block, and the intra prediction mode of the current block can be the converted intra prediction mode.
- FIG. 25 is a diagram showing a ROI (Region of Interest) after LFNST conversion according to one embodiment of the present invention.
- the gray block area which is the low-frequency part, can be a Region of Interest (ROI), and the area other than the pre-designated ROI can be zeroed out.
- ROI Region of Interest
- the remaining white sub-blocks except for 6 NxN sub-blocks can be zeroed out, as shown in Fig. 25(a).
- the remaining white sub-blocks except for 4 NxN sub-blocks can be zeroed out, as shown in Fig. 25(b).
- N is a positive integer and can be 4.
- NSPT transform can be a transform method that replaces the existing DCT2 + LFNST transform method.
- NSPT4x4 (16x16 kernel), NSPT4x8 (32x20 kernel), NSPT8x4 (32x20 kernel), NSPT8x8 (64x32 kernel), NSPT4x16 (64x24 kernel), NSPT16x4 (64x24 kernel), NSPT8x16 (128x40 kernel), NSPT16x8 (128x40 kernel), NSPT4x32 (128x20 kernel), NSPT32x4 (128x20 kernel), NSPT8x32 (256x24 kernel), NSPT32x8 (256x24 kernel).
- NSPT similar to LFNST, consists of 35 sets of transform kernels, each of which can have three candidates.
- the encoder can derive a set of transform kernels according to the intra prediction mode, and then generate and signal a bitstream containing information about the index of the optimal candidate among the three candidates.
- the decoder can parse the information about the signaled index, and then use the transform kernel candidate indicated by the index information among the set of transform kernels derived using the intra prediction mode to inversely transform the current transform coefficients and obtain a residual block. Zero-out may not be performed on a 4x4 block to which NSPT is applied. In addition, the number of coefficients to be zeroed out may vary depending on the size of the NSPT kernel.
- NSPT with a size of 32x20 can be applied to a 4x8 block or an 8x4 block. Therefore, out of the 32 transform coefficients, only 20 transform coefficients can be zeroed out, while the remaining 12 transform coefficients can be zeroed out.
- FIG. 26 is a diagram illustrating a process of generating a prediction block using DIMD according to one embodiment of the present invention.
- the decoder can derive a predicted block using surrounding samples (blocks, pixels).
- the surrounding samples may be blocks (pixels) surrounding the current block.
- the decoder can determine intra-prediction modes and weight information for restoring the current block through a histogram of directional information (angle information) using the surrounding samples as input.
- FIG. 27 is a diagram showing the locations of surrounding pixels used to derive directional information according to one embodiment of the present specification.
- Fig. 27(a) shows when all neighboring blocks of the current block are available for deriving directional information
- Fig. 27(b) shows when the upper boundary of the current block is a sub-picture, slice, tile, or CTU boundary
- Fig. 27(c) shows when the left boundary of the current block is a sub-picture, slice, tile, or CTU boundary.
- the neighboring blocks and the current block do not belong to the same sub-picture, slice, tile, or CTU, the neighboring blocks may not be used for deriving directional information.
- the gray dots in Fig. 27 indicate the positions of pixels used to actually derive directional information
- the dotted lines indicate sub-picture, slice, tile, and CTU boundaries.
- pixels located at the boundary may be padded by one pixel outside the boundary to derive directional information. This padding may allow for more accurate directional information to be derived.
- Equation 1 In order to derive direction information for a pixel at a specific location, a 3x3 Sobel filter of Equation 1 can be applied in the horizontal and vertical directions, respectively.
- a in Equation 1 can denote pixel information (values) of the reconstructed neighboring blocks of the current block of 3x3 size.
- the direction information ( ⁇ ) can be determined using Equation 2.
- the decoder In order to reduce the computational complexity for deriving direction information, the decoder can derive the direction information ( ⁇ ) only by calculating Gy/Gx of Equation 1 without calculating the atan function of Equation 2.
- directional information can be calculated for each gray dot shown in Fig. 27, and the directional information can be mapped to an angle of an intra prediction mode.
- the intra prediction mode set can include a planar mode, a DC mode, and a plurality of (e.g., 65) angular modes (i.e., directional modes).
- the intra prediction modes can be 67 modes, and the directional information (angle, ⁇ ) calculated through mathematical expression 2 can be a value in real units. Therefore, a process of mapping directional information to a specific intra prediction directional mode is required.
- the directional mode described herein can be the same as the angular mode.
- FIG. 28 is a diagram illustrating a method for mapping directional modes according to one embodiment of the present specification.
- the intra prediction directional mode can be divided into four sections based on 0 degrees (index 18), 45 degrees (index 34), 90 degrees (index 50), and 135 degrees (index 66) (see FIG. 6).
- the sections for determining the intra prediction directional mode can be divided into four sections from section 0 to section 3.
- Section 0 can be from -45 degrees to 0 degrees
- section 1 can be from 0 degrees to 45 degrees
- section 2 can be from 45 degrees to 90 degrees
- section 3 can be from 90 degrees to 135 degrees.
- each section can include 16 intra prediction directional modes.
- the directional mode can be determined as one of the four sections by comparing the signs and magnitudes of Gx and Gy calculated through mathematical expression 1.
- interval 1 can be selected.
- the intra prediction directional mode mapped to each interval can be determined through the directional information ( ⁇ ) calculated from mathematical expression 2. Specifically, the decoder extends the value by multiplying the directional information ( ⁇ ) by 2 ⁇ 16. Then, the decoder can compare the extended value with the numbers in the predefined table to find the value closest to the extended value and determine the intra prediction directional mode based on the closest value. At this time, there can be 17 values in the predefined table.
- the values of the predefined table can be ⁇ 0, 2048, 4096, 6144, 8192, 12288, 16384, 20480, 24576, 28672, 32768, 36864, 40960, 47104, 53248, 59392, 65536 ⁇ .
- the difference between the predefined table values can be set differently depending on the difference between the angles of the intra prediction directional mode.
- the difference between the predefined table values may not match the distance between the angles of the intra prediction directional mode.
- atan has a characteristic that the slope gradually decreases as the input value increases. Therefore, the above-defined table should also be set in numerical value by considering not only the difference between the angles of the intra prediction directional mode but also the nonlinear characteristic of atan. For example, the difference between the above-defined table values may be set to gradually decrease. Conversely, the difference between the above-defined table values may be set to gradually increase.
- the available intra prediction directional modes may vary. That is, if the width and height of the current block are different, the interval for deriving the intra prediction directional mode may vary. In other words, the interval for deriving the intra prediction directional mode may change based on the width and height of the current block (e.g., the ratio of the width and height). For example, if the width of the current block is longer than the height, the intra prediction mode may be remapped to 67 to 80, and the intra prediction mode in the opposite direction may be excluded to 2 to 15.
- the intra prediction modes ⁇ 3, 4, 5, 6, 7, 8 ⁇ may be remapped (mapped) to ⁇ 67, 68, 69, 70, 71, 72 ⁇ , respectively.
- the intra prediction mode may be reset to a value obtained by adding '65' to the intra prediction mode.
- the intra prediction mode may be reset to a value obtained by subtracting '67' from the intra prediction mode.
- a histogram can be used to derive an intra-prediction directional mode for restoring the current block. If, after obtaining directional information for surrounding blocks, there are more non-directional blocks than directional blocks, the prediction mode for the non-directional block may have the highest cumulative value in the histogram. However, since a directional mode must be derived for restoring the current block, the prediction mode for the non-directional block may be excluded even if it has the highest cumulative value in the histogram. That is, a smooth region with no gradient or directionality between surrounding pixels may not be used to derive an intra-prediction directional mode. For example, the prediction mode for a block without directional information may be planar or DC.
- the left neighboring block may not be used to derive directional information, and directional information may be derived using only the upper neighboring block.
- the decoder can generate a histogram using the G value calculated as in Equation 3 to emphasize the directionality.
- the histogram may be a cumulative value in which the calculated G value is added to each generated intra prediction directional mode, rather than a frequency-based one in which '1' is added to each generated intra prediction directional mode.
- FIG. 29 is a diagram showing a histogram for deriving an intra prediction directional mode according to one embodiment of the present specification.
- the X-axis of Fig. 29 represents an intra prediction directional mode
- the Y-axis represents the accumulated value of G values.
- the decoder can select an intra prediction directional mode having the largest accumulated value of G values among the intra prediction directional modes. In other words, the decoder can select an intra prediction directional mode for the current block based on the accumulated value. Referring to Fig. 29, modeA having the largest accumulated value and modeB having the second largest accumulated value can be selected as the intra prediction directional modes.
- the decoder can generate a final prediction block by weighting the prediction block generated with modeA, the prediction block generated with modeB, and finally the prediction block generated with the planar mode to generate a prediction block for the current block.
- the weight of each prediction block can be determined using the accumulated value of modeA and modeB.
- the weight for the prediction block generated with the planar mode can be set to 1/3 of the total weight.
- the weight for the prediction block generated by modeA can be set to a weight corresponding to the value obtained by dividing the modeA accumulated value by the sum of the accumulated values of modeA and modeB.
- the weight for the prediction block generated by modeB can be determined as a difference value between the modeA weight and 1/3 of the total weight.
- the decoder can expand the range of the weight by multiplying the weight for the prediction block generated by modeA by an arbitrary value.
- the weight for the prediction block generated by modeB and the weight for the prediction block generated in the planar mode can also be expanded in the same way.
- FIG. 30 is a diagram illustrating a method for generating a prediction sample for restoring a current block according to one embodiment of the present specification.
- FIG. 30 is a structural diagram showing a process of generating a prediction sample using the derived intra prediction mode by more effectively deriving an intra prediction mode to improve encoding performance.
- the decoder can derive an intra-prediction directional mode for the current block using neighboring samples of neighboring blocks adjacent to the current block.
- the decoder can derive at least one intra-prediction directional mode and derive a weight for each mode.
- the decoder can use a histogram-based method that derives directional information of neighboring block samples through an arbitrary filter and determines frequently occurring directional information as the intra-prediction directional mode.
- a method for deriving the intra-prediction directional mode may be used that generates an intra-prediction pixel for a left pixel adjacent to the current block using only the upper pixels adjacent to the current block and determines the intra-prediction mode with the least distortion as the intra-prediction directional mode for the current block.
- prediction blocks for the current block can be generated using the intra prediction directional modes and weights derived from the 'prediction mode generator' process.
- the number of prediction blocks can be determined according to the number of intra prediction directional modes derived from the prediction mode generator process. For example, if the number of derived intra prediction directional modes is 2, there can be 2 prediction blocks for the current block.
- the prediction blocks generated in the 'intra prediction' process can be subjected to PDPC (Position dependent intra prediction combination) filtering using the method described below.
- the decoder can additionally generate a prediction block for the current block.
- the decoder can generate an intra prediction block using at least one of a planar mode, a DC mode, and a Matrix Intra Prediction (MIP).
- MIP Matrix Intra Prediction
- Whether the 'other prediction' process is performed can be determined using at least one of the intra prediction directional modes induced in the 'prediction mode generator' process and weight information for each prediction direction, quantization parameter information of the current block, the horizontal or vertical length of the current block, information on whether the current block is luminance or chrominance, intra prediction modes around the current block, and information on the presence or absence of transform coefficients around the current block (which may correspond to Additional information A, B, and C of FIG. 30).
- a method for determining whether the 'other prediction' process is performed will be described below.
- the information about which mode (e.g., planar, DC, MIP mode, etc.) the decoder will use can be agreed upon in advance or signaled via SPS.
- the decoder can determine the mode based on the syntax element (sps_dimd_default_mode) indicating which mode to use.
- the decoder can determine which mode to use among planar, DC, and MIP modes depending on the value of sps_dimd_default_mode.
- the decoder can generate a prediction block using at least one of planar, DC, and MIP modes.
- the prediction block can be generated using at least one of the planar mode, the DC mode, and the MIP mode.
- the weights of the intra-prediction directional modes derived from the 'prediction mode generator' process are similar to each other (for example, if the difference between the weights of each directional mode is less than a specific threshold value), the 'other prediction' process may not be performed.
- the decoder can generate the prediction block using at least one of the planar mode, the DC mode, and the MIP mode (i.e., the 'other prediction' process is performed). If the difference between the weights of the intra-prediction directional modes derived from the 'prediction mode generator' process is large (for example, if the difference between the weights of each directional mode is greater than a specific threshold value), this means that there is a lot of variation between pixels in the surrounding blocks, and therefore the decoder can generate the prediction block using at least one of the planar mode, the DC mode, and the MIP mode.
- the decoder can generate a prediction block using at least one of the planar mode, DC mode, and MIP mode. Conversely, if the width and height of the current block are the same, the decoder can generate a prediction block using at least one of the planar mode, DC mode, and MIP mode.
- the decoder can generate a single prediction sample by weighting and averaging multiple intra prediction blocks generated in the 'intra prediction' and 'other prediction' processes.
- the weight for each intra prediction block can be determined based on at least one of the intra prediction directional mode and weight information derived in the 'prediction mode generator' process, quantization parameter information of the current block, the horizontal or vertical length of the current block, information on whether the current block is luminance or chrominance, intra prediction modes around the current block, and information on the presence or absence of transform coefficients around the current block.
- FIG. 31 is a diagram illustrating a method for determining an intra prediction mode according to one embodiment of the present specification.
- Fig. 31 illustrates the 'prediction mode generator' process of Fig. 30 in more detail.
- the 'prediction mode generator' process of Fig. 30 can derive intra prediction directionality through histogram analysis. Specifically, in the 'histogram analysis' process of Fig. 31, the decoder can derive intra prediction directionality by analyzing a histogram obtained using neighboring samples adjacent to the current block.
- the decoder can derive the intra prediction directional mode and weight for the current block using at least one or more of the horizontal length and vertical length of the current block, quantization parameter information, possible intra prediction directional mode information among neighboring blocks of the current block, information on whether a residual signal exists in neighboring blocks of the current block, and information on whether the current block is a luminance block or a chrominance block.
- a method for deriving the intra prediction directional mode and weight for the current block will be described below.
- the intra prediction directional mode can be set based on frequency.
- the decoder can obtain a histogram of intra prediction directional modes for neighboring blocks, analyze the histogram, and select a frequently occurring intra prediction directional mode and a second most frequently occurring mode as the prediction directional mode.
- the intra prediction directional mode can be set based on an accumulated value (e.g., the G value in FIG. 29).
- the decoder can analyze a histogram obtained by adding the G value to each intra prediction directional mode, and select an intra prediction directional mode with the highest weight and a mode with the second highest weight as the prediction directional mode.
- the decoder can select an intra prediction directional mode based on the distance between intra prediction directional modes of neighboring blocks and the accumulated value added with the G value.
- the distance between directional modes can mean the difference in indexes of the directional modes.
- the difference in distance between a directional mode at index 66 and a directional mode at index 2 can be 64.
- the distance difference between the directional mode at index 66 and the directional mode at index 2 may be 2.
- the decoder can obtain a histogram with the cumulative value obtained by adding the G value to each of the intra prediction directional modes for the surrounding blocks, analyze the histogram, and first select the intra prediction directional mode with the highest cumulative value.
- the decoder can use the mode with the smallest distance between the mode with the highest cumulative value and the directional mode (the closest mode) among the modes corresponding to the remaining cumulative values except for the highest cumulative value (for example, the mode with the second highest cumulative value, the mode with the third highest cumulative value, the mode with the fourth highest cumulative value, etc.). Meanwhile, the decoder may first select the intra prediction directional mode having the highest accumulated value, and the decoder may use the mode having the highest accumulated value and the directional mode having the largest distance (the farthest distance) among the modes corresponding to the remaining accumulated values except for the highest accumulated value (for example, the mode having the second highest accumulated value, the mode having the third highest accumulated value, the mode having the fourth highest accumulated value, etc.).
- the accumulated value for each of the intra prediction directional modes may be used when determining weights for the intra prediction directional modes finally determined in the 'Histogram analysis' process.
- the decoder of Fig. 31 may have two or more intra prediction directional modes for the current block derived from the 'Histogram analysis' process.
- the distances between the intra prediction directional modes may be similar or different.
- the accumulated values between the intra prediction directional modes may also be similar or different. Therefore, in order to derive an optimal prediction sample for the current block, the most optimal combination among various mode combinations must be selected.
- the decoder may combine not only the intra prediction directional modes derived from the 'prediction mode generator' process of Fig. 30 but also the encoding modes derived from 'other prediction' to derive an optimal prediction sample for the current block. Information about such combinations may be included in the bitstream.
- the mode combination described herein may mean using one of mode A, mode B, planar mode, DC mode, and MIP mode, or combining some or all of them.
- the decoder can select an optimal combination for deriving an optimal prediction sample for the current block by using the intra prediction modes determined in the 'Histogram analysis' process and the weight information corresponding to the derived intra prediction modes in the 'Prediction mode analysis' process. Specifically, the decoder can determine information on whether to use a weighted average to generate a prediction sample for the current block, which intra prediction mode to use, and how to set the weight for the intra prediction mode by using the derived intra prediction modes and the weight information corresponding thereto.
- the decoder can select an optimal combination for deriving a prediction sample for the current block by using at least one of the intra prediction modes determined in the 'Histogram analysis' process and the weight information corresponding to the determined intra prediction modes and the intra prediction modes of the neighboring blocks in the 'Prediction mode analysis' process. Specifically, the decoder can determine information on whether to use weighted averaging to generate a prediction sample for the current block, which intra prediction mode to use, and how to set weights for the intra prediction modes.
- the decoder can derive optimal combination information (Combination information for prediction modes) for generating a prediction sample for the current block by using at least one or more of the following: the horizontal or vertical length of the current block, quantization parameter information, information on available intra prediction modes among the neighboring blocks of the current block, information on whether residual signals exist in the neighboring blocks of the current block, and information on whether the current block is a luminance block or a chrominance block.
- the combination information can include intra prediction directional mode information and weights for the intra prediction directional modes.
- the decoder can generate a prediction block for the current block without applying weighted averaging, but only using the intra prediction directional mode with the highest weight.
- the arbitrary value is an integer greater than or equal to 1, and may be 10.
- the decoder may generate a prediction block using only one intra prediction directional mode with the highest weight without applying a weighted average when generating a prediction block for the current block.
- the decoder may apply a weighted average when generating a prediction block for the current block.
- FIG. 32 is a diagram illustrating a method for generating prediction samples using intra prediction directional mode information and weights according to one embodiment of the present specification.
- Fig. 32 illustrates the 'Intra prediction' and 'weighted prediction' processes of Fig. 30.
- the decoder can obtain a prediction sample by performing weighted prediction using the weight information of each of the multiple intra prediction directional modes.
- the weight information can be reset based on at least one of the horizontal length of the current block, the vertical length, the quantization parameter information, and the information on whether the current block is luminance or chrominance (Additional information).
- FIGS. 33 and 34 are diagrams illustrating templates used to derive an intra prediction mode of a current block according to one embodiment of the present specification.
- the decoder can use a template, which is a reconstructed arbitrary region (pixel(s)) adjacent to the current block, to derive an intra-prediction mode of the current block.
- the decoder can generate a prediction template for the template using neighboring pixels (reference) adjacent to the template. Then, the decoder can use the intra-prediction mode for the prediction template that is most similar to the already reconstructed template to reconstruct the current block.
- TIMD Tempolate intra-mode derivation
- the intra-prediction mode can be a mode with an index of 0 to 67, and may only be an intra-prediction mode within the MPM list derived from the neighboring blocks of the current block.
- the intra-prediction mode can be an intra-prediction mode within the MPM list derived from the neighboring blocks of the current block and modes that differ from the intra-prediction mode by an arbitrary number.
- the arbitrary number can be 1, 2, 3, ...
- the intra prediction mode for the template may only correspond to a directional mode, and may not correspond to a non-directional mode (planar mode, DC mode).
- the decoder can set the size of the template.
- the width or height of the template can be 4, and if the width or height of the current block is 8 or less, the width or height of the template can be set to 2.
- the decoder can set the type of the template.
- the type of the template can be classified into a type that uses only left samples, a type that uses only upper samples, and a type that uses all of the left, upper, and upper-left samples.
- the decoder can determine the type of the template based on whether the neighboring blocks are valid or whether the neighboring blocks can be used to derive an intra-prediction directional mode.
- the TIMD mode can be set to a planar mode, and weighted averaging may not be performed.
- the decoder can configure a template for the current block.
- the decoder can derive intra prediction directional modes for neighboring blocks located to the left, above, upper-left, upper-right, and lower-left of the current block to determine whether the current block has directionality. v) If none of the neighboring blocks of the current block have directionality (e.g., non-directional mode (DC mode, planar mode, MIP mode, etc.)), the decoder can select one intra prediction directional mode with the minimum cost and not perform the TIMD mode.
- directionality e.g., non-directional mode (DC mode, planar mode, MIP mode, etc.
- weighted averaging using multiple prediction blocks may not be performed.
- the process described below can be performed based on the intra prediction directional modes existing in the MPM list. This is because complexity may increase if all 67 intra prediction directional modes are checked.
- the decoder can construct an MPM list.
- the decoder can modify the MPM list by adding DC mode, horizontal mode, and vertical mode to the MPM list if they do not exist in the MPM list.
- the decoder can compare costs by evaluating all intra prediction directional modes in the modified list.
- the decoder can select a first mode with a lowest cost and a second mode with a second lowest cost.
- the decoder can additionally perform an evaluation for an intra prediction directional mode corresponding to an index that is one less than or greater than the intra prediction directional mode index of the first mode and the intra prediction directional mode index of the second mode to improve accuracy.
- the decoder can perform an additional evaluation and again select a third mode with a lowest cost and a fourth mode with a second lowest cost. Meanwhile, the first mode and the third mode may be the same, and the second mode and the fourth mode may be the same.
- the decoder can determine whether to perform weighted averaging based on the costs of the third mode and the fourth mode.
- the decoder can perform weighted averaging, and the weights of the third and fourth modes can be determined based on the costs of the third and fourth modes. If the difference between the cost of the third mode and the cost of the fourth mode is greater than a specific value, the decoder can generate a prediction block using only the third mode without performing weighted averaging.
- the specific value may be a predetermined value.
- the size of a template may vary depending on the horizontal or vertical length of the current block.
- an above template may be configured that is longer than the horizontal length of the current block.
- the vertical length of the above template may be a predetermined length.
- a left template may be configured that is longer than the vertical length of the current block.
- the horizontal length of the left template may be a predetermined length.
- the predetermined length may be 1, 2, 3, ...
- the reference pixels for deriving/predicting the template used for the TIMD mode can be changed.
- the decoder can perform the TIMD mode by constructing only the left template of the current block, without constructing the upper template of the current block.
- the reference pixels for predicting the left template can be the above reference pixel and the left reference pixel of the current block.
- the height of the left template can be the same as the height of the current block, as shown in Fig. 34(a).
- the decoder can check whether the block adjacent to the left of the current block is a block that has already been restored, and if it is a block that has been restored, the height of the left template can be configured to be greater than the height of the current block.
- the accuracy of prediction samples for the current block can be increased as the decoder references more adjacent pixels of the current block.
- referencing more adjacent pixels increases the required memory.
- the length of the upper template can be set to be equal to the horizontal length of the current block, and the length of the left template can be set to be equal to the vertical length of the current block.
- the decoder can use an intra prediction mode derived from a template to obtain prediction samples for the current block.
- the decoder can generate prediction samples using neighboring pixels adjacent to the current block and adaptively select which neighboring pixels to use for prediction sample generation.
- the decoder can use multiple reference lines to generate prediction samples, and the index information for these multiple reference lines can be included in the bitstream.
- a new context for the indices of multiple reference lines for TIMD mode can be defined.
- the increased number of contexts can be associated with increased memory and context switching complexity. Therefore, the context used to encode and decode the indices of multiple reference lines in TIMD mode can be reused from the existing context for the indices of multiple reference lines.
- the transformation of the residual signal of the current block can be performed in two steps.
- the first transform can be a transform such as DCT-II, DST-VII, DCT-VIII, DCT5, DST4, DST1, identity transformation (IDT), etc., which are adaptively applied horizontally and vertically, respectively.
- a second transform can be additionally applied to the transform coefficients for which the first transform has been completed, and the second transform can be calculated as a matrix multiplication between the first-transformed transform coefficients and a predefined matrix.
- the second transform can be described as a low frequency non-separable transform (LFNST).
- the matrix transform set for the second transform can vary depending on the intra prediction mode of the current block. Coefficient information of the transform matrix used for the second transform can be included in the bitstream.
- a transform set for the secondary transform can be determined based on an intra prediction mode derived from the DIMD mode or the TIMD mode.
- Coefficient information of a transform matrix used for the secondary transform can be included in a bitstream.
- a decoder can parse the coefficient information included in the bitstream to set matrix coefficient information of the secondary transform for the DIMD mode or the TIMD mode.
- one of the two intra prediction modes derived from the TIMD mode can be used to select the primary transform or the secondary transform set.
- each of the two intra prediction directional modes can be compared, and the intra prediction directional mode with the smallest cost can be used to select the primary transform or the secondary transform set.
- one of the two intra prediction directional modes derived from DIMD can be used to select the primary transform or the secondary transform set.
- the weights of each of the two intra prediction modes can be compared, and the intra prediction directional mode with the highest weight can be used to select the first or second transform set.
- TIMD mode is highly complex because it predicts the template of the current block and uses the intra prediction mode derived from the template to generate the prediction block of the current block. Therefore, when the decoder generates the prediction template for the template region, the existing reference sample filtering process may not be performed.
- TIMD mode may not be applied if the ISP mode is applied to the current block or if the CIIP mode is applied to the current block.
- the ISP mode or CIIP mode may not be applied to the current block to which TIMD mode is applied, or the syntax related to the ISP or CIIP may not be parsed. In this case, the value of the syntax related to the ISP or CIIP that is not parsed can be inferred as a predetermined value.
- Template prediction can be performed by dividing the current block into a left template region and an upper template region, and an intra prediction mode can be derived for each template.
- two or more intra prediction modes can be derived for each template, and there can be four or more intra prediction modes for the current block.
- a prediction sample for the current block can be generated using all of the derived intra prediction modes, and the decoder can generate a final prediction block for the current block by performing a weighted average of the generated prediction samples.
- at least three or more of the two or more intra prediction modes derived from template prediction, a planar mode, a DC mode, and a MIP mode can be used to generate the prediction sample.
- the decoder when the decoder generates (obtains) a prediction sample for the current block, the decoder can generate a final prediction sample by performing a weighted average of the prediction samples generated using the intra prediction modes derived from template prediction and the planar mode.
- prediction samples can be generated using the methods described above.
- CIIP mode utilizes both intra-prediction and inter-prediction when generating prediction samples (blocks) for the current block.
- the prediction sample for the current block can be generated as a weighted average of the intra-prediction samples and inter-prediction samples.
- the DIMD mode or the TIMD mode can be used.
- the intra prediction sample can be generated based on the DIMD combination information.
- the decoder can generate the first prediction sample using the intra prediction mode with the highest weight and the second prediction sample using the intra prediction mode with the second highest weight.
- the decoder can generate the final intra prediction block by performing a weighted average of the first prediction sample and the second prediction sample.
- the decoder can generate the final intra prediction block by performing a weighted average of three prediction samples, including the planar mode predicted sample, the first prediction sample, and the second prediction sample among the neighboring blocks of the current block.
- the intra prediction sample can be generated based on the TIMD combination information.
- the decoder can generate two prediction samples using each of the two intra prediction modes. Then, the decoder can generate a final intra prediction sample by weighting the two prediction samples. At this time, the decoder can generate a final intra prediction sample by weighting the two prediction samples and the sample predicted in planar mode.
- Intra prediction samples may have varying accuracy depending on their location. That is, pixels located farther away from the surrounding pixels used for prediction within a prediction sample may contain more residual signals than pixels located closer to the surrounding pixels. Therefore, the decoder can divide the prediction sample into vertical, horizontal, and diagonal directions depending on the direction of the intra prediction mode, and set different weights depending on the distance from the surrounding pixels used for prediction. This can be applied to intra prediction blocks generated using the CIIP mode or intra prediction blocks generated using two or more intra prediction modes, and different weights can be set for each pixel within the prediction block depending on the distance between the location of the reference pixel and the pixel location within the prediction block.
- the intra prediction mode of the current block is a mode having a vertical or vertical-like direction
- a higher weight can be set for each pixel location within the prediction block as the pixel location is closer to the top pixel
- a lower weight can be set for each pixel location as the pixel location is farther away from the top pixel.
- the decoder can generate a final prediction block by weighting the intra-prediction samples and inter-prediction samples.
- the pixel-wise weights of the inter-prediction samples can be set by considering the pixel-wise weights of the intra-prediction samples.
- the pixel-wise weights of the inter-prediction samples can be a value obtained by subtracting the pixel-wise weights of the intra-prediction samples from the sum of the total weights.
- the sum of the total weights can be a value obtained by adding the weights of the intra-prediction samples and the weights of the inter-prediction samples at the pixel level.
- the decoder can generate prediction samples based on each intra prediction mode, and then weight and average the generated prediction samples to generate a final prediction sample.
- pixel-wise weights according to the intra prediction mode can be applied.
- the pixel-level weights may be set based on at least one of the following: an intra prediction mode, the horizontal length and vertical length of the current block, a quantization parameter, information about whether the current block is luminance or chrominance, whether the surrounding block is intra coded, and information about the presence or absence of residual transform coefficients of the surrounding block.
- FIG. 35 is a diagram illustrating a method for generating prediction samples (pixels) based on a plurality of reference pixel lines according to one embodiment of the present specification.
- the video signal processing device can generate a prediction sample (3502) within the current block based on a first reference pixel line (reference line 1) adjacent to the current block (3501) and a second reference pixel line (reference line 2) adjacent above the first reference pixel line.
- the prediction sample (3502) of FIG. 35(a) is only a sample corresponding to a position according to one embodiment of the present specification, and the position of the pixel is not limited thereto.
- the meaning of “generate” by the video signal processing device may be the same as the meaning of “acquire” by the video signal processing device.
- FIG. 35(b) is a drawing showing FIG. 35(a) in more detail.
- the video signal processing device can generate a first prediction pixel (3503) using a smoothing filter, a cubic filter, or a Gaussian filter according to an intra prediction mode through six reference pixels of the first reference pixel line.
- the video signal processing device can generate a second prediction pixel (3504) using a smoothing filter, a cubic filter, or a Gaussian filter according to the intra prediction mode through the six reference pixels of the second reference pixel line.
- the video signal processing device can generate a third prediction pixel (3505) by performing a weighted average through an arbitrary set of weights on the generated first prediction pixel (3503) and second prediction pixel (3504).
- the six reference pixels of the second reference pixel line may be reference pixels at a position shifted by one pixel to the right of each pixel of the first reference pixel line in consideration of the intra prediction mode of the current block, the position of the pixel to be generated, the position of the reference pixel line, etc.
- the video signal processing device can generate a prediction sample (3502) within the current block based on the third prediction pixel (3505).
- the video signal processing device may generate a prediction sample (3502) within the current block based on the third prediction pixel (3505) and the distance between the third prediction pixel (3505) and the prediction sample (3502) within the current block.
- the weight used by the video signal processing device to generate the third prediction pixel (3505) may be an integer greater than or equal to 0.
- the weight of the first prediction pixel (3503) may be 3, and the weight of the second prediction pixel (3504) may be 1.
- the positions of the reference pixels used to generate the prediction sample may vary based on at least one of the following: the intra prediction mode of the current block, the positions of the pixels to be generated (e.g., the positions of the first prediction pixel (3503), the second prediction pixel (3504), the third prediction pixel (3505) in FIG. 35), the positions of the reference pixel lines (e.g., the positions of the first reference pixel line and the second reference pixel line in FIG. 35).
- the video signal processing device can obtain a prediction sample within a current block according to the directionality of the intra prediction mode by using a sample of a pre-specified or signaled reference sample line.
- the pre-specified reference sample line may be a reference sample adjacent to the current block.
- the signaled reference sample line may be a sample at a position -X samples from the boundary of the current block, and X may be a signaled value. X may be 1, 2, 3, etc.
- the video signal processing device can generate a prediction block by using a plurality of reference sample lines.
- the pre-specified reference sample line or the signaled reference sample line may be referred to as a main reference sample line.
- the video signal processing device can set a sub-reference sample line based on the main reference sample line.
- the sub-reference sample line may be a reference sample line at a position Y samples apart from the main reference sample line.
- Y may be an integer, and may be -3, -2, -1, 1, 2, 3, etc.
- An encoder can signal information about a sub-reference sample line and include it in the bitstream, and a decoder can parse the information to set the sub-reference sample line.
- a prediction block can be generated from each of the main reference pixel line and the sub-reference sample line using one intra prediction mode, and then a final prediction block can be generated by weighting and averaging each prediction block. This method can be called intra fusion.
- FIG. 36 illustrates a method for predicting a sample using multiple reference pixel lines according to one embodiment of the present disclosure.
- a video signal processing device may receive a plurality of reference pixel lines as input and perform intra prediction to generate a prediction block within a current block. Depending on which reference pixel line is used, a different prediction block may be generated, and the video signal processing device may generate a final prediction block by performing a weighted average according to the weights input for each prediction block.
- the weights may be preset values. For example, the weight of a sample predicted by a main reference pixel line may be 3, and the weight of a sample predicted by a sub-reference pixel line may be 1.
- the weights may be determined based on at least one or more of the size of the current block, the horizontal or vertical size of the current block, the intra-prediction mode of the current block, quantization parameter information, and the distance (or difference) between the main reference pixel line and the sub-reference pixel line.
- the reference pixel line may be determined based on at least one or more of the size of the current block, the horizontal or vertical size of the current block, the intra-prediction mode of the current block, quantization parameter information, and MRL information.
- the main reference pixel line may be a reference pixel line adjacent to the current block
- the sub-reference pixel line may be a reference pixel line indicated by the MRL.
- the main reference pixel line may be a reference pixel line indicated by the MRL
- the sub-reference pixel line may be a reference pixel line that is located at an arbitrary fixed position relative to the reference pixel line indicated by the MRL, and the arbitrary fixed position may be an integer from -N to +N, where N may be an integer greater than 0.
- the intra prediction mode used in the method for generating prediction samples within the current block described above may be the same for each reference pixel line. Or, conversely, the intra prediction mode used in the method for generating prediction samples within the current block described above may be different for each reference pixel line. That is, a signaled intra prediction mode may be used in the main reference pixel line, and a prediction mode (corresponding to the index) that is added or subtracted by an arbitrary value from (the index of) the intra prediction mode used in the main reference pixel line may be used in the sub-reference pixel line. At this time, the arbitrary value may be an integer greater than or equal to 1.
- the video signal processing device may determine whether to increase or decrease the arbitrary value depending on the value of the intra prediction mode used in the main reference pixel line. For example, the video signal processing device may increase the intra prediction mode by an arbitrary value when the angle is negative, and may decrease the intra prediction mode by an arbitrary value when the angle is positive.
- FIG. 37 is a structural diagram illustrating a method for determining an optimal reference pixel line using a plurality of reference pixel lines based on a template according to one embodiment of the present specification.
- an encoder can receive multiple reference pixel lines as input and perform intra prediction to generate prediction blocks for a template. Depending on which reference pixel line is used, different prediction blocks can be generated. The encoder can perform weighted averaging based on various weight information input to each prediction block to ultimately generate a prediction block for the template. Depending on which reference pixel lines are used and which weights are used, multiple prediction blocks can be generated. After calculating the cost between each prediction block and the reference template, the encoder can rearrange the prediction blocks in ascending order based on the cost corresponding to each prediction block and construct a separate list using only a predetermined number of top candidates. In this case, the predetermined number can be an integer greater than or equal to 2, and can be 10.
- the encoder can generate a prediction block for the current block using the combination information used to generate the prediction blocks in the separate list.
- the encoder can then select the optimal candidate from the list in terms of image quality and bit rate, and then generate and signal a bitstream containing information about the index of the optimal candidate.
- the decoder can then construct a separate list identical to the above-described method, parse the information about the optimal candidate index contained in the bitstream, and use the optimal combination information indicated by the index of the optimal candidate to generate prediction samples.
- the encoded intra prediction mode can be any one of angular mode, planar mode, DC mode, and MIP mode. Prediction according to the angular mode can be performed according to 65 different angles, and prediction according to the MIP mode can be performed based on a predefined matrix.
- the angular mode can be effective in blocks that have characteristics such as edges within the current block. However, if the current block has smooth characteristics, blocks predicted using the angular mode can generate discontinuous edges at the boundary between blocks or visible outlines within the block. This can be a factor that reduces encoding efficiency.
- the DC mode can have the disadvantage of generating visible edges at the boundary between blocks at low bit rates.
- the planar mode can improve the edge problems that occur in the angular and DC modes, and can generate predicted blocks without discontinuities.
- FIG. 38 illustrates a method for generating prediction samples using planar mode according to one embodiment of the present disclosure.
- the video signal processing device can generate a linearly predicted value in the vertical direction and a linearly predicted value in the horizontal direction to generate a prediction sample within the current block.
- the video signal processing device can generate a prediction sample (value) within the current block by weighting the linearly predicted value in the vertical direction and the linearly predicted value in the horizontal direction.
- a linearly predicted value in the vertical direction (predV (x, y)) can be generated based on Equation 4, and a linearly predicted value in the horizontal direction (predH (x, y)) can be generated based on Equation 5. And, a new predicted value (pred (x, y)) can be generated based on Equation 6.
- W may be the horizontal size (width) of the current block
- H may be the vertical size (height) of the current block.
- rec(x, y) may mean a pixel value at the (x, y) coordinate.
- Predicted values (predV(x, y), predH(x, y), pred(x, y)) may mean a predicted pixel value at the (x, y) coordinate.
- a video signal processing device may use only vertical linear prediction when performing prediction related to a current block according to a planar mode.
- the video signal processing device may use only horizontal linear prediction when performing prediction related to a current block according to a planar mode. Therefore, the planar mode can be divided into three modes. That is, in addition to the method of weighting and averaging prediction blocks generated using conventional vertical and horizontal linear prediction, it can be divided into a vertical planar mode that uses only vertical linear prediction, and a horizontal planar mode that uses only horizontal linear prediction.
- An encoder can generate and signal a bitstream including information on which of the three planar modes a current block used.
- a decoder can generate a prediction block for the current block based on a planar mode determined by parsing information on which prediction mode was used included in the bitstream.
- FIG. 39 illustrates a method for constructing an MPM list using a multi-prediction mode according to one embodiment of the present specification.
- the video signal processing device when the video signal processing device configures the MPM list, it can be set to include two or more intra prediction directional modes per item.
- A, B, C, ..., F, G can represent any intra prediction directional mode, MIP, Intra TMP, EIP, OBIC, IBC, DIMD, TIMD, SGPM, one of the BV-based modes configured based on the BV used in the surrounding blocks, and “N/A” means that it is not used, and the 4th and 5th in the MPM list can be configured with only one intra prediction directional mode, not a multi-prediction mode.
- FIG. 39(a) A, B, C, ..., F, G can represent any intra prediction directional mode, MIP, Intra TMP, EIP, OBIC, IBC, DIMD, TIMD, SGPM, one of the BV-based modes configured based on the BV used in the surrounding blocks, and “N/A” means that it is not used, and the 4th and 5th in
- a single prediction mode can be added to the MPM list first, and then a multi-prediction mode can be added next.
- N/A means that it is not used, and the 1st and 2nd in the MPM list can be configured with only one intra prediction directional mode, not a multi-prediction mode.
- FIG. 40 illustrates a method of using a candidate list based on multiple prediction modes according to one embodiment of the present specification.
- a video signal processing device can generate a prediction block of a current block using a candidate list based on a multi-prediction mode.
- the video signal processing device can configure a multi-prediction mode candidate list for the current block.
- the video signal processing device can configure the multi-prediction mode candidate list using at least one of neighboring block information, DIMD information of the current block, TIMD information of the current block, MPM list of the current block, and Non-MPM list of the current block.
- the neighboring block information may be a block adjacent to the current block, a block that is not adjacent to the current block and is separated by a predetermined distance, a neighboring block stored in a separate memory, etc.
- the neighboring block information may be intra-prediction directional mode information of the neighboring block and a weight value for each mode.
- the predetermined distance may be determined based on at least one of the upper-left sample position of the current block, the horizontal and vertical sizes of the current block, and the predetermined horizontal and vertical sizes. For example, a video signal processing device can derive a neighboring block based on a position shifted horizontally to the left by the width of the current block based on the upper left sample position of the current block and a position shifted vertically upward based on the upper left sample position of the current block.
- a method for a video signal processing device to construct a candidate list based on multiple prediction modes is described.
- the video signal processing device can generate a multiple prediction mode candidate using at least one of neighboring block information, DIMD information of a current block, TIMD information of the current block, an MPM list of the current block, a Non-MPM list of the current block, DIMD information derived from a cumulative histogram of multiple histograms used to derive DIMD from neighboring blocks, and a top N (predetermined number) intra prediction modes with a high occurrence frequency among intra prediction modes used in neighboring blocks.
- the predetermined number may be an integer of 5.
- a multiple prediction mode candidate based on occurrence frequency may include five intra prediction modes.
- the multiple prediction mode may be composed of two or more intra prediction directional modes, and the intra prediction directional modes of one multiple prediction mode candidate may be different from each other.
- the multiple prediction mode may only include intra prediction directional modes that have directionality.
- the multiple prediction mode may not include a planar mode, which is a non-directional mode. If the intra prediction directional mode derived from the neighboring block is a planar mode, the intra prediction directional mode derived from the neighboring block may be excluded from the multi-prediction mode.
- the multi-prediction mode may not include the DC mode, which is a non-directional mode.
- the intra prediction directional mode derived from the neighboring block may be excluded from the multi-prediction mode.
- the multi-prediction mode candidate generated by the above-described method may be added to the multi-prediction mode candidate list.
- the video signal processing device may determine whether the same multi-prediction mode candidate exists in the multi-prediction mode candidate list, and only if there is no such multiple prediction mode candidate, may add the generated multiple prediction mode candidate to the multi-prediction mode candidate list.
- the maximum size of the multi-prediction mode candidate list may be a pre-specified number, and the pre-specified number may be an integer, such as 25. If the maximum size of the multi-prediction mode candidate list is the pre-specified number, the video signal processing device may not add any more multi-prediction mode candidates.
- a video signal processing device can generate a reordered multi-prediction mode candidate list by reordering a multi-prediction mode candidate list based on template costs. Alternatively, the reordering process may not be performed. Reordering based on template costs may be performed in the manner described above with reference to FIG. 30.
- the video signal processing device can configure a reference template using reconstructed neighboring samples adjacent to a current block.
- the video signal processing device can generate a prediction template for the reference template using multiple prediction mode candidates in the multi-prediction mode candidate list and pre-designated reference sample lines (e.g., Reference lines 1, 2, 3, ... of FIG. 8).
- the pre-designated reference sample line may be Reference line 1 (e.g., a line adjacent to the current block template).
- the video signal processing device can calculate a cost between the reference template and the prediction template.
- the cost may be the sum of the absolute values of the differences (SAD) between samples.
- the cost may be the sum of the absolute values of the differences (MR-SAD) between the mean difference sample values obtained by subtracting the mean of each template from each sample value.
- the prediction templates generated using each intra-prediction directional mode may be weighted averaged by applying a predetermined weight, and the video signal processing device may generate a weighted average prediction template.
- the weight may be a predetermined value, and the weights for each intra-prediction directional mode may be the same or different from each other.
- the multi-prediction mode candidate list may be re-sorted based on the calculated cost, and may be re-sorted in ascending order.
- a video signal processing device can reconstruct a prediction mode candidate list using an MPM list and a rearranged multiple prediction mode candidate list. At this time, the video signal processing device can construct a prediction mode candidate list using a portion of the MPM list and a portion of the rearranged multiple prediction mode candidate list. Candidates starting from the first candidate in the MPM list up to a predetermined number can be added to the prediction mode candidate list, and the predetermined number can be 5. Candidates from among the multiple prediction mode candidates in the rearranged multiple prediction mode candidate list can be added to the prediction mode candidate list up to a predetermined number in order of lowest cost to highest cost, and the predetermined number can be an integer and can be 16.
- the encoder can determine an optimal prediction mode candidate for the current block from the derived prediction mode candidate list (or multiple prediction mode candidate lists if the prediction mode candidate list reconstruction process is not performed), and then generate and signal a bitstream including index information for the optimal prediction mode candidate.
- the decoder can parse the index information for the optimal prediction mode candidate from the bitstream and obtain a prediction block for the current block using the determined optimal prediction mode candidate.
- the video signal processing device can obtain a final prediction block of the current block through a weighted average between a prediction block obtained based on a planar mode (or a DC mode) and a prediction block obtained using the optimal prediction mode candidate.
- FIG. 41 illustrates a method for selecting an optimal intra prediction mode combination according to one embodiment of the present specification.
- Figures 42 and 43 illustrate neighboring blocks of a current block according to one embodiment of the present specification.
- the optimal combination of intra prediction modes can be determined based on the occurrence frequency of the intra prediction modes.
- OBIC Currence-based intra coding
- an intra coding mode based on the occurrence frequency of the intra prediction modes can be performed in the following order.
- the video signal processing device can determine whether the OBIC mode is applicable to a current block. Whether the OBIC mode is applicable can be determined using at least one of the position of the current block, whether the current block is a luminance block or a chrominance block, whether the current block is encoded in an intra prediction mode, whether DIMD is applicable, the horizontal and vertical sizes of the current block, and the number of blocks used to derive the OBIC mode among the neighboring blocks of the current block. If the number of blocks used to derive the OBIC mode among the neighboring blocks of the current block is less than a predetermined number, the OBIC mode may not be applied to the current block, and syntax elements related to OBIC may not be signaled or parsed.
- the video signal processing device can derive the intra prediction mode from the neighboring blocks of the current block.
- the neighboring blocks may be blocks adjacent to the current block.
- the blocks at positions A0, A1, B0, B1, and B2 in FIG. 42 may be neighboring blocks.
- the neighboring blocks may be blocks that are not adjacent to the current block.
- the blocks at positions Ax, Bx, Cx, ax, bx, and cx in FIG. 43 may be neighboring blocks. If the neighboring blocks of the current block are encoded in the IBC or Intra TMP mode, the reference block indicated by the BV of the current block can be used as the neighboring block for the OBIC mode.
- a temporal neighboring block corresponding to the current block from another reference picture that is not identical to the POC (picture order count) of the current picture can also be used as the neighboring block for the OBIC mode.
- a temporal neighboring block may be a block whose position has been moved using motion information from blocks adjacent to the current block.
- the video signal processing device can derive an intra prediction mode from the selected neighboring block. Then, the video signal processing device can generate a histogram for the intra prediction mode based on the value of the derived intra prediction mode and the product of the horizontal length and the vertical length of the neighboring block (or the sum of the horizontal and vertical lengths of the neighboring block).
- the value of the derived intra prediction mode can be an X-axis component (which can be described as a class in this specification) value of the histogram
- the product of the horizontal length and the vertical length of the neighboring block (or the sum of the horizontal and vertical lengths of the neighboring block) can be a Y-axis component (which can be described as a degree in this specification) value of the histogram.
- the video signal processing device can generate a prediction block for the current block using the top K intra prediction modes that most frequently occurred in the histogram.
- K is a predetermined number, such as 5.
- a video signal processing device uses multiple intra prediction modes, it can generate a prediction block using each intra prediction mode, and then apply a weight to each prediction block to generate a weighted average prediction block.
- FIG. 44 illustrates a search area for obtaining a block vector in intra TMP mode according to one embodiment of the present specification.
- a video signal processing device can construct a reference template using reconstructed neighboring samples adjacent to a current block to obtain an optimal block vector (BV) in an intra TMP mode.
- the video signal processing device can find a reference template most similar to the reference template within a search region (R1, R2, R3, R4, R5, R6), and then use the distance between the current block and the reference template as the optimal BV of the current block.
- cost calculation e.g., SAD
- the video signal processing device can reduce the time (number of times) consumed for cost calculation by applying a predetermined sampling unit rather than an integer unit.
- FIG. 45 illustrates a template used to find a block vector in intra TMP mode according to one embodiment of the present specification.
- a video signal processing device can find an optimal BV for block A using a template (template a) adjacent to block A.
- the video signal processing device can find an optimal BV for block D using a template (template d) adjacent to block D.
- blocks A, B, and C must all be restored. This is because the templates can be composed of restored samples.
- the encoder can perform tests for all encoding modes to determine the optimal encoding mode for the blocks. Therefore, tests for the intra TMP mode must be performed on blocks A, B, C, and D, and tests for the intra TMP encoding mode for the next block can be performed only when the previous block has been restored.
- a problem may arise in that the processing speed between blocks is significantly reduced due to the tests for the intra TMP mode.
- encoding methods using templates can be used in various encoding modes, but these template-based encoding methods have the problem of significantly reducing the processing speed between blocks and not being able to perform parallel processing.
- the method of configuring a template using the surrounding reconstructed samples of the current block and then encoding using the template requires the presence of surrounding reconstructed samples. If the current block is located at the boundary of a picture, subpicture, slice, or tile, there may be no surrounding reconstructed samples or only a portion of them. If the current block is located at the boundary of a picture, subpicture, slice, or tile, the video signal processing device may not allow the template-based encoding method, the encoder may not signal information related to the template-based encoding method, and the decoder may not parse the information related to the template-based encoding method and set it not to be applied.
- the video signal processing device may not allow the template-based encoding method, the encoder may not signal information related to the template-based encoding method, and the decoder may not parse the information related to the template-based encoding method and set it not to be applied.
- the pre-specified value may be an integer greater than or equal to 1, and may be 2.
- the template-based encoding method may be DIMD, TIMD, Intra TMP, TMRL, MIP, EIP, PNN, PDP, SGPM, IBC, TM, TM OBMC, LIC, CIIP, CCCM, ARMC, GPM, etc.
- the encoder may not signal information related to TIMD, and the decoder may set the information related to TIMD not to be applied without parsing it.
- the video signal processing device may adjust the range of the intra prediction mode to be derived according to the location of the available template area. For example, if the current block is located at the upper boundary of a picture, subpicture, slice, or tile, the video signal processing device may be able to derive only the planar mode, the DC mode, and the angular mode within the preset X to Y range among the intra prediction modes, and may not be able to derive the remaining intra prediction modes.
- X can be greater than or equal to -14, and Y can be greater than X.
- X can be 30, and Y can be 70.
- the video signal processing device can generate a prediction block for the current block using the top N intra prediction modes having a high frequency value among the intra prediction modes in the range from X to Y in the histogram.
- N can be an integer greater than or equal to 1, and can be 5.
- the video signal processing device can obtain a modified candidate list including only the planar mode, the DC mode, and the angular mode in the range from X to Y in the candidate list for the intra prediction mode, and excluding other intra prediction modes from the list.
- the video signal processing device can generate a prediction block for the current block using the top N intra prediction modes in descending order of cost in the modified candidate list.
- N can be an integer greater than or equal to 1, and can be 2.
- FIG. 46 illustrates a method for determining whether a template-based encoding method is acceptable according to one embodiment of the present specification.
- the video signal processing device can determine whether template-based prediction can be used for each block based on the position and size of the current block, and the position or size of the template region.
- a template estimation region represented by a dotted line can be set, and the video signal processing device can set the availability of adjacent samples to enable parallel processing for blocks within the template estimation region. For example, since the surrounding samples used in block A are located outside the TER, block A can be capable of template-based encoding or decoding using the surrounding samples.
- the upper sample is located outside the TER, but the left sample is located inside the TER, so block B can be capable of template-based encoding or decoding using only the upper sample.
- the surrounding samples used in block C the left sample is located outside the TER, but the upper sample is located inside the TER, so block C can be capable of template-based encoding or decoding using only the left sample. Since all the surrounding samples used in block D are located inside the TER, block D may not be able to use a template-based encoding or decoding mode using the surrounding samples.
- the video signal processing device can set the size of the template estimation region (TER) in various ways, and can set it in units of VPS, SPS, PPS, Picture, Slice, Tile, and block.
- FIG. 47 illustrates a method for signaling syntax elements related to the size of a template prediction region according to one embodiment of the present specification.
- sps_log2_parallel_template_level_minus2 related to the size of TER can be signaled in SPS.
- (sps_log2_parallel_template_level_minus2 + 2) represents Log2ParTmpLevel, which can be used in the parsing process of template-based encoding mode and the encoding or decoding process for template-based encoding mode.
- sps_log2_parallel_template_level_minus2 can have a range from 0 to (CtbLog2SizeY - 2).
- CtbLog2SizeY is a value calculated by taking the log of 2 for the CTB block size.
- (sps_log2_parallel_template_level_minus2 plus 2 specifies the value of the variable Log2ParTmpLevel, which is used in the parsing process for template-based prediction mode and/or the decoding process for template-based prediction mode.
- the value of sps_log2_parallel_template_level_minus2 shall be in the range of 0 to CtbLog2SizeY - 2, inclusive.
- sps_log2_parallel_template_level_minus2 If sps_log2_parallel_template_level_minus2 is not parsed, the value of sps_log2_parallel_template_level_minus2 may be implied to be 0.
- FIG. 48 illustrates constraint flags related to a template prediction region included in a general_constraint_info() syntax structure according to one embodiment of the present specification.
- general_constraint_info() can be called from the profile_tier_level() syntax.
- the profile_tier_level() syntax can be called from the SPS RBSP syntax, the VPS RBSP syntax, and the Decoding capability information (DCI) RBSP syntax.
- Individual syntax elements in the general_constraint_info() syntax can correspond to syntax elements in the SPS RBSP, and individual syntax elements in the general_constraint_info() syntax can constrain the values (enable/disable) of the corresponding syntax elements in the SPS RBSP.
- the flag related to the size of TER may be gci_no_parallel_template_level_constraint_flag.
- gci_no_parallel_template_level_constraint_flag 1 specifies that sps_log2_parallel_template_level_minus2 for all pictures in OlsInScope shall be equal to 0.
- gci_no_parallel_template_level_constraint_flag 0 does not impose such a constraint).
- a video signal processing device can set the TER size in Picture and Slice units.
- the syntax elements used to set the TER size in Picture and Slice units can be signaled in the Picture Header and Slice Header, respectively.
- the encoder can signal information about the size of TER in units of SPS, PPS, Picture, and Slice in the bitstream.
- the decoder can parse the information about the size of TER to set the size of TER in units of SPS, PPS, Picture, and Slice.
- Figure 49 shows the TER size according to the sps_log2_parallel_template_level_minus2 value according to one embodiment of the present specification.
- the size of TER can be 4x4.
- the size of TER can be 8x8.
- the size of TER can be 16x16.
- the size of TER can be 32x32.
- the size of TER can be 64x64.
- the size of TER can be 128x128.
- the video signal processing device cannot apply the template-based encoding method to all blocks in parallel, but can apply the template-based encoding method sequentially.
- the block size is larger than 4x4, the video signal processing device can apply the template-based encoding method to all blocks in parallel.
- the current picture can be divided into non-overlapping units of the size of TER.
- the video signal processing device can determine whether a template-based encoding method is allowed or whether surrounding samples (or templates) are available based on the position or size of the current block and the position or size of a template region constructed through surrounding samples.
- the video signal processing device can determine whether the surrounding templates are available using the Log2ParTmpLevel value and the coordinates of the upper left sample of each block and each template.
- the horizontal value calculated with the upper left sample coordinates of block A (xCbA >> Log2ParTmpLevel) is the same as the horizontal value calculated with the upper left sample coordinates of the upper template (xNbAbove >> Log2ParTmpLevel), but the vertical value calculated with the upper left sample coordinates of block A (yCbA >> Log2ParTmpLevel) is different from the vertical value calculated with the upper left sample coordinates of the upper template (yNbAbove >> Log2ParTmpLevel), so that the video signal processing device can use the upper template for template-based encoding or decoding for block A.
- the video signal processing device can determine whether the surrounding templates are available using the Log2ParTmpLevel value and the coordinates of the upper left sample of each block and each template.
- the video signal processing device cannot use the upper template for template-based encoding or decoding for block D.
- the template-based encoding mode may not be allowed in block D. Since the template-based encoding mode is not allowed in block D, the encoder may not perform signaling for the template-based encoding mode (may not include syntax elements related to the template-based encoding mode in the bitstream). The decoder can skip parsing for template-based coding mode in block D and infer that it is not using template-based coding mode.
- Template-based intra encoding methods include Intra TMP, DIMD, TIMD, SGPM, TMRL, EIP, MIP, CCCM, etc.
- template-based inter encoding methods may include TM, PROF, TM-based motion candidate list reordering, GPM, etc.
- a sign prediction method of template-based transform coefficients may be used as an encoding method.
- TER-based parallel processing methods can be applied to each of the above-described template-using methods.
- sps_log2_parallel_template_level_minus2 and Log2ParTmpLevel can be replaced with sps_log2_parallel_intraTmp_level_minus2 and Log2ParIntraTmpLevel. That is, the video signal processing device can set an intra TMP template prediction region according to the sps_log2_parallel_intraTmp_level_minus2 value, and encode or decode all blocks within the set intra TMP template prediction region in parallel.
- a video signal processing device can configure and use various candidate lists according to an encoding method.
- the video signal processing device can apply the TER by replacing it with a candidate list sharing area, and the video signal processing device can share and use one candidate list for blocks within the candidate list sharing area. That is, the candidate lists that the video signal processing device uses for the first block and the second block within the candidate list sharing area can be the same.
- the video signal processing device can configure and use a shared candidate list by using the position or size of a block or the position or size of the candidate list sharing area.
- the video signal processing device when configuring a candidate list for a block, can set the position and size of the current block to the position and size of the candidate list sharing area, and then use the candidate list configured based on the candidate list sharing area as the candidate list of the current block.
- the candidate index of at least one block within the candidate list sharing area can be different from the candidate index of another block.
- the video signal processing device can construct an Intra TMP candidate list using block vectors derived from surrounding blocks. Then, the video signal processing device can perform encoding or decoding of the current block using the Intra TMP candidate list.
- the Intra TMP candidate list can be constructed based on the location and size of the candidate list sharing area, and all blocks within the candidate list sharing area can use the same Intra TMP candidate list.
- the block vector candidate index of at least one block within the candidate list sharing area can be different from the candidate indexes of other blocks.
- a video signal processing device can construct a DIMD (or TIMD) candidate list using an intra prediction mode derived from a surrounding block, and can perform encoding or decoding of the current block using the DIMD (or TIMD) candidate list.
- the video signal processing device can construct the DIMD (or TIMD) candidate list based on the location and size of the candidate list sharing area, and the video signal processing device can use the same DIMD (or TIMD) candidate list for all blocks within the candidate list sharing area.
- the DIMD (or TIMD) candidate index of at least one block within the candidate list sharing area may be different from the candidate indexes of other blocks.
- the video signal processing device can construct a CCP merge list using a CCP model derived from surrounding blocks, and can perform encoding or decoding of the current block using the CCP merge list.
- the video signal processing device can construct the CCP merge list based on the location and size of the candidate list shared area, and the video signal processing device can use the same CCP merge list for all blocks within the candidate list shared area.
- the CCP merge candidate index of at least one block within the candidate list shared area may be different from the candidate indexes of other blocks.
- the method of ensuring that all blocks within a candidate list shared area use the same CCP merge list can also be applied to constructing and using an EIP merge list when the EIP encoding mode is applied to the current block.
- the method of ensuring that all blocks within a candidate list shared area use the same CCP merge list can also be applied to constructing and using a LIC merge list when the LIC mode is applied to the current block.
- the video signal processing device can construct a motion (or block vector) candidate list using motion information (or block vector) derived from surrounding blocks, and the video signal processing device can perform encoding or decoding of the current block using the motion (or block vector) candidate list.
- the video signal processing device can construct the motion (or block vector) candidate list based on the position and size of the candidate list sharing area, and the video signal processing device can use the same motion (or block vector) candidate list for all blocks within the candidate list sharing area.
- the motion candidate index of at least one block within the candidate list sharing area may be different from the candidate index of another block.
- FIG. 50 illustrates a method for prediction using a location-based model in EIP mode according to one embodiment of the present specification.
- a video signal processing device when a video signal processing device generates a prediction block using the EIP mode, it can perform sample-by-sample prediction. Since sample-by-sample prediction can be performed for the next sample after the prediction for the previous sample is completed, the prediction performance speed is slow. Therefore, when generating a prediction block from a block encoded in the EIP mode, a processing speed bottleneck may occur. In addition, there is a disadvantage in that parallel processing is not possible due to sequential sample processing. To solve this problem, the video signal processing device can apply a position-based model or a gradient and position-based model when generating a prediction block for a block encoded in the EIP mode.
- the video signal processing device can construct a template using surrounding restored samples of the current block (X), and then derive a position-based model using the template and surrounding samples (e.g., A, B, C, D, etc.).
- a position-based model using the template and surrounding samples (e.g., A, B, C, D, etc.).
- the size of the template for deriving the position-based model can be determined based on the horizontal and vertical sizes of the current block.
- the template position can be a pre-specified position based on the position and size of the current block.
- the position-based model can be derived for each template type, and the encoder can generate and signal a bitstream including index information for an optimal model.
- the decoder can parse the index information for the optimal model to determine a position-based model for predicting the current block.
- the above template form may be any one of a left template configured using (including) samples adjacent to the left side of the current block, an upper template configured using samples adjacent to the upper side of the current block, and a template configured using both samples adjacent to the left side of the left current block and samples adjacent to the upper side of the current block.
- the video signal processing device may set the position of the template for inducing the position-based model based on a block vector.
- the video signal processing device may determine an optimal template position based on a position candidate list of the template for inducing the position-based model.
- the position candidate list of the template for inducing the position-based model may be configured using at least one of a position indicated by the block vector and a pre-specified position.
- the encoder may obtain and signal a bitstream including an index for an optimal position candidate in the position candidate list of the template for inducing the position-based model.
- the decoder may parse the index for the optimal position candidate to determine an optimal position candidate in the position candidate list of the template for inducing the position-based model.
- the position candidate list of the template may be reordered based on a template cost. Alternatively, a candidate with the minimum template cost from the position candidate list of the above template may be determined as the optimal position candidate.
- the video signal processing device can derive a location-based model through a template using mathematical expression 7.
- C i represents a parameter for a position-based model
- R i is a sample value within a template
- X and Y are position information for surrounding samples (e.g., A, B, C, D in Fig. 50(a)).
- B is a bit depth value for a luminance component, and B can be 8, 10, etc.
- the video signal processing device can calculate C i such that the Mean Square Error (MSE) is minimized by using an auto-correlation matrix calculation and a cross-correlation matrix calculation.
- the calculation of the auto-correlation matrix may utilize the sample values within the template of Fig. 50(a) and the location information for surrounding samples (e.g., A, B, C, D, etc. of Fig.
- the calculation of the cross-correlation matrix may utilize the sample values within the template of Fig. 50(a) and the location information for surrounding samples (e.g., A, B, C, D, etc. of Fig. 50(a)) and the calculation between the sample values of the surrounding samples.
- a video signal processing device can predict a sample of a current block by inputting C i and a template adjacent to the current block and the location information of a sample to be restored into Equation 7.
- the number of samples R in the template is a predetermined number, and Equation 7 is an example in which the number of R is set to 14.
- a position-based model through a template can be extended to a gradient and position-based model through a template.
- Gy and Gx represent gradient values. Gy and Gx can be calculated through Equation 9 using samples at the location of FIG. 50(b) for samples in the template of FIG. 50(a).
- the video signal processing device can set the EIP prediction direction using the DIMD mode derived from the surrounding samples of the current block.
- the pre-specified value may be an integer greater than or equal to 1, and may be 5.
- the video signal processing device can predict the EIP prediction direction in the order of the upper left sample to the right sample if the absolute value of the difference between the DIMD mode derived from the surrounding samples of the current block and the horizontal direction mode (mode 18 in Fig. 6) is less than a predetermined value, and can predict in the order of the next row after one row is fully predicted.
- the video signal processing device can predict the EIP prediction direction in the order of the upper left sample to the lower sample direction if the absolute value of the difference between the DIMD mode derived from the surrounding samples of the current block and the horizontal direction mode (mode 18 in Fig. 6) is less than a predetermined value, and can predict in the order of the next column after one column is fully predicted.
- the video signal processing device can predict the EIP prediction direction in the order of the upper left sample to the right sample if the absolute value of the difference between the DIMD mode derived from the surrounding samples of the current block and the vertical direction mode (mode 50 in Fig. 6) is less than a predetermined value, and can predict in the order of the next row after one row is fully predicted.
- the video signal processing device can predict the EIP prediction direction in the order of the upper left sample to the lower sample direction if the absolute value of the difference between the DIMD mode derived from the surrounding samples of the current block and the vertical direction mode (mode 50 in Fig. 6) is less than a predetermined value, and can predict in the order of the next column after one column is fully predicted.
- the video signal processing device can predict the EIP prediction direction in the diagonal direction if the absolute value of the difference between the DIMD mode derived from the surrounding samples of the current block and the vertical direction mode (mode 50 in FIG. 6) is less than a pre-specified value (e.g., 5 as an integer greater than or equal to 1).
- BV EIP is a method that uses the EIP model used in the surrounding blocks indicated by the BV as the EIP model for the current block.
- the video signal processing device can set the EIP prediction direction using the DIMD mode (or intra prediction mode) derived from the surrounding blocks indicated by the BV.
- FIG. 51 illustrates a method for deriving an intra prediction mode using DIMD in an ISP mode according to one embodiment of the present specification.
- the video signal processing device can derive one or more intra prediction directional modes through the DIMD method by using at least one or more samples from areas a1, a2, a3, b, c, d1, and d2 when the ISP mode is applied to the current block.
- the derived one or more intra prediction directional modes can be equally applied to subblocks A, B, C, and D.
- the derived one or more intra prediction directional modes can be differently applied to subblocks A, B, C, and D.
- the video signal processing device can generate a prediction block by applying one or more derived intra prediction directional modes to subblock A, and can generate a prediction block by applying only one intra prediction directional mode with the highest priority to subblocks B, C, and D.
- the video signal processing device when the ISP mode is applied to the current block, can induce one or more intra prediction directional modes by applying the DIMD method to each of the sub-blocks A, B, C, and D, and can set the area of the surrounding samples used for DIMD calculation differently in each sub-block.
- the video signal processing device can parallelize the DIMD derivation process by restricting the samples used when deriving the intra prediction mode using DIMD for each sub-block.
- a video signal processing device can induce a DIMD mode in a subblock A using at least one sample area among a1, a2, a3, and b, and in a subblock B using at least one sample area among samples, a2, b, and c, adjacent to subblock B in subblock A, and in a subblock C using at least one sample area among samples, b, c, and d1 adjacent to subblock C in subblock B, and in a subblock D using at least one sample area among samples, c, d1, and d2 adjacent to subblock D in subblock C, and in a subblock D using at least one sample area among samples, a1, b2, and d3 adjacent to subblock D in subblock C, and in a subblock D using at least one sample area among samples, a2, b2, and c, adjacent to subblock B in subblock B, and in a subblock D using at least one sample area among samples, a3, d1, and d2 adjacent to subblock D in subblock D,
- sub-blocks B, C, and D only the upper reference samples are available, so the intra prediction modes can only be from the diagonal mode (DIA) to the vertical diagonal mode (VDIA), and the intra prediction modes derived using DIMD can also be from the diagonal mode (DIA) to the vertical diagonal mode (VDIA).
- a video signal processing device can induce a DIMD mode using at least one sample area among a1, a2, a3, and b in a subblock A, can induce a DIMD mode using at least one sample area among a1, a2, a3, b, and c in a subblock B, can induce a DIMD mode using at least one sample area among a1, a2, a3, b, c, and d1 in a subblock C, and can induce a DIMD mode using at least one sample area among a1, a2, a3, c, d1, and d2 in a subblock D.
- FIG. 52 illustrates a matrix-based intra prediction method according to one embodiment of the present specification.
- a method of performing intra prediction using a model (or matrix) that infers the relationship between the current block and reference samples through a large amount of image data can be referred to as a matrix-based Position Dependent Intra Prediction (PDP) method.
- PDP Position Dependent Intra Prediction
- a video signal processing device can generate a prediction block P(x, y) for the current block using a reconstructed reference sample (r in FIG. 52) r(k) adjacent to the current block to be predicted (p in FIG. 52) and a predefined matrix F(x, y, k) (see the mathematical equation in FIG. 52(b)).
- the matrix can be determined based on the size of the current block and the intra prediction directional mode.
- the size of the reference sample can be determined based on the size of the current block. For example, when the horizontal and vertical sizes of the current block are less than or equal to a first size specified in advance, T1 and T2 can be a second size specified in advance. When the horizontal and vertical sizes of the current block are greater than the first size specified in advance, T1 and T2 can be a third size specified in advance.
- the first pre-specified size may be 16, the second pre-specified size may be 2, and the third pre-specified size may be 1.
- W and H represent the width and height of the current block.
- the video signal processing device may generate a prediction block for the current block using matrix-based intra prediction through PDP without using intra prediction through the existing intra prediction directional mode.
- whether PDP is applicable to the current block may be determined based on at least one of the size of the current block, the intra prediction directional mode of the current block, whether the current block is a luminance block or a chrominance block, whether an inferred matrix exists, whether a reference sample exists, the encoding mode of the current block, and the reference sample line.
- the current block may not be able to use the PDP-based method.
- the video signal processing device may determine whether the PDP mode is applicable based on the intra prediction directional mode of the current block. For example, the video signal processing device may determine that the PDP mode is applicable to the current block only when the intra prediction directional mode of the current block is a pre-specified mode.
- the pre-specified mode may vary depending on the encoding mode of the current block.
- a video signal processing device can generate a prediction block for a current block by using matrix-based intra prediction through PDP instead of using intra prediction through a conventional intra prediction directional mode, when the encoding mode of a current block is an MPM-based intra prediction mode and the intra prediction mode is a planar (or directional planar) mode, a DC mode, or an even-numbered angle mode.
- the encoding mode of the current block can be one of DIMD, OBIC, CIIP, SGPM, TIMD, TMRL, Directional Planar, EIP, MIP, ISP, IBC, Intra TMP, BDPCM, Palette, Inter mode, LM, and CCCM.
- the video signal processing device can apply the PDP to the current block only when a reference sample used to predict the current block through the PDP is within a slice and/or tile to which the current block belongs.
- the video signal processing device may determine that the PDP cannot be applied to the current block if a reference sample used to predict the current block through the PDP is in a slice and a tile other than the slice and/or tile to which the current block belongs.
- the reference sample to be used may be determined based on the intra prediction mode of the current block. For example, if the intra prediction mode is a pre-specified mode, the size of the reference sample may be a pre-specified first size.
- the size of the reference sample may be a pre-specified second size.
- the pre-specified mode may be a range greater than or equal to 19 and less than or equal to 49 for the intra prediction mode (see FIG. 6).
- the pre-specified first size may be W x T1 for the upper reference sample and T2 x (H + T1) for the left reference sample.
- the pre-specified second size may be 2W x T1 for the upper reference sample and T2 x (2H + T1) for the left reference sample, where W x T1 may be the horizontal length W and the vertical length T1.
- NNIP Neurological Network-based Intra Prediction
- PNN Prediction Neural Network
- the video signal processing device can generate a predicted block by inputting surrounding samples of the current block into the neural network.
- the video signal processing device can derive a transformation kernel using the DIMD mode derived from the block predicted based on the PNN.
- Figure 53 shows the order in which the TM method is performed according to one embodiment of the present specification.
- a decoder can obtain initial motion information (initial MV, reference index) derived from a surrounding block.
- the decoder can set a search area within a reference image based on the initial motion information.
- the decoder can select several candidate locations within the search area according to a predefined search pattern.
- the decoder can construct a template for the current block using surrounding blocks of the current block, and construct a reference block (video) template of the same size as the template for the current block based on the candidate locations.
- the decoder can obtain a cost value between the template for the current block and the reference block (video) template.
- the cost value between templates can mean the similarity between each template when different first templates and second templates exist.
- the video signal processing device can calculate one or more cost values between one or more blocks included in a first template and one or more blocks included in a second template corresponding to each of the one or more blocks included in the first template.
- the sum of one or more cost values may be the cost value between the first template and the second template.
- the cost value may be obtained through SAD (Sum of Absolute Differences) or MRSAD (Mean-Removed SAD).
- the decoder may obtain cost values for all candidate positions within the search area and use the information of the motion candidate corresponding to the position with the minimum cost value as the final motion information (the improved motion information of FIG. 29). In this specification, obtaining a cost value may be synonymous with the decoder calculating a cost value.
- FIG. 54 illustrates a method for setting a search area for a TM method based on initial motion information according to one embodiment of the present specification.
- the decoder can set a position moved by the initial motion information (initial MV) based on the upper left position of the current block as the position of the reference block in order to find a reference block corresponding to the current block in the reference picture.
- the decoder can set a search range of an arbitrary size (m x n) based on the upper left position of the reference block.
- m x n can be 16 x 16.
- the search range can have a horizontal range from -8 to 8 based on the position of the initial motion information, and can have a vertical range from -8 to 8.
- the position indicated by the initial motion information can be expressed in the form of horizontal and vertical coordinates as (x, y).
- the horizontal coordinate of the search range can range from x-8 to x+8, and the vertical coordinate can range from y-8 to y+8.
- the search range can be set differently depending on the characteristics of the video.
- Information about the size of the search region can be included in the SPS, PPS, picture/tile/slice header, etc. of the bitstream.
- the decoder can parse the information about the search region from the bitstream to check the size of the search region and set the search region.
- the search region can be set based on at least one of the size of the current block, the width or height of the current block, AMVR information about the current block, and information about whether OBMC or MHP is applied to the current block.
- the search region can be set to 20x20.
- the AMVR of the current block is greater than an integer pixel unit of 1, the search region can be set to 20x20. If the AMVR of the current block is equal to or less than an integer pixel unit of 1, the search region can be set to 16x16.
- the decoder can construct a left template of the current block and an upper template of the current block using blocks adjacent to the current block. Additionally, the decoder configures a left template of the reference block and an upper template of the reference block based on the position of the reference block set in the reference picture. At this time, the sizes of the left template of the current block and the left template of the reference block may be the same, and the sizes of the upper template of the current block and the upper template of the reference block may be the same.
- FIG. 55 illustrates the location of a motion candidate searched within a search area according to one embodiment of the present specification.
- the position of a motion candidate searched within a search area for the TM method can be set based on the position for the initial motion information (the center point of Fig. 55).
- the position at which the motion candidate is searched can vary depending on the search pattern.
- the search pattern can include a DIAMOND pattern, a CROSS pattern, etc.
- ⁇ can indicate the position at which the motion candidate is searched according to the DIAMOND pattern
- + can indicate the position at which the motion candidate is searched according to the CROSS pattern.
- the interval of the search pattern (or search interval) can be set based on at least one of the size of the current block, whether the current block is a luminance component block or a chrominance component block, the resolution of the motion information of the current block, the degree of difference in the POC value between the current block and the reference block, and the motion characteristics of the surrounding blocks of the current block. That is, the interval of the search pattern can be set so that the interval becomes wider, narrower, or equal as the interval gets farther from the initial motion information. For example, if the size of the current block is larger than any predetermined value, the current block is likely to be a block for the motion of the background or a large object, and thus the interval of the search pattern can be set to become wider as it gets farther away from the initial motion information.
- the predetermined value can be a case where the block size is 32x32.
- the size of the current block is smaller than any predetermined value, the current block is likely to be a block for the motion corresponding to the object boundary, and thus the interval of the search pattern can be set to become narrower as it gets farther away from the initial motion information to search for various motions.
- Information about the interval of the search pattern can be included in any one of the SPS, PPS, picture header, and slice header of the bitstream.
- the decoder can set the pattern interval of the current block by parsing the information about the interval of the search pattern.
- Figure 56 illustrates a process for searching for the location of a motion candidate according to one embodiment of the present specification.
- Fig. 56 is a flowchart illustrating a search execution process for a position where a motion candidate for the TM method is searched.
- the decoder can obtain (calculate) a pixel-based cost value for initial motion information. If the number of iterations of the search execution is '0', the decoder can terminate without performing the TM method. Otherwise (i.e., if the number of iterations of the search execution is not '0'), the decoder can perform the TM method. At this time, the number of iterations can be any integer value greater than or equal to 1.
- the initial search process can be performed recursively and repeatedly.
- the motion candidate corrected in the current search step can be input as the initial motion information for the next search step.
- the search pattern, search interval, and number of iterations in each step can vary depending on the motion resolution of the current block. For example, in the first search step, the number of iterations can be set to '375', the initial search pattern can be set to 'DIAMOND', and the initial search interval can be set to '6' if the motion resolution is an integer pixel unit of 4, or '4' if the motion resolution is not an integer pixel unit of 4.
- the number of iterations can be set to '1'
- the search pattern can be set to 'CROSS'
- the search interval can be set to '6' if the motion resolution is an integer pixel unit of 4, or '4' if the motion resolution is not an integer pixel unit of 4.
- the number of repetitions is set to '1'
- the search pattern is set to 'cross'
- the search interval can be set to '5' if the motion resolution is an integer pixel unit of 4, or '3' if the motion resolution is not an integer pixel unit of 4.
- the number of repetitions is set to '1'
- the search pattern is set to 'cross'
- the search interval can be set to '4' if the motion resolution is an integer pixel unit of 4, or '2' if the motion resolution is not an integer pixel unit of 4.
- the number of repetitions is set to '1'
- the search pattern is set to 'cross'
- the search interval can be set to '3' if the motion resolution is an integer pixel unit of 4, or '1' if the motion resolution is not an integer pixel unit of 4.
- Whether or not to perform the search process corresponding to each step can be determined based on the motion resolution of the current block.
- the motion resolution of the current block is an integer pixel unit of 4 or an integer pixel unit of 1, only the first and second search processes may be performed, and the third, fourth, and fifth search processes may not be performed.
- the motion resolution of the current block is a pixel unit of 1/2, only the first, second, and third search processes may be performed, and the fourth and fifth search processes may not be performed.
- the motion resolution of the current block is a pixel unit of 1/4, only the first, second, third, and fourth search processes may be performed, and the fifth search process may not be performed.
- the number of iterations, the initial search pattern, and the initial search interval can be determined before the process illustrated in FIG. 56 is performed.
- the search pattern and search interval can be reset.
- the search pattern and search interval can be determined based on at least one of the following information: the size of the current block, whether the current block is a luminance component block or a chrominance component block, the current motion resolution, the number of iterations, the distribution of cost values for motion candidate positions calculated in the previous iteration step, and whether OBMC or MHP is applied to the current block.
- the following describes a method for setting the search pattern and search interval.
- the search interval can be determined based on the motion information resolution of the current block.
- the motion information resolution can be an integer pixel of 1, an integer pixel of 4, a half pixel, a quarter pixel, or a sixteenth pixel.
- the initial search interval can be set to 6, and in other cases, the initial search interval can be set to 4.
- the search pattern can be determined as a diamond pattern or a cross pattern.
- the search interval can be adjusted by decreasing or increasing the initial search interval by an arbitrary amount.
- the search pattern and the search interval can vary depending on the iteration step.
- the iteration step can indicate the number of times the search pattern and the search interval are reset if the number of iterations is not 0.
- the search pattern and the search interval can vary depending on the iteration step.
- the search pattern and the search interval can be evaluated based on the diamond search pattern and the initial search interval.
- new candidate positions can be selected based on the optimal motion candidate found in the first step using the cross pattern and the initial search interval. Then, the new candidate positions can be evaluated.
- new candidate positions can be selected based on the optimal motion candidate found in the previous step using the cross pattern and the search interval decreased by 1 from the initial search interval. Then, the new candidate positions can be evaluated.
- new candidate locations can be selected using a cross pattern and a search interval reduced by 1 from the previous step, based on the optimal motion candidate found in the previous step, and evaluation of the new candidate locations can be performed.
- the search pattern and search interval can be set according to the motion resolution of the current block.
- the number of iterations and the size of the template can also be set according to the motion resolution of the current block. For example, if the motion resolution is not 1/4 pixel unit, the number of iterations can be set to a value greater than 2. That is, if the motion resolution of the current block is high (motion is not precise), the search process can be performed additionally, and the motion information can be corrected. If the motion resolution is 1/4 pixel unit, the search pattern can be set to a diamond pattern to find accurate motion.
- the search pattern and search interval can be set according to the color component of the current block.
- the search pattern and search interval for the chrominance component can be set wider than those for the luminance component. This is because the chrominance component (signal) has a high spatial correlation with the luminance component (signal).
- the search pattern and search interval for the chrominance component can be set shorter than those for the luminance component.
- the search pattern and search interval can be set based on the size of the current block. If the size of the current block is equal to or greater than a predetermined value, the search pattern may be a cross pattern and the search interval may be set wider than the initial search interval. For example, the search interval may be '7'. Alternatively, to improve performance, if the size of the current block is greater than a predetermined number, the search pattern may be a diamond pattern and the search interval may be set shorter than the initial search interval. For example, the search interval may be '5'. The size of the current block may be 16 x 16 or 32 x 32, and the search pattern and search interval may be set based on the sum of the width and height of the current block.
- the size of the template may be set based on the size of the current block. If the size of the current block is equal to or greater than a predetermined value, the size of the template may be set to a predetermined size. If the size of the current block is equal to or greater than a predetermined value, the size of the template may be set smaller than the existing size.
- the decoder can set a correction value (offset) for the position of the motion candidate being searched using the search pattern and the search interval, and perform an evaluation on the motion candidates being searched.
- Evaluation in this specification may mean obtaining a cost value.
- the position at which the motion candidate is searched may vary depending on the search pattern. For example, if the search pattern is a cross pattern, the correction values are (0, 1), (1, 0), (0, -1), (-1, 0), and if the search pattern is a diamond pattern, the correction values are (0, 2), (1, 1), (2, 0), (1, -1), (0, -2), (-1, -1), (-2, 0), (-1, 1).
- the correction value (x, y) may be (horizontal, vertical), where x is a correction value for the horizontal direction and y is a correction value for the vertical direction.
- the method for setting the search area described above can be performed recursively for any number of iterations. For example, if the number of iterations is 1, it can be performed more than once. If the decoder searches for motion candidates and evaluates all of them, the motion information of the motion candidate corresponding to the lowest cost value can be used as the final motion information.
- the initial motion candidate of Fig. 56 can be reset based on the smallest cost value in the previous iteration.
- the initial motion candidate of the next iteration can be reset based on the motion candidate corresponding to the smallest cost value in the first iteration. For example, if the motion candidate corresponding to the smallest cost value in the first iteration is the motion candidate located in the upper left, the decoder can evaluate the motion candidate adjacent to the motion candidate located in the upper left in the next iteration.
- the search execution process described with reference to FIG. 56 may proceed differently.
- an L0 motion candidate list for L0 prediction of the current block and an L1 motion candidate list for L1 prediction can be derived.
- a search process can be performed on some or all of the motion candidates in the derived candidate list to derive corrected motion information.
- a single motion candidate list for L0 and L1 prediction of the current block can be derived.
- a search process can be performed on some or all of the motion candidates in the derived single motion candidate list.
- L0 described herein can mean L0 prediction
- L1 can mean L1 prediction.
- L0 unidirectional prediction, L1 unidirectional prediction, or bidirectional prediction can be applied to the current block. Whether L0 unidirectional prediction, L1 unidirectional prediction, or bidirectional prediction is applied to the current block can be indicated by reference direction indication information.
- the reference direction indication information can be reset based on a cost value.
- the motion information and reference direction indication information corresponding to the smallest cost value among the cost value of a prediction block generated using the initial motion information of L0, the cost value of a prediction block generated using the initial motion information of L1, the cost value of a prediction block generated by performing bidirectional prediction using the initial motion information of L0 and L1 and then performing a weighted average of two prediction blocks, the cost value of a prediction block generated using the corrected motion information of L0, the cost value of a prediction block generated by performing bidirectional prediction using the corrected motion information of L1, and the cost value of a prediction block generated by performing a weighted average of two prediction blocks using the corrected motion of L0 and L1 can be reset to the current block.
- the L0 and L1 motion information candidate lists can be derived independently. Scaled L0 motion information can be included in the L1 motion information candidate list. If the reference pictures for L0 and L1 motion information are different and are reference pictures in different directions relative to the current picture to be encoded, linearity can exist between the L0 and L1 motion information. L1 motion information can be predicted based on the distance between the L0 motion information and the reference picture. L1 motion information (scaled L0 motion information) predicted using L0 motion information can be included in the L1 motion candidate list.
- the search process using TM can be applied independently to L0 and L1 motion candidates.
- the corrected motion information candidates found in L0 can be used to correct the L1 motion information candidates.
- L1 motion information can be predicted based on the distance between the corrected motion candidate found in L0 and the reference picture, and the predicted L1 motion information can be included in the L1 motion candidate list.
- the current coding block can be divided into multiple sub-blocks.
- the initial motion information of each sub-block can be reset to the corrected motion information according to the search process.
- the template can be different for each sub-block, and the pixels of the adjacent sub-block can be used as the template.
- the decoder can search for the next sub-block only when the adjacent sub-block is restored, there is a problem that the search process is not processed in parallel for each sub-block. To this end, the search process can be performed only for sub-blocks located at the boundary of the current block.
- the decoder can derive the corrected motion information using the TM method for sub-blocks located at the boundary of the current block, and can derive the corrected motion information for sub-blocks not located at the boundary of the current block using one or more of the BM, the Optical flow-based TM, and the Multi-pass DMVR method.
- the decoder can calculate a cost value for the entire current block using the initial motion information for L0 and L1, and derive corrected motion information based on the calculated cost value.
- the motion of a portion of the lower right corner within the block processed as a coding block may be slightly different from the overall motion of the coding block.
- the search process may vary, and the corrected motion information may also vary. Therefore, even if the current block is processed as a coding block, the corrected motion information can be derived for each subblock based on the cost value for a template structured based on subblocks.
- Figure 57 illustrates a process for evaluating search candidates according to one embodiment of the present specification.
- Figure 57 is a flowchart illustrating the process of evaluating search candidates using correction values for candidate positions selected according to the search pattern and search interval described with reference to Figure 56.
- the decoder can store initial motion information as final motion information. Furthermore, the decoder can perform the process described below on the correction values for all search candidates.
- the decoder can select one of the correction values for the candidate position to be searched.
- the correction value can be reset to be suitable for the motion resolution to be used in the current block.
- the decoder can reconstruct the motion information to be evaluated by adding the reset correction value to the initial motion information.
- a cost value can be obtained based on the reconstructed motion information.
- the cost value obtained based on the motion information can be calculated by adding the difference value of the absolute values of the horizontal components between the initial motion information and the reconstructed motion information and the difference value of the absolute values of the vertical components, and then multiplying the result by an arbitrary weight value.
- the arbitrary weight value can be '4'.
- the decoder can calculate the pixel-based cost value for the reconstructed motion information only when the cost value obtained based on the motion information is smaller than the cost value of the initial motion information obtained based on the pixel.
- the decoder After evaluating the compensation values for all search candidates, the decoder can set the motion information corresponding to the smallest cost value as the final motion information.
- Template-based motion compensation methods can have varying motion compensation performance depending on how similar the motion of the template is to the motion of the current block.
- the motion characteristics of the template and the current block may differ, and motion compensated using a template with different characteristics may perform effectively under the template but not effectively under the current block.
- the pixel-based cost value for the initial motion information can be recalculated and used for comparison with search candidates. This has the effect of increasing the importance of the initial motion information. That is, the pixel-based cost value for the initial motion information can be recalculated using at least one or more factors, such as the size of the current block and its quantization parameters.
- the pixel-based cost value for the initial motion information can be reset by calculating the size of the current block multiplied by an arbitrary weight. Comparisons between search candidates can be made based on the reset cost value.
- the arbitrary weight can be an integer greater than or equal to 1.
- the cost value obtained based on the motion information may vary depending on the size of the correction value. That is, the smaller the correction value, the smaller the cost value may be. Since the motion information corresponding to the smallest cost value is set as the final motion information, evaluation can only be performed on motion candidates surrounding the position indicated by the initial motion information with a small correction value. However, a motion candidate with a large correction value may be the optimal motion candidate. Therefore, in order to select the optimal motion candidate by evaluating various motion candidates, the cost value can be obtained using the method described below. The cost value can be obtained using the difference between the motion information values of each neighboring block, the quantization parameter, the size of the current block, etc.
- the decoder can obtain whether to apply a pixel-based cost value using the difference value between the corrected motion information and the motion information of neighboring blocks. For example, the decoder can compare the difference value between the corrected motion information and the motion information of neighboring blocks with an arbitrary predetermined value and determine whether to apply a pixel-based cost value based on the comparison result. Specifically, if the difference value between the corrected motion information and the motion information of neighboring blocks is greater than (or less than, or equal to) the arbitrary predetermined value, the decoder can obtain a pixel-based cost value.
- the neighboring block may be a neighboring block adjacent to the current block or a temporal neighboring block in the same (or corresponding) position as the current block in a collocated picture.
- the cost value can be obtained based on the size of the current block.
- the weight for obtaining the aforementioned cost value can be set according to the size of the current block.
- the weight can be set inversely proportional to the size of the current block. That is, the larger the current block size, the lower the weight can be set. This is to evaluate a wider range of motion candidates to select a suitable motion candidate.
- the weight can be set proportional to the size of the current block. That is, the larger the current block size, the higher the weight can be set. This is to reduce complexity.
- the size of the current block can be 16x16 or 32x32, and can be set as the sum of the width and height of the current block.
- the weight can be an integer value such as 1, 2, 3, 4, 5, or 6.
- the decoder may not perform an evaluation to obtain the cost value if the weight exceeds a certain value.
- FIGS. 58 and 59 illustrate a method of compensating motion information using DMVR according to one embodiment of the present disclosure.
- DMVR is a method of obtaining corrected motion information for the current block using the BM (Bilateral Matching) method.
- the BM (Bilateral Matching) method finds the most similar part between the surrounding search area of the L0 reference block and the surrounding search area of the L1 reference block in a block with bidirectional motion, corrects the initial motion information, and uses the corrected motion information to predict the current block.
- the size of the search area can be set to an arbitrary size (m x n) based on a specific point in the reference block.
- the specific point can be the upper left or center of the reference block, and the arbitrary size can be 16 x 16.
- the most similar part can be the point corresponding to the smallest cost value by calculating the cost value per pixel between each block.
- the cost value can be calculated using the SAD (Sum of Absolute Differences) or MRSAD (Mean-Removed SAD) method.
- Information regarding the method used to calculate the cost value may be included in at least one of the SPS, PPS, picture header, and slice header of the bitstream.
- the decoder can parse the information and calculate the cost value based on the configured method.
- the cost value may vary depending on the search area, and the corrected motion information may also vary.
- the decoder can divide the current block into multiple sub-blocks and correct the motion information for each sub-block using DMVR. This is because the motion information for smaller blocks is more accurate than that for larger blocks.
- DMVR may not be performed on the larger block, but only on the smaller blocks (e.g., sub-blocks) into which it is divided.
- a single block may be divided into multiple (e.g., four) sub-blocks.
- the decoder can obtain corrected motion information for each of the divided sub-blocks using DMVR.
- the decoder can use a multi-DMVR method that derives more accurate motion information through DMVR from the smaller blocks into which it is divided using the corrected motion information found through DMVR in the larger block.
- Figure 60(a) shows a general process in which multiple DMVR is performed
- Figure 60(b) shows the general process of multiple DMVR in more detail.
- a multi-DMVR can obtain one or more corrected motion information by performing DMVR of a coding unit (block) unit based on initial motion information (S6010). If TM is applied to the current coding block, the decoder can perform TM using one or more corrected motion information obtained in step S6010 (S6020). If the corrected motion information of the current coding block determined by performing TM has changed from bidirectional to unidirectional, the DMVR process cannot be performed, so steps (S6030, S6040) after S6020 are not performed, and the motion of the current block is finally determined to be unidirectional.
- the decoder can obtain corrected motion information of a sub-block unit for each sub-block by performing DMVR of a sub-block unit (S6030). And the decoder can re-correct the sub-block unit corrected motion information obtained in step S6040 based on BDOF, and finally obtain the corrected motion information based on BDOF.
- step S6010 of FIG. 60(a) can be subdivided into a step (S6001) of performing DMVR in units of coding units (blocks) using an integer-unit search and a step (S6002) of performing DMVR in units of coding units (blocks) using a half-pixel-unit search.
- the decoder can use a 3x3 Square search to calculate corrected motion information and a pixel-based cost value of the current coding unit (block).
- the motion resolution can be set in units of integers in step S6001 and in units of half-pixels (1/2) in step S6002.
- the decoder can obtain corrected motion information using initial motion information and integer-unit correction values.
- step S6030 of Fig. 60(a) is described in detail.
- the decoder divides the current coding block into multiple sub-blocks, and then steps S6004 and S6005 of FIG. 60(b) may be performed for each sub-block.
- the size of the sub-block may be up to 16 x 16.
- the decoder can set the corrected motion information acquired in step S6020 as the initial motion information for steps S6004 and S6005.
- the decoder can perform a global search in integer units using the initial motion information and obtain optimal motion information for the current sub-block and a cost value for the optimal motion information (S6004).
- the decoder can perform a 3x3 Square search in half-pixel (1/2) units.
- the motion information acquired through step S6004 can be used as the reference motion information for step S6005. That is, a new motion candidate is acquired based on the information acquired through step S6004, and the decoder can evaluate the new motion candidate (S6005).
- the decoder can evaluate the new motion candidate and store the final motion information for the current sub-block.
- Steps S6004 and S6005 can be repeatedly performed for all sub-blocks.
- the DMVR process at the sub-block level has the advantage that all sub-blocks can perform DMVR in parallel because there is no dependency between sub-blocks.
- Figure 61 illustrates a temporal hierarchy according to one embodiment of the present specification.
- a video signal processing device For ultra-low latency media services such as cloud gaming services, video calls, and real-time broadcasting, a video signal processing device with low complexity may be required.
- the template-based coding technique described above increases encoding efficiency, but because it uses existing reconstructed samples, there is dependency between neighboring blocks, resulting in low processing speed and high computational complexity.
- the video signal processing device can set the optimal point between processing speed and complexity by setting whether to activate the coding technique at the SPS, PPS, frame, picture, slice, and tile level. For example, the video signal processing device can set whether to activate a specific coding technique at the picture level by parsing a syntax element (e.g., ph_A_tool_enable_flag) related to a specific coding technique included in the bitstream.
- a syntax element e.g., ph_A_tool_enable_flag
- the specific coding technique may be a template-based coding technique, and may be one of the following technologies: DIMD, TIMD, Intra TMP, TMRL, EIP, PNN, PDP, SGPM, IBC, TM, TM OBMC, LIC, CCCM, and GPM.
- the video signal processing device may group multiple coding techniques and set whether to activate the techniques within the group on a picture-by-picture basis. At this time, whether to activate the techniques within the group may be determined based on the parsing result of a syntax element (e.g., ph_groupA_enable_flag) related to the group included in the bitstream.
- a syntax element e.g., ph_groupA_enable_flag
- the group may include one or more of techniques such as DIMD, TIMD, Intra TMP, TMRL, EIP, PNN, PDP, and SGPM.
- the video signal processing device may set whether to activate techniques using template costs on a picture-by-picture basis. At this time, whether to activate techniques using template costs may be determined based on the parsing result of a syntax element (e.g., ph_template_enable_flag) included in the bitstream.
- the technique using template costs is a technique that applies a method of calculating template costs using surrounding samples of the current block, and may include, for example, one or more of techniques such as TIMD, Intra TMP, TMRL, SGPM, TM, and TM OBMC.
- the video signal processing device can set whether to enable technologies requiring a large amount of memory access on a picture-by-picture basis. At this time, whether to enable technologies requiring a large amount of memory access can be determined based on the parsing result of a syntax element (e.g., ph_large_memory_access_enable_flag) included in the bitstream.
- a syntax element e.g., ph_large_memory_access_enable_flag
- the technologies requiring a large amount of memory access can include one or more technologies such as MTS, LFNST, NSPT, PDP, NNIP, and ALF.
- the video signal processing device can determine whether to activate a coding technique based on at least one of the type information of the picture, the type information of the NAL unit, the temporal layer information, the quantization parameter, whether the current AU is used as a reference picture, and the profile information.
- the type information of the picture may mean intra-picture or inter-picture.
- the video signal processing device may deactivate the coding technique A in the inter-picture. Conversely, the video signal processing device may activate the coding technique A in the inter-picture.
- the NAL unit type information may be IDR, CRA, etc.
- the video signal processing device may deactivate the coding technique A in the IDR. Conversely, the video signal processing device may activate the coding technique A in the IDR.
- the temporal layer information may mean temporal resolution information that varies according to the temporal layer in an inter-picture reference structure that supports temporal scalability, as illustrated in FIG. 61.
- the temporal resolution information may be information on how many pictures are output to the screen per second. For example, if 15 pictures are output to the screen per second, it can mean a temporal resolution of 15 frames per second. A temporal resolution of 30 frames per second can be interpreted as having a higher meaning than a temporal resolution of 15 frames per second.
- Temporal layer 0 means a temporal resolution of 15 frames per second
- Temporal layer 1 when both Temporal layer 0 and Temporal layer 1 are used, it can mean a temporal resolution of 30 frames per second. I in Fig.
- a video signal processing device can determine whether to activate coding technique A based on the value of a temporal layer.
- the video signal processing device can determine whether to activate coding technique A based on the value of a quantization parameter.
- the video signal processing device can determine whether to activate coding technique A based on whether the current AU is used as a reference picture.
- the video signal processing device can define and set whether to activate coding technique A in a profile, and the decoder can set whether to activate coding technique A based on profile information in a bitstream.
- a profile may mean an environment configuration or a group of technologies that are set so that only specific technologies can be used according to a usage area.
- the video signal processing device can determine whether to activate a group of technologies, a technology using a template cost, or a technology with many memory accesses based on at least one of picture type information, NAL unit type information, temporal layer information, quantization parameter, whether the current AU is used as a reference picture, and profile information. For example, a video signal processing device can define in a profile whether to enable or disable a technology that requires a lot of memory access, and a decoder can set whether to enable or disable a technology that requires a lot of memory access based on profile information in the bitstream.
- FIG. 62 illustrates a method for performing OBMC on a CU basis according to one embodiment of the present specification.
- the video signal processing device can perform OBMC on the A0 block, which is the upper left block of the current block (Case 1). If the motion information of the A0 block and the motion information of the Ne-A0 block, which is the upper block adjacent to the A0 block, are different from each other, the video signal processing device can perform OBMC on the A0 block. At this time, in order to perform OBMC, the video signal processing device can obtain a first prediction block (ref A0) from reference picture 0 using the motion information of the A0 block, and can obtain a second prediction block from reference picture 0 by projecting the motion information of the Ne-A0 block to the position of the A0 block.
- a first prediction block (ref A0) from reference picture 0 using the motion information of the A0 block
- the video signal processing device can obtain a final prediction block for the A0 block by performing a weighted average of the first prediction block and the second prediction block based on preset weights.
- the video signal processing device can perform OBMC on the L2 block, which is the left block of the current block (Case 2).
- the video signal processing device may perform on-screen mouse-modulation (OBMC) on the L2 block when the motion information of the L2 block and the motion information of the Ne-L2 block, which is a left block adjacent to the L2 block, are different from each other.
- OBMC on-screen mouse-modulation
- the video signal processing device may obtain a first prediction block (ref L2) from a reference picture 0 using the motion information of the L2 block to perform the OBMC, and may obtain a second prediction block of the Ne-L2 from a reference picture 1 by projecting the motion information of the Ne-L2 to the position of the L2 block.
- the video signal processing device may obtain a final prediction block for the L2 block by performing a weighted average of the first prediction block and the second prediction block based on preset weights.
- the preset weights may be defined in the form of a table.
- the reference pictures between the current block and the neighboring blocks may be the same as in case 1, or may be different as in case 2.
- the video signal processing device cannot use the surrounding samples adjacent to the current block, and therefore may not apply methods such as TM OBMC, LIC, and ARMC using the surrounding samples to the current block.
- the video signal processing device can determine whether to apply OBMC to the current block or the OBMC mode by using at least one or more of the motion information of the neighboring block or the current block, whether to apply LIC to the neighboring block or the current block, the distance between the reference picture for the motion information of the neighboring block and the current picture, the distance between the reference picture for the motion information of the current block and the current picture, whether to apply OBMC to the neighboring block, whether to apply MHP to the neighboring block or the current block, and the residual signal of the neighboring block or the current block.
- the video signal processing device can calculate a cost as a difference between a block predicted by the motion information of the neighboring block and a block predicted by the motion information of the current block, and determine whether to apply OBMC to the current block or the OBMC mode by comparing the calculated cost with a predetermined value.
- the predefined value may be determined based on at least one of the width and height of the current block, the number of samples of the current block, the distance between the reference picture for the motion information of the neighboring block and the current picture, the distance between the reference picture for the motion information of the current block and the current picture, whether OBMC is applied to the neighboring block, whether MHP is applied to the neighboring block or the current block, and the residual signal of the neighboring block or the current block.
- the predefined value may be a value obtained by multiplying the number of samples of the current block by a specific value.
- the specific value may be an integer greater than or equal to 1.
- the encoder may explicitly signal whether OBMC is applied and the OBMC mode information.
- the decoder may parse the OBMC application and OBMC mode information to set whether OBMC is applied to the current block and the OBMC mode.
- Figure 63 illustrates bidirectional motion information according to one embodiment of the present specification.
- the video signal processing device can determine whether to apply LIC to the current block or an LIC model parameter by using at least one or more of the motion information of the surrounding block or the current block, whether to apply OBMC to the surrounding block or the current block, the distance between the reference picture for the motion information of the surrounding block and the current picture, the distance between the reference picture for the motion information of the current block and the current picture, whether to apply LIC to the surrounding block, whether to apply MHP to the surrounding block or the current block, and the residual signal of the surrounding block or the current block.
- the video signal processing device can calculate the difference between blocks predicted based on the motion vectors as the SAD cost and the MRSAD cost.
- the video signal processing device can determine whether to apply LIC to the current block based on the result of comparing the SAD cost and the MRSAD cost. Referring to FIG. 63, the video signal processing device can derive LIC model parameters for the current block using an L0 reference block and an L1 reference block.
- the video signal processing device can derive a first LIC model parameter from the L1 reference block to the L0 reference block, derive a second LIC model parameter from the L0 reference block to the L1 reference block, and then generate a final prediction block through a weighted average between the L0 reference block and the L1 reference block corrected using the first LIC model parameter and the second LIC model parameter.
- the encoder can include information on whether to apply LIC and the LIC model parameter in the bitstream and explicitly signal it.
- the decoder can set whether to apply LIC and the LIC model parameters to the current block by parsing information about whether LIC is applied and the LIC model parameters.
- the information about the LIC model parameters may be information consisting only of the differences between the predicted values of the LIC model parameters.
- the video signal processing device can perform the above-described process after converting the motion information of the current block into a bidirectional or bi-predicted motion vector.
- the difference between the reference blocks may be the absolute value of the difference.
- FIG. 64 illustrates a method for changing unidirectional motion information into bidirectional or bi-predictive motion information according to one embodiment of the present specification.
- a video signal processing device can obtain a second motion vector (Scaled MV) that indicates a second reference picture other than the first reference picture referred to by the first motion vector based on a first motion vector (MV) of a current block.
- the second motion vector can be derived based on a first POC distance (k) between the current picture and the first reference picture, a second POC distance (l) between the current picture and the second reference picture, and the first motion vector.
- the second motion vector (Scaled MV) can be MV * l / k.
- the video signal processing device can correct the second motion vector (Scaled MV) using the first reference block indicated by the first motion vector (MV) and obtain a corrected motion vector (New MV).
- a video signal processing device can obtain a second motion vector (reverse MV) that indicates a second reference picture in the opposite direction to the first reference picture referred to by the first motion vector, based on a first motion vector (MV) of a current block.
- the second motion vector can be derived based on a first POC distance (k) between the current picture and the first reference picture, a second POC distance (l) between the current picture and the second reference picture, and the first motion vector.
- the video signal processing device can correct the second motion vector (reverse MV) using the first reference block indicated by the first motion vector (MV), and obtain a corrected motion vector (New MV).
- a video signal processing device can add a motion candidate to a motion candidate list using the bidirectional motion conversion method described through FIGS. 64(a) and (b).
- the video signal processing device can configure bidirectional (or bi-predictive) motion information using motion information present in the motion candidate list, and then add the bidirectional (or bi-predictive) motion information to the motion candidate list.
- the motion information present in the existing motion candidate list is bidirectional motion information
- the video signal processing device can separate the bidirectional motion information into L0 motion information and L1 motion information, and then convert each unidirectional motion information into bidirectional motion information or bi-predictive motion information to configure two motion candidates, and add the two converted motion candidates to the motion candidate list.
- the motion candidate list can be reordered based on cost, and at this time, the cost can be calculated as a template cost or a cost using the difference between the reference blocks.
- the method of utilizing the difference between reference blocks indicated by the motion information described in this specification can be used when rearranging various candidate lists such as an MVD code candidate list, a motion shift candidate list, and a block-based reference picture candidate list.
- the method of predicting the code for the MVD is such that the MVD code candidate list is constructed based on the absolute value of the MVD, the MVD code candidate list can be rearranged based on the cost, and the optimal code candidate is used as the prediction value.
- the video signal processing device can rearrange the MVD code candidate list (or MVD candidate list, MMVD candidate list) based on the cost of the difference between the reference blocks indicated by the MVD code candidates.
- the MVD candidate list is a candidate list for the motion vector difference value
- the MMVD candidate list is a candidate list for the motion vector difference value in the merge mode.
- the motion shift candidate list can be used to find a block most similar to the current block in the corresponding reference picture when deriving temporal motion information from the corresponding reference picture.
- a video signal processing device can derive motion information from surrounding blocks of a current block and then construct a motion shift candidate list using the motion information. When rearranging the motion shift candidate list, the video signal processing device can rearrange the motion shift candidate list based on the cost of the difference between the reference blocks indicated by the motion shift candidates.
- the video signal processing device can calculate the cost after changing the unidirectional motion information into bidirectional or bi-predictive motion information.
- a block-level reference picture candidate list is used to find an optimal reference picture for the motion information of the current block, and the block-level reference picture candidate list may be an integrated list in which reference picture candidates are integrated into an MVD code candidate list. Alternatively, the block-level reference picture candidate list may be an integrated list in which code candidates or reference picture candidates are integrated into an MVD candidate list.
- the video signal processing device rearranges the integrated list, the video signal processing device can rearrange the integrated list based on the cost of the difference between the reference blocks indicated by the motion candidates.
- the video signal processing device may use the method of reordering the integrated list described above when reordering the motion candidate list.
- the video signal processing device may reorder the motion candidate list based on the cost of the difference between the reference blocks indicated by the motion candidates.
- FIGS. 65 and 66 illustrate a method of using only some samples in the process of calculating a cost for a difference between reference blocks according to one embodiment of the present disclosure.
- the method of calculating the difference between reference blocks is complex because it requires calculation for each sample.
- the method of calculating the difference between reference blocks may slow down the processing speed because it must process on a sample basis only when the horizontal size of the reference block is not a SIMD (Single Instruction Multiple Data) processing unit.
- the method of calculating the difference between reference blocks may slow down the processing speed because it requires a lot of memory access to process the next row (or line) when the vertical size of the reference block is long. Therefore, when calculating the cost, the video signal processing device can set the cost calculation area according to the SIMD processing unit.
- the SIMD processing unit can be 4, 8, 16, 32, or 64 samples in units of the number of samples, and can be a multiple of 16, etc.
- the video signal processing device can set the cost calculation area to a hatched area within a reference block, and the cost calculation area can be aligned to the SIMD processing unit.
- the cost calculation area can be smaller than the horizontal length of the current block.
- the cost calculation area can be equal to or greater than the horizontal length of the current block.
- the cost calculation area can only use pre-designated rows within the current block.
- the upper and lower portions can be cost calculation areas, as shown in FIGS. 65(a) and (b).
- the encoder can signal information about the pre-designated rows by including them in the bitstream, and the decoder can set the pre-designated rows by parsing the information about the pre-designated rows.
- the method for setting the cost calculation area can be used to calculate the cost between reference blocks in the process of compensating motion information in Bilateral Matching, as shown in FIG. 66.
- the video signal processing device when the video signal processing device calculates the template cost, the video signal processing device can set the template cost calculation area by adjusting the upper template to fit the SIMD processing unit, and the left template can calculate the template cost using only the upper and lower parts.
- Matrix-based intra prediction methods, transform kernels, and neural network methods utilize data learned from massive images, and the learned data can be expressed as weight parameters (or matrices).
- the video signal processing device must apply the weight parameters identically. Since the characteristics of the image can vary, such as images captured by a camera, screen contents, and game images, the weight parameters can vary depending on the image characteristics.
- the encoder can signal instructions for weight parameters that suit the image characteristics at the SPS, PPS, APS, SEI, picture, subpicture, slice, tile, and block level, and the decoder can parse the instructions for the weight parameters and load and use the weight parameters from memory according to the image characteristics.
- the weight parameters can be used when predicting, transforming, and filtering the current block.
- the efficiency of weight parameters may vary depending on the image being learned.
- the encoder can signal information about the weight parameter values.
- the decoder can parse the information about the weight parameter values, change the current weight parameter values, and use the changed weight parameter values when predicting, transforming, and filtering the current block.
- Information about the weight parameter values can be signaled or parsed in units of SPS, PPS, APS, SEI, picture, subpicture, slice, tile, and block.
- the decoder can perform a filtering process using the weight parameters before outputting the reconstructed picture, and output the filtered reconstructed picture.
- the video signal processing device may not use the filtered reconstructed picture as a reference picture for decoding the next picture.
- the video signal processing device can use the reconstructed picture before filtering using the weight parameters signaled through the SEI message is performed as a reference picture for decoding the next picture.
- the DIMD mode is a method of applying a Sobel filter to surrounding samples of a current block, converting the filtered values into directional information, converting the directional information into an intra prediction mode, and then deriving an intra prediction mode from a histogram for the intra prediction mode. If there is no directionality in the filtered values, the directionality may not be accumulated in the histogram. Therefore, the intra prediction mode derived by the DIMD mode may be an intra prediction mode with directionality other than a planar mode or a DC mode. If the surrounding samples are smooth, the frequency value of the histogram may be small, and such a histogram may not be suitable for deriving an intra prediction mode.
- the video signal processing device may derive the DIMD mode based on at least one of the number of samples of the current block, the horizontal and vertical sizes of the current block, the number of surrounding samples used to derive the DIMD mode, and the sum of the frequency values in the histogram.
- the video signal processing device may use at least one of a predetermined number of intra prediction modes in descending order of frequency values in the histogram and the frequency values of the predetermined number of intra prediction modes to induce the DIMD mode.
- the video signal processing device may induce the intra prediction mode by comparing the sum of the frequency values of the histogram with a specific value.
- the specific value may be a value obtained by adding the product of the number of samples of the current block and the horizontal size of the current block and dividing the result by a predetermined value. If the frequency value of the histogram is less than the specific value, the intra prediction mode of the current block may be derived as the predetermined intra prediction mode.
- the predetermined value may be an integer greater than or equal to 1, and may be 8. If the number of intra prediction modes in which the frequency value exists in the histogram derived through the DIMD mode is greater than the predetermined value, the video signal processing device may set the intra prediction mode of the current block to the predetermined intra prediction mode because there may be more directionality of the surrounding samples.
- the predetermined value may be an integer greater than or equal to 1, and may be 34.
- the above-described intra prediction mode may be one of a planar mode, a DC mode, a horizontal mode, a vertical mode, a diagonal mode, and an intra prediction mode other than the planar mode.
- an intra prediction mode of the current block is required. If the current block is an encoding mode without an intra prediction mode, the video signal processing device can apply DIMD to the current prediction block to derive a predetermined number of intra prediction modes, and then derive a set of transform kernels using the intra prediction modes. If the current prediction block is smooth, the DIMD method may not be suitable for deriving an intra prediction mode.
- the video signal processing device can derive a predetermined number of DIMD modes using at least one of the number of samples of the current block, the width and height of the current block, the number of surrounding samples used to derive the DIMD mode, the sum of the frequency values in the histogram, and the predetermined number of intra prediction modes and the predetermined number of frequency values in descending order of the frequency values in the histogram.
- the predetermined number may be an integer greater than or equal to 1, and may be 2.
- the video signal processing device can derive the intra prediction mode by comparing the sum of the frequency values in the histogram with a specific value.
- the specific value may be a value obtained by adding the product of the number of samples of the current block and the horizontal size of the current block and the vertical size of the current block, and dividing the result by a predetermined value. If the frequency value of the histogram is less than the predetermined value, the first intra prediction mode of the current block may be induced as the planar mode, and the second intra prediction mode may be induced as the DC mode.
- the predetermined value may be an integer greater than or equal to 1, and may be 8.
- the video signal processing device may derive two intra prediction modes in the order of the highest frequency value in the histogram, and if the absolute value of the difference between the two intra prediction modes is less than the predetermined first value and the absolute value of the difference between the frequency values of the two intra prediction modes is less than the predetermined value, the first intra prediction mode of the current block may be derived as the intra prediction mode having the highest frequency value in the histogram, and the second intra prediction mode may be derived as the predetermined intra prediction mode.
- the specific value may be a value obtained by dividing the number of samples of the current block by the predetermined second value.
- the first value may be an integer greater than or equal to 1, and may be 3
- the second value may be an integer greater than or equal to 1, and may be 4
- the predetermined value may be an integer greater than or equal to 1, and may be 8. If the number of intra prediction modes in which frequency values exist in a histogram derived through the DIMD mode is greater than a predetermined value, the video signal processing device may set the intra prediction mode for deriving a set of transform kernels of the current block to a predetermined intra prediction mode, since there may be many directions of surrounding samples.
- the predetermined value may be an integer greater than or equal to 1, and may be 34.
- the predetermined intra prediction mode may be one of a planar mode, a DC mode, a horizontal mode, a vertical mode, a diagonal mode, and other intra prediction modes, and may be a planar mode.
- FIG. 67 is a flowchart illustrating a video signal processing method according to one embodiment of the present specification.
- FIG. 67 a method for predicting a current block (generating a prediction block for the current block) based on an intra prediction mode through FIGS. 1 to 66 is described.
- a video signal decoding device (decoder) can predict a first block based on a first prediction mode (S6701).
- the first block and the second block can be predicted in parallel.
- the first block and the second block may be blocks within a template prediction region. If at least one of the first surrounding samples adjacent to the first block does not exist within the template prediction region, the first prediction mode may be a template-based prediction mode. If all of the first surrounding samples exist within the template prediction region, the first prediction mode may be a mode other than a template-based prediction mode.
- the second prediction mode may be a prediction mode based on the template. If all of the second surrounding samples exist within the template prediction region, the second prediction mode may be a mode other than a prediction mode based on the template.
- the above template prediction region can be determined by a syntax element included in the bitstream.
- the first prediction mode is a prediction mode within a first candidate list
- the second prediction mode is a prediction mode within a second candidate list
- the first candidate list and the second candidate list may be the same.
- the first candidate list and the second candidate list may be lists related to any one of an intra TMP (Template Matching Prediction) mode, a DIMD (Decoder side intra mode derivation) mode, a TIMD (Template intra mode derivation) mode, a CCP (Cross-Component Prediction) merge mode, and an EIP (Extrapolation filter-based Intra Prediction) merge.
- TMP Temporal Matching Prediction
- DIMD Decoder side intra mode derivation
- TIMD Temporal intra mode derivation
- CCP Cross-Component Prediction
- EIP Extrapolation filter-based Intra Prediction
- LIC Local Illumination Compensation
- OBMC Overlapped Block Motion Compensation
- the LIC mode or the OBMC mode is applied to the second block based on the second bidirectional motion information of the second block.
- the first bidirectional motion information may be motion information obtained by converting the first unidirectional information.
- the second bidirectional motion information may be motion information obtained by converting the second unidirectional information.
- the first prediction mode may be a prediction mode within a first prediction mode group including a plurality of prediction modes
- the second prediction mode may be a prediction mode within a second prediction mode group including a plurality of prediction modes.
- Whether the first prediction mode is activated may be determined based on whether the first prediction mode group unit is activated, and whether the second prediction mode is activated may be determined based on whether the second prediction mode group unit is activated.
- the X mode when the X mode is applied to the current block, it may mean when the current block is encoded in the X mode or when the current block is decoded in the X mode.
- the methods described herein may be performed by a processor of a decoder or encoder. Furthermore, the encoder may generate a bitstream decoded by the methods described above. Furthermore, the bitstream generated by the encoder may be stored on a computer-readable, non-transitory storage medium (recording medium).
- embodiments of the present invention described above may be implemented through various means.
- the embodiments of the present invention may be implemented through hardware, firmware, software, or a combination thereof.
- the method according to embodiments of the present invention may be implemented by one or more 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.
- 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 methods according to embodiments of the present invention may be implemented in the form of modules, procedures, or functions that perform the functions or operations described above.
- the software code may be stored in memory and executed by the processor.
- the memory may be located internally or externally to the processor and may exchange data with the processor via various known means.
- 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.
- Computer-readable media can 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 contains computer-readable instructions, data structures, or other data in a modulated data signal, such as program modules, or other transport mechanisms, 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 예측 모드에 기초하여 제1 블록을 예측하고, 제2 예측 모드에 기초하여 제2 블록을 예측할 수 있다. 상기 제1 블록과 상기 제2 블록은 병렬적으로 예측될 수 있다.
Description
본 발명은 비디오 신호 처리 방법 및 이를 위한 장치에 관한 것으로, 보다 상세하게는 비디오 신호를 인코딩하거나 디코딩하는 비디오 신호 처리 방법 및 장치에 관한 것이다.
압축 부호화란 디지털화한 정보를 통신 회선을 통해 전송하거나, 저장 매체에 적합한 형태로 저장하기 위한 일련의 신호 처리 기술을 의미한다. 압축 부호화의 대상에는 음성, 영상, 문자 등의 대상이 존재하며, 특히 영상을 대상으로 압축 부호화를 수행하는 기술을 비디오 영상 압축이라고 일컫는다. 비디오 신호에 대한 압축 부호화는 공간적인 상관관계, 시간적인 상관관계, 확률적인 상관관계 등을 고려하여 잉여 정보를 제거함으로써 이루어진다. 그러나 최근의 다양한 미디어 및 데이터 전송 매체의 발전으로 인해, 더욱 고효율의 비디오 신호 처리 방법 및 장치가 요구되고 있다.
본 명세서는 비디오 신호 처리 방법 및 이를 위한 장치를 제공하여 비디오 신호의 코딩 효율을 높이기 위한 목적이 있다.
본 명세서는 비디오 신호 처리 방법 및 이를 위한 장치를 제공한다.
본 명세서에 있어서, 비디오 신호 디코딩 장치는 프로세서를 포함하며, 상기 프로세서는, 제1 예측 모드에 기초하여 제1 블록을 예측하고, 제2 예측 모드에 기초하여 제2 블록을 예측할 수 있다. 상기 제1 블록과 상기 제2 블록은 병렬적으로 예측될 수 있다.
본 명세서에 있어서, 비디오 신호 인코딩 장치는 프로세서를 포함하며, 상기 프로세서는 디코딩 방법에 의해 디코딩되는 비트스트림을 획득할 수 있다.
본 명세서에 있어서, 컴퓨터 판독 가능한 비 일시적 저장 매체는 디코딩 방법에 의해 디코딩되는 비트스트림을 저장할 수 있다.
본 명세서에 있어서, 디코딩 방법은 제1 예측 모드에 기초하여 제1 블록을 예측하는 단계; 및 제2 예측 모드에 기초하여 제2 블록을 예측하는 단계를 포함할 수 있다. 상기 제1 블록과 상기 제2 블록은 병렬적으로 예측될 수 있다.
상기 제1 블록과 상기 제2 블록은 템플릿 예측 영역 내의 블록이고, 상기 제1 블록에 인접한 제1 주변 샘플들 중 적어도 하나의 샘플이 상기 템플릿 예측 영역 내에 존재하지 않는 경우, 상기 제1 예측 모드는 템플릿에 기초한 예측 모드이고, 상기 제1 주변 샘플들 전부가 상기 템플릿 예측 영역 내에 존재하는 경우, 상기 제1 예측 모드는 상기 템플릿에 기초한 예측 모드가 아닌 모드이고, 상기 제2 블록에 인접한 제2 주변 샘플들 중 적어도 하나의 샘플이 상기 템플릿 예측 영역 내에 존재하지 않는 경우, 상기 제2 예측 모드는 상기 템플릿에 기초한 예측 모드이고, 상기 제2 주변 샘플들 전부가 상기 템플릿 예측 영역 내에 존재하는 경우, 상기 제2 예측 모드는 상기 템플릿에 기초한 예측 모드가 아닌 모드일 수 있다.
상기 템플릿 예측 영역은, 비트스트림에 포함된 신택스 요소에 의해 결정될 수 있다.
상기 제1 예측 모드는 제1 후보 리스트 내의 예측 모드이고, 상기 제2 예측 모드는 제2 후보 리스트 내의 예측 모드이고, 상기 제1 후보 리스트 및 상기 제2 후보 리스트는 동일할 수 있다.
상기 제1 후보 리스트 및 상기 제2 후보 리스트는 인트라 TMP(Template Matching Prediction) 모드, DIMD(Decoder side intra mode derivation) 모드, TIMD(Template intra mode derivation) 모드, CCP(Cross-Component Prediction) 머지 모드, EIP(Extrapolation filter-based Intra Prediction) 머지 중 어느 하나와 관련된 리스트일 수 있다.
상기 제1 주변 샘플들 전부가 상기 템플릿 예측 영역 내에 존재하는 경우, 상기 제1 블록의 제1 양방향 움직임 정보에 기초하여 상기 제1 블록에 LIC(Local Illumination Compensation) 모드 또는 OBMC(Overlapped Block Motion Compensation) 모드가 적용되는지 여부가 결정되고, 상기 제2 주변 샘플들 전부가 상기 템플릿 예측 영역 내에 존재하는 경우, 상기 제2 블록의 제2 양방향 움직임 정보에 기초하여 상기 제2 블록에 상기 LIC 모드 또는 OBMC 모드가 적용되는지 여부가 결정될 수 있다.
상기 제1 블록의 움직임 정보가 제1 단방향 정보인 경우, 상기 제1 양방향 움직임 정보는 상기 제1 단방향 정보를 변환하여 획득되는 움직임 정보이고, 상기 제2 블록의 움직임 정보가 제2 단방향 정보인 경우, 상기 제2 양방향 움직임 정보는 상기 제2 단방향 정보를 변환하여 획득되는 움직임 정보일 수 있다.
상기 제1 예측 모드는 복수의 예측 모드들이 포함된 제1 예측 모드 그룹 내의 예측 모드이고, 상기 제2 예측 모드는 복수의 예측 모드들이 포함된 제2 예측 모드 그룹 내의 예측 모드이고, 상기 제1 예측 모드의 활성화 여부는 상기 제1 예측 모드 그룹 단위의 활성화 여부에 기초하여 결정되고, 상기 제2 예측 모드의 활성화 여부는 상기 제2 예측 모드 그룹 단위의 활성화 여부에 기초하여 결정될 수 있다.
본 명세서는 효율적으로 비디오 신호를 처리하기 위한 방법을 제공한다.
본 명세서에서 얻을 수 있는 효과는 이상에서 언급한 효과들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.
도 1은 본 명세서의 일 실시예에 따른 비디오 신호 인코딩 장치의 개략적인 블록도이다.
도 2는 본 명세서의 일 실시예에 따른 비디오 신호 디코딩 장치의 개략적인 블록도이다.
도 3은 픽쳐 내에서 코딩 트리 유닛이 코딩 유닛들로 분할되는 실시예를 도시한다.
도 4는 본 명세서의 일 실시예에 따른 쿼드 트리 및 멀티-타입 트리의 분할을 시그널링하는 방법을 나타낸다.
도 5 및 도 6은 본 명세서의 실시예에 따른 인트라 예측 방법을 더욱 구체적으로 도시한다.
도 7은 본 명세서의 일 실시예에 따른 인터 예측에서 움직임 후보 리스트를 구성하기 위해 사용되는 주변 블록들의 위치를 나타낸다.
도 8은 본 명세서의 일 실시예에 따른 템플릿에 기초하여 참조 픽셀 라인을 결정하는 방법을 나타낸다.
도 9는 본 명세서의 일 실시예에 따른 IBC 부호화 방법과 관련된 블록 벡터를 나타낸 도면이다.
도 10은 본 명세서의 일 실시예에 따른 수평 방향으로의 RRIBC를 사용하여 현재 블록을 예측하는 방법을 나타낸다.
도 11는 본 명세서의 일 실시예에 따른 수직 방향으로의 RRIBC를 사용하여 현재 블록을 예측하는 방법을 나타낸다.
도 12는 본 명세서의 일 실시예에 따른 Intra TMP 모드로 부호화된 블록의 블록 벡터를 나타낸다.
도 13은 본 명세서의 일 실시예에 따른 GPM 모드에 의해 현재 블록이 분할된 경우, 분할된 영역이 IBC 모드로 부호화되는 경우를 나타낸다.
도 14는 본 명세서의 일 실시예에 따른 현재 블록이 IBC-CIIP 모드로 부호화되는 방법을 나타낸다.
도 15는 본 명세서의 일 실시예에 따른 CCCM 파라미터를 유도하기 위해 사용되는 참조 영역 및 필터 형태의 일 예를 나타낸다.
도 16은 본 명세서의 일 실시예에 따른 비디오 코딩에 사용될 수 있는 변환 커널 종류를 나타낸다.
도 17은 본 명세서의 일 실시예에 따른 LFNST 및 NSPT 변환에 대한 변환 세트 테이블을 나타낸다.
도 18은 본 명세서의 일 실시예에 따른 다중 변환 세트 및 LFNST/NSPT 세트를 유도하는 방법을 나타낸다.
도 19는 본 명세서의 일 실시예에 따른 매핑 테이블을 나타낸다.
도 20은 본 명세서의 일 실시예에 따른 변환 타입 세트 테이블을 나타낸다.
도 21은 본 명세서의 일 실시예에 따른 변환 타입 조합 테이블을 나타낸다.
도 22는 본 명세서의 일 실시예에 따른 IDT 변환 타입에 대한 임계 값 테이블을 나타낸다.
도 23은 본 명세서의 일 실시예에 따른 디블록킹 필터링 과정에서의 블록 경계 및 경계 주변의 샘플들을 나타낸다.
도 24는 본 명세서의 일 실시예에 따른 외삽 필터(extrapolation filter)에 기초한 인트라 예측 모드를 나타낸다.
도 25는 본 명세서의 일 실시예에 따른 LFNST 변환 후 ROI(Region of Interest)를 나타내는 도면이다.
도 26은 본 명세서의 일 실시예에 따른 DIMD(Decoder side intra mode derivation)를 이용하여 예측 블록을 생성하는 과정을 나타낸 도면이다.
도 27은 본 명세서의 일 실시예에 따른 방향성 정보를 유도하기 위해 사용되는 주변 픽셀의 위치를 나타낸 도면이다.
도 28은 본 명세서의 일 실시예에 따른 방향성 모드를 매핑하는 방법을 나타낸 도면이다.
도 29는 본 명세서의 일 실시예에 따른 인트라 예측 방향성 모드를 유도하기 위한 히스토그램을 나타낸 도면이다.
도 30은 본 명세서의 일 실시예에 따른 현재 블록을 복원하기 위한 예측 샘플을 생성하는 방법을 나타낸 도면이다.
도 31은 본 명세서의 일 실시예에 따른 인트라 예측 모드를 결정하는 방법을 나타낸 도면이다.
도 32는 본 명세서의 일 실시예에 따른 인트라 예측 방향성 모드 정보와 가중치를 이용하여 예측 샘플을 생성하는 방법을 나타낸 도면이다.
도 33 및 도 34는 본 명세서의 일 실시예에 따른 현재 블록의 인트라 예측 모드를 유도하기 위해 사용되는 템플릿(template)을 나타낸 도면이다.
도 35는 본 명세서의 일 실시예에 따른 복수의 참조 픽셀 라인에 기초하여 예측 샘플(픽셀)을 생성하는 방법을 나타내는 도면이다.
도 36은 본 명세서의 일 실시예에 따른 복수의 참조 픽셀 라인을 사용하여 샘플을 예측하는 방법을 나타낸다.
도 37은 본 명세서의 일 실시예에 따른 템플릿에 기초한 복수의 참조 픽셀 라인을 사용하여 최적의 참조 픽셀 라인을 결정하는 방법을 나타낸 구조도이다.
도 38은 본 명세서의 일 실시예에 따른 평면 모드를 사용하여 예측 샘플을 생성하는 방법을 나타낸다.
도 39는 본 명세서의 일 실시예에 따른 다중 예측 모드를 사용하여 MPM 리스트를 구성하는 방법을 나타낸다.
도 40은 본 명세서의 일 실시예에 따른 다중 예측 모드 기반의 후보 리스트를 사용하는 방법을 나타낸다.
도 41은 본 명세서의 일 실시예에 따른 최적의 인트라 예측 모드 조합을 선정하는 방법을 나타낸다.
도 42 및 도 43은 본 명세서의 일 실시예에 따른 현재 블록의 주변 블록을 나타낸다.
도 44는 본 명세서의 일 실시예에 따른 인트라 TMP 모드에서 블록 벡터를 획득하기 위한 탐색 영역을 나타낸다.
도 45는 본 명세서의 일 실시예에 따른 인트라 TMP 모드에서 블록 벡터를 찾기 위해 사용되는 템플릿을 나타낸다.
도 46은 본 명세서의 일 실시예에 따른 템플릿 기반의 부호화 방법의 허용 여부를 결정하는 방법을 나타낸다.
도 47은 본 명세서의 일 실시예에 따른 템플릿 예측 영역의 크기와 관련된 신택스 요소를 시그널링하는 방법을 나타낸다.
도 48은 본 명세서의 일 실시예에 따른 general_constraint_info() 신택스 구조에 포함된 템플릿 예측 영역과 관련된 제약 플래그를 나타낸다.
도 49는 본 명세서의 일 실시예에 따른 sps_log2_parallel_template_level_minus2 값에 따른 TER 크기를 나타낸다.
도 50은 본 명세서의 일 실시예에 따른 EIP 모드에서 위치 기반 모델을 사용하여 예측하는 방법을 나타낸다.
도 51은 본 명세서의 일 실시예에 따른 ISP 모드에서 DIMD를 사용하여 인트라 예측 모드를 유도하는 방법을 나타낸다.
도 52는 본 명세서의 일 실시예에 따른 매트릭스 기반 인트라 예측 방법을 나타낸다.
도 53은 본 명세서의 일 실시예에 따른 TM 방법이 수행되는 순서를 나타낸다.
도 54는 본 명세서의 일 실시예에 따른 초기 움직임 정보에 기초하여 TM 방법을 위한 탐색 영역을 설정하는 방법을 나타낸다.
도 55는 본 명세서의 일 실시예에 따른 탐색 영역 내에서 탐색되는 움직임 후보의 위치를 나타낸다.
도 56은 본 명세서의 일 실시예에 따른 움직임 후보의 위치를 탐색하는 과정을 나타낸다.
도 57은 본 명세서의 일 실시예 따른 탐색 후보를 평가하는 과정을 나타낸다.
도 58 및 도 59는 본 명세서의 일 실시예에 따른 DMVR을 사용하여 움직임 정보를 보정하는 방법을 나타낸다.
도 60은 본 명세서의 일 실시예에 따른 다중 DMVR이 수행되는 과정을 나타낸다.
도 61은 본 명세서의 일 실시예에 따른 시간적인 계층을 나타낸다.
도 62는 본 명세서의 일 실시예에 따른 CU 단위의 OBMC를 수행하는 방법을 나타낸다.
도 63은 본 명세서의 일 실시예에 따른 양방향 움직임 정보를 나타낸다.
도 64는 본 명세서의 일 실시예에 따른 단방향 움직임 정보를 양방향 또는 양예측 움직임 정보로 변경하는 방법을 나타낸다.
도 65 및 도 66은 본 명세서의 일 실시예에 따른 참조 블록 간의 차이에 대한 코스트를 계산하는 과정에서 일부 샘플만을 사용하는 방법을 나타낸다.
도 67은 본 명세서의 일 실시예에 따른 비디오 신호 처리 방법을 나타내는 순서도이다.
본 명세서에서 사용되는 용어는 본 발명에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어를 선택하였으나, 이는 당 분야에 종사하는 기술자의 의도, 관례 또는 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한 특정 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 발명의 설명 부분에서 그 의미를 기재할 것이다. 따라서 본 명세서에서 사용되는 용어는, 단순한 용어의 명칭이 아닌 그 용어가 가진 실질적인 의미와 본 명세서의 전반에 걸친 내용을 토대로 해석되어야 함을 밝혀두고자 한다.
본 명세서에서 '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를 가질 수 있다. 또한, 본 명세서에서 블록의 크기는 블록의 가로의 길이와 세로의 길이의 합 또는 곱일 수 있다. 또는 블록의 크기는 블록 내 샘플의 개수를 의미할 수 있다. 비트 깊이(심도)는 샘플 값의 범위를 비트 단위로 표현한 것으로, 비트 깊이가 8비트인 경우에는 샘플 값의 범위가 0에서 255까지의 값을 가진다. 내부 비트 깊이는 비디오 신호 처리 장치(예, 인코더, 디코더)에서 영상을 효과적으로 부호화 하기 위해 비트 깊이를 확장하였을 때의 비트 깊이를 의미하며, 일반적으로 비디오 신호 처리 장치는 영상을 부호화 하기 전에 비트 깊이를 확장하고 복호화 후 출력할 때 비트 깊이를 입력된 원본 영상의 비트 깊이로 축소한다. 예를 들어, 8비트 깊이를 가진 영상을 10비트 깊이를 가진 영상으로 확장하여 부호화 및 복호화를 수행한다.
도 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)을 사용할 수 있다. CC-SAO(cross component SAO)는 샘플을 보상해주기 위한 방법이다. CC-SAO에서 비디오 신호 처리 장치는 기존 SAO와 유사하게, 복원된 샘플을 카테고리로 분류하고, 각 카테고리별로 오프셋을 유도하여 복원 샘플에 더할 수 있다. 기존 SAO에서 비디오 신호 처리 장치는 각각의 휘도 및 색차 성분만을 사용하나, CC-SAO에서 비디오 신호 처리 장치는 휘도 및 2개의 색차 총 3개 성분을 모두 사용하여 카테고리를 분류한다. 적응적 루프 필터(Adaptive Loop Filter, ALF)는 영상에 포함된 픽셀을 소정의 그룹으로 나눈 후, 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행하는 방법이다. ALF를 적용할지 여부에 관련된 정보는 코딩 유닛 단위로 시그널링될 수 있고, 각각의 블록에 따라 적용될 ALF 필터의 모양 및 필터 계수가 달라질 수 있다. 또한, 적용할 대상 블록의 특성에 관계없이 동일한 형태(고정된 형태)의 ALF 필터가 적용될 수도 있다. BF(Bilateral Filter) 필터링은 주변 샘플 간의 변화 차이를 통해 유도된 샘플 단위의 오프셋을 샘플 단위로 적용하는 방안이다.
예측부(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 Coding, 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)과정이 수행되어 확률 구간이 넓어지고 해당 위치 정보가 출력된다. 또한, 각 빈이 처리된 후, 처리된 빈의 정보를 통해 다음 처리될 빈에 대한 확률이 새롭게 설정되는 확률 업데이트 과정이 수행될 수 있다. 비디오 신호 처리 장치는 컨텍스트 모델 없이 0 또는 1이 발생할 확률을 '0.5'로 동일하게 설정하여, 엔트로피 코딩할 수 있으며, 이를 바이패스(bypass) 모드라고 기술할 수 있다.
비트스트림은 하나 또는 그 이상의 CVS(coded video sequences)로 구성될 수 있고, 하나의 CVS는 다른 CVS들과는 독립적으로 부호화될 수 있다. 각 CVS는 하나 또는 그 이상의 레이어(layer)로 구성될 수 있고, 각 레이어는 특정 화질, 특정 해상도를 나타낼 수 있으며, 또는 일반 영상, 깊이정보맵, 투명도(transparency) 맵을 나타낼 수 있다. 또한, CLVS(coded layer video sequence)는 동일 레이어 내의 연속된(디코딩 순서상) PU들로 구성된 레이어-와이즈(layer-wise) CVS를 의미할 수 있다. 예를 들어, 특정 화질 레이어에 대한 CLVS가 존재하며, 깊이정보맵에 대한 CLVS가 존재할 수 있다.
상기 생성된 비트스트림은 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 유닛을 복호화해야 한다. 한편, 비디오 신호 비트스트림의 복호화를 위해 필요한 정보들은 비디오 파라미터 세트(Video Parameter Set, VPS), 시퀀스 파라미터 세트(Sequence Parameter Set, SPS), 픽쳐 파라미터 세트(Picture Parameter Set, PPS), 적응 파라미터 세트(Adaptation Parameter Set, APS) 등에 포함되어 전송될 수 있다. VCL NAL 유닛의 RBSP에는 정수 개의 코딩 트리 유닛(coding tree unit)이 포함될 수 있다. VPS는 화질, 해상도, 프레임 율 스케일러빌러티를 지원하는 비트스트림 또는 멀티뷰를 지원하는 비트스트림에서 각 레이어마다 시그널링되는 SPS 파라미터 세트에서 중복된 파라미터를 추출하여 공통의 신택스로 구성한 파라미터 세트이다. SPS는 허용가능한 코딩 툴(혹은 알고리즘) 및 영상 포맷에 대한 정보를 포함하고 있는 프로파일(Profile), 처리 가능한 영상의 해상도와 프레임율 그리고 허용가능한 메모리 크기 등에 대한 디코더의 처리 능력에 대한 정보를 포함하고 있는 레벨(Level), 처리 가능한 최대 비트율에 대한 정보를 포함하고 있는 티어(Tier), 영상의 해상도, 비트 깊이(bit depth), 기능에 대한 활성화 여부 정보 중에서 적어도 하나 이상을 포함하는 파라미터 세트이다. PPS는 영상의 해상도, 타일 분할 정보, 가중치 예측에 대한 활성화 여부 정보, 양자화 파라미터, 필터링 관련 정보 중에서 적어도 하나 이상을 포함하는 파라미터 세트이다. APS는 APS 타입에 따라 ALF 필터 계수 정보, LMCS 관련 파라미터, 양자화 스케일 파라미터 중에서 하나의 정보를 포함하는 파라미터 세트이다. APS는 VCL NAL 유닛보다 먼저 시그널링되는 프리픽스(prefix) APS와 VCL NAL 유닛 이후에 시그널링되는 서픽스(suffix) APS로 구분되며, ALF APS의 경우에는 이전 픽쳐에서 유도된 ALF 필터 계수를 다음 픽쳐에 적용하는 것이 효율적이므로, suffix APS로 시그널링될 수 있다. Non-VCL NAL 유닛에는 SEI (Supplemental Enhancement Information) NAL 유닛이 있으며, SEI NAL 유닛은 픽쳐를 복원하기 위해 필요하지 않은 메타 데이터를 포함할 수 있다. SEI NAL 유닛은 픽쳐 출력 시간, 에러 손실 검출 및 은닉 등에 사용될 수 있다. AU(Access Unit)는 동일한 시간에 속한 픽쳐들의 세트일 수 있다. CRA(Clean Random Access) 픽쳐는 VCL NAL 유닛으로, 디코딩 과정에서 인터 예측을 위해 자신 이외의 다른 픽쳐들을 참조하지 않는다. CRA 픽쳐는 출력 순서에서 첫번째 픽쳐일 수 있으며, 인트라 픽쳐 일 수 있다. IDR(Instantaneous Decoding Refresh) 픽쳐는 VCL NAL 유닛으로, CRA 픽쳐와 동일하게 디코딩 과정에서 인터 예측을 위해 자신 이외의 다른 픽쳐들을 참조하지 않는다. IDR 픽쳐는 출력 순서에서 첫번째 픽쳐일 수 있으며, 인트라 픽쳐 일 수 있다. 디코딩 순서상 IDR 픽쳐 후에 디코딩되는 픽쳐들은 IDR 픽쳐 전에 디코딩된 픽쳐들을 참조할 수 없다. 디코딩 순서상 CRA 픽쳐 후에 디코딩되지만, 출력 순서상 CRA 픽쳐 전에 출력되는 픽쳐은이 CRA 픽쳐 전에 디코딩된 픽쳐들을 참조할 수 있다. IRAP(Intra Random Access Point) 픽쳐는 임의 접근이 가능한 픽쳐이며, CRA 픽처 또는 IDR 픽처일 수 있다.
한편, 도 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 픽쳐 리스트 각각에서 선택된 영역일 수 있다. 또한, 현재 픽쳐의 표시 순서를 나타내는 POC(picture order count)를 기준으로 현재 픽쳐의 POC 보다 POC가 작은 참조 픽쳐만을 사용하거나 현재 픽쳐의 POC 보다 POC가 큰 참조 픽쳐만을 사용하는 예측 방법을 단방향 (uni-directional prediction) 예측이라고 할 수 있다. 또한, 현재 픽쳐의 표시 순서를 나타내는 POC(picture order count)를 기준으로 현재 픽쳐의 POC 보다 POC가 작은 참조 픽쳐와 현재 픽쳐의 POC 보다 POC가 큰 참조 픽쳐를 모두 사용하는 예측 방법을 양방향 (bi-directional prediction) 예측이라고 할 수 있다. 단방향 예측에서 하나의 참조 픽쳐만을 사용하는 예측 방법을 단예측(uni-prediction)이라고 할 수 있으며, 단 방향 예측에서 2개의 참조 픽쳐를 사용하는 예측 방법을 양예측(Bi-prediction) 또는 쌍예측이라고 할 수 있다.
인터 예측부(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개의 직사각형 노드들로 분할된다.
트리 분할 구조는 휘도 블록과 색차 블록이 동일한 형태로 분할될 수 있다. 즉, 색차 블록은 휘도 블록의 분할 형태를 참조하여 색차 블록을 분할할 수 있다. 현재 색차 블록이 임의의 정해진 크기보다 적다면, 휘도 블록이 분할되었더라도 색차 블록은 분할되지 않을 수 있다.
휘도 블록과 색차 블록은 서로 동일한 트리 분할 구조를 가질 수 있으며, 이를 싱글 트리(Single Tree)라고 할 수 있다. 현재 블록이 싱글 트리로 부호화된 경우, 휘도 블록과 색차 블록의 분할 구조, 부호화 모드 정보, 움직임 정보 등이 동일할 수 있으며, 이외 오차 신호와 관련된 정보는 휘도 블록과 색차 블록이 다를 수 있다. 또한, 휘도 블록과 색차 블록은 서로 다른 트리 분할 구조를 가질 수 있으며, 이를 듀얼 트리(Dual Tree)라고 할 수 있다. 현재 블록이 듀얼 트리로 부호화된 경우, 휘도 블록과 색차 블록의 분할 구조, 부호화 모드 정보, 움직임 정보 등은 적어도 하나 이상이 다를 수 있다.
휘도 블록과 휘도 블록에 대응하는 색차 블록 간에는 밀접한 상관관계가 있을 수 있다. 따라서, 인코더 및 디코더에서는 현재 블록이 듀얼 트리로 부호화 및 복호화될 경우, 휘도 블록의 분할 정보, 부호화 모드 정보, 움직임 정보 등을 사용하여 색차 블록을 부호화할 수 있다.
가장 작은 단위로 분할될 노드는 하나의 코딩 블록으로 처리될 수 있다. 현재 블록이 코딩 블록일 경우, 코딩 블록은 여러 개의 서브 블록(서브 코딩 블록)으로 분할될 수 있으며, 각 서브 블록의 예측 정보는 서로 같거나 또는 다를 수 있다. 실시 일 예로, 코딩 유닛이 인트라 모드일 경우, 각 서브 블록의 인트라 예측 모드는 서로 같거나 또는 다를 수 있다. 또한, 코딩 유닛이 인터 모드일 경우, 각 서브 블록의 움직임 정보는 서로 같거나 또는 다를 수 있다. 또한, 각 서브 블록은 서로 독립적으로 인코딩 또는 디코딩이 가능할 수 있다. 각각의 서브 블록은 서브 블록 인덱스(sub-block index, sbIdx)를 통해 구분될 수 있다. 또한 코딩 유닛이 서브 블록으로 분할될 때, 수평 또는 수직 방향으로 분할되거나 사선으로 분할될 수 있다. 인트라 모드에서 현재 코딩 유닛을 수평 또는 수직 방향으로 2개 또는 4개의 서브 블록으로 분할하는 모드를 ISP(Intra Sub Partitions)이라 한다. 인터 모드에서 현재 코딩 블록을 사선으로 분할하는 모드를 GPM(Geometric partitioning mode)이라 한다. GPM모드에서 사선의 위치와 방향은 미리 정해진 각도 테이블을 사용하여 유도하고, 각도 테이블의 인덱스 정보가 시그널링된다.
움직임 정보는 참조 방향 지시 정보, 참조 픽쳐 정보, 움직임 벡터, 움직임 해상도, affine 모델, CPMV(control point motion vector), 블록 벡터, 블록 벡터 해상도, MHP 정보, LIC 정보, 필터링 정보, BCW 정보, RRIBC 정보 중에서 하나 이상을 포함할 수 있다.
참조 방향 지시 정보는 L0 예측, L1 예측, L0 및 L1 예측으로 구성되며, L0 예측과 L1 예측은 단예측 및 단방향 예측이며, L0 및 L1 예측은 양예측이다. 그리고 L0 및 L1 예측은 단방향 예측 혹은 양방향 예측이 될 수 있다. 여기서 L0 예측은 L0 참조 픽쳐 리스트 내의 참조 픽쳐를 사용하여 예측하며, L1 예측은 L1 참조 픽쳐 리스트 내의 참조 픽쳐를 사용하여 예측할 수 있다. L0 참조 픽쳐 리스트에는 현재 픽쳐의 POC를 기준으로 현재 픽쳐의 POC 보다 POC가 작은 참조 픽쳐가 참조 픽쳐 리스트에 추가될 수 있다. 또한, L0 참조 픽쳐 리스트는 현재 픽쳐의 POC보다 POC가 가까운 참조 픽쳐부터 POC가 먼 참조 픽쳐 순으로 구성될 수 있다. L1 참조 픽쳐 리스트는 현재 픽쳐의 POC를 기준으로 현재 픽쳐의 POC 보다 POC가 큰 참조 픽쳐가 참조 픽쳐 리스트에 추가될 수 있다. 또한, L1 참조 픽쳐 리스트는 현재 픽쳐의 POC보다 POC가 가까운 참조 픽쳐부터 POC가 먼 참조 픽쳐 순으로 구성될 수 있다. L0 및 L1 참조 픽쳐 리스트는 슬라이스, 서브 픽쳐, 픽쳐마다 달라질 수 있다. 또한, L0 참조 픽쳐 리스트에는 L1 참조 픽쳐 리스트의 참조 픽쳐가 포함될 수 있다. 그리고 L1 참조 픽쳐 리스트에는 L0 참조 픽쳐 리스트의 참조 픽쳐가 포함될 수 있다.
참조 픽쳐 정보는 블록마다 달라질 수 있으며, 현재 블록이 L0 참조 픽쳐 리스트 및/또는 L1 참조 픽쳐 리스트에서 어떤 참조 픽쳐를 사용하여 예측되는지를 지시하는 인덱스 정보일 수 있다. 참조 픽쳐 정보는 L0 참조 픽쳐 정보, L1 참조 픽쳐 정보 중에서 하나 이상 포함할 수 있다.
움직임 벡터는 참조 픽쳐에서 현재 블록과 가장 매칭이 잘 되는 블록을 지시하는 정보로써, 픽쳐 내에서 현재 블록의 좌상단 위치를 기준으로 참조 블록까지의 거리를 수평 및 수직 좌표로 나타낸 값이다.
움직임 해상도는 움직임 벡터의 해상도를 나타내며, 움직임 해상도는 4 화소 단위, 1 화소(정수 화소) 단위, 1/2 화소 단위, 1/4 화소 단위, 1/8 화소 단위, 1/16 화소 단위 등으로 나타낼 수 있다.
블록 벡터는 현재 픽쳐 내 이미 복원된 영역에서 현재 블록과 가장 매칭이 잘 되는 블록을 지시하는 정보로써, 픽쳐 내에서 현재 블록의 좌상단 위치를 기준으로 참조 블록까지의 거리를 수평 및 수직 좌표로 나타낸 값이다.
블록 벡터 해상도는 4 화소 단위, 1 화소(정수 화소) 단위, 1/2 화소 단위, 1/4 화소 단위, 1/8 화소 단위, 1/16 화소 단위 등으로 나타낼 수 있다.
MHP 정보에는 추가적인 움직임 정보의 적용 여부 및 추가적인 움직임 정보를 포함할 수 있다.
LIC 정보는 현재 블록에 대한 LIC 적용 여부를 포함할 수 있다.
필터링 정보는 현재 블록의 움직임 해상도에 따라 적용되는 필터링 타입 및 계수 정보를 포함할 수 있다.
BCW 정보는 현재 블록에 대한 BCW 적용 여부를 포함할 수 있다.
RRIBC 정보는 현재 블록이 IBC 모드로 부호화된 경우, RRIBC 적용 여부 및 RRIBC 타입에 대한 정보를 포함할 수 있다.
코딩을 위한 픽쳐 예측(모션 보상)은 더 이상 나누어지지 않는 코딩 유닛(즉 코딩 트리 유닛의 리프 노드)을 대상으로 이루어진다. 이러한 예측을 수행하는 기본 단위를 이하에서는 예측 유닛(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) 모드라고 할 수 있다.
현재 블록에 대한 양방향 움직임 정보는 AMVP와 Merge 모드가 혼용되어 유도될 수 있다. 예를 들어, L0 방향의 움직임 정보는 AMVP 방법을 사용하여 유도하고, L1 방향의 움직임 정보는 Merge 방법을 사용하여 유도될 수 있다. 반대로, L0는 Merge, L1은 AMVP를 적용할 수 있다. 이러한 부호화 모드를 AMVP-merge 모드라고 할 수 있다.
본 명세서의 움직임 후보와 움직임 정보 후보는 서로 동일한 의미일 수 있다. 또한, 본 명세서의 움직임 후보 리스트와 움직임 정보 후보 리스트는 서로 동일한 의미일 수 있다.
SMVD(Symmetric MVD)는 양방향 예측(bi-directional prediction)의 경우에, L0 방향과 L1 방향의 MVD(Motion Vector Difference) 값이 대칭을 이루도록 하여 전송되는 움직임 정보의 비트량을 줄이는 방법이다. L0 방향과 대칭을 이루는 L1 방향의 MVD 정보는 전송되지 않으며, L0 및 L1 방향의 참조 픽쳐 정보도 전송되지 않고 복호화 과정에서 유도될 수 있다.
OBMC(Overlapped Block Motion Compensation)는 블록 간의 움직임 정보가 서로 다른 경우, 주변 블록들의 움직임 정보를 사용하여 현재 블록에 대한 예측 블록들을 생성한 후, 예측 블록들을 가중치 평균하여 현재 블록에 대한 최종 예측 블록을 생성하는 방법이다. 이는 움직임 보상된 영상의 블록 경계에서 발생되는 블록킹 현상을 줄여주는 효과가 있다.
비디오 신호 처리 장치는 현재 블록을 분할하여 복수의 서브 블록으로 구성한 후, 각 서브 블록마다 OBMC의 적용 여부 및 OBMC 모드를 결정할 수 있다. OBMC 모드는 서로 다른 가중치에 기초하여 결정될 수 있다. OBMC의 적용 여부 및 OBMC 모드는 현재 서브 블록에 인접한 주변 샘플을 이용하여 구성된 기준 템플릿을 통해 결정될 수 있다. 비디오 신호 처리 장치는, 현재 서브 블록의 움직임 정보와 현재 서브 블록의 주변 블록의 움직임 정보를 이용하여 템플릿을 예측한 후, 예측한 템플릿과 기준 템플릿 간의 SAD 또는 MR-SAD 코스트에 기초하여 OBMC 의 적용 여부 및 OBMC 모드를 결정할 수 있다. 템플릿을 이용한 OBMC 모드는 TM OBMC(Template Matching OBMC)라고 할 수 있다.
일반적으로 머지 움직임 후보는 움직임의 정확도가 낮다. 이러한 머지 움직임 후보의 정확도를 높이기 위해서, MMVD(Merge mode with MVD) 방법이 사용될 수 있다. MMVD 방법은 몇 개의 움직임 차분 값 후보들 중에서 선택된 하나의 후보를 이용하여 움직임 정보를 보정하는 방법이다. MMVD 방법을 통해 획득되는 움직임 정보의 보정 값에 대한 정보(예를 들어, 움직임 차분 값 후보들 중에서 선택된 하나의 후보를 지시하는 인덱스 등)은 비트스트림에 포함되어 디코더로 전송될 수 있다. 기존의 움직임 정보 차분 값이 비트스트림에 포함되는 것에 비해 움직임 정보의 보정 값에 대한 정보가 비트스트림에 포함됨으로써 비트량은 절약될 수 있다.
MBVD(merge mode with block vector differences) 모드는 머지 모드에서 움직임 벡터에 대한 차분 값을 부호화하는 모드인 MMVD와 유사한 방법으로, 블록 벡터에 대한 차분값을 부호화하는 모드이다. MBVD 방법은 몇 개의 블록 벡터 차분 값 후보들 중에서 선택된 하나의 후보를 이용하여 블록 벡터를 결정하는 방법이다. MBVD 방법을 통해 획득되는 블록 벡터의 차분 값에 대한 정보(예를 들어, 블록 벡터 차분 값 후보들 중에서 선택된 하나의 후보를 지시하는 인덱스 등)은 비트스트림에 포함되어 디코더로 전송될 수 있다. 기존의 블록 벡터 차분 값을 비트스트림에 포함하는 것에 비해 블록 벡터의 차분 값에 대한 일부의 정보만을 비트스트림에 포함함으로써 비트량을 절약할 수 있다.
TM(Template Matching) 방법은 현재 블록의 주변 화소를 통해 템플릿을 구성하여 템플릿과 가장 유사도가 높은 매칭 영역을 찾아서 움직임 정보를 보정하는 방법이다. TM(Template matching)은 부호화되는 비트스트림의 크기를 줄이기 위해서, 움직임 정보를 비트스트림에 포함하지 않고 디코더에서 움직임 예측을 수행하는 방법이다. 이때, 디코더는 원본 영상이 없으므로 이미 복원된 주변 블록을 사용하여 현재 블록에 대한 움직임 정보를 개략적으로 유도할 수 있다.
BM(Bilateral Matching)은 비디오 신호 처리 장치가 현재 블록의 움직임 정보를 기반으로 유도된 L0 픽쳐 리스트에 포함된 픽쳐 내의 참조 블록과 L1 픽쳐 리스트에 포함된 픽쳐 내의 참조 블록 간의 유사도를 기초로 움직임 정보를 보정하는 방법일 수 있다.
DMVR(Decoder-side Motion Vector Refinement) 방법은 조금 더 정확한 움직임 정보를 찾기 위해 이미 복원된 참조 영상들의 상관성을 통해 움직임 정보를 보정하는 방법으로써, 현재 블록의 양방향 움직임 정보를 사용하여 2개의 참조 픽쳐의 임의의 정해진 영역 내에서 참조 픽쳐 내의 참조 블록 간의 가장 매칭이 잘되는 지점을 새로운 양방향 움직임으로 사용하는 방법이다. 이러한 DMVR이 수행될 때, 인코더는 하나의 블록 단위에서 DMVR을 수행하여 움직임 정보를 보정한 후, 다시 블록을 서브 블록으로 분할하여 각 서브 블록 단위에서 DMVR을 수행하여 서브 블록의 움직임 정보를 다시 보정할 수 있으며, 이를 MP-DMVR(Multi-pass DMVR)이라 할 수 있다.
비디오 신호 처리 장치는 초기 움직임 후보 리스트를 구성할 수 있고, 초기 움직임 후보 리스트 내 각 움직임 후보를 TM 또는 DMVR 방식을 사용하여 보정할 수 있다. 비디오 신호 처리 장치는 보정된 움직임 후보를 템플릿 코스트를 기반으로 재정렬하여 재정렬된 움직임 후보 리스트를 획득할 수 있다. 이를 ARMC(Adaptive Reordering of Merge Candidates)라고 할 수 있다
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) 방법은 서로 다른 참조 픽쳐로 부터 움직임 보상된 두 개의 예측 블록에 대하여, 평균으로 예측 블록을 생성하지 않고, 블록 단위로 적응적으로 가중치를 적용하여 움직임 보상된 두 개의 예측 블록에 가중치 평균을 수행하는 방법이다.
Intra TMP(Template Matching Prediction) 방법은, 비디오 신호 처리 장치가 현재 블록에 인접한 주변 블록의 화소 값들을 사용하여 기준 템플릿이 구성하고, 구성된 기준 템플릿과 가장 유사한 부분을 현재 픽쳐 내의 이미 복원된 영역에서 찾은 후, 해당 참조 블록(이미 복원된 영역에서 찾은 부분)을 현재 블록에 대한 예측 블록으로 사용하는 방법이다
MHP(Multi-hypothesis prediction) 방법은 화면 간 예측 시 단방향 및 양방향 움직임 정보에 추가적인 움직임 정보를 전송함으로써, 다양한 예측 신호를 통한 가중치 예측을 수행하는 방법이다.
CCLM(Cross-component linear model)은 휘도 신호와 해당 휘도 신호와 동일한 위치에 있는 색차 신호 간의 높은 상관성을 이용하여 선형 모델을 구성한 후, 해당 선형 모델을 통해 색차 신호를 예측하는 방법이다. 현재 블록에 인접한 주변 블록 중에서 복원이 완료된 블록을 사용하여 템플릿을 구성한 후, 템플릿을 통해 선형 모델에 대한 파라미터가 유도된다. 다음으로, 영상 포맷에 따라 선택적으로 색차 블록의 크기에 맞게 복원된 현재 휘도 블록이 다운 샘플링된다. 마지막으로, 다운 샘플링된 휘도 블록과 해당 선형 모델을 이용하여 현재 블록의 색차 블록을 예측한다. 이때, 2개 이상의 선형 모델을 사용하는 방법을 MMLM(Multi-model Linear mode)이라고 한다.
GLM(Gradient Linear Model)은 CCLM과 같은 선형 모델에서 색차 샘플에 대응되는 휘도 샘플과 그 휘도 샘플에 인접한 주변의 휘도 샘플들 간의 기울기를 추가로 반영하여 모델을 구성한 후, 해당 모델을 통해 색차 신호를 예측하는 방법이다.
CCLM, MMLM, CCCM, GLM 등과 같이, 다른 신호들 간의 상관성을 이용한 예측 방법은 CCP(Cross-Component Prediction)이라고 할 수 있다. 다시 말하면, 하나의 신호(예를 들어, 휘도 신호)로부터 다른 신호(색차 신호로써, Cb, Cr이 될 수 있다.)를 예측하는 방법은 CCP(Cross-Component Prediction)라고 할 수 있다.
CCP 머지(merge) 방법은 주변 블록에서 사용된 CCP 모델(CCLM, MMLM, CCCM 등의 모델)을 사용하여 현재 블록의 색차 블록을 예측하는 방법이다.
본 명세서에서 기술하는 부호화 모드(예측 모드)는 모드라는 용어를 생략하여 기술될 수도 있고, 모드 대신 방법이라는 용어로 기술될 수도 있다. 예를 들어, CCLM 모드는 CCLM 방법 또는 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)이라고 할 수 있다.
TIMD 머지(merge) 모드는 TIMD 또는 TIMD 머지 모드로 부호화된 주변 블록에서 TIMD 정보를 상속받아서 현재 블록에서 사용하는 모드이다. TIMD 정보는 인트라 예측 방향성 모드, 가중치 평균을 적용할지 여부 정보, 각 인트라 예측 모드에 대한 가중치 정보, 변환 타입 정보 중에서 적어도 하나 이상일 수 있다. 비디오 신호 처리 장치는 주변 블록에서 사용된 TIMD 정보들을 이용하여 TIMD 머지 리스트를 구성할 수 있으며, 비디오 신호 처리 장치는 현재 블록으로부터 거리가 가까운 위치부터 거리가 멀리 떨어진 위치 순으로 미리 정해진 최대 개수만큼 주변 블록으로부터 유도된 TIMD 정보들을 TIMD 머지 리스트에 추가할 수 있다. 여기서 미리 정해진 최대 개수는 1 이상의 양의 정수일 수 있으며, 5일 수 있다. 다음으로, 비디오 신호 처리 장치는 템플릿 코스트를 기반으로 TIMD 머지 리스트를 재정렬한 다음, 최소 코스트를 갖는 후보를 현재 블록의 TIMD 모드로 사용할 수 있다. 그리고, 현재 블록이 TIMD 머지 모드로 부호화된 경우, 비디오 신호 처리 장치는 잔여 신호에 대해 현재 블록의 크기가 4이상 16 이하인 경우에는 묵시적으로 DST7 변환을 사용할 수 있으며, 그 외에는 주변 블록으로부터 유도된 변환 타입을 사용할 수 있다. 여기서 주변 블록으로부터 유도된 변환 타입은 TIMD 머지 리스트로부터 결정된 현재 블록에 대한 TIMD 후보 내의 변환 타입 정보일 수 있다.
일반적으로 인코더는 예측 블록을 생성하기 위한 예측 모드를 결정하여 결정된 예측 모드에 대한 정보가 포함된 비트스트림을 생성할 수 있다. 디코더는 수신한 비트스트림을 파싱하여 인트라 예측 모드를 설정할 수 있다. 이때, 예측 모드에 대한 정보의 비트량은 전체 비트스트림 크기의 10% 정도일 수 있다. 예측 모드에 대한 정보의 비트량을 감소시키기 위해 인코더는 비트스트림에 인트라 예측 모드에 대한 정보를 포함하지 않을 수 있다. 이에, 디코더는 주변 블록의 특성을 이용하여 현재 블록의 복원을 위한 인트라 예측 모드를 유도(결정)할 수 있고, 유도된 인트라 예측 모드를 이용하여 현재 블록을 복원할 수 있다. 이때, 디코더는 인트라 예측 모드를 유도하기 위해 현재 블록에 인접한 주변 화소(픽셀)들마다 소벨(Sobel) 필터를 가로 및 세로 방향으로 적용하여 방향성 정보를 유추한 후, 해당 방향성 정보를 인트라 예측 모드로 매핑하는 방법을 이용할 수 있다. 디코더가 주변 블록을 이용하여 인트라 예측 모드를 유도하는 방법은 DIMD(Decoder side intra mode derivation)로 기술될 수 있다.
현재 블록이 휘도 블록인 경우, 비디오 신호 처리 장치는 DIMD 및 TIMD 방법을 통해 인트라 예측 모드를 유도할 수 있다. 현재 블록이 색차 블록인 경우, 색차 블록에 대응되는 이미 복원된 휘도 블록이 존재하므로, 비디오 신호 처리 장치는 복원된 휘도 블록을 사용하여 DIMD 및 TIMD 방법 적용하여 인트라 예측 모드를 유도한 후, 유도된 인트라 예측 모드를 색차 블록의 인트라 예측 모드로 사용할 수 있다. 즉, 비디오 신호 처리 장치는 현재 블록이 휘도 블록인 경우에는 방향성 정보를 유도하고, 현재 블록이 색차 블록일 경우에는 방향성 정보를 유도하지 않을 수 있으며, 휘도 블록에서 찾은 방향성 정보를 색차 블록에 적용할 수 있다. 이러한 모드를 "DIMD Chroma" 모드 혹은 "TIMD Chroma" 모드라고 할 수 있다.
도 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인 경우 상술한 방법들은 적용될 수 있다.
도 8은 본 명세서의 일 실시예에 따른 템플릿에 기초하여 참조 픽셀 라인을 결정하는 방법을 나타낸다.
이하 템플릿에 기초하여 현재 블록을 위한(현재 블록의 복원을 위한) 최적의 참조 픽셀 라인을 결정하는 방법에 대해 설명한다. 여기서 참조 픽셀 라인은 참조 샘플 라인과 동일한 의미일 수 있다.
도 8을 참조하면 비디오 신호 처리 장치는 현재 블록에 인접한 참조 픽셀 라인을 사용하여 기준 템플릿을 구성할 수 있다. 비디오 신호 처리 장치는 참조 픽셀 라인 1, 2, 3...(Reference line 1, 2, 3 ...) 등을 사용하여 기준 템플릿의 위치에 대한 예측 샘플을 생성할 수 있다. 비디오 신호 처리 장치는 생성된 예측 샘플과 기준 템플릿의 샘플들 간 코스트를 계산할 수 있다. 이때 코스트는 SAD(Sum of Absolute Differences) 또는 MRSAD(Mean-Removed SAD) 등의 방법을 통해 계산될 수 있다. 최소 코스트에 대응되는 참조 픽셀이 최적의 참조 픽셀일 수 있다. 또한, 인코더는 계산된 코스트를 오름차순으로 재정렬하고, 참조 픽셀 라인에 대한 리스트를 구성한 후, 최적의 참조 픽셀 라인에 대한 인덱스에 대한 정보를 포함하는 비트스트림을 생성하고 시그널링할 수 있다. 디코더는 상술한 방법을 통해 참조 픽셀 라인에 대한 리스트를 구성하고, 비트스트림에 포함된 최적의 참조 픽셀 라인에 대한 인덱스를 파싱하여 인덱스가 지시하는 참조 픽셀 라인을 이용하여 예측 샘플을 생성할 수 있다. 본 명세서에서 설명하는 바와 같이, 비디오 신호 처리 장치가 템플릿에 기초하여 참조 픽셀 라인을 결정하는 방법은 TMRL(Template-based Multiple Reference Line) 방법 또는 TMRL 인트라 예측 방법으로 기술될 수 있다.
비디오 신호 처리 장치는 템플릿 코스트를 계산할 때 SAD, SATD, MR-SAD, MR-SATD 중에서 어느 하나를 사용할 수 있다. SAD(Sum of Absolute Difference)는 샘플 간 차이의 절대값의 합이고, SATD(Sum of Absolute Transformed Difference)는 샘플 간 차이를 변환한 값의 절대값의 합이고, MR-SAD(Mean Removal SAD)은 샘플 간 차이의 절대값의 합에서 평균을 뺀 값, SATD(Mean Removal SATD)은 샘플 간 차이를 변환한 값의 절대값의 합에서 평균을 뺀 값일 수 있다. 여기서 변환은 다양한 변환이 사용될 수 있으며, 실시 일 예로, 복잡도가 낮은 하다마드(Hadamard) 변환이 사용될 수 있다.
도 9는 본 명세서의 일 실시예에 따른 IBC 부호화 방법과 관련된 블록 벡터를 나타낸 도면이다.
IBC 부호화 방법(IBC 모드)은 현재 블록과 가장 유사한 부분(참조 블록)을 현재 픽쳐 내의 이미 복원된 영역에서 찾아서, 참조 블록을 현재 블록에 대한 예측 블록으로 사용하는 방법이다. 이때, 인코더는 현재 블록과 참조 블록 간의 거리인 블록 벡터(Block Vector)와 관련된 정보를 포함하는 비트스트림을 생성할 수 있다. 디코더는 비스트스림에 포함된 블록 벡터와 관련된 정보를 파싱하여 현재 블록을 위한 블록 벡터를 계산하거나 설정할 수 있다. 색차 블록에서 IBC 부호화 방법이 적용될 수 있다. 색차 블록에서는 블록 벡터를 새롭게 찾지 않고, 색차 블록에 대응되는 휘도 블록의 블록 벡터를 색차 블록의 블록 벡터로 사용할 수 있으며, 이러한 부호화 방법을 DBV(Direct Block Vector) 모드라고 할 수 있다.
RRIBC(Reconstruction-Reordered IBC) 부호화 모드는 IBC 블록(IBC 부호화 방법이 적용된 블록)에서 사용할 수 있다. RRIBC는 수직 방향 플립(flip)과 수평 방향 플립으로 구성될 수 있다. RRIBC가 적용된 블록은 현재 블록의 RRIBC 타입에 따라 복원된 블록이 뒤집히게 된다. 인코더는 현재 블록과 가장 유사한 부분을 참조 픽쳐로부터 찾기 전에 현재 부호화할 원본 블록을 플립할 수 있다. 즉, 플립된 원본 블록을 이용하여 참조 픽쳐로부터 가장 유사한 부분을 찾는다. 따라서, 예측 블록은 플립 되지 않은 블록이 사용되며, 잔차 블록도 플립되지 않은 블록일 수 있다. 디코더는 최종 복원된 블록을 현재 블록의 RRIBC 타입에 따라 플립할 수 있다.
도 10은 수평 방향으로의 RRIBC를 사용하여 현재 블록을 예측하는 방법을 나타낸다.
도 11는 수직 방향으로의 RRIBC를 사용하여 현재 블록을 예측하는 방법을 나타낸다.
도 10과 도 11의 (Xn, Yn)은 주변 블록의 중앙 위치를 나타내며, (Xc, Yc)은 현재 블록의 중앙 위치를 나타낸다. BVn
h, BVn
v 는 각각 주변 블록의 수평 방향 블록 벡터, 수직 방향 블록 벡터를 나타내고, BVC
h, BVC
v는 각각 현재 블록의 수평 방향 블록 벡터, 수직 방향 블록 벡터를 나타낸다. 도 10과 같이, 현재 블록의 RRIBC 타입이 수평 방향인 경우, BVC
h는 2 * (Xn - Xc) + BVn
h으로 계산될 수 있고, 도 11과 같이, 현재 블록의 RRIBC 타입이 수직 방향인 경우, BVC
v는 2 * (yn - yc) + BVn
v로 계산될 수 있다. 이때, BVn
h, BVn
v는 복원된 블록을 사용하므로, BVn
h, BVn
v의 부호는 음수일 수 있다.
현재 블록이 RRIBC로 부호화되는 경우, 비디오 신호 처리 장치는 블록 벡터 후보 리스트를 구성하여 최적의 블록 벡터를 결정할 수 있다. 이때, 비디오 신호 처리 장치는 현재 블록의 RRIBC 타입에 따라 블록 벡터 후보 리스트를 구성할 수 있다. 예를 들어, 현재 블록의 RRIBC 타입이 수평 방향인 경우, 비디오 신호 처리 장치는 수평 방향의 RRIBC로 부호화된 현재 블록의 주변 블록만을 사용하여 블록 벡터 후보 리스트를 구성할 수 있다. 또한, 비디오 신호 처리 장치는 현재 블록의 RRIBC 타입에 상관없이 블록 벡터 후보 리스트를 구성할 수 있다. 예를 들어, 현재 블록의 RRIBC 타입이 수평 방향인 경우, 수평 방향의 RRIBC로 부호화된 현재 블록의 주변 블록뿐만 아니라 수직 방향의 RRIBC로 부호화된 현재 블록의 주변 블록 및/또는 일반적인 움직임으로 부호화된 블록 및/또는 블록 벡터로 부호화된 블록을 모두 사용하여 블록 벡터 후보 리스트를 구성할 수 있다.
비디오 신호 처리 장치가 현재 블록을 일반적인 움직임을 사용하여 예측하는 경우, 비디오 신호 처리 장치는 현재 블록의 주변 블록이 IBC 모드로 부호화되었는지, RRIBC 모드로 부호화되었는지에 따라 움직임 후보 리스트를 구성할 수 있다. 이때, 비디오 신호 처리 장치는 현재 블록의 주변 블록이 RRIBC 모드로 부호화된 경우, RRIBC 타입을 추가적으로 고려하여 움직임 후보 리스트를 구성할 수 있다. 예를 들어, 비디오 신호 처리 장치가 현재 블록에 대한 움직임 후보 리스트를 구성할 때, 현재 블록의 주변 블록의 부호화 모드가 RRIBC 모드이고 RRIBC 타입이 수직 방향 또는 수평 방향인 경우, 주변 블록의 블록 벡터는 움직임 후보 리스트에 포함되지 않을 수 있다. 또는 비디오 신호 처리 장치가 현재 블록을 일반적인 움직임을 사용하여 예측하는 경우, 비디오 신호 처리 장치는 현재 블록의 주변 블록의 부호화 모드와 무관하게 움직임 후보 리스트를 구성할 수 있다. 즉, 비디오 신호 처리 장치는 현재 블록의 주변 블록이 IBC 모드로 부호화되었는지, RRIBC 모드로 부호화되었는지와 상관없이 움직임 후보 리스트를 구성할 수 있다. 예를 들어, 비디오 신호 처리 장치는 현재 블록에 대한 움직임 후보 리스트를 구성할 때, 현재 블록의 주변 블록의 부호화 모드가 IBC 모드이고 RRIBC 타입이 수직 방향 또는 수평 방향인 경우에도 주변 블록의 블록 벡터를 움직임 후보 리스트에 포함시킬 수 있다.
RRIBC 부호화 방법은 대칭적인 특성을 지니는 영상에 효과적이다. 대칭적인 특성은 현재 블록과 참조 블록 사이의 하나의 중심축을 기준으로 동일한 거리만큼 떨어진 완전한 수평(또는 수직) 방향의 대칭을 의미할 수 있다. 현재 블록의 수직(또는 수평) 방향(대칭축)은 참조 블록의 수직(또는 수평) 방향(대칭축)과 동일한 선 상에 위치할 수 있다. 이 경우, 수직(또는 수평) 방향의 블록 벡터는 '0'으로 설정될 수 있으며, 수평 방향의 블록 벡터에는 '0'이 아닌 임의의 음수 값이 설정될 수 있다. 현재 블록과 참조 블록은 현재 블록과 참조 블록 사이의 하나의 중심축을 기준으로 서로 다른 거리만큼의 차이를 갖는 대칭으로 구성될 수 있으며, 현재 블록과 참조 블록은 서로 다른 수직선 상에 위치할 수 있다. 이 경우, 수직 방향의 블록 벡터는 '0'이 아닌 임의의 음수 값으로 설정될 수 있다. 즉, 비디오 신호 처리 장치는 수평 및 수직 방향이 모두 '0'이 아닌 임의의 음수 값의 블록 벡터 값을 가지는 대칭 블록을 사용하여 현재 블록을 부호화 또는 복호화 할 수 있다.
도 12는 본 명세서의 일 실시예에 따른 Intra TMP 모드로 부호화된 블록의 블록 벡터를 나타낸다.
도 12를 참조하면 Intra TMP 방법(Intra TMP 부호화 모드)은 비디오 신호 처리 장치가 현재 블록에 인접한 주변 블록의 화소 값들을 사용하여 기준 템플릿을 구성한 후, 기준 템플릿과 가장 유사한 부분을 현재 픽쳐 내의 이미 복원된 영역(참조 블록)에서 찾은 후, 참조 블록(도 12의 Ref. luma block)을 현재 블록에 대한 예측 블록으로 사용하는 방법이다. 이때, 현재 휘도 블록에 대한 예측 블록을 생성하는 데 사용되는 블록 벡터는 하나 이상일 수 있으며, 도 12은 블록 벡터가 2개인 경우를 보여준다. 비디오 신호 처리 장치는 현재 휘도 블록의 2개의 블록 벡터로부터 예측된 참조 블록들을 가중치 평균하여 휘도 블록에 대한 예측 블록을 생성할 수 있다. 이를 fusion 모드라 지칭할 수 있다. 색차 블록의 경우, 비디오 신호 처리 장치는 색차 블록에 대응되는 휘도 블록으로부터 블록 벡터를 유도한 후, 블록 백터를 사용하여 색차 예측 블록을 생성할 수 있다. 현재 색차 블록에 대한 예측 블록을 생성하는 데 사용되는 블록 벡터는 하나 이상일 수 있으며, 도 12은 색차 블록을 위한 블록 벡터가 2개인 경우를 보여준다. 이때 색차 블록의 블록 벡터는 휘도 블록으로부터 유도된 블록 벡터와 같거나 다를 수 있다. Intra TMP 모드에서 비디오 신호 처리 장치는 블록 벡터가 지시하는 참조 블록 주변의 샘플과 현재 블록 주변의 샘플 간의 상관성을 이용하여 필터 계수를 유도하고, 유도된 필터 계수를 사용하여 블록 벡터가 지시하는 참조 블록에 필터링을 적용할 수 있다. 비디오 신호 처리 장치는 필터링된 참조 블록을 현재 블록의 예측 블록으로 사용할 수 있다. 이를 Intra TMP 필터링 모드라 지칭할 수 있다. Intra TMP 모드에서 비디오 신호 처리 장치는 움직임 정보를 이용한 LIC 방법과 유사하게 블록 벡터를 통해 현재 예측 블록에 대한 보상을 적용할 수 있다.
현재 블록이 GPM 모드와 같이 사선을 사용하여 2개 영역으로 분할되었고, 분할된 영역이 모두 인트라 예측 모드(혹은 IBC 모드, 혹은 Intra TMP)를 사용하여 예측되는 경우, 이를 Spatial GPM (SGPM)모드라고 할 수 있다. 따라서, 분할된 2개 영역에 사용될 수 있는 모드의 조합은 (인트라 예측 모드, 인트라 예측 모드), (인트라 예측 모드, IBC 모드), (IBC 모드, 인트라 예측 모드), (IBC 모드, IBC 모드) 중에 하나가 될 수 있다. 또한, 상기 조합에서 IBC 모드는 Intra TMP 모드로 변경될 수 있으며, (IBC 모드, Intra TMP 모드) 의 조합도 가능할 수 있다.
도 13은 본 명세서의 일 실시예에 따른 GPM 모드에 의해 현재 블록이 분할된 경우, 분할된 영역이 IBC 모드로 부호화되는 경우를 나타낸다.
현재 블록은 IBC-GPM 모드로 부호화 혹은 복호화 될 수 있다. IBC-GPM 모드는 현재 블록이 GPM 모드를 사용하여 분할되고, 분할된 영역이 인트라 예측 모드 혹은 IBC 예측 모드로 부호화되는 모드를 의미할 수 있다. 도 13을 참조하면 현재 블록은 점선을 기준으로 2개 영역으로 분할될 수 있다. 이때, 분할된 영역 중 어느 하나는 인트라 예측 모드로 부호화될 수 있고, 나머지 하나는 IBC 예측 모드로 부호화될 수 있다. 예를 들어, 분할된 영역 중 왼쪽 영역은 인트라 예측 모드로 부호화되고, 오른쪽 영역은 IBC 예측 모드로 부호화될 수 있다. 이때, IBC 예측 모드로 부호화된 영역은 Intra TMP 예측 모드로 부호화될 수 있고, 이를 IntraTMP-GPM 모드라 기술할 수 있다.
도 14는 본 명세서의 일 실시예에 따른 현재 블록이 IBC-CIIP 모드로 부호화되는 방법을 나타낸다.
비디오 신호 처리 장치는 인트라 모드로 예측된 블록과 IBC 모드로 예측된 블록 간의 가중치 평균을 이용하여 현재 블록을 예측할 수 있고, 이를 IBC-CIIP 모드라고 할 수 있다. 이때, IBC 모드로 예측된 블록 대신 Intra TMP 모드로 예측된 블록이 사용될 수 있고, 이를 IntraTMP-CIIP 모드라고 할 수 있다.
비디오 신호 처리 장치는 현재 블록의 휘도 예측 블록과 휘도 블록에 대한 잔차 신호를 더하여 복원되는 휘도 블록을 획득하고, 복원된 휘도 블록과 휘도 예측 블록 간의 상관성을 이용하여 CCP 모델을 구성할 수 있다. 이때 CCP 모델은 CCLM, MMLM, GLM, CCCM, MM-CCCM, GL-CCCM, CCCM-ND, CCCM-MDF 중에 하나가 될 수 있다. 휘도 블록으로부터 유도된 CCP 모델을 색차 예측 블록에 적용하여 CCP 모델이 적용된 제1 색차 예측 블록을 생성할 수 있다. 제1 색차 예측 블록과 색차 블록에 대한 오차 신호를 더하여 최종 색차 블록을 생성할 수 있다.
현재 휘도 블록이 Intra TMP 또는 IBC 모드로 부호화된 경우, 비디오 신호 처리 장치는 현재 휘도 블록의 블록 벡터가 지시하는 참조 블록의 휘도 블록과 색차 블록 간 상관 관계를 통해 CCP 모델을 유도할 수 있다. 유도된 CCP 모델과 현재 복원된 휘도 블록을 사용하여 현재 블록에 대한 색차 예측 블록인 Cb, Cr 예측 블록을 생성할 수 있다. 이를 BVG CCP(block vector guided cross component prediction) 라고 지칭한다. CCP 모델은 CCLM, MMLM, GLM, MM-GLM, CCCM, MM-CCCM, GL-CCCM, GL-MM-CCCM, CCCM-ND, MM-CCCM-ND, CCCM-MDF, MM-CCCM-MDF, 및 Chroma Fusion 중 적어도 하나를 초함할 수 있다. CCCM 모델이 적용되는 경우, BVG CCCM이라 지칭할 수 있다. GL-CCCM 모델이 적용되는 경우, BVG GL-CCCM이라 지칭할 수 있다. 또한, BVG CCP에 다양한 CCP 모델이 적용될 수 있다.
CCP 모델의 타입은 CCLM, MMLM, GLM, MM-GLM, CCCM, MM-CCCM, GL-CCCM, MM-GL-CCCM, CCCM-ND, MM-CCCM-ND, CCCM-MDF, MM-CCCM-MDF, 크로마 퓨전, BVG-CCCM, 및 CCP 머지 중 적어도 하나를 를 포함할 수 있다. MMLM은 2개의 CCLM으로 구성될 수 있다. CCP 모델 사이의 CCP 모델의 타입이 다를 경우, 서로 다른 CCP 모델이라 할 수 있다. CCP 모델 사이의 CCP 모델의 타입이 동일하지만 CCP 모델 사이의 파라미터가 다를 경우, 서로 다른 CCP 모델이라 할 수 있다. CCP 모델 사이의 CCP 모델의 개수가 다를 경우, 예컨대, 제1 CCP 모델은 하나의 CCLM으로 구성되고, 제2 CCP 모델은 2개의 CCLM으로 구성된 경우, 서로 다른 CCP 모델이라 할 수 있다. CCP 모델의 타입을 CCP 모드라 지칭할 수 있다.
크로마 퓨전(chroma fusion, CF)에서 비디오 신호 처리 장치는 LM(linear model) 모드를 사용하지 않고 인트라 예측 모드를 통해 예측한 색차 블록과 현재 휘도 블록 사이의 가중 평균을 통해 색차 신호를 예측할 수 있다. 이때, 가중치 파라미터는 CCCM 방식을 사용하여 유도될 수 있다.
GLM(Gradient Linear Model)에서 비디오 처리 장치는 선형 모델에서 색차 샘플에 대응되는 휘도 샘플과 해당 휘도 샘플에 인접한 주변의 휘도 샘플들 사이의 기울기를 추가로 반영하여 모델을 구성하고, 해당 모델을 통해 색차 신호를 예측할 수 있다.
색차 블록을 예측하기 위해 사용되는 CCP 모델은 현재 블록의 주변 블록에서 사용한 CCP 모델을 통해 CCP 후보 리스트를 구성하고, CCP 후보 리스트에서 최적의 CCP 후보를 유도할 수 있다. 이를 CCP 머지 모드라 할 수 있다.
도 15는 본 명세서의 일 실시예에 따른 CCCM 파라미터를 유도하기 위해 사용되는 참조 영역 및 필터 형태의 일 예를 나타낸다.
CCCM(Convolutional cross-component intra prediction model)은 휘도 신호와 휘도 신호와 동일한 위치에 있는 색차 신호 간의 높은 상관성을 이용하여 구성되는 비선형 모델을 모델을 통해 색차 신호를 예측하는 방법이다. 도 15(a)는 현재 예측 블록(사선 빗금, 1510)에 CCCM이 적용되기 위한 참조 샘플들(수직 빗금, 1520)과 십자 모양의 필터를 적용할 때 필요한 사이드(side) 샘플(수평 빗금)의 위치 관계를 나타내고 있다. 현재 예측 블록(MxN)은 크로마 대 루마의 샘플 개수 비율은 1:1 관계에서 상측 6줄의 참조 샘플(2Mx6), 좌측 6줄의 참조 샘플(6x2N) 및 좌-상단의 6x6 참조 샘플들로 구성될 수 있다. 비디오 신호 처리 장치가 CCCM을 위해 십자형 샘플(도 15(b)) 필터를 크로마 샘플 예측 관계식에(도 15(c)) 적용할 때 참조 샘플 영역을 벗어나는 경우가 발생한다. 이때, 추가로 필요한 샘플들이 사이드 샘플일 수 있다. 도 15(c)의 크로마 샘플 예측 관계식은 크로마 성분 각각(즉, Cb, Cr)에 대해 적용될 수 있다. 도 15(b)의 C (Center) 위치의 샘플은 Cb, Cr 크로마 샘플들에 대응되는 루마 샘플 일수 있고, N (North), E (East), S (South), W (West)는 C위치의 루마 샘플과 인접한 루마 샘플들일 수 있다. 사이드 샘플은 C 샘플의 위치에 따라 참조 샘플 이외의 영역에 대해 한 샘플씩 추가로 필요할 수 있다. 사이드 샘플의 위치에 존재하는 샘플 값이 이용가능하지 않은 경우, 이용가능하지 않은 위치의 샘플 값은 C 샘플 값으로 패딩될 수 있다. 도 15(c)의 P 값은 비선형적 항(nonlinear term)일 수 있다. P 값은 P = ( C*C + midVal ) >> bitDepth 으로 계산될 수 있으며, 10 비트 컨텐츠인 경우 P = ( C*C + 512 ) >> 10 일 수 있다. 도 15(c)에서 B 값은 바이어스 값으로 정수 오프셋 값일 수 있다. B 값은 bitDepth(비트 심도)의 중간 값일 수 있다. 10 비트 컨텐츠일 경우, B 값은 512일 수 있다.
MM-CCCM(multi-model CCCM)은 참조 영역(또는 복원된 현재 휘도 블록)의 평균값에 기초하여 2개의 CCCM 파라미터를 유도하는 방법이다.
GL-CCCM(Gradient and location based convolutional cross-component model)은 그래디언트(Gradient) 와 위치(location) 정보를 이용한 추가적인 CCCM 모드이다. 기존의 CCCM 모드의 경우, 비디오 신호 처리 장치는 예측할 색차 샘플 위치에서 대응되는 위치에 있는 휘도 샘플과 그 휘도 샘플 주변의 4개 샘플 그리고 계수 정보를 사용하여 현재 블록에 대한 색차 샘플을 유도할 수 있다. 이때, GL-CCCM 모드의 경우, 비디오 신호 처리 장치는 예측할 색차 샘플 위치에서 대응되는 위치에 있는 휘도 샘플과 그 휘도 샘플 주변의 8개 샘플들에 대한 수직, 수평 차이를 반영하고, 또한 현재 휘도 샘플의 위치 값과 그것의 계수 정보를 사용하여 현재 블록에 대한 색차 샘플을 유도할 수 있다.
CCCM 모드가 적용될 때, 비디오 신호 처리 장치는 휘도 블록과 색차 블록 간의 해상도 차이를 맞추기 위해서 다운 샘플링 필터를 적용할 수 있다. 휘도 블록을 색차 블록의 해상도로 낮추기 위함이다. 다운 샘플링 필터를 적용하는 모드는 CCCM-MDF(CCCM with multiple downsampling filters)라 기술될 수 있다.
현재 블록에 인터 부호화 모드가 적용된 경우, 비디오 신호 처리 장치는 현재 블록의 움직임 정보를 사용하여 유도된 휘도 예측 블록(Y')과 현재 블록의 움직임 정보를 사용하여 유도된 제1 색차 예측 블록(Cb', Cr') 간의 선형 및 비선형 모델을 유도한 후(Derive filter), 현재 블록의 휘도 잔차 블록을 이용하여 현재 블록의 복원된 휘도 블록을 생성하고, 상기 유도된 선형 및 비선형 모델을 현재 블록의 복원된 휘도 블록에 적용(Apply filter)하여 현재 블록의 제2 색차 예측 블록을 생성할 수 있다. 이후, 비디오 신호 처리 장치는 선형 및 비선형 모델을 이용하여 예측된 현재 블록의 제2 색차 예측 블록에 색차 잔차 블록을 더하여 최종적으로 현재 블록의 색차 블록(Cb, Cr)을 생성할 수 있다. 이러한 방법은 CCRM(cross-component residual model)이라 기술될 수 있다. CCRM, Inter CCCM, Inter CCP 는 동일한 의미일 수 있다.
코딩 효율을 높이기 위하여 전술한 잔여 신호를 그대로 코딩하는 것이 아니라, 잔여 신호를 변환하여 획득된 변환 계수 값을 양자화하고, 양자화된 변환 계수를 코딩하는 방법이 사용될 수 있다. 전술한 바와 같이, 변환부는 잔여 신호를 변환하여 변환 계수 값을 획득할 수 있다. 이때, 특정 블록의 잔여 신호는 현재 블록의 전 영역에 분산되어 있을 수 있다. 이에 따라, 잔여 신호에 대한 주파수 영역 변환을 통해 저주파 영역에 에너지를 집중시켜 코딩 효율을 향상시킬 수 있다.
인코더는 현재 블록에 대한 잔여 신호를 포함하는 적어도 하나의 잔여 블록을 획득할 수 있다. 잔여 블록은 현재 블록 또는 현재 블록으로부터 분할된 블록들 중 어느 하나일 수 있다. 본 명세서에서, 잔여 블록은 현재 블록의 잔여 샘플들을 포함하는 잔여 어레이(array) 또는 잔여 매트릭스(matrix)로 기술될 수 있다. 또한 본 명세서에서 잔여 블록은 변환 유닛 또는 변환 블록의 크기와 동일한 크기의 블록을 나타낼 수 있다.
인코더는 변환 커널을 사용하여 잔여 블록을 변환할 수 있다. 잔여 블록에 대한 변환에 사용되는 변환 커널은 수직 변환 및 수평 변환의 분리 가능한 특성을 가지는 변환 커널일 수 있다. 이 경우, 잔여 블록에 대한 변환은 수직 변환 및 수평 변환으로 분리되어 수행될 수 있다. 예를 들어, 인코더는 잔여 블록의 수직 방향으로 변환 커널을 적용하여 수직 변환을 수행할 수 있다. 또한, 인코더는 잔여 블록의 수평 방향으로 변환 커널을 적용하여 수평 변환을 수행할 수 있다. 본 명세서에서, 변환 커널은 변환 매트릭스, 변환 어레이, 변환 함수, 변환과 같이 잔여 신호의 변환에 사용되는 파라미터 세트를 지칭하는 용어로 사용될 수 있다. 일 실시예에 따라, 변환 커널은 복수의 사용 가능한 커널들 중 어느 하나일 수 있다. 또한, 수직 변환 및 수평 변환 각각에 대해 서로 다른 변환 타입에 기반한 변환 커널이 사용될 수도 있다. 즉, 1차 변환을 수행하기 전에, 현재 블록의 인트라 예측 모드, 부호화 모드, 비트스트림으로부터 파싱된 변환 방법, 현재 블록의 크기 정보 중에서 적어도 하나 이상을 사용하여 수직 및 수평 방향에 대한 변환 방법이 유도될 수 있다. 또한, 크기가 큰 블록에 대하여 변환 과정에서의 계산 복잡도를 감소시키기 위하여 저주파 영역만을 남기고 고주파 영역은 '0'로 처리하는 과정이 수행될 수 있다. 이러한 과정을 고주파 제로화(zeroing)라고 하며, 이러한 제로화를 위해서 실제 1차 변환 시의 변환 크기가 설정될 수 있다. 고주파 제로화 과정에서 저주파 영역은 임의의 정해진 크기로 설정될 수 있으며, 예를 들어, 가로 또는 세로의 크기는 4, 8, 16, 32 등의 조합이 될 수 있다.
인코더는 잔여 블록으로부터 변환된 변환 블록을 양자화부로 전달하여 양자화할 수 있다. 이때, 변환 블록은 복수의 변환 계수들을 포함할 수 있다. 구체적으로, 변환 블록은 2차원 배열된 복수의 변환 계수들로 구성될 수 있다. 변환 블록의 크기는 잔여 블록과 마찬가지로 현재 블록 또는 현재 블록으로부터 분할된 블록 중 어느 하나와 동일할 수 있다. 양자화부로 전달된 변환 계수들은 양자화된 값으로 표현될 수 있다.
또한, 인코더는 변환 계수가 양자화되기 전에 추가적인 변환을 수행할 수 있다. 전술한 변환 방법은 1차 변환(primary transform)으로 지칭되고, 추가적인 변환은 2차 변환(secondary transform)으로 지칭될 수 있다. 2차 변환은 잔여 블록 별로 선택적일 수 있다. 일 실시예에 따라, 인코더는 1차 변환만으로 저주파 영역에 에너지를 집중시키기 어려운 영역에 대해 2차 변환을 수행하여 코딩 효율을 향상시킬 수 있다. 예를 들어, 잔여 값들이 잔여 블록의 수평 또는 수직 방향 이외의 방향에서 크게 나타나는 블록에 대해 2차 변환이 추가될 수 있다. 인트라 예측된 블록의 잔여 값들은 인터 예측된 블록의 잔여 값들에 비해 수평 또는 수직 방향 이외의 방향으로 변화할 확률이 높을 수 있다. 이에 따라, 인코더는 인트라 예측된 블록의 잔여 신호에 대해 2차 변환을 추가적으로 수행할 수 있다. 또한, 인코더는 인터 예측된 블록의 잔여 신호에 대해 2차 변환을 생략할 수 있다. 2차 변환 과정에서도 1차 변환에서의 고주파 제로화가 수행될 수 있다.
다른 예로, 현재 블록 또는 잔여 블록의 크기에 따라, 2차 변환 수행 여부가 결정될 수 있다. 또한, 현재 블록 또는 잔여 블록의 크기에 따라 크기가 서로 다른 변환 커널이 사용될 수 있다. 예를 들어, 너비 또는 높이 중 짧은 변의 길이가 제1 기 설정된 길이 보다 크거나 같은 블록에 대해서는 8X8 2차 변환이 적용될 수 있다. 또한, 너비 또는 높이 중 짧은 변의 길이가 제2 기 설정된 길이 보다 크거나 같고, 제1 기 설정된 길이 보다 작은 블록에 대해서는 4X4 2차 변환이 적용될 수 있다. 이때, 제1 기 설정된 길이는 제2 기 설정된 길이 보다 큰 값일 수 있으나, 본 개시가 이에 제한되는 것은 아니다. 또한, 2차 변환은 1차 변환과 달리 수직 변환 및 수평 변환으로 분리되어 수행되지 않을 수 있다. 이러한 2차 변환은 저대역 비-분리 변환(Low Frequency Non-Separable Transform, LFNST)으로 지칭될 수 있다.
또한, 특정 영역의 비디오 신호의 경우, 급격한 밝기 변화로 인해 주파수 변환을 수행하여도 고주파 대역 에너지가 줄어들지 않을 수 있다. 이에 따라, 양자화에 의한 압축 성능이 저하될 수 있다. 또한, 잔여 값이 드물게 존재하는 영역에 대해 변환을 수행하는 경우, 인코딩 시간 및 디코딩 시간이 불필요하게 증가할 수 있다. 이에 따라, 특정 영역의 잔여 신호에 대한 변환은 생략될 수 있다. 특정 영역의 잔여 신호에 대한 변환 수행 여부는 특정 영역의 변환과 관련된 신택스 요소에 의해 결정될 수 있다. 예를 들어, 상기 신택스 요소는 변환 스킵 정보(transform skip information)를 포함할 수 있다. 변환 스킵 정보는 변환 스킵 플래그(transform skip flag)일 수 있다. 잔여 블록에 대한 변환 스킵 정보가 변환 스킵을 나타내는 경우, 해당 잔여 블록에 대한 변환이 수행되지 않는다. 이 경우, 인코더는 해당 영역의 변환이 수행되지 않은 잔여 신호를 곧바로 양자화할 수 있다.
전술한 변환 관련 신택스 요소들은 비디오 신호 비트스트림으로부터 파싱된 정보일 수 있다. 디코더는 비디오 신호 비트스트림을 엔트로피 디코딩하여 변환 관련 신택스 요소들을 획득할 수 있다. 또한, 인코더는 변환 관련 신택스 요소들을 엔트로피 코딩하여 비디오 신호 비트스트림을 생성할 수 있다.
디코더에서는 전송된 비트스트림을 파싱하여 디코딩하는데 필요한 부호화 정보들을 획득할 수 있다. 이 때 변환 과정과 관련된 정보에는 1차 및 2차 변환 타입에 대한 인덱스 정보 및 양자화된 변환 계수 등이 있다. 역변환부는 역양자화된 변환 계수를 역변환하여 잔여 신호를 획득할 수 있다. 먼저, 역변환부는 특정 영역의 변환 관련 신택스 요소로부터 해당 영역에 대한 역변환이 수행되는지 검출할 수 있다. 일 실시예에 따라, 특정 변환 블록에 대한 변환 관련 신택스 요소가 변환 스킵을 나타내는 경우, 해당 변환 블록에 대한 변환이 생략될 수 있다. 이 경우, 변환 블록에 대해 1차 역변환 및 2차 역변환이 모두 생략될 수 있다. 또한, 역양자화된 변환 계수는 잔여 신호로 사용될 수 있다. 예를 들어, 디코더는 역양자화된 변환 계수를 잔여 신호로 사용하여 현재 블록을 복원할 수 있다. 혹은 2차 역변환은 수행되고 1차 역변환은 생략될 수 있으며, 2차 역변환된 값이 잔여 신호로 사용될 수 있다. 전술한 1차 역변환은 1차 변환에 대한 역변환을 나타내며, 역 1차 변환(inverse primary transform)으로 지칭될 수 있다. 2차 역변환은 2차 변환에 대한 역변환을 나타내며, 역 2차 변환(inverse secondary transform) 또는 inverse LFNST로 지칭될 수 있다. 본 발명에서 1차 (역)변환은 제1 (역)변환으로 지칭될 수 있으며, 2차 (역)변환은 제2 (역)변환으로 지칭될 수 있다.
도 16은 본 명세서의 일 실시예에 따른 비디오 코딩에 사용될 수 있는 변환 커널 종류를 나타낸다.
도 16은 MTS에 적용되는 DCT-II, DCT-V (discrete cosine transform type-V), DCT-VIII (discrete cosine transform type-VIII), DST-I (discrete sine transform type-I), DST-VII 커널의 수식을 나타낸 것이다. DCT와 DST는 각각 cosine, sine의 함수로 표현이 가능하며, 샘플 수 N에 대한 변환 커널의 기저 함수를 Ti(j)로 표현할 경우, 인덱스 i는 주파수 도메인에서의 인덱스를 나타내며, 인덱스 j는 기저 함수 내의 인덱스를 나타낸다. 즉, i가 작아질수록 저주파 기저 함수를 나타내며, i가 커질수록 고주파 기저 함수를 나타낸다. 기저 함수 Ti(j)는 2차원 행렬로 표현했을 때, i 번째 행의 j 번째 요소를 나타낼 수 있으며, 도 16에 도시한 변환 커널은 모두 분리 가능한 특성을 가지고 있으므로, 잔차 신호 X에 대하여 가로 방향과 세로 방향에 각각 변환을 수행할 수 있다. 즉, 잔차 신호 블록을 X라 하고, 변환 커널 행렬을 T라 했을 때, 잔차 신호 X에 대한 변환은 TXT'으로 나타낼 수 있다. 이때, T'는 변환 커널 행렬 T의 전치행렬 (transpose)를 의미한다. DCT와 DST는 정수가 아닌 소수 형태이므로, 이를 그대로 하드웨어 부호화기, 복호화기에 구현하기에는 부담이 따른다. 따라서 소수 형태의 변환 커널에 scaling과 rounding을 통해 정수 형태의 변환 커널로 근사화시켜야 한다. 변환 커널의 정수 정밀도는 8-bit 또는 10-bit로 결정될 수 있으나, 정밀도가 떨어질 경우, 부호화 효율이 감소할 수 있다. 근사화에 따라 DCT와 DST의 정규 직교 (orthonormal) 성질은 유지되지 않을 수 있으나, 이에 따른 부호화 효율 손실이 크지 않으므로, 변환 커널을 정수 형태로 근사화 시키는 것이 하드웨어 부호화기, 복호화기 구현 측면에서 유리하다. IDTR(Identity Transform)은 변환의 결과가 변환 전의 자기 자신이 나오는 변환으로, 항등변환이라고 한다. 일반적으로 항등변환은 행과 열이 동일한 값을 가지는 위치에 '1'을 설정하여 변환 매트릭스를 구성한다. 하지만, 여기서 항등변환은 '1'값이 아닌 임의의 고정된 값을 사용하여, 입력된 잔차 신호의 값을 동일하게 높이거나 줄이는데 사용한다.
상술한 1차 변환인 MTS 변환에서 변환은 오차 블록의 수직 방향과 수평 방향에 대해 각각 변환 커널이 적용되어 계산되므로, 분리가능한 변환(separable transform) 방식이라고 할 수 있다. 반면에 상술한 2차 변환인 LFNST 변환에서 변환은 수직 방향과 수평 방향에 대해 각각 변환 커널을 적용되지 않고 변환 커널은 한번만 적용되어 계산되므로, 비분리 변환(non-separable transform) 방식이라고 할 수 있다. 또한, 상술한 2차 변환은 DCT-2 변환이 적용된 블록의 1차 변환된 변환 계수에 대해 추가로 적용되는 것이므로, 2단계 변환 기법이라고 할 수 있다. 상술한 2차 변환은 부호화 효율은 높지만 총 3번의 변환 커널이 적용되므로, 복잡하다는 단점이 있다. 이러한 복잡도를 줄이기 위해서, 2차 변환 방식만으로 변환을 적용하는 방식인 NSPT(Non-separable primary transform) 방식이 적용될 수 있다. NSPT 변환 방식은 비분리 변환 방식으로, 오차 블록의 수직 방향과 수평 방향에 대해 각각 변환 커널을 적용하지 않고 변환 커널을 한번만 적용하여 계산된다. 비디오 신호 처리 장치에서 현재 블록의 오차 블록은 MTS, DCT2 + LFNST, NSPT 변환 방식 중에서 하나의 변환 방식을 사용하여 변환 또는 역변환이 수행될 수 있다.
NSPT 변환은 기존의 DCT2 + LFNST 변환 방법을 대체하는 변환 방식일 수 있다. 변환 블록의 크기가 16x16보다 같거나 작은 블록에 대하여, 변환 블록의 크기에 따라 NSPT4x4(16x16 kernel), NSPT4x8(32x20 kernel), NSPT8x4(32x20 kernel), NSPT8x8(64x32 kernel), NSPT4x16(64x24 kernel), NSPT16x4(64x24 kernel), NSPT8x16(128x40 kernel), NSPT16x8(128x40 kernel), NSPT4x32(128x20 kernel), NSPT32x4(128x20 kernel), NSPT8x32(256x24 kernel), NSPT32x8(256x24 kernel) 중 어느 하나의 커널이 적용될 수 있다. NSPT는 LFNST와 유사하게 35 개의 변환 커널 세트로 구성되고, 각 세트당 3개의 후보로 구성될 수 있다. 인코더는 인트라 예측 모드에 따라 변환 커널 세트를 유도한 후, 3개의 후보 중에서 최적의 후보에 대한 인덱스에 대한 정보를 포함하는 비트스트림을 생성하고 시그널링할 수 있다. 디코더는 시그널링된 인덱스에 대한 정보를 파싱한 후, 인트라 예측 모드를 사용하여 유도된 변환 커널 세트 중에서 인덱스 정보가 지시하는 변환 커널 후보를 사용하여 현재 변환 계수를 역변환하고, 잔차 블록을 획득할 수 있다. NSPT가 적용된 4x4 블록에는 제로-아웃이 수행되지 않을 수 있다. 또한, NSPT의 커널의 크기에 따라 제로-아웃되는 계수의 개수가 달라질 수 있다. 예를 들어, 4x8 블록 또는 8x4 블록에는 32x20 크기의 NSPT가 적용될 수 있다. 따라서, 32개 변환 계수 중 20개 변환 계수만를 제외한 나머지 12개 변환 계수는 제로-아웃될 수 있다.
도 17은 본 명세서의 일 실시예에 따른 LFNST 및 NSPT 변환에 대한 변환 세트 테이블을 나타낸다.
LFNST 및 NSPT 변환에서 사용되는 변환 세트는 35가지가 존재할 수 있으며, 인트라 예측 모드(도 6 참고)에 따라 달라질 수 있다. 즉, 비디오 신호 처리 장치는 도 17의 변환 세트 테이블을 참고하여, 인트라 예측 모드(도 6 참고)에 대응되는 LFNST 및 NSPT 변환의 변환 세트 인덱스를 유도할 수 있다. 또한, LFNST 및 NSPT 변환 세트는 인트라 예측 모드, 현재 블록이 휘도 블록인지 혹은 색차 블록인지 여부 정보, 현재 블록의 가로 및 세로의 크기, 현재 블록의 인트라 예측 방향성 모드가 확장 각도 모드인지 여부에 따라 달라질 수 있다. 하나의 변환 세트마다 임의의 개수만큼의 변환 매트릭스가 존재할 수 있다. 여기서, 임의의 개수는 1이상의 정수일 수 있으며, 3일 수 있다. 인코더에서는 변환 세트 내의 여러 개의 변환 매트릭스 중에서 최적의 변환 매트릭스에 대한 인덱스 정보를 비트스트림에 포함시켜서 시그널링할 수 있다. 디코더에서는 최적의 변환 매트릭스에 대한 인덱스를 파싱한 후, 변환 세트에서 인덱스에 대응되는 변환 매트릭스를 사용하여 역변환을 적용할 수 있다.
도 18은 본 명세서의 일 실시예에 따른 다중 변환 세트 및 LFNST/NSPT 세트를 유도하는 방법을 나타낸다.
도 18(a)를 참조하면 인코더는 잔차 블록(residual block)에 대하여 MTS, DCT2 + LFNST, NSPT 중에서 어느 하나를 적용할지 선택할 수 있으며, 선택된 변환 방법에 기초하여 잔차 블록을 변환하고 변환 계수를 획득할 수 있다. 이때, 인코더는 어떠한 변환 방법을 적용하였는지에 대한 정보를 비트스트림에 포함하여 시그널링할 수 있다. 잔차 블록에 MTS 변환이 적용된 경우, MTS 변환이 적용되어 잔차 블록의 변환 계수가 획득될 수 있고, LFNST와 NSPT 변환은 적용되지 않을 수 있다. 잔차 블록에 DCT2 + LFNST 변환이 적용된 경우, 인코더는 잔차 블록에 대하여 DCT2 변환을 적용하여 1차 변환 계수를 획득할 수 있으며, 1차 변환 계수에 대하여 LFNST 변환을 적용하여 2차 변환 계수를 획득할 수 있다. 이때, MTS와 NSPT 변환은 적용되지 않을 수 있다. 잔차 블록에 NSPT 변환이 적용된 경우, 비디오 인코더는 잔차 블록에 대하여 NSPT 변환을 적용하여 변환 계수를 출력할 수 있고, 이때, 잔차 블록에 대해 MTS와 DCT2 + LFNST 변환은 적용되지 않을 수 있다.
도 18(b)를 참조하면 디코더는 비트스트림으로부터 어떠한 변환 방법이 적용되었는지에 대한 정보를 파싱하고, 파싱된 정보에 기초하여 현재 변환 계수에 대하여 MTS, DCT2 + LFNST, NSPT 중에서 어느 하나의 역변환 방법을 적용되는지 여부를 결정할 수 있다. 그리고, 디코더는 결정된 변환 방법에 기초하여 변환 계수에 대해 역변환을 수행하고, 잔차 블록을 획득할 수 있다. 현재 변환 계수에 MTS 변환이 적용된 경우, 디코더는 변환 계수에 대하여 MTS 역변환을 수행하여 잔차 블록을 획득할 수 있고, 이때, LFNST와 NSPT 역변환은 적용되지 않을 수 있다. 2차 변환 계수에 DCT2 + LFNST 변환이 적용된 경우, 디코더는 2차 변환 계수에 대하여 LFNST 역변환을 수행하여 1차 변환 계수를 출력할 수 있으며, 1차 변환 계수에 대하여 DCT2 역변환을 수행하여 잔차 블록을 획득할 수 있고, 이때, MTS와 NSPT 변환은 적용되지 않을 수 있다. 현재 변환 계수에 NSPT 변환이 적용된 경우, 디코더는 현재 변환 계수에 대하여 NSPT 역변환을 수행하여 잔차 블록을 획득할수 있고, 이때 MTS와 DCT2 + LFNST 변환은 적용되지 않을 수 있다.
비디오 신호 처리 장치는 인트라 예측 모드를 이용하여 MTS, LFNST, NSPT 변환(또는 역변환) 각각에 대한 변환 커널을 유도할 수 있다. 또한, 비디오 신호 처리 장치는 MTS, DCT2 + LFNST, NSPT 중에서 어떤 변환(또는 역변환)이 적용되는지 여부를 결정할 수 있대, 이때, 변환을 결정하기 위해 현재 블록의 가로 및 세로 크기, 현재 블록의 성분이 휘도 성분인지 혹은 색차 성분인지, 현재 블록이 싱글 트리인지 듀얼 트리인지 여부, 현재 블록이 인트라 모드인지 인터 모드로 부호화되었는지 정보, 현재 블록의 부호화 모드(예, IBC, Intra TMP, Merge, AMVP, GPM, SGPM, CCLM, CCCM) 정보, 현재 블록의 양자화 파라미터 정보 중에서 적어도 하나 이상이 사용될 수 있다.
도 19는 본 명세서의 일 실시예에 따른 매핑 테이블을 나타낸다.
도 20은 본 명세서의 일 실시예에 따른 변환 타입 세트 테이블을 나타낸다.
도 21은 본 명세서의 일 실시예에 따른 변환 타입 조합 테이블을 나타낸다.
도 22는 본 명세서의 일 실시예에 따른 IDT 변환 타입에 대한 임계 값 테이블을 나타낸다.
비디오 신호 처리 장치에서 현재 블록에 사용 가능한 다중 변환 세트를 선택하는 방법에 대해 설명한다.
1) 먼저, 비디오 신호 처리 장치는 현재 블록의 가로 및 세로 크기를 하나의 변수로 매핑하기 위해, 현재 블록의 크기를 기반으로 nSzIdxW와 nSzIdxH 값을 유도할 수 있다. nSzIdxW은 현재 블록의 너비에 2의 로그(Log) 값을 계산한 후, 소수점 자리를 버리고 2를 차분한 값과 3 중 최소 값일 수 있다. nSzIdxH는 현재 블록의 높이에 2의 로그(Log) 값을 계산한 후, 소수점 자리를 버리고 2를 차분한 값과 3 중 최소 값일 수 있다.
2) 다음으로, 비디오 신호 처리 장치는 현재 블록의 인트라 방향성 모드(predMode)를 유도할 수 있다. TIMD 모드인 경우에는 기존 67개에서 131개로 확장된 인트라 예측 모드가 사용될 수 있어, 기존 67개 모드로 정밀도(precision)를 감소시킨다.
3) 다음으로, 비디오 신호 처리 장치는 ucMode, nMdIdx, isTrTransposed 값을 유도할 수 있다.
A. 현재 블록이 MIP 모드로 부호화되었을 경우, ucMode는 '0', nMdIdx은 '35', isTrTransposed는 MIP에서 유도된 값으로 설정될 수 있다.
B. 현재 블록이 MIP 모드로 부호화되지 않았다면, ucMode는 현재 블록의 인트라 방향성 모드(predMode)로 설정될 수 있다. predMode는 인트라 방향성 모드의 인덱스 값을 의미할 수 있다. 현재 블록의 가로 세로 크기 비율에 따라 확장 각도 모드를 통해 predMode는 결정될 수 있다. 비디오 신호 처리 장치는 predMode를 2에서 66사이의 값으로 클리핑(clipping)할 수 있다. predMode가 대각 모드인 34번 각도 모드 보다 큰 경우, isTrTransposed 값은 1로 설정될 수 있고, predMode가 34보다 같거나 작은 경우 isTrTransposed 값은 0으로 설정될 수 있다. predMode가 34보다 큰 경우, 비디오 신호 처리 장치는 67(인트라 방향성 모드 인덱스의 최대 값)에서 1을 더한 값에서 predMode의 값을 차분한 값으로 predMode의 값을 재설정한다. 예를 들어, predMode가 35라면, 비디오 신호 처리 장치는 35번 각도 모드를 33(67+1-35(predMode))번 각도 모드로 재설정할 수 있다. predMode가 66이라면, 비디오 신호 처리 장치는 66번 각도 모드를 2(67+1-66(predMode))번 각도 모드로 재설정할 수 있다 즉, 대각 모드인 34번 각도 모드를 기준으로 대칭이 되도록 함으로써, 도 19의 변환 매핑 테이블의 크기를 절반 정도로 줄이는 효과가 있다.
4) 비디오 신호 처리 장치는 nSzIdxW와 nSzIdxH, isTrTransposed 값을 통해, nSzIdx값을 유도할 수 있다. isTrTransposed 값이 '1'이면, nSzIdxH에 4를 곱한 후, nSzIdxW를 더한 값이 nSzIdx로 설정될 수 있다. isTrTransposed 값이 '0'이면, nSzIdxW에 4를 곱한 후, nSzIdxH를 더한 값이 nSzIdx로 설정될 수 있다.
5) 비디오 신호 처리 장치는 현재 블록의 크기 정보인 nSzIdx와 현재 블록의 인트라 방향성 모드 정보인 nMdIdx를 이용하여 도 19의 미리 정의된 테이블에 따라 사용 가능한 변환 타입 세트의 인덱스인 nTrSet을 유도할 수 있다. 도 19는 현재 블록의 화면 내 방향성 모드(0 내지 34 및 MIP)와 현재 블록의 크기 인덱스(0 내지 15)에 따른 변환 타입 세트의 인덱스를 정의한다. 도 19를 참조하면 nTrSet은 80가지가 될 수 있으며, 현재 블록의 크기가 4x8이고, 현재 블록의 화면 내 방향성 모드가 13이라면, nTrSet은 '7'이 될 수 있다.
6) 비디오 신호 처리 장치는 비트스트림에 포함된 mts_idx를 파싱하여 nTrSet에 대응되는 변환 타입 세트를 도 20의 테이블로부터 유도할 수 있다. 수직 및 수평 방향의 변환 타입은 predMode 가 대각 모드인 34번 각도 모드보다 큰 값인지 여부에 따라 다르게 설정된다. 도 20의 회색 음영 처리된 세로 열의 0 내지 79는 nTrSet에 대응되고, 회색 음영 처리된 가로 열의 0 내지 3은 mts_idx에 대응될 수 있다. 도 20을 참조하면 nTrSet가 7이고, mts_idx의 값이 3이라면, (2, 17, 18, 22) 중에서 22가 선택될 수 있다. 그리고, 도 21의 변환 타입 조합 테이블의 인덱스 22에 대응되는 DST1, DCT5가 선택되며, 현재 블록의 수직 방향 변환 타입은 DST1로 수평 방향 변환 타입은 DCT5로 설정될 수 있다. 도 21의 회색 음영 처리된 가로 열의 0 내지 24는 도 20을 통해 선택되는 인덱스이고, 회색 음영 처리된 세로 열의 0 내지 1은 각각 수직 방향 변환 타입과 수평 방향 변환 타입을 의미할 수 있다. 현재 블록의 화면 내 예측 방향성 모드가 대각 모드인 34보다 클 경우, 수직 및 수평 방향의 변환 타입이 서로 교체될 수 있다.
mts_idx 값이 '3'이고, 현재 블록의 가로 및 세로의 크기가 모두 16 이하이면, 후술하는 과정을 통해 수직 또는 수평 방향의 변환 타입이 IDT 변환 타입으로 재설정될 수 있다.
현재 블록의 화면 내 예측 방향성 모드의 인덱스와 수평 방향 모드의 인덱스인 18 간의 절대값 차이가 임의의 정해진 값보다 적다면, 수직 방향의 변환 타입은 IDT 변환 타입으로 재설정될 수 있다. 현재 블록의 화면 내 예측 방향성 모드의 인덱스와 수평 방향 모드의 인덱스인 50 간의 절대값 차이가 임의의 정해진 값보다 적다면, 수평 방향의 변환 타입은 IDT 변환 타입으로 재설정될 수 있다. 이때, 임의의 정해진 값은 정수로, 현재 블록의 가로 또는 세로의 크기에 기초하여 결정될 수 있다. 예를 들어, 임의의 정해진 값은 도 19의 테이블을 통해 결정될 수 있다. 도 22(a)의 테이블은 가로 또는 세로의 크기가 4씩 차이가 날때마다 임계 값이 다르게 설정된 경우를 나타내고, 도 22(b)의 테이블은 가로 또는 세로의 크기가 2배씩 차이가 날때마다 임계 값이 다르게 설정된 경우를 나타낸다. 현재 블록의 크기가 16x16 크기인 경우, 비디오 신호 처리 장치는 수직 방향의 변환 타입은 IDT 변환 타입으로 재설정하지 않고, 기존의 변환 타입을 그대로 유지할 수 있다.
인코더 및 디코더는 변환 타입 세트의 개수를 블록마다 적응적으로 변경함으로써, mts_idx를 부호화하기 위한 비트량을 감소시킬 수 있다. 인코더 및 디코더는 변환 타입 세트의 개수를 현재 변환 블록의 변환 계수들의 절대값의 합에 따라 1개, 4개, 및 6개 중 어느 하나로 결정할 수 있다. 변환 타입 세트의 개수가 달라지게 되면, mts_idx를 시그널링하기 위한 최대 bin의 개수가 달라질 수 있다. 변환 계수의 절대 값의 합이 6보다 작거나 같으면, 변환 타입 세트의 개수가 하나이다. 따라서 인코더는 mts_idx를 시그널링하지 않을 수 있다. 이때, 디코더는 mts_idx를 파싱하지 않을 수 있다. 변환 계수들의 절대 값의 합이 6보다 크고 32보다 작거나 같으면, 변환 타입 세트의 개수는 4개일 수 있다. 변환 계수들의 절대값의 합이 32보다 크면 변환 커널 후보의 개수는 6개일 수 있다. 이때, 인코더는 변환 타입 세트의 최대 개수를 기초하여 mts_idx를 시그널링할 수 있다. 또한, 디코더는 변환 타입 세트의 최대 개수를 기초로 mts_idx를 파싱할 수 있다.
현재 블록이 인터 부호화 모드로 예측되는 경우, 인코더 및 디코더는 {(DST7, DST7), (DST7, DCT8), (DCT8, DST7), (DCT8, DCT8)}와 같이 4가지 조합 중에서 하나의 변환 커널 세트를 사용할 수 있다. 인코더는 어떠한 변환 커널 세트를 사용했는지에 대한 인덱스를 시그널링할 수 있다. 디코더는 해당 인덱스를 파싱하여 현재 변환 블록에 사용할 변환 커널 세트를 결정할 수 있다. 설정된 변환 커널 세트가 (DST7, DCT8)인 경우, 인코더 및 디코더는 수평 방향으로는 DST7을 사용하여 현재 블록을 변환 혹은 역변환하고, 수직 방향으로는 DCT8을 사용하여 현재 블록을 변환 혹은 역변환한다. 복잡도 최적화를 위해, 인코더 및 디코더는 1920x1080 해상도보다 큰 영상에 대해 Inter MTS가 적용될 수 있는 최대 CU 크기를 32x32로 설정할 수 있다. 인코더 및 디코더는 1920x1080 이외의 해상보다 작은 영상에 대해 Inter MTS가 적용될 수 있는 최대 CU 크기를 16x16으로 설정한다. 따라서 인코더 및 디코더는 16x16 보다 큰 변환 블록, 예컨대 32x32 크기의 변환 블록에 Inter MTS를 적용하지 않고 수평 및 수직 방향으로 DCT2 변환을 적용할 수 있다 또한, 인코더 및 디코더는 16x16 크기보다 같거나 작은 변환 블록의 변환 및 역변환에서 DST7과 DCT8 대신 separable KLT를 사용할 수 있다.
도 23은 본 명세서의 일 실시예에 따른 디블록킹 필터링 과정에서의 블록 경계 및 경계 주변의 샘플들을 나타낸다.
도 23(a)를 참조하면 P 블록과 Q 블록 중간의 점선으로 표시된 부분이 블록 경계를 의미할 수 있다. 블록 경계는 임의의 정해진 크기마다 존재할 수 있으며, 4의 크기마다 블록 경계가 존재할 수 있다.
도 23(b)는 블록 경계를 기준으로 필터링이 수행되는 샘플들을 나타낸다. 비디오 신호 처리 장치는 현재 복원된 블록에 대하여 디블록킹 필터링을 수행하여 블록 경계에서 발생하는 블록킹 현상을 완화시키는 과정을 수행할 수 있다. 디블록킹 필터링 과정은 변환 블록 경계에 대한 결정, 서브 블록 경계에 대한 결정, 필터링을 수행할 필터의 길이에 대한 결정, 필터링의 세기(bS)에 대한 결정, 필터링 파라미터에 대한 결정, 필터링 수행 여부 결정, 필터링의 종류에 대한 결정 과정을 포함할 수 있다.
도 24는 본 명세서의 일 실시예에 따른 외삽 필터(extrapolation filter)에 기초한 인트라 예측 모드를 나타낸다.
구체적으로 도 24는 본 명세서의 일 실시예에 따른 외삽 필터에 기초한 인트라 예측 모드인 EIP(Extrapolation filter-based Intra Prediction) 모드를 나타낸다.
도 24를 통해 비디오 신호 처리 장치가 EIP 모드를 수행하는 방법에 대해 설명한다.
도 24(a)를 참조하면, 비디오 신호 처리 장치는 현재 블록에 인접한 주변 샘플들을 사용하여 구성되는 템플릿을 사용하여 비-선형(non-linear) 모델 파라미터를 유도할 수 있다. 이때, 템플릿은 3가지 타입이 존재할 수 있고, 비디오 신호 처리 장치는 3가지 타입 중 1가지 타입을 이용하여 비-선형 모델 파라미터를 유도할 수 있다. 템플릿은 현재 블록의 좌측 주변 샘플 및 상측 주변 샘플들로 구성(L-shape)될 수 있고, 템플릿은 현재 블록의 좌측 샘플들로 구성(left-only)로 구성될 수 있고, 템플릿은 현재 블록의 상측 샘플들로 구성(above-only)될 수 있다. 비-선형 모델은 CCCM 일 수 있다. 도 24(b)를 참조하면, 비-선형 모델 파라미터를 유도하기 위해 사용되는 필터 모양은 정사각형 모양, 가로로 길쭉한(가로가 세로보다 긴) 직사각형 모양, 세로로 길쭉한(세로가 가로보다 긴) 직사각형 모양 중 하나일 수 있다. 인코더는 템플릿 타입과 필터 모양을 지시하는 제1 정보를 포함하여 비트스트림을 획득할 수 있고, 디코더는 비트스트림의 제1 정보를 통해 템플릿 타입과 필터 모양을 결정할 수 있다. 도 24(c)를 참조하면, 비디오 신호 처리 장치는 템플릿 타입과 필터 모양에 기초하여 비-선형 모델 파라미터를 유도할 수 있고, 유도된 비-선형 모델 파라미터를 이용하여 현재 블록을 샘플 단위로 예측할 수 있다. 현재 블록을 샘플 단위로 예측할 때, 비디오 신호 처리 장치는 대각방향으로 예측할 수 있다. 현재 샘플을 예측함에 있어, 현재 샘플 이전에 예측된 샘플이 사용될 수 있다. 비디오 신호 처리 장치는 EIP 모드를 사용하여 예측된 예측 블록에 필터링을 수행할 수 있다. 인코더는 EIP 모드로 예측된 블록에 필터링을 적용할지 여부를 나타내는 정보를 포함하는 비트스트림을 생성하여 시그널링할 수 있다. 디코더에서는 현재 블록이 EIP 모드인 경우, 예측 블록에 대한 필터링이 적용되는지 여부를 나타내는 정보를 파싱하여 예측된 블록에 필터링 적용 여부를 설정할 수 있다. 이때 필터링은 아래 표 1과 같을 수 있다. 표 1은 본 발명의 일 실시예에 따른 필터링으로 3x3 커널, 5x5 커널과 관련된 필터링을 나타낸다.
비디오 신호 처리 장치는 EIP 모드로 부호화된 블록의 잔차 신호에 대해, EIP 모드로 예측된 블록을 이용하여 인트라 예측 모드를 유도한 후, 유도된 인트라 예측 모드를 이용하여 MTS, NSPT, LFNST 등을 위한 변환 커널을 유도할 수 있다. 이때, 인트라 예측 모드를 유도하기 위해, 비디오 신호 처리 장치는 DIMD 방식 또는 DIMD와 유사한 방식을 사용할 수 있다.
EIP 머지(merge) 모드는 비디오 신호 처리 장치가 이전에 EIP 모드로 부호화된 주변 블록의 필터 모양과 필터 계수를 이용하여 EIP 머지 리스트를 구성한 후, 현재 블록을 위한 최적의 필터 모양과 필터 계수를 갖는 EIP 머지 후보를 결정하는 모드일 수 있다. 이때, EIP 머지 후보(최적의 필터 모양과 필터 계수)는 비트스트림에 포함되는 인덱스를 통해 결정될 수 있다. 이때, EIP 머지 리스트는 현재 블록의 인접한 공간 후보(adjacent spatial candidate), 비-인접한 공간 후보(non-adjacent spatial candidates), 시간적 후보(temporal candidates), 쉬프트된 시간적 후보(shifted temporal candidates), 히스토리 기반 후보(history-based candidates)를 사용하여 구성될 수 있다. 또한, EIP 머지 리스트는 템플릿 코스트에 기초하여 재정렬될 수 있다.
현재 블록이 인트라 TMP, MIP, EIP 모드 중에 어느 하나의 모드로 부호화된 경우, 비디오 신호 처리 장치는 현재 블록의 인트라 예측 모드를 위해 평면(planar) 모드, DC 모드, 유도된 DIMD 모드, 블록 벡터(block vector, BV)가 지시하는 위치의 인트라 예측 모드 중 어느 하나를 저장할 수 있다. 유도된 DIMD 모드는 현재 블록에 인접한 미리 복원된 샘플들을 사용하여 DIMD 방식으로 유도된 인트라 예측 모드일 수 있다. 또는 유도된 DIMD 모드는 현재 예측 블록을 사용하여 DIMD 방식으로 유도된 인트라 예측 모드일 수 있다. 또는 유도된 DIMD 모드는 현재 블록의 복원이 완료된 후, 복원된 현재 블록의 샘플들을 사용하여 DIMD 방식으로 유도된 인트라 예측 모드일 수 있다. BV가 지시하는 인트라 예측 모드는 인트라 TMP 예측에 사용된 BV가 지시하는 참조 블록의 인트라 예측 모드일 수 있다. 저장된 인트라 예측 모드는 다음 블록의 인트라 예측을 위한 MPM 리스트를 유도하는데 사용될 수 있다. 또한, 비디오 신호 처리 장치는 IBC 또는 인트라 TMP 모드로 부호화된 블록을 위해 저장할 인트라 예측 모드를 유도하기 위해 BV가 지시하는 참조 블록의 인트라 예측 모드를 사용할 수 있다.
비디오 신호 처리 장치가 현재 블록에 대한 MPM 리스트를 유도할 때, 현재 블록의 주변 블록의 부호화 모드가 인트라 TMP, MIP, EIP 모드 중 어느 하나인 경우, 주변 블록의 인트라 예측 모드는 평면 모드, DC 모드, 유도된 DIMD 모드, BV가 지시하는 위치의 인트라 예측 모드 중에 어느 하나로 유도될 수 있다.
비디오 신호 처리 장치는 현재 블록이 SGPM(Spatial Geometry Partitioning Mode) 또는 GPM(Geometry Partitioning Mode) 중 어느 하나의 모드로 부호화된 경우, 현재 블록을 분할하는 사선의 각도를 인트라 예측 모드로 변환한 값을 현재 블록의 인트라 예측 모드로 설정할 수 있다. 현재 블록이 SGPM 또는 GPM 중에 어느 하나의 모드로 부호화되고, 현재 블록의 분할된 2개의 영역 중에 하나가 인트라 예측 모드로 부호화되었다면, 현재 블록을 대표하는 인트라 예측 모드는 2개의 영역 중 인트라 예측 모드로 부호화된 영역에 적용된 인트라 예측 모드일 수 있다. 이때, 인트라 예측 모드가 방향성 모드(2~66번 모드 중 어느 하나)인 경우에는 현재 블록을 대표하는 인트라 예측 모드는 방향성 모드(2~66번 모드 중 어느 하나)에 대응되는 인트라 예측 모드일 수 있다. 인트라 예측 모드가 방향성 모드(2~66번 모드 중 어느 하나)가 아닌 경우, 현재 블록을 대표하는 인트라 예측 모드는 현재 블록의 분할 과정에서 사용된 사선의 각도를 인트라 예측 모드로 변환한 값이 될 수 있다.
현재 블록의 주변 블록의 부호화 모드가 SGPM, GPM 중에 하나이고, 현재 블록의 분할된 2개의 영역 중에 하나가 인트라 예측 모드로 부호화될 수 있다. 이때, 비디오 신호 처리 장치는 현재 블록에 대한 MPM 리스트를 유도할 때, 현재 블록의 주변 블록의 분할된 2개의 영역 중 인트라 예측 모드로 부호화된 영역의 인트라 예측 모드를 주변 블록의 인트라 예측 모드로 설정할 수 있다. 이때, 인트라 예측 모드가 방향성 모드(2~66번 모드 중 어느 하나)인 경우, 주변 블록의 인트라 예측 모드는 방향성 모드(2~66번 모드 중 어느 하나)의 인트라 예측 모드일 수 있다. 인트라 예측 모드가 방향성 모드(2~66번 모드 중 하나)가 아닌 경우에는 현재 블록의 분할 과정에서 사용된 사선의 각도를 인트라 예측 모드로 변환한 값이 될 수 있다. 유도된 주변 블록의 인트라 예측 모드는 MPM 리스트에 추가될 수 있다.
현재 블록이 IBC 모드로 부호화된 경우, 현재 블록의 인트라 예측 모드는 유도된 DIMD 모드, BV가 지시하는 위치의 인트라 예측 모드 중에 하나가 될 수 있다. 유도된 DIMD 모드는 현재 블록에 인접한 이미 복원된 샘플들을 사용하여 DIMD 방식으로 유도된 인트라 예측 모드일 수 있다. 또는 유도된 DIMD 모드는 현재 예측 블록을 사용하여 DIMD 방식으로 유도된 인트라 예측 모드일 수 있다. 유도된 DIMD 모드는 현재 블록이 복원이 완료된 후, 복원된 현재 블록의 샘플들을 사용하여 DIMD 방식으로 유도된 인트라 예측 모드일 수 있다. BV가 지시하는 인트라 예측 모드는 IBC 예측에 사용된 BV가 지시하는 참조 블록의 인트라 예측 모드일 수 있다. 현재 블록의 부호화 모드가 RRIBC 부호화 모드인 경우, BV가 지시하는 참조 블록의 인트라 예측 모드는 현재 블록의 플립(flip) 방향에 따라 변환될 수 있으며, 현재 블록의 인트라 예측 모드는 변환된 인트라 예측 모드일 수 있다.
도 25는 본 발명의 일 실시예에 따른 LFNST 변환 후 ROI(Region of Interest)를 나타내는 도면이다.
도 25를 참조하면, LFNST 변환 후, 저주파 부분인 회색 블록 영역이 ROI (Region of Interest)일 수 있고, 미리 지정된 ROI 이외의 부분은 0으로 제로-아웃(zero-out) 처리될 수 있다. LFNST16의 경우, 96개 샘플만 필요하므로, 도 25(a)와 같이 6개의 NxN 서브 블록을 제외한 나머지 흰색 서브 블록들은 제로-아웃 처리될 수 있다. LFNST8의 경우, 64개 샘플만 필요하므로, 도 25(b)와 같이 4개의 NxN 서브 블록을 제외하고 나머지 흰색 서브 블록들은 제로-아웃 처리될 수 있다. 마지막으로, LFNST4의 경우, 제로-아웃 되는 영역이 존재하지 않을 수 있다. 여기서, N은 양의 정수이며, 4일 수 있다.
NSPT 변환은 기존의 DCT2 + LFNST 변환 방법을 대체하는 변환 방식일 수 있다. 변환 블록의 크기가 16x16보다 같거나 작은 블록에 대하여, 변환 블록의 크기에 따라 NSPT4x4(16x16 kernel), NSPT4x8(32x20 kernel), NSPT8x4(32x20 kernel), NSPT8x8(64x32 kernel), NSPT4x16(64x24 kernel), NSPT16x4(64x24 kernel), NSPT8x16(128x40 kernel), NSPT16x8(128x40 kernel), NSPT4x32(128x20 kernel), NSPT32x4(128x20 kernel), NSPT8x32(256x24 kernel), NSPT32x8(256x24 kernel) 중 어느 하나의 커널이 적용될 수 있다. NSPT는 LFNST와 유사하게 35 개의 변환 커널 세트로 구성되고, 각 세트당 3개의 후보로 구성될 수 있다. 인코더는 인트라 예측 모드에 따라 변환 커널 세트를 유도한 후, 3개의 후보 중에서 최적의 후보에 대한 인덱스에 대한 정보를 포함하는 비트스트림을 생성하고 시그널링할 수 있다. 디코더는 시그널링된 인덱스에 대한 정보를 파싱한 후, 인트라 예측 모드를 사용하여 유도된 변환 커널 세트 중에서 인덱스 정보가 지시하는 변환 커널 후보를 사용하여 현재 변환 계수를 역변환하고, 잔차 블록을 획득할 수 있다. NSPT가 적용된 4x4 블록에는 제로-아웃이 수행되지 않을 수 있다. 또한, NSPT의 커널의 크기에 따라 제로-아웃되는 계수의 개수가 달라질 수 있다. 예를 들어, 4x8 블록 또는 8x4 블록에는 32x20 크기의 NSPT가 적용될 수 있다. 따라서, 32개 변환 계수 중 20개 변환 계수만를 제외한 나머지 12개 변환 계수는 제로-아웃될 수 있다.
도 26은 본 발명의 일 실시예에 따른 DIMD를 이용하여 예측 블록을 생성하는 과정을 나타낸 도면이다.
도 26을 참조하면 디코더는 주변 샘플(블록, 픽셀)을 이용하여 예측 블록을 유도할 수 있다. 이때, 주변 샘플은 현재 블록의 주변 블록(픽셀)일 수 있다. 구체적으로, 디코더는 주변 샘플을 입력으로 하여 방향성 정보(각도 정보)에 대한 히스토그램을 통해 현재 블록의 복원을 위한 인트라 예측 모드들 및 가중치 정보를 결정할 수 있다.
도 27은 본 명세서의 일 실시예에 따른 방향성 정보를 유도하기 위해 사용되는 주변 픽셀의 위치를 나타낸 도면이다.
도 27(a)는 방향성 정보를 유도하기 위해 현재 블록의 주변 블록이 모두 사용 가능할 때를 나타내고, 도 27(b)는 현재 블록의 상측 경계가 서브 픽쳐(Sub-picture), 슬라이스(Slice), 타일(tile), CTU 경계일 때를 나타내고, 도 27(c)는 현재 블록의 좌측 경계가 서브 픽쳐(Sub-picture), 슬라이스(Slice), 타일(tile), CTU 경계일 때를 나타낸다. 한편 주변 블록과 현재 블록이 동일한 서브 픽쳐(Sub-picture), 슬라이스(Slice), 타일(tile), CTU에 속해 있지 않다면, 주변 블록은 방향성 정보를 유도하는데 사용되지 않을 수 있다. 도 27의 회색 점은 실제 방향성 정보를 유도하기 위해 사용되는 픽셀의 위치를 나타내고, 점선은 서브 픽쳐(Sub-picture), 슬라이스(Slice), 타일(tile), CTU 경계를 나타낸다. 또한, 도 27(d) 내지 (f)를 참조하면 방향성 정보를 유도하기 위해서, 경계에 위치한 픽셀은 경계 밖으로 한 픽셀씩 패딩(padding)될 수 있다. 이러한 패딩을 통해 보다 더 정확한 방향성 정보의 유도가 가능할 수 있다.
특정 위치의 픽셀에 대한 방향성 정보를 유도하기 위해, 수학식 1의 3x3 크기의 소벨(Sobel) 필터가 가로 및 세로 방향으로 각각 적용될 수 있다. 수학식 1의 A는 3x3 크기의 현재 블록의 복원된 주변 블록들의 픽셀 정보(값)을 의미할 수 있다. 그리고 방향성 정보(θ)는 수학식 2를 이용하여 결정될 수 있다. 방향성 정보 유도를 위한 계산 복잡도를 감소시키기 위해, 디코더는 수학식 2의 atan 함수를 계산하지 않고 수학식 1의 Gy/Gx에 대한 계산만으로 방향성 정보(θ)를 유도할 수 있다.
도 27을 참조하면 방향성 정보는 도 27에 표시된 모든 회색 점마다 계산될 수 있고, 방향성 정보는 인트라 예측 모드의 각도에 매핑될 수 있다. 인트라 예측 모드 세트는 평면(Planar) 모드, DC 모드 및 복수의(예, 65개의) 각도 모드들(즉, 방향성 모드들)을 포함할 수 있다. 인트라 예측 모드는 67가지의 모드들일 수 있는데, 수학식 2를 통해 계산된 방향성 정보(각도, θ)는 실수 단위의 값일 수 있다. 따라서, 방향성 정보를 특정 인트라 예측 방향성 모드에 매핑하는 과정이 필요하다. 본 명세서에서 기술하는 방향성 모드는 각도 모드와 동일할 수 있다.
도 28은 본 명세서의 일 실시예에 따른 방향성 모드를 매핑하는 방법을 나타낸 도면이다.
도 28을 참조하면 인트라 예측 방향성 모드는 0도(인덱스 18), 45도(인덱스 34), 90도(인덱스 50), 135도(인덱스 66)를 기준으로 4개의 구간으로 나누어질 수 있다(도 6 참조). 도 10을 참조하면 인트라 예측 방향성 모드를 결정하기 위한 구간은 0번 구간부터 3번 구간까지 4개의 구간으로 나누어질 수 있다. 0번 구간은 -45도에서 0도까지이고, 1번 구간은 0도에서 45도까지이고, 2번 구간은 45도에서 90도까지이고, 3번 구간은 90도에서 135도까지일 수 있다. 이때, 각 구간은 16개의 인트라 예측 방향성 모드를 포함할 수 있다. 방향성 모드는 수학식 1을 통해 계산된 Gx, Gy의 부호 및 크기를 비교하여 4개 구간 중 어느 하나의 구간이 결정될 수 있다. 예를 들어, Gx 및 Gy가 양수이고, Gx의 절대값이 Gy의 절대값보다 크다면 1번 구간이 선택될 수 있다. 각 구간에 매핑되는 인트라 예측 방향성 모드는 수학식 2로부터 계산된 방향성 정보(θ)를 통해 결정될 수 있다. 구체적으로, 디코더는 방향성 정보(θ)에 2^16을 곱하여 값을 확장한다. 그리고 디코더는 확장된 값을 미리 정의된 테이블의 수치와 비교하여 확장된 값과 가장 가까운 값을 찾고 가장 가까운 값에 기초하여 인트라 예측 방향성 모드를 결정할 수 있다. 이때 미리 정의된 테이블의 값은 17개 일 수 있다. 구체적으로, 미리 정의된 테이블의 값은 {0, 2048, 4096, 6144, 8192, 12288, 16384, 20480, 24576, 28672, 32768, 36864, 40960, 47104, 53248, 59392, 65536}일 수 있다. 이때, 미리 정의된 테이블 값들 간 차이는 인트라 예측 방향성 모드의 각도 간의 차이에 따라 다르게 설정될 수 있다.
한편, 계산 복잡도를 감소시키기 위해 atan 계산이 수행되지 않고 Gy/Gx만을 사용하여 방향성 각도를 구하는 경우, 미리 정의된 테이블 값들 간 차이는 인트라 예측 방향성 모드의 각도간 거리와 서로 불일치할 수 있다. atan는 입력 값이 증가할수록 기울기가 점점 낮아지는 특성이 있다. 따라서, 상기 정의된 테이블도 인트라 예측 방향성 모드의 각도 간의 차이뿐만 아니라 atan의 비선형 특성을 모두 고려하여 수치가 설정되어야 한다. 예를 들어, 상기 정의된 테이블 값들 간 차이는 점점 낮아지도록 설정될 수 있다. 반대로, 상기 정의된 테이블 값들 간 차이는 점점 높아지도록 설정될 수 있다.
현재 블록의 가로와 세로의 길이가 다르다면, 사용할 수 있는 인트라 예측 방향성 모드가 달라질 수 있다. 즉, 현재 블록의 가로와 세로의 길이가 다르다면, 인트라 예측 방향성 모드를 유도하기 위한 구간이 달라질 수 있다. 다시 말하면 인트라 예측 방향성 모드를 유도하기 위한 구간은 현재 블록의 가로와 세로의 길이에 기초(예를 들어, 가로의 길이와 세로의 길이의 비율 등)하여 변경될 수 있다. 예를 들어, 현재 블록의 가로가 세로보다 긴 경우, 인트라 예측 모드는 67~80까지 재매핑될 수 있으며, 반대 방향의 인트라 예측 모드는 2~15까지 제외될 수 있다. 예를 들어, 현재 블록의 가로의 길이가 세로의 길이보다 n(정수)배 만큼 길다면(예를 들어 2배), 인트라 예측 모드 {3, 4, 5, 6, 7, 8}은 {67, 68, 69, 70, 71, 72}으로 각각 재설정(매핑)될 수 있다. 또한, 현재 블록의 가로의 길이가 세로의 길이보다 길다면, 인트라 예측 모드에 '65'를 더한 값으로 인트라 예측 모드가 재설정될 수 있다. 한편, 현재 블록의 가로의 길이가 세로의 길이보다 짧다면, 인트라 예측 모드에 '67'을 뺀 값으로 인트라 예측 모드가 재설정될 수 있다.
현재 블록의 복원을 위한 인트라 예측 방향성 모드를 유도하기 위해 히스토그램이 사용될 수 있다. 주변 블록들에 대한 방향성 정보를 획득한 결과, 방향성이 존재하는 블록보다 방향성이 존재하지 않는 블록이 많은 경우, 방향성이 존재하지 않는 블록에 대한 예측 모드가 히스토그램상 누적 값이 가장 높을 수 있다. 그러나, 현재 블록의 복원을 위해서는 방향성 모드를 유도하여야 하므로, 히스토그램상 누적 값이 가장 높더라도 방향성이 존재하지 않는 블록에 대한 예측 모드는 제외될 수 있다. 즉, 주변 픽셀 간 변화도가 없거나 방향성이 없는 완만한 영역은 인트라 예측 방향성 모드를 유도하기 위해 사용되지 않을 수 있다. 예를 들어 방향성이 존재하지 않는 블록에 대한 예측 모드는 평면 모드, DC 모드 일 수 있다. 만일 좌측 주변 블록이 평면 모드 또는 DC 모드인 경우, 좌측 주변 블록은 방향성 정보를 유도하는데 사용되지 않을 수 있으며, 상측 주변 블록만을 사용하여 방향성 정보는 유도될 수 있다. 현재 블록의 주변 블록들에 완만한 영역과 방향성이 존재하는 영역이 혼재하는 경우, 디코더는 방향성을 강조하기 위해 수학식 3과 같이 계산된 G 값을 이용하여 히스토그램을 생성할 수 있다. 이때 히스토그램은 발생된 인트라 예측 방향성 모드마다 '1'만큼 더해지는 빈도수 기반이 아닌, 발생된 인트라 예측 방향성 모드마다 상기 계산된 G 값이 더해지는 누적 값일 수 있다.
도 29는 본 명세서의 일 실시예에 따른 인트라 예측 방향성 모드를 유도하기 위한 히스토그램을 나타낸 도면이다.
도 29의 X축은 인트라 예측 방향성 모드를 나타내고, Y축은 G 값들의 누적 값을 나타낸다. 디코더는 인트라 예측 방향성 모드들 중에서 G 값들의 누적 값이 가장 큰 인트라 예측 방향성 모드를 선택할 수 있다. 다시 말하면, 디코더는 누적 값에 기초하여 현재 블록에 대한 인트라 예측 방향성 모드를 선택할 수 있다. 도 29를 참조하면 누적 값이 가장 큰 modeA와 두 번째로 큰 modeB가 인트라 예측 방향성 모드로 선택될 수 있다. 디코더는 현재 블록에 대한 예측 블록을 생성하기 위해, modeA로 생성한 예측 블록과 modeB로 생성한 예측 블록, 마지막으로 평면 모드로 생성한 예측 블록들을 가중치 평균하여 최종 예측 블록을 생성할 수 있다. 이때, 각 예측 블록의 가중치는 modeA와 modeB의 누적 값을 이용하여 결정될 수 있다. 예를 들어, 평면 모드로 생성한 예측 블록에 대한 가중치는 전체 가중치의 1/3로 설정될 수 있다. modeA로 생성한 예측 블록에 대한 가중치는 modeA와 modeB의 누적 값을 더한 것에서 modeA 누적 값을 나눈 값에 해당하는 가중치로 설정될 수 있다. modeB로 생성한 예측 블록에 대한 가중치는 전체 가중치에서 modeA 가중치와 전체 가중치의 1/3값을 차분한 값으로 결정될 수 있다. 가중치에 대한 계산을 보다 정확하게 하기 위해 디코더는 modeA로 생성한 예측 블록에 대한 가중치에 임의의 값을 곱하여 가중치의 범위를 확장할 수 있다. modeB로 생성한 예측 블록에 대한 가중치 및 평면 모드로 생성한 예측 블록에 대한 가중치도 동일하게 확장될 수 있다.
도 30은 본 명세서의 일 실시예에 따른 현재 블록을 복원하기 위한 예측 샘플을 생성하는 방법을 나타낸 도면이다.
구체적으로, 도 30은 부호화 성능을 개선하기 위해 인트라 예측 모드를 보다 효과적으로 유도하여, 유도된 인트라 예측 모드를 이용하여 예측 샘플을 생성하는 과정을 나타낸 구조도이다.
도 30을 참조하면, 'prediction mode generator' 과정에서 디코더는 현재 블록에 인접한 주변 블록의 샘플(neighboring sample)들을 이용하여 현재 블록에 대한 인트라 예측 방향성 모드를 유도할 수 있다. 이때, 디코더는 인트라 예측 방향성 모드를 적어도 하나 이상 유도할 수 있으며, 각 모드에 대한 가중치를 유도할 수 있다. 예를 들어, 인트라 예측 방향성 모드를 유도하기 위해 디코더는 임의의 필터를 통해 주변 블록 샘플들의 방향성 정보를 유도하고 빈번하게 발생하는 방향성 정보들을 인트라 예측 방향성 모드로 결정하도록 하는 히스토그램 기반 방법을 사용할 수 있다. 또한, 인트라 예측 방향성 모드를 유도하기 위한 방법으로 현재 블록에 인접한 위쪽 픽셀만을 이용하여 현재 블록에 인접한 왼쪽 픽셀에 대한 인트라 예측 픽셀을 생성하여 가장 왜곡이 적은 인트라 예측 모드를 현재 블록을 위한 인트라 예측 방향성 모드로 결정하는 방법이 사용될 수도 있다.
도 30을 참조하면 'intra prediction' 과정에서는 'prediction mode generator' 과정에서 유도된 인트라 예측 방향성 모드들과 가중치를 이용하여 현재 블록에 대한 예측 블록들을 생성할 수 있다. 예측 블록들의 개수는 prediction mode generator 과정에서 유도된 인트라 예측 방향성 모드 개수에 따라 결정될 수 있다. 예를 들어, 유도된 인트라 예측 방향성 모드 개수가 2일 경우, 현재 블록에 대한 예측 블록은 2개일 수 있다. 'intra prediction' 과정에서 생성된 예측 블록들은 후술하는 방법을 이용한 PDPC(Position dependent intra prediction combination) 필터링이 적용될 수 있다.
도 30을 참조하면 'other prediction' 과정에서 디코더는 현재 블록에 대한 예측 블록을 추가적으로 생성할 수 있다. 예를 들어, 디코더는 평면 모드, DC 모드, MIP(Matrix Intra Prediction) 중에서 적어도 하나 이상을 사용하여 인트라 예측 블록을 생성할 수 있다. 'prediction mode generator' 과정에서 유도된 인트라 예측 방향성 모드들 및 예측 방향성 각각에 대한 가중치 정보들, 현재 블록의 양자화 파라미터 정보, 현재 블록의 가로의 길이 또는 세로의 길이, 현재 블록이 휘도인지 색차인지 여부에 대한 정보, 현재 블록 주변의 인트라 예측 모드, 현재 블록 주변의 변환 계수의 존재 여부 정보들(도 30의 Additional information A, B, C에 해당할 수 있음) 중에서 적어도 하나 이상을 사용하여 'other prediction' 과정이 수행될지 여부가 결정될 수 있다. 이하에서 'other prediction' 과정이 수행되는지 여부를 결정하는 방법에 대해 설명한다.
'other prediction' 과정에서 디코더가 어떠한 모드(예, 평면, DC, MIP 모드 등)를 사용할지에 대한 정보는 미리 약속되어 있거나 SPS를 통해 시그널링 될 수 있다. 예를 들어, 디코더는 어떠한 모드를 사용할 지를 나타내는 신택스 요소(sps_dimd_default_mode)에 기초하여 모드를 결정할 수 있다. 디코더는 sps_dimd_default_mode의 값에 따라 평면 모드, DC 모드, MIP 모드 중 어떠한 모드를 사용할 것인지 결정할 수 있다. 예를 들어, sps_dimd_default_mode의 값이 '0'이면 평면 모드, sps_dimd_default_mode의 값이 '1'이면 DC 모드, sps_dimd_default_mode의 값이 0과 1이 아닌 다른 값이면 MIP 모드를 사용도록 지시할 수 있다. 또한, 현재 블록이 휘도 블록이고 주변 블록의 변환 계수가 존재할 경우, 디코더는 평면 모드, DC 모드, MIP 모드 중에서 적어도 하나 이상을 사용하여 예측 블록을 생성할 수 있다. 현재 블록이 색차 블록이고, 주변 블록의 변환 계수가 존재하지 않는 경우, 평면 모드, DC 모드, MIP 모드 중에서 적어도 하나 이상을 사용하여 예측 블록을 생성할 수 있다. 또한, 'prediction mode generator' 과정에서 유도된 인트라 예측 방향성 모드들의 가중치가 서로 비슷하다면(예를 들어, 방향성 모드들 각각의 가중치 간 차이가 특정 임계 값보다 작은 경우 등), 'other prediction' 과정은 수행되지 않을 수 있다. 'prediction mode generator' 과정에서 유도된 인트라 예측 방향성 모드들의 가중치가 서로 비슷하다면, 디코더는 평면 모드, DC 모드, MIP 모드 중에서 적어도 하나 이상을 사용하여 예측 블록을 생성할 수 있다(즉, 'other prediction' 과정이 수행됨). 'prediction mode generator' 과정에서 유도된 인트라 예측 방향성 모드들의 가중치 간 차이가 크다면(예를 들어, 방향성 모드들 각각의 가중치 간 차이가 특정 임계 값보다 큰 경우) 주변 블록의 픽셀간 변화가 많은 것을 의미하므로, 디코더는 평면 모드, DC 모드, MIP 모드 중에서 적어도 하나 이상을 사용하여 예측 블록을 생성할 수 있다. 또한, 현재 블록의 가로와 세로의 길이가 서로 다르다면 디코더는 평면 모드, DC 모드, MIP 모드 중에서 적어도 하나 이상을 사용하여 예측 블록을 생성할 수 있다. 반대로, 현재 블록의 가로와 세로의 길이가 동일할 때 디코더는 평면 모드, DC 모드, MIP 모드 중에서 적어도 하나 이상을 사용하여 예측 블록을 생성할 수 있다.
'weighted prediction' 과정에서 디코더는 'intra prediction', 'other prediction' 과정에서 생성된 여러 개의 인트라 예측 블록들을 가중치 평균하여 하나의 예측 샘플을 생성할 수 있다. 인트라 예측 블록들 각각에 대한 가중치는 'prediction mode generator' 과정에서 유도된 인트라 예측 방향성 모드 및 가중치 정보, 현재 블록의 양자화 파라미터 정보, 현재 블록의 가로 또는 세로의 길이, 현재 블록이 휘도 또는 색차인지 여부 정보, 현재 블록 주변의 인트라 예측 모드, 현재 블록 주변의 변환 계수의 존재 여부 정보들 중에서 적어도 하나 이상에 기초하여 결정될 수 있다.
도 31은 본 명세서의 일 실시예에 따른 인트라 예측 모드를 결정하는 방법을 나타낸 도면이다.
도 31은 도 30의 'prediction mode generator' 과정을 보다 자세히 나타낸다. 도 31을 참조하면 도 30의 'prediction mode generator' 과정은 히스토그램 분석을 통해 인트라 예측 방향성을 유도할 수 있다. 구체적으로 도 31의 'Histogram analysis' 과정에서 디코더는 현재 블록에 인접한 주변 샘플들을 이용하여 획득되는 히스토그램 분석하여 인트라 예측 방향성을 유도할 수 있다. 이때, 디코더는 현재 블록의 가로의 길이, 세로의 길이, 양자화 파라미터 정보, 현재 블록의 주변 블록들 중에서 가능한 인트라 예측 방향성 모드 정보, 현재 블록의 주변 블록의 잔차 신호의 존재 여부 정보, 현재 블록이 휘도 블록인지 색차 블록인지에 대한 정보들 중에서 적어도 하나 이상을 사용하여 현재 블록에 대한 인트라 예측 방향성 모드와 가중치를 유도할 수 있다. 이하에서 현재 블록에 대한 인트라 예측 방향성 모드와 가중치를 유도하는 방법에 대해 설명한다.
인트라 예측 방향성 모드는 빈도수에 기초하여 설정될 수 있다. 디코더는 주변 블록에 대한 인트라 예측 방향성 모드에 대한 히스토그램을 획득하고, 히스토그램을 분석하여 빈번하게 발생하는 인트라 예측 방향성 모드와 두 번째로 빈번하게 발생하는 모드를 예측 방향성 모드로 선택할 수 있다. 또한, 인트라 예측 방향성 모드는 누적 값(예, 도 29의 G 값)에 기초하여 설정될 수 있다. 디코더는 인트라 예측 방향성 모드 각각에 G값이 더해진 누적 값으로 획득되는 히스토그램을 분석하여 가장 높은 가중치를 가지는 인트라 예측 방향성 모드와 두 번째로 큰 가중치를 가지는 모드를 예측 방향성 모드로 선택할 수 있다. 또한, 디코더는 주변 블록의 인트라 예측 방향성 모드간 거리 및 G값이 더해진 누적 값 기반으로 인트라 예측 방향성 모드를 선택할 수 있다. 방향성 모드간 거리는 방향성 모드의 인덱스 차이를 의미할 수 있다. 예를 들어, 인덱스 66의 방향성 모드와 인덱스 2의 방향성 모드간 거리 차이는 64가 될 수 있다. 또는 방향성 모드의 인덱스는 66이 마지막 인덱스이므로, 인덱스 66의 방향성 모드와 인덱스 2의 방향성 모드간 거리 차이는 2일 수 있다. 디코더는 주변 블록에 대한 인트라 예측 방향성 모드들 각각에 G값이 더해진 누적 값으로 히스토그램을 획득하고 히스토그램을 분석하여, 가장 높은 누적 값을 가지는 인트라 예측 방향성 모드를 먼저 선택할 수 있다. 다음으로 디코더는 가장 높은 누적 값을 제외한 나머지 누적 값에 대응되는 모드들(예를 들어, 두 번째로 높은 누적 값을 가지는 모드, 세 번째로 높은 누적 값을 가지는 모드, 네 번째로 높은 누적 값을 가지는 모드 등) 중에서 가장 높은 누적 값을 가지는 모드와 방향성 모드간 거리가 가장 적은 모드(가장 가까운 모드)를 사용할 수 있다. 한편, 디코더는 가장 높은 누적 값을 가지는 인트라 예측 방향성 모드를 먼저 선택하고, 디코더는 가장 높은 누적 값을 제외한 나머지 누적 값에 대응되는 모드들(예를 들어, 두 번째로 높은 누적 값을 가지는 모드, 세 번째로 높은 누적 값을 가지는 모드, 네 번째로 높은 누적값을 가지는 모드 등) 중에서 가장 높은 누적 값을 가지는 모드와 방향성 모드간 거리가 가장 큰 모드(가장 멀리 떨어진 모드)를 사용할 수 있다. 상기 각각의 인트라 예측 방향성 모드에 대한 누적 값은 'Histogram analysis' 과정에서 최종적으로 결정된 인트라 예측 방향성 모드들에 대한 가중치를 결정할 때 사용될 수 있다.
도 31의 디코더가 'Histogram analysis' 과정에서 유도한 현재 블록에 대한 인트라 예측 방향성 모드는 2개 이상일 수 있다. 'Histogram analysis'에서 유도된 인트라 예측 방향성 모드가 2개 이상인 경우, 각 인트라 예측 방향성 모드간 거리는 서로 비슷하거나 다를 수 있다. 또한, 인트라 예측 방향성 모드간 누적 값들도 각각 서로 비슷하거나 다를 수 있다. 따라서, 현재 블록에 대한 최적의 예측 샘플을 유도하기 위해서는 다양한 모드 조합 중에서 가장 최적의 조합이 선택되어야 한다. 또한, 디코더는 현재 블록에 대한 최적의 예측 샘플을 유도하기 위해 도 30의 'prediction mode generator' 과정에서 유도된 인트라 예측 방향성 모드뿐만 아니라 'other prediction'에서 유도된 부호화 모드도 조합할 수 있다. 이러한 조합에 대한 정보는 비트스트림에 포함될 수 있다. 본 명세서에서 기술하는 모드 조합은 mode A, mode B, 평면 모드, DC 모드, MIP 모드 중 하나를 사용하거나 일부 또는 전부를 조합하는 것을 의미할 수 있다.
다음으로, 도 31을 참조하면 디코더는 'Prediction mode analysis' 과정에서 'Histogram analysis' 과정에서 결정된 인트라 예측 모드들과 유도된 인트라 예측 모드들에 대응되는 가중치 정보를 이용하여, 현재 블록에 대한 최적의 예측 샘플을 유도하기 위한 최적의 조합을 선택할 수 있다. 구체적으로, 디코더는 유도된 인트라 예측 모드들과 이에 대응되는 가중치 정보를 이용하여 현재 블록에 대한 예측 샘플을 생성하기 위해 가중치 평균을 사용할지 여부, 어떠한 인트라 예측 모드를 사용할 것인지, 인트라 예측 모드에 대한 가중치를 어떻게 설정할 것인지에 대한 정보를 결정할 수 있다. 또한, 디코더는 'Prediction mode analysis' 과정에 있어, 'Histogram analysis' 과정에서 결정된 인트라 예측 모드들과 결정된 인트라 예측 모드들에 대응되는 가중치 정보 및 주변 블록의 인트라 예측 모드들 중에서 적어도 어느 하나를 이용하여 현재 블록에 대한 예측 샘플을 유도하기 위한 최적의 조합을 선택할 수 있다. 구체적으로, 디코더는 현재 블록에 대한 예측 샘플을 생성하기 위해 가중치 평균을 사용할지 여부, 어떠한 인트라 예측 모드를 사용할 것인지, 인트라 예측 모드에 대한 가중치를 어떻게 설정할 것인지에 대한 정보를 결정할 수 있다. 이때, 현재 블록의 가로의 길이 또는 세로의 길이, 양자화 파라미터 정보, 현재 블록의 주변 블록들 중에서 사용 가능한 인트라 예측 모드 정보, 현재 블록의 주변 블록의 잔차 신호의 존재 여부 정보, 현재 블록이 휘도 블록인지 색차 블록인지에 대한 정보들 중에서 적어도 하나 이상을 사용하여 현재 블록에 대한 예측 샘플을 생성하기 위한 최적의 조합 정보(Combination information for prediction modes)를 유도할 수 있다. 조합 정보에는 인트라 예측 방향성 모드 정보들과 인트라 예측 방향성 모드에 대한 가중치가 포함될 수 있다. 예를 들어, 유도된 2개의 인트라 예측 방향성 모드 중에서 가중치가 2번째 높은 모드의 가중치가 '0' 이거나 임의의 값 이내이면, 디코더는 현재 블록에 대한 예측 블록을 생성할 때 가중치 평균을 적용하지 않고, 가중치가 가장 높은 하나의 인트라 예측 방향성 모드만을 사용하여 예측 블록을 생성할 수 있다. 이때, 임의의 값은 1 이상의 정수로, 10일 수 있다. 또한, 유도된 2개의 인트라 예측 방향성 모드 중에서 적어도 하나가 DC 모드, Planar 모드 또는 MIP 모드인 경우(즉, 방향성 모드가 아닌 경우), 디코더는 현재 블록에 대한 예측 블록을 생성할 때 가중치 평균을 적용하지 않고, 가중치가 가장 높은 하나의 인트라 예측 방향성 모드만을 사용하여 예측 블록을 생성할 수 있다. 또한, 유도된 2개의 인트라 예측 모드 중에서 적어도 하나가 DC 모드, Planar 모드, MIP 모드인 경우(즉, 방향성 모드가 아닌 경우), 디코더는 현재 블록에 대한 예측 블록을 생성할 때 가중치 평균을 적용할 수 있다.
도 32는 본 명세서의 일 실시예에 따른 인트라 예측 방향성 모드 정보와 가중치를 이용하여 예측 샘플을 생성하는 방법을 나타낸 도면이다.
구체적으로, 도 32는 도 30의 'Intra prediction'과 'weighted prediction' 과정을 나타낸다. 도 32를 참조하면 디코더가 유도한 인트라 예측 방향성 모드가 복수 개인 경우, 디코더는 복수 개의 인트라 예측 방향성 모드 각각의 가중치 정보를 이용하여 그것들의 가중치 정보를 이용한 가중치 예측(weighted prediction)을 수행하여 예측 샘플을 획득할 수 있다. 가중치 정보는 현재 블록의 가로의 길이, 세로의 길이, 양자화 파라미터 정보, 현재 블록이 휘도인지 색차인지 여부에 대한 정보 중 적어도 하나 이상에 기초하여 재설정될 수 있다(Additional information).
도 33 및 도 34는 본 명세서의 일 실시예에 따른 현재 블록의 인트라 예측 모드를 유도하기 위해 사용되는 템플릿(template)을 나타낸 도면이다.
도 33을 참조하면, 디코더는 현재 블록의 인트라 예측 모드를 유도하기 위해 현재 블록에 인접한 복원된 임의의 영역(픽셀(들))인 템플릿을 사용할 수 있다. 먼저, 디코더는 템플릿에 인접한 주변 픽셀(reference)을 이용하여 템플릿에 대한 예측 템플릿을 생성할 수 있다. 그리고, 디코더는 이미 복원된 템플릿과 가장 유사한 예측 템플릿에 대한 인트라 예측 모드를 현재 블록의 복원을 위해 사용할 수 있다. 상술한 템플릿을 사용하여 현재 블록의 인트라 예측 모드를 유도하는 방법은 TIMD(Template intra mode derivation)라고 기술될 수 있다. 이때, 인트라 예측 모드는 인덱스 0 내지 67의 모드일 수 있고, 현재 블록의 주변 블록으로부터 유도된 MPM 리스트 내에 있는 인트라 예측 모드만 해당될 수도 있다. 이때, 인트라 예측 모드는 현재 블록의 주변 블록으로부터 유도된 MPM 리스트 내에 있는 인트라 예측 모드와 해당 인트라 예측 모드와 임의의 수만큼 차이가 나는 모드들일 수 있다. 임의의 수는 1, 2, 3, ... 일 수 있다. 또는 템플릿에 대한 인트라 예측 모드에는 방향성 모드만 해당할 수 있고, 비방향성 모드(평면 모드, DC 모드)는 해당하지 않을 수 있다.
이하 TIMD 모드를 이용하여 인트라 예측 방향성 모드를 유도하는 방법에 대해 설명한다.
i) 디코더는 템플릿의 크기를 설정할 수 있다. 템플릿의 가로 또는 세로의 크기(길이)는 4일 수 있고, 현재 블록의 가로 또는 세로의 크기(길이)가 8 이하인 경우, 템플릿의 가로 또는 세로의 크기는 2로 설정될 수 있다. ii) 디코더는 템플릿의 타입을 설정할 수 있다. 템플릿의 타입은 좌측 샘플만 사용하는 타입, 상측 샘플만 사용하는 타입, 좌측, 상측 및 좌상측 샘플을 모두 사용하는 타입으로 구분될 수 있다. 디코더는 주변 블록이 유효한지 또는 주변 블록이 인트라 예측 방향성 모드를 유도하는데 사용될 수 있는지 여부에 따라 템플릿의 타입을 결정할 수 있다. 한편, 주변 블록이 인트라 예측 방향성 모드를 유도하는데 사용될 수 없는 경우, TIMD 모드는 평면 모드로 설정될 수 있고, 가중치 평균은 수행되지 않을 수 있다. iii) 디코더는 현재 블록에 대한 템플릿을 구성할 수 있다. iv) 디코더는, 현재 블록이 방향성을 가지는지 판단하기 위해 현재 블록의 좌측, 상측, 좌상측, 우상측, 좌하측에 위치한 주변 블록들에 대한 인트라 예측 방향성 모드를 유도할 수 있다. v) 현재 블록의 주변 블록들이 모두 방향성을 가지지 않는 경우(예를 들어, 비방향성 모드(DC 모드, 평면 모드, MIP 모드 등)), 디코더는 최소 코스트(Cost)를 가지는 하나의 인트라 예측 방향성 모드를 선택하고, TIMD 모드를 수행하지 않을 수 있다. 이때, 여러 개의 예측 블록을 이용하는 가중치 평균은 수행되지 않을 수 있다. vi) 현재 블록의 주변 블록들 중 방향성을 가지는 블록이 하나 이상 존재한다면, 후술하는 과정이 수행될 수 있다. 후술하는 과정은 MPM 리스트 내에 존재하는 인트라 예측 방향성 모드에 기초하여 수행될 수 있다. 67가지의 인트라 예측 방향성 모드를 모두 확인하는 경우 복잡도가 증가할 수 있기 때문이다. a. 디코더는 MPM 리스트를 구성할 수 있다. b. 다음으로, 디코더는 MPM 리스트 내에 DC 모드, 수평 모드, 수직 모드가 존재하지 않으면 MPM 리스트 내에 추가하여 MPM 리스트를 수정할 수 있다. c. 디코더는 수정된 리스트 내의 모든 인트라 예측 방향성 모드들에 대한 평가를 수행하여 코스트를 비교할 수 있다. 디코더는 가장 작은 코스트를 가지는 제1 모드와 두번째로 작은 코스트를 가지는 제2 모드를 선택할 수 있다. d. 디코더는, 정확도를 높이기 위해 제1 모드의 인트라 예측 방향성 모드 인덱스와 제2 모드의 인트라 예측 방향성 모드의 인덱스보다 1만큼 적거나 큰 인덱스에 대응되는 인트라 예측 방향성 모드에 대한 평가를 추가적으로 수행할 수 있다. 디코더는 추가적인 평가를 수행하고 가장 작은 코스트를 가지는 제3모드와 2번째로 작은 코스트를 가지는 제4 모드를 다시 선택할 수 있다. 한편, 제1 모드와 제3 모드는 서로 동일할 수 있고, 제2 모드와 제4 모드는 동일할 수 있다. e. 디코더는 제3 모드와 제4 모드의 코스트에 기초하여 가중치 평균을 수행할지 여부를 결정할 수 있다. 제3 모드의 코스트와 제4 모드의 코스트 간 차이가 특정 값보다 작다면 디코더는 가중치 평균을 수행할 수 있고, 제3 모드와 제4 모드의 가중치는 제3 모드와 제4 모드의 코스트를 기반으로 결정될 수 있다. 제3 모드의 코스트와 제4 모드의 코스트 간 차이가 특정 값보다 크다면 디코더는 가중치 평균을 수행하지 않고 제3 모드만을 사용하여 예측 블록을 생성할 수 있다. 이때 특정 값은 미리 약속된 값일 수 있다.
템플릿의 크기는 현재 블록의 가로의 길이 또는 세로의 길이에 따라 달라질 수 있다. 예를 들어, 도 33(a)와 같이 현재 블록의 가로의 길이보다 긴 상측 템플릿(Above template)이 구성될 수 있다. 이때, 상측 템플릿의 세로 길이는 미리 약속된 길이일 수 있다. 마찬가지로, 현재 블록의 세로의 길이보다 긴 좌측 템플릿(Left template)이 구성될 수 있다. 이때, 좌측 템플릿의 가로 길이는 미리 약속된 길이일 수 있다. 미리 약속된 길이는 1, 2, 3, ... 일 수 있다.
현재 블록이 CTU 경계에 위치해 있는 경우(현재 블록의 상하좌우 중 어느 경계가 CTU의 경계에 포함되는 경우), TIMD 모드를 위해 사용되는 템플릿을 유도/예측하기 위한 참조 픽셀은 변경될 수 있다. 도 34를 참조하면 현재 블록의 상측 경계가 CTU의 경계에 포함되는 경우, 템플릿 구성을 위해 사용되는 현재 블록의 상측에 위치한 참조 라인은 1개일 수 있다. 이는 라인 버퍼(line buffer) 메모리 사용량을 최소화하기 위함이다. 따라서, 디코더는 현재 블록의 상측 템플릿을 구성하지 않고, 현재 블록의 좌측 템플릿만 구성하여 TIMD 모드를 수행할 수 있다. 이때, 좌측 템플릿을 예측하기 위한 참조 픽셀은 현재 블록의 상측 참조 픽셀(above reference)와 좌측 참조 픽셀(left reference)이 사용될 수 있다. 이때, 좌측 템플릿의 높이는 도 34(a)와 같이 현재 블록의 높이와 동일할 수 있다. 또한, 도 34(b)와 같이 디코더는 현재 블록의 좌측에 이웃하는 블록이 이미 복원이 완료된 블록인지를 확인한 후, 만일 복원이 완료된 블록일 경우, 좌측 템플릿의 높이를 현재 블록의 높이보다 크게 구성할 수 있다.
일반적으로 현재 블록에 대한 예측 샘플의 정확도는 디코더가 현재 블록의 인접한 주변 픽셀을 많이 참조할수록 높아질 수 있다. 반면에, 주변 픽셀을 많이 참조하게 되면 요구되는 메모리가 증가하게 된다. 또한, 현재 블록에 인접한 주변 블록 중 아직 복원되지 않은 블록이 존재할 경우, 해당 영역은 템플릿으로 사용할 수 없다. 이러한 메모리 증가 및 복원되지 않은 영역에 대한 효과적인 처리를 위해, 도 33(b)와 같이 상측 템플릿의 길이는 현재 블록의 가로의 길이와 동일하게 좌측 템플릿의 길이는 현재 블록의 세로의 길이와 동일하게 설정될 수 있다.
디코더는 현재 블록에 대한 예측 샘플을 획득하는데 템플릿을 이용하여 유도되는 인트라 예측 모드를 사용할 수 있다. 디코더는 현재 블록에 인접한 주변 픽셀을 이용하여 예측 샘플을 생성할 수 있고, 예측 샘플을 생성하기 위해 어떠한 주변 픽셀을 사용할 것인지 적응적으로 선택할 수 있다. 또한, 디코더는 예측 샘플을 생성하기 위해 다중 참조 라인을 사용할 수 있는데, 이때 다중 참조 라인의 인덱스 정보는 비트스트림에 포함될 수 있다.
엔트로피 코딩을 위해서, TIMD 모드를 위한 다중 참조 라인의 인덱스에 대한 컨텍스트(context)가 새롭게 정의될 수 있다. 컨텍스트 종류의 증가는 메모리 및 컨텍스트 스위칭 복잡도와 관련될 수 있다. 따라서, TIMD 모드에서 사용되는 다중 참조 라인의 인덱스를 코딩 및 디코딩하기 위해 사용되는 컨텍스트는 기존의 다중 참조 라인의 인덱스에 대한 컨텍스트를 재사용한 것일 수 있다.
현재 블록의 잔차 신호에 대한 변환은 2단계로 진행될 수 있다. 1차 변환은 DCT-II, DST-VII, DCT-VIII, DCT5, DST4, DST1, identity transformation (IDT) 등의 변환을 수평 그리고 수직에 각각 적응적으로 적용되는 것일 수 있다. 1차 변환이 완료된 변환 계수에 2차 변환이 추가적으로 적용될 수 있고, 2차 변환은 1차 변환된 변환 계수와 미리 정의된 매트릭스(matrix) 간의 행렬 곱으로 계산될 수 있다. 2차 변환은 저대역 비분리 변환(Low Frequency Non-Separable Transform, LFNST)로 기술될 수 있다. 2차 변환을 위한 매트릭스 변환 세트는 현재 블록의 인트라 예측 모드에 따라 달라질 수 있다. 2차 변환에 사용되는 변환 매트릭스의 계수 정보는 비트스트림에 포함될 수 있다.
DIMD 모드 또는 TIMD 모드가 적용되는 현재 블록에 2차 변환이 적용되는 경우, 2차 변환에 대한 변환 세트는 DIMD 모드 또는 TIMD 모드로 유도된 인트라 예측 모드에 기초하여 결정될 수 있다. 2차 변환에 사용되는 변환 매트릭스의 계수 정보는 비트스트림에 포함될 수 있다. 디코더는 비트스트림에 포함된 계수 정보를 파싱하여 DIMD 모드 또는 TIMD 모드를 위한 2차 변환의 매트릭스 계수 정보를 설정할 수 있다. 이때, TIMD 모드로부터 유도된 2개의 인트라 예측 모드들 중에서 하나가 1차 변환 또는 2차 변환 세트를 선택하는데 사용될 수 있다. 2개의 인트라 예측 방향성 모드 각각의 코스트를 비교하여 가장 작은 코스트를 가지는 인트라 예측 방향성 모드가 1차 변환 또는 2차 변환 세트를 선택하는데 사용될 수 있다. 또한, DIMD로부터 유도된 2개의 인트라 예측 방향성 모드들 중에서 하나가 1차 변환 또는 2차 변환 세트를 선택하는데 사용될 수 있다. 2개의 인트라 예측 모드 각각의 가중치를 비교하여 가장 높은 가중치를 가지는 인트라 예측 방향성 모드가 1차 변환 또는 2차 변환 세트를 선택하는데 사용될 수 있다.
TIMD 모드는 현재 블록의 템플릿을 예측하고, 템플릿으로부터 유도된 인트라 예측 모드를 현재 블록의 예측 블록을 생성하는데 사용하는 모드이므로 복잡도가 높다. 따라서, 디코더가 템플릿 영역에 대한 예측 템플릿을 생성할 때, 기존의 참조 샘플 필터링 과정을 수행하지 않을 수 있다. 또한, 현재 블록에 ISP 모드가 적용되는 경우 또는 현재 블록이 CIIP 모드로 적용되는 경우, TIMD 모드가 적용되지 않을 수 있다. TIMD 모드가 적용된 현재 블록에는 ISP 모드 또는 CIIP 모드가 적용되지 않을 수 있거나 ISP 또는 CIIP와 관련된 신택스가 파싱되지 않을 수 있다. 이때 파싱되지 않는 ISP 또는 CIIP와 관련된 신택스의 값은 미리 지정된 값으로 추론(infer)될 수 있다.
템플릿 예측은 현재 블록에 인접한 좌측 템플릿 영역과 상측 템플릿 영역으로 나누어져 수행될 수 있고, 각 템플릿마다 인트라 예측 모드가 유도될 수 있다. 또한 각 템플릿마다 인트라 예측 모드가 2개 이상 유도될 수 있고, 현재 블록에 대한 인트라 예측 모드는 4개 이상이 될 수 있다. 인트라 예측 모드가 2개 이상인 경우, 현재 블록에 대한 예측 샘플은 유도된 인트라 예측 모드들을 모두 사용하여 생성될 수 있고, 디코더는 생성된 예측 샘플들을 가중치 평균하여 현재 블록에 대한 최종 예측 블록을 생성할 수 있다. 이때, 예측 샘플을 생성하기 위해 템플릿 예측으로부터 유도된 2개 이상의 인트라 예측 모드들, 평면 모드, DC 모드, MIP 모드 중에서 적어도 3개 이상이 사용될 수 있다. 예를 들어, 디코더가 현재 블록에 대한 예측 샘플을 생성(획득)할 때, 디코더는 템플릿 예측으로 유도된 인트라 예측 모드들과 평면 모드를 사용하여 생성한 예측 샘플들을 가중치 평균하여 최종 예측 샘플을 생성할 수 있다.
CIIP 모드가 적용되는 경우에도 상술한 방법들을 이용하여 예측 샘플은 생성될 수 있다. CIIP 모드는 현재 블록에 대한 예측 샘플(블록)을 생성할 때, 인트라 예측과 인터 예측을 모두 사용하는 방법이다. 현재 블록에 대한 예측 샘플은 인트라 예측 샘플과 인터 예측 샘플 간의 가중치 평균으로 생성될 수 있다.
CIIP 모드를 적용하여 인트라 예측 샘플이 생성되는 경우, DIMD 모드 또는 TIMD 모드가 사용될 수 있다. 이때 DIMD 모드가 사용되는 경우, 인트라 예측 샘플은 DIMD 조합 정보에 기초하여 생성될 수 있다. 예를 들어, 디코더는 가중치가 가장 높은 인트라 예측 모드를 사용하여 제1 예측 샘플을 생성하고 2번째로 가중치가 높은 인트라 예측 모드를 사용하여 제2 예측 샘플을 생성할 수 있다. 그리고, 디코더는 제1 예측 샘플과 제2 예측 샘플을 가중치 평균하여 최종 인트라 예측 블록을 생성할 수 있다. 이때, 디코더는 현재 블록의 주변 블록들 중 평면 모드로 예측된 샘플과 제1 예측 샘플, 제2 예측 샘플 총 3개의 예측 샘플들을 가중치 평균하여 최종 인트라 예측 블록을 생성할 수 있다. TIMD 모드가 사용되는 경우, 인트라 예측 샘플은 TIMD 조합 정보에 기초하여 생성될 수 있다. 예를 들어, 디코더는 2개의 인트라 예측 모드 각각을 사용하여 2개의 예측 샘플을 생성할 수 있다. 그리고, 디코더는 2개의 예측 샘플을 가중치 평균하여 최종 인트라 예측 샘플을 생성할 수 있다. 이때, 디코더는 2개의 예측 샘플과 평면 모드로 예측된 샘플을 가중치 평균하여 최종 인트라 예측 샘플을 생성할 있다.
인트라 예측 샘플은 위치에 따라 정확도가 달라질 수 있다. 즉, 예측 샘플 내 예측에 사용된 주변 픽셀과 거리가 먼 위치의 픽셀은 거리가 가까운 위치의 픽셀보다 더 많은 잔차 신호를 포함할 수 있다. 따라서, 디코더는 인트라 예측 모드의 방향에 따라 예측 샘플을 수직, 수평, 대각선 방향으로 분할하고, 예측에 사용된 주변 픽셀과의 거리에 따라 가중치를 다르게 설정할 수 있다. 이는 CIIP 모드를 사용하여 생성한 인트라 예측 블록 또는 2개 이상의 인트라 예측 모드를 사용하여 생성한 인트라 예측 블록에 적용될 수 있으며, 참조 픽셀의 위치와 예측 블록 내 픽셀 위치 간의 거리에 따라 예측 블록 내 픽셀마다 가중치를 다르게 설정할 수 있다. 실시 일 예로, 현재 블록의 인트라 예측 모드가 수직 방향 또는 수직과 유사한 방향을 가지는 모드일 경우, 예측 블록의 픽셀 위치가 상단 픽셀과 거리가 가까울수록 높은 가중치가 설정되고 상단 픽셀과 거리가 먼 픽셀 위치일수록 낮은 가중치가 각 픽셀 위치마다 설정될 수 있다.
현재 블록이 CIIP 모드로 부호화되는 경우, 디코더는 인트라 예측 샘플과 인터 예측 샘플을 가중치 평균하여 최종 예측 블록을 생성할 수 있다. 인터 예측 샘플에서의 픽셀 단위 가중치는 인트라 예측 샘플의 픽셀 단위 가중치를 고려하여 설정될 수 있다. 예를 들어, 인터 예측 샘플의 픽셀 단위 가중치는 전체 가중치의 합에서 인트라 예측 샘플의 픽셀 단위 가중치를 뺀 값이 될 수 있다. 이때, 전체 가중치의 합은 픽셀 단위에서 인트라 예측 샘플의 가중치와 인터 예측 샘플의 가중치가 더해진 값일 수 있다.
예측 샘플 생성을 위해 2개 이상의 인트라 예측 모드가 사용되는 경우, 디코더는 각 인트라 예측 모드에 기초하여 예측 샘플을 각각 생성하고, 생성된 예측 샘플들을 가중치 평균하여 최종 예측 샘플을 생성할 수 있다. 각 인트라 예측 모드에 대한 예측 샘플을 생성할 때, 인트라 예측 모드에 따른 픽셀 단위 가중치가 적용될 수 있다.
픽셀 단위 가중치는 인트라 예측 모드, 현재 블록의 가로의 길이, 세로의 길이, 양자화 파라미터, 현재 블록이 휘도 인지 또는 색차 인지에 대한 정보, 주변 블록의 인트라 코딩 여부, 주변 블록의 잔여 변환 계수에 대한 존재 유무 정보 등 적어도 어느 하나에 기초하여 설정될 수 있다.
도 35는 본 명세서의 일 실시예에 따른 복수의 참조 픽셀 라인에 기초하여 예측 샘플(픽셀)을 생성하는 방법을 나타내는 도면이다.
도 35(a)를 참조하면, 비디오 신호 처리 장치는 현재 블록(3501)에 인접한 제1 참조 픽셀 라인 (reference line 1)과 제1 참조 픽셀 라인에 상측으로 인접한 제2 참조 픽셀 라인(reference line 2)에 기초하여 현재 블록 내 예측 샘플(3502)을 생성할 수 있다. 도 35(a)의 예측 샘플 샘플 (3502)은 본 명세서의 일 실시예에 따른 위치에 대응되는 샘플일 뿐, 픽셀의 위치는 이에 한정되지 않는다. 본 명세서에서 비디오 신호 처리 장치가 생성한다는 의미는 비디오 신호 처리 장치가 획득한다는 의미와 동일할 수 있다. 도 35(b)는 도 35(a)를 보다 자세하게 나타낸 도면이다. 예를 들어, 비디오 신호 처리 장치는 제1 참조 픽셀 라인의 6개의 참조 픽셀들을 통해, 인트라 예측 모드에 따라 스무딩(smoothing) 필터, 큐빅(cubic) 또는 가우시안(gaussian) 필터를 사용하여 제1 예측 픽셀(3503)을 생성할 수 있다. 그리고, 비디오 신호 처리 장치는 제2 참조 픽셀 라인의 6개의 참조 픽셀들을 통해, 인트라 예측 모드에 따라 스무딩(smoothing) 필터, 큐빅(cubic) 또는 가우시안(gaussian) 필터를 사용하여 제2 예측 픽셀(3504)을 생성할 수 있다. 비디오 신호 처리 장치는 생성한 제1 예측 픽셀(3503)과 제2 예측 픽셀(3504)에 대해 임의의 정해진 가중치를 통해 가중치 평균을 수행하여 제3 예측 픽셀(3505)을 생성할 수 있다. 이때, 제2 참조 픽셀 라인의 6개의 참조 픽셀들은, 현재 블록의 인트라 예측 모드, 생성할 픽셀 위치, 참조 픽셀 라인의 위치 등을 고려하여 제1 참조 픽셀 라인의 각 픽셀들보다 오른쪽으로 한 픽셀만큼 이동한 위치의 참조 픽셀들일 수 있다. 비디오 신호 처리 장치는 제3 예측 픽셀(3505)에 기초하여 현재 블록 내 예측 샘플(3502)을 생성할 수 있다. 또는 비디오 신호 처리 장치는 제3 예측 픽셀(3505) 및, 제3 예측 픽셀(3505)과 현재 블록 내 예측 샘플(3502)간의 거리에 기초하여 현재 블록 내 예측 샘플(3502)을 생성할 수 있다. 비디오 신호 처리 장치가 제3 예측 픽셀(3505)을 생성하기 위해 사용하는 가중치는 0이상의 정수 일 수 있다. 예를 들어, 제1 예측 픽셀(3503)의 가중치는 3일 수 있고, 제2 예측 픽셀(3504)의 가중치는 1일 수 있다. 이때, 현재 블록의 인트라 예측 모드, 생성되는 픽셀의 위치(예를 들어, 도 35의 제1 예측 픽셀(3503)의 위치, 제2 예측 픽셀(3504)의 위치 제3 예측 픽셀(3505)의 위치), 참조 픽셀 라인의 위치(예를 들어, 도 35의 제1 참조 픽셀 라인, 제2 참조 픽셀 라인의 위치) 등 적어도 하나 이상에 기초하여 예측 샘플을 생성하기 위해 사용되는 참조 픽셀의 위치(도 35의 제1 참조 픽셀 라인의 6개의 참조 픽셀의 위치, 제2 참조 픽셀 라인의 6개의 참조 픽셀의 위치)는 달라질 수 있다.
비디오 신호 처리 장치는 미리 지정되거나 또는 시그널링된 참조 샘플 라인의 샘플을 이용하여 인트라 예측 모드의 방향성에 따라 현재 블록 내 예측 샘플을 획득할 수 있다. 여기서 미리 지정된 참조 샘플 라인은 현재 블록에 인접한 참조 샘플일 수 있다. 또한, 시그널링된 참조 샘플 라인은 현재 블록의 경계로부터 -X 샘플 위치의 샘플일 수 있으며, X는 시그널링된 값일 수 있다. X는 1, 2, 3 등이 될 수 있다. 비디오 신호 처리 장치는 복수의 참조 샘플 라인을 사용하여 예측 블록을 생성할 수 있다. 본 명세서에서 미리 지정된 참조 샘플 라인 또는 시그널링된 참조 샘플 라인은 메인 참조 샘플 라인이라고 할 수 있다. 비디오 신호 처리 장치는 서브 참조 샘플 라인을 메인 참조 샘플 라인에 기초하여 설정할 수 있다. 본 명세서에서 서브 참조 샘플 라인은 메인 참조 샘플 라인보다 Y 샘플만큼 떨어진 위치의 참조 샘플 라인일 수 있다. 이때, Y는 정수 일 수 있으며, -3, -2, -1, 1, 2, 3 등일 수 있다. 인코더는 서브 참조 샘플 라인에 대한 정보를 시그널링하여 비트스트림에 포함시킬 수 있으며, 디코더는 해당 정보를 파싱하여 서브 참조 샘플 라인을 설정할 수 있다. 비디오 신호 처리 장치에서는 하나의 인트라 예측 모드를 이용하여 메인 참조 픽셀 라인과 서브 참조 샘플 라인으로부터 예측 블록을 각각 생성한 후, 각 예측 블록을 가중치 평균하여 최종 예측 블록을 생성할 수 있으며, 이러한 방법을 인트라 퓨젼(intra fusion)이라고 할 수 있다.
도 36은 본 명세서의 일 실시예에 따른 복수의 참조 픽셀 라인을 사용하여 샘플을 예측하는 방법을 나타낸다.
도 36을 참조하면 비디오 신호 처리 장치는 복수의 참조 픽셀 라인을 입력 받아 인트라 예측을 수행하여 현재 블록 내 예측 블록을 생성할 수 있다. 어떠한 참조 픽셀 라인이 사용되는지에 따라 다른 예측 블록이 생성될 수 있고, 비디오 신호 처리 장치는 각 예측 블록에 대해 입력된 가중치에 따라 가중치 평균하여 최종 예측 블록을 생성할 수 있다. 이때 가중치는 기 설정된 값일 수 있다. 예를 들어, 메인 참조 픽셀 라인으로 예측된 샘플의 가중치는 3이고, 서브 참조 픽셀 라인으로 예측된 샘플의 가중치는 1일 수 있다. 이때, 가중치는 현재 블록의 크기, 현재 블록의 가로 또는 세로의 크기, 현재 블록의 인트라 예측 모드, 양자화 파라미터 정보, 메인 참조 픽셀 라인과 서브 참조 픽셀 라인 간의 거리(또는 차이) 등 적어도 하나 이상에 기초하여 결정될 수 있다. 또한, 참조 픽셀 라인은 현재 블록의 크기, 현재 블록의 가로 또는 세로의 크기, 현재 블록의 인트라 예측 모드, 양자화 파라미터 정보, MRL 정보 등 적어도 하나 이상에 기초하여 결정될 수 있다. 예를 들어, 메인 참조 픽셀 라인은 현재 블록에 인접한 참조 픽셀 라인일 수 있고, 서브 참조 픽셀 라인은 MRL이 지시하는 참조 픽셀 라인일 수 있다. 또 다른 예로, 메인 참조 픽셀 라인은 MRL이 지시하는 참조 픽셀 라인일 수 있고, 서브 참조 픽셀 라인은 MRL이 지시하는 참조 픽셀 라인보다 임의의 정해진 위치만큼 떨어진 참조 픽셀 라인일 수 있으며, 임의의 정해진 위치는 -N ~ +N까지의 정수일 수 있으며, N은 0보다 큰 정수일 수 있다.
상술한 현재 블록 내 예측 샘플을 생성하는 방법에서 사용되는 인트라 예측 모드는 참조 픽셀 라인마다 동일할 수 있다. 또는, 반대로 상술한 현재 블록 내 예측 샘플을 생성하는 방법에서 사용되는 인트라 예측 모드는 참조 픽셀 라인마다 상이할 수 있다. 즉, 메인 참조 픽셀 라인에서는 시그널링된 인트라 예측 모드가 사용될 수 있고, 서브 참조 픽셀 라인에서는 메인 참조 픽셀 라인에서 사용된 인트라 예측 모드(의 인덱스)에서 임의의 값만큼 더해지거나 빼진 (인덱스에 대응되는)예측 모드가 사용될 수 있다. 이때, 임의의 값은 1이상의 정수 일 수 있다. 또한, 비디오 신호 처리 장치는 메인 참조 픽셀 라인에서 사용된 인트라 예측 모드의 값에 따라 임의의 값을 증가시킬 지 혹은 감소시킬 지를 결정할 수 있다. 예를 들어, 비디오 신호 처리 장치는 인트라 예측 모드의 각도가 음수일 경우에는 임의의 값만큼 증가시키고, 양수일 경우에는 임의의 값만큼 감소시킬 수 있다.
도 37은 본 명세서의 일 실시예에 따른 템플릿에 기초한 복수의 참조 픽셀 라인을 사용하여 최적의 참조 픽셀 라인을 결정하는 방법을 나타낸 구조도이다.
도 37을 참조하면 인코더는 복수의 참조 픽셀 라인을 입력 받아 인트라 예측을 수행하여 템플릿에 대한 예측 블록들을 생성할 수 있다. 어떠한 참조 픽셀 라인이 사용되었는지에 따라 다른 예측 블록이 생성될 수 있다. 인코더는 예측 블록들 각각에 입력된 다양한 가중치 정보에 따라 가중치 평균을 수행하여 최종적으로 템플릿에 대한 예측 블록을 생성할 수 있다. 어떠한 참조 픽셀 라인들이 사용되었는지, 어떠한 가중치가 사용되었는지에 따라 복수의 예측 블록이 생성될 수 있다. 인코더는 각 예측 블록과 기준 템플릿 간의 코스트를 계산한 후, 각 예측 블록에 대응되는 코스트를 기반으로 오름차순으로 재정렬하고, 미리 정해진 개수의 상위 몇 개의 후보만을 사용하여 별도의 리스트를 구성할 수 있다. 이때, 미리 정해진 개수는 2이상의 정수일 수 있으며, 10일 수 있다. 인코더는 별도의 리스트 내 예측 블록을 생성하는데 사용된 조합 정보를 통해 현재 블록에 대한 예측 블록을 생성할 수 있다. 그리고 인코더는 화질 및 비트량 관점에서 최적의 후보를 리스트에서 선택한 후 최적의 후보의 인덱스에 대한 정보를 포함하는 비트스트림을 생성하고 시그널링할 수 있다. 디코더는 상술한 방법을 통해 동일한 별도의 리스트를 구성하고, 비트스트림에 포함된 최적의 후보의 인덱스에 대한 정보를 파싱하여 결정되는 최적의 후보의 인덱스가 지시하는 최적의 조합 정보를 사용하여 예측 샘플을 생성할 수 있다.
현재 블록이 인트라 예측 모드로 부호화되는 경우, 부호화되는 인트라 예측 모드는 각도 모드, 평면(Planar) 모드, DC 모드, MIP 모드 중 어느 하나의 모드일 수 있다. 각도 모드에 따른 예측은 65가지의 각도에 따라 수행되는 예측일 수 있고, MIP 모드에 따른 예측은 미리 정의된 매트릭스를 기반으로 수행되는 예측일 수 있다. 각도 모드는 현재 블록 내에 에지와 같은 특성이 존재하는 블록에서 효과적일 수 있다. 하지만, 현재 블록이 완만한 특성을 가질 경우, 각도 모드를 사용하여 예측된 블록에는 블록 간 경계 부분의 불연속적인 에지가 생성되거나 블록 내부에 가시적인 윤곽선이 생성될 수 있다. 이는 부호화 효율을 감소시키는 요인이 될 수 있다. 또한, DC 모드는 낮은 비트율에서 블록 간 경계 부분에서 가시적인 에지를 생성하는 단점이 있을 수 있다. 평면 모드는 각도 모드와 DC 모드로 발생되는 에지 문제를 개선하여 불연속성이 없는 예측 블록을 생성할 수 있다.
도 38은 본 명세서의 일 실시예에 따른 평면 모드를 사용하여 예측 샘플을 생성하는 방법을 나타낸다.
도 38을 참조하면 평면(planar) 모드에 따르면 비디오 신호 처리 장치는 현재 블록 내 예측 샘플을 생성하기 위해 수직 방향으로 선형 예측된 값을 생성하고, 수평 방향으로 선형 예측된 값을 생성할 수 있다. 비디오 신호 처리 장치는 수직 방향으로 선형 예측된 값과 수평 방향으로 선형 예측된 값을 가중치 평균하여 현재 블록 내 예측 샘플(값)을 생성할 수 있다.
수직 방향으로 선형 예측된 값(predV (x, y)은 수학식 4에 기초하여 생성될 수 있고, 수평 방향으로 선형 예측된 값(predH (x, y)은 수학식 5에 기초하여 생성될 수 있다. 그리고, 새로운 예측 값(pred (x, y)은 수학식 6에 기초하여 생성될 수 있다. 수학식 4 내지 6에서 W는 현재 블록의 가로의 크기(너비)이고, H는 현재 블록의 세로의 크기(높이)일 수 있다. rec(x, y)는 (x, y)좌표에서의 픽셀 값을 의미할 수 있다. 예측 값(predV(x, y), predH(x, y), pred(x, y))는 (x, y)좌표에서의 예측된 픽셀 값을 의미할 수 있다.
비디오 신호 처리 장치는 평면 모드에 따라 현재 블록과 관련된 예측을 수행할 때 수직 방향으로의 선형 예측만을 사용할 수 있다. 또는 비디오 신호 처리 장치는 평면 모드에 따라 현재 블록과 관련된 예측을 수행할 때 수평 방향으로의 선형 예측만을 사용할 수 있다. 따라서, 평면 모드는 3가지 모드로 구분될 수 있다. 즉, 종래의 수직 방향 및 수평 방향으로의 선형 예측을 이용하여 생성되는 예측 블록을 가중치 평균하는 방법에 더하여, 수직 방향으로의 선형 예측만을 사용하는 수직 방향 평면 모드, 수평 방향으로의 선형 예측만을 사용하는 수평 방향 평면 모드로 구분될 수 있다. 인코더는 현재 블록이 3가지 평면 모드 중 어떠한 예측 모드를 사용했는지에 대한 정보를 포함하는 비트스트림을 생성하고, 시그널링할 수 있다. 디코더는 비트스트림에 포함된 어떠한 예측 모드를 사용했는지에 대한 정보를 파싱하여 결정되는 평면 모드에 기초하여 현재 블록에 대한 예측 블록을 생성할 수 있다.
도 39는 본 명세서의 일 실시예에 따른 다중 예측 모드를 사용하여 MPM 리스트를 구성하는 방법을 나타낸다.
도 39를 참조하면, 비디오 신호 처리 장치는 MPM 리스트를 구성할 때, 항목 당 2개 이상의 인트라 예측 방향성 모드를 포함하도록 설정할 수 있다. 도 39(a)에서 A, B, C, … , F, G는 임의의 인트라 예측 방향성 모드, MIP, Intra TMP, EIP, OBIC, IBC, DIMD, TIMD, SGPM, 주변 블록에서 사용한 BV에 기초하여 구성된 BV 기반 모드 중에 하나를 나타낼 수 있으며, "N/A"은 사용되지 않는다는 것으로 MPM 리스트의 4번째와 5번째는 다중 예측 모드가 아닌 하나의 인트라 예측 방향성 모드로만 구성될 수 있다. 도 39(b)와 같이, MPM 리스트에 먼저 단일 예측 모드가 추가된 후, 다음으로 다중 예측 모드가 추가될 수 있다. "N/A"은 사용되지 않는다는 것으로 MPM 리스트의 1번째와 2번째는 다중 예측 모드가 아닌 하나의 인트라 예측 방향성 모드로만 구성될 수 있다.
도 40은 본 명세서의 일 실시예에 따른 다중 예측 모드 기반의 후보 리스트를 사용하는 방법을 나타낸다.
도 40을 참조하면 비디오 신호 처리 장치는 다중 예측 모드 기반의 후보 리스트를 이용하여 현재 블록의 예측 블록을 생성할 수 있다. 비디오 신호 처리 장치는 현재 블록을 위한 다중 예측 모드 후보 리스트를 구성할 수 있다. 이때, 비디오 신호 처리 장치는 주변 블록 정보, 현재 블록의 DIMD 정보, 현재 블록의 TIMD 정보, 현재 블록의 MPM 리스트, 현재 블록의 Non-MPM 리스트 중에서 적어도 하나 이상을 사용하여 다중 예측 모드 후보 리스트를 구성할 수 있다. 주변 블록 정보는 현재 블록에 인접한 블록, 현재 블록에 인접하지 않고 미리 지정된 거리만큼 떨어진 블록, 별도의 메모리에 저장된 주변 블록 등이 될 수 있다. 주변 블록 정보는 주변 블록의 인트라 예측 방향성 모드 정보 및 각 모드에 대한 가중치 값일 수 있다. 미리 지정된 거리는 현재 블록의 좌상단 샘플 위치, 현재 블록의 가로 및 세로의 크기, 미리 지정된 가로 및 세로의 크기 중에 적어도 하나 이상에 기초하여 결정될 수 있다. 예를 들어, 비디오 신호 처리 장치는 현재 블록의 좌상단 샘플 위치를 기반으로 현재 블록의 가로의 크기만큼 수평 방향으로 왼쪽으로 이동된 위치와 현재 블록의 좌상단 샘플 위치를 기반으로 수직 방향으로 위쪽으로 이동된 위치를 기반으로 주변 블록을 유도할 수 있다.
비디오 신호 처리 장치가 다중 예측 모드 기반의 후보 리스트를 구성하는 방법에 대해 설명한다. 비디오 신호 처리 장치는 주변 블록 정보, 현재 블록의 DIMD 정보, 현재 블록의 TIMD 정보, 현재 블록의 MPM 리스트, 현재 블록의 Non-MPM 리스트, 주변 블록에서 DIMD를 유도하기 위해 사용한 여러 개의 히스토그램들의 누적 히스토그램으로부터 유도된 DIMD 정보, 주변 블록에서 사용된 인트라 예측 모드들 중에서 발생 빈도가 높은 상위 N(미리 정해진 개수)개의 인트라 예측 모드들 중에서 적어도 하나를 사용하여 다중 예측 모드 후보를 생성할 수 있다. 미리 정해진 개수는 정수로 5일 수 있다. 예를 들어, 발생 빈도에 기초한 다중 예측 모드 후보에는 5개의 인트라 예측 모드가 포함될 수 있다. 이때, 다중 예측 모드는 2개 이상의 인트라 예측 방향성 모드로 구성될 수 있으며, 하나의 다중 예측 모드 후보의 인트라 예측 방향성 모드는 서로 다를 수 있다. 또한, 다중 예측 모드에는 방향성을 가진 인트라 예측 방향성 모드만 포함될 수 있다. 또한, 다중 예측 모드에는 비방향성 모드인 평면 모드가 포함되지 않을 수 있다. 주변 블록으로부터 유도된 인트라 예측 방향성 모드가 평면 모드인 경우에는 주변 블록으로부터 유도된 인트라 예측 방향성 모드는 다중 예측 모드에서 제외될 수 있다. 또한, 다중 예측 모드에는 비방향성 모드인 DC 모드가 포함되지 않을 수 있다. 주변 블록으로부터 유도된 인트라 예측 방향성 모드가 DC 모드인 경우에는 주변 블록으로부터 유도된 인트라 예측 방향성 모드는 다중 예측 모드에서 제외될 수 있다. 상술한 방법으로 생성된 다중 예측 모드 후보는 다중 예측 모드 후보 리스트에 추가될 수 있다. 비디오 신호 처리 장치는 다중 예측 모드 후보 리스트에 동일한 다중 예측 모드 후보가 존재하는지 판단한 후, 존재하지 않는 경우에만 생성된 다중 예측 모드 후보를 다중 예측 모드 후보 리스트에 추가할 수 있다. 다중 예측 모드 후보 리스트의 최대 크기는 미리 지정된 개수일 수 있으며, 미리 지정된 개수는 정수로, 25일 수 있다. 다중 예측 모드 후보 리스트의 최대 크기가 미리 지정된 개수인 경우, 비디오 신호 처리 장치는 더 이상 다중 예측 모드 후보를 추가하지 않을 수 있다.
비디오 신호 처리 장치는 다중 예측 모드 후보 리스트를 템플릿 코스트에 기반한 재정렬을 수행하여 재정렬된 다중 예측 모드 후보 리스트를 생성할 수 있다. 한편, 재정렬 과정은 수행되지 않을 수 있다. 템플릿 코스트에 기반한 재정렬은 도 30을 통해 상술한 방법으로 수행될 수 있다. 비디오 신호 처리 장치는 현재 블록에 인접한 복원된 주변 샘플을 사용하여 기준 템플릿을 구성할 수 있다. 비디오 신호 처리 장치는 다중 예측 모드 후보 리스트 내의 다중 예측 모드 후보와 미리 지정된 참조 샘플 라인(예를 들어, 도 8의 Reference line 1, 2, 3, …)을 사용하여 기준 템플릿에 대한 예측 템플릿을 생성할 수 있다. 미리 지정된 참조 샘플 라인은 Reference line 1(예, 현재 블록 템플릿과 인접한 라인)일 수 있다. 비디오 신호 처리 장치는 기준 템플릿과 예측 템플릿 간의 코스트를 계산할 수 있다. 여기서 코스트는 샘플 간의 차이의 절대값(SAD)의 합일 수 있다. 또한, 코스트는 각 샘플 값에서 각 템플릿의 평균을 뺀 평균 차이 샘플 값 간의 차이의 절대값(MR-SAD)의 합일 수 있다. 예측 템플릿을 생성하는데 사용되는 다중 예측 모드 후보의 인트라 예측 방향성 모드는 기존 인트라 예측 모드의 범위보다 확장된 인트라 예측 모드의 범위로 변환된 후, 예측 템플릿을 생성하는데 사용될 수 있다. 예를 들어, 다중 예측 모드 후보의 인트라 예측 방향성 모드가 N이라면, 확장된 인트라 예측 방향성 모드 M = (N *2) -2 일 수 있다. 또한, 다중 예측 모드 후보는 2개 이상의 인트라 예측 방향성 모드로 구성되어 있으므로, 각 인트라 예측 방향성 모드를 사용하여 생성된 예측 템플릿들은 미리 지정된 가중치를 적용하여 가중치 평균될 수 있으며, 비디오 신호 처리 장치는 가중치 평균된 예측 템플릿을 생성할 수 있다. 이때, 가중치는 미리 지정된 값일 수 있으며, 각 인트라 예측 방향성 모드에 대한 가중치는 서로 동일하거나 혹은 서로 다를 수 있다. 상기 계산된 코스트를 기반으로 다중 예측 모드 후보 리스트가 재정렬 될 수 있으며, 오름차순으로 재정렬될 수 있다.
비디오 신호 처리 장치는 MPM 리스트와 재정렬된 다중 예측 모드 후보 리스트를 사용하여 예측 모드 후보 리스트를 재구성할 수 있다. 이때, 비디오 신호 처리 장치는 MPM 리스트의 일부와 재정렬된 다중 예측 모드 후보 리스트의 일부를 사용하여 예측 모드 후보 리스트를 구성할 수 있다. MPM 리스트의 첫번째 후보부터 미리 지정된 개수의 후보까지 예측 모드 후보 리스트에 추가될 수 있으며, 미리 지정된 개수는 5일 수 있다. 재정렬된 다중 예측 모드 후보 리스트의 다중 예측 모드 후보 중에서 코스트가 낮은 순부터 높은 순으로 미리 지정된 개수만큼 예측 모드 후보 리스트에 추가될 수 있으며, 미리 지정된 개수는 정수 일 수 있으며, 16일 수 있다.
인코더는 유도된 예측 모드 후보 리스트(또는 예측 모드 후보 리스트 재구성 과정이 수행되지 않은 경우에는 다중 예측 모드 후보 리스트)에서 현재 블록을 위한 최적의 예측 모드 후보를 결정한 후, 최적의 예측 모드 후보에 대한 인덱스 정보를 포함하는 비트스트림을 생성하여 시그널링할 수 있다. 디코더는 최적의 예측 모드 후보에 대한 인덱스 정보를 비트스트림으로부터 파싱하여, 결정된 최적의 예측 모드 후보를 사용하여 현재 블록에 대한 예측 블록을 획득할 수 있다. 비디오 신호 처리 장치는 평면 모드(또는 DC 모드)에 기초하여 획득되는 예측 블록과 상기 최적의 예측 모드 후보로 획득되는 예측 블록 간 가중치 평균을 통해 현재 블록의 최종 예측 블록을 획득할 수 있다.
도 41은 본 명세서의 일 실시예에 따른 최적의 인트라 예측 모드 조합을 선정하는 방법을 나타낸다.
도 42 및 도 43은 본 명세서의 일 실시예에 따른 현재 블록의 주변 블록을 나타낸다.
최적의 인트라 예측 모드 조합은 인트라 예측 모드의 발생 빈도에 기초하여 결정될 수 있다. 인트라 예측 모드의 발생 빈도에 기초하는 인트라 부호화 모드인 OBIC(Occurrenece-based intra coding)모드는 다음과 같은 순서로 수행될 수 있다.
도 41을 참조하면, 먼저 비디오 신호 처리 장치는 비디오 신호 처리 장치는 현재 블록에 OBIC 모드가 적용 가능한지 여부를 결정할 수 있다. OBIC 모드가 적용 가능한지 여부는 현재 블록의 위치, 현재 블록이 휘도 블록인지 색차 블록인지 여부, 현재 블록이 인트라 예측 모드로 부호화되는지 여부, DIMD가 적용 가능한지 여부, 현재 블록의 가로 및 세로의 크기, 현재 블록의 주변 블록 중에서 OBIC 모드를 유도하는데 사용되는 블록의 개수 중에서 적어도 하나 이상을 사용하여 결정될 수 있다. 현재 블록의 주변 블록 중에서 OBIC 모드를 유도하는데 사용되는 블록의 개수가 미리 지정된 개수보다 작다면, 현재 블록은 OBIC 모드가 적용되지 않을 수 있으며, OBIC와 관련된 신택스 요소는 시그널링되지 않거나 파싱되지 않을 수 있다.
현재 블록에 OBIC 모드가 적용 가능한 경우, 비디오 신호 처리 장치는 현재 블록의 주변 블록으로부터 인트라 예측 모드를 유도할 수 있다. 이때, 주변 블록은 현재 블록에 인접한 블록일 수 있다. 예를 들어, 도 42의 A0, A1, B0, B1, B2 위치의 블록이 주변 블록일 수 있다. 또는, 주변 블록은 현재 블록에 인접하지 않은 블록일 수 있다. 예를 들어, 도 43의 Ax, Bx, Cx, ax, bx, cx의 위치의 블록이 주변 블록일 수 있다. 현재 블록의 주변 블록이 IBC 또는 Intra TMP 모드로 부호화된 경우에는 현재 블록의 BV가 지시하는 참조 블록이 OBIC 모드를 위한 주변 블록으로 사용될 수 있다. 또한, 현재 픽쳐가 I 픽쳐가 아닌 P 픽쳐 또는 B 픽쳐인 경우에는 현재 픽쳐의 POC(picture order count)와 동일하지 않은 다른 참조 픽쳐로부터 현재 블록에 대응되는 시간적인 주변 블록도 OBIC 모드를 위한 주변 블록으로 사용될 수 있다. 시간적인 주변 블록은 현재 블록에 인접한 블록의 움직임 정보를 사용하여 위치가 이동된 블록일 수 있다.
다음으로, 비디오 신호 처리 장치는 선정된 주변 블록으로부터 인트라 예측 모드를 유도할 수 있다. 그리고, 비디오 신호 처리 장치는 유도된 인트라 예측 모드의 값과 주변 블록의 가로의 길이와 세로의 길이의 곱(또는 주변 블록의 가로 세로의 길이의 합)에 기초하여 인트라 예측 모드에 대한 히스토그램을 생성할 수 있다. 이때, 유도된 인트라 예측 모드의 값은 히스토그램의 X축 성분 (본 명세서에서 계급으로 기술될 수 있음) 값이 될 수 있고, 주변 블록의 가로의 길이와 세로의 길이의 곱(또는 주변 블록의 가로 세로의 길이의 합)은 히스토그램의 Y축 성분 (본 명세서에서 도수로 기술될 수 있음) 값이 될 수 있다. 비디오 신호 처리 장치는 히스토그램에서 가장 빈번하게 발생된 상위 K 개의 인트라 예측 모드를 사용하여 현재 블록에 대한 예측 블록을 생성할 수 있다. 여기서 K는 미리 정해진 수로, 5일 수 있다. 비디오 신호 처리 장치는 여러 개의 인트라 예측 모드를 사용하는 경우, 각 인트라 예측 모드를 사용하여 예측 블록을 생성한 후, 각 예측 블록마다 각각의 가중치를 적용하여 가중치 평균된 예측 블록을 생성할 수 있다
도 44는 본 명세서의 일 실시예에 따른 인트라 TMP 모드에서 블록 벡터를 획득하기 위한 탐색 영역을 나타낸다.
도 44를 참조하면 비디오 신호 처리 장치는 인트라 TMP 모드에서 최적의 블록 벡터(block vector, BV)를 획득하기 위해 현재 블록에 인접한 복원된 주변 샘플을 사용하여 기준 템플릿을 구성할 수 있다. 비디오 신호 처리 장치는 탐색 영역(R1, R2, R3, R4, R5, R6) 내에서 기준 템플릿과 가장 유사한 참조 템플릿을 찾은 후, 현재 블록과 참조 템플릿 간의 거리를 현재 블록의 최적의 BV로 사용할 수 있다. 비디오 신호 처리 장치가 기준 템플릿을 사용하여 탐색 영역 내에서 가장 유사한 참조 템플릿을 찾기 위해 탐색 영역 내 모든 정수 단위 샘플 위치에 대해 코스트 계산(예, SAD)이 필요할 수 있다. 이 경우, 탐색 과정에 많은 시간이 소모될 수 있으므로, 비디오 신호 처리 장치는 정수 단위가 아닌 미리 정해진 샘플링 단위를 적용하여 코스트 계산에 소모되는 시간(횟수)을 줄일 수 있다.
도 45는 본 명세서의 일 실시예에 따른 인트라 TMP 모드에서 블록 벡터를 찾기 위해 사용되는 템플릿을 나타낸다.
도 45를 참조하면, 비디오 신호 처리 장치는 블록 A에 인접한 템플릿(template a)를 이용하여 블록 A에 대한 최적의 BV를 찾을 수 있다. 비디오 신호 처리 장치는 블록 D에 인접한 템플릿(template d)를 이용하여 블록 D에 대한 최적의 BV를 찾을 수 있다. 이때, 블록 D를 위한 템플릿(template d)을 생성하기 위해서는 블록 A, 블록 B, 블록 C 가 모두 복원되어 있어야 한다. 템플릿은 복원된 샘플로 구성될 수 있기 때문이다. 인코더는 블록에 대한 최적의 부호화 모드를 결정하기 위해 모든 부호화 모드에 대한 테스트를 진행할 수 있다. 따라서, 블록 A, 블록 B, 블록 C, 블록 D에 인트라 TMP 모드에 대한 테스트가 수행되어야 하며, 이전 블록이 복원되어 있어야 다음 블록에 대한 인트라 TMP 부호화 모드의 테스트가 진행될 수 있다. 즉, 인트라 TMP 모드에 대한 테스트로 인해, 블록 간의 처리 속도가 크게 낮아지는 문제점이 발생할 수 있다. 이외에도 템플릿을 이용한 부호화 방법은 다양한 부호화 모드에서 사용될 수 있으며, 이러한 템플릿 기반의 부호화 방법은 블록 간의 처리 속도를 크게 낮추고 병렬 처리를 수행할 수 없는 문제점이 존재한다.
현재 블록의 주변 복원된 샘플을 이용하여 템플릿을 구성한 후 템플릿을 이용하여 부호화하는 방법은 주변 복원된 샘플이 존재해야 한다. 현재 블록이 픽쳐, 서브 픽쳐, 슬라이스, 타일 경계에 위치한 경우, 주변 복원된 샘플이 없거나 일부분만 존재할 수 있다. 현재 블록이 픽쳐, 서브 픽쳐, 슬라이스, 타일 경계에 위치한 경우, 비디오 신호 처리 장치는 템플릿 기반 부호화 방식을 허용하지 않을 수 있으며, 인코더는 템플릿 기반 부호화 방식과 관련된 정보를 시그널링하지 않을 수 있으며, 디코더는 템플릿 기반 부호화 방식과 관련된 정보를 파싱하지 않고 적용되지 않는다고 설정할 수 있다. 현재 블록이 픽쳐, 서브 픽쳐, 슬라이스, 타일 경계에서 미리 지정된 값보다 작게 떨어진 곳에 위치하는 경우, 비디오 신호 처리 장치는 템플릿 기반 부호화 방식을 허용하지 않을 수 있으며, 인코더는 템플릿 기반 부호화 방식과 관련된 정보를 시그널링하지 않을 수 있으며, 디코더에서는 템플릿 기반 부호화 방식과 관련된 정보를 파싱하지 않고 적용되지 않는다고 설정할 수 있다. 미리 지정된 값은 1이상의 정수일 수 있으며, 2일 수 있다. 템플릿 기반 부호화 방법은 DIMD, TIMD, Intra TMP, TMRL, MIP, EIP, PNN, PDP, SGPM, IBC, TM, TM OBMC, LIC, CIIP, CCCM, ARMC, GPM 등일 수 있다. 예를 들어, 현재 블록이 픽쳐, 서브 픽쳐, 슬라이스, 타일 경계에 위치한 경우, 인코더는 TIMD와 관련된 정보를 시그널링하지 않을 수 있으며, 디코더는 TIMD와 관련된 정보를 파싱하지 않고 적용되지 않는다고 설정할 수 있다. 현재 블록이 픽쳐, 서브 픽쳐, 슬라이스, 타일의 상측 경계에 위치하거나 또는 좌측 경계에 위치하는 경우, 비디오 신호 처리 장치는 사용 가능한 템플릿 영역의 위치에 따라 유도되는 인트라 예측 모드의 범위를 조정할 수 있다. 예를 들어, 현재 블록이 픽쳐, 서브 픽쳐, 슬라이스, 타일의 상측 경계에 위치하는 경우, 비디오 신호 처리 장치는 인트라 예측 모드 중 평면 모드, DC 모드 및 미리 설정된 X 부터 Y 범위 내의 각도 모드만 유도 가능하고, 나머지 인트라 예측 모드는 유도가 불가능할 수 있다. X는 -14이상일 수 있으며, Y는 X보다 클 수 있다. 예를 들어, X는 30, Y는 70일 수 있다. 현재 블록이 픽쳐, 서브 픽쳐, 슬라이스, 타일의 상측 경계에 위치하고 현재 블록에 DIMD가 적용되는 경우, 비디오 신호 처리 장치는 히스토그램에서 X 부터 Y까지 범위의 인트라 예측 모드 중에서 도수 값이 높은 상위 N개의 인트라 예측 모드를 이용하여 현재 블록에 대한 예측 블록을 생성할 수 있다. N은 1이상의 정수일 수 있으며, 5일 수 있다. 현재 블록이 픽쳐, 서브 픽쳐, 슬라이스, 타일의 상측 경계에 위치하고 현재 블록에 TIMD가 적용되는 경우, 비디오 신호 처리 장치는 인트라 예측 모드에 대한 후보 리스트에서 평면 모드, DC 모드 및 X 부터 Y 범위 내의 각도 모드만을 포함하고, 이외의 인트라 예측 모드는 리스트에서 제외하여 변경된 후보 리스트를 획득할 수 있다. 비디오 신호 처리 장치는 변경된 후보 리스트에서 코스트가 낮은 순서상 상위 N개의 인트라 예측 모드를 이용하여 현재 블록에 대한 예측 블록을 생성할 수 있다. 여기서 N은 1이상의 정수일 수 있으며, 2일 수 있다.
도 46은 본 명세서의 일 실시예에 따른 템플릿 기반의 부호화 방법의 허용 여부를 결정하는 방법을 나타낸다.
블록 간 처리 속도를 높이고 병렬 처리가 가능하도록 하기 위해, 비디오 신호 처리 장치는 현재 블록의 위치, 크기, 템플릿 영역의 위치 또는 크기에 기초하여 각 블록마다 템플릿 기반 예측을 사용할 수 있는지 판단할 수 있다. 도 47을 참조하면, 점선으로 표현된 템플릿 예측 영역(Template estimation region, TER)이 설정될 수 있으며, 비디오 신호 처리 장치는 템플릿 예측 영역 내의 블록들에 대해 병렬 처리가 가능하도록 인접한 샘플의 사용 가능 여부를 설정할 수 있다. 예를 들어, 블록 A에서 사용되는 주변 샘플들은 TER 외부에 위치해 있으므로, 블록 A는 주변 샘플들을 사용하여 템플릿 기반의 부호화 또는 복호화가 가능할 수 있다. 블록 B에서 사용되는 주변 샘플 중에서 상단 샘플은 TER 외부에 위치해 있지만, 좌측 샘플은 TER 내부에 위치해 있으므로, 블록 B는 상단 샘플만을 사용하여 템플릿 기반의 부호화 또는 복호화가 가능할 수 있다. 블록 C에서 사용되는 주변 샘플 중에서 좌측 샘플은 TER 외부에 위치해 있지만, 상단 샘플은 TER 내부에 위치해 있으므로, 블록 C는 좌측 샘플만을 사용하여 템플릿 기반의 부호화 또는 복호화가 가능할 수 있다. 블록 D에서 사용되는 주변 샘플들은 모두 TER 내부에 위치해 있으므로, 블록 D는 주변 샘플들을 이용한 템플릿 기반의 부호화 또는 복호화 모드를 사용할 수 없을 수 있다.
비디오 신호 처리 장치는 템플릿 예측 영역(TER: Template estimation region)의 크기를 다양하게 설정할 수 있으며, VPS, SPS, PPS, Picture, Slice, Tile, 블록 단위로 설정할 수 있다.
도 47은 본 명세서의 일 실시예에 따른 템플릿 예측 영역의 크기와 관련된 신택스 요소를 시그널링하는 방법을 나타낸다.
도 47을 참조하면, TER의 크기와 관련된 신택스 요소 sps_log2_parallel_template_level_minus2는 SPS에서 시그널링될 수 있다. (sps_log2_parallel_template_level_minus2 + 2)는 Log2ParTmpLevel를 나타내며, Log2ParTmpLevel는 템플릿 기반의 부호화 모드의 파싱 과정 및 템플릿 기반의 부호화 모드에 대한 부호화 또는 복호화 과정에서 사용될 수 있다. sps_log2_parallel_template_level_minus2는 0 내지 (CtbLog2SizeY - 2)까의 범위를 가질 수 있다. CtbLog2SizeY는 CTB 블록 크기에 대한 2의 log를 계산한 값이다. (sps_log2_parallel_template_level_minus2 plus 2 specifies the value of the variable Log2ParTmpLevel, which is used in the parsing process for template-based prediction mode and/or the decoding process for template-based prediction mode. The value of sps_log2_parallel_template_level_minus2 shall be in the range of 0 to CtbLog2SizeY - 2, inclusive. The variable Log2ParTmpLevel is derived as follows: Log2ParTmpLevel = sps_log2_parallel_template_level_minus2 + 2).
sps_log2_parallel_template_level_minus2가 파싱되지 않은 경우, sps_log2_parallel_template_level_minus2 의 값은 0으로 암시될 수 있다
도 48은 본 명세서의 일 실시예에 따른 general_constraint_info() 신택스 구조에 포함된 템플릿 예측 영역과 관련된 제약 플래그를 나타낸다.
general_constraint_info()는 profile_tier_level() 신택스에서 호출될 수 있다. profile_tier_level() 신택스는 SPS RBSP 신택스, VPS RBSP 신택스, Decoding capability information(DCI) RBSP 신택스에서 호출될 수 있다. general_constraint_info() 신택스 내의 개별 신택스 요소들은 SPS RBSP 내의 신택스 요소들과 대응될 수 있으며, general_constraint_info() 신택스 내의 개별 신택스 요소들은 SPS RBSP 내에 대응되는 신택스 요소들의 값(활성화/비활성화)을 제약할 수 있다.
도 48을 참조하면 TER의 크기와 관련된 플래그는 gci_no_parallel_template_level_constraint_flag 일 수 있다.
gci_no_parallel_template_level_constraint_flag의 값이 1과 같으면 OlsScope 내에 존재하는 모든 픽쳐들에 대해 sps_log2_parallel_template_level_minus의 값은 0으로 제약될 수 있다. gci_no_parallel_template_level_constraint_flag의 값이 0과 같으면 sps_log2_parallel_template_level_minus 값은 제약되지 않는다. (gci_no_parallel_template_level_constraint_flag equal to 1 specifies that sps_log2_parallel_template_level_minus2 for all pictures in OlsInScope shall be equal to 0. gci_no_parallel_template_level_constraint_flag equal to 0 does not impose such a constraint).
비디오 신호 처리 장치는 Picture, Slice 단위로 TER의 크기를 설정할 수 있다. Picture, Slice 단위로 TER의 크기를 설정하기 위해 사용되는 신택스 요소는 각각 픽쳐 헤더, 슬라이스 헤더에서 시그널링될 수 있다.
인코더는 SPS, PPS, Picture 및 슬라이스 단위로 TER의 크기에 대한 정보를 비트스트림에 포함하여 시그널링할 수 있다. 디코더는 TER의 크기에 대한 정보를 파싱하여 SPS, PPS, Picture 및 슬라이스 단위로 TER의 크기를 설정할 수 있다.
도 49는 본 명세서의 일 실시예에 따른 sps_log2_parallel_template_level_minus2 값에 따른 TER 크기를 나타낸다.
도 49를 참조하면, sps_log2_parallel_template_level_minus2의 값이 0인 경우, TER의 크기는 4x4 일 수 있다. sps_log2_parallel_template_level_minus2의 값이 1인 경우, TER의 크기는 8x8 일 수 있다. sps_log2_parallel_template_level_minus2의 값이 2인 경우, TER의 크기는 16x16 일 수 있다. sps_log2_parallel_template_level_minus2의 값이 3인 경우, TER의 크기는 32x32 일 수 있다. sps_log2_parallel_template_level_minus2의 값이 4인 경우, TER의 크기는 64x64 일 수 있다. sps_log2_parallel_template_level_minus2 값이 '5'인 경우, TER의 크기가 128x128 일 수 있다.
부호화를 위한 최소 블록의 크기는 4x4일 수 있으므로, TER의 크기가 4x4 인 경우, 비디오 신호 처리 장치는 모든 블록에 대해 병렬적으로 템플릿 기반 부호화 방법을 적용할 수 없고 순차적(sequential)으로 템플릿 기반 부호화 방법을 적용할 수 있다. 블록의 크기는 4x4보다 큰 경우, 비디오 신호 처리 장치는 모든 블록에 대해 병렬적으로 템플릿 기반 부호화 방법을 적용할 수 있다. 이때, 현재 픽쳐는 TER의 크기 단위로 겹치지 않게 분할될 수 있다.
비디오 신호 처리 장치는 현재 블록의 위치 또는 크기, 주변 샘플을 통해 구성된 템플릿 영역의 위치 또는 크기에 기초하여, 템플릿 기반 부호화 방법의 허용 여부 또는 주변 샘플(또는 템플릿)의 사용 가능 여부를 판단할 수 있다.
도 46의 블록 A의 좌상단 샘플의 좌표는 (xCbA, yCbA)이고, 상단 템플릿의 좌상단 샘플 좌표는 (xNbAbove, yNbAbove)이고, 좌측 템플릿의 좌상단 샘플 좌표는 (xNbLeft, yNbLeft)이고, 좌상단 템플릿의 좌상단 샘플 좌표는 (xNbAboveLeft, yNbAboveLeft)라고 하면, 비디오 신호 처리 장치는 주변 템플릿의 사용 가능 여부를 Log2ParTmpLevel 값, 각 블록과 각 템플릿의 좌상단 샘플의 좌표를 이용하여 판단할 수 있다. 즉, 블록 A의 좌상단 샘플 좌표로 계산된 수평 값(xCbA >> Log2ParTmpLevel)과 상단 템플릿의 좌상단 샘플 좌표로 계산된 수평 값(xNbAbove >> Log2ParTmpLevel)이 같지만, 블록 A의 좌상단 샘플 좌표로 계산된 수직 값(yCbA >> Log2ParTmpLevel)과 상단 템플릿의 좌상단 샘플 좌표로 계산된 수직 값(yNbAbove >> Log2ParTmpLevel)이 다르므로, 비디오 신호 처리 장치는 상단 템플릿을 블록 A에 대한 템플릿 기반의 부호화 또는 복호화를 위해 사용할 수 있다.
도 46의 블록 D의 좌상단 샘플의 좌표는 (xCbD, yCbD)이고, 상단 템플릿의 좌상단 샘플 좌표는 (xNbAbove, yNbAbove)이고, 좌측 템플릿의 좌상단 샘플 좌표는 (xNbLeft, yNbLeft)이고, 좌상단 템플릿의 좌상단 샘플 좌표는 (xNbAboveLeft, yNbAboveLeft)라고 하면, 비디오 신호 처리 장치는 주변 템플릿의 사용 가능 여부를 Log2ParTmpLevel 값, 각 블록과 각 템플릿의 좌상단 샘플의 좌표를 이용하여 판단할 수 있다. 즉, 블록 D의 좌상단 샘플 좌표로 계산된 수평 값(xCbD >> Log2ParTmpLevel)과 상단 템플릿의 좌상단 샘플 좌표로 계산된 수평 값(xNbAbove >> Log2ParTmpLevel)이 같고, 블록 D의 좌상단 샘플 좌표로 계산된 수직 값(yCbD >> Log2ParTmpLevel)과 상단 템플릿의 좌상단 샘플 좌표로 계산된 수직 값(yNbAbove >> Log2ParTmpLevel)이 같으므로, 비디오 신호 처리 장치는 상단 템플릿을 블록 D에 대한 템플릿 기반의 부호화 또는 복호화를 위해 사용할 수 없다. 또한, 블록 D의 좌측 템플릿과 좌상단 템플릿도 블록 D에 대한 템플릿 기반의 부호화 또는 복호화를 위해 사용할 수 없으므로, 블록 D에서는 템플릿 기반 부호화 모드가 허용되지 않을 수 있다. 블록 D에서는 템플릿 기반 부호화 모드가 허용되지 않으므로, 인코더는 템플릿 기반 부호화 모드에 대한 시그널링을 수행하지 않을 수 있다(템플릿 기반 부호화 모드와 관련된 신택스 요소를 비트스트림에 포함하지 않을 수 있다). 디코더는 블록 D에서 템플릿 기반 부호화 모드에 대한 파싱을 수행하지 않고 건너뛸 수 있으며, 템플릿 기반 부호화 모드를 사용하지 않는 것으로 추론(infer)할 수 있다.
템플릿 기반 인트라 부호화 방법에는 Intra TMP, DIMD, TIMD, SGPM, TMRL, EIP, MIP, CCCM 등이 있으며, 템플릿 기반 인터 부호화 방법에는 TM, PROF, TM 기반 움직임 후보 리스트 재정렬, GPM 등이 있을 수 있다. 또한, 부호화 방법으로 템플릿 기반 변환 계수의 부호 예측 방법이 있을 수 있다. TER 기반 병렬 처리 방법은 상술한 템플릿을 이용한 방법에 각각 적용할 수 있다. 예를 들어, TER 기반 병렬 처리 방법이 인트라 TMP에 적용되는 경우, sps_log2_parallel_template_level_minus2와 Log2ParTmpLevel는 sps_log2_parallel_intraTmp_level_minus2와 Log2ParIntraTmpLevel으로 대체되어 사용될 수 있다. 즉, 비디오 신호 처리 장치는 sps_log2_parallel_intraTmp_level_minus2 값에 따라 인트라 TMP 템플릿 예측 영역(Intra TMP estimation region)을 설정하고, 설정된 인트라 TMP 템플릿 예측 영역내의 모든 블록을 병렬적으로 부호화 또는 복호화 할 수 있다.
비디오 신호 처리 장치는 부호화 방법에 따라 다양한 후보 리스트를 구성하여 사용할 수 있다. 비디오 신호 처리 장치는 TER을 후보 리스트 공유 영역으로 대체하여 적용할 수 있으며, 비디오 신호 처리 장치는 후보 리스트 공유 영역 내의 블록 들에 대해 하나의 후보 리스트를 공유하여 사용할 수 있다. 즉, 비디오 신호 처리 장치가 후보 리스트 공유 영역 내의 제1 블록과 제2 블록에 사용하는 후보 리스트는 동일할 수 있다. 비디오 신호 처리 장치는 블록의 위치 또는 크기, 후보 리스트 공유 영역의 위치 또는 크기를 이용하여 공유 후보 리스트를 구성하여 사용할 수 있다. 즉, 비디오 신호 처리 장치는 블록에 대한 후보 리스트를 구성할 때, 현재 블록의 위치와 크기를 후보 리스트 공유 영역의 위치와 크기로 설정한 후, 후보 리스트 공유 영역을 기반으로 구성한 후보 리스트를 현재 블록의 후보 리스트로 사용할 수 있다. 이때, 후보 리스트 공유 영역 내 적어도 하나 이상의 블록의 후보 인덱스는 다른 블록의 후보 인덱스와 다를 수 있다.
현재 블록에 인트라 TMP가 적용된 경우, 비디오 신호 처리 장치는 주변 블록으로부터 유도된 블록 벡터를 이용하여 인트라 TMP 후보 리스트를 구성할 수 있다. 그리고 비디오 신호 처리 장치는 인트라 TMP 후보 리스트를 이용하여 현재 블록의 부호화 또는 복호화를 수행할 수 있다. 이때, 인트라 TMP 후보 리스트는 후보 리스트 공유 영역의 위치와 크기를 기반으로 구성할 수 있으며, 후보 리스트 공유 영역 내의 모든 블록은 동일한 인트라 TMP 후보 리스트를 사용할 수 있다. 이때, 후보 리스트 공유 영역 내 적어도 하나 이상의 블록의 블록 벡터 후보 인덱스는 다른 블록의 후보 인덱스와 다를 수 있다.
현재 블록에 DIMD(또는 TIMD)가 적용된 경우, 비디오 신호 처리 장치는 주변 블록으로부터 유도된 인트라 예측 모드를 이용하여 DIMD(또는 TIMD) 후보 리스트를 구성할 수 있으며, DIMD(또는 TIMD) 후보 리스트를 이용하여 현재 블록의 부호화 또는 복호화를 수행할 수 있다. 이때, 비디오 신호 처리 장치는 DIMD(또는 TIMD) 후보 리스트를 후보 리스트 공유 영역의 위치와 크기를 기반으로 구성할 수 있으며, 비디오 신호 처리 장치는 후보 리스트 공유 영역 내의 모든 블록에 대해 동일한 DIMD(또는 TIMD) 후보 리스트를 사용할 수 있다. 이때, 후보 리스트 공유 영역 내 적어도 하나 이상의 블록의 DIMD(또는 TIMD) 후보 인덱스는 다른 블록의 후보 인덱스와 다를 수 있다.
현재 블록에 CCP 머지가 적용된 경우, 비디오 신호 처리 장치는 주변 블록으로부터 유도된 CCP 모델을 이용하여 CCP 머지 리스트를 구성할 수 있으며, CCP 머지 리스트를 이용하여 현재 블록의 부호화 또는 복호화를 수행할 수 있다. 이때, 비디오 신호 처리 장치는 CCP 머지 리스트를 후보 리스트 공유 영역의 위치와 크기를 기반으로 구성할 수 있으며, 비디오 신호 처리 장치는 후보 리스트 공유 영역 내의 모든 블록에 대해 동일한 CCP 머지 리스트를 사용할 수 있다. 이때, 후보 리스트 공유 영역 내 적어도 하나 이상의 블록의 CCP 머지 후보 인덱스는 다른 블록의 후보 인덱스와 다를 수 있다.
후보 리스트 공유 영역 내의 모든 블록이 동일한 CCP 머지 리스트를 사용하는 방법은 현재 블록에 EIP 부호화 모드가 적용되는 경우에 EIP 머지 리스트를 구성하여 사용하는 경우에도 동일하게 적용될 수 있다. 마찬가지로 후보 리스트 공유 영역 내의 모든 블록이 동일한 CCP 머지 리스트를 사용하는 방법은 현재 블록에 LIC가 적용되는 경우에 LIC 머지 리스트를 구성하여 사용하는 경우에도 동일하게 적용될 수 있다.
현재 블록에 인터 부호화 모드가 적용된 경우, 비디오 신호 처리 장치는 주변 블록으로부터 유도된 움직임 정보(또는 블록 벡터)를 이용하여 움직임(또는 블록 벡터) 후보 리스트를 구성할 수 있으며, 비디오 신호 처리 장치는 움직임(또는 블록 벡터) 후보 리스트를 이용하여 현재 블록의 부호화 또는 복호화를 수행할 수 있다. 이때, 비디오 신호 처리 장치는 움직임(또는 블록 벡터) 후보 리스트를 상기 후보 리스트 공유 영역의 위치와 크기를 기반으로 구성할 수 있으며, 비디오 신호 처리 장치는 후보 리스트 공유 영역 내의 모든 블록에 대해 동일한 움직임(또는 블록 벡터) 후보 리스트를 사용할 수 있다. 이때, 후보 리스트 공유 영역 내 적어도 하나 이상의 블록의 움직임 후보 인덱스는 다른 블록의 후보 인덱스와 다를 수 있다.
도 50은 본 명세서의 일 실시예에 따른 EIP 모드에서 위치 기반 모델을 사용하여 예측하는 방법을 나타낸다.
상술한대로, 비디오 신호 처리 장치가 EIP 모드를 이용하여 예측 블록을 생성할 때, 샘플 단위 예측을 수행할 수 있다. 샘플 단위 예측은 이전 샘플에 대한 예측이 완료된 후, 다음 샘플에 대한 예측이 수행될 수 있으므로, 예측을 수행하는 속도가 낮다. 따라서, EIP 모드로 부호화된 블록에서 예측 블록을 생성할 때, 처리 속도에 대한 병목 현상이 나타날 수 있다. 또한, 순차적인 샘플 처리로 인해 병렬 처리를 할 수 없다는 단점도 있다. 이러한 문제를 해결하기 위해서, 비디오 신호 처리 장치는 EIP 모드로 부호화된 블록에 대한 예측 블록 생성 시, 위치 기반 모델 또는 기울기 및 위치 기반 모델을 적용할 수 있다.
도 50(a)를 참조하면, 비디오 신호 처리 장치는 현재 블록(X)의 주변 복원된 샘플들을 사용하여 템플릿을 구성한 후, 템플릿과 주변 샘플(예, A, B, C, D 등)을 이용하여 위치 기반 모델을 유도할 수 있다. 이때, 위치 기반 모델을 유도하기 위한 템플릿의 크기는 현재 블록의 가로 및 세로의 크기에 기초하여 결정될 수 있다. 또한, 템플릿 위치는 현재 블록의 위치와 크기를 기준으로 미리 지정된 위치일 수 있다. 이때, 템플릿 형태는 하나 이상일 수 있으며, 비디오 신호 처리 장치는 적어도 하나 이상의 템플릿 형태를 통해 위치 기반 모델을 유도할 수 있다. 또는 위치 기반 모델은 템플릿 형태마다 유도될 수 있으며, 인코더는 최적의 모델에 대한 인덱스 정보를 포함하는 비트스트림을 생성하고 시그널링할 수 있다. 디코더는 최적의 모델에 대한 인덱스 정보를 파싱하여 현재 블록을 예측하기 위한 위치 기반 모델을 결정할 수 있다. 상기 템플릿 형태는 현재 블록의 좌측에 인접한 샘플을 이용하여(포함하여) 구성되는 좌측 템플릿, 현재 블록의 상측에 인접한 샘플을 이용하여 구성되는 상측 템플릿, 좌측 현재 블록의 좌측에 인접한 샘플 및 현재 블록의 상측에 인접한 샘플을 모두 이용하여 구성되는 템플릿 중 어느 하나일 수 있다. 비디오 신호 처리 장치는 위치 기반 모델을 유도하기 위한 템플릿의 위치를 블록 벡터를 기반으로 설정할 수 있다. 비디오 신호 처리 장치는 위치 기반 모델을 유도하기 위한 템플릿의 위치 후보 리스트를 기반으로 최적의 템플릿 위치를 결정할 수 있다. 이때, 위치 기반 모델을 유도하기 위한 템플릿의 위치 후보 리스트는 블록 벡터가 지시하는 위치, 미리 지정된 위치 중에서 적어도 하나 이상을 이용하여 구성될 수 있다. 인코더는 위치 기반 모델을 유도하기 위한 템플릿의 위치 후보 리스트에서 최적의 위치 후보에 대한 인덱스를 포함하는 비트스트림을 획득하고, 시그널링할 수 있다. 디코더는 최적의 위치 후보에 대한 인덱스를 파싱하여, 위치 기반 모델을 유도하기 위한 템플릿의 위치 후보 리스트에서 최적의 위치 후보를 결정할 수 있다. 상기 템플릿의 위치 후보 리스트는 템플릿 코스트를 기반으로 재정렬될 수 있다. 또는 상기 템플릿의 위치 후보 리스트에서 최소의 템플릿 코스트를 갖는 후보가 최적의 위치 후보로 결정될 수 있다.
비디오 신호 처리 장치는 수학식 7을 이용하여 템플릿을 통한 위치 기반 모델을 유도할 수 있다.
수학식 7의 Ci는 위치 기반 모델에 대한 파라미터를 나타내며, Ri는 템플릿 내의 샘플 값이고, X, Y는 주변 샘플(예, 도 50(a)의 A, B, C, D 등)에 대한 위치 정보이다. B는 휘도 성분에 대한 비트 깊이(bit depth) 값으로, B는 8, 10 등이 될 수 있다. 비디오 신호 처리 장치는 자기 상관 행렬(auto-correlation matrix) 계산과 교차 상관 행렬(cross-correlation matrix) 계산을 이용하여 MSE(Mean Square Error)가 최소가 되도록 하는 Ci를 계산할 수 있다. 자기 상관 행렬(auto-correlation matrix) 계산에는 도 50(a)의 템플릿 내의 샘플 값, 주변 샘플들(예, 도 50(a)의 A, B, C, D 등)에 대한 위치 정보가 이용될 수 있고, 교차 상관 행렬(cross-correlation matrix) 계산에는 도 50(a)의 템플릿 내의 샘플 값, 주변 샘플들(예, 도 50(a)의 A, B, C, D 등)에 대한 위치 정보와 주변 샘플들의 샘플 값 간의 계산일 수 있다.
비디오 신호 처리 장치는 Ci와 현재 블록에 인접한 템플릿, 복원할 샘플의 위치 정보를 수학식 7에 대입하여 현재 블록의 샘플을 예측할 수 있다. 템플릿 내의 샘플의 개수 R은 미리 지정된 개수이며, 수학식 7은 R의 개수를 14로 설정한 예이다. 수학식 8과 같이, 템플릿을 통한 위치 기반 모델은 템플릿을 통한 기울기 및 위치 기반 모델로 확장될 수 있다. 수학식 8에서 Gy, Gx는 기울기 값을 나타낸다. Gy, Gx는 도 50(a)의 템플릿 내의 샘플들에 대하여, 도 50(b) 위치의 샘플들을 사용한 수학식 9를 통해 계산될 수 있다.
현재 블록에 EIP 모드가 적용된 경우, 비디오 신호 처리 장치는 현재 블록의 주변 샘플로부터 유도된 DIMD 모드를 사용하여 EIP 예측 방향을 설정할 수 있다. 이하에서는 현재 블록의 주변 샘플로부터 유도된 DIMD 모드를 사용하여 EIP 예측 방향을 설정하는 일 예들에 대해 설명한다. EIP 예측 방향을 설정하는 일 예에서 미리 지정된 값은 1이상의 정수일 수 있으며, 5일 수 있다.
현재 블록에 EIP 모드가 적용된 경우, 비디오 신호 처리 장치는 현재 블록의 주변 샘플로부터 유도된 DIMD 모드와 수평 방향 모드(도 6의 18번 모드)와의 차이의 절대 값이 미리 지정된 값보다 작은 경우, EIP 예측 방향을 왼쪽 위 샘플부터 오른쪽 샘플 방향순으로 예측할 수 있으며, 1개 행이 모두 예측된 후 다음 행순으로 예측할 수 있다.
현재 블록에 EIP 모드가 적용된 경우, 비디오 신호 처리 장치는 현재 블록의 주변 샘플로부터 유도된 DIMD 모드와 수평 방향 모드(도 6의 18번 모드)와의 차이의 절대 값이 미리 지정된 값보다 작은 경우, EIP 예측 방향을 왼쪽 위 샘플부터 아래쪽 샘플 방향순으로 예측할 수 있으며, 1개 열이 모두 예측된 후 다음 열 순으로 예측할 수 있다.
현재 블록에 EIP 모드가 적용된 경우, 비디오 신호 처리 장치는 현재 블록의 주변 샘플로부터 유도된 DIMD 모드와 수직 방향 모드(도 6의 50번 모드)와의 차이의 절대 값이 미리 지정된 값보다 작은 경우, EIP 예측 방향을 왼쪽 위 샘플부터 오른쪽 샘플 방향순으로 예측할 수 있으며, 1개 행이 모두 예측된 후 다음 행순으로 예측할 수 있다.
현재 블록에 EIP 모드가 적용된 경우, 비디오 신호 처리 장치는 현재 블록의 주변 샘플로부터 유도된 DIMD 모드와 수직 방향 모드(도 6의 50번 모드)와의 차이의 절대 값이 미리 지정된 값보다 작은 경우, EIP 예측 방향을 왼쪽 위 샘플부터 아래쪽 샘플 방향순으로 예측할 수 있으며, 1개 열이 모두 예측된 후 다음 열 순으로 예측할 수 있다.
현재 블록에 EIP 모드가 적용된 경우, 비디오 신호 처리 장치는 현재 블록의 주변 샘플로부터 유도된 DIMD 모드와 수직 방향 모드(도 6의 50번 모드)와의 차이의 절대 값이 미리 지정된 값(예, 1 이상의 정수로 5일 수 있음)보다 작은 경우, EIP 예측 방향을 대각 방향으로 예측할 수 있다.
BV EIP는 BV가 지시하는 주변 블록에서 사용된 EIP 모델을 현재 블록의 EIP 모델로 사용하는 방식이다. 현재 블록에 대한 EIP 예측 블록을 생성할 때, 비디오 신호 처리 장치는 BV가 지시하는 주변 블록에서 유도된 DIMD 모드(또는 인트라 예측 모드)를 이용하여 EIP 예측 방향을 설정할 수 있다.
도 51은 본 명세서의 일 실시예에 따른 ISP 모드에서 DIMD를 사용하여 인트라 예측 모드를 유도하는 방법을 나타낸다.
도 51을 참조하면, 비디오 신호 처리 장치는 현재 블록에 ISP 모드가 적용된 경우, a1, a2, a3, b, c, d1, d2 영역의 샘플 중에서 적어도 하나 이상을 사용하여, DIMD 방법을 통해 하나 이상의 인트라 예측 방향성 모드를 유도할 수 있다. 유도된 하나 이상의 인트라 예측 방향성 모드는 서브 블록 A, B, C, D에 동일하게 적용될 수 있다. 반대로, 유도된 하나 이상의 인트라 예측 방향성 모드는 서브 블록 A, B, C, D에 다르게 적용할 수 있다. 예를 들어, 비디오 신호 처리 장치는 서브 블록 A에 유도된 하나 이상의 인트라 예측 방향성 모드를 적용하여 예측 블록을 생성할 수 있으며, 서브 블록 B, C, D에는 우선 순위가 가장 높은 하나의 인트라 예측 방향성 모드만을 적용하여 예측 블록을 생성할 수 있다.
도 51을 참조하면, 비디오 신호 처리 장치는 현재 블록에 ISP 모드가 적용된 경우, 서브 블록 A, B, C, D마다 DIMD 방법을 각각 적용하여 하나 이상의 인트라 예측 방향성 모드를 유도할 수 있으며, 각 서브 블록에서 DIMD 계산을 위해 사용되는 주변 샘플의 영역을 다르게 설정할 수 있다. 비디오 신호 처리 장치는 현재 블록에 ISP 모드가 적용된 경우, DIMD를 이용하여 인트라 예측 모드를 유도할 때 사용되는 샘플을 서브 블록마다 제약함으로써, DIMD 유도 과정을 병렬화 할 수 있다.
비디오 신호 처리 장치는 서브 블록 A에서는 a1, a2, a3, b 중에서 적어도 하나 이상의 샘플 영역을 사용하여 DIMD 모드를 유도할 수 있으며, 서브 블록 B에서는 서브 블록 A에서 서브 블록 B에 인접한 샘플, a2, b, c 중에서 적어도 하나 이상의 샘플 영역을 사용하여 DIMD 모드를 유도할 수 있으며, 서브 블록 C에서는 서브 블록 B에서 서브 블록 C에 인접한 샘플, b, c, d1 중에서 적어도 하나 이상의 샘플 영역을 사용하여 DIMD 모드를 유도할 수 있으며, 서브 블록 D에서는 서브 블록 C에서 서브 블록 D에 인접한 샘플, c, d1, d2 중에서 적어도 하나 이상의 샘플 영역을 사용하여 DIMD 모드를 유도할 수 있다. 서브 블록 B, C, D에서는 상단 참조 샘플만 사용 가능하므로, 인트라 예측 모드는 대각 모드(Diagonal, DIA)부터 수직대각 모드(Vertical Diagonal, VDIA)까지만 허용될 수 있으며, DIMD를 이용하여 유도된 인트라 예측 모드 또한, 대각 모드(Diagonal, DIA)부터 수직대각 모드(Vertical Diagonal, VDIA)까지 사용할 수 있다.
비디오 신호 처리 장치는 서브 블록 A에서는 a1, a2, a3, b 중에서 적어도 하나 이상의 샘플 영역을 사용하여 DIMD 모드를 유도할 수 있으며, 서브 블록 B에서는 a1, a2, a3, b, c 중에서 적어도 하나 이상의 샘플 영역을 사용하여 DIMD 모드를 유도할 수 있으며, 서브 블록 C에서는 a1, a2, a3, b, c, d1 중에서 적어도 하나 이상의 샘플 영역을 사용하여 DIMD 모드를 유도할 수 있으며, 서브 블록 D에서는 a1, a2, a3, c, d1, d2 중에서 적어도 하나 이상의 샘플 영역을 사용하여 DIMD 모드를 유도할 수 있다.
도 52는 본 명세서의 일 실시예에 따른 매트릭스 기반 인트라 예측 방법을 나타낸다.
많은 영상 데이터를 통해 현재 블록과 참조 샘플 간의 관계를 추론한 모델(또는 매트릭스)을 이용하여 인트라 예측을 수행하는 방법은 매트릭스 기반 인트라 예측 방법(matrix based Position Dependent intra Prediction, PDP)라고 할 수 있다. 도 52를 참조하면, 비디오 신호 처리 장치는 현재 예측할 블록(도 52의 p)에 인접한 복원된 참조 샘플(도 52의 r) r(k)와 미리 정의된 매트릭스 F(x, y, k)를 이용하여 현재 블록에 대한 예측 블록 P(x, y)을 생성할 수 있다(도 52(b)의 수학식 참조). 매트릭스는 현재 블록의 크기, 인트라 예측 방향성 모드에 기초하여 결정될 수 있다. 또한 참조 샘플의 크기는 현재 블록의 크기에 기초하여 결정될 수 있다. 예를 들어, 현재 블록의 가로 및 세로 크기가 미리 지정된 제1 크기보다 작거나 같은 경우, T1과 T2는 미리 지정된 제2 크기일 수 있다. 현재 블록의 가로 및 세로 크기가 미리 지정된 제1 크기보다 큰 경우, T1과 T2는 미리 지정된 제3 크기일 수 있다. 여기서 미리 지정된 제1 크기는 16일 수 있고, 미리 지정된 제2 크기는 2일 수 있고, 미리 지정된 제3 크기는 1일 수 있다. 또한, 도 52에서 W, H는 현재 블록의 너비와 높이를 나타낸다. 기존 MIP 방법과 다르게, 현재 블록에 PDP가 적용 가능한 경우, 비디오 신호 처리 장치는 기존 인트라 예측 방향성 모드를 통한 인트라 예측을 사용하지 않고 PDP를 통한 매트릭스 기반 인트라 예측을 사용하여 현재 블록에 대한 예측 블록을 생성할 수 있다. 이때, 현재 블록에 PDP를 적용 가능한지 여부는 현재 블록의 크기, 현재 블록의 인트라 예측 방향성 모드, 현재 블록이 휘도 블록인지 혹은 색차 블록인지 여부, 추론된 매트릭스가 존재하는지 여부, 참조 샘플이 존재하는지 여부, 현재 블록의 부호화 모드, 참조 샘플 라인 중에서 적어도 하나 이상에 기초하여 결정될 수 있다. 여기서 현재 블록의 부호화 모드가 DIMD, OBIC, CIIP, SGPM, TIMD, TMRL, Directional Planar, EIP, MIP, ISP, IBC, Intra TMP, BDPCM, Palette, Inter 모드, LM, CCCM 중에 하나의 모드인 경우, 현재 블록은 PDP 기반 방법을 사용하지 못할 수 있다. 비디오 신호 처리 장치는 현재 블록의 인트라 예측 방향성 모드에 기초하여 PDP 모드에 대한 적용 가능 여부를 결정할 수 있다. 예를 들어, 비디오 신호 처리 장치는 현재 블록의 인트라 예측 방향성 모드가 미리 지정된 모드인 경우에만 현재 블록에 PDP 모드가 적용 가능한 것으로 결정할 수 있다. 미리 지정된 모드는 현재 블록의 부호화 모드에 따라 달라질 수 있다. 비디오 신호 처리 장치는 현재 블록의 부호화 모드가 MPM 기반의 인트라 예측 모드이고, 인트라 예측 모드가 평면(또는 방향성 평면(Directional Planar)) 모드, DC 모드, 짝수번 각도 모드인 경우, 기존 인트라 예측 방향성 모드를 통한 인트라 예측을 사용하지 않고 PDP를 통한 매트릭스 기반 인트라 예측을 사용하여 현재 블록에 대한 예측 블록을 생성할 수 있다. 현재 블록의 부호화 모드는 DIMD, OBIC, CIIP, SGPM, TIMD, TMRL, Directional Planar, EIP, MIP, ISP, IBC, Intra TMP, BDPCM, Palette, Inter 모드, LM, CCCM 중에 하나의 모드일 수 있다. 비디오 신호 처리 장치는 PDP를 통해 현재 블록을 예측하는데 사용되는 참조 샘플이 현재 블록이 속하는 슬라이스 및/또는 타일 내에 있는 경우에만 현재 블록에 PDP를 적용할 수 있다. 비디오 신호 처리 장치는 PDP를 통해 현재 블록을 예측하는데 사용되는 참조 샘플이 현재 블록이 속하는 슬라이스 및/또는 타일이 아닌 다른 슬라이스 및 다른 타일에 있는 경우에는 현재 블록에 PDP를 적용할 수 없는 것으로 결정할 수 있다. 현재 블록에 PDP 모드가 적용되는 경우, 현재 블록의 인트라 예측 모드에 기초하여 사용되는 참조 샘플이 결정될 수 있다. 예를 들어, 인트라 예측 모드가 미리 지정된 모드인 경우, 참조 샘플의 크기는 미리 지정된 제1 크기일 수 있다. 그렇지 않고, 인트라 예측 모드가 미리 지정된 모드가 아닌 경우, 참조 샘플의 크기는 미리 지정된 제2 크기일 수 있다. 여기서 미리 지정된 모드는 인트라 예측 모드(도 6 참고)가 19보다 크거나 같고 49보다 작거나 같은 범위일 수 있다. 도 52을 참조하면, 미리 지정된 제1 크기는 상단 참조 샘플은 W x T1이고 좌측 참조 샘플은 T2 x (H + T1)일 수 있다. 도 52를 참조하면, 미리 지정된 제2 크기는 상단 참조 샘플은 2W x T1이고 좌측 참조 샘플은 T2 x (2H + T1)일 수 있다. 여기서 W x T1은 가로 길이가 W이고 세로 길이가 T1일 수 있다.
NNIP(Neural Network-based Intra Prediction) 또는 PNN(Prediction Neural Network) 모드는 뉴럴 네트워크를 이용하여 현재 블록을 예측하는 방식으로, 비디오 신호 처리 장치는 현재 블록의 주변 샘플을 뉴럴 네트워크의 입력해서 예측 블록을 생성할 수 있다. 비디오 신호 처리 장치는PNN 기반으로 예측한 블록으로부터 유도된 DIMD 모드를 이용해서 변환 커널을 유도할 수 있다.
도 53은 본 명세서의 일 실시예에 따른 TM 방법이 수행되는 순서를 나타낸다.
도 53을 참조하면 디코더는 주변 블록으로부터 유도된 초기 움직임 정보(initial MV, reference index)를 획득할 수 있다. 디코더는 초기 움직임 정보에 기초하여 참조 영상 내에서 탐색 영역을 설정할 수 있다. 디코더는 미리 정의된 탐색 패턴에 따라, 탐색 영역 내에서 몇 개의 후보 위치를 선정할 수 있다. 디코더는 현재 블록의 주변 블록을 사용하여 현재 블록에 대한 템플릿을 구성하고, 후보 위치를 기준으로 현재 블록에 대한 템플릿과 동일한 크기의 참조 블록(영상) 템플릿을 구성할 수 있다. 디코더는 현재 블록에 대한 템플릿과 참조 블록(영상) 템플릿 간의 코스트(cost) 값을 획득할 수 있다. 템플릿 간의 코스트 값은, 서로 다른 제1 템플릿과 제2 템플릿이 존재할 때, 각 템플릿 간의 유사도를 의미할 수 있다. 구체적으로 비디오 신호 처리 장치는 제1 템플릿 포함되는 하나 이상의 블록들과 제1 템플릿 포함되는 하나 이상의 블록들 각각에 대응되는 제2 템플릿에 포함되는 하나 이상의 블록들 간의 하나 이상의 코스트 값을 계산할 수 있다. 이때, 하나 이상의 코스트 값들을 전부 합한 값이 제1 템플릿과 제2 템플릿 간의 코스트 값일 수 있다. 코스트 값은 SAD(Sum of Absolute Differences) 또는 MRSAD(Mean-Removed SAD)를 통해 획득될 수 있다. 디코더는 탐색 영역 내의 모든 후보 위치들에 대하여, 코스트 값을 획득하고, 최소의 코스트 값에 대응되는 위치의 움직임 후보의 정보를 최종 움직임 정보(도 29의 개선된 움직임 정보)로 사용할 수 있다. 본 명세서에서 코스트 값을 획득한다는 의미는 디코더가 코스트 값을 계산한다는 의미와 동일할 수 있다.
도 54는 본 명세서의 일 실시예에 따른 초기 움직임 정보에 기초하여 TM 방법을 위한 탐색 영역을 설정하는 방법을 나타낸다.
도 54를 참조하면 디코더는 참조 픽쳐에서 현재 블록에 대응되는 참조 블록을 찾기 위해, 현재 블록의 좌상단 위치를 기준으로 초기 움직임 정보(initial MV)만큼 이동한 위치를 참조 블록의 위치로 설정할 수 있다. 디코더는 참조 블록의 좌상단 위치를 기준으로 임의의 (m x n) 크기만큼 탐색 영역(Search range)을 설정할 수 있다. 이때, m x n 은 16 x 16일 수 있다. 예를 들어, 탐색 영역은 초기 움직임 정보의 위치를 기준으로 수평 방향으로 -8에서 8만큼의 범위를 가질 수 있고, 수직 방향으로 -8에서 8까지의 범위를 가질 수 있다. 구체적으로 초기 움직임 정보가 나타내는 위치를 수평 방향, 수직 방향의 좌표 형태로 표현하면 (x, y)일 수 있다. 이때, 탐색 영역의 수평 방향의 좌표는 x-8에서 x+8 까지의 범위일 수 있고, 수직 방향의 좌표는 y-8에서 y+8 까지의 범위일 수 있다. 탐색 영역은 동영상의 특성에 따라 다르게 설정될 수 있다. 탐색 영역의 크기에 대한 정보는 비트스트림의 SPS, PPS, 픽쳐/타일/슬라이스 헤더 등에 포함될 수 있다. 디코더는 비트스트림으로부터 탐색 영역에 대한 정보를 파싱하여 탐색 영역의 크기를 확인하고 탐색 영역을 설정할 수 있다. 또한, 탐색 영역은 현재 블록의 크기, 현재 블록의 가로 또는 세로의 크기, 현재 블록에 대한 AMVR 정보, 현재 블록에 OBMC 또는 MHP가 적용되는지 여부에 대한 정보 중 적어도 하나 이상의 정보에 기초하여 설정될 수 있다. 예를 들어, 현재 블록의 크기가 16x16 이상일 경우, 탐색 영역은 20 x 20으로 설정될 수 있다. 또는 현재 블록의 AMVR이 1의 정수 화소 단위보다 큰 경우, 탐색 영역은 20 x 20으로 설정될 수 있다. 현재 블록의 AMVR이 1의 정수 화소 단위보다 같거나 작은 경우, 탐색 영역은 16 x 16으로 설정될 수 있다. 이후 디코더는 현재 블록에 인접한 블록을 이용하여 현재 블록의 좌측 템플릿과 현재 블록의 상측 템플릿을 구성할 수 있다. 또한, 디코더는 참조 픽쳐에서도 설정한 참조 블록의 위치를 기준으로 참조 블록의 좌측 템플릿과 참조 블록의 상측 템플릿을 구성한다. 이때, 현재 블록의 좌측 템플릿과 참조 블록의 좌측 템플릿의 크기는 동일할 수 있고, 현재 블록의 상측 템플릿과 참조 블록의 상측 템플릿의 크기는 동일할 수 있다.
도 55는 본 명세서의 일 실시예에 따른 탐색 영역 내에서 탐색되는 움직임 후보의 위치를 나타낸다.
도 55를 참조하면 TM 방법을 위한 탐색 영역 내에서 탐색되는 움직임 후보의 위치는 초기 움직임 정보에 대한 위치(도 55의 가운데 점)를 기준으로 설정될 수 있다. 움직임 후보가 탐색되는 위치는 탐색 패턴에 따라 달라질 수 있다. 탐색 패턴은 다이아몬드(DIAMOND) 패턴, 크로스(CROSS) 패턴 등이 있을 수 있다. 도 55에서 ◇는 다이아몬드 패턴에 따라 움직임 후보가 탐색되는 위치를 나타내고, +는 크로스 패턴에 따라 움직임 후보가 탐색되는 위치를 나타낼 수 있다. 탐색 패턴의 간격(또는 탐색 간격)은 현재 블록의 크기, 현재 블록이 휘도 성분 블록인지 색차 성분 블록인지 여부, 현재 블록의 움직임 정보의 해상도, 현재 블록과 참조 블록 간의 POC 값의 차이 정도, 현재 블록의 주변 블록 움직임 특성 중에서 적어도 하나에 기초하여 설정될 수 있다. 즉, 탐색 패턴의 간격은 초기 움직임 정보에서 멀어질수록 간격이 더 넓어지도록, 좁아지도록 또는 등간격으로 설정될 수 있다. 예를 들어, 현재 블록의 크기가 임의의 미리 지정된 값보다 크다면, 현재 블록은 배경 또는 큰 객체의 움직임에 대한 블록일 가능성이 높으므로 초기 움직임 정보에서 멀어질수록 탐색 패턴의 간격은 더 넓어지도록 설정될 수 있다. 이때, 임의의 미리 지정된 값은 블록의 크기가 32x32인 경우일 수 있다. 또한, 현재 블록의 크기가 임의의 미리 지정된 값보다 작다면, 현재 블록은 객체 경계에 대응되는 움직임에 대한 블록일 가능성이 높으므로 다양한 움직임에 대한 탐색을 위해 탐색 패턴의 간격은 초기 움직임 정보에서 멀어질수록 간격이 더 좁아지도록 설정될 수 있다. 탐색 패턴의 간격에 대한 정보는 비트스트림의 SPS, PPS, 픽쳐 헤더, 슬라이스 헤더 중 어느 하나에 포함될 수 있다. 디코더는 탐색 패턴의 간격에 대한 정보를 파싱하여 현재 블록의 패턴 간격을 설정할 수 있다.
도 56은 본 명세서의 일 실시예에 따른 움직임 후보의 위치를 탐색하는 과정을 나타낸다.
구체적으로, 도 56은 TM 방법을 위한 움직임 후보가 탐색되는 위치에 대한 탐색 수행 과정을 나타낸 순서도이다. 도 56을 참조하면 디코더는 초기 움직임 정보에 대한 화소(픽셀) 기반 코스트 값을 획득(계산)할 수 있다. 디코더는 탐색 수행의 반복횟수가 '0'이라면, TM 방법을 수행하지 않고 종료할 수 있다. 그렇지 않다면(즉, 탐색 수행의 반복횟수가 '0'이 아니라면), 디코더는 TM 방법을 수행할 수 있다. 이때, 반복횟수는 1 이상의 임의의 정수 값일 수 있다.
초기 탐색 과정은 재귀적으로 반복하여 수행될 수 있다. 현재 탐색 단계에서 보정된 움직임 후보는 다음 탐색 과정의 초기 움직임 정보로 입력될 수 있다. 각 단계에서의 탐색 패턴, 탐색 간격, 반복 횟수는 현재 블록의 움직임 해상도에 따라 달라질 수 있다. 예를 들어, 첫번째 탐색 단계에서의 반복횟수는 '375', 초기 탐색 패턴은 '다이아몬드(DIAMOND)'로 설정되고, 초기 탐색 간격은 움직임 해상도가 4의 정수 화소 단위이면 '6'으로 설정되고, 움직임 해상도가 4의 정수 화소 단위가 아니면 '4'로 설정될 수 있다. 두 번째 탐색 과정에서는 반복횟수는 '1', 탐색 패턴은 '크로스'로 설정되고, 탐색 간격은 움직임 해상도가 4의 정수 화소 단위이면 '6'으로 설정되고, 움직임 해상도가 4의 정수 화소 단위가 아니면 '4'로 설정될 수 있다. 세 번째 탐색 과정에서는 반복횟수는 '1', 탐색 패턴은 '크로스'로 설정되고, 탐색 간격은 움직임 해상도가 4의 정수 화소 단위이면 '5'으로 설정되고, 움직임 해상도가 4의 정수 화소 단위가 아니면 '3'으로 설정될 수 있다. 네 번째 탐색 과정에서는 반복횟수는 '1', 탐색 패턴은 '크로스'로 설정되고, 탐색 간격은 움직임 해상도가 4의 정수 화소 단위이면 '4'으로 설정되고, 움직임 해상도가 4의 정수 화소 단위가 아니면 '2'으로 설정될 수 있다. 다섯 번째 탐색 과정에서는 반복횟수는 '1', 탐색 패턴은 '크로스',로 설정되고, 탐색 간격은 움직임 해상도가 4의 정수 화소 단위이면 '3'으로 설정되고, 움직임 해상도가 4의 정수 화소 단위가 아니면 '1'으로 설정될 수 있다. 각 단계에 대응되는 탐색 과정에 대한 수행 여부는 현재 블록의 움직임 해상도에 기초하여 결정될 수 있다. 예를 들어, 현재 블록의 움직임 해상도가 4의 정수 화소 단위이거나 1의 정수 화소 단위이면, 첫 번째, 두 번째 탐색 과정만 수행되고, 세 번째, 네번째, 다섯 번째 탐색 과정은 수행되지 않을 수 있다. 또한, 현재 블록의 움직임 해상도가 1/2의 화소 단위이면, 첫 번째, 두 번째, 세 번째 탐색 과정만 수행되고, 네 번째, 다섯 번째 탐색 과정은 수행되지 않을 수 있다. 또한, 현재 블록의 움직임 해상도가 1/4의 화소 단위이면 첫 번째, 두 번째, 세 번째, 네 번째 탐색 과정만 수행되고 다섯 번째 탐색 과정은 수행되지 않을 수 있다.
상술한 탐색 과정에서 반복횟수, 초기 탐색 패턴, 초기 탐색 간격은 도 56에 도시된 과정이 수행되기 이전에 이루어질 수 있다.
다음으로, 탐색 패턴과 탐색 간격이 재설정될 수 있다. 탐색 패턴과 탐색 간격은 현재 블록의 크기, 현재 블록이 휘도 성분 블록인지 색차 성분 블록인지 여부, 현재 움직임 해상도, 반복횟수, 이전 반복 단계에서 계산된 움직임 후보 위치에 대한 코스트 값의 분포, 현재 블록에 OBMC 또는 MHP가 적용되는지 여부에 대한 정보 중 적어도 하나 이상에 기초하여 결정될 수 있다. 이하에서 탐색 패턴과 탐색 간격을 설정하는 방법에 대해 설명한다.
탐색 간격은 현재 블록의 움직임 정보 해상도에 따라 결정될 수 있다. 움직임 정보 해상도는 1의 정수 화소, 4의 정수 화소, 1/2 화소, 1/4 화소, 1/16 화소 단위가 될 수 있다. 움직임 정보 해상도가 1/4 화소인 경우 초기 탐색 간격은 6으로 설정될 수 있고 그 외의 경우에 초기 탐색 간격은 4로 설정될 수 있다.
탐색 패턴은 다이아몬드 패턴 또는 크로스 패턴으로 결정될 수 있다. 탐색 간격은 초기 탐색 간격에서 임의의 간격만큼 감소되거나 증가되면서 조정될 수 있다. 예를 들어, 탐색 패턴과 탐색 간격은 반복 단계에 따라 달라질 수 있다. 반복 단계는 반복횟수가 0이 아닌 경우 탐색 패턴과 탐색 간격의 재설정이 몇 번째로 반복되는지를 나타낼 수 있다. 즉, 몇 번째 반복 단계인지에 따라 탐색 패턴과 탐색 간격이 달라질 수 있다. 예를 들어 첫 번째 반복 단계에서 탐색 패턴과 탐색 간격은 다이아몬드 탐색 패턴과 초기 탐색 간격에 기초하여 움직임 후보 위치에 대한 평가가 수행될 수 있다. 두 번째 단계에서는 첫번째 단계에서 찾은 최적의 움직임 후보를 기준으로, 크로스 패턴과 초기 탐색 간격을 사용해서 새로운 후보 위치들이 선정될 수 있다. 그리고, 새로운 후보 위치에 대한 평가가 수행될 수 있다. 세번째 단계에서는 이전 단계에서 찾은 최적의 움직임 후보를 기준으로, 크로스 패턴과 초기 탐색 간격에서 1만큼 감소시킨 탐색 간격을 사용해서 새로운 후보 위치들이 선정될 수 있다. 그리고 새로운 후보 위치에 대한 평가가 수행될 수 있다. 세 번째 단계 이후 단계에서는 이전 단계에서 찾은 최적의 움직임 후보를 기준으로, 크로스 패턴과 이전 단계보다 1만큼 감소된 탐색 간격을 사용해서 새로운 후보 위치들이 선정되고, 새로운 후보 위치에 대한 평가가 수행될 수 있다.
탐색 패턴과 탐색 간격은 현재 블록의 움직임 해상도에 따라 설정될 수 있다. 현재 블록의 움직임 해상도에 따라 반복횟수, 템플릿의 크기도 설정될 수 있다. 예를 들어, 움직임 해상도가 1/4의 화소 단위가 아니면 반복횟수는 2이상의 값으로 설정될 수 있다. 즉, 현재 블록의 움직임 해상도가 높은 경우(움직임이 정밀하지 않은 경우), 탐색 과정이 추가적으로 수행될 수 있고, 움직임 정보를 보정할 수 있다. 움직임 해상도가 1/4의 화소 단위이면, 정확한 움직임을 찾기 위해서 탐색 패턴은 다이아몬드 패턴으로 설정될 수 있다.
탐색 패턴과 탐색 간격은 현재 블록의 컬러 성분에 따라 설정될 수 있다. 색차 성분에 대한 탐색 패턴과 탐색 간격은 휘도 성분에 대한 탐색 패턴과 탐색 간격보다 넓게 설정될 수 있다. 휘도 성분(신호) 대비 색차 성분(신호)는 공간적인 상관도가 높기 때문이다. 또는, 성능을 높이기 위해서 색차 성분에 대한 탐색 패턴과 탐색 간격은 휘도 성분에 대한 탐색 패턴과 탐색 간격보다 더 짧게 설정될 수 있다.
탐색 패턴과 탐색 간격은 현재 블록의 크기에 기초하여 설정될 수 있다. 현재 블록의 크기가 임의의 정해진 값보다 같거나 큰 경우, 탐색 패턴은 크로스 패턴이 사용되고 탐색 간격은 초기 탐색 간격보다 넓게 설정될 수 있다. 예를 들어 탐색 간격은 '7'일 수 있다. 또는, 성능을 높이기 위해 현재 블록의 크기가 임의의 정해진 수보다 큰 경우, 탐색 패턴은 다이아몬드 패턴이 사용되고 탐색 간격은 초기 탐색 간격보다 짧게 설정될 수 있다. 예를 들어 탐색 간격은 '5'일 수 있다. 현재 블록의 크기는 16 x 16, 32 x 32가 될 수 있으며, 탐색 패턴과 탐색 간격은 현재 블록의 가로의 크기 및 세로의 크기의 합에 기초하여 설정될 수 있다. 또한, 현재 블록의 크기에 기초하여 템플릿의 크기가 설정될 수 있다. 현재 블록의 크기가 임의의 정해진 값보다 같거나 큰 경우, 템플릿의 크기는 미리 정해진 크기로 설정될 수 있다. 현재 블록의 크기가 임의의 정해진 값보다 같거나 큰 경우, 템플릿의 크기는 템플릿의 크기는 기존보다 작게 설정될 수 있다.
다음으로, 디코더는 탐색 패턴과 탐색 간격을 이용하여 탐색되는 움직임 후보의 위치에 대한 보정 값(offset)을 설정하고, 탐색되는 움직임 후보들에 대한 평가를 수행할 수 있다. 본 명세서에서의 평가는 코스트 값을 획득하는 것을 의미할 수 있다. 움직임 후보가 탐색되는 위치는 탐색 패턴에 따라 달라질 수 있다. 예를 들어, 탐색 패턴이 크로스 패턴인 경우, 보정 값은 (0, 1), (1, 0), (0, -1), (-1, 0)이며, 탐색 패턴이 다이아몬드 패턴인 경우, 보정 값은 (0, 2), (1, 1), (2, 0), (1, -1), (0, -2), (-1, -1), (-2, 0), (-1, 1)이다. 이때 보정 값 (x, y)는 (수평, 수직)으로 x는 수평 방향에 대한 보정 값이고 y는 수직 방향에 대한 보정 값일 수 있다.
상술한 탐색 영역을 설정하는 방법은 임의의 정해진 반복횟수만큼 재귀적으로 수행될 수 있다. 예를 들어 반복횟수가 1이면 1회 이상 수행될 수 있다. 디코더는 움직임 후보들을 탐색하여 탐색되는 움직임 후보들 전부에 대한 평가를 수행하였다면 가장 작은 코스트 값에 대응되는 움직임 후보의 움직임 정보를 최종 움직임 정보로 사용할 수 있다.
도 56의 초기 움직임 후보는 이전 반복 단계에서 가장 작은 코스트 값에 기초하여 재설정될 수 있다. 첫 번째 단계에서 가장 작은 코스트 값에 대응되는 움직임 후보를 기준으로 다음 단계의 초기 움직임 후보가 재설정될 수 있다. 예를 들어, 첫 번째 단계에서 가장 작은 코스트 값에 대응되는 움직임 후보가 좌상단에 위치한 움직임 후보인 경우, 다음 반복 단계에서는 좌상단에 위치한 움직임 후보에 인접한 움직임 후보에 대해서 디코더는 평가를 수행할 수 있다.
현재 블록이 코딩 유닛(블록)인지 서브 블록(서브 코딩 블록)인지에 따라 도 56을 참조하여 설명한 탐색 수행 과정은 다르게 진행될 수 있다.
현재 블록이 코딩 블록이고 현재 블록에 AMVP 모드가 적용되는 경우, 현재 블록의 L0 예측을 위한 L0 움직임 후보 리스트와 L1 예측을 위한 L1 움직임 후보 리스트가 유도될 수 있다. 유도된 후보 리스트의 일부 또는 모든 움직임 후보에 대해 탐색 수행 과정이 진행되어 보정된 움직임 정보가 유도될 수 있다. 한편, 현재 블록이 코딩 블록이고 현재 블록에 Merge 모드가 적용되는 경우, 현재 블록의 L0 및 L1 예측을 위한 하나의 움직임 후보 리스트가 유도될 수 있다. 유도된 하나의 움직임 후보 리스트 내의 일부 또는 모든 움직임 후보들에 대해 탐색 수행 과정이 진행될 수 있다. 본 명세서에서 기술하는 L0는 L0 예측, L1은 L1 예측을 의미할 수 있다.
현재 블록에는 L0 단방향 예측, L1 단방향 예측 또는 양방향 예측이 적용될 수 있다. 현재 블록에는 L0 단방향 예측, L1 단방향 예측 또는 양방향 예측 중 어느 것이 적용되는지 여부는 참조 방향 지시 정보에 의해 지시될 수 있다. 참조 방향 지시 정보는 코스트 값에 기초하여 재설정될 수 있다. 예를 들어, L0의 초기 움직임 정보를 이용하여 생성되는 예측 블록의 코스트 값, L1의 초기 움직임 정보를 이용하여 생성되는 예측 블록의 코스트 값, L0와 L1의 초기 움직임 정보를 통해 양방향 예측을 수행하여 2개의 예측 블록을 가중치 평균하여 생성되는 예측 블록의 코스트 값, L0의 보정된 움직임 정보를 이용하여 생성되는 예측 블록의 코스트 값, L1의 보정된 움직임 정보를 이용하여 생성되는 예측 블록의 코스트 값, L0와 L1의 보정된 움직임을 통해 양방향 예측을 수행하여 2개의 예측 블록을 가중치 평균하여 생성되는 예측 블록의 코스트 값 중에서 가장 작은 코스트 값에 대응되는 움직임 정보 및 참조 방향 지시 정보가 현재 블록에 재설정될 수 있다.
AMVP 모드에서 L0와 L1 움직임 정보 후보 리스트는 서로 독립적으로 유도될 수 있다. 스케일된 L0 움직임 정보는 L1 움직임 정보 후보 리스트에 포함될 수 있다. L0와 L1 움직임 정보의 참조 픽쳐가 다르고, 현재 부호화할 픽쳐를 기준으로 서로 다른 방향의 참조 픽쳐라면, L0와 L1 움직임 정보 간에는 선형성이 존재할 수 있다. L0 움직임 정보와 참조 픽쳐 간의 거리를 통해 L1 움직임 정보는 예측될 수 있다. L0 움직임 정보를 통해 예측된 L1 움직임 정보(스케일된 L0 움직임 정보)는 L1 움직임 후보 리스트에 포함될 수 있다.
TM을 이용한 탐색 과정은 L0와 L1 움직임 후보에 독립적으로 적용될 수 있다. TM을 이용한 탐색 과정에서 L0에서 찾은 보정된 움직임 정보 후보는 L1 움직임 정보 후보들을 보정하는데 이용될 수 있다. 예를 들어, L0에서 찾은 보정된 움직임 후보와 참조 픽쳐 간의 거리에 기초하여 L1 움직임 정보는 예측될 수 있고, 예측된 L1 움직임 정보는 L1 움직임 후보 리스트에 포함될 수 있다.
현재 코딩 블록은 여러 개의 서브 블록들로 분할될 수 있다. 각 서브 블록의 초기 움직임 정보는 탐색 수행 과정에 따라 보정된 움직임 정보로 재설정될 수 있다. 각 서브 블록마다 템플릿은 상이할 수 있고, 인접한 서브 블록의 화소(픽셀)가 템플릿으로 사용될 수 있다. 다만, 디코더는 인접한 서브 블록이 복원된 경우에만 다음 서브 블록에 대한 탐색을 수행할 수 있으므로, 탐색 수행 과정이 각 서브 블록 별로 병렬적으로 처리되지 않는 문제가 있다. 이를 위해 현재 블록의 경계에 위치하는 서브 블록에 대해서만 탐색 수행 과정이 진행될 수 있다. 또는, 현재 블록의 경계에 위치한 서브 블록에 대해 디코더는 TM 방법으로 보정된 움직임 정보를 유도하고, 현재 블록의 경계에 위치하지 않는 서브 블록에 대해 디코더는 BM, Optical flow 기반 TM, Multi pass DMVR 방법 중에서 어느 하나 이상을 이용하여 보정된 움직임 정보를 유도할 수 있다.
현재 블록이 코딩 블록으로 처리되는 경우, 디코더는 L0와 L1에 대한 초기 움직임 정보를 사용하여 현재 블록 전체에 대한 코스트 값을 계산하고, 계산된 코스트 값에 기초하여 보정된 움직임 정보를 유도할 수 있다. 이때, 코딩 블록으로 처리되는 블록 내의 우하단 일부 영역의 움직임은 코딩 블록의 전체 움직임과 조금 상이할 수 있다. 템플릿이 어떻게 구성되는지에 따라 탐색 수행 과정은 달라질 수 있고, 보정된 움직임 정보도 달라질 수 있다. 따라서, 현재 블록이 코딩 블록으로 처리되더라도 보정된 움직임 정보는 서브 블록 기반으로 구성된 템플릿에 대한 코스트 값에 기초하여 서브 블록 단위로 보정된 움직임 정보가 유도될 수 있다.
도 57은 본 명세서의 일 실시예 따른 탐색 후보를 평가하는 과정을 나타낸다.
구체적으로 도 57은 도 56을 참조하여 설명한 탐색 패턴과 탐색 간격에 따라 선정된 후보 위치에 대한 보정 값들을 사용하여 탐색 후보를 평가하는 과정을 나타내는 순서도이다. 디코더는 초기 움직임 정보를 최종 움직임 정보로 저장할 수 있다. 그리고 디코더는 탐색 후보 전부에 대한 보정 값들에 대해 후술하는 과정을 수행할 수 있다.
디코더는 탐색할 후보 위치에 대한 보정 값들 중에서 하나를 선택할 수 있다. 보정 값은 현재 블록에서 사용될 움직임 해상도(resolution)에 적합하도록 재설정될 수 있다. 디코더는 재설정된 보정 값을 초기 움직임 정보에 더하여 평가할 움직임 정보를 재구성할 수 있다. 재구성된 움직임 정보에 기초하여 코스트 값을 획득할 수 있다. 이때, 움직임 정보에 기초하여 획득되는 코스트 값은 초기 움직임 정보와 재구성된 움직임 정보 간의 수평 방향 성분들의 절대값의 차이 값과 수직 방향 성분들의 절대값의 차이 값을 더한 후, 임의의 가중치 값을 곱하여 계산될 수 있다. 임의의 가중치 값은 '4'일 수 있다. 디코더는 움직임 정보에 기초하여 획득한 코스트 값이 화소(픽셀)에 기초하여 획득한 초기 움직임 정보의 코스트 값보다 작은 경우에만 재구성된 움직임 정보에 대한 화소(픽셀)기반 코스트 값을 계산할 수 있다.
디코더는 모든 탐색 후보에 대한 보정 값들에 대하여 평가한 후, 가장 작은 코스트 값에 대응되는 움직임 정보를 최종 움직임 정보로 설정할 수 있다.
TM과 같은 템플릿 기반 움직임 보정 방법은 템플릿의 움직임이 현재 블록의 움직임과 얼마나 유사한지에 따라 움직임 보정 성능이 달라질 수 있다. 다시 말해, 템플릿과 현재 블록의 움직임 특성이 다를 수 있으며, 다른 특성을 가지는 템플릿을 사용해서 보정한 움직임은 템플릿 하에서는 움직임 보정 성능이 효율적일지라도 현재 블록에는 움직임 보정 성능이 효율적이지 않을 수 있다. 이를 해결하기 위해, 초기 움직임 정보에 대한 픽셀 기반 코스트 값은 재계산되어 탐색 후보들과의 비교에 사용될 수 있다. 이는 초기 움직임 정보에 대한 중요도를 높이는 효과가 있다. 즉, 초기 움직임 정보에 대한 픽셀 기반 코스트 값은 현재 블록의 크기, 현재 블록의 양자화 파라미터 등을 적어도 하나 이상을 이용하여 재계산될 수 있다. 예를 들어, 초기 움직임 정보에 대한 픽셀 기반 코스트 값은 현재 블록의 크기에 임의의 가중치를 곱한 값을 차감하는 계산을 통해 재설정될 수 있다. 재설정된 코스트 값에 기초하여 탐색 후보들 간의 비교가 이루어질 수 있다. 이때, 임의의 가중치는 1 이상의 정수일 수 있다.
움직임 정보에 기초하여 획득되는 코스트 값은 보정 값의 크기에 따라 달라질 수 있다. 즉, 보정 값이 작을수록 코스트 값은 작아질 수 있다. 가장 작은 코스트 값에 대응되는 움직임 정보가 최종 움직임 정보로 설정되기 때문에, 보정 값이 작은 초기 움직임 정보가 나타내는 위치의 주변 움직임 후보에 대해서만 평가가 수행될 수 있다. 그러나, 보정 값이 큰 움직임 후보가 최적의 움직임 후보일 수 있다. 따라서, 다양한 움직임 후보에 대한 평가를 수행하여 최적의 움직임 후보를 선정하기 위해, 코스트 값은 후술하는 방법을 이용하여 획득될 수 있다. 코스트 값은 주변 블록 각각의 움직임 정보 값 간의 차이, 양자화 파라미터, 현재 블록의 크기 등을 이용하여 획득될 수 있다.
화소(픽셀)기반 코스트 값을 적용할지 여부는 주변 블록의 움직임 정보의 분포를 이용하여 획득될 수 있다. 다양한 움직임 후보에 대한 평가를 위해, 디코더는 보정된 움직임 정보와 주변 블록의 움직임 정보 간의 차이 값을 이용하여 화소(픽셀)기반 코스트 값을 적용할지 여부를 획득할 수 있다. 예를 들어, 디코더는 보정된 움직임 정보와 주변 블록의 움직임 정보 간의 차이 값과 임의의 정해진 값을 비교하여 비교 결과에 따라 화소(픽셀)기반 코스트 값을 적용할지 여부를 결정할 수 있다. 구체적으로 보정된 움직임 정보와 주변 블록의 움직임 정보 간의 차이 값이 임의의 정해진 값보다 큰 경우(또는 작은 경우, 같은 경우) 디코더는 화소(픽셀)기반 코스트 값을 획득할 수 있다. 이때 주변 블록은 현재 블록에 인접한 주변 블록이거나 또는 대응 픽쳐(Collocated picture)에서 현재 블록과 동일한(혹은 대응되는) 위치에 있는 시간적인 주변 블록일 수 있다.
코스트 값은 현재 블록의 크기에 기초하여 획득될 수 있다. 예를 들어, 상술한 코스트 값을 획득하기 위한 가중치는 현재 블록의 크기에 따라 설정될 수 있다. 가중치는 현재 블록의 크기와 반비례하게 설정될 수 있다. 즉, 현재 블록의 크기가 클수록 가중치는 낮게 설정될 수 있다. 이는, 적합한 움직임 후보를 선정하기 위해 보다 더 넓은 범위의 움직임 후보를 평가하기 위함이다. 한편 가중치는 현재 블록의 크기와 비례하게 설정될 수 있다. 즉, 현재 블록의 크기가 클수록 가중치는 높게 설정될 수 있다. 이는 복잡도를 낮추기 위함이다. 예를 들어, 현재 블록의 크기는 16x16, 32x32가 될 수 있고, 현재 블록의 가로 및 세로 크기의 합으로 설정될 수 있다. 가중치는 1, 2, 3, 4, 5, 6 등의 정수 값이 될 수 있다. 또한 가중치가 커질수록 코스트 값이 높아지므로 가중치가 특정 값 이상인 경우 디코더는 코스트 값을 획득하기 위한 평가를 수행하지 않을 수 있다.
이하에서 DMVR을 사용하여 움직임 정보를 보정하는 방법에 대해 설명한다.
도 58 및 도 59는 본 명세서의 일 실시예에 따른 DMVR을 사용하여 움직임 정보를 보정하는 방법을 나타낸다.
DMVR은 BM(Bilateral Matching) 방법을 사용하여 현재 블록에 대한 보정된 움직임 정보를 획득하는 방법이다. BM(Bilateral Matching) 방법은 양방향 움직임을 가지는 블록에서 L0 참조 블록의 주변 탐색 영역(Search area)과 L1 참조 블록의 주변 탐색 영역에서 서로 간의 가장 유사한 부분을 찾아서 초기 움직임 정보를 보정하고, 보정된 움직임 정보를 현재 블록의 예측에 사용하는 방법이다. 탐색 영역의 크기는 참조 블록의 특정 지점을 기준으로 임의의 (m x n)크기로 설정될 수 있다. 예를 들어, 특정 지점은 참조 블록의 좌상단 위치 또는 참조 블록의 중앙 위치일 수 있고, 임의의 크기는 16 x 16일 수 있다. 가장 유사한 부분은 각 블록 간 화소 단위의 코스트 값을 계산하여 가장 작은 코스트 값에 대응되는 지점일 수 있다. 코스트 값은 SAD(Sum of Absolute Differences) 또는 MRSAD(Mean-Removed SAD) 방법을 이용하여 계산될 수 있다. 코스트 값의 계산을 위해 어떠한 방법이 사용되는지에 대한 정보는 비트스트림의 SPS, PPS, 픽쳐 헤더, 슬라이스 헤더 중 적어도 어느 하나에 포함될 수 있다. 디코더는 해당 정보를 파싱하여 설정되는 방법에 기초하여 코스트 값을 계산할 수 있다. 탐색 영역에 따라 코스트 값은 달라질 수 있고, 보정된 움직임 정보 또한 달라질 수 있다. 디코더는 현재 블록을 복수 개의 서브 블록으로 분할하여 각 서브 블록에 대하여 DMVR을 사용한 움직임 정보를 보정할 수 있다. 크기가 큰 블록들 대비 크기가 작은 블록들에 대한 움직임 정보가 더 정확하기 때문이다. 이때, 크기가 큰 블록에서는 DMVR이 수행되지 않고, 분할된 작은 블록(예, 서브 블록)에서만 DMVR이 수행될 수 있다. 도 59를 참조하면 하나의 블록은 여러 개(예를 들어, 4개)의 서브 블록으로 분할될 수 있다. 디코더는 분할된 각 서브 블록마다 DMVR을 사용하여 보정된 움직임 정보를 획득할 수 있다. 또는 디코더는 큰 블록에서 DMVR을 통해 찾은 보정된 움직임 정보를 사용하여 분할된 작은 블록에서 DMVR을 통해 보다 정확한 움직임 정보를 유도하는 다중 DMVR 방법을 사용할 수 있다.
이하에서 다중 DMVR 방법에 대해 설명한다.
도 60은 본 명세서의 일 실시예에 따른 다중 DMVR이 수행되는 과정을 나타낸다.
도 60(a)는 다중 DMVR이 수행되는 일반적인 과정을 나타내고, 도 60(b)는 다중 DMVR의 일반적인 과정을 보다 구체적으로 나타낸다.
도 60(a)를 참조하면, 다중 DMVR은 초기 움직임 정보에 기초하여 코딩 유닛(블록) 단위의 DMVR을 수행하여 하나 이상의 보정된 움직임 정보를 획득할 수 있다(S6010). 현재 코딩 블록에 TM이 적용되는 경우, 디코더는 S6010 단계에서 획득한 하나 이상의 보정된 움직임 정보를 이용하여 TM을 수행할 수 있다(S6020). TM을 수행하여 결정되는 현재 코딩 블록의 보정된 움직임 정보가 양방향에서 단방향으로 변경되었다면, DMVR 과정을 수행할 수 없으므로 S6020 이후의 단계들(S6030, S6040)은 수행되지 않고, 현재 블록의 움직임은 단방향으로 최종 결정된다. TM을 수행한 결과, 현재 코딩 블록의 보정된 움직임 정보가 양방향이라면, 디코더는 서브 블록 단위의 DMVR을 수행하여 각 서브 블록마다 서브 블록 단위의 보정된 움직임 정보를 획득할 수 있다(S6030). 그리고 디코더는 S6040 단계에서 획득한 서브 블록 단위의 보정된 움직임 정보를 BDOF에 기반하여 다시 보정하고, BDOF에 기반하여 보정된 움직임 정보를 최종적으로 획득할 수 있다.
도 60(b)를 참조하면, 도 60(a)의 S6010 단계는 정수 단위의 탐색을 이용하여 코딩 유닛(블록) 단위의 DMVR을 수행하는 단계(S6001)와 반화소 단위의 탐색을 이용하여 코딩 유닛(블록) 단위의 DMVR을 수행하는 단계(S6002)로 세분화 될 수 다. S6010 단계에서 디코더가 현재 코딩 유닛(블록)의 보정된 움직임 정보와 픽셀 기반 코스트 값을 계산하기 위해 3x3 Square 탐색을 사용할 수 있다. 이때, 움직임 해상도는 S6001 단계에서는 정수 단위로, S6002 단계에서는 반화소(1/2) 단위로 설정될 수 있다. S6001 단계에서 디코더는 초기 움직임 정보와 정수 단위 보정 값을 사용하여 보정된 움직임 정보를 획득할 수 있다.
이하에서 도 60(a)의 S6030 단계에 대해 자세히 설명한다.
S6030 단계에서 디코더는 현재 코딩 블록을 여러 개의 서브 블록으로 분할한 후, 각 서브 블록마다 도 60(b)의 S6004, S6005 단계가 수행될 수 있다. 이때 서브 블록의 크기는 최대 16 x 16일 수 있다.
디코더는 S6020 단계에서 획득한 보정된 움직임 정보를 S6004, S6005 단계를 위한 초기 움직임 정보로 설정할 수 있다. 디코더는 초기 움직임 정보를 이용하여 정수 단위의 전역 탐색을 수행하고, 현재 서브 블록에 대한 최적의 움직임 정보와 최적의 움직임 정보에 대한 코스트 값을 획득할 수 있다(S6004). S6004단계 이후, 디코더는 반화소(1/2) 단위의 3x3 Square 탐색을 수행할 수 있다. S6004 단계를 통해 획득되는 움직임 정보는 S6005 단계의 기준 움직임 정보로 사용될 수 있다. 즉, S6004 단계를 통해 획득된 정보에 기초하여 새로운 움직임 후보가 획득되고, 디코더는 새로운 움직임 후보를 평가할 수 있다(S6005). 디코더는 새로운 움직임 후보에 대한 평가를 수행하고, 최종 움직임 정보를 현재 서브 블록에 대해 저장할 수 있다. S6004, S6005 단계는 모든 서브 블록에 대해 반복되어 수행될 수 있다. 서브 블록 단위의 DMVR 과정은 서브 블록 간의 의존성이 없으므로, 모든 서브 블록이 병렬적으로 DMVR을 수행할 수 있다는 장점이 있다.
도 61은 본 명세서의 일 실시예에 따른 시간적인 계층을 나타낸다.
클라우드 게임 서비스, 영상 통화, 실시간 방송 등과 같은 초저지연 미디어 서비스를 위해서는 낮은 복잡도를 갖는 비디오 신호 처리 장치가 필요할 수 있다. 상술한 템플릿 기반 코딩 기법은 부호화 효율을 증가시키지만, 기존 복원된 샘플을 이용하기 때문에 이웃하는 블록 간의 의존성이 존재하여 처리 속도가 낮고 계산 복잡도가 높다는 특징이 있다. 비디오 신호 처리 장치는 코딩 기법의 활성화 여부를 SPS, PPS, 프레임, 픽쳐, 슬라이스, 타일 단위로 설정함으로써, 처리 속도와 복잡도 간의 최적 지점을 설정하도록 할 수 있다. 예를 들어, 비디오 신호 처리 장치는 비트스트림에 포함된 특정 코딩 기법과 관련된 신택스 요소(예, ph_A_tool_enable_flag)를 파싱하여 픽쳐 단위로 특정 코딩 기법의 활성화 여부를 설정할 수 있다. 특정 코딩 기법은 템플릿 기반 코딩 기법일 수 있고, DIMD, TIMD, Intra TMP, TMRL, EIP, PNN, PDP, SGPM, IBC, TM, TM OBMC, LIC, CCCM, GPM 등의 기술 중 하나일 수 있다. 또는, 비디오 신호 처리 장치는 복수의 코딩 기법을 그룹으로 묶어 픽쳐 단위로 그룹 내의 기술들에 대한 활성화 여부를 설정할 수 있다. 이때, 그룹 내의 기술들에 대한 활성화 여부는 비트스트림에 포함된 그룹과 관련된 신택스 요소(예, ph_groupA_enable_flag)의 파싱 결과에 기초하여 결정될 수 있다. 그룹에는 DIMD, TIMD, Intra TMP, TMRL, EIP, PNN, PDP, SGPM 등의 기술 중에서 하나 이상이 포함될 수 있다. 또는 비디오 신호 처리 장치는 픽쳐 단위로 탬플릿 코스트를 이용하는 기술들에 대한 활성화 여부를 설정할 수 있다. 이때, 템플릿 코스트를 이용하는 기술들에 대한 활성화 여부는 비트스트림에 포함된 신택스 요소(예, ph_template_enable_flag)의 파싱 결과에 기초하여 결정될 수 있다. 템플릿 코스트를 이용하는 기술은 현재 블록의 주변 샘플을 이용하여 템플릿 코스트를 구하는 방식을 적용하는 기술로써, 예를 들어, TIMD, Intra TMP, TMRL, SGPM, TM, TM OBMC 등의 기술 중에서 하나 이상이 포함될 수 있다. 또는, 비디오 신호 처리 장치는 픽쳐 단위로 메모리 접근이 많은 기술들에 대한 활성화 여부를 설정할 수 있다. 이때, 메모리 접근이 많은 기술들에 대한 활성화 여부는 비트스트림에 포함된 신택스 요소(예, ph_large_memory_access_enable_flag)의 파싱 결과에 기초하여 결정될 수 있다. 메모리 접근이 많은 기술은 MTS, LFNST, NSPT, PDP, NNIP, ALF 등의 기술 중에서 하나 이상이 포함될 수 있다.
비디오 신호 처리 장치는 코딩 기법의 활성화 여부를 픽쳐의 타입 정보, NAL 유닛의 타입 정보, 시간적 계층 정보, 양자화 파라미터, 현재 AU가 참조 픽쳐로 사용되는지, 프로파일 정보 중에서 적어도 하나 이상에 기초하여 결정할 수 있다. 픽쳐의 타입 정보는 인트라 픽쳐, 인터 픽쳐를 의미할 수 있다. 비디오 신호 처리 장치는 코딩 기법 A를 인터 픽쳐에서는 비활성화할 수 있다. 반대로, 비디오 신호 처리 장치는 코딩 기법 A를 인터 픽쳐에서는 활성화할 수 있다. NAL 유닛 타입 정보는 IDR, CRA 등 일 수 있다. 비디오 신호 처리 장치는 코딩 기법 A를 IDR에서는 비활성화할 수 있다. 반대로, 비디오 신호 처리 장치는 코딩 기법 A를 IDR에서는 활성화할 수 있다. 시간적 계층 정보는 도 61에 도시된 것과 같이, 시간적 스케일러블을 지원하는 픽쳐 간 참조 구조에서 시간적 레이어에 따라 달라지는 시간적 해상도 정보를 의미할 수 있다. 시간적 해상도 정보는 1초에 몇 장의 픽쳐를 화면에 출력하는지에 대한 정보일 수 있다. 일 예로, 1초에 15장의 픽쳐를 화면에 출력하는 경우, 초당 15 프레임율의 시간적 해상도를 의미할 수 있다. 초당 30 프레임율의 시간적 해상도는 초당 15 프레임율의 시간적 해상도보다 높은 의미로 해석될 수 있다. 도 61에서 Temporal layer 0가 초당 15 프레임율의 시간적 해상도를 의미할 경우, Temporal layer 0와 Temporal layer 1을 모두 사용할 때에는 초당 30 프레임율의 시간적 해상도를 의미할 수 있다. 도 61의 I는 인트라 픽쳐이고, P, B는 인터 픽쳐이다. P는 하나의 참조 픽쳐만을 사용하는 픽쳐이고, B는 복수의 참조 픽쳐를 사용하는 픽쳐이다. 도 61에서 영문자 옆의 숫자는 디코딩 순서이고, 왼쪽부터 오른쪽 방향으로 출력되며, 화살표 방향은 참조 방향을 나타낼 수 있다.
비디오 신호 처리 장리는 코딩 기법 A를 시간적 레이어의 값에 따라 활성화 여부를 결정할 수 있다. 비디오 신호 처리 장리는 코딩 기법 A를 양자화 파라미터의 값에 따라 활성화 여부를 결정할 수 있다. 비디오 신호 처리 장리는 코딩 기법 A를 현재 AU가 참조 픽쳐로 사용되는지에 따라 활성화 여부를 결정할 수 있다. 비디오 신호 처리 장리는 코딩 기법 A에 대한 활성화 여부를 프로파일에서 정의하여 설정할 수 있으며, 디코더는 비트스트림 내 프로파일 정보에 기초하여 코딩 기법 A에 대한 활성화 여부를 설정할 수 있다. 여기서 프로파일은 사용 영역에 맞게 특정 기술들만을 사용할 수 있도록 설정한 환경 구성 또는 기술들의 묶음을 의미할 수 있다. 비디오 신호 처리 장치는 기술들의 그룹, 템플릿 코스트를 이용하는 기술, 메모리 접근이 많은 기술의 활성화 여부를 픽쳐의 타입 정보, NAL 유닛의 타입 정보, 시간적 계층 정보, 양자화 파라미터, 현재 AU가 참조 픽쳐로 사용되는지, 프로파일 정보 중에서 적어도 하나 이상에 기초하여 결정할 수 있다. 예를 들어, 비디오 신호 처리 장리는 메모리 접근이 많은 기술에 대한 활성화 여부를 프로파일에서 정의하여 설정할 수 있으며, 디코더는 비트스트림 내 프로파일 정보에 기초하여 메모리 접근이 많은 기술에 대한 활성화 여부를 설정할 수 있다.
도 62는 본 명세서의 일 실시예에 따른 CU 단위의 OBMC를 수행하는 방법을 나타낸다.
도 62를 참조하면 비디오 신호 처리 장치는 현재 블록의 좌상단 블록인 A0 블록에 대해 OBMC를 수행할 수 있다(Case 1). 비디오 신호 처리 장치는 A0 블록의 움직임 정보와 A0 블록과 인접한 상단 블록인 Ne-A0 블록의 움직임 정보가 서로 상이한 경우, A0 블록에 대한 OBMC를 수행할 수 있다. 이때, 비디오 신호 처리 장치는 OBMC 수행을 위해, A0 블록의 움직임 정보를 사용하여 참조 픽쳐 0(reference picture 0)에서 제1 예측 블록(ref A0)을 획득하고, Ne-A0 블록의 움직임 정보를 A0 블록의 위치로 투영(projection)하여 참조 픽쳐 0에서 제2 예측 블록을 획득할 수 있다. 그리고 비디오 신호 처리 장치는 미리 설정된 가중치에 기초하여 제1 예측 블록과 제2 예측 블록을 가중치 평균하여 A0 블록에 대한 최종 예측 블록을 획득할 수 있다. 또한, 비디오 신호 처리 장치는 현재 블록의 좌측 블록인 L2 블록에 대해 OBMC를 수행할 수 있다(Case 2). 비디오 신호 처리 장치는 비디오 신호 처리 장치는 L2 블록의 움직임 정보와 L2 블록과 인접한 좌측 블록인 Ne-L2 블록의 움직임 정보가 서로 상이한 경우, L2 블록에 대한 OBMC를 수행할 수 있다. 이때, 비디오 신호 처리 장치는 OBMC 수행을 위해, L2 블록의 움직임 정보를 사용하여 참조 픽쳐 0에서 제1 예측 블록(ref L2)을 획득하고, Ne-L2의 움직임 정보를 L2 블록의 위치로 투영(projection)하여 참조 픽쳐 1(reference picture 1)에서 Ne-L2의 제2 예측 블록을 획득할 수 있다. 그리고 비디오 신호 처리 장치는 미리 설정된 가중치에 기초하여 제1 예측 블록과 제2 예측 블록을 가중치 평균하여 L2 블록에 대한 최종 예측 블록을 획득할 수 있다. 이때 미리 설정된 가중치는 테이블 형태로 정의될 수 있다. 현재 블록과 주변 블록 간의 참조 픽쳐는 case 1과 같이 동일할 수도 있고, case 2와 같이 상이할 수도 있다.
현재 블록에 인접한 주변 샘플이 TER 내부의 샘플인 경우, 비디오 신호 처리 장치는 현재 블록에 인접한 주변 샘플을 사용할 수 없으므로, 현재 블록에 대해 주변 샘플을 이용한 TM OBMC, LIC, ARMC 등의 방법을 적용하지 않을 수 있다.
현재 블록에 인접한 주변 샘플이 TER 내부의 샘플인 경우, 비디오 신호 처리 장치는 주변 블록 또는 현재 블록의 움직임 정보, 주변 블록 또는 현재 블록에 대한 LIC 적용 여부, 주변 블록의 움직임 정보에 대한 참조 픽쳐와 현재 픽쳐와의 거리, 현재 블록의 움직임 정보에 대한 참조 픽쳐와 현재 픽쳐와의 거리, 주변 블록의 OBMC 적용 여부, 주변 블록 또는 현재 블록의 MHP 적용 여부, 주변 블록 또는 현재 블록의 잔여 신호 중에서 적어도 하나 이상을 이용하여 현재 블록에 대한 OBMC 적용 여부 또는 OBMC 모드를 결정할 수 있다. 예를 들어, 비디오 신호 처리 장치는 주변 블록의 움직임 정보로 예측한 블록과 현재 블록의 움직임 정보로 예측한 블록 간의 차이를 코스트로 계산할 수 있으며, 계산된 코스트와 미리 지정된 값을 비교하여 현재 블록에 대한 OBMC 적용 여부 또는 OBMC 모드를 결정할 수 있다. 미리 지정된 값은 현재 블록의 가로와 세로의 크기, 현재 블록의 샘플 수, 주변 블록의 움직임 정보에 대한 참조 픽쳐와 현재 픽쳐와의 거리, 현재 블록의 움직임 정보에 대한 참조 픽쳐와 현재 픽쳐와의 거리, 주변 블록의 OBMC 적용 여부, 주변 블록 또는 현재 블록의 MHP 적용 여부, 주변 블록 또는 현재 블록의 잔여 신호 중에서 적어도 하나 이상에 기초하여 결정될 수 있다. 또는, 미리 지정된 값은 현재 블록의 샘플 수에 특정 값을 곱한 값 일 수 있다. 특정 값은 1이상의 정수일 수 있다. 인코더는 OBMC 적용 여부 및 OBMC 모드 정보를 명시적으로 시그널링할 수 있다. 디코더에서는 OBMC 적용 여부 및 OBMC 모드 정보를 파싱하여 현재 블록에 OBMC 적용 여부 및 OBMC 모드를 설정할 수 있다.
도 63은 본 명세서의 일 실시예에 따른 양방향 움직임 정보를 나타낸다.
현재 블록에 인접한 주변 샘플이 TER 내부의 샘플인 경우, 비디오 신호 처리 장치는 주변 블록 또는 현재 블록의 움직임 정보, 주변 블록 또는 현재 블록에 대한 OBMC 적용 여부, 주변 블록의 움직임 정보에 대한 참조 픽쳐와 현재 픽쳐와의 거리, 현재 블록의 움직임 정보에 대한 참조 픽쳐와 현재 픽쳐와의 거리, 주변 블록의 LIC 적용 여부, 주변 블록 또는 현재 블록의 MHP 적용 여부, 주변 블록 또는 현재 블록의 잔여 신호 중에서 적어도 하나 이상을 이용하여 현재 블록에 대한 LIC 적용 여부 또는 LIC 모델 파라미터를 결정할 수 있다.
비디오 신호 처리 장치는 현재 블록의 움직임 정보가 양방향 움직임 벡터 또는 양예측 움직임 벡터인 경우, 움직임 벡터에 기초하여 예측한 블록 간의 차이를 SAD 코스트와 MRSAD 코스트로 계산할 수 있다. 비디오 신호 처리 장치는 SAD 코스트와 MRSAD 코스트를 비교한 결과에 기초하여 현재 블록에 대한 LIC 적용 여부를 결정할 수 있다. 도 63을 참조하면 비디오 신호 처리 장치는 L0 참조 블록과 L1 참조 블록을 사용하여 현재 블록에 대한 LIC 모델 파라미터를 유도할 수 있다. 비디오 신호 처리 장치는 L1 참조 블록으로부터 L0 참조 블록으로의 제1 LIC 모델 파라미터를 유도하고, L0 참조 블록으로부터 L1 참조 블록으로의 제2 LIC 모델 파라미터를 유도한 후, 제1 LIC 모델 파라미터 및 제2 LIC 모델 파라미터를 이용하여 보정된 L0 참조 블록과 L1 참조 블록 간의 가중치 평균을 통해 최종 예측 블록을 생성할 수 있다. 인코더는 LIC 적용 여부 및 LIC 모델 파라미터에 대한 정보를 비트스트림에 포함하고, 명시적으로 시그널링할 수 있다. 디코더는 LIC 적용 여부 및 LIC 모델 파라미터에 대한 정보를 파싱하여 현재 블록에 LIC 적용 여부 및 LIC 모델 파라미터를 설정할 수 있다. LIC 모델 파라미터에 대한 정보는 LIC 모델 파라미터 예측 값 간의 차이만으로 구성된 정보일 수 있다. 현재 블록의 움직임 정보가 단방향 움직임 벡터인 경우에는 비디오 신호 처리 장치는 현재 블록의 움직임 정보를 양방향 또는 양예측 움직임 벡터로 변경한 후, 상술한 과정을 수행할 수 있다. 참조 블록 간의 차이는 차이의 절대값일 수 있다.
도 64는 본 명세서의 일 실시예에 따른 단방향 움직임 정보를 양방향 또는 양예측 움직임 정보로 변경하는 방법을 나타낸다.
도 64(a)를 참조하면, 비디오 신호 처리 장치는 현재 블록의 제1 움직임 벡터(MV)에 기초하여 제1 움직임 벡터가 참조하는 제1 참조 픽쳐가 아닌 제2 참조 픽쳐를 지시하는 제2 움직임 벡터(Scaled MV)를 획득할 수 있다. 여기서 제2 움직임 벡터는 현재 픽쳐와 제1 참조 픽쳐 간의 제1 POC 거리(k), 현재 픽쳐와 제2 참조 픽쳐 간의 제2 POC 거리(l), 제1 움직임 벡터에 기초하여 유도될 수 있다. 제2 움직임 벡터(Scaled MV)는 MV * l / k 일 수 있다. 비디오 신호 처리 장치는 제1 움직임 벡터(MV)가 지시하는 제1 참조 블록을 이용하여 제2 움직임 벡터(Scaled MV)를 보정할 수 있으며, 보정된 움직임 벡터(New MV)를 획득할 수 있다.
도 64(b)를 참조하면, 비디오 신호 처리 장치는 현재 블록의 제1 움직임 벡터(MV)에 기초하여 제1 움직임 벡터가 참조하는 제1 참조 픽쳐가 아닌 제1 참조 픽쳐와 반대 방향인 제2 참조 픽쳐를 지시하는 제2 움직임 벡터(reverse MV)를 획득할 수 있다. 제2 움직임 벡터는 현재 픽쳐와 제1 참조 픽쳐 간의 제1 POC 거리(k), 현재 픽쳐와 제2 참조 픽쳐 간의 제2 POC 거리(l), 제1 움직임 벡터에 기초하여 유도될 수 있다. 비디오 신호 처리 장치는 제1 움직임 벡터(MV)가 지시하는 제1 참조 블록을 이용하여 제2 움직임 벡터(reverse MV)를 보정할 수 있으며, 보정된 움직임 벡터(New MV)를 획득할 수 있다.
비디오 신호 처리 장치는 도 64(a), (b)를 통해 설명한 양방향 움직임 변환 방식을 사용하여 움직임 후보 리스트에 움직임 후보를 추가시킬 수 있다. 먼저 비디오 신호 처리 장치는 움직임 후보 리스트에 존재하는 움직임 정보를 이용하여 양방향(또는 양예측) 움직임 정보를 구성한 후, 양방향(또는 양예측) 움직임 정보를 움직임 후보 리스트에 추가시킬 수 있다. 이때, 기존 움직임 후보 리스트에 존재하는 움직임 정보가 양방향 움직임 정보인 경우, 비디오 신호 처리 장치는 양방향 움직임 정보를 L0 움직임 정보와 L1 움직임 정보로 분리한 후, 각 단방향 움직임 정보를 양방향 움직임 정보 또는 양예측 움직임 정보로 변환하여 2개의 움직임 후보를 구성할 수 있으며, 변환된 2개의 움직임 후보를 움직임 후보 리스트에 추가시킬 수 있다. 움직임 후보 리스트는 코스트를 기반으로 재정렬될 수 있으며, 이때 코스트는 템플릿 코스트 또는 상기 참조 블록 간의 차이를 이용한 코스트로 계산될 수 있다.
본 명세서에서 설명한 움직임 정보가 지시하는 참조 블록 간의 차이를 이용하는 방식은 MVD 부호 후보 리스트, 모션 쉬프트 후보 리스트, 블록 단위 참조 픽쳐 후보 리스트 등 다양한 후보 리스트를 재정렬할 때 사용될 수 있다. MVD에 대한 부호를 예측하는 방식은 MVD에 대한 절대값을 기반으로 MVD 부호 후보 리스트가 구성되고, MVD 부호 후보 리스트는 코스트를 기반으로 재정렬될 수 있고, 최적의 부호 후보가 예측 값으로 사용하는 방식이다. MVD 부호 후보 리스트가 재정렬될 때, 비디오 신호 처리 장치는 MVD 부호 후보가 지시하는 참조 블록 간의 차이에 대한 코스트를 기반으로 MVD 부호 후보 리스트(또는 MVD 후보 리스트, MMVD 후보 리스트)를 재정렬할 수 있다. MVD 후보 리스트는 움직임 벡터 차분 값에 대한 후보 리스트이고, MMVD 후보 리스트는 머지 모드에서 움직임 벡터 차분 값에 대한 후보 리스트이다. 모션 쉬프트 후보 리스트는 대응되는 참조 픽쳐로부터 시간적인 움직임 정보를 유도할 때, 대응되는 참조 픽쳐에서 현재 블록과 가장 유사한 블록을 찾기 위해 사용될 수 있다. 비디오 신호 처리 장치는 현재 블록의 주변 블록으로부터 움직임 정보를 유도한 후, 해당 움직임 정보를 이용하여 모션 쉬프트 후보 리스트를 구성할 수 있다. 비디오 신호 처리 장치는 모션 쉬프트 후보 리스트를 재정렬할 때, 모션 쉬프트 후보가 지시하는 참조 블록 간의 차이에 대한 코스트를 기반으로 모션 쉬프트 후보 리스트를 재정렬할 수 있다. 모션 쉬프트 후보는 단방향 움직임 정보일 수 있으므로, 비디오 신호 처리 장치는 단방향 움직임 정보를 양방향 또는 양예측 움직임 정보로 변경한 후, 코스트를 계산할 수 있다. 블록 단위 참조 픽쳐 후보 리스트는 현재 블록의 움직임 정보에 대한 최적의 참조 픽쳐를 찾기 위해 사용되고, 블록 단위 참조 픽쳐 후보 리스트는 MVD 부호 후보 리스트에 참조 픽쳐 후보가 통합된 통합 리스트일 수 있다. 또는 블록 단위 참조 픽쳐 후보 리스트는 MVD 후보 리스트에 부호 후보 또는 참조 픽쳐 후보가 통합된 통합 리스트일 수 있다. 비디오 신호 처리 장치가 통합 리스트를 재정렬할 때, 비디오 신호 처리 장치는 움직임 후보가 지시하는 참조 블록 간의 차이에 대한 코스트를 기반으로 통합 리스트를 재정렬할 수 있다. 또는, 비디오 신호 처리 장치는 상술한 통합 리스트를 재정렬 하는 방식을 움직임 후보 리스트를 재정렬할 때 사용할 수 있다. 비디오 신호 처리 장치가 움직임 후보 리스트를 재정렬할 때, 비디오 신호 처리 장치는 움직임 후보가 지시하는 참조 블록 간의 차이에 대한 코스트를 기반으로 상기 움직임 후보 리스트를 재정렬할 수 있다.
도 65 및 도 66은 본 명세서의 일 실시예에 따른 참조 블록 간의 차이에 대한 코스트를 계산하는 과정에서 일부 샘플만을 사용하는 방법을 나타낸다.
참조 블록 간의 차이를 계산하는 방법은 샘플마다 계산이 요구되므로 복잡도가 높다. 또한, 참조 블록 간의 차이를 계산하는 방법은 참조 블록의 가로의 크기가 SIMD(Single Instruction Multiple Data) 처리 단위가 아닌 경우에만 샘플 단위로 처리해야 하므로 처리 속도가 낮아질 수 있다. 또한, 참조 블록 간의 차이를 계산하는 방법은 참조 블록의 세로의 크기가 긴 경우에는 다음 행(또는 라인)에 대한 처리를 위해 메모리 접근이 많이 요구되므로 처리 속도가 낮아질 수 있다. 따라서, 코스트를 계산할 때, 비디오 신호 처리 장치는 SIMD 처리 단위에 따라 코스트 계산 영역을 설정할 수 있다. SIMD 처리 단위는 샘플 개수 단위로 4, 8, 16, 32, 64일 수 있고, 16의 배수 등의 샘플일 수 있다.
도 65(a)와 (b)를 참고하면, 비디오 신호 처리 장치는 코스트 계산 영역을 참조 블록 내 빗금 친 영역으로 설정할 수 있으며, 코스트 계산 영역은 SIMD 처리 단위에 맞게 조정(alignment)될 수 있다. 코스트 계산 영역은 현재 블록의 가로의 길이보다 작을 수 있다. 코스트 계산 영역은 현재 블록의 가로의 길이와 같거나 클 수 있다. 또한, 코스트 계산 영역은 현재 블록 내 미리 지정된 행만을 사용할 수 있다. 예를 들어, 도 65(a)와 (b)와 같이 상단 부분과 하단 부분이 코스트 계산 영역일 수 있다. 인코더는 미리 지정된 행에 대한 정보를 비트스트림에 포함하여 시그널링할 수 있고, 디코더는 미리 지정된 행에 대한 정보를 파싱하여 미리 지정된 행을 설정할 수 있다. 코스트 계산 영역을 설정하는 방법은 66과 같이, Bilateral Matching에서 움직임 정보를 보정하는 과정에서 참조 블록 간의 코스트를 계산하는데 사용될 수 있다. 도 65(c)를 참조하면, 비디오 신호 처리 장치가 템플릿 코스트를 계산할 때, 비디오 신호 처리 장치는 상단 템플릿을 SIMD 처리 단위에 맞게 조정하여 템플릿 코스트 계산 영역을 설정할 수 있으며, 좌측 템플릿은 상단 부분과 하단 부분만을 사용하여 템플릿 코스트를 계산할 수 있다.
매트릭스 기반 인트라 예측 방식, 변환 커널, 뉴럴 네트워크를 이용하는 방식 등은 방대한 영상을 통해 학습된 데이터를 이용하는 방식으로, 학습된 데이터는 가중치 파라미터(또는 매트릭스)로 표현될 수 있다. 동일한 결과물(예측 블록 또는 필터링)을 획득하기 위해서, 비디오 신호 처리 장치는 가중치 파라미터를 동일하게 적용해야 한다. 카메라로 촬영된 영상, 스크린 컨텐츠, 게임 영상 등 영상의 특성이 다양할 수 있으므로, 영상 특성에 따라 가중치 파라미터는 달라질 수 있다. 인코더는 영상 특성에 맞는 가중치 파라미터에 대한 지시 정보를 SPS, PPS, APS, SEI, 픽쳐, 서브 픽쳐, 슬라이스, 타일, 블록 단위로 시그널링할 수 있으며, 디코더는 가중치 파라미터에 대한 지시 정보를 파싱하여 영상 특성에 맞게 가중치 파라미터를 메모리로부터 불러와서 사용할 수 있다. 매트릭스 기반 인트라 예측 방식, 변환 커널, 뉴럴 네트워크를 이용하는 방식이 적용될 때, 가중치 파라미터는 현재 블록 예측, 변환, 필터링할 때 사용될 수 있다. 가중치 파라미터는 학습되는 영상에 따라 효율이 달라질 수 있으며, 효율이 좋은 가중치 파라미터를 사용하기 위해서, 인코더는 가중치 파라미터 값에 대한 정보를 시그널링할 수 있으며, 디코더에서는 가중치 파라미터 값에 대한 정보를 파싱한 후, 현재 가중치 파라미터 값을 변경한 후, 변경된 가중치 파라미터 값을 이용하여 현재 블록 예측, 변환, 필터링할 때 사용할 수 있다. 가중치 파라미터 값에 대한 정보는 SPS, PPS, APS, SEI, 픽쳐, 서브 픽쳐, 슬라이스, 타일, 블록 단위로 시그널링되거나 또는 파싱될 수 있다. 가중치 파라미터가 SEI 메세지를 통해 시그널링되는 경우, 디코더는 복원 픽쳐를 출력하기 전에 가중치 파라미터를 이용한 필터링 과정을 수행시킬 수 있으며, 필터링된 복원 픽쳐를 출력시킬 수 있다. 이때, 비디오 신호 처리 장치는 필터링된 복원 픽쳐를 다음 픽쳐의 복호화를 위한 참조 픽쳐로 사용하지 않을 수 있다. 비디오 신호 처리 장치는 SEI 메시지를 통해 시그널링된 가중치 파라미터를 이용한 필터링이 수행되기 전의 복원 픽쳐를 다음 픽쳐의 복호화를 위한 참조 픽쳐로 사용할 수 있다.
DIMD 모드는 현재 블록의 주변 샘플에 소벨(Sobel) 필터를 적용한 후, 필터링된 값을 방향성 정보로 변환하고, 방향성 정보를 인트라 예측 모드로 변환한 후, 인트라 예측 모드에 대한 히스토그램으로부터 인트라 예측 모드를 유도하는 방법이다. 필터링된 값에 방향성이 존재하지 않는 경우에는 히스토그램에 해당 방향성이 누적되지 않을 수 있다. 따라서, DIMD 모드로 유도된 인트라 예측 모드는 평면 모드, DC 모드가 아닌 방향성이 존재하는 인트라 예측 모드일 수 있다. 주변 샘플이 완만한 경우에는 히스토그램의 도수 값이 작을 수 있고, 이러한 히스토그램은 인트라 예측 모드를 유도하는데 적합하지 않을 수 있다. 따라서, 비디오 신호 처리 장치는 현재 블록의 샘플 수, 현재 블록의 가로와 세로의 크기, DIMD 모드를 유도하는데 사용된 주변 샘플의 수, 히스토그램에서 도수 값의 합 중 적어도 어느 하나에 기초하여 DIMD 모드를 유도할 수 있다. 또는 비디오 신호 처리 장치는 DIMD 모드를 유도하기 위해 히스토그램에서 도수 값이 높은 순으로 미리 지정된 개수의 인트라 예측 모드와 미리 지정된 개수의 인트라 예측 모드의 도수 값 중에서 적어도 하나 이상을 사용할 수 있다. 비디오 신호 처리 장치는 히스토그램의 도수 값의 합을 특정 값과 비교하여 인트라 예측 모드를 유도할 수 있다. 예를 들어, 특정 값은 현재 블록의 샘플 수와 현재 블록의 가로의 크기와 세로의 크기를 곱한 값을 더하여 획득된 값을 미리 지정된 값으로 나눈 값일 수 있다. 히스토그램의 도수 값이 특정 값보다 작다면, 현재 블록의 인트라 예측 모드는 미리 지정된 인트라 예측 모드로 유도될 수 있다. 미리 지정된 값은 1이상의 정수일 수 있으며, 8일 수 있다. 비디오 신호 처리 장치는 DIMD 모드를 통해 유도된 히스토그램에서 도수 값이 존재하는 인트라 예측 모드의 개수가 미리 지정된 값보다 많은 경우, 주변 샘플의 방향성이 많을 수 있으므로, 현재 블록의 인트라 예측 모드를 미리 지정된 인트라 예측 모드로 설정할 수 있다. 미리 지정된 값은 1이상의 정수일 수 있으며, 34일 수 있다. 상기 미리 지정된 인트라 예측 모드는 평면 모드,DC 모드, 수평 모드, 수직 모드, 대각 모드, 이외의 인트라 예측 모드 중에서 하나일 수 있으며, 평면 모드일 수 있다.
오차 신호에 대한 변환 커널 세트가 유도되기 위해서는 현재 블록의 인트라 예측 모드가 필요하다. 현재 블록에 인트라 예측 모드가 없는 부호화 모드인 경우, 비디오 신호 처리 장치는 현재 예측 블록에 DIMD를 적용하여 미리 지정된 개수의 인트라 예측 모드를 유도한 후, 해당 인트라 예측 모드를 이용하여 변환 커널 세트를 유도할 수 있다. 현재 예측 블록이 평활한 경우, DIMD 방법은 인트라 예측 모드를 유도하데 적합하지 않을 수 있다. 비디오 신호 처리 장치는 현재 블록의 샘플 수, 현재 블록의 가로와 세로의 크기, DIMD 모드를 유도하는데 사용된 주변 샘플의 수, 히스토그램에서 도수 값의 합, 히스토그램에서 도수 값이 높은 순으로 미리 지정된 개수의 인트라 예측 모드와 미리 지정된 개수의 도수 값 중 적어도 하나 이상을 이용하여 미리 지정된 개수의 DIMD 모드를 유도할 수 있다. 미리 지정된 개수는 1이상의 정수 일 수 있으며, 2일 수 있다. 비디오 신호 처리 장치는 히스토그램의 도수 값의 합을 특정 값과 비교하여 인트라 예측 모드를 유도할 수 있다. 예를 들어, 특정 값은 현재 블록의 샘플 수와 현재 블록의 가로의 크기와 세로의 크기를 곱한 값을 더하여 획득된 값을 미리 지정된 값으로 나눈 값일 수 있다. 히스토그램의 도수 값이 특정 값보다 작다면 현재 블록의 제1 인트라 예측 모드는 플라나 모드로 유도될 수 있고, 제2 인트라 예측 모드는 DC 모드로 유도될 수 있다. 미리 지정된 값은 1이상의 정수일 수 있으며, 8일 수 있다. 비디오 신호 처리 장치는 히스토그램에서 도수 값이 높은 순으로 2개의 인트라 예측 모드를 유도한 후, 2개의 인트라 예측 모드 간의 차이의 절대 값이 미리 지정된 제1 값보다 작고 2개의 인트라 예측 모드의 도수 값의 차이의 절대 값이 특정 값보다 작은 경우, 현재 블록의 제1 인트라 예측 모드를 히스토그램에서 도수 값이 가장 높은 인트라 예측 모드로 유도하고, 제2 인트라 예측 모드는 미리 지정된 인트라 예측 모드로 유도할 수 있다. 특정 값은 현재 블록의 샘플 수에서 미리 지정된 제2 값을 나눈 값일 수 있다. 여기서 제1 값은 1이상의 정수일 수 있으며, 3일 수 있고, 제2 값은 1이상의 정수일 수 있으며, 4일 수 있고, 미리 지정된 값은 1이상의 정수일 수 있으며, 8일 수 있다. 비디오 신호 처리 장치는 DIMD 모드를 통해 유도된 히스토그램에서 도수 값이 존재하는 인트라 예측 모드의 개수가 미리 지정된 값보다 많은 경우, 주변 샘플의 방향성이 많을 수 있으므로, 현재 블록의 변환 커널 세트를 유도하기 위한 인트라 예측 모드를 미리 지정된 인트라 예측 모드로 설정할 수 있다. 미리 지정된 값은 1이상의 정수일 수 있으며, 34일 수 있다. 상기 미리 지정된 인트라 예측 모드는 평면 모드, DC 모드, 수평 모드, 수직 모드, 대각 모드, 이외의 인트라 예측 모드 중에서 하나일 수 있으며, 평면 모드일 수 있다.
도 67은 본 명세서의 일 실시예에 따른 비디오 신호 처리 방법을 나타내는 순서도이다.
도 67을 참조하여 도 1 내지 도 66을 통해 인트라 예측 모드에 기초하여 현재 블록을 예측(현재 블록에 대한 예측 블록을 생성)하는 방법에 대해 설명한다.
비디오 신호 디코딩 장치(디코더)는 제1 예측 모드에 기초하여 제1 블록을 예측할 수 있다(S6701).
비디오 신호 디코딩 장치는 제2 예측 모드에 기초하여 제2 블록을 예측할 수 있다(S6702).
상기 제1 블록과 상기 제2 블록은 병렬적으로 예측될 수 있다.
상기 제1 블록과 상기 제2 블록은 템플릿 예측 영역 내의 블록일 수 있다. 상기 제1 블록에 인접한 제1 주변 샘플들 중 적어도 하나의 샘플이 상기 템플릿 예측 영역 내에 존재하지 않는 경우, 상기 제1 예측 모드는 템플릿에 기초한 예측 모드일 수 있다. 상기 제1 주변 샘플들 전부가 상기 템플릿 예측 영역 내에 존재하는 경우, 상기 제1 예측 모드는 상기 템플릿에 기초한 예측 모드가 아닌 모드일 수 있다.
상기 제2 블록에 인접한 제2 주변 샘플들 중 적어도 하나의 샘플이 상기 템플릿 예측 영역 내에 존재하지 않는 경우, 상기 제2 예측 모드는 상기 템플릿에 기초한 예측 모드일 수 있다. 상기 제2 주변 샘플들 전부가 상기 템플릿 예측 영역 내에 존재하는 경우, 상기 제2 예측 모드는 상기 템플릿에 기초한 예측 모드가 아닌 모드일 수 있다.
상기 템플릿 예측 영역은, 비트스트림에 포함된 신택스 요소에 의해 결정될 수 있다.
상기 제1 예측 모드는 제1 후보 리스트 내의 예측 모드이고, 상기 제2 예측 모드는 제2 후보 리스트 내의 예측 모드이고, 상기 제1 후보 리스트 및 상기 제2 후보 리스트는 동일할 수 있다.
상기 제1 후보 리스트 및 상기 제2 후보 리스트는 인트라 TMP(Template Matching Prediction) 모드, DIMD(Decoder side intra mode derivation) 모드, TIMD(Template intra mode derivation) 모드, CCP(Cross-Component Prediction) 머지 모드, EIP(Extrapolation filter-based Intra Prediction) 머지 중 어느 하나와 관련된 리스트일 수 있다.
상기 제1 주변 샘플들 전부가 상기 템플릿 예측 영역 내에 존재하는 경우, 상기 제1 블록의 제1 양방향 움직임 정보에 기초하여 상기 제1 블록에 LIC(Local Illumination Compensation) 모드 또는 OBMC(Overlapped Block Motion Compensation) 모드가 적용되는지 여부가 결정될 수 있다.
상기 제2 주변 샘플들 전부가 상기 템플릿 예측 영역 내에 존재하는 경우, 상기 제2 블록의 제2 양방향 움직임 정보에 기초하여 상기 제2 블록에 상기 LIC 모드 또는 OBMC 모드가 적용되는지 여부가 결정될 수 있다.
상기 제1 블록의 움직임 정보가 제1 단방향 정보인 경우, 상기 제1 양방향 움직임 정보는 상기 제1 단방향 정보를 변환하여 획득되는 움직임 정보일 수 있다.
상기 제2 블록의 움직임 정보가 제2 단방향 정보인 경우, 상기 제2 양방향 움직임 정보는 상기 제2 단방향 정보를 변환하여 획득되는 움직임 정보일 수 있다.
상기 제1 예측 모드는 복수의 예측 모드들이 포함된 제1 예측 모드 그룹 내의 예측 모드이고, 상기 제2 예측 모드는 복수의 예측 모드들이 포함된 제2 예측 모드 그룹 내의 예측 모드일 수 있다.
상기 제1 예측 모드의 활성화 여부는 상기 제1 예측 모드 그룹 단위의 활성화 여부에 기초하여 결정되고, 상기 제2 예측 모드의 활성화 여부는 상기 제2 예측 모드 그룹 단위의 활성화 여부에 기초하여 결정될 수 있다. 본 명세서에서 현재 블록에 X 모드가 적용된 경우는 현재 블록이 X 모드로 부호화되는 경우 또는 현재 블록이 X 모드로 복호화되는 경우를 의미할 수 있다.
본 명세서에서 상술한 방법들은 디코더 또는 인코더의 프로세서를 통해 수행될 수 있다. 또한, 인코더는 상술한 방법들에 의해 디코딩되는 비트스트림을 생성할 수 있다. 또한, 인코더가 생성한 비트스트림은 컴퓨터 판독 가능한 비 일시적 저장 매체(기록 매체)에 저장될 수 있다.
본 명세서는 주로 디코더 관점에서 기술되었으나 인코더에서도 동일하게 동작될 수 있다. 본 명세서의 파싱이라는 용어는 비트스트림으로부터 정보를 획득하는 과정을 중점으로하여 설명되었으나 인코더 측면에서는 비트스트림에 해당 정보를 구성하는 것으로 해석될 수 있다. 따라서 파싱이라는 용어는 디코더 동작으로만 한정되지 않고 인코더에서는 비트스트림을 구성하는 행위로까지 해석될 수 있다. 또한, 이러한 비트스트림은 컴퓨터 판독 가능한 기록 매체에 저장되어 구성될 수 있다.
상술한 본 발명의 실시예들은 다양한 수단을 통해 구현될 수 있다. 예를 들어, 본 발명의 실시예들은 하드웨어, 펌웨어(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 예측 모드에 기초하여 제2 블록을 예측하고,상기 제1 블록과 상기 제2 블록은 병렬적으로 예측되는, 비디오 신호 디코딩 장치.
- 제 1항에 있어서,상기 제1 블록과 상기 제2 블록은 템플릿 예측 영역 내의 블록이고,상기 제1 블록에 인접한 제1 주변 샘플들 중 적어도 하나의 샘플이 상기 템플릿 예측 영역 내에 존재하지 않는 경우, 상기 제1 예측 모드는 템플릿에 기초한 예측 모드이고,상기 제1 주변 샘플들 전부가 상기 템플릿 예측 영역 내에 존재하는 경우, 상기 제1 예측 모드는 상기 템플릿에 기초한 예측 모드가 아닌 모드이고,상기 제2 블록에 인접한 제2 주변 샘플들 중 적어도 하나의 샘플이 상기 템플릿 예측 영역 내에 존재하지 않는 경우, 상기 제2 예측 모드는 상기 템플릿에 기초한 예측 모드이고,상기 제2 주변 샘플들 전부가 상기 템플릿 예측 영역 내에 존재하는 경우, 상기 제2 예측 모드는 상기 템플릿에 기초한 예측 모드가 아닌 모드인, 비디오 신호 디코딩 장치.
- 제 2항에 있어서,상기 템플릿 예측 영역은, 비트스트림에 포함된 신택스 요소에 의해 결정되는, 비디오 신호 디코딩 장치.
- 제 1항에 있어서,상기 제1 예측 모드는 제1 후보 리스트 내의 예측 모드이고,상기 제2 예측 모드는 제2 후보 리스트 내의 예측 모드이고,상기 제1 후보 리스트 및 상기 제2 후보 리스트는 동일한, 비디오 신호 디코딩 장치.
- 제 4항에 있어서,상기 제1 후보 리스트 및 상기 제2 후보 리스트는 인트라 TMP(Template Matching Prediction) 모드, DIMD(Decoder side intra mode derivation) 모드, TIMD(Template intra mode derivation) 모드, CCP(Cross-Component Prediction) 머지 모드, EIP(Extrapolation filter-based Intra Prediction) 머지 중 어느 하나와 관련된 리스트인, 비디오 신호 디코딩 장치.
- 제 2항에 있어서,상기 제1 주변 샘플들 전부가 상기 템플릿 예측 영역 내에 존재하는 경우, 상기 제1 블록의 제1 양방향 움직임 정보에 기초하여 상기 제1 블록에 LIC(Local Illumination Compensation) 모드 또는 OBMC(Overlapped Block Motion Compensation) 모드가 적용되는지 여부가 결정되고,상기 제2 주변 샘플들 전부가 상기 템플릿 예측 영역 내에 존재하는 경우, 상기 제2 블록의 제2 양방향 움직임 정보에 기초하여 상기 제2 블록에 상기 LIC 모드 또는 OBMC 모드가 적용되는지 여부가 결정되는, 비디오 신호 디코딩 장치.
- 제 6항에 있어서,상기 제1 블록의 움직임 정보가 제1 단방향 정보인 경우, 상기 제1 양방향 움직임 정보는 상기 제1 단방향 정보를 변환하여 획득되는 움직임 정보이고,상기 제2 블록의 움직임 정보가 제2 단방향 정보인 경우, 상기 제2 양방향 움직임 정보는 상기 제2 단방향 정보를 변환하여 획득되는 움직임 정보인, 비디오 신호 디코딩 장치.
- 제 1항에 있어서,상기 제1 예측 모드는 복수의 예측 모드들이 포함된 제1 예측 모드 그룹 내의 예측 모드이고,상기 제2 예측 모드는 복수의 예측 모드들이 포함된 제2 예측 모드 그룹 내의 예측 모드이고,상기 제1 예측 모드의 활성화 여부는 상기 제1 예측 모드 그룹 단위의 활성화 여부에 기초하여 결정되고,상기 제2 예측 모드의 활성화 여부는 상기 제2 예측 모드 그룹 단위의 활성화 여부에 기초하여 결정되는, 비디오 신호 디코딩 장치.
- 비디오 신호 인코딩 장치에 있어서,프로세서를 포함하며,상기 프로세서는,상기 프로세서는 디코딩 방법에 의해 디코딩 되는 비트스트림을 획득하고, 상기 디코딩 방법은,제1 예측 모드에 기초하여 제1 블록을 예측하는 단계;제2 예측 모드에 기초하여 제2 블록을 예측하는 단계를 포함하고,상기 제1 블록과 상기 제2 블록은 병렬적으로 예측되는, 비디오 신호 인코딩 장치.
- 제 9항에 있어서,상기 제1 블록과 상기 제2 블록은 템플릿 예측 영역 내의 블록이고,상기 제1 블록에 인접한 제1 주변 샘플들 중 적어도 하나의 샘플이 상기 템플릿 예측 영역 내에 존재하지 않는 경우, 상기 제1 예측 모드는 템플릿에 기초한 예측 모드이고,상기 제1 주변 샘플들 전부가 상기 템플릿 예측 영역 내에 존재하는 경우, 상기 제1 예측 모드는 상기 템플릿에 기초한 예측 모드가 아닌 모드이고,상기 제2 블록에 인접한 제2 주변 샘플들 중 적어도 하나의 샘플이 상기 템플릿 예측 영역 내에 존재하지 않는 경우, 상기 제2 예측 모드는 상기 템플릿에 기초한 예측 모드이고,상기 제2 주변 샘플들 전부가 상기 템플릿 예측 영역 내에 존재하는 경우, 상기 제2 예측 모드는 상기 템플릿에 기초한 예측 모드가 아닌 모드인, 비디오 신호 인코딩 장치.
- 제 10항에 있어서,상기 템플릿 예측 영역은, 비트스트림에 포함된 신택스 요소에 의해 결정되는, 비디오 신호 인코딩 장치.
- 제 9항에 있어서,상기 제1 예측 모드는 제1 후보 리스트 내의 예측 모드이고,상기 제2 예측 모드는 제2 후보 리스트 내의 예측 모드이고,상기 제1 후보 리스트 및 상기 제2 후보 리스트는 동일한, 비디오 신호 인코딩 장치.
- 제 12항에 있어서,상기 제1 후보 리스트 및 상기 제2 후보 리스트는 인트라 TMP(Template Matching Prediction) 모드, DIMD(Decoder side intra mode derivation) 모드, TIMD(Template intra mode derivation) 모드, CCP(Cross-Component Prediction) 머지 모드, EIP(Extrapolation filter-based Intra Prediction) 머지 중 어느 하나와 관련된 리스트인, 비디오 신호 인코딩 장치.
- 제 10항에 있어서,상기 제1 주변 샘플들 전부가 상기 템플릿 예측 영역 내에 존재하는 경우, 상기 제1 블록의 제1 양방향 움직임 정보에 기초하여 상기 제1 블록에 LIC(Local Illumination Compensation) 모드 또는 OBMC(Overlapped Block Motion Compensation) 모드가 적용되는지 여부가 결정되고,상기 제2 주변 샘플들 전부가 상기 템플릿 예측 영역 내에 존재하는 경우, 상기 제2 블록의 제2 양방향 움직임 정보에 기초하여 상기 제2 블록에 상기 LIC 모드 또는 OBMC 모드가 적용되는지 여부가 결정되는, 비디오 신호 인코딩 장치.
- 제 14항에 있어서,상기 제1 블록의 움직임 정보가 제1 단방향 정보인 경우, 상기 제1 양방향 움직임 정보는 상기 제1 단방향 정보를 변환하여 획득되는 움직임 정보이고,상기 제2 블록의 움직임 정보가 제2 단방향 정보인 경우, 상기 제2 양방향 움직임 정보는 상기 제2 단방향 정보를 변환하여 획득되는 움직임 정보인, 비디오 신호 인코딩 장치.
- 제 9항에 있어서,상기 제1 예측 모드는 복수의 예측 모드들이 포함된 제1 예측 모드 그룹 내의 예측 모드이고,상기 제2 예측 모드는 복수의 예측 모드들이 포함된 제2 예측 모드 그룹 내의 예측 모드이고,상기 제1 예측 모드의 활성화 여부는 상기 제1 예측 모드 그룹 단위의 활성화 여부에 기초하여 결정되고,상기 제2 예측 모드의 활성화 여부는 상기 제2 예측 모드 그룹 단위의 활성화 여부에 기초하여 결정되는, 비디오 신호 인코딩 장치.
- 비트스트림을 저장하는 컴퓨터 판독 가능한 비 일시적 저장 매체에 있어서, 상기 비트스트림은 디코딩 방법에 의해 디코딩되고, 상기 디코딩 방법은,제1 예측 모드에 기초하여 제1 블록을 예측하는 단계; 및제2 예측 모드에 기초하여 제2 블록을 예측하는 단계를 포함하고,상기 제1 블록과 상기 제2 블록은 병렬적으로 예측되는, 비 일시적 저장 매체.
- 제 17항에 있어서,상기 제1 블록과 상기 제2 블록은 템플릿 예측 영역 내의 블록이고,상기 제1 블록에 인접한 제1 주변 샘플들 중 적어도 하나의 샘플이 상기 템플릿 예측 영역 내에 존재하지 않는 경우, 상기 제1 예측 모드는 템플릿에 기초한 예측 모드이고,상기 제1 주변 샘플들 전부가 상기 템플릿 예측 영역 내에 존재하는 경우, 상기 제1 예측 모드는 상기 템플릿에 기초한 예측 모드가 아닌 모드이고,상기 제2 블록에 인접한 제2 주변 샘플들 중 적어도 하나의 샘플이 상기 템플릿 예측 영역 내에 존재하지 않는 경우, 상기 제2 예측 모드는 상기 템플릿에 기초한 예측 모드이고,상기 제2 주변 샘플들 전부가 상기 템플릿 예측 영역 내에 존재하는 경우, 상기 제2 예측 모드는 상기 템플릿에 기초한 예측 모드가 아닌 모드인, 비 일시적 저장 매체.
- 제 18항에 있어서,상기 템플릿 예측 영역은, 비트스트림에 포함된 신택스 요소에 의해 결정되는, 비 일시적 저장 재체.
- 제 17항에 있어서,상기 제1 예측 모드는 제1 후보 리스트 내의 예측 모드이고,상기 제2 예측 모드는 제2 후보 리스트 내의 예측 모드이고,상기 제1 후보 리스트 및 상기 제2 후보 리스트는 동일한, 비일시적 저장 매체.
Applications Claiming Priority (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR10-2024-0083533 | 2024-06-26 | ||
| KR20240083533 | 2024-06-26 | ||
| KR20250070638 | 2025-05-29 | ||
| KR10-2025-0070638 | 2025-05-29 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2026005507A1 true WO2026005507A1 (ko) | 2026-01-02 |
Family
ID=98222442
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/KR2025/008998 Pending WO2026005507A1 (ko) | 2024-06-26 | 2025-06-26 | 비디오 신호 처리 방법 및 이를 위한 장치 |
Country Status (1)
| Country | Link |
|---|---|
| WO (1) | WO2026005507A1 (ko) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20100027384A (ko) * | 2008-09-02 | 2010-03-11 | 삼성전자주식회사 | 예측 모드 결정 방법 및 장치 |
| JP4939273B2 (ja) * | 2007-03-29 | 2012-05-23 | キヤノン株式会社 | 画像符号化装置及び画像符号化方法 |
| KR20200093674A (ko) * | 2018-05-10 | 2020-08-05 | 삼성전자주식회사 | 부호화 방법 및 그 장치, 복호화 방법 및 그 장치 |
| KR20230040295A (ko) * | 2021-09-15 | 2023-03-22 | 주식회사 케이티 | 비디오 신호 부호화/복호화 방법, 그리고 비트스트림을 저장한 기록 매체 |
| KR20240047298A (ko) * | 2022-10-04 | 2024-04-12 | 현대자동차주식회사 | 복수의 블록들 기반 인트라 템플릿 매칭 예측을 이용하는 비디오 코딩방법 및 장치 |
-
2025
- 2025-06-26 WO PCT/KR2025/008998 patent/WO2026005507A1/ko active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4939273B2 (ja) * | 2007-03-29 | 2012-05-23 | キヤノン株式会社 | 画像符号化装置及び画像符号化方法 |
| KR20100027384A (ko) * | 2008-09-02 | 2010-03-11 | 삼성전자주식회사 | 예측 모드 결정 방법 및 장치 |
| KR20200093674A (ko) * | 2018-05-10 | 2020-08-05 | 삼성전자주식회사 | 부호화 방법 및 그 장치, 복호화 방법 및 그 장치 |
| KR20230040295A (ko) * | 2021-09-15 | 2023-03-22 | 주식회사 케이티 | 비디오 신호 부호화/복호화 방법, 그리고 비트스트림을 저장한 기록 매체 |
| KR20240047298A (ko) * | 2022-10-04 | 2024-04-12 | 현대자동차주식회사 | 복수의 블록들 기반 인트라 템플릿 매칭 예측을 이용하는 비디오 코딩방법 및 장치 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2019083334A1 (ko) | 비대칭 서브 블록 기반 영상 부호화/복호화 방법 및 장치 | |
| WO2019182385A1 (ko) | 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체 | |
| WO2019078629A1 (ko) | 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체 | |
| WO2018226015A1 (ko) | 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체 | |
| WO2018030773A1 (ko) | 영상 부호화/복호화 방법 및 장치 | |
| WO2018097590A1 (ko) | 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체 | |
| WO2019078686A1 (ko) | 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체 | |
| WO2020067700A1 (ko) | 영상 부호화/복호화 방법 및 장치 | |
| WO2023033486A1 (ko) | 비디오 신호 처리 방법 및 이를 위한 장치 | |
| WO2021112652A1 (ko) | 영역 차등적 영상 부호화/복호화를 위한 방법, 장치 및 기록 매체 | |
| WO2020130714A1 (ko) | 영상 신호 부호화/복호화 방법 및 이를 위한 장치 | |
| WO2021172914A1 (ko) | 레지듀얼 코딩에 대한 영상 디코딩 방법 및 그 장치 | |
| WO2024058637A1 (ko) | 비디오 신호 처리 방법 및 이를 위한 장치 | |
| WO2019066523A1 (ko) | 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체 | |
| WO2024091002A1 (ko) | 비디오 신호 처리 방법 및 이를 위한 장치 | |
| WO2024155170A1 (ko) | 비디오 신호 처리 방법 및 이를 위한 장치 | |
| WO2023140635A1 (ko) | 경계 밖 블록을 이용하는 비디오 신호 처리 방법 및 이를 위한 장치 | |
| WO2023080691A1 (ko) | 비디오 신호 처리 방법 및 이를 위한 장치 | |
| WO2024039209A1 (ko) | 비디오 신호 처리 방법 및 이를 위한 장치 | |
| WO2024155106A1 (ko) | 비디오 신호 처리 방법 및 이를 위한 장치 | |
| WO2026005507A1 (ko) | 비디오 신호 처리 방법 및 이를 위한 장치 | |
| WO2025216606A1 (ko) | 인트라 예측 모드를 유도하는 방법 및 이를 위한 장치 | |
| WO2026024154A1 (ko) | 비디오 신호 처리 방법 및 이를 위한 장치 | |
| WO2025258912A1 (ko) | 비디오 신호 처리 방법 및 이를 위한 장치 | |
| WO2026059323A1 (ko) | 비디오 신호 처리 방법 및 이를 위한 장치 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 25827077 Country of ref document: EP Kind code of ref document: A1 |