WO2020149725A1 - 모션 보상을 이용한 비디오 신호 처리 방법 및 장치 - Google Patents

모션 보상을 이용한 비디오 신호 처리 방법 및 장치 Download PDF

Info

Publication number
WO2020149725A1
WO2020149725A1 PCT/KR2020/000964 KR2020000964W WO2020149725A1 WO 2020149725 A1 WO2020149725 A1 WO 2020149725A1 KR 2020000964 W KR2020000964 W KR 2020000964W WO 2020149725 A1 WO2020149725 A1 WO 2020149725A1
Authority
WO
WIPO (PCT)
Prior art keywords
mode
flag
merge
condition
triangle
Prior art date
Application number
PCT/KR2020/000964
Other languages
English (en)
French (fr)
Inventor
고건중
김동철
손주형
정재홍
곽진삼
Original Assignee
주식회사 윌러스표준기술연구소
(주)휴맥스
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 윌러스표준기술연구소, (주)휴맥스 filed Critical 주식회사 윌러스표준기술연구소
Priority to CN202080009653.XA priority Critical patent/CN113302927B/zh
Priority to US17/423,853 priority patent/US11849106B2/en
Priority to JP2021541484A priority patent/JP7277590B2/ja
Priority to EP20741489.7A priority patent/EP3913918A4/en
Priority to KR1020217022444A priority patent/KR20210107733A/ko
Publication of WO2020149725A1 publication Critical patent/WO2020149725A1/ko
Priority to US18/491,003 priority patent/US20240048692A1/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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • H04N19/139Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • 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/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding
    • 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/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/573Motion compensation with multiple frame prediction using two or more reference frames in a given prediction direction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Definitions

  • the present invention relates to a video signal processing method and apparatus, and more particularly, to a video signal processing method and apparatus for encoding or decoding a video signal using motion compensation.
  • Compression coding refers to a series of signal processing techniques for transmitting digitized information through a communication line or storing it in a form suitable for a storage medium.
  • objects such as voice, video, and text in the object of compression encoding.
  • video image compression a technique for performing compression encoding on an image is referred to as video image compression.
  • Compression coding for a video signal is performed by removing excess information in consideration of spatial correlation, temporal correlation, and stochastic correlation.
  • An object of the present invention is to increase the coding efficiency of a video signal.
  • An object of the present invention is to provide an efficient merge mode signaling method.
  • the present invention provides the following video signal processing apparatus and video signal processing method.
  • a video signal processing method comprising: parsing a first syntax element indicating whether a merge mode is applied to a current block; When the merge mode is applied to the current block, determining whether to parse a second syntax element based on a first predefined condition, wherein the second syntax element has a first mode or a second mode.
  • a video signal processing method is provided, which comprises one.
  • the third mode and the fourth mode may be positioned at a lower priority than the first mode in decoding order within the merge data syntax.
  • the second syntax element when the first condition is satisfied, parsing the second syntax element, and when the first condition is not satisfied, the second syntax element may be inferred as 1.
  • the second syntax element may be inferred based on a fourth syntax element indicating whether a subblock-based merge mode is applied to the current block.
  • the second condition may include a condition in which the fourth mode can be used.
  • the second condition is whether the third mode is available in the current sequence, whether the fourth mode is available in the current sequence, whether the maximum number of candidates in the fourth mode is greater than 1, It may include at least one of whether the width of the current block is smaller than a predefined first size and whether the height of the current block is smaller than a predefined second size.
  • the method may include obtaining a fifth syntax element indicating whether the first mode is applied or the second mode is applied to the current block. .
  • a processor in a video signal processing apparatus, wherein the processor includes a first syntax element (syntax element) indicating whether a merge mode is applied to a current block.
  • a first syntax element syntax element
  • the processor includes a first syntax element (syntax element) indicating whether a merge mode is applied to a current block.
  • the processor includes a first syntax element (syntax element) indicating whether a merge mode is applied to a current block.
  • the processor includes a first syntax element (syntax element) indicating whether a merge mode is applied to a current block.
  • the second syntax element is a first mode or a second mode Indicates whether is applied to the current block, and if the first mode and the second mode are not applied to the current block, determines whether to parse the third syntax element based on a second predefined condition and
  • the third syntax element indicates a mode applied to the current block among a third mode or a fourth mode, and indicates a mode applied to the current block based on the
  • the third mode and the fourth mode may be positioned at a lower priority than the first mode in decoding order within the merge data syntax.
  • the processor parses the second syntax element, and when the first condition is not satisfied, the second syntax element may be inferred to be 1.
  • the second syntax element may be inferred based on a fourth syntax element indicating whether a subblock-based merge mode is applied to the current block.
  • the second condition may include a condition in which the fourth mode can be used.
  • the second condition is whether the third mode is available in the current sequence, whether the fourth mode is available in the current sequence, whether the maximum number of candidates in the fourth mode is greater than 1, It may include at least one of whether the width of the current block is smaller than a predefined first size and whether the height of the current block is smaller than a predefined second size.
  • the processor may obtain a fifth syntax element indicating whether the first mode is applied or the second mode is applied to the current block. .
  • a video signal processing method comprising: encoding a first syntax element indicating whether a merge mode is applied to a current block; When the merge mode is applied to the current block, determining whether to encode a second syntax element based on a first predefined condition, wherein the first syntax or the second mode is the second syntax element.
  • a video signal processing method which comprises one.
  • coding efficiency of a video signal may be increased by efficiently signaling the merge mode.
  • FIG. 1 is a schematic block diagram of a video signal encoding apparatus according to an embodiment of the present invention.
  • FIG. 2 is a schematic block diagram of a video signal decoding apparatus according to an embodiment of the present invention.
  • FIG. 3 shows an embodiment in which a coding tree unit is divided into coding units in a picture.
  • FIG. 4 shows an embodiment of a method of signaling a split of a quad tree and a multi-type tree.
  • FIG 5 illustrates inter prediction according to an embodiment of the present invention.
  • FIG. 6 is a diagram illustrating a motion vector signaling method according to an embodiment of the present invention.
  • FIG. 7 is a diagram illustrating a signaling method of adaptive motion vector resolution information according to an embodiment of the present invention.
  • FIG. 8 is a diagram illustrating a coding unit syntax according to an embodiment of the present invention.
  • FIG. 9 is a diagram illustrating a coding unit syntax according to an embodiment of the present invention.
  • FIG. 10 is a diagram illustrating a merge mode signaling method according to an embodiment of the present invention.
  • FIG. 11 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • FIG. 12 is a diagram illustrating merge data syntax according to an embodiment of the present invention.
  • FIG. 13 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • FIG. 14 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • 15 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • 16 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • 17 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • FIG. 18 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • FIG. 19 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • 20 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • 21 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • FIG. 22 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • FIG. 23 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • 24 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • 25 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • 26 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • FIG. 27 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • FIG. 28 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • 29 is a diagram illustrating a merge mode signaling method according to an embodiment of the present invention.
  • FIG. 30 is a diagram illustrating merge data syntax according to an embodiment of the present invention.
  • 31 is a diagram illustrating merge data syntax according to an embodiment of the present invention.
  • 32 is a view showing a geometric merge mode (geometric merge mode) according to an embodiment of the present invention.
  • 33 is a view showing merge data syntax according to an embodiment of the present invention.
  • 34 is a diagram illustrating a video signal processing method according to an embodiment to which the present invention is applied.
  • Coding may be interpreted as encoding or decoding depending on the case.
  • An apparatus for generating a video signal bitstream by performing encoding (coding) of a video signal is referred to herein as an encoding device or an encoder, and an apparatus for performing decoding (decoding) of a video signal bitstream to restore a video signal is decoded.
  • a device or decoder referred to as a device or decoder.
  • the video signal processing apparatus is used as a term of a concept including both an encoder and a decoder.
  • Information is a term including all values, parameters, coefficients, elements, etc. In some cases, the meaning is interpreted differently, so the present invention is not limited thereto.
  • 'Unit' is used to mean a specific location of a basic unit or picture of image processing, and refers to an image region including at least one of a luma component and a chroma component.
  • 'block' refers to an image region including a specific component among luma components and chroma components (ie, Cb and Cr).
  • terms such as'unit','block','partition', and'region' may be used interchangeably.
  • a unit may be used as a concept including all of a coding unit, a prediction unit, and a transformation unit.
  • the picture indicates a field or frame, and according to an embodiment, the terms may be used interchangeably.
  • the encoding apparatus 100 of the present invention includes a transform unit 110, a quantization unit 115, an inverse quantization unit 120, an inverse transform unit 125, a filtering unit 130, and a prediction unit 150 ) And an entropy coding unit 160.
  • the conversion unit 110 obtains a transform coefficient value by converting a residual signal, which is a difference between the input video signal and the prediction signal generated by the prediction unit 150.
  • a Discrete Cosine Transform DCT
  • DST Discrete Sine Transform
  • Wavelet Transform a Discrete Cosine Transform
  • the input picture signal is divided into blocks to perform transformation. Coding efficiency may vary depending on the distribution and characteristics of values in the transform region in the transform.
  • the quantization unit 115 quantizes a transform coefficient value output from the transform unit 110.
  • the predictor 150 predicts a picture using an area that is already coded, and adds a residual value between the original picture and the predicted picture to the reconstructed picture.
  • the method of obtaining is used.
  • information that can be used in the decoder should be used when performing prediction in the encoder.
  • the encoder performs a process of restoring the encoded current block again.
  • the inverse quantization unit 120 inversely quantizes the transform coefficient value, and the inverse transform unit 125 restores the residual value using the inverse quantized transform coefficient value.
  • the filtering unit 130 performs filtering operations for improving the quality of the reconstructed picture and improving the encoding efficiency.
  • a deblocking filter For example, a sample adaptive offset (SAO) and an adaptive loop filter may be included.
  • the filtered picture is output or stored in a decoded picture buffer (DPB, 156) for use as a reference picture.
  • DPB decoded picture buffer
  • the predictor 150 predicts a picture using a region that is already coded, and adds a residual value between the original picture and the predicted picture to the reconstructed picture.
  • the method of obtaining is used.
  • the intra prediction unit 152 performs intra-picture prediction within the current picture, and the inter prediction unit 154 predicts the current picture using the reference picture stored in the decoded picture buffer 156.
  • the intra prediction unit 152 performs intra-picture prediction from reconstructed regions in the current picture, and transmits intra-picture encoding information to the entropy coding unit 160.
  • the inter prediction unit 154 may further include a motion estimation unit 154a and a motion compensation unit 154b.
  • the motion estimation unit 154a obtains a motion vector value of the current area by referring to the restored specific area.
  • the motion estimation unit 154a transmits location information (reference frames, motion vectors, etc.) of the reference region to the entropy coding unit 160 so that it can be included in the bitstream.
  • the motion compensation unit 154b performs inter-screen motion compensation by using the motion vector value transmitted from the motion estimation unit 154a.
  • the prediction unit 150 includes an intra prediction unit 152 and an inter prediction unit 154.
  • the intra predictor 152 performs intra prediction within the current picture, and the inter predictor 154 predicts the inter picture using the reference picture stored in the decoded picture buffer 156 to predict the current picture. To perform.
  • the intra prediction unit 152 performs intra prediction from reconstructed samples in the current picture, and transmits the intra encoding information to the entropy coding unit 160.
  • the intra encoding information may include at least one of an intra prediction mode, a Most Probable Mode (MPM) flag, and an MPM index.
  • the intra encoding information may include information regarding a reference sample.
  • the inter prediction unit 154 may include a motion estimation unit 154a and a motion compensation unit 154b.
  • the motion estimator 154a obtains a motion vector value of the current area by referring to a specific area of the reconstructed reference picture.
  • the motion estimation unit 154a transmits a set of motion information (reference picture index, motion vector information, etc.) for the reference area to the entropy coding unit 160.
  • the motion compensation unit 154b performs motion compensation using the motion vector value transmitted from the motion estimation unit 154a.
  • the inter prediction unit 154 transmits inter encoding information including motion information for a reference region to the entropy coding unit 160.
  • the prediction unit 150 may include an intra block copy (BC) prediction unit (not shown).
  • the intra BC prediction unit performs intra BC prediction from reconstructed samples in the current picture, and transmits the intra BC encoding information to the entropy coding unit 160.
  • the intra BC prediction unit acquires a block vector value indicating a reference region used for prediction of the current region by referring to a specific region in the current picture.
  • the intra BC prediction unit may perform intra BC prediction using the obtained block vector value.
  • the intra BC prediction unit transmits the intra BC encoding information to the entropy coding unit 160.
  • the intra BC encoding information may include block vector information.
  • the transform unit 110 converts a residual value between the original picture and the predicted picture to obtain a transform coefficient value.
  • the transformation may be performed in a specific block unit within a picture, and the size of a specific block may be varied within a preset range.
  • the quantization unit 115 quantizes a transform coefficient value generated by the transform unit 110 and transmits the quantized value to the entropy coding unit 160.
  • the entropy coding unit 160 entropy-codes information representing quantized transform coefficients, intra-coding information, and inter-coding information to generate a video signal bitstream.
  • a variable length coding (VLC) method converts input symbols into successive codewords, but the length of the codewords may be variable. For example, frequently occurring symbols are expressed as short codewords, and less frequently occurring symbols are expressed as long codewords.
  • VLC variable length coding
  • CAVLC context-based adaptive variable length coding
  • Arithmetic coding converts successive data symbols into a single decimal point, and arithmetic coding can obtain the optimal number of decimal bits needed to represent each symbol.
  • Context-based Adaptive Binary Arithmetic Code may be used as arithmetic coding.
  • CABAC Context-based Adaptive Binary Arithmetic Code
  • the entropy coding unit 160 may binarize information representing quantized transform coefficients. Also, the entropy coding unit 160 may arithmetic code the binarized information to generate a bitstream.
  • the generated bitstream is encapsulated in a network abstraction layer (NAL) unit as a basic unit.
  • NAL network abstraction layer
  • the NAL unit includes an integer number of coded coding tree units.
  • the bitstream In order to decode a bitstream in a video decoder, the bitstream must first be divided into NAL unit units, and then each separated NAL unit must be decoded. Meanwhile, information necessary for decoding a video signal bitstream includes a high-level set such as a picture parameter set (PPS), a sequence parameter set (SPS), and a video parameter set (VPS). It can be transmitted through the RBSP (Raw Byte Sequence Payload).
  • PPS picture parameter set
  • SPS sequence parameter set
  • VPN video parameter set
  • FIG. 1 shows an encoding apparatus 100 according to an embodiment of the present invention, and the blocks separately displayed are logically distinguished elements of the encoding apparatus 100. Accordingly, the elements of the above-described encoding apparatus 100 may be mounted as one chip or as a plurality of chips depending on the design of the device. According to an embodiment, the operation of each element of the above-described encoding apparatus 100 may be performed by a processor (not shown).
  • the decoding apparatus 200 of the present invention includes an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 225, a filtering unit 230, and a prediction unit 250.
  • the entropy decoding unit 210 entropy decodes a video signal bitstream, and extracts transformation coefficient information, intra encoding information, and inter encoding information for each region. For example, the entropy decoding unit 210 may obtain a binarization code for transform coefficient information of a specific region from a video signal bitstream. In addition, the entropy decoding unit 210 inversely binarizes the binarization code to obtain quantized transform coefficients. The inverse quantization unit 220 inversely quantizes the quantized transform coefficients, and the inverse transform unit 225 restores a residual value using the inverse quantized transform coefficients. The video signal processing apparatus 200 restores the original pixel value by summing the residual value obtained by the inverse transform unit 225 with the predicted value obtained by the predictor 250.
  • the filtering unit 230 performs filtering on the picture to improve image quality. This may include a deblocking filter for reducing block distortion and/or an adaptive loop filter for removing distortion of the entire picture.
  • the filtered picture is output or stored in a decoded picture buffer (DPB, 256) for use as a reference picture for the next picture.
  • DPB decoded picture buffer
  • the prediction unit 250 includes an intra prediction unit 252 and an inter prediction unit 254.
  • the prediction unit 250 generates a prediction picture by using the encoding type decoded by the entropy decoding unit 210 described above, transformation coefficients for each region, and intra/inter encoding information.
  • a decoded region of the current picture or other pictures including the current block may be used.
  • Intra-picture or I-picture (or tile/slice), intra-prediction, inter-prediction, and intra-BC prediction are all used for reconstructing only the current picture, that is, performing intra prediction or intra BC prediction.
  • the picture (or tile/slice) that can be performed is called an inter picture (or tile/slice).
  • a picture (or tile/slice) using at least one motion vector and a reference picture index to predict sample values of each block among inter pictures (or tiles/slices) is a predictive picture or a P picture (or , Tile/slice), and a picture (or tile/slice) using up to two motion vectors and a reference picture index is referred to as a bi-predictive picture or a B picture (or tile/slice).
  • the P picture (or tile/slice) uses up to one set of motion information to predict each block
  • the B picture (or tile/slice) uses up to two 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.
  • the 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 by using the reconstructed samples located on the left and/or upper side of the current block as reference samples.
  • reconstructed samples, reference samples, and samples of the current block may represent pixels. Also, sample values may represent pixel values.
  • the reference samples may be samples included in a neighboring block of the current block.
  • the reference samples may be samples adjacent to the left boundary of the current block and/or samples adjacent to the upper boundary.
  • reference samples are located on a line within a predetermined distance from the upper boundary of the current block and/or samples positioned within a predetermined distance from the left boundary of the current block among samples of the neighboring block of the current block. Can be samples.
  • the neighboring blocks of the current block are adjacent to the current block, such as the left (L) block, the upper (A) block, the lower left (Blow Left, BL) block, the upper right (Above Right, AR) block, or the upper left (Above Left, AL) It may include at least one of the blocks.
  • the inter prediction unit 254 generates a prediction block using reference pictures and inter encoding information stored in the decoded picture buffer 256.
  • the inter-coding information may include a motion information set (reference picture index, motion vector information, etc.) of the current block for the reference block.
  • Inter prediction may include L0 prediction, L1 prediction, and bi-prediction.
  • L0 prediction is prediction using one reference picture included in the L0 picture list
  • L1 prediction refers to prediction using one reference picture included in the L1 picture list.
  • one set of motion information eg, motion vector and reference picture index
  • a maximum of two reference regions can be used. These two reference regions may exist in the same reference picture or may exist in different pictures.
  • two reference regions used may be regions selected from each of the L0 picture list and the L1 picture list.
  • the inter prediction unit 254 may obtain a reference block of the current block using a motion vector and a reference picture index.
  • the reference block is in a reference picture corresponding to a reference picture index.
  • a sample value of a block specified by a motion vector or an interpolated value thereof can be used as a predictor of the current block.
  • an 8-tap interpolation filter for a luma signal and a 4-tap interpolation filter for a chroma signal can be used.
  • the interpolation filter for motion prediction in subpel units is not limited thereto. In this way, the inter prediction unit 254 performs motion compensation to predict the texture of the current unit from the previously reconstructed picture. At this time, the inter prediction unit may use a motion information set.
  • the prediction unit 250 may include an intra BC prediction unit (not shown).
  • the intra BC prediction unit may reconstruct the current region by referring to a specific region including reconstructed samples in the current picture.
  • the intra BC prediction unit obtains intra BC encoding information for the current region from the entropy decoding unit 210.
  • the intra BC prediction unit acquires a block vector value of the current region indicating a specific region in the current picture.
  • the intra BC prediction unit may perform intra BC prediction using the obtained block vector value.
  • the intra BC encoding information may include block vector information.
  • the reconstructed video picture is generated by adding the predicted value output from the intra predictor 252 or the inter predictor 254 and the residual value output from the inverse transform unit 225. That is, the video signal decoding apparatus 200 reconstructs 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 the decoding apparatus 200 according to an embodiment of the present invention, and the separately displayed blocks logically distinguish elements of the decoding apparatus 200.
  • the elements of the above-described decoding apparatus 200 may be mounted as one chip or as a plurality of chips depending on the design of the device.
  • the operation of each element of the above-described decoding apparatus 200 may be performed by a processor (not shown).
  • FIG. 3 illustrates an embodiment in which a coding tree unit (CTU) is divided into coding units (CUs) in a picture.
  • CTU coding tree unit
  • CUs coding units
  • a picture may be divided into a sequence of coding tree units (CTUs).
  • the coding tree unit consists of an NXN block of luma samples and two blocks of chroma samples corresponding thereto.
  • the coding tree unit may be divided into a plurality of coding units.
  • the coding tree unit is not split and may be a leaf node. In this case, the coding tree unit itself may be a coding unit.
  • the coding unit refers to a basic unit for processing a picture in the process of processing the video signal described above, that is, intra/inter prediction, transform, quantization, and/or entropy coding.
  • the size and shape of the coding unit in one picture may not be constant.
  • the coding unit may have a square or rectangular shape.
  • the rectangular coding unit (or rectangular block) includes a vertical coding unit (or vertical block) and a horizontal coding unit (or horizontal block).
  • the vertical block is a block whose height is greater than the width
  • the horizontal block is a block whose width is greater than the height.
  • a non-square block may refer to a rectangular block, but the present invention is not limited thereto.
  • the coding tree unit is first divided into a quad tree (QT) structure. That is, in a quad tree structure, one node having a size of 2NX2N may be divided into four nodes having a size of NXN.
  • the quad tree may also be referred to as a quaternary tree. Quad tree splitting can be performed recursively, and not all nodes need to be split to the same depth.
  • the leaf node of the above-described quad tree may be further divided into a multi-type tree (MTT) structure.
  • MTT multi-type tree
  • one node in a multi-type tree structure, one node may be divided into a binary (binary) or ternary (ternary) tree structure of horizontal or vertical division. That is, in the multi-type tree structure, there are four division structures: vertical binary division, horizontal binary division, vertical ternary division, and horizontal ternary division.
  • the width and height of the nodes may all have powers of 2.
  • a node of size 2NX2N may be divided into two NX2N nodes by vertical binary partitioning, and divided into two 2NXN nodes by horizontal binary partitioning.
  • a 2NX2N-sized node is divided into (N/2)X2N, NX2N, and (N/2)X2N nodes by vertical ternary splitting, and horizontal binary splitting. It can be divided into 2NX (N/2), 2NXN and 2NX (N/2) nodes. This multi-type tree splitting can be performed recursively.
  • the leaf node of the multi-type tree can be a coding unit. If the division for a coding unit is not indicated or the coding unit is not large compared to the maximum transform length, the coding unit is used as a unit of prediction and transformation without further division. On the other hand, at least one of the following parameters in the above-described quad tree and multi-type tree may be predefined or transmitted through a higher level set of RBSPs such as PPS, SPS, VPS, and the like.
  • Preset flags may be used to signal the splitting of the above-described quad tree and multi-type tree.
  • a flag'qt_split_flag' indicating whether to split the quad tree node
  • a flag'mtt_split_flag' indicating whether to split the multi-type tree node
  • a flag'mtt_split_vertical_flag indicating a split direction of the multi-type tree node.
  • the coding tree unit is a root node of a quad tree, and may be first divided into a quad tree structure.
  • quad tree structure In the quad tree structure,'qt_split_flag' is signaled for each node'QT_node'.
  • the value of'qt_split_flag' is 1, the corresponding node is divided into 4 square nodes, and when the value of'qt_split_flag' is 0, the node becomes a leaf node of the quad tree,'QT_leaf_node'.
  • Each quad tree leaf node'QT_leaf_node' may be further divided into a multi-type tree structure.
  • 'mtt_split_flag' is signaled for each node'MTT_node'.
  • the value of'mtt_split_flag' is 1, the corresponding node is divided into a plurality of rectangular nodes, and when the value of'mtt_split_flag' is 0, the node becomes a leaf node of the multi-type tree,'MTT_leaf_node'.
  • the node'MTT_node' is divided into 2 rectangular nodes, and when the value of'mtt_split_binary_flag' is 0, the node'MTT_node' is divided into 3 rectangular nodes.
  • Picture prediction (motion compensation) for coding is performed on coding units that are no longer divided (ie, leaf nodes of the coding unit tree).
  • the basic unit for performing such prediction is hereinafter referred to as a prediction unit or a prediction block.
  • the term unit used in the present specification may be used as a term to replace the prediction unit, which is a basic unit for performing prediction.
  • the present invention is not limited to this, and may be more broadly understood as a concept including the coding unit.
  • the decoder predicts the current block by referring to reconstructed samples of another decoded picture.
  • the decoder acquires a reference block 42 in the reference picture based on the motion information of the current block 32.
  • the motion information may include a reference picture index and a motion vector 50.
  • the reference picture index indicates a reference picture of the current block in the reference picture list.
  • the motion vector 50 represents an offset between the coordinate values of the current block 32 in the current picture and the coordinate values of the reference block 42 in the reference picture.
  • the decoder obtains the predictor of the current block 32 based on the sample values of the reference block 42 and recovers the current block 32 using the predictor.
  • sub-block-based motion compensation may be used. That is, the current block 32 is divided into a plurality of sub-blocks, and independent motion vectors can be used for each sub-block. Accordingly, each sub-block within the current block 32 can be predicted using a different reference block. According to an embodiment, the sub-block may have a preset size such as 4X4 or 8X8.
  • the decoder obtains a predictor of each subblock of the current block 32 using the motion vector of each subblock.
  • the predictor of the current block 32 can be obtained by combining the predictors of each sub-block, and the decoder can restore the current block 32 using the predictor of the current block 32 thus obtained.
  • Subblock-based motion compensation includes affine model-based motion compensation (hereinafter, affine motion compensation or affine motion prediction) and subblock-based temporal motion vector prediction (SbTMVP). It may include.
  • affine motion compensation or affine motion prediction
  • SBTMVP subblock-based temporal motion vector prediction
  • a motion vector may be generated based on a motion vector prediction (or predictor, MVP).
  • MVP motion vector prediction
  • the MV may be determined as an MVP.
  • the MV may be determined (or set, derived) with the same value as the MVP.
  • an MV may be determined based on an MVP and a motion vector difference (MVD).
  • the encoder can signal MVD information to a decoder to indicate a more accurate MV, and the decoder can derive the MV by adding the obtained MVD to the MVP.
  • the encoder transmits the determined motion information to the decoder, and the decoder can generate (or derive) MV from the received motion information and generate a prediction block based on this.
  • the motion information may include MVP information and MVD information.
  • components of the motion information may vary according to the inter prediction mode.
  • the motion information may include MVP information and may not include MVD information.
  • the motion information may include MVP information and MVD information.
  • the encoder and decoder can generate MVP candidates (or MVP candidate lists) in the same way. For example, the encoder and the decoder may generate the same MVP candidate in the same order.
  • the encoder transmits an index indicating (or indicating) the determined (or selected) MVP among the generated MVP candidates to the decoder, and the decoder can derive the determined MVP and/or MV based on the received index.
  • the MVP candidate may include a spatial candidate, a temporal candidate, and the like.
  • the MVP candidate may be referred to as a merge candidate when the merge mode is applied, and may be referred to as an AMVP candidate when the AMVP mode is applied.
  • the spatial candidate may be an MV (or motion information) for a block at a specific location based on the current block.
  • the spatial candidate may be an MV of a block adjacent to or not adjacent to the current block.
  • the time candidate may be an MV corresponding to a block in a picture different from the current picture.
  • the MVP candidate may include affine MV, ATMVP, STMVP, a combination of the aforementioned MVs (or candidates), an average MV of the aforementioned MVs (or candidates), a zero MV, and the like.
  • the encoder may signal information representing a reference picture to a decoder.
  • the encoder/decoder may scale the MV of the MVP candidate (motion vector scaling). In this case, MV scaling may be performed based on a picture order count (POC) of the current picture, a POC of a reference picture of the current block, and a POC of a reference picture of the MVP candidate.
  • POC picture order count
  • Table 1 illustrates a syntax structure for MVD signaling.
  • the MVD may be coded by dividing the MVD's sign and absolute value. That is, the sign and absolute value of the MVD may be different syntaxes (or syntax elements). Further, the absolute value of the MVD may be directly coded, or may be coded stepwise based on a flag indicating whether the absolute value is greater than N as shown in Table 1. If the absolute value is greater than N, the value of (absolute value-N) may be signaled together. Specifically, in the example of Table 1, abs_mvd_greater0_flag indicating whether the absolute value is greater than 0 may be transmitted.
  • abs_mvd_greater0_flag indicates (or indicates) that the absolute value is not greater than 0, the absolute value of the MVD may be determined as 0. Further, if abs_mvd_greater0_flag indicates that the absolute value is greater than 0, additional syntax (or syntax element) may be present.
  • abs_mvd_greater1_flag indicating whether the absolute value is greater than 1 may be transmitted. If abs_mvd_greater1_flag indicates (or indicates) that the absolute value is not greater than 1, the absolute value of the MVD may be determined as 1. If abs_mvd_greater1_flag indicates that the absolute value is greater than 1, additional syntax may be present. For example, abs_mvd_minus2 may be present. abs_mvd_minus2 may be a value of (absolute value-2).
  • the value (absolute value-2) may be signaled.
  • the value may be signaled.
  • the syntax related to the absolute value described above is applied to a variable length binary method, such as exponential-Golomb, truncated unary, and truncated rice. Can be coded.
  • a flag indicating the sign of MVD may be signaled through mvd_sign_flag.
  • the coding method for the MVD has been described, but information other than the MVD can be signaled by dividing the code and the absolute value.
  • the absolute value may be coded as a flag indicating whether the absolute value is greater than a predetermined specific value, and a value obtained by subtracting the specific value from the absolute value.
  • [0] and [1] may indicate a component index. For example, it may represent an x-component (ie, a horizontal component) and a y-component (ie, a vertical component).
  • FIG. 7 is a diagram illustrating a signaling method of adaptive motion vector resolution information according to an embodiment of the present invention.
  • resolution for representing MV or MVD may be varied.
  • the resolution may be expressed based on pixels (or pels).
  • MV or MVD may be signaled in units of 1/4 (quarter), 1/2 (half), 1 (integer), 2, and 4 pixels.
  • the encoder may signal resolution information of MV or MVD to a decoder.
  • valueDetermined represents MV or MVD value.
  • valuePerResolution represents a value signaled based on the determined resolution. At this time, if the value signaled by MV or MVD does not fall into the determined resolution, a rounding process may be applied.
  • Using a high resolution can increase the accuracy, while a large number of bits can be used because the coded value is large, and using a low resolution can use a small number of bits because the coded value is small for a half name that can lower the accuracy.
  • the above-described resolution may be set differently in units such as a sequence, a picture, a slice, a coding tree unit (CTU), and a coding unit (CU). That is, the encoder/decoder can adaptively determine/apply the resolution according to a predefined unit among the above-described units.
  • the above-described resolution information may be signaled from an encoder to a decoder.
  • the information on the resolution may be signaled by binarization based on the variable length described above.
  • signaling overhead may be reduced.
  • the signaling index may be mapped in order from high resolution to low resolution.
  • FIG. 7 shows a signaling method on the assumption that three resolutions among various resolutions are used.
  • three signaling bits may be 0, 10, and 11, and the three signaling indexes may refer to a first resolution, a second resolution, and a third resolution, respectively. Since 1 bit is required to signal the first resolution and 2 bits are required to signal the remaining resolution, signaling overhead may be relatively reduced when signaling the first resolution.
  • the first resolution, the second resolution, and the third resolution may be defined as 1/4, 1, and 4 pixel resolutions, respectively.
  • the MV resolution may mean the resolution of the MVD.
  • MMVD merge mode with MVD
  • merge MVD merge MVD
  • a syntax element indicating whether MMVD is applied may be signaled based on a syntax element indicating whether merge mode is applied.
  • the MMVD flag (mmvd_flag) may be signaled when the merge flag (merge_flag) is 0 (that is, when the merge mode is not used).
  • the MMVD flag indicates a syntax element (or flag) indicating whether MMVD is applied.
  • the merge flag indicates a syntax element (or flag) indicating whether merge mode is applied.
  • the encoder/decoder is based on a motion vector predictor (MVP) and a motion vector difference (MVD) when a merge mode is applied.
  • MV motion vector predictor
  • MVD motion vector difference
  • the MVP may be referred to as a base motion vector (baseMV). That is, the encoder/decoder can derive a motion vector (ie, a final motion vector) by adding the motion vector difference to the base motion vector.
  • the present invention is not limited to these names, and the MVP may be referred to as a base motion vector, a temporary motion vector, an initial motion vector, an MMVD candidate motion vector, and the like.
  • the MVD may be expressed as a value that refines the MVP, and may be referred to as a refinement motion vector (refineMV) or a merge motion vector difference.
  • the MV in the MMVD mode when the MMVD is applied, that is, the MV in the MMVD mode may be determined based on a base motion vector, a distance parameter (or variable), and a direction parameter (or variable). have.
  • the base motion vector may be determined from a candidate list.
  • the base motion vector can be determined from the merge candidate list.
  • the encoder/decoder can determine the base motion vector from a portion of another candidate list.
  • a part of the candidate list may be a part of the front part of the candidate list (the one with the smallest index).
  • the encoder/decoder may determine the base motion vector using the first and second candidates among candidates in the merge candidate list.
  • a candidate index indicating a specific candidate among the two candidates may be signaled from an encoder to a decoder.
  • a base candidate index which is an index signaling a base motion vector
  • the encoder/decoder may determine a candidate applied to a current block among candidates of a candidate list according to the base candidate index, and determine a motion vector of the determined candidate as a base motion vector.
  • the base candidate index is not limited to its name, and the base candidate index may be referred to as a base candidate flag, a candidate index, a candidate flag, an MMVD index, an MMVD candidate index, an MMVD candidate flag, and the like.
  • MMVD may indicate a merge mode (that is, a motion compensation mode, method) using a motion vector difference, or may indicate a motion vector difference when MMVD is applied.
  • the encoder/decoder can determine whether MMVD is applied (or used). If the MMVD is applied, the encoder/decoder derives the merge candidate used for inter prediction of the current block from the merge candidate list, derives the MMVD and applies (or adds) the motion vector of the merge candidate to the motion vector of the current block. The vector can be determined.
  • the different MVDs may mean simplified MVDs, MVDs having different (or small) resolutions, MVDs with less available numbers, MVDs with different signaling methods, and the like.
  • the MVD used in the existing AMVP, affine inter mode, etc. described with reference to FIGS. 6 and 7 has x, y axes (ie, horizontal, vertical) for a specific signaling unit (eg, x-pel).
  • all regions for example, a region based on a picture (for example, a region including a picture region or a region including a picture and a surrounding region), can be represented at a uniform interval, whereas MMVD indicates a specific signaling unit.
  • the units expressed may be relatively limited.
  • the region (or unit) signaling the MMVD may not have a uniform interval.
  • the MMVD may indicate only a specific direction for a specific signaling unit.
  • MMVD may be determined based on distance and direction.
  • the distance and direction of the MMVD may be preset according to the distance index indicating the distance of the MMVD and the direction index indicating the direction of the MMVD.
  • the distance may indicate the MMVD size (eg, absolute value) of a specific pixel unit
  • the direction may indicate the direction of the MMVD.
  • the encoder/decoder can signal a relatively small distance with a relatively small index. That is, if signaling is not through fixed length binarization, the encoder/decoder may signal a relatively small distance with relatively few bits.
  • MMVD-related syntax elements may be signaled when the merge flag (ie, merge_flag) is 0 (ie, when the merge mode is not used).
  • MMVD may be a method of signaling MVD for a base candidate.
  • the MMVD mode may have similarities to modes such as AMVP signaling an MVD and affine AMVP (or affine inter). Accordingly, when the merge flag is 0, signaling may be performed.
  • step S802 when the MMVD is applied to the current block, that is, when the MMVD flag is 1, the MMVD-related syntax elements may be parsed.
  • the MMVD-related syntax element may include at least one of mmvd_merge_flag, mmvd_distance_idx, and mmvd_direction_idx.
  • mmvd_merge_flag indicates a flag (or syntax element) indicating a base candidate of MMVD
  • mmvd_distance_idx indicates an index (or syntax element) indicating a distance value of MVD
  • mmvd_direction_idx indicates an index (or syntax) indicating the direction of MVD. Element).
  • CuPredMode represents a variable (or value) indicating the prediction mode of the current block.
  • the prediction mode of the current block may be a value indicating whether the current block is intra predicted or inter predicted.
  • the prediction mode of the current block may be determined based on pred_mode_flag.
  • pred_mode_flag represents a syntax element indicating whether the current block is coded in inter prediction mode or intra prediction mode. If pred_mode_flag is 0, the prediction mode of the current block may be set to a value indicating that inter prediction is used.
  • the prediction mode value indicating that inter prediction is used may be MODE_INTER.
  • the prediction mode of the current block may be set to a value indicating that intra prediction is used.
  • the prediction mode value indicating that intra prediction is used may be MODE_INTRA.
  • CuPredMode may be set to a preset value. Also, as an example, the preset value may be MODE_INTRA.
  • cu_cbf may be a value indicating whether there is a syntax related to transformation.
  • the syntax associated with the transformation may be a transform tree syntax structure.
  • the syntax related to the transformation may be a syntax signaled through the transform tree (transform_tree) of FIG. 28.
  • cu_cbf when cu_cbf is 0, syntax related to conversion may not exist.
  • cu_cbf when cu_cbf is 1, syntax related to conversion may exist.
  • the decoder may call transform tree syntax. If cu_cbf does not exist, a cu_cbf value may be determined based on cu_skip_flag.
  • cu_skip_flag represents a syntax element indicating whether to use the skip mode.
  • a residual signal may not be used. That is, the skip mode may be a mode in which a prediction signal is restored without adding a residual. Therefore, when cu_skip_flag is 1, it may mean that there is no syntax related to transformation.
  • the decoder may parse cu_cbf when intra prediction is not used. Also, when cu_skip_flag is 0, cu_cbf may be parsed. In addition, the decoder may parse cu_cbf when the merge flag is 0. Also, these conditions can be applied in combination. For example, the decoder may parse cu_cbf when the prediction mode of the current block is not the intra prediction mode and the merge flag is 0. Alternatively, the decoder may parse cu_cbf when the prediction mode of the current block is the inter prediction mode and the merge flag is 0. This is because the skip mode may or may not be used for inter prediction other than the merge mode.
  • step S901 the decoder may determine whether to parse cu_cbf based on whether the MMVD is applied. That is, since whether to use the skip mode is determined according to whether MMVD is applied, whether to parse cu_cbf may be determined accordingly. If it is clear whether to use the skip mode, the decoder may not parse cu_cbf.
  • the encoder/decoder may not use the skip mode.
  • MMVD does not accurately represent MVD as AMVP, but can be expressed only in a limited range as described above, and thus can be more accurately restored using residuals. Therefore, by determining whether to parse cu_cbf based on whether MMVD is used, it is possible to increase prediction accuracy and increase compression efficiency. For example, when using MMVD, the decoder may not parse cu_cbf. If MMVD is not used, the decoder can parse cu_cbf. In step S901, the decoder may parse cu_cbf when the MMVD flag is 0, and may not parse cu_cbf when the MMVD flag is 1.
  • the decoder may infer the cu_cbf value.
  • the decoder may infer cu_cbf based on the value of cu_skip_flag.
  • a cu_cbf value may be inferred based on a merge flag. If the merge flag is 0, the decoder can infer cu_cbf to 1. As an example, when the merge mode is not used, it may indicate that there is syntax related to transformation. Therefore, when using MMVD in the embodiments of FIGS. 8 to 9, the decoder may infer cu_cbf to 1.
  • the decoder 1) infers cu_cbf to 0 when the merge flag is 1 and cu_skip_flag is 1, 2) infers cu_cbf to 1 when the merge flag is 1, and cu_skip_flag is 0, and 3) the merge flag When is 0, cu_cbf can be inferred as 1.
  • the decoder may infer cu_cbf to 0 when cu_skip_flag is 1, and 2) when cu_skip_flag is 0, cu_cbf to 1.
  • a cu_cbf value may be inferred based on the MMVD flag.
  • the MMVD flag is 1, cu_cbf can be inferred as 1.
  • cu_cbf can be inferred as 0 or 1.
  • cu_skip_flag is 0, cu_cbf can be inferred as 1.
  • the MMVD flag may not be present in the merge data (merge_data) syntax.
  • the merge data syntax may be the merge data syntax shown in FIGS. 8 and 9.
  • the merge mode may be signaled based on the syntax element as shown in FIG. 10.
  • the merge mode is signaled based on at least one of a regular flag, an MMVD flag, a subblock flag and/or a combined inter-picture merge and intra-picture prediction (CIIP) flag.
  • CIIP represents a prediction method combining inter prediction (eg, merge mode inter prediction) and intra prediction, and may be referred to as multi-hypothesis prediction.
  • FIGS. 10(a) and 10(b) may indicate a case corresponding to a merge mode other than skip and a merge mode that is skipped, respectively.
  • a regular flag may be present.
  • the regular flag may be a syntax element indicating that a conventional merge mode is used, and in the present invention, the regular flag may also be referred to as a regular merge flag.
  • the existing merge mode may be the same merge mode used in HEVC.
  • the conventional merge mode may be a merge mode that uses a candidate indicated by a merge index and performs motion compensation without using MVD.
  • the regular flag, MMVD flag, subblock flag, and CIIP flag may be signaled in a predetermined order.
  • the MMVD flag indicates a syntax element indicating whether MMVD is used.
  • the subblock flag indicates a syntax element indicating whether to use a subblock mode in which subblock-based prediction is performed.
  • the CIIP flag indicates a syntax element indicating whether CIIP mode is applied.
  • signaling 1 for indicating whether to use a corresponding mode among the regular flag, MMVD flag, subblock flag, and CIIP flags may be less than or equal to. Accordingly, when a value of 1 among the regular flag, MMVD flag, subblock flag, and CIIP flag occurs, the encoder/decoder may determine that the flags acquired later in decoding order are 0. In addition, when the regular flag, the MMVD flag, the subblock flag, and the CIIP flag are all 0, a mode not indicated by the regular flag, the MMVD flag, the subblock flag, and the CIIP flag may be used.
  • the mode not indicated by the regular flag, the MMVD flag, the subblock flag, and the CIIP flag may be triangle prediction. That is, as an embodiment, when the regular flag, the MMVD flag, the subblock flag, and the CIIP flag are all 0, it may be determined that the triangle prediction mode is applied.
  • FIG. 11 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • FIG. 11 illustrates a syntax structure in which the syntax elements described in FIG. 10 are used.
  • the regular merge flag indicates a regular merge flag.
  • the regular merge flag may be a regular flag described in FIG. 10 above.
  • the regular merge flag may be located at the front of the merge data syntax.
  • the decoder may parse the regular merge flag first in the merge data syntax. That is, the regular merge flag may be the first syntax element parsed after confirming that the merge flag is 1.
  • the decoder may parse the MMVD flag when the regular merge flag is 0.
  • the decoder may parse at least one of a subblock merge flag, a multi-homed flag, and/or a triangle merge flag when the normal merge flag is 0. In FIG.
  • merge_subblock_flag indicates a subblock merge flag indicating whether a subblock merge mode is applied
  • mh_intra_flag indicates a multiple hypothesis prediction flag indicating whether a multiple assumption prediction mode is applied
  • merge_triangle_flag indicates whether a triangle merge mode is applied. Indicates a triangle merge flag indicating whether or not.
  • the decoder may parse the MMVD flag when the current block satisfies a specific predefined block size condition.
  • the triangle merge flag may be defined as (!regular_merge_flag && !MMVD flag && !merge_subbock_flag && !mh_intra_flag). That is, when the normal merge flag, the MMVD flag, the subblock merge flag, and the multi-prediction prediction flag are all 0, the triangle merge flag is 1, and when any of the regular merge flag, the MMVD flag, the subblock merge flag, and mh_intra_flag is 1, the triangle The merge flag may be 0.
  • the decoder may first parse the regular merge flag and parse the merge index when the parsed regular merge flag is 1 (S1201). Also, the decoder can parse the merge index when MaxNumMergeCand is greater than 1. Here, MaxNumMergeCand is a variable indicating the maximum number of merge candidates. In addition, the decoder may parse at least one of an MMVD flag, a subblock merge flag, a multi-homed flag, and/or a triangle merge flag when the regular merge flag is 0.
  • the value of the triangle merge flag may be determined by the method described in FIGS. 10 and 11 above. That is, the triangle merge flag may be determined based on a flag value indicating whether to apply another mode. If the triangle merge flag is 1, syntax (or syntax elements) related to triangle prediction may be parsed. For example, when the triangle merge flag is 1, the decoder may parse the triangle merge index (ie, merge_triangle_idx).
  • the merge index required for the regular merge mode exists behind the merge data syntax, for example, an MMVD flag, a subblock merge flag, between the regular merge flag and the merge index. Since multiple assumption prediction flag signaling exists, signaling may be inefficient when using the normal merge mode. However, in the embodiment of FIG. 12, when the normal merge flag is 1, since the merge index can be parsed immediately after the regular merge flag, other signaling not related to the normal merge mode may not need to be parsed, and compression is performed accordingly. Efficiency can be improved.
  • whether a particular prediction mode is parsed may be determined based on the application conditions of the prediction mode. This will be described with reference to Table 2 below.
  • Mode A, Mode B, and Mode C exist as prediction modes.
  • Mode A only one prediction mode among Mode A, Mode B and Mode C is used for prediction.
  • conditions for using Mode A can be defined, and conditions for using Mode A can be A1, A2, and A3.
  • Mode A may be applied to the encoder/decoder.
  • the conditions for using Mode B may be B1, B2, and B3. In this embodiment, when all of B1, B2, and B3 are satisfied, Mode B may be applied to the encoder/decoder.
  • Mode C may be C1, C2, and C3, and when all of C1, C2, and C3 are satisfied, Mode C may be applied to the encoder/decoder.
  • Signaling (or syntax element) indicating whether to use any prediction mode X (Mode X) may be mode_X_flag.
  • the decoder may parse the related syntax to determine the prediction mode applied to the current block in the order of mode A, mode B, mode C.
  • the encoder may signal mode_A_flag, mode_B_flag, mode_C_flag in this order. If the condition for using Mode A is satisfied, the decoder can parse mode_A_flag. If mode_A_flag is 1, the decoder may parse the syntax related to mode A and not parse the flags and related syntax related to the remaining modes. If mode_A_flag is 0, there may be a possibility to use mode B or mode C. Therefore, the decoder can parse mode_B_flag when the condition for using mode B is satisfied.
  • mode_B_flag 1
  • mode_X_flag 1
  • mode_X_flag 1
  • whether a particular prediction mode is parsed may be determined based on the application conditions of the prediction mode. This will be described with reference to Table 3 below.
  • Mode A, Mode B, and Mode C may be defined, and syntax elements indicating whether to use the prediction mode (ie, mode_X_flag) and/or related A syntax element representing prediction mode information may be defined.
  • syntax elements indicating whether to use the prediction mode ie, mode_X_flag
  • a syntax element representing prediction mode information may be defined.
  • conditions for using any mode X, X1, X2, X3, and the like can be defined.
  • whether mode A, mode B, or mode C is sequentially applied, and if applied, syntax elements related to the corresponding prediction mode may be parsed.
  • the encoder/decoder may determine to use the specific prediction mode.
  • the decoder may not parse the flag indicating whether to apply the specific prediction mode (ie, mode_X_flag when the specific prediction mode is mode X).
  • whether the prediction mode is unavailable may be determined according to whether the conditions for using the aforementioned prediction mode are satisfied. For example, if both mode B and mode C, which are determined to be used in a relatively low priority, are unavailable, the decoder may not parse mode_A_flag, and may determine (or decide, infer) to use mode A have.
  • the mode can be determined using the proposed method. For example, assuming that mode A, mode B, mode C, and mode D are available, if all of mode B, mode C, and mode D cannot be used, the decoder switches mode A without additional signaling (or parsing). It can be judged to be used. In addition, after determining that mode A is not used, when both mode C and mode D are unavailable, the decoder may determine that mode B is used.
  • a condition in which any prediction mode X (that is, mode X) cannot be used may be a case in which any one of X1, X2, and X3 is not satisfied. That is, !X1
  • the decoder may parse mode_A_flag. At this time, the decoder may consider conditions for using mode A together. That is, the decoder satisfies !((!B1
  • the decoder may parse mode_A_flag.
  • the decoder may parse mode_A_flag.
  • the decoder may infer the mode_A_flag value to 0 when (B1 && B2 && B3) or (C1 && C2 && C3), and otherwise, to 1. That is, when both mode B and mode C are unavailable, if mode_A_flag does not exist, the decoder can infer the value to 1 (that is, by applying mode A).
  • mode A, mode B, and mode C are various predictions proposed by the present invention.
  • specific prediction modes may be defined.
  • mode A, mode B, and mode C may be defined as any one of a regular merge mode, a CIIP mode, and a triangle merge mode, respectively.
  • Tables 2 and 3 described above may be applied even when mode A, mode B, mode C, or mode D is defined, for example, mode A, mode B, mode C, mode D May be defined as any one of a regular merge mode, an MMVD mode, a CIIP mode, and a triangle merge mode.
  • FIG. 13 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention. According to an embodiment of the present invention, the method described in Table 2 and/or Table 3 may be applied to FIG. 13, and redundant descriptions thereof will be omitted. Also, FIG. 13 may be an embodiment related to the regular merge flag as described in FIGS. 10 and 11.
  • the decoder parses signaling indicating whether the specific mode is used. Rather, it may be determined (or determined, inferred) that the specific mode is used. For example, when all of the modes in which the determination of whether to use a sub-block merge mode is performed are relatively unavailable rather than the determination of whether to use the sub-block merge mode, signaling (or syntax element) indicating whether to use the sub-block merge mode is parsed. It may not be. In this case, the decoder may determine that the subblock merge mode is used without syntax parsing. For example, the modes in which the determination as to whether or not to use the relative subordinates is performed may include multiple assumption prediction and triangle prediction.
  • step S1301 if all of the modes in which the use of the MMVD are determined to be used later than the use of the MMVD are not available, the decoder does not parse the signaling indicating whether the MMVD is used, and uses the MMVD. You can judge that.
  • the modes in which the use is determined late may include a sub-block merge mode, multiple assumption prediction, and triangle prediction.
  • the sps_mh_intra_enabled_flag indicates a syntax element indicating whether multi-prediction prediction can be used in the current sequence, for example, the syntax element may be signaled through a sequence parameter set (SPS).
  • SPS sequence parameter set
  • cbWidth and cbHeight are variables representing the width and height of the current block (current coding block), respectively.
  • the sps_triangle_enabled_flag indicates a syntax element indicating whether triangle prediction can be used in the current sequence.
  • the syntax element may be signaled through SPS.
  • a condition in which a subblock merge can be used may include at least one of 1) MaxNumSubblockMergeCand> 0, 2) block size conditions.
  • MaxNumSubblockMergeCand is a variable indicating the maximum number of subblock merge candidates.
  • the decoder may not parse the subblock merge flag when (!mh_intra_conditions && !merge_triangle_conditions).
  • the decoder may infer the subblock merge flag to 1 if the subblock merge flag does not exist and (!mh_intra_conditions && !merge_triangle_conditions), otherwise to 0.
  • the decoder may not parse the MMVD flag when (!merge_subblock_conditions && !mh_intra_conditions && !merge_triangle_conditions). Also, if the MMVD flag does not exist (!merge_subblock_conditions && !mh_intra_conditions && !merge_triangle_conditions), the MMVD flag can be inferred as 1, otherwise it can be inferred as 0.
  • the decoder may not parse the subblock merge flag when (!sps_mh_intra_enabled_flag && !sps_triangle_enabled_flag), and infer the value to 1.
  • the decoder may not parse the subblock merge flag, and infer the value to 1.
  • the decoder may not parse the subblock merge flag, and infer the value to 1.
  • the merge mode may include a regular merge mode, MMVD, sub-block merge mode, CIIP mode, triangle merge mode (or triangle partitioning mode (TPM)).
  • a regular merge flag an MMVD flag, a subblock merge flag, a CIIP flag, and a triangle merge flag, which are signaling (or syntax elements) indicating whether each mode is used (or applied).
  • the prediction mode may include MODE_INTRA, MODE_IBC, and MODE_INTER.
  • MODE_INTRA and MODE_IBC may be prediction modes using the current picture including the current block.
  • MODE_INTRA may be the intra prediction described above.
  • MODE_IBC may be a prediction method using a motion vector or a block vector.
  • MODE_INTER may be a prediction method using another picture, or may be an inter prediction described above.
  • the decoder can use only the regular merge mode (S1401). Also, in this case, the regular merge flag may not be parsed. The decoder can infer the regular merge flag to 1.
  • whether to parse the syntax element may be determined based on a block size. For example, whether to parse the syntax element may be determined based on the block size. For example, when syntax elements are signaled in the order of the first mode, the second mode, the third mode, the fourth mode, and the fifth mode, a block size condition in which the third mode, the fourth mode, and the fifth mode can be used There may be the third condition, the fourth condition, and the fifth condition, respectively. If conditionA, which is a condition that does not satisfy all of the third condition, the fourth condition, and the fifth condition, is satisfied, the decoder infers that the syntax elements related to the third mode, the fourth mode, and the fifth mode are not parsed and not used.
  • the decoder may determine based on the first mode syntax element without parsing the syntax element related to the second mode. In this case, if it is determined and inferred that the first mode is not used, the decoder may determine and infer that the second mode is used. And based on this, it is possible to parse the syntax element necessary to use the second mode.
  • a block size condition in which a sub-block merge mode, a CIIP, and a triangle merge mode can be used may be used.
  • 4x4, 8x4, and 4x8 blocks may not be able to use the subblock merge mode, CIIP, and triangle merge mode. Therefore, in a 4x4, 8x4, or 4x8 block, when the merge flag is 1, the available modes may be only the regular merge mode and the MMVD. Therefore, in this case, the decoder may not parse the MMVD flag. Also, in this case, the decoder may determine or infer the MMVD flag value based on the regular merge flag.
  • the decoder may not perform inter prediction on 4x4 blocks. Therefore, in the following embodiments, descriptions can be made without including the conditions related to the 4x4 block, but the embodiments of the present invention can be applied even when 4x4 inter prediction is possible.
  • the decoder may not parse the MMVD flag, the subblock merge flag, and the multi-homed prediction flag (S1402, S1403, S1404). Also, although not shown in FIG. 14, even when cbWidth and cbHeight are 4 and 4, the MMVD flag, the subblock merge flag, and the multi-homed prediction flag may not be parsed. In this case, other MMVD, sub-block merge mode, CIIP, and triangle-related syntax elements may not be parsed.
  • cbWidth+cbHeight may be represented as cbWidth+cbHeight being 4, 8, or 8, 4, respectively. That is, if cbWidth+cbHeight is 12 or less than 12, the MMVD flag, the subblock merge flag, and mh_intra_flag may not be parsed. Also, the present invention can be applied when the prediction mode is MODE_INTER.
  • the high-level signaling may be signaling in a unit including the current block.
  • the upper level of the current block may be CTU, sequence, picture, slice, tile, tile group, and so on.
  • high level signaling (or syntax element) indicating whether MMVD is available may be SPS level signaling.
  • high-level signaling indicating whether MMVD is available may be sps_mmvd_enabled_flag.
  • the high-level signaling indicating whether MMVD can be used may indicate whether MMVD can be used.
  • the decoder may not parse the MMVD-related syntax element. Also, if the high-level signaling indicating whether the MMVD is available is 0, the decoder may infer the MMVD flag to 0. When the high-level signaling indicating whether the MMVD is available is 1, the MMVD flag may be 1 or 0 depending on a block.
  • the syntax elements related to the subblock merge mode may include a subblock merge flag and a subblock merge index.
  • the sub-block merge mode may include SbTMVP (sub-block-based temporal motion vector) and affine motion compensation mode.
  • the CIIP-related syntax element may include mh_intra_flag (CIIP flag) and an index indicating a candidate for the inter prediction portion of CIIP.
  • An index indicating a candidate for the inter prediction portion of CIIP may be a merge index.
  • CIIP may be a method of performing prediction based on a prediction signal generated from a reference picture different from a prediction signal generated from a current picture, and may be referred to as multi-assay prediction.
  • the syntax elements related to triangle merge mode may include merge_triangle_split_dir, merge_triangle_idx0, merge_triangle_idx1.
  • the triangle merge mode may be a prediction method (or prediction mode) in which the current block is divided into two parts and the two parts use different motion information.
  • the two parts may each have an arbitrary polygonal shape rather than a rectangle.
  • merge_triangle_split_dir may be a syntax element indicating how the two parts are divided.
  • merge_triangle_idx0 and merge_triangle_idx1 may be syntax elements indicating which motion information each of the two parts uses.
  • the MMVD flag may be not present.
  • the MMVD flag may not exist according to high-level signaling indicating whether MMVD can be used or a block size condition.
  • a method for inferring when the MMVD flag is not present may be indicated.
  • the decoder may infer the MMVD flag to 1. Also, if at least one of the specific conditions is not satisfied, the decoder may infer the MMVD flag to 0.
  • the specific condition may include a case in which high-level signaling (or syntax element) indicating whether MMVD is available is 1.
  • the high-level signaling may be included in any one of SPS, PPS, slice header, tile group header, and CTU.
  • the specific condition may include a block size condition. For example, it may include a case where the block size is 4x8 or 8x4 or 4x4. That is, cbWidth + cbHeight may include 12 or less than 12 cases. If 4x4 inter prediction is not allowed, the case of 4x4 may be excluded.
  • the specific condition may include a case where the regular merge flag is 0.
  • the specific condition may include a case where the merge flag is 1.
  • the encoder/decoder may infer the MMVD flag to 0.
  • the decoder when a normal merge flag does not exist, the decoder may infer its value according to a predefined condition.
  • the decoder may infer a regular merge flag based on the prediction mode of the current block.
  • the decoder can infer a regular merge flag based on the CuPredMode value.
  • the decoder may infer the normal merge flag to 1 when the CuPredMode value is MODE_IBC.
  • the decoder may infer the regular merge flag to 0 when the CuPredMode value is MODE_INTER.
  • the decoder may infer a regular merge flag value based on the merge flag. For example, if the merge flag is 1 and CuPredMode is MODE_IBC, the decoder may infer the normal merge flag value to 1. In addition, when the merge flag is 0, the normal merge flag value may be inferred as 0.
  • FIG. 15 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • the embodiment of FIG. 15 may be another embodiment related to the embodiments described with reference to FIGS. 10 to 13.
  • multiple modes may be defined as merge modes.
  • signaling which mode is used signaling indicating which mode is used or which mode is used based on the signaling order for multiple modes and the conditions in which multiple modes are available.
  • Reasoning methods and the like can be determined.
  • the decoder may determine whether to parse signaling indicating whether the first mode is used. Also, the decoder may infer a signaling value indicating whether to use the first mode based on high-level signaling indicating whether the second mode is available. At this time, the second mode may be a mode in which use is determined later than the first mode.
  • the decoder may determine whether to parse the regular merge flag based on high-level signaling indicating whether MMVD is available. In addition, the decoder may infer (or determine) a normal merge flag value based on high-level signaling indicating whether MMVD is available. Referring to FIG. 15, as an example, the decoder may parse a regular merge flag when sps_mmvd_enabled_flag is 1 (S1501).
  • a signaling value indicating whether to use a specific mode may be inferred based on the size of the current block. According to an embodiment, there may be a case where the specific mode is used even when signaling indicating whether a specific mode is used is not parsed based on the size of the current block. That is, the signaling value indicating whether to use the specific mode may be inferred as 1.
  • the decoder may determine whether to parse the regular merge flag based on the size of the current block. For example, whether the regular merge flag is parsed may be determined based on whether the size of the current block is greater than 4x8 and 8x4. If the block size is greater than 4x8 and 8x4, the sum of width and height may be greater than 12. Referring to FIG. 15, when the sum of cbWidth and cbHeight is greater than 12, a regular merge flag may be parsed (S1501 ). In addition, there may be a mode in which use is restricted in block sizes of 4x8 and 8x4 or less.
  • signaling indicating whether a specific mode is used may not be parsed.
  • signaling indicating whether to use a specific mode is 1.
  • Signaling indicating whether to use a specific mode is 1 may indicate that it is used.
  • the plurality of conditions may include conditions related to high-level signaling indicating whether a second mode different from the first mode can be used.
  • the plurality of conditions may include a condition in which high-level signaling indicating whether a second mode different from the first mode is available is 0.
  • the second mode may be a mode in which use is determined later than the first mode or a related syntax element is present behind.
  • the decoder may indicate whether to use a specific mode or not may be a regular merge flag.
  • the plurality of conditions may be a case where a high level signaling value indicating whether MMVD is available is 0.
  • the plurality of conditions may include conditions related to block size.
  • the plurality of conditions may include a condition in which the block size is below a threshold. In a condition in which the block size is less than or equal to a threshold, it may be determined whether to use it later than the specific mode, or one or more other modes in which a related syntax element is present may be unavailable.
  • the signaling indicating which mode is used may be a regular merge flag.
  • the plurality of conditions may include a case in which the sum of the width and height of the current block is 12 or less.
  • the plurality of conditions may include a case in which the size of the current block is 4x8 or 8x4.
  • the plurality of conditions may include a case in which the current block size is 4x8 or 8x4 or 4x4.
  • the regular merge flag when the high-level signaling value indicating whether MMVD is available is 0 and the current block size is 4x8 or 8x4, the regular merge flag may not be parsed. Also, in this case, the normal merge flag value can be inferred as 1. In addition, if the high-level signaling value indicating whether MMVD is available is 1 or the current block size is greater than 4x8 or 8x4, the regular merge flag may be parsed.
  • the decoder may be related to the use condition of the modes related to the syntax element existing after the regular merge flag. For example, when signaling in the order of normal merge mode, MMVD, sub-block merge mode, CIIP, triangle merge mode or when determining the mode, if the high level signaling indicating whether MMVD is available in the above-described embodiment is 0, the decoder uses MMVD. You may not. In addition, the decoder may not use the subblock merge mode, CIIP, or triangle merge mode when the block size is below a threshold. Therefore, if all of these conditions are satisfied, the decoder may determine that the normal merge mode is used without additional signaling. Additionally, this embodiment can be applied to the case of MODE_INTER.
  • the decoder may infer the value to 1. For example, if the high-level signaling value indicating whether MMVD is available is 0 and the block size is 4x8 or 8x4, the decoder may infer the normal merge flag value to 1. Also, this may be performed when the merge flag is 1. Also, this can be performed when CuPredMode is MODE_INTER. If the high-level signaling value indicating availability is 1 or the block size is greater than 4x8 or 8x4, the decoder may infer the normal merge flag value to 0.
  • the same motion information may be used for the entire current block.
  • the following motion information derivation process may be performed.
  • the decoder may set dmvrFlag to 1.
  • predFlagL0[ 0 ][ 0] and predFlagL1[ 0 ][ 0] are 1
  • the motion information derivation process may be performed on a 4x8 or 8x4 block. If 4x8 or 8x4 blocks are bi-prediction, the decoder may switch to uni-prediction.
  • the merge flag when the merge flag is 1 and the regular merge flag is 1, the same motion information can be used for the entire current block.
  • the merge flag is 1 and the MMVD flag is 1, the same motion information can be used for the entire current block.
  • the merge flag when the merge flag is 1 and the CIIP flag is 1, the same motion information can be used for the entire current block.
  • the merge flag when the merge flag is 0 and inter_affine_flag is 0, the same motion information can be used for the entire current block.
  • a motion information derivation process for such a case may be performed.
  • the decoder may set dmvrFlag to 1.
  • the conditions of the above-described embodiment may be applied.
  • the motion information derivation process may be performed on a 4x8 or 8x4 block. If 4x8 or 8x4 blocks are bi-prediction, the decoder may switch to uni-prediction.
  • the CIIP may be the last determined or signaled mode. For example, it may be determined in the order of regular merge mode, MMVD, subblock merge mode, triangle merge mode, and CIIP.
  • the decoder may determine the corresponding mode without signaling parsing whether to use the mode determined in the decoding order (or syntax parsing order). For example, in this case, the decoder may not parse the signaling of whether to use the mode immediately before CIIP.
  • it may be determined that the mode immediately preceding the above is used. For example, this case may include a case where cu_skip_flag is 1.
  • cbWidth is 128 or more, or cbHeight is 128 or more.
  • this case may include high-level signaling indicating whether CIIP is available, for example, sps_ciip_enabled_flag is 0.
  • FIGS. 16 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • the embodiments of FIGS. 16 to 19 may be applied to the embodiments described with reference to FIGS. 10 to 13 above, and redundant descriptions thereof will be omitted.
  • the CIIP may be the last determined or signaled mode. Therefore, the decoder can determine whether to use CIIP without parsing the CIIP flag. For example, if the modes signaled before CIIP are not used, it may be determined that CIIP is used. Also, the CIIP flag may be a value derived from other signaling (or syntax elements).
  • regular merge flags, MMVD flags, sub-block merge flags, and triangle merge flags may be present as signaling indicating whether to use the mode.
  • the regular merge flag, the MMVD flag, the subblock merge flag, and the triangle merge flag may be parsed. For example, when the merge flag value is 1, signaling indicating whether to use the mode may be parsed. Alternatively, when CuPredMode is MODE_INTER, signaling indicating whether to use the mode may be parsed. Also, when the merge flag value is 1, the decoder can parse the regular merge flag.
  • the decoder may parse the MMVD flag.
  • the decoder may parse the MMVD flag when the block size condition is satisfied. For example, if the block size is not 4x8, not 8x4, and not 4x4, the MMVD flag can be parsed.
  • the subblock merge flag can be parsed.
  • the MMVD flag value is 0, the subblock merge flag can be parsed.
  • a subblock merge flag can be parsed. For example, if the block size is 8x8 or more, the subblock merge flag can be parsed.
  • the subblock merge flag may be parsed. For example, when the maximum number of subblock merge candidates is greater than 0, it may represent that at least one of high level signaling on whether to use a candidate that can be included in the subblock merge candidate list can be used. For example, when sps_affine_enabled_flag or sps_sbtmvp_enabled_flag is 1, the maximum number of subblock merge candidates may be greater than 0.
  • the triangle merge flag may be parsed.
  • the MMVD flag value is 0, the triangle merge flag can be parsed.
  • the subblock merge flag value is 0, the triangle merge flag may be parsed.
  • the block size condition is satisfied, the triangle merge flag can be parsed.
  • the slice type is B, the triangle merge flag can be parsed. For example, when the slice type is B, it may mean that two or more motion information may be used when predicting one sample.
  • the decoder may parse the triangle merge flag.
  • the triangle merge flag may be parsed. For example, if the maximum number of triangle merge candidates is 2 or more, the decoder may parse the triangle merge flag.
  • the maximum number of triangle merge candidates may be the maximum number (or length) of candidate lists that can be used in the triangle merge mode.
  • the decoder can parse the signaling. That is, the signaling may not be parsed if any of the above-mentioned parsable conditions is not satisfied. It can also be inferred if the signaling is not parsed. For example, if one of the above-mentioned parsable conditions is not satisfied, the signaling value can be inferred as 0. If one of the parsable conditions mentioned as another example is not satisfied, the signaling value of whether to use the second mode is inferred to be 1 when the signaling to use the first mode is 0. If one of the parsable conditions mentioned as another example is not satisfied, when the first mode use signaling is 1, the second mode use signaling value may be inferred as 0.
  • the decoder may infer the value. For example, a value to be inferred may be determined based on a signaling value of whether one or more modes are used.
  • the mode usage signaling may include usage usage signaling for modes determined prior to CIIP usage.
  • the mode usage signaling may include regular merge mode usage signaling, MMVD usage signaling, subblock merge mode usage signaling, triangle merge mode usage signaling.
  • the signaling of whether to use the mode may include signaling whether to use the merge mode.
  • the decoder may infer the CIIP flag value to 1.
  • the decoder may infer the CIIP flag value to 1.
  • a mode use signaling value of 1 may indicate that the mode is used, and a mode use signaling value of 0 may indicate that the mode is not used.
  • FIG. 17 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • the embodiment of FIG. 17 may be an efficient signaling method based on the embodiment of FIG. 16, and redundant descriptions thereof will be omitted.
  • CIIP may be a mode that is determined or signaled last.
  • the signaling method described in FIGS. 10 to 13 may be used.
  • 17 to 19 may be specific embodiments of the method described with reference to FIGS. 10 to 13.
  • the decoder when mode use is determined or signaled in the order of mode A, mode B, mode C, and mode D, conditions in which mode D cannot be used may exist. If at least one of the conditions in which mode D cannot be used is satisfied, the decoder may not parse the signaling of whether mode C is used. In addition, if there is no signaling whether mode C is used, the decoder can infer the value. In this case, the inferred value may be based on a condition in which mode D cannot be used, signaling whether mode A is used, and signaling whether mode B is used. Also, when all of the conditions in which mode D cannot be used are not satisfied, signaling of whether to use mode C may be parsed.
  • the decoder may parse whether to use mode C signaling (or syntax element).
  • mode C signaling
  • only some of them may be used in the signaling method of the present invention, so it may be some of the above conditions. For example, when deciding whether to parse the signaling of whether to use mode C or not, only some conditions may be used to reduce condition checking.
  • mode D may be CIIP.
  • mode A, mode B, and mode C may be MMVD, sub-block merge mode, and triangle merge mode, respectively, and it is also possible to configure mode A, mode B, and mode C in a different order. 17 to 19 illustrate that the modes A, B, and C are MMVD, sub-block merge mode, and triangle merge mode, respectively.
  • a condition in which mode D cannot be used may be based on high-level signaling indicating whether mode D is available. Also, the condition in which mode D cannot be used may be based on the block size. Also, a condition in which the mode D cannot be used may be based on cu_skip_flag. Also, a condition in which the mode D cannot be used may be based on a tile group (or slice) type. Also, the condition in which mode D cannot be used may be based on the maximum number of candidates that can be used in mode D.
  • conditions in which CIIP cannot be used may include a case where sps_ciip_enabled_flag is 0, a cu_skip_flag is 1, a case where cbWidth is 128 or more, and a case where cbHeight is 128 or more. Therefore, according to an embodiment of the present invention, if sps_ciip_enabled_flag is 0, cu_skip_flag is 1, or cbWidth is 128 or more, or cbHeight is 128 or more, signaling of whether to use mode C may not be parsed. That is, in the embodiment of FIG.
  • a condition in which the mode C can be used may be additionally considered. For example, when the usable condition of mode C is satisfied, signaling (or syntax element) of whether to use mode C may be parsed.
  • signals or syntax element
  • the present embodiment may be a method for inferring whether to use the mode C signaling described in FIG. 17.
  • inferring whether to use the mode C signaling can be performed when there is no mode C whether the signaling exists.
  • signaling of whether to use mode C may not be parsed.
  • a signaling value of whether or not to use Mode C may be inferred to be 1.
  • a value of 1 may indicate whether to use or not, and a value of 0 may indicate not to use.
  • the plurality of conditions may include a condition that satisfies at least one of the conditions in which mode D cannot be used.
  • the plurality of conditions may include a condition in which mode C can be used.
  • the plurality of conditions may include conditions based on whether mode A and mode B are used.
  • the plurality of conditions may include a case indicating that both mode A and mode B signaling are not used.
  • the decoder may infer the signaling value of whether to use mode C to 0.
  • the decoder may infer a triangle merge flag value based on predefined conditions.
  • the decoder may infer the triangle merge flag value to 1 when sps_ciip_enabled_flag is 0, cu_skip_flag is 1, cbWidth is 128 or more, or cbHeight is 128 or more.
  • the decoder may infer the triangle merge flag value to 1 only when sps_ciip_enabled_flag is 0, cu_skip_flag is 1, cbWidth is 128 or more, or cbHeight is 128 or more.
  • the triangle merge flag value may be inferred to be 1 when all of the following conditions are satisfied.
  • the triangle merge flag value may be inferred as 1.
  • the triangle merge flag value when any one of the above conditions is not satisfied, the triangle merge flag value may be inferred as 0. For example, when sps_ciip_enabled_flag is 1, cu_skip_flag is 0, cbWidth ⁇ 128, and cbHeight ⁇ 128, the triangle merge flag value may be inferred as 0. Alternatively, when the regular merge flag is 1, the triangle merge flag value may be inferred as 0. Alternatively, when the MMVD flag is 1, the triangle merge flag value may be inferred as 0. Alternatively, when the subblock merge flag is 1, the triangle merge flag value may be inferred as 0.
  • the triangle merge flag value may be inferred as 0.
  • the triangle merge flag value may be inferred as 0.
  • FIG. 18 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • the embodiment of FIG. 18 may be a specific embodiment of the method described in FIG. 17.
  • the embodiment of FIG. 18 may be a method of not checking sps_ciip_enabled_flag in FIG. 17.
  • the decoder may not parse the triangle merge flag. Also, the decoder may infer the triangle merge flag value at this time. Alternatively, the decoder can infer the triangle merge flag value to 1 only when this condition is satisfied. Also, as described above, the decoder may infer 1 when satisfying additional conditions. Also, when cu_skip_flag is 0, cbWidth ⁇ 128, and cbHeight ⁇ 128, the decoder may parse the triangle merge flag. Also, when cu_skip_flag is 0, cbWidth ⁇ 128, and cbHeight ⁇ 128, if a triangle merge flag does not exist, the decoder may infer the value to 0.
  • This embodiment may have an advantage of reducing the condition checking operation in the syntax element parsing process compared to the embodiment of FIG. 17 described above.
  • the present invention can be applied to other signaling instead of the triangle merge flag.
  • FIG. 19 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • the embodiment of FIG. 19 may be a specific embodiment of the method described in FIG. 17. In the description of FIG. 17, it was mentioned that only some conditions are used to reduce condition checking when deciding whether to parse whether to use mode C signaling, and FIG. 19 can exemplify this.
  • the embodiment of FIG. 19 may be a method of not checking sps_ciip_enabled_flag in FIG. 17, and a method of not checking whether cbWidth is less than 128 and whether cbHeight is less than 128.
  • the decoder may not parse the triangle merge flag. Also, the decoder may infer the triangle merge flag value to 1 at this time. Alternatively, the decoder can infer the triangle merge flag value to 1 only when this condition is satisfied. Also, the decoder may infer 1 when satisfying additional conditions as described above. Also, when cu_skip_flag is 0, the triangle merge flag can be parsed. In addition, when cu_skip_flag is 0, the decoder may infer the value to 0 if the triangle merge flag does not exist.
  • This embodiment may have an advantage of reducing the condition checking operation in the syntax element parsing process compared to the embodiment of FIG. 17 described above.
  • the present invention can be applied to other signaling instead of the triangle merge flag.
  • FIG. 20 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • the embodiment of FIG. 20 may be a specific embodiment of the method described in FIG. 17.
  • 20 to 24 may be a specific embodiment of the invention described above.
  • the embodiments of FIGS. 20 to 24 may be related to the embodiments described with reference to FIGS. 10 to 13, and redundant descriptions are omitted.
  • signaling indicating whether MMVD is used may be mmvd_merge_flag. That is, in the above-described embodiment, the MMVD flag may be referred to as mmvd_merge_flag in the following description.
  • signaling indicating the base candidate of MMVD may be mmvd_cand_flag. That is, what was previously referred to as mmvd_merge_flag may be mmvd_cand_flag in FIG. 20 or less.
  • slice type can be applied to tile group type and vice versa.
  • slice type and tile group type values may be slice_type and tile_group_type, respectively.
  • the signaling indicating whether to use the merge mode described above may be general_merge_flag. That is, what was previously described as a merge flag may be for general_merge_flag, and what is described as general_merge_flag may be applied to a merge flag.
  • the last signal signaled among the various merge modes may be a subblock merge mode.
  • the various merge modes may include regular merge mode, MMVD, CIIP, triangle merge mode, subblock merge mode, and the like.
  • a signal that is signaled immediately before the subblock merge mode may be a triangle merge mode.
  • the encoder/decoder may signal/parse in the order of normal merge mode, MMVD, CIIP, triangle merge mode, and subblock merge mode in merge data syntax.
  • it may be determined whether to parse the regular merge flag based on general_merge_flag.
  • general_merge_flag may be referred to as a general merge flag.
  • general_merge_flag when general_merge_flag is 1, it may be possible to parse the regular merge flag. At this time, additional conditions for parsing may be necessary. Also, if the general_merge_flag is 0, it may not be possible to parse the regular merge flag. At this time, if general_merge_flag is 0, the regular merge flag may not be parsed regardless of other conditions.
  • general_merge_flag when general_merge_flag is 1, the merge_data structure portion of FIG. 20 may be parsed.
  • the decoder may determine whether to parse mmvd_merge_flag based on general_merge_flag.
  • general_merge_flag when general_merge_flag is 1, mmvd_merge_flag may be parsed. At this time, additional conditions for parsing may be necessary.
  • general_merge_flag when general_merge_flag is 0, it may not be possible to parse mmvd_merge_flag. At this time, if general_merge_flag is 0, it may not be possible to parse mmvd_merge_flag regardless of other conditions.
  • the CIIP flag it is possible to determine whether to parse the CIIP flag based on the general_merge_flag.
  • general_merge_flag 1
  • additional conditions for parsing may be necessary.
  • general_merge_flag 0
  • the CIIP flag may not be parsed regardless of other conditions.
  • whether to parse the triangle merge flag may be determined based on general_merge_flag.
  • general_merge_flag when general_merge_flag is 1, it may be possible to parse the triangle merge flag. At this time, additional conditions for parsing may be necessary.
  • general_merge_flag when general_merge_flag is 0, the triangle merge flag may not be parsed. At this time, if general_merge_flag is 0, the triangle merge flag may not be parsed regardless of other conditions.
  • the decoder may determine whether to parse mmvd_merge_flag based on the regular merge flag.
  • the regular merge flag when the regular merge flag is 0, it may be possible to parse mmvd_merge_flag. At this time, additional conditions for parsing may be necessary.
  • the regular merge flag when the regular merge flag is 1, mmvd_merge_flag may not be parsed. At this time, if the regular merge flag is 1, the mmvd_merge_flag may not be parsed regardless of other conditions.
  • the decoder may determine whether to parse the CIIP flag based on mmvd_merge_flag. According to an embodiment of the present invention, when mmvd_merge_flag is 0, it may be possible to parse the CIIP flag. At this time, additional conditions for parsing may be necessary. Also, when mmvd_merge_flag is 1, the CIIP flag may not be parsed. At this time, if mmvd_merge_flag is 1, the CIIP flag may not be parsed regardless of other conditions.
  • the present invention it is possible to determine whether to parse the triangle merge flag based on the CIIP flag. According to an embodiment of the present invention, when the CIIP flag is 0, it may be possible to parse the triangle merge flag. At this time, additional conditions for parsing may be necessary. Also, when the CIIP flag is 1, the triangle merge flag may not be parsed. At this time, if the CIIP flag is 1, the triangle merge flag may not be parsed regardless of other conditions.
  • the triangle merge flag when the triangle merge flag is 0, it may be possible to parse the subblock merge flag. At this time, additional conditions for parsing may be necessary.
  • the subblock merge flag when the triangle merge flag is 1, the subblock merge flag may not be parsed. In this case, if the triangle merge flag is 1, the subblock merge flag may not be parsed regardless of other conditions.
  • the last signal signaled among the various merge modes may be determined without parsing a value indicating whether to use it.
  • the subblock merge flag may be determined without parsing. For example, when all of the following conditions are satisfied, the subblock merge flag may be determined as 1.
  • the subblock merge flag may be determined as 0.
  • “2) when all modes signaled before the subblock merge mode among various merge modes are not used may be defined as the following conditions (or may include the following conditions).
  • condition that can use a sub-block merge mode may be the same as the following conditions (or may include the following conditions).
  • “3)” of the above conditions may be the same as the following conditions (or may include the following conditions).
  • the methods that may be included in the subblock merge mode may include affine motion compensation and subblock-based temporal motion vector prediction.
  • high-level signaling indicating whether affine motion compensation and a sub-block-based temporal motion vector predictor are available may be defined as sps_affine_enabled_flag and sps_sbtmvp_enabled_flag, respectively.
  • FIG. 21 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • the embodiment of FIG. 21 may add a more efficient signaling method to the embodiment of FIG. 20 described above.
  • the other mode does not explicitly signal whether to use or not Can decide. For example, the signaling indicating which mode is used may not be parsed.
  • the triangle merge mode when a condition in which a sub-block merge mode is usable is not satisfied in a syntax structure signaled as shown in FIG. 21, whether or not the triangle merge mode can be used without explicit signaling whether or not to use it? Can decide. For example, if the conditions for using the sub-block merge mode are not satisfied, the triangle merge flag may not be parsed.
  • the condition in which the sub-block merge mode can be used may be the same as the case in which the condition in which the sub-block merge mode in FIG. 20 can be used is satisfied (or may include the following condition).
  • the decoder may not parse the triangle merge flag when MaxNumSubblockMergeCand is 0.
  • MaxNumSubblockMergeCand is a variable indicating the maximum number of subblock merge candidates.
  • the decoder may not parse the triangle merge flag based on the block size.
  • the decoder may not parse the triangle merge flag when cbWidth is less than 8. That is, when cbWidth is 4 (or 4 or less), the decoder may not parse the triangle merge flag.
  • the c decoder may not parse the triangle merge flag when bHeight is less than 8. That is, when cbHeight is 4 (or 4 or less), the decoder may not parse the triangle merge flag.
  • the decoder may not parse the triangle merge flag.
  • the minimum values of cbWidth and cbHeight may be 4.
  • a minimum value of cbWidth and cbHeight may be 4 for a luminance block.
  • cbWidth and cbHeight may have an exponential form of 2.
  • cbWidth of 8 or more may mean that cbWdith is not 4.
  • the maximum values of cbWidth and cbHeight may be 128.
  • FIG. 21 is a diagram illustrating a signaling decision method indicating whether to use a mode according to an embodiment of the present invention.
  • the method described in the embodiment of FIG. 20 may be applied, and a redundant description is omitted.
  • the decoder may infer the value.
  • a value may be inferred when signaling of whether to use any of various merge modes does not exist.
  • the decoder satisfies a condition that can be used for 1) all modes that are signaled before any one of the various merge modes, and 2) all modes that are signaled later than any one of the various merge modes. 3) when the condition that any of the above modes can be used is satisfied, the value can be inferred as 1. Also, if it is not (ie, 1) or 2) or 3) is not satisfied, the decoder can infer the value to 0.
  • the condition "2)" that does not satisfy the condition that can be used for all modes may not satisfy at least one of the conditions that can be used for each mode.
  • a condition of using one of various merge modes may be added to the condition for inferring signaling of whether to use any mode. For example, 4) a case where general_merge_mode is 1 may be added.
  • the triangle merge flag can be inferred as 1. Also, if it does not satisfy the case (ie, 1) or 2) or 3) or 4), the decoder may infer the triangle merge flag to 0.
  • “2) among the various merge modes that do not satisfy the conditions available for all modes signaled later than the triangle merge mode” when the conditions for using the sub-block merge mode are not satisfied It may be, and may be the following condition. For example, it may include conditions for the block size.
  • “3) satisfying a condition in which a triangle merge mode can be used” may be the following condition.
  • some condition checking may not be included in order to reduce an operation required for condition checking.
  • the decoder may not use some of the conditions listed in a condition that does not satisfy a condition in which a subblock merge mode can be used or a condition in which a subblock merge mode can be used.
  • the conditions used in the parsing step and the inference condition may be the same corresponding conditions.
  • the decoder may not check the condition for MaxNumSubblockMergeCand.
  • the decoder may not check the condition that MaxNumSubblockMergeCand is 0 when inferring the value.
  • FIG. 22 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • the embodiment of FIG. 22 may be a specific embodiment in which the embodiments of FIGS. 16 to 19 and the embodiments of FIGS. 20 and 21 are performed together.
  • signaling overhead can be reduced.
  • it may be signaled in the order of mode A, mode B, mode C, mode D, mode E.
  • mode D or mode E when mode D or mode E is available, signaling indicating whether mode C is used may be parsed. If both Mode D and Mode E cannot be used, signaling indicating whether to use Mode C may not be parsed.
  • both mode D and mode E cannot be used, and both mode A and mode B are not used, it may be determined to use signaling indicating whether mode C is used.
  • various merge modes may be signaled in the order of regular merge, MMVD, triangle merge mode, sub-block merge mode, and CIIP.
  • the decoder may not parse signaling indicating whether to use the subblock merge mode.
  • the decoder can parse signaling indicating whether to use the subblock merge mode.
  • CIIP is not available, normal merge is not used, MMVD is not used, triangle merge mode is not used, and general_merge_flag is 1, the decoder may infer that it uses signaling indicating whether to use subblock merge mode. Can. Otherwise, it can be inferred that the decoder is not in use.
  • the conditions in which CIIP can be used are 1) conditions based on high-level signaling indicating whether CIIP is available, 2) conditions based on cu_skip_flag, and 3) one or more conditions based on block size (width or height). &&(and) condition.
  • signaling indicating whether to use the triangle merge mode may not be parsed.
  • signaling indicating whether to use the triangle merge mode may be parsed.
  • the normal merge is not used, the MMVD is not used, and general_merge_flag is 1, it can be inferred that signaling indicating whether to use the triangle merge mode is used. Otherwise, it can be inferred that it is not used.
  • the conditions that can use CIIP and when CIIP cannot be used refer to the previous description.
  • the overlap of the conditions in which the triangle merge mode can be used and the conditions in which the CIIP can be used can be omitted in the conditions in which the CIIP can be used.
  • the conditions in which the subblock mergeonjungko mode can be used may include 1) conditions based on MaxNumSubblockMergeonjungkoCand, 2) conditions based on block size, and &&(and) conditions.
  • the subblock merge mode cannot be used, it may be a NOT condition for a case where the subblock merge mode can be used.
  • FIG. 23 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • the embodiment of FIG. 23 may be another embodiment of FIG. 22.
  • it may be signaled in the order of mode A, mode B, mode C, mode D, mode E.
  • mode D or mode E when mode D or mode E is available, signaling indicating whether mode C is used may be parsed. If both mode D and mode E cannot be used, signaling indicating whether to use mode C may not be parsed.
  • both mode D and mode E cannot be used and both mode A and mode B are not used, it may be determined to use signaling indicating whether mode C is used.
  • various merge modes may be signaled in order of regular merge, MMVD, triangle merge mode, CIIP, and subblock merge mode.
  • signaling indicating whether to use CIIP may not be parsed.
  • signaling indicating whether CIIP is used may be parsed.
  • signaling indicating whether to use CIIP is used when sub-block merge mode cannot be used, normal merge is not used, MMVD is not used, triangle merge mode is not used, and general_merge_flag is 1 . Otherwise, it can be inferred that it is not used.
  • FIG. 21 This can be referred to the description of FIG. 21.
  • the description of FIG. 22 may be referred to for signaling indicating whether to use the triangle merge mode. have.
  • a condition regarding the use of the triangle merge mode may include the maximum number of triangle merge mode candidates.
  • a value indicating the maximum number of triangle merge mode candidates may be MaxNumTriangleMergeCand.
  • the decoder can parse the triangle merge flag when all of the following conditions are satisfied. If at least one of the following conditions is not satisfied, the triangle merge flag may not be parsed.
  • some of the above conditions may be omitted. This may be to reduce the operation required to check the condition.
  • the condition to be omitted may be at least one of 5), 6), 7), and 8).
  • the CIIP flag may be determined as follows.
  • the CIIP flag may be set to 1 when all of the following conditions are satisfied.
  • the CIIP flag may be set to 0.
  • the conditions h), i), and j) can be replaced with other block size conditions.
  • the triangle merge flag when the triangle merge flag does not exist, the triangle merge flag may be inferred according to the following process. If all the following conditions are satisfied, the triangle merge flag may be inferred as 1.
  • the triangle merge flag value can be inferred to be 0 in other cases.
  • (that is, OR) in the conditions corresponds to 5), 6), 7), 8) described in FIG. 63, among 5), 6), 7), 8)
  • something is omitted, it may also be omitted in the condition 4) of FIG. 64.
  • a condition in which a triangle merge mode can be used may include the maximum number of triangle merge mode candidates. Related descriptions are omitted.
  • At least one of various merge modes may be used for signaling whether or not to use.
  • the merge mode when using the merge mode (when the general_merge_flag is 1), at least one of the various merge modes may be indicated as using or not signaling.
  • the at least one mode may be a preset mode.
  • the at least one mode may be one mode.
  • the at least one mode may be a regular merge mode.
  • the merge mode when the merge mode is set to not use all signaling for various merge modes, it may be set to use whether to use the preset mode signaling. According to another embodiment, when the merge mode is used, whether or not signaling for various merge modes is set to not use all except for the preset mode, it is used to use the signaling for the preset mode. Can be set. This may be to prevent erroneous signaling and operation accordingly.
  • the regular merge flag may be set to 1 when all of the following conditions are satisfied.
  • some of the above conditions may be omitted.
  • 1) among the above conditions may be omitted.
  • the signaling is not parsed without using the specific mode whether the decoder is 1 Can be inferred.
  • the signaling is not parsed without using the specific mode whether the decoder is 1 Can be inferred.
  • signaling of whether to use the one specific mode may be parsed. In one embodiment, this may correspond to the case of using the merge mode. Also, any one of the above modes may be a regular merge mode.
  • the decoder may parse the regular merge flag. As an embodiment, this may correspond to the case of using the merge mode.
  • the regular merge flag may not be parsed, and the value may be inferred as 1. This may be the case when using the merge mode. At this time, some of the above conditions may be omitted in order to reduce the calculation amount.
  • the preset mode may be a regular merge mode.
  • the preset mode may be one of the two or more modes indicating that signaling is used.
  • there may be a preset method for determining one mode For example, it may be determined to be the most advanced mode among a predetermined order for various merge modes. For example, this embodiment may correspond to the case of using the merge mode.
  • merge_subblock_flag may be set to 0.
  • merge_subblock_flag may be set to 0.
  • ciip_flag and merge_subblock_flag may be set to 0
  • regular_merge_flag may be set to 1.
  • the merge_subblock_flag in front of the normal merge mode, MMVD, subblock merge mode, CIIP, and triangle merge mode, which is a predetermined order is set to 1, and the CIIP flag is set. Can be set to 1.
  • FIG. 25 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • the embodiment of FIG. 25 may be a specific embodiment of the invention previously described.
  • the methods described in the embodiments of FIGS. 10 to 13 may be applied, and redundant description is omitted.
  • a plurality of merge modes may include a normal merge mode, an MMVD, a subblock merge mode, a CIIP, and a triangle merge mode. Also, referring to FIG. 25, the plurality of merge modes may be signaled or not determined in order of normal merge mode, MMVD, sub-block merge mode, CIIP, and triangle 1 merge mode. In addition, referring to FIG.
  • signaling indicating whether to use the normal merge mode, MMVD, subblock merge mode, CIIP, and triangle merge mode may be regular_merge_flag, mmvd_merge_flag, merge_subblock_flag, ciip_flag, MergeTriangleFlag, respectively.
  • MergeTriangleFlag may have the same meaning as merge_triangle_flag described above.
  • the certain mode may not be performed.
  • a mode other than the above-described one mode may be performed.
  • the above mode may or may not be performed. At this time, there may be additional signaling to determine whether to perform the mode.
  • a condition that must be satisfied to be able to perform a mode may be based on high-level signaling indicating which mode is available.
  • the upper level may include sequence level, sequence parameter set (SPS) level, slice level, tile level, tile group level, brick level, CTU level, and the like. It may also include the sps_mode_enabled_flag described above. At this time, the mode may be replaced with some modes.
  • conditions that must be satisfied to be able to perform a certain mode may include conditions related to block size. For example, it may include conditions based on the width or height of the current block. For example, there may be an upper or lower limit of the width. Alternatively, an upper or lower limit of height may exist. Alternatively, an upper limit or a lower limit of area (width * height) may exist.
  • the current block may be a CU or PU.
  • the width and height of the current block may be cbWidth and cbHeight, respectively. In the present invention, width and height may be used interchangeably with cbWidth and cbHeight, respectively.
  • conditions that must be satisfied to be able to perform a certain mode may be based on a slice type or a tile group type.
  • Slice type and tile group type may have the same meaning.
  • a condition that must be satisfied in order to be able to perform a certain mode may be based on whether to use another mode.
  • Any of the other modes may include a skip mode.
  • whether to use the skip mode may be determined based on cu_skip_flag.
  • some other mode may include a mode that is signaled or determined in advance of any other mode. For example, it may be possible to perform any of the above modes when not using any of the above other modes.
  • conditions that must be satisfied to be able to perform a certain mode may be based on maximum number of candidates.
  • the candidates may be candidates related to the certain mode.
  • the candidates may be candidates used by the mode.
  • the maximum number of candidates can be represented by a parameter called MaxNumModeCand, and in MaxNumModeCand, the mode can be replaced with what mode it represents.
  • a MaxNumMergeCand value may exist for merge mode.
  • a MaxNumTriangleMergeCand value may exist for a triangle merge mode.
  • a MaxNumSubblockMergeCand value may exist for a subblock merge mode.
  • the maximum number of candidates may be based on high-level signaling indicating which mode is enabled.
  • MaxNumSubblockMergeCand may be based on sps_affine_enabled_flag or sps_sbtmvp_enabled_flag.
  • sps_sbtmvp_enalbed_flag may be high-level signaling indicating whether subblock based temporal motion (vector) prediction is available.
  • signaling indicating that the merge mode is used to be able to perform the normal merge mode may have to be true.
  • the signaling indicating the use of the merge mode may be merge_flag or general_merge_flag.
  • a condition to be satisfied in order to perform the normal merge mode may not exist unlike other modes. This may be because the regular merge mode may be the most basic mode. If the merge mode described above is used, additional conditions may not be required to use the normal merge mode.
  • the decoder may parse a regular merge flag (ie, regular_merge_flag).
  • the decoder can infer the value to 0 if the condition for inferring with 1 is not satisfied.
  • the width or height can be an exponential power of 2.
  • the width or height can be positive. Therefore, a width*height of 32 may be a width and a height of 4, 8, or 8, 4, respectively. Also, if the width*height is not 32, the width and height may not be 4 and 8, respectively, but 8 and 4, respectively. Also, a width*height not equal to 32 may indicate that the width and height are 8 or more. This may correspond to inter prediction, and may be, for example, because inter prediction may not be allowed for a 4x4 block.
  • a condition that must be satisfied in order to perform MMVD may be based on high level signaling indicating whether MMVD is available.
  • high level signaling indicating whether MMVD is available may be sps_mmvd_enabled_flag.
  • mmvd_merge_flag may be parsed.
  • mmvd_merge_flag may not be parsed, and the value may be inferred.
  • mmvd_merge_flag when sps_mmvd_enabled_flag is 1 and the block size condition is satisfied, mmvd_merge_flag may be parsed, and when sps_mmvd_enabled_flag is 0 or when the block size condition is not satisfied, mmvd_merge_flag may not be parsed. Also, if sps_mmvd_enabled_flag is 1 and the block size is not satisfied, mmvd_merge_flag may be inferred as 1.
  • the block size condition may be associated with a condition in which the modes signaled after the MMVD cannot be used.
  • the subblock merge mode may include affine motion prediction, subblock-based temporal motion vector prediction, and the like. Accordingly, it may be determined whether sub-block merge mode can be performed based on high-level signaling (eg, sps_affine_enabled_flag) indicating whether affine motion prediction is available.
  • a subblock merge mode it may be determined whether a subblock merge mode can be performed based on high level signaling (eg, sps_sbtmvp_enabled_flag) indicating whether subblock based temporal motion vector prediction is available.
  • high level signaling eg, sps_sbtmvp_enabled_flag
  • the maximum number of candidates for the subblock merge mode may be based on high level signaling indicating whether a mode belonging to the subblock merge mode is available.
  • a maximum number of candidates for a subblock merge mode is greater than 0 only when at least one of high level signaling indicating whether a mode belonging to a plurality of subblock merge modes is available is 1.
  • a subblock merge flag may be parsed. Also, if the third condition 2503 is not satisfied, the merge_subblock_flag may not be parsed, and the value may be inferred as 0.
  • CIIP there may be conditions that must be satisfied in order to perform CIIP. For example, it may be determined whether CIIP can be performed based on high-level signaling (eg, spsXBT_ciip_enabled_flag) indicating whether CIIP is available. Also, it may be determined whether CIIP can be performed based on whether the skip mode is used. For example, when using the skip mode, CIIP may not be performed. In addition, it may be determined whether CIIP can be performed based on the block size. For example, it may be determined whether CIIP can be performed based on whether the block size is greater than or equal to the lower limit and less than or equal to the upper limit.
  • high-level signaling eg, spsXBT_ciip_enabled_flag
  • the width*height is above the lower limit, the width is below the upper limit, and the height is below the upper limit.
  • the width*height is 64 or more, the width is less than 128, and the height is less than 128.
  • the CIIP flag can be parsed. Also, when the fourth condition 2504 is not satisfied, the CIIP flag may not be parsed, and the value may be inferred as 0.
  • a condition that must be satisfied in order to perform a triangle merge mode For example, it may be determined whether the triangle merge mode can be performed based on high-level signaling (eg, sps_triangle_enabled_flag) indicating whether the triangle merge mode is available. In addition, it may be determined whether the triangle merge mode can be performed based on the slice type. For example, when the slice type is B, it may be possible to perform a triangle merge mode. This may be because two or more motion information or two or more reference pictures are required to perform the triangle merge mode. In addition, it may be determined whether the triangle merge mode can be performed based on the maximum number of candidates for the triangle merge mode.
  • high-level signaling eg, sps_triangle_enabled_flag
  • the maximum number of candidates for triangle merge mode may be represented by a MaxNumTriangleMergeCand value. For example, when the maximum number of candidates for the triangle merge mode is 2 or more, it may be possible to perform the triangle merge mode. This may be because two or more motion information or two or more reference pictures are required to perform the triangle merge mode. In addition, according to an embodiment of the present invention, when the higher level signaling indicating whether the triangle merge mode is available is available, the maximum number of candidates for the triangle merge mode is always 2 or higher, and the higher level signaling indicating whether the triangle merge mode is available is used. If it is impossible, the maximum number of candidates for the triangle merge mode may always be less than 2 or 0.
  • the triangle merge mode it may be determined whether the triangle merge mode can be performed based on the maximum number of candidates for the triangle merge mode, not based on high-level signaling indicating whether the triangle merge mode is available. Accordingly, the operation for checking the condition can be reduced.
  • a triangle merge mode may be used.
  • the triangle merge mode may be used.
  • the fifth condition 2505 may be a case in which MergeTriangleFlag is 1.
  • MergeTriangleFlag may be 1 or 0. At this time, it may be determined whether it is 1 or 0 according to additional conditions.
  • 26 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention. 26 may be a specific embodiment of the signaling method described in FIGS. 12 to 13.
  • the present invention when it is possible to perform at least one of the modes that are signaled or determined later than a certain mode, it is possible to parse the signaling of whether to use the certain mode. In addition, if it is impossible to perform all of the modes that are signaled or determined later than a certain mode, it may not parse the signaling of whether to use the certain mode. In addition, if it is impossible to perform all of the modes that are signaled or determined later than a certain mode, it may be determined to use a signaling value for whether or not to use the certain mode.
  • whether or not a mode that is signaled or determined later than a certain mode can be performed may be based on whether or not a condition to be satisfied is satisfied in order to perform the mode described in FIG. 26. Or, it may or may not perform a mode that is signaled or determined later than a certain mode, depending on whether or not some of the conditions to be satisfied are satisfied in order to perform the mode described in FIG. 26. For example, some of the conditions that must be satisfied in order to be able to perform the mode can be omitted when determining signaling for another mode. This may be to reduce the operation of checking the condition, and for example, the condition that is often true can be omitted.
  • the upper level signaling indicating which mode is available must be true, and the slice type should be a specific value, but which mode is different from the above mode in order to determine signaling parsing.
  • signaling parsing may be determined whether the other mode is used, based on high-level signaling and not based on slice type. This may be because the slice type is often a specific value. Therefore, even if the slice type is not a specific value, if the high-level signaling indicating which mode is available is true, signaling of whether to use a mode different from the mode can be parsed.
  • mmvd_condition, subblock_merge_condition, ciip_condition, and triangle_merge_condition may be present.
  • mmvd_condition, subblock_merge_condition, ciip_condition, and triangle_merge_condition may be conditions that must be satisfied to perform MMVD, subblock merge mode, CIIP, and triangle merge mode described in FIG. 25, respectively.
  • mmvd_condition, subblock_merge_condition, ciip_condition, and triangle_merge_condition may be part of the conditions that must be satisfied to perform the MMVD, subblock merge mode, CIIP, and triangle merge mode described in FIG. 25, respectively.
  • mmvd_condition, subblock_merge_condition, and ciip_condition may be the second condition 2502, the third condition 2503, the fourth condition 2504, respectively, or a part thereof.
  • the overlapping condition can be excluded from mmvd_condition, subblock_merge_condition, ciip_condition, triangle_merge_condition, etc. of FIG. 26.
  • ciip_flag when the triangle_merge_condition is satisfied, ciip_flag may be parsed. Also, if the triangle_merge_condition is not satisfied, the ciip_flag may not be parsed. Also, if the triangle_merge_condition is not satisfied, ciip_flag can be inferred as 1.
  • merge_subblock_flag when ciip_condition is satisfied or triangle_merge_condition is satisfied, merge_subblock_flag may be parsed. Also, if the ciip_condition is not satisfied and the triangle_merge_coondition is not satisfied, the merge_subblock_flag may not be parsed. Also, if the ciip_condition is not satisfied and the triangle_merge_coondition is not satisfied, merge_subblock_flag can be inferred as 1.
  • mmvd_merge_flag when a subblock_merge_condition is satisfied, a ciip_condition is satisfied, or a triangle_merge_condition is satisfied, mmvd_merge_flag may be parsed. Also, if the subblock_merge_condition is not satisfied, the ciip_condition is not satisfied, and the triangle_merge_coondition is not satisfied, mmvd_merge_flag may not be parsed. Also, if subblock_merge_condition is not satisfied, ciip_condition is not satisfied, and triangle_merge_coondition is not satisfied, mmvd_merge_flag can be inferred as 1.
  • regular_merge_flag may be parsed when mmvd_condition is satisfied, subblock_merge_condition is satisfied, ciip_condition is satisfied, or triangle_merge_condition is satisfied.
  • regular_merge_flag may not be parsed if mmvd_condition is not satisfied, subblock_merge_condition is not satisfied, ciip_condition is not satisfied, and triangle_merge_coondition is not satisfied.
  • regular_merge_flag can be inferred as 1.
  • this condition may not exist for the normal merge mode
  • all modes that are signaled or determined before the normal merge mode are not used.
  • this condition may not exist for the regular merge mode
  • the regular_merge_flag described in FIG. 25 may be inferred as 1. In other cases, it can be inferred as 0 if regular_merge_flag does not exist.
  • the signaling method can be used only for a part of the plurality of modes. That is, at least one of the first condition 2501, the second condition 2502, the third condition 2503, and the fourth condition 2504 of FIG. 25 may be used, and the method of FIG. 26 may be used for the rest. That is, the first condition 2501 of FIG. 25, the second condition 2602 of FIG. 26, the third condition 2603 of FIG. 26, and the fourth condition 2604 can be used.
  • 27 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention.
  • 27 may be a specific embodiment of the signaling method described in FIGS. 12, 13, and 26.
  • it may be possible to parse ciip_flag only when the condition that can perform CIIP is satisfied.
  • cipher_flag is set to 1 when the merge mode is used, the conditions for performing CIIP are satisfied, and all the modes signaled or determined before CIIP are not used. Can deduce.
  • merge_subblock_flag may be parsed. At this time, it may be possible to parse the merge_subblock_flag only when the condition for performing the subblock merge mode is satisfied.
  • merge_subblock_flag may not be parsed.
  • merge_subblock_flag can be inferred as 1.
  • merge_subblock_flag may be inferred to 1 when a merge mode is used, a condition capable of performing a subblock merge mode is satisfied, and all of the modes signaled or determined before the subblock merge mode are not used.
  • mmvd_merge_flag may be inferred to 1 when a merge mode is used, a condition capable of performing MMVD is satisfied, and all modes that are signaled or determined before MMVD are not used.
  • the low-complexity encoder may not use various merge tools, and for such an encoder, if it does not satisfy (sps_triangle_enabled_flag
  • the value can be inferred as 1.
  • regular_merge_flag is inferred as 1.
  • regular_merge_flag can be inferred as 1.
  • the width and height may not be 4 and 8, respectively, or the width and height may not be 8 and 4, respectively. Therefore, it may not be necessary to check whether width*height is 32 in the first condition 2701 and the second condition 2702.
  • (MaxNumSubblockMergeCand> 0 && width> 0 && 8 && height > 8) Can be used with sps_mmvd_enabled_flag) only.
  • regular_merge_flag can be inferred as 1. Also, in other cases, regular_merge_flag can be inferred as 0.
  • the signaling method may be used only for some of the multiple modes in FIG. That is, some of the first condition 2501, the second condition 2502, the third condition 2503, and the fourth condition 2504 of FIG. 25 may be used, and the method of FIG. 27 may be used for the rest. That is, the first condition 2501 in FIG. 25, the second condition 2702 in FIG. 27, the third condition 2703, and the fourth condition 2704 can be used.
  • 28 is a diagram illustrating a merge data syntax structure according to an embodiment of the present invention. 28 may be a specific embodiment of the signaling method described in FIGS. 12, 13, and 26. In addition, the embodiment of FIG. 28 may exclude duplicate conditions from the embodiment described in FIG. 27.
  • the signaling method may be used only for a part of a plurality of modes in FIG. That is, some of the first condition 2501, the second condition 2502, the third condition 2503, and the fourth condition 2504 of FIG. 25 may be used, and the method of FIG. 28 may be used for the rest. That is, the first condition 2501 in FIG. 25, the second condition 2802 in FIG. 28, the third condition 2803, and the fourth condition 2804 can be used.
  • the first to fourth conditions in FIGS. 25 to 28 may be used in combination. That is, the first condition 2701 of FIG. 27, the second condition 2802 of FIG. 28, the third condition 2801 of FIG. 28, and the fourth condition 2801 of FIG. 28 may be used.
  • 29 is a diagram illustrating a merge mode signaling method according to an embodiment of the present invention.
  • a sequential signaling method was described.
  • a sequential signaling method as shown in FIG. 25 can be used.
  • 29(a) shows such a sequential signaling method.
  • a bold one indicates a determined mode
  • a tilt indicates a signaling.
  • This signaling can be a flag and can have a value of 0 or 1.
  • regular_merge_flag may be signaled in FIG. 29(a) and it may be determined whether the regular merge mode is based on the regular_merge_flag value. If regular_merge_flag indicates that it is not a regular merge mode, mmvd_merge_flag may be signaled and it may be determined whether the MMVD is based on mmvd_merge_flag. If it is not MMVD, merge_subblock_flag may be signaled and it may be determined whether the subblock merge mode is based on merge_subblock_flag.
  • ciip_flag may be signaled and it may be determined whether the CIIP is based on ciip_flag. In addition, it may be determined whether the TPM (triangle merge mode, triangular partitioning mode) is based on ciip_flag.
  • 29(a) shows an embodiment signaled in the order of normal merge mode, MMVD, sub-block merge mode, CIIP, and triangle merge mode, but the present invention is not limited thereto and may be configured in other orders. In the previous drawings, embodiments configured in a different order are also shown.
  • the grouping method may be used as another merge mode signaling method.
  • 29(b) shows an embodiment of the grouping method.
  • group_1_flag may be signaled, and it may be determined whether the mode selected based on group_1_flag belongs to group1 or not. If group_1_flag indicates that it is not group 1, group_2_flag may be signaled. In addition, it may be determined whether or not the mode selected based on group_2_flag belongs to group 2. This operation can be performed even when a large number of groups exist. Also, there may be signaling indicating which mode is indicated in the group. It is possible to reduce the depth of signaling compared to sequential signaling by the grouping method. It is also possible to reduce the maximum length of signaling (maximum length of codeword).
  • merge_subblock_flag is signaled, and it may be determined whether or not the subblock merge mode is based on merge_subblock_flag. If it is not a subblock merge mode, regular_merge_flag may be signaled. Based on regular_merge_flag, it can be determined whether it is group 2 (regular merge mode or MMVD) or group 3 (CIIP or triangle merge mode). In addition, when indicating that it is group 2, it may be determined whether it is a normal merge mode or an MMVD based on mmvd_merge_flag. In addition, when indicating that the group 3, based on ciip_flag, it can be determined whether the CIIP or triangle merge mode. That is, merge_subblock_flag, regular_merge_flag, mmvd_merge_flag, and ciip_flag in FIGS. 29(a) and 29(b) may have different meanings.
  • FIG. 30 is a diagram illustrating merge data syntax according to an embodiment of the present invention.
  • the embodiment of FIG. 30 may be using the grouping method described in FIG. 29(b).
  • a description overlapping with the above-described contents may be omitted.
  • merge_subblock_flag when using the merge mode, merge_subblock_flag may be signaled.
  • the merge mode when used, it may be the same as described above, and may be the case where general_merge_flag is 1.
  • the present invention may correspond to a case where CuPredMode is not MODE_IBC or when CuPredMode is MODE_INTER.
  • it may be determined whether to parse merge_subblock_flag based on MaxNumSubblockMergeCand, block size, and this may be based on a condition in which the subblock merge mode described above can be used. If merge_subblock_flag is 1, it may be determined to use a subblock merge mode, and additionally, a candidate index may be determined based on merge_subblock_idx.
  • regular_merge_flag can be parsed.
  • a condition for parsing regular_merge_flag may exist. For example, it may include conditions based on block size. Also, it may include a condition based on high-level signaling indicating whether a mode is available. The high-level signaling indicating whether the mode can be used may include sps_ciip_enabled_flag and sps_triangle_enabled_flag. It may also include conditions based on slice type. It may also include conditions based on cu_skip_flag. Referring to FIG.
  • regular_merge_flag may be parsed. Also, if both the conditions for using the CIIP and the conditions for using the triangle merge mode are not satisfied, regular_merge_flag may not be parsed.
  • the value can be inferred as 1. For example, it can always be inferred as 1. This may be using regular merge mode or MMVD when regular_merge_flag is 1 in the present invention. Therefore, if the block size condition that can use the CIIP and the block size condition that can use the triangle merge mode are not satisfied, the available modes may be the normal merge mode and the MMVD, and the regular_merge_flag is parsed to 1 without parsing. You can decide. In the embodiment shown in FIG. 71, the block size condition for using the CIIP and the triangle merge mode is the same. That is, CIIP and triangle merge modes may not be used for a block having a width or height of 128.
  • the possible mode may be the regular merge mode or MMVD, as described above, so that the regular_merge_flag can be inferred as 1 without parsing. will be.
  • syntax elements may be parsed based on the sps_mmvd_enabled_flag value.
  • sps_mmvd_enabled_flag may be high level signaling indicating whether MMVD is available as described above. If sps_mmvd_enabled_flag is 0, MMVD may not be used. Referring to FIG. 71, if sps_mmvd_enabled_flag is 0, mmvd_merge_flag, mmvd_cand_flag, mmvd_distance_idx, mmvd_direction_idx, merge_idx may not be parsed.
  • the value can be inferred as 0.
  • merge_idx does not exist
  • the value can be inferred according to a preset method. For example, if merge_idx does not exist, mmvd_merge_flag can be inferred as mmvd_cand_flag when 1, and 0 can be inferred when mmvd_merge_flag is 0. Therefore, in the embodiment of FIG. 30, when sps_mmvd_enabled_flag is 0, if regular_merge_flag is 1, the merge_idx value may always be 0, and normal merge mode prediction may be performed using the candidate of index 0 of the merge candidate list.
  • ciip_flag when regular_merge_flag is 0, when both the conditions for using the CIIP and the conditions for using the triangle merge mode are satisfied, ciip_flag can be parsed. If ciip_flag is 1, CIIP may be used, and if ciip_flag is 0, triangle merge mode may be used. If the conditions for using the CIIP or the conditions for using the triangle merge mode are not satisfied, the ciip_flag may not be parsed. If ciip_flag does not exist, if regular_merge_flag is 1, ciip_flag can be inferred as 0.
  • MergeTriangleFlag can be set to !ciip_flag for B slice.
  • MergeTriangleFlag can be set to 0 for P slice.
  • FIG. 31 is a diagram illustrating merge data syntax according to an embodiment of the present invention.
  • the duplicated content described above may be omitted.
  • the high-level signaling indicating whether regular_merge_flag is 1 and MMVD can be used indicates that MMVD cannot be used, the degree of freedom of candidate selection has been described. In the embodiment of FIG. 31, this can be solved. .
  • whether to parse merge_idx may be independent of sps_mmvd_enabled_flag. That is, whether to parse merge_idx can be determined regardless of the value of sps_mmvd_enabled_flag.
  • merge_idx may be parsed.
  • regular_merge_flag 1, if mmvd_merge_flag is 1, merge_idx may not be parsed.
  • merge_idx may not be parsed. For example, if sps_mmvd_enabled_flag is 1, regular_merge_flag is 1, mmvd_merge_flag is 0, and if MaxNumMergeCand> 1, merge_idx can be parsed. Also, if sps_mmvd_enabled_flag is 0, regular_merge_flag is 1, mmvd_merge_flag is 0, and MaxNumMergeCand> 1, then merge_idx can be parsed.
  • the prediction of the triangle merge mode may help improve coding efficiency.
  • the triangle merge mode may be used even when the width or height is 128.
  • a condition based on a block size may be required. For example, if width ⁇ 128 and height ⁇ 128, the decoder may parse ciip_flag. If the width is 128 (or more than 128) or the height is 128 (or more than 128), the ciip_flag may not be parsed. This may be because if the width or height is 128 (or more than 128), one of CIIP and triangle merge mode is not available, but the other can be used. This may be because CIIP is not available when the width or height is 128 (or more than 128), but triangle merge mode may be used. In the embodiment of FIG. 30, when the width or height is 128 (or 128 or more), both the CIIP and the triangle merge mode cannot be used, and accordingly, there is a difference from FIG. 31 because the regular_merge_flag was inferred as 1 without parsing.
  • regular_merge_flag may infer its value based on merge_subblock_flag.
  • regular_merge_flag, merge_subblock_flag, and ciip_flag may be regular_merge_flag, merge_subblock_flag, ciip_flag described in FIGS. 29(b), 30, and 31.
  • regular_merge_flag when regular_merge_flag does not exist, the value is always inferred as 1, but there may be a case where merge_subblock_flag signaled before regular_merge_flag is 1.
  • prediction is performed based on merge_subblock_flag or regular_merge_flag. Since both values are 1, ambiguity may occur as to which prediction to perform. Therefore, in this embodiment, regular_merge_flag can be inferred based on merge_subblock_flag. For example, if merge_subblock_flag is 1, regular_merge_flag can be inferred as 0. Also, if merge_subblock_flag is 0, regular_merge_flag can be inferred as 1. Or, a general_merge_flag condition may be added to this. For example, if merge_subblock_flag is 0 and general_merge_flag is 1, regular_merge_flag can be inferred as 1.
  • FIG. 30 shows a method for inferring a value when ciip_flag does not exist.
  • a block in which a mode cannot be used is provided when the ciip_flag inference method described in FIG. 30 is used.
  • Signaling is to use any of the above modes in size. That is, for example, when the width or height is 128, it is impossible to use CIIP, but ciip_flag may be set to 1. This embodiment can solve this problem.
  • the value can be inferred based on the block size.
  • the value can be inferred based on regular_merge_flag. For example, if regular_merge_flag is 1, ciip_flag can be inferred as 0. Also, if regular_merge_flag is 0, ciip_flag can be inferred based on the block size.
  • ciip_flag may be inferred based on the block size, sps_ciip_enabled_flag, and cu_skip_flag.
  • the geometric merge mode may be referred to by various names such as a geometric partitioning mode, a GEO mode, a GEO merge mode, and a GEO partitioning.
  • the geometric merge mode may be a method of dividing a coding unit (CU) or coding block (CB). For example, it may be a method of dividing a square or rectangular CU or CB into partitions that are not square or rectangular. Referring to Fig. 32, an example of geometric division is shown. As illustrated in FIG.
  • a rectangular CU may be divided into a triangular and a trapezoidal partition (or polygon) by geometric division.
  • signaling for a method for performing a geometric merge mode may be signaled for a CU.
  • motion compensation and prediction may be performed based on two pieces of motion information.
  • two motion information can be obtained from the merge candidate.
  • two indexes may be signaled to indicate two pieces of motion information used in the geometric merge mode.
  • two merge candidate indexes may be signaled to indicate two pieces of motion information used in the geometric merge mode.
  • two predictors can be blended in the geometric merge mode.
  • two predictors may be blended near the inner boundary in the CU in the geometric merge mode. Blending two predictors can mean that the two predictors are weighed sums.
  • syntax elements for indicating two pieces of motion information used in the geometric merge mode may be merge_triangle_idx0 and merge_triangle_idx1.
  • two index m, n can be derive from the syntax element. For example, it can be derived as the following equation.
  • index m may be equal to merge_triangle_idx0.
  • index n may be merge_triangle_idx1 + 1 when merge_triangle_idx1 is greater than or equal to merge_triangle_idx0, and merge_triangle_idx1 when merge_triangle_idx1 is less than merge_triangle_idx0.
  • the split boundary of the geometric merge mode may be represented by angle phi and distance offset rho.
  • Angle phi may represent a quantized angle
  • distance offset rho may represent a quantized offset.
  • Angle and distance offset can be signaled by merge_geo_idx. For example, it can be defined by a look-up table.
  • the geometric merge mode can generate a prediction signal from two predictors based on two motion information. At this time, when two predictors are weighted sum, the weight may be based on the angle and the distance offset. Or when weighted sum two predictors, the weight can be based on the position (coordinates) in the block. Or, when two predictors are weighted sum, the weight can be based on block width and height.
  • the geometric merge mode there are more possible split types than the TPM. For example, there may be more than two split types available in the geometric merge mode. For example, 80 split types may be possible.
  • the geometric merge mode can be a kind of merge mode. That is, it is possible that the general_merge_flag value is 1 when in the geometric merge mode.
  • 33 is a view showing merge data syntax according to an embodiment of the present invention.
  • a plurality of merge modes may include a sub-block merge mode, a regular merge mode, an MMVD, CIIP, and a geometric merge mode.
  • many merge modes may not include a triangle partitioning mode.
  • the triangle partitioning mode may be a form included in the geometric merge mode.
  • codewords of different lengths may be used, and coding efficiency may be improved by using a codeword of a short length in a specific mode.
  • coding efficiency can be improved by eliminating redundant signaling by the signaling method of the present embodiment.
  • parsing complexity may be lowered by omitting unnecessary condition checking in the signaling of the present embodiment.
  • CIIP_conditions there may be a condition that can use CIIP.
  • the conditions that can use the CIIP can be called CIIP_conditions.
  • CIIP_conditions may be true when all of the following conditions are satisfied.
  • CIIP_conditions may be false when at least one of the above conditions is not satisfied.
  • the above conditions can be omitted because they were described in the previous embodiment.
  • GEO_conditions may be true when all of the following conditions are satisfied.
  • GEO_conditions may be false when at least one of the above conditions is not satisfied.
  • the slice_type condition may not be required. This may be because other conditions, for example, conditions based on MaxNumTriangleMergeCand are satisfied, conditions based on slice_type are satisfied.
  • GEO_conditions may be false when at least one of the above conditions is not satisfied.
  • sps_triangle_enabled_flag and MaxNumTriangleMergeCand were previously described as values for the TPM. In the present embodiment, this may be a value for the geometric merge mode. That is, sps_triangle_enabled_flag may be high-level signaling indicating whether a geometric merge mode is available. Also, MaxNumTriangleMergeCand may be the maximum number of candidate lists used in the geometric merge mode.
  • Condition 2 represents (CIIP_conditionsGEO_conditions). That is, if at least one of the following conditions is satisfied, regular_merge_flag can be parsed.
  • regular_merge_flag may not be parsed. Also, if regular_merge_flag does not exist, the value can be inferred as general_merge_flag && !merge_subblock_flag.
  • condition 2 may include the slice_type condition as follows.
  • the slice type condition may not be additionally checked to reduce the complexity of checking the parsing condition.
  • ciip_flag when both CIIP_conditions and GEO_conditions are satisfied, ciip_flag may be parsed. Also, if the CIIP_conditions or GEO_conditions are not satisfied, the ciip_flag may not be parsed. That is, ciip_flag may be parsed when all of the following conditions are satisfied, and ciip_flag may not be parsed if at least one of the following conditions is not satisfied.
  • condition 2 condition 2
  • the conditions may be as follows.
  • conditions for parsing ciip_flag may be changed to reduce parsing complexity. For example, some of the block size conditions can be omitted.
  • a part of the block size condition for using the CIIP may be satisfied. Therefore, referring to Condition 3 of FIG. 75, according to an embodiment of the present invention, if all of the following conditions are satisfied, ciip_flag may be parsed, and if at least one of the following conditions is not satisfied, ciip_flag may not be parsed.
  • ciip_flag if ciip_flag does not exist, it can be inferred as 1 when all of the following conditions are satisfied, and as 0 when at least one of the following conditions is not satisfied.
  • the conditions for parsing and the conditions for inferring may be different.
  • conditions that are omitted when parsing may be included in the condition when inferring.
  • the merge_geo_flag a value indicating whether to use the geometric merge mode, may be determined as 1 when all of the following conditions are satisfied, and 0 when at least one of the following conditions is not satisfied.
  • merge_subblock_flag When the first condition 3301 is satisfied, merge_subblock_flag may be parsed. If merge_subblock_flag is 1, a subblock merge mode may be used, and merge_subblock_idx may be parsed, and regular_merge_flag, mmvd_merge_flag, and ciip_flag may not be parsed. If merge_subblock_flag is 0, if the second condition 3302 is satisfied, regular_merge_flag may be parsed. If regular_merge_flag is 1, it may be using regular merge mode or MMVD, and additionally, it may be possible to parse mmvd_merge_flag.
  • ciip_flag may be parsed. If ciip_flag is 1, CIIP may be used. When using CIIP, if MaxNumMergeCand is greater than 1, merge_idx can be parsed. If ciip_flag is 0, merge_geo_flag may be determined as 1. Also, if ciip_flag is 0, it may be that a geometric merge mode is used. When using the geometric merge mode, merge_geo_idx, merge_triangle_idx0, and merge_triangle_idx1 can be parsed. Alternatively, when using the geometry merge mode, if MaxNumTriangleMergeCand is greater than 1, merge_geo_idx, merge_triangle_idx0, and merge_triangle_idx1 may be parsed.
  • signaling when a block having a width or height of 4, that is, a 4xN, Nx4 size block uses CIIP, signaling may be performed as follows.
  • the merge_subblock_flag may be 0, the regular_merge_flag may be parsed because it satisfies the second condition 3302, and its value may be 0, and the ciip_flag may not be parsed because it does not satisfy the third condition 3303. Depending on the content, the value can be inferred as 1.
  • signaling when using the geometric merge mode, signaling may be as follows.
  • merge_subblock_flag may be 0, regular_merge_flag may be 0, and ciip_flag may be 0.
  • a syntax element indicating whether to use the geometric merge mode may not exist separately from ciip_flag.
  • the geometric merge mode cannot be performed on a block having a width or height smaller than 8, but the present invention is not limited thereto, and the geometric merge mode has a different block size (eg For example, the embodiment can be applied even when it is not possible to use for a block size smaller than the threshold).
  • FIG. 34 is a diagram illustrating a video signal processing method according to an embodiment to which the present invention is applied.
  • a decoder is mainly described, but the present invention is not limited thereto, and the multi-prediction prediction-based video signal processing method according to the present embodiment can be applied to the encoder in substantially the same way.
  • the decoder parses a first syntax element indicating whether a merge mode is applied to the current block (S3401).
  • the decoder determines whether to parse the second syntax element based on a first predefined condition (S3402).
  • the second syntax element may indicate whether a first mode or a second mode is applied to the current block.
  • the decoder determines whether to parse the third syntax element based on a predefined second condition (S3403).
  • the third syntax element may indicate a mode applied to the current block among a third mode or a fourth mode.
  • the decoder determines a mode applied to the current block based on the second syntax element or the third syntax element (S3404).
  • the decoder derives motion information of the current block based on the determined mode (S3405).
  • the decoder generates a prediction block of the current block using the motion information of the current block (S3406).
  • the first condition includes at least one of a condition in which the third mode can be used and a condition in which the fourth mode can be used, the video signal processing method.
  • the third mode and the fourth mode may be positioned at a lower priority than the first mode in decoding order within the merge data syntax.
  • the second syntax element when the first condition is satisfied, parsing the second syntax element, and when the first condition is not satisfied, the second syntax element is inferred to be 1 Can be.
  • the second syntax element may be inferred based on a fourth syntax element indicating whether a subblock-based merge mode is applied to the current block. Can be.
  • the second condition may include a condition in which the fourth mode can be used.
  • the second condition is whether the third mode is available in the current sequence, whether the fourth mode is available in the current sequence, and the maximum number of candidates of the fourth mode is It may include at least one of whether it is greater than 1, whether the width of the current block is smaller than a predefined first size, and whether the height of the current block is smaller than a predefined second size.
  • the second syntax element when the second syntax element is 1, obtaining a fifth syntax element indicating whether the first mode is applied or the second mode is applied to the current block. It may include.
  • embodiments of the present invention 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 includes one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs) , Field Programmable Gate Arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, and the like.
  • ASICs Application Specific Integrated Circuits
  • DSPs Digital Signal Processors
  • DSPDs Digital Signal Processing Devices
  • PLDs Programmable Logic Devices
  • FPGAs Field Programmable Gate Arrays
  • processors controllers, microcontrollers, microprocessors, and the like.
  • 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.
  • the software code can be stored in memory and driven by a processor.
  • the memory may be located inside or outside the processor, and may exchange data with the processor by various means known in the art.
  • Computer readable media can be any available media that can be accessed by a computer, and includes both volatile and nonvolatile media, removable and non-removable media.
  • Computer-readable media may include both computer storage media and communication media.
  • Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data.
  • Communication media typically include computer readable instructions, data structures or other data in a modulated data signal, such as a program module, or other transport mechanism, and includes any information delivery media.

Landscapes

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

Abstract

비디오 신호를 인코딩하거나 디코딩하는 비디오 신호 처리 방법 및 장치가 개시된다. 구체적으로, 비디오 신호 처리 방법에 있어서, 현재 블록에 머지 모드(merge mode)가 적용되는지 여부를 지시하는 제1 신택스 요소(syntax element)를 파싱하는 단계; 상기 현재 블록에 상기 머지 모드가 적용되는 경우, 미리 정의된 제1 조건에 기초하여 제2 신택스 요소의 파싱 여부를 결정하는 단계, 여기서, 상기 제2 신택스 요소는 제1 모드 또는 제2 모드가 상기 현재 블록에 적용되는지 여부를 지시함; 상기 현재 블록에 상기 제1 모드 및 상기 제2 모드가 적용되지 않는 경우, 미리 정의된 제2 조건에 기초하여 제3 신택스 요소의 파싱 여부를 결정하는 단계, 여기서, 상기 제3 신택스 요소는 제3 모드 또는 제4 모드 중에서 상기 현재 블록에 적용되는 모드를 지시함; 상기 제2 신택스 요소 또는 상기 제3 신택스 요소에 기초하여 상기 현재 블록에 적용되는 모드를 결정하는 단계; 상기 결정된 모드에 기초하여 상기 현재 블록의 모션 정보를 유도하는 단계; 및 상기 현재 블록의 모션 정보를 이용하여 상기 현재 블록의 예측 블록을 생성하는 단계를 포함할 수 있다.

Description

모션 보상을 이용한 비디오 신호 처리 방법 및 장치
본 발명은 비디오 신호의 처리 방법 및 장치에 관한 것으로, 보다 상세하게는 모션 보상을 이용하여 비디오 신호를 인코딩하거나 디코딩하는 비디오 신호 처리 방법 및 장치에 관한 것이다.
압축 부호화란 디지털화한 정보를 통신 회선을 통해 전송하거나, 저장 매체에 적합한 형태로 저장하기 위한 일련의 신호 처리 기술을 의미한다. 압축 부호화의 대상에는 음성, 영상, 문자 등의 대상이 존재하며, 특히 영상을 대상으로 압축 부호화를 수행하는 기술을 비디오 영상 압축이라고 일컫는다. 비디오 신호에 대한 압축 부호화는 공간적인 상관관계, 시간적인 상관관계, 확률적인 상관관계 등을 고려하여 잉여 정보를 제거함으로써 이루어진다. 그러나 최근의 다양한 미디어 및 데이터 전송 매체의 발전으로 인해, 더욱 고효율의 비디오 신호 처리 방법 및 장치가 요구되고 있다.
본 발명의 목적은 비디오 신호의 코딩 효율을 높이고자 함에 있다. 본 발명의 목적은 효율적인 머지 모드의 시그널링 방법을 제공하고자 함에 있다.
상기와 같은 과제를 해결하기 위해, 본 발명은 다음과 같은 비디오 신호 처리 장치 및 비디오 신호 처리 방법을 제공한다.
본 발명의 일 실시예에 따르면, 비디오 신호 처리 방법에 있어서, 현재 블록에 머지 모드(merge mode)가 적용되는지 여부를 지시하는 제1 신택스 요소(syntax element)를 파싱하는 단계; 상기 현재 블록에 상기 머지 모드가 적용되는 경우, 미리 정의된 제1 조건에 기초하여 제2 신택스 요소 의 파싱 여부를 결정하는 단계, 여기서, 상기 제2 신택스 요소는 제1 모드 또는 제2 모드가 상기 현재 블록에 적용되는지 여부를 지시함; 상기 현재 블록에 상기 제1 모드 및 상기 제2 모드가 적용되지 않는 경우, 미리 정의된 제2 조건에 기초하여 제3 신택스 요소의 파싱 여부를 결정하는 단계, 여기서, 상기 제3 신택스 요소는 제3 모드 또는 제4 모드 중에서 상기 현재 블록에 적용되는 모드를 지시함; 상기 제2 신택스 요소 또는 상기 제3 신택스 요소에 기초하여 상기 현재 블록에 적용되는 모드를 결정하는 단계; 상기 결정된 모드에 기초하여 상기 현재 블록의 모션 정보를 유도하는 단계; 및 상기 현재 블록의 모션 정보를 이용하여 상기 현재 블록의 예측 블록을 생성하는 단계를 포함하되, 상기 제1 조건은 상기 제3 모드를 이용할 수 있는 조건 및 상기 제4 모드를 이용할 수 있는 조건 중 적어도 하나를 포함하는 것을 특징으로 하는, 비디오 신호 처리 방법이 제공된다.
실시예로서, 상기 제3 모드 및 상기 제4 모드는 머지 데이터 신택스 내에서 디코딩 순서상 상기 제1 모드 보다 후순위에 위치할 수 있다.
실시예로서, 상기 제1 조건을 만족하는 경우, 상기 제2 신택스 요소를 파싱하는 단계를 포함하고, 상기 제1 조건을 만족하지 않는 경우, 상기 제2 신택스 요소는 1로 추론될 수 있다.
실시예로서, 상기 제1 조건을 만족하지 않는 경우, 상기 제2 신택스 요소는 상기 현재 블록에 서브블록 기반 머지 모드가 적용되는지 여부를 지시하는 제4 신택스 요소에 기초하여 추론될 수 있다.
실시예로서, 상기 제2 조건은 상기 제4 모드를 이용할 수 있는 조건을 포함할 수 있다.
실시예로서, 상기 제2 조건은 현재 시퀀스에서 상기 제3 모드를 이용할 수 있는지 여부, 상기 현재 시퀀스에서 상기 제4 모드를 이용할 수 있는지 여부, 상기 제4 모드의 최대 후보 개수가 1보다 큰지 여부, 상기 현재 블록의 너비가 미리 정의된 제1 크기보다 작은지 여부 및 상기 현재 블록의 높이가 미리 정의된 제2 크기보다 작은지 여부 중 적어도 하나를 포함할 수 있다.
실시예로서, 상기 제2 신택스 요소가 1인 경우, 상기 현재 블록에 상기 제1 모드가 적용되는지 또는 상기 제2 모드가 적용되는지 여부를 지시하는 제5 신택스 요소를 획득하는 단계를 포함할 수 있다.
본 발명의 일 실시예에 따르면, 비디오 신호 처리 장치에 있어서, 프로세서를 포함하며, 상기 프로세서는, 현재 블록에 머지 모드(merge mode)가 적용되는지 여부를 지시하는 제1 신택스 요소(syntax element)를 파싱하고, 상기 현재 블록에 상기 머지 모드가 적용되는 경우, 미리 정의된 제1 조건에 기초하여 제2 신택스 요소의 파싱 여부를 결정하고, 여기서, 상기 제2 신택스 요소는 제1 모드 또는 제2 모드가 상기 현재 블록에 적용되는지 여부를 지시하고, 상기 현재 블록에 상기 제1 모드 및 상기 제2 모드가 적용되지 않는 경우, 미리 정의된 제2 조건에 기초하여 제3 신택스 요소의 파싱 여부를 결정하고, 여기서, 상기 제3 신택스 요소는 제3 모드 또는 제4 모드 중에서 상기 현재 블록에 적용되는 모드를 지시하고, 상기 제2 신택스 요소 또는 상기 제3 신택스 요소에 기초하여 상기 현재 블록에 적용되는 모드를 결정하고, 상기 결정된 모드에 기초하여 상기 현재 블록의 모션 정보를 유도하고, 상기 현재 블록의 모션 정보를 이용하여 상기 현재 블록의 예측 블록을 생성하되, 상기 제1 조건은 상기 제3 모드를 이용할 수 있는 조건 및 상기 제4 모드를 이용할 수 있는 조건 중 적어도 하나를 포함하는 것을 특징으로 하는, 비디오 신호 처리 장치가 제공된다. .
실시예로서, 상기 제3 모드 및 상기 제4 모드는 머지 데이터 신택스 내에서 디코딩 순서상 상기 제1 모드 보다 후순위에 위치할 수 있다.
실시예로서, 상기 프로세서는, 상기 제1 조건을 만족하는 경우, 상기 제2 신택스 요소를 파싱하고, 상기 제1 조건을 만족하지 않는 경우, 상기 제2 신택스 요소는 1로 추론될 수 있다.
실시예로서, 상기 제1 조건을 만족하지 않는 경우, 상기 제2 신택스 요소는 상기 현재 블록에 서브블록 기반 머지 모드가 적용되는지 여부를 지시하는 제4 신택스 요소에 기초하여 추론될 수 있다.
실시예로서, 상기 제2 조건은 상기 제4 모드를 이용할 수 있는 조건을 포함할 수 있다.
실시예로서, 상기 제2 조건은 현재 시퀀스에서 상기 제3 모드를 이용할 수 있는지 여부, 상기 현재 시퀀스에서 상기 제4 모드를 이용할 수 있는지 여부, 상기 제4 모드의 최대 후보 개수가 1보다 큰지 여부, 상기 현재 블록의 너비가 미리 정의된 제1 크기보다 작은지 여부 및 상기 현재 블록의 높이가 미리 정의된 제2 크기보다 작은지 여부 중 적어도 하나를 포함할 수 있다.
실시예로서, 상기 프로세서는, 상기 제2 신택스 요소가 1인 경우, 상기 현재 블록에 상기 제1 모드가 적용되는지 또는 상기 제2 모드가 적용되는지 여부를 지시하는 제5 신택스 요소를 획득할 수 있다.
본 발명의 실시예에 따르면, 비디오 신호 처리 방법에 있어서, 현재 블록에 머지 모드(merge mode)가 적용되는지 여부를 지시하는 제1 신택스 요소(syntax element)를 부호화하는 단계; 상기 현재 블록에 상기 머지 모드가 적용되는 경우, 미리 정의된 제1 조건에 기초하여 제2 신택스 요소의 부호화 여부를 결정하는 단계, 여기서, 상기 제2 신택스 요소는 제1 모드 또는 제2 모드가 상기 현재 블록에 적용되는지 여부를 지시함; 상기 현재 블록에 상기 제1 모드 및 상기 제2 모드가 적용되지 않는 경우, 미리 정의된 제2 조건에 기초하여 제3 신택스 요소의 부호화 여부를 결정하는 단계, 여기서, 상기 제3 신택스 요소는 제3 모드 또는 제4 모드 중에서 상기 현재 블록에 적용되는 모드를 지시함; 상기 제2 신택스 요소 또는 상기 제3 신택스 요소에 기초하여 상기 현재 블록에 적용되는 모드를 결정하는 단계; 상기 결정된 모드에 기초하여 상기 현재 블록의 모션 정보를 유도하는 단계; 및 상기 현재 블록의 모션 정보를 이용하여 상기 현재 블록의 예측 블록을 생성하는 단계를 포함하되, 상기 제1 조건은 상기 제3 모드를 이용할 수 있는 조건 및 상기 제4 모드를 이용할 수 있는 조건 중 적어도 하나를 포함하는 것을 특징으로 하는, 비디오 신호 처리 방법이 제공된다.
본 발명의 실시예에 따르면, 효율적으로 머지 모드를 시그널링함으로써 비디오 신호의 코딩 효율이 높아질 수 있다.
도 1은 본 발명의 일 실시예에 따른 비디오 신호 인코딩 장치의 개략적인 블록도이다.
도 2는 본 발명의 일 실시예에 따른 비디오 신호 디코딩 장치의 개략적인 블록도이다.
도 3은 픽쳐 내에서 코딩 트리 유닛이 코딩 유닛들로 분할되는 실시예를 도시한다.
도 4는 쿼드 트리 및 멀티-타입 트리의 분할을 시그널링하는 방법의 일 실시예를 도시한다.
도 5는 본 발명의 실시예에 따른 인터 예측을 도시한다.
도 6은 본 발명의 일 실시예에 따른 모션 벡터 시그널링 방법을 예시하는 도면이다.
도 7은 본 발명의 일 실시예에 따른 적응적인 모션 벡터 해상도(adaptive motion vector resolution) 정보의 시그널링 방법을 예시하는 도면이다.
도 8은 본 발명의 일 실시예에 따른 코딩 유닛 신택스(coding unit syntax)를 예시하는 도면이다.
도 9는 본 발명의 일 실시예에 따른 코딩 유닛 신택스를 예시하는 도면이다.
도 10은 본 발명의 일 실시예에 따른 머지 모드 시그널링 방법을 예시하는 도면이다.
도 11은 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 예시하는 도면이다.
도 12는 본 발명의 일 실시예에 따른 머지 데이터 신택스를 나타낸 도면이다.
도 13은 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 예시하는 도면이다.
도 14는 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 예시하는 도면이다.
도 15는 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 나타낸 도면이다.
도 16은 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 나타낸 도면이다.
도 17은 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 나타낸 도면이다.
도 18은 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 나타낸 도면이다.
도 19는 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 예시하는 도면이다.
도 20은 본 발명의 일 실시예를 따른 머지 데이터 신택스 구조를 예시하는 도면이다.
도 21은 본 발명의 일 실시예를 따른 머지 데이터 신택스 구조를 예시하는 도면이다.
도 22는 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 예시하는 도면이다.
도 23는 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 예시하는 도면이다.
도 24는 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 나타낸 도면이다.
도 25는 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 예시하는 도면이다.
도 26은 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 나타낸 도면이다.
도 27은 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 나타낸 도면이다.
도 28은 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 예시하는 도면이다.
도 29는 본 발명의 일 실시예에 따른 머지 모드 시그널링 방법을 예시하는 도면이다.
도 30은 본 발명의 일 실시예에 따른 머지 데이터 신택스를 예시하는 도면이다.
도 31은 본 발명의 일 실시예에 따른 머지 데이터 신택스를 예시하는 도면이다.
도 32는 본 발명의 일 실시예에 따른 지오메트릭 머지 모드(geometric merge 모드)를 나타낸 도면이다.
도 33는 본 발명의 일 실시예에 따른 머지 데이터 신택스를 나타낸 도면이다.
도 34는 본 발명이 적용되는 일 실시예에 따른 비디오 신호 처리 방법을 예시하는 도면이다.
본 명세서에서 사용되는 용어는 본 발명에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어를 선택하였으나, 이는 당 분야에 종사하는 기술자의 의도, 관례 또는 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한 특정 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 발명의 설명 부분에서 그 의미를 기재할 것이다. 따라서, 본 명세서에서 사용되는 용어는, 단순한 용어의 명칭이 아닌 그 용어가 가진 실질적인 의미와 본 명세서의 전반에 걸친 내용을 토대로 해석되어야 함을 밝혀두고자 한다.
본 명세서에서 일부 용어들은 다음과 같이 해석될 수 있다. 코딩은 경우에 따라 인코딩 또는 디코딩으로 해석될 수 있다. 본 명세서에서 비디오 신호의 인코딩(부호화)을 수행하여 비디오 신호 비트스트림을 생성하는 장치는 인코딩 장치 또는 인코더로 지칭되며, 비디오 신호 비트스트림의 디코딩(복호화)을 수행하여 비디오 신호를 복원하는 장치는 디코딩 장치 또는 디코더로 지칭된다. 또한, 본 명세서에서 비디오 신호 처리 장치는 인코더 및 디코더를 모두 포함하는 개념의 용어로 사용된다. 정보(information)는 값(values), 파라미터(parameter), 계수(coefficients), 성분(elements) 등을 모두 포함하는 용어로서, 경우에 따라 의미는 달리 해석될 수 있으므로 본 발명은 이에 한정되지 아니한다. '유닛'은 영상 처리의 기본 단위 또는 픽쳐의 특정 위치를 지칭하는 의미로 사용되며, 루마(luma) 성분 및 크로마(chroma) 성분 중 적어도 하나를 포함하는 이미지 영역을 가리킨다. 또한, ‘블록’은 루마 성분 및 크로마 성분들(즉, Cb 및 Cr) 중 특정 성분을 포함하는 이미지 영역을 가리킨다. 다만, 실시예에 따라서, ‘유닛’, '블록', '파티션' 및 '영역' 등의 용어는 서로 혼용하여 사용될 수 있다. 또한, 본 명세서에서 유닛은 코딩 유닛, 예측 유닛, 변환 유닛을 모두 포함하는 개념으로 사용될 수 있다. 픽쳐는 필드 또는 프레임을 가리키며, 실시예에 따라 상기 용어들은 서로 혼용하여 사용될 수 있다.
도 1은 본 발명의 일 실시예에 따른 비디오 신호 인코딩 장치(100)의 개략적인 블록도이다. 도 1을 참조하면, 본 발명의 인코딩 장치(100)는 변환부(110), 양자화부(115), 역양자화부(120), 역변환부(125), 필터링부(130), 예측부(150) 및 엔트로피 코딩부(160)를 포함한다.
변환부(110)는 입력 받은 비디오 신호와 예측부(150)에서 생성된 예측 신호의 차이인 레지듀얼 신호를 변환하여 변환 계수 값을 획득한다. 예를 들어, 이산 코사인 변환(Discrete Cosine Transform, DCT), 이산 사인 변환(Discrete Sine Transform, DST) 또는 웨이블릿 변환(Wavelet Transform) 등이 사용될 수 있다. 이산 코사인 변환 및 이산 사인 변환은 입력된 픽쳐 신호를 블록 형태로 나누어 변환을 수행하게 된다. 변환에 있어서 변환 영역 내의 값들의 분포와 특성에 따라서, 코딩 효율이 달라질 수 있다. 양자화부(115)는 변환부(110)에서 출력된 변환 계수 값을 양자화한다.
코딩 효율을 높이기 위하여 픽쳐 신호를 그대로 코딩하는 것이 아니라, 예측부(150)를 통해 이미 코딩된 영역을 이용하여 픽쳐를 예측하고, 예측된 픽쳐에 원본 픽쳐와 예측 픽쳐 간의 레지듀얼 값을 더하여 복원 픽쳐를 획득하는 방법이 사용된다. 인코더와 디코더에서 미스매치가 발생되지 않도록 하기 위해, 인코더에서 예측을 수행할 때에는 디코더에서도 사용 가능한 정보를 사용해야 한다. 이를 위해, 인코더에서는 부호화한 현재 블록을 다시 복원하는 과정을 수행한다. 역양자화부(120)에서는 변환 계수 값을 역양자화하고, 역변환부(125)에서는 역양자화된 변환 계수값을 이용하여 레지듀얼 값을 복원한다. 한편, 필터링부(130)는 복원된 픽쳐의 품질 개선 및 부호화 효율 향상을 위한 필터링 연산을 수행한다. 예를 들어, 디블록킹 필터, 샘플 적응적 오프셋(Sample Adaptive Offset, SAO) 및 적응적 루프 필터 등이 포함될 수 있다. 필터링을 거친 픽쳐는 출력되거나 참조 픽쳐로 이용하기 위하여 복호 픽쳐 버퍼(Decoded Picture Buffer, DPB, 156)에 저장된다.
코딩 효율을 높이기 위하여 픽쳐 신호를 그대로 코딩하는 것이 아니라, 예측부(150)를 통해 이미 코딩된 영역을 이용하여 픽쳐를 예측하고, 예측된 픽쳐에 원 픽쳐와 예측 픽쳐 간의 레지듀얼 값을 더하여 복원 픽쳐를 획득하는 방법이 사용된다. 인트라 예측부(152)에서는 현재 픽쳐 내에서 화면내 예측을 수행하며, 인터 예측부(154)에서는 복호 픽쳐 버퍼(156)에 저장된 참조 픽쳐를 이용하여 현재 픽쳐를 예측한다. 인트라 예측부(152)는 현재 픽쳐 내의 복원된 영역들로부터 화면내 예측을 수행하여, 화면내 부호화 정보를 엔트로피 코딩부(160)에 전달한다. 인터 예측부(154)는 다시 모션 추정부(154a) 및 모션 보상부(154b)를 포함하여 구성될 수 있다. 모션 추정부(154a)에서는 복원된 특정 영역을 참조하여 현재 영역의 모션 벡터값을 획득한다. 모션 추정부(154a)에서는 참조 영역의 위치 정보(참조 프레임, 모션 벡터 등) 등을 엔트로피 코딩부(160)로 전달하여 비트스트림에 포함될 수 있도록 한다. 모션 추정부(154a)에서 전달된 모션 벡터값을 이용하여 모션 보상부(154b)에서는 화면간 모션 보상을 수행한다.
예측부(150)는 인트라 예측부(152)와 인터 예측부(154)를 포함한다. 인트라 예측부(152)는 현재 픽쳐 내에서 인트라(intra) 예측을 수행하며, 인터 예측부(154)는 복호 픽쳐 버퍼(156)에 저장된 참조 픽쳐를 이용하여 현재 픽쳐를 예측하는 인터(inter) 예측을 수행한다. 인트라 예측부(152)는 현재 픽쳐 내의 복원된 샘플들로부터 인트라 예측을 수행하여, 인트라 부호화 정보를 엔트로피 코딩부(160)에 전달한다. 인트라 부호화 정보는 인트라 예측 모드, MPM(Most Probable Mode) 플래그, MPM 인덱스 중 적어도 하나를 포함할 수 있다. 인트라 부호화 정보는 참조 샘플에 관한 정보를 포함할 수 있다. 인터 예측부(154)는 모션 추정부(154a) 및 모션 보상부(154b)를 포함하여 구성될 수 있다. 모션 추정부(154a)는 복원된 참조 픽쳐의 특정 영역을 참조하여 현재 영역의 모션 벡터값을 획득한다. 모션 추정부(154a)는 참조 영역에 대한 모션 정보 세트(참조 픽쳐 인덱스, 모션 벡터 정보 등)를 엔트로피 코딩부(160)로 전달한다. 모션 보상부(154b)는 모션 추정부(154a)에서 전달된 모션 벡터값을 이용하여 모션 보상을 수행한다. 인터 예측부(154)는 참조 영역에 대한 모션 정보를 포함하는 인터 부호화 정보를 엔트로피 코딩부(160)에 전달한다.
추가적인 실시예에 따라, 예측부(150)는 인트라 블록 카피(block copy, BC) 예측부(미도시)를 포함할 수 있다. 인트라 BC 예측부는 현재 픽쳐 내의 복원된 샘플들로부터 인트라 BC 예측을 수행하여, 인트라 BC 부호화 정보를 엔트로피 코딩부(160)에 전달한다. 인트라 BC 예측부는 현재 픽쳐 내의 특정 영역을 참조하여 현재 영역의 예측에 이용되는 참조 영역을 나타내는 블록 벡터값을 획득한다. 인트라 BC 예측부는 획득된 블록 벡터값을 이용하여 인트라 BC 예측을 수행할 수 있다. 인트라 BC 예측부는 인트라 BC 부호화 정보를 엔트로피 코딩부(160)로 전달한다. 인트라 BC 부호화 정보는 블록 벡터 정보를 포함할 수 있다.
위와 같은 픽쳐 예측이 수행될 경우, 변환부(110)는 원본 픽쳐와 예측 픽쳐 간의 레지듀얼 값을 변환하여 변환 계수 값을 획득한다. 이때, 변환은 픽쳐 내에서 특정 블록 단위로 수행될 수 있으며, 특정 블록의 크기는 기 설정된 범위 내에서 가변할 수 있다. 양자화부(115)는 변환부(110)에서 생성된 변환 계수 값을 양자화하여 엔트로피 코딩부(160)로 전달한다.
엔트로피 코딩부(160)는 양자화된 변환 계수를 나타내는 정보, 인트라 부호화 정보, 및 인터 부호화 정보 등을 엔트로피 코딩하여 비디오 신호 비트스트림을 생성한다. 엔트로피 코딩부(160)에서는 가변 길이 코딩(Variable Length Coding, VLC) 방식과 산술 코딩(arithmetic coding) 방식 등이 사용될 수 있다. 가변 길이 코딩(VLC) 방식은 입력되는 심볼들을 연속적인 코드워드로 변환하는데, 코드워드의 길이는 가변적일 수 있다. 예를 들어, 자주 발생하는 심볼들을 짧은 코드워드로, 자주 발생하지 않은 심볼들은 긴 코드워드로 표현하는 것이다. 가변 길이 코딩 방식으로서 컨텍스트 기반 적응형 가변 길이 코딩(Context-based Adaptive Variable Length Coding, CAVLC) 방식이 사용될 수 있다. 산술 코딩은 연속적인 데이터 심볼들을 하나의 소수로 변환하는데, 산술 코딩은 각 심볼을 표현하기 위하여 필요한 최적의 소수 비트를 얻을 수 있다. 산술 코딩으로서 컨텍스트 기반 적응형 산술 부호화(Context-based Adaptive Binary Arithmetic Code, CABAC)가 이용될 수 있다. 예를 들어, 엔트로피 코딩부(160)는 양자화된 변환 계수를 나타내는 정보를 이진화할 수 있다. 또한, 엔트로피 코딩부(160)는 이진화된 정보를 산술 코딩하여 비트스트림을 생성할 수 있다.
상기 생성된 비트스트림은 NAL(Network Abstraction Layer) 유닛을 기본 단위로 캡슐화 된다. NAL 유닛은 부호화된 정수 개의 코딩 트리 유닛(coding tree unit)을 포함한다. 비디오 디코더에서 비트스트림을 복호화하기 위해서는 먼저 비트스트림을 NAL 유닛 단위로 분리한 후, 분리된 각각의 NAL 유닛을 복호화해야 한다. 한편, 비디오 신호 비트스트림의 복호화를 위해 필요한 정보들은 픽쳐 파라미터 세트(Picture Parameter Set, PPS), 시퀀스 파라미터 세트(Sequence Parameter Set, SPS), 비디오 파라미터 세트(Video Parameter Set, VPS) 등과 같은 상위 레벨 세트의 RBSP(Raw Byte Sequence Payload)를 통해 전송될 수 있다.
한편, 도 1의 블록도는 본 발명의 일 실시예에 따른 인코딩 장치(100)를 나타낸 것으로서, 분리하여 표시된 블록들은 인코딩 장치(100)의 엘리먼트들을 논리적으로 구별하여 도시한 것이다. 따라서, 전술한 인코딩 장치(100)의 엘리먼트들은 디바이스의 설계에 따라 하나의 칩으로 또는 복수의 칩으로 장착될 수 있다. 일 실시예에 따르면, 전술한 인코딩 장치(100)의 각 엘리먼트의 동작은 프로세서(미도시)에 의해 수행될 수 있다.
도 2는 본 발명의 일 실시예에 따른 비디오 신호 디코딩 장치(200)의 개략적인 블록도이다. 도 2를 참조하면 본 발명의 디코딩 장치(200)는 엔트로피 디코딩부(210), 역양자화부(220), 역변환부(225), 필터링부(230) 및 예측부(250)를 포함한다.
엔트로피 디코딩부(210)는 비디오 신호 비트스트림을 엔트로피 디코딩하여, 각 영역에 대한 변환 계수 정보, 인트라 부호화 정보, 인터 부호화 정보 등을 추출한다. 예를 들어, 엔트로피 디코딩부(210)는 비디오 신호 비트스트림으로부터 특정 영역의 변환 계수 정보에 대한 이진화 코드를 획득할 수 있다. 또한, 엔트로피 디코딩부(210)는 이진화 코드를 역 이진화하여 양자화된 변환 계수를 획득한다. 역양자화부(220)는 양자화된 변환 계수를 역양자화하고, 역변환부(225)는 역양자화된 변환 계수를 이용하여 레지듀얼 값을 복원한다. 비디오 신호 처리 장치(200)는 역변환부(225)에서 획득된 레지듀얼 값을 예측부(250)에서 획득된 예측값과 합산하여 원래의 화소값을 복원한다.
한편, 필터링부(230)는 픽쳐에 대한 필터링을 수행하여 화질을 향상시킨다. 여기에는 블록 왜곡 현상을 감소시키기 위한 디블록킹 필터 및/또는 픽쳐 전체의 왜곡 제거를 위한 적응적 루프 필터 등이 포함될 수 있다. 필터링을 거친 픽쳐는 출력되거나 다음 픽쳐에 대한 참조 픽쳐로 이용하기 위하여 복호 픽쳐 버퍼(DPB, 256)에 저장된다.
예측부(250)는 인트라 예측부(252) 및 인터 예측부(254)를 포함한다. 예측부(250)는 전술한 엔트로피 디코딩부(210)를 통해 복호화된 부호화 타입, 각 영역에 대한 변환 계수, 인트라/인터 부호화 정보 등을 활용하여 예측 픽쳐를 생성한다. 복호화가 수행되는 현재 블록을 복원하기 위해서, 현재 블록이 포함된 현재 픽쳐 또는 다른 픽쳐들의 복호화된 영역이 이용될 수 있다. 복원에 현재 픽쳐만을 이용하는, 즉 인트라 예측 또는 인트라 BC 예측을 수행하는 픽쳐(또는, 타일/슬라이스)를 인트라 픽쳐 또는 I 픽쳐(또는, 타일/슬라이스), 인트라 예측, 인터 예측 및 인트라 BC 예측을 모두 수행할 수 있는 픽쳐(또는, 타일/슬라이스)를 인터 픽쳐(또는, 타일/슬라이스)라고 한다. 인터 픽쳐(또는, 타일/슬라이스) 중 각 블록의 샘플값들을 예측하기 위하여 최대 하나의 모션 벡터 및 참조 픽쳐 인덱스를 이용하는 픽쳐(또는, 타일/슬라이스)를 예측 픽쳐(predictive picture) 또는 P 픽쳐(또는, 타일/슬라이스)라고 하며, 최대 두 개의 모션 벡터 및 참조 픽쳐 인덱스를 이용하는 픽쳐(또는, 타일/슬라이스)를 쌍예측 픽쳐(Bi-predictive picture) 또는 B 픽쳐(또는, 타일/슬라이스) 라고 한다. 다시 말해서, P 픽쳐(또는, 타일/슬라이스)는 각 블록을 예측하기 위해 최대 하나의 모션 정보 세트를 이용하고, B 픽쳐(또는, 타일/슬라이스)는 각 블록을 예측하기 위해 최대 두 개의 모션 정보 세트를 이용한다. 여기서, 모션 정보 세트는 하나 이상의 모션 벡터와 하나의 참조 픽쳐 인덱스를 포함한다 .
인트라 예측부(252)는 인트라 부호화 정보 및 현재 픽쳐 내의 복원된 샘플들을 이용하여 예측 블록을 생성한다. 전술한 바와 같이, 인트라 부호화 정보는 인트라 예측 모드, MPM(Most Probable Mode) 플래그, MPM 인덱스 중 적어도 하나를 포함할 수 있다. 인트라 예측부(252)는 현재 블록의 좌측 및/또는 상측에 위치한 복원된 샘플들을 참조 샘플들로 이용하여 현재 블록의 샘플 값들을 예측한다. 본 개시에서, 복원된 샘플들, 참조 샘플들 및 현재 블록의 샘플들은 픽셀들을 나타낼 수 있다. 또한, 샘플 값(sample value)들은 픽셀 값들을 나타낼 수 있다.
일 실시예에 따르면, 참조 샘플들은 현재 블록의 주변 블록에 포함된 샘플들일 수 있다. 예를 들어, 참조 샘플들은 현재 블록의 좌측 경계에 인접한 샘플들 및/또는 상측 경계에 인접한 샘플들일 수 있다. 또한, 참조 샘플들은 현재 블록의 주변 블록의 샘플들 중 현재 블록의 좌측 경계로부터 기 설정된 거리 이내의 라인 상에 위치하는 샘플들 및/또는 현재 블록의 상측 경계로부터 기 설정된 거리 이내의 라인 상에 위치하는 샘플들일 수 있다. 이때, 현재 블록의 주변 블록은 현재 블록에 인접한 좌측(L) 블록, 상측(A) 블록, 하좌측(Below Left, BL) 블록, 상우측(Above Right, AR) 블록 또는 상좌측(Above Left, AL) 블록 중 적어도 하나를 포함할 수 있다.
인터 예측부(254)는 복호 픽쳐 버퍼(256)에 저장된 참조 픽쳐 및 인터 부호화 정보를 이용하여 예측 블록을 생성한다. 인터 부호화 정보는 참조 블록에 대한 현재 블록의 모션 정보 세트(참조 픽쳐 인덱스, 모션 벡터 정보 등)를 포함할 수 있다. 인터 예측에는 L0 예측, L1 예측 및 쌍예측(Bi-prediction)이 있을 수 있다. L0 예측은 L0 픽쳐 리스트에 포함된 1개의 참조 픽쳐를 이용한 예측이고, L1 예측은 L1 픽쳐 리스트에 포함된 1개의 참조 픽쳐를 이용한 예측을 의미한다. 이를 위해서는 1세트의 모션 정보(예를 들어, 모션 벡터 및 참조 픽쳐 인덱스)가 필요할 수 있다. 쌍예측 방식에서는 최대 2개의 참조 영역을 이용할 수 있는데, 이 2개의 참조 영역은 동일한 참조 픽쳐에 존재할 수도 있고, 서로 다른 픽쳐에 각각 존재할 수도 있다. 즉, 쌍예측 방식에서는 최대 2세트의 모션 정보(예를 들어, 모션 벡터 및 참조 픽쳐 인덱스)가 이용될 수 있는데, 2개의 모션 벡터가 동일한 참조 픽쳐 인덱스에 대응될 수도 있고 서로 다른 참조 픽쳐 인덱스에 대응될 수도 있다. 이때, 참조 픽쳐들은 시간적으로 현재 픽쳐 이전이나 이후 모두에 표시(또는 출력)될 수 있다. 일 실시예에 따라, 쌍예측 방식에서는 사용되는 2개의 참조 영역은 L0 픽쳐 리스트 및 L1 픽쳐 리스트 각각에서 선택된 영역일 수 있다.
인터 예측부(254)는 모션 벡터 및 참조 픽쳐 인덱스를 이용하여 현재 블록의 참조 블록을 획득할 수 있다. 상기 참조 블록은 참조 픽쳐 인덱스에 대응하는 참조 픽쳐 내에 존재한다. 또한, 모션 벡터에 의해서 특정된 블록의 샘플 값 또는 이의 보간(interpolation)된 값이 현재 블록의 예측자(predictor)로 이용될 수 있다. 서브펠(sub-pel) 단위의 픽셀 정확도를 갖는 모션 예측을 위하여 이를 테면, 루마 신호에 대하여 8-탭 보간 필터가, 크로마 신호에 대하여 4-탭 보간 필터가 사용될 수 있다. 다만, 서브펠 단위의 모션 예측을 위한 보간 필터는 이에 한정되지 않는다. 이와 같이 인터 예측부(254)는 이전에 복원된 픽쳐로부터 현재 유닛의 텍스쳐를 예측하는 모션 보상(motion compensation)을 수행한다. 이때, 인터 예측부는 모션 정보 세트를 이용할 수 있다.
추가적인 실시예에 따라, 예측부(250)는 인트라 BC 예측부(미도시)를 포함할 수 있다. 인트라 BC 예측부는 현재 픽쳐 내의 복원된 샘플들을 포함하는 특정 영역을 참조하여 현재 영역을 복원할 수 있다. 인트라 BC 예측부는 엔트로피 디코딩부(210)로부터 현재 영역에 대한 인트라 BC 부호화 정보를 획득한다. 인트라 BC 예측부는 현재 픽쳐 내의 특정 영역을 지시하는 현재 영역의 블록 벡터값을 획득한다. 인트라 BC 예측부는 획득된 블록 벡터값을 이용하여 인트라 BC 예측을 수행할 수 있다. 인트라 BC 부호화 정보는 블록 벡터 정보를 포함할 수 있다.
상기 인트라 예측부(252) 또는 인터 예측부(254)로부터 출력된 예측값, 및 역변환부(225)로부터 출력된 레지듀얼 값이 더해져서 복원된 비디오 픽쳐가 생성된다. 즉, 비디오 신호 디코딩 장치(200)는 예측부(250)에서 생성된 예측 블록과 역변환부(225)로부터 획득된 레지듀얼을 이용하여 현재 블록을 복원한다.
한편, 도 2의 블록도는 본 발명의 일 실시예에 따른 디코딩 장치(200)를 나타낸 것으로서, 분리하여 표시된 블록들은 디코딩 장치(200)의 엘리먼트들을 논리적으로 구별하여 도시한 것이다. 따라서, 전술한 디코딩 장치(200)의 엘리먼트들은 디바이스의 설계에 따라 하나의 칩으로 또는 복수의 칩으로 장착될 수 있다. 일 실시예에 따르면, 전술한 디코딩 장치(200)의 각 엘리먼트의 동작은 프로세서(미도시)에 의해 수행될 수 있다.
도 3은 픽쳐 내에서 코딩 트리 유닛(Coding Tree Unit, CTU)이 코딩 유닛들(Coding Units, CUs)로 분할되는 실시예를 도시한다. 비디오 신호의 코딩 과정에서, 픽쳐는 코딩 트리 유닛(CTU)들의 시퀀스로 분할될 수 있다. 코딩 트리 유닛은 루마(luma) 샘플들의 NXN 블록과, 이에 대응하는 크로마(chroma) 샘플들의 2개의 블록들로 구성된다. 코딩 트리 유닛은 복수의 코딩 유닛들로 분할될 수 있다. 코딩 트리 유닛은 분할되지 않고 리프 노드가 될 수도 있다. 이 경우, 코딩 트리 유닛 자체가 코딩 유닛이 될 수 있다. 코딩 유닛은 상기에서 설명한 비디오 신호의 처리 과정, 즉 인트라/인터 예측, 변환, 양자화 및/또는 엔트로피 코딩 등의 과정에서 픽쳐를 처리하기 위한 기본 단위를 가리킨다. 하나의 픽쳐 내에서 코딩 유닛의 크기 및 모양은 일정하지 않을 수 있다. 코딩 유닛은 정사각형 또는 직사각형의 모양을 가질 수 있다. 직사각형 코딩 유닛(또는, 직사각형 블록)은 수직 코딩 유닛(또는, 수직 블록)과 수평 코딩 유닛(또는, 수평 블록)을 포함한다. 본 명세서에서, 수직 블록은 높이가 너비보다 큰 블록이며, 수평 블록은 너비가 높이보다 큰 블록이다. 또한, 본 명세서에서 정사각형이 아닌(non-square) 블록은 직사각형 블록을 가리킬 수 있지만, 본 발명은 이에 한정되지 않는다.
도 3을 참조하면, 코딩 트리 유닛은 먼저 쿼드 트리(Quad Tree, QT) 구조로 분할된다. 즉, 쿼드 트리 구조에서 2NX2N 크기를 가지는 하나의 노드는 NXN 크기를 가지는 네 개의 노드들로 분할될 수 있다. 본 명세서에서 쿼드 트리는 4진(quaternary) 트리로도 지칭될 수 있다. 쿼드 트리 분할은 재귀적으로 수행될 수 있으며, 모든 노드들이 동일한 깊이로 분할될 필요는 없다.
한편, 전술한 쿼드 트리의 리프 노드(leaf node)는 멀티-타입 트리(Multi-Type Tree, MTT) 구조로 더욱 분할될 수 있다. 본 발명의 실시예에 따르면, 멀티 타입 트리 구조에서는 하나의 노드가 수평 또는 수직 분할의 2진(binary, 바이너리) 또는 3진(ternary, 터너리) 트리 구조로 분할될 수 있다. 즉, 멀티-타입 트리 구조에는 수직 바이너리 분할, 수평 바이너리 분할, 수직 터너리 분할 및 수평 터너리 분할의 4가지 분할 구조가 존재한다. 본 발명의 실시예에 따르면, 상기 각 트리 구조에서 노드의 너비 및 높이는 모두 2의 거듭제곱 값을 가질 수 있다. 예를 들어, 바이너리 트리(Binary Tree, BT) 구조에서, 2NX2N 크기의 노드는 수직 바이너리 분할에 의해 2개의 NX2N 노드들로 분할되고, 수평 바이너리 분할에 의해 2개의 2NXN 노드들로 분할될 수 있다. 또한, 터너리 트리(Ternary Tree, TT) 구조에서, 2NX2N 크기의 노드는 수직 터너리 분할에 의해 (N/2)X2N, NX2N 및 (N/2)X2N의 노드들로 분할되고, 수평 바이너리 분할에 의해 2NX(N/2), 2NXN 및 2NX(N/2)의 노드들로 분할될 수 있다. 이러한 멀티-타입 트리 분할은 재귀적으로 수행될 수 있다.
멀티-타입 트리의 리프 노드는 코딩 유닛이 될 수 있다. 코딩 유닛에 대한 분할이 지시되지 않거나 코딩 유닛이 최대 변환 길이에 비해 크지 않은 경우, 해당 코딩 유닛은 더 이상의 분할 없이 예측 및 변환의 단위로 사용된다. 한편, 전술한 쿼드 트리 및 멀티-타입 트리에서 다음의 파라메터들 중 적어도 하나가 사전에 정의되거나 PPS, SPS, VPS 등과 같은 상위 레벨 세트의 RBSP를 통해 전송될 수 있다. 1) CTU 크기: 쿼드 트리의 루트 노드(root node) 크기, 2) 최소 QT 크기(MinQtSize): 허용된 최소 QT 리프 노드 크기, 3) 최대 BT 크기(MaxBtSize): 허용된 최대 BT 루트 노드 크기, 4) 최대 TT 크기(MaxTtSize): 허용된 최대 TT 루트 노드 크기, 5) 최대 MTT 깊이(MaxMttDepth): QT의 리프 노드로부터의 MTT 분할의 최대 허용 깊이, 6) 최소 BT 크기(MinBtSize): 허용된 최소 BT 리프 노드 크기, 7) 최소 TT 크기(MinTtSize): 허용된 최소 TT 리프 노드 크기.
도 4는 쿼드 트리 및 멀티-타입 트리의 분할을 시그널링하는 방법의 일 실시예를 도시한다. 전술한 쿼드 트리 및 멀티-타입 트리의 분할을 시그널링하기 위해 기 설정된 플래그들이 사용될 수 있다. 도 4를 참조하면, 쿼드 트리 노드의 분할 여부를 지시하는 플래그 'qt_split_flag', 멀티-타입 트리 노드의 분할 여부를 지시하는 플래그 'mtt_split_flag', 멀티-타입 트리 노드의 분할 방향을 지시하는 플래그 'mtt_split_vertical_flag' 또는 멀티-타입 트리 노드의 분할 모양을 지시하는 플래그 'mtt_split_binary_flag' 중 적어도 하나가 사용될 수 있다.
본 발명의 실시예에 따르면, 코딩 트리 유닛은 쿼드 트리의 루트 노드이며, 쿼드 트리 구조로 우선 분할될 수 있다. 쿼드 트리 구조에서는 각각의 노드 'QT_node' 별로 'qt_split_flag'가 시그널링된다. 'qt_split_flag'의 값이 1일 경우 해당 노드는 4개의 정사각형 노드들로 분할되며, 'qt_split_flag'의 값이 0일 경우 해당 노드는 쿼드 트리의 리프 노드 'QT_leaf_node'가 된다.
각각의 쿼드 트리 리프 노드 'QT_leaf_node'는 멀티-타입 트리 구조로 더 분할될 수 있다. 멀티-타입 트리 구조에서는 각각의 노드 'MTT_node' 별로 'mtt_split_flag'가 시그널링된다. 'mtt_split_flag'의 값이 1일 경우 해당 노드는 복수의 직사각형 노드들로 분할되며, 'mtt_split_flag'의 값이 0일 경우 해당 노드는 멀티-타입 트리의 리프 노드 'MTT_leaf_node'가 된다. 멀티-타입 트리 노드 'MTT_node'가 복수의 직사각형 노드들로 분할될 경우(즉, 'mtt_split_flag'의 값이 1일 경우), 노드 'MTT_node'를 위한 'mtt_split_vertical_flag' 및 'mtt_split_binary_flag'가 추가로 시그널링될 수 있다. 'mtt_split_vertical_flag'의 값이 1일 경우 노드 'MTT_node'의 수직 분할이 지시되며, 'mtt_split_vertical_flag'의 값이 0일 경우 노드 'MTT_node'의 수평 분할이 지시된다. 또한, 'mtt_split_binary_flag'의 값이 1일 경우 노드 'MTT_node'는 2개의 직사각형 노드들로 분할되며, 'mtt_split_binary_flag'의 값이 0일 경우 노드 'MTT_node'는 3개의 직사각형 노드들로 분할된다.
코딩을 위한 픽쳐 예측(모션 보상)은 더 이상 나누어지지 않는 코딩 유닛(즉 코딩 유닛 트리의 리프 노드)을 대상으로 이루어진다. 이러한 예측을 수행하는 기본 단위를 이하에서는 예측 유닛(prediction unit) 또는 예측 블록(prediction block)이라고 한다.
이하, 본 명세서에서 사용되는 유닛이라는 용어는 예측을 수행하는 기본 단위인 상기 예측 유닛을 대체하는 용어로 사용될 수 있다. 다만, 본 발명이 이에 한정되는 것은 아니며, 더욱 광의적으로는 상기 코딩 유닛을 포함하는 개념으로 이해될 수 있다.
도 5는 본 발명의 실시예에 따른 인터 예측을 도시한다. 전술한 바와 같이, 디코더는 복호화된 다른 픽쳐의 복원된 샘플들을 참조하여 현재 블록을 예측한다. 도 5를 참조하면, 디코더는 현재 블록(32)의 모션 정보에 기초하여 참조 픽쳐 내의 참조 블록(42)을 획득한다. 이때, 모션 정보는 참조 픽쳐 인덱스 및 모션 벡터(50)를 포함할 수 있다. 참조 픽쳐 인덱스는 참조 픽쳐 리스트에서 현재 블록의 참조 픽쳐를 지시한다. 또한, 모션 벡터(50)는 현재 픽쳐 내에서의 현재 블록(32)의 좌표값과 참조 픽쳐 내에서의 참조 블록(42)의 좌표값 간의 오프셋을 나타낸다. 디코더는 참조 블록(42)의 샘플 값들에 기초하여 현재 블록(32)의 예측자를 획득하고, 상기 예측자를 이용하여 현재 블록(32)을 복원한다.
한편, 본 발명의 실시예에 따르면 서브블록 기반의 모션 보상이 사용될 수 있다. 즉, 현재 블록(32)은 복수의 서브블록들로 분할되며, 각 서브블록 별로 독립된 모션 벡터가 사용될 수 있다. 따라서, 현재 블록(32) 내에서 각 서브블록은 서로 다른 참조 블록을 이용하여 예측될 수 있다. 일 실시예에 따르면, 서브블록은 4X4 또는 8X8과 같이 기 설정된 크기를 가질 수 있다. 디코더는 각 서브블록의 모션 벡터를 이용하여 현재 블록(32)의 각 서브블록의 예측자를 획득한다. 각 서브블록의 예측자를 조합하여 현재 블록(32)의 예측자가 획득될 수 있으며, 디코더는 이와 같이 획득된 현재 블록(32)의 예측자를 이용하여 현재 블록(32)을 복원할 수 있다.
본 발명의 실시예에 따르면, 다양한 방법의 서브블록 기반 모션 보상이 수행될 수 있다. 서브블록 기반의 모션 보상은 어파인(affine) 모델 기반의 모션 보상(이하, 어파인 모션 보상 또는 어파인 모션 예측)과 서브블록 기반의 시간적 모션 벡터 예측(Subblock-based Temporal Motion Vector Prediction, SbTMVP)을 포함할 수 있다. 이하, 각 도면을 참조로 어파인 모션 보상과 SbTMVP의 다양한 실시예들을 서술하도록 한다.
도 6은 본 발명의 일 실시예에 따른 모션 벡터 시그널링 방법을 예시하는 도면이다. 본 발명의 일 실시예에 따르면 모션 벡터(motion vector, MV)는 모션 벡터 예측(또는 예측자)(motion vector prediction(or predictor), MVP)에 기초하여 생성될 수 있다. 일 예로서, 다음의 수학식 1과 같이 MV는 MVP로 결정될 수 있다. 다시 말해, MV는 MVP와 동일한 값으로 결정(또는 설정, 유도)될 수 있다.
Figure PCTKR2020000964-appb-img-000001
다른 일 예로서, 다음의 수학식 2와 같이, MV는 MVP 및 모션 벡터 차분(motion vector difference, MVD)에 기초하여 결정될 수 있다. 인코더는 보다 정확한 MV를 나타내기 위해 MVD 정보를 디코더로 시그널링할 수 있고, 디코더는 획득된 MVD를 MVP에 가산함으로써 MV를 유도할 수 있다.
Figure PCTKR2020000964-appb-img-000002
본 발명의 일 실시예에 따르면, 인코더는 결정된 모션 정보를 디코더로 전송하고, 디코더는 수신된 모션 정보로부터 MV를 생성(또는 유도)하고 이를 기반으로 예측 블록을 생성할 수 있다. 예를 들어, 상기 모션 정보는 MVP 정보, MVD 정보를 포함할 수 있다. 이때, 인터 예측 모드에 따라 상기 모션 정보의 구성 요소가 달라질 수 있다. 일 예로서, 머지 모드에서 상기 모션 정보는 MVP 정보를 포함하고, MVD 정보를 포함하지 않을 수 있다. 다른 일 예로서, AMVP(advanced motion vector prediction) 모드에서 상기 모션 정보는 MVP 정보 및 MVD 정보를 포함할 수 있다.
MVP에 관한 정보를 결정, 송신, 수신하기 위해서 인코더와 디코더는 동일한 방법으로 MVP 후보(또는 MVP 후보 리스트)를 생성할 수 있다. 예를 들어, 인코더와 디코더는 동일한 순서로 동일한 MVP 후보를 생성할 수 있다. 그리고, 인코더는 생성된 MVP 후보들 중에서 결정된(또는 선택된) MVP를 나타내는(또는 지시하는) 인덱스를 디코더로 전송하고, 디코더는 수신된 인덱스를 기초로 결정된 MVP 및/또는 MV를 유도할 수 있다.
본 발명의 일 실시예에 따르면, MVP 후보는 공간 후보(spatial candidate), 시간 후보(temporal candidate) 등을 포함할 수 있다. 상기 MVP 후보는 머지 모드가 적용되는 경우 머지 후보로 지칭될 수 있고, AMVP 모드가 적용되는 경우 AMVP 후보로 지칭될 수 있다. 공간 후보는 현재 블록을 기준으로 특정 위치에 있는 블록에 대한 MV(또는 모션 정보)일 수 있다. 예를 들어, 상기 공간 후보는 현재 블록과 인접하거나 또는 인접하지 않은 위치의 블록의 MV일 수 있다. 시간 후보는 현재 픽쳐와 다른 픽쳐 내의 블록에 해당하는 MV일 수 있다. 또한, 예를 들어, MVP 후보는 어파인(affine) MV, ATMVP, STMVP, 전술한 MV(또는 후보)들의 조합, 전술한 MV(또는 후보)들의 평균 MV, 제로 MV 등을 포함할 수 있다.
일 실시예에서, 인코더는 참조 픽쳐를 나타내는 정보를 디코더로 시그널링할 수 있다. 실시예로서, MVP 후보의 참조 픽쳐와 현재 블록(또는 현재 처리 블록)의 참조 픽쳐가 상이한 경우, 인코더/디코더는 MVP 후보의 MV를 스케일링(motion vector scaling)을 할 수 있다. 이때, MV 스케일링은 현재 픽쳐의 픽쳐 순서 카운트(picture order count, POC), 현재 블록의 참조 픽쳐의 POC, MVP 후보의 참조 픽쳐의 POC를 기반으로 수행될 수 있다.
이하에서, MVD 시그널링 방법에 관한 구체적인 실시예를 설명한다. 아래의 표 1은 MVD 시그널링을 위한 신택스 구조를 예시한다.
Figure PCTKR2020000964-appb-img-000003
표 1을 참조하면, 본 발명의 일 실시예에 따르면, MVD는 MVD의 부호(sign) 및 절대값(absolute value)이 나누어서 코딩될 수 있다. 즉, MVD의 부호 및 절대값은 각각 다른 신택스(또는 신택스 엘리먼트)일 수 있다. 또한, MVD의 절대값은 그 값이 직접적으로 코딩될 수도 있고, 표 1과 같이 절대값이 N보다 큰지 여부를 나타내는 플래그에 기초하여 단계적으로 코딩될 수도 있다. 만약, 절대값이 N보다 큰 경우 (절대값 - N)의 값이 함께 시그널링 될 수 있다. 구체적으로, 표 1의 예시에서 절대값이 0보다 큰지를 나타내는 abs_mvd_greater0_flag가 전송될 수 있다. 만약, 절대값이 0보다 크지 않음을 abs_mvd_greater0_flag가 나타내는(또는 지시하는) 경우, MVD의 절대값은 0으로 결정될 수 있다. 또한, 만약 절대값이 0보다 큼을 abs_mvd_greater0_flag가 나타내는 경우, 추가 신택스(또는 신택스 엘리먼트)가 존재할 수 있다.
예를 들어, 절대값이 1보다 큰지를 나타내는 abs_mvd_greater1_flag가 전송될 수 있다. 만약, 절대값이 1보다 크지 않음을 abs_mvd_greater1_flag가 나타내는(또는 지시하는) 경우, MVD의 절대값은 1로 결정될 수 있다. 만약, 절대값이 1보다 큼을 abs_mvd_greater1_flag가 나타내는 경우, 추가 신택스가 존재할 수 있다. 예를 들어, abs_mvd_minus2가 존재할 수 있다. abs_mvd_minus2는 (절대값 - 2)의 값일 수 있다. abs_mvd_greater0_flag, abs_mvd_greater1_flag 값에 따라 절대값이 1보다 큰 것으로(즉, 2 이상인 것으로) 결정되었으므로, (절대값 - 2) 값이 시그널링될 수 있다. 이와 같이 절대값에 대한 정보를 계층적으로 신택스 시그널링함으로써, 절대값을 그대로 이진화(binarization)하여 시그널링하는 경우 대비 보다 적은 비트가 사용될 수 있다.
일 실시예에서, 상술한 절대값에 관련된 신택스는 지수 골롬(Exponential-Golomb), 절삭형 단항(truncated unary), 절삭형 라이스(truncated Rice) 등의 변수 길이(variable length)인 이진화 방법을 적용하여 코딩될 수 있다. 또한, MVD의 부호를 나타내는 플래그는 mvd_sign_flag를 통해 시그널링될 수 있다.
상술한 실시예에서, MVD에 대한 코딩 방법을 설명하였으나, MVD 이외의 정보도 부호 및 절대값을 나누어 시그널링 할 수 있다. 그리고, 절대값은 상기 절대값이 미리 정의된 특정 값보다 큰지 여부를 나타내는 플래그 및 절대값에서 상기 특정 값을 뺀 값으로 코딩될 수 있다. 상기 표 1에서 [0]과 [1]은 컴포넌트 인덱스(component index)를 나타낼 수 있다. 예를 들어, x-컴포넌트(즉, 수평 성분), y-컴포넌트(즉, 수직 성분)를 나타낼 수 있다.
도 7은 본 발명의 일 실시예에 따른 적응적인 모션 벡터 해상도(adaptive motion vector resolution) 정보의 시그널링 방법을 예시하는 도면이다. 본 발명의 일 실시예에 따르면, MV 또는 MVD를 나타내기 위한 해상도는 다양할 수 있다. 예를 들어, 해상도는 픽셀(pixel)(또는 펠(pel))을 기초로 표현될 수 있다. 예를 들어, MV 또는 MVD는 1/4(quarter), 1/2(half), 1(integer), 2, 4 픽셀 등의 단위로 시그널링될 수 있다. 그리고, 인코더는 MV 또는 MVD의 해상도 정보를 디코더로 시그널링할 수 있다. 또한, 예를 들어, 16은 1/4 단위일 때 64로 코딩되고(1/4 * 64 = 16), 1 단위일 때 16으로 코딩되고(1 * 16 = 16), 4 단위일 때 4로 코딩될 수 있다(4 *. 4 = 16). 즉, MV 또는 MVD 값은 다음의 수학식 3을 이용하여 결정될 수 있다.
Figure PCTKR2020000964-appb-img-000004
수학식 3에서, valueDetermined는 MV 또는 MVD 값을 나타낸다. 또한, valuePerResolution은 결정된 해상도를 기반으로 시그널링되는 값을 나타낸다. 이때, MV 또는 MVD로 시그널링하는 값이 결정된 해상도로 나누어 떨어지지 않는 경우, 라운딩(rounding) 프로세스 등이 적용될 수 있다. 높은 해상도를 사용하면 정확도가 높아질 수 있는 반면에 코딩되는 값이 크므로 많은 비트가 사용될 수 있고, 낮은 해상도를 사용하면 정확도가 낮아질 수 있는 반명에 코딩되는 값이 작으므로 적은 비트가 사용될 수 있다. 일 실시예로서, 상술한 해상도는 시퀀스, 픽쳐, 슬라이스, 코딩 트리 유닛(coding tree unit, CTU), 코딩 유닛(coding unit, CU) 등의 단위로 다르게 설정될 수 있다. 즉, 인코더/디코더는 상술한 단위들 중 미리 정의된 단위에 따라 적응적으로 해상도를 결정/적용할 수 있다.
본 명세서의 일 실시예에 따르면, 상술한 해상도 정보는 인코더에서 디코더로 시그널링될 수 있다. 이때, 해상도에 대한 정보는 앞서 설명한 변수 길이를 기반으로 이진화되어 시그널링될 수 있다. 이러한 경우, 가장 작은 값(즉, 가장 앞에 있는 값)에 해당하는 인덱스에 기초하여 시그널링되는 경우 시그널링 오버헤드가 줄어들 수 있다. 일 실시예로서, 높은 해상도부터 낮은 해상도 순서대로 시그널링 인덱스에 매핑될 수 있다.
본 명세서의 일 실시예에 따르면, 도 7은 다양한 여러 해상도 중 3가지 해상도가 사용되는 경우를 가정하여 시그널링 방법을 나타낸다. 이 경우, 3가지 시그널링 비트는 0, 10, 11일 수 있고, 상기 3가지 시그널링 인덱스는 각각 제1 해상도, 제2 해상도, 제3 해상도를 지칭할 수 있다. 제1 해상도를 시그널링하기 위해 1비트가 요구되고, 나머지 해상도를 시그널링하기 위해 2비트가 요구되기 때문에, 제1 해상도를 시그널링하는 경우 시그널링 오버헤드가 상대적으로 줄어들 수 있다. 도 7의 예시에서 제1 해상도, 제2 해상도, 제3 해상도는 각각 1/4, 1, 4 픽셀 해상도로 정의될 수 있다. 후술하는 실시예들에서 MV 해상도는 MVD의 해상도를 의미할 수 있다.
이하에서는, 모션 벡터 차분을 이용하는 머지 모드(merge mode with MVD, MMVD)(또는 머지 MVD)에 기반한 모션 보상 방법을 설명한다.
도 8은 본 발명의 일 실시예에 따른 코딩 유닛 신택스(coding unit syntax)를 예시하는 도면이다. 본 발명의 일 실시예에 따르면, MMVD가 적용되는지 여부를 지시하는 신택스 요소는 머지 모드가 적용되는지 여부를 지시하는 신택스 요소에 기초하여 시그널링될 수 있다. 도 8을 참조하면, S801 단계에서, MMVD 플래그는(mmvd_flag)는 머지 플래그(merge_flag)가 0인 경우(즉, 머지 모드를 사용하지 않는 경우) 시그널링될 수 있다. 도 8에서, MMVD 플래그는 MMVD가 적용되는지 여부를 지시하는 신택스 요소(또는 플래그)를 나타낸다. 그리고, 머지 플래그는 머지 모드가 적용되는지 여부를 지시하는 신택스 요소(또는 플래그)를 나타낸다.
본 발명의 일 실시예에 따르면, 인코더/디코더는 머지 모드가 적용되는 경우 모션 벡터 예측자(motion vector predictor, MVP) 및 모션 벡터 차분(motion vector difference, MVD)에 기초하여 모션 벡터(motion vector, MV)를 결정할 수 있다. 본 명세서에서, 상기 MVP는 베이스 모션 벡터(baseMV)로 지칭될 수 있다. 즉, 인코더/디코더는 베이스 모션 벡터에 모션 벡터 차분을 합산함으로써 모션 벡터(즉, 최종 모션 벡터)를 유도할 수 있다. 단 본 발명이 이러한 명칭에 제한되는 것은 아니며, 상기 MVP는 베이스 모션 벡터, 임시 모션 벡터, 초기 모션 벡터, MMVD 후보 모션 벡터 등으로 지칭될 수도 있다. 상기 MVD는 MVP를 개선(refine)하는 값으로 표현될 수 있고, 개선 모션 벡터(refineMV), 머지 모션 벡터 차분으로 지칭될 수 있다.
본 발명의 일 실시예에 따르면, MMVD가 적용되는 경우, 즉, MMVD 모드에서 MV는 베이스 모션 벡터, 거리(distance) 파라미터(또는 변수), 방향(direction) 파라미터(또는 변수)에 기초하여 결정될 수 있다. 또한, 본 발명의 일 실시예에 따르면 베이스 모션 벡터는 후보 리스트로부터 결정될 수 있다. 예를 들어, 베이스 모션 벡터는 머지 후보 리스트로부터 결정될 수 있다. 또한, 인코더/디코더는 다른 후보 리스트의 일부로부터 베이스 모션 벡터를 결정할 수 있다. 또한 상기 후보 리스트의 일부는 상기 후보 리스트의 앞부분 일부(인덱스가 작은 쪽)일 수 있다. 예를 들어, 인코더/디코더는 머지 후보 리스트의 후보들 중 첫 번째 및 두 번째 후보를 이용하여 베이스 모션 벡터를 결정할 수 있다. 이를 위해 상기 2개의 후보 중에서 특정 후보를 지시하는 후보 인덱스가 인코더에서 디코더로 시그널링될 수 있다. 도 21을 참조하면, 베이스 모션 벡터를 시그널링하는 인덱스인 베이스 후보 인덱스가 정의될 수 있다. 인코더/디코더는 상기 베이스 후보 인덱스에 따라 후보 리스트의 후보들 중에서 현재 블록에 적용되는 후보를 결정하고, 결정된 후보의 모션 벡터를 베이스 모션 벡터로 결정할 수 있다. 본 발명에서, 상기 베이스 후보 인덱스는 그 명칭에 제한되지 않으며, 상기 베이스 후보 인덱스는 베이스 후보 플래그, 후보 인덱스, 후보 플래그, MMVD 인덱스, MMVD 후보 인덱스, MMVD 후보 플래그 등으로 지칭될 수 있다.
또한, 본 발명의 일 실시예에 따르면, 도 6 및 도 7에서 설명한 MVD와 다른 MVD가 존재할 수 있다. 예를 들어, MMVD에서의 MVD는 도 6 및 도 7에서 설명한 MVD와 다르게 정의될 수 있다. 본 명세서에서, MMVD는 모션 벡터 차분을 이용하는 머지 모드(즉, 모션 보상 모드, 방법)를 나타낼 수도 있고, MMVD가 적용되는 경우의 모션 벡터 차분을 나타낼 수도 있다. 예를 들어, 인코더/디코더는 MMVD의 적용 여부(또는 사용 여부)를 결정할 수 있다. 만약 MMVD가 적용되는 경우, 인코더/디코더는 머지 후보 리스트로부터 현재 블록의 인터 예측에 이용되는 머지 후보를 유도하고, MMVD를 유도하여 상기 머지 후보의 모션 벡터에 적용(또는 가산)함으로써 현재 블록의 모션 벡터를 결정할 수 있다.
일 실시예에서, 상기 다른 MVD는 간략화된 MVD, 다른(또는 작은) 해상도를 갖는 MVD, 이용 가능한 수가 적은 MVD, 시그널링 방법이 상이한 MVD 등을 의미할 수 있다. 예를 들어, 도 6 및 도 7에서 설명한 기존 AMVP, 어파인 인터 모드 등에서 사용하는 MVD는 특정 시그널링 단위(예를 들어, x-펠(pel))에 대해 x, y 축(즉, 수평, 수직 방향)으로 모든 영역, 예를 들어, 픽쳐를 기초로한 영역(예를 들어, 픽쳐 영역 또는 픽쳐와 주변 영역을 포함한 영역)을 균일한 간격으로 모두 나타낼 수 있는 반면에, MMVD는 특정 시그널링 단위를 표현하는 단위가 상대적으로 제한적일 수 있다. 또한, MMVD를 시그널링하는 영역(또는 단위)이 균일한 간격을 갖지 않을 수 있다. 또한 MMVD는 특정 시그널링 단위에 대해 특정 방향만을 나타낼 수 있다.
또한, 본 발명의 일 실시예에 따르면, MMVD는 거리와 방향에 기초하여 결정될 수 있다. MMVD의 거리를 나타내는 거리 인덱스 및 MMVD의 방향을 나타내는 방향 인덱스에 따른 MMVD의 거리 및 방향이 기설정될 수 있다. 일 실시예에서, 거리는 특정 화소 단위의 MMVD 크기(예컨대, 절대값)를 나타낼 수 있고, 방향은 MMVD의 방향을 나타낼 수 있다. 또한 인코더/디코더는 상대적으로 작은 거리를 상대적으로 작은 인덱스로 시그널링할 수 있다. 즉, 고정 길이(fixed length) 이진화를 통한 시그널링이 아닌 경우 인코더/디코더는 상대적으로 작은 거리를 상대적으로 적은 비트로 시그널링할 수 있다.
본 발명의 일 실시예에서, MMVD 관련 신택스 요소들은 머지 플래그(즉, merge_flag)가 0인 경우(즉, 머지 모드를 사용하지 않는 경우) 시그널링될 수 있다. 앞서 설명한 것처럼 MMVD는 베이스 후보(base candidate)에 대한 MVD를 시그널링하는 방법일 수 있다. 이러한 점에서 MMVD 모드는 MVD를 시그널링하는 AMVP, 어파인(affine) AMVP(또는 어파인 인터) 등의 모드와 유사성을 가질 수 있다. 이에 따라 머지 플래그가 0인 경우 시그널링할 수 있다. S802 단계에서, 디코더는 현재 블록에 MMVD가 적용되는 경우, 즉, MMVD 플래그가 1인 경우, MMVD 관련 신택스 요소들을 파싱할 수 있다. 실시예로서, MMVD 관련 신택스 요소는 mmvd_merge_flag, mmvd_distance_idx, mmvd_direction_idx 중 적어도 하나를 포함할 수 있다. 여기서, mmvd_merge_flag는 MMVD의 베이스 후보를 지시하는 플래그(또는 신택스 요소)를 나타내고, mmvd_distance_idx는 MVD의 거리 값을 지시하는 인덱스(또는 신택스 요소)를 나타내고, mmvd_direction_idx는 MVD의 방향을 지시하는 인덱스(또는 신택스 요소)를 나타낸다.
또한, 도 8을 참조하면, CuPredMode는 현재 블록의 예측 모드를 나타내는 변수(또는 값)을 나타낸다. 또는, 현재 블록의 예측 모드는 현재 블록이 인트라 예측되는지 인터 예측되는지를 나타내는 값일 수 있다. 또는, 현재 블록의 예측 모드는 pred_mode_flag에 기초하여 결정될 수 있다. 여기서, pred_mode_flag는 현재 블록이 인터 예측 모드로 코딩되었는지 또는 인트라 예측 모드로 코딩되었는지를 나타내는 신택스 요소를 나타낸다. 만약, pred_mode_flag가 0인 경우 현재 블록의 예측 모드는 인터 예측을 사용하는 것을 나타내는 값으로 설정될 수 있다. 인터 예측을 사용하는 것을 나타내는 예측 모드 값은 MODE_INTER일 수 있다. 만약 pred_mode_flag가 1인 경우 현재 블록의 예측 모드는 인트라 예측을 사용하는 것을 나타내는 값으로 설정될 수 있다. 인트라 예측을 사용하는 것을 나타내는 예측 모드값은 MODE_INTRA일 수 있다. 만약, pred_mode_flag가 존재하지 않는 경우 CuPredMode는 기설정된 값으로 설정될 수 있다. 또한, 일 예로서, 상기 기설정된 값은 MODE_INTRA일 수 있다.
또한, 도 8을 참조하면, cu_cbf는 변환과 관련된 신택스가 존재하는지를 지시하는 값일 수 있다. 상기 변환과 관련된 신택스는 변환 트리 신택스 구조(transform tree syntax structure)일 수 있다. 또한 상기 변환과 관련된 신택스는 도 28의 변환 트리(transform_tree)를 통해 시그널링되는 신택스일 수 있다. 또한, cu_cbf가 0인 경우 변환과 관련된 신택스는 존재하지 않을 수 있다. cu_cbf가 1인 경우 변환과 관련된 신택스는 존재할 수 있다. 도 28을 참조하면, S803 단계에서, cu_cbf가 1인 경우, 디코더는 변환 트리 신택스를 호출할 수 있다. 만약, cu_cbf가 존재하지 않는 경우, cu_skip_flag에 기초하여 cu_cbf 값이 결정될 수 있다. 예를 들어 cu_skip_flag가 1인 경우 cu_cbf가 0일 수 있다. 또한 cu_skip_flag가 0인 경우 cu_cbf가 1일 수 있다. 전술한 바와 같이, cu_skip_flag는 스킵 모드 사용 여부를 나타내는 신택스 요소를 나타낸다. 그리고, 스킵 모드가 적용되는 경우, 레지듀얼(residual) 신호는 사용되지 않을 수 있다. 즉, 스킵 모드는 예측 신호(prediction signal)에 레지듀얼을 더하지 않고 복원하는 모드일 수 있다. 따라서, cu_skip_flag가 1이라는 것은 변환과 관련된 신택스가 존재하지 않는 것을 의미할 수 있다.
본 발명의 일 실시예에 따르면, S802 단계에서, 디코더는 인트라 예측을 사용하지 않는 경우 cu_cbf를 파싱할 수 있다. 또한, cu_skip_flag가 0인 경우 cu_cbf를 파싱할 수 있다. 또한, 디코더는 머지 플래그가 0인 경우 cu_cbf를 파싱할 수 있다. 또한 이러한 조건들은 결합하여 적용될 수 있다. 예를 들어, 디코더는 현재 블록의 예측 모드가 인트라 예측 모드가 아니고, 머지 플래그가 0인 경우 cu_cbf를 파싱할 수 있다. 또는, 디코더는 현재 블록의 예측 모드가 인터 예측 모드이고, 머지 플래그가 0인 경우 cu_cbf를 파싱할 수 있다. 이는 머지 모드가 아닌 인터 예측의 경우 스킵 모드를 사용할 수도 있고, 사용하지 않을 수도 있기 때문이다.
도 9는 본 발명의 일 실시예에 따른 코딩 유닛 신택스를 예시하는 도면이다. 본 발명의 실시예에 따르면, 앞서 설명한 도 8의 cu_cbf 및 변환 관련 신택스는 도 9에 도시된 바와 같이 변경될 수 있다. 즉, 본 발명의 일 실시예에 따르면, 특정 모드가 적용되는 경우, 스킵 모드 사용 여부가 결정될 수 있다. 예를 들어, MMVD가 적용하는 경우 스킵 모드 사용 여부가 결정될 수 있다. 일 실시예로서, 도 9를 참조하면, S901 단계에서, 디코더는 MMVD가 적용 여부에 기초하여 cu_cbf의 파싱 여부를 결정할 수 있다. 즉, MMVD 적용 여부에 따라 스킵 모드 사용 여부가 결정되므로, 그에 따라 cu_cbf의 파싱 여부가 결정될 수 있다. 스킵 모드 사용 여부가 명확한 경우 디코더는 cu_cbf를 파싱하지 않을 수 있다.
일 실시예에서, MMVD를 사용하는 경우, 인코더/디코더는 스킵 모드를 사용하지 않을 수 있다. MMVD는 MVD를 AMVP와 같이 정확히 나타낼 수 있지 않고, 앞서 설명한 것처럼 한정된 범위에서만 표현할 수 있기 때문에 레지듀얼을 이용하여 더 정확하게 복원할 수 있다. 따라서, MMVD 사용 여부에 기초하여 cu_cbf의 파싱 여부를 결정함으로써, 예측의 정확도를 높이고 압축 효율을 높일 수 있다. 예를 들어, MMVD를 사용하는 경우, 디코더는 cu_cbf를 파싱하지 않을 수 있다. 만약, MMVD를 사용하지 않는 경우, 디코더는 cu_cbf를 파싱할 수 있다. S901 단계에서, 디코더는 MMVD 플래그가 0인 경우 cu_cbf를 파싱할 수 있고, MMVD 플래그가 1인 경우 cu_cbf를 파싱하지 않을 수 있다.
본 발명의 일 실시예에서, cu_cbf가 존재하지 않는 경우 디코더는 cu_cbf 값을 추론할 수 있다. 도 8에서 설명한 방법에 따르면, 디코더는 cu_skip_flag 값에 기초하여 cu_cbf를 추론할 수 있다. 본 발명의 실시예를 따르면 머지 플래그에 기초하여 cu_cbf 값을 추론할 수 있다. 만약 머지 플래그가 0인 경우, 디코더는 cu_cbf를 1로 추론할 수 있다. 일 예로, 머지 모드를 사용하지 않는 경우, 변환과 관련된 신택스가 존재함을 나타낼 수 있다. 따라서, 도 8 내지 도 9의 실시예에서 MMVD를 사용하는 경우, 디코더는 cu_cbf를 1로 추론할 수 있다. 실시예로서, 디코더는 1) 머지 플래그가 1이고, cu_skip_flag가 1인 경우 cu_cbf를 0으로 추론하고, 2) 머지 플래그가 1이고, cu_skip_flag가 0인 경우 cu_cbf를 1로 추론하고, 3) 머지 플래그가 0인 경우 cu_cbf를 1로 추론할 수 있다. 또는, 도 8과 같이 실시예로서, 디코더는 1) cu_skip_flag가 1인 경우 cu_cbf를 0으로 추론하고, 2) cu_skip_flag가 0인 경우 cu_cbf를 1로 추론할 수 있다.
본 발명의 또 다른 실시예에 따르면, MMVD 플래그에 기초하여 cu_cbf 값을 추론할 수 있다. MMVD 플래그가 1인 경우 cu_cbf를 1로 추론할 수 있다. 또한 MMVD 플래그가 0인 경우에는 cu_cbf를 0이나 1로 추론할 수 있다. 도 28에서 설명한 추론 방법과 결합하면 1) MMVD 플래그가 1인 경우 cu_cbf를 1로 추론하고, 2) MMVD 플래그가 0인 경우, cu_skip_flag가 1인 경우 cu_cbf를 0으로 추론하고, 3) MMVD 플래그가 0인 경우, cu_skip_flag가 0인 경우 cu_cbf를 1로 추론할 수 있다.
또한, 일 실시예로서, 도 8 내지 도 9의 실시예에서 MMVD 플래그는 머지 데이터(merge_data) 신택스 내에 존재하지 않을 수 있다. 머지 데이터 신택스는 도 8 및지 도 9에 도시된 머지 데이터 신택스일 수 있다.
도 10은 본 발명의 일 실시예에 따른 머지 모드 시그널링 방법을 예시하는 도면이다. 본 발명의 일 실시예에서, 머지 모드는 도 10에 도시된 바와 같은 신택스 요소에 기초하여 시그널링될 수 있다. 도 10을 참조하면, 머지 모드는 정규 플래그(regular flag), MMVD 플래그, 서브블록 플래그(subblock flag) 및/또는 CIIP(combined inter-picture merge and intra-picture prediction) 플래그 중 적어도 하나에 기초하여 시그널링될 수 있다. 본 발명에서, CIIP는 인터 예측(예를 들면 머지 모드 인터 예측)과 인트라 예측을 결합한 예측 방법을 나타내고, 다중 가정 예측(multi-hypothesis prediction)으로 지칭될 수 있다.
도 10을 참조하면, 도 10(a) 및 (b)는 각각 스킵이 아닌 머지 모드 및 스킵인 머지 모드에 해당하는 경우를 나타낼 수 있다. 도 10의 실시예에서 앞서 설명한 도 8, 9의 머지 데이터 신택스(merge data syntax)와 다르게 정규 플래그(regular flag)가 존재할 수 있다. 일 예로, 트라이앵글(triangle flag)가 존재하지 않을 수 있다. 상기 정규 플래그는 종래의 머지 모드를 사용하는 것을 지시하는 신택스 요소일 수 있고, 본 발명에서, 상기 정규 플래그는 정규 머지 플래그로 지칭될 수도 있다. 기존의 머지 모드는 HEVC에서 사용한 것과 같은 머지 모드일 수 있다. 또한, 상기 종래의 머지 모드는 머지 인덱스에 의해 지시되는 후보를 사용하며 MVD를 사용하지 않고 움직임 보상을 수행하는 머지 모드일 수 있다. 일 실시예에서, 정규 플래그, MMVD 플래그, 서브블록 플래그, CIIP 플래그는 기설정된 순서대로 시그널링될 수 있다. MMVD 플래그는 MMVD 사용 여부를 나타내는 신택스 요소를 나타낸다. 서브블록 플래그는 서브블록 기반 예측이 수행되는 서브블록 모드의 사용 여부를 나타내는 신택스 요소를 나타낸다. CIIP 플래그는 CIIP 모드의 적용 여부를 나타내는 신택스 요소를 나타낸다.
본 발명의 일 실시예에서, 상기 정규 플래그, MMVD 플래그, 서브블록 플래그, CIIP flag 들 중에 해당 모드의 사용 여부를 지시하기 위한 시그널링 1이하일 수 있다. 따라서, 인코더/디코더는 상기 정규 플래그, MMVD 플래그, 서브블록 플래그, CIIP 플래그 중 1인 값이 발생하면, 디코딩 순서상 이후에 획득되는 플래그들은 0인 것으로 판단할 수 있다. 또한 상기 정규 플래그, MMVD 플래그, 서브블록 플래그, CIIP 플래그 가 모두 0인 경우 상기 정규 플래그, MMVD 플래그, 서브블록 플래그, CIIP 플래그가 나타내지 않는 모드가 사용되는 것일 수 있다. 상기 정규 플래그, MMVD 플래그, 서브블록 플래그, CIIP 플래그가 나타내지 않는 모드는 트라이앵글 예측(triangle prediction)일 수 있다. 즉, 일 실시예로서, 정규 플래그, MMVD 플래그, 서브블록 플래그, CIIP 플래그가 모두 0인 경우, 트라이앵글 예측 모드가 적용되는 것으로 결정될 수 있다.
도 11은 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 예시하는 도면이다. 도 11은 앞서 도 10에서 설명한 신택스 요소들이 이용되는 신택스 구조를 예시한다. 도 11에서, 정규 머지 플래그는 정규 머지 플래그를 나타낸다. 일 예로서, 상기 정규 머지 플래그는 앞서 도 10에서 설명한 정규 플래그일 수 있다.
본 발명의 일 실시예에 따르면, 정규 머지 플래그는 머지 데이터 신택스의 가장 앞에 위치할 수 있다. S1101 단계에서, 디코더는 머지 데이터 신택스 내에서 먼저 정규 머지 플래그를 파싱할 수 있다. 즉, 정규 머지 플래그는 머지 플래그가 1인 것을 확인한 뒤 파싱하는 첫 번째 신택스 요소일 수 있다. S1102 단계에서, 디코더는 정규 머지 플래그가 0인 경우 MMVD 플래그를 파싱할 수 있다. S1103, S1106, S1105 단계에서, 디코더는 정규 머지 플래그가 0인 경우 서브블록 머지 플래그, 다중 가정 플래그 및/또는 트라이앵글 머지 플래그 적어도 하나를 파싱할 수 있다. 도 11에서, merge_subblock_flag는 서브블록 머지 모드가 적용되는지 여부를 나타내는 서브블록 머지 플래그를 나타내고, mh_intra_flag는 다중 가정 예측 모드가 적용되는지 여부를 나타내는 다중 가정 예측 플래그를 나타내고, merge_triangle_flag는 트라이앵글 머지 모드가 적용되는지 여부를 나타내는 트라이앵글 머지 플래그를 나타낸다.
도 11을 참조하면, 디코더는 현재 블록이 미리 정의된 특정 블록 크기 조건을 만족하는 경우, MMVD 플래그를 파싱할 수 있다. 또한, 일 실시예에서, 트라이앵글 머지 플래그는 (!regular_merge_flag && !MMVD 플래그 && !merge_subbock_flag && !mh_intra_flag)로 정의될 수 있다. 즉, 정규 머지 플래그, MMVD 플래그, 서브블록 머지 플래그, 다중 가정 예측 플래그가 모두 0일 때 트라이앵글 머지 플래그는 1이고, 정규 머지 플래그, MMVD 플래그, 서브블록 머지 플래그, mh_intra_flag 중 하나라도 1일 때 트라이앵글 머지 플래그는 0일 수 있다.
도 12는 본 발명의 일 실시예에 따른 머지 데이터 신택스를 나타낸 도면이다. 도 12는 앞서 도 10에서 설명한 신택스 요소들이 이용되는 신택스 구조를 예시한다. 도 12를 참조하면, 본 발명의 일 실시예에서, 디코더는 먼저 정규 머지 플래그를 파싱하고, 파싱된 정규 머지 플래그가 1인 경우 머지 인덱스를 파싱할 수 있다(S1201). 또한, 디코더는 MaxNumMergeCand가 1보다 큰 경우 머지 인덱스를 파싱할 수 있다. 여기서, MaxNumMergeCand는 머지 후보의 최대 개수를 나타내는 변수이다. 또한, 디코더는 정규 머지 플래그가 0인 경우 MMVD 플래그, 서브블록 머지 플래그, 다중 가정 플래그 및/또는 트라이앵글 머지 플래그 중 적어도 하나를 파싱할 수 있다. 일 실시예에서, 트라이앵글 머지 플래그의 값은 앞서 도 10 및 도 11에서 설명한 방법에 의해 결정될 수 있다. 즉, 트라이앵글 머지 플래그는 다른 모드의 적용 여부를 지시하는 플래그 값에 기초하여 결정될 수 있다. 만약 트라이앵글 머지 플래그가 1인 경우 트라이앵글 예측과 관련된 신택스(또는 신택스 요소)를 파싱할 수 있다. 예를 들어, 디코더는 트라이앵글 머지 플래그가 1인 경우, 트라이앵글 머지 인덱스(즉, merge_triangle_idx)를 파싱할 수 있다.
도 11의 실시예와 같은 경우에는 정규 머지 모드(regular merge mode)에 필요한 머지 인덱스는 머지 데이터 신택스의 뒤쪽에 존재하고, 정규 머지 플래그및 머지 인덱스 사이에 예를 들면 MMVD 플래그, 서브블록 머지 플래그, 다중 가정 예측 플랙그 시그널링들이 존재하기 때문에 정규 머지 모드를 사용하는 경우 시그널링이 비효율적일 수 있다. 그러나 도 12의 실시예에서는 정규 머지 플래그가 1인 경우 정규 머지 플래그 다음에 곧 바로 머지 인덱스를 파싱할 수 있기 때문에, 정규 머지 모드와 관계없는 다른 시그널링들을 파싱할 필요가 없을 수 있고, 이에 따라 압축 효율이 향상될 수 있다.
또한, 본 발명의 일 실시예에 따르면, 여러 다양한 예측 모드들이 이용되는 경우, 예측 모드의 적용 조건을 기반으로 특정 예측 모드의 파싱 여부가 결정될 수 있다. 다음의 표 2를 참조하여 설명한다.
Figure PCTKR2020000964-appb-img-000005
표 2를 참조하면, 예측 모드로서, Mode A, Mode B, Mode C 가 존재하는 경우를 가정한다. 또한, Mode A, Mode B, Mode C 중 하나의 예측 모드만이 예측에 이용되는 경우를 가정한다. 또한, Mode A를 사용하기 위한 조건이 정의될 수 있고, Mode A를 사용하기 위한 조건은 A1, A2, A3일 수 있다고 가정한다. 본 실시예에서, A1, A2, A3를 모두 만족하는 경우, 인코더/디코더는 Mode A를 적용할 수 있다. 또한, Mode B를 사용하기 위한 조건은 B1, B2, B3일 수 있다고 가정한다. 본 실시예에서, B1, B2, B3를 모두 만족할 때 인코더/디코더는 Mode B를 적용할 수 있다. 또한, Mode C를 사용하기 위한 조건은 C1, C2, C3일 수 있고, C1, C2, C3를 모두 만족할 때 인코더/디코더는 Mode C를 적용할 수 있다. 임의의 예측 모드 X(Mode X)의 사용 여부를 나타내는 시그널링(또는 신택스 요소)은 mode_X_flag일 수 있다.
표 2를 참조하면, 디코더는 mode A, mode B, mode C 순서대로 현재 블록에 적용되는 예측 모드를 결정하기 위하여 관련 신택스를 파싱할 수 있다. 또는, 인코더는 표 2에 나타낸 바와 같이, mode_A_flag, mode_B_flag, mode_C_flag 순서대로 시그널링할 수 있다. 만약, 디코더는 Mode A를 사용하기 위한 조건을 만족시킬 경우 mode_A_flag를 파싱할 수 있다. 만약, mode_A_flag가 1인 경우 디코더는 mode A와 관련된 신택스를 파싱하고, 나머지 모드와 관련된 플래그 및 관련 신택스를 파싱하지 않을 수 있다. 만약, mode_A_flag가 0인 경우 mode B 또는 mode C를 사용할 가능성이 있을 수 있다. 따라서, 디코더는 mode B를 사용하기 위한 조건을 만족하는 경우, mode_B_flag를 파싱할 수 있다. 만약, mode_B_flag가 1인 경우 디코더는 mode B와 관련된 신택스를 파싱하고, 나머지 mode(즉, mode C)와 관련된 mode_X_flag 및 관련 신택스를 파싱하지 않을 수 있다. 만약, mode_B_flag가 0인 경우, 디코더는 mode C를 사용하는 것으로 판단할 수 있다. 즉 mode C에 해당하지 않는 mode_X_flag들이 모두 0인 경우, 디코더는 mode C를 사용하는 것으로 결정할 수 있다. 그리고, 디코더는 mode C와 관련된 신택스를 파싱할 수 있다.
또한, 본 발명의 일 실시예에 따르면, 여러 다양한 예측 모드들이 이용되는 경우, 예측 모드의 적용 조건을 기반으로 특정 예측 모드의 파싱 여부가 결정될 수 있다. 다음의 표 3을 참조하여 설명한다.
Figure PCTKR2020000964-appb-img-000006
표 3을 참조하면, 앞서 설명한 표 2에서와 같이, 예측 모드로서, Mode A, Mode B, Mode C가 정의될 수 있고, 예측 모드 사용 여부를 지시하는 신택스 요소(즉, mode_X_flag) 및/또는 관련 예측 모드 정보를 나타내는 신택스 요소가 정의될 수 있다. 또한, 임의의 모드 X를 사용하기 위한 조건인 X1, X2, X3 등이 정의될 수 있다. 앞서 설명한 표 2에서와 같이, mode A, mode B, mode C 순차적으로 적용 여부가 결정되고, 적용되는 경우 해당 예측 모드에 관련된 신택스 요소가 파싱될 수 있다.
이때 본 발명의 일 실시예에 따르면, 특정 예측 모드 보다 후 순위로 결정되는 예측 모드들이 모두 사용 불가한 경우, 인코더/디코더는 상기 특정 예측 모드를 사용하는 것으로 결정할 수 있다. 이 경우, 디코더는 상기 특정 예측 모드의 적용 여부를 지시하는 플래그(즉, 상기 특정 예측 모드가 모드 X인 경우의 mode_X_flag)를 파싱하지 않을 수 있다. 일 실시예에서, 예측 모드가 사용 불가한 것은 앞서 언급한 예측 모드를 사용하기 위한 조건을 만족하는지 여부에 따라서 결정될 수 있다. 예를 들어, 상대적으로 후순위로 사용 여부가 결정되는 mode B, mode C가 모두 사용 불가한 경우, 디코더는 mode_A_flag를 파싱하지 않을 수 있고, mode A를 사용하는 것으로 판단(또는 결정, 추론)할 수 있다.
상술한 표 2 및 표 3에서는, Mode A, mode B, mode C의 3개의 예측 모드가 적용되는 경우를 가정하여 설명하나, 본 발명이 이러한 예측 모드 개수에 제한되는 것은 아니며, 이외에 더 많은 예측 모드가 존재하는 경우에도 제안하는 방법을 사용하여 모드를 결정할 수 있다. 예를 들어, mode A, mode B, mode C, mode D가 이용 가능하다고 가정할 때, mode B, mode C, mode D를 모두 사용할 수 없는 경우 디코더는 별도의 시그널링(또는 파싱) 없이 mode A를 사용하는 것으로 판단할 수 있다. 또한, mode A를 사용하지 않는 것으로 판단한 후, mode C, mode D를 모두 사용 불가할 때 디코더는 mode B를 사용하는 것으로 판단할 수 있다.
표 3을 참조하면 임의의 예측 모드 X(즉, mode X)를 사용할 수 없는 조건은 X1, X2, X3 중 하나라도 만족시키지 않을 경우일 수 있다. 즉, !X1 || !X2 || !X3 인 경우 mode X를 사용할 수 없을 수 있다. 따라서, mode B 및 mode C를 모두 사용할 수 없는 경우는 ((!B1 || !B2 || !B3) && (!C1 || !C2 || !C3)) 조건을 만족시키는 경우를 나타낸다. 이러한 조건을 만족시키는 경우 디코더는 mode_A_flag를 파싱하지 않을 수 있고, 그 값을 1로 추론할 수 있다. 즉, 디코더는 mode A를 사용하는 것으로 판단할 수 있다. ((!B1 || !B2 || !B3) && (!C1 || !C2 || !C3)) 조건을 만족시키지 않는 경우 디코더는 mode_A_flag를 파싱할 수 있다. 이때 디코더는 mode A를 사용하기 위한 조건을 함께 고려할 수 있다. 즉, 디코더는 !((!B1 || !B2 || !B3) && (!C1 || !C2 || !C3)) 를 만족하고, (A1 && A2 && A3) 인 경우 mode_A_flag를 파싱할 수 있다. 다시 말해, mode B를 사용하기 위한 조건과 mode C를 사용하기 위한 조건 중 적어도 하나를 만족하는 경우, 디코더는 mode_A_flag를 파싱할 수 있다. (B1 && B2 && B3) 또는 (C1 && C2 && C3)인 경우, 디코더는 mode_A_flag를 파싱할 수 있다.
또한, 디코더는 mode_A_flag가 존재하지 않는 경우, (B1 && B2 && B3) 또는 (C1 && C2 && C3)일 때, mode_A_flag 값을 0으로 추론하고, 그렇지 않은 경우, 1로 추론할 수 있다. 즉, mode B 및 mode C를 모두 사용 불가한 경우, mode_A_flag가 존재하지 않는 경우, 디코더는 그 값을 1로(즉, mode A를 적용하는 것으로) 추론할 수 있다.
상술한 표 2 및 표 3에서는, mode A, mode B, mode C의 예측 모드가 선택적으로 적용되는 경우를 가정하여 설명하며, 상기 mode A, mode B, mode C는 본 발명에서 제안하는 다양한 여러 예측 모드들 중에서 특정 예측 모드들로 정의될 수 있다. 예를 들어, mode A, mode B, mode C는 각각 정규 머지 모드, CIIP 모드, 트라이앵글 머지 모드 중 어느 하나로 정의될 수 있다. 또는, 전술한 바와 같이, 상술한 표 2 및 표 3은 mode A, mode B, mode C, mode D가 정의되는 경우에도 적용될 수 있고, 예를 들어, mode A, mode B, mode C, mode D는 각각 정규 머지 모드, MMVD 모드, CIIP 모드, 트라이앵글 머지 모드 중 어느 하나로 정의될 수 있다.
도 13은 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 예시하는 도면이다. 본 발명의 실시예에 따르면, 앞서 표 2 및/또는 표 3에서 설명한 방법에 도 13에 적용될 수 있으며, 관련하여 중복되는 설명은 생략한다. 또한, 도 13은 도 10 및 도 11에 설명한 것과 같은 정규 머지 플래그에 관련된 실시예일 수 있다.
전술한 바와 같이, 본 발명의 일 실시예에 따르면, 디코딩 프로세스의 순서상 특정 모드 대비 상대적으로 사용 여부가 늦게 결정되는 모드들이 모두 사용 불가능한 경우, 디코더는 상기 특정 모드의 사용 여부를 나타내는 시그널링을 파싱하지 않고, 상기 특정 모드를 사용하는 것으로 판단(도는 결정, 추론)할 수 있다. 예를 들어, 서브블록 머지 모드의 사용 여부에 대한 결정 보다 상대적으로 후순위로 사용 여부에 대한 결정이 수행되는 모드들이 모두 사용 불가능한 경우 서브블록 머지 모드의 사용 여부를 나타내는 시그널링(또는 신택스 요소)는 파싱되지 않을 수 있다. 이 경우, 디코더는 신택스 파싱없이 서브블록 머지 모드를 사용하는 것으로 판단할 수 있다. 예를 들어, 상기 상대적으로 후순위로 사용 여부에 대한 결정이 수행되는 모드들은 다중 가정 예측, 트라이앵글 예측을 포함할 수 있다.
일 실시예에서, S1301 단계에서, MMVD의 사용 여부가 결정되는 것보다 사용 여부가 늦게 결정되는 모드들이 모두 사용 불가한 경우, 디코더는 MMVD의 사용 여부를 나타내는 시그널링을 파싱하지 않고, MMVD를 사용하는 것으로 판단할 수 있다. 예를 들어, 상기 사용 여부가 늦게 결정되는 모드들은 서브블록 머지 모드, 다중 가정 예측, 트라이앵글 예측을 포함할 수 있다.
또한, 상술한 실시예에서, 다중 가정 예측을 사용할 수 있는 조건(즉, 도 13에서 mh_intra_conditions)은 1) sps_mh_intra_enabled_flag, 2) cu_skip_flag[ x0 ][ y0 ] == 0, 3) 블록 크기 조건 중 적어도 하나를 포함할 수 있다. 일 예로서, 블록 크기 조건은 (( cbWidth * cbHeight ) >= 64 && cbWidth < 128 && cbHeight < 128)로 정의될 수 있다. 여기서, 상기 sps_mh_intra_enabled_flag는 현재 시퀀스에서 다중 가정 예측을 사용할 수 있는지 여부를 지시하는 신택스 요소를 나타내며, 예를 들어, 상기 신택스 요소는 시퀀스 파라미터 셋(SPS, sequence parameter set)을 통해 시그널링될 수 있다. 그리고, cbWidth 및 cbHeight는 각각 현재 블록(현재 코딩 블록)의 너비 및 높이를 나타내는 변수이다.
또한, 상술한 실시예에서, 트라이앵글 예측을 사용할 수 있는 조건(도 13에서 merge_triangle_conditions)은 1) sps_triangle_enabled_flag, 2) tile_group_type(또는 slice_type) == B, 3) 블록 크기 조건 중 적어도 하나를 포함할 수 있다. 일 예로서, 블록 크기 조건은 (cbWidth * cbHeight >= 64) 로 정의될 수 있다. 여기서, 상기 sps_triangle_enabled_flag는 현재 시퀀스에서 트라이앵글 예측을 사용할 수 있는지 여부를 지시하는 신택스 요소를 나타내며, 예를 들어, 상기 신택스 요소는 SPS을 통해 시그널링될 수 있다.
또한, 상술한 실시예에서, 서브블록 머지를 사용할 수 있는 조건(도 13에서 merge_subblock_conditions)은 1) MaxNumSubblockMergeCand > 0, 2) 블록 크기 조건 중 적어도 하나를 포함할 수 있다. 일 예로서, 블록 크기 조건은 (cbWidth >= 8 && cbHeight >= 8) 로 정의될 수 있다. 여기서, MaxNumSubblockMergeCand는 서브블록 머지 후보의 최대 개수를 나타내는 변수이다.
따라서, 일 실시예에서, 디코더는 (!mh_intra_conditions && !merge_triangle_conditions)인 경우, 서브블록 머지 플래그를 파싱하지 않을 수 있다. 또한, 디코더는 서브블록 머지 플래그가 존재하지 않는 경우, (!mh_intra_conditions && !merge_triangle_conditions)이면, 서브블록 머지 플래그를 1로 추론하고, 그렇지 않은 경우 0으로 추론할 수 있다.
또한, 일 실시예에서, 디코더는 (!merge_subblock_conditions && !mh_intra_conditions && !merge_triangle_conditions)인 경우 MMVD 플래그를 파싱하지 않을 수 있다. 또한 MMVD 플래그가 존재하지 않는 경우 (!merge_subblock_conditions && !mh_intra_conditions && !merge_triangle_conditions)이면 MMVD 플래그를 1로 추론하고, 그렇지 않은 경우 0으로 추론할 수 있다.
또한, 일 실시예에서, 디코더는 (!sps_mh_intra_enabled_flag && !sps_triangle_enabled_flag)인 경우 서브블록 머지 플래그를 파싱하지 않을 수 있고, 그 값을 1로 추론할 수 있다. 또는 cu_skip_flag가 1이고, tile_group_type(slice_type)이 B가 아닌 경우, 디코더는 서브블록 머지 플래그를 파싱하지 않을 수 있고, 그 값을 1로 추론할 수 있다. 또는, 너비 및 높이가 각각 128, 128이고, tile_group_type이 B가 아닌 경우, 디코더는 서브블록 머지 플래그를 파싱하지 않을 수 있고, 그 값을 1로 추론할 수 있다.
도 14는 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 예시하는 도면이다. 도 14에서 설명하는 실시예는 앞서 도 10 내지 13에서 설명한 내용이 적용될 수 있으며, 설명의 편의를 위해 중복되는 설명은 생략한다. 본 발명의 일 실시예에 따르면, 머지 모드는 정규 머지 모드, MMVD, 서브블록 머지 모드, CIIP 모드, 트라이앵글 머지 모드(또는 트라이앵글 분할 모드(TPM, triangle partitioning mode)) 등을 포함할 수 있다. 또한, 각각 모드가 사용(또는 적용)되는지 여부를 나타내는 시그널링(또는 신택스 요소)인 정규 머지 플래그, MMVD 플래그, 서브블록 머지 플래그, CIIP 플래그, 트라이앵글 머지 플래그가 존재할 수 있다. 전술한 바와 같이, 예측 모드는 MODE_INTRA, MODE_IBC, MODE_INTER를 포함할 수 있다. MODE_INTRA 및 MODE_IBC는 현재 블록을 포함한 현재 픽쳐를 이용한 예측 모드일 수 있다. 또한 MODE_INTRA는 앞서 설명한 인트라 예측일 수 있다. MODE_IBC는 모션 벡터 또는 블록 벡터를 이용한 예측 방법일 수 있다. MODE_INTER는 다른 픽쳐를 이용한 예측 방법일 수 있고, 앞서 설명한 인터 예측일 수 있다.
현재 예측 모드가 MODE_IBC이고 머지 플래그가 1인 경우, 디코더는 정규 머지 모드만을 사용할 수 있다(S1401). 또한 이러한 경우 정규 머지 플래그를 파싱하지 않을 수 있다. 디코더는 정규 머지 플래그를 1로 추론할 수 있다.
또한, 본 발명의 일 실시예에 따르면, 블록 크기(block size)에 기초하여 신택스 요소 파싱 여부가 결정될 수 있다. 예를 들어, 블록 크기에 기초하여 신택스 요소 파싱 여부가 결정될 수 있다. 예를 들어, 제1 모드, 제2 모드, 제3 모드, 제4 모드, 제5 모드 순서로 신택스 요소가 시그널링되는 경우, 제3 모드, 제4 모드, 제5 모드를 사용할 수 있는 블록 크기 조건이 제3 조건, 제4 조건, 제5 조건이 각각 있을 수 있다. 만약 제3 조건, 제4 조건, 제5 조건을 모두 만족시키지 않는 조건인 conditionA를 만족시킬 때는 디코더는 제3 모드, 제4 모드, 제5 모드에 관한 신택스 요소를 파싱하지 않고 사용하지 않는 것으로 추론할 수 있다. 또한 상기 conditionA를 만족시킬 때는 디코더는 제2 모드에 관련된 신택스 요소를 파싱하지 않고 제1 모드 신택스 요소에 기초하여 결정할 수 있다. 이 경우 만약 제1 모드를 사용하지 않는 것으로 결정, 추론되면 디코더는 제2 모드를 사용하는 것으로 결정, 추론할 수 있다. 그리고 기초하여 제2 모드를 사용하는 데에 필요한 신택스 요소를 파싱할 수 있다.
본 발명의 일 실시예에 따르면, 서브블록 머지 모드, CIIP, 트라이앵글 머지 모드를 사용할 수 있는 블록 크기 조건이 존재할 수 있다. 예를 들어, 도 13의 실시예에서 설명한 것과 같을 수 있다. 따라서 4x4, 8x4, 4x8 크기의 블록은 서브블록 머지 모드, CIIP, 트라이앵글 머지 모드를 사용할 수 없을 수 있다. 따라서 4x4, 8x4, 4x8 크기의 블록은 머지 플래그가 1인 경우 사용 가능한 모드가 정규 머지 모드와 MMVD만일 수 있다. 따라서 이 경우 디코더는 MMVD 플래그를 파싱하지 않을 수 있다. 또한 디코더는 이 경우 정규 머지 플래그에 기초하여 MMVD 플래그 값을 결정하거나 추론할 수 있다.
일 실시예에서, 디코더는 4x4 블록에 대하여 인터 예측을 수행하지 않을 수 있다. 따라서 이하에서 실시예들에서는 4x4 블록에 관련된 조건에 포함시키지 않고 설명할 수 있지만 4x4 인터 예측이 가능한 경우에도 본 발명의 실시예를 적용할 수 있다.
도 14를 참조하면 cbWidth 및 cbHeight가 각각 8, 4인 경우 또는 4, 8인 경우 디코더는 MMVD 플래그, 서브블록 머지 플래그, 다중 가정 예측 플래그를 파싱하지 않을 수 있다(S1402, S1403, S1404). 또한 도 14에 도시되지 않았으나 cbWidth, cbHeight가 4, 4인 경우에도 MMVD 플래그, 서브블록 머지 플래그, 다중 가정 예측 플래그를 파싱하지 않을 수 있다. 또한 이 경우 그 외의 MMVD, 서브블록 머지 모드, CIIP, 트라이앵글 관련 신택스 요소도 파싱하지 않을 수 있다.
또한 본 발명에서 cbWidth, cbHeight가 각각 4, 8이거나 8, 4인 것을 cbWidth+cbHeight가 12인 것으로 나타낼 수 있다. 즉, cbWidth+cbHeight가 12이거나 12 이하인 경우 MMVD 플래그, 서브블록 머지 플래그, mh_intra_flag를 파싱하지 않을 수 있다. 또한 본 발명은 예측 모드가 MODE_INTER인 경우에 적용할 수 있다.
본 발명의 일 실시예에 따르면, MMVD 사용 가능 여부를 나타내는 상위 레벨 시그널링이 존재할 수 있다. 상위 레벨 시그널링은 현재 블록을 포함하는 단위에서의 시그널링일 수 있다. 예를 들어 현재 블록의 상위 레벨은 CTU, 시퀀스, 픽쳐, 슬라이스, 타일, 타일 그룹 등일 수 있다. 예를 들어, MMVD 사용 가능 여부를 나타내는 상위 레벨 시그널링(또는 신택스 요소)은 SPS 레벨의 시그널링일 수 있다. 예를 들어, MMVD 사용 가능 여부를 나타내는 상위 레벨 시그널링은 sps_mmvd_enabled_flag일 수 있다. 상기 MMVD 사용 가능 여부를 나타내는 상위 레벨 시그널링은 MMVD를 사용할 수 있는지 여부를 나타낼 수 있다. 만약 상기 MMVD 사용 가능 여부를 나타내는 상위 레벨 시그널링이 0인 경우 디코더는 MMVD 관련 신택스 요소를 파싱하지 않을 수 있다. 또한 상기 MMVD 사용 가능 여부를 나타내는 상위 레벨 시그널링이 0인 경우 디코더는 MMVD 플래그를 0으로 추론할 수 있다. 상기 MMVD 사용 가능 여부를 나타내는 상위 레벨 시그널링이 1인 경우 MMVD 플래그는 블록에 따라 1일 수도 있고, 0일 수도 있다.
또한, 일 실시예에서, 서브블록 머지 모드 관련 신택스 요소는 서브블록 머지 플래그, 서브블록 머지 인덱스를 포함할 수 있다. 서브블록 머지 모드는 SbTMVP(서브블록 기반 시간 모션 벡터), 어파인 모션 보상(affine motion compensation) 모드를 포함할 수 있다. 또한 CIIP 관련 신택스 요소는 mh_intra_flag(CIIP 플래그), CIIP의 인터 예측 부분의 후보를 지시하는 인덱스를 포함할 수 있다. CIIP의 인터 예측 부분의 후보를 지시하는 인덱스는 머지 인덱스일 수 있다. 전술한 바와 같이, CIIP는 현재 픽쳐로부터 생성한 예측 신호와 다른 참조 픽쳐로부터 생성한 예측 신호을 기초로 예측을 수행하는 방법일 수 있고, 다중 가정 예측으로 지칭될 수 있다.
또한, 일 실시예에서, 트라이앵글 머지 모드(triangle merge mode) 관련 신택스 요소는 merge_triangle_split_dir, merge_triangle_idx0, merge_triangle_idx1을 포함할 수 있다. 트라이앵글 머지 모드는 현재 블록을 두 부분으로 나누어 두 부분이 각기 다른 모션 정보를 사용하는 예측 방법(또는 예측 모드)일 수 있다. 또한, 상기 두 부분은 각각 직사각형이 아닌 임의 다각형 형태를 가질 수 있다. 본 발명은, 이러한 명칭에 제한되지 않으며, 상기 트라이앵글 머지 모드는 다른 다양한 명칭을 가질 수 있다. 또한 merge_triangle_split_dir는 상기 두 부분이 어떻게 나누어지는지 지시하는 신택스 요소일 수 있다. 또한 merge_triangle_idx0 및 merge_triangle_idx1은 상기 두 부분이 각각 어떠한 모션 정보를 사용하는지를 지시하는 신택스 요소일 수 있다.
본 발명의 일 실시예에 따르면, MMVD 플래그가 존재하지 않는 경우가 있을 수 있다. 예를 들어, 도 14에서 설명한 것과 같이 MMVD 사용 가능 여부를 나타내는 상위 레벨 시그널링, 블록 크기 조건 등에 따라 MMVD 플래그가 존재하지 않는 경우가 있을 수 있다. 아래 실시예에서는 MMVD 플래그가 존재하지 않는 경우 추론하는 방법을 나타낼 수 있다. 본 발명의 일 실시예에 따르면, 특정 조건들을 만족하는 경우, 디코더는 MMVD 플래그를 1로 추론할 수 있다. 그리고 상기 특정 조건 중 적어도 하나를 만족하지 않는 경우 디코더는 MMVD 플래그를 0으로 추론할 수 있다.
일 실시예에서, 상기 특정 조건은 MMVD 사용 가능 여부를 나타내는 상위 레벨 시그널링(또는 신택스 요소)이 1인 경우를 포함할 수 있다. 전술한 바와 같이, 상기 상위 레벨 시그널링은 SPS, PPS, 슬라이스 헤더, 타일 그룹 헤더, CTU 중 어느 하나에 포함될 수 있다. 또한, 상기 특정 조건은 블록 크기 조건을 포함할 수 있다. 예를 들어, 블록 크기가 4x8 또는 8x4 또는 4x4인 경우를 포함할 수 있다. 즉, cbWidth + cbHeight가 12이거나 12 이하인 경우를 포함할 수 있다. 만약 4x4 인터 예측이 허용되지 않는 경우 4x4인 경우를 제외시킬 수 있다. 또한, 상기 특정 조건은 정규 머지 플래그가 0인 경우를 포함할 수 있다. 또한, 상기 특정 조건은 머지 플래그가 1인 경우를 포함할 수 있다.
또한, 일 실시예에서, 인코더/디코더는 MMVD 플래그가 존재하지 않는 경우, 1) sps_mmvd_enabled_flag가 1이고, 2) cbWidth+cbHeight가 12이고, 3) 정규 머지 플래그가 0이면 MMVD 플래그를 1로 추론할 수 있다. 또한 1), 2), 3) 중 적어도 하나를 만족시키지 않는 경우, 인코더/디코더는 MMVD 플래그를 0으로 추론할 수 있다.
또한, 본 발명의 일 실시예에 따르면, 디코더는 정규 머지 플래그가 존재하지 않는 경우, 미리 정의된 조건에 따라 그 값을 추론할 수 있다. 일 실시예에서, 디코더는 현재 블록의 예측 모드에 기초하여 정규 머지 플래그를 추론할 수 있다. 예를 들어, 디코더는 CuPredMode 값에 기초하여 정규 머지 플래그를 추론할 수 있다. 예를 들어, 디코더는 CuPredMode 값이 MODE_IBC인 경우 정규 머지 플래그를 1로 추론할 수 있다. 또한, 디코더는 CuPredMode 값이 MODE_INTER인 경우 정규 머지 플래그를 0으로 추론할 수 있다.
추가적인 실시예에 따르면, 디코더는 머지 플래그에 기초하여 정규 머지 플래그 값을 추론할 수 있다. 예를 들어, 머지 플래그가 1이고, CuPredMode가 MODE_IBC인 경우, 디코더는 정규 머지 플래그 값을 1로 추론할 수 있다. 또한, 머지 플래그가 0인 경우 정규 머지 플래그 값을 0으로 추론할 수 있다.
도 15는 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 나타낸 도면이다. 도 15의 실시예는 도 10 내지 도 13에서 설명한 실시예와 관련된 또 다른 실시예일 수 있다. 전술한 바와 같이, 본 발명의 실시예에서, 머지 모드로서 복수의 모드가 정의될 수 있다. 그리고, 어떤 모드를 사용하는지 시그널링하는 경우에 다수 모드에 대한 시그널링 순서와 다수의 모드를 사용 가능한 조건을 기초로 어떤 모드 사용 여부 또는 어떤 모드 사용 여부를 나타내는 시그널링 파싱 여부 또는 어떤 모드 사용 여부를 나타내는 시그널링 추론 방법 등이 결정될 수 있다.
본 발명의 일 실시예에 따르면, 제2 모드의 사용 가능 여부를 나타내는 상위 레벨 시그널링에 기초하여, 디코더는 제1 모드의 사용 여부를 나타내는 시그널링 파싱 여부를 결정할 수 있다. 또한 디코더는 제2 모드의 사용 가능 여부를 나타내는 상위 레벨 시그널링을 기초로 제1 모드의 사용 여부를 나타내는 시그널링 값을 추론할 수 있다. 이때, 제2 모드는 제1 모드 보다 사용 여부가 늦게 결정되는 모드일 수 있다.
보다 구체적인 실시예에서, 디코더는 MMVD 사용 가능 여부를 나타내는 상위 레벨 시그널링을 기초로 정규 머지 플래그 파싱 여부를 결정할 수 있다. 또한, 디코더는 MMVD 사용 가능 여부를 나타내는 상위 레벨 시그널링을 기초로 정규 머지 플래그 값을 추론(또는 결정)할 수 있다. 도 15를 참조하면, 일 예로서, 디코더는 sps_mmvd_enabled_flag가 1인 경우 정규 머지 플래그를 파싱할 수 있다(S1501).
또한, 일 실시예에서, 현재 블록의 크기를 기초로 특정 모드의 사용 여부를 나타내는 시그널링 파싱 여부를 결정할 수 있다. 또한, 현재 블록의 크기를 기초로 특정 모드 사용 여부를 나타내는 시그널링 값을 추론할 수 있다. 일 실시예에 따르면 상기 상기 현재 블록의 크기를 기초로 특정 모드 사용 여부를 나타내는 시그널링을 파싱하지 않은 경우에도 상기 특정 모드를 사용하는 경우가 있을 수 있다. 즉, 상기 특정 모드 사용 여부를 나타내는 시그널링 값은 1로 추론될 수 있다.
보다 구체적인 실시예에서, 디코더는 현재 블록의 크기를 기초로 정규 머지 플래그 파싱 여부를 결정할 수 있다. 예를 들어, 현재 블록의 크기가 4x8, 8x4보다 큰지 여부를 기초로 정규 머지 플래그 파싱 여부를 결정할 수 있다. 블록 크기가 4x8, 8x4보다 큰 것은 너비와 높이의 합이 12보다 큰 것일 수 있다. 도 15를 참조하면 cbWidth, cbHeight의 합이 12보다 큰 경우 정규 머지 플래그를 파싱할 수 있다(S1501). 또한 4x8과 8x4 이하의 블록 크기에서는 사용이 제한되는 모드가 있을 수 있다.
본 발명의 일 실시예에 따르면, 다수의 조건을 모두 만족하는 경우, 특정 모드 사용 여부를 나타내는 시그널링을 파싱하지 않을 수 있다. 또한 이때 특정 어떤 모드 사용 여부를 나타내는 시그널링을 1로 추론할 수 있다. 특정 모드 사용 여부를 나타내는 시그널링이 1인 것은 사용하는 것을 나타내는 것일 수 있다. 실시예로서, 상기 다수의 조건은 제1 모드와 다른 제2 모드 사용 가능 여부를 나타내는 상위 레벨 시그널링과 관련된 조건을 포함할 수 있다. 예를 들어, 상기 다수의 조건은 상기 제1 모드와 다른 제2 모드 사용 가능 여부를 나타내는 상위 레벨 시그널링이 0인 조건을 포함할 수 있다. 이때 상기 제2 모드는 상기 제1 모드 보다 사용 여부가 늦게 결정되거나 관련 신택스 요소가 뒤에 존재하는 모드일 수 있다.
보다 구체적인 실시예에서, 디코더는 특정 모드 사용 여부를 나타내는 시그널링은 정규 머지 플래그일 수 있다. 또한 상기 다수의 조건은 MMVD 사용 가능 여부를 나타내는 상위 레벨 시그널링 값이 0인 경우일 수 있다. 또한 상기 다수의 조건은 블록 크기와 관련된 조건을 포함할 수 있다. 예를 들어 상기 다수의 조건은 블록 크기가 임계치 이하인 조건을 포함할 수 있다. 블록 크기가 임계치 이하인 조건에서 상기 특정 모드보다 사용 여부가 늦게 결정되거나 관련 신택스 요소가 뒤에 존재하는 하나 이상의 다른 모드들이 사용 불가할 수 있다.
더 구체적으로 어떤 모드 사용 여부를 나타내는 시그널링은 정규 머지 플래그일 수 있다. 또한 상기 다수의 조건은 현재 블록의 너비와 높이의 합이 12이하인 경우를 포함할 수 있다. 또는 상기 다수의 조건은 현재 블록의 크기가 4x8 또는 8x4인 경우를 포함할 수 있다. 또한 4x4 인터 예측이 가능한 경우 상기 다수의 조건은 현재 블록 크기가 4x8 또는 8x4 또는 4x4인 경우를 포함할 수 있다.
따라서, 일 실시예에 따르면, MMVD 사용 가능 여부를 나타내는 상위 레벨 시그널링 값이 0이고, 현재 블록 크기가 4x8 또는 8x4인 경우 정규 머지 플래그를 파싱하지 않을 수 있다. 또한 이 경우 정규 머지 플래그 값을 1로 추론할 수 있다. 또한 MMVD 사용 가능 여부를 나타내는 상위 레벨 시그널링 값이 1이거나 현재 블록 크기가 4x8 또는 8x4보다 큰 경우 정규 머지 플래그를 파싱할 수 있다.
S1501 단계에서, sps_mmvd_enabled_flag가 1이거나 cbWidth+cbHeight > 12인 경우, 디코더는 정규 머지 플래그를 파싱할 수 있다. 또한 그렇지 않은 경우, 즉 sps_mmvd_enalbed_flag가 0이고, cbWidth+cbHeight <=12인 경우 정규 머지 플래그를 파싱하지 않을 수 있다.
상술한 실시예에서는, 앞서 도 10 내지 도 13에서 설명한 바와 같이, 정규 머지 플래그 이후에 존재하는 신택스 요소와 관련된 모드들의 사용 가능 조건과 연관있을 수 있다. 예를 들어 정규 머지 모드, MMVD, 서브블록 머지 모드, CIIP, 트라이앵글 머지 모드 순으로 시그널링되거나 모드를 결정할 때 상기 설명한 실시예에서 MMVD 사용 가능 여부를 나타내는 상위 레벨 시그널링이 0인 경우 디코더는 MMVD를 사용하지 않을 수 있다. 또한, 디코더는 블록 크기가 임계치 이하인 경우 서브블록 머지 모드, CIIP, 트라이앵글 머지 모드를 사용하지 않을 수 있다. 따라서 이러한 조건들을 모두 만족하는 경우, 디코더는 추가 시그널링 없이 정규 머지 모드를 사용하는 것으로 판단할 수 있다. 추가적으로 본 실시예는 MODE_INTER인 경우에 적용할 수 있다.
본 발명의 일 실시예에서, 도 15에서 바와 같이 미리 정의된 특정 조건들을 만족하는 경우, 정규 머지 플래그를 파싱하지 않는 경우가 있을 수 있고, 그러한 경우 디코더는 그 값을 1로 추론할 수 있다. 예를 들어 MMVD 사용 가능 여부를 나타내는 상위 레벨 시그널링 값이 0이고, 블록 크기가 4x8 또는 8x4인 경우 디코더는 정규 머지 플래그 값을 1로 추론할 수 있다. 또한 이는 머지 플래그가 1인 경우에 수행될 수 있다. 또한 이것은 CuPredMode가 MODE_INTER인 경우에 수행될 수 있다. 만약 사용 가능 여부를 나타내는 상위 레벨 시그널링 값이 1이거나 블록 크기가 4x8 또는 8x4보다 큰 경우 디코더는 정규 머지 플래그 값을 0으로 추론할 수 있다.
일 예로서, 정규 머지 플래그가 존재하지 않은 경우 디코더는 다음과 같은 조건에 따라 정규 머지 플래그를 추론할 수 있다. 구체적으로, sps_mmvd_enabled_flag가 0이고, cbWidth+cbHeight == 12인 경우, 디코더는 정규 머지 플래그를 1로 추론할 수 있다. 이때 만약 4x4 인터 예측이 허용되는 경우, cbWidth+cbHeight == 12 조건은 cbWidth+cbHeight <= 12로 바뀔 수 있다. 그렇지 않은 경우, 디코더는 정규 머지 플래그를 0으로 추론할 수 있다.
본 발명의 일 실시예에서, 트라이앵글 머지 플래그, 어파인 인터 플래그, 서브블록 머지 플래그가 모두 0인 경우, 현재 블록 전체에 대하여 동일한 모션 정보를 사용할 수 있다. 이러한 경우를 위하여 다음과 같은 모션 정보 유도 과정이 수행될 수 있다. 또한 이때 하나 이상이 조건을 만족하는 경우, 디코더는 dmvrFlag를 1로 설정할 수 있다.
- sps_dmvr_enabled_flag 이 1인 경우
- merge_flag[ xCb ][ yCb ] 이 1인 경우
- predFlagL0[ 0 ][ 0 ] 및 predFlagL1[ 0 ][ 0 ] 이 1인 경우
- mmvd_flag[ xCb ][ yCb ] 이 1인 경우
- DiffPicOrderCnt( currPic, RefPicList[ 0 ][ refIdxL0 ]) 과 DiffPicOrderCnt( RefPicList[ 1 ][ refIdxL1 ], currPic )이 동일한 경우
- cbHeight 이 8보다 크거나 같은 경우
- cbHeight*cbWidth 64보다 크거나 같은 경우
또한, 상기 모션 정보 유도 과정은 4x8 또는 8x4 크기의 블록에 대해서도 수행될 수 있다. 만약 4x8 또는 8x4 크기의 블록에 대해 양방향 예측(bi-prediction)인 경우, 디코더는 단방향 예측(uni-prediction)으로 전환할 수 있다.
또한, 본 발명의 실시예에서, 머지 플래그가 1이고 정규 머지 플래그가 1인 경우, 현재 블록 전체에 대하여 동일한 모션 정보를 사용할 수 있다. 또는, 머지 플래그가 1이고, MMVD 플래그가 1인 경우 현재 블록 전체에 대하여 동일한 모션 정보를 사용할 수 있다. 또는 머지 플래그가 1이고, CIIP 플래그가 1인 경우 현재 블록 전체에 대하여 같은 모션 정보를 사용할 수 있다. 또는 머지 플래그가 0이고, inter_affine_flag가 0인 경우 현재 블록 전체에 대하여 같은 모션 정보를 사용할 수 있다. 이때 이러한 경우를 위한 모션 정보 유도 과정이 수행될 수 있다. 또한 이때 미리 정의된 조건들 중에서 어느 하나 이상의 조건을 만족하면 디코더는 dmvrFlag를 1로 설정할 수 있다. 이때, 앞서 설명한 실시예의 조건들이 적용될 수 있다. 또한, 상기 모션 정보 유도 과정은 4x8 또는 8x4 크기의 블록에 대해서도 수행될 수 있다. 만약 4x8 또는 8x4 크기의 블록에 대해 양방향 예측(bi-prediction)인 경우, 디코더는 단방향 예측(uni-prediction)으로 전환할 수 있다.
본 발명의 일 실시예에 따르면, 머지 모드들 중 CIIP가 가장 마지막에 결정되거나 시그널링되는 모드일 수 있다. 예를 들어, 정규 머지 모드, MMVD, 서브블록 머지 모드, 트라이앵글 머지 모드, CIIP 순서대로 결정될 수 있다. 이러한 경우 CIIP를 사용할 수 있는 조건을 만족하지 못하는 경우, 디코더는 디코딩 순서(또는 신택스 파싱 순서) 상 앞서 결정되는 모드의 사용 여부 시그널링 파싱 없이 해당 모드를 결정할 수 있다. 예를 들어, 디코더는 이 경우 CIIP 바로 앞의 모드 사용 여부 시그널링을 파싱하지 않을 수 있다. 또한 이때 상기 바로 앞의 모드를 사용하는 것으로 판단할 수 있다. 예를 들어 이러한 경우는 cu_skip_flag가 1인 경우를 포함할 수 있다. 또는 이러한 경우는 cbWidth가 128 이상인 경우 또는 cbHeight가 128 이상인 경우일 수 있다. 또는 이러한 경우는 CIIP 사용 가능 여부를 나타내는 상위 레벨 시그널링, 예를 들어, sps_ciip_enabled_flag이 0인 경우를 포함할 수 있다.
도 16은 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 나타낸 도면이다. 도 16 내지 도 19의 실시예는 앞서 도 10 내지 도 13에서 설명한 실시예들가 적용될 수 있고, 관련하여 중복되는 설명은 생략한다. 전술한 바와 같이, 머지 모드들 중 CIIP가 가장 마지막에 결정되거나 시그널링되는 모드일 수 있다. 따라서, 디코더는 CIIP 플래그를 파싱하지 않고 CIIP 사용 여부를 결정할 수 있다. 예를 들어 CIIP보다 앞서 시그널링되는 모드들을 사용하지 않는 경우 CIIP를 사용하는 것으로 판단할 수 있다. 또한 CIIP 플래그는 다른 시그널링(또는 신택스 요소)부터 유도하는 값일 수 있다.
본 발명의 일 실시예에 따르면, 모드 사용 여부를 지시하는 시그널링이 다수 존재할 수 있다. 도 53을 참조하면 모드 사용 여부를 지시하는 시그널링으로 정규 머지 플래그, MMVD 플래그, 서브블록 머지 플래그, 트라이앵글 머지 플래그가 존재할 수 있다. 또한 정규 머지 플래그, MMVD 플래그, 서브블록 머지 플래그, 트라이앵글 머지 플래그는 파싱하는 경우가 존재할 수 있다. 예를 들어, 머지 플래그 값이 1인 경우 상기 모드 사용 여부를 지시하는 시그널링을 파싱할 수 있다. 또는 CuPredMode가 MODE_INTER인 경우 상기 모드 사용 여부를 지시하는 시그널링을 파싱할 수 있다. 또한 머지 플래그 값이 1인 경우 디코더는 정규 머지 플래그를 파싱할 수 있다.
또한, 정규 머지 플래그 값이 0인 경우 디코더는 MMVD 플래그를 파싱할 수 있다. 또한, 디코더는 sps_mmvd_enabled_flag 값이 1인 경우, MMVD 플래그를 파싱할 수 있다. 또한 디코더는 블록 크기 조건을 만족하는 경우, MMVD 플래그를 파싱할 수 있다. 예를 들어, 블록 크기가 4x8가 아니고 8x4가 아니고 4x4가 아닌 경우 MMVD 플래그를 파싱할 수 있다.
또한 정규 머지 플래그 값이 0인 경우 서브블록 머지 플래그를 파싱할 수 있다. 또한 MMVD 플래그 값이 0인 경우 서브블록 머지 플래그를 파싱할 수 있다. 또한 블록 크기 조건을 만족시킬 때 서브블록 머지 플래그를 파싱할 수 있다. 예를 들어, 블록 크기가 8x8 이상인 경우 서브블록 머지 플래그를 파싱할 수 있다. 또한 최대 서브블록 머지 후보 개수가 0보다 큰 경우 서브블록 머지 플래그를 파싱할 수 있다. 예를 들어, 최대 서브블록 머지 후보 개수가 0보다 큰 경우는 서브블록 머지 후보 리스트에 포함될 수 있는 후보 사용 여부에 대한 상위 레벨 시그널링 중 적어도 하나가 사용할 수 있음을 나타낼 수 있다. 예를 들어, sps_affine_enabled_flag 또는 sps_sbtmvp_enabled_flag가 1인 경우, 최대 서브블록 머지 후보 개수는 0보다 클 수 있다.
또한, 정규 머지 플래그 값이 0인 경우 트라이앵글 머지 플래그를 파싱할 수 있다. 또한, MMVD 플래그 값이 0인 경우 트라이앵글 머지 플래그를 파싱할 수 있다. 또한 서브블록 머지 플래그 값이 0인 경우 트라이앵글 머지 플래그를 파싱할 수 있다. 또한 블록 크기 조건을 만족시킬 때 트라이앵글 머지 플래그를 파싱할 수 있다. 예를 들어, 블록 크기가 (너비*높이>= 64) 조건을 만족시킬 때 트라이앵글 머지 플래그를 파싱할 수 있다. 또한 슬라이스 타입이 B인 경우 트라이앵글 머지 플래그를 파싱할 수 있다. 예를 들어, 슬라이스 타입이 B인 것은 하나의 샘플을 예측할 때 두 개 이상의 모션 정보를 사용할 수 있음을 의미할 수 있다. 또한 sps_triangle_enabled_flag 값이 1인 경우 디코더는 트라이앵글 머지 플래그를 파싱할 수 있다. 또한, 최대 트라이앵글 머지 후보 개수(MaxNumTriangleMergeCand) 값에 기초한 조건을 만족시키는 경우 트라이앵글 머지 플래그를 파싱할 수 있다. 예를 들어, 최대 트라이앵글 머지 후보 개수가 2 이상인 경우 디코더는 트라이앵글 머지 플래그를 파싱할 수 있다. 최대 트라이앵글 머지 후보 개수는 트라이앵글 머지 모드에서 사용할 수 있는 후보 리스트의 최대 개수(또는 길이)일 수 있다.
상술한 파싱 조건들을 만족하는 경우, 디코더는 시그널링을 파싱할 수 있다. 즉, 언급한 파싱할 수 있는 조건 중 어떤 것을 만족시키지 않으면 시그널링을 파싱하지 않을 수 있다. 또한 시그널링을 파싱하지 않는 경우 추론할 수 있다. 예를 들어 언급한 파싱할 수 있는 조건 중 어떤 것을 만족시키지 않으면 시그널링 값을 0으로 추론할 수 있다. 또 다른 예로 언급한 파싱할 수 있는 조건 중 어떤 것을 만족시키지 않으면 제1 모드 사용 여부 시그널링이 0인 경우 제2 모드 사용 여부 시그널링 값을 1로 추론할 수 있다. 또 다른 예로 언급한 파싱할 수 있는 조건 중 어떤 것을 만족시키지 않으면 제1 모드 사용 여부 시그널링이 1인 경우 제2 모드 사용 여부 시그널링 값을 0으로 추론할 수 있다.
또한 본 발명의 일 실시예에 따르면, CIIP 플래그가 존재하지 않는 경우 디코더는 그 값을 추론할 수 있다. 예를 들어, 하나 이상의 모드 사용 여부 시그널링 값에 기초하여 추론하는 값이 결정될 수 있다. 상기 모드 사용 여부 시그널링은 CIIP 사용 여부보다 먼저 결정되는 모드들에 대한 사용 여부 시그널링을 포함할 수 있다. 예를 들어 상기 모드 사용 여부 시그널링은 정규 머지 모드 사용 여부 시그널링, MMVD 사용 여부 시그널링, 서브블록 머지 모드 사용 여부 시그널링, 트라이앵글 머지 모드 사용 여부 시그널링을 포함할 수 있다. 또한 상기 모드 사용 여부 시그널링은 머지 모드 사용 여부 시그널링을 포함할 수 있다.
일 실시예에 따르면, 하나 이상의 모드 사용 여부 시그널링 값이 모두 0인 경우, 디코더는 CIIP 플래그 값을 1로 추론할 수 있다. 상기 하나 이상의 모드 사용 여부 시그널링은 정규 머지 플래그, MMVD 플래그, 서브블록 머지 플래그, 트라이앵글 머지 플래그를 포함할 수 있다. 따라서 정규 머지 플래그 == 0 && MMVD 플래그 == 0 && 서브블록 머지 플래그 == 0 && 트라이앵글 머지 플래그 ==0 인 경우 CIIP 플래그 값을 1로 추론할 수 있다. 또한 그렇지 않은 경우 CIIP 플래그 값을 0으로 추론할 수 있다.
일 실시예에 따르면, 하나 이상의 모드 사용 여부 시그널링 값이 모두 0이고, 머지 플래그가 1인 경우, 디코더는 CIIP 플래그 값을 1로 추론할 수 있다. 상기 하나 이상의 모드 사용 여부 시그널링은 정규 머지 플래그, MMVD 플래그, 서브블록 머지 플래그, 트라이앵글 머지 플래그를 포함할 수 있다. 따라서 정규 머지 플래그 == 0 && MMVD 플래그 == 0 && 서브블록 머지 플래그 == 0 && 트라이앵글 머지 플래그 ==0 && 머지 플래그 == 1 인 경우, 디코더는 CIIP 플래그 값을 1로 추론할 수 있다. 또한 그렇지 않은 경우, 디코더는 CIIP 플래그 값을 0으로 추론할 수 있다. 또한 모드 사용 여부 시그널링 값이 1인 것은 상기 모드를 사용하는 것을 나타내고, 모드 사용 여부 시그널링 값이 0인 것은 상기 모드를 사용하지 않는 것을 나타낼 수 있다.
도 17은 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 나타낸 도면이다. 도 17의 실시예는 도 16의 실시예를 기반으로 한 효율적인 시그널링 방법일 수 있고, 관련하여 중복되는 설명은 생략한다. 전술한 바와 같이, 머지 모드들 중 CIIP는 가장 마지막에 결정되거나 시그널링되는 모드일 수 있다. 일 실시예에 따르면, 이 경우, 잎서 도 10 내지 도 13에서 설명한 시그널링 방법을 사용할 수 있다. 도 17 내지 도 19의 실시예는 도 10 내지 도 13에서 설명한 방법의 구체적인 실시예일 수 있다.
본 발명의 일 실시예에 따르면, 모드 A, 모드 B, 모드 C, 모드 D 순서로 모드 사용이 결정되거나 시그널링되는 경우, 모드D를 사용할 수 없는 조건들이 존재할 수 있다. 만약, 모드 D를 사용할 수 없는 조건 중 적어도 하나를 만족시키면 디코더는 모드 C 사용 여부 시그널링을 파싱하지 않을 수 있다. 또한 모드 C 사용 여부 시그널링이 존재하지 않는 경우, 디코더는 그 값을 추론할 수 있다. 이때, 추론되는 값은 모드 D를 사용할 수 없는 조건, 모드 A 사용 여부 시그널링, 모드 B 사용 여부 시그널링에 기초할 수 있다. 또한 모드 D를 사용할 수 없는 조건 모두 만족시키지 않을 때 모드C 사용 여부 시그널링을 파싱할 수 있다. 또는 모드 D를 사용할 수 없는 조건 중 일부를 모두 만족하지 않는 경우, 디코더는 모드 C 사용 여부 시그널링(또는 신택스 요소)을 파싱할 수 있다. 모드D를 사용할 수 없는 조건이 다수 있을 때 그 중 일부만을 본 발명의 시그널링 방법에 사용할 수 있기 때문에 상기 조건들 중 일부일 수 있다. 예를 들어, 모드 C 사용 여부 시그널링을 파싱할 지 결정할 때 조건 확인을 줄이기 위해 일부의 조건만을 사용할 수 있다.
일 실시예에 따르면, 모드 D는 CIIP일 수 있다. 또한 모드 A, 모드 B, 모드 C는 각각 MMVD, 서브블록 머지 모드, 트라이앵글 머지 모드 일 수 있고, 이때 다른 순서로 모드 A, 모드 B, 모드 C를 구성하는 것도 가능하다. 도 17 내지 도 19의 도면은 모드 A, 모드 B, 모드 C가 각각 MMVD, 서브블록 머지 모드, 트라이앵글 머지 모드인 경우를 가정한다. 일 실시예에 따르면, 모드 D를 사용할 수 없는 조건은 모드 D 사용 가능 여부를 나타내는 상위 레벨 시그널링에 기초할 수 있다. 또한, 모드 D를 사용할 수 없는 조건은 블록 크기에 기초할 수 있다. 또한, 모드 D를 사용할 수 없는 조건은 cu_skip_flag에 기초할 수 있다. 또한, 모드 D를 사용할 수 없는 조건은 타일 그룹(또는 슬라이스) 타입에 기초할 수 있다. 또한, 모드 D를 사용할 수 없는 조건은 모드D에서 사용할 수 있는 후보의 최대 개수에 기초할 수 있다.
도 17을 참조하면 CIIP를 사용할 수 없는 조건은 sps_ciip_enabled_flag가 0인 경우, cu_skip_flag가 1인 경우, cbWidth가 128 이상인 경우, cbHeight가 128 이상인 경우를 포함할 수 있다. 따라서 본 발명의 실시예를 따르면 sps_ciip_enabled_flag가 0이거나 cu_skip_flag가 1이거나 cbWidth가 128 이상이거나 cbHeight가 128 이상인 경우 모드 C 사용 여부 시그널링을 파싱하지 않을 수 있다. 즉, 도 17의 실시예에서 sps_ciip_enabled_flag가 0이거나 cu_skip_flag가 1이거나 cbWidth가 128 이상이거나 cbHeight가 128 이상인 경우 트라이앵글 머지 플래그를 파싱하지 않을 수 있다. 또한 sps_ciip_enabled_flag가 1이고, cu_skip_flag가 0이고, cbWidth가 128보다 작고, cbHeight가 128보다 작을 때 모드C 사용 여부 시그널링을 파싱할 수 있다. 즉, 도 54의 실시예에서 sps_ciip_enabled_flag가 1이고, cu_skip_flag가 0이고, cbWidth가 128보다 작고, cbHeight가 128보다 작을 때 트라이앵글 머지 플래그를 파싱할 수 있다.
또한, 모드 C 사용 여부 시그널링을 파싱할 지 결정하는 경우, 모드 C를 사용할 수 있는 조건을 추가적으로 고려할 수 있다. 예를 들어, 모드 C의 사용할 수 있는 조건을 만족하는 경우, 모드 C 사용 여부 시그널링(또는 신택스 요소)을 파싱할 수 있다. 도 16을 참조하면 트라이앵글 머지 모드를 사용할 수 있는 조건은 sps_triangle_enabled_flag값이 1인 조건, tile_group_type이 B인 조건, cbWidth*cbHeight >=64인 조건을 포함할 수 있다.
본 발명의 일 실시예에서, 도 17에서 설명한 실시예와 관련된 추론 방법의 일 예를 설명한다. 본 실시예는 도 17에서 설명한 모드C 사용 여부 시그널링을 추론하는 방법일 수 있다. 또한 모드C 사용 여부 시그널링을 추론하는 것은 모드C 사용 여부 시그널링이 존재하지 않는 경우에 수행할 수 있다.
도 17의 실시예에서 모드D를 사용할 수 없는 조건 중 적어도 하나를 만족시키지 않을 때 모드C 사용 여부 시그널링을 파싱하지 않을 수 있었다. 본 발명의 일 실시예에 따르면, 다수의 조건을 만족시킬 때 모드C 사용 여부 시그널링 값을 1로 추론할 수 있다. 예를 들어, 1의 값은 사용 여부 중 사용하는 것을 나타내고, 0의 값은 사용하지 않는 것을 나타낼 수 있다. 또한 상기 다수의 조건은 모드D를 사용할 수 없는 조건 중 적어도 하나를 만족시키는 조건을 포함할 수 있다. 또한 상기 다수의 조건은 모드C를 사용할 수 있는 조건을 포함할 수 있다. 또한 상기 다수의 조건은 모드A 및 모드B 사용 여부 시그널링에 기초한 조건을 포함할 수 있다. 예를 들어 상기 다수의 조건은 모드A와 모드B 사용 여부 시그널링이 모두 사용하지 않는 것을 나타내는 경우를 포함할 수 있다. 또한 상기 다수의 조건 중 적어도 하나를 만족하지 않는 경우, 디코더는 모드 C 사용 여부 시그널링 값을 0으로 추론할 수 있다.
본 발명의 일 실시예에서, 디코더는 미리 정의된 조건에 기초하여 트라이앵글 머지 플래그 값을 추론할 수 있다. 일 예로서, 디코더는 sps_ciip_enabled_flag가 0이거나 cu_skip_flag가 1이거나 cbWidth가 128 이상이거나 cbHeight가 128 이상인 경우 트라이앵글 머지 플래그 값을 1로 추론할 수 있다. 예를 들어, sps_ciip_enabled_flag가 0이거나 cu_skip_flag가 1이거나 cbWidth가 128 이상이거나 cbHeight가 128 이상인 경우에만 디코더는 트라이앵글 머지 플래그 값을 1로 추론할 수 있다. 또한, 트라이앵글 머지 플래그 값을 1로 추론하기 위해 추가적인 조건을 만족시켜야할 수 있다. 예를 들어 상기 추가적인 조건은 정규 머지 플래그가 0인 조건, MMVD 플래그가 0인 조건, 서브블록 머지 플래그가 0인 조건을 포함할 수 있다. 또한, 상기 추가적인 조건은 머지 플래그가 1인 조건을 포함할 수 있다. 또한, 상기 추가적인 조건은 sps_triangle_enabled_flag가 1인 조건, tile_group_type이 B인 조건, cbWidth*cbHeight >=64인 조건을 포함할 수 있다. 또한 추가적인 조건을 모두 만족시킬 때 트라이앵글 머지 플래그 값을 1로 추론할 수 있다.
일 실시예에서, 다음 조건을 모두 만족시키는 경우 트라이앵글 머지 플래그 값은 1로 추론될 수 있다.
1) 정규 머지 플래그 == 0
2) MMVD 플래그 == 0
3) 서브블록 머지 플래그 == 0
4) sps_ciip_enabled_flag == 0 || cu_skip_flag == 1 || cbWidth >= 128 || cbHeight >= 128
5) sps_triangle_enabled_flag == 1 && tile_group_type == B && cbWidth*cbHeight >= 64
또는, 다른 일 실시예에서, 다음 조건을 모두 만족시키는 경우 트라이앵글 머지 플래그 값은 1로 추론될 수 있다.
1) 정규 머지 플래그 == 0
2) MMVD 플래그 == 0
3) 서브블록 머지 플래그 == 0
4) sps_ciip_enabled_flag == 0 || cu_skip_flag == 1 || cbWidth >= 128 || cbHeight >= 128
5) sps_triangle_enabled_flag == 1 && tile_group_type == B && cbWidth*cbHeight >= 64
6) 머지 플래그 == 1
또한, 일 실시예에서, 상술한 조건 중 어느 하나를 만족하지 않는 경우, 트라이앵글 머지 플래그 값은 0으로 추론될 수 있다. 예를 들어, sps_ciip_enabled_flag가 1이고, cu_skip_flag가 0이고, cbWidth < 128이고, cbHeight < 128인 경우 트라이앵글 머지 플래그 값을 0으로 추론될 수 있다. 또는, 정규 머지 플래그가 1인 경우 트라이앵글 머지 플래그 값을 0으로 추론될 수 있다. 또는, MMVD 플래그가 1인 경우 트라이앵글 머지 플래그 값을 0으로 추론될 수 있다. 또는, 서브블록 머지 플래그가 1인 경우 트라이앵글 머지 플래그 값을 0으로 추론될 수 있다. 또는 sps_triangle_enalbed_flag가 0이거나 tile_group_type이 B가 아니거나 cbWidth*cbHeight<64인 경우 트라이앵글 머지 플래그 값을 0으로 추론될 수 있다. 또는 머지 플래그가 0인 경우 트라이앵글 머지 플래그 값을 0으로 추론될 수 있다.
도 18은 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 나타낸 도면이다. 도 18의 실시예는 도 17에서 설명한 방법의 구체적인 실시예일 수 있다. 도 17의 설명에서 모드C 사용 여부 시그널링을 파싱할 지 결정할 때, 전술한 바와 같이 조건 확인을 줄이기 위해 일부의 조건만을 사용될 수 있다. 예를 들어 도 18의 실시예는 도 17에서 sps_ciip_enabled_flag를 확인하지 않는 방법일 수 있다.
예를 들어, cu_skip_flag가 1이거나 cbWidth >= 128이거나 cbHeight >= 128인 경우, 디코더는 트라이앵글 머지 플래그를 파싱하지 않을 수 있다. 또한 디코더는 이때 트라이앵글 머지 플래그 값을 1로 추론할 수 있다. 또는 디코더는 이 조건을 만족시킬 때에만 트라이앵글 머지 플래그 값을 1로 추론할 수 있다. 또한 앞서 설명한 것처럼 추가적인 조건을 만족시킬 때 디코더는 1로 추론할 수 있다. 또한 cu_skip_flag가 0이고, cbWidth < 128이고, cbHeight <128인 경우, 디코더는 트라이앵글 머지 플래그를 파싱할 수 있다. 또한 cu_skip_flag가 0이고, cbWidth < 128이고, cbHeight <128인 경우에 트라이앵글 머지 플래그가 존재하지 않으면 디코더는 그 값을 0으로 추론할 수 있다.
본 실시예는 앞서 설명한 도 17의 실시예 대비 신택스 요소 파싱 과정에서 조건 확인 연산을 줄일 수 있는 장점이 있을 수 있다. 앞서 언급한 것처럼 모드 시그널링 순서가 다르게 구성되는 경우 트라이앵글 머지 플래그 대신 다른 시그널링에 본 발명을 적용할 수 있다.
도 19는 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 예시하는 도면이다. 도 19의 실시예는 도 17에서 설명한 방법의 구체적인 실시예일 수 있다. 도 17의 설명에서 모드 C 사용 여부 시그널링을 파싱할 지 결정할 때 조건 확인을 줄이기 위해 일부의 조건만을 사용하는 것에 대해 언급하였고, 도 19는 이를 예시할 수 있다. 예를 들어 도 19의 실시예는 도 17에서 sps_ciip_enabled_flag를 확인하지 않는 방법이고, cbWidth가 128보다 작은지 여부 및 cbHeight가 128보다 작은지 여부를 확인하지 않는 방법일 수 있다.
예를 들어, cu_skip_flag가 1인 경우, 디코더는 트라이앵글 머지 플래그를 파싱하지 않을 수 있다. 또한, 디코더는 이때 디코더는 트라이앵글 머지 플래그 값을 1로 추론할 수 있다. 또는, 디코더는 이 조건을 만족시킬 때에만 트라이앵글 머지 플래그 값을 1로 추론할 수 있다. 또한, 디코더는 앞서 설명한 것처럼 추가적인 조건을 만족시킬 때 1로 추론할 수 있다. 또한 cu_skip_flag가 0인 경우 트라이앵글 머지 플래그를 파싱할 수 있다. 또한 cu_skip_flag가 0인 경우, 디코더는 트라이앵글 머지 플래그가 존재하지 않으면 그 값을 0으로 추론할 수 있다.
본 실시예는 앞서 설명한 도 17의 실시예 대비 신택스 요소 파싱 과정에서 조건 확인 연산을 줄일 수 있는 장점이 있을 수 있다. 앞서 언급한 것처럼 모드 시그널링 순서가 다르게 구성되는 경우 트라이앵글 머지 플래그 대신 다른 시그널링에 본 발명을 적용할 수 있다.
도 20은 본 발명의 일 실시예를 따른 머지 데이터 신택스 구조를 예시하는 도면이다. 도 20의 실시예는 도 17에서 설명한 방법의 구체적인 실시예일 수 있다. 도 20 내지 도 24의 실시예는 앞서 설명한 발명의 구체적인 실시예일 수 있다. 예를 들어, 도 20 내지 도 24의 실시예는 도 10 내지 도 13에서 설명한 실시예들과 관련있을 수 있고, 관련하여 중복되는 설명은 생략한다.
도 20을 참조하면 도 20 이하의 발명에서 MMVD 사용 여부를 나타내는 시그널링은 mmvd_merge_flag일 수 있다. 즉, 앞서 설명한 실시예에서의, MMVD 플래그는 이하의 설명에서 mmvd_merge_flag로 지칭될 수 있다. 또한 도 20 이하의 발명에서 MMVD의 베이스 후보를 나타내는 시그널링은 mmvd_cand_flag일 수 있다. 즉, 이전에 mmvd_merge_flag로 언급했던 것이 도 20 이하에서 mmvd_cand_flag일 수 있다. 또한 slice type에 대한 것은 tile group type에 적용될 수 있고, 그 반대도 가능하다. 또한 slice type과 tile group type을 나타내는 값은 각각 slice_type, tile_group_type일 수 있다. 또한 앞서 설명한 머지 모드 사용 여부를 나타내는 시그널링은 general_merge_flag일 수 있다. 즉, 앞서 머지 플래그로 설명한 것은 general_merge_flag에 대한 것일 수 있고, general_merge_flag로 설명한 것을 머지 플래그에 대해 적용할 수 있다.
본 발명의 일 실시예에 따르면, 다양한 머지 모드 중 가장 나중에 시그널링되는 것은 서브블록 머지 모드일 수 있다. 앞서 설명한 것처럼 상기 다양한 머지 모드는 정규 머지 모드, MMVD, CIIP, 트라이앵글 머지 모드, 서브블록 머지 모드 등을 포함할 수 있다. 또한 다양한 머지 모드 중 서브블록 머지 모드 바로 앞에 시그널링 되는 것은 트라이앵글 머지 모드일 수 있다.
도 20을 참조하면, 인코더/디코더는 머지 데이터 신택스에서 정규 머지 모드, MMVD, CIIP, 트라이앵글 머지 모드, 서브블록 머지 모드 순서대로 시그널링/파싱할 수 있다. 본 발명의 일 실시예에 따르면, general_merge_flag에 기초하여 정규 머지 플래그 파싱 여부를 결정할 수 있다. 본 명세서에서, general_merge_flag는 일반 머지 플래그로 지칭될 수 있다. 본 발명의 일 실시예에 따르면, general_merge_flag가 1인 경우 정규 머지 플래그를 파싱하는 것이 가능할 수 있다. 이때 파싱하기 위한 추가적인 조건이 필요할 수 있다. 또한 general_merge_flag가 0인 경우 정규 머지 플래그를 파싱할 수 없을 수 있다. 이때 general_merge_flag가 0인 경우 다른 조건과 상관없이 정규 머지 플래그를 파싱할 수 없을 수 있다. 본 발명의 일 실시예에 따르면, general_merge_flag가 1인 경우 도 20의 merge_data structure 부분을 파싱할 수 있다.
본 발명의 일 실시예에 따르면, 디코더는 general_merge_flag에 기초하여 mmvd_merge_flag 파싱 여부를 결정할 수 있다. 본 발명의 일 실시예에 따르면, general_merge_flag가 1인 경우 mmvd_merge_flag를 파싱할 수 있다. 이때 파싱하기 위한 추가적인 조건이 필요할 수 있다. 또한, general_merge_flag가 0인 경우 mmvd_merge_flag를 파싱할 수 없을 수 있다. 이때 general_merge_flag가 0인 경우 다른 조건과 상관없이 mmvd_merge_flag를 파싱할 수 없을 수 있다.
본 발명의 일 실시예에 따르면, general_merge_flag에 기초하여 CIIP 플래그 파싱 여부를 결정할 수 있다. 본 발명의 일 실시예에 따르면, general_merge_flag가 1인 경우 CIIP 플래그를 파싱하는 것이 가능할 수 있다. 이때 파싱하기 위한 추가적인 조건이 필요할 수 있다. 또한 general_merge_flag가 0인 경우 CIIP 플래그를 파싱할 수 없을 수 있다. 이때 general_merge_flag가 0인 경우 다른 조건과 상관없이 CIIP 플래그를 파싱할 수 없을 수 있다.
본 발명의 일 실시예에 따르면, general_merge_flag에 기초하여 트라이앵글 머지 플래그 파싱 여부를 결정할 수 있다. 본 발명의 일 실시예에 따르면, general_merge_flag가 1인 경우 트라이앵글 머지 플래그를 파싱하는 것이 가능할 수 있다. 이때 파싱하기 위한 추가적인 조건이 필요할 수 있다. 또한 general_merge_flag가 0인 경우 트라이앵글 머지 플래그를 파싱할 수 없을 수 있다. 이때 general_merge_flag가 0인 경우 다른 조건과 상관없이 트라이앵글 머지 플래그를 파싱할 수 없을 수 있다.
본 발명의 일 실시예에 따르면, 디코더는 정규 머지 플래그에 기초하여 mmvd_merge_flag 파싱 여부를 결정할 수 있다. 본 발명의 일 실시예에 따르면, 정규 머지 플래그가 0인 경우 mmvd_merge_flag를 파싱하는 것이 가능할 수 있다. 이때 파싱하기 위한 추가적인 조건이 필요할 수 있다. 또한 정규 머지 플래그가 1인 경우 mmvd_merge_flag를 파싱할 수 없을 수 있다. 이때 정규 머지 플래그가 1인 경우 다른 조건과 상관없이 mmvd_merge_flag를 파싱할 수 없을 수 있다.
본 발명의 일 실시예에 따르면, 디코더는 mmvd_merge_flag에 기초하여 CIIP 플래그 파싱 여부를 결정할 수 있다. 본 발명의 일 실시예에 따르면, mmvd_merge_flag가 0인 경우 CIIP 플래그를 파싱하는 것이 가능할 수 있다. 이때 파싱하기 위한 추가적인 조건이 필요할 수 있다. 또한 mmvd_merge_flag가 1인 경우 CIIP 플래그를 파싱할 수 없을 수 있다. 이때 mmvd_merge_flag가 1인 경우 다른 조건과 상관없이 CIIP 플래그를 파싱할 수 없을 수 있다.
본 발명의 일 실시예에 따르면, CIIP 플래그에 기초하여 트라이앵글 머지 플래그 파싱 여부를 결정할 수 있다. 본 발명의 일 실시예에 따르면, CIIP 플래그가 0인 경우 트라이앵글 머지 플래그를 파싱하는 것이 가능할 수 있다. 이때 파싱하기 위한 추가적인 조건이 필요할 수 있다. 또한 CIIP 플래그가 1인 경우 트라이앵글 머지 플래그를 파싱할 수 없을 수 있다. 이때 CIIP 플래그가 1인 경우 다른 조건과 상관없이 트라이앵글 머지 플래그를 파싱할 수 없을 수 있다.
본 발명의 일 실시예에 따르면, 트라이앵글 머지 플래그에 기초하여 서브블록 머지 플래그 파싱 여부를 결정할 수 있다. 본 발명의 일 실시예에 따르면, 트라이앵글 머지 플래그가 0인 경우 서브블록 머지 플래그를 파싱하는 것이 가능할 수 있다. 이때 파싱하기 위한 추가적인 조건이 필요할 수 있다. 또한 트라이앵글 머지 플래그가 1인 경우 서브블록 머지 플래그를 파싱할 수 없을 수 있다. 이때 트라이앵글 머지 플래그가 1인 경우 다른 조건과 상관없이 서브블록 머지 플래그를 파싱할 수 없을 수 있다.
본 발명의 또다른 실시예를 따르면, 다양한 머지 모드 중 가장 나중에 시그널링되는 것은 사용 여부를 나타내는 값을 파싱 없이 결정할 수 있다. 예를 들어 도 20을 참조하면 서브블록 머지 플래그는 파싱 없이 결정될 수 있다. 예를 들어 다음과 같은 조건들을 모두 만족할 때 서브블록 머지 플래그는 1로 결정될 수 있다.
1) general_merge_flag == 1
2) 다양한 머지 모드 중 서브블록 머지 모드보다 앞에 시그널링 되는 모든 모드들을 사용하지 않는 경우
3) 서브블록 머지 모드를 사용할 수 있는 조건을 만족하는 경우
또한 그렇지 않은 경우(즉, 위 조건 들 중에서 적어도 하나를 만족하지 않는 경우) 서브블록 머지 플래그를 0으로 결정할 수 있다.
예를 들어, 상기 조건 중 “2) 다양한 머지 모드 중 서브블록 머지 모드보다 앞에 시그널링 되는 모든 모드들을 사용하지 않는 경우”는 다음 조건과 같이 정의될 수 있다(또는 다음 조건을 포함할 수 있다).
(regular_merge_flag == 0 && mmvd_merge_flag == 0 && ciip_flag == 0 && merge_triangle_flag == 0)
또한 상기 조건 중 “3) 서브블록 머지 모드를 사용할 수 있는 조건을 만족하는 경우”은 다음 조건과 같을 수 있다(또는 다음 조건을 포함할 수 있다).
( MaxNumSubblockMergeCand > 0 && cbWidth >= 8 && cbHeight >= 8)
또는 상기 조건 중 “3)”은 다음 조건과 같을 수 있다(또는 다음 조건을 포함할 수 있다.).
(서브블록 머지 모드에 포함될 수 있는 방법 중 적어도 하나가 enabled인 경우 && cbWidth >= 8 && cbHeight >= 8)
또한, 여기서 서브블록 머지 모드에 포함될 수 있는 방법은 어파인 모션 보상(affine motion compensation), 서브블록 기반 시간 모션 벡터 예측자(subblock-based temporal motion vector prediction)을 포함할 수 있다. 또한 어파인 모션 보상 과 서브블록 기반 시간 모션 벡터 예측자가 이용 가능한지 여부를 지시하는 상위 레벨 시그널링은 각각 sps_affine_enabled_flag, sps_sbtmvp_enabled_flag로 정의될 수 있다. 본 실시예에서, 상기 조건들에서 너비, 높이에 대해 구체적인 값을 예로 들어 설명하였으나, 본 발명이 이에 제한되는 것은 아니며, 일반적인 블록 크기를 기초로하는 조건일 수 있다.
도 21은 본 발명의 일 실시예를 따른 머지 데이터 신택스 구조를 예시하는 도면이다. 도 21의 실시예는 앞서 설명한 도 20의 실시예에 더 효율적인 시그널링 방법을 추가한 것일 수 있다. 본 발명의 일 실시예에 따르면, 다양한 모드 중 어떤 모드는 상기 어떤 모드보다 나중에 시그널링되는 하나 이상의 모드 모두에 대해 사용 가능한 조건을 만족시키지 못 하는 경우 상기 어떤 모드는 사용 여부를 명시적으로 시그널링하지 않고 결정할 수 있다. 예를 들어 상기 어떤 모드를 사용하는지 나타내는 시그널링을 파싱하지 않을 수 있다.
예를 들어, 도 21과 같이 시그널링되는 신택스 구조(syntax structure)에서 서브블록 머지 모드를 사용 가능한 조건을 만족시키지 못 하는 경우 트라이앵글 머지 모드는 사용 여부를 명시적 시그널링(explicit signaling)하지 않고 사용 가능 여부를 결정할 수 있다. 예를 들어, 서브블록 머지 모드를 사용 가능한 조건을 만족시키지 못 하는 경우 트라이앵글 머지 플래그를 파싱하지 않을 수 있다. 일 실시예로서, 서브블록 머지 모드를 사용 가능한 조건은 도 20의 서브블록 머지 모드를 사용할 수 있는 조건을 만족하는 경우와 같을 수 있다(또는 다음 조건을 포함할 수 있다.).
따라서 도 21을 참조하면, 디코더는 MaxNumSubblockMergeCand가 0인 경우 트라이앵글 머지 플래그를 파싱하지 않을 수 있다. 여기서, MaxNumSubblockMergeCand는 서브블록 머지 후보의 최대 개수를 나타내는 변수이다. 또는 디코더는 블록 크기에 기초하여 트라이앵글 머지 플래그를 파싱하지 않을 수 있다. 또는 디코더는 cbWidth가 8보다 작은 경우 트라이앵글 머지 플래그를 파싱하지 않을 수 있다. 즉, cbWidth가 4인 경우(또는 4 이하인 경우) 디코더는 트라이앵글 머지 플래그를 파싱하지 않을 수 있다. 또는 c 디코더는 bHeight가 8보다 작은 경우 트라이앵글 머지 플래그를 파싱하지 않을 수 있다. 즉, cbHeight가 4인 경우(또는 4 이하인 경우) 디코더는 트라이앵글 머지 플래그를 파싱하지 않을 수 있다.
따라서, 본 발명의 실시예에 따르면, 4-by-X 블록 또는 X-by-4 블록에 대해(너비 또는 높이가 4인 블록에대해) 디코더는 트라이앵글 머지 플래그를 파싱하지 않을 수 있다. 이때 트라이앵글 머지 플래그를 추론하는 방법을 이하에서 설명한다. 본 발명의 일 실시예에서, cbWidth, cbHeight의 최소 값은 4일 수 있다. 예를 들어, 휘도 블록에대해 cbWidth, cbHeight의 최소 값은 4일 수 있다. 또한 cbWidth, cbHeight는 2의 지수 형태일 수 있다. 따라서, 예를 들어 cbWidth가 8 이상인 것은 cbWdith가 4가 아닌 것과 같은 의미일 수 있다. 추가적인 실시예로 cbWidth, cbHeight의 최대 값은 128일 수 있다.
또한 도 21의 발명에서 다양한 머지 모드가 트라이앵글 머지 모드, 서브블록 머지 모드 순으로 시그널링되는 것을 기초로 설명하였는데, 발명은 이에 한정되지 않고 CIIP, 서브블록 머지 모드 순으로 시그널링되는 경우에도 적용할 수 있다. 즉, 상술한 실시예들에서 트라이앵글 머지 모드, 트라이앵글 머지 플래그에 대한 것을 CIIP, CIIP 플래그에 대한 것으로 대체할 수 있다.
도 21은 본 발명의 일 실시예를 따른 모드 사용 여부를 나타내는 시그널링 결정 방법을 나타낸 도면이다. 도 21의 실시예는 도 20의 실시예에서 설명한 방법이 적용될 수 있고, 관련하여 중복되는 설명은 생략한다. 도 21을 참조하면 트라이앵글 머지 플래그가 존재하지 않는 경우 디코더는 그 값을 추론할 수 있다.
본 발명의 일 실시예에 따르면, 다양한 머지 모드 중 어떤 모드 사용 여부 시그널링이 존재하지 않을 때 그 값을 추론할 수 있다. 일 실시예로서, 디코더는 1) 다양한 머지 모드 중 상기 어떤 모드보다 먼저 시그널링 되는 모든 모드들을 사용하지 않고, 2) 다양한 머지 모드 중 상기 어떤 모드보다 나중에 시그널링 되는 모든 모드에 대해 사용할 수 있는 조건을 만족시키지 않고, 3) 상기 어떤 모드를 사용할 수 있는 조건을 만족시키는 경우, 그 값을 1로 추론할 수 있다. 또한 그렇지 않은 경우(즉, 1) 또는 2) 또는 3)을 만족시키지 않는 경우, 디코더는 그 값을 0으로 추론할 수 있다. 또한 여기서 조건 “2)”에서 모든 모드에 대해 사용할 수 있는 조건을 만족시키지 않는 것은 모든 모드 각각에 대한 사용할 수 있는 조건 중 적어도 하나씩을 만족시키지 않는 것일 수 있다.
또한, 여기서 상기 어떤 모드 사용 여부 시그널링을 1로 추론하는 조건에 4) 다양한 머지 모드 중 하나를 사용하는 조건이 추가될 수 있다. 예를 들어, 4) general_merge_mode가 1인 경우가 추가될 수 있다.
예를 들어, 도 20의 실시예를 기반으로 1) 다양한 머지 모드 중 트라이앵글 머지 모드보다 먼저 시그널링 되는 모든 모드들을 사용하지 않고, 2) 다양한 머지 모드 중 트라이앵글 머지 모드보다 나중에 시그널링 되는 모든 모드에 대해 사용할 수 있는 조건을 만족시키지 않고, 3) 트라이앵글 머지 모드를 사용할 수 있는 조건을 만족시키고, 4) general_merge_mode가 1인 경우, 트라이앵글 머지 플래그를 1로 추론할 수 있다. 또한 그렇지 않은 경우((즉, 1) 또는 2) 또는 3) 또는 4)를 만족시키지 않는 경우, 디코더는 트라이앵글 머지 플래그를 0으로 추론할 수 있다.
여기서, 도 21을 참조하면 “1) 다양한 머지 모드 중 트라이앵글 머지 모드보다 먼저 시그널링 되는 모든 모드들을 사용하지 않는 것”은 다음과 같은 조건일 수 있다.
(regular_merge_flag == 0 && mmvd_merge_flag == 0 && ciip_flag == 0)
또한 도 21을 참조하면 “2) 다양한 머지 모드 중 트라이앵글 머지 모드보다 나중에 시그널링 되는 모든 모드에 대해 사용할 수 있는 조건을 만족시키지 않는 것”은 서브블록 머지 모드를 사용할 수 있는 조건을 만족시키지 못 한 경우일 수 있고, 다음과 같은 조건일 수 있다. 예를 들어, 블록 크기에 대한 조건을 포함할 수 있다.
( MaxNumSubblockMergeCand == 0 || cbWidth == 4 || cbHeight == 4 )
또한 도 60을 참조하면 “3) 트라이앵글 머지 모드를 사용할 수 있는 조건을 만족시키는 것”은 다음과 같은 조건일 수 있다.
( MaxNumTriangleMergeCand >= 2 && sps_triangle_enabled_flag && slice_type == B && cbWidth*cbHeight >= 64)
추가적인 실시예로서, 도 20 내지 도 21의 실시예에서 조건 확인에 필요한 연산을 줄이기 위해서 일부 조건 확인을 포함하지 않을 수 있다. 예를 들어 디코더는 트라이앵글 머지 플래그를 파싱하거나 추론할 때 서브블록 머지 모드를 사용할 수 있는 조건을 만족시키지 못하는 조건 또는 서브블록 머지 모드를 사용할 수 있는 조건에서 나열된 조건들 중 일부를 사용하지 않을 수 있다. 이때 파싱 단계와 추론 조건에서 사용하는 조건들은 동일한 해당 조건들일 수 있다. 예를 들어 트라이앵글 머지 플래그를 파싱하거나 추론할 때 디코더는 MaxNumSubblockMergeCand에 대한 조건을 확인하지 않을 수 있다. 즉, MaxNumSubblockMergeCand가 0이어도 트라이앵글 머지 플래그를 파싱할 수 있고, 트라이앵글 머지 플래그가 존재하지 않는 경우 그 값을 추론할 때 디코더는 MaxNumSubblockMergeCand가 0인지 조건을 확인하지 않을 수 있다.
도 22는 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 예시하는 도면이다. 도 22의 실시예는 도 16 내지 도 19의 실시예와 도 20 및 도 21의 실시예를 함께 수행한 구체적인 실시예일 수 있다. 본 발명의 실시예에 따르면, 시그널링 오버헤드를 줄일 수 있다. 본 발명의 일 실시예에 따르면, 모드 A, 모드 B, 모드 C, 모드 D, 모드 E 순서대로 시그널링되는 경우가 있을 수 있다. 이때 모드 D 또는 모드 E 사용할 수 있는 경우에 모드 C 사용 여부를 나타내는 시그널링을 파싱할 수 있다. 만약 모드D와 모드E를 모두 사용할 수 없는 경우에는 모드 C 사용 여부를 나타내는 시그널링을 파싱하지 않을 수 있다. 또한 만약 모드 D와 모드 E를 모두 사용할 수 없는 경우, 그리고 모드 A와 모드 B를 모두 사용하지 않는 경우 모드 C 사용 여부를 나타내는 시그널링을 사용하는 것으로 결정될 수 있다.
도 22를 참조하면 다양한 머지 모드들이 정규 머지, MMVD, 트라이앵글 머지 모드, 서브블록 머지 모드, CIIP 순서대로 시그널링될 수 있다. 이때 본 발명의 실시예를 따르면, CIIP를 사용할 수 없는 경우 디코더는 서브블록 머지 모드 사용 여부를 나타내는 시그널링을 파싱하지 않을 수 있다. 또한 CIIP를 사용할 수 있는 경우 디코더는 서브블록 머지 모드 사용 여부를 나타내는 시그널링을 파싱할 수 있다. 또한 CIIP를 사용할 수 없고, 정규 머지를 사용하지 않고, MMVD를 사용하지 않고, 트라이앵글 머지 모드를 사용하지 않고, general_merge_flag가 1인 경우 디코더는 서브블록 머지 모드 사용 여부를 나타내는 시그널링을 사용하는 것으로 추론할 수 있다. 그렇지 않은 경우에는 디코더는 사용하지 않는 것으로 추론할 수 있다.
예를 들어, CIIP를 사용할 수 있는 조건은 1) CIIP 사용 가능 여부를 나타내는 상위 레벨 시그널링에 기초한 조건, 2) cu_skip_flag에 기초한 조건, 3) 블록 크기(너비 or height)에 기초한 조건 중 하나 이상의 조건을 &&(and) 조건으로 포함할 수 있다. 도 61을 참조하면 CIIP를 사용할 수 있는 조건은 1) sps_ciip_enabled_flag, 2) cu_skip_flag == 0 3) cbWidth*cbHeight >= 64 && cbWidth < 128 && cbHeight < 128 조건 중 하나 이상의 조건을 &&(and) 조건으로 포함한 것일 수 있다. 도 22을 참조하면 CIIP를 사용할 수 있는 경우는 ( sps_ciip_enabled_flag && cu_skip_flag == 0 && cbWidth*cbHeight >= 64 && cbWidth < 128 && cbHeight < 128 )일 수 있다.
또한 본 발명의 실시예를 따르면 서브블록 머지 모드와 CIIP를 모두 사용할 수 없는 경우 트라이앵글 머지 모드 사용 여부를 나타내는 시그널링을 파싱하지 않을 수 있다. 또한 서브블록 머지 모드 또는 CIIP를 사용할 수 있는 경우 트라이앵글 머지 모드 사용 여부를 나타내는 시그널링을 파싱할 수 있다. 또한 서브블록 머지 모드와 CIIP를 모두 사용할 수 없고, 정규 머지를 사용하지 않고, MMVD를 사용하지 않고, general_merge_flag가 1인 경우 트라이앵글 머지 모드 사용 여부를 나타내는 시그널링을 사용하는 것으로 추론할 수 있다. 그렇지 않은 경우에는 사용하지 않는 것으로 추론할 수 있다. 예를 들어 CIIP를 사용할 수 있는 조건, CIIP를 사용할 수 없는 경우는 앞선 설명을 참조할 수 있다. 다만 여기서는 트라이앵글 머지 모드를 사용할 수 있는 조건과 CIIP를 사용할 수 있는 조건 중 겹치는 것(예를 들어, 도 22에서 cbWidth*cbHeight >= 64)은 CIIP를 사용할 수 있는 조건에서 생략할 수 있다. 또한 subblock mergeonjungko 모드를 사용할 수 있는 조건은 1) MaxNumSubblockMergeonjungkoCand에 기초한 조건, 2) 블록 크기에 기초한 조건 중 하나 이상의 조건을 &&(and) 조건으로 포함할 수 있다.
도 22를 참조하면 서브블록 머지 모드를 사용할 수 있는 조건은 1) MaxNumSubblockMergeCand > 0, 2) cbWdith >= 8 && cbHeight >= 8 중 하나 이상의 조건을 &&(and) 조건으로 포함할 수 있다. 도 22fmf 참조하면 서브블록 머지 모드를 사용할 수 있는 조건은 ( MaxNumSubblockMergeCand > 0 && cbWdith >= 8 && cbHeight >= 8 ) 일 수 있다. 서브블록 머지 모드를 사용할 수 없는 경우는 서브블록 머지 모드를 사용할 수 있는 경우에 대한 NOT 조건일 수 있다.
도 23는 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 예시하는 도면이다. 도 23의 실시예는 도 22과 같은 또 다른 실시예일 수 있다. 본 발명의 일 실시예에 따르면, 모드 A, 모드 B, 모드 C, 모드 D, 모드 E 순서대로 시그널링되는 경우가 있을 수 있다. 이때, 모드 D 또는 모드 E 사용할 수 있는 경우에 모드 C 사용 여부를 나타내는 시그널링을 파싱할 수 있다. 만약 모드 D 및 모드 E를 모두 사용할 수 없는 경우에는 모드C 사용 여부를 나타내는 시그널링을 파싱하지 않을 수 있다. 또한 만약 모드 D와 모드 E를 모두 사용할 수 없는 경우, 그리고 모드 A 및 모드 B를 모두 사용하지 않는 경우 모드 C 사용 여부를 나타내는 시그널링을 사용하는 것으로 결정할 수 있다.
도 23을 참조하면 다양한 머지 모드들이 정규 머지, MMVD, 트라이앵글 머지 모드, CIIP, 서브블록 머지 모드 순서대로 시그널링될 수 있다. 이때 본 발명의 실시예를 따르면 서브블록 머지 모드를 사용할 수 없는 경우 CIIP 사용 여부를 나타내는 시그널링을 파싱하지 않을 수 있다. 또한 서브블록 머지 모드를 사용할 수 있는 경우 CIIP 사용 여부를 나타내는 시그널링을 파싱할 수 있다. 또한 서브블록 머지 모드를 사용할 수 없고, 정규 머지를 사용하지 않고, MMVD를 사용하지 않고, 트라이앵글 머지 모드를 사용하지 않고, general_merge_flag가 1인 경우 CIIP 사용 여부를 나타내는 시그널링을 사용하는 것으로 추론할 수 있다. 그렇지 않은 경우에는 사용하지 않는 것으로 추론할 수 있다. 이에 대해서 도 21의 설명을 참조할 수 있다. 또한 본 발명의 실시예를 따르면 CIIP와 서브블록 머지 모드를 모두 사용할 수 없는 경우, CIIP 또는 서브블록 머지 모드를 사용할 수 있는 경우 트라이앵글 머지 모드 사용 여부를 나타내는 시그널링에 대해 도 22의 설명을 참조할 수 있다.
도 24는 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 나타낸 도면이다. 도 24 내지 도 25의 실시예는 도 17의 실시예에 트라이앵글 머지 모드를 사용할 수 있는 조건을 추가한 실시예를 나타낸다. 본 발명의 일 실시예에 따르면, 트라이앵글 머지 모드를 사용할 수 있는 조건에 트라이앵글 머지 모드 후보의 최대 개수에 관한 것이 포함될 수 있다. 예를 들어, 트라이앵글 머지 모드 후보의 최대 개수를 나타내는 값은 MaxNumTriangleMergeCand일 수 있다. 예를 들어 트라이앵글 머지 모드를 사용할 수 있기 위해 (MaxNumTriangleMergeCand >= 2) 이어야할 수 있다.
따라서, 도 24를 참조하면 (MaxNumTriangleMergeCand >= 2)를 만족시키는 경우 트라이앵글 머지 플래그를 파싱하는 것이 가능하고, (MaxNumTriangleMergeCand >= 2)를 만족시키지 않는 경우 트라이앵글 머지 플래그를 파싱하지 않을 수 있다. 이외에 도 17의 설명과 중복되는 설명은 생략한다.
따라서, 다음의 조건 모두를 만족시킬 때 디코더는 트라이앵글 머지 플래그를 파싱할 수 있다. 만약, 다음 조건 중 적어도 하나를 만족시키지 않는 경우 트라이앵글 머지 플래그를 파싱하지 않을 수 있다.
1) MaxNumTriangleMergeCand >= 2
2) sps_triangle_enabled_flag
3) slice_type == B
4) cbWidth*cbHeight >= 64
5) sps_ciip_enabled_flag
6) cu_skip_flag == 0
7) cbWidth < 128
8) cbHeight < 128
또 다른 일 실시예에서, 상기 조건 중 일부는 생략될 수 있다. 이는 조건 확인에 필요한 연산을 줄이기 위한 것일 수 있다. 예를 들어, 생략되는 조건은 5), 6), 7), 8) 중 적어도 하나일 수 있다.
또한 본 발명의 일 실시예에서 CIIP 플래그는 다음과 같이 결정될 수 있다. 다음 조건들을 모두 만족시키는 경우 CIIP 플래그는 1로 설정될 수 있다.
a) general_merge_flag == 1
b) regular_merge_flag == 0
c) mmvd_merge_flag == 0
d) merge_subblock_flag == 0
e) merge_triangle_flag == 0
f) sps_ciip_enabled_flag == 1
g) cu_skip_flag == 0
h) cbWidth*cbHeight >= 64
i) cbWidth < 128
j) cbHeight < 128
상기 조건들 중 적어도 하나를 만족시키지 않는 경우 CIIP 플래그는 0으로 설정될 수 있다. 예를 들어, h), i), j) 조건은 다른 블록 크기 조건으로 대체될 수 있다.
본 발명의 일 실시예에서, 트라이앵글 머지 플래그가 존재하지 않는 경우, 트라이앵글 머지 플래그는 다음의 프로세스에 따라 추론될 수 있다. 만약, 이하의 모든 조건을 만족하는 경우, 트라이앵글 머지 플래그는 1로 추론될 수 있다.
1) regular_merge_flag == 0
2) mmvd_merge_flag == 0
3) merge_subblock_flag == 0
4) sps_ciip_enabled_flag == 0 || cu_skip_flag == 1 || cbWidth >= 128 || cbHeight >= 128
5) MaxNumTriangleMergeCand >= 2 && sps_triangle_enabled_flag == 1 && tile_group_type == B && cbWidth*cbHeight >= 64
6) general_merge_flag == 1
또한 그 외의 경우에 트라이앵글 머지 플래그 값을 0으로 추론할 수 있다. 상기 조건들 중 4) 조건에서 ||(즉, OR)로 연결된 것은 도 63에서 설명한 5), 6), 7), 8) 조건에 해당하는데, 5), 6), 7), 8) 중 생략되는 것이 있을 때 도 64의 4) 조건에서도 함께 생략될 수 있다. 앞서 도 24에서 설명한 바와 같이, 트라이앵글 머지 모드를 사용할 수 있는 조건에 트라이앵글 머지 모드 후보의 최대 개수에 관한 것이 포함될 수 있다. 관련하여 중복된 설명은 생략한다.
또한, 본 발명의 일 실시예에 따르면, 다양한 머지 모드 중 적어도 하나의 모드는 사용 여부 시그널링에 사용될 수 있다. 예를 들어, 머지 모드를 사용하는 경우(general_merge_flag가 1인 경우) 다양한 머지 모드 중 적어도 하나의 모드는 사용 여부 시그널링을 사용하는 것으로 나타낼 수 있다. 일 실시예에 따르면, 상기 적어도 하나의 모드는 기설정된 모드일 수 있다. 예를 들어, 상기 적어도 하나의 모드는 1개의 모드일 수 있다. 예를 들어, 상기 적어도 하나의 모드는 정규 머지 모드일 수 있다.
일 실시예에 따르면, 머지 모드를 사용하는 경우 다양한 머지 모드들에 대한 사용 여부 시그널링이 모두 사용하지 않는 것으로 설정된 경우 기설정된 모드에 대한 사용 여부 시그널링을 사용하는 것으로 설정할 수 있다. 또 다른 실시예에 따르면, 머지 모드를 사용하는 경우 다양한 머지 모드들에 대한 사용 여부 시그널링이 기설정된 모드에 대한 것을 제외하고 모두 사용하지 않는 것으로 설정된 경우 기설정된 모드에 대한 사용 여부 시그널링을 사용하는 것으로 설정할 수 있다. 이는 잘못된 시그널링 및 그에 따른 동작을 방지하기 위한 것일 수 있다.
본 발명의 일 실시예에서, 다음의 조건들을 모두 만족시키는 경우 정규 머지 플래그는 1로 설정될 수 있다.
1) regular_merge_flag == 0
2) mmvd_merge_flag == 0
3) merge_subblock_flag == 0
4) ciip_flag == 0
5) merge_triangle_flag == 0
6) general_merge_flag == 1
또 다른 실시예에 따르면, 상기 조건들 중에서 일부 조건이 생략될 수 있다. 예를 들어, 상기 조건들 중에서 1) 조건이 생략할 수 있다.
본 발명의 또 다른 실시예에 따르면, 다양한 머지 모드 중 하나의 특정 모드를 제외한 모든 모드들에 대한 사용 가능 조건을 만족하지 않는 경우, 상기 특정 모드 사용 여부 시그널링을 파싱하지 않고 디코더는 그 값을 1로 추론할 수 있다. 또는, 다양한 머지 모드 중 하나의 특정 모드를 제외한 모드들 중 적어도 하나의 사용 가능 조건을 만족하는 경우, 상기 하나의 특정 모드 사용 여부 시그널링을 파싱할 수 있다. 일 실시예로 이것은 머지 모드를 사용하는 경우에 해당할 수 있다. 또한 상기 어떤 하나의 모드는 정규 머지 모드일 수 있다.
보다 구체적으로, 다음 조건들 1) 내지 4) 중 적어도 하나를 만족하는 경우에 디코더는 정규 머지 플래그를 파싱할 수 있다. 실시예로서, 이것은 머지 모드를 사용하는 경우에 해당하는 것일 수 있다.
1) sps_mmvd_enabled_flag && cbWidth*cbHeight != 32
2) MaxNumSubblockMergeCand > 0 && cbWidth >= 8 && cbHeight >= 8
3) sps_ciip_enabled_flag && cu_skip_flag == 0 && cbWidth*cbHeight >= 64 && cbWidth < 128 && cbHeight < 128
4) MaxNumTriangleMergeCand >= 2 && sps_triangle_enabled_flag && slice_type == B && cbWidth*cbHeight >= 64
또한 상기 1) 내지 4) 조건들 모두를 만족시키지 않는 경우 정규 머지 플래그를 파싱하지 않을 수 있고, 그 값을 1로 추론할 수 있다. 이것은 머지 모드를 사용하는 경우에 해당하는 것일 수 있다. 이때 연산량을 줄이기 위해 상기 조건들 중 일부를 생략할 수 있다.
또한, 본 발명의 다른 일 실시예에 따르면, 다양한 머지 모드 중 두 개 이상의 모드에 대한 사용 여부 시그널링이 사용함을 지시할 경우, 상기 다양한 머지 모드 중 기설정된 모드를 제외한 모든 모드에 대한 사용 여부 시그널링을 사용하지 않음을 나타내는 것으로 설정하고, 상기 기설정된 모드에 대한 사용 여부 시그널링을 사용하는 것으로 설정할 수 있다. 예를 들어, 상기 기설정된 모드는 정규 머지 모드일 수 있다. 또다른 예로 상기 기설정된 모드는 사용 여부 시그널링이 사용함을 지시한 상기 두 개 이상의 모드 중 하나의 모드일 수 있다. 이때 하나의 모드를 결정하는 기설정된 방법이 존재할 수 있다. 예를 들어, 다양한 머지 모드에 대한 기설정된 순서 중 가장 앞의 모드로 결정할 수 있다. 예를 들어 이 실시예는 머지 모드를 사용하는 경우에 해당할 수 있다.
예를 들어 regular_merge_flag == 1이고, merge_subblock_flag == 1인 경우, merge_subblock_flag를 0으로 설정할 수 있다. 또는 ciip_flag == 1이고, merge_subblock_flag == 1인 경우, ciip_flag와 merge_subblock_flag를 0으로 설정하고, regular_merge_flag를 1로 설정할 수 있다. 다른 일 예로, ciip_flag == 1이고, merge_subblock_flag == 1인 경우, 기설정된 순서인 정규 머지 모드, MMVD, 서브블록 머지 모드, CIIP, 트라이앵글 머지 모드 중 앞에 있는 merge_subblock_flag를 1로 설정하고, CIIP 플래그를 1로 설정할 수 있다.
도 25는 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 예시하는 도면이다. 도 25의 실시예는 앞서 도 설명한 발명의 구체적인 실시예일 수 있다. 예를 들어 도 25의 실시예는 도 10 내지 도 13의 실시예에서 설명한 방법들이 적용될 수 있고, 관련하여 중복되는 설명은 생략한다.
앞서 설명한 것처럼 다수의 머지 모드들이 기설정된 순서대로 사용여부가 시그널링되거나 사용여부가 결정될 수 있다. 도 66을 참조하면 다수의 머지 모드들은 정규 머지 모드, MMVD, 서브블록 머지 모드, CIIP, 트라이앵글 머지 모드를 포함할 수 있다. 또한 도 25를 참조하면 상기 다수의 머지 모드들은 정규 머지 모드, MMVD, 서브블록 머지 모드, CIIP, 트라이앵글1 머지 모드 순서대로 사용여부가 시그널링되거나 사용여부가 결정될 수 있다. 또한, 도 25를 참조하면 정규 머지 모드, MMVD, 서브블록 머지 모드, CIIP, 트라이앵글 머지 모드의 사용여부를 나타내는 시그널링은 각각 regular_merge_flag, mmvd_merge_flag, merge_subblock_flag, ciip_flag, MergeTriangleFlag일 수 있다. 또한 MergeTriangleFlag는 앞서 설명한 merge_triangle_flag와 같은 의미일 수 있다.
또한, 각 모드를 수행할 수 있기 위해 만족시켜야하는 조건이 존재할 수 있다. 예를 들어 어떤 모드를 수행할 수 있기 위해 만족시켜야하는 조건을 만족시키지 못 할 때 상기 어떤 모드를 수행하지 않을 수 있다. 또한 이 경우 상기 어떤 모드가 아닌 다른 모드를 수행할 수 있다. 또는 어떤 모드를 수행할 수 있기 위해 만족시켜야하는 조건을 만족시키는 경우 상기 어떤 모드를 수행할 수도 있고 수행하지 않을 수도 있다. 이때 상기 어떤 모드를 수행하는지 여부를 결정하기 위한 추가적인 시그널링이 존재할 수 있다.
예를 들어, 어떤 모드를 수행할 수 있기 위해 만족시켜야하는 조건은 상기 어떤 모드가 이용 가능한지 나타내는 상위 레벨 시그널링에 기초할 수 있다. 상위 레벨은 sequence level, SPS(sequence parameter set) level, slice level, tile level, tile group level, brick level, CTU level 등을 포함할 수 있다. 또한 앞서 설명한 sps_mode_enabled_flag를 포함할 수 있다. 이때 모드는 어떤 모드 들로 대체될 수 있다.
또한 어떤 모드를 수행할 수 있기 위해 만족시켜야하는 조건은 블록 크기와 관련된 조건을 포함할 수 있다. 예를 들어 현재 블록의 너비 또는 height에 기초한 조건을 포함할 수 있다. 예를 들어 너비의 상한선 또는 하한선이 존재할 수 있다. 또는 height의 상한선 또는 하한선이 존재할 수 있다. 또는 area (width * height)의 상한선 또는 하한선이 존재할 수 있다. 또한 현재 블록은 CU 또는 PU일 수 있다. 또한 현재 블록의 너비, height는 각각 cbWidth, cbHeight일 수 있다. 본 발명에서 너비, height는 각각 cbWidth, cbHeight와 혼용해서 사용될 수 있다.
또한 어떤 모드를 수행할 수 있기 위해 만족시켜야하는 조건은 slice type 또는 tile group type에 기초할 수 있다. Slice type과 tile group type은 같은 의미일 수 있다.
또한 어떤 모드를 수행할 수 있기 위해 만족시켜야하는 조건은 또다른 어떤 모드를 사용하는지 여부에 기초할 수 있다. 상기 또다른 어떤 모드는 스킵 모드를 포함할 수 있다. 또한 스킵 모드를 사용하는지 여부는 cu_skip_flag에 기초하여 결정될 수 있다. 또한 상기 또다른 어떤 모드는 상기 어떤 모드보다 앞에 시그널링되거나 결정되는 모드를 포함할 수 있다. 예를 들어 상기 또다른 어떤 모드를 사용하지 않는 경우에 상기 어떤 모드를 수행하는 것이 가능할 수 있다.
또한 어떤 모드를 수행할 수 있기 위해 만족시켜야하는 조건은 maximum number of candidates에 기초할 수 있다. 예를 들면 상기 candidates는 상기 어떤 모드와 관련된 candidates일 수 있다. 예를 들면 상기 candidates는 상기 어떤 모드가 사용하는 candidates일 수 있다. 예를 들어 충분한 개수 이상의 candidates가 존재할 수 있을 때 어떤 모드를 수행할 수 있는 것이 가능하다. 예를 들어 maximum number of candidates가 기설정된 값 이상일 때 상기 어떤 모드를 수행할 수 있는 것이 가능하다. 예를 들면 maximum number of candidates는 MaxNumModeCand라는 parameter로 나타내질 수 있고, MaxNumModeCand에서 모드는 어떤 모드를 나타내는지로 대체될 수 있다. 예를 들면 머지 모드에 대해 MaxNumMergeCand 값이 존재할 수 있다. 예를 들면 트라이앵글 머지 모드에 대해 MaxNumTriangleMergeCand 값이 존재할 수 있다. 예를 들면 서브블록 머지 모드에 대해 MaxNumSubblockMergeCand 값이 존재할 수 있다. 또한 maximum number of candidates는 어떤 모드가 enabled인지 나타내는 상위 레벨 시그널링에 기초할 수 있다. 예를 들면 MaxNumSubblockMergeCand는 sps_affine_enabled_flag 또는 sps_sbtmvp_enabled_flag에 기초할 수 있다. sps_sbtmvp_enalbed_flag는 subblock based temporal motion (vector) prediction이 사용 가능한지를 나타내는 상위 레벨 시그널링일 수 있다.
본 발명의 일 실시예에 따르면, 정규 머지 모드를 수행할 수 있기 위해 만족시켜야하는 조건이 존재할 수 있다. 예를 들어 정규 머지 모드를 수행할 수 있기 위해 머지 모드를 사용하는 것을 나타내는 시그널링이 참이어야 할 수 있다. 상기 머지 모드를 사용하는 것을 나타내는 시그널링은 merge_flag 또는 general_merge_flag일 수 있다. 또한 이하에서 설명하는 다른 모드들에 대해서도 머지 모드를 사용하는 것을 나타내는 시그널링이 참이어야 상기 다른 mdoe를 수행하는 것이 가능할 수 있다.
또는 정규 머지 모드를 수행하기 위해 만족시켜야하는 조건이 다른 모드들과는 달리 존재하지 않을 수 있다. 이것은 정규 머지 모드가 가장 기본이 되는 모드일 수 있기 때문일 수 있다. 상기 설명한 머지 모드를 사용하는 경우라면 정규 머지 모드를 사용하기 위해 추가적인 조건이 필요하지 않을 수 있다.
도 25를 참조하면 제1 조건(2501)을 만족시키는 경우, 디코더는 정규 머지 플래그(즉, regular_merge_flag)를 파싱할 수 있다. 제1 조건(2501)은 sps_mmvd_enabled_flag가 1이거나 너비*높이가 32가 아닌 경우일 수 있다. 또한 제1 조건(2501)을 만족시키지 않는 경우에 regular_merge_flag를 파싱하지 않을 수 있다. 이 경우 디코더는 그 값을 1로 추론할 수 있다. 예를 들어 sps_mmvd_enabled_flag가 0 && 너비*높이 == 32인 경우디코더는 regular_merge_flag를 1로 추론할 수 있다. 또는, 1로 추론하기 위해 general_merge_flag가 1인 조건을 포함할 수도 있다. 이것은 상기 제1 조건(2501)을 만족시키지 않는 경우 머지 모드에 속한 다른 모드들을 수행할 수 있기 위해 만족시켜야하는 조건을 모두 만족시키지 못하기 때문일 수 있다. 그 외에 regular_merge_flag가 존재하지 않는 경우 위의 1로 추론하는 조건을 만족시키지 못 하면 디코더는그 값을 0으로 추론할 수 있다. 또한 너비 또는 높이는 각각 2의 지수승일 수 있다. 또한 너비 또는 높이는 양수일 수 있다. 따라서 너비*높이가 32인 것은 너비, 높이가 각각 4, 8이거나 8, 4인 것일 수 있다. 또한 너비*높이가 32가 아닌 것은 너비, 높이가 각각 4, 8이 아니고 8, 4가 아닌 것일 수 있다. 또한 너비*높이가 32가 아닌 것은 너비와 높이가 8 이상인 것을 나타낼 수도 있다. 이것은 인터 예측에 해당하는 것일 수 있고, 예를 들면 4x4 블록에 대해 인터 예측이 허용되지 않을 수 있기 때문일 수 있다.
본 발명의 일 실시예에 따르면, MMVD를 수행할 수 있기 위해 만족시켜야하는 조건이 존재할 수 있다. 예를 들면 MMVD가 이용 가능한지 나타내는 상위 레벨 시그널링에 기초할 수 있다. 예를 들면 MMVD가 이용 가능한지 나타내는 상위 레벨 시그널링은 sps_mmvd_enabled_flag일 수 있다. 도 25를 참조하면 제2 조건(2502)을 만족시키는 경우 mmvd_merge_flag를 파싱할 수 있다. 또한 제2 조건(2502)을 만족시키지 않는 경우 mmvd_merge_flag를 파싱하지 않을 수 있고, 그 값을 추론할 수 있다. 제2 조건(2502)은 (sps_mmvd_enabled_flag && cbWidth*cbHeight != 32) 일 수 있다. 즉, sps_mmvd_enabled_flag이 1이고, 블록 크기 조건을 만족시킬 때 mmvd_merge_flag를 파싱할 수 있고, sps_mmvd_enabled_flag가 0이거나 블록 크기 조건을 만족시키지 않을 때 mmvd_merge_flag를 파싱하지 않을 수 있다. 또한 sps_mmvd_enabled_flag가 1이고, 상기 블록 크기를 만족시키지 않는 경우 mmvd_merge_flag를 1로 추론할 수 있다. 예를 들면 sps_mmvd_enabled_flag가 1이고, width*height가 32인 경우, regular_merge_flag가 0인 경우 또한 general_merge_flag가 1인 경우 mmvd_merge_flag를 1로 추론할 수 있다. 상기 블록 크기 조건은 MMVD 후에 시그널링 되는 모드들을 사용할 수 없는 조건과 연관되어 있을 수 있다.
본 발명의 일 실시예에 따르면, 서브블록 머지 모드를 수행할 수 있기 위해 만족시켜야하는 조건이 존재할 수 있다. 예를 들면 서브블록 머지 모드가 이용 가능한지 나타내는 상위 레벨 시그널링에 기초할 수 있다. 또는 서브블록 머지 모드에 속하는 모드가 이용 가능한지 나타내는 상위 레벨 시그널링에 기초할 수 있다. 예를 들어 서브블록 머지 모드에는 어파인 모션 예측, 서브블록 기반 시간 모션 벡터 예측 등이 포함될 수 있다. 따라서 어파인 모션 예측이 이용 가능한지 나타내는 상위 레벨 시그널링(예를 들어, sps_affine_enabled_flag)에 기초하여 서브블록 머지 모드가 수행될 수 있는지 판단될 수 있다.
또는, 서브블록 기반 시간 모션 벡터 예측이 이용 가능한지 나타내는 상위 레벨 시그널링(예를 들어, sps_sbtmvp_enabled_flag)에 기초하여 서브블록 머지 모드가 수행될 수 있는지 판단될 수 있다. 또는 서브블록 머지 모드를 수행할 수 있기 위해 서브블록 머지 모드에 대한 최대 후보 개수에 기초한 조건을 만족시켜야할 수 있다. 예를 들어 서브블록 머지 모드에 대한 최대 후보 개수 값이 0보다 큰 경우에 서브블록 머지 모드를 사용하는 것이 가능할 수 있다. 또한 서브블록 머지 모드에 대한 최대 후보 개수는 서브블록 머지 모드에 속하는 모드가 이용 가능한지 나타내는 상위 레벨 시그널링에 기초할 수 있다. 예를 들어, 다수의 서브블록 머지 모드에 속하는 모드가 이용 가능한지 나타내는 상위 레벨 시그널링 중 적어도 하나가 1인 경우에만 서브블록 머지 모드에 대한 최대 후보 개수가 0보다 큰 것이 가능할 수 있다. 또한 서브블록 머지 모드를 수행할 수 있기 위해 블록 크기에 기초한 조건을 만족해야할 수 있다. 예를 들면 너비와 높이의 하한선이 존재할 수 있다. 예를 들어, 너비가 8 이상이고 높이가 8 이상일 때 서브블록 머지 모드를 사용하는 것이 가능할 수 있다.
도 25를 참조하면 제3 조건(2503)을 만족하는 경우 서브블록 머지 플래그를 파싱할 수 있다. 또한, 제3 조건(2503)을 만족하지 않는 경우 merge_subblock_flag를 파싱하지 않을 수 있고, 그 값을 0으로 추론할 수 있다. 제3 조건(2503)은 ( MaxNumSubblockMergeCand > 0 && width >= 8 && height >= 8)일 수 있다.
본 발명의 일 실시예에 따르면, CIIP를 수행할 수 있기 위해 만족시켜야하는 조건이 존재할 수 있다. 예를 들어 CIIP가 이용 가능한지 나타내는 상위 레벨 시그널링(예를 들어, spsXBT_ciip_enabled_flag)에 기초하여 CIIP를 수행할 수 있는지 여부가 결정될 수 있다. 또한 스킵 모드를 사용하는지에 기초하여 CIIP를 수행할 수 있는지 여부가 결정될 수 있다. 예를 들어 스킵 모드를 사용하는 경우 CIIP를 수행할 수 없을 수 있다. 또한 블록 크기에 기초하여 CIIP를 수행할 수 있는지가 결정될 수 있다. 예를 들어 블록 크기가 하한선 이상이고 상한선 이하인지에 기초하여 CIIP를 수행할 수 있는지가 결정될 수 있다. 예를 들어 너비*높이가 하한선 이상이고 width가 상한선 이하이고, 높이가 상한선 이하일 때 CIIP를 수행할 수 있는 것이 가능하다. 예를 들어 너비*높이가 64 이상이고, width가 128보다 작고, 높이가 128보다 작을 때 CIIP를 수행할 수 있는 것이 가능하다.
도 25를 참조하면 제4 조건(2504)을 만족할 때 CIIP 플래그를 파싱할 수 있다. 또한 제4 조건(2504)을 만족시키지 않을 때 CIIP 플래그를 파싱하지 않을 수 있고, 그 값을 0으로 추론할 수 있다. 제4 조건(2504)은 ( sps_ciip_enabled_flag && cu_skip_flag == 0 && width*높이 >= 64 && width < 128 && 높이 < 128 )일 수 있다.
본 발명의 일 실시예에 따르면, 트라이앵글 머지 모드를 수행할 수 있기 위해 만족시켜야하는 조건이 존재할 수 있다. 예를 들어, 트라이앵글 머지 모드가 이용 가능한지 나타내는 상위 레벨 시그널링(예를 들면 sps_triangle_enabled_flag)에 기초하여 트라이앵글 머지 모드를 수행할 수 있는지가 결정될 수 있다. 또한 슬라이스 타입에 기초하여 트라이앵글 머지 모드를 수행할 수 있는지가 결정될 수 있다. 예를 들면 슬라이스 타입이 B인 경우 트라이앵글 머지 모드를 수행하는 것이 가능할 수 있다. 이것은 트라이앵글 머지 모드를 수행하기 위해 두 개 이상의 모션 정보 또는 두 개 이상의 참조 픽쳐가 필요하기 때문일 수 있다. 또한 트라이앵글 머지 모드에 대한 최대 후보 개수에 기초하여 트라이앵글 머지 모드를 수행할 수 있는지가 결정될 수 있다. 트라이앵글 머지 모드에 대한 최대 후보 개수는 MaxNumTriangleMergeCand 값으로 나타날 수 있다. 예를 들어, 트라이앵글 머지 모드에 대한 최대 후보 개수가 2 이상인 경우 트라이앵글 머지 모드를 수행하는 것이 가능할 수 있다. 이것은 트라이앵글 머지 모드를 수행하기 위해 두 개 이상의 모션 정보 또는 두 개 이상의 참조 픽쳐가 필요하기 때문일 수 있다. 또한 본 발명의 실시예를 따르면 트라이앵글 머지 모드가 이용 가능한지 나타내는 상위 레벨 시그널링이 이용 가능함을 나타내는 경우 트라이앵글 머지 모드에 대한 최대 후보 개수가 항상 2 이상이고, 트라이앵글 머지 모드가 이용 가능한지 나타내는 상위 레벨 시그널링이 이용 불가능함을 나타내는 경우 트라이앵글 머지 모드에 대한 최대 후보 개수가 항상 2보다 작거나 0일 수 있다.
따라서, 이 경우, 트라이앵글 머지 모드가 이용 가능한지 나타내는 상위 레벨 시그널링에 기초하지 않고 트라이앵글 머지 모드에 대한 최대 후보 개수에 기초하여 트라이앵글 머지 모드를 수행할 수 있는지가 결정될 수 있다. 이에 따라 조건을 체크하는 연산을 줄일 수 있다. 또한 블록 크기에 기초하여 트라이앵글 머지 모드를 수행할 수 있는지가 결정될 수 있다. 예를 들어 블록 크기가 하한선 이상이고 상한선 이하인지에 기초하여 트라이앵글 머지 모드를 수행할 수 있는지가 결정될 수 있다. 예를 들어 너비*높이가 하한선 이상이고 너비가 상한선 이하이고, 높이가 상한선 이하일 때 트라이앵글 머지 모드를 수행할 수 있는 것이 가능하다. 예를 들어 너비*높이가 64 이상인 경우 트라이앵글 머지 모드를 수행할 수 있는 것이 가능하다. 또한 너비가 128보다 작고, 높이가 128보다 작을 때 트라이앵글 머지 모드를 수행할 수 있는 것이 가능하다.
도 25를 참조하면 제5 조건(2505)을 만족하는 경우 트라이앵글 머지 모드를 사용하는 것일 수 있다. 또한 제5 조건(2505)을 만족하지 않는 경우 트라이앵글 머지 모드를 사용하는 것일 수 있다. 제5 조건(2505)을 MergeTriangleFlag가 1인 경우일 수 있다. 또한 제5 조건(2505)을 만족하기 위해 만족시켜야하는 조건이 존재할 수 있다. 예를 들어, ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2 && width*height >= 64 )를 포함할 수 있다. 만약 ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2 && width*height >= 64 )가 참인 경우 MergeTriangleFlag가 1일 수도 있고, 0일 수도 있을 수 있다. 이때 추가적인 조건에 의해 1인지 0인지 결정될 수 있다. 상기 추가적인 조건은 트라이앵글 머지 모드보다 앞에 시그널링 되거나 결정되는 모드(예를 들면 정규 머지 모드, MMVD, 서브블록 머지 모드, CIIP)들을 사용하지 않는 경우와 머지 모드를 사용하는 경우(예를 들면 general_merge_flag == 1)일 수 있고, 상기 추가적인 조건을 만족하는 경우 MergeTriangleFlag는 1이고 상기 추가적인 조건을 만족하지 않는 경우 MergeTriangleFlag는 0일 수 있다. 또한 ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2 && width*height >= 64 )가 거짓인 경우 MergeTriangleFlag가 0일 수 있다.
도 26은 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 나타낸 도면이다. 도 26은 도 12 내지 도 13에서 설명한 시그널링 방법의 구체적인 실시예일 수 있다.
본 발명의 일 실시예에 따르면, 어떤 모드보다 나중에 시그널링되거나 결정되는 모드 들 중 적어도 하나를 수행할 수 있는 경우 상기 어떤 모드에 대한 사용 여부 시그널링을 파싱할 수 있다. 또한 어떤 모드보다 나중에 시그널링되거나 결정되는 모드들 모두를 수행할 수 없는 경우 상기 어떤 모드에 대한 사용 여부 시그널링을 파싱하지 않을 수 있다. 또한 어떤 모드보다 나중에 시그널링되거나 결정되는 모드들 모두를 수행할 수 없는 경우 상기 어떤 모드에 대한 사용 여부 시그널링 값을 사용하는 것으로 결정할 수 있다.
또한 여기서 어떤 모드보다 나중에 시그널링되거나 결정되는 모드를 수행할 수 있거나 없는 것은 도 26에서 설명한 모드를 수행할 수 있기 위해 만족시켜야하는 조건을 만족시키는지 만족시키지 않는지에 따른 것일 수 있다. 또는 여기서 어떤 모드보다 나중에 시그널링되거나 결정되는 모드를 수행할 수 있거나 없는 것은 도 26에서 설명한 모드를 수행할 수 있기 위해 만족시켜야하는 조건 일부를 만족시키는지 만족시키지 않는지에 따른 것일 수 있다. 예를 들면 모드를 수행할 수 있기 위해 만족시켜야하는 조건 중 일부를 다른 모드에 대한 시그널링을 결정할 때는 생략할 수 있는 것이다. 이것은 조건을 확인하는 연산을 줄이는 것일 수 있고, 예를 들면 참인 경우가 많은 조건을 생략할 수 있다.
보다 구체적으로, 어떤 모드를 사용하기 위해서 상기 어떤 모드가 이용 가능한지 나타내는 상위 레벨 시그널링이 참이어야 하고, 슬라이스 타입이 특정값이어야 하지만 상기 어떤 모드와 다른 모드 사용 여부 시그널링 파싱을 결정하기 위해 상기 어떤 모드를 사용하기 위한 조건을 확인하는 경우 상위 레벨 시그널링에 기초하고 슬라이스 타입에 기초하지 않고 상기 다른 모드 사용 여부 시그널링 파싱을 결정할 수 있다. 이것은 슬라이스 타입이 특정값인 경우가 많기 때문일 수 있다. 따라서 슬라이스 타입이 특정값이 아니라도 상기 어떤 모드가 이용 가능한지 나타내는 상위 레벨 시그널링이 참이면 상기 어떤 모드와 다른 모드 사용 여부 시그널링을 파싱할 수 있다.
도 26을 참조하면 mmvd_condition, subblock_merge_condition, ciip_condition, triangle_merge_condition이 본재할 수 있다. 예를 들어 mmvd_condition, subblock_merge_condition, ciip_condition, triangle_merge_condition은 각각 도 25에서 설명한 MMVD, 서브블록 머지 모드, CIIP, 트라이앵글 머지 모드를 수행할 수 있기 위해 만족시켜야하는 조건일 수 있다. 또는 mmvd_condition, subblock_merge_condition, ciip_condition, triangle_merge_condition은 각각 도 25에서 설명한 MMVD, 서브블록 머지 모드, CIIP, 트라이앵글 머지 모드를 수행할 수 있기 위해 만족시켜야하는 조건의 일부일 수 있다. 예를 들어, mmvd_condition, subblock_merge_condition, ciip_condition은 각각 도 25에서 설명한 제2 조건(2502), 제3 조건(2503), 제4 조건(2504)이거나 그의 일부일 수 있다.
또한 어떤 모드보다 나중에 시그널링되거나 결정되는 모드를 수행할 수 있기 위해 만족시켜야하는 조건 중 상기 어떤 모드를 수행할 수 있기 위해 만족시켜야하는 조건이 겹친다면 상기 어떤 모드를 수행할 수 있기 위해 만족시켜야하는 조건을 만족시켜야 상기 어떤 모드가 사용될 수 있으므로 이러한 겹치는 조건은 도 26의 mmvd_condition, subblock_merge_condition, ciip_condition, triangle_merge_condition 등에서 제외시킬 수 있다.
도 26을 참조하면 triangle_merge_condition을 만족시키는 경우 ciip_flag를 파싱할 수 있다. 또한 triangle_merge_condition을 만족시키지 않는 경우 ciip_flag를 파싱하지 않을 수 있다. 또한 triangle_merge_condition을 만족시키지 않는 경우 ciip_flag를 1로 추론할 수 있다. 이때 1로 추론하기 위해 CIIP를 수행할 수 있는 조건을 만족시켜야하고, CIIP보다 앞에 시그널링되거나 결정되는 모드들을 모두 사용하지 않고(예를 들어 regular_merge_flag == 0 && mmvd_merge_flag == 0 && merge_subblock_flag == 0), 머지 모드를 사용하는 경우(general_merge_flag == 1)의 조건을 만족시켜야할 수 있다. 그 외의 경우에는 ciip_flag가 존재하지 않는 경우 0으로 추론할 수 있다.
도 26을 참조하면 ciip_condition을 만족시키거나 triangle_merge_condition을 만족시키는 경우 merge_subblock_flag를 파싱할 수 있다. 또한 ciip_condition을 만족시키지 않고 triangle_merge_coondition을 만족시키지 않는 경우 merge_subblock_flag를 파싱하지 않을 수 있다. 또한 ciip_condition을 만족시키지 않고 triangle_merge_coondition을 만족시키지 않는 경우 merge_subblock_flag를 1로 추론할 수 있다. 이때 1로 추론하기 위해 서브블록 머지 모드를 수행할 수 있는 조건을 만족시켜야하고, 서브블록 머지 모드보다 앞에 시그널링되거나 결정되는 모드들을 모두 사용하지 않고(예를 들어 regular_merge_flag == 0 && mmvd_merge_flag == 0), 머지 모드를 사용하는 경우(general_merge_flag == 1)의 조건을 만족시켜야할 수 있다. 그 외의 경우에는 merge_subblock_flag가 존재하지 않는 경우 0으로 추론할 수 있다.
도 26을 참조하면 subblock_merge_condition을 만족시키거나 ciip_condition을 만족시키거나 triangle_merge_condition을 만족시키는 경우 mmvd_merge_flag를 파싱할 수 있다. 또한 subblock_merge_condition을 만족시키지 않고, ciip_condition을 만족시키지 않고, triangle_merge_coondition을 만족시키지 않는 경우 mmvd_merge_flag를 파싱하지 않을 수 있다. 또한 subblock_merge_condition을 만족시키지 않고, ciip_condition을 만족시키지 않고 triangle_merge_coondition을 만족시키지 않는 경우 mmvd_merge_flag를 1로 추론할 수 있다. 이때 1로 추론하기 위해 MMVD를 수행할 수 있는 조건을 만족시켜야하고, MMVD보다 앞에 시그널링되거나 결정되는 모드들을 모두 사용하지 않고(예를 들어 regular_merge_flag == 0), 머지 모드를 사용하는 경우(general_merge_flag == 1)의 조건을 만족시켜야할 수 있다. 또한 도 66에서 설명한 mmvd_merge_flag를 1로 추론하는 경우가 있을 수 있다. 그 외의 경우에는 mmvd_merge_flag가 존재하지 않는 경우 0으로 추론할 수 있다.
도 26을 참조하면 mmvd_condition을 만족시키거나 subblock_merge_condition을 만족시키거나 ciip_condition을 만족시키거나 triangle_merge_condition을 만족시키는 경우 regular_merge_flag를 파싱할 수 있다. 또한 mmvd_condition를 만족시키지 않고, subblock_merge_condition을 만족시키지 않고, ciip_condition을 만족시키지 않고, triangle_merge_coondition을 만족시키지 않는 경우 regular_merge_flag를 파싱하지 않을 수 있다. 또한 mmvd_condition를 만족시키지 않고, subblock_merge_condition을 만족시키지 않고, ciip_condition을 만족시키지 않고 triangle_merge_coondition을 만족시키지 않는 경우 regular_merge_flag를 1로 추론할 수 있다. 이때 1로 추론하기 위해 정규 머지 모드를 수행할 수 있는 조건을 만족시켜야하고(정규 머지 모드에 대해서는 이러한 조건이 존재하지 않을 수 있다.), 정규 머지 모드보다 앞에 시그널링되거나 결정되는 모드들을 모두 사용하지 않고(정규 머지 모드에 대해서는 이러한 조건이 존재하지 않을 수 있다.), 머지 모드를 사용하는 경우(general_merge_flag == 1)의 조건을 만족시켜야할 수 있다. 또한 도 25에서 설명한 regular_merge_flag를 1로 추론하는 경우가 있을 수 있다. 그 외의 경우에는 regular_merge_flag가 존재하지 않는 경우 0으로 추론할 수 있다.
또한 도 26에서 다수의 모드에 대해 그보다 뒤에 시그널링되거나 결정되는 모드를 수행 가능한지 여부에 따른 시그널링을 설명하였는데 상기 다수의 모드 중 일부에 대해서만 상기 시그널링 방법을 사용할 수 있다. 즉, 도 25의 제1 조건(2501), 제2 조건(2502), 제3 조건(2503), 제4 조건(2504) 중 적어도 하나를 사용하고, 나머지는 도 26의 방법을 사용할 수 있다. 즉, 도 25의 제1 조건(2501), 도 26의 제2 조건(2602), 도 26의 제3 조건(2603), 제4 조건(2604)를 사용할 수 있다.
도 27은 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 나타낸 도면이다. 도 27은 도 12, 13 및 도 26에서 설명한 시그널링 방법의 구체적인 실시예일 수 있다. 도 27을 참조하면 ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2)인 경우 ciip_flag를 파싱할 수 있다. 이때 CIIP를 수행할 수 있는 조건을 만족시키는 경우에만 ciip_flag를 파싱하는 것이 가능할 수 있다. 또한 ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2)를 만족시키지 않는 경우 ciip_flag를 파싱하지 않을 수 있다. 또한 ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2)를 만족시키지 않는 경우 ciip_flag를 1로 추론할 수 있다. 이때 머지 모드를 사용하고, CIIP를 수행할 수 있는 조건을 만족시키고, CIIP보다 앞에 시그널링 되거나 결정되는 모드들을 모두 사용하지 않는 경우에 ciip_flag를 1로 추론할 수 있다.
예를 들어 ( general_merge_flag == 1 && sps_ciip_enabled_flag && cu_skip_flag == 0 && width*height >= 64 && width < 128 && height < 128 && regular_merge_flag == 0 && mmvd_merge_flag == 0 && merge_subblock_flag == 0)이고, ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2)를 만족시키지 않는 경우에 ciip_flag를 1로 추론할 수 있다. 이때 ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2) 중 일부 조건만을 사용할 수 있다. 일부 조건만을 사용할 때 파싱 여부와 추론할 때 일부 조건은 일치하여야 할 수 있다. 예를 들어 slice_type를 사용하지 않는 경우의 예를 들면 ( sps_triangle_enabled_flag && MaxNumTriangleMergeCand >= 2)를 만족시킬 때 ciip_flag를 파싱하는 것이 가능할 수 있고, ( sps_triangle_enabled_flag && MaxNumTriangleMergeCand >= 2)를 만족시키지 않을 때 ciip_flag를 파싱하지 않을 수 있다. 또한 ( sps_triangle_enabled_flag && MaxNumTriangleMergeCand >= 2)를 만족시키지 않을 때 머지 모드를 사용하고, CIIP를 수행할 수 있는 조건을 만족시키고, CIIP보다 앞에 시그널링 되거나 결정되는 모드들을 모두 사용하지 않는 경우에 ciip_flag를 1로 추론할 수 있다.
도 27을 참조하면 ( ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2) || (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128) )인 경우 merge_subblock_flag를 파싱할 수 있다. 이때 서브블록 머지 모드를 수행할 수 있는 조건을 만족시키는 경우에만 merge_subblock_flag를 파싱하는 것이 가능할 수 있다. 또한 ( ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2) || (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128) )를 만족시키지 않는 경우 merge_subblock_flag를 파싱하지 않을 수 있다. 또한 (( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2)|| (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128) )를 만족시키지 않는 경우 merge_subblock_flag를 1로 추론할 수 있다. 이때 머지 모드를 사용하고, 서브블록 머지 모드를 수행할 수 있는 조건을 만족시키고, 서브블록 머지 모드보다 앞에 시그널링 되거나 결정되는 모드들을 모두 사용하지 않는 경우에 merge_subblock_flag를 1로 추론할 수 있다.
예를 들어, ( general_merge_flag == 1 && MaxNumSubblockMergeCand > 0 && width >= 8 && height >= 8 && regular_merge_flag == 0 && mmvd_merge_flag == 0 )이고, (( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2) || (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128))를 만족시키지 않는 경우에 merge_subblock_flag를 1로 추론할 수 있다. 이때 ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2) 중 일부 조건만을 사용하고 (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128) 중 일부 조건만을 사용할 수 있다. 일부 조건만을 사용할 때 파싱 여부와 추론할 때 일부 조건은 일치하여야 할 수 있다. 또한 앞에서 ( ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2) || (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128) )를 만족시키지 않는 경우를 얘기하였는데 이것은 ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2)을 만족시키지 않고(&&), (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128)를 만족시키지 않는 것과 같은 것일 수 있다.
도 27을 참조하면 ( ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2) || (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128) || (MaxNumSubblockMergeCand > 0 && width >= 8 && height >= 8) )인 경우 mmvd_merge_flag를 파싱할 수 있다. 이때 MMVD를 수행할 수 있는 조건을 만족시키는 경우에만 mmvd_merge_flag를 파싱하는 것이 가능할 수 있다. 또한 ( ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2) || (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128) || (MaxNumSubblockMergeCand > 0 && width >= 8 && height >= 8))를 만족시키지 않는 경우 mmvd_merge_flag를 파싱하지 않을 수 있다. 또한 (( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2)|| (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128) || (MaxNumSubblockMergeCand > 0 && width >= 8 && height >= 8))를 만족시키지 않는 경우 mmvd_merge_flag를 1로 추론할 수 있다.
이때 머지 모드를 사용하고, MMVD를 수행할 수 있는 조건을 만족시키고, MMVD보다 앞에 시그널링 되거나 결정되는 모드들을 모두 사용하지 않는 경우에 mmvd_merge_flag를 1로 추론할 수 있다. 예를 들어 ( general_merge_flag == 1 && sps_mmvd_enabled_flag && regular_merge_flag == 0 )이고, (( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2) || (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128)|| (MaxNumSubblockMergeCand > 0 && width >= 8 && height >= 8))를 만족시키지 않는 경우에 mmvd_merge_flag를 1로 추론할 수 있다. 이때 ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2) 중 일부 조건만을 사용하고 (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128) 중 일부 조건만을 사용하고 (MaxNumSubblockMergeCand > 0 && width >= 8 && height >= 8) 중 일부 조건만을 사용할 수 있다. 일부 조건만을 사용할 때 파싱 여부와 추론할 때 일부 조건은 일치하여야 할 수 있다. 또한 앞에서 ( ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2) || (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128) || (MaxNumSubblockMergeCand > 0 && width >= 8 && height >= 8))를 만족시키지 않는 경우를 얘기하였는데 이것은 ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2)을 만족시키지 않고(&&), (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128)를 만족시키지 않고(&&), (MaxNumSubblockMergeCand > 0 && width >= 8 && height >= 8)를 만족시키지 않는 것과 같은 것일 수 있다.
도 25에서 설명한 것처럼 mmvd_merge_flag를 1로 추론하는 경우가 있을 수 있다. 예를 들어 (sps_mmvd_enabled_flag == 1 && general_merge_flag == 1 && width*height == 32 && regular_merge_flag == 0)인 경우 mmvd_merge_flag를 1로 추론할 수 있다. 또한 도 26에서 설명한 것처럼 ( general_merge_flag == 1 && sps_mmvd_enabled_flag && regular_merge_flag == 0 )이고, (( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2) || (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128)|| (MaxNumSubblockMergeCand > 0 && width >= 8 && height >= 8))를 만족시키지 않는 경우에 mmvd_merge_flag를 1로 추론할 수 있다. 이외의 경우는 mmvd_merge_flag를 0으로 추론할 수 있다.
도 27을 참조하면 ( ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2) || (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128) || (MaxNumSubblockMergeCand > 0 && width >= 8 && height >= 8) || sps_mmvd_enabled_flag)인 경우 regular_merge_flag를 파싱할 수 있다. 이때 가능한 머지 모드가 정규 머지 모드만 존재하지 않는 경우에만 regular_merge_flag를 파싱하는 것이 가능할 수 있다. 또한 ( ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2) || (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128) || (MaxNumSubblockMergeCand > 0 && width >= 8 && height >= 8)|| sps_mmvd_enabled_flag)를 만족시키지 않는 경우 regular_merge_flag를 파싱하지 않을 수 있다.
또한 (( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2)|| (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128) || (MaxNumSubblockMergeCand > 0 && width >= 8 && height >= 8)|| sps_mmvd_enabled_flag)를 만족시키지 않는 경우 regular_merge_flag를 1로 추론할 수 있다. 이때 머지 모드를 사용하는 경우에 regular_merge_flag를 1로 추론할 수 있다. 예를 들어 ( general_merge_flag == 1 )이고, (( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2) || (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128)|| (MaxNumSubblockMergeCand > 0 && width >= 8 && height >= 8)|| sps_mmvd_enabled_flag)를 만족시키지 않는 경우에 regular_merge_flag를 1로 추론할 수 있다. 이때 ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2) 중 일부 조건만을 사용하고 (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128) 중 일부 조건만을 사용하고 (MaxNumSubblockMergeCand > 0 && width >= 8 && height >= 8) 중 일부 조건만을 사용할 수 있다. 일부 조건만을 사용할 때 파싱 여부와 추론할 때 일부 조건은 일치하여야 할 수 있다.
더 구체적으로 저복잡도 인코더는 다양한 머지 툴들(merge tools)을 사용하지 않을 수 있고, 그러한 인코더를 위해 ( sps_triangle_enabled_flag || sps_affine_enabled_flag || sps_sbtmvp_enabled_flag || sps_ciip_enabled_flag || sps_mmvd_enabled_flag)를 만족시키지 않는 경우 regular_merge_flag를 파싱하지 않고, 그 값을 1로 추론할 수 있다. 또한 앞에서 ( ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2) || (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128) || (MaxNumSubblockMergeCand > 0 && width >= 8 && height >= 8)|| sps_mmvd_enabled_flag)를 만족시키지 않는 경우를 얘기하였는데 이것은 ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2)을 만족시키지 않고(&&), (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128)를 만족시키지 않고(&&), (MaxNumSubblockMergeCand > 0 && width >= 8 && height >= 8)를 만족시키지 않고(&&), sps_mmvd_enabled_flag를 만족시키지 않는 것과 같은 것일 수 있다.
도 25에서 설명한 것처럼 regular_merge_flag를 1로 추론하는 경우가 있을 수 있다. 예를 들어 (sps_mmvd_enabled_flag == 0 && general_merge_flag == 1 && width*height == 32)인 경우 regular_merge_flag를 1로 추론할 수 있다. 또한 도 68에서 설명한 것처럼 ( general_merge_flag == 1)이고, (( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2) || (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128)|| (MaxNumSubblockMergeCand > 0 && width >= 8 && height >= 8)|| sps_mmvd_enabled_flag)를 만족시키지 않는 경우에 regular_merge_flag를 1로 추론할 수 있다. 이외의 경우는 regular_merge_flag를 0으로 추론할 수 있다.
또한 도 27의 제1 조건(2701)과 제2 조건(2702)에서 (1) width*height >= 64, (2) width >= 8, height >= 8 조건이 포함되어 있기 때문에 (1) 또는 (2)를 width, height는 각각 4, 8이 아니거나 width, height는 각각 8, 4가 아니어야할 수 있다. 따라서 제1 조건(2701)과 제2 조건(2702)에서 width*height가 32인지 아닌지 확인하는 것이 필요하지 않을 수 있다. 따라서 제2 조건(2702)을 ( ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2) || (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128) || (MaxNumSubblockMergeCand > 0 && width >= 8 && height >= 8) || sps_mmvd_enabled_flag) 만으로 사용할 수 있다. 이러한 경우 general_merge_flag가 1이고, ( ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2) || (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128) || (MaxNumSubblockMergeCand > 0 && width >= 8 && height >= 8) || sps_mmvd_enabled_flag)를 만족시키지 않는 경우 regular_merge_flag를 1로 추론할 수 있다. 또한 그 외의 경우에 regular_merge_flag를 0으로 추론할 수 있다.
또한 제2 조건(2702)를 sps_mmvd_enabled_flag && ( ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2) || (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128) || (MaxNumSubblockMergeCand > 0 && width >= 8 && height >= 8) ) 만으로 사용할 수 있다. 이러한 경우 ( general_merge_flag == 1 && sps_mmvd_enabled_flag && regular_merge_flag == 0)이고 ( ( sps_triangle_enabled_flag && slice_type == B && MaxNumTriangleMergeCand >= 2) || (sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128) || (MaxNumSubblockMergeCand > 0 && width >= 8 && height >= 8) )를 만족시키지 않는 경우 mmvd_merge_flag를 1로 추론할 수 있다. 또한 그 외의 경우 mmvd_merge_flag를 0으로 추론할 수 있다.
또한 도 26에서 설명한 것처럼 도 27에서도 다수의 모드 중 일부에 대해서만 상기 시그널링 방법을 사용할 수 있다. 즉, 도 25의 제1 조건(2501), 제2 조건(2502), 제3 조건(2503), 제4 조건(2504) 중 일부를 사용하고, 나머지는 도 27의 방법을 사용할 수 있다. 즉, 도 25의 제1 조건(2501), 도 27의 제2 조건(2702), 제3 조건(2703), 제4 조건(2704)를 사용할 수 있다.
도 28은 본 발명의 일 실시예에 따른 머지 데이터 신택스 구조를 예시하는 도면이다. 도 28는 도 12, 13 및 도 26에서 설명한 시그널링 방법의 구체적인 실시예일 수 있다. 또한 도 28의 실시예는 도 27에서 설명한 실시예에서 중복된 조건을 제외한 것일 수 있다.
도 28를 참조하면 도 27과 비교하여 제2 조건(2802)에서 width*height >= 64의 조건이 존재하지 않을 수 있다. 이것은 (width >= 8 && height >= 8)의 조건을 만족시키지 않는 경우 width*height >= 64 조건을 만족시키지 않을 것이고, width*height != 32 조건이 이미 존재하기 때문일 수 있다. 즉 다른 조건에 의해 width*height >= 64이 항상 만족될 수 있기 때문일 수 있다.
또한 도 26에서 설명한 것처럼 도 28에서도 다수의 모드 중 일부에 대해서만 상기 시그널링 방법을 사용할 수 있다. 즉, 도 25의 제1 조건(2501), 제2 조건(2502), 제3 조건(2503), 제4 조건(2504) 중 일부를 사용하고, 나머지는 도 28의 방법을 사용할 수 있다. 즉, 도 25의 제1 조건(2501), 도 28의 제2 조건(2802), 제3 조건(2803), 제4 조건(2804)를 사용할 수 있다. 또는, 도 25 내지 도 28의 제1 내지 제4 조건을 혼용해서 사용할 수도 있다. 즉, 도 27의 제1 조건(2701), 도 28의 제2 조건(2802), 도 28의 제3 조건(2801), 도 28의 제4 조건(2801)를 사용할 수도 있다.
도 29는 본 발명의 일 실시예에 따른 머지 모드 시그널링 방법을 예시하는 도면이다. 앞서 설명한 머지 모드 시그널링 에서는 순차적인 시그널링 방법을 설명하였다. 예를 들면 도 25와 같은 순차적인 시그널링 방법을 사용할 수 있다. 도 29 (a)는 이와 같은 순차적인 시그널링 방법을 나타내고 있다. 도 29에서 진하게 나타낸 것은 결정되는 모드를 나타내고, 기울임으로 나타내는 것은 시그널링일 수 있다. 이 시그널링은 플래그일 수 있고 0 또는 1의 값을 가질 수 있다.
또한 이 시그널링은 경우에 따라 명시적 시그널링(explicit signaling) 또는 묵시적 시그널링(implicit signaling)이 수행될할 수 있다. 예를 들면 도 29(a)에서 regular_merge_flag가 시그널링될 수 있고, regular_merge_flag 값에 기초하여 정규 머지 모드인지 판단할 수 있다. 만약 regular_merge_flag 가 정규 머지 모드가 아님을 나타낸 경우 mmvd_merge_flag가 시그널링될 수 있고, mmvd_merge_flag에 기초하여 MMVD인지 판단할 수 있다. 만약 MMVD가 아닌 경우 merge_subblock_flag가 시그널링될 수 있고, merge_subblock_flag에 기초하여 서브블록 머지 모드인지 판단할 수 있다. 만약 서브블록 머지 모드가 아닌 경우 ciip_flag가 시그널링될 수 있고, ciip_flag에 기초하여 CIIP 인지 판단할 수 있다. 또한 ciip_flag에 기초하여 TPM(트라이앵글 머지 모드, triangular partitioning 모드)인지 판단할 수 있다. 도 29 (a)에서는 정규 머지 모드, MMVD, 서브블록 머지 모드, CIIP, 트라이앵글 머지 모드 순서대로 시그널링되는 실시예를 나타내었으나 본 발명은 이에 한정되지 않고, 다른 순서로도 구성될 수 있다. 앞선 도면들에서 다른 순서로 구성되는 실시예들도 나타내었다.
또 다른 머지 모드 시그널링 방법으로 그룹핑 방법을 사용할 수 있다. 도 29(b)는 그룹핑 방법의 일 실시예를 나타내고 있다. 예를 들면 group_1_flag를 시그널링할 수 있고, group_1_flag에 기초하여 선택하는 모드가 group 1에 속하는지 아닌지 결정할 수 있다. 만약 group_1_flag가 group 1이 아님을 나타내는 경우 group_2_flag를 시그널링할 수 있다. 또한 group_2_flag에 기초하여 선택하는 모드가 group 2에 속하는지 아닌지 결정할 수 있다. 이와 같은 동작을 다수의 group이 존재하는 경우에도 수행할 수 있다. 또한 group 내에서 어떤 모드를 가리키는지 나타내는 시그널링이 존재할 수 있다. Grouping 방법에 의해 순차적인 시그널링에 비해 시그널링의 깊이를 줄이는 것이 가능하다. 또한 시그널링의 최대 길이(codeword의 최대 길이)를 줄이는 것이 가능하다.
본 발명의 일 실시예에 따르면, 3개의 그룹이 존재할 수 있다. 또한 어떤 group에 속하는 모드는 1개 있을 수 있다. 예를 들어 group 1에 속하는 모드는 1개 존재할 수 있다. 또한 group 2와 group 3에 속하는 모드는 각각 2개 존재할 수 있다. 도 29(b)는 참조하면 group 1에 서브블록 머지 모드가 속하고, group 2에 정규 머지 모드와 MMVD가 속하고, group 3에 CIIP와 트라이앵글 머지 모드가 속할 수 있다. 또한 group_1_flag는 merge_subblock_flag, group_2_flag는 regular_merge_flag일 수 있다. 또한 group 내에서 어떤 모드를 가리키는지 나타내는 시그널링으로 ciip_flag와 mmvd_merge_flag가 존재할 수 있다. 예를 들면 merge_subblock_flag가 시그널링되고, merge_subblock_flag에 기초하여 서브블록 머지 모드인지 아닌지 결정할 수 있다. 만약 서브블록 머지 모드가 아닌 경우 regular_merge_flag가 시그널링될 수 있다. regular_merge_flag에 기초하여 group 2 (정규 머지 모드 or MMVD)인지 group 3 (CIIP or 트라이앵글 머지 모드)인지 결정할 수 있다. 또한 group 2임을 나타내는 경우 mmvd_merge_flag에 기초하여 정규 머지 모드인지, MMVD인지 결정할 수 있다. 또한 group 3임을 나타내는 경우 ciip_flag에 기초하여 CIIP인지 트라이앵글 머지 모드인지 결정할 수 있다. 즉, 도 29(a)와 도 29(b)에서의 merge_subblock_flag, regular_merge_flag, mmvd_merge_flag, ciip_flag는 어느 정도 다른 의미를 가질 수 있다.
도 30은 본 발명의 일 실시예에 따른 머지 데이터 신택스를 예시하는 도면이다. 도 30의 실시예는 도 29(b)에서 설명한 그룹핑 방법을 이용한 것일 수 있다. 본 실시예에서 앞서 설명한 내용들과 중복ㄷ되는 설명은 생략될 수 있다.
본 발명의 일 실시예에 따르면, 머지 모드를 사용하는 경우 merge_subblock_flag를 시그널링할 수 있다. 머지 모드를 사용하는 경우는 앞서 설명한 것과 같을 수 있고, general_merge_flag가 1인 경우일 수 있다. 또한 본 발명은 CuPredMode가 MODE_IBC가 아닌 경우, 또는 CuPredMode가 MODE_INTER인 경우에 해당할 수도 있다. 또한 merge_subblock_flag를 MaxNumSubblockMergeCand, 블록 크기에 기초하여 파싱할지 결정할 수 있고, 이것은 앞서 설명한 서브블록 머지 모드를 사용할 수 있는 조건에 기초한 것일 수 있다. 만약 merge_subblock_flag가 1인 경우 서브블록 머지 모드를 사용하는 것으로 결정할 수 있고, 추가적으로 merge_subblock_idx에 기초하여 후보 인덱스를 결정할 수 있다.
또한, 만약 merge_subblock_flag가 0인 경우 regular_merge_flag를 파싱할 수 있다. 이때 regular_merge_flag를 파싱하기 위한 조건이 존재할 수 있다. 예를 들면 블록 크기에 기초한 조건을 포함할 수 있다. 또한 모드 사용 가능 여부를 나타내는 상위 레벨 시그널링에 기초한 조건을 포함할 수 있다. 상기 모드사용 가능 여부를 나타내는 상위 레벨 시그널링은 sps_ciip_enabled_flag, sps_triangle_enabled_flag를 포함할 수 있다. 또한 slice type에 기초한 조건을 포함할 수 있다. 또한 cu_skip_flag에 기초한 조건을 포함할 수 있다. 도 71을 참조하면 (width*height >= 64 && width < 128 && height < 128)을 만족해야 regular_merge_flag를 파싱할 수 있다. 또한 (width*height >= 64 && width < 128 && height < 128)를 만족하지 않는 경우 regular_merge_flag를 파싱하지 않을 수 있다.
또한 CIIP를 사용할 수 있는 조건은 (sps_ciip_enabled_flag && cu_skip_flag == 0)을 포함할 수 있다. 또한 CIIP를 사용할 수 있는 블록 크기 조건은 (width*height >= 64 && width < 128 && height < 128)를 포함할 수 있다. 또한 트라이앵글 머지 모드를 사용할 수 있는 조건은 (sps_triangle_enabled_flag && slice_type == B)를 포함할 수 있다. 또한 트라이앵글 머지 모드를 사용할 수 있는 블록 크기 조건은 (width*height >= 64 && width < 128 && height < 128)를 포함할 수 있다. 만약 상기 CIIP를 사용할 수 있는 조건 또는 상기 트라이앵글 머지 모드를 사용할 수 있는 조건을 만족시키는 경우 regular_merge_flag를 파싱할 수 있다. 또한 상기 CIIP를 사용할 수 있는 조건과 상기 트라이앵글 머지 모드를 사용할 수 있는 조건을 모두 만족시키지 않는 경우 regular_merge_flag를 파싱하지 않을 수 있다.
본 발명의 실시예를 따르면 regular_merge_flag가 존재하지 않는 경우 그 값을 1로 추론할 수 있다. 예를 들면 항상 1로 추론할 수 있다. 이것은 본 발명에서 regular_merge_flag가 1인 경우 정규 머지 모드 또는 MMVD를 사용하는 것일 수 있다. 따라서 만약 상기 CIIP를 사용할 수 있는 블록 크기 조건과 상기 트라이앵글 머지 모드를 사용할 수 있는 블록 크기 조건을 모두 만족시키지 못 하는 경우 사용 가능한 모드는 정규 머지 모드와 MMVD일 수 있고, regular_merge_flag를 파싱하지 않고 1로 결정할 수 있는 것이다. 도 71에 나타낸 실시예에서는 CIIP와 트라이앵글 머지 모드를 사용할 수 있는 블록 크기 조건이 같다. 즉, 너비 또는 높이가 128인 블록에 대해서 CIIP와 트라이앵글 머지 모드를 모두 사용할 수 없을 수 있다.
또한 상기 CIIP를 사용할 수 있는 조건과 상기 트라이앵글 머지 모드를 사용할 수 있는 조건을 모두 만족시키지 않는 경우에도 앞서 설명한 것처럼 가능한 모드가 정규 머지 모드 또는 MMVD일 수 있으므로 regular_merge_flag를 파싱하지 않고 1로 추론할 수 있는 것이다.
도 30을 참조하면 regular_merge_flag가 1인 경우 sps_mmvd_enabled_flag 값에 기초하여 신택스 요소를 파싱할 수 있다. sps_mmvd_enabled_flag는 앞서 설명한 것처럼 MMVD가 사용 가능한지 나타내는 상위 레벨 시그널링일 수 있다. sps_mmvd_enabled_flag가 0인 경우 MMVD를 사용할 수 없는 것일 수 있다. 도 71을 참조하면 만약 sps_mmvd_enabled_flag가 0인 경우 mmvd_merge_flag, mmvd_cand_flag, mmvd_distance_idx, mmvd_direction_idx, merge_idx를 파싱하지 않을 수 있다. 또한 mmvd_merge_flag가 존재하지 않는 경우 그 값을 0으로 추론할 수 있다. 또한 merge_idx가 존재하지 않는 경우 그 값을 기설정된 방법에 따라 추론할 수 있다. 예를 들어 merge_idx가 존재하지 않는 경우 mmvd_merge_flag가 1인 경우 mmvd_cand_flag로 추론하고, mmvd_merge_flag가 0인 경우 0으로 추론할 수 있다. 따라서 도 30의 실시예에서 sps_mmvd_enabled_flag가 0인 경우 regular_merge_flag가 1이면 항상 merge_idx 값이 0일 수 있고, merge candidate list의 index 0의 candidate를 사용하여 정규 머지 모드 prediction을 할 수 있다. 따라서 candidate를 선택하는 자유도가 없을 수 있고 이에 따라 코딩 효율이 떨어질 수 있다. 또한 sps_mmvd_enabled_flag가 1인 경우 mmvd_merge_flag를 파싱할 수 있고, mmvd_merge_flag가 0인 경우 MaxNumMergeCand에 기초하여 merge_idx를 파싱할 수 있다.
또한 도 30을 참조하면 regular_merge_flag가 0인 경우, 상기 CIIP를 사용할 수 있는 조건과 상기 트라이앵글 머지 모드를 사용할 수 있는 조건을 모두 만족하는 경우 ciip_flag를 파싱할 수 있다. 만약 ciip_flag가 1인 경우 CIIP를 사용하고 ciip_flag가 0인 경우 트라이앵글 머지 모드를 사용하는 것일 수 있다. 만약 상기 CIIP를 사용할 수 있는 조건 또는 상기 트라이앵글 머지 모드를 사용할 수 있는 조건을 만족시키지 않는 경우 ciip_flag를 파싱하지 않을 수 있다. 만약 ciip_flag가 존재하지 않는 경우 regular_merge_flag가 1이면 ciip_flag를 0으로 추론할 수 있다. 만약 ciip_flag가 존재하지 않는 경우 regular_merge_flag가 0이면 ciip_flag를 (sps_ciip_enabled_flag && cu_skip_flag ==0) 으로 추론할 수 있다. 또한 MergeTriangleFlag는 B slice인 경우, !ciip_flag로 설정할 수 있다. 또한 MergeTriangleFlag는 P slice인 경우 0으로 설정할 수 있다.
도 31은 본 발명의 일 실시예에 따른 머지 데이터 신택스를 예시하는 도면이다. 본 실시예에서 앞서 설명한 것과 중복된 내용은 생략할 수 있다. 도 30에서 설명한 바와 같이, regular_merge_flag가 1이고, MMVD를 사용할 수 있는지 나타내는 상위 레벨 시그널링이 MMVD를 사용할 수 없음을 나타내는 경우 후보 선택의 자유도가 떨어지는 것을 설명하였는데 도 31의 실시예에서는 에서는 이를 해결할 수 있다.
도 31를 참조하면 merge_idx를 파싱할 지 여부는 sps_mmvd_enabled_flag와 독립적일 수 있다. 즉, sps_mmvd_enabled_flag의 값과 상관없이 merge_idx 파싱여부를 결정할 수 있다. 본 발명의 실시예를 따르면 regular_merge_flag가 1인 경우 mmvd_merge_flag가 0이고, MaxNumMergeCand > 1인 경우 merge_idx를 파싱할 수 있다. 또한 regular_merge_flag가 1인 경우 mmvd_merge_flag가 1이면 merge_idx를 파싱하지 않을 수 있다. 또한 regular_merge_flag가 1인 경우 MaxNumMergeCand가 1이면 merge_idx를 파싱하지 않을 수 있다. 예를 들어 sps_mmvd_enabled_flag가 1인 경우 regular_merge_flag가 1이고, mmvd_merge_flag가 0이고, MaxNumMergeCand > 1이면 merge_idx를 파싱할 수 있다. 또한 마찬가지로 sps_mmvd_enabled_flag가 0인 경우 regular_merge_flag가 1이고, mmvd_merge_flag가 0이고, MaxNumMergeCand > 1이면 merge_idx를 파싱할 수 있다.
또한, 도 30의 일 실시예에서 트라이앵글 머지 모드를 사용할 수 있는 블록 크기 조건은 (width*height >= 64 && width < 128 && height < 128)일 수 있었는데, 너비 또는 높이가 128인 경우 트라이앵글 머지 모드를 사용할 수 있을 수 있다. 예를 들면 너비 또는 높이가 128인 경우 트라이앵글 머지 모드의 예측이 코딩 효율 향상에 도움이 될 수 있기 때문이다. 도 72에서는 트라이앵글 머지 모드를 너비 또는 높이가 128인 경우에도 사용할 수 있을 수 있다.
도 31에서 CIIP를 사용할 수 있는 블록 크기 조건은 (width*height >= 64 && width < 128 && height < 128)일 수 있다. 또한 트라이앵글 머지 모드를 사용할 수 있는 블록 크기 조건은 (width*height >= 64)일 수 있다. 따라서 도 72를 참조하면 (width*height >= 64)를 만족시키지 않는 경우 regular_merge_flag를 파싱하지 않을 수 있다. 또한 너비가 128이거나(또는 높이가 128 이상이거나) height가 128인(또는 height가 128 이상인) 경우 regular_merge_flag를 파싱하는 경우가 있을 수 있다. 예를 들어 (sps_ciip_enabled_flag && cu_skip_flag==0 && width < 128 && height < 128)인 경우 (width*height >= 64)를 만족하면 regular_merge_flag를 파싱할 수 있다. 또한 (sps_triangle_enabled_flag && slice_type == B)인 경우 (width*height >= 64)를 만족하면 regular_merge_flag를 파싱할 수 있다. 또한 (sps_ciip_enabled_flag && cu_skip_flag==0 && width < 128 && height < 128)를 만족하지 않고, (sps_triangle_enabled_flag && slice_type == B)를 만족하지 않는 경우 regular_merge_flag를 파싱하지 않을 수 있다.
또한, 도 31을 참조하면 ciip_flag 파싱 여부를 결정할 때 블록 크기에 기초한 조건이 필요할 수 있다. 예를 들어, width < 128 이고 height < 128인 경우 디코더는 ciip_flag를 파싱할 수 있다. 만약 너비가 128이거나(또는 128 이상이거나) height가 128인(또는 128 이상인) 경우 ciip_flag를 파싱하지 않을 수 있다. 이것은 너비 또는 높이가 128인 경우(또는 128 이상인 경우) CIIP와 트라이앵글 머지 모드 중 하나는 사용 불가하지만 나머지 하나는 사용할 수 있을 수 있기 때문일 수 있다. 이것은 너비 또는 높이가 128인 경우(또는 128 이상인 경우) CIIP는 사용 불가하지만 트라이앵글 머지 모드를 사용할 수 있을 수 있기 때문일 수 있다. 도 30의 실시예에서는 너비 또는 높이가 128인 경우(또는 128 이상인 경우) CIIP와 트라이앵글 머지 모드 모두 사용 불가하고, 이에 따라 regular_merge_flag를 파싱하지 않고 1로 추론했기 때문에 도 31와 차이점이 있다.
본 발명의 일 실시예에서, regular_merge_flag는 merge_subblock_flag에 기초하여 그 값을 추론할 수 있다. 본 실시예에서, regular_merge_flag, merge_subblock_flag, ciip_flag는 도 29(b), 도 30, 도 31에서 설명한 regular_merge_flag, merge_subblock_flag, ciip_flag일 수 있다.
도 30의 설명에서 regular_merge_flag가 존재하지 않는 경우 그 값을 항상 1로 추론하였는데, regular_merge_flag보다 먼저 시그널링되는 merge_subblock_flag가 1인 경우가 존재할 수 있다. 이때 merge_subblock_flag 또는 regular_merge_flag에 기초하여 예측을 수행하는데 두 개의 값이 모두 1이기 때문에 어떤 예측을 수행을 수행할 지에 대해 모호함(ambiguity)이 발생할 수 있다. 따라서 본 실시예에서는 merge_subblock_flag에 기초하여 regular_merge_flag를 추론할 수 있다. 예를 들면 merge_subblock_flag가 1인 경우 regular_merge_flag를 0으로 추론할 수 있다. 또한 merge_subblock_flag가 0인 경우 regular_merge_flag를 1로 추론할 수 있다. 또는 여기에 general_merge_flag 조건이 추가될 수 있다. 예를 들어 merge_subblock_flag가 0이고, general_merge_flag가 1인 경우 regular_merge_flag를 1로 추론할 수 있다.
또한 도 30에서 ciip_flag가 존재하지 않는 경우 그 값을 추론하는 방법을 나타내었는데 CIIP와 트라이앵글 머지 모드의 사용 가능한 블록 크기 조건이 다른 경우 도 30에서 설명한 ciip_flag 추론 방법을 사용하면 어떤 모드를 사용할 수 없는 블록 크기에서 상기 어떤 모드를 사용하는 것으로 시그널링하게 된다. 즉, 예를 들면 너비또는 높이가 128인 경우 CIIP를 사용하는 것이 불가하지만 ciip_flag가 1로 설정될 수 있다. 본 실시예는 이 문제를 해결할 수 있다.
본 발명의 일 실시예에 따르면, ciip_flag가 존재하지 않는 경우 블록 크기에 기초하여 그 값을 추론할 수 있다. 또한 ciip_flag가 존재하지 않는 경우 regular_merge_flag에 기초하여 그 값을 추론할 수 있다. 예를 들어 regular_merge_flag가 1인 경우 ciip_flag를 0으로 추론할 수 있다. 또한 regular_merge_flag가 0인 경우 ciip_flag를 블록 크기에 기초하여 추론할 수 있다. 예를 들어 regular_merge_flag가 0인 경우 ciip_flag를 블록 크기, sps_ciip_enabled_flag, cu_skip_flag에 기초하여 추론할 수 있다. regular_merge_flag가 0인 경우 ciip_flag를 ( sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128)로 추론할 수 있다. 따라서 regular_merge_flag가 0인 경우 너비 또는 높이가 128인 경우 ciip_flag를 0으로 추론할 수 있다. 또한 ciip_flag를 1로 추론하기 위해 general_merge_flag가 1인 조건이 포함될 수 있다. 만약 general_merge_flag가 0인 경우 ciip_flag를 0으로 추론할 수 있다. 즉 regular_merge_flag가 0인 경우 ciip_flag를 ( sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128 && general_merge_flag == 1)로 추론할 수 있다. 그렇지 않은 경우 0으로 추론할 수 있다.
또는 regular_merge_flag가 0이고 general_merge_flag가 1인 경우 ciip_flag를 ( sps_ciip_enabled_flag && cu_skip_flag == 0 && width < 128 && height < 128 )로 추론할 수 있다. 만약 general_merge_flag가 0인 경우 ciip_flag를 0으로 추론할 수 있다.
또한 도 30의 실시예에서 MergeTriangleFlag를 설정하는 방법을 설명하였는데 regular_merge_flag 값에 상관없이 설정하였다. 따라서 regular_merge_flag가 1이고 MergeTriangleFlag가 1인 경우가 발생할 수 있고, 이는 prediction 방법에 대해 ambiguity를 발생시킨다. 따라서 본 실시예에서는, regular_merge_flag에 기초하여 MergeTriangleFlag를 설정할 수 있다. 예를 들어 regular_merge_flag가 1인 경우 MergeTriangleFlag를 0으로 설정할 수 있다. 또한 regular_merge_flag가 0인 경우 MergeTriangleFlag를 !ciip_flag로 설정할 수 있다. 추가적으로 regular_merge_flag가 0인 경우 트라이앵글 머지 모드를 사용할 수 있는 조건 또한 고려하여 MergeTriangleFlag을 설정할 수 있다. 예를 들어 regular_merge_flag가 0인 경우 MergeTriangleFlag를 (!ciip_flag && sps_triangle_enabled_flag && slice_type == B)로 설정할 수 있다.
따라서 sps_triangle_enabled_flag가 0이거나 slice_type이 B가 아닌 경우 MergeTriangleFlag를 1로 설정하는 상황을 방지할 수 있다. 또한 MergeTriangleFlag를 1로 결정하기 위해 general_merge_flag가 1인 조건이 포함될 수 있다. 만약 general_merge_flag가 0인 경우 MergeTriangleFlag를 0으로 설정할 수 있다. 즉, regular_merge_flag가 0인 경우 MergeTriangleFlag를 (!ciip_flag && sps_triangle_enabled_flag && slice_type == B && general_merge_flag ==1)로 설정할 수 있다. 그렇지 않은 경우 MergeTriangleFlag를 0으로 설정할 수 있다.
또는 regular_merge_flag가 0이고 general_merge_flag가 1인 경우 MergeTriangleFlag를 (!ciip_flag && sps_triangle_enabled_flag && slice_type == B)로 설정할 수 있다. 만약 general_merge_flag가 0인 경우 MergeTriangleFlag를 0으로 설정할 수 있다.
도 32는 본 발명의 일 실시예에 따른 지오메트릭 머지 모드(geometric merge 모드)를 나타낸 도면이다. 본 발명의 일 실시예에 따르면, 지오메트릭 머지 모드는 지오메트릭 분할 모드(geometric partitioning mode), GEO 모드, GEO 머지 모드, GEO 분할(partitioning) 등 다양한 명칭으로 지칭될 수 있다. 본 발명의 일 실시예에 따르면, 지오메트릭 머지 모드는 CU(coding unit), CB(coding block)을 분할하는 방법일 수 있다. 예를 들면 정사각형 또는 직사각형의 CU 또는 CB를 정사각형이나 직사각형이 아닌 파티션(partition)으로 나누는 방법일 수 있다. 도 32를 참조하면 지오메트릭 분할의 예를 나타내고 있다. 도 32에 도시된 바와 것과 같이 지오메트릭 분할에 의해 직사각형의 CU가 삼각형과 사다리꼴의 파티션(또는 다각형)으로 나뉠 수 있다. 또한 지오메트릭 머지 모드를 수행하는 방법에 대한 시그널링은 CU에 대해서 시그널링될 수 있다. 또한 지오메트릭 머지 모드는 두 개의 모션 정보에 기초하여 보션 보상, 예측이 수행될 수 있다. 또한 두 개의 모션 정보는 머지 후보로부터 가져오는 것이 가능하다. 본 발명의 실시예를 따르면 지오메트릭 머지 모드에서 사용하는 두 개의 모션 정보를 지시하기 위한 시그널링이 존재할 수 있다. 예를 들면 지오메트릭 머지 모드에서 사용하는 두 개의 모션 정보를 지시하기 위해 두 개의 인덱스를 시그널링할 수 있다. 더 구체적으로 예를 들면 지오메트릭 머지 모드에서 사용하는 두 개의 모션 정보를 지시하기 위해 두 개의 머지 후보 인덱스를 시그널링할 수 있다. 또한 지오메트릭 머지 모드에서 2개의 예측자가 blending될 수 있다. 예를 들면 지오메트릭 머지 모드에서 CU 안의 inner boundary 부근에서 2개의 predictor가 blending될 수 있다. 두 개의 예측자가 blending 된다는 것은 두 개의 예측자가 weighed sum 되는 것일 수 있다.
일 실시예로 지오메트릭 머지 모드에서 사용하는 두 개의 모션 정보를 지시하기 위한 신택스 요소가 merge_triangle_idx0, merge_triangle_idx1일 수 있다. 이 경우 신택스 요소로부터 두 개의 index m, n을 derive할 수 있다. 예를 들면 아래의 수학식과 같이 유도될 수 있다.
m = merge_triangle_idx0
n = merge_triangle_idx1 + (( merge_triangle_idx1 >= m ) ? 1 : 0)
즉, index m은 merge_triangle_idx0와 같을 수 있다. 또한 index n은 merge_triangle_idx1이 merge_triangle_idx0보다 크거나 같은 경우 merge_triangle_idx1 + 1 이고, merge_triangle_idx1이 merge_triangle_idx0보다 작은 경우 merge_triangle_idx1일 수 있다.
또한 도 32를 참조하면 지오메트릭 머지 모드의 split boundary는 angle phi와 distance offset rho로 나타내질 수 있다. Angle phi는 quantized angle을 나타낼 수 있고, distance offset rho는 quantized offset을 나타낼 수 있다. Angle과 distance offset은 merge_geo_idx에 의해 시그널링 될 수 있다. 예를 들면 look-up table에 의해 정의될수 있다. 지오메트릭 머지 모드는 두 개의 모션 정보를 기초로 두 개의 예측자로부터 prediction signal을 생성할 수 있다. 이때 두 개의 예측자를 weighted sum 할 때 weight는 상기 angle 및 상기 distance offset에 기초할 수 있다. 또는 두 개의 예측자를 weighted sum 할 때 weight는 block 내에서의 위치(좌표)에 기초할 수 있다. 또는 두 개의 예측자를 weighted sum 할 때 weight는 block width, height에 기초할 수 있다.
지오메트릭 머지 모드에서는 가능한 split 종류가 TPM보다 많을 수 있다. 예를 들면 지오메트릭 머지 모드에서 가능한 split 종류는 2개보다 많을 수 있다. 예를 들면 80개의 split 종류가 가능할 수 있다. 지오메트릭 머지 모드는 머지 모드의 일종인 것이 가능하다. 즉, 지오메트릭 머지 모드일 때 general_merge_flag 값이 1인 것이 가능하다.
도 33는 본 발명의 일 실시예에 따른 머지 데이터 신택스를 나타낸 도면이다.
도 33의 실시예에서 도 29 내지 도 32에서 설명했거나 그 이전에 설명한 내용은 생략했을 수 있다.
앞서 설명한 것처럼 다수의 머지 모드들을 시그널링하기 위한 방법이 존재할 수 있다. 또한 다수의 머지 모드들은 서브블록 머지 모드, 정규 머지 모드, MMVD, CIIP, 지오메트릭 머지 모드 등을 포함할 수 있다. 또한 다수의 머지 모드들은 triangle partitioning mode를 포함하지 않을 수 있다. 또는 triangle partitioning mode가 지오메트릭 머지 모드에 포함된 형태일 수도 있다. 또한 본 실시예의 시그널링 방법에 의해 머지 모드들을 시그널링할 때 서로 다른 길이의 codeword들이 사용될 수 있고, 특정 mode에 짧은 길이의 codeword를 사용함에 따라 코딩 효율이 향상될 수 있다. 또한 본 실시예의 시그널링 방법에 의해 redundant signaling을 없애서 코딩 효율이 향상될 수 있다. 또한 본 실시예의 시그널링에서 불필요한 조건 검사를 생략하여 파싱 complexity가 낮아질 수 있다.
본 발명의 실시예를 따르면 CIIP를 사용할 수 있는 조건이 존재할 수 있다. 상기 CIIP를 사용할 수 있는 조건을 CIIP_conditions라고 부를 수 있다. CIIP_conditions는 아래 조건들을 모두 만족시킬 때 참(true)일 수 있다.
조건 1. sps_ciip_enabled_flag
조건 2. cu_skip_flag == 0
조건 3. cbWidth * cbHeight >= 64
조건 4. cbWidth < 128
조건 5. cbHeight < 128
또한 CIIP_conditions는 상기 조건들 중 적어도 하나를 만족시키지 않을 때 false일 수 있다. 상기 조건들에 대해서는 앞선 실시예에서 설명하였으므로 생략할 수 있다.
본 발명의 실시예를 따르면 지오메트릭 머지 모드를 사용할 수 있는 조건이 존재할 수 있다. 상기 지오메트릭 머지 모드를 사용할 수 있는 조건을 GEO_conditions라고 부를 수 있다. GEO_conditions는 아래 조건들을 모두 만족시킬 때 true일 수 있다.
조건 1. sps_triangle_enabled_flag
조건 2. MaxNumTriangleMergeCand > 1
조건 3. slice_type == B
조건 4. cbWidth >= 8
조건 5. cbHeight >= 8
또한 GEO_conditions는 상기 조건들 중 적어도 하나를 만족시키지 않을 때 false일 수 있다.
또 다른 실시예로 slice_type 조건이 필요 없을 수 있다. 이것은 다른 조건, 예를 들면 MaxNumTriangleMergeCand에 기초한 조건을 만족시키는 경우 slice_type에 기초한 조건을 만족시키기 때문일 수 있다. 본 발명의 실시예를 따르면 지오메트릭 머지 모드를 사용할 수 있는 조건이 존재할 수 있다. 상기 지오메트릭 머지 모드를 사용할 수 있는 조건을 GEO_conditions라고 부를 수 있다. GEO_conditions는 아래 조건들을 모두 만족시킬 때 true일 수 있다.
조건 1. sps_triangle_enabled_flag
조건 2. MaxNumTriangleMergeCand > 1
조건 3. cbWidth >= 8
조건 4. cbHeight >= 8
또한 GEO_conditions는 상기 조건들 중 적어도 하나를 만족시키지 않을 때 false일 수 있다.
상기 조건들에 대해서는 앞선 실시예에서 설명하였으므로 생략할 수 있다. 다만 sps_triangle_enabled_flag, MaxNumTriangleMergeCand에 대해 앞서 TPM에 관한 값으로 설명하였는데 본 실시예에서는 이것이 지오메트릭 머지 모드에 관한 값일 수 있다. 즉, sps_triangle_enabled_flag는 지오메트릭 머지 모드를 사용 가능한지 나타내는 상위 레벨 시그널링일 수 있다. 또한 MaxNumTriangleMergeCand는 지오메트릭 머지 모드에서 사용하는 candidate list의 maximum 개수일 수 있다.
본 발명의 실시예를 따르면 CIIP_conditions 또는 GEO_conditions를 만족시키는 경우 regular_merge_flag를 파싱할 수 있다. 또한 CIIP_conditions과 GEO_conditions를 모두 만족시키지 않는 경우 regular_merge_flag를 파싱하지 않을 수 있다. 도 75를 참조하면 Condition 2가 (CIIP_conditions || GEO_conditions)를 나타내고 있다. 즉, 다음 조건 중 적어도 하나를 만족시키는 경우 regular_merge_flag를 파싱할 수 있다.
조건 1(CIIP_conditions). sps_ciip_enabled_flag && cu_skip_flag == 0 && cbWidth * cbHeight >= 64 && cbWidth < 128 && cbHeight < 128
조건 2(GEO_conditions). sps_triangle_enabled_flag && MaxNumTriangleMergeCand > 1 && cbWidth >= 8 && cbHeight >= 8
또한 상기 조건 모두를 만족시키지 않는 경우 regular_merge_flag를 파싱하지 않을 수 있다. 또한 regular_merge_flag가 존재하지 않는 경우 그 값을 general_merge_flag && !merge_subblock_flag 로 추론할 수 있다.
또 다른 실시예로 앞서 설명한 것처럼 상기 조건 2(GEO_conditions)는 slice_type 조건을 포함하여 다음과 같을 수 있다.
조건 2(GEO_conditions). sps_triangle_enabled_flag && MaxNumTriangleMergeCand > 1 && slice_type == B && cbWidth >= 8 && cbHeight >= 8
그러나 slice_type 조건이 다른 조건을 만족시킬 때 항상 만족되는 경우 파싱 조건 확인의 복잡도를 줄이기 위해 슬라이스 타입 조건을 추가적으로 검사하지 않을 수 있다.
본 발명의 실시예를 따르면 CIIP_conditions와 GEO_conditions를 모두 만족시키는 경우 ciip_flag를 파싱할 수 있다. 또한 CIIP_conditions 또는 GEO_conditions를 만족시키지 않는 경우 ciip_flag를 파싱하지 않을 수 있다. 즉, 다음 조건 모두를 만족시키는 경우 ciip_flag를 파싱할 수 있고, 다음 조건 중 적어도 하나를 만족시키지 않는 경우 ciip_flag를 파싱하지 않을 수 있다.
조건 1(CIIP_conditions). sps_ciip_enabled_flag && cu_skip_flag == 0 && cbWidth * cbHeight >= 64 && cbWidth < 128 && cbHeight < 128
조건 2(GEO_conditions). sps_triangle_enabled_flag && MaxNumTriangleMergeCand > 1 && cbWidth >= 8 && cbHeight >= 8
또한 앞서 설명한 것처럼 조건 2(GEO_conditions)에 slice_type에 기초한 조건을 포함시키는 것도 가능하다. 그 조건은 아래와 같을 수 있다.
조건 2(GEO_conditions). sps_triangle_enabled_flag && MaxNumTriangleMergeCand > 1 && slice_type == B && cbWidth >= 8 && cbHeight >= 8
본 발명의 실시예를 따르면 파싱 복잡도를 낮추기 위해 ciip_flag를 파싱하기 위한 조건이 달라질 수 있다. 예를 들어 블록 크기 조건 일부를 생략할 수 있다. 본 발명에서 지오메트릭 머지 모드를 사용하기 위한 블록 크기 조건을 만족하는 경우 CIIP를 사용하기 위한 블록 크기 조건 일부가 만족될 수 있다. 따라서 도 75의 Condition 3을 참조하고, 본 발명의 실시예를 따르면 다음 조건 모두를 만족시키는 경우 ciip_flag를 파싱할 수 있고, 다음 조건 중 적어도 하나를 만족시키지 않는 경우 ciip_flag를 파싱하지 않을 수 있다.
조건 1(CIIP_conditions). sps_ciip_enabled_flag && cu_skip_flag == 0 && cbWidth < 128 && cbHeight < 128
조건 2(GEO_conditions). sps_triangle_enabled_flag && MaxNumTriangleMergeCand > 1 && cbWidth >= 8 && cbHeight >= 8
또한 ciip_flag가 존재하지 않는 경우 다음 조건을 모두 만족시키는 경우 1로 추론하고 다음 조건들 중 적어도 하나를 만족시키지 않는 경우 0으로 추론될 수 있다.
조건 1. sps_ciip_enabled_flag == 1
조건 2. general_merge_flag == 1
조건 3. merge_subblock_flag == 0
조건 4. regular_merge_flag == 0
조건 5. cu_skip_flag == 0
조건 6. cbWidth < 128
조건 7. cbHeight < 128
조건 8. cbWidth * cbHeight >= 64
즉, 파싱할 때의 조건과 추론할 때의 조건이 다를 수 있다. 또한 파싱할 때 생략한 조건(예를 들면 블록 크기에 기초한 조건)을 추론할 때의 조건에는 포함해야할 수 있다.
또한. 지오메트릭 머지 모드사용여부를 나타내는 값인 merge_geo_flag를 아래 조건들을 모두 만족시키는 경우 1로 결정하고, 아래 조건들 중 적어도 하나를 만족시키지 않는 경우 0으로 결정할 수 있다.
조건 1. sps_triangle_enabled_flag == 1
조건 2. general_merge_flag == 1
조건 3. merge_subblock_flag == 0
조건 4. regular_merge_flag == 0
조건 5. ciip_flag == 0
조건 6. MaxNumTriangleMergeCand >= 2
조건 7. cbWidth >= 8
조건 8. cbHeight >= 8
추가적인 실시예로 조건 9로 slice_type == B가 추가될 수 있다.
따라서 도 33을 참조하면 다음과 같은 시그널링 구조를 가질 수 있다. 제1 조건(3301)을 만족시키는 경우 merge_subblock_flag를 파싱할 수 있다. 만약 merge_subblock_flag가 1인 경우 서브블록 머지 모드를 사용하는 것일 수 있고, merge_subblock_idx를 파싱할 수 있고, regular_merge_flag, mmvd_merge_flag, ciip_flag를 파싱하지 않을 수 있다. 만약 merge_subblock_flag가 0인 경우 제2 조건(3302)를 만족시키는 경우 regular_merge_flag를 파싱할 수 있다. 만약 regular_merge_flag가 1인 경우 정규 머지 모드 또는 MMVD를 사용하는 것일 수 있고, 추가적으로 mmvd_merge_flag를 파싱하는 것이 가능할 수 있다. 이에 대해 도 29 내지 도 32서 설명한 내용을 적용할 수 있다. 만약 regular_merge_flag가 0인 경우 제2 조건(3302)을 만족시키는 경우 ciip_flag를 파싱할 수 있다. 만약 ciip_flag가 1인 경우 CIIP를 사용하는 것일 수 있다. CIIP를 사용하는 경우 MaxNumMergeCand가 1보다 큰 경우 merge_idx를 파싱할 수 있다. 만약 ciip_flag가 0인 경우, merge_geo_flag가 1로 결정될 수 있다. 또한 만약 ciip_flag가 0인 경우 지오메트릭 머지 모드를 사용하는 것일 수 있다. 지오메트릭 머지 모드를 사용하는 경우 merge_geo_idx, merge_triangle_idx0, merge_triangle_idx1을 파싱할 수 있다. 또는 지오메트릭 머지 모드를 사용하는 경우 MaxNumTriangleMergeCand가 1보다 큰 경우 merge_geo_idx, merge_triangle_idx0, merge_triangle_idx1을 파싱할 수 있다.
따라서 본 발명의 실시예를 따르면 width 또는 height가 4인 block, 즉, 4xN, Nx4 size block이 CIIP를 사용하는 경우 다음과 같이 시그널링할 수 있다. merge_subblock_flag가 0일 수 있고, 제2 조건(3302)를 만족시키므로 regular_merge_flag를 파싱할 수 있고 그 값이 0일 수 있고, 제3 조건(3303)을 만족시키지 않으므로 ciip_flag를 파싱하지 않을 수 있고, 앞서 설명한 내용에 따라 그 값을 1로 추론할 수 있다. 또한 지오메트릭 머지 모드를 사용하는 경우 시그널링은 다음과 같을 수 있다. merge_subblock_flag가 0이고, regular_merge_flag가 0이고 ciip_flag가 0일 수 있다.
도 33에서 설명한 실시예에서 지오메트릭 머지 모드 사용 여부를 나타내는 신택스 요소가 ciip_flag 외에 따로 존재하지 않을 수 있다. 또한 도 33의 실시예에서 지오메트릭 머지 모드가 width 또는 height가 8보다 작은 block에 대해 수행할 수 없는 것을 기초로 설명하였는데, 본 발명은 이에 한정되지 않고, 지오메트릭 머지 모드가 다른 블록 크기(예를 들면 threshold보다 작은 블록 크기)에 대해 사용할 수 없는 경우에도 실시예를 적용할 수 있다.
도 34는 본 발명이 적용되는 일 실시예에 따른 비디오 신호 처리 방법을 예시하는 도면이다. 도 34를 참조하면, 설명의 편의를 위해 디코더를 위주로 설명하나 본 발명이 이에 제한되는 것은 아니며, 본 실시예에 따른 다중 가정 예측 기반 비디오 신호 처리 방법은 인코더에도 실질적으로 동일한 방법으로 적용될 수 있다.
디코더는 현재 블록에 머지 모드(merge mode)가 적용되는지 여부를 지시하는 제1 신택스 요소(syntax element)를 파싱한다(S3401)
디코더는 상기 현재 블록에 상기 머지 모드가 적용되는 경우, 미리 정의된 제1 조건에 기초하여 제2 신택스 요소의 파싱 여부를 결정한다(S3402). 실시예로서, 상기 제2 신택스 요소는 제1 모드 또는 제2 모드가 상기 현재 블록에 적용되는지 여부를 지시할 수 있다.
디코더는 상기 현재 블록에 상기 제1 모드 및 상기 제2 모드가 적용되지 않는 경우, 미리 정의된 제2 조건에 기초하여 제3 신택스 요소의 파싱 여부를 결정한다(S3403). 실시예로서, 상기 제3 신택스 요소는 제3 모드 또는 제4 모드 중에서 상기 현재 블록에 적용되는 모드를 지시할 수 있다.
디코더는 상기 제2 신택스 요소 또는 상기 제3 신택스 요소에 기초하여 상기 현재 블록에 적용되는 모드를 결정한다(S3404).
디코더는 상기 결정된 모드에 기초하여 상기 현재 블록의 모션 정보를 유도한다(S3405).
디코더는 상기 현재 블록의 모션 정보를 이용하여 상기 현재 블록의 예측 블록을 생성한다(S3406).
상기 제1 조건은 상기 제3 모드를 이용할 수 있는 조건 및 상기 제4 모드를 이용할 수 있는 조건 중 적어도 하나를 포함하는 것을 특징으로 하는, 비디오 신호 처리 방법.
전술한 바와 같이, 실시예로서, 상기 제3 모드 및 상기 제4 모드는 머지 데이터 신택스 내에서 디코딩 순서상 상기 제1 모드 보다 후순위에 위치할 수 있다.
전술한 바와 같이, 실시예로서, 상기 제1 조건을 만족하는 경우, 상기 제2 신택스 요소를 파싱하는 단계를 포함하고, 상기 제1 조건을 만족하지 않는 경우, 상기 제2 신택스 요소는 1로 추론될 수 있다.
전술한 바와 같이, 실시예로서, 상기 제1 조건을 만족하지 않는 경우, 상기 제2 신택스 요소는 상기 현재 블록에 서브블록 기반 머지 모드가 적용되는지 여부를 지시하는 제4 신택스 요소에 기초하여 추론될 수 있다.
전술한 바와 같이, 실시예로서, 상기 제2 조건은 상기 제4 모드를 이용할 수 있는 조건을 포함할 수 있다.
전술한 바와 같이, 실시예로서, 상기 제2 조건은 현재 시퀀스에서 상기 제3 모드를 이용할 수 있는지 여부, 상기 현재 시퀀스에서 상기 제4 모드를 이용할 수 있는지 여부, 상기 제4 모드의 최대 후보 개수가 1보다 큰지 여부, 상기 현재 블록의 너비가 미리 정의된 제1 크기보다 작은지 여부 및 상기 현재 블록의 높이가 미리 정의된 제2 크기보다 작은지 여부 중 적어도 하나를 포함할 수 있다.
전술한 바와 같이, 실시예로서, 상기 제2 신택스 요소가 1인 경우, 상기 현재 블록에 상기 제1 모드가 적용되는지 또는 상기 제2 모드가 적용되는지 여부를 지시하는 제5 신택스 요소를 획득하는 단계를 포함할 수 있다.
상술한 본 발명의 실시예들은 다양한 수단을 통해 구현될 수 있다. 예를 들어, 본 발명의 실시예들은 하드웨어, 펌웨어(firmware), 소프트웨어 또는 그것들의 결합 등에 의해 구현될 수 있다.
하드웨어에 의한 구현의 경우, 본 발명의 실시예들에 따른 방법은 하나 또는 그 이상의 ASICs(Application Specific Integrated Circuits), DSPs(Digital Signal Processors), DSPDs(Digital Signal Processing Devices), PLDs(Programmable Logic Devices), FPGAs(Field Programmable Gate Arrays), 프로세서, 컨트롤러, 마이크로 컨트롤러, 마이크로 프로세서 등에 의해 구현될 수 있다.
펌웨어나 소프트웨어에 의한 구현의 경우, 본 발명의 실시예들에 따른 방법은 이상에서 설명된 기능 또는 동작들을 수행하는 모듈, 절차 또는 함수 등의 형태로 구현될 수 있다. 소프트웨어 코드는 메모리에 저장되어 프로세서에 의해 구동될 수 있다. 상기 메모리는 프로세서의 내부 또는 외부에 위치할 수 있으며, 이미 공지된 다양한 수단에 의해 프로세서와 데이터를 주고받을 수 있다.
일부 실시예는 컴퓨터에 의해 실행되는 프로그램 모듈과 같은 컴퓨터에 의해 실행가능한 명령어를 포함하는 기록 매체의 형태로도 구현될 수 있다. 컴퓨터 판독 가능 매체는 컴퓨터에 의해 액세스될 수 있는 임의의 가용 매체일 수 있고, 휘발성 및 비휘발성 매체, 분리형 및 비분리형 매체를 모두 포함한다. 또한, 컴퓨터 판독 가능 매체는 컴퓨터 저장 매체 및 통신 매체를 모두 포함할 수 있다. 컴퓨터 저장 매체는 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터와 같은 정보의 저장을 위한 임의의 방법 또는 기술로 구현된 휘발성 및 비휘발성, 분리형 및 비분리형 매체를 모두 포함한다. 통신 매체는 전형적으로 컴퓨터 판독가능 명령어, 데이터 구조 또는 프로그램 모듈과 같은 변조된 데이터 신호의 기타 데이터, 또는 기타 전송 메커니즘을 포함하며, 임의의 정보 전달 매체를 포함한다.
전술한 본 발명의 설명은 예시를 위한 것이며, 본 발명이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명의 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 쉽게 변형이 가능하다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적인 것이 아는 것으로 해석해야 한다. 예를 들어, 단일형으로 설명되어 있는 각 구성 요소는 분산되어 실시될 수도 있으며, 마찬가지로 분산된 것으로 설명되어 있는 구성 요소들도 결합된 형태로 실시될 수 있다.
본 발명의 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.
이상, 전술한 본 발명의 바람직한 실시예는, 예시의 목적을 위해 개시된 것으로, 당업자라면 이하 첨부된 특허청구범위에 개시된 본 발명의 기술적 사상과 그 기술적 범위 내에서, 다양한 다른 실시예들을 개량, 변경, 대체 또는 부가 등이 가능할 것이다.

Claims (15)

  1. 비디오 신호 처리 방법에 있어서,
    현재 블록에 머지 모드(merge mode)가 적용되는지 여부를 지시하는 제1 신택스 요소(syntax element)를 파싱하는 단계;
    상기 현재 블록에 상기 머지 모드가 적용되는 경우, 미리 정의된 제1 조건에 기초하여 제2 신택스 요소 의 파싱 여부를 결정하는 단계, 여기서, 상기 제2 신택스 요소는 제1 모드 또는 제2 모드가 상기 현재 블록에 적용되는지 여부를 지시함;
    상기 현재 블록에 상기 제1 모드 및 상기 제2 모드가 적용되지 않는 경우, 미리 정의된 제2 조건에 기초하여 제3 신택스 요소의 파싱 여부를 결정하는 단계, 여기서, 상기 제3 신택스 요소는 제3 모드 또는 제4 모드 중에서 상기 현재 블록에 적용되는 모드를 지시함;
    상기 제2 신택스 요소 또는 상기 제3 신택스 요소에 기초하여 상기 현재 블록에 적용되는 모드를 결정하는 단계;
    상기 결정된 모드에 기초하여 상기 현재 블록의 모션 정보를 유도하는 단계; 및
    상기 현재 블록의 모션 정보를 이용하여 상기 현재 블록의 예측 블록을 생성하는 단계를 포함하되,
    상기 제1 조건은 상기 제3 모드를 이용할 수 있는 조건 및 상기 제4 모드를 이용할 수 있는 조건 중 적어도 하나를 포함하는 것을 특징으로 하는, 비디오 신호 처리 방법.
  2. 제1항에 있어서,
    상기 제3 모드 및 상기 제4 모드는 머지 데이터 신택스 내에서 디코딩 순서상 상기 제1 모드 보다 후순위에 위치하는 것을 특징으로 하는, 비디오 신호 처리 방법.
  3. 제1항에 있어서,
    상기 제1 조건을 만족하는 경우, 상기 제2 신택스 요소를 파싱하는 단계를 포함하고,
    상기 제1 조건을 만족하지 않는 경우, 상기 제2 신택스 요소는 1로 추론되는 것을 특징으로 하는, 비디오 신호 처리 방법.
  4. 제3항에 있어서,
    상기 제1 조건을 만족하지 않는 경우, 상기 제2 신택스 요소는 상기 현재 블록에 서브블록 기반 머지 모드가 적용되는지 여부를 지시하는 제4 신택스 요소에 기초하여 추론되는 것을 특징으로 하는, 비디오 신호 처리 방법.
  5. 제1항에 있어서,
    상기 제2 조건은 상기 제4 모드를 이용할 수 있는 조건을 포함하는 것을 특징으로 하는, 비디오 신호 처리 방법.
  6. 제1항에 있어서,
    상기 제2 조건은 현재 시퀀스에서 상기 제3 모드를 이용할 수 있는지 여부, 상기 현재 시퀀스에서 상기 제4 모드를 이용할 수 있는지 여부, 상기 제4 모드의 최대 후보 개수가 1보다 큰지 여부, 상기 현재 블록의 너비가 미리 정의된 제1 크기보다 작은지 여부 및 상기 현재 블록의 높이가 미리 정의된 제2 크기보다 작은지 여부 중 적어도 하나를 포함하는 것을 특징으로 하는, 비디오 신호 처리 방법.
  7. 제1항에 있어서,
    상기 제2 신택스 요소가 1인 경우, 상기 현재 블록에 상기 제1 모드가 적용되는지 또는 상기 제2 모드가 적용되는지 여부를 지시하는 제5 신택스 요소를 획득하는 단계를 포함하는, 비디오 신호 처리 방법.
  8. 비디오 신호 처리 장치에 있어서,
    프로세서를 포함하며,
    상기 프로세서는,
    현재 블록에 머지 모드(merge mode)가 적용되는지 여부를 지시하는 제1 신택스 요소(syntax element)를 파싱하고,
    상기 현재 블록에 상기 머지 모드가 적용되는 경우, 미리 정의된 제1 조건에 기초하여 제2 신택스 요소의 파싱 여부를 결정하고, 여기서, 상기 제2 신택스 요소는 제1 모드 또는 제2 모드가 상기 현재 블록에 적용되는지 여부를 지시하고,
    상기 현재 블록에 상기 제1 모드 및 상기 제2 모드가 적용되지 않는 경우, 미리 정의된 제2 조건에 기초하여 제3 신택스 요소의 파싱 여부를 결정하고, 여기서, 상기 제3 신택스 요소는 제3 모드 또는 제4 모드 중에서 상기 현재 블록에 적용되는 모드를 지시하고,
    상기 제2 신택스 요소 또는 상기 제3 신택스 요소에 기초하여 상기 현재 블록에 적용되는 모드를 결정하고,
    상기 결정된 모드에 기초하여 상기 현재 블록의 모션 정보를 유도하고,
    상기 현재 블록의 모션 정보를 이용하여 상기 현재 블록의 예측 블록을 생성하되,
    상기 제1 조건은 상기 제3 모드를 이용할 수 있는 조건 및 상기 제4 모드를 이용할 수 있는 조건 중 적어도 하나를 포함하는 것을 특징으로 하는, 비디오 신호 처리 장치.
  9. 제8항에 있어서,
    상기 제3 모드 및 상기 제4 모드는 머지 데이터 신택스 내에서 디코딩 순서상 상기 제1 모드 보다 후순위에 위치하는 것을 특징으로 하는, 비디오 신호 처리 장치.
  10. 제8항에 있어서,
    상기 프로세서는,
    상기 제1 조건을 만족하는 경우, 상기 제2 신택스 요소를 파싱하고,
    상기 제1 조건을 만족하지 않는 경우, 상기 제2 신택스 요소는 1로 추론되는 것을 특징으로 하는, 비디오 신호 처리 장치.
  11. 제10항에 있어서,
    상기 제1 조건을 만족하지 않는 경우, 상기 제2 신택스 요소는 상기 현재 블록에 서브블록 기반 머지 모드가 적용되는지 여부를 지시하는 제4 신택스 요소에 기초하여 추론되는 것을 특징으로 하는, 비디오 신호 처리 장치.
  12. 제8항에 있어서,
    상기 제2 조건은 상기 제4 모드를 이용할 수 있는 조건을 포함하는 것을 특징으로 하는, 비디오 신호 처리 장치.
  13. 제8항에 있어서,
    상기 제2 조건은 현재 시퀀스에서 상기 제3 모드를 이용할 수 있는지 여부, 상기 현재 시퀀스에서 상기 제4 모드를 이용할 수 있는지 여부, 상기 제4 모드의 최대 후보 개수가 1보다 큰지 여부, 상기 현재 블록의 너비가 미리 정의된 제1 크기보다 작은지 여부 및 상기 현재 블록의 높이가 미리 정의된 제2 크기보다 작은지 여부 중 적어도 하나를 포함하는 것을 특징으로 하는, 비디오 신호 처리 장치.
  14. 제8항에 있어서,
    상기 프로세서는,
    상기 제2 신택스 요소가 1인 경우, 상기 현재 블록에 상기 제1 모드가 적용되는지 또는 상기 제2 모드가 적용되는지 여부를 지시하는 제5 신택스 요소를 획득하는, 비디오 신호 처리 장치.
  15. 비디오 신호 처리 방법에 있어서,
    현재 블록에 머지 모드(merge mode)가 적용되는지 여부를 지시하는 제1 신택스 요소(syntax element)를 부호화하는 단계;
    상기 현재 블록에 상기 머지 모드가 적용되는 경우, 미리 정의된 제1 조건에 기초하여 제2 신택스 요소의 부호화 여부를 결정하는 단계, 여기서, 상기 제2 신택스 요소는 제1 모드 또는 제2 모드가 상기 현재 블록에 적용되는지 여부를 지시함;
    상기 현재 블록에 상기 제1 모드 및 상기 제2 모드가 적용되지 않는 경우, 미리 정의된 제2 조건에 기초하여 제3 신택스 요소의 부호화 여부를 결정하는 단계, 여기서, 상기 제3 신택스 요소는 제3 모드 또는 제4 모드 중에서 상기 현재 블록에 적용되는 모드를 지시함;
    상기 제2 신택스 요소 또는 상기 제3 신택스 요소에 기초하여 상기 현재 블록에 적용되는 모드를 결정하는 단계;
    상기 결정된 모드에 기초하여 상기 현재 블록의 모션 정보를 유도하는 단계; 및
    상기 현재 블록의 모션 정보를 이용하여 상기 현재 블록의 예측 블록을 생성하는 단계를 포함하되,
    상기 제1 조건은 상기 제3 모드를 이용할 수 있는 조건 및 상기 제4 모드를 이용할 수 있는 조건 중 적어도 하나를 포함하는 것을 특징으로 하는, 비디오 신호 처리 방법.
PCT/KR2020/000964 2019-01-18 2020-01-20 모션 보상을 이용한 비디오 신호 처리 방법 및 장치 WO2020149725A1 (ko)

Priority Applications (6)

Application Number Priority Date Filing Date Title
CN202080009653.XA CN113302927B (zh) 2019-01-18 2020-01-20 使用运动补偿的视频信号处理方法和设备
US17/423,853 US11849106B2 (en) 2019-01-18 2020-01-20 Video signal processing method and device using motion compensation
JP2021541484A JP7277590B2 (ja) 2019-01-18 2020-01-20 モーション補償を用いたビデオ信号処理方法及び装置
EP20741489.7A EP3913918A4 (en) 2019-01-18 2020-01-20 METHOD AND DEVICE FOR VIDEO SIGNAL PROCESSING INVOLVING MOTION COMPENSATION
KR1020217022444A KR20210107733A (ko) 2019-01-18 2020-01-20 모션 보상을 이용한 비디오 신호 처리 방법 및 장치
US18/491,003 US20240048692A1 (en) 2019-01-18 2023-10-20 Video signal processing method and device using motion compensation

Applications Claiming Priority (14)

Application Number Priority Date Filing Date Title
KR20190006511 2019-01-18
KR10-2019-0006511 2019-01-18
KR20190037000 2019-03-29
KR10-2019-0037000 2019-03-29
KR10-2019-0040400 2019-04-05
KR20190040400 2019-04-05
KR20190064959 2019-05-31
KR10-2019-0064959 2019-05-31
KR20190075316 2019-06-24
KR10-2019-0075316 2019-06-24
KR20190081764 2019-07-07
KR10-2019-0081764 2019-07-07
KR10-2019-0125746 2019-10-11
KR20190125746 2019-10-11

Related Child Applications (2)

Application Number Title Priority Date Filing Date
US17/423,853 A-371-Of-International US11849106B2 (en) 2019-01-18 2020-01-20 Video signal processing method and device using motion compensation
US18/491,003 Continuation US20240048692A1 (en) 2019-01-18 2023-10-20 Video signal processing method and device using motion compensation

Publications (1)

Publication Number Publication Date
WO2020149725A1 true WO2020149725A1 (ko) 2020-07-23

Family

ID=71613796

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2020/000964 WO2020149725A1 (ko) 2019-01-18 2020-01-20 모션 보상을 이용한 비디오 신호 처리 방법 및 장치

Country Status (6)

Country Link
US (2) US11849106B2 (ko)
EP (1) EP3913918A4 (ko)
JP (2) JP7277590B2 (ko)
KR (1) KR20210107733A (ko)
CN (1) CN113302927B (ko)
WO (1) WO2020149725A1 (ko)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022515126A (ja) * 2019-05-16 2022-02-17 テンセント・アメリカ・エルエルシー ビデオ・コーディングのための方法、装置及びコンピュータ・プログラム
JP2022534318A (ja) * 2019-06-21 2022-07-28 杭州海康威視数字技術股▲フン▼有限公司 予測モードの復号化の方法、符号化の方法、復号化の装置、符号化の装置および記憶媒体
JP2022538026A (ja) * 2019-06-19 2022-08-31 エルジー エレクトロニクス インコーポレイティド 動き予測に基づく映像コーディング方法及び装置
JP2022538025A (ja) * 2019-06-19 2022-08-31 エルジー エレクトロニクス インコーポレイティド ビデオ/映像コーディングシステムにおける重複シグナリング除去方法及び装置
JP2022538034A (ja) * 2019-06-19 2022-08-31 エルジー エレクトロニクス インコーポレイティド インター予測に基づく映像コーディング方法及び装置

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3955569A4 (en) * 2019-04-25 2022-07-27 Huawei Technologies Co., Ltd. METHOD AND APPARATUS FOR IMAGE PREDICTION AND COMPUTER READABLE INFORMATION MEDIA
US11611759B2 (en) * 2019-05-24 2023-03-21 Qualcomm Incorporated Merge mode coding for video coding
US20220264142A1 (en) * 2019-07-24 2022-08-18 Sharp Kabushiki Kaisha Image decoding apparatus, image coding apparatus, and image decoding method
CN118044201A (zh) * 2021-10-01 2024-05-14 Lg 电子株式会社 基于mdmvr的图像编译方法及设备
WO2023200382A1 (en) * 2022-04-12 2023-10-19 Telefonaktiebolaget Lm Ericsson (Publ) Enhanced multi-hypothesis prediction

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130279577A1 (en) * 2010-11-04 2013-10-24 Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. Picture coding supporting block merging and skip mode
US20150271524A1 (en) * 2014-03-19 2015-09-24 Qualcomm Incorporated Simplified merge list construction process for 3d-hevc
KR20160064845A (ko) * 2014-11-28 2016-06-08 (주)휴맥스 깊이 부호화를 위한 서브-예측 유닛 레벨 기반 화면간 움직임 예측 방법 및 장치
US20160241863A1 (en) * 2014-09-17 2016-08-18 Mediatek Inc. Syntax parsing apparatus with multiple syntax parsing circuits for processing multiple image regions within same frame or processing multiple frames and related syntax parsing method
KR20180098161A (ko) * 2017-02-24 2018-09-03 주식회사 케이티 비디오 신호 처리 방법 및 장치

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1808428A (zh) * 2005-01-22 2006-07-26 鸿富锦精密工业(深圳)有限公司 展现及编辑信息检索条件的系统及方法
KR101959482B1 (ko) * 2011-09-16 2019-03-18 한국항공대학교산학협력단 영상 부호화/복호화 방법 및 그 장치
US9591331B2 (en) * 2012-03-28 2017-03-07 Qualcomm Incorporated Merge signaling and loop filter on/off signaling
EP3158734A4 (en) * 2014-06-19 2017-04-26 Microsoft Technology Licensing, LLC Unified intra block copy and inter prediction modes
US9918105B2 (en) * 2014-10-07 2018-03-13 Qualcomm Incorporated Intra BC and inter unification
US11330284B2 (en) * 2015-03-27 2022-05-10 Qualcomm Incorporated Deriving motion information for sub-blocks in video coding
US20200045305A1 (en) * 2016-09-30 2020-02-06 Lg Electronics Inc. Picture processing method and apparatus for same
WO2018128380A1 (ko) * 2017-01-03 2018-07-12 엘지전자(주) 어파인 예측을 이용하여 비디오 신호를 처리하는 방법 및 장치
US10560723B2 (en) 2017-05-08 2020-02-11 Qualcomm Incorporated Context modeling for transform coefficient coding
WO2020142448A1 (en) 2018-12-31 2020-07-09 Beijing Dajia Internet Information Technology Co., Ltd. System and method for signaling of motion merge modes in video coding
US20220167009A1 (en) * 2019-03-12 2022-05-26 Sharp Kabushiki Kaisha Systems and methods for performing intra prediction coding in video coding
US11611759B2 (en) * 2019-05-24 2023-03-21 Qualcomm Incorporated Merge mode coding for video coding

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130279577A1 (en) * 2010-11-04 2013-10-24 Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. Picture coding supporting block merging and skip mode
US20150271524A1 (en) * 2014-03-19 2015-09-24 Qualcomm Incorporated Simplified merge list construction process for 3d-hevc
US20160241863A1 (en) * 2014-09-17 2016-08-18 Mediatek Inc. Syntax parsing apparatus with multiple syntax parsing circuits for processing multiple image regions within same frame or processing multiple frames and related syntax parsing method
KR20160064845A (ko) * 2014-11-28 2016-06-08 (주)휴맥스 깊이 부호화를 위한 서브-예측 유닛 레벨 기반 화면간 움직임 예측 방법 및 장치
KR20180098161A (ko) * 2017-02-24 2018-09-03 주식회사 케이티 비디오 신호 처리 방법 및 장치

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022515126A (ja) * 2019-05-16 2022-02-17 テンセント・アメリカ・エルエルシー ビデオ・コーディングのための方法、装置及びコンピュータ・プログラム
JP7257516B2 (ja) 2019-05-16 2023-04-13 テンセント・アメリカ・エルエルシー ビデオ・コーディングのための方法、装置及びコンピュータ・プログラム
JP2022538026A (ja) * 2019-06-19 2022-08-31 エルジー エレクトロニクス インコーポレイティド 動き予測に基づく映像コーディング方法及び装置
JP2022538025A (ja) * 2019-06-19 2022-08-31 エルジー エレクトロニクス インコーポレイティド ビデオ/映像コーディングシステムにおける重複シグナリング除去方法及び装置
JP2022538034A (ja) * 2019-06-19 2022-08-31 エルジー エレクトロニクス インコーポレイティド インター予測に基づく映像コーディング方法及び装置
JP7279208B2 (ja) 2019-06-19 2023-05-22 エルジー エレクトロニクス インコーポレイティド ビデオ/映像コーディングシステムにおける重複シグナリング除去方法及び装置
JP7280392B2 (ja) 2019-06-19 2023-05-23 エルジー エレクトロニクス インコーポレイティド インター予測に基づく映像コーディング方法及び装置
US11716465B2 (en) 2019-06-19 2023-08-01 Lg Electronics Inc. Method and device for removing overlapping signaling in video/image coding system
JP7462094B2 (ja) 2019-06-19 2024-04-04 エルジー エレクトロニクス インコーポレイティド ビデオ/映像コーディングシステムにおける重複シグナリング除去方法及び装置
US11962810B2 (en) 2019-06-19 2024-04-16 Lg Electronics Inc. Motion prediction-based image coding method and device
JP2022534318A (ja) * 2019-06-21 2022-07-28 杭州海康威視数字技術股▲フン▼有限公司 予測モードの復号化の方法、符号化の方法、復号化の装置、符号化の装置および記憶媒体
JP7318014B2 (ja) 2019-06-21 2023-07-31 杭州海康威視数字技術股▲フン▼有限公司 予測モードの復号化の方法、符号化の方法、復号化の装置、符号化の装置および記憶媒体

Also Published As

Publication number Publication date
US20240048692A1 (en) 2024-02-08
US11849106B2 (en) 2023-12-19
US20220086429A1 (en) 2022-03-17
JP7277590B2 (ja) 2023-05-19
KR20210107733A (ko) 2021-09-01
JP2023099155A (ja) 2023-07-11
EP3913918A1 (en) 2021-11-24
CN113302927A (zh) 2021-08-24
JP2022518717A (ja) 2022-03-16
EP3913918A4 (en) 2023-01-18
CN113302927B (zh) 2024-04-09

Similar Documents

Publication Publication Date Title
WO2020149725A1 (ko) 모션 보상을 이용한 비디오 신호 처리 방법 및 장치
WO2020076036A1 (ko) 복수개의 참조 라인을 위한 mpm 구성 방법을 이용한 비디오 신호 처리 방법 및 장치
WO2020076143A1 (ko) 다중 가정 예측을 사용하는 비디오 신호 처리 방법 및 장치
WO2018097693A2 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2018226015A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2018066867A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2018030773A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2019190224A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2020145805A1 (ko) 다중 변환 커널을 사용하는 비디오 신호 처리 방법 및 장치
WO2019177354A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2019182385A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2019172705A1 (ko) 샘플 필터링을 이용한 영상 부호화/복호화 방법 및 장치
WO2018097692A2 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2014058280A1 (ko) 영상의 부호화/복호화 방법 및 이를 이용하는 장치
WO2017043816A1 (ko) 인터-인트라 병합 예측 모드 기반 영상 처리 방법 및 이를 위한 장치
WO2019083334A1 (ko) 비대칭 서브 블록 기반 영상 부호화/복호화 방법 및 장치
WO2017039117A1 (ko) 영상의 부호화/복호화 방법 및 이를 위한 장치
WO2019235896A1 (ko) 적응적 모션 벡터 레졸루션을 이용하는 비디오 신호 처리 방법 및 장치
WO2021015524A1 (ko) 비디오 신호 처리 방법 및 장치
WO2021015586A1 (ko) 비디오 신호 처리 방법 및 장치
WO2020085800A1 (ko) 서브블록 기반의 모션 보상을 이용한 비디오 신호 처리 방법 및 장치
WO2020111843A1 (ko) 화면 내 예측 필터링을 이용한 비디오 신호 처리 방법 및 장치
WO2020222588A1 (ko) 적응적 모션 벡터 해상도를 이용한 비디오 신호 처리 방법 및 장치
WO2015133838A1 (ko) 폴리곤 유닛 기반 영상 인코딩/디코딩 방법 및 이를 위한 장치
WO2020171681A1 (ko) 인트라 예측 기반 비디오 신호 처리 방법 및 장치

Legal Events

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

Ref document number: 20741489

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 20217022444

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2021541484

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2020741489

Country of ref document: EP

Effective date: 20210818