WO2024053987A1 - Video signal processing method using geometric division, and device therefor - Google Patents

Video signal processing method using geometric division, and device therefor Download PDF

Info

Publication number
WO2024053987A1
WO2024053987A1 PCT/KR2023/013228 KR2023013228W WO2024053987A1 WO 2024053987 A1 WO2024053987 A1 WO 2024053987A1 KR 2023013228 W KR2023013228 W KR 2023013228W WO 2024053987 A1 WO2024053987 A1 WO 2024053987A1
Authority
WO
WIPO (PCT)
Prior art keywords
mode
intra prediction
block
current block
candidate
Prior art date
Application number
PCT/KR2023/013228
Other languages
French (fr)
Korean (ko)
Inventor
김경용
김동철
손주형
곽진삼
Original Assignee
주식회사 윌러스표준기술연구소
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 윌러스표준기술연구소 filed Critical 주식회사 윌러스표준기술연구소
Publication of WO2024053987A1 publication Critical patent/WO2024053987A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/86Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

Definitions

  • the present invention relates to a method and device for processing video signals, and more particularly, to a method and device for processing video signals for encoding or decoding video signals.
  • Compression encoding refers to a series of signal processing technologies for transmitting digitized information through communication lines or storing it in a form suitable for storage media.
  • Targets of compression coding include audio, video, and text.
  • the technology for performing compression coding on video is called video image compression.
  • Compressive coding for video signals is accomplished by removing redundant information by considering spatial correlation, temporal correlation, and probabilistic correlation.
  • spatial correlation e.g., spatial correlation, temporal correlation, and probabilistic correlation.
  • the purpose of this specification is to increase the coding efficiency of video signals by providing a video signal processing method and apparatus for the same.
  • a video signal decoding device includes a processor
  • the processor divides the current block into a plurality of regions according to the baseline and performs prediction for each divided region. At this time, at least one of the plurality of regions is predicted through intra prediction.
  • the processor selects candidates for each combination of the type of segmentation and the intra prediction directional mode. can be created.
  • the processor may exclude from the candidate list a candidate whose difference between the angle corresponding to the direction corresponding to the division type and the angle indicated by the intra prediction direction mode is less than or equal to a predetermined value.
  • the processor may exclude from the candidate list a candidate whose difference between the index of the intra prediction directional mode and the index of the intra prediction directional mode corresponding to the direction corresponding to the division type is less than or equal to a predetermined value.
  • the processor determines the division of the first candidate.
  • the angle corresponding to the direction corresponding to the shape can be set to the angle indicated by the intra prediction directionality mode.
  • the processor determines that the difference between the index of the intra prediction direction mode of the neighboring block adjacent to the current block and the index of the intra prediction direction mode used for the first candidate in the candidate list is within a predetermined value, and the neighboring block adjacent to the current block If the difference between the index of the intra prediction direction mode and the index of the intra prediction direction mode used for the second candidate in the candidate list is equal to or greater than the predetermined value, the priority of the first candidate is higher than the second candidate. It can be specified as a high priority.
  • the processor may determine a weight used when calculating the cost of the candidate based on the difference between the index of the intra prediction direction mode of a neighboring block adjacent to the current block and the index of the intra prediction direction mode used for the candidate in the candidate list. there is.
  • the processor adds a cost of the candidate calculated by SAD or MR-SAD greater than 1.
  • the cost can be recalculated by multiplying the weight.
  • the bitstream including the video signal may include syntax indicating whether it is encoded in either GPM mode or ISP mode.
  • the processor can obtain the syntax from the bitstream and determine whether the current block is encoded in either GPM mode or ISP mode.
  • the processor may determine the strength of a deblocking filter used to restore the current block based on which one of the plurality of regions was encoded using an intra prediction mode.
  • An encoding device that encodes a video signal according to an embodiment of the present invention includes a processor.
  • the processor divides the current block into a plurality of regions according to the baseline and performs prediction for each divided region. At this time, at least one of the plurality of regions is predicted through intra prediction.
  • the processor selects candidates for each combination of the type of segmentation and the intra prediction directional mode. can be created.
  • the processor may exclude from the candidate list a candidate whose difference between the angle corresponding to the direction corresponding to the division type and the angle indicated by the intra prediction direction mode is less than or equal to a predetermined value.
  • the processor may exclude from the candidate list a candidate whose difference between the index of the intra prediction directional mode and the index of the intra prediction directional mode corresponding to the direction corresponding to the division type is less than or equal to a predetermined value.
  • the processor determines the division of the first candidate.
  • the angle corresponding to the direction corresponding to the shape can be set to the angle indicated by the intra prediction directionality mode.
  • the processor determines that the difference between the index of the intra prediction direction mode of the neighboring block adjacent to the current block and the index of the intra prediction direction mode used for the first candidate in the candidate list is within a predetermined value, and the neighboring block adjacent to the current block If the difference between the index of the intra prediction direction mode and the index of the intra prediction direction mode used for the second candidate in the candidate list is equal to or greater than the predetermined value, the priority of the first candidate is higher than the second candidate. It can be specified as a high priority.
  • the processor may determine a weight used when calculating the cost of the candidate based on the difference between the index of the intra prediction direction mode of a neighboring block adjacent to the current block and the index of the intra prediction direction mode used for the candidate in the candidate list. there is.
  • the processor adds a cost of the candidate calculated by SAD or MR-SAD greater than 1.
  • the cost can be recalculated by multiplying the weight.
  • the processor may include syntax indicating whether the bitstream including the video signal is encoded in either GPM mode or ISP mode.
  • the processor may determine the strength of a deblocking filter used to restore the current block based on which one of the plurality of regions was encoded using an intra prediction mode.
  • the bitstream is decoded using a decoding method.
  • the decoding method includes dividing the current block into a plurality of regions according to a reference line;
  • FIG. 1 is a schematic block diagram of a video signal encoding device according to an embodiment of the present invention.
  • Figure 2 is a schematic block diagram of a video signal decoding device according to an embodiment of the present invention.
  • Figure 3 shows an embodiment in which a coding tree unit is divided into coding units within a picture.
  • Figure 4 shows one embodiment of a method for signaling splitting of quad trees and multi-type trees.
  • FIGS 5 and 6 show the intra prediction method according to an embodiment of the present invention in more detail.
  • Figure 7 is a diagram showing the positions of neighboring blocks used to generate a motion candidate list in inter prediction.
  • Figure 8 shows a syntax for signaling by integrating the angle of the baseline and the distance from the baseline and the center position in GPM mode according to an embodiment of the present invention, and specific information signaled by the syntax.
  • Figure 9 shows a baseline according to the value of the merge GPM split index in an embodiment of the present invention and shows syntax indicating information about the GPM mode.
  • Figure 10 shows a method of deriving a GPM segmentation type and intra prediction mode based on a template according to an embodiment of the present invention.
  • Figure 11 shows a method of deriving GPM and intra prediction directional mode based on a template according to an embodiment of the present invention.
  • Figure 12 shows the angle of the dividing reference line used in GPM mode according to an embodiment of the present invention.
  • Figure 13 shows the syntax structure of a method for signaling by integrating GPM mode and ISP mode according to an embodiment of the present invention.
  • Figure 14 shows the division form of GPM mode in which the current block is divided into two or more areas according to an embodiment of the present invention.
  • Figure 15 shows the division form of the current block to which GPM mode is applied according to an embodiment of the present invention.
  • Figure 16 shows the types of transform kernels that can be used for video coding according to an embodiment of the present invention.
  • Figure 17 shows how MTS and LFNST are applied to the error signal of the current block to which GPM mode is applied according to an embodiment of the present invention.
  • Figure 18 is a table showing the relationship between the directional mode value of the intra prediction mode corresponding to the area of the current block divided in GPM mode according to an embodiment of the present invention and the index of the MTS set determined according to the size of the current block. .
  • Figure 19 is a table showing the relationship between the values of nTrSet and mts_idx according to an embodiment of the present invention.
  • Figure 20 is a table showing the relationship between an index indicating the conversion type and the kernel used for conversion according to an embodiment of the present invention.
  • Figure 21 shows a table showing the relationship between the horizontal and vertical sizes of the current block and a pre-designated standard for resetting the transformation type according to an embodiment of the present invention.
  • Figure 22 shows a method of performing intra prediction by determining a reference pixel line based on a template according to an embodiment of the present invention.
  • Figure 23 shows a method of performing prediction using a block vector of a block encoded in IBC mode according to an embodiment of the present invention.
  • Figure 24 shows RRIBC being performed according to an embodiment of the present invention.
  • FIG. 25 shows RRIBC being performed according to an embodiment of the present invention.
  • Figure 26 shows an example of a block vector of a block encoded in Intra TMP mode according to an embodiment of the present invention.
  • Figure 27 shows that the current block is divided into two regions in GPM mode and the divided regions are encoded in IBC mode according to an embodiment of the present invention.
  • Figure 28 shows that the current block is encoded in IBC-CIIP mode according to an embodiment of the present invention.
  • Figure 29 shows an example of a block boundary and samples around the boundary during a deblocking filtering process according to an embodiment of the present invention.
  • a and/or B may be interpreted as meaning ‘including at least one of A or B.’
  • Coding can be interpreted as encoding or decoding depending on the case.
  • a device that performs encoding (encoding) of a video signal to generate a video signal bitstream is referred to as an encoding device or encoder
  • a device that performs decoding (decoding) of a video signal bitstream to restore a video signal is referred to as a decoder.
  • a video signal processing device is used as a term that includes both an encoder and a decoder.
  • 'Unit' is used to refer to a basic unit of image processing or a specific location of a picture, and refers to an image area containing at least one of a luminance (luma) component and a chrominance (chroma) component.
  • 'block' refers to an image area containing specific components among the luminance component and chrominance component (i.e., Cb and Cr).
  • terms such as 'unit', 'block', 'partition', 'signal', and 'area' may be used interchangeably.
  • 'current block' refers to a block currently scheduled to be encoded
  • 'reference block' refers to a block for which encoding or decoding has already been completed and is used as a reference in the current block.
  • terms such as 'luma', 'luma', 'luminance', and 'Y' may be used interchangeably.
  • terms such as 'chroma', 'chroma', 'color difference', and 'Cb or Cr' may be used interchangeably, and since the color difference component is divided into two types, Cb and Cr, each color difference component will be used separately. You can.
  • a unit may be used as a concept that includes all coding units, prediction units, and transformation units.
  • a picture refers to a field or frame, and depending on the embodiment, the above terms may be used interchangeably.
  • the captured image is an interlaced image
  • one frame is divided into an odd (or odd, top) field and an even (or even, bottom) field, and each field is created as a picture unit. and can be encoded or decoded.
  • the captured image is a progressive image, one frame may be created as a picture and encoded or decoded.
  • terms such as 'error signal', 'residual signal', 'residual signal', 'residual signal', and 'difference signal' may be used interchangeably.
  • terms such as 'intra prediction mode', 'intra prediction directional mode', 'intra-screen prediction mode', and 'intra-screen prediction directional mode' may be used interchangeably.
  • terms such as 'motion' and 'movement' may be used interchangeably.
  • 'left', 'upper left', 'upper', 'upper right', 'right', 'lower right', 'bottom', and 'lower left' mean 'left', 'upper left', ' It can be used interchangeably with 'top', 'top right', 'bottom right', 'bottom right', 'bottom', and 'bottom left'. Additionally, element and member can be used interchangeably.
  • POC Picture Order Count
  • Figure 1 is a schematic block diagram of a video signal encoding device 100 according to an embodiment of the present invention.
  • 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, and a prediction unit 150. ) and an entropy coding unit 160.
  • the conversion unit 110 obtains a conversion coefficient value by converting the residual signal, which is the difference between the input video signal and the prediction signal generated by the prediction unit 150.
  • Discrete Cosine Transform DCT
  • DST Discrete Sine Transform
  • Wavelet Transform may be used.
  • Discrete cosine transform and discrete sine transform perform transformation by dividing the input picture signal into blocks. In transformation, coding efficiency may vary depending on the distribution and characteristics of values within the transformation area.
  • the transformation kernel used for transformation of the residual block may be a transformation kernel with separable characteristics of vertical transformation and horizontal transformation. In this case, transformation for the residual block can be performed separately into vertical transformation and horizontal transformation.
  • the encoder can perform vertical transformation by applying a transformation 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.
  • a transform kernel may be used as a term to refer to a set of parameters used for transforming a residual signal, such as a transform matrix, transform array, transform function, or transform.
  • 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 vertical transformation and horizontal transformation.
  • error signals may exist only in some areas of the coding block.
  • the conversion process may be performed only for some arbitrary areas.
  • an error signal may exist only in the first 2NxN block, and a conversion process is performed only on the first 2NxN block, but the conversion process is not performed on the second 2NxN block and may not be encoded or decoded.
  • N can be any positive integer.
  • the encoder may perform additional transformations before the transform coefficients are quantized.
  • the above-described transformation method may be referred to as a primary transform, and additional transformation may be referred to as a secondary transform.
  • Secondary transformation may be optional for each residual block.
  • the encoder may improve coding efficiency by performing secondary transformation on a region where it is difficult to concentrate energy in the low-frequency region only through primary transformation.
  • secondary transformation may be additionally performed on a block whose residual values appear large in directions other than the horizontal or vertical direction of the residual block.
  • secondary transformation may not be performed separately into vertical transformation and horizontal transformation. This secondary transform may be referred to as Low Frequency Non-Separable Transform (LFNST).
  • LTNST Low Frequency Non-Separable Transform
  • the quantization unit 115 quantizes the transform coefficient value output from the transform unit 110.
  • the picture is predicted using the already coded area through the prediction unit 150, and the residual value between the original picture and the predicted picture is added to the predicted picture to create a reconstructed picture.
  • a method of obtaining is used.
  • the encoder performs a process of restoring the current encoded 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 reconstructed picture and improve coding efficiency.
  • deblocking filters For example, deblocking filters, sample adaptive offset (SAO), and adaptive loop filters may be included.
  • the filtered picture is output or stored in a decoded picture buffer (DPB, 156) to be used as a reference picture.
  • DPB decoded picture buffer
  • a deblocking filter is a filter for removing distortion within blocks created at the boundaries between blocks in a restored picture.
  • the encoder can determine whether to apply a deblocking filter to the edge based on the distribution of pixels included in several columns or rows based on an arbitrary edge within the block.
  • the encoder can apply a long filter, strong filter, or weak filter depending on the deblocking filtering strength.
  • horizontal filtering 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 basis for a residual block to which a deblocking filter has been applied.
  • the encoder In order to correct the offset for a specific picture, the encoder divides the pixels included in the image into a certain number of areas, determines the area to perform offset correction, and uses a method (Band Offset) to apply the offset to the area. You can. Alternatively, the encoder can use a method of applying an offset (Edge Offset) by considering the edge information of each pixel.
  • Adaptive Loop Filter ALF is a method of dividing pixels included in an image into predetermined groups, then determining one filter to be applied to the group, and performing differential filtering for each group. Information related to whether to apply ALF may be signaled in units of coding units, and the shape and filter coefficients of the ALF filter to be applied may vary for each block. Additionally, an ALF filter of the same type (fixed type) may be applied regardless of the characteristics of the target block to be applied.
  • the prediction unit 150 includes an intra prediction unit 152 and an inter prediction unit 154.
  • the intra prediction unit 152 performs intra prediction within the current picture
  • the inter prediction unit 154 performs inter prediction using the reference picture stored in the decoded picture buffer 156. Perform.
  • the intra prediction unit 152 performs intra prediction from the reconstructed areas in the current picture and transmits intra encoding information to the entropy coding unit 160.
  • Intra encoding information may include at least one of an intra prediction mode, a Most Probable Mode (MPM) flag, an MPM index, and information about a reference sample.
  • the inter prediction unit 154 may be generated including a motion estimation unit 154a and a motion compensation unit 154b.
  • the motion estimation unit 154a refers to a specific region of the reconstructed reference picture, finds the part most similar to the current region, and obtains a motion vector value that is the distance between regions.
  • Motion information reference direction indication information (L0 prediction, L1 prediction, bi-directional prediction), reference picture index, motion vector information, etc.) about the reference area obtained from the motion estimation unit 154a is transmitted to the entropy coding unit 160. so that it can be included in the bitstream.
  • the motion compensation unit 154b uses the motion information transmitted from the motion estimation unit 154a, the motion compensation unit 154b performs inter-motion compensation to generate a prediction block for the current block.
  • the inter prediction unit 154 transmits inter encoding information including motion information about the reference region 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 from the reconstructed samples in the current picture and transmits IBC encoding information to the entropy coding unit 160.
  • the IBC prediction unit refers to a specific region in the current picture and obtains a block vector value indicating a reference region used for prediction of the current region.
  • the IBC prediction unit may perform IBC prediction using the obtained block vector value.
  • the IBC prediction unit transmits IBC encoding information to the entropy coding unit 160.
  • IBC encoding information may include at least one of reference area size information and block vector information (index information for block vector prediction of the current block within the motion candidate list, block vector difference information).
  • the transform unit 110 obtains a transform coefficient value by transforming the residual value between the original picture and the predicted picture.
  • transformation may be performed on a specific block basis within the picture, and the size of the specific block may vary within a preset range.
  • the quantization unit 115 quantizes the transform coefficient value generated by the transform unit 110 and transmits the quantized transform 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 scanning method for the quantized transform coefficient may be determined depending on the size of the transform block and the intra-screen prediction mode. As an example, diagonal, vertical, and horizontal scans may be applied. This scan information can be signaled in block units and can be derived according to already established rules.
  • the entropy coding unit 160 generates a video signal bitstream by entropy coding information representing quantized transform coefficients, intra encoding information, and inter encoding information.
  • the entropy coding unit 160 may use a variable length coding (VLC) method or 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.
  • Context-based Adaptive Variable Length Coding CAVLC
  • CAVLC Context-based Adaptive Variable Length Coding
  • Arithmetic coding converts consecutive data symbols into a single decimal number using the probability distribution of each data symbol. Arithmetic coding can obtain the optimal decimal bits needed to express each symbol.
  • As arithmetic coding context-based adaptive binary arithmetic code (CABAC) can be used.
  • CABAC context-based adaptive binary arithmetic code
  • CABAC is a method of binary arithmetic encoding using multiple context models created based on probabilities obtained through experiments.
  • the context model can also be called a context model.
  • the CABAC initialization process is divided into context initialization and arithmetic coding initialization.
  • Context initialization is a process of initializing the probability of occurrence of each symbol, and is determined depending on the type of symbol, quantization parameter (QP), and slice type (whether I, P, or B).
  • QP quantization parameter
  • slice type whether I, P, or B
  • the context model provides the probability of occurrence of LPS (Least Probable Symbol) or MPS (Most Probable Symbol) for the symbol currently being coded and information (valMPS) about which empty value among 0 and 1 corresponds to the MPS.
  • LPS Local Probable Symbol
  • MPS Moving Probable Symbol
  • valMPS information about which empty value among 0 and 1 corresponds to the MPS.
  • One of several context models is selected through a context index (ctxIdx), and the context index can be derived through information on the current block to be encoded or information on surrounding blocks.
  • Initialization for binary arithmetic coding is performed based on the probability model selected from the context model.
  • Binary arithmetic coding is divided into probability intervals using the probability of occurrence of 0 and 1, and then coding is carried out through the process where the probability interval corresponding to the bin to be processed becomes the entire probability interval for the next bin to be processed.
  • a renormalization process is performed to widen the probability interval and the corresponding location information is output. Additionally, after each bin is processed, a probability update process may be performed in which the probability of the next bin to be processed is newly set through information on the processed bin.
  • the generated bitstream is encapsulated in a NAL (Network Abstraction Layer) unit as a basic unit.
  • 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.
  • VCL Video Coding Layer
  • non-VCL NAL units There are various types of VCL or non-VCL NAL units.
  • the NAL unit is created with NAL header information and data, RBSP (Raw Byte Sequence Payload), and the NAL header information includes summary information about the RBSP.
  • the RBSP of the VCL NAL unit includes an encoded integer number of coding tree units.
  • the bitstream In order to decode a bitstream in a video decoder, the bitstream must first be separated into NAL units, and then each separated NAL unit must be decoded. Meanwhile, the information required for decoding the video signal bitstream will be transmitted in a picture parameter set (PPS), sequence parameter set (SPS), video parameter set (VPS), etc. You can.
  • PPS picture parameter set
  • SPS sequence parameter set
  • VPS video parameter set
  • FIG. 1 shows the encoding device 100 according to an embodiment of the present invention, and the separately displayed blocks show elements of the encoding device 100 logically distinguished. Accordingly, the elements of the above-described encoding device 100 may be mounted as one chip or as a plurality of chips depending on the design of the device. According to one embodiment, the operation of each element of the above-described encoding device 100 may be performed by a processor (not shown).
  • Figure 2 is a schematic block diagram of a video signal decoding device 200 according to an embodiment of the present invention.
  • the decoding device 200 of the present invention includes an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 225, a filtering unit 230, and a prediction unit 250.
  • the entropy decoding unit 210 entropy decodes the video signal bitstream and extracts transform coefficient information, intra encoding information, and inter encoding information for each region. For example, the entropy decoder 210 may obtain a binarization code for transform coefficient information of a specific area from a video signal bitstream. Additionally, 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 summing the residual value obtained from the inverse transform unit 225 with the predicted value obtained from the prediction unit 250.
  • the filtering unit 230 improves image quality by performing filtering on the picture. This may include a deblocking filter to reduce block distortion and/or an adaptive loop filter to remove distortion of the entire picture.
  • the filtered picture is output or stored in the decoded picture buffer (DPB, 256) to be used as a reference picture for the next picture.
  • the prediction unit 250 includes an intra prediction unit 252 and an inter prediction unit 254.
  • the prediction unit 250 generates a prediction picture using the coding type decoded through the entropy decoding unit 210, transform coefficients for each region, intra/inter coding information, etc.
  • the current picture including the current block or the decoded area of other pictures can be used. Only the current picture is used for reconstruction, that is, a picture (or tile/slice) that performs intra prediction or intra BC prediction is used as an intra picture or I picture (or tile/slice), intra prediction, both inter prediction and intra BC prediction.
  • a picture (or tile/slice) that can be performed is called an inter picture (or tile/slice).
  • a picture (or tile/slice) that uses up to one motion vector and reference picture index is called a predictive picture or P picture (or , tile/slice), and a picture (or tile/slice) using up to two motion vectors and a reference picture index is called a bi-predictive picture or B picture (or tile/slice).
  • a P picture (or tile/slice) uses at most one set of motion information to predict each block
  • a B picture (or tile/slice) uses at most two sets of motion information to predict each block.
  • the motion information set includes one or more motion vectors and one reference picture index.
  • the intra prediction unit 252 generates a prediction block using intra encoding information and reconstructed samples in the current picture.
  • intra encoding information may include at least one of an intra prediction mode, a Most Probable Mode (MPM) flag, and an MPM index.
  • MPM Most Probable Mode
  • the intra prediction unit 252 predicts sample values of the current block using reconstructed samples located to the left and/or above the current block as reference samples.
  • reconstructed samples, reference samples, and samples of the current block may represent pixels. Additionally, sample values may represent pixel values.
  • the reference samples may be samples included in neighboring blocks of the current block.
  • the reference samples may be samples adjacent to the left border and/or samples adjacent to the upper boundary of the current block.
  • the reference samples are samples of neighboring blocks of the current block, which are located on a line within a preset distance from the left border of the current block and/or are located on a line within a preset distance from the upper border of the current block. These may be samples that do.
  • the surrounding blocks of the current block are the left (L) block, upper (A) block, Below Left (BL) block, Above Right (AR) block, or Above Left block adjacent to the current block.
  • AL may include at least one 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.
  • 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 refers to prediction using one reference picture included in the L0 picture list
  • L1 prediction refers to prediction using one reference picture included in the L1 picture list. This may require one set of motion information (eg, motion vector and reference picture index).
  • a maximum of two reference regions can be used, and these two reference regions may exist in the same reference picture or in different pictures.
  • the pair prediction method up to two sets of motion information (e.g., a motion vector and a reference picture index) can be used, and the two motion vectors may correspond to the same reference picture index or may correspond to different reference picture indices. It may be possible to respond.
  • the reference pictures are pictures located temporally before or after the current picture, and may be pictures that have already been reconstructed.
  • the two reference regions used in the bi-prediction method may be regions selected from the L0 picture list and the L1 picture list, respectively.
  • the inter prediction unit 254 may 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 a reference picture index.
  • the sample value of the block specified by the motion vector or its interpolated value may be used as a predictor of the current block.
  • an 8-tap interpolation filter can be used for the luminance signal and a 4-tap interpolation filter can be used for the chrominance signal.
  • the interpolation filter for motion prediction in subpel units is not limited to this. In this way, the inter prediction unit 254 performs motion compensation to predict the texture of the current unit from the 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 can reconstruct the current region by referring to a specific region containing reconstructed samples in the current picture.
  • the IBC prediction unit may perform IBC prediction using the IBC encoding information obtained from the entropy decoding unit 210.
  • IBC encoding information may include block vector information.
  • the predicted value output from the intra prediction unit 252 or the inter prediction unit 254 and the residual value output from the inverse transform unit 225 are added to generate a restored video picture. That is, the video signal decoding apparatus 200 restores the current block using the prediction block generated by the prediction unit 250 and the residual obtained from the inverse transform unit 225.
  • FIG. 2 shows a decoding device 200 according to an embodiment of the present invention, and the separately displayed blocks show elements of the decoding device 200 logically distinguished. Accordingly, the elements of the above-described decoding device 200 may be mounted as one chip or as a plurality of chips depending on the design of the device. According to one embodiment, the operation of each element of the above-described decoding device 200 may be performed by a processor (not shown).
  • signaling can be described as encoding each syntax from an encoder's perspective
  • parsing can be described as interpreting each syntax from a decoder's perspective. That is, each syntax can be signaled by being included in the bitstream from the encoder, and the decoder can parse the syntax and use it in the restoration process.
  • sequence of bits for each syntax listed according to the prescribed hierarchical generation can be referred to as a bitstream.
  • One picture may be divided into sub-pictures, slices, tiles, etc. and encoded.
  • a subpicture may include one or more slices or tiles. If one picture is divided into multiple slices or tiles and encoded, it can be displayed on the screen only when all slices or tiles in the picture have been decoded. On the other hand, when one picture is encoded with several subpictures, only arbitrary subpictures can be decoded and displayed on the screen.
  • a slice may contain multiple tiles or subpictures. Alternatively, a tile may include multiple subpictures or slices. Subpictures, slices, and tiles can be encoded or decoded independently of each other, which is effective in improving parallel processing and processing speed. However, there is a disadvantage in that the bit amount increases because encoded information of other adjacent subpictures, other slices, and other tiles cannot be used.
  • Subpictures, slices, and tiles can be divided into multiple Coding Tree Units (CTUs) and encoded.
  • CTUs Coding Tree Units
  • FIG. 3 shows an embodiment in which a Coding Tree Unit (CTU) is divided into Coding Units (CUs) within a picture.
  • CTU Coding Tree Unit
  • CUs Coding Units
  • a coding tree unit can be created with a luma coding tree block (CTB), two chroma coding tree blocks, and its encoded syntax information.
  • CB luminance coding block
  • CB luminance coding block
  • coding block can be divided into several sub-coding blocks.
  • One coding unit can be created as one transform unit (TU), or one coding unit can be divided into several transform units.
  • One transform unit can be created with a luminance transform block (Transform Block, TB), two chrominance transform blocks, and its encoded syntax information.
  • a coding tree unit may be divided into a plurality of coding units.
  • a coding tree unit may be a leaf node without being split. In this case, the coding tree unit itself may be a coding unit.
  • a coding unit refers to a basic unit for processing a picture in the video signal processing process described above, that is, intra/inter prediction, transformation, quantization, and/or entropy coding.
  • the size and shape of a coding unit within one picture may not be constant.
  • the coding unit may have a square or rectangular shape.
  • a rectangular coding unit (or rectangular block) includes a vertical coding unit (or vertical block) and a horizontal coding unit (or horizontal block).
  • a vertical block is a block whose height is greater than its width
  • a horizontal block is a block whose width is greater than its height.
  • a non-square block may refer to a rectangular block, but the present invention is not limited thereto.
  • the coding tree unit is first divided into a quad tree (Quad Tree, QT) structure. That is, in a quad tree structure, one node with a size of 2NX2N can be divided into four nodes with a size of NXN.
  • a quad tree may also be referred to as a quaternary tree.
  • Quad-tree partitioning can be performed recursively, and not all nodes need to be partitioned to the same depth.
  • the leaf nodes of the aforementioned quad tree can be further divided into a multi-type tree (MTT) structure.
  • MTT multi-type tree
  • one node in a multi-type tree structure, one node may be divided into a binary or ternary tree structure with horizontal or vertical division. That is, there are four division structures in the multi-type tree structure: vertical binary division, horizontal binary division, vertical ternary division, and horizontal ternary division.
  • the width and height of the nodes in each tree structure may both have values that are powers of 2.
  • BT Binary Tree
  • a node of size 2NX2N may be divided into two NX2N nodes by vertical binary division and into two 2NXN nodes by horizontal binary division.
  • a node of size 2NX2N is divided into nodes of (N/2)X2N, NX2N and (N/2)X2N by vertical ternary division, and horizontal ternary division By division, it can be divided into nodes of 2NX(N/2), 2NXN, and 2NX(N/2).
  • This multi-type tree partitioning can be performed recursively.
  • Leaf nodes of a multi-type tree can be coding units. 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 division. As an example, if the width or height of the current coding unit is greater than the maximum transform length, the current coding unit may be split into a plurality of transform units without explicit signaling regarding splitting. Meanwhile, in the above-described quad tree and multi-type tree, at least one of the following parameters may be defined in advance or transmitted through an RBSP of a higher level set such as PPS, SPS, VPS, etc.
  • Figure 4 shows one embodiment of a method for signaling splitting of quad trees and multi-type trees.
  • Preset flags can be used to signal division of the above-described quad tree and multi-type tree.
  • a flag 'split_cu_flag' indicating whether to split a node
  • a flag 'split_qt_flag' indicating whether to split a quad tree node
  • a flag 'mtt_split_cu_vertical_flag' indicating the splitting direction of a multi-type tree node, or a multi-type tree node.
  • At least one of the flags 'mtt_split_cu_binary_flag' that indicates the split shape of the type tree node can be used.
  • 'split_cu_flag' a flag indicating whether to split the current node, may be signaled first. If the value of 'split_cu_flag' is 0, it indicates that the current node is not split, and the current node becomes a coding unit. If the current node is a coating tree unit, the coding tree unit includes one undivided coding unit. 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 divided into nodes of a quad tree or multi-type tree according to the value of 'split_qt_flag'.
  • the coding tree unit is the root node of the quad tree and can be first divided into a quad tree structure. In the quad tree structure, 'split_qt_flag' is signaled for each node 'QT node'.
  • quad tree division may 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 the quot tree) or a quot tree node, and quot tree splitting may not be allowed if the current node is a multi-type tree node.
  • Each quad tree leaf node 'QT leaf node' can be further divided into a multi-type tree structure. As described above, if 'split_qt_flag' is 0, the current node can be split into multi-type nodes. To indicate the split direction and split shape, 'mtt_split_cu_vertical_flag' and 'mtt_split_cu_binary_flag' may be signaled.
  • the luminance block and the chrominance block can be divided into the same form. That is, the chrominance block can be divided by referring to the division type of the luminance block. If the current chrominance block is smaller than a certain size, the chrominance block may not be divided even if the luminance block is divided.
  • the luminance block and the chrominance block may have different forms.
  • division information for the luminance block and division information for the chrominance block may be signaled, respectively.
  • not only the division information but also the encoding information of the luminance block and the chrominance block may be different.
  • at least one intra coding mode of a luminance block and a chrominance block, encoding information for motion information, etc. may be different.
  • a node to be divided into the smallest unit can be processed as one coding block.
  • the coding block may be divided into several sub-blocks (sub-coding blocks), and the prediction information of each sub-block may be the same or different.
  • the intra prediction mode of each subblock may be the same or different from each other.
  • the motion information of each sub-block may be the same or different.
  • each sub-block may be encoded or decoded independently from each other.
  • Each sub-block can be distinguished through a sub-block index (sbIdx).
  • a coding unit when a coding unit is divided into sub-blocks, it may be divided horizontally or vertically or diagonally.
  • ISP Intra Sub Partitions
  • GPM geometric partitioning mode
  • the position and direction of the diagonal line are derived using a pre-designated angle table, and the index information of the angle table is signaled.
  • Picture prediction (motion compensation) for coding is performed on coding units that are no longer divided (i.e., leaf nodes of coding tree units).
  • the basic unit that performs such prediction is hereinafter referred to as a prediction unit or prediction block.
  • the term unit used in this specification may be used as a replacement for the prediction unit, which is a basic unit for performing prediction.
  • the present invention is not limited to this, and can be understood more broadly as a concept including the coding unit.
  • Figures 5 and 6 show the intra prediction method according to an embodiment of the present invention 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.
  • Figure 5 shows an example of reference samples used for prediction of the current block in intra prediction mode.
  • the reference samples may be samples adjacent to the left boundary and/or samples adjacent to the upper boundary of the current block.
  • a maximum of 2W+2H+1 located to the left and/or above the current block Reference samples can be set using the surrounding samples.
  • pixels of multiple reference lines may be used for intra prediction of the current block.
  • Multiple reference lines can be created with n lines located within a preset range from the current block.
  • separate index information indicating lines to be set as reference pixels may be signaled, and may be called a reference line index.
  • the intra prediction unit may obtain reference samples by performing a reference sample padding process. Additionally, the intra prediction unit may perform a reference sample filtering process to reduce the error of intra prediction. That is, filtered reference samples can be obtained by performing filtering on surrounding samples and/or reference samples obtained through a reference sample padding process. The intra prediction unit predicts samples of the current block using the reference samples obtained in this way. The intra prediction unit predicts samples of the current block using unfiltered or filtered reference samples.
  • peripheral samples may include samples on at least one reference line. For example, neighboring samples may include adjacent samples on a line adjacent to the boundary of the current block.
  • Intra prediction mode information indicating the intra prediction direction may be signaled.
  • Intra prediction mode information indicates one of a plurality of intra prediction modes that generate an intra prediction mode set. If the current block is an intra prediction block, the decoder receives intra prediction mode information of the current block from the bitstream. The intra prediction unit of the decoder performs intra prediction on the current block based on the extracted intra prediction mode information.
  • the intra prediction mode set may include all intra prediction modes used for intra prediction (eg, a total of 67 intra prediction modes). More specifically, the intra prediction mode set may include a planar mode, a DC mode, and multiple (e.g., 65) angular modes (i.e., directional modes). Each intra prediction mode may be indicated through a preset index (i.e., intra prediction mode index). For example, as shown in FIG. 6, intra prediction mode index 0 indicates planar mode, and intra prediction mode index 1 indicates DC mode. Additionally, intra prediction mode indices 2 to 66 may respectively indicate different angle modes. The angle modes each indicate different angles within a preset angle range.
  • the angle mode may indicate an angle within an angle range between 45 degrees and -135 degrees clockwise (i.e., a first angle range).
  • the angle mode can 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 (HORizontal, HOR) mode
  • intra prediction mode index 34 indicates diagonal (DIA) mode.
  • the mode is indicated, and intra prediction mode index 50 indicates vertical (VER) mode, and 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 clockwise 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 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 between (45-offset2) degrees and (-135-offset2) degrees clockwise (i.e., a third angle range).
  • angle modes -10 to -1 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. Additionally, offset1 and offset2 can be positive numbers.
  • the plurality of angle modes generating the intra prediction mode set may include a basic angle mode and an extended angle mode.
  • the extended angle mode may be determined based on the basic angle mode.
  • the basic angle mode corresponds to the angle used in intra prediction of the existing HEVC (High Efficiency Video Coding) standard
  • the extended angle mode corresponds to the angle newly added in intra prediction of the next-generation video codec standard. It may be a mode that does this. More specifically, the default angle mode is the intra prediction mode ⁇ 2, 4, 6,... , 66 ⁇ , and the extended angle mode is the intra prediction mode ⁇ 3, 5, 7,... , 65 ⁇ may be an angle mode corresponding to one of the following. That is, the extended angle mode may be an angle mode between basic angle modes within the first angle range. Accordingly, the angle indicated by the extended angle mode can 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 default angle mode is the intra prediction mode ⁇ 2, 3, 4, ... , 66 ⁇ , and the extended angle mode is the intra prediction mode ⁇ -14, -13, -12,... , -1 ⁇ and ⁇ 67, 68, ... , 80 ⁇ may be an angle mode corresponding to one of the following.
  • the angle indicated by the extended angle mode may be determined as the angle opposite to the angle indicated by the corresponding basic angle mode. Accordingly, the angle indicated by the extended angle mode can be determined based on the angle indicated by the basic angle mode.
  • the number of expansion angle modes is not limited to this, and additional expansion angles may be defined depending on the size and/or shape of the current block.
  • the total number of intra prediction modes included in the intra prediction mode set may vary depending on the generation of the basic angle mode and extended angle mode described above.
  • the spacing between extended angle modes may be set based on the spacing between corresponding basic angle modes.
  • the extended angle modes ⁇ 3, 5, 7, ... , 65 ⁇ are the corresponding fundamental angular modes ⁇ 2, 4, 6, ... , 66 ⁇ can be determined based on the interval between them.
  • the extended angle modes ⁇ -14, -13,... , -1 ⁇ are the corresponding opposite fundamental angular modes ⁇ 53, 53,... , 66 ⁇ is determined based on the spacing between the extended angle modes ⁇ 67, 68,... , 80 ⁇ are the corresponding opposite fundamental angular modes ⁇ 2, 3, 4, ... , 15 ⁇ can be determined based on the interval between them.
  • the angular spacing between the extended angle modes may be set to be equal to the angular spacing between the corresponding basic angle modes.
  • the number of extended angle modes in the intra prediction mode set may be set to less than the number of basic angle modes.
  • the extended angle mode may be signaled based on the basic angle mode.
  • a wide angle mode i.e., extended angle mode
  • the basic angle mode that is replaced may be an angle mode corresponding to the opposite side of the wide angle mode. That is, the basic angle mode that is replaced is an angle mode that corresponds to an angle in the opposite direction of the angle indicated by the wide-angle mode or to an angle that differs from the angle in the opposite direction by a preset offset index.
  • the preset offset index is 1.
  • the intra-prediction mode index corresponding to the replaced basic angle mode may be remapped to the wide-angle mode to signal the corresponding wide-angle mode.
  • wide angle mode ⁇ -14, -13, ... , -1 ⁇ is the intra prediction mode index ⁇ 52, 53, ... , 66 ⁇ , respectively
  • the wide-angle mode ⁇ 67, 68, ... , 80 ⁇ is the intra prediction mode index ⁇ 2, 3, ... , 15 ⁇ can be signaled respectively.
  • the intra prediction mode index for the basic angle mode signals the extended angle mode, so that even if the angle modes used for intra prediction of each block are generated differently, the same set of intra prediction mode indexes are used for signaling of the intra prediction mode. can be used Accordingly, signaling overhead due to changes in intra prediction mode generation 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, otherwise, only the basic 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 basic 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.
  • the intra prediction mode index indicates a specific angle mode
  • a reference sample or an interpolated reference sample corresponding to the specific angle from the current sample of the current block is used for prediction of the current pixel. Accordingly, different sets of reference samples and/or interpolated reference samples may 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 transformer to the intra prediction value of the current block. .
  • Movement (motion) information used for inter prediction may include reference direction indication information (inter_pred_idc), reference picture indices (ref_idx_l0, ref_idx_l1), and motion (motion) vectors (mvL0, mvL1).
  • Reference picture list utilization information (predFlagL0, predFlagL1) may be set according to the reference direction indication information.
  • the coding unit may be divided into several sub-blocks, and the prediction information of each sub-block may be the same or different.
  • the intra prediction mode of each subblock may be the same or different from each other.
  • the motion information of each sub-block may be the same or different.
  • each sub-block may be encoded or decoded independently from each other.
  • 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 the motion vector of neighboring blocks. Therefore, the motion vector of the neighboring block can be used as a motion vector predictor (mvp), and the motion vector of the current block can be derived using the motion vector of the neighboring block. Additionally, in order to increase the accuracy of the motion vector, the motion vector difference (mvd) between the optimal motion vector of the current block found in the original image by the encoder and the predicted value of the motion information may be signaled.
  • mvp motion vector predictor
  • mvd motion vector difference between the optimal motion vector of the current block found in the original image by the encoder and the predicted value of the motion information
  • the motion vector may have various resolutions, and the resolution of the motion vector may vary on a block basis.
  • Motion vector resolution can be expressed in integer units, half-pixel units, 1/4 pixel units, 1/16 pixel units, integer pixel units of 4, etc. Since images such as screen content are in the form of simple graphics such as text, there is no need to apply an interpolation filter, so integer units and integer pixel units of 4 can be selectively applied on a block basis.
  • Blocks encoded in affine mode which can express rotation and scale, have significant changes in shape, so integer units, 1/4 pixel units, and 1/16 pixel units can be selectively applied on a block basis.
  • Information on whether to selectively apply motion vector resolution on a block basis is signaled with amvr_flag. If applied, which motion vector resolution to apply to the current block is signaled with amvr_precision_idx.
  • the weights between two prediction blocks may be the same or different, and information about the weights is signaled through bcw_idx.
  • the Merge method is a method that generates the motion information of the current block to be the same as the motion information of neighboring blocks adjacent to the current block.
  • the Merge method has the advantage of increasing the coding efficiency of motion information by spatially propagating motion information without change in a motion region with homogeneity.
  • the AMVP method is a method that predicts motion information in the L0 and L1 prediction directions respectively and signals the most optimal motion information in order to express accurate motion information.
  • the decoder derives motion information for the current block through the AMVP or Merge method and then uses the reference block located in the motion information derived from the reference picture as a prediction block for the current block.
  • a method of deriving motion information in Merge or AMVP may be to generate a motion candidate list using the predicted value of motion information derived from neighboring blocks of the current block, and then index information for the optimal motion candidate is signaled. .
  • 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.
  • one merge index (merge_idx) is signaled.
  • the motion candidate list derived from one coding unit may vary, and a motion candidate index or merge index may be signaled for each motion candidate list. At this time, a mode in which there is no information about the remaining blocks in blocks encoded in Merge mode can be called Merge Skip mode.
  • Bidirectional movement information for the current block can be derived by mixing AMVP and Merge modes.
  • motion information in the L0 direction can be derived using the AMVP method
  • motion information in the L1 direction can be derived using the Merge method.
  • Merge can be applied to L0 and AMVP to L1. This encoding mode can be called AMVP-merge mode.
  • SMVD Symmetric MVD
  • MVD Motion Vector Difference
  • OBMC Overlapped Block Motion Compensation
  • the MMVD method is a method of correcting motion information using one candidate selected from among several motion difference value candidates.
  • Information about the correction value of motion information obtained through the MMVD method may be included in the bitstream and transmitted to the decoder.
  • the amount of bits can be saved by including information about the correction value of motion information in the bitstream.
  • the TM (Template Matching) method is a method of correcting motion information by creating a template using surrounding pixels of the current block and finding a matching area with the highest similarity to the template.
  • Template matching (TM) is a method of performing motion prediction in a decoder without including motion information in the bitstream in order to reduce the size of the encoded bitstream. At this time, since the decoder does not have the original image, it can roughly derive motion information for the current block using already restored neighboring blocks.
  • the DMVR (Decoder-side Motion Vector Refinement) method is a method of correcting motion information through the correlation of already restored reference images in order to find more accurate motion information. It uses the bidirectional motion information of the current block to compare the two reference pictures. This is a method of using the point with the best matching between reference blocks in a reference picture within a certain area as a new bidirectional movement.
  • the encoder corrects the motion information by performing DMVR in one block unit, then divides the block into sub-blocks and performs DMVR in each sub-block unit to correct the motion information of the sub-block again. This can be done, and this can be called MP-DMVR (Multi-pass DMVR).
  • the LIC (Local Illumination Compensation) method is a method of compensating for luminance changes between blocks. It derives a linear model using surrounding pixels adjacent to the current block, and then compensates for the luminance information of the current block through the linear model.
  • BDOF Bi-Directional Optical Flow
  • the motion of the current block can be corrected using motion information derived from the BDOF of this VVC.
  • PROF Prediction refinement with optical flow
  • PROF is a technology to improve the accuracy of sub-block-level affine motion prediction to be similar to the accuracy of pixel-level motion prediction.
  • PROF similar to BDOF, is a technology that obtains the final prediction signal by calculating correction values in pixel units for affine motion compensated pixel values in sub-block units based on optical flow.
  • the final prediction block is created by weighting the prediction blocks generated by the intra-picture prediction method and the prediction blocks generated by the inter-picture prediction method. How to create it.
  • the IBC (Intra Block Copy) method is a method that finds the part most similar to the current block in an already reconstructed area in the current picture and uses the corresponding reference block as a prediction block for the current block. At this time, information related to the block vector, which is the distance between the current block and the reference block, may be included in the bitstream.
  • the decoder can calculate or set the block vector for the current block by parsing information related to the block vector contained in Paintstream.
  • the BCW (Bi-prediction with CU-level Weights) method does not generate a prediction block by averaging two prediction blocks that have been motion-compensated from different reference pictures, but applies weights adaptively on a block-by-block basis to compensate for motion. This is a method of performing a weighted average on two prediction blocks.
  • 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 when predicting between screens.
  • CCLM Cross-component linear model
  • MMLM Multi-model Linear mode
  • the restored coefficients t' k for input coefficients t k depend only on the associated quantization index q k . That is, the quantization index for any restored coefficient has a different value from the quantization indexes for other restored coefficients.
  • t' k may be a value including the quantization error at t k and may be different or the same depending on the quantization parameter.
  • t'k may be named a restored transform coefficient or a dequantized transform coefficient
  • the quantization index may be named a quantized transform coefficient.
  • the reconstructed coefficients have the characteristic of being arranged at equal intervals.
  • the distance between two adjacent restored values can be referred to as the quantization step size.
  • the restored values may include 0, and the entire set of available restored values may be uniquely defined depending on the quantization step size.
  • the quantization step size may vary depending on the quantization parameter.
  • the set of allowable restored transform coefficients decreases due to quantization, and the number of elements of this set may be finite. Because of this, there is a limit to minimizing the average error between the original image and the restored image.
  • Vector quantization can be used as a method to minimize this average error.
  • a simple form of vector quantization method used in video encoding is sign data hiding. This is a method in which the encoder does not encode the sign of one non-zero coefficient, and the decoder determines the sign for the corresponding coefficient depending on whether the sum of the absolute values of all coefficients is even or odd. To this end, at least one coefficient may be increased or decreased by '1' in the encoder, and at least one coefficient is selected to be optimal in terms of cost for rate-distortion, so that the value is It can be adjusted. As an example embodiment, a coefficient having a value close to the boundary of the quantization interval may be selected.
  • Trellis-Coded Quantization Another vector quantization method is Trellis-Coded Quantization, and in video coding, it is used as an optimal path search technique to obtain an optimized quantization value in dependent quantization.
  • quantization candidates for all coefficients within a block are placed in a trellis graph, and the optimal trellis path between optimized quantization candidates is determined considering the cost of rate-distortion. and explore.
  • dependent quantization applied to video encoding may be designed such that the set of allowable restored transform coefficients for a transform coefficient depends on the value of the transform coefficient that precedes the current transform coefficient in reconstruction order. At this time, by selectively using multiple quantizers according to the transformation coefficient, the average error between the original image and the restored image is minimized, thereby increasing coding efficiency.
  • the MIP (Matrix Intra Prediction) method is a matrix-based intra prediction method. Unlike prediction methods that have directionality from pixels of neighboring blocks adjacent to the current block, pixels on the left and top of neighboring blocks are used as a predefined matrix. This is a method of obtaining a prediction signal using the and offset values.
  • the intra prediction mode for the template derived through the surrounding pixels of the template is used to restore the current block. It can be used for.
  • the decoder can generate a prediction template for the template using surrounding pixels (references) adjacent to the template, and use the intra prediction mode, which generates a prediction template most similar to the already restored template, to restore the current block. This method can be called TIMD (Template intra mode derivation).
  • an encoder can determine a prediction mode for generating a prediction block and generate a bitstream containing information about the determined prediction mode.
  • the decoder can set the intra prediction mode by parsing the received bitstream.
  • 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 restoration of the current block using the characteristics of the surrounding blocks, and can restore the current block using the derived intra prediction mode.
  • the decoder infers directionality information by applying a Sobel filter horizontally and vertically to each surrounding pixel adjacent to the current block to derive the intra prediction mode, and then converts the directionality information into the intra prediction mode.
  • a mapping method can be used.
  • the method by which the decoder derives an intra prediction mode using neighboring blocks can be described as DIMD (Decoder side intra mode derivation).
  • a block predicted using the intra prediction directional mode may have discontinuous edges at the top and left boundaries of the block. For example, if the current block is predicted using the vertical direction mode, a discontinuous edge may appear at the left border of the block.
  • the encoder and decoder can apply filtering to samples at the boundaries within the prediction block. Filtering is performed on restored samples adjacent to the current prediction block, location information of restored samples adjacent to the current prediction block, samples at the boundary portion inside the current prediction block, location information of samples at the boundary portion inside the current prediction block, and location information of the samples at the boundary portion inside the current prediction block.
  • Whether to apply filtering and/or filtering weights may be determined using at least one of the intra prediction directional mode, the horizontal size, and the vertical size of the current prediction block.
  • the filtering weight refers to the weight for the sample in the boundary part inside the current prediction block and the weight for the restored sample adjacent to the current prediction block.
  • This filtering method can be called PDPC (Position dependent intra prediction combination).
  • Figure 7 is a diagram showing the positions of neighboring blocks used to generate a motion candidate list in inter prediction.
  • Surrounding blocks may be blocks in a spatial location or blocks in a temporal location. Surrounding blocks that are spatially adjacent to the current block are Left (A1) block, Left Below (A0) block, Above (B1) block, Above Right (B0) block, or Above Left. , B2) It can be at least one of the blocks.
  • the neighboring block temporally adjacent to the current block may be a block containing the upper left pixel position of the bottom right (BR) block of the current block in the corresponding picture (Collocated picture). If a neighboring block temporally adjacent to the current block is encoded in intra mode or a neighboring block temporally adjacent to the current block is located in an unusable position, the picture corresponding to the current picture (collocated picture) is displayed.
  • a block containing the horizontal and vertical center (Center, Ctr) pixel position of the block can be used as a temporal peripheral block.
  • Motion candidate information derived from the corresponding picture may be referred to as TMVP (Temporal Motion Vector Predictor). Only one TMVP can be derived from one block, and after dividing one block into several sub-blocks, each TMVP candidate can be derived for each sub-block.
  • the TMVP derivation method on a sub-block basis may be referred to as sbTMVP (sub-block Temporal Motion Vector Predictor).
  • slice type information e.g., whether it is an I slice, a P slice, or a B slice
  • slice type information 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, and the current block. It may be determined based on at least one of information about whether it is a luminance block or a chrominance block, whether it is a reference frame or a non-reference frame, reference order, and temporal hierarchy according to the hierarchy.
  • Information used to determine whether the methods described in this specification will be applied may be information previously agreed upon between the decoder and the encoder. Additionally, this information may be determined according to profile and level.
  • This information can be expressed as variable values, and the bitstream can include information about variable values. That is, the decoder can determine whether the above-described methods are applied by parsing information about variable values included in the bitstream. For example, it may be determined whether the above-described methods will be applied based on the horizontal or vertical length of the coding unit. If the horizontal or vertical length is 32 or more (e.g., 32, 64, 128, etc.), the above-described methods can be applied. Additionally, the above-described methods can be applied when the horizontal or vertical length is less than 32 (e.g., 2, 4, 8, 16). Additionally, the above-described methods can be applied when the horizontal or vertical length is 4 or 8.
  • Figure 8 shows a syntax for signaling by integrating the angle of the baseline and the distance from the baseline and the center position in GPM mode according to an embodiment of the present invention, and specific information signaled by the syntax.
  • the GPM mode is a prediction mode in which the current block is divided into a plurality of regions, for example, two regions, according to a baseline, and prediction is performed for each region. At this time, each divided area may be one of triangles, squares, or pentagons.
  • the encoder may include in the bitstream a syntax element (merge_gpm_partition_idx) that indicates which angle the baseline used in GPM mode corresponds to and how far the baseline is from the center of the current block. For convenience of explanation, this syntax element is referred to as the merge GPM partition index.
  • the decoder can obtain a merge GPM partition index from the bitstream and determine the type of area into which the current block is divided in GMP mode according to the merge GPM partition index.
  • the decoder can determine the angle of the baseline dividing the current block into two regions and the distance from the baseline to the center of the current block based on the merge GPM division index.
  • the merge GPM split index may indicate the angle of the baseline and the distance from the baseline to the center of the current block according to a pre-specified table.
  • the merge GPM split index may have a value of 0 to 63.
  • the pre-designated table may be as shown in FIG. 8.
  • Figure 9 shows a baseline according to the value of the merge GPM split index in an embodiment of the present invention and shows syntax indicating information about the GPM mode.
  • Figures 9 (a) and (b) show a baseline according to the value of the merge GPM division index described in Figure 8 and show syntax indicating information about the GPM mode.
  • the bitstream contains not only the merge GPM division index but also motion information corresponding to the region encoded in inter-prediction mode, for example, indicating one motion vector in the motion candidate list. May contain information.
  • merge_gpm_idx0 is an index indicating a motion vector of the first area in the motion candidate list
  • merge_gpm_idx1 is an index indicating a motion vector of the second area in the motion candidate list.
  • Each region divided in GPM mode may be encoded in intra prediction mode or inter prediction mode.
  • the encoder may include information related to the prediction directionality mode of the region encoded in intra prediction mode in the bitstream.
  • Information related to the prediction directionality mode includes information about whether the region is encoded in DIMD mode, information about whether the region is coded in TIMD mode, information about whether the region is coded in MIP mode, and which reference pixel line the region is associated with.
  • Information on whether the area was encoded using ISP mode information on whether the area was encoded using ISP mode, information on what type of partition ISP mode was used in the area, information on the MPM list used for encoding of the area. It may include at least one of information and information about which intra prediction directional mode the corresponding area used.
  • the decoder may obtain information related to the prediction directionality mode of the region encoded in intra prediction mode from the bitstream and generate a prediction block based on the information related to the prediction directionality mode.
  • the encoder may include motion information of a region encoded in inter prediction mode, for example, information related to a motion vector, in the bitstream.
  • Information related to motion information includes information about whether the region was coded using TM, information about whether the region was coded using AMVP or Merge mode, information about whether the region was coded using IBC mode, information about whether the region was coded using IBC mode, Information about whether the region was coded using Intra TMP mode, information about whether the region was coded using affine mode, information about whether the region was coded using SMVD mode, encoding of the region Reference direction indication information used, information about which reference picture the corresponding area was encoded using, information related to the difference value of the motion information used in encoding the corresponding area, information related to the AMVR used in encoding the corresponding area , at least one of MMVD-related information used in encoding of the corresponding area, index information indicating which motion candidate was used among the motion candidate list used in encoding of the corresponding area, and information related to BCW
  • GPM mode individual areas can be divided into 2 or 4 areas and encoded by applying ISP mode.
  • the bitstream may include information indicating in which direction the area using the ISP mode was divided and encoded.
  • the decoder can determine which direction it is divided in ISP mode based on the information.
  • ISP mode can be used to encode the corresponding area.
  • the encoder may not include information related to the ISP mode in the bitstream.
  • the decoder may not parse information related to ISP mode in GPM mode that is not segmented into squares. Additionally, for an area in GPM mode that is not divided into squares, the encoder can infer that the area has not been encoded using ISP mode.
  • Figure 10 shows a method of deriving a GPM segmentation type and intra prediction mode based on a template according to an embodiment of the present invention.
  • FIG. 10(a) shows a method of signaling encoding information for each region.
  • the encoder may include information related to the division type (partition_mode) and information related to the intra prediction directionality mode of each region (intra_pred_mode0, intra_pred_mode1) in the bitstream.
  • the decoder can parse information related to the split type and information related to the intra prediction directionality mode from the bitstream and then use the information to generate a prediction block for the current block.
  • FIG. 10(b) shows a method of deriving information related to the intra prediction directional mode and information related to the segmentation type for each region based on a template, and details are explained in FIG. 11.
  • Figure 11 shows a method of deriving GPM and intra prediction directional mode based on a template according to an embodiment of the present invention.
  • a template-based prediction method can be used in the encoder and decoder, as shown in (b) of FIG. 10.
  • the template-based prediction method performs prediction using information related to the segmentation type and intra prediction direction mode for each region of the current block using already restored surrounding pixels of the current block.
  • the encoder and decoder construct a reference template using already restored surrounding pixels of the current block.
  • the standard template may consist of the left template of the current block and the top template of the current block.
  • the size of the left template may be M x the height of the current block, and the size of the top template may be M x the width of the current block.
  • M may be an integer of 1 or more, for example, 4.
  • each candidate in the GPM partition prediction candidate list contains information about the partition type of the current block (e.g., merge_gpm_partition_idx in FIG. 8) and information related to the intra prediction directional mode for the two regions (e.g., in FIG. 10) It may include intra_pred_mode0 and intra_pred_mode1) in (a). Therefore, when the encoder and decoder generate a GPM segmentation prediction candidate list for prediction of a region predicted through intra prediction, they can generate candidates for each combination of the type of segmentation and the intra prediction directionality mode.
  • the encoder and decoder construct a prediction template by predicting the reference template using information on all candidates in the GPM segmentation prediction candidate list and using surrounding pixels of the reference template.
  • the similarity between the reference template and the predicted template is calculated and the cost value is output.
  • the cost value can be calculated using SAD (Sum of Absolute Differences) or MR-SAD (Mean-Removed SAD).
  • the decoder and encoder may calculate cost values for all candidates in the GPM split prediction candidate list and then rearrange the GPM split prediction candidate list in ascending order based on the cost value.
  • the encoder may include the index of the candidate most suitable for the current block among the reordered GPM segmentation prediction candidate list in the bitstream. Alternatively, the candidate with the lowest cost value in the reordered GPM segmentation prediction candidate list may be used for encoding. Through this, information indicating any one candidate from the GPM split prediction candidate list may not be indicated.
  • the decoder parses the optimal candidate index information for the current block from the bitstream, and predicts the candidate's prediction information indicated by the optimal candidate index from the reordered GPM segmentation prediction candidate list generated in the same way as the encoder, such as the division form of the current block.
  • the current block can be predicted using information related to merge_gpm_partition_idx of FIG. 8 and information related to the intra prediction directionality mode for the two regions, for example, intra_pred_mode0 and intra_pred_mode1 of (a) of FIG. 10.
  • the decoder may construct a reordered GPM split prediction candidate list and then use the candidate with the lowest cost value as the optimal candidate to predict the current block.
  • the number of candidates that can be included in the GPM split prediction candidate list is a combination of 64 GPM split types and 67 intra prediction directionality modes for each region, so the total number of candidates is 64x67x66 (assuming that the intra prediction direction modes are different between regions), or about 280,000. Candidates may exist. To reduce complexity, costs may be calculated for only some candidates.
  • the encoder and decoder determine the size of the current block, the horizontal or vertical size of the current block, the number of pixels in the current block, whether the current block is a luminance signal or a chrominance signal, the intra prediction directionality mode of neighboring blocks adjacent to the current block, Some candidates may be selected based on at least one of the MPM list for the current block, the intra prediction direction mode derived from DIMD or TIMD, and the GPM division method of neighboring blocks adjacent to the current block. In a specific embodiment, the encoder and decoder do not construct the GPM segmentation prediction candidate list using all intra-prediction directionality modes, but only use the intra-prediction directionality mode in the MPM list for the current block to construct the GPM segmentation prediction candidate list. .
  • the encoder and decoder may construct a GPM segmentation prediction candidate list using at least one of the intra prediction directional modes derived from DIMD or TIMD.
  • the encoder and decoder derive an intra prediction mode from a neighboring block, if the coding mode of the neighboring block is encoded in TIMD mode or TMRL mode, the range of intra prediction modes of the neighboring block is expanded from the existing 67 to 131. mode is used. At this time, the encoder and decoder can reduce the precision of the intra prediction mode to the existing 67 modes and then construct a GPM split prediction candidate list using the changed intra prediction mode.
  • the encoder and decoder may construct a GPM segmentation prediction candidate list by using the extended range of intra prediction modes without change. Details about TMRL will be described later.
  • the encoder and decoder may not construct the GPM segmentation prediction candidate list using all segmentation types, but may construct the GPM segmentation prediction candidate list using only some segmentation types. Specifically, the encoder and decoder may not include a GPM segmentation in which the number of pixels in any segmented area is within a predetermined number in the GPM segmentation prediction candidate list. At this time, the predetermined number may be an integer of 1 or more. Specifically, it may be 10. In another specific embodiment, the encoder and decoder provide an absolute value of the x-axis difference value (ex-sx) and a y-axis difference value between the starting position (sx, sy) and the ending position (ex, ey) of the baseline used for segmentation.
  • the pre-designated value may be an integer of 1 or more. Specifically, the pre-designated value may be 3.
  • the encoder can categorize the characteristics of the GPM split prediction candidate list for the current block into several characteristics and then include information related to the classification in the bitstream. After parsing classification-related information from the bitstream, the decoder may construct a GPM split prediction candidate list for the current block based on the classification-related information.
  • the criteria for classifying the characteristics of the GPM segmented prediction candidate list may include at least one of the complexity between pixels of two regions divided by GPM or the intra prediction directionality mode. At this time, complexity can be calculated based on the absolute sum between pixels in the area.
  • the encoder and decoder may determine that the complexity of the corresponding area is large. Additionally, if the absolute sum is equal to or smaller than a pre-specified value, the encoder and decoder may determine that the complexity of the corresponding area is large.
  • the pre-specified value may be determined based on the number of pixels in the current block. Additionally, the pre-designated value may be an integer of 1 or more.
  • complexity may be calculated based on whether the predicted directional mode is an angular mode, an undirectional mode, or a MIP mode. At this time, the non-directional mode may include at least one of DC mode and planar mode.
  • the allowable intra prediction directionality mode may vary for each group classified. Additionally, the division type allowed in GPM mode may vary for each classified group. Specifically, regions included in low complexity groups may not be allowed to be encoded using the intra prediction directional mode. At this time, the intra prediction directional mode may include at least one of DIMD mode, TIMD mode, and angle mode. Additionally, the decoder may exclude the intra prediction directional mode from the GPM segmentation prediction candidate list for the region included in the low complexity group. Additionally, areas included in low complexity groups may not be allowed to be encoded using intra MIP mode. Additionally, the decoder may exclude the MIP mode from the GPM segmentation prediction candidate list for the region included in the low complexity group.
  • two areas of the current block to which GPM mode is applied may be determined to have low complexity, and a syntax indicating this determination may be included in the bitstream.
  • the decoder can parse the syntax from the non-stream indicating that the two regions of the current block are judged to have low complexity, and configure the GPM split prediction candidate list for the two regions of the block only in a pre-specified mode.
  • the pre-designated mode may be an intra prediction mode in which there is not much change in each direction within the region.
  • the predefined mode may include one or more of DC mode, planar mode, vertical mode, horizontal mode, diagonal mode, and anti-diagonal mode.
  • the encoder and decoder when constructing a GPM segmentation prediction candidate list, if an intra prediction directional mode is used in which one of the two regions has gentle characteristics and the other region has complex characteristics, the encoder and decoder have smooth characteristics. Complexity can be reduced by restricting the intra prediction directional mode of the region to be used only in Planar mode (or DC).
  • the difference between the index of the intra prediction directional mode corresponding to the first area of the first candidate and the index of the intra prediction directional mode corresponding to the first area of the second candidate is within a pre-specified value, and If the difference between the index of the intra prediction directional mode corresponding to the second area of candidate 1 and the index of the intra prediction directional mode corresponding to the second area of the second candidate is within a pre-specified value, the encoder and decoder Any one of the 2 candidates can be excluded from the GPM split prediction candidate list.
  • the pre-specified value may be an integer greater than or equal to 1. Specifically, the pre-designated value may be 3.
  • the index of the intra prediction directionality mode for the first area of the first candidate in the GPM division candidate list may be 35, and the index of the intra prediction directionality mode for the second area may be 5.
  • the index of the intra prediction directionality mode for the first area of the second candidate in the GPM division candidate list may be 34, and the intra prediction directionality mode for the second area may be 6.
  • the difference between the index of the intra prediction directional mode corresponding to the first region of the first candidate and the intra prediction directional mode corresponding to the first region of the second candidate is within 3, and the intra prediction corresponding to the second region of the first candidate
  • the difference between the index of the directional mode and the intra prediction directional mode corresponding to the second region of the second candidate is within 3. Therefore, the encoder and decoder can exclude either the first candidate or the second candidate.
  • the difference between the index of the intra prediction directional mode corresponding to the first region of the first candidate and the index of the intra prediction directional mode corresponding to the first region of the second candidate is a predetermined value. or, if the difference between the index of the intra prediction directional mode corresponding to the second area of the first candidate and the index of the intra prediction directional mode corresponding to the second area of the second candidate is within a predetermined value, the encoder and decoder Any one of the first candidate and the second candidate can be excluded from the GPM split prediction candidate list. Additionally, in the previously described embodiment, the encoder and decoder may exclude candidates inserted late into the GPM candidate list among the first and second candidates. In another specific embodiment, the encoder and decoder may exclude the candidate that requires more cost for restoration among the first candidate and the second candidate.
  • the encoder and decoder may exclude a candidate from the GPM segmentation prediction candidate list based on the similarity between the intra prediction directional mode of the candidate and the segmentation form of the GPM mode.
  • the encoder and decoder may exclude the corresponding candidate from the GPM segmentation prediction candidate list if the similarity between the intra prediction directional mode of the candidate and the segmentation form of the GPM mode is less than a predetermined value. Similarity can be calculated based on the difference between the angle of the intra prediction directional mode and the direction of the division reference line of the GPM mode converted into an angle.
  • Figure 12 shows the angle of the dividing reference line used in GPM mode according to an embodiment of the present invention.
  • the encoder and decoder can adjust the angle of the segmentation reference line used in GPM mode based on the angle of the intra prediction directional mode used in intra prediction. This is because the angle precision of the division reference line used in GPM mode is lower than the angle precision of the intra prediction directional mode used in intra prediction. Specifically, if the angle of the segmentation baseline used in GPM mode and the angle of the intra prediction directional mode used in intra prediction are different, the encoder and decoder change the angle of the segmentation baseline used in GPM mode to the angle of the intra prediction directional mode used in intra prediction. It can be modified to an angle of . Additionally, the encoder and decoder can reconstruct the GPM segmentation prediction candidate list based on the angle of the segmentation reference line used in the modified GPM mode.
  • the angle of the division reference line of one candidate in the GPM division prediction candidate list is 3, and the angle of the intra prediction directional mode used for intra prediction of the candidate is 37.
  • the encoder and decoder change the angle of the segmentation reference line of the candidate to 3'.
  • the coding efficiency of the template-based block prediction method may vary depending on the similarity between the template and the current block. Embodiments that increase the efficiency of the template-based prediction method by increasing the similarity between the template and the current block will be described.
  • the encoder and decoder use the GPM segmentation prediction candidate list generated through the above-described embodiments to determine the size of the current block, the horizontal or vertical size of the current block, the number of pixels of the current block, and the luminance signal of the current block.
  • the GPM split prediction candidate list can be rearranged based on whether the intra prediction directional mode of the prediction candidate is planar mode or DC mode and at least one of the cost values of each candidate in the GPM split prediction candidate list.
  • the encoder and decoder determine the priority of the candidate whose difference between the index of the intra prediction directionality mode of the neighboring block adjacent to the current block and the index of the intra prediction directionality mode used for the candidate in the GPM split prediction candidate list is within a pre-specified value adjacent to the current block.
  • the absolute value of the difference between the index of the intra prediction direction mode of a neighboring block and the index of the intra prediction direction mode used for the candidate in the GPM split prediction candidate list can be given higher priority than the candidate whose absolute value is equal to or greater than a pre-specified value.
  • the pre-designated value may be an integer of 1 or more.
  • the pre-specified value may be 3.
  • the encoder and the decoder prioritize candidates whose intra prediction directionality mode is Planar mode or DC mode among the candidates in the GPM split prediction candidate list, and whose intra prediction directionality mode is Planar mode or DC mode.
  • the list of GPM split prediction candidates can be rearranged to have a higher priority than the non-GPM candidates.
  • the encoder and the decoder determine the number of candidates in the GPM split prediction candidate list based on the difference between the index of the intra prediction direction mode of the adjacent neighboring block and the index of the intra prediction direction mode used for the candidate in the GPM split prediction candidate list. You can determine the weight used when calculating cost. Specifically, if the absolute value of the difference between the index of the intra-prediction directionality mode of an adjacent neighboring block and the index of the intra-prediction directionality mode used for the candidate in the GPM split prediction candidate list is greater than a pre-specified value, the encoder and decoder use SAD or MR- The cost can be recalculated by multiplying the candidate's cost calculated with SAD by a weight greater than 1.
  • the pre-specified value may be 0. In another specific embodiment, the pre-specified value may be an integer greater than 1. For example, the pre-designated value may be 3.
  • the encoder and decoder when the intra prediction directional mode for a candidate in the GPM segmentation prediction candidate list is Planar mode or DC mode, the encoder and decoder add a cost of the candidate calculated by SAD or MR-SAD greater than 1. The cost can be recalculated by multiplying the weight.
  • the weight value may increase as the difference between the intra prediction directionality mode of each candidate and the intra prediction directionality mode of the neighboring block increases.
  • the weight value greater than 1 may be an integer greater than or equal to 2.
  • the weight value may be 2.
  • the encoder and decoder add a weight greater than 1 to the cost value of the candidate calculated by SAD or MR-SAD, For example, the cost value can be recalculated by multiplying by 1.1 or 1.2.
  • ISP mode may not be allowed in those regions. That is, if the current block is encoded in GPM mode, the decoder does not parse the syntax related to the ISP and can infer that the value of the syntax related to the ISP is 0. Additionally, if the current block is encoded in ISP mode, the decoder may not parse the syntax related to the GPM mode and may infer that the value of the syntax related to the GPM mode is 0. At this time, 0 may mean that the mode is not applied to the current block.
  • both regions of the current block encoded in GPM mode are encoded in intra prediction mode, only the reference pixel line in the corresponding region that is closest to the current block can be used.
  • the decoder may infer the syntax related to the reference pixel line as 0 without parsing the syntax related to the reference pixel line.
  • the decoder may not parse the syntax related to the GPM mode and may infer that the value of the syntax related to the GPM mode is 0. At this time, 0 may mean that the mode is not applied to the current block.
  • Figure 13 shows the syntax structure of a method for signaling by integrating GPM mode and ISP mode according to an embodiment of the present invention.
  • GPM mode divides the current block into multiple areas, for example, two areas and encodes them. Therefore, GPM mode has similar characteristics to ISP mode, which divides vertically or horizontally. Additionally, the selection ratio of GPM mode is not large. Therefore, by integrating signaling of the GPM mode and the ISP mode, the number of bins to be encoded can be reduced and coding efficiency can be improved.
  • information about whether the current block is encoded in either GPM mode or ISP mode can be signaled using one syntax.
  • the decoder can parse information about whether the current block is encoded in GPM mode or ISP mode. For convenience of explanation, information about whether it is encoded in GPM mode or ISP mode is referred to as partition mode (partion_mode).
  • the decoder may parse one or more syntax related to the ISP mode. If the value of the split mode is 2, the split mode may mean that the current block is encoded in GPM mode. At this time, the decoder may parse one or more syntax related to the GPM mode. At this time, the decoder can parse intra_gpm_index, which is a syntax related to the GPM mode. Intra_gpm_index may be index information indicating the optimal candidate in the GPM split prediction candidate list.
  • the decoder can select the optimal GPM split prediction candidate from the GPM split prediction candidate list according to the index indicated by Intra_gpm_index.
  • the split mode can be signaled in up to two bins.
  • different context models may be applied to the two bins signaling the partition mode.
  • the context model may be applied to only the first bin of the two bins signaling the split mode, and the second bin may be encoded as a by-pass.
  • Figure 14 shows the division form of GPM mode in which the current block is divided into two or more areas according to an embodiment of the present invention.
  • Figure 14 (a) shows the GPM mode divided into three areas based on the same angle.
  • Figure 14 (b) shows the GPM mode divided into three areas based on different angles.
  • GPM mode which divides the current block into four or more areas, can be used.
  • Each region divided from the current block may be encoded or decoded using intra prediction mode or inter prediction mode, respectively.
  • at least one region among the regions into which the current block is divided may be encoded or decoded in an intra prediction mode
  • at least one region among the regions into which the current block is divided may be encoded or decoded in an inter prediction mode.
  • the remaining region may need to be encoded in inter-prediction mode.
  • all areas in which the current block is divided by GPM mode may be encoded in intra prediction mode.
  • different intra prediction directional modes can be used in all divided areas.
  • the same intra prediction directional mode may be used in all divided regions.
  • the intra prediction mode for at least one region may be set differently from the intra prediction directional mode for another region, or a planar mode or DC mode may be used.
  • Figure 15 shows the division form of the current block to which GPM mode is applied according to an embodiment of the present invention.
  • the encoder and decoder may use template-based prediction in areas where there are more adjacent areas to the template among the areas where the current block is divided, and may not use template-based prediction in areas where there are fewer adjacent areas.
  • the first area (A) is adjacent to the template
  • the second area (B) is not adjacent to the template. Therefore, the encoder and decoder may perform encoding and decoding using template-based prediction in the first area (A) and may not use template-based prediction in the second area (B).
  • MPM-based intra prediction can be used in areas where template-based prediction is not used.
  • a region where template-based prediction is not used may be predicted using any one of planar mode, DC mode, or MIP mode.
  • the current block may be encoded in GPM mode, and both regions of the current block divided into GPM mode may be encoded in intra prediction mode.
  • the encoder and decoder can configure a template-based GPM segmentation prediction candidate list for one region.
  • the decoder can decode the remaining area using any one of MPM-based intra prediction directional mode, planar mode, DC mode, and MIP mode.
  • PDPC may be applied to that area.
  • the pre-designated number may be an integer greater than or equal to 0.
  • the pre-designated number may be 4.
  • area A in FIG. 15 is mostly adjacent to reconstructed samples adjacent to the current block, and PDPC may be applied to area A.
  • PDPC may not be applied because there is no or only one sample adjacent to the reconstructed sample adjacent to the current block.
  • the encoder and decoder may determine the strength of the deblocking filter to be used when restoring the current block based on which one of the plurality of regions divided by the GPM mode is encoded using the intra prediction mode. If either of the two regions divided by GPM mode is encoded in intra prediction mode, the encoder and decoder can set the strength of deblocking filtering (bs) to a pre-specified value when restoring the current block. For example, the pre-designated value may be 2. This allows strong filtering to be applied to the boundaries of the current block.
  • the motion information of the corresponding region is corrected through at least one of TM, DMVR, Multi-pass DMVR, and MMVD. It can be.
  • motion information for example, a motion vector
  • the decoder may infer a pre-designated value without parsing the syntax related to motion information correction for the area encoded in inter prediction mode among the current area divided by GPM mode.
  • the pre-specified value may be 0.
  • the syntax related to motion information correction may include at least one of information indicating whether to apply TM, information indicating whether to apply DMVR, and information indicating whether to apply MMVD.
  • the corresponding OBMC can be applied to the area.
  • the pre-designated number may be an integer greater than or equal to 0. At this time, the pre-designated number may be 4.
  • OBMC may not apply to that area.
  • the decoder may infer a pre-designated value without parsing the OBMC-related syntax for the inter prediction mode encoded area among the current areas divided by GPM mode.
  • the pre-specified value may be 0. Additionally, a pre-specified value may mean that OBMC is not applied.
  • MHP mode may be applied to that area.
  • MHP mode may not be applied to that area.
  • the decoder may infer a pre-specified value without parsing the syntax related to the MHP mode for the inter prediction mode encoded area among the current areas divided by the GPM mode.
  • the pre-specified value may be 0. Additionally, a pre-specified value may mean that MHP is not applied.
  • the encoder can convert the residual signal to increase coding efficiency and quantize the transform coefficient value obtained through conversion. As described above, the converter may obtain a transform coefficient value by converting the residual signal. At this time, the residual signal of a specific block may be distributed throughout the entire area of the block. At this time, the encoder can focus energy in the low-frequency region by applying frequency domain transformation to the residual signal. Through this, the encoder can improve coding efficiency.
  • the encoder may obtain at least one residual block containing the residual signal for the current block.
  • the remaining block may be either the current block or blocks divided from the current block.
  • the residual block may be referred to as a residual array or residual matrix including residual samples of the current block.
  • the remaining block may represent a block with the same size as the size of the transform unit or transform block.
  • the encoder can transform the residual block using a transform kernel.
  • the transformation kernel used for transformation of the remaining block may be a transformation kernel with separable characteristics of vertical transformation and horizontal transformation.
  • transformation for the remaining block can be performed separately into vertical transformation and horizontal transformation.
  • the encoder can perform vertical transformation by applying a transformation 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 remaining block.
  • a transform kernel may be used as a term to refer to a set of parameters used for transforming a residual signal, such as a transform matrix, transform array, transform function, or transform.
  • the conversion kernel may be one selected from a plurality of kernels.
  • transformation kernels based on different transformation types may be used for each of vertical transformation and horizontal transformation. That is, before performing the first transformation, a transformation method for the vertical and horizontal directions is derived using at least one 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. It can be. Additionally, in order to reduce computational complexity in the conversion process for large blocks, only the low-frequency region may be left and the high-frequency region may be treated as 0. This is called high-frequency zeroing, and for this zeroing, the conversion size during the actual primary conversion can be set. In the high-frequency zeroing process, the low-frequency area can be set to an arbitrary, predetermined size. The horizontal size of the low-frequency area may be any of 4, 8, 16, and 32, and the vertical size may be any of 4, 8, 6, and 32.
  • the encoder can quantize the transform block converted from the residual block by transmitting it to the quantization unit.
  • the transform block may include a plurality of transform coefficients.
  • a transform block may be composed of a plurality of transform coefficients in a two-dimensional array.
  • the size of the transform block like the remaining block, may be the same as either the current block or a block divided from the current block.
  • the transformation coefficient transmitted to the quantization unit can be expressed as a quantized value.
  • the encoder may perform additional transformation before the transform coefficients are quantized.
  • the above-described transformation method may be referred to as a primary transform, and additional transformation may be referred to as a secondary transform. Secondary transformation can be selectively applied to each remaining block.
  • the encoder may perform secondary conversion for an area where it is difficult to concentrate energy in the low-frequency area only through primary conversion. For example, a secondary transformation may be added to a block whose residual value appears large in a direction other than the horizontal or vertical direction of the residual block.
  • the residual value of an intra-predicted block may have a higher probability of changing in directions other than the horizontal or vertical direction compared to the residual value of an inter-predicted block.
  • the encoder can additionally perform secondary transformation on the residual signal of the intra-predicted block. Additionally, the encoder may omit secondary transformation for the residual signal of the inter-predicted block. Even in the secondary conversion process, high-frequency zeroing in the primary conversion can be performed.
  • whether to perform secondary transformation may be determined depending on the size of the current block or remaining block.
  • transformation kernels of different sizes may be used depending on the size of the current block or remaining block.
  • 8X8 secondary transformation may be applied to a block where the length of the shorter side of width or height is greater than or equal to the first predetermined length.
  • the first predetermined length may be larger than the second predetermined length.
  • the secondary transformation may not be performed separately into vertical transformation and horizontal transformation. This secondary transform may be referred to as Low Frequency Non-Separable Transform (LFNST).
  • the above-described conversion-related syntax element may be information parsed from a video signal bitstream.
  • the decoder can obtain conversion-related syntax elements by entropy decoding the bitstream. Additionally, the encoder may generate a video signal bitstream by entropy coding transformation-related syntax elements.
  • the decoder can obtain encoding information necessary for decoding by parsing the bitstream.
  • Information related to the transformation process may include an index indicating the primary transformation type, an index indicating the secondary transformation type, and a quantized transformation coefficient.
  • the inverse transform unit may obtain a residual signal by inversely transforming the inverse quantized transform coefficient.
  • the inverse transformation unit can detect whether inverse transformation is performed for a specific region from the transformation-related syntax elements of the region. If a transform-related syntax element for a specific transform block indicates transform skipping, transform for the corresponding transform block may be omitted. At this time, both the first inverse transform and the second inverse transform may be omitted for the transform block. Additionally, the dequantized transform coefficient can be used as a residual signal.
  • the decoder can restore the current block using the dequantized transform coefficient as a residual signal.
  • the second-order inverse transformation may be performed and the first-order inverse transformation may be omitted.
  • the second-order inverse transformed value can be used as the residual signal.
  • the above-described first-order inverse transform represents the inverse transformation of the first-order transform, and may be referred to as an inverse primary transform.
  • the secondary inverse transform refers to the inverse transformation of the secondary transform, and may be referred to as an inverse secondary transform or inverse LFNST.
  • the first (inverse) transformation may be referred to as the first (inverse) transformation
  • the secondary (inverse) transformation may be referred to as the second (inverse) transformation.
  • Figure 16 shows the types of transform kernels that can be used for video coding according to an embodiment of the present invention.
  • Figure 16 shows 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 applied to MTS.
  • -VII Represents the kernel formula.
  • DCT and DST can be expressed as functions of cosine and sine, respectively.
  • index i is the index in the frequency domain.
  • Indicates that 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) represents the jth element of the ith row.
  • the conversion kernels shown in Figure 16 all have separable characteristics. Therefore, the encoder can perform conversion on the residual signal X in the horizontal and vertical directions, respectively. Specifically, when the residual signal block is called X and the transformation kernel matrix is T, the transformation for the residual signal X can be expressed as TXT'. At this time, T' is the transpose of the transformation kernel matrix T. Since DCT and DST are in decimal form rather than integer, it is burdensome to implement them as is in a hardware encoder and decoder. Therefore, the decimal type conversion kernel must be approximated to an integer type conversion kernel through scaling and rounding.
  • the integer precision of the conversion kernel can be determined to be 8 or 10 bits. If precision is low, coding efficiency may decrease. Depending on the approximation, the orthonormal properties of DCT and DST may not be maintained, but the resulting loss of coding efficiency is not significant. Therefore, approximating the conversion kernel to an integer form may be 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 equally increase or decrease the value of the input residual signal.
  • Figure 17 shows how MTS and LFNST are applied to the error signal of the current block to which GPM mode is applied according to an embodiment of the present invention.
  • Figure 17 (a) shows the operation of the encoder, and (b) shows the operation of the decoder.
  • the current block is divided into two areas, and intra prediction directional mode can be applied to the two areas.
  • the decoder and encoder can determine the MTS and LFNST conversion method based on one of the intra prediction directional modes corresponding to each of the two regions.
  • the MTS and LFNST transformation methods can be determined based on the angle mode among the two intra prediction directional modes corresponding to the two regions.
  • the MTS and LFNST transformation methods can be determined based on the angular mode rather than the non-directional mode, such as planar or DC mode.
  • both of the two intra prediction directional modes corresponding to the two areas are angle modes
  • the MTS and LFNST conversion methods can be determined based on the intra prediction directional modes of the first area or the second area.
  • the method of selecting the intra prediction directional mode used in the MTS and LFNST methods can be determined based on how few pixels (pixels) adjacent to the current block and adjacent portions of each region are.
  • the first area may have a high probability of being adjacent to an adjacent pixel of the current block, so the error signal may be small. Therefore, the MTS and LFNST conversion methods can be determined based on the intra prediction directional mode in the second region, which is likely to have relatively many error signals.
  • Figure 18 is a table showing the relationship between the value of the directional mode of the intra prediction mode corresponding to the area of the current block divided in GPM mode according to an embodiment of the present invention and the index of the MTS set determined according to the size of the current block. .
  • the row of the table corresponds to the size of the current block, and the column corresponds to an index indicating the directional mode of the intra prediction mode.
  • the directional mode includes MIP.
  • the encoder and decoder In order to map the horizontal and vertical sizes of the current block to one variable, the encoder and decoder derive the nSzIdxW and nSzIdxH values based on the size of the current block as follows. The encoder and decoder calculate nSzIdxW as the logarithm of 2 to the width value of the current block, then discard decimal places from the obtained value and set 2 as the minimum value among the difference value and 3. The encoder and decoder set the value of nSzIdxH using the same method as setting nSzIdxW based on the height value of the current block.
  • the intra-directional mode (predMode) of the current block is derived, and when the TIMD mode is used for restoration of the current block, the intra prediction modes expanded from the existing 67 to 131 are used.
  • the encoder and decoder reduce the number of intra-directional modes (preMode) to 67 without the extended intra-prediction mode.
  • the encoder and decoder set the value of ucMode to 0, the value of nMdIdx to 35, and the value of isTrTransposed to the value derived from MIP.
  • the encoder and decoder derive the ucMode, nMdIdx, and isTrTransposed values as follows.
  • the encoder and decoder set the value of ucMode to the intra-directional mode of the current block.
  • the encoder and decoder convert the value of predMode to extended angle mode according to the width-to-height size ratio of the current block and set it as the value of predMode.
  • the encoder and decoder clip the value of predMode to a value between 2 and 66.
  • predMode is greater than 34, which is the diagonal mode
  • the encoder and decoder reset the value of preMode to the difference between the value of 67, which is the maximum value of preMode, plus 1. For example, if the value of predMode is 35, the encoder and decoder can reset angle mode 35 to angle mode 33 (67+1-35).
  • the video signal processing device can reset angle mode 66 to angle mode 2 (67+1-66(). Through this, the angle range of the intra directional mode indicated by preMode is diagonal. It can be reduced to within 34. In GPM mode, the number of combinations of the MTS set determined according to the size of the current block and the value of the directional mode of the intra prediction mode corresponding to the area of the divided current block can be reduced by half.
  • the encoder and decoder derive the nSzIdx value based on the nSzIdxW, nSzIdxH, and isTrTransposed values. If the value of isTrTransposed is 1, the encoder and decoder multiply the value of nSzIdxH by 4 and then set the value added by nSzIdxW as the value of nSzIdx. If the value of isTrTransposed is 0, the encoder and decoder multiply the value of nSzIdxW by 4 and then set the value added by nSzIdxH as the value of nSzIdx.
  • nSzIdx which indicates the size of the current block
  • nMdIdx which indicates the intra directionality mode of the current block
  • nTrSet which is an index of the set of available transformation types. induces.
  • FIG. 19 is a table showing the relationship between the values of nTrSet and mts_idx according to an embodiment of the present invention. At this time, the row corresponds to the index of nTrSet and the column corresponds to the index of mts_idx.
  • the conversion type in the vertical and horizontal directions is set differently based on whether the value of predMode is greater than 34, which is the diagonal mode. In the embodiment of Figure 19, if the value of nTrSet is 7 and the value of mts_idx is 3, 22 of indices 2, 17, 18, and 22 indicating the transformation type is selected.
  • Figure 20 is a table showing the relationship between an index indicating the conversion type and the kernel used for conversion according to an embodiment of the present invention.
  • the column corresponds to the index of the transformation type
  • the row corresponds to the transformation direction.
  • the vertical transformation kernel is DST1
  • the horizontal transformation kernel is DCT5. If the intra-screen prediction directionality mode of the current block is greater than 34, which is the diagonal mode, the vertical and horizontal transformation types are replaced with each other.
  • the encoder and decoder If the absolute value difference between the intra-screen prediction direction mode of the current block and the horizontal direction mode, 18, is smaller than a predetermined value, the encoder and decoder reset the vertical direction transformation type to the IDT transformation type. If the absolute value difference between the intra-screen prediction directionality mode of the current block and the horizontal direction mode, 50, is smaller than a pre-specified value, the encoder and decoder reset the horizontal direction transformation type to the IDT transformation type. At this time, it may be a pre-designated integer. Additionally, the pre-specified value may be determined based on the horizontal or vertical size of the current block.
  • Figure 21 shows a table showing the relationship between the horizontal and vertical sizes of the current block and a pre-specified value that serves as a standard for resetting the conversion type according to an embodiment of the present invention.
  • Figure 21 (a) shows a case where a pre-specified value is set differently every time the horizontal or vertical size differs by 4.
  • Figure 21 (b) shows a case where a pre-specified value is set differently every time the horizontal or vertical size differs by two times.
  • the encoder and decoder do not reset the transformation type to the IDT transformation type and maintain the existing transformation type as is.
  • Figure 22 shows a method of performing intra prediction by determining a reference pixel line based on a template according to an embodiment of the present invention.
  • a template-based cost calculation method may be used to determine the reference pixel line used for intra prediction of the current block.
  • the encoder and decoder can construct a template using already restored samples adjacent to the current block.
  • a plurality of reference pixel lines are located at predetermined positions based on the current block. Specifically, the plurality of reference pixel lines and templates may be as shown in FIG. 22. Additionally, the plurality of reference pixel lines may be located any one of 1, 3, 5, 7, and 12 away from the boundary of the current block.
  • the encoder and decoder generate prediction samples for the template position based on the reference pixel.
  • the encoder and decoder calculate the cost based on the difference between the generated prediction sample and the template. At this time, the encoder and decoder can use SAD or MR-SAD.
  • the encoder can encode the current block using the reference pixel line with the lowest cost.
  • the decoder performs intra prediction using the reference pixel line with the lowest cost in relation to the template among the plurality of reference pixel lines.
  • the encoder may configure a list of a plurality of reference pixel lines in ascending order based on cost, and include in the list an index indicating a reference pixel line used for intra prediction in the non-stream.
  • the decoder constructs a list in which a plurality of reference pixels are sorted based on cost, and performs intra prediction using the reference pixel line indicated by the signaled indicator in the constructed list.
  • Intra prediction according to the above-described embodiments is referred to as a Template-based Multiple Reference Line (TMRL) intra prediction method.
  • TMRL Template-based Multiple Reference Line
  • Figure 23 shows a method of performing prediction using a block vector of a block encoded in IBC mode according to an embodiment of the present invention.
  • IBC Intelligent Block Copy
  • the encoder includes information indicating the block vector in the bitstream.
  • the decoder can obtain a block vector for the current block by parsing information indicating a block vector from the bitstream.
  • one or multiple reference blocks can be used. At this time, when multiple reference blocks are used, information about multiple block vectors may be included in the bitstream.
  • the block vector used to predict the luminance block can be used to predict the chrominance block corresponding to the luminance block.
  • Figure 23 shows predicting a luminance block using two reference blocks and predicting a chrominance block using two block vectors used to predict the luminance block.
  • FIGS 24 and 25 show RRIBC being performed according to an embodiment of the present invention.
  • Reconstruction-Reordered IBC (RRIBC) coding mode can be used in IBC blocks.
  • RRIBC flips blocks around a reference axis. At this time, a vertical flip or a horizontal flip may be performed.
  • the encoder flips the current block vertically or horizontally to create a flipped current block.
  • the encoder finds the reference block most similar to the flipped current block from the already restored reference region of the current picture.
  • the encoder calculates the block vector, which is the distance to the reference block based on the upper left position of the current block. At this time, the block vector can be predicted through the block vectors of neighboring blocks adjacent to the current block. The prediction method for block vectors in RRIBC mode will be described later.
  • the encoder may include the difference between the actual block vector and the predicted block vector in the bitstream. Additionally, if the current block is encoded in IBC mode, the encoder includes flip type information in the bitstream, whether a vertical flip is used, a horizontal flip is used, or RRIBC mode is not used. You can do it.
  • the encoder may generate an error block that is the difference between the flipped current block and the reference block, transform and quantize the error block, and then include the quantized transform coefficient in the bitstream.
  • the decoder can determine the RRIBC mode for the current block by parsing flip type information.
  • the decoder can calculate the actual block vector by parsing the difference value of the block vector and adding it to the predicted block vector value.
  • the decoder can generate an error block by parsing the quantized transform coefficient from the bitstream and then performing inverse quantization and inverse transformation.
  • the decoder can restore the current block by adding the reference block indicated by the actual block vector and the error block.
  • the decoder can flip the restored current block according to flip type information to generate the final restored current block.
  • the encoder and decoder can predict the block vector prediction value (BV C ) for the current block using the following method.
  • (Xn, Yn) is the neighboring block. represents the center position of
  • (Xc, Yc) represents the center position of the current block.
  • BV n represents the block vector of the neighboring block
  • BV C represents the block vector of the current block.
  • BV C is 2 * (Xn - Xc) + BV n .
  • Figure 26 shows an example of a block vector of a block encoded in Intra TMP mode according to an embodiment of the present invention.
  • the encoder and decoder construct a reference template using pixel values of neighboring blocks adjacent to the current block. At this time, the encoder and decoder find the area most similar to the reference template in the already reconstructed area in the current picture, and determine the block containing the similar area as the reference block. The encoder and decoder predict the current block based on the reference block. At this time, there may be multiple reference blocks.
  • the prediction block for the luminance block is restored using the Intr TMP, and the encoder and decoder can predict the chrominance block using the block vector of the luminance block. At this time, the block vector used to predict the chrominance block may be the same as the block vector of the luminance block.
  • the block vector of the luminance block may be changed according to the difference in resolution between the luminance block and the chrominance block and used as the block vector of the chrominance block.
  • Figure 26 shows predicting a luminance block based on two reference luminance blocks and two block vectors in Intra-TMP. Additionally, the encoder and decoder derive two block vectors for the current chrominance block based on the two block vectors used for prediction of the luminance block. The encoder and decoder use the two derived block vectors to find two reference blocks, and use the two reference blocks to predict the current chrominance block.
  • Figure 27 shows that the current block is divided into two regions in GPM mode and the divided regions are encoded in IBC mode according to an embodiment of the present invention.
  • the encoder and decoder can encode or decode the current block using IBC-GPM mode.
  • IBC-GPM mode the current block is divided using GPM mode, and the divided region may be encoded in intra prediction mode or IBC prediction mode.
  • the current block is divided into two regions, one of the divided regions may be encoded in intra prediction mode, and the remaining region may be encoded in IBC prediction mode.
  • the divided region may be encoded using Intra TMP mode rather than IBC prediction mode.
  • Figure 27 shows this. This can be referred to as Intra TMP-GPM mode.
  • Figure 28 shows that the current block is encoded in IBC-CIIP mode according to an embodiment of the present invention.
  • the encoder and decoder can predict the current block using the weighted average between the intra predicted block and the IBC predicted block. This may be referred to as IBC-CIIP mode. At this time, it can be encoded or decoded using the Intra TMP prediction mode rather than the IBC predicted block, and this can be referred to as the IntraTMP-CIIP mode.
  • Figure 29 shows an example of a block boundary and samples around the boundary during a deblocking filtering process according to an embodiment of the present invention.
  • the dotted line between the P block and the Q block is a block boundary.
  • Block boundaries exist at any given size.
  • Figure 29(a) shows that block boundaries exist at every size of 4.
  • Figure 29(b) shows a sample in which filtering is performed based on block boundaries.
  • the encoder and decoder can perform deblocking filtering on the currently restored block to alleviate blocking phenomenon that occurs at block boundaries.
  • filtering may be performed after determining the transform block boundary, sub-block boundary, filter length, filtering strength (bS), filtering parameters, whether to perform filtering, and the type of filtering.
  • Neighboring blocks or the current block may be encoded in IBC-CIIP mode or IntraTMP-CIIP mode.
  • the encoder and decoder can perform deblocking filtering with the same filtering strength as the filtering strength applied to the intra-predicted coding mode on the boundary between the neighboring block and the current block.
  • the encoder and decoder may perform deblocking filtering with a predetermined filtering strength on the boundary between the neighboring block and the current block.
  • the filtering strength can be divided into 0, 1, and 2, with 2 indicating the strongest filtering strength, 1 indicating the second strongest filtering strength, and 0 indicating that no filtering is performed.
  • the pre-designated intensity may be 2. This is because Intra prediction is used in IBC-CIIP mode and IntraTMP-CIIP mode. In another specific embodiment, the predetermined intensity may be 1. This is because not only Intra prediction but also Inter prediction is used in IBC-CIIP mode and IntraTMP-CIIP mode.
  • the encoder and decoder may perform deblocking filtering with a filtering strength predetermined at the boundary between the neighboring block and the current block based on the difference in block vectors between the neighboring block and the current block. Specifically, if the difference in block vectors between the neighboring blocks and the current block is within a pre-specified value, the encoder and decoder can perform deblocking filtering with a pre-specified filtering strength on the boundary between the neighboring blocks and the current block. At this time, the pre-designated filtering strength may be 0.
  • the encoder and decoder may perform deblocking filtering with a pre-specified filtering strength on the boundary between the neighboring blocks and the current block.
  • the pre-designated filtering strength may be 1.
  • the pre-specified value may be determined according to the resolution of the block vector. Additionally, the pre-designated value may be an integer of 1 or more. Additionally, the resolution of the block vector may be any one of 1 ⁇ 4 pixel unit, 1 ⁇ 2 pixel unit, 1 pixel unit, and 4 pixel unit.
  • Neighboring blocks or the current block may be encoded in IntraTMP mode.
  • the encoder and decoder can perform deblocking filtering with the same filtering strength as the filtering strength applied to the inter-predicted coding mode on the boundary between the neighboring block and the current block.
  • the encoder and decoder may perform deblocking filtering with a predetermined filtering strength on the boundary between the neighboring block and the current block.
  • the pre-specified value may be 1.
  • the encoder and decoder may perform deblocking filtering with a filtering strength predetermined at the boundary between the neighboring block and the current block based on the difference in block vectors between the neighboring block and the current block. Specifically, if the difference in block vectors between the neighboring blocks and the current block is within a pre-specified value, the encoder and decoder can perform deblocking filtering with a pre-specified filtering strength on the boundary between the neighboring blocks and the current block. At this time, the pre-designated filtering strength may be 0.
  • the encoder and decoder may perform deblocking filtering with a pre-specified filtering strength on the boundary between the neighboring blocks and the current block.
  • the pre-designated filtering strength may be 1.
  • the pre-specified value may be determined according to the resolution of the block vector. Additionally, the pre-designated value may be an integer of 1 or more. Additionally, the resolution of the block vector may be any one of 1 ⁇ 4 pixel unit, 1 ⁇ 2 pixel unit, 1 pixel unit, and 4 pixel unit.
  • Neighboring blocks or the current block can be encoded in IBC-GPM or IntraTMP-GPM mode.
  • the encoder and decoder can perform deblocking filtering with the same filtering strength as the filtering strength applied to the intra-predicted coding mode on the boundary between the neighboring block and the current block.
  • the encoder and decoder can perform deblocking filtering with a filtering strength of 2 on the boundary between neighboring blocks and the current block.
  • the encoder and decoder may perform deblocking filtering with a filtering strength predetermined at the boundary between the neighboring block and the current block based on the difference in block vectors between the neighboring block and the current block. Specifically, if the difference in block vectors between the neighboring blocks and the current block is within a pre-specified value, the encoder and decoder can perform deblocking filtering with a pre-specified filtering strength on the boundary between the neighboring blocks and the current block. At this time, the pre-designated filtering strength may be 0.
  • the encoder and decoder may perform deblocking filtering with a pre-specified filtering strength on the boundary between the neighboring blocks and the current block.
  • the pre-designated filtering strength may be 1.
  • the pre-specified value may be determined according to the resolution of the block vector. Additionally, the pre-designated value may be an integer of 1 or more. Additionally, the resolution of the block vector may be any one of 1 ⁇ 4 pixel unit, 1 ⁇ 2 pixel unit, 1 pixel unit, and 4 pixel unit.
  • a neighboring block or the current block may be encoded in IBC-GPM or IntraTMP-GPM mode, and any region divided using GPM mode may be encoded using intra prediction mode.
  • the encoder and decoder may perform deblocking filtering with a filtering strength predetermined at the boundary between the neighboring block and the current block based on the difference in block vectors between the neighboring block and the current block.
  • the pre-specified filtering strength may be 2.
  • the encoder and decoder may perform deblocking filtering with a filtering strength predetermined at the boundary between the neighboring block and the current block based on the difference in block vectors between the neighboring block and the current block. Specifically, if the difference in block vectors between the neighboring blocks and the current block is within a pre-specified value, the encoder and decoder can perform deblocking filtering with a pre-specified filtering strength on the boundary between the neighboring blocks and the current block. At this time, the pre-designated filtering strength may be 0.
  • the encoder and decoder may perform deblocking filtering with a pre-specified filtering strength on the boundary between the neighboring blocks and the current block.
  • the pre-designated filtering strength may be 1.
  • the pre-specified value may be determined according to the resolution of the block vector. Additionally, the pre-designated value may be an integer of 1 or more. Additionally, the resolution of the block vector may be any one of 1 ⁇ 4 pixel unit, 1 ⁇ 2 pixel unit, 1 pixel unit, and 4 pixel unit.
  • Neighboring blocks or the current block may be encoded in RRIBC mode.
  • the encoder and decoder may perform deblocking filtering with a filtering strength of 0 on the boundary between the neighboring block and the current block based on the difference in block vectors between the neighboring block and the current block.
  • RRIBC mode is a mode performed on screen content and is effective in images where clear shapes such as letters and shapes appear repeatedly. Therefore, if the surrounding block or the current block is encoded in RRIBC mode, the blocking phenomenon at the block boundary may not exist.
  • the encoder and decoder determine the neighboring block based on the difference in block vectors between the neighboring block and the current block.
  • Deblocking filtering can be performed with a pre-specified filtering strength on the boundary between and the current block.
  • the pre-specified filtering strength may be 1.
  • the method of determining the strength of deblocking filtering through the above-described embodiments can be equally applied not only to the boundary of the luminance block but also to the boundary of the chrominance block.
  • slice type information e.g., whether it is an I slice, a P slice, or a B slice
  • slice type information 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, and the current block. It may be determined based on at least one of information about whether it is a luminance block or a chrominance block, whether it is a reference frame or a non-reference frame, reference order, and temporal hierarchy according to the hierarchy.
  • Information used to determine whether the methods described in this specification will be applied may be information previously agreed upon between the decoder and the encoder. Additionally, this information may be determined according to profile and level.
  • This information can be expressed as variable values, and the bitstream can include information about variable values. That is, the decoder can determine whether the above-described methods are applied by parsing information about variable values included in the bitstream. For example, it may be determined whether the above-described methods will be applied based on the horizontal or vertical length of the coding unit. If the horizontal or vertical length is 32 or more (e.g., 32, 64, 128, etc.), the above-described methods can be applied. Additionally, the above-described methods can be applied when the horizontal or vertical length is less than 32 (e.g., 2, 4, 8, 16). Additionally, the above-described methods can be applied when the horizontal or vertical length is 4 or 8.
  • the methods described above in this specification may be performed through a processor of a decoder or encoder. Additionally, the encoder can generate a bitstream that is decoded by a video signal processing method. Additionally, the bitstream generated by the encoder may be stored in a computer-readable non-transitory storage medium (recording medium).
  • parsing is not limited to the decoder operation, but can also be interpreted as the act of generating a bitstream in the encoder. Additionally, this bitstream can be generated and stored in a computer-readable recording medium.
  • Embodiments of the present invention described above can be implemented through various means.
  • embodiments of the present invention may be implemented by hardware, firmware, software, or a combination thereof.
  • the method according to embodiments of the present invention uses one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), and Programmable Logic Devices (PLDs).
  • ASICs Application Specific Integrated Circuits
  • DSPs Digital Signal Processors
  • DSPDs Digital Signal Processing Devices
  • PLDs Programmable Logic Devices
  • FPGAs Field Programmable Gate Arrays
  • processors controllers, microcontrollers, microprocessors, etc.
  • the method according to embodiments of the present invention may be implemented in the form of a module, procedure, or function that performs the functions or operations described above.
  • Software code can be stored in memory and run by a processor.
  • the memory may be located inside or outside the processor, and may exchange data with the processor through various known means.
  • Computer-readable media can be any available media that can be accessed by a computer and includes both volatile and non-volatile media, removable and non-removable media. Additionally, computer-readable media may include both computer storage media and communication media.
  • Computer storage media includes both volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules or other data.
  • Communication media typically includes computer readable instructions, data structures or other data of modulated data signals such as program modules, or other transmission mechanisms, and includes any information delivery medium.

Abstract

A video signal decoding device is disclosed. The decoding device comprises a processor. The processor divides a current block into multiple areas according to a reference line, and performs prediction for each divided area. At least one of the multiple areas is predicted through intra prediction.

Description

기하학적 분할을 이용하는 비디오 신호 처리 방법 및 이를 위한 장치Video signal processing method using geometric division and device therefor
본 발명은 비디오 신호의 처리 방법 및 장치에 관한 것으로, 보다 상세하게는 비디오 신호를 인코딩하거나 디코딩하는 비디오 신호 처리 방법 및 장치에 관한 것이다.The present invention relates to a method and device for processing video signals, and more particularly, to a method and device for processing video signals for encoding or decoding video signals.
압축 부호화란 디지털화한 정보를 통신 회선을 통해 전송하거나, 저장 매체에 적합한 형태로 저장하기 위한 일련의 신호 처리 기술을 의미한다. 압축 부호화의 대상에는 음성, 영상, 문자 등의 대상이 존재하며, 특히 영상을 대상으로 압축 부호화를 수행하는 기술을 비디오 영상 압축이라고 일컫는다. 비디오 신호에 대한 압축 부호화는 공간적인 상관관계, 시간적인 상관관계, 확률적인 상관관계 등을 고려하여 잉여 정보를 제거함으로써 이루어진다. 그러나 최근의 다양한 미디어 및 데이터 전송 매체의 발전으로 인해, 더욱 고효율의 비디오 신호 처리 방법 및 장치가 요구되고 있다.Compression encoding refers to a series of signal processing technologies for transmitting digitized information through communication lines or storing it in a form suitable for storage media. Targets of compression coding include audio, video, and text. In particular, the technology for performing compression coding on video is called video image compression. Compressive coding for video signals is accomplished by removing redundant information by considering spatial correlation, temporal correlation, and probabilistic correlation. However, due to recent developments in various media and data transmission media, more highly efficient video signal processing methods and devices are required.
본 명세서는 비디오 신호 처리 방법 및 이를 위한 장치를 제공하여 비디오 신호의 코딩 효율을 높이기 위한 목적이 있다.The purpose of this specification is to increase the coding efficiency of video signals by providing a video signal processing method and apparatus for the same.
본 발명의 실시 예에 따른 비디오 신호 디코딩 장치는 프로세서를 포함하고,A video signal decoding device according to an embodiment of the present invention includes a processor,
상기 프로세서는 기준선에 따라 현재 블록을 복수의 영역으로 분할하고, 분할된 각 영역 별로 예측을 수행한다. 이때, 상기 복수의 영역 중 적어도 하나는 인트라 예측을 통해 예측된다.The processor divides the current block into a plurality of regions according to the baseline and performs prediction for each divided region. At this time, at least one of the plurality of regions is predicted through intra prediction.
상기 프로세서는 상기 인트라 예측을 통해 예측되는 적어도 하나의 영역의 예측을 위해 사용되는 인트라 예측 방향성 모드 정보의 후보들을 포함하는 후보 리스트를 생성할 때, 상기 분할의 형태와 인트라 예측 방향성 모드의 조합 별로 후보를 생성할 수 있다.When generating a candidate list including candidates for intra prediction directional mode information used for prediction of at least one region predicted through intra prediction, the processor selects candidates for each combination of the type of segmentation and the intra prediction directional mode. can be created.
상기 프로세서는 상기 분할의 형태에 해당하는 방향에 해당하는 각도와 상기 인트라 예측 방향성 모드가 지시하는 각도의 차이가 미리 지정된 값 이하인 후보를 상기 후보 리스트에서 제외할 수 있다.The processor may exclude from the candidate list a candidate whose difference between the angle corresponding to the direction corresponding to the division type and the angle indicated by the intra prediction direction mode is less than or equal to a predetermined value.
상기 프로세서는 상기 인트라 예측 방향성 모드의 인덱스와 상기 분할의 형태에 해당하는 방향에 해당하는 인트라 예측 방향성 모드의 인덱스의 차이가 미리 지정된 값 이하인 후보를 상기 후보 리스트에서 제외할 수 있다.The processor may exclude from the candidate list a candidate whose difference between the index of the intra prediction directional mode and the index of the intra prediction directional mode corresponding to the direction corresponding to the division type is less than or equal to a predetermined value.
상기 프로세서는 상기 후보 리스트의 제1 후보의 상기 분할의 형태에 해당하는 방향에 해당하는 각도와 상기 제1 후보의 상기 인트라 예측 방향성 모드가 지시하는 각도가 다른 경우, 상기 제1 후보의 상기 분할의 형태에 해당하는 방향에 해당하는 각도를 상기 인트라 예측 방향성 모드가 지시하는 각도로 설정할 수 있다.If the angle corresponding to the direction corresponding to the type of division of the first candidate in the candidate list is different from the angle indicated by the intra prediction directional mode of the first candidate, the processor determines the division of the first candidate. The angle corresponding to the direction corresponding to the shape can be set to the angle indicated by the intra prediction directionality mode.
상기 프로세서는 상기 현재 블록에 인접한 주변 블록의 인트라 예측 방향성 모드의 인덱스와 상기 후보 리스트의 제1 후보에 사용되는 인트라 예측 방향 모드의 인덱스 사이 차이가 미리 지정된 값 내이고, 상기 현재 블록에 인접한 주변 블록의 인트라 예측 방향성 모드의 인덱스와 상기 후보 리스트의 제2 후보에 사용되는 인트라 예측 방향 모드의 인덱스 사이 차이가 상기 미리 지정된 값과 같거나 큰 경우, 상기 제1 후보의 우선 순위를 상기 제2 후보보다 높은 우선 순위로 지정할 수 있다.The processor determines that the difference between the index of the intra prediction direction mode of the neighboring block adjacent to the current block and the index of the intra prediction direction mode used for the first candidate in the candidate list is within a predetermined value, and the neighboring block adjacent to the current block If the difference between the index of the intra prediction direction mode and the index of the intra prediction direction mode used for the second candidate in the candidate list is equal to or greater than the predetermined value, the priority of the first candidate is higher than the second candidate. It can be specified as a high priority.
상기 프로세서는 상기 현재 블록에 인접한 주변 블록의 인트라 예측 방향성 모드의 인덱스와 상기 후보 리스트의 후보에 사용되는 인트라 예측 방향 모드의 인덱스 사이 차이를 기초로 상기 후보의 코스트를 계산할 때 사용되는 가중치를 결정할 수 있다.The processor may determine a weight used when calculating the cost of the candidate based on the difference between the index of the intra prediction direction mode of a neighboring block adjacent to the current block and the index of the intra prediction direction mode used for the candidate in the candidate list. there is.
상기 프로세서는 상기 인접한 주변 블록의 인트라 예측 방향성 모드와 상기 후보에 사용되는 인트라 예측 방향 모드의 인덱스 사이 차이가 미리 지정된 값보다 큰 경우, SAD 혹은 MR-SAD로 계산된 해당 후보의 코스트에 1보다 큰 가중치를 곱한 값으로 코스트를 재계산할 수 있다.If the difference between the intra prediction direction mode of the adjacent neighboring block and the index of the intra prediction direction mode used for the candidate is greater than a predetermined value, the processor adds a cost of the candidate calculated by SAD or MR-SAD greater than 1. The cost can be recalculated by multiplying the weight.
상기 비디오 신호를 포함하는 비트스트림은 GPM 모드 또는 ISP 모드 중 어느 하나의 모드로 부호화되었는지를 지시하는 신택스를 포함할 수 있다. 이때, 상기 프로세서는 상기 비트스트림으로부터 상기 신택스를 획득하여 상기 현재 블록이 GPM 모드 또는 ISP 모드 중 어느 하나의 모드로 부호화되었는지 판단할 수 있다.The bitstream including the video signal may include syntax indicating whether it is encoded in either GPM mode or ISP mode. At this time, the processor can obtain the syntax from the bitstream and determine whether the current block is encoded in either GPM mode or ISP mode.
상기 프로세서는 상기 복수의 영역 중 어느 하나가 인트라 예측 모드를 사용하여 부호화된지를 기초로 상기 현재 블록의 복원에 사용하는 디블록킹 필터의 세기를 결정할 수 있다.The processor may determine the strength of a deblocking filter used to restore the current block based on which one of the plurality of regions was encoded using an intra prediction mode.
본 발명의 실시 예에 따라 비디오 신호를 인코딩하는 인코딩 장치는 프로세서를 포함한다. 상기 프로세서는 기준선에 따라 현재 블록을 복수의 영역으로 분할하고, 분할된 각 영역 별로 예측을 수행한다. 이때, 상기 복수의 영역 중 적어도 하나는 인트라 예측을 통해 예측된다.An encoding device that encodes a video signal according to an embodiment of the present invention includes a processor. The processor divides the current block into a plurality of regions according to the baseline and performs prediction for each divided region. At this time, at least one of the plurality of regions is predicted through intra prediction.
상기 프로세서는 상기 인트라 예측을 통해 예측되는 적어도 하나의 영역의 예측을 위해 사용되는 인트라 예측 방향성 모드 정보의 후보들을 포함하는 후보 리스트를 생성할 때, 상기 분할의 형태와 인트라 예측 방향성 모드의 조합 별로 후보를 생성할 수 있다.When generating a candidate list including candidates for intra prediction directional mode information used for prediction of at least one region predicted through intra prediction, the processor selects candidates for each combination of the type of segmentation and the intra prediction directional mode. can be created.
상기 프로세서는 상기 분할의 형태에 해당하는 방향에 해당하는 각도와 상기 인트라 예측 방향성 모드가 지시하는 각도의 차이가 미리 지정된 값 이하인 후보를 상기 후보 리스트에서 제외할 수 있다.The processor may exclude from the candidate list a candidate whose difference between the angle corresponding to the direction corresponding to the division type and the angle indicated by the intra prediction direction mode is less than or equal to a predetermined value.
상기 프로세서는 상기 인트라 예측 방향성 모드의 인덱스와 상기 분할의 형태에 해당하는 방향에 해당하는 인트라 예측 방향성 모드의 인덱스의 차이가 미리 지정된 값 이하인 후보를 상기 후보 리스트에서 제외할 수 있다.The processor may exclude from the candidate list a candidate whose difference between the index of the intra prediction directional mode and the index of the intra prediction directional mode corresponding to the direction corresponding to the division type is less than or equal to a predetermined value.
상기 프로세서는 상기 후보 리스트의 제1 후보의 상기 분할의 형태에 해당하는 방향에 해당하는 각도와 상기 제1 후보의 상기 인트라 예측 방향성 모드가 지시하는 각도가 다른 경우, 상기 제1 후보의 상기 분할의 형태에 해당하는 방향에 해당하는 각도를 상기 인트라 예측 방향성 모드가 지시하는 각도로 설정할 수 있다.If the angle corresponding to the direction corresponding to the type of division of the first candidate in the candidate list is different from the angle indicated by the intra prediction directional mode of the first candidate, the processor determines the division of the first candidate. The angle corresponding to the direction corresponding to the shape can be set to the angle indicated by the intra prediction directionality mode.
상기 프로세서는 상기 현재 블록에 인접한 주변 블록의 인트라 예측 방향성 모드의 인덱스와 상기 후보 리스트의 제1 후보에 사용되는 인트라 예측 방향 모드의 인덱스 사이 차이가 미리 지정된 값 내이고, 상기 현재 블록에 인접한 주변 블록의 인트라 예측 방향성 모드의 인덱스와 상기 후보 리스트의 제2 후보에 사용되는 인트라 예측 방향 모드의 인덱스 사이 차이가 상기 미리 지정된 값과 같거나 큰 경우, 상기 제1 후보의 우선 순위를 상기 제2 후보보다 높은 우선 순위로 지정할 수 있다.The processor determines that the difference between the index of the intra prediction direction mode of the neighboring block adjacent to the current block and the index of the intra prediction direction mode used for the first candidate in the candidate list is within a predetermined value, and the neighboring block adjacent to the current block If the difference between the index of the intra prediction direction mode and the index of the intra prediction direction mode used for the second candidate in the candidate list is equal to or greater than the predetermined value, the priority of the first candidate is higher than the second candidate. It can be specified as a high priority.
상기 프로세서는 상기 현재 블록에 인접한 주변 블록의 인트라 예측 방향성 모드의 인덱스와 상기 후보 리스트의 후보에 사용되는 인트라 예측 방향 모드의 인덱스 사이 차이를 기초로 상기 후보의 코스트를 계산할 때 사용되는 가중치를 결정할 수 있다.The processor may determine a weight used when calculating the cost of the candidate based on the difference between the index of the intra prediction direction mode of a neighboring block adjacent to the current block and the index of the intra prediction direction mode used for the candidate in the candidate list. there is.
상기 프로세서는 상기 인접한 주변 블록의 인트라 예측 방향성 모드와 상기 후보에 사용되는 인트라 예측 방향 모드의 인덱스 사이 차이가 미리 지정된 값보다 큰 경우, SAD 혹은 MR-SAD로 계산된 해당 후보의 코스트에 1보다 큰 가중치를 곱한 값으로 코스트를 재계산할 수 있다.If the difference between the intra prediction direction mode of the adjacent neighboring block and the index of the intra prediction direction mode used for the candidate is greater than a predetermined value, the processor adds a cost of the candidate calculated by SAD or MR-SAD greater than 1. The cost can be recalculated by multiplying the weight.
상기 프로세서는 상기 비디오 신호를 포함하는 비트스트림에 GPM 모드 또는 ISP 모드 중 어느 하나의 모드로 부호화되었는지를 지시하는 신택스를 포함시킬 수 있다.The processor may include syntax indicating whether the bitstream including the video signal is encoded in either GPM mode or ISP mode.
상기 프로세서는 상기 복수의 영역 중 어느 하나가 인트라 예측 모드를 사용하여 부호화된지를 기초로 상기 현재 블록의 복원에 사용하는 디블록킹 필터의 세기를 결정할 수 있다.The processor may determine the strength of a deblocking filter used to restore the current block based on which one of the plurality of regions was encoded using an intra prediction mode.
본 발명의 실시 예에 따라 비트스트림을 저장하는 컴퓨터 판독 가능한 비 일시적 저장 매체에 있어서, 상기 비트스트림은 디코딩 방법에 의해 디코딩된다. 상기 디코딩 방법은 기준선에 따라 현재 블록을 복수의 영역으로 분할하는 단계; 및In a computer-readable non-transitory storage medium storing a bitstream according to an embodiment of the present invention, the bitstream is decoded using a decoding method. The decoding method includes dividing the current block into a plurality of regions according to a reference line; and
분할된 각 영역 별로 예측을 수행하는 단계를 포함한다. 이때, 상기 복수의 영역 중 적어도 하나는 인트라 예측을 통해 예측된다.It includes the step of performing prediction for each divided region. At this time, at least one of the plurality of regions is predicted through intra prediction.
본 명세서는 효율적으로 비디오 신호를 처리하기 위한 방법을 제공한다. 본 명세서에서 얻을 수 있는 효과는 이상에서 언급한 효과들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.This specification provides a method for efficiently processing video signals. The effects that can be obtained in this specification are not limited to the effects mentioned above, and other effects not mentioned can be clearly understood by those skilled in the art from the description below. will be.
도 1은 본 발명의 일 실시예에 따른 비디오 신호 인코딩 장치의 개략적인 블록도이다.1 is a schematic block diagram of a video signal encoding device according to an embodiment of the present invention.
도 2는 본 발명의 일 실시예에 따른 비디오 신호 디코딩 장치의 개략적인 블록도이다.Figure 2 is a schematic block diagram of a video signal decoding device according to an embodiment of the present invention.
도 3은 픽쳐 내에서 코딩 트리 유닛이 코딩 유닛들로 분할되는 실시예를 도시한다. Figure 3 shows an embodiment in which a coding tree unit is divided into coding units within a picture.
도 4는 쿼드 트리 및 멀티-타입 트리의 분할을 시그널링하는 방법의 일 실시예를 도시한다.Figure 4 shows one embodiment of a method for signaling splitting of quad trees and multi-type trees.
도 5 및 도 6은 본 발명의 실시예에 따른 인트라 예측 방법을 더욱 구체적으로 도시한다.Figures 5 and 6 show the intra prediction method according to an embodiment of the present invention in more detail.
도 7은 인터 예측에서 움직임 후보 리스트를 생성하기 위해 사용되는 주변 블록들의 위치를 나타낸 도면이다.Figure 7 is a diagram showing the positions of neighboring blocks used to generate a motion candidate list in inter prediction.
도 8은 본 발명의 실시 예에 따라 GPM 모드에서 기준선의 각도 및 기준선과 중앙 위치로부터의 거리를 통합하여 시그널링하는 신택스 및 신택스가 시그널링하는 구체적인 정보를 보여준다.Figure 8 shows a syntax for signaling by integrating the angle of the baseline and the distance from the baseline and the center position in GPM mode according to an embodiment of the present invention, and specific information signaled by the syntax.
도 9는 본 발명의 실시 예에서 머지 GPM 분할 인덱스의 값에 따른 기준선을 보여주고, GPM 모드에 관한 정보를 나타내는 신택스를 보여준다.Figure 9 shows a baseline according to the value of the merge GPM split index in an embodiment of the present invention and shows syntax indicating information about the GPM mode.
도 10은 본 발명의 실시 예에 따라 템플릿 기반으로 GPM 분할 형태 및 인트라 예측 모드를 유도하는 방법을 보여준다.Figure 10 shows a method of deriving a GPM segmentation type and intra prediction mode based on a template according to an embodiment of the present invention.
도 11은 본 발명의 실시 예에 따라 템플릿 기반으로 GPM 및 인트라 예측 방향성 모드를 유도하는 방법을 보여준다.Figure 11 shows a method of deriving GPM and intra prediction directional mode based on a template according to an embodiment of the present invention.
도 12는 본 발명의 실시 예에 따른 GPM 모드에서 사용되는 분할 기준선의 각도를 보여준다.Figure 12 shows the angle of the dividing reference line used in GPM mode according to an embodiment of the present invention.
도 13은 본 발명의 실시 예에 따라 GPM 모드와 ISP 모드를 통합하여 시그널링하는 방법의 신택스 구조를 나타낸다.Figure 13 shows the syntax structure of a method for signaling by integrating GPM mode and ISP mode according to an embodiment of the present invention.
도 14는 본 발명의 실시 예에 따라 현재 블록을 2개 이상의 영역으로 분할하는 GPM 모드의 분할 형태를 보여준다.Figure 14 shows the division form of GPM mode in which the current block is divided into two or more areas according to an embodiment of the present invention.
도 15는 본 발명의 실시 예에 따라 GPM 모드가 적용된 현재 블록의 분할 형태를 나타낸다.Figure 15 shows the division form of the current block to which GPM mode is applied according to an embodiment of the present invention.
도 16은 본 발명의 실시 예에 따라 비디오 코딩에 사용될 수 있는 변환 커널 종류를 보여준다.Figure 16 shows the types of transform kernels that can be used for video coding according to an embodiment of the present invention.
도 17은 본 발명의 실시 예에 따른 GPM 모드가 적용된 현재 블록의 오차 신호에 MTS와 LFNST가 적용되는 방법을 보여준다.Figure 17 shows how MTS and LFNST are applied to the error signal of the current block to which GPM mode is applied according to an embodiment of the present invention.
도 18은 본 발명의 실시 예에 따라 GPM 모드에서 분할된 현재 블록의 영역에 해당하는 인트라 예측 모드의 방향성 모드의 값과 현재 블록의 크기에 따라 결정되는 MTS 세트의 인덱스 사이를 관계를 보여주는 테이블이다.Figure 18 is a table showing the relationship between the directional mode value of the intra prediction mode corresponding to the area of the current block divided in GPM mode according to an embodiment of the present invention and the index of the MTS set determined according to the size of the current block. .
도 19는 본 발명의 실시 예에 따른 nTrSet와 mts_idx의 값 사이의 관계를 보여주는 테이블이다.Figure 19 is a table showing the relationship between the values of nTrSet and mts_idx according to an embodiment of the present invention.
도 20은 본 발명의 실시 예에 따라 변환 타입을 지시하는 인덱스와 변환에 사용되는 커널 사이의 관계를 보여주는 테이블이다.Figure 20 is a table showing the relationship between an index indicating the conversion type and the kernel used for conversion according to an embodiment of the present invention.
도 21은 본 발명의 실시 예에 따른 현재 블록의 가로 및 세로 크기와 변환 타입을 재설정할 지 기준이 되는 미리 지정된 사이의 관계를 보여주는 테이블을 보여준다.Figure 21 shows a table showing the relationship between the horizontal and vertical sizes of the current block and a pre-designated standard for resetting the transformation type according to an embodiment of the present invention.
도 22는 본 발명의 실시 예에 따라 템플릿을 기초로 참조 픽셀 라인을 결정하여 인트라 예측을 수행하는 방법을 보여준다.Figure 22 shows a method of performing intra prediction by determining a reference pixel line based on a template according to an embodiment of the present invention.
도 23은 본 발명의 실시 예에 따라 IBC 모드로 부호화된 블록의 블록 벡터를 사용하여 예측을 수행하는 방법을 보여준다.Figure 23 shows a method of performing prediction using a block vector of a block encoded in IBC mode according to an embodiment of the present invention.
도 24는 본 발명의 실시 예에 따라 RRIBC가 수행되는 것을 보여준다.Figure 24 shows RRIBC being performed according to an embodiment of the present invention.
도 25는 본 발명의 실시 예에 따라 RRIBC가 수행되는 것을 보여준다.Figure 25 shows RRIBC being performed according to an embodiment of the present invention.
도 26은 본 발명의 실시 예에 따라 Intra TMP 모드로 부호화된 블록의 블록 벡터의 실시 예를 도시한다. Figure 26 shows an example of a block vector of a block encoded in Intra TMP mode according to an embodiment of the present invention.
도 27은 본 발명의 실시 예에 따라 GPM 모드에서 현재 블록이 2개의 영역으로 분할되고, 분할된 영역이 IBC 모드로 부호화되는 것을 보여준다.Figure 27 shows that the current block is divided into two regions in GPM mode and the divided regions are encoded in IBC mode according to an embodiment of the present invention.
도 28은 본 발명의 실시 예에 따라 현재 블록이 IBC-CIIP 모드로 부호화되는 것을 보여준다.Figure 28 shows that the current block is encoded in IBC-CIIP mode according to an embodiment of the present invention.
도 29는 본 발명의 실시 예에 따라 디블록킹 필터링 과정에서 블록 경계 및 경계 주변의 샘플들의 실시 예를 보여준다.Figure 29 shows an example of a block boundary and samples around the boundary during a deblocking filtering process according to an embodiment of the present invention.
본 명세서에서 사용되는 용어는 본 발명에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어를 선택하였으나, 이는 당 분야에 종사하는 기술자의 의도, 관례 또는 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한 특정 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 발명의 설명 부분에서 그 의미를 기재할 것이다. 따라서 본 명세서에서 사용되는 용어는, 단순한 용어의 명칭이 아닌 그 용어가 가진 실질적인 의미와 본 명세서의 전반에 걸친 내용을 토대로 해석되어야 함을 밝혀두고자 한다.The terms used in this specification are general terms that are currently widely used as much as possible while considering the function in the present invention, but this may vary depending on the intention of a person skilled in the art, custom, or the emergence of new technology. In addition, in certain cases, there are terms arbitrarily selected by the applicant, and in this case, the meaning will be described in the description of the relevant invention. Therefore, we would like to clarify that the terms used in this specification should be interpreted based on the actual meaning of the term and the overall content of this specification, not just the name of the term.
본 명세서에서 'A 및/또는 B'는 'A 또는 B 중 적어도 하나를 포함하는'과 같은 의미로 해석될 수 있다.In this specification, ‘A and/or B’ may be interpreted as meaning ‘including at least one of A or 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를 가질 수 있다.Some terms in this specification may be interpreted as follows. Coding can be interpreted as encoding or decoding depending on the case. In this specification, a device that performs encoding (encoding) of a video signal to generate a video signal bitstream is referred to as an encoding device or encoder, and a device that performs decoding (decoding) of a video signal bitstream to restore a video signal is referred to as a decoder. Referred to as a device or decoder. Additionally, in this specification, 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 the meaning may be interpreted differently depending on the case, so the present invention is not limited thereto. 'Unit' is used to refer to a basic unit of image processing or a specific location of a picture, and refers to an image area containing at least one of a luminance (luma) component and a chrominance (chroma) component. Additionally, 'block' refers to an image area containing specific components among the luminance component and chrominance component (i.e., Cb and Cr). However, depending on the embodiment, terms such as 'unit', 'block', 'partition', 'signal', and 'area' may be used interchangeably. Additionally, in this specification, 'current block' refers to a block currently scheduled to be encoded, and 'reference block' refers to a block for which encoding or decoding has already been completed and is used as a reference in the current block. Additionally, in this specification, terms such as 'luma', 'luma', 'luminance', and 'Y' may be used interchangeably. In addition, in this specification, terms such as 'chroma', 'chroma', 'color difference', and 'Cb or Cr' may be used interchangeably, and since the color difference component is divided into two types, Cb and Cr, each color difference component will be used separately. You can. Additionally, in this specification, a unit may be used as a concept that includes all coding units, prediction units, and transformation units. A picture refers to a field or frame, and depending on the embodiment, the above terms may be used interchangeably. Specifically, when the captured image is an interlaced image, one frame is divided into an odd (or odd, top) field and an even (or even, bottom) field, and each field is created as a picture unit. and can be encoded or decoded. If the captured image is a progressive image, one frame may be created as a picture and encoded or decoded. Additionally, in this specification, terms such as 'error signal', 'residual signal', 'residual signal', 'residual signal', and 'difference signal' may be used interchangeably. Additionally, in this specification, terms such as 'intra prediction mode', 'intra prediction directional mode', 'intra-screen prediction mode', and 'intra-screen prediction directional mode' may be used interchangeably. Additionally, in this specification, terms such as 'motion' and 'movement' may be used interchangeably. In addition, in this specification, 'left', 'upper left', 'upper', 'upper right', 'right', 'lower right', 'bottom', and 'lower left' mean 'left', 'upper left', ' It can be used interchangeably with 'top', 'top right', 'bottom right', 'bottom right', 'bottom', and 'bottom left'. Additionally, element and member can be used interchangeably. POC (Picture Order Count) represents temporal location information of a picture (or frame), can be the playback order displayed on the screen, and each picture can have a unique POC.
도 1은 본 발명의 일 실시예에 따른 비디오 신호 인코딩 장치(100)의 개략적인 블록도이다. 도 1을 참조하면, 본 발명의 인코딩 장치(100)는 변환부(110), 양자화부(115), 역양자화부(120), 역변환부(125), 필터링부(130), 예측부(150) 및 엔트로피 코딩부(160)를 포함한다.Figure 1 is a schematic block diagram of a video signal encoding device 100 according to an embodiment of the present invention. Referring to Figure 1, 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, and a prediction unit 150. ) and an entropy coding unit 160.
변환부(110)는 입력 받은 비디오 신호와 예측부(150)에서 생성된 예측 신호의 차이인 레지듀얼 신호를 변환하여 변환 계수 값을 획득한다. 예를 들어, 이산 코사인 변환(Discrete Cosine Transform, DCT), 이산 사인 변환(Discrete Sine Transform, DST) 또는 웨이블릿 변환(Wavelet Transform) 등이 사용될 수 있다. 이산 코사인 변환 및 이산 사인 변환은 입력된 픽쳐 신호를 블록 형태로 나누어 변환을 수행하게 된다. 변환에 있어서 변환 영역 내의 값들의 분포와 특성에 따라서 코딩 효율이 달라질 수 있다. 레지듀얼 블록에 대한 변환에 사용되는 변환 커널은 수직 변환 및 수평 변환의 분리 가능한 특성을 가지는 변환 커널일 수 있다. 이 경우, 레지듀얼 블록에 대한 변환은 수직 변환 및 수평 변환으로 분리되어 수행될 수 있다. 예를 들어, 인코더는 레지듀얼 블록의 수직 방향으로 변환 커널을 적용하여 수직 변환을 수행할 수 있다. 또한, 인코더는 레지듀얼 블록의 수평 방향으로 변환 커널을 적용하여 수평 변환을 수행할 수 있다. 본 개시에서, 변환 커널은 변환 매트릭스, 변환 어레이, 변환 함수, 변환과 같이 레지듀얼 신호의 변환에 사용되는 파라미터 세트를 지칭하는 용어로 사용될 수 있다. 예를 들어, 변환 커널은 복수의 사용 가능한 커널들 중 어느 하나일 수 있다. 또한, 수직 변환 및 수평 변환 각각에 대해 서로 다른 변환 타입에 기반한 변환 커널이 사용될 수도 있다.The conversion unit 110 obtains a conversion coefficient value by converting the residual signal, which is the difference between the input video signal and the prediction signal generated by the prediction unit 150. For example, Discrete Cosine Transform (DCT), Discrete Sine Transform (DST), or Wavelet Transform may be used. Discrete cosine transform and discrete sine transform perform transformation by dividing the input picture signal into blocks. In transformation, coding efficiency may vary depending on the distribution and characteristics of values within the transformation area. The transformation kernel used for transformation of the residual block may be a transformation kernel with separable characteristics of vertical transformation and horizontal transformation. In this case, transformation for the residual block can be performed separately into vertical transformation and horizontal transformation. For example, the encoder can perform vertical transformation by applying a transformation kernel in the vertical direction of the residual block. Additionally, the encoder can perform horizontal transformation by applying a transformation kernel in the horizontal direction of the residual block. In this disclosure, a transform kernel may be used as a term to refer to a set of parameters used for transforming a residual signal, such as a transform matrix, transform array, transform function, or transform. For example, 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 vertical transformation and horizontal transformation.
변환계수는 블록의 좌상단으로 갈수록 높은 계수가 분포하고, 블록의 우하단으로 갈수록 '0'에 가까운 계수가 분포한다. 현재 블록의 크기가 커질수록 우하단 영역에서 계수 '0'이 많이 존재할 가능성이 있다. 크기가 큰 블록의 변환 복잡도를 감소시키기 위해서, 임의의 좌상단 영역만을 남기고 나머지 영역은 '0'으로 재설정될 수 있다.Higher conversion coefficients are distributed toward the top left of the block, and coefficients closer to '0' are distributed toward the bottom right of the block. As the size of the current block increases, there is a possibility that there will be more coefficients of '0' in the lower right area. In order to reduce the conversion complexity of large blocks, only the upper left area can be left and the remaining areas can be reset to '0'.
또한, 코딩 블록에서 일부 영역에만 오차 신호가 존재할 수 있다. 이 경우, 임의의 일부 영역에 대해서만 변환 과정이 수행될 수 있다. 실시 일 예로, 2Nx2N 크기의 블록에서 첫번째 2NxN 블록에만 오차 신호가 존재할 수 있으며, 첫번째 2NxN블록에만 변환과정이 수행되지만 두번째 2NxN 블록은 변환과정이 수행되지 않고 인코딩 또는 디코딩되지 않을 수 있다. 여기서 N은 임의의 양의 정수가 될 수 있다.Additionally, error signals may exist only in some areas of the coding block. In this case, the conversion process may be performed only for some arbitrary areas. As an example, in a block of size 2Nx2N, an error signal may exist only in the first 2NxN block, and a conversion process is performed only on the first 2NxN block, but the conversion process is not performed on the second 2NxN block and may not be encoded or decoded. Here N can be any positive integer.
인코더는 변환 계수가 양자화되기 전에 추가적인 변환을 수행할 수 있다. 전술한 변환 방법은 1차 변환(primary transform)으로 지칭되고, 추가적인 변환은 2차 변환(secondary transform)으로 지칭될 수 있다. 2차 변환은 레지듀얼 블록 별로 선택적일 수 있다. 일 실시예에 따라, 인코더는 1차 변환만으로 저주파 영역에 에너지를 집중시키기 어려운 영역에 대해 2차 변환을 수행하여 코딩 효율을 향상시킬 수 있다. 예를 들어, 레지듀얼 값들이 레지듀얼 블록의 수평 또는 수직 방향 이외의 방향에서 크게 나타나는 블록에 대해 2차 변환이 추가로 수행될 수 있다. 2차 변환은 1차 변환과 달리 수직 변환 및 수평 변환으로 분리되어 수행되지 않을 수 있다. 이러한 2차 변환은 저대역 비-분리 변환(Low Frequency Non-Separable Transform, LFNST)으로 지칭될 수 있다.The encoder may perform additional transformations before the transform coefficients are quantized. The above-described transformation method may be referred to as a primary transform, and additional transformation may be referred to as a secondary transform. Secondary transformation may be optional for each residual block. According to one embodiment, the encoder may improve coding efficiency by performing secondary transformation on a region where it is difficult to concentrate energy in the low-frequency region only through primary transformation. For example, secondary transformation may be additionally performed on a block whose residual values appear large in directions other than the horizontal or vertical direction of the residual block. Unlike primary transformation, secondary transformation may not be performed separately into vertical transformation and horizontal transformation. This secondary transform may be referred to as Low Frequency Non-Separable Transform (LFNST).
양자화부(115)는 변환부(110)에서 출력된 변환 계수 값을 양자화한다.The quantization unit 115 quantizes the transform coefficient value output from the transform unit 110.
코딩 효율을 높이기 위하여 픽쳐 신호를 그대로 코딩하는 것이 아니라, 예측부(150)를 통해 이미 코딩된 영역을 이용하여 픽쳐를 예측하고, 예측된 픽쳐에 원본 픽쳐와 예측 픽쳐 간의 레지듀얼 값을 더하여 복원 픽쳐를 획득하는 방법이 사용된다. 인코더와 디코더에서 미스매치가 발생되지 않도록 하기 위해, 인코더에서 예측을 수행할 때에는 디코더에서도 사용 가능한 정보를 사용해야 한다. 이를 위해, 인코더에서는 부호화한 현재 블록을 다시 복원하는 과정을 수행한다. 역양자화부(120)에서는 변환 계수 값을 역양자화하고, 역변환부(125)에서는 역양자화된 변환 계수값을 이용하여 레지듀얼 값을 복원한다. 한편, 필터링부(130)는 복원된 픽쳐의 품질 개선 및 부호화 효율 향상을 위한 필터링 연산을 수행한다. 예를 들어, 디블록킹 필터, 샘플 적응적 오프셋(Sample Adaptive Offset, SAO) 및 적응적 루프 필터 등이 포함될 수 있다. 필터링을 거친 픽쳐는 출력되거나 참조 픽쳐로 이용하기 위하여 복호 픽쳐 버퍼(Decoded Picture Buffer, DPB, 156)에 저장된다.In order to increase coding efficiency, rather than coding the picture signal as is, the picture is predicted using the already coded area through the prediction unit 150, and the residual value between the original picture and the predicted picture is added to the predicted picture to create a reconstructed picture. A method of obtaining is used. To prevent mismatches between the encoder and decoder, information available in the decoder must be used when performing prediction in the encoder. For this purpose, the encoder performs a process of restoring the current encoded 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. Meanwhile, the filtering unit 130 performs a filtering operation to improve the quality of the reconstructed picture and improve coding efficiency. For example, deblocking filters, sample adaptive offset (SAO), and adaptive loop filters may be included. The filtered picture is output or stored in a decoded picture buffer (DPB, 156) to be used as a reference picture.
디블록킹 필터(deblocking filter)는 복원된 픽쳐에서 블록 간의 경계에 생성된 블록 내의 왜곡을 제거하기 위한 필터이다. 인코더는 블록 내의 임의 경계(edge)를 기준으로 몇 개의 열 또는 행에 포함된 픽셀들의 분포를 통해, 해당 경계에 디블록킹 필터를 적용할지 여부를 판단할 수 있다. 블록에 디블록킹 필터를 적용되는 경우, 인코더는 디블록킹 필터링 강도에 따라 긴 필터(Long Filter), 강한 필터(Strong Filter) 또는 약한 필터(Weak Filter)를 적용할 수 있다. 또한, 수평 방향 필터링 및 수직 방향 필터링이 병렬적으로 처리될 수 있다. 샘플 적응적 오프셋(SAO)은 디블록킹 필터가 적용된 레지듀얼 블록에 대하여, 픽셀 단위로 원본 영상과의 오프셋을 보정하는데 사용될 수 있다. 인코더는 특정 픽쳐에 대한 오프셋을 보정하기 위하여 영상에 포함된 픽셀을 일정한 수의 영역으로 구분한 후, 오프셋 보정을 수행할 영역을 결정하고, 해당 영역에 오프셋을 적용하는 방법(Band Offset)을 사용할 수 있다. 또는 인코더는 각 픽셀의 에지 정보를 고려하여 오프셋을 적용하는 방법(Edge Offset)을 사용할 수 있다. 적응적 루프 필터(Adaptive Loop Filter, ALF)는 영상에 포함된 픽셀을 소정의 그룹으로 나눈 후, 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행하는 방법이다. ALF를 적용할지 여부에 관련된 정보는 코딩 유닛 단위로 시그널링될 수 있고, 각각의 블록에 따라 적용될 ALF 필터의 모양 및 필터 계수가 달라질 수 있다. 또한, 적용할 대상 블록의 특성에 관계없이 동일한 형태(고정된 형태)의 ALF 필터가 적용될 수도 있다.A deblocking filter is a filter for removing distortion within blocks created at the boundaries between blocks in a restored picture. The encoder can determine whether to apply a deblocking filter to the edge based on the distribution of pixels included in several columns or rows based on an arbitrary edge within the block. When a deblocking filter is applied to a block, the encoder can apply a long filter, strong filter, or weak filter depending on the deblocking filtering strength. Additionally, horizontal filtering 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 basis for a residual block to which a deblocking filter has been applied. In order to correct the offset for a specific picture, the encoder divides the pixels included in the image into a certain number of areas, determines the area to perform offset correction, and uses a method (Band Offset) to apply the offset to the area. You can. Alternatively, the encoder can use a method of applying an offset (Edge Offset) by considering the edge information of each pixel. Adaptive Loop Filter (ALF) is a method of dividing pixels included in an image into predetermined groups, then determining one filter to be applied to the group, and performing differential filtering for each group. Information related to whether to apply ALF may be signaled in units of coding units, and the shape and filter coefficients of the ALF filter to be applied may vary for each block. Additionally, an ALF filter of the same type (fixed type) may be applied regardless of the characteristics of the target block to be applied.
예측부(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)에 전달한다.The prediction unit 150 includes an intra prediction unit 152 and an inter prediction unit 154. The intra prediction unit 152 performs intra prediction within the current picture, and the inter prediction unit 154 performs inter prediction using the reference picture stored in the decoded picture buffer 156. Perform. The intra prediction unit 152 performs intra prediction from the reconstructed areas in the current picture and transmits intra encoding information to the entropy coding unit 160. Intra encoding information may include at least one of an intra prediction mode, a Most Probable Mode (MPM) flag, an MPM index, and information about a reference sample. The inter prediction unit 154 may be generated including a motion estimation unit 154a and a motion compensation unit 154b. The motion estimation unit 154a refers to a specific region of the reconstructed reference picture, finds the part most similar to the current region, and obtains a motion vector value that is the distance between regions. Motion information (reference direction indication information (L0 prediction, L1 prediction, bi-directional prediction), reference picture index, motion vector information, etc.) about the reference area obtained from the motion estimation unit 154a is transmitted to the entropy coding unit 160. so that it can be included in the bitstream. Using the motion information transmitted from the motion estimation unit 154a, the motion compensation unit 154b performs inter-motion compensation to generate a prediction block for the current block. The inter prediction unit 154 transmits inter encoding information including motion information about the reference region to the entropy coding unit 160.
추가적인 실시예에 따라, 예측부(150)는 인트라 블록 카피(Intra block copy, IBC) 예측부(미도시)를 포함할 수 있다. IBC 예측부는 현재 픽쳐 내의 복원된 샘플들로부터 IBC 예측을 수행하여, IBC 부호화 정보를 엔트로피 코딩부(160)에 전달한다. IBC 예측부는 현재 픽쳐 내의 특정 영역을 참조하여 현재 영역의 예측에 이용되는 참조 영역을 지시하는 블록 벡터값을 획득한다. IBC 예측부는 획득된 블록 벡터값을 이용하여 IBC 예측을 수행할 수 있다. IBC 예측부는 IBC 부호화 정보를 엔트로피 코딩부(160)로 전달한다. IBC 부호화 정보는 참조 영역의 크기 정보, 블록 벡터 정보(움직임 후보 리스트 내에서 현재 블록의 블록 벡터 예측을 위한 인덱스 정보, 블록 벡터 차분 정보) 중에서 적어도 하나를 포함할 수 있다.According to an additional embodiment, the prediction unit 150 may include an intra block copy (IBC) prediction unit (not shown). The IBC prediction unit performs IBC prediction from the reconstructed samples in the current picture and transmits IBC encoding information to the entropy coding unit 160. The IBC prediction unit refers to a specific region in the current picture and obtains a block vector value indicating a reference region used for prediction of the current region. The IBC prediction unit may perform IBC prediction using the obtained block vector value. The IBC prediction unit transmits IBC encoding information to the entropy coding unit 160. IBC encoding information may include at least one of reference area size information and block vector information (index information for block vector prediction of the current block within the motion candidate list, block vector difference information).
위와 같은 픽쳐 예측이 수행될 경우, 변환부(110)는 원본 픽쳐와 예측 픽쳐 간의 레지듀얼 값을 변환하여 변환 계수 값을 획득한다. 이때, 변환은 픽쳐 내에서 특정 블록 단위로 수행될 수 있으며, 특정 블록의 크기는 기 설정된 범위 내에서 가변할 수 있다. 양자화부(115)는 변환부(110)에서 생성된 변환 계수 값을 양자화하여 양자화된 변환 계수를 엔트로피 코딩부(160)로 전달한다.When the above picture prediction is performed, the transform unit 110 obtains a transform coefficient value by transforming the residual value between the original picture and the predicted picture. At this time, transformation may be performed on a specific block basis within the picture, and the size of the specific block may vary within a preset range. The quantization unit 115 quantizes the transform coefficient value generated by the transform unit 110 and transmits the quantized transform coefficient to the entropy coding unit 160.
상기 2차원 배열 형태의 양자화된 변환 계수는 엔트로피 코딩을 위해 1차원의 배열 형태로 재정렬될 수 있다. 양자화된 변환 계수를 스캐닝하는 방법은 변환 블록의 크기 및 화면 내 예측 모드에 따라 어떠한 스캔 방법이 사용될지 여부가 결정될 수 있다. 실시 일 예로, 대각(Diagonal), 수직(vertical), 수평(horizontal) 스캔이 적용될 수 있다. 이러한 스캔 정보는 블록 단위로 시그널링될 수 있으며, 이미 정해진 규칙에 따라 유도될 수 있다.The quantized transform coefficients in the form of a two-dimensional array can be rearranged into a one-dimensional array for entropy coding. The scanning method for the quantized transform coefficient may be determined depending on the size of the transform block and the intra-screen prediction mode. As an example, diagonal, vertical, and horizontal scans may be applied. This scan information can be signaled in block units and can be derived according to already established rules.
엔트로피 코딩부(160)는 양자화된 변환 계수를 나타내는 정보, 인트라 부호화 정보, 및 인터 부호화 정보 등을 엔트로피 코딩하여 비디오 신호 비트스트림을 생성한다. 엔트로피 코딩부(160)에서는 가변 길이 코딩(Variable Length Coding, VLC) 방식과 산술 코딩(arithmetic coding) 방식 등이 사용될 수 있다. 가변 길이 코딩(VLC) 방식은 입력되는 심볼들을 연속적인 코드워드로 변환하는데, 코드워드의 길이는 가변적일 수 있다. 예를 들어, 자주 발생하는 심볼들을 짧은 코드워드로, 자주 발생하지 않은 심볼들은 긴 코드워드로 표현하는 것이다. 가변 길이 코딩 방식으로서 컨텍스트 기반 적응형 가변 길이 코딩(Context-based Adaptive Variable Length Coding, CAVLC) 방식이 사용될 수 있다. 산술 코딩은 각 데이터 심볼들의 확률 분포를 이용하여 연속적인 데이터 심볼들을 하나의 소수로 변환하는데, 산술 코딩은 각 심볼을 표현하기 위하여 필요한 최적의 소수 비트를 얻을 수 있다. 산술 코딩으로서 컨텍스트 기반 적응형 산술 부호화(Context-based Adaptive Binary Arithmetic Code, CABAC)가 이용될 수 있다. The entropy coding unit 160 generates a video signal bitstream by entropy coding information representing quantized transform coefficients, intra encoding information, and inter encoding information. The entropy coding unit 160 may use a variable length coding (VLC) method or an arithmetic coding method. 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. As a variable length coding method, Context-based Adaptive Variable Length Coding (CAVLC) can be used. Arithmetic coding converts consecutive data symbols into a single decimal number using the probability distribution of each data symbol. Arithmetic coding can obtain the optimal decimal bits needed to express each symbol. As arithmetic coding, context-based adaptive binary arithmetic code (CABAC) can be used.
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)과정이 수행되어 확률 구간이 넓어지고 해당 위치 정보가 출력된다. 또한, 각 빈이 처리된 후, 처리된 빈의 정보를 통해 다음 처리될 빈에 대한 확률이 새롭게 설정되는 확률 업데이트 과정이 수행될 수 있다.CABAC is a method of binary arithmetic encoding using multiple context models created based on probabilities obtained through experiments. The context model can also be called a context model. First, if the symbols are not in binary form, the encoder binarizes each symbol using exp-Golomb, etc. Binarized 0 or 1 can be described as a bin. The CABAC initialization process is divided into context initialization and arithmetic coding initialization. Context initialization is a process of initializing the probability of occurrence of each symbol, and is determined depending on the type of symbol, quantization parameter (QP), and slice type (whether I, P, or B). The context model with this initialization information can use probability-based values obtained through experimentation. The context model provides the probability of occurrence of LPS (Least Probable Symbol) or MPS (Most Probable Symbol) for the symbol currently being coded and information (valMPS) about which empty value among 0 and 1 corresponds to the MPS. One of several context models is selected through a context index (ctxIdx), and the context index can be derived through information on the current block to be encoded or information on surrounding blocks. Initialization for binary arithmetic coding is performed based on the probability model selected from the context model. Binary arithmetic coding is divided into probability intervals using the probability of occurrence of 0 and 1, and then coding is carried out through the process where the probability interval corresponding to the bin to be processed becomes the entire probability interval for the next bin to be processed. Location information within the probability interval where the last bin was processed is output. However, since the probability interval cannot be divided indefinitely, when it is reduced to within a certain size, a renormalization process is performed to widen the probability interval and the corresponding location information is output. Additionally, after each bin is processed, a probability update process may be performed in which the probability of the next bin to be processed is newly set through information on the processed bin.
상기 생성된 비트스트림은 NAL(Network Abstraction Layer) 유닛을 기본 단위로 캡슐화 된다. NAL 유닛은 영상 데이터를 포함하는 VCL(Video Coding Layer) NAL 유닛과 영상 데이터를 디코딩하기 위한 파라미터 정보를 포함하는 non-VCL NAL 유닛으로 구분되며, 다양한 종류의 VCL 또는 non-VCL NAL 유닛이 존재한다. NAL 유닛은 NAL 헤더 정보와 데이터인 RBSP(Raw Byte Sequence Payload)로 생성되며, NAL 헤더 정보에는 RBSP에 대한 요약 정보가 포함된다. VCL NAL 유닛의 RBSP에는 부호화된 정수 개의 코딩 트리 유닛(coding tree unit)을 포함한다. 비디오 디코더에서 비트스트림을 복호화하기 위해서는 먼저 비트스트림을 NAL 유닛 단위로 분리한 후, 분리된 각각의 NAL 유닛을 복호화해야 한다. 한편, 비디오 신호 비트스트림의 복호화를 위해 필요한 정보들은 픽쳐 파라미터 세트(Picture Parameter Set, PPS), 시퀀스 파라미터 세트(Sequence Parameter Set, SPS), 비디오 파라미터 세트(Video Parameter Set, VPS) 등에 포함되어 전송될 수 있다.The generated bitstream is encapsulated in a NAL (Network Abstraction Layer) unit as a basic unit. 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. There are various types of VCL or non-VCL NAL units. . The NAL unit is created with NAL header information and data, RBSP (Raw Byte Sequence Payload), and the NAL header information includes summary information about the RBSP. The RBSP of the VCL NAL unit includes an encoded integer number of coding tree units. In order to decode a bitstream in a video decoder, the bitstream must first be separated into NAL units, and then each separated NAL unit must be decoded. Meanwhile, the information required for decoding the video signal bitstream will be transmitted in a picture parameter set (PPS), sequence parameter set (SPS), video parameter set (VPS), etc. You can.
한편, 도 1의 블록도는 본 발명의 일 실시예에 따른 인코딩 장치(100)를 나타낸 것으로서, 분리하여 표시된 블록들은 인코딩 장치(100)의 엘리먼트들을 논리적으로 구별하여 도시한 것이다. 따라서 전술한 인코딩 장치(100)의 엘리먼트들은 디바이스의 설계에 따라 하나의 칩으로 또는 복수의 칩으로 장착될 수 있다. 일 실시예에 따르면, 전술한 인코딩 장치(100)의 각 엘리먼트의 동작은 프로세서(미도시)에 의해 수행될 수 있다.Meanwhile, the block diagram of FIG. 1 shows the encoding device 100 according to an embodiment of the present invention, and the separately displayed blocks show elements of the encoding device 100 logically distinguished. Accordingly, the elements of the above-described encoding device 100 may be mounted as one chip or as a plurality of chips depending on the design of the device. According to one embodiment, the operation of each element of the above-described encoding device 100 may be performed by a processor (not shown).
도 2는 본 발명의 일 실시예에 따른 비디오 신호 디코딩 장치(200)의 개략적인 블록도이다. 도 2를 참조하면 본 발명의 디코딩 장치(200)는 엔트로피 디코딩부(210), 역양자화부(220), 역변환부(225), 필터링부(230) 및 예측부(250)를 포함한다.Figure 2 is a schematic block diagram of a video signal decoding device 200 according to an embodiment of the present invention. Referring to FIG. 2, the decoding device 200 of the present invention includes an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 225, a filtering unit 230, and a prediction unit 250.
엔트로피 디코딩부(210)는 비디오 신호 비트스트림을 엔트로피 디코딩하여, 각 영역에 대한 변환 계수 정보, 인트라 부호화 정보, 인터 부호화 정보 등을 추출한다. 예를 들어, 엔트로피 디코딩부(210)는 비디오 신호 비트스트림으로부터 특정 영역의 변환 계수 정보에 대한 이진화 코드를 획득할 수 있다. 또한, 엔트로피 디코딩부(210)는 이진화 코드를 역 이진화하여 양자화된 변환 계수를 획득한다. 역양자화부(220)는 양자화된 변환 계수를 역양자화하고, 역변환부(225)는 역양자화된 변환 계수를 이용하여 레지듀얼 값을 복원한다. 비디오 신호 처리 장치(200)는 역변환부(225)에서 획득된 레지듀얼 값을 예측부(250)에서 획득된 예측 값과 합산하여 원래의 화소값을 복원한다.The entropy decoding unit 210 entropy decodes the video signal bitstream and extracts transform coefficient information, intra encoding information, and inter encoding information for each region. For example, the entropy decoder 210 may obtain a binarization code for transform coefficient information of a specific area from a video signal bitstream. Additionally, 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 summing the residual value obtained from the inverse transform unit 225 with the predicted value obtained from the prediction unit 250.
한편, 필터링부(230)는 픽쳐에 대한 필터링을 수행하여 화질을 향상시킨다. 여기에는 블록 왜곡 현상을 감소시키기 위한 디블록킹 필터 및/또는 픽쳐 전체의 왜곡 제거를 위한 적응적 루프 필터 등이 포함될 수 있다. 필터링을 거친 픽쳐는 출력되거나 다음 픽쳐에 대한 참조 픽쳐로 이용하기 위하여 복호 픽쳐 버퍼(DPB, 256)에 저장된다.Meanwhile, the filtering unit 230 improves image quality by performing filtering on the picture. This may include a deblocking filter to reduce block distortion and/or an adaptive loop filter to remove distortion of the entire picture. The filtered picture is output or stored in the decoded picture buffer (DPB, 256) to be used as a reference picture for the next picture.
예측부(250)는 인트라 예측부(252) 및 인터 예측부(254)를 포함한다. 예측부(250)는 전술한 엔트로피 디코딩부(210)를 통해 복호화된 부호화 타입, 각 영역에 대한 변환 계수, 인트라/인터 부호화 정보 등을 활용하여 예측 픽쳐를 생성한다. 복호화가 수행되는 현재 블록을 복원하기 위해서, 현재 블록이 포함된 현재 픽쳐 또는 다른 픽쳐들의 복호화된 영역이 이용될 수 있다. 복원에 현재 픽쳐만을 이용하는, 즉 인트라 예측 또는 인트라 BC 예측을 수행하는 픽쳐(또는, 타일/슬라이스)를 인트라 픽쳐 또는 I 픽쳐(또는, 타일/슬라이스), 인트라 예측, 인터 예측 및 인트라 BC 예측을 모두 수행할 수 있는 픽쳐(또는, 타일/슬라이스)를 인터 픽쳐(또는, 타일/슬라이스)라고 한다. 인터 픽쳐(또는, 타일/슬라이스) 중 각 블록의 샘플값들을 예측하기 위하여 최대 하나의 모션 벡터 및 참조 픽쳐 인덱스를 이용하는 픽쳐(또는, 타일/슬라이스)를 예측 픽쳐(predictive picture) 또는 P 픽쳐(또는, 타일/슬라이스)라고 하며, 최대 두 개의 모션 벡터 및 참조 픽쳐 인덱스를 이용하는 픽쳐(또는, 타일/슬라이스)를 쌍예측 픽쳐(Bi-predictive picture) 또는 B 픽쳐(또는, 타일/슬라이스) 라고 한다. 다시 말해서, P 픽쳐(또는, 타일/슬라이스)는 각 블록을 예측하기 위해 최대 하나의 모션 정보 세트를 이용하고, B 픽쳐(또는, 타일/슬라이스)는 각 블록을 예측하기 위해 최대 두 개의 모션 정보 세트를 이용한다. 여기서, 모션 정보 세트는 하나 이상의 모션 벡터와 하나의 참조 픽쳐 인덱스를 포함한다.The prediction unit 250 includes an intra prediction unit 252 and an inter prediction unit 254. The prediction unit 250 generates a prediction picture using the coding type decoded through the entropy decoding unit 210, transform coefficients for each region, intra/inter coding information, etc. To restore the current block on which decoding is performed, the current picture including the current block or the decoded area of other pictures can be used. Only the current picture is used for reconstruction, that is, a picture (or tile/slice) that performs intra prediction or intra BC prediction is used as an intra picture or I picture (or tile/slice), intra prediction, both inter prediction and intra BC prediction. A picture (or tile/slice) that can be performed is called an inter picture (or tile/slice). To predict sample values of each block among inter pictures (or tiles/slices), a picture (or tile/slice) that uses up to one motion vector and reference picture index is called a predictive picture or P picture (or , tile/slice), and a picture (or tile/slice) using up to two motion vectors and a reference picture index is called a bi-predictive picture or B picture (or tile/slice). In other words, a P picture (or tile/slice) uses at most one set of motion information to predict each block, and a B picture (or tile/slice) uses at most two sets of motion information to predict each block. Use a set. Here, the motion information set includes one or more motion vectors and one reference picture index.
인트라 예측부(252)는 인트라 부호화 정보 및 현재 픽쳐 내의 복원된 샘플들을 이용하여 예측 블록을 생성한다. 전술한 바와 같이, 인트라 부호화 정보는 인트라 예측 모드, MPM(Most Probable Mode) 플래그, MPM 인덱스 중 적어도 하나를 포함할 수 있다. 인트라 예측부(252)는 현재 블록의 좌측 및/또는 상측에 위치한 복원된 샘플들을 참조 샘플들로 이용하여 현재 블록의 샘플 값들을 예측한다. 본 개시에서, 복원된 샘플들, 참조 샘플들 및 현재 블록의 샘플들은 픽셀들을 나타낼 수 있다. 또한, 샘플 값(sample value)들은 픽셀 값들을 나타낼 수 있다.The intra prediction unit 252 generates a prediction block using intra encoding information and reconstructed samples in the current picture. As described above, intra encoding information may include at least one of an intra prediction mode, a Most Probable Mode (MPM) flag, and an MPM index. The intra prediction unit 252 predicts sample values of the current block using reconstructed samples located to the left and/or above the current block as reference samples. In this disclosure, reconstructed samples, reference samples, and samples of the current block may represent pixels. Additionally, sample values may represent pixel values.
일 실시예에 따르면, 참조 샘플들은 현재 블록의 주변 블록에 포함된 샘플들일 수 있다. 예를 들어, 참조 샘플들은 현재 블록의 좌측 경계에 인접한 샘플들 및/또는 상측 경계에 인접한 샘플들일 수 있다. 또한, 참조 샘플들은 현재 블록의 주변 블록의 샘플들 중 현재 블록의 좌측 경계로부터 기 설정된 거리 이내의 라인 상에 위치하는 샘플들 및/또는 현재 블록의 상측 경계로부터 기 설정된 거리 이내의 라인 상에 위치하는 샘플들일 수 있다. 이때, 현재 블록의 주변 블록은 현재 블록에 인접한 좌측(L) 블록, 상측(A) 블록, 하좌측(Below Left, BL) 블록, 상우측(Above Right, AR) 블록 또는 상좌측(Above Left, AL) 블록 중 적어도 하나를 포함할 수 있다.According to one embodiment, the reference samples may be samples included in neighboring blocks of the current block. For example, the reference samples may be samples adjacent to the left border and/or samples adjacent to the upper boundary of the current block. In addition, the reference samples are samples of neighboring blocks of the current block, which are located on a line within a preset distance from the left border of the current block and/or are located on a line within a preset distance from the upper border of the current block. These may be samples that do. At this time, the surrounding blocks of the current block are the left (L) block, upper (A) block, Below Left (BL) block, Above Right (AR) block, or Above Left block adjacent to the current block. AL) may include at least one block.
인터 예측부(254)는 복호 픽쳐 버퍼(256)에 저장된 참조 픽쳐 및 인터 부호화 정보를 이용하여 예측 블록을 생성한다. 인터 부호화 정보는 참조 블록에 대한 현재 블록의 모션 정보 세트(참조 픽쳐 인덱스, 모션 벡터 정보 등)를 포함할 수 있다. 인터 예측에는 L0 예측, L1 예측 및 쌍예측(Bi-prediction)이 있을 수 있다. L0 예측은 L0 픽쳐 리스트에 포함된 1개의 참조 픽쳐를 이용한 예측이고, L1 예측은 L1 픽쳐 리스트에 포함된 1개의 참조 픽쳐를 이용한 예측을 의미한다. 이를 위해서는 1세트의 모션 정보(예를 들어, 모션 벡터 및 참조 픽쳐 인덱스)가 필요할 수 있다. 쌍예측 방식에서는 최대 2개의 참조 영역을 이용할 수 있는데, 이 2개의 참조 영역은 동일한 참조 픽쳐에 존재할 수도 있고, 서로 다른 픽쳐에 각각 존재할 수도 있다. 즉, 쌍예측 방식에서는 최대 2세트의 모션 정보(예를 들어, 모션 벡터 및 참조 픽쳐 인덱스)가 이용될 수 있는데, 2개의 모션 벡터가 동일한 참조 픽쳐 인덱스에 대응될 수도 있고 서로 다른 참조 픽쳐 인덱스에 대응될 수도 있다. 이때, 참조 픽쳐들은 현재 픽쳐를 기준으로 시간적으로 이전 또는 이후에 위치하는 픽쳐로서, 이미 복원된 완료된 픽쳐가 될 수 있다. 일 실시예에 따라, 쌍예측 방식에서는 사용되는 2개의 참조 영역은 L0 픽쳐 리스트 및 L1 픽쳐 리스트 각각에서 선택된 영역일 수 있다.The inter prediction unit 254 generates a prediction block using the reference picture and inter encoding information stored in the decoded picture buffer 256. 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 refers to prediction using one reference picture included in the L0 picture list, and L1 prediction refers to prediction using one reference picture included in the L1 picture list. This may require one set of motion information (eg, motion vector and reference picture index). In the pair prediction method, a maximum of two reference regions can be used, and these two reference regions may exist in the same reference picture or in different pictures. That is, in the pair prediction method, up to two sets of motion information (e.g., a motion vector and a reference picture index) can be used, and the two motion vectors may correspond to the same reference picture index or may correspond to different reference picture indices. It may be possible to respond. At this time, the reference pictures are pictures located temporally before or after the current picture, and may be pictures that have already been reconstructed. According to one embodiment, the two reference regions used in the bi-prediction method may be regions selected from the L0 picture list and the L1 picture list, respectively.
인터 예측부(254)는 모션 벡터 및 참조 픽쳐 인덱스를 이용하여 현재 블록의 참조 블록을 획득할 수 있다. 상기 참조 블록은 참조 픽쳐 인덱스에 대응하는 참조 픽쳐 내에 존재한다. 또한, 모션 벡터에 의해서 특정된 블록의 샘플 값 또는 이의 보간(interpolation)된 값이 현재 블록의 예측자(predictor)로 이용될 수 있다. 서브펠(sub-pel) 단위의 픽셀 정확도를 갖는 모션 예측을 위하여 이를 테면, 휘도 신호에 대하여 8-탭 보간 필터가, 색차 신호에 대하여 4-탭 보간 필터가 사용될 수 있다. 다만, 서브펠 단위의 모션 예측을 위한 보간 필터는 이에 한정되지 않는다. 이와 같이 인터 예측부(254)는 이전에 복원된 픽쳐로부터 현재 유닛의 텍스쳐를 예측하는 모션 보상(motion compensation)을 수행한다. 이때, 인터 예측부는 모션 정보 세트를 이용할 수 있다.The inter prediction unit 254 may 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 a reference picture index. Additionally, the sample value of the block specified by the motion vector or its interpolated value may be used as a predictor of the current block. For motion prediction with sub-pel unit pixel accuracy, for example, an 8-tap interpolation filter can be used for the luminance signal and a 4-tap interpolation filter can be used for the chrominance signal. However, the interpolation filter for motion prediction in subpel units is not limited to this. In this way, the inter prediction unit 254 performs motion compensation to predict the texture of the current unit from the previously restored picture. At this time, the inter prediction unit can use a motion information set.
추가적인 실시예에 따라, 예측부(250)는 IBC 예측부(미도시)를 포함할 수 있다. IBC 예측부는 현재 픽쳐 내의 복원된 샘플들을 포함하는 특정 영역을 참조하여 현재 영역을 복원할 수 있다. IBC 예측부는 엔트로피 디코딩부(210)로부터 획득된 IBC 부호화 정보를 이용하여 IBC 예측을 수행할 수 있다. IBC 부호화 정보는 블록 벡터 정보를 포함할 수 있다.According to an additional embodiment, the prediction unit 250 may include an IBC prediction unit (not shown). The IBC prediction unit can reconstruct the current region by referring to a specific region containing reconstructed samples in the current picture. The IBC prediction unit may perform IBC prediction using the IBC encoding information obtained from the entropy decoding unit 210. IBC encoding information may include block vector information.
상기 인트라 예측부(252) 또는 인터 예측부(254)로부터 출력된 예측값, 및 역변환부(225)로부터 출력된 레지듀얼 값이 더해져서 복원된 비디오 픽쳐가 생성된다. 즉, 비디오 신호 디코딩 장치(200)는 예측부(250)에서 생성된 예측 블록과 역변환부(225)로부터 획득된 레지듀얼을 이용하여 현재 블록을 복원한다.The predicted value output from the intra prediction unit 252 or the inter prediction unit 254 and the residual value output from the inverse transform unit 225 are added to generate a restored video picture. That is, the video signal decoding apparatus 200 restores the current block using the prediction block generated by the prediction unit 250 and the residual obtained from the inverse transform unit 225.
한편, 도 2의 블록도는 본 발명의 일 실시예에 따른 디코딩 장치(200)를 나타낸 것으로서, 분리하여 표시된 블록들은 디코딩 장치(200)의 엘리먼트들을 논리적으로 구별하여 도시한 것이다. 따라서 전술한 디코딩 장치(200)의 엘리먼트들은 디바이스의 설계에 따라 하나의 칩으로 또는 복수의 칩으로 장착될 수 있다. 일 실시예에 따르면, 전술한 디코딩 장치(200)의 각 엘리먼트의 동작은 프로세서(미도시)에 의해 수행될 수 있다.Meanwhile, the block diagram of FIG. 2 shows a decoding device 200 according to an embodiment of the present invention, and the separately displayed blocks show elements of the decoding device 200 logically distinguished. Accordingly, the elements of the above-described decoding device 200 may be mounted as one chip or as a plurality of chips depending on the design of the device. According to one embodiment, the operation of each element of the above-described decoding device 200 may be performed by a processor (not shown).
한편, 본 명세서에서 제안된 기술은 인코더와 디코더의 방법 및 장치에 모두 적용 가능한 기술이며, 시그널링과 파싱으로 기술된 부분은 설명의 편의를 위해 기술한 것일 수 있다. 일반적으로 시그널링은 인코더 관점에서 각 신택스(syntax)를 부호화하기 위한 것이고, 파싱은 디코더 관점에서 각 신택스의 해석을 위한 것으로 설명될 수 있다. 즉, 각 신택스는 인코더로부터 비트스트림에 포함되어 시그널링될 수 있으며, 디코더에서는 신택스를 파싱하여 복원과정에서 사용할 수 있다. 이때, 규정된 계층적 생성대로 나열한 각 신택스에 대한 비트의 시퀀스를 비트스트림이라고 할 수 있다.Meanwhile, the technology proposed in this specification is applicable to both encoder and decoder methods and devices, and parts described as signaling and parsing may be described for convenience of explanation. In general, signaling can be described as encoding each syntax from an encoder's perspective, and parsing can be described as interpreting each syntax from a decoder's perspective. That is, each syntax can be signaled by being included in the bitstream from the encoder, and the decoder can parse the syntax and use it in the restoration process. At this time, the sequence of bits for each syntax listed according to the prescribed hierarchical generation can be referred to as a bitstream.
하나의 픽쳐는 서브 픽쳐(sub-picture), 슬라이스(slice), 타일(tile) 등으로 분할되어 부호화될 수 있다. 서브 픽쳐는 하나 이상의 슬라이스 또는 타일을 포함할 수 있다. 하나의 픽쳐가 여러 개의 슬라이스 또는 타일로 분할되어 부호화되었을 경우, 픽쳐 내의 모든 슬라이스 또는 타일이 디코딩이 완료되어야만 화면에 출력이 가능하다. 반면에, 하나의 픽쳐가 여러 개의 서브 픽쳐로 부호화되었을 경우, 임의의 서브 픽쳐만 디코딩되어 화면에 출력될 수 있다. 슬라이스는 여러 개의 타일 또는 서브 픽쳐를 포함할 수 있다. 또는 타일은 여러 개의 서브 픽쳐 또는 슬라이스를 포함할 수 있다. 서브 픽쳐, 슬라이스, 타일은 서로 독립적으로 인코딩 또는 디코딩이 가능하므로 병렬처리 및 처리 속도 향상에 효과적이다. 하지만, 인접한 다른 서브 픽쳐, 다른 슬라이스, 다른 타일의 부호화된 정보를 이용할 수 없으므로 비트량이 증가되는 단점이 있다. 서브 픽쳐, 슬라이스, 타일은 여러 개의 코딩 트리 유닛(Coding Tree Unit, CTU)으로 분할되어 부호화될 수 있다.One picture may be divided into sub-pictures, slices, tiles, etc. and encoded. A subpicture may include one or more slices or tiles. If one picture is divided into multiple slices or tiles and encoded, it can be displayed on the screen only when all slices or tiles in the picture have been decoded. On the other hand, when one picture is encoded with several subpictures, only arbitrary subpictures can be decoded and displayed on the screen. A slice may contain multiple tiles or subpictures. Alternatively, a tile may include multiple subpictures or slices. Subpictures, slices, and tiles can be encoded or decoded independently of each other, which is effective in improving parallel processing and processing speed. However, there is a disadvantage in that the bit amount increases because encoded information of other adjacent subpictures, other slices, and other tiles cannot be used. Subpictures, slices, and tiles can be divided into multiple Coding Tree Units (CTUs) and encoded.
도 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개의 색차 변환 블록들, 그리고 그것의 부호화된 신택스 정보로 생성될 수 있다. 코딩 트리 유닛은 복수의 코딩 유닛들로 분할될 수 있다. 코딩 트리 유닛은 분할되지 않고 리프 노드가 될 수도 있다. 이 경우, 코딩 트리 유닛 자체가 코딩 유닛이 될 수 있다. Figure 3 shows an embodiment in which a Coding Tree Unit (CTU) is divided into Coding Units (CUs) within a picture. In the process of coding a video signal, a picture can be divided into a sequence of coding tree units (CTUs). A coding tree unit can be created with a luma coding tree block (CTB), two chroma coding tree blocks, and its encoded syntax information. One coding tree unit can be created as one coding unit, or one coding tree unit can be divided into multiple coding units. One coding unit can be created with a luminance coding block (CB), two chrominance coding blocks, and its encoded syntax information. One coding block can be divided into several sub-coding blocks. One coding unit can be created as one transform unit (TU), or one coding unit can be divided into several transform units. One transform unit can be created with a luminance transform block (Transform Block, TB), two chrominance transform blocks, and its encoded syntax information. A coding tree unit may be divided into a plurality of coding units. A coding tree unit may be a leaf node without being split. In this case, the coding tree unit itself may be a coding unit.
코딩 유닛은 상기에서 설명한 비디오 신호의 처리 과정, 즉 인트라/인터 예측, 변환, 양자화 및/또는 엔트로피 코딩 등의 과정에서 픽쳐를 처리하기 위한 기본 단위를 가리킨다. 하나의 픽쳐 내에서 코딩 유닛의 크기 및 모양은 일정하지 않을 수 있다. 코딩 유닛은 정사각형 또는 직사각형의 모양을 가질 수 있다. 직사각형 코딩 유닛(또는, 직사각형 블록)은 수직 코딩 유닛(또는, 수직 블록)과 수평 코딩 유닛(또는, 수평 블록)을 포함한다. 본 명세서에서, 수직 블록은 높이가 너비보다 큰 블록이며, 수평 블록은 너비가 높이보다 큰 블록이다. 또한, 본 명세서에서 정사각형이 아닌(non-square) 블록은 직사각형 블록을 가리킬 수 있지만, 본 발명은 이에 한정되지 않는다.A coding unit refers to a basic unit for processing a picture in the video signal processing process described above, that is, intra/inter prediction, transformation, quantization, and/or entropy coding. The size and shape of a coding unit within one picture may not be constant. The 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). In this specification, a vertical block is a block whose height is greater than its width, and a horizontal block is a block whose width is greater than its height. Additionally, in this specification, a non-square block may refer to a rectangular block, but the present invention is not limited thereto.
도 3을 참조하면, 코딩 트리 유닛은 먼저 쿼드 트리(Quad Tree, QT) 구조로 분할된다. 즉, 쿼드 트리 구조에서 2NX2N 크기를 가지는 하나의 노드는 NXN 크기를 가지는 네 개의 노드들로 분할될 수 있다. 본 명세서에서 쿼드 트리는 4진(quaternary) 트리로도 지칭될 수 있다. 쿼드 트리 분할은 재귀적으로 수행될 수 있으며, 모든 노드들이 동일한 깊이로 분할될 필요는 없다.Referring to Figure 3, the coding tree unit is first divided into a quad tree (Quad Tree, QT) structure. That is, in a quad tree structure, one node with a size of 2NX2N can be divided into four nodes with a size of NXN. In this specification, a quad tree may also be referred to as a quaternary tree. Quad-tree partitioning can be performed recursively, and not all nodes need to be partitioned to the same depth.
한편, 전술한 쿼드 트리의 리프 노드(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)의 노드들로 분할될 수 있다. 이러한 멀티-타입 트리 분할은 재귀적으로 수행될 수 있다.Meanwhile, the leaf nodes of the aforementioned quad tree can be further divided into a multi-type tree (MTT) structure. According to an embodiment of the present invention, in a multi-type tree structure, one node may be divided into a binary or ternary tree structure with horizontal or vertical division. That is, there are four division structures in the multi-type tree structure: vertical binary division, horizontal binary division, vertical ternary division, and horizontal ternary division. According to an embodiment of the present invention, the width and height of the nodes in each tree structure may both have values that are powers of 2. For example, in a Binary Tree (BT) structure, a node of size 2NX2N may be divided into two NX2N nodes by vertical binary division and into two 2NXN nodes by horizontal binary division. Additionally, in the Ternary Tree (TT) structure, a node of size 2NX2N is divided into nodes of (N/2)X2N, NX2N and (N/2)X2N by vertical ternary division, and horizontal ternary division By division, it can be divided into nodes of 2NX(N/2), 2NXN, and 2NX(N/2). This multi-type tree partitioning can be performed recursively.
멀티-타입 트리의 리프 노드는 코딩 유닛이 될 수 있다. 코딩 유닛이 최대 변환 길이에 비해 크지 않은 경우, 해당 코딩 유닛은 더 이상의 분할 없이 예측 및/또는 변환의 단위로 사용될 수 있다. 일 실시예로서, 현재 코딩 유닛의 너비 또는 높이가 최대 변환 길이보다 큰 경우, 현재 코딩 유닛은 분할에 관한 명시적 시그널링 없이 복수의 변환 유닛으로 분할될 수 있다. 한편, 전술한 쿼드 트리 및 멀티-타입 트리에서 다음의 파라메터들 중 적어도 하나가 사전에 정의되거나 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 리프 노드 크기.Leaf nodes of a multi-type tree can be coding units. 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 division. As an example, if the width or height of the current coding unit is greater than the maximum transform length, the current coding unit may be split into a plurality of transform units without explicit signaling regarding splitting. Meanwhile, in the above-described quad tree and multi-type tree, at least one of the following parameters may be defined in advance or transmitted through an RBSP of a higher level set such as PPS, SPS, VPS, etc. 1) CTU size: the root node size of the quad tree, 2) minimum QT size (MinQtSize): minimum allowed QT leaf node size, 3) maximum BT size (MaxBtSize): maximum allowed BT root node size, 4) Maximum TT Size (MaxTtSize): Maximum TT root node size allowed, 5) Maximum MTT Depth (MaxMttDepth): Maximum allowed depth of MTT split from leaf nodes of QT, 6) Minimum BT Size (MinBtSize): Allowed Minimum BT leaf node size, 7) Minimum TT size (MinTtSize): Minimum TT leaf node size allowed.
도 4는 쿼드 트리 및 멀티-타입 트리의 분할을 시그널링하는 방법의 일 실시예를 도시한다. 전술한 쿼드 트리 및 멀티-타입 트리의 분할을 시그널링하기 위해 기 설정된 플래그들이 사용될 수 있다. 도 4를 참조하면, 노드의 분할 여부를 지시하는 플래그 'split_cu_flag', 쿼드 트리 노드의 분할 여부를 지시하는 플래그 'split_qt_flag', 멀티-타입 트리 노드의 분할 방향을 지시하는 플래그 'mtt_split_cu_vertical_flag' 또는 멀티-타입 트리 노드의 분할 모양을 지시하는 플래그 'mtt_split_cu_binary_flag' 중 적어도 하나가 사용될 수 있다.Figure 4 shows one embodiment of a method for signaling splitting of quad trees and multi-type trees. Preset flags can be used to signal division of the above-described quad tree and multi-type tree. Referring to Figure 4, a flag 'split_cu_flag' indicating whether to split a node, a flag 'split_qt_flag' indicating whether to split a quad tree node, a flag 'mtt_split_cu_vertical_flag' indicating the splitting direction of a multi-type tree node, or a multi-type tree node. At least one of the flags 'mtt_split_cu_binary_flag' that indicates the split shape of the type tree node can be used.
본 발명의 실시예에 따르면, 현재 노드의 분할 여부를 지시하는 플래그인 'split_cu_flag'가 먼저 시그널링될 수 있다. 'split_cu_flag'의 값이 0인 경우, 현재 노드가 분할되지 않는 것을 나타내며, 현재 노드는 코딩 유닛이 된다. 현재 노드가 코팅 트리 유닛인 경우, 코딩 트리 유닛은 분할되지 않은 하나의 코딩 유닛을 포함한다. 현재 노드가 쿼드 트리 노드 'QT node'인 경우, 현재 노드는 쿼드 트리의 리프 노드 'QT leaf node'이며 코딩 유닛이 된다. 현재 노드가 멀티-타입 트리 노드 'MTT node'인 경우, 현재 노드는 멀티-타입 트리의 리프 노드 'MTT leaf node'이며 코딩 유닛이 된다.According to an embodiment of the present invention, 'split_cu_flag', a flag indicating whether to split the current node, may be signaled first. If the value of 'split_cu_flag' is 0, it indicates that the current node is not split, and the current node becomes a coding unit. If the current node is a coating tree unit, the coding tree unit includes one undivided coding unit. 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.
'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개의 직사각형 노드들로 분할된다.If the value of 'split_cu_flag' is 1, the current node can be divided into nodes of a quad tree or multi-type tree according to the value of 'split_qt_flag'. The coding tree unit is the root node of the quad tree and can be first divided into a quad tree structure. In the quad tree structure, 'split_qt_flag' is signaled for each node 'QT node'. If the value of 'split_qt_flag' is 1, the node is split into 4 square nodes, and if the value of 'split_qt_flag' is 0, the node becomes a leaf node 'QT leaf node' of the quad tree, and the node becomes a multi-square node. -Divided into type nodes. According to an embodiment of the present invention, quad tree division may 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 the quot tree) or a quot tree node, and quot tree splitting may not be allowed if the current node is a multi-type tree node. Each quad tree leaf node 'QT leaf node' can be further divided into a multi-type tree structure. As described above, if 'split_qt_flag' is 0, the current node can be split into multi-type nodes. To indicate the split direction and split shape, 'mtt_split_cu_vertical_flag' and 'mtt_split_cu_binary_flag' may be signaled. If the value of 'mtt_split_cu_vertical_flag' is 1, vertical splitting of the node 'MTT node' is indicated, and if the value of 'mtt_split_cu_vertical_flag' is 0, horizontal splitting of the node 'MTT node' is indicated. Additionally, if the value of 'mtt_split_cu_binary_flag' is 1, the node 'MTT node' is divided into two rectangular nodes, and if the value of 'mtt_split_cu_binary_flag' is 0, the node 'MTT node' is divided into three rectangular nodes.
트리 분할 구조는 휘도 블록과 색차 블록이 동일한 형태로 분할될 수 있다. 즉, 색차 블록은 휘도 블록의 분할 형태를 참조하여 색차 블록을 분할할 수 있다. 현재 색차 블록이 임의의 정해진 크기보다 적다면, 휘도 블록이 분할되었더라도 색차 블록은 분할되지 않을 수 있다.In the tree division structure, the luminance block and the chrominance block can be divided into the same form. That is, the chrominance block can be divided by referring to the division type of the luminance block. If the current chrominance block is smaller than a certain size, the chrominance block may not be divided even if the luminance block is divided.
트리 분할 구조는 휘도 블록과 색차 블록이 서로 다른 형태를 가질 수 있다. 이때, 휘도 블록에 대한 분할 정보와 색차 블록에 대한 분할 정보가 각각 시그널링될 수 있다. 또한, 분할 정보 뿐만 아니라 휘도 블록과 색차 블록의 부호화 정보도 다를 수 있다. 실시 일 예로, 휘도 블록과 색차 블록의 인트라 부호화 모드, 움직임 정보에 대한 부호화 정보 등이 적어도 하나 이상 다를 수 있다.In the tree division structure, the luminance block and the chrominance block may have different forms. At this time, division information for the luminance block and division information for the chrominance block may be signaled, respectively. Additionally, not only the division information but also the encoding information of the luminance block and the chrominance block may be different. As an example of an embodiment, at least one intra coding mode of a luminance block and a chrominance block, encoding information for motion information, etc. may be different.
가장 작은 단위로 분할될 노드는 하나의 코딩 블록으로 처리될 수 있다. 현재 블록이 코딩 블록일 경우, 코딩 블록은 여러 개의 서브 블록(서브 코딩 블록)으로 분할될 수 있으며, 각 서브 블록의 예측 정보는 서로 같거나 또는 다를 수 있다. 실시 일 예로, 코딩 유닛이 인트라 모드일 경우, 각 서브 블록의 인트라 예측 모드는 서로 같거나 또는 다를 수 있다. 또한, 코딩 유닛이 인터 모드일 경우, 각 서브 블록의 움직임 정보는 서로 같거나 또는 다를 수 있다. 또한, 각 서브 블록은 서로 독립적으로 인코딩 또는 디코딩이 가능할 수 있다. 각각의 서브 블록은 서브 블록 인덱스(sub-block index, sbIdx)를 통해 구분될 수 있다. 또한 코딩 유닛이 서브 블록으로 분할될 때, 수평 또는 수직 방향으로 분할되거나 사선으로 분할될 수 있다. 인트라 모드에서 현재 코딩 유닛을 수평 또는 수직 방향으로 2개 또는 4개의 서브 블록으로 분할하는 모드를 ISP(Intra Sub Partitions)이라 한다. 인터 모드에서 현재 코딩 블록을 사선으로 분할하는 모드를 GPM(geometric partitioning mode)이라 한다. GPM모드에서 사선의 위치와 방향은 미리 지정된 각도 테이블을 사용하여 유도하고, 각도 테이블의 인덱스 정보가 시그널링된다.A node to be divided into the smallest unit can be processed as one coding block. When the current block is a coding block, the coding block may be divided into several sub-blocks (sub-coding blocks), and the prediction information of each sub-block may be the same or different. As an example embodiment, when the coding unit is an intra mode, the intra prediction mode of each subblock may be the same or different from each other. Additionally, when the coding unit is in inter mode, the motion information of each sub-block may be the same or different. Additionally, each sub-block may be encoded or decoded independently from each other. Each sub-block can be distinguished through a sub-block index (sbIdx). Additionally, when a coding unit is divided into sub-blocks, it may be divided horizontally or vertically or diagonally. In intra mode, the mode in which the current coding unit is divided into 2 or 4 sub-blocks horizontally or vertically is called ISP (Intra Sub Partitions). In inter mode, the mode in which the current coding block is divided diagonally is called GPM (geometric partitioning mode). In GPM mode, the position and direction of the diagonal line are derived using a pre-designated angle table, and the index information of the angle table is signaled.
코딩을 위한 픽쳐 예측(모션 보상)은 더 이상 나누어지지 않는 코딩 유닛(즉 코딩 트리 유닛의 리프 노드)을 대상으로 이루어진다. 이러한 예측을 수행하는 기본 단위를 이하에서는 예측 유닛(prediction unit) 또는 예측 블록(prediction block)이라고 한다.Picture prediction (motion compensation) for coding is performed on coding units that are no longer divided (i.e., leaf nodes of coding tree units). The basic unit that performs such prediction is hereinafter referred to as a prediction unit or prediction block.
이하, 본 명세서에서 사용되는 유닛이라는 용어는 예측을 수행하는 기본 단위인 상기 예측 유닛을 대체하는 용어로 사용될 수 있다. 다만, 본 발명이 이에 한정되는 것은 아니며, 더욱 광의적으로는 상기 코딩 유닛을 포함하는 개념으로 이해될 수 있다.Hereinafter, the term unit used in this specification may be used as a replacement for the prediction unit, which is a basic unit for performing prediction. However, the present invention is not limited to this, and can be understood more broadly as a concept including the coding unit.
도 5 및 도 6은 본 발명의 실시예에 따른 인트라 예측 방법을 더욱 구체적으로 도시한다. 전술한 바와 같이, 인트라 예측부는 현재 블록의 좌측 및/또는 상측에 위치한 복원된 샘플들을 참조 샘플들로 이용하여 현재 블록의 샘플 값들을 예측한다.Figures 5 and 6 show the intra prediction method according to an embodiment of the present invention in more detail. As described above, 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.
먼저, 도 5는 인트라 예측 모드에서 현재 블록의 예측을 위해 사용되는 참조 샘플들의 일 실시예를 도시한다. 일 실시예에 따르면, 참조 샘플들은 현재 블록의 좌측 경계에 인접한 샘플들 및/또는 상측 경계에 인접한 샘플들일 수 있다. 도 5에 도시된 바와 같이, 현재 블록의 크기가 WXH이고 현재 블록에 인접한 단일 참조 라인(line)의 샘플들이 인트라 예측에 사용될 경우, 현재 블록의 좌측 및/또는 상측에 위치한 최대 2W+2H+1개의 주변 샘플들을 사용하여 참조 샘플들이 설정될 수 있다.First, Figure 5 shows an example of reference samples used for prediction of the current block in intra prediction mode. According to one embodiment, the reference samples may be samples adjacent to the left boundary and/or samples adjacent to the upper boundary of the current block. As shown in Figure 5, when the size of the current block is WXH and samples of a single reference line adjacent to the current block are used for intra prediction, a maximum of 2W+2H+1 located to the left and/or above the current block Reference samples can be set using the surrounding samples.
한편, 현재 블록의 인트라 예측을 위해 다중 참조 라인의 픽셀들이 사용될 수 있다. 다중 참조 라인은 현재 블록으로부터 기 설정된 범위 이내에 위치한 n개의 라인들로 생성될 수 있다. 일 실시예에 따르면, 인트라 예측을 위해 다중 참조 라인의 픽셀들이 사용될 경우, 참조 픽셀들로 설정될 라인들을 지시하는 별도의 인덱스 정보가 시그널링될 수 있으며, 이를 참조 라인 인덱스라고 명명할 수 있다.Meanwhile, pixels of multiple reference lines may be used for intra prediction of the current block. Multiple reference lines can be created with n lines located within a preset range from the current block. According to one embodiment, when pixels of multiple reference lines are used for intra prediction, separate index information indicating lines to be set as reference pixels may be signaled, and may be called a reference line index.
또한, 참조 샘플로 사용될 적어도 일부의 샘플이 아직 복원되지 않은 경우, 인트라 예측부는 참조 샘플 패딩 과정을 수행하여 참조 샘플을 획득할 수 있다. 또한, 인트라 예측부는 인트라 예측의 오차를 줄이기 위해 참조 샘플 필터링 과정을 수행할 수 있다. 즉, 주변 샘플들 및/또는 참조 샘플 패딩 과정에 의해 획득된 참조 샘플들에 필터링을 수행하여 필터링된 참조 샘플들을 획득할 수 있다. 인트라 예측부는 이와 같이 획득된 참조 샘플들을 이용하여 현재 블록의 샘플들을 예측한다. 인트라 예측부는 필터링되지 않은 참조 샘플들 또는 필터링된 참조 샘플들을 이용하여 현재 블록의 샘플들을 예측한다. 본 개시에서, 주변 샘플들은 적어도 하나의 참조 라인 상의 샘플들을 포함할 수 있다. 예를 들어, 주변 샘플들은 현재 블록의 경계에 인접한 라인 상의 인접 샘플들을 포함할 수 있다.Additionally, when at least some samples to be used as reference samples have not yet been reconstructed, the intra prediction unit may obtain reference samples by performing a reference sample padding process. Additionally, the intra prediction unit may perform a reference sample filtering process to reduce the error of intra prediction. That is, filtered reference samples can be obtained by performing filtering on surrounding samples and/or reference samples obtained through a reference sample padding process. The intra prediction unit predicts samples of the current block using the reference samples obtained in this way. The intra prediction unit predicts samples of the current block using unfiltered or filtered reference samples. In this disclosure, peripheral samples may include samples on at least one reference line. For example, neighboring samples may include adjacent samples on a line adjacent to the boundary of the current block.
다음으로, 도 6은 인트라 예측에 사용되는 예측 모드들의 일 실시예를 도시한다. 인트라 예측을 위해, 인트라 예측 방향을 지시하는 인트라 예측 모드 정보가 시그널링될 수 있다. 인트라 예측 모드 정보는 인트라 예측 모드 세트를 생성하는 복수의 인트라 예측 모드들 중 어느 하나를 지시한다. 현재 블록이 인트라 예측 블록일 경우, 디코더는 비트스트림으로부터 현재 블록의 인트라 예측 모드 정보를 수신한다. 디코더의 인트라 예측부는 추출된 인트라 예측 모드 정보에 기초하여 현재 블록에 대한 인트라 예측을 수행한다.Next, Figure 6 shows an example of prediction modes used for intra prediction. For intra prediction, intra prediction mode information indicating the intra prediction direction may be signaled. Intra prediction mode information indicates one of a plurality of intra prediction modes that generate 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.
본 발명의 실시예에 따르면, 인트라 예측 모드 세트는 인트라 예측에 사용되는 모든 인트라 예측 모드들(예, 총 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) 모드를 지시한다.According to an embodiment of the present invention, the intra prediction mode set may include all intra prediction modes used for intra prediction (eg, a total of 67 intra prediction modes). More specifically, the intra prediction mode set may include a planar mode, a DC mode, and multiple (e.g., 65) angular modes (i.e., directional modes). Each intra prediction mode may be indicated through a preset index (i.e., intra prediction mode index). For example, as shown in FIG. 6, intra prediction mode index 0 indicates planar mode, and intra prediction mode index 1 indicates DC mode. Additionally, intra prediction mode indices 2 to 66 may respectively indicate different angle modes. The angle modes each indicate different angles within a preset angle range. For example, the angle mode may indicate an angle within an angle range between 45 degrees and -135 degrees clockwise (i.e., a first angle range). The angle mode can be defined based on the 12 o'clock direction. At this time, intra prediction mode index 2 indicates horizontal diagonal (HDIA) mode, intra prediction mode index 18 indicates horizontal (HORizontal, HOR) mode, and intra prediction mode index 34 indicates diagonal (DIA) mode. The mode is indicated, and intra prediction mode index 50 indicates vertical (VER) mode, and intra prediction mode index 66 indicates vertical diagonal (VDIA) mode.
한편, 기 설정된 각도 범위는 현재 블록의 모양에 따라 서로 다르게 설정될 수 있다. 예를 들어, 현재 블록이 직사각형 블록일 경우 시계 방향으로 45도를 초과하거나 -135도 미만 각도를 지시하는 광각 모드가 추가적으로 사용될 수 있다. 현재 블록이 수평 블록일 경우, 각도 모드는 시계 방향으로 (45+offset1)도에서 (-135+offset1)도 사이의 각도 범위(즉, 제2 각도 범위) 이내의 각도를 지시할 수 있다. 이때, 제1 각도 범위를 벗어나는 각도 모드 67 내지 76이 추가적으로 사용될 수 있다. 또한, 현재 블록이 수직 블록일 경우, 각도 모드는 시계 방향으로 (45-offset2)도에서 (-135-offset2)도 사이의 각도 범위(즉, 제3 각도 범위) 이내의 각도를 지시할 수 있다. 이때, 제1 각도 범위를 벗어나는 각도 모드 -10 내지 -1이 추가적으로 사용될 수 있다. 본 발명의 실시예에 따르면, offset1 및 offset2의 값은 직사각형 블록의 너비와 높이 간의 비율에 따라 서로 다르게 결정될 수 있다. 또한, offset1 및 offset2는 양수일 수 있다.Meanwhile, 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 clockwise 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 outside the first angle range may be additionally used. Additionally, if the current block is a vertical block, the angle mode may indicate an angle within an angle range between (45-offset2) degrees and (-135-offset2) degrees clockwise (i.e., a third angle range). . At this time, angle modes -10 to -1 outside the first angle range may be additionally used. According to an embodiment of the present invention, the values of offset1 and offset2 may be determined differently depending on the ratio between the width and height of the rectangular block. Additionally, offset1 and offset2 can be positive numbers.
본 발명의 추가적인 실시예에 따르면, 인트라 예측 모드 세트를 생성하는 복수의 각도 모드들은 기본 각도 모드와 확장 각도 모드를 포함할 수 있다. 이때, 확장 각도 모드는 기본 각도 모드에 기초하여 결정될 수 있다.According to a further embodiment of the present invention, the plurality of angle modes generating the intra prediction mode set may include a basic angle mode and an extended angle mode. At this time, the extended angle mode may be determined based on the basic angle mode.
일 실시예에 따르면, 기본 각도 모드는 기존 HEVC(High Efficiency Video Coding) 표준의 인트라 예측에서 사용되는 각도에 대응하는 모드이고, 확장 각도 모드는 차세대 비디오 코덱 표준의 인트라 예측에서 새롭게 추가되는 각도에 대응하는 모드일 수 있다. 더욱 구체적으로, 기본 각도 모드는 인트라 예측 모드 {2, 4, 6, …, 66} 중 어느 하나에 대응하는 각도 모드이고, 확장 각도 모드는 인트라 예측 모드 {3, 5, 7, …, 65} 중 어느 하나에 대응하는 각도 모드일 수 있다. 즉, 확장 각도 모드는 제1 각도 범위 내에서 기본 각도 모드들 사이의 각도 모드일 수 있다. 따라서, 확장 각도 모드가 지시하는 각도는 기본 각도 모드가 지시하는 각도에 기초하여 결정될 수 있다.According to one embodiment, the basic angle mode corresponds to the angle used in intra prediction of the existing HEVC (High Efficiency Video Coding) standard, and the extended angle mode corresponds to the angle newly added in intra prediction of the next-generation video codec standard. It may be a mode that does this. More specifically, the default angle mode is the intra prediction mode {2, 4, 6,... , 66}, and the extended angle mode is the intra prediction mode {3, 5, 7,... , 65} may be an angle mode corresponding to one of the following. That is, the extended angle mode may be an angle mode between basic angle modes within the first angle range. Accordingly, the angle indicated by the extended angle mode can be determined based on the angle indicated by the basic angle mode.
다른 실시예에 따르면, 기본 각도 모드는 기 설정된 제1 각도 범위 이내의 각도에 대응하는 모드이고, 확장 각도 모드는 상기 제1 각도 범위를 벗어나는 광각 모드일 수 있다. 즉, 기본 각도 모드는 인트라 예측 모드 {2, 3, 4, …, 66} 중 어느 하나에 대응하는 각도 모드이고, 확장 각도 모드는 인트라 예측 모드 {-14, -13, -12, …, -1} 및 {67, 68, …, 80} 중 어느 하나에 대응하는 각도 모드일 수 있다. 확장 각도 모드가 지시하는 각도는 대응하는 기본 각도 모드가 지시하는 각도의 반대편 각도로 결정될 수 있다. 따라서, 확장 각도 모드가 지시하는 각도는 기본 각도 모드가 지시하는 각도에 기초하여 결정될 수 있다. 한편, 확장 각도 모드들의 개수는 이에 한정되지 않으며, 현재 블록의 크기 및/또는 모양에 따라 추가적인 확장 각도들이 정의될 수 있다. 한편, 인트라 예측 모드 세트에 포함되는 인트라 예측 모드들의 총 개수는 전술한 기본 각도 모드와 확장 각도 모드의 생성에 따라 가변할 수 있다.According to another embodiment, the basic angle mode may be a mode corresponding to an angle within a preset first angle range, and the extended angle mode may be a wide angle mode outside the first angle range. That is, the default angle mode is the intra prediction mode {2, 3, 4, … , 66}, and the extended angle mode is the intra prediction mode {-14, -13, -12,... , -1} and {67, 68, … , 80} may be an angle mode corresponding to one of the following. The angle indicated by the extended angle mode may be determined as the angle opposite to the angle indicated by the corresponding basic angle mode. Accordingly, the angle indicated by the extended angle mode can be determined based on the angle indicated by the basic angle mode. Meanwhile, the number of expansion angle modes is not limited to this, and additional expansion angles may be defined depending on 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 generation of the basic angle mode and extended angle mode described above.
상기 실시예에서, 확장 각도 모드들 간의 간격은 대응하는 기본 각도 모드들 간의 간격에 기초하여 설정될 수 있다. 예를 들어, 확장 각도 모드들 {3, 5, 7, …, 65} 간의 간격은 대응하는 기본 각도 모드들 {2, 4, 6, …, 66} 간의 간격에 기초하여 결정될 수 있다. 또한, 확장 각도 모드들 {-14, -13, …, -1} 간의 간격은 대응하는 반대편의 기본 각도 모드들 {53, 53, …, 66} 간의 간격에 기초하여 결정되고, 확장 각도 모드들 {67, 68, …, 80} 간의 간격은 대응하는 반대편의 기본 각도 모드들 {2, 3, 4, …, 15} 간의 간격에 기초하여 결정될 수 있다. 확장 각도 모드들 간의 각도 간격은 대응하는 기본 각도 모드들 간의 각도 간격과 동일하도록 설정될 수 있다. 또한, 인트라 예측 모드 세트에서 확장 각도 모드들의 개수는 기본 각도 모드들의 개수 이하로 설정될 수 있다.In the above embodiment, the spacing between extended angle modes may be set based on the spacing between corresponding basic angle modes. For example, the extended angle modes {3, 5, 7, … , 65} are the corresponding fundamental angular modes {2, 4, 6, … , 66} can be determined based on the interval between them. Additionally, the extended angle modes {-14, -13,... , -1} are the corresponding opposite fundamental angular modes {53, 53,... , 66} is determined based on the spacing between the extended angle modes {67, 68,... , 80} are the corresponding opposite fundamental angular modes {2, 3, 4, … , 15} can be determined based on the interval between them. The angular spacing between the extended angle modes may be set to be equal to the angular spacing between the corresponding basic angle modes. Additionally, the number of extended angle modes in the intra prediction mode set may be set to less than the number of basic angle modes.
본 발명의 실시예에 따르면, 확장 각도 모드는 기본 각도 모드를 기초로 시그널링될 수 있다. 예를 들어, 광각 모드(즉, 확장 각도 모드)는 제1 각도 범위 이내의 적어도 하나의 각도 모드(즉, 기본 각도 모드)를 대체할 수 있다. 대체되는 기본 각도 모드는 광각 모드의 반대편에 대응하는 각도 모드일 수 있다. 즉, 대체되는 기본 각도 모드는 광각 모드가 지시하는 각도의 반대 방향의 각도에 대응하거나 또는 상기 반대 방향의 각도로부터 기 설정된 오프셋 인덱스만큼 차이 나는 각도에 대응하는 각도 모드이다. 본 발명의 실시예에 따르면, 기 설정된 오프셋 인덱스는 1이다. 대체되는 기본 각도 모드에 대응하는 인트라 예측 모드 인덱스는 광각 모드에 다시 매핑되어 해당 광각 모드를 시그널링할 수 있다. 예를 들어, 광각 모드 {-14, -13, …, -1}은 인트라 예측 모드 인덱스 {52, 53, …, 66}에 의해 각각 시그널링될 수 있고, 광각 모드 {67, 68, …, 80}은 인트라 예측 모드 인덱스 {2, 3, …, 15}에 의해 각각 시그널링될 수 있다. 이와 같이 기본 각도 모드를 위한 인트라 예측 모드 인덱스가 확장 각도 모드를 시그널링하도록 함으로, 각 블록의 인트라 예측에 사용되는 각도 모드들의 생성이 서로 다르더라도 동일한 세트의 인트라 예측 모드 인덱스들이 인트라 예측 모드의 시그널링에 사용될 수 있다. 따라서, 인트라 예측 모드 생성의 변화에 따른 시그널링 오버헤드가 최소화될 수 있다.According to an embodiment of the present invention, the extended angle mode may be signaled based on the basic angle mode. For example, a wide angle mode (i.e., extended angle mode) may replace at least one angle mode (i.e., basic angle mode) within the first angle range. The basic angle mode that is replaced may be an angle mode corresponding to the opposite side of the wide angle mode. That is, the basic angle mode that is replaced is an angle mode that corresponds to an angle in the opposite direction of the angle indicated by the wide-angle mode or to an angle that differs from the angle in the opposite direction by a preset offset index. According to an embodiment of the present invention, the preset offset index is 1. The intra-prediction mode index corresponding to the replaced basic angle mode may be remapped to the wide-angle mode to signal the corresponding wide-angle mode. For example, wide angle mode {-14, -13, … , -1} is the intra prediction mode index {52, 53, … , 66}, respectively, and the wide-angle mode {67, 68, … , 80} is the intra prediction mode index {2, 3, … , 15} can be signaled respectively. In this way, the intra prediction mode index for the basic angle mode signals the extended angle mode, so that even if the angle modes used for intra prediction of each block are generated differently, the same set of intra prediction mode indexes are used for signaling of the intra prediction mode. can be used Accordingly, signaling overhead due to changes in intra prediction mode generation can be minimized.
한편, 확장 각도 모드의 사용 여부는 현재 블록의 모양 및 크기 중 적어도 하나에 기초하여 결정될 수 있다. 일 실시예에 따르면, 현재 블록의 크기가 기 설정된 크기보다 클 경우 확장 각도 모드가 현재 블록의 인트라 예측을 위해 사용되고, 그렇지 않을 경우 기본 각도 모드만 현재 블록의 인트라 예측을 위해 사용될 수 있다. 다른 실시예에 따르면, 현재 블록이 정사각형이 아닌 블록인 경우 확장 각도 모드가 현재 블록의 인트라 예측을 위해 사용되고, 현재 블록이 정사각형 블록인 경우 기본 각도 모드만 현재 블록의 인트라 예측을 위해 사용될 수 있다.Meanwhile, whether to use the extended angle mode may be determined based on at least one of the shape and size of the current block. According to one embodiment, if the size of the current block is larger than the preset size, the extended angle mode may be used for intra prediction of the current block, otherwise, only the basic angle mode may be used for intra prediction of the current block. According to another embodiment, if the current block is a non-square 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 basic 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. When the intra prediction mode index indicates a specific angle mode, a reference sample or an interpolated reference sample corresponding to the specific angle from the current sample of the current block is used for prediction of the current pixel. Accordingly, different sets of reference samples and/or interpolated reference samples may be used for intra prediction depending on the intra prediction mode. After intra prediction of the current block is performed using reference samples and intra prediction mode information, the decoder restores the sample values of the current block by adding the residual signal of the current block obtained from the inverse transformer to the intra prediction value of the current block. .
인터 예측에 사용되는 움직임(모션) 정보에는 참조 방향 지시 정보(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로 설정될 수 있다.Movement (motion) information used for inter prediction may include reference direction indication information (inter_pred_idc), reference picture indices (ref_idx_l0, ref_idx_l1), and motion (motion) vectors (mvL0, mvL1). Reference picture list utilization information (predFlagL0, predFlagL1) may be set according to the reference direction indication information. As an example of an embodiment, in the case of unidirectional prediction using an L0 reference picture, predFlagL0=1 and predFlagL1=0 may be set. In the case of unidirectional prediction using an L1 reference picture, predFlagL0=0 and predFlagL1=1 can be set. In the case of bidirectional prediction using both L0 and L1 reference pictures, predFlagL0=1 and predFlagL1=1 can be set.
현재 블록이 코딩 유닛일 경우, 코딩 유닛은 여러 개의 서브 블록으로 분할될 수 있으며, 각 서브 블록의 예측 정보는 서로 같거나 또는 다를 수 있다. 실시 일 예로, 코딩 유닛이 인트라 모드일 경우, 각 서브 블록의 인트라 예측 모드는 서로 같거나 또는 다를 수 있다. 또한, 코딩 유닛이 인터 모드일 경우, 각 서브 블록의 움직임 정보는 서로 같거나 또는 다를 수 있다. 또한, 각 서브 블록은 서로 독립적으로 인코딩 또는 디코딩이 가능할 수 있다. 각각의 서브 블록은 서브 블록 인덱스(sub-block index, sbIdx)를 통해 구분될 수 있다.When the current block is a coding unit, the coding unit may be divided into several sub-blocks, and the prediction information of each sub-block may be the same or different. As an example embodiment, when the coding unit is an intra mode, the intra prediction mode of each subblock may be the same or different from each other. Additionally, when the coding unit is in inter mode, the motion information of each sub-block may be the same or different. Additionally, each sub-block may be encoded or decoded independently from each other. Each sub-block can be distinguished through a sub-block index (sbIdx).
현재 블록의 움직임 벡터는 주변 블록의 움직임 벡터와 유사할 가능성이 높다. 따라서, 주변 블록의 움직임 벡터는 움직임 정보 예측 값(motion vector predictor, mvp)으로 사용될 수 있고, 현재 블록의 움직임 벡터는 주변 블록의 움직임 벡터를 이용하여 유도될 수 있다. 또한, 움직임 벡터의 정확성을 높이기 위해서, 인코더에서 원본 영상으로 찾은 현재 블록의 최적의 움직임 벡터와 움직임 정보의 예측 값 간의 움직임 벡터의 차이(motion vector difference, mvd)가 시그널링될 수 있다.The motion vector of the current block is likely to be similar to the motion vector of neighboring blocks. Therefore, the motion vector of the neighboring block can be used as a motion vector predictor (mvp), and the motion vector of the current block can be derived using the motion vector of the neighboring block. Additionally, in order to increase the accuracy of the motion vector, the motion vector difference (mvd) between the optimal motion vector of the current block found in the original image by the encoder and the predicted value of the motion information may be signaled.
움직임 벡터는 다양한 해상도를 가질 수 있으며, 블록 단위로 움직임 벡터의 해상도가 달라질 수 있다. 움직임 벡터 해상도는 정수 단위, 반화소 단위, 1/4 화소 단위, 1/16 화소 단위, 4의 정수 화소 단위 등으로 표현될 수 있다. 스크린 콘텐츠와 같은 영상은 문자와 같은 단순한 그래픽 형태이므로 보간(interpolation) 필터를 적용하지 않아도 되므로, 정수 단위와 4의 정수 화소 단위가 블록 단위 선택적으로 적용될 수 있다. 회전 및 스케일을 표현할 수 있는 어파인(Affine) 모드로 부호화된 블록은 형태의 변화가 심하므로, 정수 단위, 1/4 화소 단위, 1/16 화소 단위가 블록 기반 선택적으로 적용될 수 있다. 블록 단위로 움직임 벡터 해상도를 선택적으로 적용할 지에 대한 여부 정보는 amvr_flag으로 시그널링된다. 만일 적용되는 경우, 어떠한 움직임 벡터 해상도를 현재 블록에 적용할지는 amvr_precision_idx으로 시그널링된다.The motion vector may have various resolutions, and the resolution of the motion vector may vary on a block basis. Motion vector resolution can be expressed in integer units, half-pixel units, 1/4 pixel units, 1/16 pixel units, integer pixel units of 4, etc. Since images such as screen content are in the form of simple graphics such as text, there is no need to apply an interpolation filter, so integer units and integer pixel units of 4 can be selectively applied on a block basis. Blocks encoded in affine mode, which can express rotation and scale, have significant changes in shape, so integer units, 1/4 pixel units, and 1/16 pixel units can be selectively applied on a block basis. Information on whether to selectively apply motion vector resolution on a block basis is signaled with amvr_flag. If applied, which motion vector resolution to apply to the current block is signaled with amvr_precision_idx.
양방향 예측이 적용되는 블록의 경우, 가중치 평균을 적용할 때 2개의 예측 블록 간의 가중치는 같거나 다를 수 있고, 가중치에 대한 정보는 bcw_idx를 통해 시그널링된다. For blocks to which bidirectional prediction is applied, when applying weight average, the weights between two prediction blocks may be the same or different, and information about the weights is signaled through bcw_idx.
움직임 정보의 예측 값의 정확도를 높이기 위해서, 머지(Merge) 또는 AMVP(dvanced motion vector prediction) 방법이 블록 단위 선택적으로 사용될 수 있다. Merge 방법은 현재 블록의 움직임 정보를 현재 블록에 인접한 주변 블록의 움직임 정보와 동일하게 생성하는 방법으로, 동질성을 갖는 움직임 영역에서 움직임 정보가 변화없이 공간적으로 전파됨으로써 움직임 정보의 부호화 효율을 증가시키는 장점이 있다. 반면에 AMVP 방법은 정확한 움직임 정보를 표현하기 위해 L0 및 L1 예측 방향으로 각각 움직임 정보를 예측하고 가장 최적의 움직임 정보를 시그널링하는 방법이다. 디코더는 AMVP 또는 Merge 방법을 통해 현재 블록에 대한 움직임 정보를 유도한 후, 참조 픽쳐(reference picture)에서 유도한 움직임 정보에 위치한 참조 블록을 현재 블록을 위한 예측 블록으로 사용한다. To increase the accuracy of the prediction value of motion information, merge or advanced motion vector prediction (AMVP) methods can be selectively used on a block basis. The Merge method is a method that generates the motion information of the current block to be the same as the motion information of neighboring blocks adjacent to the current block. The Merge method has the advantage of increasing the coding efficiency of motion information by spatially propagating motion information without change in a motion region with homogeneity. There is. On the other hand, the AMVP method is a method that predicts motion information in the L0 and L1 prediction directions respectively and signals the most optimal motion information in order to express accurate motion information. The decoder derives motion information for the current block through the AMVP or Merge method and then uses the reference block located in the motion information derived from the reference picture as a prediction block for the current block.
Merge 또는 AMVP에서 움직임 정보를 유도하는 방법은 현재 블록의 주변 블록으로부터 유도된 움직임 정보의 예측 값을 사용하여 움직임 후보 리스트를 생성한 후, 최적의 움직임 후보에 대한 인덱스 정보가 시그널링되는 방법일 수 있다. AMVP의 경우, L0와 L1 각각 움직임 후보 리스트가 유도되므로, L0와 L1 각각에 대한 최적의 움직임 후보 인덱스(mvp_l0_flag, mvp_l1_flag)가 시그널링된다. Merge의 경우, 하나의 움직임 후보 리스트가 유도되므로, 하나의 머지 인덱스(merge_idx)가 시그널링된다. 하나의 코딩 유닛에서 유도되는 움직임 후보 리스트는 다양할 수 있으며, 각 움직임 후보 리스트마다 움직임 후보 인덱스 또는 머지 인덱스가 시그널링될 수 있다. 이때, Merge 모드로 부호화된 블록에서 잔여 블록에 대한 정보가 없는 모드를 머지 스킵(MergeSkip) 모드라고 할 수 있다.A method of deriving motion information in Merge or AMVP may be to generate a motion candidate list using the predicted value of motion information derived from neighboring blocks of the current block, and then index information for the optimal motion candidate is signaled. . In the case of 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. In the case of Merge, since one motion candidate list is derived, one merge index (merge_idx) is signaled. The motion candidate list derived from one coding unit may vary, and a motion candidate index or merge index may be signaled for each motion candidate list. At this time, a mode in which there is no information about the remaining blocks in blocks encoded in Merge mode can be called Merge Skip mode.
현재 블록에 대한 양방향 움직임 정보는 AMVP와 Merge 모드가 혼용되어 유도될 수 있다. 예를 들어, L0 방향의 움직임 정보는 AMVP 방법을 사용하여 유도하고, L1 방향의 움직임 정보는 Merge 방법을 사용하여 유도될 수 있다. 반대로, L0는 Merge, L1은 AMVP를 적용할 수 있다. 이러한 부호화 모드를 AMVP-merge 모드라고 할 수 있다.Bidirectional movement information for the current block can be derived by mixing AMVP and Merge modes. For example, motion information in the L0 direction can be derived using the AMVP method, and motion information in the L1 direction can be derived using the Merge method. Conversely, Merge can be applied to L0 and AMVP to L1. This encoding mode can be called AMVP-merge mode.
SMVD(Symmetric MVD)는 양방향 예측(bi-directional prediction)의 경우에, L0 방향과 L1 방향의 MVD(Motion Vector Difference) 값이 대칭을 이루도록 하여 전송되는 움직임 정보의 비트량을 줄이는 방법이다. L0 방향과 대칭을 이루는 L1 방향의 MVD 정보는 전송하지 않으며, 더불어 L0 및 L1 방향의 참조 픽쳐 정보도 전송하지 않고 복호화 과정에서 유도한다.SMVD (Symmetric MVD) is a method of reducing the amount of bits of transmitted motion information by ensuring that the MVD (Motion Vector Difference) values in the L0 and L1 directions are symmetrical in the case of bi-directional prediction. MVD information in the L1 direction, which is symmetrical to the L0 direction, is not transmitted, and in addition, reference picture information in the L0 and L1 directions is not transmitted and is derived during the decoding process.
OBMC(Overlapped Block Motion Compensation)는 블록 간의 움직임 정보가 서로 다른 경우, 주변 블록들의 움직임 정보를 사용하여 현재 블록에 대한 예측 블록들을 생성한 후, 예측 블록들을 가중치 평균하여 현재 블록에 대한 최종 예측 블록을 생성하는 방법이다. 이는 움직임 보상된 영상의 블록 경계에서 발생되는 블록킹 현상을 줄여주는 효과가 있다.OBMC (Overlapped Block Motion Compensation) generates prediction blocks for the current block using the motion information of neighboring blocks when the motion information between blocks is different, and then weight averages the prediction blocks to create the final prediction block for the current block. How to create it. This has the effect of reducing the blocking phenomenon that occurs at the block boundaries of motion compensated images.
일반적으로 머지 움직임 후보는 움직임의 정확도가 낮다. 이러한 머지 움직임 후보의 정확도를 높이기 위해서, MMVD(Merge mode with MVD) 방법이 사용될 수 있다. MMVD 방법은 몇 개의 움직임 차분값 후보들 중에서 선택된 하나의 후보를 이용하여 움직임 정보를 보정하는 방법이다. MMVD 방법을 통해 획득되는 움직임 정보의 보정 값에 대한 정보(예를 들어, 움직임 차분값 후보들 중에서 선택된 하나의 후보를 지시하는 인덱스 등)은 비트스트림에 포함되어 디코더로 전송될 수 있다. 기존의 움직임 정보 차분값을 비트스트림에 포함하는 것에 비해 움직임 정보의 보정 값에 대한 정보를 비트스트림에 포함함으로써 비트량을 절약할 수 있다.In general, merge movement candidates have low movement accuracy. To increase the accuracy of these merge motion candidates, the MMVD (Merge mode with MVD) method can be used. The MMVD method is a method of correcting motion information using one candidate selected from among several motion difference value candidates. Information about the correction value of motion information obtained through the MMVD method (for example, an index indicating one candidate selected from motion difference value candidates, etc.) may be included in the bitstream and transmitted to the decoder. Compared to including existing motion information difference values in the bitstream, the amount of bits can be saved by including information about the correction value of motion information in the bitstream.
TM(Template Matching) 방법은 현재 블록의 주변 화소를 통해 템플릿을 생성하여 템플릿과 가장 유사도가 높은 매칭 영역을 찾아서 움직임 정보를 보정하는 방법이다. TM(Template matching)은 부호화되는 비트스트림의 크기를 줄이기 위해서, 움직임 정보를 비트스트림에 포함하지 않고 디코더에서 움직임 예측을 수행하는 방법이다. 이때, 디코더는 원본 영상이 없으므로 이미 복원된 주변 블록을 사용하여 현재 블록에 대한 움직임 정보를 개략적으로 유도할 수 있다.The TM (Template Matching) method is a method of correcting motion information by creating a template using surrounding pixels of the current block and finding a matching area with the highest similarity to the template. Template matching (TM) is a method of performing motion prediction in a decoder without including motion information in the bitstream in order to reduce the size of the encoded bitstream. At this time, since the decoder does not have the original image, it can roughly derive motion information for the current block using already restored neighboring blocks.
DMVR(Decoder-side Motion Vector Refinement) 방법은 조금 더 정확한 움직임 정보를 찾기 위해 이미 복원된 참조 영상들의 상관성을 통해 움직임 정보를 보정하는 방법으로써, 현재 블록의 양방향 움직임 정보를 사용하여 2개의 참조 픽쳐의 임의의 정해진 영역 내에서 참조 픽쳐 내의 참조 블록 간의 가장 매칭이 잘되는 지점을 새로운 양방향 움직임으로 사용하는 방법이다. 이러한 DMVR이 수행될 때, 인코더는 하나의 블록 단위에서 DMVR을 수행하여 움직임 정보를 보정한 후, 다시 블록을 서브 블록으로 분할하여 각 서브 블록 단위에서 DMVR을 수행하여 서브 블록의 움직임 정보를 다시 보정할 수 있으며, 이를 MP-DMVR(Multi-pass DMVR)이라 할 수 있다. The DMVR (Decoder-side Motion Vector Refinement) method is a method of correcting motion information through the correlation of already restored reference images in order to find more accurate motion information. It uses the bidirectional motion information of the current block to compare the two reference pictures. This is a method of using the point with the best matching between reference blocks in a reference picture within a certain area as a new bidirectional movement. When such DMVR is performed, the encoder corrects the motion information by performing DMVR in one block unit, then divides the block into sub-blocks and performs DMVR in each sub-block unit to correct the motion information of the sub-block again. This can be done, and this can be called MP-DMVR (Multi-pass DMVR).
LIC(Local Illumination Compensation) 방법은 블록 간의 휘도 변화를 보상하는 방법으로, 현재 블록에 인접한 주변 화소들을 사용하여 선형 모델을 유도한 후, 선형 모델을 통해 현재 블록의 휘도 정보를 보상하는 방법이다.The LIC (Local Illumination Compensation) method is a method of compensating for luminance changes between blocks. It derives a linear model using surrounding pixels adjacent to the current block, and then compensates for the luminance information of the current block through the linear model.
기존 비디오 부호화 방법들은 상하좌우의 평행 이동만을 고려한 움직임 보상을 수행하기 때문에, 현실에서 일반적으로 접하는 확대, 축소, 회전 등과 같은 움직임 포함하고 있는 비디오들의 부호화 시 부호화 효율이 저하된다. 이러한 확대, 축소, 회전에 대한 움직임을 표현하기 위하여, 4개(회전) 또는 6개(확대, 축소, 회전) 파라미터 모델을 이용하는 Affine 모델 기반 움직임 예측 기술이 적용될 수 있다.Existing video coding methods perform motion compensation considering only horizontal, vertical, and horizontal movements, so coding efficiency deteriorates when coding videos that include movements such as enlargement, reduction, and rotation that are commonly encountered in reality. To express such movements for enlargement, reduction, and rotation, an Affine model-based motion prediction technology that uses a 4 (rotation) or 6 (enlargement, reduction, rotation) parameter model can be applied.
BDOF(Bi-Directional Optical Flow)는 양방향 움직임으로 생성된 블록의 참조 블록으로부터 광-흐름(optical-flow) 기반으로 화소의 변화량을 추정하여 예측 블록을 보정하는데 사용된다. 이러한 VVC의 BDOF에서 유도된 움직임 정보를 이용하여 현재 블록의 움직임을 보정할 수 있다.BDOF (Bi-Directional Optical Flow) is used to correct the prediction block by estimating the amount of pixel change based on optical-flow from the reference block of the block generated by bidirectional movement. The motion of the current block can be corrected using motion information derived from the BDOF of this VVC.
PROF(Prediction refinement with optical flow)는 서브 블록 단위 Affine 움직임 예측의 정확도를 픽셀 단위 움직임 예측의 정확도와 유사하도록 개선하기 위한 기술이다. PROF는 BDOF와 유사하게 광-흐름(optical-flow)에 기반하여 서브 블록 단위로 Affine 움직임 보상된 픽셀 값들에 대해 픽셀 단위로 보정 값을 계산하여 최종 예측 신호를 획득하는 기술이다.PROF (Prediction refinement with optical flow) is a technology to improve the accuracy of sub-block-level affine motion prediction to be similar to the accuracy of pixel-level motion prediction. PROF, similar to BDOF, is a technology that obtains the final prediction signal by calculating correction values in pixel units for affine motion compensated pixel values in sub-block units based on optical flow.
CIIP(Combined Inter-/Intra-picture Prediction)는 현재 블록에 대한 예측 블록을 생성할 때, 화면 내 예측 방법으로 생성한 예측 블록과 화면 간 예측 방법으로 생성한 예측 블록들을 가중치 평균하여 최종 예측 블록을 생성하는 방법이다.When CIIP (Combined Inter-/Intra-picture Prediction) generates a prediction block for the current block, the final prediction block is created by weighting the prediction blocks generated by the intra-picture prediction method and the prediction blocks generated by the inter-picture prediction method. How to create it.
IBC(Intra Block Copy) 방법은 현재 블록과 가장 유사한 부분을 현재 픽쳐 내의 이미 복원된 영역에서 찾아서, 해당 참조 블록을 현재 블록에 대한 예측 블록으로 사용하는 방법이다. 이때, 현재 블록과 참조 블록 간의 거리인 블록 벡터(Block Vector)와 관련된 정보는 비트스트림에 포함될 수 있다. 디코더는 비스트스림에 포함된 블록 벡터와 관련된 정보를 파싱하여 현재 블록을 위한 블록 벡터를 계산하거나 설정할 수 있다.The IBC (Intra Block Copy) method is a method that finds the part most similar to the current block in an already reconstructed area in the current picture and uses the corresponding reference block as a prediction block for the current block. At this time, information related to the block vector, which is the distance between the current block and the reference block, may be included in the bitstream. The decoder can calculate or set the block vector for the current block by parsing information related to the block vector contained in Beaststream.
BCW(Bi-prediction with CU-level Weights) 방법은 서로 다른 참조 픽쳐로 부터 움직임 보상된 두 개의 예측 블록에 대하여, 평균으로 예측 블록을 생성하지 않고, 블록 단위로 적응적으로 가중치를 적용하여 움직임 보상된 두 개의 예측 블록에 가중치 평균을 수행하는 방법이다.The BCW (Bi-prediction with CU-level Weights) method does not generate a prediction block by averaging two prediction blocks that have been motion-compensated from different reference pictures, but applies weights adaptively on a block-by-block basis to compensate for motion. This is a method of performing a weighted average on two prediction blocks.
MHP(Multi-hypothesis prediction) 방법은 화면 간 예측 시 단방향 및 양방향 움직임 정보에 추가적인 움직임 정보를 전송함으로써, 다양한 예측 신호를 통한 가중치 예측을 수행하는 방법이다.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 when predicting between screens.
CCLM(Cross-component linear model)은 휘도 신호와 해당 휘도 신호와 동일한 위치에 있는 색차 신호 간의 높은 상관성을 이용하여 선형 모델을 생성한 후, 해당 선형 모델을 통해 색차 신호를 예측하는 방법이다. 현재 블록에 인접한 주변 블록 중에서 복원이 완료된 블록을 사용하여 템플릿을 생성한 후, 템플릿을 통해 선형 모델에 대한 파라미터가 유도된다. 다음으로, 영상 포맷에 따라 선택적으로 색차 블록의 크기에 맞게 복원된 현재 휘도 블록이 다운 샘플링된다. 마지막으로, 다운 샘플링된 휘도 블록과 해당 선형 모델을 이용하여 현재 블록의 색차 블록을 예측한다. 이때, 2개 이상의 선형 모델을 사용하는 방법을 MMLM(Multi-model Linear mode)이라고 한다.CCLM (Cross-component linear model) is a method of creating a linear model using the high correlation between a luminance signal and a chrominance signal located at the same location as the luminance signal, and then predicting the chrominance signal through the linear model. After creating a template using a restored block among neighboring blocks adjacent to the current block, parameters for the linear model are derived through the template. Next, depending on the video format, the restored current luminance block is selectively down-sampled to fit the size of the chrominance block. Finally, the chrominance block of the current block is predicted using the down-sampled luminance block and the corresponding linear model. At this time, the method of using two or more linear models is called MMLM (Multi-model Linear mode).
독립 스칼라 양자화(independent scalar quantization)에서, 입력된 계수 tk에 대한 복원된 계수 t'k는 관련된 양자화 인덱스(quantization index) qk에만 의존적이다. 즉, 임의의 복원된 계수에 대한 양자화 인덱스(quantization index)는 다른 복원된 계수들에 대한 양자화 인덱스들과는 다른 값을 가진다. 이때 t'k는 tk에서 양자화 오차가 포함된 값일 수 있으며, 양자화 파라미터에 따라 서로 다르거나 또는 같을 수 있다. 여기서, t'k는 복원된 변환 계수 또는 역양자화된 변환계수라고 명명할 수 있으며, 양자화 인덱스를 양자화된 변환 계수라고 명명할 수도 있다.In independent scalar quantization, the restored coefficients t' k for input coefficients t k depend only on the associated quantization index q k . That is, the quantization index for any restored coefficient has a different value from the quantization indexes for other restored coefficients. At this time, t' k may be a value including the quantization error at t k and may be different or the same depending on the quantization parameter. Here, t'k may be named a restored transform coefficient or a dequantized transform coefficient, and the quantization index may be named a quantized transform coefficient.
균일 복원 양자화(URQ; Uniform Reconstruction Quantizers)에서, 복원된 계수들은 동일한 간격으로 배치되는 특성을 지닌다. 이때 인접하는 두 복원 값들 사이의 거리를 양자화 단계 크기(quantization step size)라고 할 수 있다. 복원된 값 중에는 0을 포함할 수 있으며, 사용 가능한 복원 값들의 전체 집합(set)은 양자화 단계 크기에 따라 고유하게 정의될 수 있다. 양자화 단계 크기는 양자화 파라미터에 따라 달라질 수 있다.In Uniform Reconstruction Quantizers (URQ), the reconstructed coefficients have the characteristic of being arranged at equal intervals. At this time, the distance between two adjacent restored values can be referred to as the quantization step size. The restored values may include 0, and the entire set of available restored values may be uniquely defined depending on the quantization step size. The quantization step size may vary depending on the quantization parameter.
기존 방법에서는 양자화로 인해 허용 가능한 복원된 변환 계수들의 집합(세트)이 감소하며, 이러한 집합의 원소(element)는 유한 개일 수 있다. 이로 인해, 원본 영상과 복원된 영상 간의 평균적인 오차를 최소화하는데 한계가 존재한다. 이러한 평균적인 오차를 최소화하기 위한 방법으로 벡터 양자화(Vector Quantization)를 사용할 수 있다.In the existing method, the set of allowable restored transform coefficients decreases due to quantization, and the number of elements of this set may be finite. Because of this, there is a limit to minimizing the average error between the original image and the restored image. Vector quantization can be used as a method to minimize this average error.
비디오 부호화에서 사용되는 간단한 형태의 벡터 양자화 방법에는 부호 데이터 은닉(sign data hiding)이 있다. 이는 인코더에서 0이 아닌 하나의 계수에 대한 부호를 부호화하지 않고, 디코더에서는 해당 계수에 대한 부호를 모든 계수들에 대한 절대값의 합이 짝수인지 또는 홀수인지에 따라 결정하는 방법이다. 이를 위해 인코더에서는 적어도 하나의 계수가 '1'이 증가되거나 또는 감소될 수 있으며, 이는 율-왜곡(rate-distortion)에 대한 비용(Cost) 관점에서 최적이 되도록 적어도 하나의 계수가 선택되어 값이 조정될 수 있다. 실시 일 예로, 양자화 간격의 경계에 가까운 값을 가지는 계수가 선택될 수 있다.A simple form of vector quantization method used in video encoding is sign data hiding. This is a method in which the encoder does not encode the sign of one non-zero coefficient, and the decoder determines the sign for the corresponding coefficient depending on whether the sum of the absolute values of all coefficients is even or odd. To this end, at least one coefficient may be increased or decreased by '1' in the encoder, and at least one coefficient is selected to be optimal in terms of cost for rate-distortion, so that the value is It can be adjusted. As an example embodiment, a coefficient having a value close to the boundary of the quantization interval may be selected.
또 다른 벡터 양자화 방법에는 트렐리스 부호화된 양자화(Trellis-Coded Quantization)가 있으며, 비디오 부호화에서는 종속 양자화(dependent quantization)에서 최적화된 양자화 값을 얻기 위한 최적의 경로 탐색 기법으로 활용된다. 블록 단위로, 블록 내 모든 계수들에 대한 양자화 후보들을 트렐리스 그래프에 배치하고, 최적화된 양자화 후보들 간의 최적의 트렐리스 경로를 율-왜곡(rate-distortion)에 대한 비용(Cost)을 고려하여 탐색한다. 구체적으로, 비디오 부호화에 적용된 종속 양자화는 변환 계수에 대한 허용 가능한 복원된 변환 계수들의 집합이 복원 순서에서 현재 변환 계수에 선행하는 변환 계수의 값에 의존하도록 설계될 수 있다. 이때, 여러 개의 양자화기를 변환 계수에 따라 선택적으로 사용하게 함으로써, 원본 영상과 복원된 영상 간의 평균적인 오차를 최소화하여 부호화 효율을 높이는 효과가 있다. Another vector quantization method is Trellis-Coded Quantization, and in video coding, it is used as an optimal path search technique to obtain an optimized quantization value in dependent quantization. On a block basis, quantization candidates for all coefficients within a block are placed in a trellis graph, and the optimal trellis path between optimized quantization candidates is determined considering the cost of rate-distortion. and explore. Specifically, dependent quantization applied to video encoding may be designed such that the set of allowable restored transform coefficients for a transform coefficient depends on the value of the transform coefficient that precedes the current transform coefficient in reconstruction order. At this time, by selectively using multiple quantizers according to the transformation coefficient, the average error between the original image and the restored image is minimized, thereby increasing coding efficiency.
인트라 예측 부호화 기술 중에서 MIP(Matrix Intra Prediction) 방법은 행렬 기반 인트라 예측 방법으로 현재 블록에 인접한 주변 블록의 픽셀로부터 방향성을 가지는 예측 방법과 달리, 주변 블록의 좌측 및 상단의 픽셀들을 미리 정의된 행렬 매트릭스와 오프셋 값을 이용하여 예측 신호를 구하는 방법이다.Among intra prediction coding technologies, the MIP (Matrix Intra Prediction) method is a matrix-based intra prediction method. Unlike prediction methods that have directionality from pixels of neighboring blocks adjacent to the current block, pixels on the left and top of neighboring blocks are used as a predefined matrix. This is a method of obtaining a prediction signal using the and offset values.
현재 블록의 인트라 예측 모드를 유도하기 위해서, 현재 블록에 인접하면서 복원된 임의의 영역인 템플릿(template)을 기반으로, 해당 템플릿의 주변 픽셀을 통해 유도된 템플릿에 대한 인트라 예측 모드가 현재 블록의 복원을 위해 이용할 수 있다. 우선, 디코더는 템플릿에 인접한 주변 픽셀(reference)을 이용하여 템플릿에 대한 예측 템플릿을 생성하고, 이미 복원된 템플릿과 가장 유사한 예측 템플릿을 생성한 인트라 예측 모드를 현재 블록의 복원을 위해 사용할 수 있다. 이러한 방법을 TIMD(Template intra mode derivation)이라고 할 수 있다.In order to derive the intra prediction mode of the current block, based on a template, which is a random area restored while adjacent to the current block, the intra prediction mode for the template derived through the surrounding pixels of the template is used to restore the current block. It can be used for. First, the decoder can generate a prediction template for the template using surrounding pixels (references) adjacent to the template, and use the intra prediction mode, which generates a prediction template most similar to the already restored template, to restore the current block. This method can be called TIMD (Template intra mode derivation).
일반적으로 인코더는 예측 블록을 생성하기 위한 예측 모드를 결정하여 결정된 예측 모드에 대한 정보가 포함된 비트스트림을 생성할 수 있다. 디코더는 수신한 비트스트림을 파싱하여 인트라 예측 모드를 설정할 수 있다. 이때, 예측 모드에 대한 정보의 비트량은 전체 비트스트림 크기의 10% 정도일 수 있다. 예측 모드에 대한 정보의 비트량을 감소시키기 위해 인코더는 비트스트림에 인트라 예측 모드에 대한 정보를 포함하지 않을 수 있다. 이에, 디코더는 주변 블록의 특성을 이용하여 현재 블록의 복원을 위한 인트라 예측 모드를 유도(결정)할 수 있고, 유도된 인트라 예측 모드를 이용하여 현재 블록을 복원할 수 있다. 이때, 디코더는 인트라 예측 모드를 유도하기 위해 현재 블록에 인접한 주변 화소(pixel)들마다 소벨(Sobel) 필터를 가로 및 세로 방향으로 적용하여 방향성 정보를 유추한 후, 해당 방향성 정보를 인트라 예측 모드로 매핑하는 방법을 이용할 수 있다. 디코더가 주변 블록을 이용하여 인트라 예측 모드를 유도하는 방법은 DIMD(Decoder side intra mode derivation)로 기술될 수 있다.In general, an encoder can determine a prediction mode for generating a prediction block and generate a bitstream containing information about the determined prediction mode. The decoder can set the intra prediction mode by parsing the received bitstream. At this time, the bit amount of information about the prediction mode may be about 10% of the total bitstream size. In order to reduce the bit amount of information about the prediction mode, 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 restoration of the current block using the characteristics of the surrounding blocks, and can restore the current block using the derived intra prediction mode. At this time, the decoder infers directionality information by applying a Sobel filter horizontally and vertically to each surrounding pixel adjacent to the current block to derive the intra prediction mode, and then converts the directionality information into the intra prediction mode. A mapping method can be used. The method by which the decoder derives an intra prediction mode using neighboring blocks can be described as DIMD (Decoder side intra mode derivation).
인트라 예측 방향성 모드를 사용하여 예측된 블록은 블록의 상단 및 좌측 경계 부분에서 불연속적인 에지가 나타날 수 있다. 예를 들어, 현재 블록이 수직 방향 모드를 사용하여 예측된 경우, 블록의 좌측 경계 부분에서 불연속적인 에지가 나타날 수 있다. 인코더 및 디코더는 이러한 불연속성을 완화하기 위해, 예측 블록 내부의 경계 부분의 샘플에 대해 필터링을 적용할 수 있다. 필터링은 현재 예측 블록에 인접한 복원된 샘플, 현재 예측 블록에 인접한 복원된 샘플의 위치 정보, 현재 예측 블록 내부의 경계 부분의 샘플, 현재 예측 블록 내부의 경계 부분의 샘플의 위치 정보, 현재 예측 블록의 인트라 예측 방향성 모드, 현재 예측 블록의 가로의 크기 및 세로의 크기 중에서 적어도 하나 이상을 사용하여 필터링의 적용 여부 및/또는 필터링 가중치를 결정할 수 있다. 필터링 가중치는 현재 예측 블록 내부의 경계 부분의 샘플에 대한 가중치와 현재 예측 블록에 인접한 복원된 샘플에 대한 가중치를 의미한다. 이러한 필터링 방법을 PDPC(Position dependent intra prediction combination)라고 할 수 있다. A block predicted using the intra prediction directional mode may have discontinuous edges at the top and left boundaries of the block. For example, if the current block is predicted using the vertical direction mode, a discontinuous edge may appear at the left border of the block. To alleviate this discontinuity, the encoder and decoder can apply filtering to samples at the boundaries within the prediction block. Filtering is performed on restored samples adjacent to the current prediction block, location information of restored samples adjacent to the current prediction block, samples at the boundary portion inside the current prediction block, location information of samples at the boundary portion inside the current prediction block, and location information of the samples at the boundary portion inside the current prediction block. Whether to apply filtering and/or filtering weights may be determined using at least one of the intra prediction directional mode, the horizontal size, and the vertical size of the current prediction block. The filtering weight refers to the weight for the sample in the boundary part inside the current prediction block and the weight for the restored sample adjacent to the current prediction block. This filtering method can be called PDPC (Position dependent intra prediction combination).
도 7은 인터 예측에서 움직임 후보 리스트를 생성하기 위해 사용되는 주변 블록들의 위치를 나타낸 도면이다. Figure 7 is a diagram showing the positions of neighboring blocks used to generate a motion candidate list in inter prediction.
주변 블록들은 공간적인 위치의 블록이거나 시간적인 위치의 블록일 수 있다. 현재 블록에 공간적으로 인접한 주변 블록은 좌측(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)로 지칭될 수 있다.Surrounding blocks may be blocks in a spatial location or blocks in a temporal location. Surrounding blocks that are spatially adjacent to the current block are Left (A1) block, Left Below (A0) block, Above (B1) block, Above Right (B0) block, or Above Left. , B2) It can be at least one of the blocks. The neighboring block temporally adjacent to the current block may be a block containing the upper left pixel position of the bottom right (BR) block of the current block in the corresponding picture (Collocated picture). If a neighboring block temporally adjacent to the current block is encoded in intra mode or a neighboring block temporally adjacent to the current block is located in an unusable position, the picture corresponding to the current picture (collocated picture) is displayed. A block containing the horizontal and vertical center (Center, Ctr) pixel position of the block can be used as a temporal peripheral block. Motion candidate information derived from the corresponding picture may be referred to as TMVP (Temporal Motion Vector Predictor). Only one TMVP can be derived from one block, and after dividing one block into several sub-blocks, each TMVP candidate can be derived for each sub-block. The TMVP derivation method on a sub-block basis may be referred to as sbTMVP (sub-block Temporal Motion Vector Predictor).
본 명세서에서 설명하는 방법들이 적용될 것인지 여부는 슬라이스 타입 정보 (예, I 슬라이스, P 슬라이스, B 슬라이스 인지 여부), 타일인지 여부, 서브 픽쳐인지 여부, 현재 블록의 크기, 코딩 유닛의 깊이, 현재 블록이 휘도 블록인지 색차 블록인지 여부, 참조 프레임인지 비참조 프레임인지 여부, 참조 순서 및 계층에 따른 시간적인 계층 등에 대한 정보들 중 적어도 어느 하나에 기초하여 결정될 수 있다. 본 명세서에서 설명하는 방법들이 적용될 것인지 여부를 결정하기 위해 사용되는 정보들은 디코더 및 인코더 간 미리 약속된 정보일 수 있다. 또한, 이러한 정보들은 프로파일 및 레벨에 따라 결정되어 있을 수 있다. 이러한 정보들은 변수 값으로 표현될 수 있고, 비트스트림에는 변수 값에 대한 정보가 포함될 수 있다. 즉, 디코더는 비트스트림에 포함된 변수 값에 대한 정보를 파싱하여 상술한 방법들이 적용되는지 여부를 결정할 수 있다. 예를 들어, 코딩 유닛의 가로의 길이 또는 세로의 길이에 기초하여 상술한 방법들이 적용될 것인지 여부가 결정될 수 있다. 가로의 길이 또는 세로의 길이가 32 이상(예, 32, 64, 128 등)이면 상술한 방법들은 적용될 수 있다. 또한 가로의 길이 또는 세로의 길이가 32 보다 작은 경우(예, 2, 4, 8, 16)에 상술한 방법들은 적용될 수 있다. 또한 가로의 길이 또는 세로의 길이가 4 또는 8인 경우 상술한 방법들은 적용될 수 있다.Whether the methods described herein will be applied depends on slice type information (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, and the current block. It may be determined based on at least one of information about whether it is a luminance block or a chrominance block, whether it is a reference frame or a non-reference frame, reference order, and temporal hierarchy according to the hierarchy. Information used to determine whether the methods described in this specification will be applied may be information previously agreed upon between the decoder and the encoder. Additionally, this information may be determined according to profile and level. This information can be expressed as variable values, and the bitstream can include information about variable values. That is, the decoder can determine whether the above-described methods are applied by parsing information about variable values included in the bitstream. For example, it may be determined whether the above-described methods will be applied based on the horizontal or vertical length of the coding unit. If the horizontal or vertical length is 32 or more (e.g., 32, 64, 128, etc.), the above-described methods can be applied. Additionally, the above-described methods can be applied when the horizontal or vertical length is less than 32 (e.g., 2, 4, 8, 16). Additionally, the above-described methods can be applied when the horizontal or vertical length is 4 or 8.
도 8은 본 발명의 실시 예에 따라 GPM 모드에서 기준선의 각도 및 기준선과 중앙 위치로부터의 거리를 통합하여 시그널링하는 신택스 및 신택스가 시그널링하는 구체적인 정보를 보여준다.Figure 8 shows a syntax for signaling by integrating the angle of the baseline and the distance from the baseline and the center position in GPM mode according to an embodiment of the present invention, and specific information signaled by the syntax.
앞서 설명한 바와 같이 GPM 모드는 기준선에 따라 현재 블록을 복수의 영역, 예컨대 2개의 영역으로 분할하고, 각 영역 별로 예측이 수행되는 예측 모드이다. 이때, 분할된 각 영역은 삼각, 사각 또는 오각 중 하나일 수 있다. 인코더는 GPM 모드에 사용되는 기준선이 어느 각도에 해당하는지 지시하고, 기준선이 현재 블록의 중앙으로부터 얼마나 떨어졌는지 지시하는 신택스 요소(merge_gpm_partition_idx)를 비트스트림에 포함시킬 수 있다. 설명의 편의를 위해 이 신택스 요소를 머지 GPM 분할 인덱스로 지칭한다. 디코더는 비트스트림으로부터 머지 GPM 분할 인덱스를 획득하고, 머지 GPM 분할 인덱스에 따라 GMP 모드에서 현재 블록이 분할되는 영역의 형태를 판단할 수 있다. 구체적으로 디코더는 머지 GPM 분할 인덱스를 기초로 현재 블록을 2개의 영역의 분할하는 기준선의 각도와 기준선으로부터 현재 블록의 중앙까지의 거리를 판단할 수 있다. 머지 GPM 분할 인덱스는 미리 지정된 테이블에 따라 기준선의 각도와 기준선으로부터 현재 블록의 중앙까지의 거리를 나타낼 수 있다. 구체적인 실시 예에서머지 GPM 분할 인덱스는 0 내지 63의 값을 가질 수 있다. 미리 지정된 테이블은 도 8과 같을 수 있다.As previously described, the GPM mode is a prediction mode in which the current block is divided into a plurality of regions, for example, two regions, according to a baseline, and prediction is performed for each region. At this time, each divided area may be one of triangles, squares, or pentagons. The encoder may include in the bitstream a syntax element (merge_gpm_partition_idx) that indicates which angle the baseline used in GPM mode corresponds to and how far the baseline is from the center of the current block. For convenience of explanation, this syntax element is referred to as the merge GPM partition index. The decoder can obtain a merge GPM partition index from the bitstream and determine the type of area into which the current block is divided in GMP mode according to the merge GPM partition index. Specifically, the decoder can determine the angle of the baseline dividing the current block into two regions and the distance from the baseline to the center of the current block based on the merge GPM division index. The merge GPM split index may indicate the angle of the baseline and the distance from the baseline to the center of the current block according to a pre-specified table. In a specific embodiment, the merge GPM split index may have a value of 0 to 63. The pre-designated table may be as shown in FIG. 8.
도 9는 본 발명의 실시 예에서 머지 GPM 분할 인덱스의 값에 따른 기준선을 보여주고, GPM 모드에 관한 정보를 나타내는 신택스를 보여준다.Figure 9 shows a baseline according to the value of the merge GPM split index in an embodiment of the present invention and shows syntax indicating information about the GPM mode.
도 9의 (a)와 (b)는 도 8을 통해 설명한 머지 GPM 분할 인덱스의 값에 따른 기준선을 보여주고, GPM 모드에 관한 정보를 나타내는 신택스를 보여준다. GPM 모드에서 분할되는 영역이 인터 예측 모드로 부호화되는 경우, 비트스트림은 머지 GPM 분할 인덱스뿐만 아니라 인터 예측 모드로 부호화되는 영역에 해당하는 움직임 정보, 예컨대 움직임 후보 리스트에서 어느 하나의 모션 벡터를 지시하는 정보를 포함할 수 있다. 도 9의 (c)에서 merge_gpm_idx0는 움직임 후보 리스트에서 제1 영역의 모션 벡터를 지시하는 인덱스이고, merge_gpm_idx1는 움직임 후보 리스트에서 제2 영역의 모션 벡터를 지시하는 인덱스이다.Figures 9 (a) and (b) show a baseline according to the value of the merge GPM division index described in Figure 8 and show syntax indicating information about the GPM mode. When a region divided in GPM mode is encoded in inter-prediction mode, the bitstream contains not only the merge GPM division index but also motion information corresponding to the region encoded in inter-prediction mode, for example, indicating one motion vector in the motion candidate list. May contain information. In Figure 9(c), merge_gpm_idx0 is an index indicating a motion vector of the first area in the motion candidate list, and merge_gpm_idx1 is an index indicating a motion vector of the second area in the motion candidate list.
GPM 모드에서 분할된 각 영역은 인트라 예측 모드 또는 인터 예측 모드로 부호화될 수 있다. 인코더는 인트라 예측 모드로 부호화된 영역의 예측 방향성 모드와 관련된 정보를 비트스트림에 포함시킬 수 있다. 예측 방향성 모드와 관련된 정보는 해당 영역이 DIMD 모드로 부호화되었는지에 대한 정보, 해당 영역이 TIMD 모드로 부호화되었는지에 대한 정보, 해당 영역이 MIP 모드로 부호화되었는지에 대한 정보, 해당 영역이 어떤 참조 픽셀 라인을 사용하여 부호화 되었는지에 대한 정보, 해당 영역이 ISP 모드를 사용하여 부호화되었는지에 대한 정보, 해당 영역이 어떤 분할 형태의 ISP 모드를 사용했는지에 대한 정보, 해당 영역의 부호화에 사용된 MPM 리스트에 대한 정보, 및 해당 영역이 어떤 인트라 예측 방향성 모드를 사용했는지에 대한 정보 중에서 적어도 하나 이상을 포함할 수 있다. 디코더는 비트스트림로부터 인트라 예측 모드로 부호화된 영역의 예측 방향성 모드와 관련된 정보를 획득하여, 예측 방향성 모드와 관련된 정보를 기초로 예측 블록을 생성할 수 있다.Each region divided in GPM mode may be encoded in intra prediction mode or inter prediction mode. The encoder may include information related to the prediction directionality mode of the region encoded in intra prediction mode in the bitstream. Information related to the prediction directionality mode includes information about whether the region is encoded in DIMD mode, information about whether the region is coded in TIMD mode, information about whether the region is coded in MIP mode, and which reference pixel line the region is associated with. Information on whether the area was encoded using ISP mode, information on whether the area was encoded using ISP mode, information on what type of partition ISP mode was used in the area, information on the MPM list used for encoding of the area. It may include at least one of information and information about which intra prediction directional mode the corresponding area used. The decoder may obtain information related to the prediction directionality mode of the region encoded in intra prediction mode from the bitstream and generate a prediction block based on the information related to the prediction directionality mode.
인코더는 인터 예측 모드로 부호화된 영역의 움직임 정보, 예컨대 모션 벡터와 관련된 정보를 비트스트림에 포함시킬 수 있다. 움직임 정보에 관련된 정보는 해당 영역이 TM을 사용하여 부호화되었는지에 대한 정보, 해당 영역이 AMVP 또는 Merge 모드를 사용하여 부호화되었는지에 대한 정보, 해당 영역이 IBC 모드를 사용하여 부호화되었는에 대한 정보, 해당 영역이 Intra TMP 모드를 사용하여 부호화되었는지에 대한 정보, 해당 영역이 어파인(affine) 모드를 사용하여 부호화 되었는지에 대한 정보, 해당 영역이 SMVD 모드를 사용하여 부호화되었는지에 대한 정보, 해당 영역의 부호화에 사용된 참조 방향 지시 정보, 해당 영역이 어느 참조 픽쳐를 사용하여 부호화되었는지에 대한 정보, 해당 영역의 부호화에 사용된 움직임 정보의 차분값과 관련된 정보, 해당 영역의 부호화에 사용된 AMVR과 관련된 정보, 해당 영역의 부호화에 사용된 MMVD 관련 정보, 해당 영역이 부호화에 사용된 움직임 후보 리스트 중 어느 움직 후보가 사용되었는지 지시하는 인덱스 정보, 및 해당 영역의 부호화에 사용된 BCW와 관련된 정보들 중에서 적어도 하나 이상이 포함될 수 있다. 디코더는 비트스트림로부터 인터 예측 모드로 부호화된 영역의 움직임 정보에 관련된 정보를 획득하여, 움직임 정보와 관련된 정보를 기초로 예측 블록을 생성할 수 있다.The encoder may include motion information of a region encoded in inter prediction mode, for example, information related to a motion vector, in the bitstream. Information related to motion information includes information about whether the region was coded using TM, information about whether the region was coded using AMVP or Merge mode, information about whether the region was coded using IBC mode, information about whether the region was coded using IBC mode, Information about whether the region was coded using Intra TMP mode, information about whether the region was coded using affine mode, information about whether the region was coded using SMVD mode, encoding of the region Reference direction indication information used, information about which reference picture the corresponding area was encoded using, information related to the difference value of the motion information used in encoding the corresponding area, information related to the AMVR used in encoding the corresponding area , at least one of MMVD-related information used in encoding of the corresponding area, index information indicating which motion candidate was used among the motion candidate list used in encoding of the corresponding area, and information related to BCW used in encoding of the corresponding area. More may be included. The decoder may obtain information related to motion information of a region encoded in inter prediction mode from the bitstream and generate a prediction block based on the information related to the motion information.
GPM 모드에서 개별 영역은 ISP 모드가 적용되어 다시 2개 또는 4개의 영역으로 분할되어 부호화될 수 있다. 비트스트림은 ISP 모드를 사용하는 영역이 어느 방향으로 분할되어 인코딩되었는지를 지시하는 정보를 포함할 수 있다. 디코더는 해당 정보를 기초로 ISP 모드에서 어느 방향으로 분할되었는지 판단할 수 있다. 앞서 설명한 실시 예들에서 GMP 모드에서 해당 영역이 사각 형태로 분할된 경우, 해당 영역의 부호화에 ISP 모드가 사용될 수 있다.In GPM mode, individual areas can be divided into 2 or 4 areas and encoded by applying ISP mode. The bitstream may include information indicating in which direction the area using the ISP mode was divided and encoded. The decoder can determine which direction it is divided in ISP mode based on the information. In the previously described embodiments, when the corresponding area is divided into a square shape in GMP mode, ISP mode can be used to encode the corresponding area.
인코더는 현재 블록이 사각 형태로 분할되지 않은 GPM 모드인 경우, ISP 모드와 관련된 정보를 비트스트림 내에 포함시키지 않을 수 있다. 디코더는 사각형태로 분할되지 않은 GPM 모드에서 ISP 모드와 관련된 정보를 파싱하지 않을 수 있다. 또한, 사각형태로 분할되지 않은 GPM 모드의 영역에 대해서, 인코더는 해당 영역이 ISP 모드를 사용하여 인코딩되지 않은 것으로 추론할 수 있다.If the current block is in GPM mode that is not divided into squares, the encoder may not include information related to the ISP mode in the bitstream. The decoder may not parse information related to ISP mode in GPM mode that is not segmented into squares. Additionally, for an area in GPM mode that is not divided into squares, the encoder can infer that the area has not been encoded using ISP mode.
도 10은 본 발명의 실시 예에 따라 템플릿 기반으로 GPM 분할 형태 및 인트라 예측 모드를 유도하는 방법을 보여준다.Figure 10 shows a method of deriving a GPM segmentation type and intra prediction mode based on a template according to an embodiment of the present invention.
인코더가 GPM 모드로 분할된 2개의 영역이 모두 인트라 예측 모드로 부호화하는 경우, 각 영역에 대한 인트라 예측 방향성 모드와 관련된 정보 및 분할 형태와 관련된 정보는 각각 시그널링되거나 또는 템플릿 기반 유도 방법을 통해 부호화될 수 있다. 도 10의 (a)는 각 영역에 대한 부호화 정보를 각각 시그널링하는 방법을 나타낸다. 인코더는 분할 형태와 관련된 정보(partition_mode)와 각 영역의 인트라 예측 방향성 모드와 관련된 정보(intra_pred_mode0, intra_pred_mode1)를 비트스트림에 포함시킬 수 있다. 디코더는 비트스트림으로부터 분할 형태와 관련된 정보와 인트라 예측 방향성 모드와 관련된 정보를 파싱한 후, 해당 정보를 이용하여, 현재 블록에 대한 예측 블록을 생성할 수 있다. 도 10의 (b)는 각 영역에 대한 인트라 예측 방향성 모드와 관련된 정보 및 분할 형태와 관련된 정보를 템플릿 기반으로 유도하는 방법을 나타내며, 자세한 내용은 도 11에서 설명한다.When the encoder encodes both regions divided in GPM mode in intra-prediction mode, information related to the intra-prediction directionality mode and information related to the segmentation shape for each region are signaled respectively or encoded through a template-based derivation method. You can. Figure 10(a) shows a method of signaling encoding information for each region. The encoder may include information related to the division type (partition_mode) and information related to the intra prediction directionality mode of each region (intra_pred_mode0, intra_pred_mode1) in the bitstream. The decoder can parse information related to the split type and information related to the intra prediction directionality mode from the bitstream and then use the information to generate a prediction block for the current block. FIG. 10(b) shows a method of deriving information related to the intra prediction directional mode and information related to the segmentation type for each region based on a template, and details are explained in FIG. 11.
도 11은 본 발명의 실시 예에 따라 템플릿 기반으로 GPM 및 인트라 예측 방향성 모드를 유도하는 방법을 보여준다.Figure 11 shows a method of deriving GPM and intra prediction directional mode based on a template according to an embodiment of the present invention.
시그널링을 위해 필요한 비트량을 줄이기 위해서, 인코더 및 디코더에서 도 10의 (b)와 같이 템플릿 기반의 예측 방법이 사용될 수 있다. 템플릿 기반 예측 방법은 현재 블록의 각 영역에 대한 분할 형태와 인트라 예측 방향성 모드와 관련된 정보를 현재 블록의 이미 복원된 주변 화소(pixel)를 사용하여 예측을 수행한다. 먼저, 인코더 및 디코더는 현재 블록의 이미 복원된 주변 화소(pixel)을 사용하여 기준 템플릿을 구성한다. 기준 템플릿은 현재 블록의 좌측 템플릿과 현재 블록의 상단 템플릿으로 구성될 수 있다. 좌측 템플릿의 크기는 Mx현재 블록의 높이이고, 상단 템플릿의 크기는 현재 블록의 너비xM일 수 있다. 이때, M은 1이상의 정수 일 수 있으며, 예를 들어, 4일 수 있다. 다음으로, 인코더 및 디코더는 현재 블록에 사용 가능한 64가지의 분할 형태와 각 영역에 대한 인트라 예측 방향성 정보를 통해 GPM 분할 예측 후보 리스트를 구성한다. 이때, GPM 분할 예측 후보 리스트의 각 후보는 현재 블록의 분할 형태에 대한 정보(예를 들어, 도 8의 merge_gpm_partition_idx)와 2개 영역에 대한 인트라 예측 방향성 모드와 관련된 정보(예를 들어, 도 10의 (a)의 intra_pred_mode0와 intra_pred_mode1)를 포함할 수 있다. 따라서 인코더 및 디코더는 인트라 예측을 통해 예측되는 영역의 예측을 위한 GPM 분할 예측 후보 리스트를 생성할 때, 분할의 형태와 인트라 예측 방향성 모드의 조합 별로 후보를 생성할 수 있다. 다음으로, 인코더 및 디코더는 GPM 분할 예측 후보 리스트 내의 모든 후보들의 정보를 사용하여, 기준 템플릿의 주변 화소(pixel)를 이용하여, 기준 템플릿을 예측하여 예측 템플릿을 구성한다. 기준 템플릿과 예측 템플릿 사이의 유사도를 계산하여 코스트 값을 출력한다. 이때, 코스트 값은 SAD(Sum of Absolute Differences) 또는 MR-SAD(Mean-Removed SAD)를 사용하여 계산될 수 있다. 디코더 및 인코더는 GPM 분할 예측 후보 리스트 내의 모든 후보들에 대한 코스트 값을 계산한 후, 코스트 값을 기준으로 GPM 분할 예측 후보 리스트를 오름차순으로 재정렬할 수 있다. 인코더는 재정렬된 GPM 분할 예측 후보 리스트 중 현재 블록에 가장 적합한 후보의 인덱스를 비트스트림에 포함시킬 수 있다. 또는 재정렬된 GPM 분할 예측 후보 리스트에서 가장 최소 코스트 값을 가지는 후보가 부호화에 사용될 수 있다. 이를 통해 GPM 분할 예측 후보 리스트 중 어느 하나의 후보를 지시하는 정보를 지시하지 않을 수 있다.In order to reduce the amount of bits required for signaling, a template-based prediction method can be used in the encoder and decoder, as shown in (b) of FIG. 10. The template-based prediction method performs prediction using information related to the segmentation type and intra prediction direction mode for each region of the current block using already restored surrounding pixels of the current block. First, the encoder and decoder construct a reference template using already restored surrounding pixels of the current block. The standard template may consist of the left template of the current block and the top template of the current block. The size of the left template may be M x the height of the current block, and the size of the top template may be M x the width of the current block. At this time, M may be an integer of 1 or more, for example, 4. Next, the encoder and decoder construct a GPM split prediction candidate list using the 64 split types available for the current block and intra prediction direction information for each region. At this time, each candidate in the GPM partition prediction candidate list contains information about the partition type of the current block (e.g., merge_gpm_partition_idx in FIG. 8) and information related to the intra prediction directional mode for the two regions (e.g., in FIG. 10) It may include intra_pred_mode0 and intra_pred_mode1) in (a). Therefore, when the encoder and decoder generate a GPM segmentation prediction candidate list for prediction of a region predicted through intra prediction, they can generate candidates for each combination of the type of segmentation and the intra prediction directionality mode. Next, the encoder and decoder construct a prediction template by predicting the reference template using information on all candidates in the GPM segmentation prediction candidate list and using surrounding pixels of the reference template. The similarity between the reference template and the predicted template is calculated and the cost value is output. At this time, the cost value can be calculated using SAD (Sum of Absolute Differences) or MR-SAD (Mean-Removed SAD). The decoder and encoder may calculate cost values for all candidates in the GPM split prediction candidate list and then rearrange the GPM split prediction candidate list in ascending order based on the cost value. The encoder may include the index of the candidate most suitable for the current block among the reordered GPM segmentation prediction candidate list in the bitstream. Alternatively, the candidate with the lowest cost value in the reordered GPM segmentation prediction candidate list may be used for encoding. Through this, information indicating any one candidate from the GPM split prediction candidate list may not be indicated.
디코더는 비트스트림으로부터 현재 블록에 대한 최적 후보 인덱스 정보를 파싱하고, 인코더에서와 동일한 방법으로 생성한 재정렬된 GPM 분할 예측 후보 리스트에서 최적 후보 인덱스가 지시하는 후보의 예측 정보, 예컨대 현재 블록의 분할 형태에 대한 정보, 도 8의 merge_gpm_partition_idx와 2개 영역에 대한 인트라 예측 방향성 모드와 관련된 정보, 예컨대, 도 10의 (a)의 intra_pred_mode0와 intra_pred_mode1를 사용하여 현재 블록을 예측할 수 있다. 또 다른 구체적인 실시 예에서 디코더는 재정렬된 GPM 분할 예측 후보 리스트를 구성한 후, 가장 최소 코스트 값을 가지는 후보를 최적의 후보로 사용하여 현재 블록을 예측할 수 있다.The decoder parses the optimal candidate index information for the current block from the bitstream, and predicts the candidate's prediction information indicated by the optimal candidate index from the reordered GPM segmentation prediction candidate list generated in the same way as the encoder, such as the division form of the current block. The current block can be predicted using information related to merge_gpm_partition_idx of FIG. 8 and information related to the intra prediction directionality mode for the two regions, for example, intra_pred_mode0 and intra_pred_mode1 of (a) of FIG. 10. In another specific embodiment, the decoder may construct a reordered GPM split prediction candidate list and then use the candidate with the lowest cost value as the optimal candidate to predict the current block.
GPM 분할 예측 후보 리스트에 포함될 수 있는 후보들의 개수는 64가지 GPM 분할 형태와 각 영역마다 67가지의 인트라 예측 방향성 모드의 조합이므로, 64x67x66(영역 간 인트라 예측 방향성 모드가 다르다는 가정)으로써 총 28 만여개의 후보가 존재할 수 있다. 복잡도를 감소시키기 위해서, 일부 후보에 대해서만 코스트가 계산될 수 있다. 인코더 및 디코더는 현재 블록의 크기, 현재 블록의 가로 또는 세로의 크기, 현재 블록의 화소(pixel) 개수, 현재 블록이 휘도신호인지 또는 색차 신호인지, 현재 블록에 인접한 주변 블록의 인트라 예측 방향성 모드, 현재 블록에 대한 MPM 리스트, DIMD 혹은 TIMD로 부터 유도된 인트라 예측 방향성 모드, 및 현재 블록에 인접한 주변 블록의 GPM 분할 방법 중 적어도 하나를 기초로, 일부 후보를 선택할 수 있다. 구체적인 실시 예에서 인코더 및 디코더는 모든 인트라 예측 방향성 모드를 사용하여 GPM 분할 예측 후보 리스트를 구성하지 않고, 현재 블록에 대한 MPM 리스트 내의 인트라 예측 방향성 모드만을 사용하여 GPM 분할 예측 후보 리스트를 구성할 수 있다. 또 다른 구체적인 실시 예에서 인코더 및 디코더는 DIMD 또는 TIMD로 부터 유도된 인트라 예측 방향성 모드 중 적어도 하나 이상을 사용하여 GPM 분할 예측 후보 리스트를 구성할 수 있다. 인코더 및 디코더가 주변 블록으로부터 인트라 예측 모드를 유도할 때, 주변 블록의 부호화 모드가 TIMD 모드 혹은 TMRL 모드로 부호화된 경우, 주변 블록의 인트라 예측 모드의 범위는 기존 67개에서 131개로 확장된 인트라 예측 모드가 사용된다. 이때, 인코더 및 디코더는 기존 67개 모드로 인트라 예측 모드의 정밀도(precision)를 감소시킨 후, 변경된 인트라 예측 모드를 사용하여 GPM 분할 예측 후보 리스트를 구성할 수 있다. 또 다른 구체적인 실시 예에서 인코더 및 디코더는 확장된 범위의 인트라 예측 모드를 변경 없이 그대로 사용하여 GPM 분할 예측 후보 리스트를 구성할 수 있다. TMRL에 대한 내용은 추후 기술한다.The number of candidates that can be included in the GPM split prediction candidate list is a combination of 64 GPM split types and 67 intra prediction directionality modes for each region, so the total number of candidates is 64x67x66 (assuming that the intra prediction direction modes are different between regions), or about 280,000. Candidates may exist. To reduce complexity, costs may be calculated for only some candidates. The encoder and decoder determine the size of the current block, the horizontal or vertical size of the current block, the number of pixels in the current block, whether the current block is a luminance signal or a chrominance signal, the intra prediction directionality mode of neighboring blocks adjacent to the current block, Some candidates may be selected based on at least one of the MPM list for the current block, the intra prediction direction mode derived from DIMD or TIMD, and the GPM division method of neighboring blocks adjacent to the current block. In a specific embodiment, the encoder and decoder do not construct the GPM segmentation prediction candidate list using all intra-prediction directionality modes, but only use the intra-prediction directionality mode in the MPM list for the current block to construct the GPM segmentation prediction candidate list. . In another specific embodiment, the encoder and decoder may construct a GPM segmentation prediction candidate list using at least one of the intra prediction directional modes derived from DIMD or TIMD. When the encoder and decoder derive an intra prediction mode from a neighboring block, if the coding mode of the neighboring block is encoded in TIMD mode or TMRL mode, the range of intra prediction modes of the neighboring block is expanded from the existing 67 to 131. mode is used. At this time, the encoder and decoder can reduce the precision of the intra prediction mode to the existing 67 modes and then construct a GPM split prediction candidate list using the changed intra prediction mode. In another specific embodiment, the encoder and decoder may construct a GPM segmentation prediction candidate list by using the extended range of intra prediction modes without change. Details about TMRL will be described later.
또 다른 구체적인 실시 예예서 인코더 및 디코더는 모든 분할 형태를 사용하여 GPM 분할 예측 후보 리스트를 구성하지 않고, 일부 분할 형태만을 사용하여 GPM 분할 예측 후보 리스트를 구성할 수 있다. 구체적으로 인코더 및 디코더는 임의의 분할된 영역 내 픽셀의 개수가 미리 정해진 개수 이내인 GPM 분할을 GPM 분할 예측 후보 리스트에 포함시키지 않을 수 있다. 이때, 미리 정해진 개수는 1이상의 정수 일 수 있다. 구체적으로 10일 수 있다. 또 다른 구체적인 실시 예에서 인코더 및 디코더는 분할에 사용되는 기준선의 시작 위치(sx, sy)와 종료 위치(ex, ey) 사이의 x축 차이 값(ex-sx)의 절대값과 y 축 차이 값(ey-sy)의 절대값의 합이 미리 지정된 값 이내인 경우 또는 기준선의 길이가 미리 지정된 값 이내인 GPM 분할을 GPM 분할 예측 후보 리스트에 포함시키지 않을 수 있다. 이때, 미리 지정된 값은 1이상의 정수 일 수 있다. 구체적으로 미리 지정된 값은 3일 수 있다.In another specific embodiment, the encoder and decoder may not construct the GPM segmentation prediction candidate list using all segmentation types, but may construct the GPM segmentation prediction candidate list using only some segmentation types. Specifically, the encoder and decoder may not include a GPM segmentation in which the number of pixels in any segmented area is within a predetermined number in the GPM segmentation prediction candidate list. At this time, the predetermined number may be an integer of 1 or more. Specifically, it may be 10. In another specific embodiment, the encoder and decoder provide an absolute value of the x-axis difference value (ex-sx) and a y-axis difference value between the starting position (sx, sy) and the ending position (ex, ey) of the baseline used for segmentation. If the sum of the absolute values of (ey-sy) is within a pre-specified value or a GPM split whose baseline length is within a pre-specified value may not be included in the GPM split prediction candidate list. At this time, the pre-designated value may be an integer of 1 or more. Specifically, the pre-designated value may be 3.
GPM 분할 예측 후보 리스트내의 후보 개수를 증가시킬 경우, 부호화 효율은 높지만 복잡도도 같이 증가될 수 있다. 복잡도 증가를 감소시키기 위해서, 인코더는 현재 블록에 대한 GPM 분할 예측 후보 리스트의 특성을 몇 가지로 분류(categorization)한 후, 분류와 관련된 정보를 비트스트림에 포함시킬 수 있다. 디코더는 비트스트림에서 분류와 관련된 정보를 파싱한 후, 분류와 관련된 정보를 기초로 현재 블록에 대한 GPM 분할 예측 후보 리스트를 구성할 수 있다. 이때, GPM 분할 예측 후보 리스트의 특성을 분류하는 기준은 GPM으로 분할된 2개 영역의 화소(pixel) 사이의 복잡도 또는 인트라 예측 방향성 모드 중 적어도 어느 하나를 포함할수 있다. 이때, 복잡도는 영역 내의 화소 사이의 절대합을 기준으로 계산될 수 있다. 절대합이 미리 지정된 값보다 큰 경우, 인코더 및 디코더는 해당 영역의 복잡도가 크다고 판단할 수 있다. 또한, 절대합이 미리 지정된 값보다 같거나 작은 경우, 인코더 및 디코더는 해당 영역의 복잡도가 크다고 판단할 수 있다. 미리 지정된 값은 현재 블록의 픽셀 수를 기초로 결정될 수 있다. 또한, 미리 지정된 값은 1이상의 정수일 수 있다. 또 다른 구체적인 실시 예에서 복잡도는 예측 방향성 모드가 각도 모드인지 또는 비방향성 모드인지 또는 MIP 모드인지를 기초로 계산될 수 있다. 이때, 비방향성 모드는 DC 모드 및 평면(planar) 모드 중 적어도 어느 하나를 포함할 수 있다. When increasing the number of candidates in the GPM segmentation prediction candidate list, coding efficiency is high, but complexity may also increase. In order to reduce the increase in complexity, the encoder can categorize the characteristics of the GPM split prediction candidate list for the current block into several characteristics and then include information related to the classification in the bitstream. After parsing classification-related information from the bitstream, the decoder may construct a GPM split prediction candidate list for the current block based on the classification-related information. At this time, the criteria for classifying the characteristics of the GPM segmented prediction candidate list may include at least one of the complexity between pixels of two regions divided by GPM or the intra prediction directionality mode. At this time, complexity can be calculated based on the absolute sum between pixels in the area. If the absolute sum is greater than a pre-specified value, the encoder and decoder may determine that the complexity of the corresponding area is large. Additionally, if the absolute sum is equal to or smaller than a pre-specified value, the encoder and decoder may determine that the complexity of the corresponding area is large. The pre-specified value may be determined based on the number of pixels in the current block. Additionally, the pre-designated value may be an integer of 1 or more. In another specific embodiment, complexity may be calculated based on whether the predicted directional mode is an angular mode, an undirectional mode, or a MIP mode. At this time, the non-directional mode may include at least one of DC mode and planar mode.
앞서 설명한 실시 예들을 통해 분류된 그룹 별로 허용되는 인트라 예측 방향 성 모드가 달라질 수 있다. 또한, 분류된 그룹 별로 GPM 모드에서 허용되는 분할 형태가 달라질 수 있다. 구체적으로 복잡도가 낮은 그룹에 포함된 영역은 인트라 예측 방향성 모드가 사용되어 부호화되는 것이 허용되지 않을 수 있다. 이때, 인트라 예측 방향성 모드는 DIMD 모드, TIMD 모드 및 각도 모드 중 적어도 어느 하나를 포함할 수 있다. 또한, 디코더는 복잡도가 낮은 그룹에 포함된 영역을 위한 GPM 분할 예측 후보 리스트에서 인트라 예측 방향성 모드를 제외할 수 있다. 또한, 복잡도가 낮은 그룹에 포함된 영역은 인트라 MIP 모드가 사용되어 부호화되는 것이 허용되지 않을 수 있다. 또한, 디코더는 복잡도가 낮은 그룹에 포함된 영역을 위한 GPM 분할 예측 후보 리스트에서 MIP 모드를 제외할 수 있다. 예컨대, GPM 모드가 적용된 현재 블록의 2개 영역이 복잡도가 낮은 것으로 판단하고, 이러한 판단을 지시하는 신택스를 비트스트림에 포함시킬 수 있다. 디코더는 비스트림으로부터 현재 블록의 2개 영역이 복잡도가 낮은 것으로 판단됨을 지시하는 신택스를 파싱하고, 블록의 2개 영역을 위한 GPM 분할 예측 후보 리스트를 미리 지정된 모드로만 구성할 수 있다. 이때, 미리 지정된 모드는 영역 내에서 방향 별 변화가 크지않은 인트라 예측 모드일 수 있다. 구체적으로미리 지정된 모드는 DC 모드, 평면 모드, 수직 모드, 수평 모드, 대각 모드, 및 역대각 방향 모드 중 하나 이상을 포함할 있다. 이러한 실시 예들을 통해 GPM 분할 예측 후보 리스트의 후보 개수가 줄여, 복잡도를 감소시킬 수 있다. 또는, GPM 분할 예측 후보 리스트를 구성할 때, 2개 영역 중에서 1개 영역은 완만한 특성을 지니고 다른 영역은 복잡한 특성을 지니는 인트라 예측 방향성 모드가 사용되는 경우, 인코더 및 디코더에서는 완만한 특성을 지니는 영역의 인트라 예측 방향성 모드를 Planar 모드(혹은 DC)만 사용되도록 제약함으로써, 복잡도를 감소시킬 수 있다.Through the embodiments described above, the allowable intra prediction directionality mode may vary for each group classified. Additionally, the division type allowed in GPM mode may vary for each classified group. Specifically, regions included in low complexity groups may not be allowed to be encoded using the intra prediction directional mode. At this time, the intra prediction directional mode may include at least one of DIMD mode, TIMD mode, and angle mode. Additionally, the decoder may exclude the intra prediction directional mode from the GPM segmentation prediction candidate list for the region included in the low complexity group. Additionally, areas included in low complexity groups may not be allowed to be encoded using intra MIP mode. Additionally, the decoder may exclude the MIP mode from the GPM segmentation prediction candidate list for the region included in the low complexity group. For example, two areas of the current block to which GPM mode is applied may be determined to have low complexity, and a syntax indicating this determination may be included in the bitstream. The decoder can parse the syntax from the non-stream indicating that the two regions of the current block are judged to have low complexity, and configure the GPM split prediction candidate list for the two regions of the block only in a pre-specified mode. At this time, the pre-designated mode may be an intra prediction mode in which there is not much change in each direction within the region. Specifically, the predefined mode may include one or more of DC mode, planar mode, vertical mode, horizontal mode, diagonal mode, and anti-diagonal mode. Through these embodiments, the number of candidates in the GPM split prediction candidate list can be reduced, thereby reducing complexity. Alternatively, when constructing a GPM segmentation prediction candidate list, if an intra prediction directional mode is used in which one of the two regions has gentle characteristics and the other region has complex characteristics, the encoder and decoder have smooth characteristics. Complexity can be reduced by restricting the intra prediction directional mode of the region to be used only in Planar mode (or DC).
다음은 상기 방법으로 구성된 GPM 분할 예측 후보 리스트를 다양한 방법으로 재구성하여 재구성된 GPM 분할 예측 후보 리스트를 유도하는 방법에 대한 설명이다.The following is a description of how to derive a reconstructed GPM segmentation prediction candidate list by reconstructing the GPM segmentation prediction candidate list constructed using the above method using various methods.
또한, GPM 분할 예측 후보 리스트에서 제1 후보의 제1 영역에 해당하는 인트라 예측 방향성 모드의 인덱스와 제2 후보의 제1 영역에 해당하는 인트라 예측 방향성 모드의 인덱스 차이가 미리 지정된 값 이내이고, 제1 후보의 제2 영역에 해당하는 인트라 예측 방향성 모드의 인덱스와 제2 후보의 제2 영역에 해당하는 인트라 예측 방향성 모드의 인덱스 차이가 미리 지정된 값 이내인 경우, 인코더 및 디코더는 제1 후보 및 제2 후보 중 어느 하나를 GPM 분할 예측 후보 리스트에서 제외할 수 있다. 미리 지정된 값은 1이상의 정수일 수 있다. 구체적으로 미리 지정된 값은 3일 수 있다. 예컨대, GPM 분할 후보 리스트 내의 제1 후보의 제1 영역에 대한 인트라 예측 방향성 모드의 인덱스가 35이고, 제2 영역에 대한 인트라 예측 방향성 모드가 5일 수 있다. 이때, GPM 분할 후보 리스트 내의 제2 후보의 제1 영역에 대한 인트라 예측 방향성 모드의 인덱스가 34이고, 제2 영역에 대한 인트라 예측 방향성 모드가 6일 수 있다. 제1 후보의 제1 영역에 해당하는 인트라 예측 방향성 모드의 인덱스와 제2 후보의 제1 영역에 해당하는 인트라 예측 방향성 모드의 차이가 3이내이고, 제1 후보의 제2 영역에 해당하는 인트라 예측 방향성 모드의 인덱스와 제2 후보의 제2 영역에 해당하는 인트라 예측 방향성 모드의 차이가 3이내이다. 따라서 인코더 및 디코더는 제1 후보 및 제2 후보 중 어느 하나를 제외할 수 있다.In addition, in the GPM split prediction candidate list, the difference between the index of the intra prediction directional mode corresponding to the first area of the first candidate and the index of the intra prediction directional mode corresponding to the first area of the second candidate is within a pre-specified value, and If the difference between the index of the intra prediction directional mode corresponding to the second area of candidate 1 and the index of the intra prediction directional mode corresponding to the second area of the second candidate is within a pre-specified value, the encoder and decoder Any one of the 2 candidates can be excluded from the GPM split prediction candidate list. The pre-specified value may be an integer greater than or equal to 1. Specifically, the pre-designated value may be 3. For example, the index of the intra prediction directionality mode for the first area of the first candidate in the GPM division candidate list may be 35, and the index of the intra prediction directionality mode for the second area may be 5. At this time, the index of the intra prediction directionality mode for the first area of the second candidate in the GPM division candidate list may be 34, and the intra prediction directionality mode for the second area may be 6. The difference between the index of the intra prediction directional mode corresponding to the first region of the first candidate and the intra prediction directional mode corresponding to the first region of the second candidate is within 3, and the intra prediction corresponding to the second region of the first candidate The difference between the index of the directional mode and the intra prediction directional mode corresponding to the second region of the second candidate is within 3. Therefore, the encoder and decoder can exclude either the first candidate or the second candidate.
앞서 설명한 실시 예들에서, GPM 분할 예측 후보 리스트에서 제1 후보의 제1 영역에 해당하는 인트라 예측 방향성 모드의 인덱스와 제2 후보의 제1 영역에 해당하는 인트라 예측 방향성 모드의 인덱스 차이가 미리 지정된 값 이내이거나, 제1 후보의 제2 영역에 해당하는 인트라 예측 방향성 모드의 인덱스와 제2 후보의 제2 영역에 해당하는 인트라 예측 방향성 모드의 인덱스 차이가 미리 지정된 값 이내인 경우, 인코더 및 디코더는 제1 후보 및 제2 후보 중 어느 하나를 GPM 분할 예측 후보 리스트에서 제외할 수 있다. 또한, 앞서 설명한 실시 예에서 인코더 및 디코더는 제1 후보 및 제2 후보 중 GPM 후보 리스트에 늦게 삽입된 후보를 제외할 수 있다. 또 다른 구체적인 실시 예에서 인코더 및 디코더는 제1 후보 및 제2 후보 중 복원에 더 많은 코스트가 필요한 후보를 제외할 수 있다. In the above-described embodiments, in the GPM split prediction candidate list, the difference between the index of the intra prediction directional mode corresponding to the first region of the first candidate and the index of the intra prediction directional mode corresponding to the first region of the second candidate is a predetermined value. or, if the difference between the index of the intra prediction directional mode corresponding to the second area of the first candidate and the index of the intra prediction directional mode corresponding to the second area of the second candidate is within a predetermined value, the encoder and decoder Any one of the first candidate and the second candidate can be excluded from the GPM split prediction candidate list. Additionally, in the previously described embodiment, the encoder and decoder may exclude candidates inserted late into the GPM candidate list among the first and second candidates. In another specific embodiment, the encoder and decoder may exclude the candidate that requires more cost for restoration among the first candidate and the second candidate.
또 다른 구체적인 실시 예에서 인코더 및 디코더는 GPM 분할 예측 후보 리스트에서 후보의 인트라 예측 방향성 모드와 GPM 모드의 분할 형태 사이의 유사도를 기초로 후보를 제외할 수 있다. 인코더 및 디코더는 GPM 분할 예측 후보 리스트에서 후보의 인트라 예측 방향성 모드와 GPM 모드의 분할 형태 사이의 유사도가 미리 지정된 값이하면 해당 후보를 제외할 수 있다. 유사도는 인트라 예측 방향성 모드의 각도와 GPM 모드의 분할 기준선의 방향을 각도로 환산한 값과의 차이를 기초로 계산될 수 있다.In another specific embodiment, the encoder and decoder may exclude a candidate from the GPM segmentation prediction candidate list based on the similarity between the intra prediction directional mode of the candidate and the segmentation form of the GPM mode. The encoder and decoder may exclude the corresponding candidate from the GPM segmentation prediction candidate list if the similarity between the intra prediction directional mode of the candidate and the segmentation form of the GPM mode is less than a predetermined value. Similarity can be calculated based on the difference between the angle of the intra prediction directional mode and the direction of the division reference line of the GPM mode converted into an angle.
도 12는 본 발명의 실시 예에 따른 GPM 모드에서 사용되는 분할 기준선의 각도를 보여준다.Figure 12 shows the angle of the dividing reference line used in GPM mode according to an embodiment of the present invention.
인코더 및 디코더는 인트라 예측에 사용되는 인트라 예측 방향성 모드의 각도를 기초로 GPM 모드에서 사용되는 분할 기준선의 각도를 조정할 수 있다. GPM 모드에서 사용되는 분할 기준선의 각도의 세밀도가 인트라 예측에 사용되는 인트라 예측 방향성 모드의 각도의 세밀도보다 낮기 때문이다. 구체적으로 GPM 모드에서 사용되는 분할 기준선의 각도와 인트라 예측에 사용되는 인트라 예측 방향성 모드의 각도가 다른 경우, 인코더 및 디코더는 GPM 모드에서 사용되는 분할 기준선의 각도를 인트라 예측에 사용되는 인트라 예측 방향성 모드의 각도로 수정할 수 있다. 또한, 인코더 및 디코더는 수정된 GPM 모드에서 사용되는 분할 기준선의 각도를 기초로 GPM 분할 예측 후보 리스트를 재구성할 수 있다. 도 12의 실시 예에서 GPM 분할 예측 후보 리스트의 한 후보의 분할 기준선의 각도는 3이고, 해당 후보의 인트라 예측에 사용되는 인트라 예측 방향성 모드의 각도는 37이다. 이때, 인코더 및 디코더는 해당 후보의 분할 기준선의 각도를 3'로 변경한다.The encoder and decoder can adjust the angle of the segmentation reference line used in GPM mode based on the angle of the intra prediction directional mode used in intra prediction. This is because the angle precision of the division reference line used in GPM mode is lower than the angle precision of the intra prediction directional mode used in intra prediction. Specifically, if the angle of the segmentation baseline used in GPM mode and the angle of the intra prediction directional mode used in intra prediction are different, the encoder and decoder change the angle of the segmentation baseline used in GPM mode to the angle of the intra prediction directional mode used in intra prediction. It can be modified to an angle of . Additionally, the encoder and decoder can reconstruct the GPM segmentation prediction candidate list based on the angle of the segmentation reference line used in the modified GPM mode. In the embodiment of Figure 12, the angle of the division reference line of one candidate in the GPM division prediction candidate list is 3, and the angle of the intra prediction directional mode used for intra prediction of the candidate is 37. At this time, the encoder and decoder change the angle of the segmentation reference line of the candidate to 3'.
템플릿 기반의 블록 예측 방법은 템플릿과 현재 블록 사이의 유사도에 따라 부호화 효율이 달라질 수 있다. 템플릿과 현재 블록 사이의 유사도를 높여 템플릿 기반의 예측 방법의 효율성을 높이는 실시 예들에 대해 설명한다.The coding efficiency of the template-based block prediction method may vary depending on the similarity between the template and the current block. Embodiments that increase the efficiency of the template-based prediction method by increasing the similarity between the template and the current block will be described.
인코더 및 디코더에서 앞서 설명한 실시 예들을 통해 생성한 GPM 분할 예측 후보 리스트를 인코더 및 디코더는 현재 블록의 크기, 현재 블록의 가로 또는 세로의 크기, 현재 블록의 화소(pixel) 개수, 현재 블록이 휘도 신호인지 또는 색차 신호인지, 현재 블록에 인접한 주변 블록의 인트라 예측 방향성 모드, 현재 블록에 대한 MPM 리스트, DIMD 혹은 TIMD로 부터 유도된 인트라 예측 방향성 모드, 현재 블록에 인접한 주변 블록의 GPM 분할 방법, GPM 분할 예측 후보의 인트라 예측 방향성 모드가 평면(Planar) 모드 인지 또는 DC 모드인지, GPM 분할 예측 후보 리스트의 각 후보의 코스트 값 중 적어도 하나를 기초로, GPM 분할 예측 후보 리스트를 재정렬할 수 있다. 인코더 및 디코더는 현재 블록에 인접한 주변 블록의 인트라 예측 방향성 모드의 인덱스와 GPM 분할 예측 후보 리스트의 후보에 사용되는 인트라 예측 방향성 모드의 인덱스 사이 차이가 미리 지정된 값 내인 후보의 우선 순위를 현재 블록에 인접한 주변 블록의 인트라 예측 방향성 모드의 인덱스와 GPM 분할 예측 후보 리스트의 후보에 사용되는 인트라 예측 방향성 모드의 인덱스 사이 차이의 절대값이 미리 지정된 값과 같거나 큰 후보보다 높은 우선 순위로 지정할 수 있다. 이때, 미리 지정된 값은 1 이상의 정수일 수 있다. 미리 지정된 값은 3일 수 있다. 또 다른 구체적인 실시 예에서 인코더 및 디코더는 GPM 분할 예측 후보 리스트의 후보 중 인트라 예측 방향성 모드가 평면(Planar) 모드 또는 DC 모드인 후보의 우선 순위를 인트라 예측 방향성 모드가 평면(Planar) 모드 또는 DC 모드가 아닌 후보의 우선 순위보다 높게 GPM 분할 예측 후보를 리스트를 재정렬할 수 있다.The encoder and decoder use the GPM segmentation prediction candidate list generated through the above-described embodiments to determine the size of the current block, the horizontal or vertical size of the current block, the number of pixels of the current block, and the luminance signal of the current block. Perception or chrominance signal, intra prediction directionality mode of neighboring blocks adjacent to the current block, MPM list for the current block, intra prediction directionality mode derived from DIMD or TIMD, GPM division method of neighboring blocks adjacent to the current block, GPM division The GPM split prediction candidate list can be rearranged based on whether the intra prediction directional mode of the prediction candidate is planar mode or DC mode and at least one of the cost values of each candidate in the GPM split prediction candidate list. The encoder and decoder determine the priority of the candidate whose difference between the index of the intra prediction directionality mode of the neighboring block adjacent to the current block and the index of the intra prediction directionality mode used for the candidate in the GPM split prediction candidate list is within a pre-specified value adjacent to the current block. The absolute value of the difference between the index of the intra prediction direction mode of a neighboring block and the index of the intra prediction direction mode used for the candidate in the GPM split prediction candidate list can be given higher priority than the candidate whose absolute value is equal to or greater than a pre-specified value. At this time, the pre-designated value may be an integer of 1 or more. The pre-specified value may be 3. In another specific embodiment, the encoder and the decoder prioritize candidates whose intra prediction directionality mode is Planar mode or DC mode among the candidates in the GPM split prediction candidate list, and whose intra prediction directionality mode is Planar mode or DC mode. The list of GPM split prediction candidates can be rearranged to have a higher priority than the non-GPM candidates.
또 다른 구체적인 실시 예에서 인코더 및 디코더는 인접한 주변 블록의 인트라 예측 방향성 모드의 인덱스와 GPM 분할 예측 후보 리스트의 후보에 사용되는 인트라 예측 방향 모드의 인덱스 사이 차이를 기초로 GPM 분할 예측 후보 리스트의 후보의 코스트를 계산할 때 사용되는 가중치를 결정할 수 있다. 구체적으로 인접한 주변 블록의 인트라 예측 방향성 모드의 인덱스와 GPM 분할 예측 후보 리스트의 후보에 사용되는 인트라 예측 방향성 모드의 인덱스 사이 차이의 절대값이 미리 지정된 값보다 큰 경우, 인코더 및 디코더는 SAD 혹은 MR-SAD로 계산된 해당 후보의 코스트에 1보다 큰 가중치를 곱한 값으로 코스트를 재계산할 수 있다. 미리 지정된 값은 0일 수 있다. 또 다른 구체적인 실시 예에서 미리 지정된 값은 1보다 큰 정수일 수 있다. 예컨대, 미리 지정된 값은 3일 수 있다. In another specific embodiment, the encoder and the decoder determine the number of candidates in the GPM split prediction candidate list based on the difference between the index of the intra prediction direction mode of the adjacent neighboring block and the index of the intra prediction direction mode used for the candidate in the GPM split prediction candidate list. You can determine the weight used when calculating cost. Specifically, if the absolute value of the difference between the index of the intra-prediction directionality mode of an adjacent neighboring block and the index of the intra-prediction directionality mode used for the candidate in the GPM split prediction candidate list is greater than a pre-specified value, the encoder and decoder use SAD or MR- The cost can be recalculated by multiplying the candidate's cost calculated with SAD by a weight greater than 1. The pre-specified value may be 0. In another specific embodiment, the pre-specified value may be an integer greater than 1. For example, the pre-designated value may be 3.
또 다른 구체적인 실시 예서 GPM 분할 예측 후보 리스트 내의 후보에 대한 인트라 예측 방향성 모드가 평면(Planar) 모드 또는 DC 모드인 경우, 인코더 및 디코더는 SAD 혹은 MR-SAD로 계산된 해당 후보의 코스트에 1보다 큰 가중치를 곱한 값으로 코스트를 재계산할 수 있다.In another specific embodiment, when the intra prediction directional mode for a candidate in the GPM segmentation prediction candidate list is Planar mode or DC mode, the encoder and decoder add a cost of the candidate calculated by SAD or MR-SAD greater than 1. The cost can be recalculated by multiplying the weight.
또한, 가중치 값은 각 후보의 인트라 예측 방향성 모드와 주변 블록의 인트라 예측 방향성 모드 사이의 차이가 클수록 커질 수 있다. 또 다른 구체적인 실시 예에서, 1보다 큰 가중치 값은 2이상의 정수일 수 있다. 예컨대, 가중치 값은 2일 수 있다. Additionally, the weight value may increase as the difference between the intra prediction directionality mode of each candidate and the intra prediction directionality mode of the neighboring block increases. In another specific embodiment, the weight value greater than 1 may be an integer greater than or equal to 2. For example, the weight value may be 2.
또는, GPM 분할 예측 후보 리스트 내의 후보에 대한 인트라 예측 방향성 모드가 평면(Planar) 또는 DC 모드가 아닌 경우, 인코더 및 디코더는 SAD 혹은 MR-SAD로 계산된 해당 후보의 코스트 값에 1보다 큰 가중치, 예컨대, 1.1 또는 1.2를 곱하여 코스트 값을 재계산할 수 있다.Alternatively, if the intra prediction directional mode for a candidate in the GPM split prediction candidate list is not Planar or DC mode, the encoder and decoder add a weight greater than 1 to the cost value of the candidate calculated by SAD or MR-SAD, For example, the cost value can be recalculated by multiplying by 1.1 or 1.2.
GPM 모드로 부호화된 현재 블록의 2개 영역이 모두 인트라 예측 모드로 부호화되는 경우, 해당 영역에는 ISP 모드가 허용되지 않을 수 있다. 즉, 현재 블록이 GPM 모드로 부호화된 경우, 디코더는 ISP와 관련된 신택스를 파싱하지 않고, ISP와 관련된 신택스의 값을 0으로 추론할 수 있다. 또한, 현재 블록이 ISP 모드로 부호화된 경우, 디코더는 GPM 모드와 관련된 신택스를 파싱하지 않고, GPM 모드와 관련된 신택스의 값을 0으로 추론할 수 있다. 이때, 0은 해당 모드가 현재 블록에 적용되지 않는다는 것을 의미할 수 있다.If both regions of the current block encoded in GPM mode are encoded in intra prediction mode, ISP mode may not be allowed in those regions. That is, if the current block is encoded in GPM mode, the decoder does not parse the syntax related to the ISP and can infer that the value of the syntax related to the ISP is 0. Additionally, if the current block is encoded in ISP mode, the decoder may not parse the syntax related to the GPM mode and may infer that the value of the syntax related to the GPM mode is 0. At this time, 0 may mean that the mode is not applied to the current block.
GPM 모드로 부호화된 현재 블록의 2개 영역이 모두 인트라 예측 모드로 부호화되는 경우, 해당 영역의 참조 픽셀 라인은 현재 블록과 가장 인접한 참조 픽셀 라인만 사용될 수 있다. 디코더는 현재 블록이 GPM 모드로 부호화된 경우, 참조 픽셀 라인과 관련된 신택스를 파싱하지 않고, 참조 픽셀 라인과 관련된 신택스를 0으로 추론할 수 있다. 또는, 현재 블록의 인트라 예측에 사용되는 참조 픽셀 라인이 0이 아닌 경우, 디코더는 GPM 모드와 관련된 신택스를 파싱하지 않고, GPM 모드와 관련된 신택스의 값을 0으로 추론할 수 있다. 이때, 0은 해당 모드가 현재 블록에 적용되지 않는다는 것을 의미할 수 있다.If both regions of the current block encoded in GPM mode are encoded in intra prediction mode, only the reference pixel line in the corresponding region that is closest to the current block can be used. If the current block is encoded in GPM mode, the decoder may infer the syntax related to the reference pixel line as 0 without parsing the syntax related to the reference pixel line. Alternatively, if the reference pixel line used for intra prediction of the current block is not 0, the decoder may not parse the syntax related to the GPM mode and may infer that the value of the syntax related to the GPM mode is 0. At this time, 0 may mean that the mode is not applied to the current block.
도 13은 본 발명의 실시 예에 따라 GPM 모드와 ISP 모드를 통합하여 시그널링하는 방법의 신택스 구조를 나타낸다.Figure 13 shows the syntax structure of a method for signaling by integrating GPM mode and ISP mode according to an embodiment of the present invention.
GPM 모드는 현재 블록을 복수, 예컨대 2개 영역으로 분할하여 부호화한다. 따라서 GPM 모드는 수직 혹은 수평으로 분할하는 ISP 모드와 유사한 특성을 지닌다. 또한, GPM 모드의 선택 비율이 크지 않다. 따라서, GPM 모드와 ISP 모드를 통합하여 시그널링함으로써, 부호화되는 빈(bin)의 개수를 줄여 부호화 효율을 향상시킬 수 있다. 구체적으로 현재 블록이 GPM 모드 또는 ISP 모드 중 어느 하나의 모드로 부호화되었는지에 대한 정보가 하나의 신택스를 사용하여 시그널링될 수 있다. 예컨대, 디코더는 현재 블록이 GPM 모드 또는 ISP 모드로 부호화된지에 대한 정보를 파싱할 수 있다. 설명의 편의를 위해 GPM 모드 또는 ISP 모드로 부호화된지에 대한 정보를 분할 모드(partion_mode)로 지칭한다. 분할 모드의 값이 0일 경우, 현재 블록은 GPM 모드 혹은 ISP 모드로 부호화되지 않았다는 것을 의미할 수 있다. 분할 모드의 값이 1일 경우, 분할 모드는 현재 블록이 ISP 모드로 부호화된 것을 의미할 수 있다. 이때, 디코더는 ISP 모드와 관련된 하나 이상의 신택스를 파싱할 수 있다. 분할 모드의 값이 2일 경우, 분할 모드는 현재 블록이 GPM 모드로 부호화되었다는 것을 의미할 수 있다. 이때, 디코더는 GPM 모드와 관련된 하나 이상의 신택스를 파싱할 수 있다. 이때, 디코더는 GPM 모드와 관련된 신택스인 intra_gpm_index를 파싱할 수 있다. Intra_gpm_index는 GPM 분할 예측 후보 리스트에서 최적의 후보를 지시하는 인덱스 정보일 수 있다. 디코더는 Intra_gpm_index가 지시하는 인덱스에 따라 GPM 분할 예측 후보 리스트에서 최적의 GPM 분할 예측 후보를 선택할 수 있다. 이때, 분할 모드는 최대 2개 빈(bin)으로 시그널링될 수 있다. 또한, 분할 모드가 CABAC으로 부호화 또는 복호화되기 위해, 분할 모드를 시그널링하는 2개의 빈에 서로 다른 문맥 모델이 적용될 수 있다. 또 다른 구체적인 실시 예에서 분할 모드를 시그널링하는 2개의 빈 중 첫 번째 빈에만 문맥 모델이 적용될 수 있고, 두 번째 빈은 바이 패스(by-pass)로 부호화될 수 있다.GPM mode divides the current block into multiple areas, for example, two areas and encodes them. Therefore, GPM mode has similar characteristics to ISP mode, which divides vertically or horizontally. Additionally, the selection ratio of GPM mode is not large. Therefore, by integrating signaling of the GPM mode and the ISP mode, the number of bins to be encoded can be reduced and coding efficiency can be improved. Specifically, information about whether the current block is encoded in either GPM mode or ISP mode can be signaled using one syntax. For example, the decoder can parse information about whether the current block is encoded in GPM mode or ISP mode. For convenience of explanation, information about whether it is encoded in GPM mode or ISP mode is referred to as partition mode (partion_mode). If the value of the split mode is 0, this may mean that the current block is not encoded in GPM mode or ISP mode. If the value of the split mode is 1, the split mode may mean that the current block is encoded in ISP mode. At this time, the decoder may parse one or more syntax related to the ISP mode. If the value of the split mode is 2, the split mode may mean that the current block is encoded in GPM mode. At this time, the decoder may parse one or more syntax related to the GPM mode. At this time, the decoder can parse intra_gpm_index, which is a syntax related to the GPM mode. Intra_gpm_index may be index information indicating the optimal candidate in the GPM split prediction candidate list. The decoder can select the optimal GPM split prediction candidate from the GPM split prediction candidate list according to the index indicated by Intra_gpm_index. At this time, the split mode can be signaled in up to two bins. Additionally, in order for the partition mode to be encoded or decoded with CABAC, different context models may be applied to the two bins signaling the partition mode. In another specific embodiment, the context model may be applied to only the first bin of the two bins signaling the split mode, and the second bin may be encoded as a by-pass.
도 14는 본 발명의 실시 예에 따라 현재 블록을 2개 이상의 영역으로 분할하는 GPM 모드의 분할 형태를 보여준다.Figure 14 shows the division form of GPM mode in which the current block is divided into two or more areas according to an embodiment of the present invention.
도 14의 (a)는 동일한 각도를 기준으로 3개 영역으로 분할되는 GPM 모드를 보여준다. 도 14의 (b)는 서로 다른 각도를 기준으로 3개 영역으로 분할되는 GPM 모드를 보여준다. 이외에도 현재 블록을 4개 이상의 영역으로 분할하는 GPM 모드가 사용될 수 있다. 현재 블록에서 분할된 각 영역은 각각 인트라 예측 모드 또는 인터 예측 모드를 사용하여 부호화 또는 복호화될 수 있다. 또 다른 구체적인 실시 예에서 현재 블록이 분활된 영역 중 적어도 하나의 영역은 인트라 예측 모드로 부호화 또는 복호화되고, 현재 블록이 분활된 영역 중 적어도 하나의 영역은 인터 예측 모드로 부호화 또는 복호화될 수 있다. 예를 들어, GPM 모드에 의해 현재 블록이 분할된 3개 영역 중 2개 영역이 인트라 예측 모드로 부호화된 경우, 나머지 하나의 영역은 인터 예측 모드로 부호화되어야할 수 있다. 또 다른 구체적인 실시 예에서 GPM 모드에 의해 현재 블록이 분할된 모든 영역이 인트라 예측 모드로 부호화될 수 있다. 이때, 분할된 모든 영역에 서로 다른 인트라 예측 방향성 모드가 사용될 수 있다. 또 다른 구체적인 실시 예에서 분할된 모든 영역에 서로 같은 인트라 예측 방향성 모드가 사용될 수 있다. 또 다른 구체적인 실시 예에서 적어도 하나의 영역에 대한 인트라 예측 모드는 다른 영역의 인트라 예측 방향성 모드와 다르게 설정되거나 또는 평면 모드 또는 DC 모드가 사용될 수 있다.Figure 14 (a) shows the GPM mode divided into three areas based on the same angle. Figure 14 (b) shows the GPM mode divided into three areas based on different angles. In addition, GPM mode, which divides the current block into four or more areas, can be used. Each region divided from the current block may be encoded or decoded using intra prediction mode or inter prediction mode, respectively. In another specific embodiment, at least one region among the regions into which the current block is divided may be encoded or decoded in an intra prediction mode, and at least one region among the regions into which the current block is divided may be encoded or decoded in an inter prediction mode. For example, if two of three regions in which the current block is divided by GPM mode are encoded in intra-prediction mode, the remaining region may need to be encoded in inter-prediction mode. In another specific embodiment, all areas in which the current block is divided by GPM mode may be encoded in intra prediction mode. At this time, different intra prediction directional modes can be used in all divided areas. In another specific embodiment, the same intra prediction directional mode may be used in all divided regions. In another specific embodiment, the intra prediction mode for at least one region may be set differently from the intra prediction directional mode for another region, or a planar mode or DC mode may be used.
도 15는 본 발명의 실시 예에 따라 GPM 모드가 적용된 현재 블록의 분할 형태를 나타낸다.Figure 15 shows the division form of the current block to which GPM mode is applied according to an embodiment of the present invention.
인코더 및 디코더는 GPM 모드에서 현재 블록을 분할된 영역 중 템플릿과 인접한 영역이 더 많은 영역에서는 템플릿 기반 예측을 사용하고, 인접한 영역이 더 적은 영역에서는 템플릿 기반 예측을 사용하지 않을 수 있다. 예컨대, 도 15에서 제1 영역(A)은 템플릿과 인접한 영역이 있고, 제2 영역(B)은 템플릿과 인접하지 않는다. 따라서 인코더와 디코더는 제1 영역(A)에 템플릿 기반 예측을 사용하여 부호화 및 복호화를 수행하고, 제2 영역(B)에 템플릿 기반 예측을 사용하지 않을 수 있다. 이러한 실시 예에서 템플릿 기반 예측이 사용되지 않는 영역에 MPM 기반 인트라 예측이 사용될 수 있다. 또 다른 구체적인 실시 예에서 템플릿 기반 예측이 사용되지 않는 영역은 평면(planar) 모드, DC 모드 또는 MIP 모드 중 어느 하나를 사용하여 예측될 수 있다. 구체적으로 현재 블록이 GPM 모드로 부호화되고, GPM 모드에 분할된 현재 블록의 2개의 영역 모두 인트라 예측 모드로 부호화될 수 있다. 이때, 인코더 및 디코더는 어느 하나의 영역에 대해서는 템플릿 기반의 GPM 분할 예측 후보리스트를 구성할 수 있다. 이때, 디코더는 나머지 영역에 대해서는 MPM 기반의 인트라 예측 방향성 모드, 평면 모드, DC 모드 및 MIP 모드 중 어느 하나를 사용하여 복호화할 수 있다.In GPM mode, the encoder and decoder may use template-based prediction in areas where there are more adjacent areas to the template among the areas where the current block is divided, and may not use template-based prediction in areas where there are fewer adjacent areas. For example, in FIG. 15, the first area (A) is adjacent to the template, and the second area (B) is not adjacent to the template. Therefore, the encoder and decoder may perform encoding and decoding using template-based prediction in the first area (A) and may not use template-based prediction in the second area (B). In this embodiment, MPM-based intra prediction can be used in areas where template-based prediction is not used. In another specific embodiment, a region where template-based prediction is not used may be predicted using any one of planar mode, DC mode, or MIP mode. Specifically, the current block may be encoded in GPM mode, and both regions of the current block divided into GPM mode may be encoded in intra prediction mode. At this time, the encoder and decoder can configure a template-based GPM segmentation prediction candidate list for one region. At this time, the decoder can decode the remaining area using any one of MPM-based intra prediction directional mode, planar mode, DC mode, and MIP mode.
GPM 모드에 의해 분할된 2개 영역이 모두 인트라 예측 모드 또는 인터 예측 모드로 분활되는 경우에 적용되는 실시 예에 대해 설명한다. 이때, 어느 하나의 영역이 인트라 예측 모드를 사용하여 부호화된 경우, 해당 영역이 현재 블록에 인접한 복원된 샘플과 얼마나 인접한지에 따라 해당 영역에 PDPC 적용 여부가 달라질 수 있다. 구체적으로 어느 하나의 영역에서 경계 부분 샘플이 복원된 주변 블록 샘플과 미리 지정된 개수이상 인접한 경우, 해당 영역에 PDPC가 적용될 수 있다. 여기서, 미리 지정된 개수는 0이상의 정수 일 수 있다. 구체적으로 미리 지정된 개수는 4일 수 있다. 실시 일 예로, 도 15에서 A 영역은 현재 블록에 인접한 복원된 샘플과 대부분 인접하로, A 영역에는 PDPC가 적용될 수 있다. 하지만, B 영역은 현재 블록에 인접한 복원된 샘플과 인접한 샘플이 없거나 혹은 1개만 존재하므로, PDPC가 적용되지 않을 수 있다.An embodiment applied when both regions divided by GPM mode are divided into intra prediction mode or inter prediction mode will be described. At this time, when one region is encoded using the intra prediction mode, whether or not PDPC is applied to the region may vary depending on how adjacent the region is to the reconstructed sample adjacent to the current block. Specifically, if the boundary sample in one area is adjacent to a predetermined number of reconstructed neighboring block samples, PDPC may be applied to that area. Here, the pre-designated number may be an integer greater than or equal to 0. Specifically, the pre-designated number may be 4. As an example of an embodiment, area A in FIG. 15 is mostly adjacent to reconstructed samples adjacent to the current block, and PDPC may be applied to area A. However, in area B, PDPC may not be applied because there is no or only one sample adjacent to the reconstructed sample adjacent to the current block.
인코더 및 디코더는 GPM 모드에 의해 분할된 복수의 영역 중 어느 하나가 인트라 예측 모드를 사용하여 부호화된지를 기초로 현재 블록을 복원할 때 사용할 디블록킹 필터의 세기를 결정할 수 있다. GPM 모드에 의해 분할된 2개 영역 중 어느 하나가 인트라 예측 모드로 부호화된 경우, 인코더 및 디코더는 현재 블록을 복원할 때 디블록킹 필터링(bs)의 세기를 미리 지정된 값으로 설정할 수 있다. 예컨대, 미리 지정된 값은 2일 수 있다. 이를 통해 현재 블록의 경계에 강한 필터링을 적용할 수 있다. The encoder and decoder may determine the strength of the deblocking filter to be used when restoring the current block based on which one of the plurality of regions divided by the GPM mode is encoded using the intra prediction mode. If either of the two regions divided by GPM mode is encoded in intra prediction mode, the encoder and decoder can set the strength of deblocking filtering (bs) to a pre-specified value when restoring the current block. For example, the pre-designated value may be 2. This allows strong filtering to be applied to the boundaries of the current block.
GPM 모드가 적용된 현재 블록의 2개 영역 중에서 임의의 영역이 인터 예측 모드로 부호화된 경우, 해당 영역의 움직임 정보, 예컨대 모션 벡터는 TM, DMVR, Multi-pass DMVR, 및 MMVD 중 적어도 하나를 통해 보정될 수 있다. 또 다른 구체적인 실시 예에서 GPM 모드가 적용된 현재 블록의 2개 영역 중에서 어느 하나의 영역이 인터 예측 모드로 부호화된 경우, 해당 영역의 움직임 정보, 예컨대 모션 벡터는 보정되지 않을 수 있다. 이때, 디코더는 GPM 모드에 의해 분할된 현재 영역 중 인터 예측 모드로 부호화된 영역에 대한 움직임 정보 보정 관련 신택스를 파싱하지 않고 미리 지정된 값으로 추론할 수 있다. 미리 지정된 값은 0일 수 있다. 움직임 정보 보정 관련 신택스는 TM을 적용할지를 지시하는 정보, DMVR를 적용할 지 지시하는 정보, 및 MMVD를 적용할지 지시하는 정보 중 적어도 어느 하나를 포함할 수 있다. 또 다른 구체적인 실시 예에서 GPM 모드가 적용된 현재 블록의 2개 영역 중에서 어느 하나의 영역이 인터 예측 모드로 부호화되고, 해당 영역에서 경계 부분 샘플이 복원된 주변 블록 샘플과 미리 지정된 개수이상 인접한 경우, 해당 영역에 OBMC가 적용될 수 있다. 여기서, 미리 지정된 개수는 0이상의 정수 일 수 있다. 이때, 미리 지정되는 개수는4일 수 있다. 또 다른 구체적인 실시 예에서 GPM 모드가 적용된 현재 블록의 2개 영역 중에서 어느 하나의 영역이 인터 예측 모드로 부호화되고, 해당 영역에서 경계 부분 샘플이 복원된 주변 블록 샘플과 미리 지정된 개수보다 적게 인접한 경우, 해당 영역에 OBMC가 적용되지 않을 수 있다. 이때, 디코더는 GPM 모드에 의해 분할된 현재 영역 중 인터 예측 모드 부호화된 영역에 대한 OBMC 관련 신택스를 파싱하지 않고 미리 지정된 값으로 추론할 수 있다. 미리 지정된 값은 0일 수 있다. 또한, 미리 지정된 값은 OBMC를 적용하지 않는 것을 의미할 수 있다. 또 다른 구체적인 실시 예에서 GPM 모드가 적용된 현재 블록의 2개 영역 중에서 어느 하나의 영역이 인터 예측 모드로 부호화된 경우, 해당 영역에 MHP 모드가 적용될 수 있다. 또 다른 구체적인 실시 예에서 GPM 모드가 적용된 현재 블록의 2개 영역 중에서 어느 하나의 영역이 인터 예측 모드로 부호화된 경우, 해당 영역에MHP 모드가 적용되지 않을 수 있다. 이때, 디코더는 GPM 모드에 의해 분할된 현재 영역 중 인터 예측 모드 부호화된 영역에 대한 MHP 모드 관련 신택스를 파싱하지 않고 미리 지정된 값으로 추론할 수 있다. 미리 지정된 값은 0일 수 있다. 또한, 미리 지정된 값은 MHP를 적용하지 않는 것을 의미할 수 있다.If any of the two regions of the current block to which GPM mode is applied is encoded in inter-prediction mode, the motion information of the corresponding region, such as a motion vector, is corrected through at least one of TM, DMVR, Multi-pass DMVR, and MMVD. It can be. In another specific embodiment, when one of two regions of the current block to which GPM mode is applied is encoded in inter prediction mode, motion information, for example, a motion vector, of the corresponding region may not be corrected. At this time, the decoder may infer a pre-designated value without parsing the syntax related to motion information correction for the area encoded in inter prediction mode among the current area divided by GPM mode. The pre-specified value may be 0. The syntax related to motion information correction may include at least one of information indicating whether to apply TM, information indicating whether to apply DMVR, and information indicating whether to apply MMVD. In another specific embodiment, if one of the two regions of the current block to which the GPM mode is applied is encoded in inter prediction mode, and the boundary part sample in the region is adjacent to the restored neighboring block sample by a predetermined number or more, the corresponding OBMC can be applied to the area. Here, the pre-designated number may be an integer greater than or equal to 0. At this time, the pre-designated number may be 4. In another specific embodiment, if one of the two regions of the current block to which the GPM mode is applied is encoded in the inter prediction mode, and the boundary part sample in the region is adjacent to the restored neighboring block sample less than a predetermined number, OBMC may not apply to that area. At this time, the decoder may infer a pre-designated value without parsing the OBMC-related syntax for the inter prediction mode encoded area among the current areas divided by GPM mode. The pre-specified value may be 0. Additionally, a pre-specified value may mean that OBMC is not applied. In another specific embodiment, if one of two areas of the current block to which GPM mode is applied is encoded in inter prediction mode, MHP mode may be applied to that area. In another specific embodiment, if one of two areas of the current block to which GPM mode is applied is encoded in inter prediction mode, MHP mode may not be applied to that area. At this time, the decoder may infer a pre-specified value without parsing the syntax related to the MHP mode for the inter prediction mode encoded area among the current areas divided by the GPM mode. The pre-specified value may be 0. Additionally, a pre-specified value may mean that MHP is not applied.
인코더는 코딩 효율을 높이기 위해 잔여 신호를 변환하고, 변환을 통해 획득한 변환 계수 값을 양자화할 수 있다. 앞서 설명한 바와 같이 변환부는 잔여 신호를 변환하여 변환 계수 값을 획득할 수 있다. 이때, 특정 블록의 잔여 신호는 해당 블록의 전 영역에 분포될 수 있다. 이때, 인코더는 잔여 신호에 대한 주파수 영역 변환을 적용하여 저주파 영역에 에너지를 집중시킬 수 있다. 인코더는 이를 통해 코딩 효율을 향상시킬 수 있다. The encoder can convert the residual signal to increase coding efficiency and quantize the transform coefficient value obtained through conversion. As described above, the converter may obtain a transform coefficient value by converting the residual signal. At this time, the residual signal of a specific block may be distributed throughout the entire area of the block. At this time, the encoder can focus energy in the low-frequency region by applying frequency domain transformation to the residual signal. Through this, the encoder can improve coding efficiency.
먼저, 인코더는 현재 블록에 대한 잔여 신호를 포함하는 적어도 하나의 잔여 블록을 획득할 수 있다. 잔여 블록은 현재 블록 또는 현재 블록으로부터 분할된 블록들 중 어느 하나일 수 있다. 설명의 편의를 위하여 잔여 블록은 현재 블록의 잔여 샘플들을 포함하는 잔여 어레이(array) 또는 잔여 매트릭스(matrix)로 지칭될 수 있다. 또한, 잔여 블록은 변환 유닛 또는 변환 블록의 크기와 동일한 크기의 블록을 나타낼 수 있다.First, the encoder may obtain at least one residual block containing the residual signal for the current block. The remaining block may be either the current block or blocks divided from the current block. For convenience of explanation, the residual block may be referred to as a residual array or residual matrix including residual samples of the current block. Additionally, the remaining block may represent a block with the same size as the size of the transform unit or transform block.
다음으로, 인코더는 변환 커널을 사용하여 잔여 블록을 변환할 수 있다. 잔여 블록에 대한 변환에 사용되는 변환 커널은 수직 변환 및 수평 변환의 분리 가능한 특성을 가지는 변환 커널일 수 있다. 이 경우, 잔여 블록에 대한 변환은 수직 변환 및 수평 변환으로 분리되어 수행될 수 있다. 예를 들어, 인코더는 잔여 블록의 수직 방향으로 변환 커널을 적용하여 수직 변환을 수행할 수 있다. 또한, 인코더는 잔여 블록의 수평 방향으로 변환 커널을 적용하여 수평 변환을 수행할 수 있다. 설명의 편의를 위해, 변환 커널은 변환 매트릭스, 변환 어레이, 변환 함수, 변환과 같이 잔여 신호의 변환에 사용되는 파라미터 세트를 지칭하는 용어로 사용될 수 있다. 구체적인 실시 예에서 변환 커널은 복수의 커널 중 선택된 어느 하나일 수 있다. 또한, 수직 변환 및 수평 변환 각각에 대해 서로 다른 변환 타입에 기반한 변환 커널이 사용될 수도 있다. 즉, 1차 변환을 수행하기 전에, 현재 블록의 인트라 예측 모드, 부호화 모드, 비트스트림으로부터 파싱된 변환 방법, 현재 블록의 크기 정보 중에서 적어도 하나 이상을 사용하여 수직 및 수평 방향에 대한 변환 방법이 유도될 수 있다. 또한, 크기가 큰 블록에 대하여 변환 과정에서의 계산 복잡도를 감소시키기 위하여 저주파 영역만을 남기고 고주파 영역은 0으로 처리될 수 있다. 이를 고주파 제로화(zeroing)라 하며, 이러한 제로화를 위해서 실제 1차 변환 시의 변환 크기가 설정될 수 있다. 고주파 제로화 과정에서 저주파 영역은 임의의 정해진 크기로 설정될 수 있다. 저주파 영역의 가로의 크기는 4, 8, 16, 및 32 중 어느 하나이고, 세로의 크기는 4, 8, 6 및 32 중 어느 하나일 수 있다.Next, the encoder can transform the residual block using a transform kernel. The transformation kernel used for transformation of the remaining block may be a transformation kernel with separable characteristics of vertical transformation and horizontal transformation. In this case, transformation for the remaining block can be performed separately into vertical transformation and horizontal transformation. For example, the encoder can perform vertical transformation by applying a transformation kernel in the vertical direction of the residual block. Additionally, the encoder can perform horizontal transformation by applying a transformation kernel in the horizontal direction of the remaining block. For convenience of explanation, a transform kernel may be used as a term to refer to a set of parameters used for transforming a residual signal, such as a transform matrix, transform array, transform function, or transform. In a specific embodiment, the conversion kernel may be one selected from a plurality of kernels. Additionally, transformation kernels based on different transformation types may be used for each of vertical transformation and horizontal transformation. That is, before performing the first transformation, a transformation method for the vertical and horizontal directions is derived using at least one 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. It can be. Additionally, in order to reduce computational complexity in the conversion process for large blocks, only the low-frequency region may be left and the high-frequency region may be treated as 0. This is called high-frequency zeroing, and for this zeroing, the conversion size during the actual primary conversion can be set. In the high-frequency zeroing process, the low-frequency area can be set to an arbitrary, predetermined size. The horizontal size of the low-frequency area may be any of 4, 8, 16, and 32, and the vertical size may be any of 4, 8, 6, and 32.
인코더는 잔여 블록으로부터 변환된 변환 블록을 양자화부로 전달하여 양자화할 수 있다. 이때, 변환 블록은 복수의 변환 계수를 포함할 수 있다. 구체적으로 변환 블록은 2차원 배열의 복수의 변환 계수로 구성될 수 있다. 변환 블록의 크기는 잔여 블록과 마찬가지로 현재 블록 또는 현재 블록으로부터 분할된 블록 중 어느 하나와 동일할 수 있다. 양자화부로 전달된 변환 계수는 양자화된 값으로 표현될 수 있다.The encoder can quantize the transform block converted from the residual block by transmitting it to the quantization unit. At this time, the transform block may include a plurality of transform coefficients. Specifically, a transform block may be composed of a plurality of transform coefficients in a two-dimensional array. The size of the transform block, like the remaining block, may be the same as either the current block or a block divided from the current block. The transformation coefficient transmitted to the quantization unit can be expressed as a quantized value.
또한, 인코더는 변환 계수가 양자화되기 전에 추가적인 변환을 수행할 수 있다. 전술한 변환 방법은 1차 변환(primary transform)으로 지칭되고, 추가적인 변환은 2차 변환(secondary transform)으로 지칭될 수 있다. 2차 변환은 잔여 블록 별로 선택적으로 적용될 수 있다. 구체적인 실시 예에서 인코더는 1차 변환만으로 저주파 영역에 에너지를 집중시키기 어려운 영역에 대해 2차 변환을 수행할 수 있다. 예컨대, 잔여 값이 잔여 블록의 수평 또는 수직 방향 이외의 방향에서 크게 나타나는 블록에 대해 2차 변환이 추가될 수 있다. 인트라 예측된 블록의 잔여 값은 인터 예측된 블록의 잔여 값에 비해 수평 또는 수직 방향 이외의 방향으로 변화할 확률이 높을 수 있다. 따라서 인코더는 인트라 예측된 블록의 잔여 신호에 대해 2차 변환을 추가적으로 수행할 수 있다. 또한, 인코더는 인터 예측된 블록의 잔여 신호에 대해 2차 변환을 생략할 수 있다. 2차 변환 과정에서도 1차 변환에서의 고주파 제로화가 수행될 수 있다.Additionally, the encoder may perform additional transformation before the transform coefficients are quantized. The above-described transformation method may be referred to as a primary transform, and additional transformation may be referred to as a secondary transform. Secondary transformation can be selectively applied to each remaining block. In a specific embodiment, the encoder may perform secondary conversion for an area where it is difficult to concentrate energy in the low-frequency area only through primary conversion. For example, a secondary transformation may be added to a block whose residual value appears large in a direction other than the horizontal or vertical direction of the residual block. The residual value of an intra-predicted block may have a higher probability of changing in directions other than the horizontal or vertical direction compared to the residual value of an inter-predicted block. Therefore, the encoder can additionally perform secondary transformation on the residual signal of the intra-predicted block. Additionally, the encoder may omit secondary transformation for the residual signal of the inter-predicted block. Even in the secondary conversion process, high-frequency zeroing in the primary conversion can be performed.
또 다른 구체적인 실시 예에서 현재 블록 또는 잔여 블록의 크기에 따라, 2차 변환 수행 여부가 결정될 수 있다. 또한, 현재 블록 또는 잔여 블록의 크기에 따라 크기가 서로 다른 변환 커널이 사용될 수 있다. 예를 들어, 너비 또는 높이 중 짧은 변의 길이가 제1 미리 지정된 길이 보다 크거나 같은 블록에 대해 8X8 2차 변환이 적용될 수 있다. 또한, 너비 또는 높이 중 짧은 변의 길이가 제2 미리 지정된 길이 보다 크거나 같고, 제1 미리 지정된 길이 보다 작은 블록에 대해 4X4 2차 변환이 적용될 수 있다. 이때, 제1 미리 지정된 길이는 제2 미리 지정된 길이 보다 큰 값일 수 있다. 또한, 2차 변환은 1차 변환과 달리 수직 변환 및 수평 변환으로 분리되어 수행되지 않을 수 있다. 이러한 2차 변환은 저대역 비-분리 변환(Low Frequency Non-Separable Transform, LFNST)으로 지칭될 수 있다.In another specific embodiment, whether to perform secondary transformation may be determined depending on the size of the current block or remaining block. Additionally, transformation kernels of different sizes may be used depending on the size of the current block or remaining block. For example, 8X8 secondary transformation may be applied to a block where the length of the shorter side of width or height is greater than or equal to the first predetermined length. In addition, 4 At this time, the first predetermined length may be larger than the second predetermined length. Additionally, unlike the primary transformation, the secondary transformation may not be performed separately into vertical transformation and horizontal transformation. This secondary transform may be referred to as Low Frequency Non-Separable Transform (LFNST).
또한, 특정 영역의 비디오 신호의 경우, 급격한 밝기 변화로 인해 주파수 변환을 수행하여도 고주파 대역 에너지가 줄어들지 않을 수 있다. 이에 따라, 양자화에 의한 압축 성능이 저하될 수 있다. 또한, 잔여 값이 드물게 존재하는 영역에 대해 변환을 수행하는 경우, 인코딩 시간 및 디코딩 시간이 불필요하게 증가할 수 있다. 이에 따라, 특정 영역의 잔여 신호에 대한 변환은 생략될 수 있다. 특정 영역의 잔여 신호에 대한 변환 수행 여부는 특정 영역의 변환과 관련된 신택스 요소에 의해 결정될 수 있다. 변환과 관련된 신택스 요소는 변환 스킵 정보(transform skip information)를 포함할 수 있다. 변환 스킵 정보는 변환 스킵 플래그(transform skip flag)일 수 있다. 잔여 블록에 대한 변환 스킵 정보가 변환 스킵을 나타내는 경우, 해당 잔여 블록에 대한 변환이 수행되지 않는다. 이때, 인코더는 변환이 수행되지 않은 잔여 신호를 양자화할 수 있다.Additionally, in the case of video signals in a specific area, high-frequency band energy may not be reduced even if frequency conversion is performed due to rapid changes in brightness. Accordingly, compression performance by quantization may deteriorate. Additionally, when conversion is performed on an area where residual values rarely exist, encoding time and decoding time may unnecessarily increase. Accordingly, conversion of the residual signal in a specific area may be omitted. Whether or not to perform conversion on the residual signal of a specific area may be determined by syntax elements related to conversion of the specific area. Syntax elements related to transformation may include transform skip information. Transformation skip information may be a transform skip flag. If the transformation skip information for the remaining block indicates a transformation skip, transformation is not performed on the corresponding remaining block. At this time, the encoder can quantize the residual signal on which conversion has not been performed.
전술한 변환 관련 신택스 요소는 비디오 신호 비트스트림으로부터 파싱된 정보일 수 있다. 디코더는 비트스트림을 엔트로피 디코딩하여 변환 관련 신택스 요소들을 획득할 수 있다. 또한, 인코더는 변환 관련 신택스 요소들을 엔트로피 코딩하여 비디오 신호 비트스트림을 생성할 수 있다.The above-described conversion-related syntax element may be information parsed from a video signal bitstream. The decoder can obtain conversion-related syntax elements by entropy decoding the bitstream. Additionally, the encoder may generate a video signal bitstream by entropy coding transformation-related syntax elements.
디코더는 비트스트림을 파싱하여 디코딩하는데 필요한 부호화 정보들을 획득할 수 있다. 변환 과정과 관련된 정보는 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 (역)변환으로 지칭될 수 있다.The decoder can obtain encoding information necessary for decoding by parsing the bitstream. Information related to the transformation process may include an index indicating the primary transformation type, an index indicating the secondary transformation type, and a quantized transformation coefficient. The inverse transform unit may obtain a residual signal by inversely transforming the inverse quantized transform coefficient. First, the inverse transformation unit can detect whether inverse transformation is performed for a specific region from the transformation-related syntax elements of the region. If a transform-related syntax element for a specific transform block indicates transform skipping, transform for the corresponding transform block may be omitted. At this time, both the first inverse transform and the second inverse transform may be omitted for the transform block. Additionally, the dequantized transform coefficient can be used as a residual signal. For example, the decoder can restore the current block using the dequantized transform coefficient as a residual signal. Alternatively, the second-order inverse transformation may be performed and the first-order inverse transformation may be omitted. The second-order inverse transformed value can be used as the residual signal. The above-described first-order inverse transform represents the inverse transformation of the first-order transform, and may be referred to as an inverse primary transform. The secondary inverse transform refers to the inverse transformation of the secondary transform, and may be referred to as an inverse secondary transform or inverse LFNST. In the present invention, the first (inverse) transformation may be referred to as the first (inverse) transformation, and the secondary (inverse) transformation may be referred to as the second (inverse) transformation.
도 16은 본 발명의 실시 예에 따라 비디오 코딩에 사용될 수 있는 변환 커널 종류를 보여준다. Figure 16 shows the types of transform kernels that can be used for video coding according to an embodiment of the present invention.
구체적으로 도 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비트 또는 10비트로 결정될 수 있다. 정밀도가 떨어질 경우, 부호화 효율이 감소할 수 있다. 근사화에 따라 DCT와 DST의 정규 직교(orthonormal) 성질은 유지되지 않을 수 있으나, 이에 따른 부호화 효율 손실이 크지 않다. 따라서 변환 커널을 정수 형태로 근사화 시키는 것이 하드웨어 부호화기, 복호화기 구현 측면에서 유리할 수 있다. IDTR(Identity Transform)은 변환의 결과가 변환 전의 자기 자신이 나오는 변환으로, 항등변환이라고 한다. 일반적으로 항등변환은 행과 열이 동일한 값을 가지는 위치에 1을 설정하여 변환 매트릭스를 구성한다. 하지만, 여기서 항등변환은 1이 아닌 임의의 고정된 값을 사용하여, 입력된 잔차 신호의 값을 동일하게 높이거나 줄이는데 사용한다.Specifically, Figure 16 shows 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 applied to MTS. -VII Represents the kernel formula. DCT and DST can be expressed as functions of cosine and sine, respectively. When the basis function of the conversion kernel for the number of samples N is expressed as Ti(j), index i is the index in the frequency domain. Indicates that 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. When expressed as a two-dimensional matrix, the basis function Ti(j) represents the jth element of the ith row. The conversion kernels shown in Figure 16 all have separable characteristics. Therefore, the encoder can perform conversion on the residual signal X in the horizontal and vertical directions, respectively. Specifically, when the residual signal block is called X and the transformation kernel matrix is T, the transformation for the residual signal X can be expressed as TXT'. At this time, T' is the transpose of the transformation kernel matrix T. Since DCT and DST are in decimal form rather than integer, it is burdensome to implement them as is in a hardware encoder and decoder. Therefore, the decimal type conversion kernel must be approximated to an integer type conversion kernel through scaling and rounding. The integer precision of the conversion kernel can be determined to be 8 or 10 bits. If precision is low, coding efficiency may decrease. Depending on the approximation, the orthonormal properties of DCT and DST may not be maintained, but the resulting loss of coding efficiency is not significant. Therefore, approximating the conversion kernel to an integer form may be advantageous in terms of implementing a hardware encoder and decoder. IDTR (Identity Transform) is a transformation in which the result of transformation is the self before transformation, and is called an identity transformation. In general, 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 equally increase or decrease the value of the input residual signal.
도 17은 본 발명의 실시 예에 따른 GPM 모드가 적용된 현재 블록의 오차 신호에 MTS와 LFNST가 적용되는 방법을 보여준다. 도 17의 (a)는 인코더의 동작을 보여주고, (b)는 디코더의 동작을 보여준다. Figure 17 shows how MTS and LFNST are applied to the error signal of the current block to which GPM mode is applied according to an embodiment of the present invention. Figure 17 (a) shows the operation of the encoder, and (b) shows the operation of the decoder.
GPM 모드가 적용되어 현재 블록이 2개 영역으로 나누어지고, 2개 영역에 인트라 예측 방향성 모드가 적용될 수 있다. 디코더 및 인코더는 2개의 영역 각각에 해당하는 인트라 예측 방향성 모드 중 어느 하나를 기초로 MTS 및 LFNST 변환 방법을 결정할 수 있다. 이때, 2개의 영역에 해당하는 2개 인트라 예측 방향성 모드 중 각도 모드를 기초로 MTS 및 LFNST 변환 방법을 결정할 수 있다. 2개 인트라 예측 방향성 모드 중 비방향성 모드, 예컨대 평면(Planar) 또는 DC 모드가 아닌 각도 모드를 기초로MTS 및 LFNST 변환 방법을 결정할 수 있다. 2개의 영역에 해당하는 2개 인트라 예측 방향성 모드 모두가 각도 모드인 경우, 첫 번째 영역 또는 두 번째 영역의 인트라 예측 방향성 모드를 기초로 MTS 및 LFNST 변환 방법을 결정할수 있다. 이때, MTS, LFNST 방법에 사용되는 인트라 예측 방향성 모드를 선정하는 방법은 각 영역이 현재 블록에 인접한 화소(pixel)와 인접한 부분이 얼마나 적은지를 기초로 결정될 수 있다. 이때, 첫 번째 영역은 현재 블록의 인접한 화소(pixel)와 인접할 확률이 높을 수 있으므로, 오차 신호가 적을 수 있다. 따라서 상대적으로 오차 신호가 많을 가능성이 높은 두 번째 영역에 인트라 예측 방향성 모드를 기초로 MTS 및 LFNST 변환 방법을 결정할 수 있다.When GPM mode is applied, the current block is divided into two areas, and intra prediction directional mode can be applied to the two areas. The decoder and encoder can determine the MTS and LFNST conversion method based on one of the intra prediction directional modes corresponding to each of the two regions. At this time, the MTS and LFNST transformation methods can be determined based on the angle mode among the two intra prediction directional modes corresponding to the two regions. Among the two intra prediction directional modes, the MTS and LFNST transformation methods can be determined based on the angular mode rather than the non-directional mode, such as planar or DC mode. If both of the two intra prediction directional modes corresponding to the two areas are angle modes, the MTS and LFNST conversion methods can be determined based on the intra prediction directional modes of the first area or the second area. At this time, the method of selecting the intra prediction directional mode used in the MTS and LFNST methods can be determined based on how few pixels (pixels) adjacent to the current block and adjacent portions of each region are. At this time, the first area may have a high probability of being adjacent to an adjacent pixel of the current block, so the error signal may be small. Therefore, the MTS and LFNST conversion methods can be determined based on the intra prediction directional mode in the second region, which is likely to have relatively many error signals.
현재 블록이 GPM 모드를 사용하여 예측된 경우, 인코더 및 디코더에서 현재 블록에서 사용 가능한 MTS(다중 변환 세트)를 선택하는 방법에 대해 설명한다. 도 18은 본 발명의 실시 예에 따라 GPM 모드에서 분할된 현재 블록의 영역에 해당하는 인트라 예측 모드의 방향성 모드의 값과 현재 블록의 크기에 따라 결정되는 MTS 세트의 인덱스 사이의 관계를 보여주는 테이블이다. 테이블의 행은 현재 블록의 크기에 해당하고, 열은 인트라 예측 모드의 방향성 모드를 나타내는 인덱스에 해당한다. 이때, 방향성 모드는 MIP를 포함한다.If the current block was predicted using GPM mode, we describe how the encoder and decoder select an available multiple transform set (MTS) for the current block. Figure 18 is a table showing the relationship between the value of the directional mode of the intra prediction mode corresponding to the area of the current block divided in GPM mode according to an embodiment of the present invention and the index of the MTS set determined according to the size of the current block. . The row of the table corresponds to the size of the current block, and the column corresponds to an index indicating the directional mode of the intra prediction mode. At this time, the directional mode includes MIP.
1) 인코더 및 디코더는 현재 블록의 가로 및 세로 크기를 하나의 변수로 매핑하기 위해, 현재 블록의 크기를 기반으로 nSzIdxW와 nSzIdxH 값이 다음과 같이 유도한다. 인코더 및 디코더는 nSzIdxW을 현재 블록의 너비 값에 2의 로그(Log) 값을 계산한 후, 획득한 값에서 소수점 자리를 버리고 2를 차분한 값과 3 중 최소값으로 설정한다. 인코더 및 디코더는 nSzIdxH의 값을 현재 블록의 높이 값을 기준으로 nSzIdxW를 설정하는 방법과 같은 방법을 사용하여 설정한다.1) In order to map the horizontal and vertical sizes of the current block to one variable, the encoder and decoder derive the nSzIdxW and nSzIdxH values based on the size of the current block as follows. The encoder and decoder calculate nSzIdxW as the logarithm of 2 to the width value of the current block, then discard decimal places from the obtained value and set 2 as the minimum value among the difference value and 3. The encoder and decoder set the value of nSzIdxH using the same method as setting nSzIdxW based on the height value of the current block.
2) 현재 블록의 인트라 방향성 모드(predMode)가 유도되며, 현재 블록의 복원에 TIMD 모드가 사용되는 경우 기존 67개에서 131개로 확장된 인트라 예측 모드가 사용된다. 인코더 및 디코더는 인트라 방향성 모드(preMode)의 개수를 확장된 인트라 예측 모드 없이 67개로 정밀도(precision)를 감소시킨다.2) The intra-directional mode (predMode) of the current block is derived, and when the TIMD mode is used for restoration of the current block, the intra prediction modes expanded from the existing 67 to 131 are used. The encoder and decoder reduce the number of intra-directional modes (preMode) to 67 without the extended intra-prediction mode.
3) ucMode, nMdIdx 및 isTrTransposed 값이 아래와 같이 유도된다.3) The ucMode, nMdIdx and isTrTransposed values are derived as follows.
A. 현재 블록이 MIP 모드로 부호화된 경우, 인코더 및 디코더는 ucMode의 값을 0, nMdIdx의 값을 35, isTrTransposed의 값을 MIP에서 유도된 값으로 설정한다.A. If the current block is encoded in MIP mode, the encoder and decoder set the value of ucMode to 0, the value of nMdIdx to 35, and the value of isTrTransposed to the value derived from MIP.
B. 현재 블록이 MIP 모드로 부호화되지 않은 경우, 인코더 및 디코더는 ucMode, nMdIdx 및 isTrTransposed 값을 아래와 같이 유도한다.B. If the current block is not encoded in MIP mode, the encoder and decoder derive the ucMode, nMdIdx, and isTrTransposed values as follows.
i) 인코더 및 디코더는 ucMode의 값을 현재 블록의 인트라 방향성 모드로 설정한다.i) The encoder and decoder set the value of ucMode to the intra-directional mode of the current block.
ii) 인코더 및 디코더는 predMode의 값을 현재 블록의 가로 세로 크기 비율에 따라 확장 각도 모드로 변환하여 predMode의 값으로 설정한다.ii) The encoder and decoder convert the value of predMode to extended angle mode according to the width-to-height size ratio of the current block and set it as the value of predMode.
iii) 인코더 및 디코더는 predMode의 값을 2에서 66사이의 값으로 클리핑(clipping)한다.iii) The encoder and decoder clip the value of predMode to a value between 2 and 66.
iv) predMode의 값이 대각 모드인 34보다 큰 경우, 인코더 및 디코더는 isTrTransposed의 값을 1로 설정하고 그렇지 않다면, isTrTransposed 값을 0으로 설정한다.iv) If the value of predMode is greater than 34, which is the diagonal mode, the encoder and decoder set the value of isTrTransposed to 1, otherwise, set the value of isTrTransposed to 0.
v) predMode의 값이 대각 모드인 34보다 큰 경우, 인코더 및 디코더는 preMode의 최댓값인 67에서 1을 더한 값에 predMode의 값을 차분한 값으로 preMode의 값을 재설정한다. 예를 들어, predMode의 값이 35라면, 인코더 및 디코더는 35번 각도 모드를 33(67+1-35)번 각도 모드로 재설정할 수 있다. predMode의 값이 66이라면, 비디오 신호 처리 장치는 66번 각도 모드를 2(67+1-66()번 각도 모드로 재설정할 수 있다. 이를 통해 preMode가 지시하는 인트라 방향성 모드의 각도의 범위를 대각 모드인 34 이내로 줄일 수 있다. GPM 모드에서 분할된 현재 블록의 영역에 해당하는 인트라 예측 모드의 방향성 모드의 값과 현재 블록의 크기에 따라 결정되는 MTS 세트의 조합의 수를 반으로 줄일 수 있다.v) If the value of predMode is greater than 34, which is the diagonal mode, the encoder and decoder reset the value of preMode to the difference between the value of 67, which is the maximum value of preMode, plus 1. For example, if the value of predMode is 35, the encoder and decoder can reset angle mode 35 to angle mode 33 (67+1-35). If the value of predMode is 66, the video signal processing device can reset angle mode 66 to angle mode 2 (67+1-66(). Through this, the angle range of the intra directional mode indicated by preMode is diagonal. It can be reduced to within 34. In GPM mode, the number of combinations of the MTS set determined according to the size of the current block and the value of the directional mode of the intra prediction mode corresponding to the area of the divided current block can be reduced by half.
4) 인코더 및 디코더는 nSzIdxW, nSzIdxH, 및 isTrTransposed 값을 기초로, nSzIdx값을 유도한다. isTrTransposed의 값이 1인 경우, 인코더 및 디코더는 nSzIdxH의 값에 4를 곱한 후, nSzIdxW를 더한 값을 nSzIdx의 값으로 설정한다. isTrTransposed의 값이 0인 경우, 인코더 및 디코더는 nSzIdxW의 값에 4를 곱한 후, nSzIdxH를 더한 값을 nSzIdx의 값으로 설정한다.4) The encoder and decoder derive the nSzIdx value based on the nSzIdxW, nSzIdxH, and isTrTransposed values. If the value of isTrTransposed is 1, the encoder and decoder multiply the value of nSzIdxH by 4 and then set the value added by nSzIdxW as the value of nSzIdx. If the value of isTrTransposed is 0, the encoder and decoder multiply the value of nSzIdxW by 4 and then set the value added by nSzIdxH as the value of nSzIdx.
5) 인코더 및 디코더는 현재 블록의 크기를 지시하는 nSzIdx와 현재 블록의 인트라 방향성 모드를 지시하는 nMdIdx의 값을 통해 도 18과 같이 미리 정의된 테이블을 사용하여, 사용 가능한 변환 타입 세트의 인덱스인 nTrSet을 유도한다. nTrSet가 가질 수 있는 값의 종류는 80개일 수 있다. 도 18의 실시 예에서 현재 블록의 크기가 4x8이고, 현재 블록의 화면 내 방향성 모드의 인덱스가 13이면, nTrSet의 값은 7이다.5) The encoder and decoder use a predefined table as shown in Figure 18 through the values of nSzIdx, which indicates the size of the current block, and nMdIdx, which indicates the intra directionality mode of the current block, and nTrSet, which is an index of the set of available transformation types. induces. There can be 80 types of values that nTrSet can have. In the embodiment of FIG. 18, if the size of the current block is 4x8 and the index of the directional mode within the screen of the current block is 13, the value of nTrSet is 7.
6) 인코더 및 디코더는 nTrSet에 대응되는 변환 타입 세트에서 파싱된 mts_idx 값에 해당하는 변환 타입을 획득한다. 도 19는 본 발명의 실시 예에 따른 nTrSet와 mts_idx의 값 사이의 관계를 보여주는 테이블이다. 이때, 행은 nTrSet의 인덱스에 해당하고 열은 mts_idx의 인덱스에 해당한다. 수직 및 수평 방향의 변환 타입은 predMode의 값이 대각 모드인 34보다 큰 값인지를 기초로 다르게 설정된다. 도 19의 실시 예에서, nTrSet의 값이 7이고, mts_idx의 값이 3이면, 변환 타입을 지시하는 인덱스 2, 17, 18, 및 22 중 22가 선택된다.6) The encoder and decoder obtain the transformation type corresponding to the parsed mts_idx value from the transformation type set corresponding to nTrSet. Figure 19 is a table showing the relationship between the values of nTrSet and mts_idx according to an embodiment of the present invention. At this time, the row corresponds to the index of nTrSet and the column corresponds to the index of mts_idx. The conversion type in the vertical and horizontal directions is set differently based on whether the value of predMode is greater than 34, which is the diagonal mode. In the embodiment of Figure 19, if the value of nTrSet is 7 and the value of mts_idx is 3, 22 of indices 2, 17, 18, and 22 indicating the transformation type is selected.
도 20은 본 발명의 실시 예에 따라 변환 타입을 지시하는 인덱스와 변환에 사용되는 커널 사이의 관계를 보여주는 테이블이다. 이때, 열은 변환 타입의 인덱스에 해당하고, 행은 변환 방향에 해당한다. 도 20의 실시 예에서 변환 타입의 값은 22인 경우, 수직 방향의 변환 커널은 DST1이고 수평 방향의 변환 커널은 DCT5이다. 현재 블록의 화면 내 예측 방향성 모드가 대각 모드인 34보다 큰 경우, 수직 및 수평 방향의 변환 타입이 서로 교체된다.Figure 20 is a table showing the relationship between an index indicating the conversion type and the kernel used for conversion according to an embodiment of the present invention. At this time, the column corresponds to the index of the transformation type, and the row corresponds to the transformation direction. In the example of FIG. 20, when the value of the transformation type is 22, the vertical transformation kernel is DST1 and the horizontal transformation kernel is DCT5. If the intra-screen prediction directionality mode of the current block is greater than 34, which is the diagonal mode, the vertical and horizontal transformation types are replaced with each other.
7) 마지막으로, mts_idx 값이 3이고, 현재 블록의 가로 또는 세로의 크기가 모두 16 이하일 때, 아래 과정을 통해 수직 또는 수평 방향의 변환 타입이 IDT 변환 타입으로 재설정될 수 있다.7) Finally, when the mts_idx value is 3 and both the horizontal and vertical sizes of the current block are 16 or less, the vertical or horizontal transformation type can be reset to the IDT transformation type through the process below.
현재 블록의 화면 내 예측 방향성 모드와 수평 방향 모드인 18 사이의 절대값 차이가 미리 정된 값보다 작은 경우, 인코더 및 디코더는 수직 방향의 변환 타입을 IDT 변환 타입으로 재설정한다. 현재 블록의 화면 내 예측 방향성 모드와 수평 방향 모드인 50 사이의 절대값 차이가 미리 지정된 값보다 작다면, 인코더 및 디코더는 수평 방향의 변환 타입을 IDT 변환 타입으로 재설정한다. 이때, 미리 지정된 정수일 수 있다. 또한, 미리 지정된 값은 현재 블록의 가로 또는 세로 크기를 기초로 결정될 수 있다. 도 21은 본 발명의 실시 예에 따른 현재 블록의 가로 및 세로 크기와 변환 타입을 재설정할 지 기준이 되는 미리 지정된 값 사이의 관계를 보여주는 테이블을 보여준다. 도 21의 (a)는 가로 또는 세로 크기가 4만큼 차이날 때마다 미리 지정된 값을 다르게 설정한 경우이다. 또한, 도 21의 (b)는 가로 또는 세로 크기가 2배만큼 차이날 때마다 미리 지정된 값을 다르게 설정한 경우이다. 도 21의 실시 예에서 현재 블록의 크기가 16x16 크기인 경우, 인코더 및 디코더는 변환 타입을 IDT 변환 타입으로 재설정하지 않고, 기존의 변환 타입을 그대로 유지한다.If the absolute value difference between the intra-screen prediction direction mode of the current block and the horizontal direction mode, 18, is smaller than a predetermined value, the encoder and decoder reset the vertical direction transformation type to the IDT transformation type. If the absolute value difference between the intra-screen prediction directionality mode of the current block and the horizontal direction mode, 50, is smaller than a pre-specified value, the encoder and decoder reset the horizontal direction transformation type to the IDT transformation type. At this time, it may be a pre-designated integer. Additionally, the pre-specified value may be determined based on the horizontal or vertical size of the current block. Figure 21 shows a table showing the relationship between the horizontal and vertical sizes of the current block and a pre-specified value that serves as a standard for resetting the conversion type according to an embodiment of the present invention. Figure 21 (a) shows a case where a pre-specified value is set differently every time the horizontal or vertical size differs by 4. Additionally, Figure 21 (b) shows a case where a pre-specified value is set differently every time the horizontal or vertical size differs by two times. In the embodiment of Figure 21, when the size of the current block is 16x16, the encoder and decoder do not reset the transformation type to the IDT transformation type and maintain the existing transformation type as is.
도 22는 본 발명의 실시 예에 따라 템플릿을 기초로 참조 픽셀 라인을 결정하여 인트라 예측을 수행하는 방법을 보여준다.Figure 22 shows a method of performing intra prediction by determining a reference pixel line based on a template according to an embodiment of the present invention.
현재 블록의 인트라 예측에 사용되는 참조 픽셀 라인을 결정하기 위해 템플릿 기반 비용 계산 방법이 사용될 수 있다. 인코더 및 디코더는 현재 블록에 인접한 이미 복원된 샘플들을 사용하여 템플릿을 구성할 수 있다. 복수의 참조 픽셀 라인은 현재 블록을 기준으로 미리 지정된 위치에 위치한다. 구체적으로 복수의 참조 픽셀 라인과 템플릿은 도 22와 같을 수 있다. 또한, 복수의 참조 픽셀 라인은 현재 블록의 경계를 기준으로 1, 3, 5, 7, 및 12 중 어느 하나만큼 떨어진 곳에 위치할 수 있다. 인코더 및 디코더는 참조 픽셀을 기초로 템플릿 위치에 대한 예측 샘플을 생성한다. 인코더 및 디코더는 생성된 예측 샘플과 템플릿 사이의 차이를 기초로 코스트를 계산한다. 이때, 인코더 및 디코더는 SAD 또는 MR-SAD를 사용할 수 있다. 인코더는 코스트가 가장 낮은 참조 픽셀라인을 사용하여 현재 블록을 부호화할 수 있다. 이러한 실시 예에서, 디코더는 복수의 참조 픽셀 라인 중 템플릿과의 관계에서 가장 낮은 코스트를 갖는 참조 픽셀 라인을 사용하여 인트라 예측을 수행한다. 또 다른 구체적인 실시 예에서 인코더는 복수의 참조 픽셀라인을 코스트를 기반으로 오름차순으로 정렬된 리스트를 구성하고, 리스트에서 인트라 예측에 사용되는 참조 픽셀라인을 지시하는 인덱스를 비스트림에 포함시킬 수 있다. 이러한 실시 예에서, 디코더는 복수의 참조 픽셀이 코스트를 기준으로 정렬된 리스트를 구성하고, 구성된 리스트에서 시그널링된 지시자가 지시하는 참조 픽셀 라인을 사용하여 인트라 예측을 수행한다. 앞서 설명한 실시 예들에 따른 인트라 예측을 TMRL(Template-based Multiple Reference Line) 인트라 예측 방법으로 지칭한다.A template-based cost calculation method may be used to determine the reference pixel line used for intra prediction of the current block. The encoder and decoder can construct a template using already restored samples adjacent to the current block. A plurality of reference pixel lines are located at predetermined positions based on the current block. Specifically, the plurality of reference pixel lines and templates may be as shown in FIG. 22. Additionally, the plurality of reference pixel lines may be located any one of 1, 3, 5, 7, and 12 away from the boundary of the current block. The encoder and decoder generate prediction samples for the template position based on the reference pixel. The encoder and decoder calculate the cost based on the difference between the generated prediction sample and the template. At this time, the encoder and decoder can use SAD or MR-SAD. The encoder can encode the current block using the reference pixel line with the lowest cost. In this embodiment, the decoder performs intra prediction using the reference pixel line with the lowest cost in relation to the template among the plurality of reference pixel lines. In another specific embodiment, the encoder may configure a list of a plurality of reference pixel lines in ascending order based on cost, and include in the list an index indicating a reference pixel line used for intra prediction in the non-stream. In this embodiment, the decoder constructs a list in which a plurality of reference pixels are sorted based on cost, and performs intra prediction using the reference pixel line indicated by the signaled indicator in the constructed list. Intra prediction according to the above-described embodiments is referred to as a Template-based Multiple Reference Line (TMRL) intra prediction method.
도 23은 본 발명의 실시 예에 따라 IBC 모드로 부호화된 블록의 블록 벡터를 사용하여 예측을 수행하는 방법을 보여준다.Figure 23 shows a method of performing prediction using a block vector of a block encoded in IBC mode according to an embodiment of the present invention.
IBC(Intra Block Copy)는 현재 픽쳐 내의 복원된 영역 중 현재 블록과 가장 유사한 블록을 찾고, 찾은 블록을 참조하여 인트라 예측을 수행하는 방법이다. 이때, 인트라 예측에 사용되는 참조 블록과 현재 블록 사이의 관계는 벡터로 표현된다. 이 벡터는 블록 벡터(block vector)로 지칭된다. 인코더는 블록 벡터를 지시하는 정보를 비트스트림에 포함시킨다. 디코더는 비트스트림으로부터 블록 벡터를 지시하는 정보를 파싱하여, 현재 블록을 위한 블록 벡터를 획득할 수 있다. IBC에서는 하나 또는 복수의 참조 블록이 사용될 수 있다. 이때, 복수의 참조 블록이 사용되는 경우 복수의 블록 벡터에 관한 정보가 비트스트림에 포함될 수 있다. 또한, 휘도 블록 예측에 사용된 블록 벡터는 휘도 블록에 대응하는 색차 블록의 예측에 사용될 수 있다. 도 23은 두 개의 참조 블록을 사용하여 휘도 블록을 예측하고, 휘도 블록 예측에 사용된 두 개의 블록 벡터를 사용하여 색차 블록을 예측하는 것을 보여준다.IBC (Intra Block Copy) is a method of finding the block most similar to the current block among the restored areas in the current picture and performing intra prediction by referring to the found block. At this time, the relationship between the reference block used for intra prediction and the current block is expressed as a vector. This vector is referred to as a block vector. The encoder includes information indicating the block vector in the bitstream. The decoder can obtain a block vector for the current block by parsing information indicating a block vector from the bitstream. In IBC, one or multiple reference blocks can be used. At this time, when multiple reference blocks are used, information about multiple block vectors may be included in the bitstream. Additionally, the block vector used to predict the luminance block can be used to predict the chrominance block corresponding to the luminance block. Figure 23 shows predicting a luminance block using two reference blocks and predicting a chrominance block using two block vectors used to predict the luminance block.
도 24 및 도 25는 본 발명의 실시 예에 따라 RRIBC가 수행되는 것을 보여준다.Figures 24 and 25 show RRIBC being performed according to an embodiment of the present invention.
RRIBC(Reconstruction-Reordered IBC) 부호화 모드는 IBC 블록에서 사용될 수 있다. RRIBC는 기준 축을 중심으로 블록을 플립한다. 이때, 수직 방향 플립(flip) 또는 수평 방향 플립(flip)이 수행될 수 있다. 인코더는 현재 블록을 수직 혹은 수평 방향으로 플립하여 플립된 현재 블록을 생성한다. 인코더는 현재 픽쳐의 이미 복원된 참조 영역으로부터 플립된 현재 블록과 가장 유사한 참조 블록을 찾는다. 인코더는 현재 블록의 좌상단 위치를 기준으로 참조 블록까지의 거리인 블록 벡터를 계산한다. 이때, 블록 벡터는 현재 블록에 인접한 주변 블록의 블록 벡터를 통해 예측될 수 있다. RRIBC 모드에서 블록 벡터에 대한 예측 방법은 추후 기술한다. 인코더는 실제 블록 벡터와 예측된 블록 벡터와의 차이값을 비트스트림에 포함시킬 수 있다. 또한, 인코더는 현재 블록이 IBC 모드로 부호화되는 경우, 수직 방향 플립(flip)을 사용하는지 혹은 수평 방향 플립(flip)을 사용하는지 또는 RRIBC 모드를 사용하지 않는지에 대한 플립 타입 정보를 비트스트림에 포함시킬 수 있다. 인코더는 플립된 현재 블록과 참조 블록 사이의 차이인 오차 블록을 생성한 후, 오차 블록을 변환 및 양자화한 후 양자화된 변환 계수를 비트스트림에 포함시킬 수 있다.Reconstruction-Reordered IBC (RRIBC) coding mode can be used in IBC blocks. RRIBC flips blocks around a reference axis. At this time, a vertical flip or a horizontal flip may be performed. The encoder flips the current block vertically or horizontally to create a flipped current block. The encoder finds the reference block most similar to the flipped current block from the already restored reference region of the current picture. The encoder calculates the block vector, which is the distance to the reference block based on the upper left position of the current block. At this time, the block vector can be predicted through the block vectors of neighboring blocks adjacent to the current block. The prediction method for block vectors in RRIBC mode will be described later. The encoder may include the difference between the actual block vector and the predicted block vector in the bitstream. Additionally, if the current block is encoded in IBC mode, the encoder includes flip type information in the bitstream, whether a vertical flip is used, a horizontal flip is used, or RRIBC mode is not used. You can do it. The encoder may generate an error block that is the difference between the flipped current block and the reference block, transform and quantize the error block, and then include the quantized transform coefficient in the bitstream.
디코더는 현재 블록이 IBC 모드로 부호화되는 경우, 플립 타입 정보를 파싱하여 현재 블록에 대한 RRIBC 모드를 결정할 수 있다. 디코더는 블록 벡터의 차이값을 파싱한 후, 예측된 블록 벡터 값에 더하여 실제 블록 벡터를 계산할 수 있다. 디코더는 비트스트림으로부터 양자화된 변환 계수를 파싱한 후, 역양자화 및 역변환을 수행하여 오차 블록을 생성할 수 있다. 디코더는 실제 블록 벡터가 지시하는 참조 블록과 오차 블록을 더하여 현재 블록을 복원할 수 있다. 디코더는 복원된 현재 블록을 플립 타입 정보에 따라 플립하여 최종 복원된 현재 블록을 생성할 수 있다.If the current block is encoded in IBC mode, the decoder can determine the RRIBC mode for the current block by parsing flip type information. The decoder can calculate the actual block vector by parsing the difference value of the block vector and adding it to the predicted block vector value. The decoder can generate an error block by parsing the quantized transform coefficient from the bitstream and then performing inverse quantization and inverse transformation. The decoder can restore the current block by adding the reference block indicated by the actual block vector and the error block. The decoder can flip the restored current block according to flip type information to generate the final restored current block.
현재 블록이 RRIBC 모드인 경우, 인코더 및 디코더는 현재 블록에 대한 블록 벡터 예측 값(BVC)을 다음과 같은 방법을 사용하여 예측할 수 있다.도 24와 도 25에서 (Xn, Yn)은 주변 블록의 중앙 위치를 나타내며, (Xc, Yc)은 현재 블록의 중앙 위치를 나타낸다. BVn은 주변 블록의 블록 벡터를 나타내고, BVC는 현재 블록의 블록 벡터를 나타낸다. 도 24와 같이, 현재 블록이 수평 방향으로 RRIBC가 수행되는 경우, BVC는 2 * (Xn - Xc) + BVn이다. 도 25와 같이 현재 블록이 수직 방향으로 RRIBC가 수행되는 경우, BVC는 2 * (Yn - Yc) + BVn이다. 이때, BVn과 BVC는 이전 복원된 블록을 사용하므로, 블록 벡터의 부호는 음수만 가능하다.If the current block is in RRIBC mode, the encoder and decoder can predict the block vector prediction value (BV C ) for the current block using the following method. In Figures 24 and 25, (Xn, Yn) is the neighboring block. represents the center position of , and (Xc, Yc) represents the center position of the current block. BV n represents the block vector of the neighboring block, and BV C represents the block vector of the current block. As shown in Figure 24, when RRIBC is performed on the current block in the horizontal direction, BV C is 2 * (Xn - Xc) + BV n . As shown in Figure 25, when RRIBC is performed on the current block in the vertical direction, BV C is 2 * (Yn - Yc) + BV n . At this time, since BV n and BV C use previously restored blocks, the sign of the block vector can only be negative.
도 26은 본 발명의 실시 예에 따라 Intra TMP 모드로 부호화된 블록의 블록 벡터의 실시 예를 도시한다. Figure 26 shows an example of a block vector of a block encoded in Intra TMP mode according to an embodiment of the present invention.
Intra TMP(template matching prediction)에서 인코더 및 디코더는 현재 블록에 인접한 주변(neighboring) 블록의 화소값을 사용하여 기준 템플릿을 구성한다. 이때, 인코더 및 디코더는 기준 템플릿과 가장 유사한 영역을 현재 픽쳐 내의 이미 복원된 영역에서 찾고, 유사한 영역을 포함하는 블록을 참조 블록으로 결정한다. 인코더 및 디코더는 참조 블록을 기초로 현재 블록을 예측한다. 이때, 참조 블록은 복수 개일 수 있다. Intr TMP를 이용하여 휘도 블록에 대한 예측 블록을 복원하고, 인코더 및 디코더는 휘도 블록의 블록 벡터를 사용하여 색차 블록을 예측할 수 있다. 이때, 색차 블록의 예측에 사용되는 블록 백터는 휘도 블록의 블록 벡터와 같을 수 있다. 또는 휘도 블록과 색차 블록의 해상도 차이에 따라 휘도 블록의 블록 벡터가 변경되어 색차 블록의 블록 벡터로 사용될 수 있다. 도 26은 Intra-TMP에서 2개의 참조 휘도 블록과 2개의 블록 벡터를 기초로 휘도 블록을 예측하는 것을 보여준다. 또한, 인코더 및 디코더는 휘도 블록의 예측에 사용된 2개의 블록 벡터를 기초로 현재 색차 블록을 위한 2개의 블록 벡터를 유도한다. 인코더 및 디코더는 유도한 2개의 블록 벡터를 사용하여 2개의 참조 블록을 찾고, 2개 참조 블록을 사용하여 현재 색차 블록을 예측한다.In intra TMP (template matching prediction), the encoder and decoder construct a reference template using pixel values of neighboring blocks adjacent to the current block. At this time, the encoder and decoder find the area most similar to the reference template in the already reconstructed area in the current picture, and determine the block containing the similar area as the reference block. The encoder and decoder predict the current block based on the reference block. At this time, there may be multiple reference blocks. The prediction block for the luminance block is restored using the Intr TMP, and the encoder and decoder can predict the chrominance block using the block vector of the luminance block. At this time, the block vector used to predict the chrominance block may be the same as the block vector of the luminance block. Alternatively, the block vector of the luminance block may be changed according to the difference in resolution between the luminance block and the chrominance block and used as the block vector of the chrominance block. Figure 26 shows predicting a luminance block based on two reference luminance blocks and two block vectors in Intra-TMP. Additionally, the encoder and decoder derive two block vectors for the current chrominance block based on the two block vectors used for prediction of the luminance block. The encoder and decoder use the two derived block vectors to find two reference blocks, and use the two reference blocks to predict the current chrominance block.
도 27은 본 발명의 실시 예에 따라 GPM 모드에서 현재 블록이 2개의 영역으로 분할되고, 분할된 영역이 IBC 모드로 부호화되는 것을 보여준다.Figure 27 shows that the current block is divided into two regions in GPM mode and the divided regions are encoded in IBC mode according to an embodiment of the present invention.
인코더 및 디코더는 현재 블록을 IBC-GPM 모드를 사용하여 부호화 또는 복호화할 수 있다. IBC-GPM 모드에서, 현재 블록은 GPM 모드를 사용하여 분할되고, 분할된 영역은 인트라 예측 모드 또는 IBC 예측 모드로 부호화될 수 있다. 현재 블록은 2개의 영역으로 분할되고, 분할된 영역 중 어느 하나의 영역은 인트라 예측 모드로 부호화되고, 나머지 영역은 IBC 예측 모드로 부호화될 수 있다. 이때, 분할된 영역은 IBC 예측 모드가 아닌 Intra TMP 모드를 사용하여 부호화될 수 있다. 도 27은 이를 보여준다. 이를 Intra TMP-GPM 모드로 지칭할 수 있다.The encoder and decoder can encode or decode the current block using IBC-GPM mode. In IBC-GPM mode, the current block is divided using GPM mode, and the divided region may be encoded in intra prediction mode or IBC prediction mode. The current block is divided into two regions, one of the divided regions may be encoded in intra prediction mode, and the remaining region may be encoded in IBC prediction mode. At this time, the divided region may be encoded using Intra TMP mode rather than IBC prediction mode. Figure 27 shows this. This can be referred to as Intra TMP-GPM mode.
도 28은 본 발명의 실시 예에 따라 현재 블록이 IBC-CIIP 모드로 부호화되는 것을 보여준다.Figure 28 shows that the current block is encoded in IBC-CIIP mode according to an embodiment of the present invention.
인코더 및 디코더는 인트라 예측된 블록과 IBC 예측된 블록 사이의 가중치 평균을 이용하여 현재 블록을 예측할 수 있다. 이를 IBC-CIIP 모드라 지칭될 수 있다. 이때, IBC 예측된 블록이 아닌 Intra TMP 예측 모드를 사용하여 부호화 또는 복호화 될 수 있으며, 이를 IntraTMP-CIIP 모드라고 할 수 있다.The encoder and decoder can predict the current block using the weighted average between the intra predicted block and the IBC predicted block. This may be referred to as IBC-CIIP mode. At this time, it can be encoded or decoded using the Intra TMP prediction mode rather than the IBC predicted block, and this can be referred to as the IntraTMP-CIIP mode.
앞서 설명한 다양한 예측 방법에 디블록킹 필터링을 수행하는 방법이 문제될 수 있다. 먼저 일반적인 디블록킹 필터링에 대해 설명하고, 각 예측 모드 별로 디블록킹을 수행하는 방법에 대해 설명한다.There may be a problem with how to perform deblocking filtering in the various prediction methods described above. First, general deblocking filtering will be explained, and then how to perform deblocking for each prediction mode.
도 29는 본 발명의 실시 예에 따라 디블록킹 필터링 과정에서 블록 경계 및 경계 주변의 샘플들의 실시 예를 보여준다.Figure 29 shows an example of a block boundary and samples around the boundary during a deblocking filtering process according to an embodiment of the present invention.
도 29의 (a)에서 P 블록과 Q 블록 사이의 점선은 블록 경계이다. 블록 경계는 임의의 정해진 크기마다 도 29의 (a)는 4의 크기마다 블록 경계가 존재하는 것을 보여준다. 도 29 (b)는 블록 경계를 기준으로 필터링이 수행되는 샘플을 보여준다. 인코더 및 디코더는 현재 복원된 블록에 대하여 디블록킹 필터링을 수행하여 블록 경계에서 발생하는 블록킹 현상을 완화시킬 수 있다. 디블록킹 필터링 과정은 변환 블록 경계, 서브 블록 경계, 필터의 길이, 필터링의 세기(bS), 필터링 파라미터, 필터링 수행 여부, 및 필터링의 종류에 대한 결정 과정을 거친 후, 필터링이 수행될 수 있다.In Figure 29(a), the dotted line between the P block and the Q block is a block boundary. Block boundaries exist at any given size. Figure 29(a) shows that block boundaries exist at every size of 4. Figure 29(b) shows a sample in which filtering is performed based on block boundaries. The encoder and decoder can perform deblocking filtering on the currently restored block to alleviate blocking phenomenon that occurs at block boundaries. In the deblocking filtering process, filtering may be performed after determining the transform block boundary, sub-block boundary, filter length, filtering strength (bS), filtering parameters, whether to perform filtering, and the type of filtering.
주변 블록 또는 현재 블록이 IBC-CIIP 모드 또는 IntraTMP-CIIP 모드로 부호화될 수 있다. 이때, 인코더 및 디코더가 주변 블록과 현재 블록 사이의 경계에 적용되는 디블록킹 필터링의 세기를 결정하는 방법에 대해 설명한다. 인코더 및 디코더는 주변 블록과 현재 블록 사이의 경계에 인트라 예측된 부호화 모드에 적용되는 필터링 세기와 동일한 필터링 세기로 디블록킹 필터링을 수행할 수 있다. 또 다른 구체적인 실시 예에서 인코더 및 디코더는 주변 블록과 현재 블록 사이의 경계에 미리 지정된 필터링 세기로 디블록킹 필터링을 수행할 수 있다. 필터링의 세기는 0, 1, 2로 구분될 수 있고, 2가 가장 센 필터링 세기를 나타내고, 1은 두 번째로 센 필터링 세기를 나타내고, 0은 필터링이 수행되지 않은 것을 나타낼 수 있다. 이때, 미리 지정된 세기는 2일 수 있다. 이는 IBC-CIIP 모드 및 IntraTMP-CIIP 모드에서 Intra 예측이 사용되기 때문이다. 또 다른 구체적인 실시 예에서 미리 지정된 세기는 1일 수 있다. 이는 IBC-CIIP 모드 및 IntraTMP-CIIP 모드에서 Intra 예측뿐만 아니라 Inter 예측도 사용되기 때문이다.Neighboring blocks or the current block may be encoded in IBC-CIIP mode or IntraTMP-CIIP mode. At this time, how the encoder and decoder determine the strength of deblocking filtering applied to the boundary between the surrounding block and the current block will be described. The encoder and decoder can perform deblocking filtering with the same filtering strength as the filtering strength applied to the intra-predicted coding mode on the boundary between the neighboring block and the current block. In another specific embodiment, the encoder and decoder may perform deblocking filtering with a predetermined filtering strength on the boundary between the neighboring block and the current block. The filtering strength can be divided into 0, 1, and 2, with 2 indicating the strongest filtering strength, 1 indicating the second strongest filtering strength, and 0 indicating that no filtering is performed. At this time, the pre-designated intensity may be 2. This is because Intra prediction is used in IBC-CIIP mode and IntraTMP-CIIP mode. In another specific embodiment, the predetermined intensity may be 1. This is because not only Intra prediction but also Inter prediction is used in IBC-CIIP mode and IntraTMP-CIIP mode.
또 다른 구체적인 실시 예에서 인코더 및 디코더는 주변 블록과 현재 블록 사이의 블록 벡터의 차이를 기초로 주변 블록과 현재 블록 사이의 경계에 미리 지정된 필터링 세기로 디블록킹 필터링을 수행할 수 있다. 구체적으로 주변 블록과 현재 블록 사이의 블록 벡터의 차이가 미리 지정된 값 이내인 경우, 인코더 및 디코더는 주변 블록과 현재 블록 사이의 경계에 미리 지정된 필터링 세기로 디블록킹 필터링을 수행할 수 있다. 이때, 미리 지정된 필터링 세기는 0일 수 있다. 또한, 주변 블록과 현재 블록 사이의 블록 벡터의 차이가 미리 지정된 값보다 큰 경우, 인코더 및 디코더는 주변 블록과 현재 블록 사이의 경계에 미리 지정된 필터링 세기로 디블록킹 필터링을 수행할 수 있다. 이때, 미리 지정된 필터링 세기는 1일 수 있다. 또한, 미리 지정된 값은 블록 벡터의 해상도에 따라 결정될 수 있다. 또한, 미리 지정된 값은 1이상의 정수일 수 있다. 또한, 블록 벡터의 해상도는 ¼ 화소 단위, ½ 화소 단위, 1 화소 단위 및 4 화소 단위 중 어느 하나일 수 있다.In another specific embodiment, the encoder and decoder may perform deblocking filtering with a filtering strength predetermined at the boundary between the neighboring block and the current block based on the difference in block vectors between the neighboring block and the current block. Specifically, if the difference in block vectors between the neighboring blocks and the current block is within a pre-specified value, the encoder and decoder can perform deblocking filtering with a pre-specified filtering strength on the boundary between the neighboring blocks and the current block. At this time, the pre-designated filtering strength may be 0. Additionally, when the difference in block vectors between neighboring blocks and the current block is greater than a pre-specified value, the encoder and decoder may perform deblocking filtering with a pre-specified filtering strength on the boundary between the neighboring blocks and the current block. At this time, the pre-designated filtering strength may be 1. Additionally, the pre-specified value may be determined according to the resolution of the block vector. Additionally, the pre-designated value may be an integer of 1 or more. Additionally, the resolution of the block vector may be any one of ¼ pixel unit, ½ pixel unit, 1 pixel unit, and 4 pixel unit.
주변 블록 또는 현재 블록이 IntraTMP 모드로 부호화될 수 있다. 이때, 인코더 및 디코더가 주변 블록과 현재 블록 사이의 경계에 적용되는 디블록킹 필터링의 세기를 결정하는 방법에 대해 설명한다. 인코더 및 디코더는 주변 블록과 현재 블록 사이의 경계에 인터 예측된 부호화 모드에 적용되는 필터링 세기와 동일한 필터링 세기로 디블록킹 필터링을 수행할 수 있다. 또 다른 구체적인 실시 예에서 인코더 및 디코더는 주변 블록과 현재 블록 사이의 경계에 미리 지정된 필터링 세기로 디블록킹 필터링을 수행할 수 있다. 미리 지정된 값은 1일 수 있다.Neighboring blocks or the current block may be encoded in IntraTMP mode. At this time, how the encoder and decoder determine the strength of deblocking filtering applied to the boundary between the surrounding block and the current block will be described. The encoder and decoder can perform deblocking filtering with the same filtering strength as the filtering strength applied to the inter-predicted coding mode on the boundary between the neighboring block and the current block. In another specific embodiment, the encoder and decoder may perform deblocking filtering with a predetermined filtering strength on the boundary between the neighboring block and the current block. The pre-specified value may be 1.
또 다른 구체적인 실시 예에서 인코더 및 디코더는 주변 블록과 현재 블록 사이의 블록 벡터의 차이를 기초로 주변 블록과 현재 블록 사이의 경계에 미리 지정된 필터링 세기로 디블록킹 필터링을 수행할 수 있다. 구체적으로 주변 블록과 현재 블록 사이의 블록 벡터의 차이가 미리 지정된 값 이내인 경우, 인코더 및 디코더는 주변 블록과 현재 블록 사이의 경계에 미리 지정된 필터링 세기로 디블록킹 필터링을 수행할 수 있다. 이때, 미리 지정된 필터링 세기는 0일 수 있다. 또한, 주변 블록과 현재 블록 사이의 블록 벡터의 차이가 미리 지정된 값보다 큰 경우, 인코더 및 디코더는 주변 블록과 현재 블록 사이의 경계에 미리 지정된 필터링 세기로 디블록킹 필터링을 수행할 수 있다. 이때, 미리 지정된 필터링 세기는 1일 수 있다. 또한, 미리 지정된 값은 블록 벡터의 해상도에 따라 결정될 수 있다. 또한, 미리 지정된 값은 1이상의 정수일 수 있다. 또한, 블록 벡터의 해상도는 ¼ 화소 단위, ½ 화소 단위, 1 화소 단위 및 4 화소 단위 중 어느 하나일 수 있다.In another specific embodiment, the encoder and decoder may perform deblocking filtering with a filtering strength predetermined at the boundary between the neighboring block and the current block based on the difference in block vectors between the neighboring block and the current block. Specifically, if the difference in block vectors between the neighboring blocks and the current block is within a pre-specified value, the encoder and decoder can perform deblocking filtering with a pre-specified filtering strength on the boundary between the neighboring blocks and the current block. At this time, the pre-designated filtering strength may be 0. Additionally, when the difference in block vectors between neighboring blocks and the current block is greater than a pre-specified value, the encoder and decoder may perform deblocking filtering with a pre-specified filtering strength on the boundary between the neighboring blocks and the current block. At this time, the pre-designated filtering strength may be 1. Additionally, the pre-specified value may be determined according to the resolution of the block vector. Additionally, the pre-designated value may be an integer of 1 or more. Additionally, the resolution of the block vector may be any one of ¼ pixel unit, ½ pixel unit, 1 pixel unit, and 4 pixel unit.
주변 블록 또는 현재 블록이 IBC-GPM 또는 IntraTMP-GPM 모드로 부호화될 수 있다. 이때, 인코더 및 디코더가 주변 블록과 현재 블록 사이의 경계에 적용되는 디블록킹 필터링의 세기를 결정하는 방법에 대해 설명한다. 인코더 및 디코더는 주변 블록과 현재 블록 사이의 경계에 인트라 예측된 부호화 모드에 적용되는 필터링 세기와 동일한 필터링 세기로 디블록킹 필터링을 수행할 수 있다. 구체적으로 인코더 및 디코더는 주변 블록과 현재 블록 사이의 경계에 필터링 세기 2로 디블록킹 필터링을 수행할 수 있다.Neighboring blocks or the current block can be encoded in IBC-GPM or IntraTMP-GPM mode. At this time, how the encoder and decoder determine the strength of deblocking filtering applied to the boundary between the surrounding block and the current block will be described. The encoder and decoder can perform deblocking filtering with the same filtering strength as the filtering strength applied to the intra-predicted coding mode on the boundary between the neighboring block and the current block. Specifically, the encoder and decoder can perform deblocking filtering with a filtering strength of 2 on the boundary between neighboring blocks and the current block.
또 다른 구체적인 실시 예에서 인코더 및 디코더는 주변 블록과 현재 블록 사이의 블록 벡터의 차이를 기초로 주변 블록과 현재 블록 사이의 경계에 미리 지정된 필터링 세기로 디블록킹 필터링을 수행할 수 있다. 구체적으로 주변 블록과 현재 블록 사이의 블록 벡터의 차이가 미리 지정된 값 이내인 경우, 인코더 및 디코더는 주변 블록과 현재 블록 사이의 경계에 미리 지정된 필터링 세기로 디블록킹 필터링을 수행할 수 있다. 이때, 미리 지정된 필터링 세기는 0일 수 있다. 또한, 주변 블록과 현재 블록 사이의 블록 벡터의 차이가 미리 지정된 값보다 큰 경우, 인코더 및 디코더는 주변 블록과 현재 블록 사이의 경계에 미리 지정된 필터링 세기로 디블록킹 필터링을 수행할 수 있다. 이때, 미리 지정된 필터링 세기는 1일 수 있다. 또한, 미리 지정된 값은 블록 벡터의 해상도에 따라 결정될 수 있다. 또한, 미리 지정된 값은 1이상의 정수일 수 있다. 또한, 블록 벡터의 해상도는 ¼ 화소 단위, ½ 화소 단위, 1 화소 단위 및 4 화소 단위 중 어느 하나일 수 있다.In another specific embodiment, the encoder and decoder may perform deblocking filtering with a filtering strength predetermined at the boundary between the neighboring block and the current block based on the difference in block vectors between the neighboring block and the current block. Specifically, if the difference in block vectors between the neighboring blocks and the current block is within a pre-specified value, the encoder and decoder can perform deblocking filtering with a pre-specified filtering strength on the boundary between the neighboring blocks and the current block. At this time, the pre-designated filtering strength may be 0. Additionally, when the difference in block vectors between neighboring blocks and the current block is greater than a pre-specified value, the encoder and decoder may perform deblocking filtering with a pre-specified filtering strength on the boundary between the neighboring blocks and the current block. At this time, the pre-designated filtering strength may be 1. Additionally, the pre-specified value may be determined according to the resolution of the block vector. Additionally, the pre-designated value may be an integer of 1 or more. Additionally, the resolution of the block vector may be any one of ¼ pixel unit, ½ pixel unit, 1 pixel unit, and 4 pixel unit.
주변 블록 또는 현재 블록이 IBC-GPM 또는 IntraTMP-GPM 모드로 부호화되고, GPM 모드를 사용하여 분할된 어느 하나의 영역이 인트라 예측 모드를 사용하여 부호화될 수 있다. 이때, 인코더 및 디코더는 주변 블록과 현재 블록 사이의 블록 벡터의 차이를 기초로 주변 블록과 현재 블록 사이의 경계에 미리 지정된 필터링 세기로 디블록킹 필터링을 수행할 수 있다. 미리 지정된 필터링 세기는 2일 수 있다.A neighboring block or the current block may be encoded in IBC-GPM or IntraTMP-GPM mode, and any region divided using GPM mode may be encoded using intra prediction mode. At this time, the encoder and decoder may perform deblocking filtering with a filtering strength predetermined at the boundary between the neighboring block and the current block based on the difference in block vectors between the neighboring block and the current block. The pre-specified filtering strength may be 2.
또 다른 구체적인 실시 예에서 인코더 및 디코더는 주변 블록과 현재 블록 사이의 블록 벡터의 차이를 기초로 주변 블록과 현재 블록 사이의 경계에 미리 지정된 필터링 세기로 디블록킹 필터링을 수행할 수 있다. 구체적으로 주변 블록과 현재 블록 사이의 블록 벡터의 차이가 미리 지정된 값 이내인 경우, 인코더 및 디코더는 주변 블록과 현재 블록 사이의 경계에 미리 지정된 필터링 세기로 디블록킹 필터링을 수행할 수 있다. 이때, 미리 지정된 필터링 세기는 0일 수 있다. 또한, 주변 블록과 현재 블록 사이의 블록 벡터의 차이가 미리 지정된 값보다 큰 경우, 인코더 및 디코더는 주변 블록과 현재 블록 사이의 경계에 미리 지정된 필터링 세기로 디블록킹 필터링을 수행할 수 있다. 이때, 미리 지정된 필터링 세기는 1일 수 있다. 또한, 미리 지정된 값은 블록 벡터의 해상도에 따라 결정될 수 있다. 또한, 미리 지정된 값은 1이상의 정수일 수 있다. 또한, 블록 벡터의 해상도는 ¼ 화소 단위, ½ 화소 단위, 1 화소 단위 및 4 화소 단위 중 어느 하나일 수 있다.In another specific embodiment, the encoder and decoder may perform deblocking filtering with a filtering strength predetermined at the boundary between the neighboring block and the current block based on the difference in block vectors between the neighboring block and the current block. Specifically, if the difference in block vectors between the neighboring blocks and the current block is within a pre-specified value, the encoder and decoder can perform deblocking filtering with a pre-specified filtering strength on the boundary between the neighboring blocks and the current block. At this time, the pre-designated filtering strength may be 0. Additionally, when the difference in block vectors between neighboring blocks and the current block is greater than a pre-specified value, the encoder and decoder may perform deblocking filtering with a pre-specified filtering strength on the boundary between the neighboring blocks and the current block. At this time, the pre-designated filtering strength may be 1. Additionally, the pre-specified value may be determined according to the resolution of the block vector. Additionally, the pre-designated value may be an integer of 1 or more. Additionally, the resolution of the block vector may be any one of ¼ pixel unit, ½ pixel unit, 1 pixel unit, and 4 pixel unit.
주변 블록 또는 현재 블록이 RRIBC 모드로 부호화될 수 있다. 이때, 인코더 및 디코더가 주변 블록과 현재 블록 사이의 경계에 적용되는 디블록킹 필터링의 세기를 결정하는 방법에 대해 설명한다. 인코더 및 디코더는 주변 블록과 현재 블록 사이의 블록 벡터의 차이를 기초로 주변 블록과 현재 블록 사이의 경계에 필터링 세기를 0으로 디블록킹 필터링을 수행할 수 있다. RRIBC 모드는 스크린 컨텐츠에서 수행되는 모드로써, 글자 및 도형 등의 명확한 형태가 반복적으로 나타나는 영상에서 효과적이다. 따라서 주변 블록 또는 현재 블록이 RRIBC 모드로 부호화된 경우, 블록 경계에서의 블록킹 현상이 존재하지 않을 수 있기 때문이다. 또 다른 구체적인 실시 예에서 주변 블록 또는 현재 블록이 IBC-GPM 모드 또는 IBC-CIIP이고, IBC 모드가 RRIBC 모드인 경우, 인코더 및 디코더는 주변 블록과 현재 블록 사이의 블록 벡터의 차이를 기초로 주변 블록과 현재 블록 사이의 경계에 필터링 세기를 미리 지정된 필터링 세기로 디블록킹 필터링을 수행할 수 있다. 미리 지정된 필터링 세기는 1일 수 있다.Neighboring blocks or the current block may be encoded in RRIBC mode. At this time, how the encoder and decoder determine the strength of deblocking filtering applied to the boundary between the surrounding block and the current block will be described. The encoder and decoder may perform deblocking filtering with a filtering strength of 0 on the boundary between the neighboring block and the current block based on the difference in block vectors between the neighboring block and the current block. RRIBC mode is a mode performed on screen content and is effective in images where clear shapes such as letters and shapes appear repeatedly. Therefore, if the surrounding block or the current block is encoded in RRIBC mode, the blocking phenomenon at the block boundary may not exist. In another specific embodiment, when the neighboring block or current block is IBC-GPM mode or IBC-CIIP, and the IBC mode is RRIBC mode, the encoder and decoder determine the neighboring block based on the difference in block vectors between the neighboring block and the current block. Deblocking filtering can be performed with a pre-specified filtering strength on the boundary between and the current block. The pre-specified filtering strength may be 1.
앞서 설명한 실시 예들을 통해 디블록킹 필터링의 세기를 결정하는 방법은 휘도 블록의 경계뿐만아니라 색차 블록의 경계에서도 동일하게 적용될 수 있다.The method of determining the strength of deblocking filtering through the above-described embodiments can be equally applied not only to the boundary of the luminance block but also to the boundary of the chrominance block.
본 명세서에서 설명하는 방법들이 적용될 것인지 여부는 슬라이스 타입 정보 (예, I 슬라이스, P 슬라이스, B 슬라이스 인지 여부), 타일인지 여부, 서브 픽쳐인지 여부, 현재 블록의 크기, 코딩 유닛의 깊이, 현재 블록이 휘도 블록인지 색차 블록인지 여부, 참조 프레임인지 비참조 프레임인지 여부, 참조 순서 및 계층에 따른 시간적인 계층 등에 대한 정보들 중 적어도 어느 하나에 기초하여 결정될 수 있다. 본 명세서에서 설명하는 방법들이 적용될 것인지 여부를 결정하기 위해 사용되는 정보들은 디코더 및 인코더 간 미리 약속된 정보일 수 있다. 또한, 이러한 정보들은 프로파일 및 레벨에 따라 결정되어 있을 수 있다. 이러한 정보들은 변수 값으로 표현될 수 있고, 비트스트림에는 변수 값에 대한 정보가 포함될 수 있다. 즉, 디코더는 비트스트림에 포함된 변수 값에 대한 정보를 파싱하여 상술한 방법들이 적용되는지 여부를 결정할 수 있다. 예를 들어, 코딩 유닛의 가로의 길이 또는 세로의 길이에 기초하여 상술한 방법들이 적용될 것인지 여부가 결정될 수 있다. 가로의 길이 또는 세로의 길이가 32 이상(예, 32, 64, 128 등)이면 상술한 방법들은 적용될 수 있다. 또한 가로의 길이 또는 세로의 길이가 32 보다 작은 경우(예, 2, 4, 8, 16)에 상술한 방법들은 적용될 수 있다. 또한 가로의 길이 또는 세로의 길이가 4 또는 8인 경우 상술한 방법들은 적용될 수 있다.Whether the methods described herein will be applied depends on slice type information (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, and the current block. It may be determined based on at least one of information about whether it is a luminance block or a chrominance block, whether it is a reference frame or a non-reference frame, reference order, and temporal hierarchy according to the hierarchy. Information used to determine whether the methods described in this specification will be applied may be information previously agreed upon between the decoder and the encoder. Additionally, this information may be determined according to profile and level. This information can be expressed as variable values, and the bitstream can include information about variable values. That is, the decoder can determine whether the above-described methods are applied by parsing information about variable values included in the bitstream. For example, it may be determined whether the above-described methods will be applied based on the horizontal or vertical length of the coding unit. If the horizontal or vertical length is 32 or more (e.g., 32, 64, 128, etc.), the above-described methods can be applied. Additionally, the above-described methods can be applied when the horizontal or vertical length is less than 32 (e.g., 2, 4, 8, 16). Additionally, the above-described methods can be applied when the horizontal or vertical length is 4 or 8.
본 명세서에서 상술한 방법들은 디코더 또는 인코더의 프로세서를 통해 수행될 수 있다. 또한, 인코더는 비디오 신호 처리 방법에 의해 디코딩되는 비트스트림을 생성할 수 있다. 또한, 인코더가 생성한 비트스트림은 컴퓨터 판독 가능한 비 일시적 저장 매체(기록 매체)에 저장될 수 있다.The methods described above in this specification may be performed through a processor of a decoder or encoder. Additionally, the encoder can generate a bitstream that is decoded by a video signal processing method. Additionally, the bitstream generated by the encoder may be stored in a computer-readable non-transitory storage medium (recording medium).
본 명세서는 주로 디코더 관점에서 기술되었으나 인코더에서도 동일하게 동작될 수 있다. 본 명세서의 파싱이라는 용어는 비트스트림으로부터 정보를 획득하는 과정을 중점으로하여 설명되었으나 인코더 측면에서는 비트스트림에 해당 정보를 생성하는 것으로 해석될 수 있다. 따라서 파싱이라는 용어는 디코더 동작으로만 한정되지 않고 인코더에서는 비트스트림을 생성하는 행위로까지 해석될 수 있다. 또한, 이러한 비트스트림은 컴퓨터 판독 가능한 기록 매체에 저장되어 생성될 수 있다.Although this specification is mainly described from the perspective of a decoder, it can be operated equally in an encoder. The term parsing in this specification has been described with a focus on the process of obtaining information from the bitstream, but from the encoder perspective, it can be interpreted as generating corresponding information in the bitstream. Therefore, the term parsing is not limited to the decoder operation, but can also be interpreted as the act of generating a bitstream in the encoder. Additionally, this bitstream can be generated and stored in a computer-readable recording medium.
상술한 본 발명의 실시예들은 다양한 수단을 통해 구현될 수 있다. 예를 들어, 본 발명의 실시예들은 하드웨어, 펌웨어(firmware), 소프트웨어 또는 그것들의 결합 등에 의해 구현될 수 있다.Embodiments of the present invention described above can be implemented through various means. For example, embodiments of the present invention may be implemented by hardware, firmware, software, or a combination thereof.
하드웨어에 의한 구현의 경우, 본 발명의 실시예들에 따른 방법은 하나 또는 그 이상의 ASICs(Application Specific Integrated Circuits), DSPs(Digital Signal Processors), DSPDs(Digital Signal Processing Devices), PLDs(Programmable Logic Devices), FPGAs(Field Programmable Gate Arrays), 프로세서, 컨트롤러, 마이크로 컨트롤러, 마이크로 프로세서 등에 의해 구현될 수 있다.In the case of hardware implementation, the method according to embodiments of the present invention uses one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), and Programmable Logic Devices (PLDs). , can be implemented by FPGAs (Field Programmable Gate Arrays), processors, controllers, microcontrollers, microprocessors, etc.
펌웨어나 소프트웨어에 의한 구현의 경우, 본 발명의 실시예들에 따른 방법은 이상에서 설명된 기능 또는 동작들을 수행하는 모듈, 절차 또는 함수 등의 형태로 구현될 수 있다. 소프트웨어 코드는 메모리에 저장되어 프로세서에 의해 구동될 수 있다. 상기 메모리는 프로세서의 내부 또는 외부에 위치할 수 있으며, 이미 공지된 다양한 수단에 의해 프로세서와 데이터를 주고받을 수 있다.In the case of implementation by firmware or software, the method according to embodiments of the present invention may be implemented in the form of a module, procedure, or function that performs the functions or operations described above. Software code can be stored in memory and run by a processor. The memory may be located inside or outside the processor, and may exchange data with the processor through various known means.
일부 실시예는 컴퓨터에 의해 실행되는 프로그램 모듈과 같은 컴퓨터에 의해 실행가능한 명령어를 포함하는 기록 매체의 형태로도 구현될 수 있다. 컴퓨터 판독 가능 매체는 컴퓨터에 의해 액세스될 수 있는 임의의 가용 매체일 수 있고, 휘발성 및 비휘발성 매체, 분리형 및 비분리형 매체를 모두 포함한다. 또한, 컴퓨터 판독 가능 매체는 컴퓨터 저장 매체 및 통신 매체를 모두 포함할 수 있다. 컴퓨터 저장 매체는 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터와 같은 정보의 저장을 위한 임의의 방법 또는 기술로 구현된 휘발성 및 비휘발성, 분리형 및 비분리형 매체를 모두 포함한다. 통신 매체는 전형적으로 컴퓨터 판독가능 명령어, 데이터 구조 또는 프로그램 모듈과 같은 변조된 데이터 신호의 기타 데이터, 또는 기타 전송 메커니즘을 포함하며, 임의의 정보 전달 매체를 포함한다.Some embodiments may also be implemented in the form of a recording medium containing instructions executable by a computer, such as program modules executed by a computer. Computer-readable media can be any available media that can be accessed by a computer and includes both volatile and non-volatile media, removable and non-removable media. Additionally, computer-readable media may include both computer storage media and communication media. Computer storage media includes both volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules or other data. Communication media typically includes computer readable instructions, data structures or other data of modulated data signals such as program modules, or other transmission mechanisms, and includes any information delivery medium.
전술한 본 발명의 설명은 예시를 위한 것이며, 본 발명이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명의 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 쉽게 변형이 가능하다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적인 것이 아는 것으로 해석해야 한다. 예를 들어, 단일형으로 설명되어 있는 각 생성 요소는 분산되어 실시될 수도 있으며, 마찬가지로 분산된 것으로 설명되어 있는 생성 요소들도 결합된 형태로 실시될 수 있다.The description of the present invention described above is for illustrative purposes, and those skilled in the art will understand that the present invention can be easily modified into other specific forms without changing the technical idea or essential features of the present invention. will be. Therefore, the embodiments described above are illustrative in all respects and should be interpreted as limited. For example, each generation element described as single may be implemented in a distributed manner, and similarly, generation elements described as distributed may also be implemented in a combined form.
본 발명의 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.The scope of the present invention is indicated by the claims described below rather than the detailed description above, and all changes or modified forms derived from the meaning and scope of the claims and their equivalent concepts should be construed as being included in the scope of the present invention. do.

Claims (21)

  1. 비디오 신호를 디코딩하는 디코딩 장치에서,In a decoding device that decodes a video signal,
    프로세서를 포함하고,Includes a processor,
    상기 프로세서는The processor is
    기준선에 따라 현재 블록을 복수의 영역으로 분할하고,Divide the current block into multiple areas according to the baseline,
    분할된 각 영역 별로 예측을 수행하고,Predictions are made for each divided area,
    상기 복수의 영역 중 적어도 하나는 인트라 예측을 통해 예측되는At least one of the plurality of regions is predicted through intra prediction
    디코딩 장치.Decoding device.
  2. 제1항에서,In paragraph 1:
    상기 프로세서는The processor is
    상기 인트라 예측을 통해 예측되는 적어도 하나의 영역의 예측을 위해 사용되는 인트라 예측 방향성 모드 정보의 후보들을 포함하는 후보 리스트를 생성할 때, 상기 분할의 형태와 인트라 예측 방향성 모드의 조합 별로 후보를 생성하는 When generating a candidate list including candidates of intra prediction directionality mode information used for prediction of at least one region predicted through intra prediction, generating candidates for each combination of the type of division and the intra prediction directionality mode.
    디코딩 장치.Decoding device.
  3. 제2항에서,In paragraph 2,
    상기 프로세서는The processor is
    상기 분할의 형태에 해당하는 방향에 해당하는 각도와 상기 인트라 예측 방향성 모드가 지시하는 각도의 차이가 미리 지정된 값 이하인 후보를 상기 후보 리스트에서 제외하는Excluding from the candidate list candidates whose difference between the angle corresponding to the direction corresponding to the type of division and the angle indicated by the intra prediction direction mode is less than or equal to a predetermined value
    디코딩 장치.Decoding device.
  4. 제2에서,In part 2,
    상기 프로세서는The processor is
    상기 인트라 예측 방향성 모드의 인덱스와 상기 분할의 형태에 해당하는 방향에 해당하는 인트라 예측 방향성 모드의 인덱스의 차이가 미리 지정된 값 이하인 후보를 상기 후보 리스트에서 제외하는Excluding from the candidate list a candidate whose difference between the index of the intra prediction directional mode and the index of the intra prediction directional mode corresponding to the direction corresponding to the division type is less than or equal to a predetermined value.
    디코딩 장치.Decoding device.
  5. 제2항에서,In paragraph 2,
    상기 프로세서는The processor is
    상기 후보 리스트의 제1 후보의 상기 분할의 형태에 해당하는 방향에 해당하는 각도와 상기 제1 후보의 상기 인트라 예측 방향성 모드가 지시하는 각도가 다른 경우, 상기 제1 후보의 상기 분할의 형태에 해당하는 방향에 해당하는 각도를 상기 인트라 예측 방향성 모드가 지시하는 각도로 설정하는If the angle corresponding to the direction corresponding to the type of division of the first candidate in the candidate list is different from the angle indicated by the intra prediction directional mode of the first candidate, it corresponds to the type of division of the first candidate Set the angle corresponding to the direction to the angle indicated by the intra prediction directionality mode.
    디코딩 장치.Decoding device.
  6. 제2항에서,In paragraph 2,
    상기 프로세서는The processor is
    상기 현재 블록에 인접한 주변 블록의 인트라 예측 방향성 모드의 인덱스와 상기 후보 리스트의 제1 후보에 사용되는 인트라 예측 방향 모드의 인덱스 사이 차이가 미리 지정된 값 내이고, 상기 현재 블록에 인접한 주변 블록의 인트라 예측 방향성 모드의 인덱스와 상기 후보 리스트의 제2 후보에 사용되는 인트라 예측 방향 모드의 인덱스 사이 차이가 상기 미리 지정된 값과 같거나 큰 경우, 상기 제1 후보의 우선 순위를 상기 제2 후보보다 높은 우선 순위로 지정하는The difference between the index of the intra prediction direction mode of the neighboring block adjacent to the current block and the index of the intra prediction direction mode used for the first candidate in the candidate list is within a predetermined value, and the intra prediction of the neighboring block adjacent to the current block If the difference between the index of the directional mode and the index of the intra prediction directional mode used for the second candidate in the candidate list is equal to or greater than the predetermined value, the priority of the first candidate is set to a higher priority than the second candidate. specified as
    디코딩 장치.Decoding device.
  7. 제2항에서,In paragraph 2,
    상기 프로세서는The processor is
    상기 현재 블록에 인접한 주변 블록의 인트라 예측 방향성 모드의 인덱스와 상기 후보 리스트의 후보에 사용되는 인트라 예측 방향 모드의 인덱스 사이 차이를 기초로 상기 후보의 코스트를 계산할 때 사용되는 가중치를 결정하는Determining a weight used when calculating the cost of the candidate based on the difference between the index of the intra prediction direction mode of a neighboring block adjacent to the current block and the index of the intra prediction direction mode used for the candidate in the candidate list.
    디코딩 장치. Decoding device.
  8. 제7항에서,In paragraph 7:
    상기 프로세서는The processor is
    상기 인접한 주변 블록의 인트라 예측 방향성 모드와 상기 후보에 사용되는 인트라 예측 방향 모드의 인덱스 사이 차이가 미리 지정된 값보다 큰 경우, SAD 혹은 MR-SAD로 계산된 해당 후보의 코스트에 1보다 큰 가중치를 곱한 값으로 코스트를 재계산하는If the difference between the intra prediction direction mode of the adjacent neighboring block and the index of the intra prediction direction mode used for the candidate is greater than a predetermined value, the cost of the candidate calculated by SAD or MR-SAD is multiplied by a weight greater than 1. Recalculating the cost by value
    디코딩 장치.Decoding device.
  9. 제1항에서,In paragraph 1:
    상기 비디오 신호를 포함하는 비트스트림은 GPM 모드 또는 ISP 모드 중 어느 하나의 모드로 부호화되었는지를 지시하는 신택스를 포함하고,The bitstream including the video signal includes syntax indicating whether it is encoded in either GPM mode or ISP mode,
    상기 프로세서는The processor is
    상기 비트스트림으로부터 상기 신택스를 획득하여 상기 현재 블록이 GPM 모드 또는 ISP 모드 중 어느 하나의 모드로 부호화되었는지 판단하는Obtaining the syntax from the bitstream to determine whether the current block is encoded in either GPM mode or ISP mode
    디코딩 장치.Decoding device.
  10. 제1항에서,In paragraph 1:
    상기 프로세서는The processor is
    상기 복수의 영역 중 어느 하나가 인트라 예측 모드를 사용하여 부호화된지를 기초로 상기 현재 블록의 복원에 사용하는 디블록킹 필터의 세기를 결정하는Determining the strength of a deblocking filter used for restoration of the current block based on which one of the plurality of regions is encoded using an intra prediction mode
    디코딩 장치.Decoding device.
  11. 비디오 신호를 인코딩하는 인코딩 장치에서,In an encoding device that encodes a video signal,
    프로세서를 포함하고,Includes a processor,
    상기 프로세서는The processor is
    기준선에 따라 현재 블록을 복수의 영역으로 분할하고,Divide the current block into multiple areas according to the baseline,
    분할된 각 영역 별로 예측을 수행하고,Predictions are made for each divided area,
    상기 복수의 영역 중 적어도 하나는 인트라 예측을 통해 예측되는At least one of the plurality of regions is predicted through intra prediction
    인코딩 장치.encoding device.
  12. 제11항에서,In paragraph 11:
    상기 프로세서는The processor is
    상기 인트라 예측을 통해 예측되는 적어도 하나의 영역의 예측을 위해 사용되는 인트라 예측 방향성 모드 정보의 후보들을 포함하는 후보 리스트를 생성할 때, 상기 분할의 형태와 인트라 예측 방향성 모드의 조합 별로 후보를 생성하는 When generating a candidate list including candidates of intra prediction directional mode information used for prediction of at least one region predicted through intra prediction, generating candidates for each combination of the type of division and the intra prediction directional mode
    인코딩 장치.encoding device.
  13. 제12항에서,In paragraph 12:
    상기 프로세서는The processor is
    상기 분할의 형태에 해당하는 방향에 해당하는 각도와 상기 인트라 예측 방향성 모드가 지시하는 각도의 차이가 미리 지정된 값 이하인 후보를 상기 후보 리스트에서 제외하는Excluding from the candidate list candidates whose difference between the angle corresponding to the direction corresponding to the type of division and the angle indicated by the intra prediction direction mode is less than or equal to a predetermined value
    인코딩 장치.encoding device.
  14. 제12에서,In Lesson 12,
    상기 프로세서는The processor is
    상기 인트라 예측 방향성 모드의 인덱스와 상기 분할의 형태에 해당하는 방향에 해당하는 인트라 예측 방향성 모드의 인덱스의 차이가 미리 지정된 값 이하인 후보를 상기 후보 리스트에서 제외하는Excluding from the candidate list a candidate whose difference between the index of the intra prediction directional mode and the index of the intra prediction directional mode corresponding to the direction corresponding to the division type is less than or equal to a predetermined value.
    인코딩 장치.encoding device.
  15. 제12항에서,In paragraph 12:
    상기 프로세서는The processor is
    상기 후보 리스트의 제1 후보의 상기 분할의 형태에 해당하는 방향에 해당하는 각도와 상기 제1 후보의 상기 인트라 예측 방향성 모드가 지시하는 각도가 다른 경우, 상기 제1 후보의 상기 분할의 형태에 해당하는 방향에 해당하는 각도를 상기 인트라 예측 방향성 모드가 지시하는 각도로 설정하는If the angle corresponding to the direction corresponding to the type of division of the first candidate in the candidate list is different from the angle indicated by the intra prediction direction mode of the first candidate, it corresponds to the type of division of the first candidate Set the angle corresponding to the direction to the angle indicated by the intra prediction directionality mode.
    인코딩 장치.encoding device.
  16. 제12항에서,In paragraph 12:
    상기 프로세서는The processor is
    상기 현재 블록에 인접한 주변 블록의 인트라 예측 방향성 모드의 인덱스와 상기 후보 리스트의 제1 후보에 사용되는 인트라 예측 방향 모드의 인덱스 사이 차이가 미리 지정된 값 내이고, 상기 현재 블록에 인접한 주변 블록의 인트라 예측 방향성 모드의 인덱스와 상기 후보 리스트의 제2 후보에 사용되는 인트라 예측 방향 모드의 인덱스 사이 차이가 상기 미리 지정된 값과 같거나 큰 경우, 상기 제1 후보의 우선 순위를 상기 제2 후보보다 높은 우선 순위로 지정하는The difference between the index of the intra prediction direction mode of the neighboring block adjacent to the current block and the index of the intra prediction direction mode used for the first candidate in the candidate list is within a predetermined value, and the intra prediction of the neighboring block adjacent to the current block If the difference between the index of the directional mode and the index of the intra prediction directional mode used for the second candidate in the candidate list is equal to or greater than the predetermined value, the priority of the first candidate is set to a higher priority than the second candidate. specified as
    인코딩 장치.encoding device.
  17. 제12항에서,In paragraph 12:
    상기 프로세서는The processor is
    상기 현재 블록에 인접한 주변 블록의 인트라 예측 방향성 모드의 인덱스와 상기 후보 리스트의 후보에 사용되는 인트라 예측 방향 모드의 인덱스 사이 차이를 기초로 상기 후보의 코스트를 계산할 때 사용되는 가중치를 결정하는Determining a weight used when calculating the cost of the candidate based on the difference between the index of the intra prediction direction mode of a neighboring block adjacent to the current block and the index of the intra prediction direction mode used for the candidate in the candidate list.
    인코딩 장치.encoding device.
  18. 제17항에서,In paragraph 17:
    상기 프로세서는The processor is
    상기 인접한 주변 블록의 인트라 예측 방향성 모드와 상기 후보에 사용되는 인트라 예측 방향 모드의 인덱스 사이 차이가 미리 지정된 값보다 큰 경우, SAD 혹은 MR-SAD로 계산된 해당 후보의 코스트에 1보다 큰 가중치를 곱한 값으로 코스트를 재계산하는If the difference between the intra prediction direction mode of the adjacent neighboring block and the index of the intra prediction direction mode used for the candidate is greater than a predetermined value, the cost of the candidate calculated by SAD or MR-SAD is multiplied by a weight greater than 1. Recalculating the cost by value
    인코딩 장치.encoding device.
  19. 제11항에서,In paragraph 11:
    상기 프로세서는The processor is
    상기 비디오 신호를 포함하는 비트스트림에 GPM 모드 또는 ISP 모드 중 어느 하나의 모드로 부호화되었는지를 지시하는 신택스를 포함시키는Including a syntax indicating whether the bitstream including the video signal is encoded in either GPM mode or ISP mode
    인코딩 장치.encoding device.
  20. 제11항에서,In paragraph 11:
    상기 프로세서는The processor is
    상기 복수의 영역 중 어느 하나가 인트라 예측 모드를 사용하여 부호화된지를 기초로 상기 현재 블록의 복원에 사용하는 디블록킹 필터의 세기를 결정하는Determining the strength of a deblocking filter used for restoration of the current block based on which one of the plurality of regions is encoded using an intra prediction mode
    인코딩 장치.Encoding device.
  21. 비트스트림을 저장하는 컴퓨터 판독 가능한 비 일시적 저장 매체에 있어서, 상기 비트스트림은 디코딩 방법에 의해 디코딩되고,A computer-readable non-transitory storage medium storing a bitstream, wherein the bitstream is decoded by a decoding method,
    상기 디코딩 방법은The decoding method is
    기준선에 따라 현재 블록을 복수의 영역으로 분할하는 단계; 및dividing the current block into a plurality of regions according to a baseline; and
    분할된 각 영역 별로 예측을 수행하는 단계를 포함하고,Including the step of performing prediction for each divided area,
    상기 복수의 영역 중 적어도 하나는 인트라 예측을 통해 예측되는At least one of the plurality of regions is predicted through intra prediction
    비 일시적 저장 매체.Non-transitory storage medium.
PCT/KR2023/013228 2022-09-06 2023-09-05 Video signal processing method using geometric division, and device therefor WO2024053987A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
KR10-2022-0112569 2022-09-06
KR20220112569 2022-09-06
KR20230102921 2023-08-07
KR10-2023-0102921 2023-08-07

Publications (1)

Publication Number Publication Date
WO2024053987A1 true WO2024053987A1 (en) 2024-03-14

Family

ID=90191475

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2023/013228 WO2024053987A1 (en) 2022-09-06 2023-09-05 Video signal processing method using geometric division, and device therefor

Country Status (1)

Country Link
WO (1) WO2024053987A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200110214A (en) * 2019-03-12 2020-09-23 현대자동차주식회사 Method and apparatus for intra prediction in which prediction unit is divided into sub-units
KR20210016472A (en) * 2018-06-25 2021-02-15 광동 오포 모바일 텔레커뮤니케이션즈 코포레이션 리미티드 In-screen prediction method and device
KR20210156349A (en) * 2018-07-30 2021-12-24 삼성전자주식회사 Method and apparatus for image encoding, and method and apparatus for image decoding
KR20220077095A (en) * 2020-12-01 2022-06-08 현대자동차주식회사 Video Coding Method and Apparatus Using Intra Prediction

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210016472A (en) * 2018-06-25 2021-02-15 광동 오포 모바일 텔레커뮤니케이션즈 코포레이션 리미티드 In-screen prediction method and device
KR20210156349A (en) * 2018-07-30 2021-12-24 삼성전자주식회사 Method and apparatus for image encoding, and method and apparatus for image decoding
KR20200110214A (en) * 2019-03-12 2020-09-23 현대자동차주식회사 Method and apparatus for intra prediction in which prediction unit is divided into sub-units
KR20220077095A (en) * 2020-12-01 2022-06-08 현대자동차주식회사 Video Coding Method and Apparatus Using Intra Prediction

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
F. WANG (OPPO), Y. YU (OPPO), H. YU (OPPO), D. WANG (OPPO): "EE2-1.4: Spatial GPM", 27. JVET MEETING; 20220713 - 20220722; TELECONFERENCE; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), 13 July 2022 (2022-07-13), XP030302940 *

Similar Documents

Publication Publication Date Title
WO2018212578A1 (en) Method and device for video signal processing
WO2018212577A1 (en) Method and device for video signal processing
WO2017222325A1 (en) Video signal processing method and device
WO2016200100A1 (en) Method and apparatus for encoding or decoding image using syntax signaling for adaptive weight prediction
WO2018066959A1 (en) Method and apparatus for processing video signal
WO2018008905A1 (en) Method and apparatus for processing video signal
WO2018008904A2 (en) Video signal processing method and apparatus
WO2020162737A1 (en) Video signal processing method and device using secondary transform
WO2019117634A1 (en) Image coding method on basis of secondary transform and device therefor
WO2017082443A1 (en) Method and apparatus for adaptively predicting image using threshold value in image coding system
WO2018044089A1 (en) Method and device for processing video signal
WO2019117639A1 (en) Image coding method on basis of transformation and device therefor
WO2020050702A1 (en) Video signal processing method and apparatus using multiple transform kernels
WO2020076142A1 (en) Method and device for processing video signal by using cross-component linear model
WO2021118309A1 (en) Method and apparatus for processing video signal
WO2024053987A1 (en) Video signal processing method using geometric division, and device therefor
WO2019225991A1 (en) Method and apparatus for processing video signal
WO2019190202A1 (en) Video signal processing method and device
WO2023277535A1 (en) Video signal processing method using intra prediction and device therefor
WO2023043296A1 (en) Video signal processing method using obmc, and device therefor
WO2024058637A1 (en) Video signal processing method and device therefor
WO2023055220A1 (en) Method for processing video signal for determining intra-prediction mode on basis of reference picture, and device for same
WO2023182781A1 (en) Video signal processing method based on template matching, and device therefor
WO2023096472A1 (en) Video signal processing method and apparatus therefor
WO2024010430A1 (en) Video signal processing method using linear model and device therefor

Legal Events

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

Ref document number: 23863459

Country of ref document: EP

Kind code of ref document: A1