WO2020180153A1 - Method and apparatus for processing video signal for inter prediction - Google Patents

Method and apparatus for processing video signal for inter prediction Download PDF

Info

Publication number
WO2020180153A1
WO2020180153A1 PCT/KR2020/003185 KR2020003185W WO2020180153A1 WO 2020180153 A1 WO2020180153 A1 WO 2020180153A1 KR 2020003185 W KR2020003185 W KR 2020003185W WO 2020180153 A1 WO2020180153 A1 WO 2020180153A1
Authority
WO
WIPO (PCT)
Prior art keywords
mvd
information
component
flag
prediction
Prior art date
Application number
PCT/KR2020/003185
Other languages
French (fr)
Korean (ko)
Inventor
살레하이파메흐디
김승환
Original Assignee
엘지전자 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 엘지전자 주식회사 filed Critical 엘지전자 주식회사
Publication of WO2020180153A1 publication Critical patent/WO2020180153A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • 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/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/423Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation characterised by memory arrangements
    • 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/53Multi-resolution motion estimation; Hierarchical motion estimation
    • 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

  • Embodiments of the present specification relate to a video/video compression coding system, and more particularly, to a method and apparatus for performing inter prediction in an encoding/decoding process of a video signal.
  • Compression coding refers to a series of signal processing techniques for transmitting digitized information through a communication line or storing it in a format suitable for a storage medium.
  • Media such as video, image, and audio may be subject to compression encoding.
  • a technique for performing compression encoding on an image is referred to as video image compression.
  • Next-generation video content will be characterized by high spatial resolution, high frame rate, and high dimensionality of scene representation. In order to process such content, it will bring a tremendous increase in terms of memory storage, memory access rate, and processing power.
  • Inter prediction is a method of performing prediction on a current picture by referring to reconstructed samples of another picture.
  • various motion vector derivation methods along with new inter prediction techniques have been discussed.
  • entropy coding is a method of outputting a bitstream or outputting a syntax element from the bitstream by compressing a syntax element (data) determined in a video signal coding process.
  • techniques for efficient entropy encoding/decoding of information related to inter prediction are being discussed.
  • An embodiment of the present specification provides a method and apparatus for efficiently encoding/decoding motion vector difference (MVD) coding information in a process of encoding/decoding information for inter prediction.
  • MVD motion vector difference
  • Embodiments of the present specification provide a method of encoding and decoding a video signal for inter prediction.
  • a method of decoding a video signal according to an embodiment of the present specification includes obtaining MVD coding information related to motion vector difference (MVD) for prediction of a current block, and decoding the MVD coding information.
  • the MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value, and the first flag information indicates whether a first direction component of the MVD is greater than the first reference value.
  • the MVD coding information further includes second flag information indicating whether the MVD is greater than a second reference value, MVD size information, and MVD code information, and the second flag information 1 is obtained based on flag information, the MVD size information is obtained based on the first flag information and the second flag information, and the MVD code information may be obtained based on the first flag information.
  • the second flag information includes a third component flag indicating whether a first direction component of the MVD is greater than the second reference value, and a second direction component of the MVD is greater than the second reference value.
  • a fourth component flag indicating whether or not it is large may be included.
  • the MVD size information may be decoded based on an exponential Golomb parameter having an order of 2 or more.
  • the obtaining of the MVD coding information includes determining whether an intra block copy (IBC) mode is applied to the current block, and when the IBC mode is applied to the current block, IBC MVD It may include the step of obtaining coding information.
  • the obtaining of the IBC MVD coding information includes obtaining first MVD size information indicating an absolute value of the first direction component of the MVD, and whether the second direction component of the MVD is greater than the first reference value.
  • the first MVD size information may be decoded based on an exponential Golomb parameter having an order of 2 or more.
  • a video signal encoding method includes determining a motion vector of a current block based on motion prediction, and determining a motion vector difference (MVD) of the current block based on the motion vector. And encoding MVD coding information related to the MVD.
  • the MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value, and the first flag information indicates whether a first direction component of the MVD is greater than the first reference value. Including the indicated first component flag information and second component flag information indicating whether the second direction component of the MVD is greater than the first reference value, the first component flag information and the second component flag information They are encoded based on different context models.
  • the MVD coding information further includes second flag information indicating whether the MVD is greater than a second reference value, MVD size information, and MVD code information, and the second flag information is the first It is obtained based on flag information, the MVD size information is encoded based on the first flag information and the second flag information, and the MVD code information may be encoded based on the first flag information.
  • the second flag information includes a third component flag indicating whether a first direction component of the MVD is greater than the second reference value, and a second direction component of the MVD is greater than the second reference value.
  • a fourth component flag indicating whether or not it is large may be included.
  • the MVD size information may be encoded based on an exponential Golomb parameter having an order of 2 or more.
  • the encoding of the MVD coding information includes determining whether an intra block copy (IBC) mode is applied to the current block, and when the IBC mode is applied to the current block, IBC MVD It may include encoding the coding information.
  • the encoding of the IBC MVD coding information includes: encoding first MVD size information indicating an absolute value of a first direction component of the MVD, and whether a second direction component of the MVD is greater than the first reference value. Encoding the second component flag indicating to, and encoding the fourth component flag indicating whether a second direction component of the MVD is greater than the second reference value based on the second component flag. And, based on the second component flag and the fourth component flag, second MVD size information indicating the absolute value of the second component of the MVD minus 2 may be encoded.
  • IBC intra block copy
  • the first MVD size information may be encoded based on an exponential Golomb parameter having a degree of 2 or more.
  • An apparatus for encoding a video signal for inter prediction includes a memory for storing the video signal and a processor coupled to the memory.
  • the processor is configured to determine a motion vector of a current block based on motion prediction, determine a motion vector difference (MVD) of the current block based on the motion vector, and encode MVD coding information related to the MVD.
  • the MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value, and the first flag information indicates whether a first direction component of the MVD is greater than the first reference value. Including the indicated first component flag information and second component flag information indicating whether the second direction component of the MVD is greater than the first reference value, the first component flag information and the second component flag information They are encoded based on different context models.
  • a video signal decoding apparatus for inter prediction includes a memory for storing the video signal and a processor coupled with the memory.
  • the processor is configured to determine a motion vector of a current block based on motion prediction, determine a motion vector difference (MVD) of the current block based on the motion vector, and encode MVD coding information related to the MVD, ,
  • the MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value, and the first flag information is whether a first direction component of the MVD is greater than the first reference value.
  • second component flag information indicating whether a second direction component of the MVD is greater than the first reference value, and the first component flag information and the second component flag information Are encoded based on different context models.
  • An embodiment of the present specification provides a non-transitory computer-readable medium storing one or more instructions.
  • the one or more instructions executed by one or more processors enable a video signal processing apparatus to obtain MVD coding information related to a motion vector difference (MVD) for prediction of a current block, and the MVD coding information Control to decode
  • the MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value, and the first flag information indicates whether a first direction component of the MVD is greater than the first reference value. Including the indicated first component flag information and second component flag information indicating whether the second direction component of the MVD is greater than the first reference value, the first component flag information and the second component flag information It is decoded based on different context models.
  • the one or more instructions determine a motion vector of a current block based on motion prediction, determine a motion vector difference (MVD) of the current block based on the motion vector, and determine MVD coding information related to the MVD.
  • the MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value, and the first flag information indicates whether a first direction component of the MVD is greater than the first reference value. Including the indicated first component flag information and second component flag information indicating whether the second direction component of the MVD is greater than the first reference value, the first component flag information and the second component flag information They are encoded based on different context models.
  • the amount of data and coding complexity/time of information required for inter prediction are reduced by applying an entropy coding technique according to the characteristics of each component constituting MVD (motion vector difference) coding information. I can make it.
  • FIG. 1 shows an example of an image coding system according to an embodiment of the present specification.
  • FIG. 2 shows an example of a schematic block diagram of an encoding apparatus in which encoding of a video signal is performed according to an embodiment of the present specification.
  • FIG. 3 shows an example of a schematic block diagram of a decoding apparatus for decoding an image signal according to an embodiment of the present specification.
  • FIG. 4 shows an example of a content streaming system according to an embodiment of the present specification.
  • FIG 5 shows an example of a video signal processing apparatus according to an embodiment of the present specification.
  • FIG. 6 illustrates an example of a picture division structure according to an embodiment of the present specification.
  • FIG. 7A to 7D illustrate an example of a block division structure according to an embodiment of the present specification.
  • FIG 8 shows an example of a case in which the ternary tree (TT) and the binary tree (BT) are divided according to an embodiment of the present specification.
  • FIG. 9 is a block diagram for entropy encoding according to an embodiment of the present specification.
  • 10A and 10B illustrate an entropy encoding method and related components according to an embodiment of the present specification.
  • 11A and 11B illustrate an entropy decoding method and related components according to an embodiment of the present specification.
  • FIG. 12 is an example of a flowchart for encoding a picture constituting a video signal according to an embodiment of the present specification.
  • FIG. 13 is an example of a flowchart for decoding a picture constituting a video signal according to an embodiment of the present specification.
  • FIG. 14 illustrates an example of a hierarchical structure for a coded image according to an embodiment of the present specification.
  • 15A and 15B illustrate a video/video encoding method based on inter prediction and an inter prediction unit in an encoding apparatus according to an embodiment of the present specification.
  • 16A and 16B illustrate a video/video decoding method based on inter prediction and an inter prediction unit in a decoding apparatus according to an embodiment of the present specification.
  • FIG 17 illustrates an inter prediction procedure according to an embodiment of the present specification.
  • FIG 18 illustrates examples of spatial neighboring blocks used as spatial merge candidates according to an embodiment of the present specification.
  • FIG. 19 is an example of a flowchart for configuring a merge candidate list according to an embodiment of the present specification.
  • MVP motion vector predictor
  • SMVD symmetric motion vector difference
  • FIG. 22 illustrates an example of affine motion models according to an embodiment of the present specification.
  • 23A and 23B illustrate examples of motion vectors for each control point according to an embodiment of the present specification.
  • FIG. 24 shows an example of a motion vector for each subblock according to an embodiment of the present specification.
  • 25 is an example of a flowchart for configuring an affine merge candidate list according to an embodiment of the present specification.
  • 26 illustrates an example of blocks for deriving an inherited affine motion predictor according to an embodiment of the present specification.
  • FIG. 27 illustrates an example of control point motion vectors for deriving an inherited affine motion predictor according to an embodiment of the present specification.
  • 29 is an example of a flowchart for configuring an affine MVP candidate list according to an embodiment of the present specification.
  • FIGS. 30A and 30B illustrate examples of spatial neighboring blocks used in adaptive temporal motion vector prediction (ATMVP) and sub-coding block (CU) motion fields derived from spatial neighboring blocks according to an embodiment of the present specification. Shows.
  • ATMVP adaptive temporal motion vector prediction
  • CU sub-coding block
  • 31A and 31B illustrate an example of a video/video encoding method based on an intra block copy (IBC) mode and a prediction unit in an encoding apparatus according to an embodiment of the present specification.
  • IBC intra block copy
  • 32A and 32B illustrate examples of a video/video decoding method based on an IBC mode and a prediction unit in a decoding apparatus according to an embodiment of the present specification.
  • FIG 33 shows an example of a flowchart for obtaining motion vector difference (MVD) coding information according to an embodiment of the present specification.
  • 34A and 34B illustrate examples of flowcharts for obtaining information on x and y components of MVD according to an embodiment of the present specification.
  • 35A and 35B illustrate an example of a flowchart for encoding information on an x component and a y component of an MVD according to an embodiment of the present specification.
  • 36A and 36B illustrate examples of statistics of bin values for x and y components of MVD according to an embodiment of the present specification.
  • FIG. 37 illustrates an example in which MVD coding is separately applied when general MVD coding and IBC mode according to an embodiment of the present specification are applied.
  • 39 is an example of a flowchart of decoding a video signal for inter prediction according to an embodiment of the present specification.
  • a'processing unit' means a unit in which an encoding/decoding process such as prediction, transformation, and/or quantization is performed.
  • the processing unit may be interpreted as including a unit for a luma component and a unit for a chroma component.
  • the processing unit may correspond to a block, a coding unit (CU), a prediction unit (PU), or a transform unit (TU).
  • the processing unit may be interpreted as a unit for a luminance component or a unit for a color difference component.
  • the processing unit may correspond to a coding tree block (CTB), a coding block (CB), a PU, or a transform block (TB) for a luminance component.
  • the processing unit may correspond to CTB, CB, PU or TB for the color difference component.
  • the present invention is not limited thereto, and the processing unit may be interpreted as including a unit for a luminance component and a unit for a color difference component.
  • processing unit is not necessarily limited to a square block, and may be configured in a polygonal shape having three or more vertices.
  • pixels or pixels are collectively referred to as samples.
  • using a sample may mean using a pixel value or a pixel value.
  • the image coding system may include a source device 10 and a reception device 20.
  • the source device 10 may transmit the encoded video/video information or data in a file or streaming format to the receiving device 20 through a digital storage medium or a network.
  • the source device 10 may include a video source 11, an encoding device 12, and a transmitter 13.
  • the receiving device 20 may include a receiver 21, a decoding device 22 and a renderer 23.
  • the encoding device 12 may be referred to as a video/image encoding device, and the decoding device 22 may be referred to as a video/image decoding device.
  • the transmitter 13 may be included in the encoding device 12.
  • the receiver 21 may be included in the decoding device 22.
  • the renderer 23 may include a display unit, and the display unit may be configured as a separate device or an external component.
  • the video source 11 may acquire a video/image through a process of capturing, synthesizing, or generating a video/image.
  • the video source 11 may include a video/image capturing device and/or a video/image generating device.
  • the video/image capturing device may include, for example, one or more cameras, and a video/image archive including previously captured video/images.
  • Video/image generating devices may include, for example, computers, tablets, and smartphones, and may (electronically) generate video/images.
  • a virtual video/image may be generated through a computer, and in this case, a video/image capturing process may be substituted as a process of generating related data.
  • the encoding device 12 may encode an input video/video.
  • the encoding apparatus 12 may perform a series of procedures such as prediction, transformation, and quantization for compression and coding efficiency.
  • the encoded data (encoded video/video information) may be output in the form of a bitstream.
  • the transmitter 13 may transmit the encoded video/video information or data output in the form of a bitstream to the receiver 21 of the receiving device 20 through a digital storage medium or a network in a file or streaming form.
  • Digital storage media include USB (universal serial bus), SD card (secure digital card), CD (compact disc), DVD (digital versatile disc), Blu-ray disc, HDD (hard disk drive), SSD (solid state drive) may include a variety of storage media.
  • the transmitter 13 may include an element for generating a media file through a predetermined file format, and may include an element for transmission through a broadcast/communication network.
  • the receiver 21 may extract the bitstream and transmit it to the decoding device 22.
  • the decoding device 22 may decode the video/video by performing a series of procedures such as inverse quantization, inverse transformation, and prediction corresponding to the operation of the encoding device 12.
  • the renderer 23 may render the decoded video/image.
  • the rendered video/image may be displayed through the display unit.
  • FIG. 2 shows an example of a schematic block diagram of an encoding apparatus in which encoding of a video signal is performed according to an embodiment of the present specification.
  • the encoding device 100 of FIG. 2 may correspond to the encoding device 12 of FIG. 1.
  • the encoding apparatus 100 includes an image partitioning module 110, a subtraction module 115, a transform module 120, and a quantization module. (130), a de-quantization module (140), an inverse-transform module (150), an addition module (155), a filtering module (160), a memory A (memory) 170, an inter prediction module 180, an intra prediction module 185, and an entropy encoding module 190 may be included.
  • the inter prediction unit 180 and the intra prediction unit 185 may be collectively referred to as a prediction unit. That is, the prediction unit may include an inter prediction unit 180 and an intra prediction unit 185.
  • the transform unit 120, the quantization unit 130, the inverse quantization unit 140, and the inverse transform unit 150 may be included in a residual processing unit.
  • the residual processing unit may further include a subtraction unit 115.
  • the above-described image segmentation unit 110, subtraction unit 115, transform unit 120, quantization unit 130, inverse quantization unit 140, inverse transform unit 150, addition unit 155, filtering unit 160 ), the inter prediction unit 180, the intra prediction unit 185, and the entropy encoding unit 190 may be configured by one hardware component (eg, an encoder or a processor) according to an embodiment.
  • the memory 170 may include a decoded picture buffer (DPB) 175 and may be configured by a digital storage medium.
  • DPB decoded picture buffer
  • the image segmentation unit 110 may divide an input image (or picture, frame) input to the encoding apparatus 100 into one or more processing units.
  • the processing unit may be referred to as a coding unit (CU).
  • the coding unit may be recursively partitioned from a coding tree unit (CTU) or a largest coding unit (LCU) according to a quad-tree binary-tree (QTBT) structure.
  • CTU coding tree unit
  • LCU largest coding unit
  • QTBT quad-tree binary-tree
  • one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad tree structure and/or a binary tree structure.
  • a quad tree structure may be applied first and a binary tree structure may be applied later.
  • the binary tree structure may be applied first.
  • a coding procedure according to an embodiment of the present specification may be performed based on a final coding unit that is no longer divided.
  • the maximum coding unit may be directly used as the final coding unit based on coding efficiency according to image characteristics.
  • the coding unit is recursively divided into coding units of a lower depth, so that a coding unit having an optimal size may be used as a final coding unit.
  • the coding procedure may include procedures such as prediction, transformation, and restoration described below.
  • the processing unit may further include a prediction unit (PU) or a transform unit (TU).
  • the prediction unit and the transform unit may be divided from the above-described coding units, respectively.
  • the prediction unit may be a unit of sample prediction
  • the transform unit may be a unit for inducing a transform coefficient or a unit for inducing a residual signal from the transform coefficient.
  • the term "unit” used in this document may be used interchangeably with terms such as "block” or "area” in some cases.
  • the MxN block may represent a set of samples or transform coefficients consisting of M columns and N rows.
  • a sample may generally represent a pixel or a value of a pixel, may represent a pixel/pixel value of a luminance component, or a pixel/pixel value of a saturation component.
  • a sample may be used as a term corresponding to one picture (or image) as a pixel or pel.
  • the encoding apparatus 100 subtracts a prediction signal (predicted block, prediction sample array) output from the inter prediction unit 180 or the intra prediction unit 185 from the input video signal (original block, original sample array)
  • a signal residual signal, residual block, residual sample array
  • the generated residual signal is transmitted to the conversion unit 120.
  • a unit that subtracts the prediction signal (prediction block, prediction sample array) from the input image signal (original block, original sample array) in the encoding apparatus 100 may be referred to as a subtraction unit 115.
  • the prediction unit may perform prediction on a block to be processed (hereinafter, referred to as a current block) and generate a predicted block including prediction samples for the current block.
  • the prediction module may determine whether intra prediction or inter prediction is applied on a per CU basis.
  • the prediction unit may generate information about prediction, such as prediction mode information, as described later in the description of each prediction mode, and may transmit information about prediction to the entropy encoding unit 190.
  • Information about prediction is encoded by the entropy encoding unit 190 and may be output in the form of a bitstream.
  • the intra prediction unit 185 may predict the current block by referring to samples in the current picture.
  • the referenced samples may be located in the vicinity of the current block or may be located away from each other according to the prediction mode.
  • prediction modes may include a plurality of non-directional modes and a plurality of directional modes.
  • the non-directional mode may include, for example, a DC mode and a planar mode (Planar mode).
  • the directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes according to a detailed degree of the prediction direction. However, this is an example, and more or less directional prediction modes may be used depending on the setting.
  • the intra prediction unit 185 may determine a prediction mode applied to the current block by using the prediction mode applied to the neighboring block.
  • the inter prediction unit 180 may derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on the reference picture.
  • the inter prediction unit 180 may predict motion information in units of blocks, subblocks, or samples based on the correlation between motion information between neighboring blocks and the current block.
  • the motion information may include a motion vector and a reference picture index.
  • the motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information.
  • the neighboring block may include a spatial neighboring block existing in the current picture and a temporal neighboring block existing in the reference picture.
  • the reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different.
  • the temporal neighboring block may be referred to as a collocated reference block or a colCU (colCU), and a reference picture including the temporal neighboring block may be referred to as a collocated picture (colPic).
  • the inter prediction unit 180 constructs a motion information candidate list based on motion information of neighboring blocks, and indicates which candidate is used to derive a motion vector and/or a reference picture index of the current block. Can generate information. Inter prediction may be performed based on various prediction modes. For example, when a skip mode and a merge mode are used, the inter prediction unit 180 may use motion information of a neighboring block as motion information of a current block.
  • a residual signal is not transmitted.
  • MVP motion vector prediction
  • MVD motion vector difference
  • the prediction unit may generate a prediction signal (prediction sample) based on various prediction methods described later. For example, the prediction unit may not only apply intra prediction or inter prediction to predict one block, but also apply intra prediction and inter prediction together (simultaneously). This may be referred to as CIIP (combined inter and intra prediction). Also, the prediction unit may perform intra block copy (IBC) to predict a block. IBC may be used for content (eg, game) video/video coding, such as, for example, screen content coding (SCC). Also, IBC may be referred to as CPR (current picture referencing). IBC basically performs prediction in the current picture, but can be performed similarly to inter prediction in that it derives a reference block in the current picture. That is, the IBC may use at least one of the inter prediction techniques described in this document.
  • IBC intra block copy
  • the prediction signal generated by the prediction unit may be used to generate a reconstructed signal or may be used to generate a residual signal.
  • the transform unit 120 may generate transform coefficients by applying a transform technique to the residual signal.
  • the transformation technique uses at least one of DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT (Karhunen-Loeve Transform), GBT (Graph-Based Transform), or CNT (Conditionally Non-linear Transform).
  • DCT Discrete Cosine Transform
  • DST Discrete Sine Transform
  • KLT Kerhunen-Loeve Transform
  • GBT Graph-Based Transform
  • CNT Conditionally Non-linear Transform
  • GBT refers to transformation obtained from a graph representing relationship information between pixels.
  • CNT refers to a transformation obtained based on the prediction signal and generating a prediction signal using all previously reconstructed pixels.
  • the conversion process may be applied to a pixel block having the
  • the quantization unit 130 quantizes the transform coefficients and transmits the quantized transform coefficients to the entropy encoding unit 190.
  • the entropy encoding unit 190 may encode a quantized signal (information on quantized transform coefficients) and output it as a bitstream. Information about the quantized transform coefficients may be referred to as residual information.
  • the quantization unit 130 may rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and quantize the quantized transform coefficients based on the characteristics of the quantized transform coefficients in a one-dimensional vector form. It is also possible to generate information about transform coefficients.
  • the entropy encoding unit 190 may perform various encoding techniques such as exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC).
  • the entropy encoding unit 190 may encode information necessary for video/image restoration (eg, values of syntax elements) in addition to quantized transform coefficients together or separately.
  • the encoded information (eg, video/video information) may be transmitted or stored in a bitstream format in units of network abstraction layer (NAL) units.
  • the video/video information may further include information on various parameter sets, such as adaptation parameter set (APS), picture parameter set (PPS), sequence parameter set (SPS), or video parameter set (VPS).
  • Signaled/transmitted information and/or syntax elements described later in this document may be encoded through the above-described encoding procedure and included in the bitstream.
  • the bitstream may be transmitted over a network or may be stored in a digital storage medium.
  • the network may include a broadcasting network and/or a communication network
  • the digital storage medium may include a storage medium such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD.
  • a transmission unit (not shown) for transmitting and/or a storage unit (not shown) for storing may be configured as internal/external elements of the encoding apparatus 100, or the transmission unit It may be a component of the entropy encoding unit 190.
  • the quantized transform coefficients output from the quantization unit 130 may be used to generate a reconstructed signal.
  • a residual signal may be restored by applying inverse quantization and inverse transform through the inverse quantization unit 140 and the inverse transform unit 150 in the loop for the quantized transform coefficients.
  • the addition unit 155 adds the reconstructed residual signal to the prediction signal output from the inter prediction unit 180 or the intra prediction unit 185 to obtain a reconstructed signal (a reconstructed picture, a reconstructed block, and a reconstructed sample array). Can be generated.
  • the predicted block may be used as a reconstructed block.
  • the addition unit 155 may be referred to as a restoration unit or a restoration block generation unit.
  • the generated reconstructed signal may be used for intra prediction of the next processing target block in the current picture, and may be used for inter prediction of the next picture through filtering as described later.
  • the filtering unit 160 may improve subjective/objective image quality by applying filtering to the reconstructed signal.
  • the filtering unit 160 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may transmit the modified reconstructed picture to the DPB 175 of the memory 170.
  • Various filtering methods may include, for example, deblocking filtering, sample adaptive offset (SAO), adaptive loop filter (ALF), and bilateral filter.
  • the filtering unit 160 may generate filtering information and transmit the filtering information to the entropy encoding unit 190 as described later in the description of each filtering method.
  • the filtering information may be output in the form of a bitstream through entropy encoding in the entropy encoding unit 190.
  • the modified reconstructed picture transmitted to the DPB 175 may be used as a reference picture in the inter prediction unit 180.
  • the encoding apparatus 100 may avoid prediction mismatch between the encoding apparatus 100 and the decoding apparatus 200 by using the modified reconstructed picture, and may improve encoding efficiency.
  • the DPB 175 may store the modified reconstructed picture for use as a reference picture in the inter prediction unit 180.
  • the stored motion information may be transmitted to the inter prediction unit 180 for use as motion information of a spatial neighboring block or motion information of a temporal neighboring block.
  • the memory 170 may store reconstructed samples of reconstructed blocks in the current picture, and transfer information on the reconstructed samples to the intra prediction unit 185.
  • FIG. 3 shows an example of a schematic block diagram of a decoding apparatus for decoding an image signal according to an embodiment of the present specification.
  • the decoding device 200 of FIG. 3 may correspond to the decoding device 22 of FIG. 1.
  • the decoding apparatus 200 includes an entropy decoding module 210, a de-quantization module 220, an inverse transform module 230, and an adder. (addition module) 235, filtering module 240, memory 250, inter prediction module 260, and intra prediction module 265 may be included. have.
  • the inter prediction unit 260 and the intra prediction unit 265 may be collectively referred to as a prediction module. That is, the prediction unit may include an inter prediction unit 180 and an intra prediction unit 185.
  • the inverse quantization unit 220 and the inverse transform unit 230 may be collectively referred to as a residual processing module. That is, the residual processing unit may include an inverse quantization unit 220 and an inverse transform unit 230.
  • the entropy decoding unit 210, the inverse quantization unit 220, the inverse transform unit 230, the addition unit 235, the filtering unit 240, the inter prediction unit 260, and the intra prediction unit 265 are implemented. It may be configured by one hardware component (eg, a decoder or a processor) according to an example. Also, the memory 250 may include the DPB 255, and may be configured by one hardware component (eg, a memory or a digital storage medium) according to an embodiment.
  • the decoding apparatus 200 may reconstruct an image in response to a process in which the video/image information is processed by the encoding apparatus 100 of FIG. 2.
  • the decoding apparatus 200 may perform decoding using a processing unit applied by the encoding apparatus 100.
  • the processing unit may be, for example, a coding unit, and the coding unit may be divided from a coding tree unit or a maximum coding unit according to a quad tree structure and/or a binary tree structure.
  • the reconstructed image signal decoded and output through the decoding device 200 may be reproduced through the playback device.
  • the decoding apparatus 200 may receive a signal output from the encoding apparatus 100 of FIG. 2 in the form of a bitstream, and the received signal may be decoded through the entropy decoding unit 210.
  • the entropy decoding unit 210 may parse the bitstream to derive information (eg, video/video information) necessary for image restoration (or picture restoration).
  • the video/video information may further include information on various parameter sets, such as adaptation parameter set (APS), picture parameter set (PPS), sequence parameter set (SPS), or video parameter set (VPS).
  • APS adaptation parameter set
  • PPS picture parameter set
  • SPS sequence parameter set
  • VPS video parameter set
  • the decoding apparatus may decode a picture based on information on a parameter set.
  • Signaled/received information and/or syntax elements described later in this document may be decoded through a decoding procedure and obtained from a bitstream.
  • the entropy decoding unit 210 acquires information in the bitstream using a coding technique such as exponential Golomb coding, CAVLC, or CABAC, and a value of a syntax element required for image restoration, and a quantized value of a transform coefficient for a residual. Can be printed.
  • a bin corresponding to each syntax element is received in a bitstream, and information about the syntax element to be decoded and decoding information of a block to be decoded and a neighbor or a symbol/bin decoded in a previous step
  • the symbol corresponding to the value of each syntax element is determined by determining the context model using the information of, and performing arithmetic decoding of the bin by predicting the probability of occurrence of the bin according to the determined context model.
  • the CABAC entropy decoding method may update the context model using information of the decoded symbol/bin for the context model of the next symbol/bin after the context model is determined.
  • the entropy decoding unit 210 Among the information decoded by the entropy decoding unit 210, information on prediction is provided to the prediction unit (inter prediction unit 260 and intra prediction unit 265), and the register on which entropy decoding is performed by the entropy decoding unit 210 Dual values, that is, quantized transform coefficients and related parameter information may be input to the inverse quantization unit 220. In addition, information about filtering among information decoded by the entropy decoding unit 210 may be provided to the filtering unit 240. Meanwhile, a receiving unit (not shown) for receiving a signal output from the encoding device 100 may be further configured as an inner/outer element of the decoding device 200, or the receiving unit may be a component of the entropy decoding unit 210. May be.
  • the decoding apparatus 200 may be referred to as a video/video/picture decoding apparatus.
  • the decoding apparatus 200 may be divided into an information decoder (video/video/picture information decoder) and a sample decoder (video/video/picture sample decoder).
  • the information decoder may include an entropy decoding unit 210, and the sample decoder is an inverse quantization unit 220, an inverse transform unit 230, an addition unit 235, a filtering unit 240, a memory 250, and an inter prediction. It may include at least one of the unit 260 and the intra prediction unit 265.
  • the inverse quantization unit 220 may output transform coefficients through inverse quantization of the quantized transform coefficients.
  • the inverse quantization unit 220 may rearrange the quantized transform coefficients into a two-dimensional block shape. In this case, the reordering may be performed based on the coefficient scan order performed by the encoding apparatus 100.
  • the inverse quantization unit 220 may perform inverse quantization on quantized transform coefficients by using a quantization parameter (eg, quantization step size information) and obtain transform coefficients.
  • a quantization parameter eg, quantization step size information
  • the inverse transform unit 230 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).
  • the prediction unit may perform prediction on the current block and generate a predicted block including prediction samples for the current block.
  • the prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on information on prediction output from the entropy decoding unit 210, and may determine a specific intra/inter prediction mode.
  • the prediction unit may generate a prediction signal (prediction sample) based on various prediction methods described later. For example, the prediction unit may not only apply intra prediction or inter prediction to predict one block, but also apply intra prediction and inter prediction together (simultaneously). This may be referred to as CIIP (combined inter and intra prediction). Also, the prediction unit may perform intra block copy (IBC) to predict a block. IBC may be used for content (eg, game) video/video coding, such as, for example, screen content coding (SCC). Also, IBC may be referred to as CPR (current picture referencing). IBC basically performs prediction in the current picture, but can be performed similarly to inter prediction in that it derives a reference block in the current picture. That is, the IBC may use at least one of the inter prediction techniques described in this document.
  • IBC intra block copy
  • the intra prediction unit 265 may predict the current block by referring to samples in the current picture.
  • the referenced samples may be located near the current block or may be spaced apart according to the prediction mode.
  • prediction modes may include a plurality of non-directional modes and a plurality of directional modes.
  • the intra prediction unit 265 may determine a prediction mode applied to the current block by using the prediction mode applied to the neighboring block.
  • the inter prediction unit 260 may derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on the reference picture.
  • motion information may be predicted in units of blocks, subblocks, or samples based on correlation between motion information between neighboring blocks and current blocks.
  • the motion information may include a motion vector and a reference picture index.
  • the motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction) information.
  • the neighboring block may include a spatial neighboring block existing in the current picture and a temporal neighboring block existing in the reference picture.
  • the inter prediction unit 260 may construct a motion information candidate list based on neighboring blocks, and derive a motion vector and/or a reference picture index of the current block based on the received candidate selection information.
  • Inter prediction may be performed based on various prediction modes, and information on prediction may include information indicating a mode of inter prediction for a current block.
  • the addition unit 235 is reconstructed by adding the obtained residual signal to the prediction signal (predicted block, prediction sample array) output from the prediction unit (including the inter prediction unit 260 and/or the intra prediction unit 265). Signals (restored pictures, reconstructed blocks, reconstructed sample arrays) can be generated. When there is no residual for a block to be processed, such as when the skip mode is applied, the predicted block may be used as a reconstructed block.
  • the addition unit 235 may be referred to as a restoration unit or a restoration block generation unit.
  • the generated reconstructed signal may be used for intra prediction of the next processing target block in the current picture, and may be used for inter prediction of the next picture through filtering as described later.
  • the filtering unit 240 may improve subjective/objective image quality by applying filtering to the reconstructed signal. For example, the filtering unit 240 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may transmit the modified reconstructed picture to the DPB 255 of the memory 250 .
  • Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, and bilateral filter.
  • the modified reconstructed picture delivered to the DPB 255 of the memory 250 may be used as a reference picture by the inter prediction unit 260.
  • the memory 250 may store motion information of a block from which motion information in a current picture is derived (or decoded) and/or motion information of blocks in a picture that have already been reconstructed.
  • the stored motion information may be transmitted to the inter prediction unit 260 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block.
  • the memory 250 may store reconstructed samples of reconstructed blocks in the current picture, and may be transmitted to the intra prediction unit 265.
  • embodiments described in the filtering unit 160, the inter prediction unit 180, and the intra prediction unit 185 of the encoding apparatus 100 are respectively the filtering unit 240 and the inter prediction unit 260 of the decoding apparatus.
  • the intra prediction unit 265 may be applied to be the same or correspond to each other.
  • FIG. 4 shows an example of a content streaming system according to an embodiment of the present specification.
  • Content streaming systems to which the embodiments of the present specification are applied are largely an encoding server 410, a streaming server 420, a web server 430, and a media storage 440. ), a user equipment 450, and a multimedia input device 460.
  • the encoding server 410 generates a bitstream by compressing content input from a multimedia input device 460 such as a smartphone, a camera, or a camcorder into digital data, and transmits the generated bitstream to the streaming server 420.
  • a multimedia input device 460 such as a smartphone, a camera, or a camcorder
  • the encoding server 410 may be omitted.
  • the bitstream may be generated by an encoding method or a bitstream generation method to which an embodiment of the present specification is applied, and the streaming server 420 may temporarily store the bitstream while transmitting or receiving the bitstream.
  • the streaming server 420 transmits multimedia data to the user device 450 based on a user request through the web server 430, and the web server 430 serves as an intermediary that informs the user of what kind of service exists.
  • the web server 430 transmits information on the requested service to the streaming server 420, and the streaming server 420 transmits multimedia data to the user.
  • the content streaming system may include a separate control server, and in this case, the control server serves to control commands/responses between devices in the content streaming system.
  • the streaming server 420 may receive content from the media storage 440 and/or the encoding server 410. For example, when receiving content from the encoding server 410, the streaming server 420 may receive the content in real time. In this case, in order to provide a smooth streaming service, the streaming server 420 may store the bitstream for a predetermined time.
  • the user device 450 includes, for example, a mobile phone, a smart phone, a laptop computer, a digital broadcasting terminal, a personal digital assistants (PDA), a portable multimedia player (PMP), a navigation system, and a slate PC ( slate PC), tablet PC, ultrabook, wearable device, e.g., smartwatch, smart glass, head mounted display (HMD)), It can include digital TV, desktop computer, and digital signage.
  • PDA personal digital assistants
  • PMP portable multimedia player
  • HMD head mounted display
  • Each server in the content streaming system may be operated as a distributed server, and in this case, data received from each server may be distributedly processed.
  • FIG. 5 shows an example of a video signal processing apparatus according to an embodiment of the present specification.
  • the video signal processing apparatus of FIG. 5 may correspond to the encoding apparatus 100 of FIG. 1 or the decoding apparatus 200 of FIG. 2.
  • the video signal processing apparatus 500 for processing a video signal includes a memory 520 for storing a video signal, and a processor 510 for processing a video signal while being combined with the memory 520.
  • the processor 510 may be configured with at least one processing circuit for processing a video signal, and may process a video signal by executing instructions for encoding/decoding a video signal. That is, the processor 510 may encode original video data or decode an encoded video signal by executing encoding/decoding methods described below.
  • the processor 510 may be composed of one or more processors corresponding to each of the modules of FIG. 2 or 3.
  • the memory 520 may correspond to the memory 170 of FIG. 2 or the memory 250 of FIG. 3.
  • the video/image coding method according to the present specification may be performed based on a split structure described later.
  • Procedures such as prediction, residual processing (e.g., (inverse) transformation, (inverse) quantization), syntax element coding, and filtering, which will be described later, are CTU (coding tree unit) derived based on the load structure, CU (and/ Alternatively, it may be performed based on TU, PU).
  • the block division procedure may be performed by the video division unit 110 of the encoding apparatus 100 described above, and division-related information is (encoded) processed by the entropy encoding unit 190 and transferred to the decoding apparatus 200 in the form of a bitstream. Can be delivered.
  • the entropy decoding unit 210 of the decoding apparatus 200 derives the block division structure of the current block based on the division-related information obtained from the bitstream, and based on this, a series of procedures (e.g., prediction, registration) for decoding an image. Dual processing, block/picture restoration, and in-loop filtering) can be performed.
  • an image processing unit may have a hierarchical structure.
  • One picture may be divided into one or more tiles or tile groups.
  • One tile group may include one or more tiles.
  • One tile may contain more than one CTU.
  • the CTU can be divided into one or more CUs.
  • a tile is a rectangular region of CTUs within a particular tile column and a particular tile row in a picture.
  • the tile group may include an integer number of tiles according to a tile raster scan in a picture.
  • the tile group header may convey information/parameters applicable to the corresponding tile group.
  • the tile group may have one type of tile groups including an intra (I) tile group, a predictive (P) tile group, and a bi-predictive (B) tile group.
  • inter prediction is not used and only intra prediction can be used.
  • a coded original sample value may be signaled without prediction.
  • Intra prediction or inter prediction may be used for blocks in a P tile group, and when inter prediction is used, only uni prediction may be used.
  • intra prediction or inter prediction may be used for blocks in the B tile group, and when inter prediction is used, not only unidirectional prediction but also bi prediction may be used.
  • FIG. 6 illustrates an example of a picture division structure according to an embodiment of the present specification.
  • a picture having 216 (18 by 12) luminance CTUs is divided into 12 tiles and 3 tile groups.
  • the encoder determines the size of a tile/tile group and a maximum and minimum coding unit according to a characteristic (e.g., resolution) of a video image or in consideration of coding efficiency or parallel processing, and provides information about this or information for inducing it. It can be included in the bitstream.
  • a characteristic e.g., resolution
  • the decoder may obtain information indicating whether the tile/tile group of the current picture and the CTU in the tile are divided into a plurality of coding units. Coding efficiency can be increased if such information is not always acquired (decoded) by the decoder, but is acquired (decoded) only under certain conditions.
  • the tile group header may include information/parameters commonly applicable to the tile group.
  • APS APS syntax
  • PPS PPS syntax
  • SPS SPS syntax
  • VPS VPS syntax
  • the high-level syntax of the present specification may include at least one of APS syntax, PPS syntax, SPS syntax, and VPS syntax.
  • information on the division and configuration of a tile/tile group may be configured in an encoder through a higher level syntax and then transmitted to a decoder in the form of a bitstream.
  • FIG. 7A to 7D illustrate an example of a block division structure according to an embodiment of the present specification.
  • 7A is a QT (quadtree, QT)
  • FIG. 7b is a binary tree (BT)
  • FIG. 7c is a ternary tree (TT)
  • FIG. 7d shows an example of block division structures by an asymmetric tree (AT). do.
  • one block may be divided based on a QT division scheme.
  • one subblock divided by the QT division method may be further divided recursively according to the QT division method.
  • a leaf block that is no longer divided by the QT division method may be divided by at least one of BT, TT, or AT.
  • BT can have two types of division, such as horizontal BT (2NxN, 2NxN) and vertical BT (Nx2N, Nx2N).
  • TT may have two types of division, such as horizontal TT (2Nx1/2N, 2NxN, 2Nx1/2N) and vertical TT (1/2Nx2N, Nx2N, 1/2Nx2N).
  • AT is horizontal-up AT (2Nx1/2N, 2Nx3/2N), horizontal-down AT (2Nx3/2N, 2Nx1/2N), vertical-left AT ( It can have four types of division: 1/2Nx2N, 3/2Nx2N), and vertical-right AT (3/2Nx2N, 1/2Nx2N).
  • Each BT, TT, AT can be further divided recursively using BT, TT, AT.
  • Block A may be divided into four sub-blocks (A0, A1, A2, A3) by QT.
  • Sub-block A1 may be divided into four sub-blocks (B0, B1, B2, B3) by QT again.
  • Block B3 that is no longer divided by QT may be divided by vertical BT (C0, C1) or horizontal BT (D0, D1). Like block C0, each sub-block may be further divided recursively in the form of horizontal BT (E0, E1) or vertical BT (F0, F1).
  • Block B3 which is no longer divided by QT may be divided into vertical TT (C0, C1, C2) or horizontal TT (D0, D1, D2). Like block C1, each sub-block may be further divided recursively in the form of horizontal TT (E0, E1, E2) or vertical TT (F0, F1, F2).
  • Block B3 which is no longer divided by QT, can be divided into vertical ATs (C0, C1) or horizontal ATs (D0, D1). Like block C1, each sub-block can be further divided recursively in the form of a horizontal AT (E0, E1) or a vertical TT (F0, F1).
  • BT, TT, and AT division can be applied together in one block.
  • a sub-block divided by BT may be divided by TT or AT.
  • sub-blocks divided by TT may be divided by BT or AT.
  • Sub-blocks divided by AT may be divided by BT or TT.
  • each sub-block may be divided by vertical BT.
  • each sub-block may be divided by horizontal BT. In this case, the order of division is different, but the shape of the final division is the same.
  • the order of searching for the block may be variously defined. In general, search is performed from left to right and from top to bottom, and searching for a block means the order of determining whether to divide additional blocks of each divided sub-block, or if the block is no longer divided, each sub It may mean an encoding order of a block, or a search order when a subblock refers to information of another neighboring block.
  • VPDUs virtual pipeline data units
  • VPDUs may be defined as non-overlapping units within one picture.
  • successive VPDUs can be processed simultaneously by multiple pipeline stages.
  • the VPDU size is roughly proportional to the buffer size in most pipeline stages. Therefore, keeping the VDPU size small is important when considering the buffer size from a hardware perspective.
  • the VPDU size can be set equal to the maximum TB size.
  • the VPDU size may be 64x64 (64x64 luminance samples) size.
  • the VPDU size may be changed (increased or decreased) in consideration of the TT and/or BT partition described above.
  • an MxN block may represent a block including samples consisting of M columns and N rows.
  • FIG. 8 shows an example of a case in which the ternary tree (TT) and the binary tree (BT) are divided according to an embodiment of the present specification.
  • TT ternary tree
  • BT binary tree
  • at least one of the following restrictions may be applied as illustrated in FIG. 8.
  • -TT split is not allowed for a CU with either width or height, or both width and height equal to the width or height, or for a CU with both width and height equal to 128. 128).
  • vertical BT is not allowed
  • FIG. 9 is a block diagram for entropy encoding according to an embodiment of the present specification.
  • the block diagram of FIG. 9 corresponds to an example of the entropy encoding unit 190 of FIG. 2.
  • some or all of the video/video information may be entropy-encoded by the entropy encoding unit 190, and as described in FIG. 3, some or all of the video/video information is an entropy decoding unit ( 210) can be entropy decoded.
  • the video/video information may be encoded/decoded in units of syntax elements.
  • that information is encoded/decoded may include encoding/decoding by the method described in this paragraph.
  • CABAC 9 shows a block diagram of CABAC for encoding one syntax element.
  • the encoding process of CABAC first converts the input signal into a binary value through binarization when the input signal is a syntax element rather than a binary value. If the input signal is already binary, it is bypassed without going through binarization.
  • each binary number 0 or 1 constituting the binary value is called a bin.
  • the binary string (empty string) after binarization is 110, each of 1, 1, and 0 is referred to as one bin.
  • the bin(s) for one syntax element may represent a value of a corresponding syntax element.
  • the binarized bins are input into a regular coding engine or a bypass coding engine.
  • the regular coding engine allocates a context model that reflects a probability value to the corresponding bin, and encodes the corresponding bin based on the allocated context model.
  • the regular coding engine may update the probability model for the corresponding bin after performing coding for each bin. Bins coded in this way are called context-coded bins.
  • the bypass coding engine omits the procedure of estimating the probability for the input bin and the procedure of updating the probability model applied to the corresponding bin after coding. Instead of allocating context, a uniform probability distribution (eg, 50:50) is applied to code the input bins to improve coding speed. Bins coded in this way are called bypass bins.
  • the context model may be allocated and updated for each bin to be context-coded (regularly coded), and the context model may be indicated based on ctxidx or ctxInc.
  • ctxidx can be derived based on ctxInc.
  • a context index (ctxidx) indicating a context model for each of the regularly coded bins may be derived as a sum of a context index increment (ctxInc) and a context index offset (ctxIdxOffset).
  • ctxInc may be derived differently for each bin.
  • ctxIdxOffset may be represented by the lowest value of ctxIdx.
  • ctxIdx may be referred to as an initial value (initValue) of ctxIdx.
  • ctxIdxOffset is a value generally used to distinguish context models for other syntax elements, and a context model for one syntax element may be classified/derived based on ctxinc.
  • Entropy decoding performs the same process as entropy encoding in reverse order.
  • 10A and 10B illustrate an entropy encoding method and related components according to an embodiment of the present specification.
  • the encoding apparatus 100 performs an entropy coding procedure for image/video information.
  • the image/video information may include partitioning related information, prediction related information (eg, inter/intra prediction classification information, intra prediction mode information, inter prediction mode information), residual information, and in-loop filtering related information, or It can contain various syntax elements for.
  • Entropy coding may be performed in units of syntax elements. Steps S1010 to S1020 of FIG. 10A may be performed by the entropy encoding unit 190 of the encoding apparatus 100 of FIG. 2 described above.
  • the encoding device 100 performs binarization on the target syntax element (S1010).
  • binarization may be based on various binarization methods such as a Truncated Rice binarization process and a fixed-length binarization process, and a binarization method for the target syntax element may be predefined.
  • the binarization procedure may be performed by the binarization unit 192 in the entropy encoding unit 190.
  • the encoding device 100 performs entropy encoding on the target syntax element (S1020).
  • the encoding apparatus 100 may encode an empty string of a target syntax element based on an entropy coding technique such as CABAC or CAVLC based on normal coding (context based) or bypass coding, and the output may be included in a bitstream.
  • the entropy encoding procedure may be performed by the entropy encoding processing unit 193 in the entropy encoding unit 190.
  • the bitstream can be delivered to a decoding device through a (digital) storage medium or a network.
  • 11A and 11B illustrate an entropy decoding method and related components according to an embodiment of the present specification.
  • the decoding apparatus 200 may decode encoded image/video information.
  • the image/video information may include partitioning related information, prediction related information (eg, inter/intra prediction classification information, intra prediction mode information, inter prediction mode information), residual information, and in-loop filtering related information, or It can contain various syntax elements related to it.
  • Entropy coding may be performed in units of syntax elements. Steps S1110 to S1120 may be performed by the entropy decoding unit 210 of the decoding apparatus 200 of FIG. 3 described above.
  • the decoding apparatus 200 performs binarization on the target syntax element (S1110). Binarization can be based on various binarization methods such as the Truncated Rice binarization process and the Fixed-length binarization process, and the binarization method for the target syntax element can be predefined.
  • the decoding apparatus may derive available bin strings (empty string candidates) for available values of a target syntax element through a binarization procedure.
  • the binarization procedure may be performed by the binarization unit 212 in the entropy decoding unit 210.
  • the decoding apparatus 200 performs entropy decoding on the target syntax element (S1220).
  • the decoding apparatus 200 sequentially decodes and parses each bin for a relative syntax element from the input bit(s) in the bitstream, and compares the derived bin string with the available bin strings for the corresponding syntax element. If the derived empty string is the same as one of the available empty strings, a value corresponding to the corresponding empty string is derived as a value of the corresponding syntax element. If not, the next bit in the bitstream is further parsed and the above-described procedure is performed again. Through this process, the information can be signaled using variable length bits without using a start bit or an end bit for specific information (specific syntax element) in the bitstream. Through this, relatively fewer bits can be allocated to a low value, and overall coding efficiency can be improved.
  • the decoding apparatus 200 may decode each bin in the bin string from the bitstream based on an entropy coding technique such as CABAC or CAVLC based on context or bypass.
  • the bitstream may include various information for video/video decoding.
  • the bitstream can be delivered to a decoding device through a (digital) storage medium or a network.
  • pictures constituting the video/video may be encoded/decoded according to a series of decoding orders.
  • a picture order corresponding to an output order of a decoded picture may be set differently from a decoding order, and based on this, not only forward prediction but also backward prediction may be performed during inter prediction.
  • step S1210 may be performed by the prediction units 180 and 185 of the encoding apparatus 100 described in FIG. 2, and step S1220 may be performed by the residual processing units 115, 120, and 130. , S1230 may be performed by the entropy encoding unit 190.
  • Step S1210 may include an inter/intra prediction procedure described in this document
  • step S1220 may include a residual processing procedure described in this document
  • step S1230 includes an information encoding procedure described in this document. can do.
  • the picture encoding procedure is not only a procedure of encoding information for picture restoration (eg, prediction information, residual information, partitioning information) schematically as described in FIG. 2 to output in a bitstream form,
  • a procedure for generating a reconstructed picture for the current picture and a procedure for applying in-loop filtering to the reconstructed picture (optional) may be included.
  • the encoding apparatus 100 may derive (modified) residual samples from the quantized transform coefficients through the inverse quantization unit 140 and the inverse transform unit 150, and predictive samples corresponding to the output of step S1210 and ( A reconstructed picture may be generated based on the modified) residual samples.
  • the reconstructed picture generated in this way may be the same as the reconstructed picture generated by the decoding apparatus 200 described above.
  • a modified reconstructed picture can be generated through an in-loop filtering procedure for the reconstructed picture, which can be stored in the memory 170 (DPB 175), and, as in the case of the decoding device 200, a subsequent picture It can be used as a reference picture in an inter prediction procedure upon encoding of. As described above, in some cases, some or all of the in-loop filtering procedure may be omitted.
  • (in-loop) filtering-related information may be encoded by the entropy encoding unit 190 and output in the form of a bitstream, and the decoding apparatus 200
  • the in-loop filtering procedure may be performed in the same manner as the encoding apparatus 100.
  • Step S1310 may be performed by the entropy decoding unit 210 of the decoding apparatus 200 of FIG. 3, step S1320 may be performed by the prediction units 260 and 265, and step S1330 may be performed by the residual processing unit ( 220, 230), step S1340 may be performed by the addition unit 235, step S1350 may be performed by the filtering unit 240.
  • Step S1310 may include the information decoding procedure described in this document
  • step S1320 may include the inter/intra prediction procedure described in this document
  • step S1330 includes the residual processing procedure described in this document.
  • step S1340 may include the block/picture restoration procedure described in this document
  • step S1350 may include the in-loop filtering procedure described in this document.
  • the picture decoding procedure is a procedure for obtaining image/video information (through decoding) from a bitstream (S1310), a picture restoration procedure (S1320 to S1340), and a reconstructed picture, as described in FIG. It may include an in-loop filtering procedure (S1350) for.
  • the picture restoration procedure is based on prediction samples and residual samples obtained through the process of inter/intra prediction (S1320) and residual processing (S1330, inverse quantization and inverse transformation of a quantized code or coefficient) described in this document. Can be done.
  • a modified reconstructed picture may be generated through an in-loop filtering procedure for a reconstructed picture generated through a picture restoration procedure, and the modified reconstructed picture may be output as a decoded picture, and the decoding apparatus 200 It is stored in the DPB 255 of and can be used as a reference picture in inter prediction train when decoding a picture later.
  • the in-loop filtering procedure may be omitted, and in this case, the reconstructed picture may be output as a decoded picture, stored in the DPB 255 of the decoding device 200, and referenced in the inter prediction train when decoding a subsequent picture. Can be used as a picture.
  • the in-loop filtering procedure S1350 may include a deblocking filtering procedure, a sample adaptive offset (SAO) procedure, an adaptive loop filter (ALF) procedure, and/or a bi-lateral filter procedure as described above. And some or all of them may be omitted.
  • one or some of the deblocking filtering procedure, the SAO procedure, the ALF procedure, and the bilateral filter procedure may be sequentially applied, or all may be sequentially applied.
  • the SAO procedure may be performed.
  • the ALF procedure may be performed. This may be similarly performed in the encoding device 100.
  • a reconstructed block may be generated based on intra prediction/inter prediction for each block, and a reconstructed picture including the reconstructed blocks may be generated.
  • the current picture/slice/tile group is an I picture/slice/tile group
  • blocks included in the current picture/slice/tile group may be reconstructed based only on intra prediction.
  • inter prediction may be applied to some blocks in the current picture/slice/tile group
  • intra prediction may be applied to the remaining some blocks.
  • the color component of a picture may include a luminance component and a chrominance component, and the methods and embodiments proposed in this document may be applied to the luminance component and the chrominance component unless explicitly limited in this document.
  • FIG. 14 illustrates an example of a hierarchical structure for a coded image according to an embodiment of the present specification.
  • the coded image is a video coding layer (VCL) that deals with the decoding process of the image and itself, a subsystem that transmits and stores encoded information, and a network abstraction (NAL) that exists between the VCL and the subsystem and is responsible for network adaptation. layer).
  • VCL video coding layer
  • NAL network abstraction
  • VCL data including video data (tile group data) compressed in the VCL is generated, or a parameter set including information such as PPS (picture parameter set), SPS (sequence parameter set), VPS (video parameter set), or An additionally required SEI (supplemental enhancement information) message may be generated in the process of decoding an image.
  • PPS picture parameter set
  • SPS sequence parameter set
  • VPS video parameter set
  • SEI Supplemental Enhancement information
  • NAL unit data may be added to a raw byte sequence payload (RBSP) generated in VCL to generate a NAL unit.
  • RBSP may refer to tile group data, parameter set, and SEI message generated in the VCL.
  • NAL unit type information specified according to RBSP data included in the corresponding NAL unit may be included.
  • the NAL unit may be divided into a VCL NAL unit and a Non-VCL NAL unit according to an RBSP generated from VCL.
  • the VCL NAL unit may mean a NAL unit that includes information about an image (tile group data), and the Non-VCL NAL unit is an NAL that includes information (parameter set or SEI message) necessary for decoding an image. It can mean a unit.
  • VCL NAL unit and Non-VCL NAL unit may be transmitted through a network with header information added according to the data standard of the sub-system.
  • the NAL unit may be converted into a data format of a predetermined standard such as an H.266/VVC file format, a real-time transport protocol (RTP), and a transport stream (TS) and then transmitted through various networks.
  • a predetermined standard such as an H.266/VVC file format, a real-time transport protocol (RTP), and a transport stream (TS)
  • the NAL unit type may be specified according to the RBSP data structure included in the corresponding NAL unit, and information on the NAL unit type may be stored in the NAL unit header and signaled.
  • the NAL unit may be largely classified into a VCL NAL unit type and a Non-VCL NAL unit type according to whether or not information on an image (tile group data) is included.
  • the VCL NAL unit type may be classified according to the nature and type of a picture included in the VCL NAL unit, and the non-VCL NAL unit type may be classified according to the type of the parameter set.
  • NAl unit type specified according to the type of the parameter set included in the Non-VCL NAL unit type.
  • NAL unit A type for a NAL unit including APS
  • VPS Video Parameter Set
  • NAL unit a type for a NAL unit including SPS
  • NAL unit A type for a NAL unit including PPS
  • NAL unit types have syntax information for the NAL unit type, and the syntax information may be stored in the NAL unit header and signaled.
  • syntax information may be nal_unit_type, and NAL unit types may be specified by nal_unit_type values.
  • the tile group header may include information/parameters commonly applicable to the tile group.
  • APS APS syntax
  • PPS PPS syntax
  • SPS SPS syntax
  • VPS VPS syntax
  • the higher-level syntax may include at least one of APS syntax, PPS syntax, SPS syntax, and VPS syntax.
  • the image/video information encoded by the encoding device 100 by the decoding device 200 and signaled in the form of a bitstream includes intra-picture partitioning-related information, intra/inter prediction information, residual information, and in-loop filtering information.
  • information included in the APS, information included in the PPS, information included in the SPS, and/or the information included in the VPS may be included.
  • inter prediction described below may be performed by the inter prediction unit 180 of the encoding apparatus 100 of FIG. 2 or the inter prediction unit 260 of the decoding apparatus 200 of FIG. 3.
  • data encoded according to an embodiment of the present specification may be stored in the form of a bitstream.
  • the prediction unit of the encoding device 100/decoding device 200 may derive a prediction sample by performing inter prediction in block units.
  • Inter prediction may represent prediction derived in a method dependent on data elements (eg, sample values, motion information, etc.) of a picture(s) other than the current picture (Inter prediction can be a prediction derived in a manner). that is de-pendent on data elements (eg, sample values or motion information) of picture(s) other than the current picture).
  • a predicted block (prediction sample array) for the current block is derived based on a reference block (reference sample array) specified by a motion vector on a reference picture indicated by a reference picture index. I can.
  • motion information of the current block may be predicted in units of blocks, subblocks, or samples based on correlation between motion information between neighboring blocks and current blocks.
  • the motion information may include a motion vector and a reference picture index.
  • the motion information may further include inter prediction type (L0 prediction, L1 prediction, Bi prediction, etc.) information.
  • the neighboring block may include a spatial neighboring block existing in the current picture and a temporal neighboring block existing in the reference picture.
  • the reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different.
  • the temporal neighboring block may be called a collocated reference block, a co-located CU (colCU), or the like, and a reference picture including a temporal neighboring block may be referred to as a collocated picture (colPic).
  • a motion information candidate list may be constructed based on neighboring blocks of the current block, and a flag indicating which candidate is selected (used) to derive a motion vector and/or a reference picture index of the current block, or Index information may be signaled.
  • Inter prediction may be performed based on various prediction modes. For example, in the case of a skip mode and a merge mode, motion information of a current block may be the same as motion information of a selected neighboring block.
  • a residual signal may not be transmitted.
  • a motion vector prediction (MVP) mode a motion vector of a selected neighboring block is used as a motion vector predictor, and a motion vector difference may be signaled.
  • the motion vector of the current block may be derived using the sum of the motion vector predictor and the motion vector difference.
  • 15A and 15B illustrate a video/video encoding method based on inter prediction and an inter prediction unit in an encoding apparatus according to an embodiment of the present specification.
  • the encoding apparatus 100 performs inter prediction on the current block (S1510).
  • the encoding apparatus 100 may derive inter prediction mode and motion information of the current block and generate prediction samples of the current block.
  • the procedure of determining the inter prediction mode, deriving motion information, and generating prediction samples may be performed simultaneously, or one procedure may be performed before the other procedure.
  • the inter prediction unit 180 of the encoding apparatus 100 may include a prediction mode determining unit 181, a motion information deriving unit 182, and a predicted sample deriving unit 183, and the prediction mode determining unit A prediction mode for the current block may be determined at 181, motion information of the current block may be derived by the motion information deriving unit 182, and prediction samples of the current block may be derived by the predicted sample deriving unit 183.
  • the inter prediction unit 180 of the encoding apparatus 100 searches for a block similar to the current block within a predetermined area (search area) of reference pictures through motion estimation, and searches for a block similar to the current block. It is possible to derive a reference block whose difference is less than a minimum or a certain standard.
  • a reference picture index indicating a reference picture in which the reference block is located may be derived, and a motion vector may be derived based on a position difference between the reference block and the current block.
  • the encoding apparatus 100 may determine a mode applied to the current block among various prediction modes.
  • the encoding apparatus 100 may compare rate-distortion (RD) costs for various prediction modes and determine an optimal prediction mode for the current block.
  • RD rate-distortion
  • the encoding apparatus 100 configures a merge candidate list to be described later, and the current block and the middle of the reference blocks indicated by merge candidates included in the merge candidate list. It is possible to derive a reference block whose difference from the current block is less than a minimum or a certain standard. In this case, a merge candidate associated with the derived reference block is selected, and merge index information indicating the selected merge candidate may be generated and signaled to the decoding apparatus 200. Motion information of the current block may be derived using motion information of the selected merge candidate.
  • the encoding apparatus 100 configures a (A)MVP candidate list to be described later, and (A)motion vector predictor (MVP) candidates included in the MVP candidate list
  • the motion vector of the selected MVP candidate may be used as the MVP of the current block.
  • a motion vector indicating a reference block derived by motion estimation described above may be used as a motion vector of the current block, and among MVP candidates, a motion vector having the smallest difference from the motion vector of the current block is selected.
  • a motion vector difference (MVD) which is a difference obtained by subtracting MVP from the motion vector of the current block, may be derived.
  • information on the MVD may be signaled to the decoding apparatus 200.
  • the value of the reference picture index may be separately signaled to the decoding apparatus 200 by configuring reference picture index information.
  • the encoding apparatus 100 may derive residual samples based on the prediction samples (S1520).
  • the encoding apparatus 100 may derive residual samples by comparing the original samples of the current block with the prediction samples.
  • the encoding apparatus 100 encodes video information including prediction information and residual information (S1530).
  • the encoding apparatus 100 may output the encoded image information in the form of a bitstream.
  • the prediction information is information related to a prediction procedure and may include prediction mode information (eg, skip flag, merge flag, or mode index) and motion information.
  • the motion information may include candidate selection information (eg, merge index, mvp flag, or mvp index) that is information for deriving a motion vector. Further, the motion information may include information on the MVD and/or reference picture index information described above. Further, the motion information may include information indicating whether L0 prediction, L1 prediction, or bi prediction is applied.
  • the residual information is information about residual samples.
  • the residual information may include information about quantized transform coefficients for residual samples.
  • the prediction mode information and motion information may be collectively referred to as inter prediction information.
  • the output bitstream may be stored in a (digital) storage medium and transmitted to a decoding device, or may be transmitted to a decoding device through a network.
  • the encoding apparatus may generate a reconstructed picture (including reconstructed samples and a reconstructed block) based on the reference samples and the residual samples. This is because the encoding device 100 derives the same prediction result as that performed by the decoding device 200, and coding efficiency can be improved through this. Accordingly, the encoding apparatus 100 may store a reconstructed picture (or reconstructed samples, and a reconstructed block) in a memory and use it as a reference picture for inter prediction. As described above, an in-loop filtering procedure or the like may be further applied to the reconstructed picture.
  • 16A and 16B illustrate a video/video decoding method based on inter prediction and an inter prediction unit in a decoding apparatus according to an embodiment of the present specification.
  • the decoding apparatus 200 may perform an operation corresponding to the operation performed by the encoding apparatus 100.
  • the decoding apparatus 200 may perform prediction on the current block and derive prediction samples based on the received prediction information.
  • the decoding apparatus 200 may determine a prediction mode for the current block based on the received prediction information (S1610). The decoding apparatus 200 may determine which inter prediction mode is applied to the current block based on prediction mode information in the prediction information.
  • the decoding apparatus 200 may determine whether the merge mode is applied to the current block or the (A)MVP mode is determined based on the merge flag. Alternatively, the decoding apparatus 200 may select one of various inter prediction mode candidates based on a mode index. Inter prediction mode candidates may include a skip mode, a merge mode, and/or (A)MVP mode, or may include various inter prediction modes described below.
  • the decoding apparatus 200 derives motion information of the current block based on the determined inter prediction mode (S1620). For example, when the skip mode or the merge mode is applied to the current block, the decoding apparatus 200 may configure a merge candidate list to be described later, and select one merge candidate from among merge candidates included in the merge candidate list. . The selection of a merge candidate may be performed based on a merge index. Motion information of the current block may be derived from motion information of the selected merge candidate. Motion information of the selected merge candidate may be used as motion information of the current block.
  • the decoding apparatus 200 constructs a (A)MVP candidate list to be described later, and (A) a selected MVP candidate among MVP candidates included in the MVP candidate list.
  • the motion vector of can be used as the MVP of the current block.
  • the selection of MVP may be performed based on the above-described selection information (MVP flag or MVP index).
  • the decoding apparatus 200 may derive the MVD of the current block based on the information on the MVD, and may derive a motion vector of the current block based on the MVP and the MVD of the current block.
  • the decoding apparatus 200 may derive the reference picture index of the current block based on the reference picture index information.
  • the picture indicated by the reference picture index in the reference picture list for the current block may be derived as a reference picture referenced for inter prediction of the current block.
  • motion information of the current block may be derived without configuring a candidate list.
  • motion information of the current block may be derived according to a procedure disclosed in a prediction mode to be described later.
  • the configuration of the candidate list as described above may be omitted.
  • the decoding apparatus 200 may generate prediction samples for the current block based on motion information of the current block (S1630). In this case, the decoding apparatus 200 may derive a reference picture based on the reference picture index of the current block, and may derive the prediction samples of the current block by using samples of the reference block indicated on the reference picture by the motion vector of the current block. . In this case, as will be described later, a prediction sample filtering procedure may be further performed on all or part of the prediction samples of the current block in some cases.
  • the inter prediction unit 260 of the decoding apparatus 200 may include a prediction mode determination unit 261, a motion information derivation unit 262, and a prediction sample derivation unit 263, and a prediction mode determination unit A prediction mode for the current block is determined based on the prediction mode information received at (181), and motion information (motion vector) of the current block is determined based on the information on the motion information received from the motion information derivation unit 182. And/or a reference picture index), and the prediction sample derivation unit 183 may derive prediction samples of the current block.
  • the decoding apparatus 200 generates residual samples for the current block based on the received residual information (S1640).
  • the decoding apparatus 200 may generate reconstructed samples for the current block based on the prediction samples and the residual samples, and generate a reconstructed picture based on the generated samples (S1650). Thereafter, as described above, an in-loop filtering procedure or the like may be further applied to the reconstructed picture.
  • the inter prediction procedure may include determining an inter prediction mode, deriving motion information according to the determined prediction mode, and performing prediction based on the derived motion information (generating a prediction sample).
  • FIG 17 illustrates an inter prediction procedure according to an embodiment of the present specification.
  • the inter prediction procedure may include an inter prediction mode step (S1710), a motion information derivation step (S1720) according to the determined prediction mode, and a prediction performance (prediction sample generation) step (S1730) based on the derived motion information.
  • the inter prediction procedure may be performed by the encoding device 100 and the decoding device 200 as described above.
  • the encoding device 100 or the decoding device 200 may perform inter prediction using motion information of the current block.
  • the encoding apparatus 100 may derive optimal motion information for the current block through a motion estimation procedure. For example, the encoding apparatus 100 may search for a similar reference block with high correlation using the original block in the original picture for the current block in units of fractional pixels within a predetermined search range within the reference picture, and through this Can be derived.
  • the similarity of the block may be derived based on the difference between the phase-based sample values.
  • the similarity of blocks may be calculated based on a sum of absolute difference (SAD) between a current block (or a template of a current block) and a reference block (or a template of a reference block).
  • SAD sum of absolute difference
  • motion information may be derived based on the reference block having the smallest SAD in the search area.
  • the derived motion information may be signaled to the decoding apparatus according to various methods based on the inter prediction mode.
  • the encoding apparatus 100 may indicate motion information of the current prediction block by transmitting flag information indicating that the merge mode has been used and a merge index indicating which prediction block is used.
  • the encoding apparatus 100 In order to perform a merge mode, the encoding apparatus 100 must search for a merge candidate block used to induce motion information of a current prediction block. For example, up to five merge candidate blocks may be used, but the present specification is not limited thereto. In addition, the maximum number of merge candidate blocks may be transmitted in a slice header or a tile group header, and the present specification is not limited thereto. After finding the merge candidate blocks, the encoding apparatus 100 may generate a merge candidate list and select a merge candidate block having the lowest cost among them as the final merge candidate block.
  • the merge candidate list may use, for example, 5 merge candidate blocks. For example, four spatial merge candidates and one temporal merge candidate can be used.
  • FIG 18 illustrates examples of spatial neighboring blocks used as spatial merge candidates according to an embodiment of the present specification.
  • a left neighboring block A1, a bottom-left neighboring block A0, a top-right neighboring block B0, and an upper neighboring block B1. ), and at least one of the top-left neighboring block B2 may be used.
  • the merge candidate list for the current block may be configured based on the procedure shown in FIG. 19.
  • FIG. 19 is an example of a flowchart for configuring a merge candidate list according to an embodiment of the present specification.
  • the coding apparatus inserts the spatial merge candidates derived by searching for spatial neighboring blocks of the current block into the merge candidate list (S1910).
  • the spatial neighboring blocks may include a block around a lower left corner of a current block, a block around a left, a block around an upper right corner, a block around an upper side, and blocks around an upper left corner.
  • additional neighboring blocks such as a right peripheral block, a lower peripheral block, and a right lower peripheral block may be further used as the spatial neighboring blocks.
  • the coding apparatus may detect available blocks by searching spatial neighboring blocks based on priority, and derive motion information of the detected blocks as spatial merge candidates.
  • the encoding device 100 or the decoding device 200 searches for five blocks shown in FIG. 18 in order of A1, B1, B0, A0, B2, and sequentially indexes the available candidates to obtain a merge candidate. It can be organized as a list.
  • the coding apparatus inserts a temporal merge candidate derived by searching for a temporal neighboring block of the current block into the merge candidate list (S1920).
  • the temporal neighboring block may be located on a reference picture that is a picture different from the current picture in which the current block is located.
  • a reference picture in which a temporal neighboring block is located may be referred to as a collocated picture or a col picture.
  • the temporal neighboring block may be searched in the order of the lower right corner neighboring block and the lower right center block of the collocated block with respect to the current block on the collocated picture. Meanwhile, when motion data compression is applied, specific motion information may be stored as representative motion information for each predetermined storage unit in a collocated picture.
  • the predetermined storage unit may be predetermined, for example, in a 16x16 sample unit, an 8x8 sample unit, or the like, or size information for a predetermined storage unit may be signaled from the encoding device 100 to the decoding device 200 have.
  • motion information of a temporal neighboring block may be replaced with representative motion information of a predetermined storage unit in which a temporal neighboring block is located.
  • a temporal merge candidate may be derived based on motion information of the prediction block.
  • the constant storage unit is a 2nx2n sample unit
  • the modified positions ((xTnb >> n) ⁇ n), (yTnb >> n)
  • the motion information of the prediction block located at ⁇ n)) may be used for the temporal merge candidate.
  • the predetermined storage unit is a 16x16 sample unit
  • the modified positions ((xTnb >> 4) ⁇ 4), (yTnb >> 4)
  • Motion information of the prediction block located at ⁇ 4) may be used for a temporal merge candidate.
  • the constant storage unit is an 8x8 sample unit
  • the coordinates of the temporal neighboring block are (xTnb, yTnb)
  • the modified positions ((xTnb >> 3) ⁇ 3), (yTnb >> 3 ) ⁇ 3)) motion information of a prediction block may be used for a temporal merge candidate.
  • the coding apparatus may check whether the number of current merge candidates is smaller than the number of maximum merge candidates (S1930).
  • the maximum number of merge candidates may be predefined or signaled from the encoding device 100 to the decoding device 200.
  • the encoding apparatus 100 may generate information on the number of maximum merge candidates, encode, and transmit the information to the decoding apparatus 200 in the form of a bitstream.
  • the subsequent candidate addition process may not proceed.
  • Additional merge candidates include, for example, adaptive temporal motion vector prediction (ATMVP), combined bi-predictive merge candidate (when the slice type of the current slice is B type), and/or zero vector merge. Can include candidates.
  • ATMVP adaptive temporal motion vector prediction
  • MVP motion vector predictor
  • the MVP mode may be referred to as AMVP (advanced MVP or adaptive MVP).
  • AMVP advanced MVP or adaptive MVP
  • a motion vector predictor using a motion vector of the reconstructed spatial neighboring block eg, neighboring block in FIG. 18
  • a motion vector corresponding to the temporal neighboring block or Col block
  • a (motion vector predictor, MVP) candidate list may be generated. That is, a motion vector of the reconstructed spatial neighboring block and/or a motion vector corresponding to the temporal neighboring block may be used as a motion vector predictor candidate.
  • the information on prediction may include selection information (eg, an MVP flag or an MVP index) indicating an optimal motion vector predictor candidate selected from among motion vector predictor candidates included in the list.
  • the prediction unit may select a motion vector predictor of the current block from among motion vector predictor candidates included in the motion vector candidate list using the selection information.
  • the prediction unit of the encoding apparatus 100 may obtain a motion vector difference (MVD) between the motion vector of the current block and the motion vector predictor, encode the motion vector, and output it in the form of a bitstream. That is, MVD may be obtained by subtracting the motion vector predictor from the motion vector of the current block.
  • the prediction unit of the decoding apparatus 200 may obtain a motion vector difference included in the prediction information, and derive the motion vector of the current block by adding the motion vector difference and the motion vector predictor. .
  • the prediction unit of the decoding apparatus may obtain or derive a reference picture index indicating a reference picture from the prediction information.
  • the motion vector predictor candidate list may be configured as shown in FIG. 20.
  • the coding apparatus searches for a spatial candidate block for motion vector prediction and inserts it into a prediction candidate list (S2010). For example, the coding apparatus may search for neighboring blocks according to a predetermined search order, and add information on neighboring blocks that satisfy a condition for a spatial candidate block to a prediction candidate list (MVP candidate list).
  • MVP candidate list a prediction candidate list
  • the coding apparatus After constructing the spatial candidate block list, the coding apparatus compares the number of spatial candidate lists included in the prediction candidate list with a preset reference number (eg, 2) (S2020). When the number of spatial candidate lists included in the prediction candidate list is greater than or equal to the reference number (eg, 2), the coding apparatus may terminate the construction of the prediction candidate list.
  • a preset reference number eg, 2 (S2020).
  • the coding apparatus searches for a temporal candidate block and inserts it into the prediction candidate list (S2030), and the temporal candidate block is used. If not possible, a zero motion vector is added to the prediction candidate list (S2040).
  • a predicted block for the current block may be derived based on motion information derived according to the prediction mode.
  • the predicted block may include predicted samples (prediction sample array) of the current block.
  • an interpolation procedure may be performed, through which prediction samples of the current block may be derived based on reference samples of the fractional sample unit within a reference picture.
  • prediction samples may be generated based on a motion vector per sample/subblock.
  • the prediction samples derived based on the first direction prediction eg, L0 prediction
  • the prediction samples derived based on the second direction prediction eg, L1 prediction
  • Final prediction samples can be derived through weighted summation (according to the phase).
  • reconstructed samples and reconstructed pictures may be generated based on the derived prediction samples, and then a procedure such as in-loop filtering may be performed.
  • a reference picture index may be explicitly signaled.
  • a reference picture index (refidxL0) for L0 prediction and a reference picture index (refidxL1) for L1 prediction may be signaled separately.
  • both information about refidxL0 and information about refidxL1 may be signaled.
  • information on the MVD derived from the encoding device 100 may be signaled to the decoding device 200 as described above.
  • the information on the MVD may include, for example, information indicating the absolute value of the MVD and the x and y components of the sign. In this case, whether the absolute MVD value is greater than 0 (abs_mvd_greater0_flag), whether it is greater than 1, and information indicating the remainder of the MVD (abs_mvd_greater1_flag) may be signaled in stages.
  • information indicating whether the absolute MVD value is greater than 1 may be signaled only when the value of the flag information (abs_mvd_greater0_flag) indicating whether the absolute MVD value is greater than 0 is 1.
  • SMVD Symmetric MVD
  • FIG. 21 shows an example of a case in which a symmetric motion vector difference (MVD) mode according to an embodiment of the present specification is applied.
  • VMD symmetric motion vector difference
  • symmetric MVD may be used in consideration of coding efficiency.
  • signaling of some of the motion information may be omitted.
  • information on refidxL0, information on refidxL1, and information on MVDL1 are not signaled from the encoding device 100 to the decoding device 200 and may be derived internally. .
  • flag information indicating whether to apply SMVD eg, symmetric MVD flag information or sym_mvd_flag syntax element
  • the value of the flag information is 1
  • the decoding apparatus 200 may determine that SMVD is applied to the current block.
  • information about mvp_l0_lfag, mvp_l1_flag, and MVDL0 may be explicitly signaled, and information about refidxL0 as described above , information on refidxL1, and signaling of information on MVDL1 may be omitted, and may be derived inside the decoder.
  • refidxL0 is derived as an index indicating the previous reference picture closest to the current picture in the order of the picture order count (POC) within the reference picture list 0 (which may be referred to as list 0, L0, or the first reference list). Can be.
  • refidxL1 may be derived as an index indicating a subsequent reference picture closest to the current picture in the POC order in reference picture list 1 (which may be referred to as List 1, L1, or a second reference picture list). Also, for example, both refidxL0 and refidxL1 may be derived as 0, respectively. Also, for example, refidxL0 and refidxL1 may be derived as minimum indexes having the same POC difference in relation to the current picture.
  • [POC of the current picture]-[POC of the first reference picture indicated by refidxL0] is referred to as the first POC difference
  • [POC of the second reference picture indicated by refidxL1] is referred to as the second POC difference.
  • the value of refidxL0 indicating the first reference picture is derived as the value of refidxL0 of the current block
  • the value of refidxL1 indicating the second reference picture is the same as that of the current block. It can also be derived as the value of refidxL1.
  • refidxL0 and refidxL1 of the set with the minimum difference may be derived as refidxL0 and refidxL1 of the current block.
  • MVDL1 can be derived as -MVDL0.
  • the final MV for the current block may be derived as in Equation 1 below.
  • Equation 1 mvx 0 and mvy 0 represent the x and y components of the L0 direction motion vector for the current block, and mvx 1 and mvy 1 represent the x and y components of the motion vector for L0 direction prediction for the current block. And the x and y components of the motion vector for L1 direction prediction.
  • mvp 0 and mvp 0 denote an MVP motion vector for L0 direction prediction (L0 base motion vector)
  • mvp 1 and mvp 1 denote an MVP motion vector for L1 direction prediction (L1 base motion vector).
  • mvd 0 and mvd 0 represent the x and y components of MVD for L0 direction prediction.
  • MVD for L1 direction prediction has the same value as L0 MVD, but has an opposite sign.
  • the present embodiment describes an affine motion prediction method for encoding/decoding using an affine motion model.
  • a motion vector may be expressed in units of each pixel of a block using two, three, or four motion vectors.
  • FIG. 22 illustrates an example of affine motion models according to an embodiment of the present specification.
  • the affine motion model may express four motions as shown in FIG. 22.
  • the affine motion model that expresses three movements (translation, scale, and rotate) among the movements that can be expressed by the affine motion model is referred to as a similar (or simplified) affine motion model, and the present specification refers to a similar (or singular) motion model.
  • the proposed methods are described based on the affine motion model. However, the embodiments of the present specification are not limited to a similar (or singular) affine motion model.
  • 23A and 23B illustrate examples of motion vectors for each control point according to an embodiment of the present specification.
  • a motion vector may be determined for each pixel position included in a block using two or more control point motion vectors (CPMVs).
  • CPMVs control point motion vectors
  • Equation 2 For a 4-parameter affine motion model (FIG. 23A), a motion vector at the sample position (x, y) can be derived as in Equation 2 below.
  • the motion vector at the sample position (x, y) can be derived as in Equation 3 below.
  • ⁇ v 0x , v 0y ⁇ is the CPMV of the CP at the top-left corner of the coding block
  • ⁇ v 1x , v 1y ⁇ is the CPMV of the CP at the top-right corner
  • ⁇ v 2x , v 2y ⁇ is the CPMV of the CP at the bottom-left corner
  • W corresponds to the width of the current block
  • H corresponds to the height of the current block
  • ⁇ v x , v y ⁇ is a motion vector at the position ⁇ x, y ⁇ .
  • FIG. 24 shows an example of a motion vector for each subblock according to an embodiment of the present specification.
  • a motion vector field which is an affine
  • a motion vector field may be determined in a pixel unit or a predefined subblock unit.
  • the MVP is determined in units of sub-blocks
  • the center of the sub-block (the lower right of the center, that is, the lower right of the center 4 samples) pixel
  • a motion vector of a corresponding block may be obtained based on a value.
  • the affine MVF is determined in units of 4*4 subblocks. However, this is only for convenience of explanation, and the size of the subblock may be variously changed.
  • motion models applicable to the current block may include the following three types.
  • Translational motion model can represent a model in which an existing block-based motion vector is used
  • 4-parameter affine motion model can represent a model in which two CPMVs are used
  • 6-parameter affine motion model can represent three It can indicate the model in which CPMV is used.
  • the affine motion prediction may include an affine MVP (or affine inter) mode and an affine merge.
  • affine motion prediction motion vectors of a current block may be derived in units of samples or sub-blocks.
  • the CPMV may be determined according to the Rane motion model of the neighboring block coded by the Rane motion prediction. Affine-coded neighboring blocks in the search order may be used for the affine merge mode.
  • the current block may be coded as AF_MERGE. That is, when the affine merge mode is applied, CPMVs of the current block may be derived using CPMVs of neighboring blocks.
  • CPMVs of the neighboring block may be used as CPMVs of the current block, or CPMVs of the neighboring block may be used as CPMVs of the current block by being modified based on the size of the neighboring block and the size of the current block.
  • an affine merge candidate list may be constructed to derive CPMVs for the current block.
  • the affine merge candidate list may include at least one of the following candidates, for example.
  • the inherited affine candidates are candidates derived based on the CPMVs of the neighboring block when the neighboring block is coded in the affine mode, and constructed affine candidates are the corresponding CP neighboring blocks in each CPMV unit. It is a candidate derived by constructing CPMVs based on MV, and a zero MV candidate may represent a candidate composed of CPMVs having a value of 0.
  • 25 is an example of a flowchart for configuring an affine merge candidate list according to an embodiment of the present specification.
  • a coding device inserts inherited affine candidates into a candidate list (S2510), and constructs constructed affine candidates into an affine candidate list. Then, a zero MV candidate may be inserted into the affine candidate list (S2530). In an embodiment, when the number of candidates included in the candidate list is smaller than the reference number (eg, two), the coding apparatus may insert the configured affine candidates or the zero MV candidate.
  • FIG. 26 shows examples of blocks for deriving an inherited affine motion predictor according to an embodiment of the present specification
  • FIG. 27 is a diagram for deriving an inherited affine motion predictor according to an embodiment of the present specification. An example of control point motion vectors is shown.
  • affine candidates There may be up to two (one from the left neighboring CU and one of the upper neighboring CUs) of inherited affine candidates, which may be derived from the affine motion model of neighboring blocks.
  • Candidate blocks are shown in FIG. 26.
  • the scan order for the left predictor is A0-A1
  • the scan order for the upper predictor is B0-B1-B2. Only the first inherited candidates from each side are selected. A pruning check may not be performed between the two inherited candidates.
  • control point motion vectors of the adjacent affine CU may be used to derive a control point motion vector predictor (CPMVP) candidate from the affine merge list of the current CU.
  • CCMVP control point motion vector predictor
  • motion vectors of the CU including the block A are v 2 , v 3 of the upper left corner, the upper right corner, and the lower left corner.
  • And v 4 are used.
  • block A is coded with a 4-parameter affine model
  • two CPMVs of the current CU are calculated according to v 2 and v 3 .
  • block A is coded with a 6-parameter model
  • the three CPMVs of the current CU are calculated according to v 2 , v 3 , and v 4 .
  • the constructed affine merge means a candidate formed by combining neighboring translational motion information for each control point.
  • motion information for control points is derived from specified spatial and temporal neighbors.
  • blocks are checked in the order of B2-B3-A2 and the MV of the first available block is used. Blocks are checked in the order of B1-B0 with respect to CPMV2 (CP1) in the upper right corner, and blocks in the order of A1-A0 with CPMV3 (CP2) in the lower left corner. If available, TMVP is used for CPMV4 (CP3) in the lower right corner.
  • affine merge candidates are configured based on this motion information.
  • the following combinations of control point MVs are used in order:
  • Combinations of three CPMVs constitute a 6-parameter affine merge candidate, and a combination of two CPMVs constitutes a 4-parameter affine merge candidate.
  • the combination of the related control point MVs is discarded.
  • 29 is an example of a flowchart for configuring an affine MVP candidate list according to an embodiment of the present specification.
  • a control point motion vector difference (CPMVD) corresponding to the difference value is obtained from the encoding device 100 from the decoding device ( 200).
  • an affine MVP candidate list may be configured to derive CPMVs for the current block.
  • the affine MVP candidate list may include at least one of the following candidates.
  • the affine MVP candidate list may include a maximum of n (eg, 2) candidates.
  • the inherited affine candidate is a candidate derived based on the CPMVs of the neighboring block when the neighboring block is coded in the affine mode, and the constructed affine candidate is each CPMV unit.
  • a candidate it is a candidate derived by configuring CPMVs based on the MV of a block adjacent to the corresponding CP, and a zero MV candidate represents a candidate composed of CPMVs whose value is 0.
  • the maximum number of candidates for the affine MVP candidate list is two, in the above order, 2) or less candidates may be considered and added when the number of current candidates is less than two.
  • additional candidates based on Translational MVs from neighboring CUs from neighboring CUs may be derived in the following order.
  • CPMV0 is used as an affine MVP candidate. That is, the MVs of CP0, CP1, and CP2 are all set to be the same as CPMV0 of the constructed candidate.
  • CPMV1 is used as an affine MVP candidate. That is, the MVs of CP0, CP1, and CP2 are all set to be the same as CPMV1 of the constructed candidate.
  • CPMV2 is used as the affine MVP candidate. That is, the MVs of CP0, CP1, and CP2 are all set to be the same as CPMV2 of the constructed candidate.
  • TMVP temporary motion vector predictor or mvCol
  • the affine MVP candidate list may be derived by the procedure shown in FIG. 29.
  • the order of checking inherited MVP candidates is the same as that of the inherited affine merge candidates. The difference is that, for the MVP candidate, only affine CUs having the same reference picture as the current block are considered.
  • the pruning process is not applied.
  • the configured MVP candidate is derived from neighboring blocks shown in FIG. 28.
  • the same confirmation order as the composition of the affine merge candidate is used.
  • reference picture indexes of neighboring blocks are also checked.
  • the first block that is inter-coded in the check order and has the same reference picture as the current CU is used.
  • FIGS. 30A and 30B illustrate examples of spatial neighboring blocks used in adaptive temporal motion vector prediction (ATMVP) and sub-coding block (CU) motion fields derived from spatial neighboring blocks according to an embodiment of the present specification. Shows.
  • ATMVP adaptive temporal motion vector prediction
  • CU sub-coding block
  • Subblock-based temporal motion vector prediction (SbTMVP) method may be used. Similar to temporal motion vector prediction (TMVP), SbTMVP may use a motion field in the co-located picture to improve the motion vector predictor and merge mode for CUs in the current picture. The same co-located picture used by TMVP is used for SbTMVP. SbTMVP differs from TMVP in the following two aspects.
  • TMVP predicts motion at the CU level
  • SbTMVP predicts motion at the sub-CU level
  • TMVP Temporal motion vector
  • SbTMVP retrieves temporal motion information from the co-located picture.
  • Apply motion shift before import where the motion shift is obtained from a motion vector from one of the spatial neighboring blocks of the current CU.
  • the SbTMVP process is shown in Figs. 30A and 30B.
  • SbTMVP predicts motion vectors of sub-CUs in the current CU in two steps.
  • the spatial neighbors in FIG. 30A are examined in the order of A1, B1, B0, and A0.
  • this motion vector is selected to be motion shifted. (As soon as and the first spatial neighboring block that has a motion vector that uses the collocated picture as its reference picture is identified, this motion vector is selected to be the motion shift to be applied). If such motion is not confirmed from spatial surroundings, the motion shift is set to (0, 0).
  • the motion shift identified in the first step is applied to obtain sub-CU level motion information (motion vectors and reference indices) from the co-located picture as shown in FIG. 30B (that is, the current Are added to the block's coordinates).
  • FIG. 30B assumes that a motion shift is set by the motion of block A1.
  • the motion information of the corresponding block (the smallest motion grid covering the center sample) in the co-located picture is used to derive the motion information for the sub-CU.
  • the motion information of the co-located sub-CU is confirmed, it is converted into reference indices and motion vectors of the current sub-CU in a manner similar to the TMVP process, where temporal motion scaling is the reference pictures of the temporal motion vectors. It is applied to be aligned with temporal motion vectors.
  • the combined subblock-based merge list including the SbTMVP candidate and the Rane merge candidate may be used for signaling of the Rane merge mode (which may be referred to as a subblock-based merge mode).
  • the SbTMVP mode may be activated/deactivated by a sequence parameter set (SPS).
  • SPS sequence parameter set
  • the SbTMVP predictor is added as the first entry in the list of subblock-based merge candidates, and affine merge candidates are added later.
  • the maximum allowed size of the affine merge candidate list may be 5.
  • the size of the sub-CU used in SbTMVP is fixed at 8x8, the same is applied to the affine merge mode, and the SbTMVP mode can only be applied to CUs with both width and height greater than or equal to 8.
  • the encoding logic of the additional SbTMVP merge candidate is the same as the other merge candidates, that is, for each CU in the P or B slice, an additional RD (rate-distortion) check is performed to determine whether to use the SbTMVP candidate.
  • AMVR Adaptive Motion Vector Resolution
  • a motion vector difference (between the predicted motion vector and the motion vector of the CU) may be signaled in units of quarter-luma-samples.
  • the CU-level AMVR scheme is introduced.
  • the AMVR may cause the MVD of the CU to be coded in units of 1/4 luminance samples, integer luminance samples, or 4 luminance samples. If the current CU has at least one non-zero MVD component, a CU-level MVD resolution indicator is conditionally signaled. If all MVD components (i.e., horizontal and vertical MVDs for reference list L0 and reference list L1) are 0, then the 1/4 luminance sample MVD resolution is inferred.
  • a first flag is signaled to determine whether 1/4 luminance sample MVD accuracy is applied for that CU. If the first flag is 0, no additional signaling is required and 1/4 luminance sample MVD accuracy is used for the current CU. Otherwise, a second flag is signaled to indicate whether integer luminance samples or 4 luminance samples MVD accuracy is used.
  • the motion vector predictors for the CU have the same accuracy as the motion vector predictors previously added with the MVD. Can be rounded to have Motion vector predictors can be rounded to zero.
  • the encoder determines the motion vector resolution for the current CU using the RD check.
  • the RD check of 4 luminance samples MVD resolution can be called conditionally.
  • the RD cost of 1/4 sample MVD accuracy is calculated first. Then, the RD cost of the integer luminance sample MVD accuracy is compared with the RD cost of the 1/4 luminance sample MVD accuracy in order to determine whether it is necessary to check the RD cost of the 4 luminance sample MVD accuracy. When the RD cost for 1/4 luminance sample MVD accuracy is less than the RD cost for integer luminance sample MVD accuracy, the RD cost of 4 sample MVD accuracy is omitted.
  • motion information of a reference picture previously decoded may be stored in units of a predetermined area. This may be referred to as temporal motion field storage, motion field compression, or motion data compression.
  • the storage unit of motion information may be set differently depending on whether the affine mode is applied. In this case, the one with the highest accuracy among explicitly signaled motion vectors is a quarter-luma-sample.
  • motion vectors are derived at 1/16th-luma-sample precision and motion compensated prediction is performed at 1/16th-sample accuracy.
  • all motion vectors are stored with 1/16 luminance sample accuracy.
  • motion field compression is performed with 8x8 granularity.
  • HMVP history-based MVP
  • TMVP TMVP
  • motion information of a previously coded block is stored in a table and used as an MVP for a current CU.
  • a table composed of multiple HMVP candidates is maintained during the encoding/decoding process. When a new CTU row is used, the table is reset (emptied). When there is a CU coded by inter prediction other than a subblock, related motion information is added to the last entry of the table as a new HMVP candidate.
  • the HMVP table size (S) is set to 6, which means that a maximum of 6 HVMP candidates can be added to the table.
  • a constrained first-in-first-out (FIFO) rule is used.
  • a redundancy check is first performed to check whether an HMVP candidate with the same HMVP candidate to be added exists in the table. If the same HMVP candidate exists, the same existing HMVP candidate is removed from the table and all HMVP candidates are moved in the previous order.
  • HMVP candidates can be used in the merge candidate list construction process.
  • the most recent HMVP candidates are identified in the table, and are inserted into the merge candidate list in the order following the TMVP candidates. Redundancy check for HMVP candidates is applied to spatial or temporal merge candidates.
  • N denotes the number of candidates existing in the merge list
  • M denotes the number of HMVP candidates available in the table.
  • Pair average candidates are generated by an average of predefined pairs of candidates existing in the merge candidate list.
  • the predefined pairs are defined as ⁇ (0, 1), (0, 2), (1, 2), (0, 3), (1, 3), (2, 3) ⁇ , 0, 1 Numbers such as, 2, and 3 are merge indexes in the merge candidate list.
  • the average of motion vectors is calculated individually for each reference list. If both motion vectors are available in one list, the average value of the two motion vectors is used even if the two motion vectors are for different reference pictures. If only one motion vector is available, the available motion vector is used immediately. If there are no motion vectors available, the list is kept invalid.
  • a predicted block for the current block may be derived based on motion information derived according to the prediction mode.
  • the predicted block may include prediction samples (prediction sample array) of the current block.
  • prediction samples prediction sample array
  • an interpolation procedure may be performed.
  • Prediction samples of the current block may be derived from reference samples in units of fractional samples in a reference picture through an interpolation procedure.
  • prediction samples may be generated based on a motion vector in units of samples/subblocks.
  • prediction samples derived based on L0 direction prediction i.e., prediction using a reference picture in an L0 reference picture list and an L0 motion vector
  • L1 prediction i.e., an L1 reference picture list
  • Prediction samples derived through a weighted sum (according to a phase) or a weighted average of prediction samples derived based on prediction using an internal reference picture and an L1 motion vector) may be used as prediction samples of the current block.
  • L0 direction prediction i.e., prediction using a reference picture in an L0 reference picture list and an L0 motion vector
  • L1 prediction i.e., an L1 reference picture list
  • Prediction samples derived through a weighted sum accordinging to a phase
  • a weighted average of prediction samples derived based on prediction using an internal reference picture and an L1 motion vector may be used as prediction samples of the current block.
  • pair prediction when the reference picture used for L0 prediction and the reference picture used for L1 prediction are located in different temporal directions with respect to the
  • reconstructed samples and reconstructed pictures may be generated based on the derived prediction samples, and then procedures such as in-loop filtering may be performed.
  • a prediction sample when pair prediction is applied to a current block, a prediction sample may be derived based on a weighted average.
  • the pair prediction signal ie, pair prediction samples
  • the pair prediction samples may be derived through a simple average or weighted average of the L0 prediction signal (L0 prediction samples) and the L1 prediction signal (L1 prediction samples).
  • the pair prediction samples When the prediction sample derivation by a simple average is applied, the pair prediction samples may be derived as average values of the L0 prediction samples based on the L0 reference picture and the L0 motion vector, and the L1 prediction samples based on the L1 reference picture and the L1 motion vector.
  • a pair prediction signal when pair prediction is applied, a pair prediction signal (pair prediction samples) may be derived through a weighted average of the L0 prediction signal and the L1 prediction signal as shown in Equation 4 below.
  • Equation 4 P bi-pred represents a pair prediction sample value, P 0 represents an L0 prediction sample value, P 1 represents an L0 prediction sample value, and w represents a weight value.
  • weight values (w) may be allowed, and the weight values (w) may be -2, 3, 4, 5, 10.
  • the weight w may be determined by one of two methods.
  • the weight index is signaled after MVD.
  • the weight index is inferred from neighboring blocks based on the merge candidate index.
  • the weighted sum pair prediction can only be applied to CUs with 256 or more luminance samples (CUs whose product of CU width and CU height is greater than or equal to 256). For low-delay pictures, all five weights can be used. For pictures that are not low-latency, only three weights (3, 4, 5) can be used.
  • affine ME motion estimation
  • CIIP can be applied to the current CU.
  • a CU is coded in merge mode
  • the CU contains at least 64 luminance samples (the product of the CU width and the CU height is greater than or equal to 64)
  • an additional flag indicates whether the CIIP mode is applied to the current CU. May be signaled to indicate.
  • the CIIP mode may also be referred to as a multi-hypothesis mode or an inter/intra multiple hypothesis mode.
  • Up to four intra prediction modes including DC, PLANAR, HORIZONTAL, and VERTICAL modes can be used to predict the luminance component in the CIIP mode. If the CU shape is very wide (for example, if the width is more than twice the height), the HORIZONTAL mode is not allowed. If the CU shape is very narrow (ie, the height is more than twice the width), the VERTICAL mode is not allowed. For these cases, three intra prediction modes are allowed.
  • the CIIP mode uses three most probable modes (MPMs) for intra prediction.
  • the CIIP MPM candidate list is formed as follows.
  • intraModeA and intraModeB The prediction modes of block A and block B are named intraModeA and intraModeB, respectively, and are derived as follows.
  • intraModeX is set to DC
  • intraModeX is DC or PLANAR
  • intraModeX is DC or PLANAR
  • intra prediction mode of block X is "vertical-like" directional mode (greater than 34).
  • intraModeX is set to VERTICAL
  • intraModeX is set to HORIZONTAL if the intra-prediction mode of block X is a "horizontal-like" directional mode (mode less than or equal to 34).
  • 3 MPMs are set in the order of ⁇ intraModeA, PLANAR, DC ⁇
  • the first two MPMs are set in the order of ⁇ intraModeA, intraModeB ⁇
  • the MPM flag is inferred as 1 without signaling. Otherwise, an MPM flag for indicating whether the CIIP intra prediction mode is one of the CIIP MPM candidate modes is signaled.
  • the MPM flag is 1, an MPM index indicating which of the MPM candidate modes is used in CIIP intra prediction is additionally signaled. Otherwise, if the MPM flag is 0, the intra prediction mode in the MPM candidate list is set to a "missing" mode. For example, if the PLANAR mode is not in the MPM candidate list, PLANAR becomes the missing mode, and the intra prediction mode is set to PLANAR. Since 4 possible intra prediction modes are allowed in CIIP, the MPM candidate list contains only 3 intra prediction candidates. For color difference components, the DM mode is always applied without additional signaling. That is, the same prediction mode as the luminance component is used for the color difference components. The intra prediction mode of the CU coded with CIIP will be stored and used for intra mode coding of the next neighboring CUs.
  • the inter prediction signal P inter in the CIIP mode is derived using the same inter prediction process applied to the general merge mode, and the intra prediction signal P intra is derived using the CIIP intra prediction according to the intra prediction process. Then, the intra and inter prediction signals are combined using a weighted average, where the weight value depends on the intra prediction mode and where the sample is located in the coding block as follows.
  • the same weight is applied to the intra prediction and inter prediction signals.
  • the weights are determined based on the intra prediction mode (horizontal mode or vertical mode in this case) and the sample position in the block.
  • the horizontal prediction mode will be described as an example (weights for the vertical mode are similar, but can be derived in an orthogonal direction).
  • Set the width of the block to W and the height of the block to H.
  • the coding block is initially divided into 4 co-regional parts, each dimension is (W/4)xH. Starting from the part closest to the intra prediction reference samples and ending the part farthest from the intra prediction samples, the weight wt for each of the four regions is set to 6, 5, 3, and 2.
  • the final CIIP prediction signal may be derived as in Equation 5 below.
  • P CIIP is a CIIP prediction sample value
  • P inter is an inter prediction sample value
  • P intra is an intra prediction sample value
  • wt is a weight
  • IBC may be used for coding a content image/movie, such as a game, such as, for example, screen content coding (SCC).
  • IBC basically performs prediction in the current picture, but can be performed similarly to inter prediction in that it derives a reference block in the current picture. That is, the IBC may use at least one of the inter prediction techniques described in this document.
  • the IBC at least one of the above-described motion information (motion vector) derivation methods may be used.
  • the IBC may refer to the current picture, and thus may be referred to as current picture referencing (CPR).
  • CPR current picture referencing
  • the encoding apparatus 100 may derive an optimal block vector (or motion vector) for a current block (eg, CU) by performing block matching (BM).
  • the derived block vector (or motion vector) may be signaled to the decoding apparatus 200 through a bitstream using a method similar to signaling of block information (motion vector) in the above-described inter prediction.
  • the decoding apparatus 200 may derive a reference block for the current block in the current picture through the signaled block vector (motion vector), and through this, a prediction signal (predicted block or prediction samples) for the current block.
  • the block vector (or motion vector) may represent a displacement from a current block to a reference block located in an already reconstructed area in the current picture.
  • the block vector (or motion vector) may be called a displacement vector.
  • a motion vector may correspond to a block vector or a displacement vector.
  • the motion vector of the current block may include a motion vector for a luma component (a luma motion vector) or a motion vector for a chroma component (a chroma motion vector).
  • the luma motion vector for the IBC coded CU may be in integer sample units (ie, integer precision).
  • the chroma motion vector can also be clipped in units of integer samples.
  • IBC may use at least one of inter prediction techniques. For example, when IBC is applied together with AMVR, 1-pel and 4-pel motion vector precision may be switched.
  • hash-based motion estimation is performed for the IBC.
  • the encoder performs an RD check on blocks whose width or height is not greater than 16 luminance samples.
  • block vector search is performed from hash-based search. If the hash search does not return a valid candidate, a block matching-based local search will be performed.
  • hash key matching 32-bit CRC
  • hash key matching 32-bit CRC
  • the hash key calculation for all positions in the current picture is based on 4x4 subblocks. For a larger sized current block, if all hash keys in all 4x4 subblocks match with hash keys in all corresponding reference positions, the hash key is determined to match the hash key of the reference block. If the hash keys of multiple reference blocks are found to match the hash key of the current block, the block vector costs of each matched reference block are calculated and the one with the least cost is selected.
  • the search range is set to N samples from the left and above of the current block in the current CTU.
  • N is initialized to 128, and if there is at least one temporal reference picture, it is initialized to 64.
  • the hash hit ratio is defined as the percentage of samples in the CTU that found a match using a hash-based search. While encoding the current CTU, if the hash hit rate is less than 5%, N is reduced by half.
  • the IBC mode is signaled using a flag and can be signaled as follows, such as the IBC AMVP mode or the IBC skip/merge mode.
  • 31A and 31B illustrate examples of a video/video encoding method based on an intra block copy (IBC) mode and a prediction unit in the encoding apparatus 100 according to an embodiment of the present specification.
  • IBC intra block copy
  • the encoding apparatus 100 performs IBC prediction (IBC-based prediction) for the current block (S3110).
  • the encoding apparatus 100 may derive a prediction mode and a motion vector of a current block and generate prediction samples of the current block.
  • the prediction mode may include at least one of the above-described inter prediction modes as prediction modes for IBC.
  • a procedure for determining a prediction mode, deriving a motion vector, and generating prediction samples may be performed simultaneously, or one procedure may be performed prior to another procedure.
  • the prediction unit of the encoding apparatus 100 may include a prediction mode determination unit, a motion vector derivation unit, and a prediction sample derivation unit.
  • the prediction mode determination unit determines a prediction mode for the current block, and a motion vector derivation unit At, the motion vector of the current block may be derived, and prediction samples of the current block may be derived by a prediction sample derivation unit.
  • the prediction unit of the encoding apparatus 100 searches for a block similar to the current block in the reconstructed area of the current picture (or a certain area (search area) of the reconstructed area) through block matching (BM), and It is possible to derive a reference block whose difference from the block is less than a minimum or a certain standard.
  • a motion vector can be derived based on the difference in displacement between the reference block and the current block.
  • the encoding apparatus 100 may determine a mode applied to the current block among various prediction modes.
  • the encoding apparatus 100 may compare RD costs based on various prediction modes and determine an optimal prediction mode for the current block.
  • the encoding apparatus 100 configures the above-described merge candidate list, and the current block is matched with the current block among reference blocks indicated by merge candidates included in the merge candidate list. It is possible to derive a reference block whose difference is less than a minimum or a certain standard. In this case, a merge candidate associated with the derived reference block is selected, and merge index information indicating the selected merge candidate may be generated and signaled to the decoding apparatus 200. The motion vector of the current block may be derived using the motion vector of the selected merge candidate.
  • the encoding apparatus 100 configures the above-described (A)MVP candidate list, and (A)motion vector predictor (MVP) candidates included in the MVP candidate list
  • the motion vector of the selected MVP candidate may be used as the MVP of the current block.
  • a motion vector indicating a reference block derived by motion estimation described above may be used as a motion vector of the current block, and among MVP candidates, a motion vector having the smallest difference from the motion vector of the current block is selected.
  • a motion vector difference (MVD) which is a difference obtained by subtracting MVP from the motion vector of the current block, may be derived. In this case, information on the MVD may be signaled to the decoding apparatus 200.
  • the encoding apparatus 100 may derive residual samples based on the prediction samples (S3120).
  • the encoding apparatus 100 may derive residual samples by comparing the original samples of the current block with the prediction samples.
  • the encoding apparatus 100 encodes image information including prediction information and residual information (S3130).
  • the encoding apparatus 100 may output the encoded image information in the form of a bitstream.
  • the prediction information is information related to a prediction procedure, and may include prediction mode information (eg, skip flag, merge flag, or mode index) and information about a motion vector.
  • the information on the motion vector may include candidate selection information (eg, merge index, mvp flag, or mvp index) that is information for deriving the motion vector.
  • the information on the motion vector may include information on the above-described MVD.
  • the information on the motion vector may include information indicating whether L0 prediction, L1 prediction, or bi prediction is applied.
  • the residual information is information about residual samples.
  • the residual information may include information about quantized transform coefficients for residual samples.
  • the output bitstream may be stored in a (digital) storage medium and transmitted to the decoding device, or may be transmitted to the decoding device 200 through a network.
  • the encoding apparatus 100 may generate a reconstructed picture (including reconstructed samples and a reconstructed block) based on reference samples and residual samples. This is because the encoding device derives the same prediction result as that performed by the decoding device 200, and coding efficiency can be improved through this. Accordingly, the encoding apparatus may store the reconstructed area (or reconstructed samples, reconstructed block) of the current picture in a memory and use it as a reference picture for IBC prediction.
  • the video/video decoding procedure based on the IBC and the prediction unit in the decoding apparatus 200 may schematically include, for example, the following.
  • 32A and 32B illustrate an example of a video/video decoding method based on an IBC mode and a prediction unit in the decoding apparatus 200 according to an embodiment of the present specification.
  • the decoding apparatus 200 may perform an operation corresponding to the operation performed by the encoding apparatus 100.
  • the decoding apparatus 200 may perform IBC prediction on the current block and derive prediction samples based on the received prediction information.
  • the decoding apparatus 200 may determine a prediction mode for the current block based on the received prediction information (S3210). The decoding apparatus 200 may determine which prediction mode is applied to the current block based on prediction mode information in the prediction information.
  • the merge mode may be applied to the current block or the (A)MVP mode is determined based on the merge flag.
  • one of various prediction mode candidates may be selected based on a mode index.
  • the prediction mode candidates may include a skip mode, a merge mode, and/or (A)MVP mode, or may include various prediction modes described above.
  • the decoding apparatus 200 derives a motion vector of the current block based on the determined prediction mode (S3220). For example, when the skip mode or the merge mode is applied to the current block, the decoding apparatus 200 may configure the above-described merge candidate list and select one merge candidate from among the merge candidates included in the merge candidate list. have. The selection of the merge candidate may be performed based on the above-described selection information (merge index). The motion vector of the current block may be derived using the motion vector of the selected merge candidate. The motion vector of the selected merge candidate may be used as the motion vector of the current block.
  • the decoding apparatus 200 may configure the above-described merge candidate list and select one merge candidate from among the merge candidates included in the merge candidate list. have.
  • the selection of the merge candidate may be performed based on the above-described selection information (merge index).
  • the motion vector of the current block may be derived using the motion vector of the selected merge candidate.
  • the motion vector of the selected merge candidate may be used as the motion vector of the current block.
  • the decoding apparatus 200 configures the above-described (A)MVP candidate list, and (A) selects MVP candidates from among MVP candidates included in the MVP candidate list.
  • the motion vector can be used as the MVP of the current block.
  • the selection of the MVP candidate may be performed based on the above-described selection information (mvp flag or mvp index).
  • the MVD of the current block may be derived based on the information on the MVD
  • the motion vector of the current block may be derived based on the MVP and the MVD of the current block.
  • motion information of the current block may be derived without configuring a candidate list.
  • a motion vector of the current block may be derived according to a procedure disclosed in a corresponding prediction mode.
  • the configuration of the candidate list as described above may be omitted.
  • the decoding apparatus 200 may generate prediction samples for the current block based on the motion vector of the current block (S3230). Prediction samples of the current block may be derived using samples of the reference block indicated by the motion vector of the current block on the current picture. In this case, a prediction sample filtering procedure may be further performed on all or part of the prediction samples of the current block.
  • the prediction unit of the decoding apparatus 200 may include a prediction mode determination unit, a motion vector derivation unit, and a prediction sample derivation unit, and the prediction mode determination unit determines a prediction mode for the current block based on the received prediction mode information. After determining, the motion vector deriving unit may derive a motion vector of the current block based on information on the received motion vector, and the prediction sample deriving unit may derive the predicted samples of the current block.
  • the decoding apparatus 200 generates residual samples for the current block based on the received residual information (S3240).
  • the decoding apparatus 200 may generate reconstructed samples for the current block based on the prediction samples and the residual samples, and generate a reconstructed picture based on the generated samples (S3250). Thereafter, as described above, an in-loop filtering procedure may be further applied to the reconstructed picture.
  • MVD coding can be used for inter prediction and IBC prediction.
  • Current video coding standards use motion vectors and their motion vector predictors to generate a motion vector difference (MVD).
  • MVD can be defined as the difference between a motion vector and a motion vector predictor. Similar to the motion vector, MVD includes x and y components (first and second components) corresponding to the x and y directions. Once the MVD is determined, the MVD is encoded using entropy techniques.
  • Video standards use MVD as one of the possible ways to achieve compression and search for redundancy in motion vectors.
  • Embodiments for compressing video/video signals use MVD as one of tools for searching for hidden motion.
  • the MVD is decoded before the motion vectors of the coding unit are decoded. Encoding the MVD before encoding the actual motion vectors increases the darkening efficiency and helps to search for redundancy between motion vectors and their predictors.
  • the input to the MVD coding stage at the decoder are coded MVD bins parsed for decoding. Inputs from the encoder to the MVD coding stage are an additional flag (“imv” flag) indicating actual MVD values and resolution for MVD encoding. It is used to determine whether MVD is expressed as 1-pel, 4-pel, or quarter-pel.
  • FIG. 33 shows an example of a flowchart for obtaining motion vector difference (MVD) coding information according to an embodiment of the present specification.
  • the operations of FIG. 33 may be performed by the entropy decoding unit 210 of the decoding apparatus 200.
  • flags (MVD x GR0, MVD y GR0) indicating whether MVD is greater than 0 for horizontal and vertical components are parsed (S3310). Thereafter, the parsed data for the horizontal component is checked to determine whether the x component of the MVD is greater than 0 (ie, whether MVD x GR0 is true) (S3320). If MVD x G ⁇ 0 is true (ie, MVD x GR0 is '1'), a flag (MVD x GR1) indicating whether the horizontal component is greater than 1 is parsed (S3330).
  • MVD x GR0 If MVD x GR0 is not true (MVD x GR0 is '0'), MVD x GR1 data is not parsed. Thereafter, similar procedures are performed for the vertical component (S3340 and S3350). Thereafter, in order to obtain reconstructed MVDs, the MVD data parsed in the order of residual MVD coding (MVD x _Rem_Level and MVD y _Rem_Level) steps (S3360 and SS70) may be additionally processed.
  • MVD x _Rem_Level and MVD y _Rem_Level residual MVD coding
  • FIG. 34A and 34B illustrate examples of flowcharts for obtaining information on x and y components of MVD according to an embodiment of the present specification.
  • FIG. 34A shows an operation of obtaining information for decoding the x component of MVD by the decoder in block MVD x _Rem_Level (S3360) of FIG. 33
  • FIG. 34B shows the y component of MVD in MVD y _Rem_Level (S3370) of FIG. 33 Represents an operation of obtaining information for decoding.
  • the decoder verifies the check MVD x GR0 and (S3410), if the MVD x GR0 is true GR1 MVD x (S3420). If the flag indicating whether the parsed data is greater than 0 (i.e., MVD x GR0) is true, and the flag indicating whether the parsed data is greater than 1 (i.e., MVD x GR1) is true, then the decoder uses MVD x ( Abs-2) is parsed (S3430). In this case, the decoder decodes the bins corresponding to the parsed MVDx components using an Exponential Golomb (EG) code having order 1.
  • EG Exponential Golomb
  • the inputs to EG will be bins containing the absolute value minus 2 (i.e. Abs-2) and 1st order Golomb
  • the sign information is parsed by decoding the bypass bin containing the sign information. If the decoded bypass bin has a value of 1, a negative sign is appended to the decoded MVD x . However, if the decoded bypass bin has a value of 0, the decoded MVD is indicated to have a positive value. If MVD x GR0 is true but MVD x GR1 is not true, this indicates that the absolute value of MVDx is 1, and the decoder parses MVD x Sign (S3440). The code information is parsed and updated. However, if MVD x GR0 is false, the restored MVDx is 0.
  • the decoder checks the check MVD y GR0 and (S3450), if the MVD y GR0 is true MVD y GR1 (S3460). If the flag indicating whether the parsed data is greater than 0 (i.e., MVD y GT0) is true and the flag indicating whether the parsed data is greater than 1 (i.e., MVD y GT1) is true, then the decoder will MVD y ( Abs-2) is parsed (S3470). If MVD y GR0 is true but MVD y GR1 is not true, this indicates that the absolute value of MVDy is 1, and the decoder parses MVD y Sign (S3480).
  • Signed MVD values are encoded at the encoder side. Similar to the decoder, bins indicating whether or not the x and y components are greater than zero by checking the absolute values of the horizontal and vertical components, i.e., MVD x GR0 and MVD y GR0 are encoded. And flags indicating whether the horizontal and vertical components are greater than 1, that is, MVD x Gr1 and MVD y GR1 are encoded. Thereafter, the absolute MVD values are encoded as shown in FIGS. 35A and 35B.
  • 35A and 35B illustrate an example of a flowchart for encoding information on an x component and a y component of an MVD according to an embodiment of the present specification.
  • the horizontal and vertical components are encoded sequentially.
  • the encoder checks whether the absolute value of the horizontal MVD component is greater than 0 (ie, MVD x GR0) and whether the absolute value of the horizontal MVD component is greater than 1 (ie, MVD x GR1) (S3510, S3520 ). If the horizontal MVD component absolute value is greater than 0 and greater than 1, (absolute value-2) is encoded using the EG code having the order 1 (S3530). The sign information is then encoded using the bypass bin. If MVD x GR0 is true and MVD x Gr1 is not true, only code information is encoded (S3540). The same process is performed for the encoding of MVDy.
  • the encoder checks whether the absolute value of the vertical MVD component is greater than 0 (i.e., MVD y GR0) and whether the absolute value of the horizontal MVD component is greater than 1 (i.e., MVD y GR1) (S3550, S3560 ). If the vertical MVD component absolute value is greater than 0 and greater than 1, (absolute value-2) is encoded using an EG code having order 1 (S3570). The sign information is then encoded using the bypass bin. If MVD y GR0 is true and MVD y Gr1 is not true, only code information is encoded (S3580). Table 1 below is a syntax for MVD coding.
  • abs_mvd_greater0_flag [compIdx] indicates whether the compIdx component of the motion vector difference (MVD) is greater than 0.
  • abs_mvd_greater1_flag [compIdx] indicates whether the compIdx component of the motion vector difference (MVD) is greater than 1. If abs_mvd_greater1_flag[ compIdx] does not exist, its value is deduced as 0.
  • abs_mvd_minus2 [compIdx] plus 2 represents the absolute value of the compIdx component of the motion vector difference.
  • abs_mvd_minus2[ compIdx] does not exist, its value is deduced as -1.
  • mvd_sign_flag [compIdx] represents the code of the compIdx component of the motion vector as follows.
  • the variable MvdLX[x0][y0][compIdx] whose X is 0 or 1 represents the difference between the list X vector component to be used and its prediction.
  • Array indices x0 and y0 represent positions (x0, y0) of an upper left luminance sample of a considered coding block with respect to an upper left luminance sample of a picture.
  • the variable MvdCpLX[ x0 ][ y0 ][ cpIdx ][ compIdx] with X equals 0 or 1 is the difference between the list X vector component to be used and its prediction.
  • Array indices x0 and y0 represent positions (x0, y0) of an upper left luminance sample of a considered coding block with respect to an upper left luminance sample of a picture, and an array index cpIdx represents a control point index.
  • Table 2 shows the binarization type and parameters of the syntax element for MVD coding
  • Table 3 shows the bin index of the syntax element for MVD coding.
  • MVD x and MVD y have different characteristics for the IBC case. For example, compared to MVD x , the values of MVD y have a property that is relatively concentrated at zero.
  • Table 4 below is the statistics of MVD for IBC cases.
  • 36A and 36B illustrate examples of statistics of bin values for x and y components of MVD in IBC according to an embodiment of the present specification.
  • the distribution of data between the x and y components is relatively less skewed and asymmetric, and the degree of binding to a specific value is less than that of general MVD. Due to this interpretation, the following embodiments are proposed.
  • flags indicating whether the MVD is greater than 0 for the x component and the y component may be coded using different context modes. That is, abs_mvd_greater0_flag[ 0] and abs_mvd_greater0_flag[ 1] can use different context models, where the x/y component means MVD in the x/y direction. Similarly, flags indicating whether the MVD is greater than 1 for the x component and the y component may use different context models. That is, abs_mvd_greater1_flag[ 0] and abs_mvd_greater1_flag[ 1] can use different context models. Table 5 below shows the allocation of context-coded bins to syntax elements in the context increment (ctxInc).
  • a flag indicating whether the x component of MVD is greater than 0 (abs_mvd_greater0_flag[ 0 ]) and a flag indicating whether the y component of MVD is greater than 0 (abs_mvd_greater0_flag[ 1 ]) are encoded based on different context models. /Can be decoded.
  • another coding method may be used in coding the absolute value of MVD x .
  • the absolute value coding of MVD x can be used by other exponential Golomb parameters such as 2 or 3, which abs_mvd_minus2[ 0] is coded using other exponential Golomb parameters such as 2 or 3. Means it can be.
  • other coding methods can be used for the residual absolute value level of MVD y for the y component.
  • an exponential Golomb parameter such as 2 or 3 may be used, which means that abs_mvd_minus2[ 1] can be coded with an exponential Golomb parameter such as 2 or 3.
  • Table 6 shows an example in which the exponential Golomb parameter 2 is used for abs_mvd_minus2[ ].
  • MVD size information (abs_mvd_minus2[ ]) representing a value obtained by subtracting 2 from the absolute value of MVD may be encoded/decoded based on the exponential Golomb parameter EG2 of order 2.
  • Embodiment 1 and Embodiment 2 described above can be used simultaneously.
  • FIG. 37 illustrates an example in which MVD coding is separately applied when general MVD coding and IBC mode according to an embodiment of the present specification are applied.
  • this embodiment a case in which separate MVD coding is performed for the IBC case and the normal MVD coding is described.
  • a flag indicating whether the MVD x component is greater than 0 and a flag indicating whether the MVD x component is greater than 1 are not used, and the entire MVD x is of order 1, 2, or 3 It can be coded using exponential Golomb. Table 7 below shows an example in which the change is applied.
  • the strikethrough indicates a syntax element that is deleted by the application of this embodiment compared to a normal MVD coding syntax structure.
  • abs_mvd [compIdx] represents an absolute value of a motion vector difference for component compIdx.
  • Table 8 shows the binarization type and parameters of syntax elements for MVD coding in which abs_mvd[] is reflected.
  • the MVD y component and a flag indicating whether it is greater than 0 and 1 may not exist, and the entire MVD y component may be coded using an exponential Golomb of order 1, 2, or 3.
  • one of the components of the MVD is a flag indicating whether the corresponding MVD component is greater than 0, and without a flag indicating whether the corresponding MVD component is greater than 1, the total MVDx or MVDy is an exponent of order 1, 2 or 3 Can be coded using.
  • a flag indicating whether the MVD component is greater than 0 and a flag indicating whether the corresponding MVD component is greater than 1 exist, and the remaining parts may be coded using different exponential Golomb parameters. Table 9 is an example for this case.
  • it may be used for a flag indicating whether the different context model is greater than 0 for the IBC case and the normal case, and a flag indicating whether the MVD component is greater than 1.
  • an exponential Golomb value such as 2 or 3 may be used to code the residual value (absolute value information, sign information) of the MVD.
  • different context models may be used for the x component and the y component for a flag indicating whether the MVD component is greater than 0 and a flag indicating whether the MVD component is greater than 1 in the IBC case. Tables 10 and 11 below show examples of the case according to the present embodiment.
  • FIG. 38 is an example of a flowchart of encoding a video signal for inter prediction according to an embodiment of the present specification.
  • the operations of FIG. 38 may be performed by the inter prediction unit 180 of the encoding apparatus 100 or the processor 510 of the video signal processing apparatus 500.
  • Steps S3810 and S3820 of FIG. 38 may correspond to an example of step S1710 of FIG. 17, and step S3830 of FIG. 38 may correspond to an example of step S1730 of FIG. 17.
  • the encoder determines a motion vector of the current block based on motion prediction, and determines the MVD of the current block based on the motion vector (S3810 and S3820). For example, the encoder determines a motion vector (or block vector) from a reference picture (or current picture) through motion estimation for the current block, and the difference between the determined motion vector and the motion vector of the MVP candidate derived from the MVP candidate list Can be determined as MVD.
  • the encoder encodes MVD coding information related to MVD (S3830).
  • the MVD coding information includes first flag information (eg, abs_mvd_greater0_flag[ ]) indicating whether MVD is greater than a first reference value (eg 0), and the first flag information (eg, abs_mvd_greater0_flag[ ]) is MVD
  • the first component flag information (abs_mvd_greater0_flag[0]) indicating whether the first direction component (eg, x component) of is greater than the first reference value (eg 0) and the second direction component (eg, y component) of the MVD ) Includes second component flag information (abs_mvd_greater0_flag[1]) indicating whether or not is greater than a first reference value (eg, 0).
  • the first component flag information (abs_mvd_greater0_flag[0]) and the second component flag information (abs_m
  • the MVD coding information includes second flag information (eg, abs_mvd_greater1_flag[ ]) indicating whether MVD is greater than a second reference value (eg, 1), MVD size information (eg, abs_mvd_minus2[ ]), and MVD code information (eg, mvd_sign_flag[ ]) may be further included.
  • second flag information eg, abs_mvd_greater1_flag[ ]
  • MVD size information eg, abs_mvd_minus2[ ]
  • MVD code information eg, mvd_sign_flag[ ]
  • the second flag (abs_mvd_greater1_flag[ ]) is obtained based on the first flag information (abs_mvd_greater0_flag[ ]), and the MVD size information (abs_mvd_minus2[ ]) is the first flag information (abs_mvd_greater0_flag[0]) and the second flag information ( It is encoded based on abs_mvd_greater1_flag[ ]), and MVD code information (mvd_sign_flag[ ]) may be encoded based on first flag information (abs_mvd_greater0_flag[ ]). For example, as shown in FIGS.
  • the second flag (abs_mvd_greater1_flag[ ]) is encoded when the first flag information (abs_mvd_greater0_flag[ ]) is true (if 1)
  • MVD size information (abs_mvd_minus2[ ]) is encoded when both the first flag (abs_mvd_greater0_flag[0]) and the second flag information (abs_mvd_greater1_flag[ ]) are true (when 1)
  • the MVD sign information (mvd_sign_flag[ ]) is encoded as the first flag information (abs_mvd_greater0_flag[ ]) can be encoded if true (if 1).
  • the second flag information is a third component flag (abs_mvd_greater0_flag[0]) indicating whether the first direction component (x component) of the MVD is greater than a second reference value (eg, 1).
  • a fourth component flag (abs_mvd_greater0_flag[1]) indicating whether the second direction component (y component) of the MVD is greater than the second reference value (eg, 1).
  • the first MVD size information abs_mvd_minus2[] may be encoded based on an exponential Golomb parameter having a degree of 2 or more.
  • the step of encoding MVD coding information is a step of determining whether the IBC mode is applied to the current block (for example, step S3710 of FIG. 37), and when the IBC mode is applied to the current block, It may include a step of encoding IBC MVD coding information (eg, mvd_coding_IBC( )) (eg, step S3730).
  • the encoding of the IBC MVD coding information includes encoding a first MVD size (eg, abs_mvd[ 0 ]) representing an absolute value of the first direction component (x component) of the MVD, and the second direction component of the MVD.
  • a second component flag (abs_mvd_greater0_flag[ 1 ]) indicating whether the (y component) is greater than a first reference value (eg, 0), and MVD based on the second component flag (abs_mvd_greater0_flag[ 1 ])
  • a fourth component flag (abs_mvd_greater1_flag[ 1 ]) indicating whether a second direction component (y component) of is greater than a second reference value (eg, 1), and a second component flag (abs_mvd_greater0_flag[ 1 ])
  • second MVD size information (abs_mvd_minus2[1]) representing the absolute value minus 2 of the second component of the MVD based on the fourth component flag (abs_mvd_greater1_flag[ 1 ]).
  • the first MVD size information abs_mvd[ 0] may be encoded based on an exponential Golomb parameter having a degree of 2 or more.
  • step S3810 of FIG. 38 may correspond to step S1610 of FIG. 16A
  • step S3820 of FIG. 38 may correspond to an example of step S1620 of FIG. 16A.
  • the decoder acquires MVD coding information (eg, mvd_coding( )) related to MVD for prediction of the current block (S3910).
  • the MVD coding information includes first flag information (eg, abs_mvd_greater0_flag[ ]) indicating whether the MVD is greater than a first reference value (eg 0), and the first flag information includes a first direction component ( Example: First component flag information indicating whether the x component is greater than the first reference value (eg, abs_mvd_greater0_flag[0]) and indicating whether the second direction component (y component) of the MVD is greater than the first reference value
  • the second component flag information eg, abs_mvd_greater0_flag[1] is included.
  • first component flag information (abs_mvd_greater0_flag[0]) and the second component flag information (abs_mvd_greater0_flag[1]) are decoded based on different context models. For example, as shown in Table 6, first component flag information (abs_mvd_greater0_flag[0]) and second component flag information (abs_mvd_greater0_flag[1]) may be decoded based on different bin indexes (binIdx).
  • the MVD coding information includes second flag information indicating whether the MVD is greater than the second reference value (eg, abs_mvd_greater1_flag[ ]), MVD size information (eg, abs_mvd_minus2[ ]), and MVD code information (eg. : mvd_sign_flag[ ]) may be further included.
  • second flag information indicating whether the MVD is greater than the second reference value
  • MVD size information eg, abs_mvd_minus2[ ]
  • MVD code information eg. : mvd_sign_flag[ ]
  • the second flag information (abs_mvd_greater1_flag[ ]) is obtained based on the first flag information (abs_mvd_greater0_flag[ ]), and the MVD size information (abs_mvd_minus2[ ]) is the first flag information (abs_mvd_greater0_flag[ ]) and the second flag information ( It is obtained based on abs_mvd_greater1_flag[ ]), and the sign information (mvd_sign_flag[ ]) of the MVD may be obtained based on the first flag information (abs_mvd_greater0_flag[ ]).
  • the second flag (abs_mvd_greater1_flag[ ]) is obtained when the first flag information (abs_mvd_greater0_flag[ ]) is true (if 1), and the MVD size information (abs_mvd_minus2[ ]) is zero. It is acquired when both the 1 flag (abs_mvd_greater0_flag[0]) and the second flag information (abs_mvd_greater1_flag[ ]) are true (when 1), and the MVD sign information (mvd_sign_flag[ ]) is the first flag information (abs_mvd_greater0_flag[ ]) is true. Case (if 1) can be obtained.
  • the second flag information is a third component flag (abs_mvd_greater0_flag[0]) indicating whether the first direction component (x component) of the MVD is greater than a second reference value (eg, 1).
  • a fourth component flag (abs_mvd_greater0_flag[1]) indicating whether the second direction component (y component) of the MVD is greater than the second reference value (eg, 1).
  • the MVD size information abs_mvd_minus2[] may be decoded based on an exponential Golomb parameter having a degree of 2 or more. For example, as shown in Table 6, MVD size information abs_mvd_minus2[] may be decoded based on the exponential Golomb parameter EG2 of order 2.
  • the step of obtaining MVD coding information is a step of determining whether the IBC mode is applied to the current block (for example, step S3710 of FIG. 37), and when the IBC mode is applied to the current block, IBC It may include a step (eg, step S3730) of obtaining MVD coding information (eg, mvd_coding_IBC( )).
  • the obtaining of the IBC MVD coding information includes obtaining first MVD size information (eg, abs_mvd[ 0 ]) indicating the absolute value of the first direction component (x component) of the MVD, and the second direction of the MVD.
  • first MVD size information eg, abs_mvd[ 0 ]
  • second direction of the MVD e.g., Obtaining a second component flag (abs_mvd_greater0_flag[ 1 ]) indicating whether the component is greater than a first reference value (eg, 0), and a second component of the MVD based on the second component flag (abs_mvd_greater0_flag[ 1 ]).
  • Obtaining a fourth component flag (abs_mvd_greater1_flag[ 1 ]) indicating whether the direction component (y component) is greater than a second reference value (eg, 1), and a second component flag (abs_mvd_greater0_flag[ 1 ]) It may include the step of acquiring second MVD size information (abs_mvd_minus2[1]) indicating the absolute value of the second component of the MVD minus 2 based on the 4 component flag (abs_mvd_greater1_flag[ 1 ]).
  • the first MVD size information abs_mvd[ 0] may be encoded based on an exponential Golomb parameter having a degree of 2 or more.
  • the first MVD size information (abs_mvd[ 0 ]) may be decoded based on the index Golomb parameter EG2 of order 2.
  • the decoder decodes the MVD coding information (S3920).
  • the decoder may obtain the MVD through decoding of the decoded MVD information, and obtain a final motion vector through the sum of the motion vector derived from the MVP candidate.
  • the encoded information (eg, encoded video/video information) derived by the encoding apparatus 100 based on the above-described embodiments of the present specification may be output in a bitstream form.
  • the encoded information may be transmitted or stored in a bitstream form in units of network abstraction layer (NAL) units.
  • NAL network abstraction layer
  • the bitstream may be transmitted over a network or may be stored in a non-transitory digital storage medium.
  • the bitstream is not directly transmitted from the encoding device 100 to the decoding device 200, but may be provided with a streaming/download service through an external server (eg, a content streaming server).
  • the network may include a broadcasting network and/or a communication network
  • the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD.
  • the embodiments described in the present invention may be implemented and performed on a processor, microprocessor, controller, or chip.
  • the functional units illustrated in each drawing may be implemented and executed on a computer, processor, microprocessor, controller, or chip.
  • the video signal processing apparatus 500 may include a memory 520 for storing a video signal, and a processor 510 coupled to the memory 520.
  • the processor 510 determines a motion vector of a current block based on motion prediction, determines a motion vector difference (MVD) of the current block based on the motion vector, and determines the MVD and It is set to encode related MVD coding information.
  • the MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value, and the first flag information indicates whether a first direction component of the MVD is greater than the first reference value. Including the indicated first component flag information and second component flag information indicating whether the second direction component of the MVD is greater than the first reference value, the first component flag information and the second component flag information They are encoded based on different context models.
  • the MVD coding information further includes second flag information indicating whether the MVD is greater than a second reference value, MVD size information, and MVD code information, and the second flag information is the first It is obtained based on flag information, the MVD size information is encoded based on the first flag information and the second flag information, and the MVD code information may be encoded based on the first flag information.
  • the second flag information includes a third component flag indicating whether the first direction component of the MVD is greater than the second reference value, and whether the second direction component of the MVD is greater than the second reference value. It may include a fourth component flag indicating whether or not.
  • the MVD size information may be encoded based on an exponential Golomb parameter having an order of 2 or more.
  • the processor 510 determines whether an intra block copy (IBC) mode is applied to the current block, and when the IBC mode is applied to the current block, the processor 510 encodes IBC MVD coding information. Is set. The processor 510 encodes first MVD size information indicating an absolute value of the first direction component of the MVD, and indicates whether the second direction component of the MVD is greater than the first reference value.
  • IBC intra block copy
  • the first MVD size information may be encoded based on an exponential Golomb parameter having a degree of 2 or more.
  • the processor 510 is configured to obtain MVD coding information related to a motion vector difference (MVD) for prediction of a current block, and to decode the MVD coding information, and the MVD coding information, Includes first flag information indicating whether the MVD is greater than a first reference value, and the first flag information includes a first component flag indicating whether a first direction component of the MVD is greater than the first reference value Information and second component flag information indicating whether the second direction component of the MVD is greater than the first reference value, and the first component flag information and the second component flag information are based on different context models. And decoded.
  • MVD motion vector difference
  • second flag information indicating whether the MVD is greater than a second reference value, information on a size of the first MVD, and information on an MVD code are further included, and the second flag information is the first flag information
  • the MVD size information may be obtained based on the first flag information and the second flag information
  • the MVD code information may be obtained based on the first flag information.
  • the second flag information includes a third component flag indicating whether the first direction component of the MVD is greater than the second reference value, and whether the second direction component of the MVD is greater than the second reference value. It may include a fourth component flag indicating whether or not.
  • the MVD size information may be decoded based on an exponential Golomb parameter having an order of 2 or more.
  • the processor 510 determines whether an intra block copy (IBC) mode is applied to the current block, and when the IBC mode is applied to the current block, the processor 510 provides IBC MVD coding information. It can be set to acquire. In addition, the processor 510 obtains first MVD size information indicating the absolute value of the first direction component of the MVD, and a second component flag indicating whether the second direction component of the MVD is greater than the first reference value.
  • IBC intra block copy
  • second MVD size information indicating the absolute value of the second component of the MVD minus 2 may be obtained.
  • the first MVD size information may be decoded based on an exponential Golomb parameter having an order of 2 or more.
  • the processing method to which the present invention is applied may be produced in the form of a program executed by a computer, and may be stored in a computer-readable recording medium.
  • Multimedia data having a data structure according to the present invention can also be stored in a computer-readable recording medium.
  • the computer-readable recording medium includes all kinds of storage devices and distributed storage devices in which computer-readable data is stored.
  • the computer-readable recording medium includes, for example, Blu-ray disk (BD), universal serial bus (USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical It may include a data storage device.
  • the computer-readable recording medium includes media implemented in the form of a carrier wave (for example, transmission through the Internet).
  • the bitstream generated by the encoding method may be stored in a computer-readable recording medium or transmitted through a wired or wireless communication network.
  • an embodiment of the present invention may be implemented as a computer program product using a program code, and the program code may be executed in a computer according to the embodiment of the present invention.
  • the program code may be stored on a carrier readable by a computer.
  • a non-transitory computer-readable medium stores one or more instructions executed by one or more processors.
  • the one or more instructions determine a motion vector of a current block based on motion prediction for encoding a video signal, determine a motion vector difference (MVD) of the current block based on the motion vector, and the
  • the video signal processing apparatus 500 (or encoding apparatus 100) is controlled to encode MVD coding information related to MVD.
  • the MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value, and the first flag information indicates whether a first direction component of the MVD is greater than the first reference value. Including the indicated first component flag information and second component flag information indicating whether the second direction component of the MVD is greater than the first reference value, the first component flag information and the second component flag information They are encoded based on different context models.
  • the MVD coding information further includes second flag information indicating whether the MVD is greater than a second reference value, size information of the first MVD, and MVD code information, and the second flag information It is obtained based on the first flag information, the MVD size information is encoded based on the first flag information and the second flag information, and the MVD code information may be encoded based on the first flag information. .
  • the second flag information includes a third component flag indicating whether the first direction component of the MVD is greater than the second reference value, and whether the second direction component of the MVD is greater than the second reference value. It may include a fourth component flag indicating whether or not.
  • the MVD size information may be encoded based on an exponential Golomb parameter having an order of 2 or more.
  • one or more instructions determine whether an intra block copy (IBC) mode is applied to the current block, and when the IBC mode is applied to the current block, to encode IBC MVD coding information.
  • the video signal processing device 500 (or the encoding device 100) can be controlled.
  • the one or more instructions encode first MVD size information indicating an absolute value of the first direction component of the MVD, and a second indicating whether the second direction component of the MVD is greater than the first reference value.
  • the video signal processing apparatus 500 may be controlled to encode the second MVD size information indicating the absolute value of the second component of the MVD minus 2 based on the flag.
  • the first MVD size information may be encoded based on an exponential Golomb parameter having a degree of 2 or more.
  • the one or more instructions may include obtaining MVD coding information related to motion vector difference (MVD) for prediction of a current block for decoding a video signal, and decoding the MVD coding information. 500) (or the decoding device 200).
  • the MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value, and the first flag information indicates whether a first direction component of the MVD is greater than the first reference value. Including the indicated first component flag information and second component flag information indicating whether the second direction component of the MVD is greater than the first reference value, the first component flag information and the second component flag information It is decoded based on different context models.
  • the MVD coding information further includes second flag information indicating whether the MVD is greater than a second reference value, MVD size information, and MVD code information, and the second flag information 1 is obtained based on flag information, the size information of the MVD is obtained based on the first flag information and the second flag information, and the MVD code information may be obtained based on the first flag information.
  • the second flag information includes a third component flag indicating whether a first direction component of the MVD is greater than the second reference value, and a second direction component of the MVD is greater than the second reference value.
  • a fourth component flag indicating whether or not it is large may be included.
  • the MVD size information may be decoded based on an exponential Golomb parameter having an order of 2 or more.
  • one or more instructions determine whether an intra block copy (IBC) mode is applied to the current block, and when the IBC mode is applied to the current block, to obtain IBC MVD coding information
  • the video signal processing device 500 (or the encoding device 100) can be controlled.
  • the one or more commands obtain first MVD size information indicating an absolute value of the first direction component of the MVD, and indicate whether the second direction component of the MVD is greater than the first reference value.
  • the video signal processing apparatus 500 may be controlled to obtain second MVD size information indicating the absolute value minus 2 of the second component of the MVD based on the fourth component flag.
  • the first MVD size information may be decoded based on an exponential Golomb parameter having an order of 2 or more.
  • the decoder and encoder to which the present invention is applied include a multimedia broadcasting transmission/reception device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video chat device, a real-time communication device such as video communication, a mobile streaming device, Storage media, camcorders, video-on-demand (VoD) service providers, OTT video (Over the top video) devices, Internet streaming service providers, three-dimensional (3D) video devices, video telephony video devices, and medical video devices. And can be used to process video signals or data signals.
  • an OTT video (Over the top video) device may include a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smartphone, a tablet PC, and a digital video recorder (DVR).
  • an embodiment of the present invention may be implemented by various means, for example, hardware, firmware, software, or a combination thereof.
  • an embodiment of the present invention is one or more ASICs (application specific integrated circuits), DSPs (digital signal processors), DSPDs (digital signal processing devices), PLDs (programmable logic devices), FPGAs ( field programmable gate arrays), processors, controllers, microcontrollers, microprocessors, etc.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGAs field programmable gate arrays
  • processors controllers, microcontrollers, microprocessors, etc.
  • an embodiment 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 a memory and driven by a processor.
  • the memory may be located inside or outside the processor, and may exchange data with the processor through various known means.

Abstract

Embodiments of the present specification provide methods of encoding and decoding a video signal for inter prediction. A decoding method according to an embodiment of the present specification comprises the steps of: obtaining motion vector difference (MVD) coding information related to a MVD for prediction of a current block; and decoding the MVD coding information. The MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value, the first flag information includes first component flag information indicating whether a first direction component of the MVD is greater than the first reference value, and second component flag information indicating whether a second direction component of the MVD is greater than the first reference value, and the first component flag information and the second component flag information are decoded on the basis of different context models from each other. The coding efficiency of the MVD can be increased by performing encoding/decoding by reflecting characteristics according to the components of the MVD and applying different context models according to the components of the MVD.

Description

인터 예측을 위한 비디오 신호의 처리 방법 및 장치Video signal processing method and apparatus for inter prediction
본 명세서의 실시예는 비디오/영상 압축 코딩 시스템에 관한 것으로서, 보다 구체적으로 비디오 신호의 인코딩/디코딩 과정에서 인터 예측(inter prediction)을 수행하기 위한 방법 및 장치에 관한 것이다.Embodiments of the present specification relate to a video/video compression coding system, and more particularly, to a method and apparatus for performing inter prediction in an encoding/decoding process of a video signal.
압축 부호화는 디지털화된 정보를 통신 회선을 통해 전송하거나, 저장 매체에 적합한 형태로 저장하기 위한 일련의 신호 처리 기술을 의미한다. 영상, 이미지, 음성 등의 미디어가 압축 부호화의 대상이 될 수 있으며, 특히 영상을 대상으로 압축 부호화를 수행하는 기술을 비디오 영상 압축이라고 일컫는다.Compression coding refers to a series of signal processing techniques for transmitting digitized information through a communication line or storing it in a format suitable for a storage medium. Media such as video, image, and audio may be subject to compression encoding. In particular, a technique for performing compression encoding on an image is referred to as video image compression.
차세대 비디오 컨텐츠는 고해상도(high spatial resolution), 고 프레임 율(high frame rate) 및 영상 표현의 고차원화(high dimensionality of scene representation)라는 특징을 갖게 될 것이다. 그러한 컨텐츠를 처리하기 위해서는 메모리 저장(memory storage), 메모리 액세스율(memory access rate) 및 처리 전력(processing power) 측면에서 엄청난 증가를 가져올 것이다.Next-generation video content will be characterized by high spatial resolution, high frame rate, and high dimensionality of scene representation. In order to process such content, it will bring a tremendous increase in terms of memory storage, memory access rate, and processing power.
인터 예측(inter prediction)은 다른 픽처의 복원된 샘플들을 참조하여 현재 픽처에 대한 예측을 수행하는 방법이다. 인터 예측의 효율을 증대시키기 위하여, 새로운 인터 예측 기법과 함께 다양한 움직임 벡터 유도 방법이 논의되고 있다. Inter prediction is a method of performing prediction on a current picture by referring to reconstructed samples of another picture. In order to increase the efficiency of inter prediction, various motion vector derivation methods along with new inter prediction techniques have been discussed.
또한, 엔트로피 코딩은 비디오 신호의 코딩 과정에서 결정된 신택스 엘레먼트(데이터)를 압축함으로써 비트스트림을 출력하거나, 비트스트림으로부터 신택스 엘레먼트를 출력하는 방법이다. 마찬가지로, 인터 예측과 관련된 정보의 효율적인 엔트로피 인코딩/디코딩을 위한 기법들이 논의되고 있다.In addition, entropy coding is a method of outputting a bitstream or outputting a syntax element from the bitstream by compressing a syntax element (data) determined in a video signal coding process. Similarly, techniques for efficient entropy encoding/decoding of information related to inter prediction are being discussed.
본 명세서의 실시예는 인터 예측을 위한 정보의 인코딩/디코딩 과정에서 MVD(motion vector difference) 코딩 정보를 효율적으로 인코딩/디코딩하기 위한 방법 및 장치를 제공한다.An embodiment of the present specification provides a method and apparatus for efficiently encoding/decoding motion vector difference (MVD) coding information in a process of encoding/decoding information for inter prediction.
본 명세서의 실시예에서 이루고자 하는 기술적 과제들은 이상에서 언급한 기술적 과제들로 제한되지 않으며, 언급하지 않은 또 다른 기술적 과제들은 아래의 기재로부터 본 명세서의 실시예가 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.The technical problems to be achieved in the embodiments of the present specification are not limited to the technical problems mentioned above, and other technical problems that are not mentioned are those of ordinary skill in the technical field to which the embodiments of the present specification belong from the following description. Will be clearly understood.
본 명세서의 실시예들은 인터 예측(inter prediction)을 위한 비디오 신호의 인코딩 및 디코딩 방법을 제공한다. 본 명세서의 실시예에 따른 비디오 신호의 디코딩 방법은, 현재 블록의 예측을 위한 MVD(motion vector difference)와 관련된 MVD 코딩 정보를 획득하는 단계와, 상기 MVD 코딩 정보를 디코딩하는 단계를 포함한다. 상기 MVD 코딩 정보는, 상기 MVD가 제1 기준 값보다 큰지 여부를 지시하는 제1 플래그 정보를 포함하고, 상기 제1 플래그 정보는 상기 MVD의 제1 방향 성분이 상기 제1 기준 값 보다 큰지 여부를 지시하는 제1 성분 플래그 정보 및 상기 MVD의 제2 방향 성분이 상기 제1 기준 값보다 큰지 여부를 지시하는 제2 성분 플래그 정보를 포함하고, 상기 제1 성분 플래그 정보와 상기 제2 성분 플래그 정보는 서로 다른 컨텍스트 모델에 기반하여 디코딩될 수 있다.Embodiments of the present specification provide a method of encoding and decoding a video signal for inter prediction. A method of decoding a video signal according to an embodiment of the present specification includes obtaining MVD coding information related to motion vector difference (MVD) for prediction of a current block, and decoding the MVD coding information. The MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value, and the first flag information indicates whether a first direction component of the MVD is greater than the first reference value. Including the indicated first component flag information and second component flag information indicating whether the second direction component of the MVD is greater than the first reference value, the first component flag information and the second component flag information It can be decoded based on different context models.
일 실시예에서, 상기 MVD 코딩 정보는, 상기 MVD가 제2 기준 값보다 큰지 여부를 지시하는 제2 플래그 정보, MVD 크기 정보, 및 MVD 부호 정보를 더 포함하고, 상기 제2 플래그 정보는 상기 제1 플래그 정보에 기반하여 획득되고, 상기 MVD 크기 정보는 상기 제1 플래그 정보 및 상기 제2 플래그 정보에 기반하여 획득되며, 상기 MVD 부호 정보는 상기 제1 플래그 정보에 기반하여 획득될 수 있다.In one embodiment, the MVD coding information further includes second flag information indicating whether the MVD is greater than a second reference value, MVD size information, and MVD code information, and the second flag information 1 is obtained based on flag information, the MVD size information is obtained based on the first flag information and the second flag information, and the MVD code information may be obtained based on the first flag information.
일 실시예에서, 상기 제2 플래그 정보는, 상기 MVD의 제1 방향 성분이 상기 제2 기준 값보다 큰지 여부를 지시하는 제3 성분 플래그 및 상기 MVD의 제2 방향 성분이 상기 제2 기준 값보다 큰지 여부를 지시하는 제4 성분 플래그를 포함할 수 있다.In one embodiment, the second flag information includes a third component flag indicating whether a first direction component of the MVD is greater than the second reference value, and a second direction component of the MVD is greater than the second reference value. A fourth component flag indicating whether or not it is large may be included.
일 실시예에서, 상기 MVD 크기 정보는 2 이상의 차수를 갖는 지수 골롬(exponential Golomb) 파라미터에 기반하여 디코딩될 수 있다.In an embodiment, the MVD size information may be decoded based on an exponential Golomb parameter having an order of 2 or more.
일 실시예에서, 상기 MVD 코딩 정보를 획득하는 단계는, 상기 현재 블록에 IBC(intra block copy) 모드가 적용되는지 여부를 결정하는 단계와, 상기 현재 블록에 상기 IBC 모드가 적용되는 경우, IBC MVD 코딩 정보를 획득하는 단계를 포함할 수 있다. 상기 IBC MVD 코딩 정보를 획득하는 단계는, 상기 MVD의 제1 방향 성분의 절대 값을 나타내는 제1 MVD 크기 정보를 획득하는 단계와, 상기 MVD의 제2 방향 성분이 상기 제1 기준 값보다 큰지 여부를 지시하는 상기 제2 성분 플래그를 획득하는 단계와, 상기 제2 성분 플래그에 기반하여 상기 MVD의 제2 방향 성분이 제2 기준 값보다 큰지 여부를 지시하는 제4 성분 플래그를 획득하는 단계와, 상기 제2 성분 플래그 및 상기 제4 성분 플래그에 기반하여 상기 MVD의 제2 성분의 절대 값 빼기 2를 나타내는 제2 MVD 크기 정보를 획득하는 단계를 포함할 수 있다.In one embodiment, the obtaining of the MVD coding information includes determining whether an intra block copy (IBC) mode is applied to the current block, and when the IBC mode is applied to the current block, IBC MVD It may include the step of obtaining coding information. The obtaining of the IBC MVD coding information includes obtaining first MVD size information indicating an absolute value of the first direction component of the MVD, and whether the second direction component of the MVD is greater than the first reference value. Acquiring the second component flag indicating the second component flag, and obtaining a fourth component flag indicating whether a second direction component of the MVD is greater than a second reference value based on the second component flag; and And obtaining second MVD size information indicating an absolute value minus 2 of the second component of the MVD based on the second component flag and the fourth component flag.
일 실시예에서, 상기 제1 MVD 크기 정보는 2 이상의 차수를 갖는 지수 골롬(exponential Golomb) 파라미터에 기반하여 디코딩될 수 있다.In an embodiment, the first MVD size information may be decoded based on an exponential Golomb parameter having an order of 2 or more.
본 명세서의 실시예에 따른 비디오 신호의 인코딩 방법은, 움직임 예측에 기반하여 현재 블록의 움직임 벡터를 결정하는 단계와, 상기 움직임 벡터에 기반하여 상기 현재 블록의 MVD(motion vector difference)를 결정하는 단계와, 상기 MVD와 관련된 MVD 코딩 정보를 인코딩하는 단계를 포함한다. 상기 MVD 코딩 정보는, 상기 MVD가 제1 기준 값보다 큰지 여부를 지시하는 제1 플래그 정보를 포함하고, 상기 제1 플래그 정보는 상기 MVD의 제1 방향 성분이 상기 제1 기준 값 보다 큰지 여부를 지시하는 제1 성분 플래그 정보 및 상기 MVD의 제2 방향 성분이 상기 제1 기준 값보다 큰지 여부를 지시하는 제2 성분 플래그 정보를 포함하고, 상기 제1 성분 플래그 정보와 상기 제2 성분 플래그 정보는 서로 다른 컨텍스트 모델에 기반하여 인코딩된다.A video signal encoding method according to an embodiment of the present specification includes determining a motion vector of a current block based on motion prediction, and determining a motion vector difference (MVD) of the current block based on the motion vector. And encoding MVD coding information related to the MVD. The MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value, and the first flag information indicates whether a first direction component of the MVD is greater than the first reference value. Including the indicated first component flag information and second component flag information indicating whether the second direction component of the MVD is greater than the first reference value, the first component flag information and the second component flag information They are encoded based on different context models.
일 실시예에서, 상기 MVD 코딩 정보는 상기 MVD가 제2 기준 값보다 큰지 여부를 지시하는 제2 플래그 정보, MVD 크기 정보, 및 MVD 부호 정보를 더 포함하고, 상기 제2 플래그 정보는 상기 제1 플래그 정보에 기반하여 획득되고, 상기 MVD 크기 정보는 상기 제1 플래그 정보 및 상기 제2 플래그 정보에 기반하여 인코딩되며, 상기 MVD 부호 정보는 상기 제1 플래그 정보에 기반하여 인코딩될 수 있다.In one embodiment, the MVD coding information further includes second flag information indicating whether the MVD is greater than a second reference value, MVD size information, and MVD code information, and the second flag information is the first It is obtained based on flag information, the MVD size information is encoded based on the first flag information and the second flag information, and the MVD code information may be encoded based on the first flag information.
일 실시예에서, 상기 제2 플래그 정보는, 상기 MVD의 제1 방향 성분이 상기 제2 기준 값보다 큰지 여부를 지시하는 제3 성분 플래그 및 상기 MVD의 제2 방향 성분이 상기 제2 기준 값보다 큰지 여부를 지시하는 제4 성분 플래그를 포함할 수 있다.In one embodiment, the second flag information includes a third component flag indicating whether a first direction component of the MVD is greater than the second reference value, and a second direction component of the MVD is greater than the second reference value. A fourth component flag indicating whether or not it is large may be included.
일 실시예에서, 상기 MVD 크기 정보는 2 이상의 차수를 갖는 지수 골롬(exponential Golomb) 파라미터에 기반하여 인코딩될 수 있다.In an embodiment, the MVD size information may be encoded based on an exponential Golomb parameter having an order of 2 or more.
일 실시예에서, 상기 MVD 코딩 정보를 인코딩하는 단계는, 상기 현재 블록에 IBC(intra block copy) 모드가 적용되는지 여부를 결정하는 단계와, 상기 현재 블록에 상기 IBC 모드가 적용되는 경우, IBC MVD 코딩 정보를 인코딩하는 단계를 포함할 수 있다. 상기 IBC MVD 코딩 정보를 인코딩하는 단계는, 상기 MVD의 제1 방향 성분의 절대 값을 나타내는 제1 MVD 크기 정보를 인코딩하는 단계와, 상기 MVD의 제2 방향 성분이 상기 제1 기준 값보다 큰지 여부를 지시하는 상기 제2 성분 플래그를 인코딩하는 단계와, 상기 제2 성분 플래그에 기반하여 상기 MVD의 제2 방향 성분이 상기 제2 기준 값보다 큰지 여부를 지시하는 상기 제4 성분 플래그를 인코딩하는 단계와, 상기 제2 성분 플래그 및 상기 제4 성분 플래그에 기반하여 상기 MVD의 제2 성분의 절대 값 빼기 2를 나타내는 제2 MVD 크기 정보를 인코딩할 수 있다.In one embodiment, the encoding of the MVD coding information includes determining whether an intra block copy (IBC) mode is applied to the current block, and when the IBC mode is applied to the current block, IBC MVD It may include encoding the coding information. The encoding of the IBC MVD coding information includes: encoding first MVD size information indicating an absolute value of a first direction component of the MVD, and whether a second direction component of the MVD is greater than the first reference value. Encoding the second component flag indicating to, and encoding the fourth component flag indicating whether a second direction component of the MVD is greater than the second reference value based on the second component flag. And, based on the second component flag and the fourth component flag, second MVD size information indicating the absolute value of the second component of the MVD minus 2 may be encoded.
일 실시예에서, 상기 제1 MVD 크기 정보는 2 이상의 차수를 갖는 지수 골롬(exponential Golomb) 파라미터에 기반하여 인코딩될 수 있다.In an embodiment, the first MVD size information may be encoded based on an exponential Golomb parameter having a degree of 2 or more.
본 명세서의 실시예에 따른 인터 예측을 위한 비디오 신호의 인코딩 장치는, 상기 비디오 신호를 저장하는 메모리와, 상기 메모리와 결합된 프로세서를 포함한다. 상기 프로세서는 움직임 예측에 기반하여 현재 블록의 움직임 벡터를 결정하고, 상기 움직임 벡터에 기반하여 상기 현재 블록의 MVD(motion vector difference)를 결정하고, 상기 MVD와 관련된 MVD 코딩 정보를 인코딩하도록 설정된다. 상기 MVD 코딩 정보는, 상기 MVD가 제1 기준 값보다 큰지 여부를 지시하는 제1 플래그 정보를 포함하고, 상기 제1 플래그 정보는 상기 MVD의 제1 방향 성분이 상기 제1 기준 값 보다 큰지 여부를 지시하는 제1 성분 플래그 정보 및 상기 MVD의 제2 방향 성분이 상기 제1 기준 값보다 큰지 여부를 지시하는 제2 성분 플래그 정보를 포함하고, 상기 제1 성분 플래그 정보와 상기 제2 성분 플래그 정보는 서로 다른 컨텍스트 모델에 기반하여 인코딩된다.An apparatus for encoding a video signal for inter prediction according to an embodiment of the present specification includes a memory for storing the video signal and a processor coupled to the memory. The processor is configured to determine a motion vector of a current block based on motion prediction, determine a motion vector difference (MVD) of the current block based on the motion vector, and encode MVD coding information related to the MVD. The MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value, and the first flag information indicates whether a first direction component of the MVD is greater than the first reference value. Including the indicated first component flag information and second component flag information indicating whether the second direction component of the MVD is greater than the first reference value, the first component flag information and the second component flag information They are encoded based on different context models.
본 명세서의 실시예에 따른 인터 예측을 위한 비디오 신호의 디코딩 장치는, 상기 비디오 신호를 저장하는 메모리와, 상기 메모리와 결합된 프로세서를 포함한다. 상기 프로세서는, 움직임 예측에 기반하여 현재 블록의 움직임 벡터를 결정하고, 상기 움직임 벡터에 기반하여 상기 현재 블록의 MVD(motion vector difference)를 결정하고, 상기 MVD와 관련된 MVD 코딩 정보를 인코딩하도록 설정되고, 상기 MVD 코딩 정보는, 상기 MVD가 제1 기준 값보다 큰지 여부를 지시하는 제1 플래그 정보를 포함하고, 상기 제1 플래그 정보는 상기 MVD의 제1 방향 성분이 상기 제1 기준 값 보다 큰지 여부를 지시하는 제1 성분 플래그 정보 및 상기 MVD의 제2 방향 성분이 상기 제1 기준 값보다 큰지 여부를 지시하는 제2 성분 플래그 정보를 포함하고, 상기 제1 성분 플래그 정보와 상기 제2 성분 플래그 정보는 서로 다른 컨텍스트 모델에 기반하여 인코딩된다. A video signal decoding apparatus for inter prediction according to an embodiment of the present specification includes a memory for storing the video signal and a processor coupled with the memory. The processor is configured to determine a motion vector of a current block based on motion prediction, determine a motion vector difference (MVD) of the current block based on the motion vector, and encode MVD coding information related to the MVD, , The MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value, and the first flag information is whether a first direction component of the MVD is greater than the first reference value. And second component flag information indicating whether a second direction component of the MVD is greater than the first reference value, and the first component flag information and the second component flag information Are encoded based on different context models.
본 명세서의 실시예는 하나 또는 그 이상의 명령어들을 저장하는 비일시적 컴퓨터 판독가능한 매체(non-transitory computer-readable medium)를 제공한다. 하나 또는 그 이상의 프로세서들에 의해 실행되는 상기 하나 또는 그 이상의 명령어들은, 비디오 신호 처리 장치로 하여금, 현재 블록의 예측을 위한 MVD(motion vector difference)와 관련된 MVD 코딩 정보를 획득하고, 상기 MVD 코딩 정보를 디코딩하도록 제어한다. 상기 MVD 코딩 정보는, 상기 MVD가 제1 기준 값보다 큰지 여부를 지시하는 제1 플래그 정보를 포함하고, 상기 제1 플래그 정보는 상기 MVD의 제1 방향 성분이 상기 제1 기준 값 보다 큰지 여부를 지시하는 제1 성분 플래그 정보 및 상기 MVD의 제2 방향 성분이 상기 제1 기준 값보다 큰지 여부를 지시하는 제2 성분 플래그 정보를 포함하고, 상기 제1 성분 플래그 정보와 상기 제2 성분 플래그 정보는 서로 다른 컨텍스트 모델에 기반하여 디코딩된다.An embodiment of the present specification provides a non-transitory computer-readable medium storing one or more instructions. The one or more instructions executed by one or more processors enable a video signal processing apparatus to obtain MVD coding information related to a motion vector difference (MVD) for prediction of a current block, and the MVD coding information Control to decode The MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value, and the first flag information indicates whether a first direction component of the MVD is greater than the first reference value. Including the indicated first component flag information and second component flag information indicating whether the second direction component of the MVD is greater than the first reference value, the first component flag information and the second component flag information It is decoded based on different context models.
상기 하나 또는 그 이상의 명령어들은, 움직임 예측에 기반하여 현재 블록의 움직임 벡터를 결정하고, 상기 움직임 벡터에 기반하여 상기 현재 블록의 MVD(motion vector difference)를 결정하고, 상기 MVD와 관련된 MVD 코딩 정보를 인코딩하도록 비디오 신호 처리 장치를 제어한다. 상기 MVD 코딩 정보는, 상기 MVD가 제1 기준 값보다 큰지 여부를 지시하는 제1 플래그 정보를 포함하고, 상기 제1 플래그 정보는 상기 MVD의 제1 방향 성분이 상기 제1 기준 값 보다 큰지 여부를 지시하는 제1 성분 플래그 정보 및 상기 MVD의 제2 방향 성분이 상기 제1 기준 값보다 큰지 여부를 지시하는 제2 성분 플래그 정보를 포함하고, 상기 제1 성분 플래그 정보와 상기 제2 성분 플래그 정보는 서로 다른 컨텍스트 모델에 기반하여 인코딩된다.The one or more instructions determine a motion vector of a current block based on motion prediction, determine a motion vector difference (MVD) of the current block based on the motion vector, and determine MVD coding information related to the MVD. Control the video signal processing device to encode. The MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value, and the first flag information indicates whether a first direction component of the MVD is greater than the first reference value. Including the indicated first component flag information and second component flag information indicating whether the second direction component of the MVD is greater than the first reference value, the first component flag information and the second component flag information They are encoded based on different context models.
본 명세서의 실시예에 따르면, MVD(motion vector difference) 코딩 정보를 구성하는 각 성분의 특성에 따라 엔트로피 코딩 기법을 적용함으로써 인터 예측(inter prediction)에 필요한 정보의 데이터 량과 코딩 복잡도/시간을 감소시킬 수 있다.According to an embodiment of the present specification, the amount of data and coding complexity/time of information required for inter prediction are reduced by applying an entropy coding technique according to the characteristics of each component constituting MVD (motion vector difference) coding information. I can make it.
본 명세서의 실시예에서 얻을 수 있는 효과는 이상에서 언급한 효과로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 명세서의 실시예가 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.The effects obtained in the embodiments of the present specification are not limited to the above-mentioned effects, and other effects not mentioned are clearly to those of ordinary skill in the art to which the embodiments of the present specification belong from the following description. It will be understandable.
본 명세서에 관한 이해를 돕기 위해 상세한 설명의 일부로 포함되는, 첨부 도면은 본 명세서에 대한 실시예를 제공하고, 상세한 설명과 함께 본 명세서의 기술적 특징을 설명한다.The accompanying drawings, which are included as part of the detailed description to aid in understanding of the present specification, provide embodiments of the present specification, and describe technical features of the present specification together with the detailed description.
도 1은 본 명세서의 실시예에 따른 영상 코딩 시스템의 예를 도시한다.1 shows an example of an image coding system according to an embodiment of the present specification.
도 2는 본 명세서의 실시예에 따른 비디오 신호의 인코딩이 수행되는 인코딩 장치의 개략적인 블록도의 예를 도시한다.2 shows an example of a schematic block diagram of an encoding apparatus in which encoding of a video signal is performed according to an embodiment of the present specification.
도 3은 본 명세서의 실시예에 따른 영상 신호의 디코딩이 수행되는 디코딩 장치의 개략적인 블록도의 예를 도시한다.3 shows an example of a schematic block diagram of a decoding apparatus for decoding an image signal according to an embodiment of the present specification.
도 4는 본 명세서의 실시예에 따른 컨텐츠 스트리밍 시스템의 예를 도시한다.4 shows an example of a content streaming system according to an embodiment of the present specification.
도 5는 본 명세서의 실시예에 따른 비디오 신호 처리 장치의 예를 도시한다.5 shows an example of a video signal processing apparatus according to an embodiment of the present specification.
도 6은 본 명세서의 실시예에 따른 픽처의 분할 구조의 예를 도시한다.6 illustrates an example of a picture division structure according to an embodiment of the present specification.
도 7a 내지 도 7d는 본 명세서의 실시예에 따른 블록 분할 구조의 예를 도시한다.7A to 7D illustrate an example of a block division structure according to an embodiment of the present specification.
도 8은 본 명세서의 실시예에 따른 TT(ternary tree) 및 BT(binary tree) 분할이 제한되는 경우의 예를 도시한다.8 shows an example of a case in which the ternary tree (TT) and the binary tree (BT) are divided according to an embodiment of the present specification.
도 9는 본 명세서의 실시예에 따른 엔트로피 인코딩을 위한 블록도이다.9 is a block diagram for entropy encoding according to an embodiment of the present specification.
도 10a 및 도 10b는 본 명세서의 실시예에 따른 엔트로피 인코딩 방법 및 관련 컴포넌트를 도시한다.10A and 10B illustrate an entropy encoding method and related components according to an embodiment of the present specification.
도 11a 및 도 11b는 본 명세서의 실시예에 따른 엔트로피 디코딩 방법 및 관련 컴포넌트를 도시한다.11A and 11B illustrate an entropy decoding method and related components according to an embodiment of the present specification.
도 12는 본 명세서의 실시예에 따른 비디오 신호를 구성하는 픽처의 인코딩을 위한 흐름도의 예이다.12 is an example of a flowchart for encoding a picture constituting a video signal according to an embodiment of the present specification.
도 13은 본 명세서의 실시예에 따른 비디오 신호를 구성하는 픽처의 디코딩을 위한 흐름도의 예이다.13 is an example of a flowchart for decoding a picture constituting a video signal according to an embodiment of the present specification.
도 14는 본 명세서의 실시예에 따른 코딩된 영상에 대한 계층 구조의 예를 도시한다.14 illustrates an example of a hierarchical structure for a coded image according to an embodiment of the present specification.
도 15a 및 도 15b는 본 명세서의 실시예에 따른 인터 예측에 기반한 비디오/영상 인코딩 방법 및 인코딩 장치 내 인터 예측부를 도시한다.15A and 15B illustrate a video/video encoding method based on inter prediction and an inter prediction unit in an encoding apparatus according to an embodiment of the present specification.
도 16a 및 도 16b는 본 명세서의 실시예에 따른 인터 예측에 기반한 비디오/영상 디코딩 방법 및 디코딩 장치 내 인터 예측부를 도시한다.16A and 16B illustrate a video/video decoding method based on inter prediction and an inter prediction unit in a decoding apparatus according to an embodiment of the present specification.
도 17은 본 명세서의 실시예에 따른 인터 예측 절차를 도시한다.17 illustrates an inter prediction procedure according to an embodiment of the present specification.
도 18은 본 명세서의 실시예에 따른 공간적 머지 후보로서 사용되는 공간적 주변 블록들의 예를 도시한다.18 illustrates examples of spatial neighboring blocks used as spatial merge candidates according to an embodiment of the present specification.
도 19는 본 명세서의 실시예에 따른 머지 후보 리스트를 구성하기 위한 흐름도의 예이다.19 is an example of a flowchart for configuring a merge candidate list according to an embodiment of the present specification.
도 20은 본 명세서의 실시예에 따른 MVP(motion vector predictor) 후보 리스트를 구성하기 위한 흐름도의 예이다.20 is an example of a flowchart for configuring a motion vector predictor (MVP) candidate list according to an embodiment of the present specification.
도 21은 본 명세서의 실시예에 따른 SMVD(symmetric motion vector difference) 모드가 적용되는 경우의 예를 도시한다.21 illustrates an example in which a symmetric motion vector difference (SMVD) mode according to an embodiment of the present specification is applied.
도 22는 본 명세서의 실시예에 따른 어파인 움직임 모델(affine motion model)들의 예를 도시한다.22 illustrates an example of affine motion models according to an embodiment of the present specification.
도 23a 및 도 23b는 본 명세서의 실시예에 따른 제어점(control point)별 움직임 벡터의 예를 도시한다.23A and 23B illustrate examples of motion vectors for each control point according to an embodiment of the present specification.
도 24는 본 명세서의 실시예에 따른 각 서브블록에 대한 움직임 벡터의 예를 도시한다.24 shows an example of a motion vector for each subblock according to an embodiment of the present specification.
도 25는 본 명세서의 실시예에 따른 어파인 머지 후보 리스트를 구성하기 위한 흐름도의 예이다.25 is an example of a flowchart for configuring an affine merge candidate list according to an embodiment of the present specification.
도 26은 본 명세서의 실시예에 따른 상속된(inherited) 어파인 움직임 예측자를 유도하기 위한 블록들의 예를 도시한다.26 illustrates an example of blocks for deriving an inherited affine motion predictor according to an embodiment of the present specification.
도 27은 본 명세서의 실시예에 따른 상속된 어파인 움직임 예측자를 유도하기 위한 제어점 움직임 벡터들의 예를 도시한다.27 illustrates an example of control point motion vectors for deriving an inherited affine motion predictor according to an embodiment of the present specification.
도 28은 본 명세서의 실시예에 따른 구성된(constructed) 어파인 머지 후보를 유도하기 위한 블록들의 예를 도시한다.28 shows examples of blocks for deriving a constructed affine merge candidate according to an embodiment of the present specification.
도 29는 본 명세서의 실시예에 따른 어파인 MVP 후보 리스트를 구성하기 위한 흐름도의 예이다.29 is an example of a flowchart for configuring an affine MVP candidate list according to an embodiment of the present specification.
도 30a 및 도 30b는 본 명세서의 실시예에 따른 ATMVP(adaptive temporal motion vector prediction)에서 사용되는 공간적 주변 블록들과 공간적 주변 블록으로부터 도출된 서브(sub)-CU(coding block) 움직임 필드의 예를 도시한다. 30A and 30B illustrate examples of spatial neighboring blocks used in adaptive temporal motion vector prediction (ATMVP) and sub-coding block (CU) motion fields derived from spatial neighboring blocks according to an embodiment of the present specification. Shows.
도 31a 및 도 31b는 본 명세서의 실시예에 따른 IBC(intra block copy) 모드에 기반한 비디오/영상 인코딩 방법과 인코딩 장치 내 예측부의 예를 도시한다.31A and 31B illustrate an example of a video/video encoding method based on an intra block copy (IBC) mode and a prediction unit in an encoding apparatus according to an embodiment of the present specification.
도 32a 및 도 32b는 본 명세서의 실시예에 따른 IBC 모드에 기반한 비디오/영상 디코딩 방법과 디코딩 장치 내 예측부의 예를 도시한다.32A and 32B illustrate examples of a video/video decoding method based on an IBC mode and a prediction unit in a decoding apparatus according to an embodiment of the present specification.
도 33은 본 명세서의 실시예에 따른 MVD(motion vector difference) 코딩 정보를 획득하기 위한 흐름도의 예를 도시한다.33 shows an example of a flowchart for obtaining motion vector difference (MVD) coding information according to an embodiment of the present specification.
도 34a 및 도 34b는 본 명세서의 실시예에 따른 MVD의 x 성분과 y 성분에 대한 정보를 획득하기 위한 흐름도의 예를 도시한다.34A and 34B illustrate examples of flowcharts for obtaining information on x and y components of MVD according to an embodiment of the present specification.
도 35a 및 도 35b는 본 명세서의 실시예에 따른 MVD의 x 성분과 y 성분에 대한 정보를 인코딩하기 위한 흐름도의 예를 도시한다.35A and 35B illustrate an example of a flowchart for encoding information on an x component and a y component of an MVD according to an embodiment of the present specification.
도 36a 및 도 36b는 본 명세서의 실시예에 따른 MVD의 x 성분과 y 성분에 대한 빈(bin) 값의 통계의 예를 도시한다.36A and 36B illustrate examples of statistics of bin values for x and y components of MVD according to an embodiment of the present specification.
도 37은 본 명세서의 실시예에 따른 일반적인 MVD 코딩과 IBC 모드가 적용된 경우 MVD 코딩이 별도로 적용되는 경우의 예를 도시한다.37 illustrates an example in which MVD coding is separately applied when general MVD coding and IBC mode according to an embodiment of the present specification are applied.
도 38은 본 명세서의 실시예에 따른 인터 예측을 위한 비디오 신호의 인코딩 흐름도의 예이다.38 is an example of a flowchart of encoding a video signal for inter prediction according to an embodiment of the present specification.
도 39는 본 명세서의 실시예에 따른 인터 예측을 위한 비디오 신호의 디코딩 흐름도의 예이다.39 is an example of a flowchart of decoding a video signal for inter prediction according to an embodiment of the present specification.
이하, 본 발명에 따른 바람직한 실시 형태를 첨부된 도면을 참조하여 상세하게 설명한다. 첨부된 도면과 함께 이하에 개시될 상세한 설명은 본 발명의 예시적인 실시형태를 설명하고자 하는 것이며, 본 발명이 실시될 수 있는 유일한 실시형태를 나타내고자 하는 것이 아니다. 이하의 상세한 설명은 본 발명의 완전한 이해를 제공하기 위해서 구체적 세부사항을 포함한다. 그러나, 당업자는 본 발명이 이러한 구체적 세부사항 없이도 실시될 수 있음을 안다. Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. The detailed description to be disclosed hereinafter together with the accompanying drawings is intended to describe exemplary embodiments of the present invention, and is not intended to represent the only embodiments in which the present invention may be practiced. The following detailed description includes specific details to provide a thorough understanding of the present invention. However, one of ordinary skill in the art appreciates that the invention may be practiced without these specific details.
몇몇 경우, 본 발명의 개념이 모호해지는 것을 피하기 위하여 공지의 구조 및 장치는 생략되거나, 각 구조 및 장치의 핵심기능을 중심으로 한 블록도 형식으로 도시될 수 있다. In some cases, in order to avoid obscuring the concept of the present invention, well-known structures and devices may be omitted, or may be shown in a block diagram form centering on core functions of each structure and device.
아울러, 본 발명에서 사용되는 용어는 가능한 한 현재 널리 사용되는 일반적인 용어를 선택하였으나, 특정한 경우는 출원인이 임의로 선정한 용어를 사용하여 설명한다. 그러한 경우에는 해당 부분의 상세 설명에서 그 의미를 명확히 기재하므로, 본 발명의 설명에서 사용된 용어의 명칭만으로 단순 해석되어서는 안 될 것이며 그 해당 용어의 의미까지 파악하여 해석되어야 함을 밝혀두고자 한다.In addition, as for terms used in the present invention, general terms that are currently widely used are selected as far as possible, but specific cases will be described using terms arbitrarily selected by the applicant. In such a case, since the meaning of the term is clearly described in the detailed description of the corresponding part, it should not be interpreted simply by the name of the term used in the description of the present invention, and it should be clarified that the meaning of the term should be understood and interpreted. .
이하의 설명에서 사용되는 특정 용어들은 본 발명의 이해를 돕기 위해서 제공된 것이며, 이러한 특정 용어의 사용은 본 발명의 기술적 사상을 벗어나지 않는 범위에서 다른 형태로 변경될 수 있다. 예를 들어, 신호, 데이터, 샘플, 픽처, 프레임, 블록 등의 경우 각 코딩 과정에서 적절하게 대체되어 해석될 수 있을 것이다.Specific terms used in the following description are provided to aid understanding of the present invention, and the use of these specific terms may be changed in other forms without departing from the technical spirit of the present invention. For example, signals, data, samples, pictures, frames, blocks, etc. may be appropriately replaced and interpreted in each coding process.
이하 본 명세서에서 '처리 유닛'은 예측, 변환 및/또는 양자화 등과 같은 인코딩/디코딩의 처리 과정이 수행되는 단위를 의미한다. 또한, 처리 유닛은 휘도(luma) 성분에 대한 단위와 색차(chroma) 성분에 대한 단위를 포함하는 의미로 해석될 수 있다. 예를 들어, 처리 유닛은 블록(block), 코딩 유닛(coding unit, CU), 예측 유닛(prediction unit, PU) 또는 변환 유닛(transform unit, TU)에 해당될 수 있다. Hereinafter, in this specification, a'processing unit' means a unit in which an encoding/decoding process such as prediction, transformation, and/or quantization is performed. Also, the processing unit may be interpreted as including a unit for a luma component and a unit for a chroma component. For example, the processing unit may correspond to a block, a coding unit (CU), a prediction unit (PU), or a transform unit (TU).
또한, 처리 유닛은 휘도 성분에 대한 단위 또는 색차 성분에 대한 단위로 해석될 수 있다. 예를 들어, 처리 유닛은 휘도 성분에 대한 코딩 트리 블록(coding tree block, CTB), 코딩 블록(coding block, CB), PU 또는 변환 블록(transform block, TB)에 해당될 수 있다. 또는, 처리 유닛은 색차 성분에 대한 CTB, CB, PU 또는 TB에 해당할 수 있다. 또한, 이에 한정되는 것은 아니며 처리 유닛은 휘도 성분에 대한 단위와 색차 성분에 대한 단위를 포함하는 의미로 해석될 수도 있다. Further, the processing unit may be interpreted as a unit for a luminance component or a unit for a color difference component. For example, the processing unit may correspond to a coding tree block (CTB), a coding block (CB), a PU, or a transform block (TB) for a luminance component. Alternatively, the processing unit may correspond to CTB, CB, PU or TB for the color difference component. Further, the present invention is not limited thereto, and the processing unit may be interpreted as including a unit for a luminance component and a unit for a color difference component.
또한, 처리 유닛은 반드시 정사각형의 블록으로 한정되는 것은 아니며, 3개 이상의 꼭지점을 가지는 다각형 형태로 구성될 수도 있다. Further, the processing unit is not necessarily limited to a square block, and may be configured in a polygonal shape having three or more vertices.
또한, 이하 본 명세서에서 픽셀 또는 화소 등을 샘플로 통칭한다. 그리고, 샘플을 이용한다는 것은 픽셀 값 또는 화소 값 등을 이용한다는 것을 의미할 수 있다. In addition, in the present specification, pixels or pixels are collectively referred to as samples. In addition, using a sample may mean using a pixel value or a pixel value.
도 1은 본 명세서의 실시예에 따른 영상 코딩 시스템의 예를 도시한다. 영상 코딩 시스템은 소스 디바이스(10) 및 수신 디바이스(20)를 포함할 수 있다. 소스 디바이스(10)는 인코딩된 비디오/영상 정보 또는 데이터를 파일 또는 스트리밍 형태로 디지털 저장매체 또는 네트워크를 통하여 수신 디바이스(20)로 전달할 수 있다. 1 shows an example of an image coding system according to an embodiment of the present specification. The image coding system may include a source device 10 and a reception device 20. The source device 10 may transmit the encoded video/video information or data in a file or streaming format to the receiving device 20 through a digital storage medium or a network.
소스 디바이스(10)는 비디오 소스(11), 인코딩 장치(12), 송신기(13)를 포함할 수 있다. 수신 디바이스(20)는 수신기(21), 디코딩 장치(22) 및 렌더러(23)를 포함할 수 있다. 인코딩 장치(12)는 비디오/영상 인코딩 장치로 지칭될 수 있고, 디코딩 장치(22)는 비디오/영상 디코딩 장치로 지칭될 수 있다. 송신기(13)는 인코딩 장치(12)에 포함될 수 있다. 수신기(21)는 디코딩 장치(22)에 포함될 수 있다. 렌더러(23)는 디스플레이부를 포함할 수도 있고, 디스플레이부는 별개의 디바이스 또는 외부 컴포넌트로 구성될 수도 있다. The source device 10 may include a video source 11, an encoding device 12, and a transmitter 13. The receiving device 20 may include a receiver 21, a decoding device 22 and a renderer 23. The encoding device 12 may be referred to as a video/image encoding device, and the decoding device 22 may be referred to as a video/image decoding device. The transmitter 13 may be included in the encoding device 12. The receiver 21 may be included in the decoding device 22. The renderer 23 may include a display unit, and the display unit may be configured as a separate device or an external component.
비디오 소스(11)는 비디오/영상의 캡쳐, 합성 또는 생성 과정을 통하여 비디오/영상을 획득할 수 있다. 비디오 소스(11)는 비디오/영상 캡쳐 디바이스 및/또는 비디오/영상 생성 디바이스를 포함할 수 있다. 비디오/영상 캡쳐 디바이스는 예를 들어, 하나 이상의 카메라, 이전에 캡쳐된 비디오/영상을 포함하는 비디오/영상 아카이브를 포함할 수 있다. 비디오/영상 생성 디바이스는 예를 들어 컴퓨터, 태블릿(tablet) 및 스마트폰을 포함할 수 있으며 (전자적으로) 비디오/영상을 생성할 수 있다. 예를 들어, 컴퓨터를 통하여 가상의 비디오/영상이 생성될 수 있으며, 이 경우 관련 데이터가 생성되는 과정으로 비디오/영상 캡쳐 과정이 갈음될 수 있다.The video source 11 may acquire a video/image through a process of capturing, synthesizing, or generating a video/image. The video source 11 may include a video/image capturing device and/or a video/image generating device. The video/image capturing device may include, for example, one or more cameras, and a video/image archive including previously captured video/images. Video/image generating devices may include, for example, computers, tablets, and smartphones, and may (electronically) generate video/images. For example, a virtual video/image may be generated through a computer, and in this case, a video/image capturing process may be substituted as a process of generating related data.
인코딩 장치(12)는 입력 비디오/영상을 인코딩할 수 있다. 인코딩 장치(12)는 압축 및 코딩 효율을 위하여 예측, 변환, 양자화와 같은 일련의 절차를 수행할 수 있다. 인코딩된 데이터(인코딩된 비디오/영상 정보)는 비트스트림(bitstream) 형태로 출력될 수 있다.The encoding device 12 may encode an input video/video. The encoding apparatus 12 may perform a series of procedures such as prediction, transformation, and quantization for compression and coding efficiency. The encoded data (encoded video/video information) may be output in the form of a bitstream.
송신기(13)는 비트스트림 형태로 출력된 인코딩된 비디오/영상 정보 또는 데이터를 파일 또는 스트리밍 형태로 디지털 저장매체 또는 네트워크를 통하여 수신 디바이스(20)의 수신기(21)로 전달할 수 있다. 디지털 저장 매체는 USB(universal serial bus), SD 카드(secure digital card), CD(compact disc), DVD(digital versatile disc), 블루레이 디스크(blu-ray disc), HDD(hard disk drive), SSD(solid state drive)와 같은 다양한 저장 매체를 포함할 수 있다. 송신기(13)는 미리 정해진 파일 포맷을 통해 미디어 파일을 생성하기 위한 엘레먼트를 포함할 수 있고, 방송/통신 네트워크를 통한 전송을 위한 엘레멘트를 포함할 수 있다. 수신기(21)는 비트스트림을 추출하여 디코딩 장치(22)로 전달할 수 있다.The transmitter 13 may transmit the encoded video/video information or data output in the form of a bitstream to the receiver 21 of the receiving device 20 through a digital storage medium or a network in a file or streaming form. Digital storage media include USB (universal serial bus), SD card (secure digital card), CD (compact disc), DVD (digital versatile disc), Blu-ray disc, HDD (hard disk drive), SSD (solid state drive) may include a variety of storage media. The transmitter 13 may include an element for generating a media file through a predetermined file format, and may include an element for transmission through a broadcast/communication network. The receiver 21 may extract the bitstream and transmit it to the decoding device 22.
디코딩 장치(22)는 인코딩 장치(12)의 동작에 대응하는 역양자화, 역변환, 예측과 같은 일련의 절차를 수행함으로써 비디오/영상을 디코딩할 수 있다. The decoding device 22 may decode the video/video by performing a series of procedures such as inverse quantization, inverse transformation, and prediction corresponding to the operation of the encoding device 12.
렌더러(23)는 디코딩된 비디오/영상을 렌더링할 수 있다. 렌더링된 비디오/영상은 디스플레이부를 통하여 디스플레이 될 수 있다.The renderer 23 may render the decoded video/image. The rendered video/image may be displayed through the display unit.
도 2는 본 명세서의 실시예에 따른 비디오 신호의 인코딩이 수행되는 인코딩 장치의 개략적인 블록도의 예를 도시한다. 도 2의 인코딩 장치(100)는 도 1의 인코딩 장치(12)에 대응할 수 있다.2 shows an example of a schematic block diagram of an encoding apparatus in which encoding of a video signal is performed according to an embodiment of the present specification. The encoding device 100 of FIG. 2 may correspond to the encoding device 12 of FIG. 1.
도 2를 참조하면, 인코딩 장치(100)는 영상 분할부(image partitioning module)(110), 감산부(subtraction module)(115), 변환부(transform module)(120), 양자화부(quantization module)(130), 역양자화부(de-quantization module)(140), 역변환부(inverse-transform module)(150), 가산부(addition module)(155), 필터링부(filtering module)(160), 메모리(memory)(170), 인터 예측부(inter prediction module)(180), 인트라 예측부(intra prediction module)(185), 및 엔트로피 인코딩부(entropy encoding module)(190)를 포함할 수 있다. 인터 예측부(180) 및 인트라 예측부(185)를 합쳐서 예측부라고 불릴 수 있다. 즉, 예측부는 인터 예측부(180) 및 인트라 예측부(185)를 포함할 수 있다. 변환부(120), 양자화부(130), 역양자화부(140), 역변환부(150)는 레지듀얼(residual) 처리부에 포함될 수 있다. 레지듀얼 처리부는 감산부(115)를 더 포함할 수도 있다. 상술한 영상 분할부(110), 감산부(115), 변환부(120), 양자화부(130), 역양자화부(140), 역변환부(150), 가산부(155), 필터링부(160), 인터 예측부(180), 인트라 예측부(185) 및 엔트로피 인코딩부(190)는 실시예에 따라 하나의 하드웨어 컴포넌트(예를 들어 인코더 또는 프로세서)에 의하여 구성될 수 있다. 또한 메모리(170)는 DPB(decoded picture buffer)(175)를 포함할 수 있고, 디지털 저장 매체에 의하여 구성될 수도 있다.Referring to FIG. 2, the encoding apparatus 100 includes an image partitioning module 110, a subtraction module 115, a transform module 120, and a quantization module. (130), a de-quantization module (140), an inverse-transform module (150), an addition module (155), a filtering module (160), a memory A (memory) 170, an inter prediction module 180, an intra prediction module 185, and an entropy encoding module 190 may be included. The inter prediction unit 180 and the intra prediction unit 185 may be collectively referred to as a prediction unit. That is, the prediction unit may include an inter prediction unit 180 and an intra prediction unit 185. The transform unit 120, the quantization unit 130, the inverse quantization unit 140, and the inverse transform unit 150 may be included in a residual processing unit. The residual processing unit may further include a subtraction unit 115. The above-described image segmentation unit 110, subtraction unit 115, transform unit 120, quantization unit 130, inverse quantization unit 140, inverse transform unit 150, addition unit 155, filtering unit 160 ), the inter prediction unit 180, the intra prediction unit 185, and the entropy encoding unit 190 may be configured by one hardware component (eg, an encoder or a processor) according to an embodiment. In addition, the memory 170 may include a decoded picture buffer (DPB) 175 and may be configured by a digital storage medium.
영상 분할부(110)는 인코딩 장치(100)에 입력된 입력 영상(또는, 픽처, 프레임)를 하나 이상의 처리 유닛(processing unit)으로 분할할 수 있다. 예를 들어, 처리 유닛은 코딩 유닛(CU)으로 지칭될 수 있다. 이 경우 코딩 유닛은 코딩 트리 유닛(coding tree unit, CTU) 또는 최대 코딩 유닛(largest coding unit, LCU)으로부터 QTBT (Quad-tree binary-tree) 구조에 따라 재귀적으로(recursively) 분할될 수 있다. 예를 들어, 하나의 코딩 유닛은 쿼드 트리 구조 및/또는 바이너리 트리 구조를 기반으로 하위(deeper) 뎁스의 복수의 코딩 유닛들로 분할될 수 있다. 이 경우 예를 들어 쿼드 트리 구조가 먼저 적용되고 바이너리 트리 구조가 나중에 적용될 수 있다. 또는 바이너리 트리 구조가 먼저 적용될 수도 있다. 더 이상 분할되지 않는 최종 코딩 유닛을 기반으로 본 명세서의 실시예에 따른 코딩 절차가 수행될 수 있다. 이 경우 영상 특성에 따른 코딩 효율에 기반하여 최대 코딩 유닛이 바로 최종 코딩 유닛으로 사용될 수 있다. 또한, 필요에 따라 코딩 유닛은 재귀적으로 보다 하위 뎁스의 코딩 유닛들로 분할됨으로써 최적의 사이즈를 갖는 코딩 유닛이 최종 코딩 유닛으로 사용될 수 있다. 여기서 코딩 절차라 함은 후술되는 예측, 변환, 및 복원과 같은 절차를 포함할 수 있다. 다른 예로, 처리 유닛은 예측 유닛(prediction unit, PU) 또는 변환 유닛(transform unit, TU)을 더 포함할 수 있다. 이 경우 예측 유닛 및 변환 유닛은 각각 상술한 코딩 유닛으로부터 분할될 수 있다. 예측 유닛은 샘플 예측의 단위일 수 있고, 변환 유닛은 변환 계수를 유도하는 단위 또는 변환 계수로부터 레지듀얼 신호(residual signal)를 유도하는 단위일 수 있다. The image segmentation unit 110 may divide an input image (or picture, frame) input to the encoding apparatus 100 into one or more processing units. For example, the processing unit may be referred to as a coding unit (CU). In this case, the coding unit may be recursively partitioned from a coding tree unit (CTU) or a largest coding unit (LCU) according to a quad-tree binary-tree (QTBT) structure. For example, one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad tree structure and/or a binary tree structure. In this case, for example, a quad tree structure may be applied first and a binary tree structure may be applied later. Alternatively, the binary tree structure may be applied first. A coding procedure according to an embodiment of the present specification may be performed based on a final coding unit that is no longer divided. In this case, the maximum coding unit may be directly used as the final coding unit based on coding efficiency according to image characteristics. Further, if necessary, the coding unit is recursively divided into coding units of a lower depth, so that a coding unit having an optimal size may be used as a final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration described below. As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may be divided from the above-described coding units, respectively. The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for inducing a transform coefficient or a unit for inducing a residual signal from the transform coefficient.
본 문서에서 사용되는 용어 '유닛(unit)'은 경우에 따라서 '블록(block)' 또는 '영역(area)'과 같은 용어와 혼용될 수 있다. 본 문서에서, MxN 블록은 M개의 열과 N개의 행으로 이루어진 샘플들 또는 변환 계수(transform coefficient)들의 집합을 나타낼 수 있다. 샘플은 일반적으로 픽셀 또는 픽셀의 값을 나타낼 수 있으며, 휘도(luma) 성분의 픽셀/픽셀값을 나타낼 수도 있고, 채도(chroma) 성분의 픽셀/픽셀 값을 나타낼 수도 있다. 샘플은 하나의 픽처(또는 영상)을 픽셀(pixel) 또는 펠(pel)에 대응하는 용어로서 사용될 수 있다.The term "unit" used in this document may be used interchangeably with terms such as "block" or "area" in some cases. In this document, the MxN block may represent a set of samples or transform coefficients consisting of M columns and N rows. A sample may generally represent a pixel or a value of a pixel, may represent a pixel/pixel value of a luminance component, or a pixel/pixel value of a saturation component. A sample may be used as a term corresponding to one picture (or image) as a pixel or pel.
인코딩 장치(100)는 입력 영상 신호(원본 블록, 원본 샘플 어레이)에서 인터 예측부 (180) 또는 인트라 예측부(185)로부터 출력된 예측 신호(예측된 블록, 예측 샘플 어레이)를 감산함으로써 레지듀얼 신호(residual signal, 잔여 블록, 잔여 샘플 어레이)를 생성할 수 있다. 생성된 레지듀얼 신호는 변환부(120)로 전송된다. 이 경우 도시된 바와 같이 인코딩 장치(100) 내에서 입력 영상 신호(원본 블록, 원본 샘플 어레이)에서 예측 신호(예측 블록, 예측 샘플 어레이)를 감산하는 유닛은 감산부(115)로 지칭될 수 있다. 예측부는 처리 대상 블록(이하, 현재 블록이라 함)에 대한 예측을 수행하고, 현재 블록에 대한 예측 샘플들을 포함하는 예측된 블록(predicted block)을 생성할 수 있다. 예측부(prediction module)는 CU 단위로 인트라 예측이 적용되는지 또는 인터 예측이 적용되는지 결정할 수 있다. 예측부는 각 예측모드에 대한 설명에서 후술하는 바와 같이 예측 모드 정보와 같이 예측에 관한 정보를 생성하고, 예측에 관한 정보를 엔트로피 인코딩부(190)로 전달할 수 있다. 예측에 관한 정보는 엔트로피 인코딩부(190)에서 인코딩되고, 비트스트림 형태로 출력될 수 있다. The encoding apparatus 100 subtracts a prediction signal (predicted block, prediction sample array) output from the inter prediction unit 180 or the intra prediction unit 185 from the input video signal (original block, original sample array) A signal (residual signal, residual block, residual sample array) may be generated. The generated residual signal is transmitted to the conversion unit 120. In this case, as illustrated, a unit that subtracts the prediction signal (prediction block, prediction sample array) from the input image signal (original block, original sample array) in the encoding apparatus 100 may be referred to as a subtraction unit 115. . The prediction unit may perform prediction on a block to be processed (hereinafter, referred to as a current block) and generate a predicted block including prediction samples for the current block. The prediction module may determine whether intra prediction or inter prediction is applied on a per CU basis. The prediction unit may generate information about prediction, such as prediction mode information, as described later in the description of each prediction mode, and may transmit information about prediction to the entropy encoding unit 190. Information about prediction is encoded by the entropy encoding unit 190 and may be output in the form of a bitstream.
인트라 예측부(185)는 현재 픽처 내의 샘플들을 참조하여 현재 블록을 예측할 수 있다. 참조되는 샘플들은 예측 모드에 따라 현재 블록의 주변(neighbor)에 위치할 수 있고, 또는 떨어져서 위치할 수도 있다. 인트라 예측에서 예측 모드들은 복수의 비방향성 모드와 복수의 방향성 모드를 포함할 수 있다. 비방향성 모드는 예를 들어 DC 모드 및 플래너 모드(Planar 모드)를 포함할 수 있다. 방향성 모드는 예측 방향의 세밀한 정도에 따라 예를 들어 33개의 방향성 예측 모드 또는 65개의 방향성 예측 모드를 포함할 수 있다. 다만, 이는 예시로서 설정에 따라 그 이상 또는 그 이하의 개수의 방향성 예측 모드들이 사용될 수 있다. 인트라 예측부(185)는 주변 블록에 적용된 예측 모드를 이용하여, 현재 블록에 적용되는 예측 모드를 결정할 수도 있다.The intra prediction unit 185 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the vicinity of the current block or may be located away from each other according to the prediction mode. In intra prediction, prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The non-directional mode may include, for example, a DC mode and a planar mode (Planar mode). The directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes according to a detailed degree of the prediction direction. However, this is an example, and more or less directional prediction modes may be used depending on the setting. The intra prediction unit 185 may determine a prediction mode applied to the current block by using the prediction mode applied to the neighboring block.
인터 예측부(180)는 참조 픽처 상에서 움직임 벡터에 의해 특정되는 참조 블록(참조 샘플 어레이)을 기반으로, 현재 블록에 대한 예측된 블록을 유도할 수 있다. 이때, 인터 예측 모드에서 전송되는 움직임 정보의 양을 감소시키기 위해 인터 예측부(180)는 주변 블록과 현재 블록 간의 움직임 정보의 상관성에 기초하여 움직임 정보를 블록, 서브블록, 또는 샘플 단위로 예측할 수 있다. 움직임 정보는 움직임 벡터 및 참조 픽처 인덱스를 포함할 수 있다. 움직임 정보는 인터 예측 방향(L0 예측, L1 예측, Bi 예측 등) 정보를 더 포함할 수 있다. 인터 예측의 경우, 주변 블록은 현재 픽처 내에 존재하는 공간적 주변 블록(spatial neighboring block)과 참조 픽처에 존재하는 시간적 주변 블록(temporal neighboring block)을 포함할 수 있다. 참조 블록을 포함하는 참조 픽처와 시간적 주변 블록을 포함하는 참조 픽처는 동일할 수도 있고, 다를 수도 있다. 시간적 주변 블록은 동일 위치 참조 블록(collocated reference block), 동일 위치 CU(colCU)로 지칭될 수 있으며, 시간적 주변 블록을 포함하는 참조 픽처는 동일 위치 픽처(collocated picture, colPic)로 지칭될 수 있다. 예를 들어, 인터 예측부(180)는 주변 블록들의 움직임 정보에 기반하여 움직임 정보 후보 리스트를 구성하고, 현재 블록의 움직임 벡터 및/또는 참조 픽처 인덱스를 도출하기 위하여 어떤 후보가 사용되는지를 지시하는 정보를 생성할 수 있다. 다양한 예측 모드에 기반하여 인터 예측이 수행될 수 있으며, 예를 들어 스킵 모드와 머지 모드가 사용되는 경우, 인터 예측부(180)는 주변 블록의 움직임 정보를 현재 블록의 움직임 정보로서 이용할 수 있다. 스킵 모드의 경우, 머지 모드와 달리 레지듀얼 신호가 전송되지 않는다. 움직임 벡터 예측(motion vector prediction, MVP) 모드의 경우, 주변 블록의 움직임 벡터를 움직임 벡터 예측자(motion vector predictor)로 이용하고, 움직임 벡터 차분(motion vector difference, MVD)을 시그널링함으로써 현재 블록의 움직임 벡터를 지시할 수 있다.The inter prediction unit 180 may derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on the reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the inter prediction unit 180 may predict motion information in units of blocks, subblocks, or samples based on the correlation between motion information between neighboring blocks and the current block. have. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring block may include a spatial neighboring block existing in the current picture and a temporal neighboring block existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be referred to as a collocated reference block or a colCU (colCU), and a reference picture including the temporal neighboring block may be referred to as a collocated picture (colPic). For example, the inter prediction unit 180 constructs a motion information candidate list based on motion information of neighboring blocks, and indicates which candidate is used to derive a motion vector and/or a reference picture index of the current block. Can generate information. Inter prediction may be performed based on various prediction modes. For example, when a skip mode and a merge mode are used, the inter prediction unit 180 may use motion information of a neighboring block as motion information of a current block. In the case of the skip mode, unlike the merge mode, a residual signal is not transmitted. In the case of motion vector prediction (MVP) mode, a motion vector of a neighboring block is used as a motion vector predictor and a motion vector difference (MVD) is signaled to move the current block. Vector can be indicated.
예측부는 후술되는 다양한 예측 방법을 기반으로 예측 신호(예측 샘플)를 생성할 수 있다. 예를 들어, 예측부는 하나의 블록에 대한 예측을 위하여 인트라 예측 또는 인터 예측을 적용할 수 있을 뿐만 아니라, 인트라 예측과 인터 예측을 함께(동시에) 적용할 수 있다. 이는 CIIP(combined inter and intra prediction)으로 지칭될 수 있다. 또한, 예측부는 블록에 대한 예측을 위하여 IBC(intra block copy)를 수행할 수도 있다. IBC는, 예를 들어, SCC(screen content coding)와 같이 컨텐츠(예: 게임) 영상/동영상 코딩을 위하여 사용될 수 있다. 또한, IBC는 CPR(current picture referencing)로 지칭될 수도 있다. IBC는 기본적으로 현재 픽처 내에서 예측을 수행하나 현재 픽처 내에서 참조 블록을 도출하는 점에서 인터 예측과 유사하게 수행될 수 있다. 즉, IBC는 본 문서에서 설명되는 인터 예측 기법들 중 적어도 하나를 이용할 수 있다.The prediction unit may generate a prediction signal (prediction sample) based on various prediction methods described later. For example, the prediction unit may not only apply intra prediction or inter prediction to predict one block, but also apply intra prediction and inter prediction together (simultaneously). This may be referred to as CIIP (combined inter and intra prediction). Also, the prediction unit may perform intra block copy (IBC) to predict a block. IBC may be used for content (eg, game) video/video coding, such as, for example, screen content coding (SCC). Also, IBC may be referred to as CPR (current picture referencing). IBC basically performs prediction in the current picture, but can be performed similarly to inter prediction in that it derives a reference block in the current picture. That is, the IBC may use at least one of the inter prediction techniques described in this document.
예측부(인터 예측부(180) 및/또는 인트라 예측부(185)를 포함)에 의해 생성된 예측 신호는 복원 신호를 생성하기 위해 이용되거나 레지듀얼 신호를 생성하기 위해 이용될 수 있다. 변환부(120)는 레지듀얼 신호에 변환 기법을 적용하여 변환 계수들(transform coefficients)을 생성할 수 있다. 예를 들어, 변환 기법은 DCT(Discrete Cosine Transform), DST(Discrete Sine Transform), KLT(Karhunen-Loeve Transform), GBT(Graph-Based Transform), 또는 CNT(Conditionally Non-linear Transform) 중 적어도 하나를 포함할 수 있다. 여기서, GBT는 픽셀 간의 관계 정보를 나타내는 그래프로부터 획득되는 변환을 의미한다. CNT는 이전에 복원된 모든 픽셀(all previously reconstructed pixel)를 이용하여 예측 신호를 생성하고, 예측 신호에 기반하여 획득되는 변환을 의미한다. 또한, 변환 과정은 정사각형의 동일한 크기를 갖는 픽셀 블록에 적용될 수도 있고, 정사각형이 아니거나 가변적인 크기를 갖는 블록에도 적용될 수 있다.The prediction signal generated by the prediction unit (including the inter prediction unit 180 and/or the intra prediction unit 185) may be used to generate a reconstructed signal or may be used to generate a residual signal. The transform unit 120 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transformation technique uses at least one of DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT (Karhunen-Loeve Transform), GBT (Graph-Based Transform), or CNT (Conditionally Non-linear Transform). Can include. Here, GBT refers to transformation obtained from a graph representing relationship information between pixels. CNT refers to a transformation obtained based on the prediction signal and generating a prediction signal using all previously reconstructed pixels. In addition, the conversion process may be applied to a pixel block having the same size of a square, or may be applied to a block that is not a square or has a variable size.
양자화부(130)는 변환 계수들을 양자화하고, 양자화된 변환 계수들을 엔트로피 인코딩부(190)로 전송한다. 엔트로피 인코딩부(190)는 양자화된 신호(양자화된 변환 계수들에 관한 정보)를 인코딩함으로써 비트스트림으로 출력할 수 있다. 양자화된 변환 계수들에 관한 정보는 레지듀얼 정보로 지칭될 수 있다. 양자화부(130)는 계수 스캔 순서(scan order)에 기반하여 블록 형태의 양자화된 변환 계수들을 1차원 벡터 형태로 재정렬할 수 있고, 1차원 벡터 형태의 양자화된 변환 계수들의 특성에 기반하여 양자화된 변환 계수들에 관한 정보를 생성할 수도 있다. 엔트로피 인코딩부(190)는, 예를 들어, 지수 골롬(exponential Golomb), CAVLC(context-adaptive variable length coding), CABAC(context-adaptive binary arithmetic coding)과 같은 다양한 인코딩 기법을 수행할 수 있다. 엔트로피 인코딩부(190)는 양자화된 변환 계수들 외 비디오/이미지 복원에 필요한 정보들(예를 들어, 신택스 요소들(syntax elements)의 값)을 함께 또는 별도로 인코딩할 수도 있다. 인코딩된 정보(예: 비디오/영상 정보)는 비트스트림 형태로 NAL(network abstraction layer) 유닛 단위로 전송 또는 저장될 수 있다. 비디오/영상 정보는 APS(adaptation parameter set), PPS(picture parameter set), SPS(sequence parameter set), 또는 VPS(video parameter set)와 같은 다양한 파라미터 세트에 관한 정보를 더 포함할 수 있다. 본 문서에서 후술되는 시그널링/전송되는 정보 및/또는 신택스 요소들은 상술한 인코딩 절차를 통하여 인코딩되어 비트스트림에 포함될 수 있다. 비트스트림은 네트워크를 통하여 전송될 수 있고, 또는 디지털 저장매체에 저장될 수 있다. 여기서 네트워크는 방송망 및/또는 통신망을 포함할 수 있고, 디지털 저장매체는 USB, SD, CD, DVD, 블루레이, HDD, SSD와 같은 저장매체를 포함할 수 있다. 엔트로피 인코딩부(190)로부터 출력된 신호는 전송하는 전송부(미도시) 및/또는 저장하는 저장부(미도시)가 인코딩 장치(100)의 내/외부 엘레먼트로서 구성될 수 있고, 또는 전송부는 엔트로피 인코딩부(190)의 구성요소일 수도 있다.The quantization unit 130 quantizes the transform coefficients and transmits the quantized transform coefficients to the entropy encoding unit 190. The entropy encoding unit 190 may encode a quantized signal (information on quantized transform coefficients) and output it as a bitstream. Information about the quantized transform coefficients may be referred to as residual information. The quantization unit 130 may rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and quantize the quantized transform coefficients based on the characteristics of the quantized transform coefficients in a one-dimensional vector form. It is also possible to generate information about transform coefficients. The entropy encoding unit 190 may perform various encoding techniques such as exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). The entropy encoding unit 190 may encode information necessary for video/image restoration (eg, values of syntax elements) in addition to quantized transform coefficients together or separately. The encoded information (eg, video/video information) may be transmitted or stored in a bitstream format in units of network abstraction layer (NAL) units. The video/video information may further include information on various parameter sets, such as adaptation parameter set (APS), picture parameter set (PPS), sequence parameter set (SPS), or video parameter set (VPS). Signaled/transmitted information and/or syntax elements described later in this document may be encoded through the above-described encoding procedure and included in the bitstream. The bitstream may be transmitted over a network or may be stored in a digital storage medium. Here, the network may include a broadcasting network and/or a communication network, and the digital storage medium may include a storage medium such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD. For the signal output from the entropy encoding unit 190, a transmission unit (not shown) for transmitting and/or a storage unit (not shown) for storing may be configured as internal/external elements of the encoding apparatus 100, or the transmission unit It may be a component of the entropy encoding unit 190.
양자화부(130)로부터 출력된 양자화된 변환 계수들은 복원 신호를 생성하기 위해 이용될 수 있다. 예를 들어, 양자화된 변환 계수들에 대한 루프 내의 역양자화부(140) 및 역변환부(150)를 통해 역양자화 및 역변환을 적용함으로써 레지듀얼 신호가 복원될 수 있다. 가산부(155)는 복원된 레지듀얼 신호를 인터 예측부(180) 또는 인트라 예측부(185)로부터 출력된 예측 신호에 더함으로써 복원(reconstructed) 신호(복원 픽처, 복원 블록, 복원 샘플 어레이)를 생성할 수 있다. 스킵 모드가 적용된 경우와 같이 처리 대상 블록에 대한 레지듀얼 신호가 없는 경우, 예측된 블록이 복원 블록으로 사용될 수 있다. 가산부(155)는 복원부 또는 복원 블록 생성부라고 불릴 수 있다. 생성된 복원 신호는 현재 픽처 내 다음 처리 대상 블록의 인트라 예측을 위하여 사용될 수 있고, 후술하는 바와 같이 필터링을 거쳐서 다음 픽처의 인터 예측을 위하여 사용될 수도 있다. The quantized transform coefficients output from the quantization unit 130 may be used to generate a reconstructed signal. For example, a residual signal may be restored by applying inverse quantization and inverse transform through the inverse quantization unit 140 and the inverse transform unit 150 in the loop for the quantized transform coefficients. The addition unit 155 adds the reconstructed residual signal to the prediction signal output from the inter prediction unit 180 or the intra prediction unit 185 to obtain a reconstructed signal (a reconstructed picture, a reconstructed block, and a reconstructed sample array). Can be generated. When there is no residual signal for the block to be processed, such as when the skip mode is applied, the predicted block may be used as a reconstructed block. The addition unit 155 may be referred to as a restoration unit or a restoration block generation unit. The generated reconstructed signal may be used for intra prediction of the next processing target block in the current picture, and may be used for inter prediction of the next picture through filtering as described later.
필터링부(160)는 복원 신호에 필터링을 적용함으로써 주관적/객관적 화질을 향상시킬 수 있다. 예를 들어, 필터링부(160)는 복원 픽처에 다양한 필터링 방법을 적용하여 수정된(modified) 복원 픽처를 생성할 수 있고, 수정된 복원 픽처를 메모리(170)의 DPB(175)에 전송할 수 있다. 다양한 필터링 방법은 예를 들어, 디블록킹 필터링, 샘플 적응적 오프셋(sample adaptive offset, SAO), 적응적 루프 필터(adaptive loop filter, ALF), 양방향 필터(bilateral filter)를 포함할 수 있다. 필터링부(160)는 각 필터링 방법에 대한 설명에서 후술하는 바와 같이 필터링에 관한 정보를 생성하고, 필터링에 관한 정보를 엔트로피 인코딩부(190)로 전달할 수 있다. 필터링에 관한 정보는 엔트로피 인코딩부(190)에서의 엔트로피 인코딩을 통해 비트스트림 형태로 출력될 수 있다. The filtering unit 160 may improve subjective/objective image quality by applying filtering to the reconstructed signal. For example, the filtering unit 160 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may transmit the modified reconstructed picture to the DPB 175 of the memory 170. . Various filtering methods may include, for example, deblocking filtering, sample adaptive offset (SAO), adaptive loop filter (ALF), and bilateral filter. The filtering unit 160 may generate filtering information and transmit the filtering information to the entropy encoding unit 190 as described later in the description of each filtering method. The filtering information may be output in the form of a bitstream through entropy encoding in the entropy encoding unit 190.
DPB(175)에 전송된 수정된 복원 픽처는 인터 예측부(180)에서 참조 픽처로 사용될 수 있다. 인터 예측이 적용되는 경우, 인코딩 장치(100)는 수정된 복원 픽처를 사용하여 인코딩 장치(100)와 디코딩 장치(200)에서의 예측 미스매치를 피할 수 있고, 부호화 효율도 향상시킬 수 있다. DPB(175)는 수정된 복원 픽처를 인터 예측부(180)에서의 참조 픽처로 사용하기 위해 저장할 수 있다. 저장된 움직임 정보는 공간적 주변 블록의 움직임 정보 또는 시간적 주변 블록의 움직임 정보로 사용하기 위하여 인터 예측부(180)에 전달될 수 있다. 메모리(170)는 현재 픽처 내 복원된 블록들의 복원된 샘플들을 저장할 수 있고, 복원된 샘플들에 대한 정보를 인트라 예측부(185)에 전달할 수 있다.The modified reconstructed picture transmitted to the DPB 175 may be used as a reference picture in the inter prediction unit 180. When inter prediction is applied, the encoding apparatus 100 may avoid prediction mismatch between the encoding apparatus 100 and the decoding apparatus 200 by using the modified reconstructed picture, and may improve encoding efficiency. The DPB 175 may store the modified reconstructed picture for use as a reference picture in the inter prediction unit 180. The stored motion information may be transmitted to the inter prediction unit 180 for use as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 170 may store reconstructed samples of reconstructed blocks in the current picture, and transfer information on the reconstructed samples to the intra prediction unit 185.
도 3은 본 명세서의 실시예에 따른 영상 신호의 디코딩이 수행되는 디코딩 장치의 개략적인 블록도의 예를 도시한다. 도 3의 디코딩 장치(200)는 도 1의 디코딩 장치(22)에 대응할 수 있다.3 shows an example of a schematic block diagram of a decoding apparatus for decoding an image signal according to an embodiment of the present specification. The decoding device 200 of FIG. 3 may correspond to the decoding device 22 of FIG. 1.
도 3을 참조하면, 디코딩 장치(200)는 엔트로피 디코딩부(entropy decoding module)(210), 역양자화부(de-quantization module)(220), 역변환부(inverse transform module)(230), 가산부(addition module)(235), 필터링부(filtering module)(240), 메모리(250), 인터 예측부(inter prediction module)(260) 및 인트라 예측부(intra prediction module)(265)를 포함할 수 있다. 인터 예측부(260) 및 인트라 예측부(265)는 예측부(prediction module)로 통칭될 수 있다. 즉, 예측부는 인터 예측부(180) 및 인트라 예측부(185)를 포함할 수 있다. 역양자화부(220)와 역변환부(230)는 레지듀얼 처리부(residual processing module)로 통칭될 수 있다. 즉, 레지듀얼 처리부는 역양자화부(220)와 역변환부(230)를 포함할 수 있다. 상술한 엔트로피 디코딩부(210), 역양자화부(220), 역변환부(230), 가산부(235), 필터링부(240), 인터 예측부(260), 및 인트라 예측부(265)는 실시예에 따라 하나의 하드웨어 컴포넌트(예를 들어 디코더 또는 프로세서)에 의하여 구성될 수 있다. 또한 메모리(250)는 DPB(255)를 포함할 수도 있고, 실시예에 따라 하나의 하드웨어 컴포넌트(예를 들어 메모리 또는 디지털 저장 매체)에 의하여 구성될 수 있다.Referring to FIG. 3, the decoding apparatus 200 includes an entropy decoding module 210, a de-quantization module 220, an inverse transform module 230, and an adder. (addition module) 235, filtering module 240, memory 250, inter prediction module 260, and intra prediction module 265 may be included. have. The inter prediction unit 260 and the intra prediction unit 265 may be collectively referred to as a prediction module. That is, the prediction unit may include an inter prediction unit 180 and an intra prediction unit 185. The inverse quantization unit 220 and the inverse transform unit 230 may be collectively referred to as a residual processing module. That is, the residual processing unit may include an inverse quantization unit 220 and an inverse transform unit 230. The entropy decoding unit 210, the inverse quantization unit 220, the inverse transform unit 230, the addition unit 235, the filtering unit 240, the inter prediction unit 260, and the intra prediction unit 265 are implemented. It may be configured by one hardware component (eg, a decoder or a processor) according to an example. Also, the memory 250 may include the DPB 255, and may be configured by one hardware component (eg, a memory or a digital storage medium) according to an embodiment.
비디오/이미지 정보를 포함하는 비트스트림이 입력되면, 디코딩 장치(200)는 도 2의 인코딩 장치(100)에서 비디오/이미지 정보가 처리된 프로세스에 대응하여 영상을 복원할 수 있다. 예를 들어, 디코딩 장치(200)는 인코딩 장치(100)에서 적용된 처리 유닛을 이용하여 디코딩을 수행할 수 있다. 따라서 디코딩시 처리 유닛은 예를 들어 코딩 유닛일 수 있고, 코딩 유닛은 코딩 트리 유닛 또는 최대 코딩 유닛으로부터 쿼드 트리 구조 및/또는 바이너리 트리 구조를 따라서 분할될 수 있다. 그리고, 디코딩 장치(200)를 통해 디코딩 및 출력된 복원 영상 신호는 재생 장치를 통해 재생될 수 있다.When a bitstream including video/image information is input, the decoding apparatus 200 may reconstruct an image in response to a process in which the video/image information is processed by the encoding apparatus 100 of FIG. 2. For example, the decoding apparatus 200 may perform decoding using a processing unit applied by the encoding apparatus 100. Thus, upon decoding, the processing unit may be, for example, a coding unit, and the coding unit may be divided from a coding tree unit or a maximum coding unit according to a quad tree structure and/or a binary tree structure. In addition, the reconstructed image signal decoded and output through the decoding device 200 may be reproduced through the playback device.
디코딩 장치(200)는 도 2의 인코딩 장치(100)로부터 출력된 신호를 비트스트림 형태로 수신할 수 있고, 수신된 신호는 엔트로피 디코딩부(210)를 통해 디코딩될 수 있다. 예를 들어, 엔트로피 디코딩부(210)는 비트스트림을 파싱하여 영상 복원(또는 픽처 복원)에 필요한 정보(예: 비디오/영상 정보)를 도출할 수 있다. 비디오/영상 정보는 APS(adaptation parameter set), PPS(picture parameter set), SPS(sequence parameter set), 또는 VPS(video parameter set)와 같은 다양한 파라미터 세트에 관한 정보를 더 포함할 수 있다. 디코딩 장치는 파라미터 세트에 관한 정보를 기반으로 픽처를 디코딩할 수 있다. 본 문서에서 후술되는 시그널링/수신되는 정보 및/또는 신택스 요소들은 디코딩 절차를 통하여 디코딩되어 비트스트림으로부터 획득될 수 있다. 예컨대, 엔트로피 디코딩부(210)는 지수 골롬 부호화, CAVLC 또는 CABAC과 같은 코딩 기법을 사용하여 비트스트림 내 정보를 획득하고, 영상 복원에 필요한 신택스 엘레먼트의 값, 레지듀얼에 관한 변환 계수의 양자화된 값을 출력할 수 있다. 보다 상세하게, CABAC 엔트로피 디코딩 방법은, 비트스트림에서 각 구문 요소에 해당하는 빈(bin)을 수신하고, 디코딩 대상 구문 요소 정보와 주변 및 디코딩 대상 블록의 디코딩 정보 혹은 이전 단계에서 디코딩된 심볼/빈의 정보를 이용하여 문맥(context) 모델을 결정하고, 결정된 문맥 모델에 따라 빈(bin)의 발생 확률을 예측하여 빈의 산술 디코딩(arithmetic decoding)를 수행함으로써 각 구문 요소의 값에 해당하는 심볼을 생성할 수 있다. 이때, CABAC 엔트로피 디코딩 방법은 문맥 모델 결정 후 다음 심볼/빈의 문맥 모델을 위해 디코딩된 심볼/빈의 정보를 이용하여 문맥 모델을 업데이트할 수 있다. 엔트로피 디코딩부(210)에서 디코딩된 정보 중 예측에 관한 정보는 예측부(인터 예측부(260) 및 인트라 예측부(265))로 제공되고, 엔트로피 디코딩부(210)에서 엔트로피 디코딩이 수행된 레지듀얼 값, 즉 양자화된 변환 계수들 및 관련 파라미터 정보는 역양자화부(220)로 입력될 수 있다. 또한, 엔트로피 디코딩부(210)에서 디코딩된 정보 중 필터링에 관한 정보는 필터링부(240)로 제공될 수 있다. 한편, 인코딩 장치(100)로부터 출력된 신호를 수신하는 수신부(미도시)가 디코딩 장치(200)의 내/외부 엘레먼트로서 더 구성될 수 있고, 또는 수신부는 엔트로피 디코딩부(210)의 구성요소일 수도 있다. 한편, 본 명세서에 따른 디코딩 장치(200)는 비디오/영상/픽처 디코딩 장치로 지칭될 수 있다. 디코딩 장치(200)는 정보 디코더(비디오/영상/픽처 정보 디코더) 및 샘플 디코더(비디오/영상/픽처 샘플 디코더)로 구분될 수도 있다. 정보 디코더는 엔트로피 디코딩부(210)를 포함할 수 있고, 샘플 디코더는 역양자화부(220), 역변환부(230), 가산부(235), 필터링부(240), 메모리(250), 인터 예측부(260), 및 인트라 예측부(265) 중 적어도 하나를 포함할 수 있다.The decoding apparatus 200 may receive a signal output from the encoding apparatus 100 of FIG. 2 in the form of a bitstream, and the received signal may be decoded through the entropy decoding unit 210. For example, the entropy decoding unit 210 may parse the bitstream to derive information (eg, video/video information) necessary for image restoration (or picture restoration). The video/video information may further include information on various parameter sets, such as adaptation parameter set (APS), picture parameter set (PPS), sequence parameter set (SPS), or video parameter set (VPS). The decoding apparatus may decode a picture based on information on a parameter set. Signaled/received information and/or syntax elements described later in this document may be decoded through a decoding procedure and obtained from a bitstream. For example, the entropy decoding unit 210 acquires information in the bitstream using a coding technique such as exponential Golomb coding, CAVLC, or CABAC, and a value of a syntax element required for image restoration, and a quantized value of a transform coefficient for a residual. Can be printed. In more detail, in the CABAC entropy decoding method, a bin corresponding to each syntax element is received in a bitstream, and information about the syntax element to be decoded and decoding information of a block to be decoded and a neighbor or a symbol/bin decoded in a previous step The symbol corresponding to the value of each syntax element is determined by determining the context model using the information of, and performing arithmetic decoding of the bin by predicting the probability of occurrence of the bin according to the determined context model. Can be generated. In this case, the CABAC entropy decoding method may update the context model using information of the decoded symbol/bin for the context model of the next symbol/bin after the context model is determined. Among the information decoded by the entropy decoding unit 210, information on prediction is provided to the prediction unit (inter prediction unit 260 and intra prediction unit 265), and the register on which entropy decoding is performed by the entropy decoding unit 210 Dual values, that is, quantized transform coefficients and related parameter information may be input to the inverse quantization unit 220. In addition, information about filtering among information decoded by the entropy decoding unit 210 may be provided to the filtering unit 240. Meanwhile, a receiving unit (not shown) for receiving a signal output from the encoding device 100 may be further configured as an inner/outer element of the decoding device 200, or the receiving unit may be a component of the entropy decoding unit 210. May be. Meanwhile, the decoding apparatus 200 according to the present specification may be referred to as a video/video/picture decoding apparatus. The decoding apparatus 200 may be divided into an information decoder (video/video/picture information decoder) and a sample decoder (video/video/picture sample decoder). The information decoder may include an entropy decoding unit 210, and the sample decoder is an inverse quantization unit 220, an inverse transform unit 230, an addition unit 235, a filtering unit 240, a memory 250, and an inter prediction. It may include at least one of the unit 260 and the intra prediction unit 265.
역양자화부(220)는 양자화된 변환 계수들의 역양자화를 통해 변환 계수들을 출력할 수 있다. 역양자화부(220)는 양자화된 변환 계수들을 2차원의 블록 형태로 재정렬할 수 있다. 이 경우 인코딩 장치(100)에서 수행된 계수 스캔 순서에 기반하여 재정렬이 수행될 수 있다. 역양자화부(220)는 양자화 파라미터(예: 양자화 스텝 사이즈 정보)를 이용하여 양자화된 변환 계수들에 대한 역양자화를 수행하고, 변환 계수들(transform coefficient)을 획득할 수 있다. The inverse quantization unit 220 may output transform coefficients through inverse quantization of the quantized transform coefficients. The inverse quantization unit 220 may rearrange the quantized transform coefficients into a two-dimensional block shape. In this case, the reordering may be performed based on the coefficient scan order performed by the encoding apparatus 100. The inverse quantization unit 220 may perform inverse quantization on quantized transform coefficients by using a quantization parameter (eg, quantization step size information) and obtain transform coefficients.
역변환부(230)는 변환 계수들을 역변환하여 레지듀얼 신호(레지듀얼 블록, 레지듀얼 샘플 어레이)를 획득한다. The inverse transform unit 230 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).
예측부는 현재 블록에 대한 예측을 수행하고, 현재 블록에 대한 예측 샘플들을 포함하는 예측된 블록(predicted block)을 생성할 수 있다. 예측부는 엔트로피 디코딩부(210)로부터 출력된 예측에 관한 정보에 기반하여 현재 블록에 인트라 예측이 적용되는지 또는 인터 예측이 적용되는지 결정할 수 있고, 구체적인 인트라/인터 예측 모드를 결정할 수 있다. The prediction unit may perform prediction on the current block and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on information on prediction output from the entropy decoding unit 210, and may determine a specific intra/inter prediction mode.
예측부는 후술되는 다양한 예측 방법을 기반으로 예측 신호(예측 샘플)를 생성할 수 있다. 예를 들어, 예측부는 하나의 블록에 대한 예측을 위하여 인트라 예측 또는 인터 예측을 적용할 수 있을 뿐만 아니라, 인트라 예측과 인터 예측을 함께(동시에) 적용할 수 있다. 이는 CIIP(combined inter and intra prediction)로 지칭될 수 있다. 또한, 예측부는 블록에 대한 예측을 위하여 IBC(intra block copy)를 수행할 수도 있다. IBC는, 예를 들어, SCC(screen content coding)와 같이 컨텐츠(예: 게임) 영상/동영상 코딩을 위하여 사용될 수 있다. 또한, IBC는 CPR(current picture referencing)로 지칭될 수도 있다. IBC는 기본적으로 현재 픽처 내에서 예측을 수행하나 현재 픽처 내에서 참조 블록을 도출하는 점에서 인터 예측과 유사하게 수행될 수 있다. 즉, IBC는 본 문서에서 설명되는 인터 예측 기법들 중 적어도 하나를 이용할 수 있다.The prediction unit may generate a prediction signal (prediction sample) based on various prediction methods described later. For example, the prediction unit may not only apply intra prediction or inter prediction to predict one block, but also apply intra prediction and inter prediction together (simultaneously). This may be referred to as CIIP (combined inter and intra prediction). Also, the prediction unit may perform intra block copy (IBC) to predict a block. IBC may be used for content (eg, game) video/video coding, such as, for example, screen content coding (SCC). Also, IBC may be referred to as CPR (current picture referencing). IBC basically performs prediction in the current picture, but can be performed similarly to inter prediction in that it derives a reference block in the current picture. That is, the IBC may use at least one of the inter prediction techniques described in this document.
인트라 예측부(265)는 현재 픽처 내의 샘플들을 참조하여 현재 블록을 예측할 수 있다. 참조되는 샘플들은 예측 모드에 따라 현재 블록의 주변(neighbor)에 위치할 수 있고, 또는 이격되어 위치할 수도 있다. 인트라 예측에서 예측 모드들은 복수의 비방향성 모드와 복수의 방향성 모드를 포함할 수 있다. 인트라 예측부(265)는 주변 블록에 적용된 예측 모드를 이용하여, 현재 블록에 적용되는 예측 모드를 결정할 수도 있다.The intra prediction unit 265 may predict the current block by referring to samples in the current picture. The referenced samples may be located near the current block or may be spaced apart according to the prediction mode. In intra prediction, prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 265 may determine a prediction mode applied to the current block by using the prediction mode applied to the neighboring block.
인터 예측부(260)는 참조 픽처 상에서 움직임 벡터에 의해 특정되는 참조 블록(참조 샘플 어레이)을 기반으로, 현재 블록에 대한 예측된 블록을 유도할 수 있다. 이때, 인터 예측 모드에서 전송되는 움직임 정보의 양을 줄이기 위해 주변 블록과 현재 블록 간의 움직임 정보의 상관성에 기초하여 움직임 정보를 블록, 서브블록, 또는 샘플 단위로 예측할 수 있다. 움직임 정보는 움직임 벡터 및 참조 픽처 인덱스를 포함할 수 있다. 움직임 정보는 인터 예측 방향(L0 예측, L1 예측, Bi 예측) 정보를 더 포함할 수 있다. 인터 예측의 경우, 주변 블록은 현재 픽처 내에 존재하는 공간적 주변 블록(spatial neighboring block)과 참조 픽처에 존재하는 시간적 주변 블록(temporal neighboring block)을 포함할 수 있다. 예를 들어, 인터 예측부(260)는 주변 블록들을 기반으로 움직임 정보 후보 리스트를 구성하고, 수신된 후보 선택 정보를 기반으로 현재 블록의 움직임 벡터 및/또는 참조 픽처 인덱스를 도출할 수 있다. 다양한 예측 모드를 기반으로 인터 예측이 수행될 수 있으며, 예측에 관한 정보는 현재 블록에 대한 인터 예측의 모드를 지시하는 정보를 포함할 수 있다. The inter prediction unit 260 may derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on the reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, motion information may be predicted in units of blocks, subblocks, or samples based on correlation between motion information between neighboring blocks and current blocks. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction) information. In the case of inter prediction, the neighboring block may include a spatial neighboring block existing in the current picture and a temporal neighboring block existing in the reference picture. For example, the inter prediction unit 260 may construct a motion information candidate list based on neighboring blocks, and derive a motion vector and/or a reference picture index of the current block based on the received candidate selection information. Inter prediction may be performed based on various prediction modes, and information on prediction may include information indicating a mode of inter prediction for a current block.
가산부(235)는 획득된 레지듀얼 신호를 예측부(인터 예측부(260) 및/또는 인트라 예측부(265) 포함)로부터 출력된 예측 신호(예측된 블록, 예측 샘플 어레이)에 더함으로써 복원 신호(복원 픽처, 복원 블록, 복원 샘플 어레이)를 생성할 수 있다. 스킵 모드가 적용된 경우와 같이 처리 대상 블록에 대한 레지듀얼이 없는 경우, 예측된 블록이 복원 블록으로 사용될 수 있다.The addition unit 235 is reconstructed by adding the obtained residual signal to the prediction signal (predicted block, prediction sample array) output from the prediction unit (including the inter prediction unit 260 and/or the intra prediction unit 265). Signals (restored pictures, reconstructed blocks, reconstructed sample arrays) can be generated. When there is no residual for a block to be processed, such as when the skip mode is applied, the predicted block may be used as a reconstructed block.
가산부(235)는 복원부 또는 복원 블록 생성부로 지칭될 수 있다. 생성된 복원 신호는 현재 픽처 내 다음 처리 대상 블록의 인트라 예측을 위하여 사용될 수 있고, 후술하는 바와 같이 필터링을 거쳐서 다음 픽처의 인터 예측을 위하여 사용될 수도 있다. The addition unit 235 may be referred to as a restoration unit or a restoration block generation unit. The generated reconstructed signal may be used for intra prediction of the next processing target block in the current picture, and may be used for inter prediction of the next picture through filtering as described later.
필터링부(240)는 복원 신호에 필터링을 적용함으로써 주관적/객관적 화질을 향상시킬 수 있다. 예를 들어, 필터링부(240)는 복원 픽처에 다양한 필터링 방법을 적용하여 수정된(modified) 복원 픽처를 생성할 수 있고, 수정된 복원 픽처를 메모리(250)의 DPB(255)에 전송할 수 있다. 다양한 필터링 방법은, 예를 들어, 디블록킹 필터링, 샘플 적응적 오프셋(sample adaptive offset), 적응적 루프 필터(adaptive loop filter), 양방향 필터(bilateral filter)를 포함할 수 있다. The filtering unit 240 may improve subjective/objective image quality by applying filtering to the reconstructed signal. For example, the filtering unit 240 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may transmit the modified reconstructed picture to the DPB 255 of the memory 250 . Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, and bilateral filter.
메모리(250)의 DPB(255)에 전달된 수정된 복원 픽처는 인터 예측부(260)에 의해 참조 픽처로 사용될 수 있다. 메모리(250)는 현재 픽처 내 움직임 정보가 도출된(또는 디코딩된) 블록의 움직임 정보 및/또는 이미 복원된 픽처 내 블록들의 움직임 정보를 저장할 수 있다. 저장된 움직임 정보는 공간적 주변 블록의 움직임 정보 또는 시간적 주변 블록의 움직임 정보로 활용하기 위하여 인터 예측부(260)에 전달할 수 있다. 메모리(250)는 현재 픽처 내 복원된 블록들의 복원 샘플들을 저장할 수 있고, 인트라 예측부(265)에 전달할 수 있다.The modified reconstructed picture delivered to the DPB 255 of the memory 250 may be used as a reference picture by the inter prediction unit 260. The memory 250 may store motion information of a block from which motion information in a current picture is derived (or decoded) and/or motion information of blocks in a picture that have already been reconstructed. The stored motion information may be transmitted to the inter prediction unit 260 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 250 may store reconstructed samples of reconstructed blocks in the current picture, and may be transmitted to the intra prediction unit 265.
본 명세서에서, 인코딩 장치(100)의 필터링부(160), 인터 예측부(180) 및 인트라 예측부(185)에서 설명된 실시예들은 각각 디코딩 장치의 필터링부(240), 인터 예측부(260) 및 인트라 예측부(265)에도 동일 또는 대응되도록 적용될 수 있다.In the present specification, embodiments described in the filtering unit 160, the inter prediction unit 180, and the intra prediction unit 185 of the encoding apparatus 100 are respectively the filtering unit 240 and the inter prediction unit 260 of the decoding apparatus. ) And the intra prediction unit 265 may be applied to be the same or correspond to each other.
도 4는 본 명세서의 실시예에 따른 컨텐츠 스트리밍 시스템의 예를 도시한다. 본 명세서의 실시예가 적용되는 컨텐츠 스트리밍 시스템은 크게 인코딩 서버(encoding server)(410), 스트리밍 서버(streaming server)(420), 웹 서버(web server)(430), 미디어 저장소(media storage)(440), 사용자 장치(user equipment)(450), 및 멀티미디어 입력 장치(multimedia input device)(460)를 포함할 수 있다.4 shows an example of a content streaming system according to an embodiment of the present specification. Content streaming systems to which the embodiments of the present specification are applied are largely an encoding server 410, a streaming server 420, a web server 430, and a media storage 440. ), a user equipment 450, and a multimedia input device 460.
인코딩 서버(410)는 스마트폰, 카메라, 캠코더와 같은 멀티미디어 입력 장치(460)로부터 입력된 컨텐츠를 디지털 데이터로 압축하여 비트스트림을 생성하고, 생성된 비트스트림을 스트리밍 서버(420)로 전송한다. 다른 예로, 스마트폰, 카메라, 캠코더와 같은 멀티미디어 입력 장치(460)가 비트스트림을 직접 생성하는 경우, 인코딩 서버(410)는 생략될 수 있다.The encoding server 410 generates a bitstream by compressing content input from a multimedia input device 460 such as a smartphone, a camera, or a camcorder into digital data, and transmits the generated bitstream to the streaming server 420. As another example, when the multimedia input device 460 such as a smartphone, a camera, or a camcorder directly generates a bitstream, the encoding server 410 may be omitted.
비트스트림은 본 명세서의 실시예가 적용되는 인코딩 방법 또는 비트스트림 생성 방법에 의해 생성될 수 있고, 스트리밍 서버(420)는 비트스트림을 전송 또는 수신하는 과정에서 일시적으로 비트스트림을 저장할 수 있다.The bitstream may be generated by an encoding method or a bitstream generation method to which an embodiment of the present specification is applied, and the streaming server 420 may temporarily store the bitstream while transmitting or receiving the bitstream.
스트리밍 서버(420)는 웹 서버(430)를 통한 사용자 요청에 기초하여 멀티미디어 데이터를 사용자 장치(450)에 전송하고, 웹 서버(430)는 사용자에게 어떠한 서비스가 있는지를 알려주는 매개체 역할을 한다. 사용자가 웹 서버(430)에 원하는 서비스를 요청하면, 웹 서버(430)는 요청된 서비스에 대한 정보를 스트리밍 서버(420)에 전달하고, 스트리밍 서버(420)는 사용자에게 멀티미디어 데이터를 전송한다. 이때, 컨텐츠 스트리밍 시스템은 별도의 제어 서버를 포함할 수 있고, 이 경우 제어 서버는 컨텐츠 스트리밍 시스템 내 각 장치 간 명령/응답을 제어하는 역할을 한다.The streaming server 420 transmits multimedia data to the user device 450 based on a user request through the web server 430, and the web server 430 serves as an intermediary that informs the user of what kind of service exists. When a user requests a desired service from the web server 430, the web server 430 transmits information on the requested service to the streaming server 420, and the streaming server 420 transmits multimedia data to the user. In this case, the content streaming system may include a separate control server, and in this case, the control server serves to control commands/responses between devices in the content streaming system.
스트리밍 서버(420)는 미디어 저장소(440) 및/또는 인코딩 서버(410)로부터 컨텐츠를 수신할 수 있다. 예를 들어, 인코딩 서버(410)로부터 컨텐츠를 수신하는 경우, 스트리밍 서버(420)는 컨텐츠를 실시간으로 수신할 수 있다. 이 경우, 원활한 스트리밍 서비스를 제공하기 위하여 스트리밍 서버(420)는 비트스트림을 일정 시간동안 저장할 수 있다.The streaming server 420 may receive content from the media storage 440 and/or the encoding server 410. For example, when receiving content from the encoding server 410, the streaming server 420 may receive the content in real time. In this case, in order to provide a smooth streaming service, the streaming server 420 may store the bitstream for a predetermined time.
사용자 장치(450)는, 예를 들어, 휴대폰, 스마트 폰(smart phone), 노트북 컴퓨터(laptop computer), 디지털방송용 단말기, PDA(personal digital assistants), PMP(portable multimedia player), 네비게이션, 슬레이트 PC(slate PC), 태블릿 PC(tablet PC), 울트라북(ultrabook), 웨어러블 디바이스(wearable device, 예를 들어, 워치형 단말기 (smartwatch), 글래스형 단말기 (smart glass), HMD(head mounted display)), 디지털 TV, 데스크탑 컴퓨터, 디지털 사이니지를 포함할 수 있다.The user device 450 includes, for example, a mobile phone, a smart phone, a laptop computer, a digital broadcasting terminal, a personal digital assistants (PDA), a portable multimedia player (PMP), a navigation system, and a slate PC ( slate PC), tablet PC, ultrabook, wearable device, e.g., smartwatch, smart glass, head mounted display (HMD)), It can include digital TV, desktop computer, and digital signage.
컨텐츠 스트리밍 시스템 내 각 서버들은 분산 서버로 운영될 수 있으며, 이 경우 각 서버에서 수신하는 데이터는 분산 처리될 수 있다.Each server in the content streaming system may be operated as a distributed server, and in this case, data received from each server may be distributedly processed.
도 5는 본 명세서의 실시예에 따른 비디오 신호 처리 장치의 예를 도시한다. 도 5의 비디오 신호 처리 장치는 도 1의 인코딩 장치(100) 또는 도 2의 디코딩 장치(200)에 해당할 수 있다. 5 shows an example of a video signal processing apparatus according to an embodiment of the present specification. The video signal processing apparatus of FIG. 5 may correspond to the encoding apparatus 100 of FIG. 1 or the decoding apparatus 200 of FIG. 2.
비디오 신호를 처리하는 비디오 신호 처리 장치(500)는, 비디오 신호를 저장하는 메모리(520)와, 메모리(520)와 결합되면서 비디오 신호를 처리하는 프로세서(510)를 포함한다. 본 명세서의 실시예에 따른 프로세서(510)는 비디오 신호의 처리를 위한 적어도 하나의 프로세싱 회로로 구성될 수 있으며, 비디오 신호의 인코딩/디코딩을 위한 명령어들을 실행함으로써 비디오 신호를 처리할 수 있다. 즉, 프로세서(510)는 이하 설명되는 인코딩/디코딩 방법들을 실행함으로써 원본 비디오 데이터를 인코딩하거나 인코딩된 비디오 신호를 디코딩할 수 있다. 프로세서(510)는, 도 2 또는 도 3의 각 모듈들에 대응하는 하나 또는 그 이상의 프로세서들로 구성될 수 있다. 메모리(520)는 도 2의 메모리(170) 또는 도 3의 메모리(250)에 해당할 수 있다.The video signal processing apparatus 500 for processing a video signal includes a memory 520 for storing a video signal, and a processor 510 for processing a video signal while being combined with the memory 520. The processor 510 according to the embodiment of the present specification may be configured with at least one processing circuit for processing a video signal, and may process a video signal by executing instructions for encoding/decoding a video signal. That is, the processor 510 may encode original video data or decode an encoded video signal by executing encoding/decoding methods described below. The processor 510 may be composed of one or more processors corresponding to each of the modules of FIG. 2 or 3. The memory 520 may correspond to the memory 170 of FIG. 2 or the memory 250 of FIG. 3.
분할 구조(Partitioning structure)Partitioning structure
본 명세서에 따른 비디오/영상 코딩 방법은 후술되는 분할 구조에 기반하여 수행될 수 있다. 구체적으로 후술되는 예측, 레지듀얼 처리(예: (역)변환, (역)양자화), 신택스 요소 코딩, 필터링과 같은 절차는 부할 구조에 기반하여 도출된 CTU(coding tree unit), CU(및/또는 TU, PU)에 기반하여 수행될 수 있다. 블록 분할 절차는 상술한 인코딩 장치(100)의 영상 분할부(110)에서 수행될 수 있으며, 분할 관련 정보는 엔트로피 인코딩부(190)에서 (인코딩) 처리되어 비트스트림 형태로 디코딩 장치(200)로 전달될 수 있다. 디코딩 장치(200)의 엔트로피 디코딩부(210)는 비트스트림으로부터 획득된 분할 관련 정보를 기반으로 현재 블록의 블록 분할 구조를 도출하고, 이를 기반으로 영상 디코딩을 위한 일련의 절차(예: 예측, 레지듀얼 처리, 블록/픽처 복원, 인루프 필터링)를 수행할 수 있다.The video/image coding method according to the present specification may be performed based on a split structure described later. Procedures such as prediction, residual processing (e.g., (inverse) transformation, (inverse) quantization), syntax element coding, and filtering, which will be described later, are CTU (coding tree unit) derived based on the load structure, CU (and/ Alternatively, it may be performed based on TU, PU). The block division procedure may be performed by the video division unit 110 of the encoding apparatus 100 described above, and division-related information is (encoded) processed by the entropy encoding unit 190 and transferred to the decoding apparatus 200 in the form of a bitstream. Can be delivered. The entropy decoding unit 210 of the decoding apparatus 200 derives the block division structure of the current block based on the division-related information obtained from the bitstream, and based on this, a series of procedures (e.g., prediction, registration) for decoding an image. Dual processing, block/picture restoration, and in-loop filtering) can be performed.
본 명세서의 실시예에 따른 비디오/이미지의 코딩에 있어서, 영상 처리 단위는 계층적 구조를 가질 수 있다. 하나의 픽처는 하나 이상의 타일 또는 타일 그룹으로 구분될 수 있다. 하나의 타일 그룹은 하나 이상의 타일을 포함할 수 있다. 하나의 타일은 하나 이상의 CTU를 포함할 수 있다. CTU는 하나 이상의 CU로 분할될 수 있다. 타일은 픽처 내에서 특정 타일 행 및 특정 타일 열 내의 CTU들을 포함하는 사각 영역이다(a rectangular region of CTUs within a particular tile column and a particular tile row in a picture). 타일 그룹은 픽처 내의 타일 래스터 스캔에 따른 정수개의 타일들을 포함할 수 있다. 타일 그룹 헤더는 해당 타일 그룹에 적용될 수 있는 정보/파라미터를 전달할 수 있다. 인코딩 장치(100)/디코딩 장치(200)가 멀티 코어 프로세서를 갖는 경우, 타일 또는 타일 그룹에 대한 인코딩/디코딩 절차는 병렬 처리될 수 있다. 여기서 타일 그룹은 intra (I) tile group, predictive (P) tile group, 및 bi-predictive (B) tile group을 포함하는 타일 그룹들 중 하나의 타입을 가질 수 있다. I 타일 그룹 내의 블록들에 대한 예측을 위하여 인터 예측이 사용되지 않고 인트라 예측만이 사용될 수 있다. 물론 I 타일 그룹에 대해서도 예측 없이 코딩된 원본 샘플 값이 시그널링될 수 있다. P 타일 그룹 내의 블록들에 대하여 인트라 예측 또는 인터 예측이 사용될 수 있으며, 인터 예측이 사용되는 경우 단방향(uni) 예측만이 사용될 수 있다. 한편, B 타일 그룹 내의 블록들에 대하여 인트라 예측 또는 인터 예측이 사용될 수 있으며, 인터 예측이 사용되는 경우 단방향 예측뿐만 아니라 쌍(bi) 예측도 사용될 수 있다.In video/image coding according to the embodiment of the present specification, an image processing unit may have a hierarchical structure. One picture may be divided into one or more tiles or tile groups. One tile group may include one or more tiles. One tile may contain more than one CTU. The CTU can be divided into one or more CUs. A tile is a rectangular region of CTUs within a particular tile column and a particular tile row in a picture. The tile group may include an integer number of tiles according to a tile raster scan in a picture. The tile group header may convey information/parameters applicable to the corresponding tile group. When the encoding device 100/decoding device 200 has a multi-core processor, an encoding/decoding procedure for a tile or a group of tiles may be processed in parallel. Here, the tile group may have one type of tile groups including an intra (I) tile group, a predictive (P) tile group, and a bi-predictive (B) tile group. For prediction of blocks in an I tile group, inter prediction is not used and only intra prediction can be used. Of course, even for the I tile group, a coded original sample value may be signaled without prediction. Intra prediction or inter prediction may be used for blocks in a P tile group, and when inter prediction is used, only uni prediction may be used. Meanwhile, intra prediction or inter prediction may be used for blocks in the B tile group, and when inter prediction is used, not only unidirectional prediction but also bi prediction may be used.
도 6은 본 명세서의 실시예에 따른 픽처의 분할 구조의 예를 도시한다. 도 6에서, 216개(18 by 12)의 휘도 CTU들을 갖는 픽처가 12개의 타일들과 3개의 타일 그룹들로 분할된다.6 illustrates an example of a picture division structure according to an embodiment of the present specification. In FIG. 6, a picture having 216 (18 by 12) luminance CTUs is divided into 12 tiles and 3 tile groups.
인코더는 비디오 영상의 특성(예를 들어, 해상도)에 따라 또는 코딩의 효율 또는 병렬 처리를 고려하여 타일/타일 그룹, 최대 및 최소 코딩 유닛 크기를 결정하고, 이에 대한 정보 또는 이를 유도하기 위한 정보를 비트스트림에 포함시킬 수 있다. The encoder determines the size of a tile/tile group and a maximum and minimum coding unit according to a characteristic (e.g., resolution) of a video image or in consideration of coding efficiency or parallel processing, and provides information about this or information for inducing it. It can be included in the bitstream.
디코더는 현재 픽처의 타일/타일 그룹, 타일 내 CTU가 다수의 코딩 유닛들로 분할되었는지 여부를 나타내는 정보를 획득할 수 있다. 이러한 정보가 디코더에 의해 항상 획득(디코딩)되는 것이 아니라 특정 조건 하에서만 획득(디코딩)되도록하면 코딩 효율이 증대될 수 있다.The decoder may obtain information indicating whether the tile/tile group of the current picture and the CTU in the tile are divided into a plurality of coding units. Coding efficiency can be increased if such information is not always acquired (decoded) by the decoder, but is acquired (decoded) only under certain conditions.
타일 그룹 헤더(타일 그룹 헤더 신택스)는 타일 그룹에 공통적으로 적용될 수 있는 정보/파라미터를 포함할 수 있다. APS(APS 신택스) 또는 PPS(PPS 신택스)는 하나 이상의 픽처에 공통적으로 적용될 수 있는 정보/파라미터를 포함할 수 있다. SPS(SPS 신택스)는 하나 이상의 시퀀스에 공통적으로 적용될 수 있는 정보/파라미터를 포함할 수 있다. VPS(VPS 신택스)는 비디오 전반에 공통적으로 적용될 수 있는 정보/파라미터를 포함할 수 있다. 본 명세서의 상위 레벨 신택스는 APS 신택스, PPS 신택스, SPS 신택스, VPS 신택스 중 적어도 하나를 포함할 수 있다.The tile group header (tile group header syntax) may include information/parameters commonly applicable to the tile group. APS (APS syntax) or PPS (PPS syntax) may include information/parameters that can be commonly applied to one or more pictures. SPS (SPS syntax) may include information/parameters that can be commonly applied to one or more sequences. VPS (VPS syntax) may include information/parameters that can be commonly applied to the entire video. The high-level syntax of the present specification may include at least one of APS syntax, PPS syntax, SPS syntax, and VPS syntax.
또한, 예를 들어 타일/타일 그룹의 분할 및 구성에 관한 정보는 상위 레벨 신택스를 통하여 인코더에서 구성된 후 비트스트림 형태로 디코더로 전송될 수 있다.Further, for example, information on the division and configuration of a tile/tile group may be configured in an encoder through a higher level syntax and then transmitted to a decoder in the form of a bitstream.
도 7a 내지 도 7d는 본 명세서의 실시예에 따른 블록 분할 구조의 예를 도시한다. 도 7a는 QT(quadtree, QT), 도 7b는 BT(binary tree, BT), 도 7c는 TT(ternary tree, TT) 도 7d는 AT(asymmetric Tree, AT)에 의한 블록 분할 구조들의 예를 도시한다.7A to 7D illustrate an example of a block division structure according to an embodiment of the present specification. 7A is a QT (quadtree, QT), FIG. 7b is a binary tree (BT), and FIG. 7c is a ternary tree (TT) and FIG. 7d shows an example of block division structures by an asymmetric tree (AT). do.
비디오 코딩 시스템에서, 하나의 블록은 QT 분할 방식에 기반으로 분할될 수 있다. 또한, QT 분할 방식에 의해서 분할된 하나의 서브 블록(subblock)은 QT 분할 방식에 따라 재귀적으로 더 분할될 수 있다. 더 이상 QT 분할 방식에 의해 분할되지 않는 리프 블록(leaf block)은 BT, TT, 또는 AT 중 적어도 하나의 방식에 의해서 분할될 수 있다. BT는 수평 BT (2NxN, 2NxN)과 수직 BT (Nx2N, Nx2N)와 같은 두 가지 형태의 분할을 가질 수 있다. TT는 수평 TT (2Nx1/2N, 2NxN, 2Nx1/2N)와 수직 TT (1/2Nx2N, Nx2N, 1/2Nx2N)와 같은 두 가지 형태의 분할을 가질 수 있다. AT는 수평-상향(horizontal-up) AT (2Nx1/2N, 2Nx3/2N), 수평-하향(horizontal-down) AT (2Nx3/2N, 2Nx1/2N), 수직-좌측(vertical-left) AT (1/2Nx2N, 3/2Nx2N), 수직-우측(vertical-right) AT (3/2Nx2N, 1/2Nx2N)의 네 가지 형태의 분할을 가질 수 있다. 각각의 BT, TT, AT는 BT, TT, AT를 사용하여 재귀적으로 더 분할될 수 있다.In a video coding system, one block may be divided based on a QT division scheme. In addition, one subblock divided by the QT division method may be further divided recursively according to the QT division method. A leaf block that is no longer divided by the QT division method may be divided by at least one of BT, TT, or AT. BT can have two types of division, such as horizontal BT (2NxN, 2NxN) and vertical BT (Nx2N, Nx2N). TT may have two types of division, such as horizontal TT (2Nx1/2N, 2NxN, 2Nx1/2N) and vertical TT (1/2Nx2N, Nx2N, 1/2Nx2N). AT is horizontal-up AT (2Nx1/2N, 2Nx3/2N), horizontal-down AT (2Nx3/2N, 2Nx1/2N), vertical-left AT ( It can have four types of division: 1/2Nx2N, 3/2Nx2N), and vertical-right AT (3/2Nx2N, 1/2Nx2N). Each BT, TT, AT can be further divided recursively using BT, TT, AT.
도 7a는 QT 분할의 예를 도시한다. 블록 A는 QT에 의해서 4개의 서브 블록 (A0, A1, A2, A3)으로 분할될 수 있다. 서브 블록 A1은 다시 QT에 의해서 4개의 서브 블록 (B0, B1, B2, B3)로 분할될 수 있다.7A shows an example of QT division. Block A may be divided into four sub-blocks (A0, A1, A2, A3) by QT. Sub-block A1 may be divided into four sub-blocks (B0, B1, B2, B3) by QT again.
도 7b는 BT 분할의 예를 도시한다. QT에 의해서 더 이상 분할되지 않는 블록 B3은 수직 BT (C0, C1) 또는 수평 BT (D0, D1)에 의해 분할될 수 있다. 블록 C0와 같이 각각의 서브 블록은 수평 BT (E0, E1) 또는 수직 BT (F0, F1)의 형태와 같이 재귀적으로 더 분할될 수 있다.7B shows an example of BT segmentation. Block B3 that is no longer divided by QT may be divided by vertical BT (C0, C1) or horizontal BT (D0, D1). Like block C0, each sub-block may be further divided recursively in the form of horizontal BT (E0, E1) or vertical BT (F0, F1).
도 7c는 TT 분할의 예를 도시한다. QT에 의해서 더 이상 분할되지 않는 블록 B3은 수직 TT (C0, C1, C2) 또는 수평 TT (D0, D1, D2)으로 분할될 수 있다. 블록 C1와 같이 각각의 서브 블록은 수평 TT (E0, E1, E2) 또는 수직 TT (F0, F1, F2)의 형태와 같이 재귀적으로 더 분할될 수 있다.7C shows an example of TT partitioning. Block B3 which is no longer divided by QT may be divided into vertical TT (C0, C1, C2) or horizontal TT (D0, D1, D2). Like block C1, each sub-block may be further divided recursively in the form of horizontal TT (E0, E1, E2) or vertical TT (F0, F1, F2).
도 7d는 AT 분할의 예를 도시한다. QT에 의해서 더 이상 분할되지 않는 블록 B3은 수직 AT (C0, C1) 또는 수평 AT (D0, D1)로 분할 될 수 있다. 블록 C1와 같이 각각의 서브 블록은 수평 AT (E0, E1) 또는 수직 TT (F0, F1)의 형태와 같이 재귀적으로 더 분할 될 수 있다.7D shows an example of AT partitioning. Block B3, which is no longer divided by QT, can be divided into vertical ATs (C0, C1) or horizontal ATs (D0, D1). Like block C1, each sub-block can be further divided recursively in the form of a horizontal AT (E0, E1) or a vertical TT (F0, F1).
한편, BT, TT, AT 분할은 하나의 블록에 함께 적용될 수 있다. 예를 들어, BT에 의해 분할된 서브 블록은 TT 또는 AT에 의해 분할될 수 있다. 또한, TT에 의해 분할된 서브 블록은 BT 또는 AT에 의해 분할될 수 있다. AT에 의해 분할된 서브 블록은 BT 또는 TT에 의해 분할될 수 있다. 예를 들어, 수평 BT 분할 이후, 각각의 서브 블록이 수직 BT에 의해 분할될 수 있다. 또한, 수직 BT 분할 이후, 각각의 서브 블록이 수평 BT에 의해 분할될 수도 있다. 이 경우 분할 순서는 다르지만 최종적으로 분할되는 모양은 동일하다. Meanwhile, BT, TT, and AT division can be applied together in one block. For example, a sub-block divided by BT may be divided by TT or AT. In addition, sub-blocks divided by TT may be divided by BT or AT. Sub-blocks divided by AT may be divided by BT or TT. For example, after horizontal BT division, each sub-block may be divided by vertical BT. In addition, after vertical BT division, each sub-block may be divided by horizontal BT. In this case, the order of division is different, but the shape of the final division is the same.
또한, 블록이 분할되면 블록을 탐색하는 순서가 다양하게 정의될 수 있다. 일반적으로, 좌측에서 우측으로, 상단에서 하단으로 탐색이 수행되며, 블록을 탐색한다는 것은 각 분할된 서브 블록의 추가적인 블록 분할 여부를 결정하는 순서를 의미하거나, 블록이 더 이상 분할되지 않을 경우 각 서브 블록의 부호화 순서를 의미하거나, 또는 서브 블록에서 다른 이웃 블록의 정보를 참조할 때의 탐색 순서를 의미할 수 있다.In addition, when the block is divided, the order of searching for the block may be variously defined. In general, search is performed from left to right and from top to bottom, and searching for a block means the order of determining whether to divide additional blocks of each divided sub-block, or if the block is no longer divided, each sub It may mean an encoding order of a block, or a search order when a subblock refers to information of another neighboring block.
또한, 픽처 내 파이프라인 처리를 위하여 VPDUs(virtual pipeline data units)가 정의될 수 있다. VPDUs는 하나의 픽처 내에서 비-중첩 유닛들(non-overlapping units)로 정의될 수 있다. 하드웨어 디코더에서, 다중 파이프라인 스테이지들에 의하여 연속적인(successive) VPDUs가 동시에 처리될 수 있다. VPDU 사이즈는 대부분의 파이프라인 스테이지들(most pipeline stages)에서 버퍼 사이즈에 대략적으로 비례한다(roughly proportional). 따라서, VDPU 사이즈를 작게 유지하는 것은 하드웨어 관점에서 버퍼 사이즈를 고려할 때 중요하다. 대부분의 하드웨어 디코더에서, VPDU 사이즈는 최대 TB 사이즈와 같도록 설정될 수 있다. 예를 들어, VPDU 사이즈는 64x64(64x64 휘도 샘플들) 사이즈일 수 있다. 다만 이는 예시이며 상술한 TT 및/또는 BT 파티션을 고려하여 VPDU 사이즈는 변경(증가 또는 감소)될 수 있다. 본 문서에서, MxN 블록은 M개의 열과 N개의 행으로 이루어진 샘플들을 포함하는 블록을 나타낼 수 있다.In addition, virtual pipeline data units (VPDUs) may be defined for intra-picture pipeline processing. VPDUs may be defined as non-overlapping units within one picture. In a hardware decoder, successive VPDUs can be processed simultaneously by multiple pipeline stages. The VPDU size is roughly proportional to the buffer size in most pipeline stages. Therefore, keeping the VDPU size small is important when considering the buffer size from a hardware perspective. In most hardware decoders, the VPDU size can be set equal to the maximum TB size. For example, the VPDU size may be 64x64 (64x64 luminance samples) size. However, this is an example, and the VPDU size may be changed (increased or decreased) in consideration of the TT and/or BT partition described above. In this document, an MxN block may represent a block including samples consisting of M columns and N rows.
도 8은 본 명세서의 실시예에 따른 TT(ternary tree) 및 BT(binary tree) 분할이 제한되는 경우의 예를 도시한다. VPDU 사이즈를 64x64 휘도 샘플들 사이즈로 유지하기 위하여, 도 8에 도시된 것과 같이 아래와 같은 제한들 중 적어도 하나가 적용될 수 있다.8 shows an example of a case in which the ternary tree (TT) and the binary tree (BT) are divided according to an embodiment of the present specification. In order to maintain the VPDU size at 64x64 luminance samples size, at least one of the following restrictions may be applied as illustrated in FIG. 8.
- 너비(width) 또는 높이(height), 또는 너비와 높이 모두가 128인 CU에 대한 TT 분할은 허용되지 않는다(TT split is not allowed for a CU with either width or height, or both width and height equal to 128).-TT split is not allowed for a CU with either width or height, or both width and height equal to the width or height, or for a CU with both width and height equal to 128. 128).
- 128xN(N <= 64)(즉, 너비가 128이고 높이가 128보다 작은) CU에 대한 수평 BT는 허용되지 않는다(For a 128xN CU with N <= 64 (i.e. width equal to 128 and height smaller than 128), horizontal BT is not allowed).-For a 128xN CU with N <= 64 (ie width equal to 128 and height smaller than) 128xN (N <= 64) (i.e., width 128 and height less than 128) CU 128), horizontal BT is not allowed).
- Nx128(N <= 64)(즉, 높이가 128이고 너비가 128보다 작은) CU에 대한 수직 BT는 허용되지 않는다(For an Nx128 CU with N <= 64 (i.e. height equal to 128 and width smaller than 128), vertical BT is not allowed).-For an Nx128 CU with N <= 64 (ie height equal to 128 and width smaller than) Nx128 (N <= 64) (i.e., the height is 128 and the width is less than 128) 128), vertical BT is not allowed).
도 9는 본 명세서의 실시예에 따른 엔트로피 인코딩을 위한 블록도이다. 도 9의 블록도는 도 2의 엔트로피 인코딩부(190)의 일 예에 해당한다.9 is a block diagram for entropy encoding according to an embodiment of the present specification. The block diagram of FIG. 9 corresponds to an example of the entropy encoding unit 190 of FIG. 2.
도 2에서 설명된 바와 같이 비디오/영상 정보의 일부 또는 전부는 엔트로피 인코딩부(190)에 의하여 엔트로피 인코딩될 수 있고, 도 3에서 설명된 것과 같이 비디오/영상 정보의 일부 또는 전부는 엔트로피 디코딩부(210)에 의하여 엔트로피 디코딩될 수 있다. 이 경우 상기 비디오/영상 정보는 신텍스 요소 단위로 인코딩/디코딩될 수 있다. 본 문서에서 정보가 인코딩/디코딩된다 함은 본 단락에서 설명되는 방법에 의하여 인코딩/디코딩되는 것을 포함할 수 있다.As described in FIG. 2, some or all of the video/video information may be entropy-encoded by the entropy encoding unit 190, and as described in FIG. 3, some or all of the video/video information is an entropy decoding unit ( 210) can be entropy decoded. In this case, the video/video information may be encoded/decoded in units of syntax elements. In this document, that information is encoded/decoded may include encoding/decoding by the method described in this paragraph.
도 9는 하나의 신택스 요소를 부호화하기 위한 CABAC의 블록도를 보여준다. CABAC의 인코딩 과정은 먼저 입력 신호가 이진 값이 아닌 신택스 요소인 경우에 이진화(binarization)를 통해 입력 신호를 이진 값으로 변환한다. 입력 신호가 이미 이진 값인 경우에는 이진화를 거치지 않고 바이패스 된다. 여기서, 이진 값을 구성하는 각각의 이진수 0 또는 1을 빈(bin)이라고 한다. 예를 들어, 이진화된 후의 이진 스트링(빈 스트링)이 110인 경우, 1, 1, 0 각각을 하나의 빈이라고 한다. 하나의 구문요소에 대한 상기 빈(들)은 해당 신택스 요소의 값을 나타낼 수 있다.9 shows a block diagram of CABAC for encoding one syntax element. The encoding process of CABAC first converts the input signal into a binary value through binarization when the input signal is a syntax element rather than a binary value. If the input signal is already binary, it is bypassed without going through binarization. Here, each binary number 0 or 1 constituting the binary value is called a bin. For example, if the binary string (empty string) after binarization is 110, each of 1, 1, and 0 is referred to as one bin. The bin(s) for one syntax element may represent a value of a corresponding syntax element.
이진화된 빈들은 정규(regular) 코딩 엔진 또는 바이패스 코딩 엔진으로 입력된다. 정규 코딩 엔진은 해당 빈에 대해 확률 값을 반영하는 문맥(context) 모델을 할당하고, 할당된 문맥 모델에 기반해 해당 빈을 부호화한다. 정규 코딩 엔진은 각 빈에 대한 코딩을 수행한 뒤에 해당 빈에 대한 확률 모델을 갱신할 수 있다. 이렇게 코딩되는 빈들을 문맥 코딩된 빈(context-coded bin)이라 한다. 바이패스 코딩 엔진은 입력된 빈에 대해 확률을 추정하는 절차와 코딩 후에 해당 빈에 적용했던 확률 모델을 갱신하는 절차를 생략한다. 문맥을 할당하는 대신 균일한 확률 분포(예: 50:50)를 적용해 입력되는 빈을 코딩함으로써 코딩 속도를 향상시킨다. 이렇게 코딩되는 빈들을 바이패스 빈(bypass bin)이라 한다. 문맥 모델은 문맥 코딩(정규 코딩)되는 빈 별로 할당 및 업데이트될 수 있으며, 문맥 모델은 ctxidx 또는 ctxInc를 기반으로 지시될 수 있다. ctxidx는 ctxInc를 기반으로 도출될 수 있다. 구체적으로 예를 들어, 정규 코딩되는 빈들 각각에 대한 문맥 모델을 가리키는 컨텍스트 인덱스(ctxidx)는 context index increment (ctxInc) 및 context index offset (ctxIdxOffset)의 합으로 도출될 수 있다. 여기서 ctxInc는 각 빈별로 다르게 도출될 수 있다. ctxIdxOffset는 ctxIdx의 최소값(the lowest value)으로 나타내어질 수 있다. ctxIdx의 최소값은 ctxIdx의 초기값(initValue)으로 지칭될 수 있다 수 있다. ctxIdxOffset은 일반적으로 다른 신택스 요소에 대한 문맥 모델들과의 구분을 위하여 이용되는 값으로, 하나의 신택스 요소에 대한 문맥 모델은 ctxinc를 기반으로 구분/도출될 수 있다.The binarized bins are input into a regular coding engine or a bypass coding engine. The regular coding engine allocates a context model that reflects a probability value to the corresponding bin, and encodes the corresponding bin based on the allocated context model. The regular coding engine may update the probability model for the corresponding bin after performing coding for each bin. Bins coded in this way are called context-coded bins. The bypass coding engine omits the procedure of estimating the probability for the input bin and the procedure of updating the probability model applied to the corresponding bin after coding. Instead of allocating context, a uniform probability distribution (eg, 50:50) is applied to code the input bins to improve coding speed. Bins coded in this way are called bypass bins. The context model may be allocated and updated for each bin to be context-coded (regularly coded), and the context model may be indicated based on ctxidx or ctxInc. ctxidx can be derived based on ctxInc. Specifically, for example, a context index (ctxidx) indicating a context model for each of the regularly coded bins may be derived as a sum of a context index increment (ctxInc) and a context index offset (ctxIdxOffset). Here, ctxInc may be derived differently for each bin. ctxIdxOffset may be represented by the lowest value of ctxIdx. The minimum value of ctxIdx may be referred to as an initial value (initValue) of ctxIdx. ctxIdxOffset is a value generally used to distinguish context models for other syntax elements, and a context model for one syntax element may be classified/derived based on ctxinc.
엔트로피 인코딩 절차에서 정규 코딩 엔진을 통해 인코딩을 수행할 것인지, 바이패스 코딩 엔진을 통해 인코딩을 수행할 것인지가 결정되고, 코딩 경로가 스위칭될 수 있다. 엔트로피 디코딩은 엔트로피 인코딩과 동일한 과정을 역순으로 수행한다.In the entropy encoding procedure, it is determined whether encoding is performed through a regular coding engine or a bypass coding engine, and a coding path may be switched. Entropy decoding performs the same process as entropy encoding in reverse order.
도 10a 및 도 10b는 본 명세서의 실시예에 따른 엔트로피 인코딩 방법 및 관련 컴포넌트를 도시한다.10A and 10B illustrate an entropy encoding method and related components according to an embodiment of the present specification.
도 10b를 참조하면, 인코딩 장치(100)(엔트로피 인코딩부(190))는 영상/비디오 정보에 관한 엔트로피 코딩 절차를 수행한다. 영상/비디오 정보는 파티셔닝 관련 정보, 예측 관련 정보(예: 인터/인트라 예측 구분 정보, 인트라 예측 모드 정보, 인터 예측 모드 정보), 레지듀얼 정보, 인루프 필터링 관련 정보를 포함할 수 있고, 또는 그에 관한 다양한 신택스 요소들을 포함할 수 있다. 엔트로피 코딩은 신택스 요소 단위로 수행될 수 있다. 도 10a의 S1010 내지 S1020 단계는 상술한 도 2의 인코딩 장치(100)의 엔트로피 인코딩부(190)에 의하여 수행될 수 있다.Referring to FIG. 10B, the encoding apparatus 100 (entropy encoding unit 190) performs an entropy coding procedure for image/video information. The image/video information may include partitioning related information, prediction related information (eg, inter/intra prediction classification information, intra prediction mode information, inter prediction mode information), residual information, and in-loop filtering related information, or It can contain various syntax elements for. Entropy coding may be performed in units of syntax elements. Steps S1010 to S1020 of FIG. 10A may be performed by the entropy encoding unit 190 of the encoding apparatus 100 of FIG. 2 described above.
인코딩 장치(100)는 대상 신택스 요소에 대한 이진화를 수행한다(S1010). 여기서 이진화는 Truncated Rice binarization process, Fixed-length binarization process와 같은 다양한 이진화 방법에 기반할 수 있으며, 대상 신택스 요소에 대한 이진화 방법은 미리 정의될 수 있다. 이진화 절차는 엔트로피 인코딩부(190) 내의 이진화부(192)에 의하여 수행될 수 있다.The encoding device 100 performs binarization on the target syntax element (S1010). Here, binarization may be based on various binarization methods such as a Truncated Rice binarization process and a fixed-length binarization process, and a binarization method for the target syntax element may be predefined. The binarization procedure may be performed by the binarization unit 192 in the entropy encoding unit 190.
인코딩 장치(100)는 대상 신텍스 요소에 대한 엔트로피 인코딩을 수행한다(S1020). 인코딩 장치(100)는 CABAC 또는 CAVLC과 같은 엔트로피 코딩 기법을 기반으로 대상 신택스 요소의 빈 스트링을 정규 코딩 기반(컨텍스트 기반) 또는 바이패스 코딩 기반 인코딩할 수 있으며, 그 출력은 비트스트림에 포함될 수 있다. 엔트로피 인코딩 절차는 엔트로피 인코딩부(190) 내의 엔트로피 인코딩 처리부(193)에 의하여 수행될 수 있다. 비트스트림은 (디지털) 저장매체 또는 네트워크를 통하여 디코딩 장치로 전달될 수 있음을 전술한 바와 같다.The encoding device 100 performs entropy encoding on the target syntax element (S1020). The encoding apparatus 100 may encode an empty string of a target syntax element based on an entropy coding technique such as CABAC or CAVLC based on normal coding (context based) or bypass coding, and the output may be included in a bitstream. . The entropy encoding procedure may be performed by the entropy encoding processing unit 193 in the entropy encoding unit 190. As described above, the bitstream can be delivered to a decoding device through a (digital) storage medium or a network.
도 11a 및 도 11b는 본 명세서의 실시예에 따른 엔트로피 디코딩 방법 및 관련 컴포넌트를 도시한다.11A and 11B illustrate an entropy decoding method and related components according to an embodiment of the present specification.
도 11b를 참조하면, 디코딩 장치(200)(엔트로피 디코딩부(210))는 인코딩된 영상/비디오 정보를 디코딩할 수 있다. 상기 영상/비디오 정보는 파티셔닝 관련 정보, 예측 관련 정보(예: 인터/인트라 예측 구분 정보, 인트라 예측 모드 정보, 인터 예측 모드 정보), 레지듀얼 정보, 인루프 필터링 관련 정보를 포함할 수 있고, 또는 그에 관한 다양한 신택스 요소들을 포함할 수 있다. 엔트로피 코딩은 신텍스 요소 단위로 수행될 수 있다. S1110 단계 내지 S1120 단계는 상술한 도 3의 디코딩 장치(200)의 엔트로피 디코딩부(210)에 의하여 수행될 수 있다. Referring to FIG. 11B, the decoding apparatus 200 (entropy decoding unit 210) may decode encoded image/video information. The image/video information may include partitioning related information, prediction related information (eg, inter/intra prediction classification information, intra prediction mode information, inter prediction mode information), residual information, and in-loop filtering related information, or It can contain various syntax elements related to it. Entropy coding may be performed in units of syntax elements. Steps S1110 to S1120 may be performed by the entropy decoding unit 210 of the decoding apparatus 200 of FIG. 3 described above.
디코딩 장치(200)는 대상 신택스 요소에 대한 이진화를 수행한다(S1110). 이진화는 Truncated Rice binarization process, Fixed-length binarization process와 같은 다양한 이진화 방법에 기반할 수 있으며, 대상 신택스 요소에 대한 이진화 방법은 미리 정의될 수 있다. 디코딩 장치는 이진화 절차를 통하여 대상 신택스 요소의 가용 값들에 대한 가용 빈 스트링들(빈 스트링 후보들)을 도출할 수 있다. 이진화 절차는 엔트로피 디코딩부(210) 내의 이진화부(212)에 의하여 수행될 수 있다.The decoding apparatus 200 performs binarization on the target syntax element (S1110). Binarization can be based on various binarization methods such as the Truncated Rice binarization process and the Fixed-length binarization process, and the binarization method for the target syntax element can be predefined. The decoding apparatus may derive available bin strings (empty string candidates) for available values of a target syntax element through a binarization procedure. The binarization procedure may be performed by the binarization unit 212 in the entropy decoding unit 210.
디코딩 장치(200)는 대상 신택스 요소에 대한 엔트로피 디코딩을 수행한다(S1220). 디코딩 장치(200)는 비트스트림 내 입력 비트(들)로부터 상대상 신택스 요소에 대한 각 빈들을 순차적으로 디코딩 및 파싱하면서, 도출된 빈 스트링을 해당 신택스 요소에 대한 가용 빈 스트링들과 비교한다. 만약 도출된 빈 스트링이 상기 가용 빈 스트링들 중 하나와 같으면, 해당 빈 스트링에 대응하는 값이 해당 신택스 요소의 값으로 도출된다. 만약, 그렇지 않으면, 비트스트림 내 다음 비트를 더 파싱 후 상술한 절차를 다시 수행한다. 이러한 과정을 통하여 비트스트림 내에 특정 정보(특정 신텍스 요소)에 대한 시작 비트나 끝 비트를 사용하지 않고도 가변 길이 비트를 이용하여 해당 정보를 시그널링할 수 있다. 이를 통하여 낮은 값에 대하여는 상대적으로 더 적은 비트를 할당할 수 있으며, 전반적인 코딩 효율을 높일 수 있다.The decoding apparatus 200 performs entropy decoding on the target syntax element (S1220). The decoding apparatus 200 sequentially decodes and parses each bin for a relative syntax element from the input bit(s) in the bitstream, and compares the derived bin string with the available bin strings for the corresponding syntax element. If the derived empty string is the same as one of the available empty strings, a value corresponding to the corresponding empty string is derived as a value of the corresponding syntax element. If not, the next bit in the bitstream is further parsed and the above-described procedure is performed again. Through this process, the information can be signaled using variable length bits without using a start bit or an end bit for specific information (specific syntax element) in the bitstream. Through this, relatively fewer bits can be allocated to a low value, and overall coding efficiency can be improved.
디코딩 장치(200)는 CABAC 또는 CAVLC과 같은 엔트로피 코딩 기법을 기반으로 비트스트림으로부터 빈 스트링 내 각 빈들을 컨텍스트 기반하거나 또는 바이패스 기반하여 디코딩할 수 있다. 비트스트림은 상술한 바와 같이 영상/비디오 디코딩을 위한 다양한 정보를 포함할 수 있다. 비트스트림은 (디지털) 저장매체 또는 네트워크를 통하여 디코딩 장치로 전달될 수 있음을 전술한 바와 같다.The decoding apparatus 200 may decode each bin in the bin string from the bitstream based on an entropy coding technique such as CABAC or CAVLC based on context or bypass. As described above, the bitstream may include various information for video/video decoding. As described above, the bitstream can be delivered to a decoding device through a (digital) storage medium or a network.
영상/비디오 코딩 절차Video/video coding procedure
영상/비디오 코딩에 있어서, 영상/비디오를 구성하는 픽처는 일련의 디코딩 순서(decoding order)에 따라 인코딩/디코딩될 수 있다. 디코딩된 픽처의 출력 순서(output order)에 해당하는 픽처 순서(picture order)는 디코딩 순서와 다르게 설정될 수 있으며, 이를 기반으로 인터 예측시 순방향 예측뿐만 아니라 역방향 예측 또한 수행될 수 있다.In video/video coding, pictures constituting the video/video may be encoded/decoded according to a series of decoding orders. A picture order corresponding to an output order of a decoded picture may be set differently from a decoding order, and based on this, not only forward prediction but also backward prediction may be performed during inter prediction.
도 12는 본 명세서의 실시예에 따른 비디오 신호를 구성하는 픽처의 인코딩을 위한 흐름도의 예이다. 도 12에서 S1210 단계는 도 2에서 설명된 인코딩 장치(100)의 예측부(180, 185)에 의해 수행될 수 있고, S1220 단계는 레지듀얼 처리부(115, 120, 130)에 의해 수행될 수 있고, S1230 단계는 엔트로피 인코딩부(190)에 의해 수행될 수 있다. S1210 단계는 본 문서에서 설명되는 인터/인트라 예측 절차를 포함할 수 있고, S1220 단계는 본 문서에서 설명되는 레지듀얼 처리 절차를 포함할 수 있고, S1230 단계는 본 문서에서 설명되는 정보 인코딩 절차를 포함할 수 있다.12 is an example of a flowchart for encoding a picture constituting a video signal according to an embodiment of the present specification. In FIG. 12, step S1210 may be performed by the prediction units 180 and 185 of the encoding apparatus 100 described in FIG. 2, and step S1220 may be performed by the residual processing units 115, 120, and 130. , S1230 may be performed by the entropy encoding unit 190. Step S1210 may include an inter/intra prediction procedure described in this document, step S1220 may include a residual processing procedure described in this document, and step S1230 includes an information encoding procedure described in this document. can do.
도 12를 참조하면, 픽처 인코딩 절차는 도 2에서 설명된 것과 같이 개략적으로 픽처 복원을 위한 정보(예: 예측 정보, 레지듀얼 정보, 파티셔닝 정보)를 인코딩함으로써 비트스트림 형태로 출력하는 절차뿐만 아니라, 현재 픽처에 대한 복원 픽처를 생성하는 절차 및 복원 픽처에 인루프 필터링을 적용하는 절차(optional)를 포함할 수 있다. 인코딩 장치(100)는 역양자화부(140) 및 역변환부(150)를 통해 양자화된 변환 계수로부터 (수정된) 레지듀얼 샘플들을 도출할 수 있으며, S1210 단계의 출력에 해당하는 예측 샘플들과 (수정된) 레지듀얼 샘플들에 기반하여 복원 픽처를 생성할 수 있다. 이렇게 생성된 복원 픽처는 상술한 디코딩 장치(200)에서 생성된 복원 픽처와 동일할 수 있다. 복원 픽처에 대한 인루프 필터링 절차를 통하여 수정된 복원 픽처가 생성될 수 있으며, 이는 메모리(170)(DPB(175))에 저장될 수 있으며, 디코딩 장치(200)에서의 경우와 마찬가지로, 이후 픽처의 인코딩시 인터 예측 절차에서 참조 픽처로 사용될 수 있다. 상술한 바와 같이 경우에 따라 인루프 필터링 절차의 일부 또는 전부는 생략될 수 있다. 인루프 필터링 절차가 수행되는 경우, (인루프) 필터링 관련 정보(파라미터)가 엔트로피 인코딩부(190)에서 인코딩되어 비트스트림 형태로 출력될 수 있고, 디코딩 장치(200)는 필터링 관련 정보를 기반으로 인코딩 장치(100)와 동일한 방법으로 인루프 필터링 절차를 수행할 수 있다.Referring to FIG. 12, the picture encoding procedure is not only a procedure of encoding information for picture restoration (eg, prediction information, residual information, partitioning information) schematically as described in FIG. 2 to output in a bitstream form, A procedure for generating a reconstructed picture for the current picture and a procedure for applying in-loop filtering to the reconstructed picture (optional) may be included. The encoding apparatus 100 may derive (modified) residual samples from the quantized transform coefficients through the inverse quantization unit 140 and the inverse transform unit 150, and predictive samples corresponding to the output of step S1210 and ( A reconstructed picture may be generated based on the modified) residual samples. The reconstructed picture generated in this way may be the same as the reconstructed picture generated by the decoding apparatus 200 described above. A modified reconstructed picture can be generated through an in-loop filtering procedure for the reconstructed picture, which can be stored in the memory 170 (DPB 175), and, as in the case of the decoding device 200, a subsequent picture It can be used as a reference picture in an inter prediction procedure upon encoding of. As described above, in some cases, some or all of the in-loop filtering procedure may be omitted. When the in-loop filtering procedure is performed, (in-loop) filtering-related information (parameters) may be encoded by the entropy encoding unit 190 and output in the form of a bitstream, and the decoding apparatus 200 The in-loop filtering procedure may be performed in the same manner as the encoding apparatus 100.
이러한 인루프 필터링 절차를 통하여 블로킹 아티팩스(artifact) 및 링잉(ringing) 아티팩트와 같은 영상/동영상 코딩시 발생하는 노이즈가 감소될 수 있으며, 주관적/객관적 비주얼 퀄리티가 개선될 수 있다. 또한, 인코딩 장치(100)와 디코딩 장치(200)가 모두 인루프 필터링 절차를 수행함으로써, 인코딩 장치(100)와 디코딩 장치(200)는 동일한 예측 결과를 도출할 수 있으며, 그리하여 픽처 코딩의 신뢰성이 향상되고, 픽처 코딩을 위하여 전송되는 데이터 량이 감소될 수 있다.Through this in-loop filtering procedure, noise generated during video/video coding such as blocking artifacts and ringing artifacts can be reduced, and subjective/objective visual quality can be improved. In addition, since both the encoding device 100 and the decoding device 200 perform an in-loop filtering procedure, the encoding device 100 and the decoding device 200 can derive the same prediction result, so that the reliability of picture coding is This can be improved and the amount of data transmitted for picture coding can be reduced.
도 13은 본 명세서의 실시예에 따른 비디오 신호를 구성하는 픽처의 디코딩을 위한 흐름도의 예이다. S1310 단계는 도 3의 디코딩 장치(200)에서의 엔트로피 디코딩부(210)에 의해 수행될 수 있고, S1320 단계는 예측부(260, 265)에 의해 수행될 수 있고, S1330 단계는 레지듀얼 처리부(220, 230)에 의해 수행될 수 있고, S1340 단계는 가산부(235)에 의해 수행될 수 있고, S1350 단계는 필터링부(240)에 의해 수행될 수 있다. S1310 단계는 본 문서에서 설명된 정보 디코딩 절차를 포함할 수 있고, S1320 단계는 본 문서에서 설명된 인터/인트라 예측 절차를 포함할 수 있고, S1330 단계는 본 문서에서 설명된 레지듀얼 처리 절차를 포함할 수 있고, S1340 단계는 본 문서에서 설명된 블록/픽처 복원 절차를 포함할 수 있고, S1350 단계는 본 문서에서 설명된 인루프 필터링 절차를 포함할 수 있다.13 is an example of a flowchart for decoding a picture constituting a video signal according to an embodiment of the present specification. Step S1310 may be performed by the entropy decoding unit 210 of the decoding apparatus 200 of FIG. 3, step S1320 may be performed by the prediction units 260 and 265, and step S1330 may be performed by the residual processing unit ( 220, 230), step S1340 may be performed by the addition unit 235, step S1350 may be performed by the filtering unit 240. Step S1310 may include the information decoding procedure described in this document, step S1320 may include the inter/intra prediction procedure described in this document, and step S1330 includes the residual processing procedure described in this document. In addition, step S1340 may include the block/picture restoration procedure described in this document, and step S1350 may include the in-loop filtering procedure described in this document.
도 13을 참조하면, 픽처 디코딩 절차는 도 2에서 설명된 것과 같이 개략적으로 비트스트림으로부터 (디코딩을 통한) 영상/비디오 정보 획득 절차(S1310), 픽처 복원 절차(S1320 내지 S1340), 및 복원된 픽처에 대한 인루프 필터링 절차(S1350)를 포함할 수 있다. 픽처 복원 절차는 본 문서에서 설명된 인터/인트라 예측(S1320) 및 레지듀얼 처리(S1330, 양자화된 변호나 계수에 대한 역양자화, 역변환) 과정을 거쳐서 획득된 예측 샘플들 및 레지듀얼 샘플들을 기반으로 수행될 수 있다. 픽처 복원 절차를 통하여 생성된 복원 픽처에 대한 인루프 필터링 절차를 통하여 수정된(modified) 복원 픽처가 생성될 수 있으며, 수정된 복원 픽처가 디코딩된 픽처로서 출력될 수 있고, 또한 디코딩 장치(200)의 DPB(255)에 저장되어 이후 픽처의 디코딩시 인터 예측 철차에서 참조 픽처로 사용될 수 있다. 경우에 따라서 인루프 필터링 절차는 생략될 수 있으며, 이 경우 복원 픽처가 디코딩된 픽처로서 출력될 수 있고, 디코딩 장치(200)의 DPB(255)에 저장되어 이후 픽처의 디코딩시 인터 예측 철차에서 참조 픽처로 사용될 수 있다. 인루프 필터링 절차(S1350)는 상술한 바와 같이 디블로킹 필터링 절차, SAO(sample adaptive offset) 절차, ALF(adaptive loop filter) 절차, 및/또는 바이래터럴 필터(bi-lateral filter) 절차를 포함할 수 있고, 그 일부 또는 전부가 생략될 수 있다. 또한, 디블로킹 필터링 절차, SAO 절차, ALF 절차, 및 바이래터럴 필터 절차들 중 하나 또는 일부가 순차적으로 적용될 수 있고, 또는 모두가 순차적으로 적용될 수 있다. 예를 들어, 복원 픽처에 대하여 디블로킹 필터링 절차가 적용된 후 SAO 절차가 수행될 수 있다. 또한, 예를 들어, 복원 픽처에 대하여 디블로킹 필터링 절차가 적용된 후 ALF 절차가 수행될 수 있다. 이는 인코딩 장치(100)에서도 마찬가지로 수행될 수 있다.Referring to FIG. 13, the picture decoding procedure is a procedure for obtaining image/video information (through decoding) from a bitstream (S1310), a picture restoration procedure (S1320 to S1340), and a reconstructed picture, as described in FIG. It may include an in-loop filtering procedure (S1350) for. The picture restoration procedure is based on prediction samples and residual samples obtained through the process of inter/intra prediction (S1320) and residual processing (S1330, inverse quantization and inverse transformation of a quantized code or coefficient) described in this document. Can be done. A modified reconstructed picture may be generated through an in-loop filtering procedure for a reconstructed picture generated through a picture restoration procedure, and the modified reconstructed picture may be output as a decoded picture, and the decoding apparatus 200 It is stored in the DPB 255 of and can be used as a reference picture in inter prediction train when decoding a picture later. In some cases, the in-loop filtering procedure may be omitted, and in this case, the reconstructed picture may be output as a decoded picture, stored in the DPB 255 of the decoding device 200, and referenced in the inter prediction train when decoding a subsequent picture. Can be used as a picture. The in-loop filtering procedure S1350 may include a deblocking filtering procedure, a sample adaptive offset (SAO) procedure, an adaptive loop filter (ALF) procedure, and/or a bi-lateral filter procedure as described above. And some or all of them may be omitted. In addition, one or some of the deblocking filtering procedure, the SAO procedure, the ALF procedure, and the bilateral filter procedure may be sequentially applied, or all may be sequentially applied. For example, after the deblocking filtering procedure is applied to the reconstructed picture, the SAO procedure may be performed. Also, for example, after the deblocking filtering procedure is applied to the reconstructed picture, the ALF procedure may be performed. This may be similarly performed in the encoding device 100.
상술한 바와 같이 디코딩 장치(200)뿐만 아니라 인코딩 장치(100)에서도 픽처 복원 절차가 수행될 수 있다. 각 블록 단위로 인트라 예측/인터 예측에 기반하여 복원 블록이 생성될 수 있으며, 복원 블록들을 포함하는 복원 픽처가 생성될 수 있다. 현재 픽처/슬라이스/타일 그룹이 I 픽처/슬라이스/타일 그룹인 경우 현재 픽처/슬라이스/타일 그룹에 포함되는 블록들은 인트라 예측만을 기반으로 복원될 수 있다. 이 경우 현재 픽처/슬라이스/타일 그룹 내 일부 블록들에 대하여 인터 예측이 적용되고, 나머지 일부 블록들에 대하여 인트라 예측이 적용될 수 있다. 픽처의 컬러 성분은 휘도 성분 및 색차 성분을 포함할 수 있으며, 본 문서에서 명시적으로 제한하지 않으면 본 문서에서 제안되는 방법들 및 실시예들은 휘도 성분 및 색차 성분에 적용될 수 있다.As described above, not only the decoding device 200 but also the encoding device 100 may perform a picture restoration procedure. A reconstructed block may be generated based on intra prediction/inter prediction for each block, and a reconstructed picture including the reconstructed blocks may be generated. When the current picture/slice/tile group is an I picture/slice/tile group, blocks included in the current picture/slice/tile group may be reconstructed based only on intra prediction. In this case, inter prediction may be applied to some blocks in the current picture/slice/tile group, and intra prediction may be applied to the remaining some blocks. The color component of a picture may include a luminance component and a chrominance component, and the methods and embodiments proposed in this document may be applied to the luminance component and the chrominance component unless explicitly limited in this document.
코딩 계층 및 구조의 예Example of coding hierarchy and structure
도 14는 본 명세서의 실시예에 따른 코딩된 영상에 대한 계층 구조의 예를 도시한다.14 illustrates an example of a hierarchical structure for a coded image according to an embodiment of the present specification.
코딩된 영상은 영상의 디코딩 처리 및 그 자체를 다루는 VCL(video coding layer), 부호화된 정보를 전송하고 저장하는 하위 시스템, 그리고 VCL과 하위 시스템 사이에 존재하며 네트워크 적응 기능을 담당하는 NAL(network abstraction layer)로 구분될 수 있다. The coded image is a video coding layer (VCL) that deals with the decoding process of the image and itself, a subsystem that transmits and stores encoded information, and a network abstraction (NAL) that exists between the VCL and the subsystem and is responsible for network adaptation. layer).
VCL에서 압축된 영상 데이터(타일 그룹 데이터)를 포함하는 VCL 데이터가 생성되거나, 또는 PPS(picture parameter set), SPS(sequence parameter set), VPS(video parameter set)과 같은 정보를 포함하는 파라미터 세트 또는 영상의 디코딩 과정에서 부가적으로 필요한 SEI(supplemental enhancement information) 메시지가 생성될 수 있다.VCL data including video data (tile group data) compressed in the VCL is generated, or a parameter set including information such as PPS (picture parameter set), SPS (sequence parameter set), VPS (video parameter set), or An additionally required SEI (supplemental enhancement information) message may be generated in the process of decoding an image.
NAL에서 VCL에서 생성된 RBSP(raw byte sequence payload)에 헤더 정보(NAL 유닛 데이터)가 부가되어 NAL 유닛이 생성될 수 있다. 이때, RBSP는 VCL에서 생성된 타일 그룹 데이터, 파라미터 세트, SEI 메시지를 지칭할 수 있다. NAL 유닛 헤더에서 해당 NAL 유닛에 포함되는 RBSP 데이터에 따라 특정되는 NAL 유닛 타입 정보를 포함할 수 있다.In NAL, header information (NAL unit data) may be added to a raw byte sequence payload (RBSP) generated in VCL to generate a NAL unit. In this case, the RBSP may refer to tile group data, parameter set, and SEI message generated in the VCL. In the NAL unit header, NAL unit type information specified according to RBSP data included in the corresponding NAL unit may be included.
도 9에서 도시된 것과 같이, NAL 유닛은 VCL에서 생성된 RBSP에 따라 VCL NAL 유닛과 Non-VCL NAL 유닛으로 구분될 수 있다. VCL NAL 유닛은 영상에 대한 정보(타일 그룹 데이터)를 포함하고 있는 NAL 유닛을 의미할 수 있고, Non-VCL NAL 유닛은 영상을 디코딩하기 위하여 필요한 정보(파라미터 세트 또는 SEI 메시지)를 포함하고 있는 NAL 유닛을 의미할 수 있다. As shown in FIG. 9, the NAL unit may be divided into a VCL NAL unit and a Non-VCL NAL unit according to an RBSP generated from VCL. The VCL NAL unit may mean a NAL unit that includes information about an image (tile group data), and the Non-VCL NAL unit is an NAL that includes information (parameter set or SEI message) necessary for decoding an image. It can mean a unit.
상술한 VCL NAL 유닛, Non-VCL NAL 유닛은 하위 시스템의 데이터 규격에 따라 헤더 정보가 부가된 상태로 네트워크를 통해 전송될 수 있다. 예를 들어, NAL 유닛은 H.266/VVC 파일 포맷, RTP(real-time transport protocol), TS(transport stream)과 같은 소정 규격의 데이터 형태로 변환된 이후 다양한 네트워크를 통해 전송될 수 있다.The above-described VCL NAL unit and Non-VCL NAL unit may be transmitted through a network with header information added according to the data standard of the sub-system. For example, the NAL unit may be converted into a data format of a predetermined standard such as an H.266/VVC file format, a real-time transport protocol (RTP), and a transport stream (TS) and then transmitted through various networks.
상술한 바와 같이, NAL 유닛은 해당 NAL 유닛에 포함되는 RBSP 데이터 구조에 따라 NAL 유닛 타입이 특정될 수 있으며, 이러한 NAL 유닛 타입에 대한 정보는 NAL 유닛 헤더에 저장되어 시그널링될 수 있다.As described above, the NAL unit type may be specified according to the RBSP data structure included in the corresponding NAL unit, and information on the NAL unit type may be stored in the NAL unit header and signaled.
예를 들어, NAL 유닛은 영상에 대한 정보(타일 그룹 데이터)를 포함하는지 여부에 따라 크게 VCL NAL 유닛 타입과 Non-VCL NAL 유닛 타입으로 분류될 수 있다. VCL NAL 유닛 타입은 VCL NAL 유닛이 포함하는 픽처의 성질 및 종류에 따라 분류도리 수 있으며, Non-VCL NAL 유닛 타입은 파라미터 세트의 종류에 따라 분류될 수 있다.For example, the NAL unit may be largely classified into a VCL NAL unit type and a Non-VCL NAL unit type according to whether or not information on an image (tile group data) is included. The VCL NAL unit type may be classified according to the nature and type of a picture included in the VCL NAL unit, and the non-VCL NAL unit type may be classified according to the type of the parameter set.
아래는 Non-VCL NAL 유닛 타입이 포함하는 파라미터 세트의 종류에 따라 특정된 NAl 유닛 타입의 일 예이다.The following is an example of the NAl unit type specified according to the type of the parameter set included in the Non-VCL NAL unit type.
- APS(Adaptation Parameter Set) NAL unit: APS를 포함하는 NAL 유닛에 대한 타입-APS (Adaptation Parameter Set) NAL unit: A type for a NAL unit including APS
- VPS(Video Parameter Set) NAL unit: VPS를 포함하는 NAL 유닛에 대한 타입-Video Parameter Set (VPS) NAL unit: A type for a NAL unit including a VPS
- SPS(Sequence Parameter Set) NAL unit: SPS를 포함하는 NAL 유닛에 대한 타입-SPS (Sequence Parameter Set) NAL unit: a type for a NAL unit including SPS
- PPS(Picture Parameter Set) NAL unit: PPS를 포함하는 NAL 유닛에 대한 타입-PPS (Picture Parameter Set) NAL unit: A type for a NAL unit including PPS
상술한 NAL 유닛 타입들은 NAL 유닛 타입을 위한 신택스 정보를 가지며, 신택스 정보는 NAL 유닛 헤더에 저장되어 시그널링될 수 있다. 예를 들어, 신택스 정보는 nal_unit_type일 수 있으며, NAL 유닛 타입들은 nal_unit_type 값에 의해 특정될 수 있다.The above-described NAL unit types have syntax information for the NAL unit type, and the syntax information may be stored in the NAL unit header and signaled. For example, syntax information may be nal_unit_type, and NAL unit types may be specified by nal_unit_type values.
타일 그룹 헤더(타일 그룹 헤더 신택스)는 타일 그룹에 공통적으로 적용될 수 있는 정보/파라미터를 포함할 수 있다. APS(APS 신택스) 또는 PPS(PPS 신택스)는 하나 이상의 픽처에 공통적으로 적용될 수 있는 정보/파라미터를 포함할 수 있다. SPS(SPS 신택스)는 하나 이상의 시퀀스에 공통적으로 적용될 수 있는 정보/파라미터를 포함할 수 있다. VPS(VPS 신택스)는 비디오 전반에 공통적으로 적용될 수 있는 정보/파라미터를 포함할 수 있다. 본 명세서에서 상위 레벨 신택스라 함은 APS 신택스, PPS 신택스, SPS 신택스, VPS 신택스 중 적어도 하나를 포함할 수 있다. The tile group header (tile group header syntax) may include information/parameters commonly applicable to the tile group. APS (APS syntax) or PPS (PPS syntax) may include information/parameters that can be commonly applied to one or more pictures. SPS (SPS syntax) may include information/parameters that can be commonly applied to one or more sequences. VPS (VPS syntax) may include information/parameters that can be commonly applied to the entire video. In this specification, the higher-level syntax may include at least one of APS syntax, PPS syntax, SPS syntax, and VPS syntax.
본 명세서에서 인코딩 장치(100)에서 디코딩 장치(200)로 인코딩되어 비트스트림 형태로 시그널링되는 영상/비디오 정보는 픽처 내 파티셔닝 관련 정보, 인트라/인터 예측 정보, 레지듀얼 정보, 인루프 필터링 정보를 포함할 뿐만 아니라, APS에 포함된 정보, PPS에 포함된 정보, SPS에 포함된 정보, 및/또는 VPS에 포함된 정보를 포함할 수 있다.In this specification, the image/video information encoded by the encoding device 100 by the decoding device 200 and signaled in the form of a bitstream includes intra-picture partitioning-related information, intra/inter prediction information, residual information, and in-loop filtering information. In addition, information included in the APS, information included in the PPS, information included in the SPS, and/or the information included in the VPS may be included.
인터 예측Inter prediction
이하, 본 명세서의 실시예에 따른 인터 예측 기법에 대하여 설명하도록 한다. 이하 설명되는 인터 예측은 도 2의 인코딩 장치(100)의 인터 예측부(180) 또는 도 3의 디코딩 장치(200)의 인터 예측부(260)에 의해 수행될 수 있다. 또한, 본 명세서의 실시예에 따라 인코딩된 데이터는 비트스트림의 형태로 저장될 수 있다.Hereinafter, an inter prediction technique according to an embodiment of the present specification will be described. The inter prediction described below may be performed by the inter prediction unit 180 of the encoding apparatus 100 of FIG. 2 or the inter prediction unit 260 of the decoding apparatus 200 of FIG. 3. In addition, data encoded according to an embodiment of the present specification may be stored in the form of a bitstream.
인코딩 장치(100)/디코딩 장치(200)의 예측부는 블록 단위로 인터 예측을 수행하여 예측 샘플을 도출할 수 있다. 인터 예측은 현재 픽처 이외의 픽처(들)의 데이터 요소들(예: 샘플값들, 또는 움직임 정보 등)에 의존적인 방법으로 도출되는 예측을 나타낼 수 있다(Inter prediction can be a prediction derived in a manner that is de-pendent on data elements (e.g., sample values or motion information) of picture(s) other than the current picture). 현재 블록에 인터 예측이 적용되는 경우, 참조 픽처 인덱스가 가리키는 참조 픽처 상에서 움직임 벡터에 의해 특정되는 참조 블록(참조 샘플 어레이)을 기반으로, 현재 블록에 대한 예측된 블록(예측 샘플 어레이)을 유도할 수 있다. 이때, 인터 예측 모드에서 전송되는 움직임 정보의 양을 줄이기 위해 주변 블록과 현재 블록 간의 움직임 정보의 상관성에 기초하여 현재 블록의 움직임 정보를 블록, 서브블록 또는 샘플 단위로 예측할 수 있다. 움직임 정보는 움직임 벡터 및 참조 픽처 인덱스를 포함할 수 있다. 움직임 정보는 인터 예측 타입(L0 예측, L1 예측, Bi 예측 등) 정보를 더 포함할 수 있다. 인터 예측이 적용되는 경우, 주변 블록은 현재 픽처 내에 존재하는 공간적 주변 블록(spatial neighboring block)과 참조 픽처에 존재하는 시간적 주변 블록(temporal neighboring block)을 포함할 수 있다. 참조 블록을 포함하는 참조 픽처와 시간적 주변 블록을 포함하는 참조 픽처는 동일할 수도 있고, 다를 수도 있다. 시간적 주변 블록은 동일 위치 참조 블록(collocated reference block), 동일 위치 CU(colCU) 등의 이름으로 불릴 수 있으며, 시간적 주변 블록을 포함하는 참조 픽처는 동일 위치 픽처(collocated picture, colPic)라고 불릴 수도 있다. 예를 들어, 현재 블록의 주변 블록들을 기반으로 움직임 정보 후보 리스트가 구성될 수 있고, 현재 블록의 움직임 벡터 및/또는 참조 픽처 인덱스를 도출하기 위하여 어떤 후보가 선택(사용)되는지를 지시하는 플래그 또는 인덱스 정보가 시그널링될 수 있다. 다양한 예측 모드를 기반으로 인터 예측이 수행될 수 있으며, 예를 들어 스킵 모드와 머지 모드의 경우에, 현재 블록의 움직임 정보는 선택된 주변 블록의 움직임 정보와 같을 수 있다. 스킵 모드의 경우, 머지 모드와 달리 레지듀얼 신호가 전송되지 않을 수 있다. 움직임 정보 예측(motion vector prediction, MVP) 모드의 경우, 선택된 주변 블록의 움직임 벡터를 움직임 벡터 예측자(motion vector predictor)로 이용하고, 움직임 벡터 차분(motion vector difference)은 시그널링될 수 있다. 이 경우 움직임 벡터 예측자 및 움직임 벡터 차분의 합을 이용하여 상기 현재 블록의 움직임 벡터를 도출할 수 있다.The prediction unit of the encoding device 100/decoding device 200 may derive a prediction sample by performing inter prediction in block units. Inter prediction may represent prediction derived in a method dependent on data elements (eg, sample values, motion information, etc.) of a picture(s) other than the current picture (Inter prediction can be a prediction derived in a manner). that is de-pendent on data elements (eg, sample values or motion information) of picture(s) other than the current picture). When inter prediction is applied to the current block, a predicted block (prediction sample array) for the current block is derived based on a reference block (reference sample array) specified by a motion vector on a reference picture indicated by a reference picture index. I can. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, motion information of the current block may be predicted in units of blocks, subblocks, or samples based on correlation between motion information between neighboring blocks and current blocks. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction type (L0 prediction, L1 prediction, Bi prediction, etc.) information. When inter prediction is applied, the neighboring block may include a spatial neighboring block existing in the current picture and a temporal neighboring block existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be called a collocated reference block, a co-located CU (colCU), or the like, and a reference picture including a temporal neighboring block may be referred to as a collocated picture (colPic). . For example, a motion information candidate list may be constructed based on neighboring blocks of the current block, and a flag indicating which candidate is selected (used) to derive a motion vector and/or a reference picture index of the current block, or Index information may be signaled. Inter prediction may be performed based on various prediction modes. For example, in the case of a skip mode and a merge mode, motion information of a current block may be the same as motion information of a selected neighboring block. In the case of the skip mode, unlike the merge mode, a residual signal may not be transmitted. In the case of a motion vector prediction (MVP) mode, a motion vector of a selected neighboring block is used as a motion vector predictor, and a motion vector difference may be signaled. In this case, the motion vector of the current block may be derived using the sum of the motion vector predictor and the motion vector difference.
도 15a 및 도 15b는 본 명세서의 실시예에 따른 인터 예측에 기반한 비디오/영상 인코딩 방법 및 인코딩 장치 내 인터 예측부를 도시한다.15A and 15B illustrate a video/video encoding method based on inter prediction and an inter prediction unit in an encoding apparatus according to an embodiment of the present specification.
인코딩 장치(100)는 현재 블록에 대한 인터 예측을 수행한다(S1510). 인코딩 장치(100)는 현재 블록의 인터 예측 모드 및 움직임 정보를 도출하고, 현재 블록의 예측 샘플들을 생성할 수 있다. 여기서 인터 예측 모드 결정, 움직임 정보 도출 및 예측 샘플들 생성 절차는 동시에 수행될 수도 있고, 어느 한 절차가 다른 절차보다 먼저 수행될 수도 있다. 예를 들어, 인코딩 장치(100)의 인터 예측부(180)는 예측 모드 결정부(181), 움직임 정보 도출부(182), 예측 샘플 도출부(183)를 포함할 수 있으며, 예측 모드 결정부(181)에서 현재 블록에 대한 예측 모드를 결정하고, 움직임 정보 도출부(182)에서 현재 블록의 움직임 정보를 도출하고, 예측 샘플 도출부(183)에서 현재 블록의 예측 샘플들을 도출할 수 있다. 예를 들어, 인코딩 장치(100)의 인터 예측부(180)는 움직임 추정(motion estimation)을 통하여 참조 픽처들의 일정 영역(서치 영역) 내에서 상기 현재 블록과 유사한 블록을 서치하고, 현재 블록과의 차이가 최소 또는 일정 기준 이하인 참조 블록을 도출할 수 있다. 이를 기반으로 상기 참조 블록이 위치하는 참조 픽처를 가리키는 참조 픽처 인덱스를 도출하고, 참조 블록과 현재 블록의 위치 차이를 기반으로 움직임 벡터를 도출할 수 있다. 인코딩 장치(100)는 다양한 예측 모드들 중 현재 블록에 대하여 적용되는 모드를 결정할 수 있다. 인코딩 장치(100)는 다양한 예측 모드들에 대한 RD(rate-distortion) 비용(cost)을 비교하고 현재 블록에 대한 최적의 예측 모드를 결정할 수 있다. The encoding apparatus 100 performs inter prediction on the current block (S1510). The encoding apparatus 100 may derive inter prediction mode and motion information of the current block and generate prediction samples of the current block. Here, the procedure of determining the inter prediction mode, deriving motion information, and generating prediction samples may be performed simultaneously, or one procedure may be performed before the other procedure. For example, the inter prediction unit 180 of the encoding apparatus 100 may include a prediction mode determining unit 181, a motion information deriving unit 182, and a predicted sample deriving unit 183, and the prediction mode determining unit A prediction mode for the current block may be determined at 181, motion information of the current block may be derived by the motion information deriving unit 182, and prediction samples of the current block may be derived by the predicted sample deriving unit 183. For example, the inter prediction unit 180 of the encoding apparatus 100 searches for a block similar to the current block within a predetermined area (search area) of reference pictures through motion estimation, and searches for a block similar to the current block. It is possible to derive a reference block whose difference is less than a minimum or a certain standard. Based on this, a reference picture index indicating a reference picture in which the reference block is located may be derived, and a motion vector may be derived based on a position difference between the reference block and the current block. The encoding apparatus 100 may determine a mode applied to the current block among various prediction modes. The encoding apparatus 100 may compare rate-distortion (RD) costs for various prediction modes and determine an optimal prediction mode for the current block.
예를 들어, 인코딩 장치(100)는 현재 블록에 스킵 모드 또는 머지 모드가 적용되는 경우, 후술하는 머지 후보 리스트를 구성하고, 머지 후보 리스트에 포함된 머지 후보들이 가리키는 참조 블록들 중 현재 블록과 중 현재 블록과의 차이가 최소 또는 일정 기준 이하인 참조 블록을 도출할 수 있다. 이 경우 도출된 참조 블록과 연관된 머지 후보가 선택되며, 선택된 머지 후보를 가리키는 머지 인덱스 정보가 생성되어 디코딩 장치(200)로 시그널링될 수 있다. 선택된 머지 후보의 움직임 정보를 이용하여 현재 블록의 움직임 정보가 도출될 수 있다. For example, when the skip mode or the merge mode is applied to the current block, the encoding apparatus 100 configures a merge candidate list to be described later, and the current block and the middle of the reference blocks indicated by merge candidates included in the merge candidate list. It is possible to derive a reference block whose difference from the current block is less than a minimum or a certain standard. In this case, a merge candidate associated with the derived reference block is selected, and merge index information indicating the selected merge candidate may be generated and signaled to the decoding apparatus 200. Motion information of the current block may be derived using motion information of the selected merge candidate.
다른 예로, 인코딩 장치(100)는 현재 블록에 (A)MVP 모드가 적용되는 경우, 후술하는 (A)MVP 후보 리스트를 구성하고, (A)MVP 후보 리스트에 포함된 MVP(motion vector predictor) 후보들 중 선택된 MVP 후보의 움직임 벡터를 현재 블록의 MVP로 이용할 수 있다. 이 경우, 예를 들어, 상술한 움직임 추정에 의하여 도출된 참조 블록을 가리키는 움직임 벡터가 현재 블록의 움직임 벡터로 이용될 수 있으며, MVP 후보들 중 현재 블록의 움직임 벡터와의 차이가 가장 작은 움직임 벡터를 갖는 MVP 후보가 선택된 MVP 후보가 될 있다. 현재 블록의 움직임 벡터에서 MVP를 뺀 차분인 MVD(motion vector difference)가 도출될 수 있다. 이 경우 MVD에 관한 정보가 디코딩 장치(200)로 시그널링될 수 있다. 또한, (A)MVP 모드가 적용되는 경우, 참조 픽처 인덱스의 값은 참조 픽처 인덱스 정보 구성되어 별도로 디코딩 장치(200)로 시그널링될 수 있다. As another example, when the (A)MVP mode is applied to the current block, the encoding apparatus 100 configures a (A)MVP candidate list to be described later, and (A)motion vector predictor (MVP) candidates included in the MVP candidate list The motion vector of the selected MVP candidate may be used as the MVP of the current block. In this case, for example, a motion vector indicating a reference block derived by motion estimation described above may be used as a motion vector of the current block, and among MVP candidates, a motion vector having the smallest difference from the motion vector of the current block is selected. The MVP candidate to have becomes the selected MVP candidate. A motion vector difference (MVD), which is a difference obtained by subtracting MVP from the motion vector of the current block, may be derived. In this case, information on the MVD may be signaled to the decoding apparatus 200. In addition, when the (A)MVP mode is applied, the value of the reference picture index may be separately signaled to the decoding apparatus 200 by configuring reference picture index information.
인코딩 장치(100)는 예측 샘플들을 기반으로 레지듀얼 샘플들을 도출할 수 있다(S1520). 인코딩 장치(100)는 현재 블록의 원본 샘플들과 예측 샘플들의 비교를 통하여 레지듀얼 샘플들을 도출할 수 있다.The encoding apparatus 100 may derive residual samples based on the prediction samples (S1520). The encoding apparatus 100 may derive residual samples by comparing the original samples of the current block with the prediction samples.
인코딩 장치(100)는 예측 정보 및 레지듀얼 정보를 포함하는 영상 정보를 인코딩한다(S1530). 인코딩 장치(100)는 인코딩된 영상 정보를 비트스트림 형태로 출력할 수 있다. 예측 정보는 예측 절차에 관련된 정보들로서 예측 모드 정보(예: skip flag, merge flag, 또는 mode index) 및 움직임 정보를 포함할 수 있다. 움직임 정보는 움직임 벡터를 도출하기 위한 정보인 후보 선택 정보(예: merge index, mvp flag, 또는 mvp index)를 포함할 수 있다. 또한 움직임 정보는 상술한 MVD에 관한 정보 및/또는 참조 픽처 인덱스 정보를 포함할 수 있다. 또한 움직임 정보는 L0 예측, L1 예측, 또는 쌍(bi) 예측이 적용되는지 여부를 나타내는 정보를 포함할 수 있다. 레지듀얼 정보는 레지듀얼 샘플들에 관한 정보이다. 레지듀얼 정보는 레지듀얼 샘플들에 대한 양자화된 변환 계수들에 관한 정보를 포함할 수 있다. 예측 모드 정보와 움직임 정보는 인터 예측 정보로 통칭될 수 있다.The encoding apparatus 100 encodes video information including prediction information and residual information (S1530). The encoding apparatus 100 may output the encoded image information in the form of a bitstream. The prediction information is information related to a prediction procedure and may include prediction mode information (eg, skip flag, merge flag, or mode index) and motion information. The motion information may include candidate selection information (eg, merge index, mvp flag, or mvp index) that is information for deriving a motion vector. Further, the motion information may include information on the MVD and/or reference picture index information described above. Further, the motion information may include information indicating whether L0 prediction, L1 prediction, or bi prediction is applied. The residual information is information about residual samples. The residual information may include information about quantized transform coefficients for residual samples. The prediction mode information and motion information may be collectively referred to as inter prediction information.
출력된 비트스트림은 (디지털) 저장매체에 저장되어 디코딩 장치로 전달될 수 있고, 또는 네트워크를 통하여 디코딩 장치로 전달될 수도 있다. The output bitstream may be stored in a (digital) storage medium and transmitted to a decoding device, or may be transmitted to a decoding device through a network.
한편, 상술한 바와 같이 인코딩 장치는 상기 참조 샘플들 및 상기 레지듀얼 샘플들을 기반으로 복원 픽처(복원 샘플들 및 복원 블록 포함)를 생성할 수 있다. 이는 디코딩 장치(200)에서 수행되는 것과 동일한 예측 결과를 인코딩 장치(100)에서 도출하기 위함이며, 이를 통하여 코딩 효율을 높일 수 있기 때문이다. 따라서, 인코딩 장치(100)는 복원 픽처(또는 복원 샘플들, 복원 블록)을 메모리에 저장하고, 인터 예측을 위한 참조 픽처로 활용할 수 있다. 복원 픽처에 인루프 필터링 절차 등이 더 적용될 수 있음은 상술한 바와 같다.Meanwhile, as described above, the encoding apparatus may generate a reconstructed picture (including reconstructed samples and a reconstructed block) based on the reference samples and the residual samples. This is because the encoding device 100 derives the same prediction result as that performed by the decoding device 200, and coding efficiency can be improved through this. Accordingly, the encoding apparatus 100 may store a reconstructed picture (or reconstructed samples, and a reconstructed block) in a memory and use it as a reference picture for inter prediction. As described above, an in-loop filtering procedure or the like may be further applied to the reconstructed picture.
도 16a 및 도 16b는 본 명세서의 실시예에 따른 인터 예측에 기반한 비디오/영상 디코딩 방법 및 디코딩 장치 내 인터 예측부를 도시한다.16A and 16B illustrate a video/video decoding method based on inter prediction and an inter prediction unit in a decoding apparatus according to an embodiment of the present specification.
디코딩 장치(200)는 인코딩 장치(100)에서 수행된 동작과 대응되는 동작을 수행할 수 있다. 디코딩 장치(200)는 수신된 예측 정보를 기반으로 현재 블록에 예측을 수행하고 예측 샘플들을 도출할 수 있다. The decoding apparatus 200 may perform an operation corresponding to the operation performed by the encoding apparatus 100. The decoding apparatus 200 may perform prediction on the current block and derive prediction samples based on the received prediction information.
구체적으로 디코딩 장치(200)는 수신된 예측 정보를 기반으로 현재 블록에 대한 예측 모드를 결정할 수 있다(S1610). 디코딩 장치(200)는 예측 정보 내의 예측 모드 정보를 기반으로 현재 블록에 어떤 인터 예측 모드가 적용되는지 결정할 수 있다. In more detail, the decoding apparatus 200 may determine a prediction mode for the current block based on the received prediction information (S1610). The decoding apparatus 200 may determine which inter prediction mode is applied to the current block based on prediction mode information in the prediction information.
예를 들어, 디코딩 장치(200)는 머지 플래그(merge flag)를 기반으로 현재 블록에 머지 모드가 적용되지 또는 (A)MVP 모드가 결정되는지 여부를 결정할 수 있다. 또는 디코딩 장치(200)는 모드 인덱스(mode index)를 기반으로 다양한 인터 예측 모드 후보들 중 하나를 선택할 수 있다. 인터 예측 모드 후보들은 스킵 모드, 머지 모드 및/또는 (A)MVP 모드를 포함할 수 있고, 또는 후술하는 다양한 인터 예측 모드들을 포함할 수 있다. For example, the decoding apparatus 200 may determine whether the merge mode is applied to the current block or the (A)MVP mode is determined based on the merge flag. Alternatively, the decoding apparatus 200 may select one of various inter prediction mode candidates based on a mode index. Inter prediction mode candidates may include a skip mode, a merge mode, and/or (A)MVP mode, or may include various inter prediction modes described below.
디코딩 장치(200)는 결정된 인터 예측 모드를 기반으로 현재 블록의 움직임 정보를 도출한다(S1620). 예를 들어, 디코딩 장치(200)는 현재 블록에 스킵 모드 또는 머지 모드가 적용되는 경우, 후술하는 머지 후보 리스트를 구성하고, 머지 후보 리스트에 포함된 머지 후보들이 중 하나의 머지 후보를 선택할 수 있다. 머지 후보의 선택은 머지 인덱스(merge index)를 기반으로 수행될 수 있다. 선택된 머지 후보의 움직임 정보로부터 현재 블록의 움직임 정보가 도출할 수 있다. 선택된 머지 후보의 움직임 정보가 현재 블록의 움직임 정보로 이용될 수 있다. The decoding apparatus 200 derives motion information of the current block based on the determined inter prediction mode (S1620). For example, when the skip mode or the merge mode is applied to the current block, the decoding apparatus 200 may configure a merge candidate list to be described later, and select one merge candidate from among merge candidates included in the merge candidate list. . The selection of a merge candidate may be performed based on a merge index. Motion information of the current block may be derived from motion information of the selected merge candidate. Motion information of the selected merge candidate may be used as motion information of the current block.
다른 예로, 디코딩 장치(200)는, 현재 블록에 (A)MVP 모드가 적용되는 경우, 후술하는 (A)MVP 후보 리스트를 구성하고, (A)MVP 후보 리스트에 포함된 MVP 후보들 중 선택된 MVP 후보의 움직임 벡터를 현재 블록의 MVP로 이용할 수 있다. MVP의 선택은 상술한 선택 정보(MVP 플래그 또는 MVP 인덱스)를 기반으로 수행될 수 있다. 이 경우 디코딩 장치(200)는 MVD에 관한 정보를 기반으로 상기 현재 블록의 MVD를 도출할 수 있으며, 현재 블록의 MVP와 MVD를 기반으로 현재 블록의 움직임 벡터를 도출할 수 있다. 또한, 디코딩 장치(200)는 참조 픽처 인덱스 정보를 기반으로 현재 블록의 참조 픽처 인덱스를 도출할 수 있다. 현재 블록에 관한 참조 픽처 리스트 내에서 참조 픽처 인덱스가 가리키는 픽처가 현재 블록의 인터 예측을 위하여 참조되는 참조 픽처로 도출될 수 있다. As another example, when the (A)MVP mode is applied to the current block, the decoding apparatus 200 constructs a (A)MVP candidate list to be described later, and (A) a selected MVP candidate among MVP candidates included in the MVP candidate list. The motion vector of can be used as the MVP of the current block. The selection of MVP may be performed based on the above-described selection information (MVP flag or MVP index). In this case, the decoding apparatus 200 may derive the MVD of the current block based on the information on the MVD, and may derive a motion vector of the current block based on the MVP and the MVD of the current block. Also, the decoding apparatus 200 may derive the reference picture index of the current block based on the reference picture index information. The picture indicated by the reference picture index in the reference picture list for the current block may be derived as a reference picture referenced for inter prediction of the current block.
한편, 후술하는 바와 같이 후보 리스트 구성 없이 상기 현재 블록의 움직임 정보가 도출될 수 있으며, 이 경우 후술하는 예측 모드에서 개시된 절차에 따라 현재 블록의 움직임 정보가 도출될 수 있다. 이 경우 상술한 바와 같은 후보 리스트 구성은 생략될 수 있다.Meanwhile, as described later, motion information of the current block may be derived without configuring a candidate list. In this case, motion information of the current block may be derived according to a procedure disclosed in a prediction mode to be described later. In this case, the configuration of the candidate list as described above may be omitted.
디코딩 장치(200)는 현재 블록의 움직임 정보를 기반으로 현재 블록에 대한 예측 샘플들을 생성할 수 있다(S1630). 이 경우 디코딩 장치(200)는 현재 블록의 참조 픽처 인덱스를 기반으로 참조 픽처를 도출하고, 현재 블록의 움직임 벡터가 참조 픽처 상에서 가리키는 참조 블록의 샘플들을 이용하여 현재 블록의 예측 샘플들을 도출할 수 있다. 이 경우 후술하는 바와 같이 경우에 따라 현재 블록의 예측 샘플들 중 전부 또는 일부에 대한 예측 샘플 필터링 절차가 더 수행될 수 있다. The decoding apparatus 200 may generate prediction samples for the current block based on motion information of the current block (S1630). In this case, the decoding apparatus 200 may derive a reference picture based on the reference picture index of the current block, and may derive the prediction samples of the current block by using samples of the reference block indicated on the reference picture by the motion vector of the current block. . In this case, as will be described later, a prediction sample filtering procedure may be further performed on all or part of the prediction samples of the current block in some cases.
예를 들어, 디코딩 장치(200)의 인터 예측부(260)는 예측 모드 결정부(261), 움직임 정보 도출부(262), 예측 샘플 도출부(263)를 포함할 수 있으며, 예측 모드 결정부(181)에서 수신된 예측 모드 정보를 기반으로 상기 현재 블록에 대한 예측 모드를 결정하고, 움직임 정보 도출부(182)에서 수신된 움직임 정보에 관한 정보를 기반으로 상기 현재 블록의 움직임 정보(움직임 벡터 및/또는 참조 픽처 인덱스 등)를 도출하고, 예측 샘플 도출부(183)에서 상기 현재 블록의 예측 샘플들을 도출할 수 있다.For example, the inter prediction unit 260 of the decoding apparatus 200 may include a prediction mode determination unit 261, a motion information derivation unit 262, and a prediction sample derivation unit 263, and a prediction mode determination unit A prediction mode for the current block is determined based on the prediction mode information received at (181), and motion information (motion vector) of the current block is determined based on the information on the motion information received from the motion information derivation unit 182. And/or a reference picture index), and the prediction sample derivation unit 183 may derive prediction samples of the current block.
디코딩 장치(200)는 수신된 레지듀얼 정보를 기반으로 상기 현재 블록에 대한 레지듀얼 샘플들을 생성한다(S1640). 디코딩 장치(200)는 예측 샘플들 및 레지듀얼 샘플들을 기반으로 현재 블록에 대한 복원 샘플들을 생성하고, 이를 기반으로 복원 픽처를 생성할 수 있다(S1650). 이후 상기 복원 픽처에 인루프 필터링 절차 등이 더 적용될 수 있음은 상술한 바와 같다. The decoding apparatus 200 generates residual samples for the current block based on the received residual information (S1640). The decoding apparatus 200 may generate reconstructed samples for the current block based on the prediction samples and the residual samples, and generate a reconstructed picture based on the generated samples (S1650). Thereafter, as described above, an in-loop filtering procedure or the like may be further applied to the reconstructed picture.
상술한 바와 같이 인터 예측 절차는 인터 예측 모드 결정 단계, 결정된 예측 모드에 따른 움직임 정보 도출 단계, 도출된 움직임 정보에 기반한 예측 수행(예측 샘플 생성) 단계를 포함할 수 있다.As described above, the inter prediction procedure may include determining an inter prediction mode, deriving motion information according to the determined prediction mode, and performing prediction based on the derived motion information (generating a prediction sample).
도 17은 본 명세서의 실시예에 따른 인터 예측 절차를 도시한다.17 illustrates an inter prediction procedure according to an embodiment of the present specification.
상술한 바와 같이 인터 예측 절차는 인터 예측 모드 단계(S1710), 결정된 예측 모드에 따른 움직임 정보 도출 단계(S1720), 도출된 움직임 정보에 기반한 예측 수행(예측 샘플 생성) 단계(S1730)를 포함할 수 있다. 인터 예측 절차는 상술한 바와 같이 인코딩 장치(100) 및 디코딩 장치(200)에서 수행될 수 있다.As described above, the inter prediction procedure may include an inter prediction mode step (S1710), a motion information derivation step (S1720) according to the determined prediction mode, and a prediction performance (prediction sample generation) step (S1730) based on the derived motion information. have. The inter prediction procedure may be performed by the encoding device 100 and the decoding device 200 as described above.
움직임 정보 도출Derive motion information
인코딩 장치(100) 또는 디코딩 장치(200)는 현재 블록의 움직임 정보를 이용하여 인터 예측을 수행할 수 있다. 인코딩 장치(100)는 움직임 추정(motion estimation) 절차를 통하여 현재 블록에 대한 최적의 움직임 정보를 도출할 수 있다. 예를 들어, 인코딩 장치(100)는 현재 블록에 대한 원본 픽처 내 원본 블록을 이용하여 상관성이 높은 유사한 참조 블록을 참조 픽처 내의 정해진 탐색 범위 내에서 분수 픽셀 단위로 탐색할 수 있고, 이를 통하여 움직임 정보를 도출할 수 있다. 블록의 유사성은 위상(phase) 기반 샘플 값들의 차를 기반으로 도출될 수 있다. 예를 들어, 블록의 유사성은 현재 블록(또는 현재 블록의 템플릿)과 참조 블록(또는 참조 블록의 템플릿) 간 SAD(sum of absolute difference)를 기반으로 계산될 수 있다. 이 경우 탐색 영역 내 SAD가 가장 작은 참조 블록을 기반으로 움직임 정보를 도출할 수 있다. 도출된 움직임 정보는 인터 예측 모드 기반으로 여러 방법에 따라 디코딩 장치로 시그널링될 수 있다.The encoding device 100 or the decoding device 200 may perform inter prediction using motion information of the current block. The encoding apparatus 100 may derive optimal motion information for the current block through a motion estimation procedure. For example, the encoding apparatus 100 may search for a similar reference block with high correlation using the original block in the original picture for the current block in units of fractional pixels within a predetermined search range within the reference picture, and through this Can be derived. The similarity of the block may be derived based on the difference between the phase-based sample values. For example, the similarity of blocks may be calculated based on a sum of absolute difference (SAD) between a current block (or a template of a current block) and a reference block (or a template of a reference block). In this case, motion information may be derived based on the reference block having the smallest SAD in the search area. The derived motion information may be signaled to the decoding apparatus according to various methods based on the inter prediction mode.
머지 모드 및 스킵 모드Merge mode and skip mode
머지 모드(merge mode)가 적용되는 경우, 현재 예측 블록의 움직임 정보가 직접적으로 전송되지 않고, 주변 예측 블록의 움직임 정보를 이용하여 현재 예측 블록의 움직임 정보를 유도하게 된다. 따라서, 인코딩 장치(100)는 머지 모드를 이용하였음을 알려주는 플래그 정보 및 주변의 어떤 예측 블록을 이용하였는지를 알려주는 머지 인덱스를 전송함으로써 현재 예측 블록의 움직임 정보를 지시할 수 있다.When the merge mode is applied, motion information of a current prediction block is not directly transmitted, and motion information of a current prediction block is derived using motion information of a neighboring prediction block. Accordingly, the encoding apparatus 100 may indicate motion information of the current prediction block by transmitting flag information indicating that the merge mode has been used and a merge index indicating which prediction block is used.
인코딩 장치(100)는 머지 모드를 수행하기 위해서 현재 예측 블록의 움직임 정보를 유도하기 위해 이용되는 머지 후보 블록(merge candidate block)을 서치하여야 한다. 예를 들어, 머지 후보 블록은 최대 5개까지 이용될 수 있으나, 본 명세서는 이에 한정되지 않는다. 그리고, 머지 후보 블록의 최대 개수는 슬라이스 헤더 또는 타일 그룹 헤더에서 전송될 수 있으며, 본 명세서는 이에 한정되지 않는다. 머지 후보 블록들을 찾은 후, 인코딩 장치(100)는 머지 후보 리스트를 생성할 수 있고, 이들 중 가장 작은 비용을 갖는 머지 후보 블록을 최종 머지 후보 블록으로 선택할 수 있다.In order to perform a merge mode, the encoding apparatus 100 must search for a merge candidate block used to induce motion information of a current prediction block. For example, up to five merge candidate blocks may be used, but the present specification is not limited thereto. In addition, the maximum number of merge candidate blocks may be transmitted in a slice header or a tile group header, and the present specification is not limited thereto. After finding the merge candidate blocks, the encoding apparatus 100 may generate a merge candidate list and select a merge candidate block having the lowest cost among them as the final merge candidate block.
머지 후보 리스트는 예를 들어 5개의 머지 후보 블록을 이용할 수 있다. 예를 들어, 4개의 공간적 머지 후보(spatial merge candidate)와 1개의 시간적 머지 후보(temporal merge candidate)를 이용할 수 있다.The merge candidate list may use, for example, 5 merge candidate blocks. For example, four spatial merge candidates and one temporal merge candidate can be used.
도 18은 본 명세서의 실시예에 따른 공간적 머지 후보로서 사용되는 공간적 주변 블록들의 예를 도시한다.18 illustrates examples of spatial neighboring blocks used as spatial merge candidates according to an embodiment of the present specification.
도 18을 참조하면, 현재 블록의 예측을 위하여 좌측 이웃 블록(A1), 좌하측(bottom-left) 이웃 블록(A0), 우상측(top-right) 이웃 블록(B0), 상측 이웃 블록(B1), 좌상측(top-left) 이웃 블록(B2) 중 적어도 하나가 사용될 수 있다. 현재 블록에 대한 머지 후보 리스트는 도 19와 같은 절차를 기반으로 구성될 수 있다.Referring to FIG. 18, for prediction of a current block, a left neighboring block A1, a bottom-left neighboring block A0, a top-right neighboring block B0, and an upper neighboring block B1. ), and at least one of the top-left neighboring block B2 may be used. The merge candidate list for the current block may be configured based on the procedure shown in FIG. 19.
도 19는 본 명세서의 실시예에 따른 머지 후보 리스트를 구성하기 위한 흐름도의 예이다.19 is an example of a flowchart for configuring a merge candidate list according to an embodiment of the present specification.
코딩 장치(인코딩 장치(100) 또는 디코딩 장치(200))는 현재 블록의 공간적 주변 블록들을 탐색하여 도출된 공간적 머지 후보들을 머지 후보 리스트에 삽입한다(S1910). 예를 들어, 공간적 주변 블록들은 현재 블록의 좌하측 코너 주변 블록, 좌측 주변 블록, 우상측 코너 주변 블록, 상측 주변 블록, 좌상측 코너 주변 블록들을 포함할 수 있다. 다만, 이는 예시로서 상술한 공간적 주변 블록들 이외에도 우측 주변 블록, 하측 주변 블록, 우하측 주변 블록 등 추가적인 주변 블록들이 더 상기 공간적 주변 블록들로 사용될 수 있다. 코딩 장치는 공간적 주변 블록들을 우선순위를 기반으로 탐색하여 가용한 블록들을 검출하고, 검출된 블록들의 움직임 정보를 공간적 머지 후보들로 도출할 수 있다. 예를 들어, 인코딩 장치(100) 또는 디코딩 장치(200)는 도 18에 도시된 5개의 블록들을 A1, B1, B0, A0, B2의 순서대로 탐색하여, 가용한 후보들을 순차적으로 인덱싱하여 머지 후보 리스트로 구성할 수 있다. The coding apparatus (encoding apparatus 100 or decoding apparatus 200) inserts the spatial merge candidates derived by searching for spatial neighboring blocks of the current block into the merge candidate list (S1910). For example, the spatial neighboring blocks may include a block around a lower left corner of a current block, a block around a left, a block around an upper right corner, a block around an upper side, and blocks around an upper left corner. However, as an example, in addition to the spatial neighboring blocks described above, additional neighboring blocks such as a right peripheral block, a lower peripheral block, and a right lower peripheral block may be further used as the spatial neighboring blocks. The coding apparatus may detect available blocks by searching spatial neighboring blocks based on priority, and derive motion information of the detected blocks as spatial merge candidates. For example, the encoding device 100 or the decoding device 200 searches for five blocks shown in FIG. 18 in order of A1, B1, B0, A0, B2, and sequentially indexes the available candidates to obtain a merge candidate. It can be organized as a list.
코딩 장치는 현재 블록의 시간적 주변 블록을 탐색하여 도출된 시간적 머지 후보를 상기 머지 후보 리스트에 삽입한다(S1920). 시간적 주변 블록은 현재 블록이 위치하는 현재 픽처와 다른 픽처인 참조 픽처 상에 위치할 수 있다. 시간적 주변 블록이 위치하는 참조 픽처는 동일 위치 픽처(collocated picture) 또는 콜 픽처(col picture)라고 불릴 수 있다. 시간적 주변 블록은 콜 픽처 상에서의 현재 블록에 대한 동일 위치 블록(collocated block)의 우하측 코너 주변 블록 및 우하측 센터 블록의 순서로 탐색될 수 있다. 한편, 움직임 데이터 압축(motion data compression)이 적용되는 경우, 콜 픽처에 일정 저장 단위마다 특정 움직임 정보를 대표 움직임 정보로 저장할 수 있다. 이 경우 상기 일정 저장 단위 내의 모든 블록에 대한 움직임 정보를 저장할 필요가 없으며 이를 통하여 움직임 데이터 압축 효과를 얻을 수 있다. 이 경우, 일정 저장 단위는 예를 들어 16x16 샘플 단위, 또는 8x8 샘플 단위 등으로 미리 정해질 수도 있고, 또는 인코딩 장치(100)로부터 디코딩 장치(200)로 일정 저장 단위에 대한 사이즈 정보가 시그널링될 수도 있다. 움직임 데이터 압축이 적용되는 경우 시간적 주변 블록의 움직임 정보는 시간적 주변 블록이 위치하는 일정 저장 단위의 대표 움직임 정보로 대체될 수 있다. 즉, 이 경우 구현 측면에서 보면, 시간적 주변 블록의 좌표에 위치하는 예측 블록이 아닌, 시간적 주변 블록의 좌표(좌상단 샘플 포지션)를 기반으로 일정 값만큼 산술적 우측 시프트 후 산술적 좌측 시프트 한 위치를 커버하는 예측 블록의 움직임 정보를 기반으로 시간적 머지 후보가 도출될 수 있다. 예를 들어, 일정 저장 단위가 2nx2n 샘플 단위인 경우, 시간적 주변 블록의 좌표가 (xTnb, yTnb)라 하면, 수정된 위치인 ((xTnb >> n) << n), (yTnb >> n) << n))에 위치하는 예측 블록의 움직임 정보가 시간적 머지 후보를 위하여 사용될 수 있다. 구체적으로 예를 들어, 일정 저장 단위가 16x16 샘플 단위인 경우, 시간적 주변 블록의 좌표가 (xTnb, yTnb)라 하면, 수정된 위치인 ((xTnb >> 4) << 4), (yTnb >> 4) << 4))에 위치하는 예측 블록의 움직임 정보가 시간적 머지 후보를 위하여 사용될 수 있다. 또는 예를 들어, 일정 저장 단위가 8x8 샘플 단위인 경우, 시간적 주변 블록의 좌표가 (xTnb, yTnb)라 하면, 수정된 위치인 ((xTnb >> 3) << 3), (yTnb >> 3) << 3))에 위치하는 예측 블록의 움직임 정보가 시간적 머지 후보를 위하여 사용될 수 있다.The coding apparatus inserts a temporal merge candidate derived by searching for a temporal neighboring block of the current block into the merge candidate list (S1920). The temporal neighboring block may be located on a reference picture that is a picture different from the current picture in which the current block is located. A reference picture in which a temporal neighboring block is located may be referred to as a collocated picture or a col picture. The temporal neighboring block may be searched in the order of the lower right corner neighboring block and the lower right center block of the collocated block with respect to the current block on the collocated picture. Meanwhile, when motion data compression is applied, specific motion information may be stored as representative motion information for each predetermined storage unit in a collocated picture. In this case, it is not necessary to store motion information for all blocks in the predetermined storage unit, and motion data compression effect can be obtained through this. In this case, the predetermined storage unit may be predetermined, for example, in a 16x16 sample unit, an 8x8 sample unit, or the like, or size information for a predetermined storage unit may be signaled from the encoding device 100 to the decoding device 200 have. When motion data compression is applied, motion information of a temporal neighboring block may be replaced with representative motion information of a predetermined storage unit in which a temporal neighboring block is located. In other words, in this case, in terms of implementation, it is not a prediction block located at the coordinates of a temporal neighboring block, but an arithmetic right shift by a certain value based on the coordinates of the temporal neighboring block (top left sample position) and then the arithmetic left shifted position is covered. A temporal merge candidate may be derived based on motion information of the prediction block. For example, if the constant storage unit is a 2nx2n sample unit, if the coordinates of the temporal neighboring block are (xTnb, yTnb), the modified positions ((xTnb >> n) << n), (yTnb >> n) The motion information of the prediction block located at << n)) may be used for the temporal merge candidate. Specifically, for example, if the predetermined storage unit is a 16x16 sample unit, if the coordinates of the temporal neighboring block are (xTnb, yTnb), the modified positions ((xTnb >> 4) << 4), (yTnb >> 4) Motion information of the prediction block located at << 4)) may be used for a temporal merge candidate. Or, for example, if the constant storage unit is an 8x8 sample unit, if the coordinates of the temporal neighboring block are (xTnb, yTnb), the modified positions ((xTnb >> 3) << 3), (yTnb >> 3 ) << 3)) motion information of a prediction block may be used for a temporal merge candidate.
코딩 장치는 현재 머지 후보들의 개수가 최대 머지 후보들의 개수보다 작은지 여부를 확인할 수 있다(S1930). 최대 머지 후보들의 개수는 미리 정의되거나 인코딩 장치(100)에서 디코딩 장치(200)로 시그널링될 수 있다. 예를 들어, 인코딩 장치(100)는 최대 머지 후보들의 개수에 관한 정보를 생성하고, 인코딩하여 비트스트림 형태로 디코딩 장치(200)로 전달할 수 있다. 최대 머지 후보들의 개수가 다 채워지면 이후의 후보 추가 과정은 진행하지 않을 수 있다. The coding apparatus may check whether the number of current merge candidates is smaller than the number of maximum merge candidates (S1930). The maximum number of merge candidates may be predefined or signaled from the encoding device 100 to the decoding device 200. For example, the encoding apparatus 100 may generate information on the number of maximum merge candidates, encode, and transmit the information to the decoding apparatus 200 in the form of a bitstream. When the maximum number of merge candidates is filled, the subsequent candidate addition process may not proceed.
확인 결과 현재 머지 후보들의 개수가 상기 최대 머지 후보들의 개수보다 작은 경우, 코딩 장치는 추가 머지 후보를 머지 후보 리스트에 삽입한다(S1940). 추가 머지 후보는 예를 들어 ATMVP(adaptive temporal motion vector prediction), 결합된 양방향 예측(combined bi-predictive) 머지 후보(현재 슬라이스의 슬라이스 타입이 B 타입인 경우) 및/또는 영 벡터(zero vector) 머지 후보를 포함할 수 있다.As a result of checking, if the number of current merge candidates is smaller than the number of the maximum merge candidates, the coding apparatus inserts an additional merge candidate into the merge candidate list (S1940). Additional merge candidates include, for example, adaptive temporal motion vector prediction (ATMVP), combined bi-predictive merge candidate (when the slice type of the current slice is B type), and/or zero vector merge. Can include candidates.
MVP 모드MVP mode
도 20은 본 명세서의 실시예에 따른 MVP(motion vector predictor) 후보 리스트를 구성하기 위한 흐름도의 예이다.20 is an example of a flowchart for configuring a motion vector predictor (MVP) candidate list according to an embodiment of the present specification.
MVP 모드는 AMVP(advanced MVP 또는 adaptive MVP)로 지칭될 수 있다. MVP 모드가 적용되는 경우, 복원된 공간적 주변 블록(예를 들어, 도 18의 주변 블록)의 움직임 벡터 및/또는 시간적 주변 블록(또는 Col 블록)에 대응하는 움직임 벡터를 이용하여, 움직임 벡터 예측자(motion vector predictor, MVP) 후보 리스트가 생성될 수 있다. 즉, 복원된 공간적 주변 블록의 움직임 벡터 및/또는 시간적 주변 블록에 대응하는 움직임 벡터는 움직임 벡터 예측자 후보로 사용될 수 있다. 예측에 관한 정보는 상기 리스트에 포함된 움직임 벡터 예측자 후보들 중에서 선택된 최적의 움직임 벡터 예측자 후보를 지시하는 선택 정보(예: MVP 플래그 또는 MVP 인덱스)를 포함할 수 있다. 이 때, 예측부는 상기 선택 정보를 이용하여, 움직임 벡터 후보 리스트에 포함된 움직임 벡터 예측자 후보들 중에서, 현재 블록의 움직임 벡터 예측자를 선택할 수 있다. 인코딩 장치(100)의 예측부는 현재 블록의 움직임 벡터와 움직임 벡터 예측자 간의 움직임 벡터 차분(MVD)을 구할 수 있고, 이를 인코딩하여 비트스트림 형태로 출력할 수 있다. 즉, MVD는 현재 블록의 움직임 벡터에서 상기 움직임 벡터 예측자를 뺀 값으로 구해질 수 있다. 이 때, 디코딩 장치(200)의 예측부는 상기 예측에 관한 정보에 포함된 움직임 벡터 차분을 획득하고, 상기 움직임 벡터 차분과 상기 움직임 벡터 예측자의 가산을 통해 현재 블록의 상기 움직임 벡터를 도출할 수 있다. 디코딩 장치의 예측부는 참조 픽처를 지시하는 참조 픽처 인덱스 등을 상기 예측에 관한 정보로부터 획득 또는 유도할 수 있다. 예를 들어, 움직임 벡터 예측자 후보 리스트는 도 20과 같이 구성될 수 있다.The MVP mode may be referred to as AMVP (advanced MVP or adaptive MVP). When the MVP mode is applied, a motion vector predictor using a motion vector of the reconstructed spatial neighboring block (eg, neighboring block in FIG. 18) and/or a motion vector corresponding to the temporal neighboring block (or Col block) A (motion vector predictor, MVP) candidate list may be generated. That is, a motion vector of the reconstructed spatial neighboring block and/or a motion vector corresponding to the temporal neighboring block may be used as a motion vector predictor candidate. The information on prediction may include selection information (eg, an MVP flag or an MVP index) indicating an optimal motion vector predictor candidate selected from among motion vector predictor candidates included in the list. In this case, the prediction unit may select a motion vector predictor of the current block from among motion vector predictor candidates included in the motion vector candidate list using the selection information. The prediction unit of the encoding apparatus 100 may obtain a motion vector difference (MVD) between the motion vector of the current block and the motion vector predictor, encode the motion vector, and output it in the form of a bitstream. That is, MVD may be obtained by subtracting the motion vector predictor from the motion vector of the current block. In this case, the prediction unit of the decoding apparatus 200 may obtain a motion vector difference included in the prediction information, and derive the motion vector of the current block by adding the motion vector difference and the motion vector predictor. . The prediction unit of the decoding apparatus may obtain or derive a reference picture index indicating a reference picture from the prediction information. For example, the motion vector predictor candidate list may be configured as shown in FIG. 20.
도 20을 참조하면, 코딩 장치는 움직임 벡터 예측을 위한 공간적 후보 블록을 탐색하여 예측 후보 리스트에 삽입한다(S2010). 예를 들어, 코딩 장치는 정해진 탐색 순서에 따라 주변 블록들에 대한 탐색을 수행하고, 공간적 후보 블록에 대한 조건을 만족하는 주변 블록의 정보를 예측 후보 리스트(MVP 후보 리스트)에 추가할 수 있다.Referring to FIG. 20, the coding apparatus searches for a spatial candidate block for motion vector prediction and inserts it into a prediction candidate list (S2010). For example, the coding apparatus may search for neighboring blocks according to a predetermined search order, and add information on neighboring blocks that satisfy a condition for a spatial candidate block to a prediction candidate list (MVP candidate list).
공간적 후보 블록 리스트를 구성한 후, 코딩 장치는 예측 후보 리스트에 포함된 공간적 후보 리스트의 개수와 기 설정된 기준 개수(예: 2)를 비교한다(S2020). 예측 후보 리스트에 포함된 공간적 후보 리스트의 개수가 기준 개수(예: 2)보다 크거나 같은 경우, 코딩 장치는 예측 후보 리스트의 구성을 종료할 수 있다. After constructing the spatial candidate block list, the coding apparatus compares the number of spatial candidate lists included in the prediction candidate list with a preset reference number (eg, 2) (S2020). When the number of spatial candidate lists included in the prediction candidate list is greater than or equal to the reference number (eg, 2), the coding apparatus may terminate the construction of the prediction candidate list.
그러나, 예측 후보 리스트에 포함된 공간적 후보 리스트의 개수가 기준 개수(예: 2)보다 작은 경우, 코딩 장치는 시간적 후보 블록을 탐색하여 예측 후보 리스트에 추가 삽입하고(S2030), 시간적 후보 블록이 사용 불가능한 경우, 제로 움직임 벡터를 예측 후보 리스트에 추가한다(S2040).However, when the number of spatial candidate lists included in the prediction candidate list is less than the reference number (eg, 2), the coding apparatus searches for a temporal candidate block and inserts it into the prediction candidate list (S2030), and the temporal candidate block is used. If not possible, a zero motion vector is added to the prediction candidate list (S2040).
예측 모드에 따라 도출된 움직임 정보를 기반으로 현재 블록에 대한 예측된 블록이 도출될 수 있다. 예측된 블록은 현재 블록의 예측 샘플들(예측 샘플 어레이)을 포함할 수 있다. 현재 블록의 움직임 벡터가 분수 샘플 단위를 가리키는 경우, 보간(interpolation) 절차가 수행될 수 있으며, 이를 통하여 참조 픽처 내에서 분수 샘플 단위의 참조 샘플들을 기반으로 상기 현재 블록의 예측 샘플들이 도출될 수 있다. 현재 블록에 어파인(affine) 인터 예측이 적용되는 경우, 샘플/서브블록 단위 움직임 벡터(motion vector)에 기반하여 예측 샘플들이 생성될 수 있다. 양방향(bi-direction) 예측이 적용되는 경우, 제1 방향 예측(예: L0 예측)을 기반으로 도출된 예측 샘플들과 제2 방향 예측(예: L1 예측)을 기반으로 도출된 예측 샘플들의 (위상에 따른) 가중합을 통하여 최종 예측 샘플들이 도출될 수 있다. 도출된 예측 샘플들을 기반으로 복원 샘플들 및 복원 픽처가 생성될 수 있고, 이후 인루프 필터링 등의 절차가 수행될 수 있음은 상술한 바와 같다.A predicted block for the current block may be derived based on motion information derived according to the prediction mode. The predicted block may include predicted samples (prediction sample array) of the current block. When the motion vector of the current block indicates a fractional sample unit, an interpolation procedure may be performed, through which prediction samples of the current block may be derived based on reference samples of the fractional sample unit within a reference picture. . When affine inter prediction is applied to the current block, prediction samples may be generated based on a motion vector per sample/subblock. When bi-direction prediction is applied, the prediction samples derived based on the first direction prediction (eg, L0 prediction) and the prediction samples derived based on the second direction prediction (eg, L1 prediction) Final prediction samples can be derived through weighted summation (according to the phase). As described above, reconstructed samples and reconstructed pictures may be generated based on the derived prediction samples, and then a procedure such as in-loop filtering may be performed.
한편, MVP 모드가 적용되는 경우, 참조 픽처 인덱스가 명시적으로 시그널링될 수 있다. 이 경우 L0 예측을 위한 참조 픽처 인덱스(refidxL0)와 L1 예측을 위한 참조 픽처 인덱스(refidxL1)가 개별적으로 시그널링될 수 있다. 예를 들어, MVP 모드가 적용되고 쌍 예측이 적용되는 경우, refidxL0에 관한 정보 및 refidxL1에 관한 정보가 모두 시그널링될 수 있다.Meanwhile, when the MVP mode is applied, a reference picture index may be explicitly signaled. In this case, a reference picture index (refidxL0) for L0 prediction and a reference picture index (refidxL1) for L1 prediction may be signaled separately. For example, when the MVP mode is applied and pair prediction is applied, both information about refidxL0 and information about refidxL1 may be signaled.
MVP 모드가 적용되는 경우, 상술한 바와 같이 인코딩 장치(100)에서 도출된 MVD에 관한 정보가 디코딩 장치(200)로 시그널링될 수 있다. MVD에 관한 정보는, 예를 들어, MVD 절대값 및 부호에 대한 x, y 성분을 나타내는 정보를 포함할 수 있다. 이 경우, MVD 절대값이 0보다 큰지 여부(abs_mvd_greater0_flag), 1보다 큰지 여부, MVD 나머지를 나타내는 정보(abs_mvd_greater1_flag)가 단계적으로 시그널링될 수 있다. 예를 들어, MVD 절대값이 1보다 큰지 여부를 나타내는 정보(abs_mvd_greater1_flag)는 MVD 절대값이 0보다 큰지 여부를 나타내는 플래그 정보(abs_mvd_greater0_flag)의 값이 1인 경우에 한하여 시그널링될 수 있다.When the MVP mode is applied, information on the MVD derived from the encoding device 100 may be signaled to the decoding device 200 as described above. The information on the MVD may include, for example, information indicating the absolute value of the MVD and the x and y components of the sign. In this case, whether the absolute MVD value is greater than 0 (abs_mvd_greater0_flag), whether it is greater than 1, and information indicating the remainder of the MVD (abs_mvd_greater1_flag) may be signaled in stages. For example, information indicating whether the absolute MVD value is greater than 1 (abs_mvd_greater1_flag) may be signaled only when the value of the flag information (abs_mvd_greater0_flag) indicating whether the absolute MVD value is greater than 0 is 1.
Symmetric MVD(SMVD)Symmetric MVD (SMVD)
도 21은 본 명세서의 실시예에 따른 대칭적(symmetric) MVD(motion vector difference) 모드가 적용되는 경우의 예를 도시한다.21 shows an example of a case in which a symmetric motion vector difference (MVD) mode according to an embodiment of the present specification is applied.
한편, 양방향 예측이 적용되는 경우, 코딩 효율을 고려하여 SMVD(symmetric MVD)가 사용될 수도 있다. 이 경우, 움직임 정보 중 일부의 시그널링이 생략될 수 있다. 예를 들어, SVMD가 현재 블록에 적용되는 경우, refidxL0에 관한 정보, refidxL1에 관한 정보, MVDL1에 관한 정보가 인코딩 장치(100)로부터 디코딩 장치(200)로 시그널링되지 않고, 내부적으로 도출될 수 있다. 예를 들어, 현재 블록에 MVP 모드 및 양방향 예측이 적용되는 경우, SMVD 적용 여부를 지시하는 플래그 정보(예: symmetric MVD 플래그 정보 또는 sym_mvd_flag 신택스 요소)가 시그널링될 수 있으며 플래그 정보의 값이 1인 경우 디코딩 장치(200)는 현재 블록에 SMVD가 적용되는 것으로 판단할 수 있다. Meanwhile, when bidirectional prediction is applied, symmetric MVD (SMVD) may be used in consideration of coding efficiency. In this case, signaling of some of the motion information may be omitted. For example, when SVMD is applied to the current block, information on refidxL0, information on refidxL1, and information on MVDL1 are not signaled from the encoding device 100 to the decoding device 200 and may be derived internally. . For example, when the MVP mode and bidirectional prediction are applied to the current block, flag information indicating whether to apply SMVD (eg, symmetric MVD flag information or sym_mvd_flag syntax element) may be signaled and the value of the flag information is 1 The decoding apparatus 200 may determine that SMVD is applied to the current block.
SMVD 모드가 적용되는 경우(즉, symmetric MVD 플래그 정보의 값이 1인 경우), mvp_l0_lfag, mvp_l1_flag, 및 MVDL0에 관한 정보가 명시적으로(explicitly) 시그널링될 수 있고, 상술한 바와 같이 refidxL0에 관한 정보, refidxL1에 관한 정보, MVDL1에 관한 정보의 시그널링이 생략된 상태로 디코더의 내부에서 도출될 수 있다. 예를 들어, refidxL0는 참조 픽처 리스트 0(리스트 0, L0, 또는 제1 참조 리스트로 지칭될 수 있음) 내에서 POC(picture order count) 순서상 현재 픽처에 가장 가까운 이전 참조 픽처를 가리키는 인덱스로 도출될 수 있다. refidxL1은 참조 픽처 리스트 1 (리스트 1, L1, 또는 제2 참조 픽처 리스트로 지칭될 수 있음) 내에서 POC 순서상 현재 픽처에 가장 가까운 이후 참조 픽처를 가리키는 인덱스로 도출될 수 있다. 또한, 예를 들어, refidxL0 및 refidxL1은 둘 다 각각 0으로 도출될 수 있다. 또한, 예를 들어, refidxL0 및 refidxL1은 현재 픽처와의 관계에서 동일한 POC 차를 가지는 최소 인덱스로 각각 도출될 수 있다. 보다 구체적인 예로서, [현재 픽처의 POC] - [refidxL0가 지시하는 제1 참조 픽처의 POC]를 제1 POC 차분이라고 하고, [refidxL1가 지시하는 제2 참조 픽처의 POC]를 제2 POC 차분이라고 할 때, 제1 POC 차분과 제2 POC 차분이 동일한 경우에 한하여 제1 참조 픽처를 가리키는 refidxL0의 값이 현재 블록의 refidxL0의 값으로 도출되고, 제2 참조 픽처를 가리키는 refidxL1의 값이 현재 블록의 refidxL1의 값으로 도출될 수도 있다. 또한, 예를 들어, 제1 POC 차분과 제2 POC 차분이 동일한 복수의 집합이 있는 경우, 그중 차분이 최소인 집합의 refidxL0, refidxL1이 현재 블록의 refidxL0, refidxL1로 도출될 수 있다.When the SMVD mode is applied (that is, when the value of symmetric MVD flag information is 1), information about mvp_l0_lfag, mvp_l1_flag, and MVDL0 may be explicitly signaled, and information about refidxL0 as described above , information on refidxL1, and signaling of information on MVDL1 may be omitted, and may be derived inside the decoder. For example, refidxL0 is derived as an index indicating the previous reference picture closest to the current picture in the order of the picture order count (POC) within the reference picture list 0 (which may be referred to as list 0, L0, or the first reference list). Can be. refidxL1 may be derived as an index indicating a subsequent reference picture closest to the current picture in the POC order in reference picture list 1 (which may be referred to as List 1, L1, or a second reference picture list). Also, for example, both refidxL0 and refidxL1 may be derived as 0, respectively. Also, for example, refidxL0 and refidxL1 may be derived as minimum indexes having the same POC difference in relation to the current picture. As a more specific example, [POC of the current picture]-[POC of the first reference picture indicated by refidxL0] is referred to as the first POC difference, and [POC of the second reference picture indicated by refidxL1] is referred to as the second POC difference. In this case, only when the first POC difference and the second POC difference are the same, the value of refidxL0 indicating the first reference picture is derived as the value of refidxL0 of the current block, and the value of refidxL1 indicating the second reference picture is the same as that of the current block. It can also be derived as the value of refidxL1. In addition, for example, when there are a plurality of sets in which the first POC difference and the second POC difference are the same, refidxL0 and refidxL1 of the set with the minimum difference may be derived as refidxL0 and refidxL1 of the current block.
MVDL1은 -MVDL0로 도출될 수 있다. 예를 들어, 현재 블록에 대한 최종 MV는 아래의 수학식 1과 같이 도출될 수 있다.MVDL1 can be derived as -MVDL0. For example, the final MV for the current block may be derived as in Equation 1 below.
Figure PCTKR2020003185-appb-M000001
Figure PCTKR2020003185-appb-M000001
수학식 1에서, mvx0, mvy0는 현재 블록에 대한 L0 방향 움직임 벡터의 x, y 성분을 나타내고, mvx1, mvy1는 현재 블록에 대한 L0 방향 예측을 위한 움직임 벡터의 x, y 성분을 나타내고, L1 방향 예측을 위한 움직임 벡터의 x, y 성분을 나타낸다. mvp0, mvp0는 L0 방향 예측을 위한 MVP의 움직임 벡터(L0 베이스 움직임 벡터), mvp1, mvp1은 L1 방향 예측을 위한 MVP의 움직임 벡터(L1 베이스 움직임 벡터)를 나타낸다. mvd0, mvd0는 L0 방향 예측을 위한 MVD의 x, y 성분을 나타낸다. 수학식 1에 따르면 L1 방향 예측을 위한 MVD는 L0 MVD와 동일한 값을 갖되 반대 부호를 갖는다.In Equation 1, mvx 0 and mvy 0 represent the x and y components of the L0 direction motion vector for the current block, and mvx 1 and mvy 1 represent the x and y components of the motion vector for L0 direction prediction for the current block. And the x and y components of the motion vector for L1 direction prediction. mvp 0 and mvp 0 denote an MVP motion vector for L0 direction prediction (L0 base motion vector), and mvp 1 and mvp 1 denote an MVP motion vector for L1 direction prediction (L1 base motion vector). mvd 0 and mvd 0 represent the x and y components of MVD for L0 direction prediction. According to Equation 1, MVD for L1 direction prediction has the same value as L0 MVD, but has an opposite sign.
어파인 모드(Affine mode)Affine mode
기존 비디오 코딩 시스템은 코딩 블록의 움직임을 표현하기 위해 하나의 움직임 벡터를 사용하였다(translation motion model 사용). 그러나, 하나의 움직임 벡터를 사용한 방법은 블록 단위에서 최적의 움직임을 표현했을 수 있으나, 실제 각 화소에 대한 최적의 움직임은 아니므로, 화소 단위에서 최적의 움직임 벡터를 결정한다면 부호화 효율을 높일 수 있다. 이를 위해 본 실시예는 어파인 움직임 모델(affine motion model)을 사용하여 인코딩/디코딩을 수행하는 어파인 움직임 예측(affine motion prediction) 방법이 설명된다. 어파인 움직임 예측 방법은 2개, 3개 혹은 4개의 움직임 벡터를 사용하여 블록의 각 화소 단위로 움직임 벡터가 표현될 수 있다.Existing video coding systems used one motion vector to represent the motion of a coding block (using a translation motion model). However, the method using one motion vector may express optimal motion in block units, but it is not actually optimal motion for each pixel, so if the optimal motion vector is determined in pixel units, coding efficiency can be improved. . To this end, the present embodiment describes an affine motion prediction method for encoding/decoding using an affine motion model. In the affine motion prediction method, a motion vector may be expressed in units of each pixel of a block using two, three, or four motion vectors.
도 22는 본 명세서의 실시예에 따른 어파인 움직임 모델(affine motion model)들의 예를 도시한다.22 illustrates an example of affine motion models according to an embodiment of the present specification.
어파인 움직임 모델은 도 22와 같이 4개의 움직임을 표현할 수 있다. 어파인 움직임 모델이 표현할 수 있는 움직임 중 3가지 움직임(translation, scale, rotate)을 표현하는 어파인 움직임 모델은 유사(또는 단순화된) 어파인 움직임 모델로 지칭되며, 본 명세서는 유사(또는 단수화된) 어파인 움직임 모델을 기준으로 제안된 방법들을 설명한다. 그러나, 본 명세서의 실시예가 유사(또는 단수화된) 어파인 움직임 모델에 한정되는 것은 아니다.The affine motion model may express four motions as shown in FIG. 22. The affine motion model that expresses three movements (translation, scale, and rotate) among the movements that can be expressed by the affine motion model is referred to as a similar (or simplified) affine motion model, and the present specification refers to a similar (or singular) motion model. The proposed methods are described based on the affine motion model. However, the embodiments of the present specification are not limited to a similar (or singular) affine motion model.
도 23a 및 도 23b는 본 명세서의 실시예에 따른 제어점(control point)별 움직임 벡터의 예를 도시한다.23A and 23B illustrate examples of motion vectors for each control point according to an embodiment of the present specification.
도 23a 및 도 23b와 같이 어파인 움직임 예측은 2개 이상의 제어점 움직임 벡터(control point motion vector, CPMV)들을 이용하여 블록에 포함된 화소 위치별로 움직임 벡터를 결정할 수 있다.As shown in FIGS. 23A and 23B, in the affine motion prediction, a motion vector may be determined for each pixel position included in a block using two or more control point motion vectors (CPMVs).
4-파라미터 어파인 움직임 모델(도 23a)에 대하여, 샘플 위치(x, y)에서의 움직임 벡터는 아래의 수학식 2와 같이 유도될 수 있다.For a 4-parameter affine motion model (FIG. 23A), a motion vector at the sample position (x, y) can be derived as in Equation 2 below.
Figure PCTKR2020003185-appb-M000002
Figure PCTKR2020003185-appb-M000002
6-파라미터 어파인 움직임 모델(도 23b)에 대하여, 샘플 위치(x, y)에서의 움직임 벡터는 아래의 수학식 3과 같이 유도될 수 있다.For the 6-parameter affine motion model (FIG. 23B), the motion vector at the sample position (x, y) can be derived as in Equation 3 below.
Figure PCTKR2020003185-appb-M000003
Figure PCTKR2020003185-appb-M000003
여기서 {v0x, v0y}는 부호화 블록의 좌상측(top-left) 코너 위치의 CP의 CPMV이고, {v1x, v1y}는 우상측(top-right) 코너 위치의 CP의 CPMV이고, {v2x, v2y}는 좌하측(bottom-left) 코너 위치의 CP의 CPMV이다. 그리고 W는 현재 블록의 너비(width)에 해당하고, H는 현재 블록의 높이(height)에 해당하고, {vx, vy}는 {x, y} 위치에서의 움직임 벡터이다.Where {v 0x , v 0y } is the CPMV of the CP at the top-left corner of the coding block, and {v 1x , v 1y } is the CPMV of the CP at the top-right corner, {v 2x , v 2y } is the CPMV of the CP at the bottom-left corner. In addition, W corresponds to the width of the current block, H corresponds to the height of the current block, and {v x , v y } is a motion vector at the position {x, y}.
도 24는 본 명세서의 실시예에 따른 각 서브블록에 대한 움직임 벡터의 예를 도시한다.24 shows an example of a motion vector for each subblock according to an embodiment of the present specification.
인코딩/디코딩 과정에서 어파인 MVF(motion vector field)는 화소 단위 혹은 이미 정의된 서브블록 단위에서 결정될 수 있다. 화소 단위로 MVF가 결정되는 경우 각 화소 값을 기준으로 움직임 벡터가 획득되고, 서브블록 단위로 MVP가 결정되는 경우 서브블록의 중앙(센터 우하측, 즉 중앙 4개의 샘플들 중 우하측 샘플) 화소 값 기준으로 해당 블록의 움직임 벡터가 획득될 수 있다. 이하 설명에서, 도 22와 같이 어파인 MVF가 4*4서브블록 단위에서 결정되는 경우를 가정하여 설명한다. 다만, 이것은 설명의 편의를 위함일 뿐 서브블록의 사이즈는 다양하게 변형될 수 있다.In the encoding/decoding process, a motion vector field (MVF), which is an affine, may be determined in a pixel unit or a predefined subblock unit. When the MVF is determined in units of pixels, a motion vector is obtained based on each pixel value, and when the MVP is determined in units of sub-blocks, the center of the sub-block (the lower right of the center, that is, the lower right of the center 4 samples) pixel A motion vector of a corresponding block may be obtained based on a value. In the following description, as shown in FIG. 22, it is assumed that the affine MVF is determined in units of 4*4 subblocks. However, this is only for convenience of explanation, and the size of the subblock may be variously changed.
즉, 어파인 예측이 사용 가능한 경우, 현재 블록에 적용가능한 움직임 모델은 다음 3가지를 포함할 수 있다. 병진 움직임 모델(translational motion model), 4-파라미터 어파인 움직임 모델(4-parameter affine motion model), 6-파라미터 어파인 움직임 모델(6-parameter affine motion mode). 여기서, 병진 움직임 모델은 기존 블록 단위 움직임 벡터가 사용되는 모델을 나타낼 수 있고, 4-파라미터 어파인 움직임 모델은 2개의 CPMV가 사용되는 모델을 나타낼 수 있고, 6-파라미터 어파인 움직임 모델은 3개의 CPMV가 사용되는 모델을 나타낼 수 있다. That is, when affine prediction is available, motion models applicable to the current block may include the following three types. Translational motion model, 4-parameter affine motion model, and 6-parameter affine motion mode. Here, the translational motion model can represent a model in which an existing block-based motion vector is used, a 4-parameter affine motion model can represent a model in which two CPMVs are used, and a 6-parameter affine motion model can represent three It can indicate the model in which CPMV is used.
어파인 움직임 예측은 어파인 MVP(또는 affine inter) 모드 및 어파인 머지를 포함할 수 있다. 어파인 움직임 예측에서, 현재 블록의 움직임 벡터들은 샘플 단위 또는 서브블록 단위로 유도될 수 있다.The affine motion prediction may include an affine MVP (or affine inter) mode and an affine merge. In affine motion prediction, motion vectors of a current block may be derived in units of samples or sub-blocks.
어파인 머지(Affine merge)Affine merge
어파인 머지 모드에서, CPMV는 어파인 움직임 예측으로 코딩된 주변 블록의 어파인 움직임 모델에 따라 결정될 수 있다. 탐색 순서에서 어파인 코딩된 주변 블록이 어파인 머지 모드를 위해 사용될 수 있다. 하나 또는 그 이상의 주변 블록들이 어파인 움직임 예측으로 코딩될 때 현재 블록은 AF_MERGE로 코딩될 수 있다. 즉, 어파인 머지 모드가 적용되는 경우, 주변 블록의 CPMV들을 이용하여 현재 블록의 CPMV들이 도출될 수 있다. 이 경우 주변 블록의 CPMV들이 그대로 현재 블록의 CPMV들로 사용될 수도 있고, 주변 블록의 CPMV들이 주변 블록의 사이즈 및 현재 블록의 사이즈를 기초로 수정됨으로써 현재 블록의 CPMV들로 사용될 수 있다.In the afine merge mode, the CPMV may be determined according to the afine motion model of the neighboring block coded by the afine motion prediction. Affine-coded neighboring blocks in the search order may be used for the affine merge mode. When one or more neighboring blocks are coded by affine motion prediction, the current block may be coded as AF_MERGE. That is, when the affine merge mode is applied, CPMVs of the current block may be derived using CPMVs of neighboring blocks. In this case, CPMVs of the neighboring block may be used as CPMVs of the current block, or CPMVs of the neighboring block may be used as CPMVs of the current block by being modified based on the size of the neighboring block and the size of the current block.
어파인 머지 모드가 적용되는 경우, 현재 블록에 대한 CPMV들의 도출을 위하여 어파인 머지 후보 리스트가 구성될 수 있다. 어파인 머지 후보 리스트는, 예를 들어, 다음 후보들 중 적어도 하나를 포함할 수 있다.When the affine merge mode is applied, an affine merge candidate list may be constructed to derive CPMVs for the current block. The affine merge candidate list may include at least one of the following candidates, for example.
1) 상속된 어파인 후보들(inherited affine candidates)1) Inherited affine candidates
2) 구성된 어파인 후보들(constructed affine candidates)2) Constructed affine candidates
3) 제로 MV 후보(zero MV candidate)3) zero MV candidate
여기서, 상속된 어파인 후보들은 주변 블록이 어파인 모드로 코딩된 경우, 주변 블록의 CPMV들을 기반으로 도출되는 후보이고, 구성된 어파인 후보들(constructed affine candidates)은 각 CPMV 단위로 해당 CP 주변 블록의 MV를 기반으로 CPMV들을 구성함(constructing)으로써 도출된 후보이고, 제로 MV 후보(zero MV candidate)는 0을 값으로 갖는 CPMV들로 구성된 후보를 나타낼 수 있다.Here, the inherited affine candidates are candidates derived based on the CPMVs of the neighboring block when the neighboring block is coded in the affine mode, and constructed affine candidates are the corresponding CP neighboring blocks in each CPMV unit. It is a candidate derived by constructing CPMVs based on MV, and a zero MV candidate may represent a candidate composed of CPMVs having a value of 0.
도 25는 본 명세서의 실시예에 따른 어파인 머지 후보 리스트를 구성하기 위한 흐름도의 예이다.25 is an example of a flowchart for configuring an affine merge candidate list according to an embodiment of the present specification.
도 25를 참조하면, 코딩 장치(인코딩 장치 또는 디코딩 장치)는 후보 리스트에 상속된 어파인 후보들(inherited affine candidates)을 삽입하고(S2510), 구성된 어파인 후보들(constructed affine candidates)을 어파인 후보 리스트에 삽입하고(S2520), 제로 MV 후보(zero MV candidate)를 어파인 후보 리스트에 삽입할 수 있다(S2530). 일 실시예에서, 코딩 장치는, 후보 리스트에 포함된 후보들의 개수가 기준 개수(예: 2개)보다 작은 경우, 구성된 어파인 후보들 또는 제로 MV 후보를 삽입할 수 있다.Referring to FIG. 25, a coding device (encoding device or decoding device) inserts inherited affine candidates into a candidate list (S2510), and constructs constructed affine candidates into an affine candidate list. Then, a zero MV candidate may be inserted into the affine candidate list (S2530). In an embodiment, when the number of candidates included in the candidate list is smaller than the reference number (eg, two), the coding apparatus may insert the configured affine candidates or the zero MV candidate.
도 26은 본 명세서의 실시예에 따른 상속된(inherited) 어파인 움직임 예측자를 유도하기 위한 블록들의 예를 도시하며, 도 27은 본 명세서의 실시예에 따른 상속된 어파인 움직임 예측자를 유도하기 위한 제어점 움직임 벡터들의 예를 도시한다.26 shows examples of blocks for deriving an inherited affine motion predictor according to an embodiment of the present specification, and FIG. 27 is a diagram for deriving an inherited affine motion predictor according to an embodiment of the present specification. An example of control point motion vectors is shown.
최대 2개(좌측 인접 CU로부터 하나와 상측 인접 CU들 중 하나)의 상속된 어파인 후보들이 있을 수 있으며, 이는 주변 블록들의 어파인 움직임 모델로부터 유도될 수 있다. 도 26에서 후보 블록들이 도시된다. 좌측 예측자에 대한 스캔 순서는 A0 - A1이고, 상측 예측자에 대한 스캔 순서는 B0 - B1 - B2이다. 각 측면으로부터의 첫번째 상속된 후보들만이 선택된다. 두 상속된 후보들 사이에 프루닝 체크(pruning check)는 수행되지 않을 수 있다. 인접한 어파인 CU가 확인되면, 인접한 어파인 CU의 제어점 움직임 벡터들이 현재 CU의 어파인 머지 리스트에서 CPMVP(control point motion vector predictor) 후보를 유도하기 위해 사용될 수 있다. 도 27에 도시된 것과 같이, 만약 좌측 주변 블록 A가 어파인 모드로 코딩된 경우, 블록 A를 포함하는 CU의 움직임 벡터들 좌상측 코너, 우상측 코너, 및 좌하측 코너의 v2, v3, 및 v4가 사용된다. 블록 A가 4-파라미터 어파인 모델로 코딩되면, 현재 CU의 2개의 CPMV들이 v2 및 v3에 따라 계산된다. 블록 A가 6-파라미터 모델로 코딩된 경우, 현재 CU의 3개의 CPMV들은 v2, v3, 및 v4에 따라 계산된다.There may be up to two (one from the left neighboring CU and one of the upper neighboring CUs) of inherited affine candidates, which may be derived from the affine motion model of neighboring blocks. Candidate blocks are shown in FIG. 26. The scan order for the left predictor is A0-A1, and the scan order for the upper predictor is B0-B1-B2. Only the first inherited candidates from each side are selected. A pruning check may not be performed between the two inherited candidates. When the adjacent affine CU is identified, control point motion vectors of the adjacent affine CU may be used to derive a control point motion vector predictor (CPMVP) candidate from the affine merge list of the current CU. As shown in FIG. 27, if the left neighboring block A is coded in the afine mode, motion vectors of the CU including the block A are v 2 , v 3 of the upper left corner, the upper right corner, and the lower left corner. , And v 4 are used. When block A is coded with a 4-parameter affine model, two CPMVs of the current CU are calculated according to v 2 and v 3 . When block A is coded with a 6-parameter model, the three CPMVs of the current CU are calculated according to v 2 , v 3 , and v 4 .
도 28은 본 명세서의 실시예에 따른 구성된(constructed) 어파인 머지 후보를 유도하기 위한 블록들의 예를 도시한다.28 shows examples of blocks for deriving a constructed affine merge candidate according to an embodiment of the present specification.
구성된 어파인 머지(constructed affine merge)는 각 제어점 마다의 이웃한 병진 움직임 정보를 결합함으로써 구성되는 후보를 의미한다. 도 28에서 도시된 것과 같이 제어점들에 대한 움직임 정보는 특정된 공간적 이웃들 및 시간적 이웃들로부터 유도된다. CPMVk (k = 1, 2, 3, 4)는 k번째 제어점을 나타낸다. 좌상측 코너의 CPMV1 (CP0)에 대하여, B2 - B3 - A2 순서로 블록들이 체크되고 첫번째 사용 가능한 블록의 MV가 사용된다. 우상측 코너의 CPMV2 (CP1)에 대하여 B1 - B0 순서로 블록들이 체크되고, 좌하측 코너의 CPMV3 (CP2)에 대하여 A1 - A0 순서로 블록들이 체크된다. 사용 가능하다면, TMVP가 우하측 코너의 CPMV4 (CP3)에 대하여 사용된다.The constructed affine merge means a candidate formed by combining neighboring translational motion information for each control point. As shown in FIG. 28, motion information for control points is derived from specified spatial and temporal neighbors. CPMV k (k = 1, 2, 3, 4) represents the kth control point. For CPMV1 (CP0) of the upper left corner, blocks are checked in the order of B2-B3-A2 and the MV of the first available block is used. Blocks are checked in the order of B1-B0 with respect to CPMV2 (CP1) in the upper right corner, and blocks in the order of A1-A0 with CPMV3 (CP2) in the lower left corner. If available, TMVP is used for CPMV4 (CP3) in the lower right corner.
4개의 제어점들의 MV들이 획득되면, 어파인 머지 후보들이 이러한 움직임 정보에 기반하여 구성된다. 아래의 제어점 MV들의 조합들이 순서대로 사용된다:When MVs of the four control points are obtained, affine merge candidates are configured based on this motion information. The following combinations of control point MVs are used in order:
{CPMV1, CPMV2, CPMV3}, {CPMV1, CPMV2, CPMV4}, {CPMV1, CPMV3, CPMV4},{CPMV1, CPMV2, CPMV3}, {CPMV1, CPMV2, CPMV4}, {CPMV1, CPMV3, CPMV4},
{CPMV2, CPMV3, CPMV4}, {CPMV1, CPMV2}, {CPMV1, CPMV3}{CPMV2, CPMV3, CPMV4}, {CPMV1, CPMV2}, {CPMV1, CPMV3}
3개의 CPMV들의 조합들은 6-파라미터 어파인 머지 후보를 구성하고, 2개의 CPMV들의 조합은 4-파라미터 어파인 머지 후보를 구성한다. 모션 스케일링 프로세스를 회피하기 위하여, 제어점들의 참조 인덱스들이 다르면, 관련된 제어점 MV들의 조합은 버려진다(discarded).Combinations of three CPMVs constitute a 6-parameter affine merge candidate, and a combination of two CPMVs constitutes a 4-parameter affine merge candidate. In order to avoid the motion scaling process, if the reference indices of the control points are different, the combination of the related control point MVs is discarded.
어파인 MVP(Affine MVP)Affine MVP
도 29는 본 명세서의 실시예에 따른 어파인 MVP 후보 리스트를 구성하기 위한 흐름도의 예이다.29 is an example of a flowchart for configuring an affine MVP candidate list according to an embodiment of the present specification.
어파인 MVP 모드에서, 현재 블록에 대한 2개 이상의 CPMVP(control point motion vector prediction)와 CPMV가 결정 이후, 차이 값에 해당하는 CPMVD(control point motion vector difference)를 인코딩 장치(100)로부터 디코딩 장치(200)로 전송된다.In the afine MVP mode, after two or more control point motion vector prediction (CPMVP) and CPMV for the current block are determined, a control point motion vector difference (CPMVD) corresponding to the difference value is obtained from the encoding device 100 from the decoding device ( 200).
어파인 MVP 모드가 적용되는 경우, 현재 블록에 대한 CPMV들의 도출을 위하여 어파인 MVP 후보 리스트가 구성될 수 있다. 예를 들어, 어파인 MVP 후보 리스트는 다음 후보들 중 적어도 하나를 포함할 수 있다. 예를 들어, 어파인 MVP 후보 리스트는 최대 n개(예: 2개)의 후보를 포함할 수 있다.When the affine MVP mode is applied, an affine MVP candidate list may be configured to derive CPMVs for the current block. For example, the affine MVP candidate list may include at least one of the following candidates. For example, the affine MVP candidate list may include a maximum of n (eg, 2) candidates.
1) 인접 CU들의 CPMV들로부터 외삽된(extrapolated) 상속된 어파인 MVP 후보들 (Inherited affine mvp candidates that extrapolated from the CPMVs of the neighbour CUs) (S2910)1) Inherited affine mvp candidates that extrapolated from the CPMVs of the neighbor CUs (S2910)
2) 인접 CU들의 병진 MV들을 사용하여 유도되는 구성된 어파인 MVP 후보들 CPMVPs (Constructed affine mvp candidates CPMVPs that are derived using the translational MVs of the neighbour CUs) (S2920)2) Constructed affine mvp candidates CPMVPs that are derived using the translational MVs of the neighbor CUs) derived using translational MVs of adjacent CUs (S2920)
3) 주변 CU들로부터의 병진 MV들에 기반한 추가적인 후보들 (Additional candidates based on Translational MVs from neighboring CUs) (S2930)3) Additional candidates based on Translational MVs from neighboring CUs (S2930)
4) 제로 MV 후보 (Zero MVs candidate) (S2940)4) Zero MVs candidate (S2940)
여기서, 상속된 어파인 후보(inherited affine candidate)는, 주변 블록이 어파인 모드로 코딩된 경우 주변 블록의 CPMV들에 기반하여 도출되는 후보이고, 구성된 어파인 후보(constructed affine candidate)는 각 CPMV 단위로 해당 CP 주변 블록의 MV를 기반으로 CPMV들을 구성함으로써 도출된 후보이며, 제로 MV 후보는 그 값이 0인 CPMV들로 구성된 후보를 나타낸다. 어파인 MVP 후보 리스트에 대한 최대 후보 개수가 2개인 경우, 위 순서에서 2) 이하의 후보들은 현재 후보의 개수가 2개 미만인 경우에 대해 고려되고 추가될 수 있다. 또한, 주변 CU들로부터의 병진 MV들에 기반한 추가적인 후보들(additional candidates based on Translational MVs from neighboring CUs)은 아래와 같은 순서로 도출될 수 있다.Here, the inherited affine candidate is a candidate derived based on the CPMVs of the neighboring block when the neighboring block is coded in the affine mode, and the constructed affine candidate is each CPMV unit. As a candidate, it is a candidate derived by configuring CPMVs based on the MV of a block adjacent to the corresponding CP, and a zero MV candidate represents a candidate composed of CPMVs whose value is 0. When the maximum number of candidates for the affine MVP candidate list is two, in the above order, 2) or less candidates may be considered and added when the number of current candidates is less than two. In addition, additional candidates based on Translational MVs from neighboring CUs from neighboring CUs may be derived in the following order.
1) 만약 후보 개수가 2 미만이고 구성된 후보(constructed candidate)의 CPMV0가 유효하면 CPMV0를 어파인 MVP 후보로 사용한다. 즉, CP0, CP1, CP2의 MV가 모두 구성된 후보(constructed candidate)의 CPMV0와 동일하게 설정된다.1) If the number of candidates is less than 2 and the constructed candidate CPMV0 is valid, CPMV0 is used as an affine MVP candidate. That is, the MVs of CP0, CP1, and CP2 are all set to be the same as CPMV0 of the constructed candidate.
2) 만약 후보 개수가 2 미만이고 구성된 후보(constructed candidate)의 CPMV1 이 유효하면 CPMV1를 어파인 MVP 후보로 사용한다. 즉, CP0, CP1, CP2의 MV 가 모두 구성된 후보(constructed candidate)의 CPMV1와 동일하게 설정된다. 2) If the number of candidates is less than 2 and the constructed candidate CPMV1 is valid, CPMV1 is used as an affine MVP candidate. That is, the MVs of CP0, CP1, and CP2 are all set to be the same as CPMV1 of the constructed candidate.
3) 만약 후보 개수가 2 미만이고 구성된 후보(constructed candidate)의 CPMV2가 유효하면 CPMV2를 어파인 MVP 후보로 사용한다. 즉, CP0, CP1, CP2의 MV가 모두 구성된 후보(constructed candidate)의 CPMV2와 동일하게 설정된다.3) If the number of candidates is less than 2 and the constructed candidate CPMV2 is valid, CPMV2 is used as the affine MVP candidate. That is, the MVs of CP0, CP1, and CP2 are all set to be the same as CPMV2 of the constructed candidate.
4) 만약 후보 개수가 2 미만이면 TMVP(temporal motion vector predictor or mvCol)를 어파인 MVP 후보로 사용한다.4) If the number of candidates is less than 2, TMVP (temporal motion vector predictor or mvCol) is used as an affine MVP candidate.
어파인 MVP 후보 리스트는 도 29와 같은 절차에 의해 도출될 수 있다.The affine MVP candidate list may be derived by the procedure shown in FIG. 29.
상속된 MVP 후보들의 확인 순서는 상속된 어파인 머지 후보들의 확인 순서와 동일하다. 다른 점은, MVP 후보에 대하여, 현재 블록과 동일한 참조 픽처를 갖는 어파인 CU만이 고려된다는 점이다. 상속된 어파인 움직임 예측자가 후보 리스트에 추가될 때 프루닝 프로세스는 적용되지 않는다.The order of checking inherited MVP candidates is the same as that of the inherited affine merge candidates. The difference is that, for the MVP candidate, only affine CUs having the same reference picture as the current block are considered. When the inherited affine motion predictor is added to the candidate list, the pruning process is not applied.
구성된 MVP 후보는 도 28에 도시된 주변 블록들로부터 유도된다. 어파인 머지 후보의 구성과 동일한 확인 순서가 사용된다. 또한, 주변 블록의 참조 픽처 인덱스 또한 확인된다. 확인 순서에서 인터 코딩되고 현재 CU와 동일한 참조 픽처를 갖는 첫번째 블록이 사용된다.The configured MVP candidate is derived from neighboring blocks shown in FIG. 28. The same confirmation order as the composition of the affine merge candidate is used. In addition, reference picture indexes of neighboring blocks are also checked. The first block that is inter-coded in the check order and has the same reference picture as the current CU is used.
SbTMVP (Subblock-based temporal motion vector prediction)SbTMVP (Subblock-based temporal motion vector prediction)
도 30a 및 도 30b는 본 명세서의 실시예에 따른 ATMVP(adaptive temporal motion vector prediction)에서 사용되는 공간적 주변 블록들과 공간적 주변 블록으로부터 도출된 서브(sub)-CU(coding block) 움직임 필드의 예를 도시한다. 30A and 30B illustrate examples of spatial neighboring blocks used in adaptive temporal motion vector prediction (ATMVP) and sub-coding block (CU) motion fields derived from spatial neighboring blocks according to an embodiment of the present specification. Shows.
SbTMVP(Subblock-based temporal motion vector prediction) 방법이 사용될 수 있다. TMVP(temporal motion vector prediction)와 유사하게, 현재 픽처에서 CU들에 대한 움직임 벡터 예측자와 머지 모드를 개선하기 위하여 SbTMVP가 동일위치 픽처에서 움직임 필드를 사용할 수 있다. TMVP에 의해 사용되는 동일한 동일위치 픽처가 SbTMVP에 대하여 사용된다. SbTMVP는 아래의 두 측면에서 TMVP와 차이가 있다. Subblock-based temporal motion vector prediction (SbTMVP) method may be used. Similar to temporal motion vector prediction (TMVP), SbTMVP may use a motion field in the co-located picture to improve the motion vector predictor and merge mode for CUs in the current picture. The same co-located picture used by TMVP is used for SbTMVP. SbTMVP differs from TMVP in the following two aspects.
1. TMVP는 CU 레벨에서 움직임을 예측하나 SbTMVP는 sub-CU 레벨에서 움직임을 예측한다.1. TMVP predicts motion at the CU level, but SbTMVP predicts motion at the sub-CU level.
2. TMVP각 동일위치 픽처에서의 동일위치 블록(여기서 동일위치 블록은 현재으로CU에 대하여 우하측 또는 센터 블록임)부터 시간적 움직임 벡터를 가져오는 반면, SbTMVP는 동일위치 픽처로부터의 시간적 움직임 정보를 가져오기 이전에 움직임 시프트를 적용하는데, 여기서 움직임 시프트는 현재 CU의 공간적 주변 블록들 중 하나로부터의 움직임 벡터로부터 획득된다.2. TMVP The temporal motion vector is obtained from the co-located block in each co-located picture (here, the co-located block is the current lower-right or center block with respect to the CU), whereas SbTMVP retrieves temporal motion information from the co-located picture. Apply motion shift before import, where the motion shift is obtained from a motion vector from one of the spatial neighboring blocks of the current CU.
SbTMVP 프로세스가 도 30a 및 도 30b에서 도시된다. SbTMVP는 두 단계에서 현재 CU 내 sub-CU들의 움직임 벡터들을 예측한다. 제1 단계에서, 도 30a에서의 공간적 이웃들이 A1, B1, B0, A0의 순서로 검사된다. 동일위치 픽처를 그 참조 픽처로서 사용하는 움직임 벡터를 갖는 첫번째 공간적 주변 블록이 확인될 때, 이 움직임 벡터는 움직임 시프트가 적용될 것으로 선택된다. (As soon as and the first spatial neighboring block that has a motion vector that uses the collocated picture as its reference picture is identified, this motion vector is selected to be the motion shift to be applied). 그러한 움직임이 공간적 주변들로부터 확인되지 않으면, 움직임 시프트는 (0, 0)으로 설정된다.The SbTMVP process is shown in Figs. 30A and 30B. SbTMVP predicts motion vectors of sub-CUs in the current CU in two steps. In the first step, the spatial neighbors in FIG. 30A are examined in the order of A1, B1, B0, and A0. When the first spatial neighboring block having a motion vector using the co-located picture as its reference picture is identified, this motion vector is selected to be motion shifted. (As soon as and the first spatial neighboring block that has a motion vector that uses the collocated picture as its reference picture is identified, this motion vector is selected to be the motion shift to be applied). If such motion is not confirmed from spatial surroundings, the motion shift is set to (0, 0).
제2 단계에서, 도 30b에서 도시된 것과 같이 동일위치 픽처로부터 sub-CU 레벨 움직임 정보(움직임 벡터들 및 참조 인덱스들)를 획득하기 위하여 제1 단계에서 확인된 움직임 시프트가 적용된다(즉, 현재 블록의 좌표들에 더해진다). 도 30b에서의 예는 블록 A1의 움직임으로 움직임 시프트가 설정되는 것을 가정한다. 그러면, 각 sub-CU에 대하여, 동일위치 픽처에서의 그 대응하는 블록(센터 샘플을 커버하는 가장 작은 움직임 그리드)의 움직임 정보가 sub-CU에 대한 움ㅈ깅미 정보를 유도하기 위하여 사용된다. 동일위치 sub-CU의 움직임 정보가 확인된 이후, TMVP 프로세스와 유사한 방식으로 현재 sub-CU의 참조 인덱스들과 움직임 벡터들로 변환된다, 여기서 시간적 움직임 스케일링이 시간적 움직임 벡터들의 참조 픽처들이 현재 CU의 시간적 움직임 벡터들에 얼라인(align)되도록 적용된다.In the second step, the motion shift identified in the first step is applied to obtain sub-CU level motion information (motion vectors and reference indices) from the co-located picture as shown in FIG. 30B (that is, the current Are added to the block's coordinates). The example in FIG. 30B assumes that a motion shift is set by the motion of block A1. Then, for each sub-CU, the motion information of the corresponding block (the smallest motion grid covering the center sample) in the co-located picture is used to derive the motion information for the sub-CU. After the motion information of the co-located sub-CU is confirmed, it is converted into reference indices and motion vectors of the current sub-CU in a manner similar to the TMVP process, where temporal motion scaling is the reference pictures of the temporal motion vectors. It is applied to be aligned with temporal motion vectors.
SbTMVP 후보와 어파인 머지 후보들을 포함하는 결합된 서브블록 기반의 머지 리스트가 어파인 머지 모드(서브블록 기반 머지 모드로 지칭될 수 있음)의 시그널링을 위해 사용될 수 있다. SbTMVP 모드는 SPS(sequence parameter set)에 의해 활성화/비활성화될 수 있다. SbTMVP 모드가 활성화되면, SbTMVP 예측자가 서브블록 기반의 머지 후보들의 리스트의 첫번째 엔트리로서 추가되고, 어파인 머지 후보들이 이후에 추가된다. 어파인 머지 후보 리스트의 최대 허용된 사이즈는 5일 수 있다.The combined subblock-based merge list including the SbTMVP candidate and the afine merge candidate may be used for signaling of the afine merge mode (which may be referred to as a subblock-based merge mode). The SbTMVP mode may be activated/deactivated by a sequence parameter set (SPS). When the SbTMVP mode is activated, the SbTMVP predictor is added as the first entry in the list of subblock-based merge candidates, and affine merge candidates are added later. The maximum allowed size of the affine merge candidate list may be 5.
SbTMVP에서 사용되는 sub-CU 사이즈는 8x8로 고정되고, 어파인 머지 모드에 대해서도 동일하며, SbTMVP 모드는 오직 너비와 높이가 모두 8보다 크거나 같은 CU에 대해서만 적용될 수 있다.The size of the sub-CU used in SbTMVP is fixed at 8x8, the same is applied to the affine merge mode, and the SbTMVP mode can only be applied to CUs with both width and height greater than or equal to 8.
추가적인 SbTMVP 머지 후보의 인코딩 로직은 다른 머지 후보들과 동일하며, 즉, P 또는 B 슬라이스 내의 각 CU에 대하여, SbTMVP 후보를 사용하지 여부를 결정하기 위한 추가적인 RD(rate-distortion) 체크가 수행된다.The encoding logic of the additional SbTMVP merge candidate is the same as the other merge candidates, that is, for each CU in the P or B slice, an additional RD (rate-distortion) check is performed to determine whether to use the SbTMVP candidate.
AMVR (Adaptive Motion Vector Resolution)AMVR (Adaptive Motion Vector Resolution)
기존에, 슬라이스 헤더에서 use_integer_mv_flag가 0일 때 (CU의 예측된 움직임 벡터와 움직임 벡터 사이의) MVD(motion vector difference)가 1/4 휘도 샘플(quarter-luma-sample) 단위로 시그널링 될 수 있다. 본 문서에서, CU-레벨 AMVR 방식이 소개된다. AMVR은 CU의 MVD가 1/4 휘도 샘플, 정수 휘도 샘플, 또는 4 휘도 샘플 단위로 코딩되도록 할 수 있다. 현재 CU가 적어도 하나의 0이 아닌 MVD 성분(non-zero MVD component)을 가지면, CU-레벨 MVD 해상도 지시자(indication)가 조건적으로 시그널링된다. 모든 MVD 성분들(즉, 참조 리스트 L0 및 참조 리스트 L1에 대한 수평 및 수직 MVD들)이 0이면, 1/4 휘도 샘플 MVD 해상도가 유추된다.Conventionally, when use_integer_mv_flag in a slice header is 0, a motion vector difference (MVD) (between the predicted motion vector and the motion vector of the CU) may be signaled in units of quarter-luma-samples. In this document, the CU-level AMVR scheme is introduced. The AMVR may cause the MVD of the CU to be coded in units of 1/4 luminance samples, integer luminance samples, or 4 luminance samples. If the current CU has at least one non-zero MVD component, a CU-level MVD resolution indicator is conditionally signaled. If all MVD components (i.e., horizontal and vertical MVDs for reference list L0 and reference list L1) are 0, then the 1/4 luminance sample MVD resolution is inferred.
적어도 하나의 0이 아닌 MVD 성분을 갖는 CU에 대하여, 제1 플래그가 1/4 휘도 샘플 MVD 정확도가 상기 CU에 대해 적용되는지 여부를 결정하기 위해 시그널링된다. 만약 제1 플래그가 0이면, 추가적인 시그널링이 필요하지 않고 1/4 휘도 샘플 MVD 정확도가 현재 CU에 대해 사용된다. 그렇지 않으면, 제2 플래그가 정수 휘도 샘플 또는 4 휘도 샘플 MVD 정확도가 사용되는지 여부를 지시하기 위해 시그널링 된다. 복원된 MV가 의도된 정확도(1/4 휘도 샘플, 정수 휘도 샘플, 또는 4 휘도 샘플)를 담보하기 위하여, CU에 대한 움직임 벡터 예측자들은 이전에 MVD와 함께 추가된 움직임 벡터 예측자와 동일한 정확도를 갖도록 반올림될(rounded) 수 있다. 움직임 벡터 예측자들은 0으로 반올림될 수 있다. (즉, 음의 움직임 벡터 예측자는 양의 무한대로 반올림되고 양의 움직임 벡터 예측자는 음의 무한대로 반올림된다). 인코더는 RD 체크를 사용하여 현재 CU에 대한 움직임 벡터 해상도를 결정한다. 각 MVD 해상도에 대한 3번의 CU-레벨 RD 체크를 항상 수행하는 것을 회피하기 위하여, 4 휘도 샘플 MVD 해상도의 RD 체크는 조건적으로 호출될 수 있다. 1/4 샘플 MVD 정확도의 RD 비용이 첫번째로 계산된다. 그러면, 4 휘도 샘플 MVD 정확도의 RD 비용의 확인이 필요한지 여부를 결정하기 위하여 정수 휘도 샘플 MVD 정확도의 RD 비용이 1/4 휘도 샘플 MVD 정확도의 RD 비용과 비교된다. 1/4 휘도 샘플 MVD 정확도에 대한 RD 비용이 정수 휘도 샘플 MVD 정확도의 RD 비용보다 작을 때, 4 샘플 MVD 정확도의 RD 비용은 생략된다.For a CU with at least one non-zero MVD component, a first flag is signaled to determine whether 1/4 luminance sample MVD accuracy is applied for that CU. If the first flag is 0, no additional signaling is required and 1/4 luminance sample MVD accuracy is used for the current CU. Otherwise, a second flag is signaled to indicate whether integer luminance samples or 4 luminance samples MVD accuracy is used. In order for the reconstructed MV to assure the intended accuracy (1/4 luminance sample, integer luminance sample, or 4 luminance sample), the motion vector predictors for the CU have the same accuracy as the motion vector predictors previously added with the MVD. Can be rounded to have Motion vector predictors can be rounded to zero. (I.e., negative motion vector predictors are rounded to positive infinity and positive motion vector predictors are rounded to negative infinity). The encoder determines the motion vector resolution for the current CU using the RD check. In order to avoid always performing three CU-level RD checks for each MVD resolution, the RD check of 4 luminance samples MVD resolution can be called conditionally. The RD cost of 1/4 sample MVD accuracy is calculated first. Then, the RD cost of the integer luminance sample MVD accuracy is compared with the RD cost of the 1/4 luminance sample MVD accuracy in order to determine whether it is necessary to check the RD cost of the 4 luminance sample MVD accuracy. When the RD cost for 1/4 luminance sample MVD accuracy is less than the RD cost for integer luminance sample MVD accuracy, the RD cost of 4 sample MVD accuracy is omitted.
움직임 필드 저장 (Motion Field Storage)Motion Field Storage
메모리 부하의 감소를 위하여, 이전에 디코딩된 참조 픽처의 움직임 정보는 일정 영역 단위로 저장될 수 있다. 이는 temporal motion field storage, motion field compression, 또는 motion data compression으로 지칭될 수 있다. 이 경우 어파인 모드가 적용되었는지 여부에 따라 움직임 정보의 저장 단위가 다르게 설정될 수 있다. 이 경우, 명시적으로 시그널링된 움직임 벡터들 중에서 가장 높은 정확도를 갖는 것은 1/4 휘도 샘플(quarter-luma-sample)이다. 어파인 모드와 같은 몇몇 인터 예측 모드들에서, 움직임 벡터들은 1/16 휘도 샘플 정확도(1/16th-luma-sample precision)에서 유도되고 움직임 보상된 예측은 1/16 샘플 정확도에서 수행된다. 내부적 움직임 필드 저장의 관점에서, 모든 움직임 벡터들은 1/16 휘도 샘플 정확도로 저장된다.In order to reduce the memory load, motion information of a reference picture previously decoded may be stored in units of a predetermined area. This may be referred to as temporal motion field storage, motion field compression, or motion data compression. In this case, the storage unit of motion information may be set differently depending on whether the affine mode is applied. In this case, the one with the highest accuracy among explicitly signaled motion vectors is a quarter-luma-sample. In some inter prediction modes, such as the afine mode, motion vectors are derived at 1/16th-luma-sample precision and motion compensated prediction is performed at 1/16th-sample accuracy. In terms of internal motion field storage, all motion vectors are stored with 1/16 luminance sample accuracy.
본 문서에서, TMVP와 ATMVP에 의해 사용되는 시간적 움직임 필드 저장을 위하여, 움직임 필드 압축은 8x8 정확도(granularity)에서 수행된다. In this document, for storing the temporal motion field used by TMVP and ATMVP, motion field compression is performed with 8x8 granularity.
히스토리 기반 머지 후보 유도(History-based merge candidate derivation)History-based merge candidate derivation
HMVP(history-based MVP) 머지 후보는 공간적 MVP와 TMVP 이후 머지 리스트에 추가될 수 있다. 본 방법에서, 이전에 코딩된 블록의 움직임 정보가 테이블에 저장되고 현재 CU에 대한 MVP로서 사용된다. 다수의 HMVP 후보들로 구성된 테이블은 인코딩/디코딩 프로세스 동안 유지된다. 새로운 CTU 행이 사용되면, 테이블은 리셋된다(비워진다). 서브블록이 아닌 인터 예측으로 코딩된 CU가 있을 때, 관련된 움직임 정보가 새로운 HMVP 후보로서 테이블의 마지막 엔트리에 추가된다. HMVP (history-based MVP) merge candidates may be added to the merge list after spatial MVP and TMVP. In this method, motion information of a previously coded block is stored in a table and used as an MVP for a current CU. A table composed of multiple HMVP candidates is maintained during the encoding/decoding process. When a new CTU row is used, the table is reset (emptied). When there is a CU coded by inter prediction other than a subblock, related motion information is added to the last entry of the table as a new HMVP candidate.
일 실시예에서, HMVP 테이블 사이즈(S)는 6으로 설정되는데, 이는 최대 6개의 HVMP 후보들이 테이블에 추가될 수 있음을 의미한다. 테이블에 새로운 움직임 후보를 삽입할 때, 제한된(constrained) FIFO(first-in-first-out) 규칙이 사용된다. 여기서 추가하고자 하는 HMVP 후보가 동일한 HMVP 후보가 테이블에 존재하는지 여부를 확인하기 위한 중복성(redundancy) 확인이 먼저 수행된다. 동일한 HMVP 후보가 존재하면, 기존의 동일한 HMVP 후보가 테이블로부터 제거되고 모든 HMVP 후보들이 앞 순서로 이동한다. In one embodiment, the HMVP table size (S) is set to 6, which means that a maximum of 6 HVMP candidates can be added to the table. When inserting a new motion candidate into a table, a constrained first-in-first-out (FIFO) rule is used. Here, a redundancy check is first performed to check whether an HMVP candidate with the same HMVP candidate to be added exists in the table. If the same HMVP candidate exists, the same existing HMVP candidate is removed from the table and all HMVP candidates are moved in the previous order.
HMVP 후보들은 머지 후보 리스트 구성 프로세스에서 사용될 수 있다. 테이블에서 가장 최근의 HMVP 후보들이 확인되고, TMVP 후보 다음 순서로 머지 후보 리스트에 삽입된다. HMVP 후보에 대한 중복성 확인이 공간적 또는 시간적 머지 후보에 대해 적용된다.HMVP candidates can be used in the merge candidate list construction process. The most recent HMVP candidates are identified in the table, and are inserted into the merge candidate list in the order following the TMVP candidates. Redundancy check for HMVP candidates is applied to spatial or temporal merge candidates.
중복성 확인 동작들의 수행 횟수를 감소시키기 위하여, 아래의 단순화 방법들이 사용될 수 있다.In order to reduce the number of times the redundancy check operations are performed, the following simplified methods may be used.
1) 머지 리스트 생성을 위한 HMVP 후보들의 개수는 (N <= 4) ? M : (8 - N)으로 설정된다. 여기서 N은 머지 리스트에 존재하는 후보들의 개수, M은 테이블에서 사용 가능한 HMVP 후보들의 개수를 나타낸다.1) The number of HMVP candidates for creating a merge list is (N <= 4)? M: It is set to (8-N). Here, N denotes the number of candidates existing in the merge list, and M denotes the number of HMVP candidates available in the table.
2) 사용 가능한 머지 후보들의 총 개수가 최대 허용된 머지 후보들의 개수에서 1을 뺀 값에 도달하면, HVMP로부터의 머지 후보 리스트 구성 프로세스는 종료된다.2) When the total number of usable merge candidates reaches a value minus 1 from the maximum number of allowed merge candidates, the process of constructing a merge candidate list from HVMP is terminated.
쌍 평균 머지 후보 유도(Pair-wise average merge candidates derivation)Pair-wise average merge candidates derivation
쌍 평균 후보들은 머지 후보 리스트에 존재하는 후보들의 기 정의된 쌍들의평균에 의해 생성된다. 여기서 기 정의된 쌍들은 {(0, 1), (0, 2), (1, 2), (0, 3), (1, 3), (2, 3)}로서 정의되는데, 0, 1, 2, 3과 같은 숫자들은 머지 후보 리스트에서의 머지 인덱스이다. 움직임 벡터들의 평균은 각 참조 리스트에 대해 개별적으로 계산된다. 하나의 리스트에서 2개의 움직임 벡터들이 모두 사용 가능하면, 2개의 움직임 벡터들이 서로 다른 참조 픽처에 대한 것이라 하더라도 2개의 움직임 벡터들의 평균 값이 사용된다. 만약 하나의 움직임 벡터만이 사용 가능하면, 그 사용 가능한 움직임 벡터가 바로 사용된다. 사용 가능한 움직임 벡터가 없으면, 그 리스트는 사용 불가능한(invalid) 것으로 유지된다.Pair average candidates are generated by an average of predefined pairs of candidates existing in the merge candidate list. Here, the predefined pairs are defined as {(0, 1), (0, 2), (1, 2), (0, 3), (1, 3), (2, 3)}, 0, 1 Numbers such as, 2, and 3 are merge indexes in the merge candidate list. The average of motion vectors is calculated individually for each reference list. If both motion vectors are available in one list, the average value of the two motion vectors is used even if the two motion vectors are for different reference pictures. If only one motion vector is available, the available motion vector is used immediately. If there are no motion vectors available, the list is kept invalid.
쌍 평균 머지 후보가 추가된 이후에도 머지 리스트가 채워지지 않을 때, 제로 MV들이 최대 머지 후보 개수에 도달할 때까지 삽입된다.When the merge list is not filled even after the pair average merge candidate is added, zero MVs are inserted until the maximum number of merge candidates is reached.
예측 샘플 생성Generate prediction samples
예측 모드에 따라 도출된 움직임 정보를 기반으로 현재 블록에 대한 예측된 블록이 도출될 수 있다. 예측된 블록은 현재 블록의 예측 샘플들(예측 샘플 어레이)를 포함할 수 있다. 현재 블록의 움직임 벡터가 분수(fractional) 샘플 단위를 가리키는 경우, 보간(interpolation) 절차가 수행될 수 있다. 보간 절차를 통하여 참조 픽처 내에서 분수 샘플 단위의 참조 샘플들로부터 현재 블록의 예측 샘플들이 도출될 수 있다. 현재 블록에 어파인 인터 예측이 적용되는 경우, 샘플/서브블록 단위의 움직임 벡터를 기반으로 예측 샘플들이 생성될 수 있다. 쌍 예측(bi prediction)이 적용되는 경우, L0 방향 예측(즉, L0 참조 픽처 리스트 내 참조 픽처와 L0 움직임 벡터를 이용한 예측)을 기반으로 도출된 예측 샘플들과 L1 예측(즉, L1 참조 픽처 리스트 내 참조 픽처와 L1 움직임 벡터를 이용한 예측)을 기반으로 도출된 예측 샘플들의 (위상에 따른) 가중합 또는 가중평균을 통하여 도출된 예측 샘플들이 현재 블록의 예측 샘플들로 이용될 수 있다. 쌍 예측이 적용되는 경우, L0 예측에 이용된 참조 픽처와 L1 예측에 이용된 참조 픽처가 현재 픽처를 기준으로 서로 다른 시간적 방향에 위치하는 경우(즉, 쌍 예측이면서 양방향(bi-directional) 예측에 해당하는 경우) 진정(true) 쌍 예측으로 지칭될 수 있다. A predicted block for the current block may be derived based on motion information derived according to the prediction mode. The predicted block may include prediction samples (prediction sample array) of the current block. When the motion vector of the current block indicates a fractional sample unit, an interpolation procedure may be performed. Prediction samples of the current block may be derived from reference samples in units of fractional samples in a reference picture through an interpolation procedure. When afine inter prediction is applied to the current block, prediction samples may be generated based on a motion vector in units of samples/subblocks. When bi prediction is applied, prediction samples derived based on L0 direction prediction (i.e., prediction using a reference picture in an L0 reference picture list and an L0 motion vector) and L1 prediction (i.e., an L1 reference picture list) Prediction samples derived through a weighted sum (according to a phase) or a weighted average of prediction samples derived based on prediction using an internal reference picture and an L1 motion vector) may be used as prediction samples of the current block. When pair prediction is applied, when the reference picture used for L0 prediction and the reference picture used for L1 prediction are located in different temporal directions with respect to the current picture (i.e., bi-directional prediction while being pair prediction If applicable) may be referred to as true pair prediction.
도출된 예측 샘플들을 기반으로 복원 샘플들 및 복원 픽처가 생성될 수 있고, 이후 인루프 필터링 등의 절차가 수행될 수 있음은 전술한 바와 같다.As described above, reconstructed samples and reconstructed pictures may be generated based on the derived prediction samples, and then procedures such as in-loop filtering may be performed.
BWA (Bi-prediction with weighted average)BWA (Bi-prediction with weighted average)
상술한 바와 같이 본 명세서에 따르면 현재 블록에 쌍 예측이 적용되는 경우, 가중 평균(weighted average)을 기반으로 예측 샘플이 도출될 수 있다. 쌍 예측 신호(즉, 쌍 예측 샘플들)은 L0 예측 신호(L0 예측 샘플들)와 L1 예측 신호(L1 예측 샘플들)의 단순 평균 또는 가중 평균을 통해 도출될 수 있다. 단순 평균에 의한 예측 샘플 도출이 적용되는 경우, 쌍 예측 샘플들은 L0 참조 픽처 및 L0 움직임 벡터에 기반한 L0 예측 샘플들과 L1 참조 픽처 및 L1 움직임 벡터에 기반한 L1 예측 샘플들의 평균 값들로서 도출될 수 있다. 본 명세서의 실시예에 따르면, 쌍 예측이 적용되는 경우 아래의 수학식 4와 같이 L0 예측 신호와 L1 예측 신호의 가중 평균을 통하여 쌍 예측 신호(쌍 예측 샘플들)이 도출될 수 있다.As described above, according to the present specification, when pair prediction is applied to a current block, a prediction sample may be derived based on a weighted average. The pair prediction signal (ie, pair prediction samples) may be derived through a simple average or weighted average of the L0 prediction signal (L0 prediction samples) and the L1 prediction signal (L1 prediction samples). When the prediction sample derivation by a simple average is applied, the pair prediction samples may be derived as average values of the L0 prediction samples based on the L0 reference picture and the L0 motion vector, and the L1 prediction samples based on the L1 reference picture and the L1 motion vector. . According to an embodiment of the present specification, when pair prediction is applied, a pair prediction signal (pair prediction samples) may be derived through a weighted average of the L0 prediction signal and the L1 prediction signal as shown in Equation 4 below.
Figure PCTKR2020003185-appb-M000004
Figure PCTKR2020003185-appb-M000004
수학식 4에서 Pbi-pred는 쌍 예측 샘플 값, P0는 L0 예측 샘플 값, P1은 L0 예측 샘플 값, w는 가중치 값을 나타낸다.In Equation 4, P bi-pred represents a pair prediction sample value, P 0 represents an L0 prediction sample value, P 1 represents an L0 prediction sample value, and w represents a weight value.
가중 평균 쌍 예측에서 5개의 가중치 값(w)들이 허용될 수 있는데, 그 가중치 값(w)들은 -2, 3, 4, 5, 10일 수 있다. 쌍 예측이 적용된 각 CU에 대하여, 가중치 w는 2가지 방법들 중 하나에 의해 결정될 수 있다.In weighted average pair prediction, five weight values (w) may be allowed, and the weight values (w) may be -2, 3, 4, 5, 10. For each CU to which pair prediction is applied, the weight w may be determined by one of two methods.
1) 머지 모드가 아닌(non-merge) CU에 대하여, 가중치 인덱스는 MVD 이후 시그널링된다.1) For a non-merge CU, the weight index is signaled after MVD.
2) 머지 CU에 대하여, 가중치 인덱스는 머지 후보 인덱스에 기반하여 주변 블록들로부터 추론된다. 2) For the merge CU, the weight index is inferred from neighboring blocks based on the merge candidate index.
가중합 쌍 예측은 오직 256 또는 그 이상의 휘도 샘플들을 갖는 CU들(CU 너비와 CU 높이의 곱이 256보다 크거나 같은 CU들)에만 적용될 수 있다. 저지연(low-delay) 픽처들에 대하여, 모든 5개의 가중치들이 사용될 수 있다. 저지연이 아닌 픽처들에 대하여, 오직 3개의 가중치들(3, 4, 5)이 사용될 수 있다.The weighted sum pair prediction can only be applied to CUs with 256 or more luminance samples (CUs whose product of CU width and CU height is greater than or equal to 256). For low-delay pictures, all five weights can be used. For pictures that are not low-latency, only three weights (3, 4, 5) can be used.
a) 인코더에서, 인코더 복잡도의 상당한 증가 없이 가중치 인덱스를 찾기 위하여 고속 탐색 알고리즘이 적용된다. 이러한 알고리즘들은 아래와 같이 요약된다. AMVR과 결합될 때, 현재 픽처가 저지연 픽처이면 동일하지 않은(unequal) 가중치들만이 1-pel 및 4-pel 움직임 벡터 정확도에 대해 조건적으로 확인된다.a) In the encoder, a fast search algorithm is applied to find the weight index without significant increase in encoder complexity. These algorithms are summarized below. When combined with AMVR, if the current picture is a low delay picture, only unequal weights are conditionally checked for 1-pel and 4-pel motion vector accuracy.
b) 어파인과 결합될 때, 어파인 모드가 현재 최적의 모드로서 선택되면 어파인 ME(motion estimation)가 동일하지 않은 가중치들에 대해 수행될 것이다.b) When combined with afine, if the afine mode is currently selected as the optimal mode, affine ME (motion estimation) will be performed for weights that are not the same.
c) 쌍 예측에서 두 참조 픽처들이 동일할 때, 동일하지 않은 가중치들만이 조건적으로 확인된다.c) When two reference pictures are identical in pair prediction, only weights that are not identical are conditionally checked.
e) 현재 픽처와 그 참조 픽처들 사이의 POC 거리, 코딩 QP(quantization parameter), 시간적 레벨(temporal level)에 따라, 특정 조건이 만족되지 않을 때 동일하지 않은 가중치들이 탐색되지 않는다.e) According to a POC distance between a current picture and its reference pictures, a coding quantization parameter (QP), and a temporal level, weights that are not identical are not searched when a specific condition is not satisfied.
CIIP (combined inter and intra prediction)CIIP (combined inter and intra prediction)
CIIP는 현재 CU에 적용될 수 있다. 예를 들어, CU가 머지 모드로 코딩될 때, CU가 적어도 64개의 휘도 샘플들을 포함하면(CU 너비와 CU 높이의 곱이 64보다 크거나 같으면) 추가적인 플래그가 CIIP 모드가 현재 CU에 적용되는지 여부를 지시하기 위하여 시그널링될 수 있다. CIIP 모드는 다중 가설(multi-hypothesis) 모드 또는 인터/인트라 다중 가설 모드로 지칭될 수도 있다.CIIP can be applied to the current CU. For example, when a CU is coded in merge mode, if the CU contains at least 64 luminance samples (the product of the CU width and the CU height is greater than or equal to 64), an additional flag indicates whether the CIIP mode is applied to the current CU. May be signaled to indicate. The CIIP mode may also be referred to as a multi-hypothesis mode or an inter/intra multiple hypothesis mode.
인트라 예측 모드 도출 (intra prediction mode derivation)Intra prediction mode derivation
DC, PLANAR, HORIZONTAL, 및 VERTICAL 모드들을 포함하는 최대 4개의 인트라 예측 모드들이 CIIP 모드에서 휘도 성분을 예측하기 위해 사용될 수 있다. CU 모양이 매우 넓으면(wide)(예를 들어, 너비가 높이보다 2배 이상 크면), HORIZONTAL 모드는 허용되지 않는다. CU 모양이 매우 좁으면(narrow)(즉, 높이가 너비보다 2배 이상 크면), VERTICAL 모드는 허용되지 않는다. 이 경우들에 대하여, 3개의 인트라 예측 모드들이 허용된다.Up to four intra prediction modes including DC, PLANAR, HORIZONTAL, and VERTICAL modes can be used to predict the luminance component in the CIIP mode. If the CU shape is very wide (for example, if the width is more than twice the height), the HORIZONTAL mode is not allowed. If the CU shape is very narrow (ie, the height is more than twice the width), the VERTICAL mode is not allowed. For these cases, three intra prediction modes are allowed.
CIIP 모드는 인트라 예측을 위하여 3개의 MPM(most probable mode)를 사용한다. CIIP MPM 후보 리스트는 아래와 같이 형성된다.The CIIP mode uses three most probable modes (MPMs) for intra prediction. The CIIP MPM candidate list is formed as follows.
- 좌측 및 상측 이웃 블록들이 각각 A와 B로 설정됨-Left and upper neighboring blocks are set to A and B, respectively
- 블록 A와 블록 B의 예측 모드들이 각각 intraModeA와 intraModeB로 명명되며, 이하와 같이 도출됨-The prediction modes of block A and block B are named intraModeA and intraModeB, respectively, and are derived as follows.
· X를 A 또는 B로 둠· Let X be A or B
· 만약 i) 블록 X가 사용 불가능하거나, ii) 블록 X가 CIIP 모드를 사용하여 예측되지 않거나, 또는 iii) 블록 B가 현재 CTU 외부에 위치하면, intraModeX는 DC로 설정됨If i) block X is unavailable, ii) block X is not predicted using CIIP mode, or iii) block B is located outside the current CTU, intraModeX is set to DC
· 그렇지 않으면, i) 블록 X의 인트라 예측 모드가 DC 또는 PLANAR이면, intraModeX는 DC 또는 PLANAR로, ii) 블록 X의 인트라 예측 모드가 "수직에 가까운(vertical-like)" 방향성 모드(34보다 큰 모드)이면 intraModeX는 VERTICAL로, 또는 iii) 블록 X의 인트라 예측 모드가 "수평에 가까운(horizontal-like)" 방향성 모드(34보다 작거나 같은 모드)이면 intraModeX는 HORIZONTAL로 설정됨Otherwise, i) if the intra prediction mode of block X is DC or PLANAR, intraModeX is DC or PLANAR, and ii) the intra prediction mode of block X is "vertical-like" directional mode (greater than 34). Mode), intraModeX is set to VERTICAL, or iii) intraModeX is set to HORIZONTAL if the intra-prediction mode of block X is a "horizontal-like" directional mode (mode less than or equal to 34).
- intraModeA와 intraModeB가 동일하면,-If intraModeA and intraModeB are the same,
· intraModeA가 PLANAR 또는 DC이면, 3개의 MPM들은 {PLANAR, DC, VERTICAL} 순서로 설정됨· If intraModeA is PLANAR or DC, 3 MPMs are set in the order of {PLANAR, DC, VERTICAL}
· 그렇지 않으면, 3개의 MPM들은 {intraModeA, PLANAR, DC} 순서로 설정됨Otherwise, 3 MPMs are set in the order of {intraModeA, PLANAR, DC}
- 그렇지 않으면(intraModeA와 intraModeB가 동일하지 않으면),-Otherwise (if intraModeA and intraModeB are not the same),
· 첫번째 2개의 MPM 들은 {intraModeA, intraModeB} 순서로 설정됨The first two MPMs are set in the order of {intraModeA, intraModeB}
· PLANAR, DC, VERTICAL의 고유성(uniqueness)(중복성)이 그 순서대로 첫번째 2개의 MPM 후보들에 대하여 확인되며, 고유의(중복되지 않는) 모드가 발견되면 3번째 MPM으로서 추가됨The uniqueness (redundancy) of PLANAR, DC, VERTICAL is checked for the first two MPM candidates in that order, and if a unique (non-redundant) mode is found, it is added as the third MPM
만약 CU 모양이 매우 넓거나 매우 좁으면, MPM 플래그는 시그널링 없이 1로 추론된다. 그렇지 않으면, CIIP 인트라 예측 모드가 CIIP MPM 후보 모드들 중 하나인지 여부를 지시하기 위한 MPM 플래그가 시그널링된다. If the CU shape is very wide or very narrow, the MPM flag is inferred as 1 without signaling. Otherwise, an MPM flag for indicating whether the CIIP intra prediction mode is one of the CIIP MPM candidate modes is signaled.
만약 MPM 플래그가 1이면, MPM 후보 모드들 중에서 어느 것이 CIIP 인트라 예측에서 사용되는지를 지시하기 위한 MPM 인덱스가 추가적으로 시그널링된다. 그렇지 않으면, MPM 플래그가 0이면, MPM 후보 리스트에서 인트라 예측 모드는 "미싱(missing)" 모드로 설정된다. 예를 들어, 만약 PLANAR 모드가 MPM 후보 리스트에서 없으면, PLANAR가 미싱 모드가 되고, 인트라 예측 모드는 PLANAR로 설정된다. CIIP에서 4개의 가능한 인트라 예측 모드가 허용되므로, MPM 후보 리스트는 오직 3개의 인트라 예측 후보들 만을 포함한다. 색차 성분들에 대하여, 추가적인 시그널링 없이 항상 DM 모드가 적용된다. 즉, 휘도 성분과 동일한 예측 모드가 색차 성분들에 사용된다. CIIP로 코딩된 CU의 인트라 예측 모드는 이후의 주변 CU들의 인트라 모드 코딩을 위하여 저장되고 사용될 것이다.If the MPM flag is 1, an MPM index indicating which of the MPM candidate modes is used in CIIP intra prediction is additionally signaled. Otherwise, if the MPM flag is 0, the intra prediction mode in the MPM candidate list is set to a "missing" mode. For example, if the PLANAR mode is not in the MPM candidate list, PLANAR becomes the missing mode, and the intra prediction mode is set to PLANAR. Since 4 possible intra prediction modes are allowed in CIIP, the MPM candidate list contains only 3 intra prediction candidates. For color difference components, the DM mode is always applied without additional signaling. That is, the same prediction mode as the luminance component is used for the color difference components. The intra prediction mode of the CU coded with CIIP will be stored and used for intra mode coding of the next neighboring CUs.
인터와 인트라 예측 신호들의 결합 (Combining the inter and intra prediction signals)Combining the inter and intra prediction signals
CIIP 모드에서의 인터 예측 신호 Pinter는 일반적인 머지 모드에 적용된 동일한 인터 예측 프로세스를 사용하여 유도되고, 인트라 예측 신호 Pintra는 인트라 예측 프로세스에 따른 CIIP 인트라 예측을 사용하여 유도된다. 그러면, 인트라 및 인터 예측 신호들은 가중 평균을 사용하여 결합되며, 여기서 가중치 값은 아래와 같이 인트라 예측 모드와 코딩 블록에서 샘플이 위치한 곳에 의존한다.The inter prediction signal P inter in the CIIP mode is derived using the same inter prediction process applied to the general merge mode, and the intra prediction signal P intra is derived using the CIIP intra prediction according to the intra prediction process. Then, the intra and inter prediction signals are combined using a weighted average, where the weight value depends on the intra prediction mode and where the sample is located in the coding block as follows.
- 인트라 예측 모드가 DC 또는 플래너 모드이거나, 블록 너비 또는 높이가 4보다 작으면, 동일한 가중치가 인트라 예측과 인터 예측 신호들에 적용된다.-If the intra prediction mode is DC or planar mode, or the block width or height is less than 4, the same weight is applied to the intra prediction and inter prediction signals.
- 그렇지 않으면, 가중치들은 인트라 예측 모드(이 경우 수평 모드 또는 수직 모드)와 블록 내 샘플 위치에 기반하여 결정된다. 수평 예측 모드를 예로서 설명한다(수직 모드에 대한 가중치들이 유사하나 직교 방향에서 유도될 수 있음). 블록의 너비를 W, 블록의 높이를 H로 둔다. 코딩 블록은 처음에 4개의 동일-영역 파트들로 분할되고, 각각의 차원은 (W/4)xH이다. 인트라 예측 참조 샘플들과 가장 가까운 파트에서 시작하여 인트라 예측 샘플들로부터 가장 먼 파트를 끝으로, 4개 영역들 각각에 대한 가중치 wt는 6, 5, 3, 2로 설정된다. 최종 CIIP 예측 신호는 아래의 수학식 5와 같이 유도될 수 있다.Otherwise, the weights are determined based on the intra prediction mode (horizontal mode or vertical mode in this case) and the sample position in the block. The horizontal prediction mode will be described as an example (weights for the vertical mode are similar, but can be derived in an orthogonal direction). Set the width of the block to W and the height of the block to H. The coding block is initially divided into 4 co-regional parts, each dimension is (W/4)xH. Starting from the part closest to the intra prediction reference samples and ending the part farthest from the intra prediction samples, the weight wt for each of the four regions is set to 6, 5, 3, and 2. The final CIIP prediction signal may be derived as in Equation 5 below.
Figure PCTKR2020003185-appb-M000005
Figure PCTKR2020003185-appb-M000005
수학식 5에서, PCIIP는 CIIP 예측 샘플 값, Pinter는 인터 예측 샘플 값, Pintra는 인트라 예측 샘플 값, wt는 가중치를 나타낸다.In Equation 5, P CIIP is a CIIP prediction sample value, P inter is an inter prediction sample value, P intra is an intra prediction sample value, and wt is a weight.
IBC (Intra block copy)IBC (Intra block copy)
도 2 및 도 3의 예측부에서 수행될 수 있는 IBC의 세부 기술을 설명된다. IBC는 예를 들어 SCC(screen content coding)와 같이 같이 게임 등의 컨텐츠 영상/동영상 코딩을 위하여 사용될 수 있다. IBC는 기본적으로 현재 픽처 내에서 예측을 수행하나 현재 픽처 내에서 참조 블록을 도출하는 점에서 인터 예측과 유사하게 수행될 수 있다. 즉, IBC는 본 문서에서 설명된 인터 예측 기법들 중 적어도 하나를 이용할 수 있다. 예를 들어, IBC에서는 상술한 움직임 정보(움직임 벡터) 도출 방법들 중 적어도 하나를 이용할 수 있다. IBC는 현재 픽처를 참조할 수 있으며, 따라서 CPR(current picture referencing)이라고 불릴 수도 있다.A detailed description of the IBC that can be performed in the prediction unit of FIGS. 2 and 3 will be described. IBC may be used for coding a content image/movie, such as a game, such as, for example, screen content coding (SCC). IBC basically performs prediction in the current picture, but can be performed similarly to inter prediction in that it derives a reference block in the current picture. That is, the IBC may use at least one of the inter prediction techniques described in this document. For example, in the IBC, at least one of the above-described motion information (motion vector) derivation methods may be used. The IBC may refer to the current picture, and thus may be referred to as current picture referencing (CPR).
IBC를 위하여, 인코딩 장치(100)는 블록 매칭 (BM)을 수행하여 현재 블록(예: CU)에 대한 최적의 블록 벡터(또는 움직임 벡터)를 도출할 수 있다. 도출된 블록 벡터(또는 움직임 벡터)는 상술한 인터 예측에서의 블록 정보(움직임 벡터) 시그널링과 유사한 방법을 이용하여 비트스트림을 통하여 디코딩 장치(200)로 시그널링될 수 있다. 디코딩 장치(200)는 시그널링된 블록 벡터(움직임 벡터)를 통하여 현재 픽처 내에서 현재 블록에 대한 참조 블록을 도출할 수 있으며, 이를 통하여 상기 현재 블록에 대한 예측 신호(예측된 블록 또는 예측 샘플들)을 도출할 수 있다. 여기서 블록 벡터(또는 움직임 벡터)는 현재 블록으로부터 현재 픽처 내 이미 복원된 영역에 위치하는 참조 블록까지의 변위(displacement)를 나타낼 수 있다. 따라서, 블록 벡터(또는 움직임 벡터)는 변위 벡터라고 불릴 수도 있다. 이하, IBC에서 움직임 벡터는 블록 벡터 또는 변위 벡터에 대응될 수 있다. 현재 블록의 움직임 벡터는 루마 성분에 대한 움직임 벡터(루마 움직임 벡터) 또는 크로마 성분에 대한 움직임 벡터(크로마 움직임 벡터)를 포함할 수 있다. 예를 들어, IBC 코딩된 CU에 대한 루마 움직임 벡터는 정수 샘플 단위(즉, integer precision)일 수 있다. 크로마 움직임 벡터 또한 정수 샘플 단위로 클리핑될(clipped) 수 있다. 상술한 바와 같이 IBC는 인터 예측 기법들 중 적어도 하나를 이용할 수 있으며, 예를 들어 IBC가 AMVR과 같이 적용되는 경우, 1-pel 및 4-pel 움직임 벡터 정밀도(precision)는 스위칭될 수 있다.For IBC, the encoding apparatus 100 may derive an optimal block vector (or motion vector) for a current block (eg, CU) by performing block matching (BM). The derived block vector (or motion vector) may be signaled to the decoding apparatus 200 through a bitstream using a method similar to signaling of block information (motion vector) in the above-described inter prediction. The decoding apparatus 200 may derive a reference block for the current block in the current picture through the signaled block vector (motion vector), and through this, a prediction signal (predicted block or prediction samples) for the current block. Can be derived. Here, the block vector (or motion vector) may represent a displacement from a current block to a reference block located in an already reconstructed area in the current picture. Thus, the block vector (or motion vector) may be called a displacement vector. Hereinafter, in IBC, a motion vector may correspond to a block vector or a displacement vector. The motion vector of the current block may include a motion vector for a luma component (a luma motion vector) or a motion vector for a chroma component (a chroma motion vector). For example, the luma motion vector for the IBC coded CU may be in integer sample units (ie, integer precision). The chroma motion vector can also be clipped in units of integer samples. As described above, IBC may use at least one of inter prediction techniques. For example, when IBC is applied together with AMVR, 1-pel and 4-pel motion vector precision may be switched.
메모리 소모와 디코더 복잡도를 감소시키기 위하여, 현재 CU를 포함하는 기 정의된 영역의 복원된 부분만이 사용될 수 있다. 이러한 제한은 IBC 모드가 하드웨어 구현들을 위한 로컬 온-칩 메모리를 사용하여 구현되도록 허용한다. In order to reduce memory consumption and decoder complexity, only the reconstructed part of the predefined area including the current CU may be used. This limitation allows the IBC mode to be implemented using local on-chip memory for hardware implementations.
인코더 측에서, 해쉬-기반 움직임 추정이 IBC에 대해 수행된다. 인코더는 너비 또는 높이가 16 휘도 샘플들보다 크지 않은 블록들에 대하여 RD 체크를 수행한다. Non-merge 모드에 대하여, 블록 벡터 탐색이 해쉬-기반 탐색부터 수행된다. If 해쉬 탐색이 유효한 후보를 리턴하지 않으면, 블록 매칭 기반의 로컬 탐색이 수행될 것이다.On the encoder side, hash-based motion estimation is performed for the IBC. The encoder performs an RD check on blocks whose width or height is not greater than 16 luminance samples. For the non-merge mode, block vector search is performed from hash-based search. If the hash search does not return a valid candidate, a block matching-based local search will be performed.
해쉬-기반 탐색에서, 현재 블록과 참조 블록 사이의 해쉬 키 매칭(32-bit CRC)이 모든 허용된 블록 사이즈들로 확장된다. 현재 픽처 내 모든 위치들에 대한 해쉬 키 계산은 4x4 서브블록들에 기반한다. 더 큰 사이즈의 현재 블록에 대하여, 모든 4x4 서브블록들에서의 모든 해쉬 키들이 모든 대응하는 참조 위치들에서의 해쉬 키들과 매칭되면 참조 블록의 해쉬 키와 매칭되도록 해쉬 키가 결정된다. 다중 참조 블록들의 해쉬 키들이 현재 블록의 해쉬 키와 매치되는 것으로 발견되면, 각 매칭된 참조 블록의 블록 벡터 비용들이 계산되고 최소의 비용을 갖는 하나가 선택된다.In hash-based search, hash key matching (32-bit CRC) between the current block and the reference block is extended to all allowed block sizes. The hash key calculation for all positions in the current picture is based on 4x4 subblocks. For a larger sized current block, if all hash keys in all 4x4 subblocks match with hash keys in all corresponding reference positions, the hash key is determined to match the hash key of the reference block. If the hash keys of multiple reference blocks are found to match the hash key of the current block, the block vector costs of each matched reference block are calculated and the one with the least cost is selected.
블록 매칭 탐색에서, 탐색 범위는 현재 CTU 내 현재 블록의 좌측과 상측으로부터 N 샘플들로 설정된다. CTU의 시작에서, 시간적 참조 픽처가 존재하지 않으면 N의 값은 128로 초기화되고, 적어도 하나의 시간적 참조 픽처가 존재하면 64로 초기화된다. 해쉬 히트율(hash hit ratio)은 해쉬-기반 탐색을 사용하는 매치를 발견한 CTU에서의 샘플들의 퍼센티지로서 정의된다. 현재 CTU를 인코딩하는 동안, 만약 해쉬 히트율이 5% 미만이면, N은 절반으로 감소된다.In the block matching search, the search range is set to N samples from the left and above of the current block in the current CTU. At the beginning of the CTU, if there is no temporal reference picture, the value of N is initialized to 128, and if there is at least one temporal reference picture, it is initialized to 64. The hash hit ratio is defined as the percentage of samples in the CTU that found a match using a hash-based search. While encoding the current CTU, if the hash hit rate is less than 5%, N is reduced by half.
CU 레벨에서, IBC 모드는 플래그를 사용하여 시그널링되고 IBC AMVP 모드 또는 IBC 스킵/머지 모드처럼 아래와 같이 시그널링될 수 있다.At the CU level, the IBC mode is signaled using a flag and can be signaled as follows, such as the IBC AMVP mode or the IBC skip/merge mode.
도 31a 및 도 31b는 본 명세서의 실시예에 따른 IBC(intra block copy) 모드에 기반한 비디오/영상 인코딩 방법과 인코딩 장치(100) 내 예측부의 예를 도시한다.31A and 31B illustrate examples of a video/video encoding method based on an intra block copy (IBC) mode and a prediction unit in the encoding apparatus 100 according to an embodiment of the present specification.
인코딩 장치(100)는 현재 블록에 대한 IBC 예측(IBC 기반 예측)을 수행한다(S3110). 인코딩 장치(100)는 현재 블록의 예측 모드 및 움직임 벡터를 도출하고, 현재 블록의 예측 샘플들을 생성할 수 있다. 예측 모드는 상술한 인터 예측 모드들 중 적어도 하나를 IBC를 위한 예측 모드들로 포함할 수 있다. 여기서 예측 모드 결정, 움직임 벡터 도출 및 예측 샘플들 생성 절차는 동시에 수행될 수도 있고, 어느 한 절차가 다른 절차보다 먼저 수행될 수도 있다. 예를 들어, 인코딩 장치(100)의 예측부는 예측 모드 결정부, 움직임 벡터 도출부, 예측 샘플 도출부를 포함할 수 있으며, 예측 모드 결정부에서 현재 블록에 대한 예측 모드를 결정하고, 움직임 벡터 도출부에서 상기 현재 블록의 움직임 벡터를 도출하고, 예측 샘플 도출부에서 상기 현재 블록의 예측 샘플들을 도출할 수 있다. 예를 들어, 인코딩 장치(100)의 예측부는 블록 매칭(BM)을 통하여 현재 픽처의 복원된 영역(또는 복원된 영역 중 일정 영역(서치 영역)) 내에서 현재 블록과 유사한 블록을 서치하고, 현재 블록과의 차이가 최소 또는 일정 기준 이하인 참조 블록을 도출할 수 있다. 참조 블록과 현재 블록의 변위 차이를 기반으로 움직임 벡터를 도출할 수 있다. 인코딩 장치(100)는 다양한 예측 모드들 중 현재 블록에 대하여 적용되는 모드를 결정할 수 있다. 인코딩 장치(100)는 다양한 예측 모드들에 기반한 RD 비용을 비교하고 현재 블록에 대한 최적의 예측 모드를 결정할 수 있다. The encoding apparatus 100 performs IBC prediction (IBC-based prediction) for the current block (S3110). The encoding apparatus 100 may derive a prediction mode and a motion vector of a current block and generate prediction samples of the current block. The prediction mode may include at least one of the above-described inter prediction modes as prediction modes for IBC. Here, a procedure for determining a prediction mode, deriving a motion vector, and generating prediction samples may be performed simultaneously, or one procedure may be performed prior to another procedure. For example, the prediction unit of the encoding apparatus 100 may include a prediction mode determination unit, a motion vector derivation unit, and a prediction sample derivation unit. The prediction mode determination unit determines a prediction mode for the current block, and a motion vector derivation unit At, the motion vector of the current block may be derived, and prediction samples of the current block may be derived by a prediction sample derivation unit. For example, the prediction unit of the encoding apparatus 100 searches for a block similar to the current block in the reconstructed area of the current picture (or a certain area (search area) of the reconstructed area) through block matching (BM), and It is possible to derive a reference block whose difference from the block is less than a minimum or a certain standard. A motion vector can be derived based on the difference in displacement between the reference block and the current block. The encoding apparatus 100 may determine a mode applied to the current block among various prediction modes. The encoding apparatus 100 may compare RD costs based on various prediction modes and determine an optimal prediction mode for the current block.
예를 들어, 인코딩 장치(100)는 현재 블록에 스킵 모드 또는 머지 모드가 적용되는 경우, 상술한 머지 후보 리스트를 구성하고, 머지 후보 리스트에 포함된 머지 후보들이 가리키는 참조 블록들 중 현재 블록과의 차이가 최소 또는 일정 기준 이하인 참조 블록을 도출할 수 있다. 이 경우 도출된 참조 블록과 연관된 머지 후보가 선택되며, 선택된 머지 후보를 가리키는 머지 인덱스 정보가 생성되어 디코딩 장치(200)로 시그널링될 수 있다. 선택된 머지 후보의 움직임 벡터를 이용하여 상기 현재 블록의 움직임 벡터가 도출될 수 있다. For example, when the skip mode or the merge mode is applied to the current block, the encoding apparatus 100 configures the above-described merge candidate list, and the current block is matched with the current block among reference blocks indicated by merge candidates included in the merge candidate list. It is possible to derive a reference block whose difference is less than a minimum or a certain standard. In this case, a merge candidate associated with the derived reference block is selected, and merge index information indicating the selected merge candidate may be generated and signaled to the decoding apparatus 200. The motion vector of the current block may be derived using the motion vector of the selected merge candidate.
다른 예로, 인코딩 장치(100)는 현재 블록에 (A)MVP 모드가 적용되는 경우, 상술한 (A)MVP 후보 리스트를 구성하고, (A)MVP 후보 리스트에 포함된 MVP(motion vector predictor) 후보들 중 선택된 MVP 후보의 움직임 벡터를 현재 블록의 MVP로 이용할 수 있다. 이 경우, 예를 들어, 상술한 움직임 추정에 의하여 도출된 참조 블록을 가리키는 움직임 벡터가 현재 블록의 움직임 벡터로 이용될 수 있으며, MVP 후보들 중 현재 블록의 움직임 벡터와의 차이가 가장 작은 움직임 벡터를 갖는 MVP 후보가 선택된 MVP 후보가 될 있다. 상기 현재 블록의 움직임 벡터에서 MVP 를 뺀 차분인 MVD(motion vector difference)가 도출될 수 있다. 이 경우 MVD에 관한 정보가 디코딩 장치(200)로 시그널링될 수 있다. As another example, when the (A)MVP mode is applied to the current block, the encoding apparatus 100 configures the above-described (A)MVP candidate list, and (A)motion vector predictor (MVP) candidates included in the MVP candidate list The motion vector of the selected MVP candidate may be used as the MVP of the current block. In this case, for example, a motion vector indicating a reference block derived by motion estimation described above may be used as a motion vector of the current block, and among MVP candidates, a motion vector having the smallest difference from the motion vector of the current block is selected. The MVP candidate to have becomes the selected MVP candidate. A motion vector difference (MVD), which is a difference obtained by subtracting MVP from the motion vector of the current block, may be derived. In this case, information on the MVD may be signaled to the decoding apparatus 200.
인코딩 장치(100)는 예측 샘플들을 기반으로 레지듀얼 샘플들을 도출할 수 있다(S3120). 인코딩 장치(100)는 현재 블록의 원본 샘플들과 예측 샘플들의 비교를 통하여 레지듀얼 샘플들을 도출할 수 있다.The encoding apparatus 100 may derive residual samples based on the prediction samples (S3120). The encoding apparatus 100 may derive residual samples by comparing the original samples of the current block with the prediction samples.
인코딩 장치(100)는 예측 정보 및 레지듀얼 정보를 포함하는 영상 정보를 인코딩한다(S3130). 인코딩 장치(100)는 인코딩된 영상 정보를 비트스트림 형태로 출력할 수 있다. 예측 정보는 예측 절차에 관련된 정보로서, 예측 모드 정보(예: skip flag, merge flag, 또는 mode index) 및 움직임 벡터에 관한 정보를 포함할 수 있다. 움직임 벡터에 관한 정보는 움직임 벡터를 도출하기 위한 정보인 후보 선택 정보(예: merge index, mvp flag, 또는 mvp index)를 포함할 수 있다. 또한 움직임 벡터에 관한 정보는 상술한 MVD에 관한 정보를 포함할 수 있다. 또한 움직임 벡터에 관한 정보는 L0 예측, L1 예측, 또는 쌍(bi) 예측이 적용되는지 여부를 나타내는 정보를 포함할 수 있다. 레지듀얼 정보는 레지듀얼 샘플들에 관한 정보이다. 레지듀얼 정보는 레지듀얼 샘플들에 대한 양자화된 변환 계수들에 관한 정보를 포함할 수 있다. The encoding apparatus 100 encodes image information including prediction information and residual information (S3130). The encoding apparatus 100 may output the encoded image information in the form of a bitstream. The prediction information is information related to a prediction procedure, and may include prediction mode information (eg, skip flag, merge flag, or mode index) and information about a motion vector. The information on the motion vector may include candidate selection information (eg, merge index, mvp flag, or mvp index) that is information for deriving the motion vector. In addition, the information on the motion vector may include information on the above-described MVD. In addition, the information on the motion vector may include information indicating whether L0 prediction, L1 prediction, or bi prediction is applied. The residual information is information about residual samples. The residual information may include information about quantized transform coefficients for residual samples.
출력된 비트스트림은 (디지털) 저장매체에 저장되어 디코딩 장치로 전달될 수 있고, 또는 네트워크를 통하여 디코딩 장치(200)로 전달될 수도 있다. The output bitstream may be stored in a (digital) storage medium and transmitted to the decoding device, or may be transmitted to the decoding device 200 through a network.
한편, 상술한 바와 같이 인코딩 장치(100)는 참조 샘플들 및 레지듀얼 샘플들을 기반으로 복원 픽처(복원 샘플들 및 복원 블록 포함)를 생성할 수 있다. 이는 디코딩 장치(200)에서 수행되는 것과 동일한 예측 결과를 인코딩 장치에서 도출하기 위함이며, 이를 통하여 코딩 효율을 높일 수 있기 때문이다. 따라서, 인코딩 장치는 현재 픽처의 복원 영역(또는 복원 샘플들, 복원 블록)을 메모리에 저장하고, IBC 예측을 위한 참조 픽처로 활용할 수 있다. Meanwhile, as described above, the encoding apparatus 100 may generate a reconstructed picture (including reconstructed samples and a reconstructed block) based on reference samples and residual samples. This is because the encoding device derives the same prediction result as that performed by the decoding device 200, and coding efficiency can be improved through this. Accordingly, the encoding apparatus may store the reconstructed area (or reconstructed samples, reconstructed block) of the current picture in a memory and use it as a reference picture for IBC prediction.
IBC에 기반한 비디오/영상 디코딩 절차 및 디코딩 장치(200) 내 예측부는 개략적으로 예를 들어 다음을 포함할 수 있다.The video/video decoding procedure based on the IBC and the prediction unit in the decoding apparatus 200 may schematically include, for example, the following.
도 32a 및 도 32b는 본 명세서의 실시예에 따른 IBC 모드에 기반한 비디오/영상 디코딩 방법과 디코딩 장치(200) 내 예측부의 예를 도시한다.32A and 32B illustrate an example of a video/video decoding method based on an IBC mode and a prediction unit in the decoding apparatus 200 according to an embodiment of the present specification.
디코딩 장치(200)는 인코딩 장치(100)에서 수행된 동작과 대응되는 동작을 수행할 수 있다. 디코딩 장치(200)는 수신된 예측 정보를 기반으로 현재 블록에 IBC 예측을 수행하고 예측 샘플들을 도출할 수 있다. The decoding apparatus 200 may perform an operation corresponding to the operation performed by the encoding apparatus 100. The decoding apparatus 200 may perform IBC prediction on the current block and derive prediction samples based on the received prediction information.
구체적으로 디코딩 장치(200)는 수신된 예측 정보를 기반으로 현재 블록에 대한 예측 모드를 결정할 수 있다(S3210). 디코딩 장치(200)는 예측 정보 내의 예측 모드 정보를 기반으로 현재 블록에 어떤 예측 모드가 적용되는지 결정할 수 있다. In more detail, the decoding apparatus 200 may determine a prediction mode for the current block based on the received prediction information (S3210). The decoding apparatus 200 may determine which prediction mode is applied to the current block based on prediction mode information in the prediction information.
예를 들어, 머지 플래그(merge flag)를 기반으로 현재 블록에 머지 모드가 적용되지 또는 (A)MVP 모드가 결정되는지 여부가 결정될 수 있다. 또는 모드 인덱스(mode index)를 기반으로 다양한 예측 모드 후보들 중 하나가 선택될 수 있다. 예측 모드 후보들은 스킵 모드, 머지 모드 및/또는 (A)MVP 모드를 포함할 수 있고, 또는 상술한 다양한 예측 모드들을 포함할 수 있다. For example, it may be determined whether the merge mode is applied to the current block or the (A)MVP mode is determined based on the merge flag. Alternatively, one of various prediction mode candidates may be selected based on a mode index. The prediction mode candidates may include a skip mode, a merge mode, and/or (A)MVP mode, or may include various prediction modes described above.
디코딩 장치(200)는 결정된 예측 모드를 기반으로 현재 블록의 움직임 벡터를 도출한다(S3220). 예를 들어, 디코딩 장치(200)는 현재 블록에 스킵 모드 또는 머지 모드가 적용되는 경우, 상술한 머지 후보 리스트를 구성하고, 상기 머지 후보 리스트에 포함된 머지 후보들이 중 하나의 머지 후보를 선택할 수 있다. 머지 후보의 선택은 상술한 선택 정보(merge index)를 기반으로 수행될 수 있다. 선택된 머지 후보의 움직임 벡터를 이용하여 현재 블록의 움직임 벡터가 도출될 수 있다. 선택된 머지 후보의 움직임 벡터가 현재 블록의 움직임 벡터로 이용될 수 있다. The decoding apparatus 200 derives a motion vector of the current block based on the determined prediction mode (S3220). For example, when the skip mode or the merge mode is applied to the current block, the decoding apparatus 200 may configure the above-described merge candidate list and select one merge candidate from among the merge candidates included in the merge candidate list. have. The selection of the merge candidate may be performed based on the above-described selection information (merge index). The motion vector of the current block may be derived using the motion vector of the selected merge candidate. The motion vector of the selected merge candidate may be used as the motion vector of the current block.
다른 예로, 디코딩 장치(200)는 현재 블록에 (A)MVP 모드가 적용되는 경우, 상술한 (A)MVP 후보 리스트를 구성하고, (A)MVP 후보 리스트에 포함된 MVP 후보들 중 선택된 MVP 후보의 움직임 벡터를 현재 블록의 MVP로 이용할 수 있다. MVP 후보의 선택은 상술한 선택 정보(mvp flag 또는 mvp index)를 기반으로 수행될 수 있다. 이 경우 MVD에 관한 정보를 기반으로 현재 블록의 MVD가 도출될 수 있으며, 현재 블록의 MVP와 MVD를 기반으로 현재 블록의 움직임 벡터가 도출될 수 있다. As another example, when the (A)MVP mode is applied to the current block, the decoding apparatus 200 configures the above-described (A)MVP candidate list, and (A) selects MVP candidates from among MVP candidates included in the MVP candidate list. The motion vector can be used as the MVP of the current block. The selection of the MVP candidate may be performed based on the above-described selection information (mvp flag or mvp index). In this case, the MVD of the current block may be derived based on the information on the MVD, and the motion vector of the current block may be derived based on the MVP and the MVD of the current block.
한편, 상술한 바와 같이 후보 리스트 구성 없이 현재 블록의 움직임 정보가 도출될 수도 있으며, 이 경우 해당 예측 모드에서 개시된 절차에 따라 현재 블록의 움직임 벡터가 도출될 수 있다. 이 경우 상술한 바와 같은 후보 리스트 구성은 생략될 수 있다.Meanwhile, as described above, motion information of the current block may be derived without configuring a candidate list. In this case, a motion vector of the current block may be derived according to a procedure disclosed in a corresponding prediction mode. In this case, the configuration of the candidate list as described above may be omitted.
디코딩 장치(200)는 현재 블록의 움직임 벡터를 기반으로 현재 블록에 대한 예측 샘플들을 생성할 수 있다(S3230). 현재 블록의 움직임 벡터가 현재 픽처 상에서 가리키는 참조 블록의 샘플들을 이용하여 현재 블록의 예측 샘플들을 도출할 수 있다. 이 경우 현재 블록의 예측 샘플들 중 전부 또는 일부에 대한 예측 샘플 필터링 절차가 더 수행될 수 있다. The decoding apparatus 200 may generate prediction samples for the current block based on the motion vector of the current block (S3230). Prediction samples of the current block may be derived using samples of the reference block indicated by the motion vector of the current block on the current picture. In this case, a prediction sample filtering procedure may be further performed on all or part of the prediction samples of the current block.
예를 들어, 디코딩 장치(200)의 예측부는 예측 모드 결정부, 움직임 벡터 도출부, 예측 샘플 도출부를 포함할 수 있으며, 예측 모드 결정부가 수신된 예측 모드 정보를 기반으로 현재 블록에 대한 예측 모드를 결정하고, 움직임 벡터 도출부가 수신된 움직임 벡터에 관한 정보를 기반으로 현재 블록의 움직임 벡터를 도출하고, 예측 샘플 도출부가 현재 블록의 예측 샘플들을 도출할 수 있다.For example, the prediction unit of the decoding apparatus 200 may include a prediction mode determination unit, a motion vector derivation unit, and a prediction sample derivation unit, and the prediction mode determination unit determines a prediction mode for the current block based on the received prediction mode information. After determining, the motion vector deriving unit may derive a motion vector of the current block based on information on the received motion vector, and the prediction sample deriving unit may derive the predicted samples of the current block.
디코딩 장치(200)는 수신된 레지듀얼 정보를 기반으로 상기 현재 블록에 대한 레지듀얼 샘플들을 생성한다(S3240). 디코딩 장치(200)는 예측 샘플들 및 레지듀얼 샘플들을 기반으로 현재 블록에 대한 복원 샘플들을 생성하고, 이를 기반으로 복원 픽처를 생성할 수 있다(S3250). 이후 상기 복원 픽처에 인루프 필터링 절차가 더 적용될 수 있음은 상술한 바와 같다.The decoding apparatus 200 generates residual samples for the current block based on the received residual information (S3240). The decoding apparatus 200 may generate reconstructed samples for the current block based on the prediction samples and the residual samples, and generate a reconstructed picture based on the generated samples (S3250). Thereafter, as described above, an in-loop filtering procedure may be further applied to the reconstructed picture.
MVD(motion vector difference) 코딩Motion vector difference (MVD) coding
상술한 바와 같이, 몇몇 인터 예측 기법이 IBC 예측에 적용될 수 있다. 예를 들어, MVD 코딩은 인터 예측과 IBC 예측에 사용될 수 있다. 현재 비디오 코딩 표준은 MVD(motion vector difference)를 생성하기 위하여 움직임 벡터들과 그 움직임 벡터 예측자들을 사용한다. MVD는 움직임 벡터와 움직임 벡터 예측자 사이의 차이로서 정의될 수 있다. 움직임 벡터와 유사하게, MVD는 x 방향과 y 방향에 대응하는 x 성분과 y 성분(제1 성분, 제2 성분)을 포함한다. MVD가 결정되면, MVD는 엔트로피 기법들을 사용하여 인코딩된다. 비디오 표준들은 움직임 벡터들에서의 중복성을 탐색하고 압축을 달성하기 위하여 가능한 방법들 중 하나로서 MVD를 사용한다. 비디오/영상 신호의 압축을 위한 실시예들은 숨겨진 움직임을 탐색하기 위한 도구들 중 하나로서 MVD를 사용한다. 디코더 측에서, 코딩 유닛의 움직임 벡터들이 디코딩되기 이전에 MVD가 디코딩된다. 실제 움직임 벡터들을 인코딩하기 이전에 MVD를 인코딩하는 것은 암축 효율을 증대시키기고 움직임 벡터들과 그 예측자들 사이의 중복성을 탐색하는데 도움이 된다. 디코더에서의 MVD 코딩 스테이지로의 입력은 디코딩을 위하여 파싱된 코딩된 MVD 빈들이다. 인코더에서 MVD 코딩 스테이지로의 입력들은 실제 MVD 값들과 MVD 인코딩을 위한 해상도를 지시하는 추가적인 플래그("imv" flag)이다. MVD가 1-pel, 4-pel, 또는 quarter-pel로서 표현되는지 여부를 결정하기 위하여 사용된다.As described above, some inter prediction techniques can be applied to IBC prediction. For example, MVD coding can be used for inter prediction and IBC prediction. Current video coding standards use motion vectors and their motion vector predictors to generate a motion vector difference (MVD). MVD can be defined as the difference between a motion vector and a motion vector predictor. Similar to the motion vector, MVD includes x and y components (first and second components) corresponding to the x and y directions. Once the MVD is determined, the MVD is encoded using entropy techniques. Video standards use MVD as one of the possible ways to achieve compression and search for redundancy in motion vectors. Embodiments for compressing video/video signals use MVD as one of tools for searching for hidden motion. At the decoder side, the MVD is decoded before the motion vectors of the coding unit are decoded. Encoding the MVD before encoding the actual motion vectors increases the darkening efficiency and helps to search for redundancy between motion vectors and their predictors. The input to the MVD coding stage at the decoder are coded MVD bins parsed for decoding. Inputs from the encoder to the MVD coding stage are an additional flag (“imv” flag) indicating actual MVD values and resolution for MVD encoding. It is used to determine whether MVD is expressed as 1-pel, 4-pel, or quarter-pel.
도 33은 본 명세서의 실시예에 따른 MVD(motion vector difference) 코딩 정보를 획득하기 위한 흐름도의 예를 도시한다. 도 33의 동작들은 디코딩 장치(200)의 엔트로피 디코딩부(210)에 의해 수행될 수 있다.33 shows an example of a flowchart for obtaining motion vector difference (MVD) coding information according to an embodiment of the present specification. The operations of FIG. 33 may be performed by the entropy decoding unit 210 of the decoding apparatus 200.
가장 먼저 수평과 수직 성분들에 대하여 MVD가 0보다 큰지 여부를 지시하는 플래그들(MVDxGR0, MVDyGR0)이 파싱된다(S3310). 이후, MVD의 x 성분이 0보다 큰지 여부를 확인하기 위하여(즉, MVDxGR0가 참인지) 수평 성분에 대해 파싱된 데이터가 체크된다(S3320). 만약 MVDxGㄲ0가 참이면(즉, MVDxGR0가 '1'이면), 수평 성분이 1보다 큰지 여부를 지시하는 플래그(MVDxGR1)가 파싱된다(S3330). MVDxGR0이 참이 아니면(MVDxGR0가 '0'이면), MVDxGR1 데이터는 파싱되지 않는다. 이후 수직 성분에 대하여 유사한 절차들이 수행된다(S3340, S3350). 이후, 복원된 MVD들을 획득하기 위하여 잔여 MVD 코딩(MVDx_Rem_Level과 MVDy_Rem_Level) 단계들(S3360, SS70)이 순서에 따라 파싱된 MVD 데이터가 추가적으로 처리될 수 있다.First, flags (MVD x GR0, MVD y GR0) indicating whether MVD is greater than 0 for horizontal and vertical components are parsed (S3310). Thereafter, the parsed data for the horizontal component is checked to determine whether the x component of the MVD is greater than 0 (ie, whether MVD x GR0 is true) (S3320). If MVD x Gㄲ0 is true (ie, MVD x GR0 is '1'), a flag (MVD x GR1) indicating whether the horizontal component is greater than 1 is parsed (S3330). If MVD x GR0 is not true (MVD x GR0 is '0'), MVD x GR1 data is not parsed. Thereafter, similar procedures are performed for the vertical component (S3340 and S3350). Thereafter, in order to obtain reconstructed MVDs, the MVD data parsed in the order of residual MVD coding (MVD x _Rem_Level and MVD y _Rem_Level) steps (S3360 and SS70) may be additionally processed.
도 34a 및 도 34b는 본 명세서의 실시예에 따른 MVD의 x 성분과 y 성분에 대한 정보를 획득하기 위한 흐름도의 예를 도시한다. 도 34a는 도 33의 블록 MVDx_Rem_Level(S3360)에서 디코더가 MVD의 x 성분을 디코딩하기 위한 정보를 획득하는 동작을 나타내고, 도 34b는 도 33의 MVDy_Rem_Level(S3370)에서 MVD의 y 성분을 디코딩하기 위한 정보를 획득하는 동작을 나타낸다.34A and 34B illustrate examples of flowcharts for obtaining information on x and y components of MVD according to an embodiment of the present specification. FIG. 34A shows an operation of obtaining information for decoding the x component of MVD by the decoder in block MVD x _Rem_Level (S3360) of FIG. 33, and FIG. 34B shows the y component of MVD in MVD y _Rem_Level (S3370) of FIG. 33 Represents an operation of obtaining information for decoding.
도 34a에서, 디코더는 MVDxGR0를 확인하고(S3410), MVDxGR0이 참이면 MVDxGR1를 확인한다(S3420). 파싱된 데이터가 0보다 큰지 여부를 지시하는 플래그(즉, MVDxGR0)가 참이고 파싱된 데이터가 1보다 큰지 여부를 지시하는 플래그(즉, MVDxGR1)가 참이면, 디코더는 MVDx(Abs-2)를 파싱한다(S3430). 이때 디코더는 파싱된 MVDx 성분에 대응하는 빈들이 차수 1을 갖는 지수 골롬(Exponential Golomb, EG) 코드를 사용하여 디코딩된다. EG로의 입력들은 절대값 빼기 2(즉, Abs-2)를 포함하는 빈들과 1차 골롬일 것이다. 부호 정보는 부호 정보를 포함하는 바이패스 빈을 디코딩함으로써 파싱된다. 디코딩된 바이패스 빈이 1의 값을 가지면, 음의 부호가 디코딩된 MVDx에 첨부된다. 그러나, 만약 디코딩된 바이패스 빈이 0의 값을 가지면 디코딩된 MVD는 양의 값을 갖는 것으로 지시된다. MVDxGR0가 참이지만 MVDxGR1이 참이 아니면, 이는 MVDx의 절대 값이 1임을 지시하며 디코더는 MVDxSign을 파싱한다(S3440). 부호 정보가 파싱되어 업데이트 된다. 그러나, MVDxGR0이 거짓이면, 복원된 MVDx는 0이다.In Figure 34a, the decoder verifies the check MVD x GR0 and (S3410), if the MVD x GR0 is true GR1 MVD x (S3420). If the flag indicating whether the parsed data is greater than 0 (i.e., MVD x GR0) is true, and the flag indicating whether the parsed data is greater than 1 (i.e., MVD x GR1) is true, then the decoder uses MVD x ( Abs-2) is parsed (S3430). In this case, the decoder decodes the bins corresponding to the parsed MVDx components using an Exponential Golomb (EG) code having order 1. The inputs to EG will be bins containing the absolute value minus 2 (i.e. Abs-2) and 1st order Golomb The sign information is parsed by decoding the bypass bin containing the sign information. If the decoded bypass bin has a value of 1, a negative sign is appended to the decoded MVD x . However, if the decoded bypass bin has a value of 0, the decoded MVD is indicated to have a positive value. If MVD x GR0 is true but MVD x GR1 is not true, this indicates that the absolute value of MVDx is 1, and the decoder parses MVD x Sign (S3440). The code information is parsed and updated. However, if MVD x GR0 is false, the restored MVDx is 0.
유사한 동작들이 MVD의 y 성분에 대한 정보를 획득하기 위하여 적용될 수 있다. 디코더는 MVDyGR0를 확인하고(S3450), MVDyGR0이 참이면 MVDyGR1를 확인한다(S3460). 파싱된 데이터가 0보다 큰지 여부를 지시하는 플래그(즉, MVDyGT0)가 참이고 파싱된 데이터가 1보다 큰지 여부를 지시하는 플래그(즉, MVDyGT1)가 참이면, 디코더는 MVDy(Abs-2)를 파싱한다(S3470). MVDyGR0가 참이지만 MVDyGR1이 참이 아니면, 이는 MVDy의 절대 값이 1임을 지시하며 디코더는 MVDySign을 파싱한다(S3480).Similar operations can be applied to obtain information on the y component of MVD. The decoder checks the check MVD y GR0 and (S3450), if the MVD y GR0 is true MVD y GR1 (S3460). If the flag indicating whether the parsed data is greater than 0 (i.e., MVD y GT0) is true and the flag indicating whether the parsed data is greater than 1 (i.e., MVD y GT1) is true, then the decoder will MVD y ( Abs-2) is parsed (S3470). If MVD y GR0 is true but MVD y GR1 is not true, this indicates that the absolute value of MVDy is 1, and the decoder parses MVD y Sign (S3480).
인코더 측에서 부호를 갖는 MVD 값들이 인코딩된다. 디코더와 유사하게, 수평과 수직 성분들의 절대 값들을 체크함으로써 x와 y 성분들에 대해 0보다 큰지 여부를 지시하는 빈들, 즉 MVDxGR0와 MVDyGR0가 인코딩된다. 그리고 수평 및 수직 성분들에 대하여 1보다 큰지 여부를 지시하는 플래그들, 즉, MVDxGr1 및 MVDyGR1이 인코딩된다. 이후 MVD 절대값들이 도 35a 및 도 35b와 같이 인코딩된다.Signed MVD values are encoded at the encoder side. Similar to the decoder, bins indicating whether or not the x and y components are greater than zero by checking the absolute values of the horizontal and vertical components, i.e., MVD x GR0 and MVD y GR0 are encoded. And flags indicating whether the horizontal and vertical components are greater than 1, that is, MVD x Gr1 and MVD y GR1 are encoded. Thereafter, the absolute MVD values are encoded as shown in FIGS. 35A and 35B.
도 35a 및 도 35b는 본 명세서의 실시예에 따른 MVD의 x 성분과 y 성분에 대한 정보를 인코딩하기 위한 흐름도의 예를 도시한다.35A and 35B illustrate an example of a flowchart for encoding information on an x component and a y component of an MVD according to an embodiment of the present specification.
디코더와 유사하게, 수평 및 수직 성분들이 순차적으로 인코딩된다. 수평 MVD 인코딩을 위하여, 인코더는 수평 MVD 성분 절대 값이 0보다 큰지 여부(즉, MVDxGR0)와 수평 MVD 성분 절대 값이 1보다 큰지 여부(즉, MVDxGR1)를 확인한다(S3510, S3520). 수평 MVD 성분 절대 값이 0보다 크고 1보다 크면, (절대 값 - 2)가 차수 1을 갖는 EG 코드를 사용하여 인코딩된다(S3530). 이후 부호 정보가 바이패스 빈을 사용하여 인코딩된다. MVDxGR0이 참이고 MVDxGr1이 참이 아니면, 부호 정보만이 인코딩된다(S3540). 동일한 프로세스가 MVDy의 인코딩에 수행된다.Similar to the decoder, the horizontal and vertical components are encoded sequentially. For horizontal MVD encoding, the encoder checks whether the absolute value of the horizontal MVD component is greater than 0 (ie, MVD x GR0) and whether the absolute value of the horizontal MVD component is greater than 1 (ie, MVD x GR1) (S3510, S3520 ). If the horizontal MVD component absolute value is greater than 0 and greater than 1, (absolute value-2) is encoded using the EG code having the order 1 (S3530). The sign information is then encoded using the bypass bin. If MVD x GR0 is true and MVD x Gr1 is not true, only code information is encoded (S3540). The same process is performed for the encoding of MVDy.
수직 MVD 인코딩을 위하여, 인코더는 수직 MVD 성분 절대 값이 0보다 큰지 여부(즉, MVDyGR0)와 수평 MVD 성분 절대 값이 1보다 큰지 여부(즉, MVDyGR1)를 확인한다(S3550, S3560). 수직 MVD 성분 절대 값이 0보다 크고 1보다 크면, (절대 값 - 2)가 차수 1을 갖는 EG 코드를 사용하여 인코딩된다(S3570). 이후 부호 정보가 바이패스 빈을 사용하여 인코딩된다. MVDyGR0이 참이고 MVDyGr1이 참이 아니면, 부호 정보만이 인코딩된다(S3580). 아래의 표 1은 MVD 코딩을 위한 신택스이다.For vertical MVD encoding, the encoder checks whether the absolute value of the vertical MVD component is greater than 0 (i.e., MVD y GR0) and whether the absolute value of the horizontal MVD component is greater than 1 (i.e., MVD y GR1) (S3550, S3560 ). If the vertical MVD component absolute value is greater than 0 and greater than 1, (absolute value-2) is encoded using an EG code having order 1 (S3570). The sign information is then encoded using the bypass bin. If MVD y GR0 is true and MVD y Gr1 is not true, only code information is encoded (S3580). Table 1 below is a syntax for MVD coding.
Figure PCTKR2020003185-appb-T000001
Figure PCTKR2020003185-appb-T000001
abs_mvd_greater0_flag[ compIdx ]는 움직임 벡터 차분(MVD)의 compIdx 성분이 0보다 큰지 여부를 지시한다. abs_mvd_greater0_flag [compIdx] indicates whether the compIdx component of the motion vector difference (MVD) is greater than 0.
abs_mvd_greater1_flag[ compIdx ]는 움직임 벡터 차분(MVD)의 compIdx 성분이 1보다 큰지 여부를 지시한다. abs_mvd_greater1_flag[ compIdx ]가 존재하지 않으면 그 값은 0으로 추론된다. abs_mvd_greater1_flag [compIdx] indicates whether the compIdx component of the motion vector difference (MVD) is greater than 1. If abs_mvd_greater1_flag[ compIdx] does not exist, its value is deduced as 0.
abs_mvd_minus2[ compIdx ] 더하기 2는 움직임 벡터 차분의 compIdx 성분의 절대 값을 나타낸다. abs_mvd_minus2[ compIdx ]가 존재하지 않을 때 그 값은 -1로 추론된다. abs_mvd_minus2 [compIdx] plus 2 represents the absolute value of the compIdx component of the motion vector difference. When abs_mvd_minus2[ compIdx] does not exist, its value is deduced as -1.
mvd_sign_flag[ compIdx ]는 움직임 벡터의 compIdx 성분의 부호를 아래와 같이 나타낸다. mvd_sign_flag [compIdx] represents the code of the compIdx component of the motion vector as follows.
- mvd_sign_flag[ compIdx ]가 0이면, 해당하는 움직임 벡터 차분의 compIdx 성분은 양의 값을 가진다.-If mvd_sign_flag[ compIdx] is 0, the compIdx component of the corresponding motion vector difference has a positive value.
- 그렇지 않으면(mvd_sign_flag[ compIdx ]가 1이면) 해당하는 움직임 벡터 차분의 compIdx 성분은 음의 값을 가진다.-Otherwise (when mvd_sign_flag[ compIdx] is 1), the compIdx component of the corresponding motion vector difference has a negative value.
mvd_sign_flag[ compIdx ]가 존재하지 않으면, 그 값은 0으로 추론된다.If mvd_sign_flag[ compIdx] does not exist, its value is inferred as 0.
compIdx = 0..1에 대한 움직임 벡터 차분 lMvd[ compIdx ]는 아래와 같이 유도된다.The motion vector difference lMvd[ compIdx] for compIdx = 0..1 is derived as follows.
lMvd[ compIdx ] = abs_mvd_greater0_flag[ compIdx ] * ( abs_mvd_minus2[ compIdx ] + 2 ) * ( 1 - 2 * mvd_sign_flag[ compIdx ] ) MotionModelIdc[ x ][ y ]의 값에 의존하여, 움직임 벡터 차분들은 아래와 같이 유도된다.lMvd[ compIdx] = abs_mvd_greater0_flag[ compIdx] * (abs_mvd_minus2[ compIdx] + 2) * (1-2 * mvd_sign_flag[ compIdx]) Depending on the value of MotionModelIdc[ x ][ y ], motion vector differences are derived as follows. .
- MotionModelIdc[ x ][ y ] 가 0이면, X가 0 또는 1인 변수 MvdLX[ x0 ][ y0 ][ compIdx ]는 사용될 리스트 X 벡터 성분과 그 예측 사이의 차분을 나타낸다. 어레이 인덱스들 x0, y0는 픽처의 좌상측 휘도 샘플에 대한 고려되는 코딩 블록의 좌상측 휘도 샘플의 위치 (x0, y0)를 나타낸다. 수평 움직임 벡터 성분 차분은 compIdx = 0으로 할당되고 수직 움직임 벡터 성분은 compIdx = 1로 할당된다.-If MotionModelIdc[x][y] is 0, the variable MvdLX[x0][y0][compIdx] whose X is 0 or 1 represents the difference between the list X vector component to be used and its prediction. Array indices x0 and y0 represent positions (x0, y0) of an upper left luminance sample of a considered coding block with respect to an upper left luminance sample of a picture. The horizontal motion vector component difference is assigned as compIdx = 0, and the vertical motion vector component is assigned as compIdx = 1.
- refList가 0이면, MvdL0[ x0 ][ y0 ][ compIdx ]는 compIdx = 0..1에 대한 lMvd[ compIdx ]와 동일하게 설정된다.-If refList is 0, MvdL0[x0][y0][compIdx] is set equal to lMvd[compIdx] for compIdx = 0..1.
- 그렇지 않으면(refList가 1이면), MvdL1[ x0 ][ y0 ][ compIdx ]은 compIdx = 0..1에 대하여 lMvd[ compIdx ]와 동일하게 설정된다.-Otherwise (if refList is 1), MvdL1[ x0 ][ y0 ][ compIdx] is set equal to lMvd[ compIdx] for compIdx = 0..1.
- 그렇지 않으면(MotionModelIdc[ x ][ y ]가 0이 아니면), X가 0 또는 1인 변수 MvdCpLX[ x0 ][ y0 ][ cpIdx ][ compIdx ]는 사용될 리스트 X 벡터 성분과 그 예측 사이의 차분을 나타낸다. 어레이 인덱스들 x0, y0는 픽처의 좌상측 휘도 샘플에 대한 고려되는 코딩 블록의 좌상측 휘도 샘플의 위치 ( x0, y0 )를 나타내고, 어레이 인덱스 cpIdx는 제어점 인덱스를 나타낸다. 수평 움직임 벡터 성분 차분은 compIdx = 0로 할당되고 수직 움직임 벡터 성분 차분은 compIdx = 0로 할당된다.-Otherwise (MotionModelIdc[ x ][ y] is not 0), the variable MvdCpLX[ x0 ][ y0 ][ cpIdx ][ compIdx] with X equals 0 or 1 is the difference between the list X vector component to be used and its prediction. Show. Array indices x0 and y0 represent positions (x0, y0) of an upper left luminance sample of a considered coding block with respect to an upper left luminance sample of a picture, and an array index cpIdx represents a control point index. The horizontal motion vector component difference is assigned compIdx = 0, and the vertical motion vector component difference is assigned compIdx = 0.
- refList가 0이면, MvdCpL0[ x0 ][ y0 ][ cpIdx ][ compIdx ]는 compIdx = 0..1에 대하여 lMvd[ compIdx ]와 동일하게 설정된다.-If refList is 0, MvdCpL0[x0][y0][cpIdx][compIdx] is set equal to lMvd[compIdx] for compIdx = 0..1.
- 그렇지 않으면(refList가 1이면), MvdCpL1[ x0 ][ y0 ][ cpIdx ][ compIdx ]는 compIdx = 0..1에 대하여 lMvd[ compIdx ]와 동일하게 설정된다.-Otherwise (if refList is 1), MvdCpL1[ x0 ][ y0 ][ cpIdx ][ compIdx] is set equal to lMvd[ compIdx] for compIdx = 0..1.
이하의 표 2는 MVD 코딩을 위한 신택스 요소의 이진화 타입, 파라미터를 나타내고, 표 3은 MVD 코딩을 위한 신택스 요소의 빈 인덱스를 나타낸다.Table 2 below shows the binarization type and parameters of the syntax element for MVD coding, and Table 3 shows the bin index of the syntax element for MVD coding.
Figure PCTKR2020003185-appb-T000002
Figure PCTKR2020003185-appb-T000002
Figure PCTKR2020003185-appb-T000003
Figure PCTKR2020003185-appb-T000003
IBC의 MVD에 대한 통계 정보Statistical information on IBC's MVD
IBC 케이스에 대한 MVD의 통계의 분석은 일반적인 MVD와 IBC의 MVD가 서로 다른 특성을 가짐을 보여준다. 또한 IBC 케이스에 대하여 MVDx와 MVDy가 서로 다른 특성을 가짐이 확인된다. 예를 들어, MVDx와 비교하여, MVDy의 값들은 상대적으로 0에 집중된 특성을 갖는다.Analysis of MVD statistics for IBC cases shows that typical MVD and IBC MVD have different characteristics. In addition, it is confirmed that MVD x and MVD y have different characteristics for the IBC case. For example, compared to MVD x , the values of MVD y have a property that is relatively concentrated at zero.
아래의 표 4는 IBC 케이스에 대한 MVD의 통계이다.Table 4 below is the statistics of MVD for IBC cases.
Figure PCTKR2020003185-appb-T000004
Figure PCTKR2020003185-appb-T000004
도 36a 및 도 36b는 본 명세서의 실시예에 따른 IBC에서 MVD의 x 성분과 y 성분에 대한 빈(bin) 값의 통계의 예를 도시한다. IBC 케이스에 대하여 x 성분과 y 성분 사이에 데이터 분포가 상대적으로 적게 치우쳐있고(skewed) 비대칭적(asymmetric)이며, 또한 특정 값에 묶여있는 정도가 일반적인 MVD 보다 적다. 이러한 해석으로 인하여, 아래의 실시예들이 제안된다.36A and 36B illustrate examples of statistics of bin values for x and y components of MVD in IBC according to an embodiment of the present specification. For the IBC case, the distribution of data between the x and y components is relatively less skewed and asymmetric, and the degree of binding to a specific value is less than that of general MVD. Due to this interpretation, the following embodiments are proposed.
실시예 1Example 1
MVD 코딩 케이스들에 대한 실시예들에서, x 성분과 y 성분에 대하여 MVD가 0보다 큰지 여부를 지시하는 플래그들이 서로 다른 컨텍스트 모드를 사용하여 코딩될 수 있다. 즉, abs_mvd_greater0_flag[ 0 ]와 abs_mvd_greater0_flag[ 1 ]가 서로 다른 컨텍스트 모델을 사용할 수 있는데, 여기서 x/y 성분은 x/y 방향에서의 MVD를 의미한다. 유사하게 x 성분과 y 성분에 대하여 MVD가 1보다 큰지 여부를 지시하는 플래그들이 서로 다른 컨텍스트 모델들을 사용할 수 있다. 즉, abs_mvd_greater1_flag[ 0 ]와 abs_mvd_greater1_flag[ 1 ]가 서로 다른 컨텍스트 모델들을 사용할 수 있다. 아래의 표 5는 컨텍스트 증분(ctxInc)에서 컨텍스트 코딩된 빈들을 갖는 신택스 요소들로의 할당을 나타낸다.In embodiments for MVD coding cases, flags indicating whether the MVD is greater than 0 for the x component and the y component may be coded using different context modes. That is, abs_mvd_greater0_flag[ 0] and abs_mvd_greater0_flag[ 1] can use different context models, where the x/y component means MVD in the x/y direction. Similarly, flags indicating whether the MVD is greater than 1 for the x component and the y component may use different context models. That is, abs_mvd_greater1_flag[ 0] and abs_mvd_greater1_flag[ 1] can use different context models. Table 5 below shows the allocation of context-coded bins to syntax elements in the context increment (ctxInc).
Figure PCTKR2020003185-appb-T000005
Figure PCTKR2020003185-appb-T000005
표 5를 참조하면, MVD가 0보다 큰지 여부를 지시하는 플래그 (abs_mvd_greater0_flag[ compIdx ])의 빈 인덱스(binIdx)는 성분을 나타내는 인덱스(compIdx)에 기반하여 결정되는데, x 성분(compIdx = 0)에 대한 빈 인덱스(binIdx)는 0으로, y 성분(compIdx = 1)에 대한 빈 인덱스(binIdx)는 1로 설정될 수 있다. 또한, MVD가 1보다 큰지 여부를 지시하는 플래그 (abs_mvd_greater0_flag[ compIdx ])의 빈 인덱스(binIdx)는 성분을 나타내는 인덱스(compIdx)에 기반하여 결정되는데, x 성분(compIdx = 0)에 대한 빈 인덱스(binIdx)는 0으로, y 성분(compIdx = 1)에 대한 빈 인덱스(binIdx)는 1로 설정될 수 있다. 즉, MVD의 x 성분이 0보다 큰지 여부를 지시하는 플래그(abs_mvd_greater0_flag[ 0 ])와 MVD의 y 성분이 0보다 큰지 여부를 지시하는 플래그(abs_mvd_greater0_flag[ 1 ])는 서로 다른 컨텍스트 모델에 기반하여 인코딩/디코딩 될 수 있다.Referring to Table 5, the bin index (binIdx) of the flag (abs_mvd_greater0_flag[ compIdx ]) indicating whether the MVD is greater than 0 is determined based on the index (compIdx) indicating the component, and the x component (compIdx = 0) The bin index (binIdx) for the y component may be set to 0, and the bin index (binIdx) for the y component (compIdx = 1) may be set to 1. In addition, the empty index (binIdx) of the flag (abs_mvd_greater0_flag[ compIdx ]) indicating whether the MVD is greater than 1 is determined based on the index indicating the component (compIdx), and the empty index for the x component (compIdx = 0) ( binIdx) may be set to 0, and the bin index (binIdx) for the y component (compIdx = 1) may be set to 1. That is, a flag indicating whether the x component of MVD is greater than 0 (abs_mvd_greater0_flag[ 0 ]) and a flag indicating whether the y component of MVD is greater than 0 (abs_mvd_greater0_flag[ 1 ]) are encoded based on different context models. /Can be decoded.
실시예 2Example 2
MVD 코딩 케이스들에 대한 실시예에서, MVDx의 절대값의 코딩시 다른 코딩 방법이 사용될 수 있다. 상술한 통계적 분포에 기반한 특정 경우에서, MVDx의 절대 값 코딩은 2 또는 3과 같이 다른 지수 골롬 파라미터가 사용할 수 있는데, 이는 abs_mvd_minus2[ 0 ]가 2 또는 3과 같이 다른 지수 골롬 파라미터를 사용하여 코딩될 수 있음을 의미한다. 유사하게 y 성분에 대한 MVD y의 잔여 절대 값 레벨에 대하여 다른 코딩 방법이 사용될 수 있다. 특히 2 또는 3과 같은 지수 골롬 파라미터가 사용될 수 있는데, 이는 abs_mvd_minus2[ 1 ]이 2 또는 3과 같은 지수 골롬 파라미터로 코딩될 수 있음을 의미한다. 예를 들어 아래의 표 6은 abs_mvd_minus2[ ]에 대하여 지수 골롬 파라미터 2가 사용되는 경우의 예를 나타낸다. 표 6에서 MVD의 절대 값에서 2를 뺀 값을 나타내는 MVD 크기 정보(abs_mvd_minus2[ ])는 차수 2의 지수 골롬 파라미터(EG2)에 기반하여 인코딩/디코딩될 수 있다.In an embodiment for MVD coding cases, another coding method may be used in coding the absolute value of MVD x . In a specific case based on the above-described statistical distribution, the absolute value coding of MVD x can be used by other exponential Golomb parameters such as 2 or 3, which abs_mvd_minus2[ 0] is coded using other exponential Golomb parameters such as 2 or 3. Means it can be. Similarly, other coding methods can be used for the residual absolute value level of MVD y for the y component. In particular, an exponential Golomb parameter such as 2 or 3 may be used, which means that abs_mvd_minus2[ 1] can be coded with an exponential Golomb parameter such as 2 or 3. For example, Table 6 below shows an example in which the exponential Golomb parameter 2 is used for abs_mvd_minus2[ ]. In Table 6, MVD size information (abs_mvd_minus2[ ]) representing a value obtained by subtracting 2 from the absolute value of MVD may be encoded/decoded based on the exponential Golomb parameter EG2 of order 2.
Figure PCTKR2020003185-appb-T000006
Figure PCTKR2020003185-appb-T000006
실시예 3Example 3
본 실시예에서, 상술한 실시예 1와 실시예 2가 동시에 사용될 수 있다. 즉, 이는 x 성분과 y 성분에 대하여 MVD가 0보다 큰지 여부를 지시하는 플래그들(abs_mvd_greater0_flag[ 0 ], abs_mvd_greater0_flag[ 1 ])이 서로 다른 컨텍스트 모델을 사용하고, x 성분과 y 성분에 대하여 MVD가 1보다 큰지 여부를 지시하는 플래그들(abs_mvd_greater1_flag[ 0 ], abs_mvd_greater1_flag[ 1 ])가 서로 다른 컨텍스트 모델을 모델을 사용하며, 또한 잔여 절대 값 레벨의 코딩을 위하여 2 또는 3과 같은 다른 지수 골롬 파라미터가 사용될 수 있는데, 이는 abs_mvd_minus2[ ]가 2 또는 3과 같은 지수 골롬 파라미터를 사용하여 코딩될 수 있음을 의미한다.In this embodiment, Embodiment 1 and Embodiment 2 described above can be used simultaneously. In other words, this means that flags indicating whether MVD is greater than 0 for x and y components (abs_mvd_greater0_flag[ 0 ], abs_mvd_greater0_flag[ 1 ]) use different context models, and MVD for x and y components Flags indicating whether or not greater than 1 (abs_mvd_greater1_flag[ 0 ], abs_mvd_greater1_flag[ 1 ]) use different context models, and other exponential Golomb parameters such as 2 or 3 for coding of the residual absolute value level Can be used, which means that abs_mvd_minus2[] can be coded using an exponential Golomb parameter such as 2 or 3.
실시예 4Example 4
도 37은 본 명세서의 실시예에 따른 일반적인 MVD 코딩과 IBC 모드가 적용된 경우 MVD 코딩이 별도로 적용되는 경우의 예를 도시한다. 본 실시예에서, IBC 케이스 및 보통의 MVD 코딩에 대하여 별도의 MVD 코딩이 수행되는 경우가 설명된다.37 illustrates an example in which MVD coding is separately applied when general MVD coding and IBC mode according to an embodiment of the present specification are applied. In this embodiment, a case in which separate MVD coding is performed for the IBC case and the normal MVD coding is described.
현재 블록에 IBC 모드가 적용되면 MVDx 성분이 0보다 큰지 여부를 지시하는 플래그와 MVDx 성분이 1보다 큰지 여부를 지시하는 플래그는 사용되지 않고, 전체 MVDx가 차수 1, 2, 또는 3의 지수 골롬을 사용하여 코딩될 수 있다. 아래의 표 7은 변경이 적용된 경우의 예를 나타낸다.When the IBC mode is applied to the current block, a flag indicating whether the MVD x component is greater than 0 and a flag indicating whether the MVD x component is greater than 1 are not used, and the entire MVD x is of order 1, 2, or 3 It can be coded using exponential Golomb. Table 7 below shows an example in which the change is applied.
Figure PCTKR2020003185-appb-T000007
Figure PCTKR2020003185-appb-T000007
표 7에서 취소선은 보통의 MVD 코딩 신택스 구조와 비교하여 본 실시예의 적용에 의해 삭제되는 신택스 요소를 나타낸다. abs_mvd[ compIdx ]는 성분 compIdx 에 대한 움직임 벡터 차분의 절대 값을 나타낸다. 표 8은 abs_mvd[]가 반영된 MVD 코딩을 위한 신택스 요소의 이진화 타입, 파라미터를 나타낸다.In Table 7, the strikethrough indicates a syntax element that is deleted by the application of this embodiment compared to a normal MVD coding syntax structure. abs_mvd [compIdx] represents an absolute value of a motion vector difference for component compIdx. Table 8 shows the binarization type and parameters of syntax elements for MVD coding in which abs_mvd[] is reflected.
Figure PCTKR2020003185-appb-T000008
Figure PCTKR2020003185-appb-T000008
유사하게, MVDy 성분과 0과 1보다 큰지 여부를 지시하는 플래그가 존재하지 않을 수 있으며, 전체의 MVDy 성분은 차수 1, 2, 또는 3의 지수 골롬을 사용하여 코딩될 수 있다.Similarly, the MVD y component and a flag indicating whether it is greater than 0 and 1 may not exist, and the entire MVD y component may be coded using an exponential Golomb of order 1, 2, or 3.
실시예 5Example 5
본 실시예에서, MVD의 성분들 중에서 하나는 해당 MVD 성분이 0보다 큰지 여부를 지시하는 플래그와 1보다 큰지 여부를 지시하는 플래그 없이 전체 MVDx 또는 MVDy가 차수 1, 2, 또는 3의 지수 골롬을 사용하여 코딩될 수 있다. 그리고 MVD의 다른 성분에 대하여 해당 MVD 성분이 0보다 큰지 여부를 지시하는 플래그와 1보다 큰지 여부를 지시하는 플래그가 존재하고 잔여 파트는 다른 지수 골롬 파라미터를 사용하여 코딩될 수 있다. 표 9는 이 경우에 대한 예이다.In this embodiment, one of the components of the MVD is a flag indicating whether the corresponding MVD component is greater than 0, and without a flag indicating whether the corresponding MVD component is greater than 1, the total MVDx or MVDy is an exponent of order 1, 2 or 3 Can be coded using. In addition, for other components of the MVD, a flag indicating whether the MVD component is greater than 0 and a flag indicating whether the corresponding MVD component is greater than 1 exist, and the remaining parts may be coded using different exponential Golomb parameters. Table 9 is an example for this case.
Figure PCTKR2020003185-appb-T000009
Figure PCTKR2020003185-appb-T000009
일 실시예에서, IBC 케이스에 대하여 별도의 MVD 코딩이 있을 수 있다. 또한, IBC 케이스와 보통의 케이스에 대하여 다른 컨텍스트 모델이 0보다 큰지 여부를 지시하는 플래그와 MVD 성분이 1보다 큰지 여부를 지시하는 플래그에 사용될 수 있다.In one embodiment, there may be separate MVD coding for the IBC case. In addition, it may be used for a flag indicating whether the different context model is greater than 0 for the IBC case and the normal case, and a flag indicating whether the MVD component is greater than 1.
실시예 6Example 6
본 실시예에서 IBC 케이스에 대한 MVD의 코딩을 위하여, 2 또는 3과 같은 지수 골롬 값이 MVD의 잔여 값(절대 값 정보, 부호 정보)를 코딩하기 위해 사용될 수 있다. IBC 케이스에서 다른 컨텍스트 모델이 MVD 성분이 0보다 큰지 여부를 지시하는 플래그와 MVD 성분이 1보다 큰지 여부를 지시하는 플래그에 대하여 다른 컨텍스트 모델이 x 성분 및 y 성분에 대하여 사용될 수 있다. 아래의 표 10과 표 11은 본 실시예에 따른 경우의 예를 나타낸다.In this embodiment, for coding MVD for the IBC case, an exponential Golomb value such as 2 or 3 may be used to code the residual value (absolute value information, sign information) of the MVD. In the IBC case, different context models may be used for the x component and the y component for a flag indicating whether the MVD component is greater than 0 and a flag indicating whether the MVD component is greater than 1 in the IBC case. Tables 10 and 11 below show examples of the case according to the present embodiment.
Figure PCTKR2020003185-appb-T000010
Figure PCTKR2020003185-appb-T000010
Figure PCTKR2020003185-appb-T000011
Figure PCTKR2020003185-appb-T000011
도 38은 본 명세서의 실시예에 따른 인터 예측을 위한 비디오 신호의 인코딩 흐름도의 예이다. 도 38의 동작들은 인코딩 장치(100)의 인터 예측부(180) 또는 비디오 신호 처리 장치(500)의 프로세서(510)에 의해 수행될 수 있다. 도 38의 S3810, S3820 단계는 도 17의 S1710 단계의 일 예에 해당하며, 도 38의 S3830 단계는 도 17의 S1730 단계의 일 예에 해당할 수 있다. 38 is an example of a flowchart of encoding a video signal for inter prediction according to an embodiment of the present specification. The operations of FIG. 38 may be performed by the inter prediction unit 180 of the encoding apparatus 100 or the processor 510 of the video signal processing apparatus 500. Steps S3810 and S3820 of FIG. 38 may correspond to an example of step S1710 of FIG. 17, and step S3830 of FIG. 38 may correspond to an example of step S1730 of FIG. 17.
인코더는 움직임 예측에 기반하여 현재 블록의 움직임 벡터를 결정하고, 움직임 벡터에 기반하여 현재 블록의 MVD를 결정한다(S3810, S3820). 예를 들어, 인코더는 현재 블록에 대한 움직임 추정을 통하여 참조 픽처(또는 현재 픽처)에서 움직임 벡터(또는 블록 벡터)를 결정하고, 결정된 움직임 벡터와 MVP 후보 리스트로부터 도출된 MVP 후보의 움직임 벡터의 차분을 MVD로서 결정할 수 있다.The encoder determines a motion vector of the current block based on motion prediction, and determines the MVD of the current block based on the motion vector (S3810 and S3820). For example, the encoder determines a motion vector (or block vector) from a reference picture (or current picture) through motion estimation for the current block, and the difference between the determined motion vector and the motion vector of the MVP candidate derived from the MVP candidate list Can be determined as MVD.
인코더는 MVD와 관련된 MVD 코딩 정보를 인코딩한다(S3830). 여기서 MVD 코딩 정보는 MVD가 제1 기준 값(예: 0)보다 큰지 여부를 지시하는 제1 플래그 정보(예: abs_mvd_greater0_flag[ ])를 포함하고, 제1 플래그 정보(예: abs_mvd_greater0_flag[ ])는 MVD의 제1 방향 성분(예: x 성분)이 제1 기준 값(예: 0) 보다 큰지 여부를 지시하는 제1 성분 플래그 정보(abs_mvd_greater0_flag[0]) 및 MVD의 제2 방향 성분(예: y 성분)이 제1 기준 값(예: 0)보다 큰지 여부를 지시하는 제2 성분 플래그 정보(abs_mvd_greater0_flag[1])를 포함한다. 제1 성분 플래그 정보(abs_mvd_greater0_flag[0])와 제2 성분 플래그 정보(abs_mvd_greater0_flag[1])는 서로 다른 컨텍스트 모델에 기반하여 인코딩된다. The encoder encodes MVD coding information related to MVD (S3830). Here, the MVD coding information includes first flag information (eg, abs_mvd_greater0_flag[ ]) indicating whether MVD is greater than a first reference value (eg 0), and the first flag information (eg, abs_mvd_greater0_flag[ ]) is MVD The first component flag information (abs_mvd_greater0_flag[0]) indicating whether the first direction component (eg, x component) of is greater than the first reference value (eg 0) and the second direction component (eg, y component) of the MVD ) Includes second component flag information (abs_mvd_greater0_flag[1]) indicating whether or not is greater than a first reference value (eg, 0). The first component flag information (abs_mvd_greater0_flag[0]) and the second component flag information (abs_mvd_greater0_flag[1]) are encoded based on different context models.
일 실시예에서, MVD 코딩 정보는 MVD가 제2 기준 값(예: 1)보다 큰지 여부를 지시하는 제2 플래그 정보(예: abs_mvd_greater1_flag[ ]), MVD 크기 정보(예: abs_mvd_minus2[ ]), 및 MVD 부호 정보(예: mvd_sign_flag[ ])를 더 포함할 수 있다. 여기서 제2 플래그(abs_mvd_greater1_flag[ ])는 제1 플래그정보 (abs_mvd_greater0_flag[ ])에 기반하여 획득되고, MVD 크기 정보(abs_mvd_minus2[ ])는 제1 플래그 정보(abs_mvd_greater0_flag[0]) 및 제2 플래그정보(abs_mvd_greater1_flag[ ])에 기반하여 인코딩되며, MVD 부호 정보(mvd_sign_flag[ ])는 제1 플래그 정보(abs_mvd_greater0_flag[ ])에 기반하여 인코딩될 수 있다. 예를 들어, 도 35a 및 도 35b에 도시된 것과 같이, 제2 플래그(abs_mvd_greater1_flag[ ])는 제1 플래그 정보(abs_mvd_greater0_flag[ ])가 참인 경우(1인 경우) 인코딩되고, MVD 크기 정보(abs_mvd_minus2[ ])는 제1 플래그(abs_mvd_greater0_flag[0]) 및 제2 플래그 정보(abs_mvd_greater1_flag[ ])가 모두 참인 경우(1인 경우) 인코딩되며, MVD 부호 정보(mvd_sign_flag[ ])는 제1 플래그 정보(abs_mvd_greater0_flag[ ])가 참인 경우(1인 경우) 인코딩될 수 있다.In one embodiment, the MVD coding information includes second flag information (eg, abs_mvd_greater1_flag[ ]) indicating whether MVD is greater than a second reference value (eg, 1), MVD size information (eg, abs_mvd_minus2[ ]), and MVD code information (eg, mvd_sign_flag[ ]) may be further included. Here, the second flag (abs_mvd_greater1_flag[ ]) is obtained based on the first flag information (abs_mvd_greater0_flag[ ]), and the MVD size information (abs_mvd_minus2[ ]) is the first flag information (abs_mvd_greater0_flag[0]) and the second flag information ( It is encoded based on abs_mvd_greater1_flag[ ]), and MVD code information (mvd_sign_flag[ ]) may be encoded based on first flag information (abs_mvd_greater0_flag[ ]). For example, as shown in FIGS. 35A and 35B, the second flag (abs_mvd_greater1_flag[ ]) is encoded when the first flag information (abs_mvd_greater0_flag[ ]) is true (if 1), and MVD size information (abs_mvd_minus2[ ]) is encoded when both the first flag (abs_mvd_greater0_flag[0]) and the second flag information (abs_mvd_greater1_flag[ ]) are true (when 1), and the MVD sign information (mvd_sign_flag[ ]) is encoded as the first flag information (abs_mvd_greater0_flag[ ]) can be encoded if true (if 1).
일 실시예에서, 제2 플래그 정보(abs_mvd_greater1_flag[ ])는 MVD의 제1 방향 성분(x 성분)이 제2 기준 값(예: 1)보다 큰지 여부를 지시하는 제3 성분 플래그(abs_mvd_greater0_flag[ 0 ]) 및 MVD의 제2 방향 성분(y 성분)이 제2 기준 값(예: 1)보다 큰지 여부를 지시하는 제4 성분 플래그(abs_mvd_greater0_flag[ 1 ])를 포함할 수 있다. In one embodiment, the second flag information (abs_mvd_greater1_flag[ ]) is a third component flag (abs_mvd_greater0_flag[0]) indicating whether the first direction component (x component) of the MVD is greater than a second reference value (eg, 1). ) And a fourth component flag (abs_mvd_greater0_flag[1]) indicating whether the second direction component (y component) of the MVD is greater than the second reference value (eg, 1).
일 실시예에서, 제1 MVD 크기 정보(abs_mvd_minus2[ ])는 2 이상의 차수를 갖는 지수 골롬(exponential Golomb) 파라미터에 기반하여 인코딩될 수 있다.In an embodiment, the first MVD size information abs_mvd_minus2[] may be encoded based on an exponential Golomb parameter having a degree of 2 or more.
일 실시예에서, MVD 코딩 정보를 인코딩하는 단계(S3830)는 현재 블록에 IBC 모드가 적용되는지 여부를 결정하는 단계(예: 도 37의 S3710 단계)와, 현재 블록에 IBC 모드가 적용되는 경우, IBC MVD 코딩 정보(예: mvd_coding_IBC( ))를 인코딩하는 단계(예: S3730 단계)를 포함할 수 있다. 여기서 IBC MVD 코딩 정보를 인코딩하는 단계는, MVD의 제1 방향 성분(x 성분)의 절대 값을 나타내는 제1 MVD 크기(예: abs_mvd[ 0 ])를 인코딩하는 단계와, MVD의 제2 방향 성분(y 성분)이 제1 기준 값(예: 0)보다 큰지 여부를 지시하는 제2 성분 플래그(abs_mvd_greater0_flag[ 1 ])를 인코딩하는 단계와, 제2 성분 플래그(abs_mvd_greater0_flag[ 1 ])에 기반하여 MVD의 제2 방향 성분(y 성분)이 제2 기준 값(예: 1)보다 큰지 여부를 지시하는 제4 성분 플래그(abs_mvd_greater1_flag[ 1 ])를 인코딩하는 단계와, 제2 성분 플래그(abs_mvd_greater0_flag[ 1 ]) 및 제4 성분 플래그(abs_mvd_greater1_flag[ 1 ])에 기반하여 MVD의 제2 성분의 절대 값 빼기 2를 나타내는 제2 MVD 크기 정보(abs_mvd_minus2[ 1 ])를 인코딩하는 단계를 포함할 수 있다.In one embodiment, the step of encoding MVD coding information (S3830) is a step of determining whether the IBC mode is applied to the current block (for example, step S3710 of FIG. 37), and when the IBC mode is applied to the current block, It may include a step of encoding IBC MVD coding information (eg, mvd_coding_IBC( )) (eg, step S3730). Here, the encoding of the IBC MVD coding information includes encoding a first MVD size (eg, abs_mvd[ 0 ]) representing an absolute value of the first direction component (x component) of the MVD, and the second direction component of the MVD. Encoding a second component flag (abs_mvd_greater0_flag[ 1 ]) indicating whether the (y component) is greater than a first reference value (eg, 0), and MVD based on the second component flag (abs_mvd_greater0_flag[ 1 ]) Encoding a fourth component flag (abs_mvd_greater1_flag[ 1 ]) indicating whether a second direction component (y component) of is greater than a second reference value (eg, 1), and a second component flag (abs_mvd_greater0_flag[ 1 ]) ) And second MVD size information (abs_mvd_minus2[1]) representing the absolute value minus 2 of the second component of the MVD based on the fourth component flag (abs_mvd_greater1_flag[ 1 ]).
일 실시예에서, 제1 MVD 크기 정보(abs_mvd[ 0 ])는 2 이상의 차수를 갖는 지수 골롬 파라미터에 기반하여 인코딩될 수 있다.In an embodiment, the first MVD size information abs_mvd[ 0] may be encoded based on an exponential Golomb parameter having a degree of 2 or more.
도 39는 본 명세서의 실시예에 따른 인터 예측을 위한 비디오 신호의 디코딩 흐름도의 예이다. 도 39의 흐름도는 도 18의 S1810 단계의 일 예에 해당할 수 있다. 또한, 도 38의 S3810 단계는 도 16a의 S1610 단계, 도 38의 S3820 단계는 도 16a의 S1620 단계의 일 예에 해당할 수 있다.39 is an example of a flowchart of decoding a video signal for inter prediction according to an embodiment of the present specification. The flowchart of FIG. 39 may correspond to an example of step S1810 of FIG. 18. In addition, step S3810 of FIG. 38 may correspond to step S1610 of FIG. 16A, and step S3820 of FIG. 38 may correspond to an example of step S1620 of FIG. 16A.
디코더는 현재 블록의 예측을 위한 MVD와 관련된 MVD 코딩 정보(예: mvd_coding( ))를 획득한다(S3910). 여기서 MVD 코딩 정보는, MVD가 제1 기준 값(예: 0)보다 큰지 여부를 지시하는 제1 플래그 정보(예: abs_mvd_greater0_flag[ ])를 포함하고, 제1 플래그 정보는 MVD의 제1 방향 성분(예: x 성분)이 제1 기준 값 보다 큰지 여부를 지시하는 제1 성분 플래그 정보(예: abs_mvd_greater0_flag[0]) 및 MVD의 제2 방향 성분(y 성분)이 제1 기준 값보다 큰지 여부를 지시하는 제2 성분 플래그 정보(예: abs_mvd_greater0_flag[1])를 포함한다. 제1 성분 플래그 정보(abs_mvd_greater0_flag[0])와 제2 성분 플래그 정보(abs_mvd_greater0_flag[1])는 서로 다른 컨텍스트 모델에 기반하여 디코딩된다. 예를 들어, 표 6과 같이 제1 성분 플래그 정보(abs_mvd_greater0_flag[0])와 제2 성분 플래그 정보(abs_mvd_greater0_flag[1])는 서로 다른 빈 인덱스(binIdx)에 기반하여 디코딩될 수 있다.The decoder acquires MVD coding information (eg, mvd_coding( )) related to MVD for prediction of the current block (S3910). Here, the MVD coding information includes first flag information (eg, abs_mvd_greater0_flag[ ]) indicating whether the MVD is greater than a first reference value (eg 0), and the first flag information includes a first direction component ( Example: First component flag information indicating whether the x component is greater than the first reference value (eg, abs_mvd_greater0_flag[0]) and indicating whether the second direction component (y component) of the MVD is greater than the first reference value The second component flag information (eg, abs_mvd_greater0_flag[1]) is included. The first component flag information (abs_mvd_greater0_flag[0]) and the second component flag information (abs_mvd_greater0_flag[1]) are decoded based on different context models. For example, as shown in Table 6, first component flag information (abs_mvd_greater0_flag[0]) and second component flag information (abs_mvd_greater0_flag[1]) may be decoded based on different bin indexes (binIdx).
일 실시예에서, MVD 코딩 정보는 MVD가 제2 기준 값보다 큰지 여부를 지시하는 제2 플래그 정보(예: abs_mvd_greater1_flag[ ]), MVD 크기 정보(예: abs_mvd_minus2[ ]), 및 MVD 부호 정보(예: mvd_sign_flag[ ])를 더 포함할 수 있다. 여기서 제2 플래그 정보(abs_mvd_greater1_flag[ ])는 제1 플래그 정보(abs_mvd_greater0_flag[ ])에 기반하여 획득되고, MVD 크기 정보(abs_mvd_minus2[ ])는 제1 플래그 정보(abs_mvd_greater0_flag[ ]) 및 제2 플래그 정보(abs_mvd_greater1_flag[ ])에 기반하여 획득되며, MVD의 부호 정보(mvd_sign_flag[ ])는 제1 플래그 정보(abs_mvd_greater0_flag[ ])에 기반하여 획득될 수 있다. 예를 들어, 표 1에 나타난 것과 같이, 제2 플래그(abs_mvd_greater1_flag[ ])는 제1 플래그 정보(abs_mvd_greater0_flag[ ])가 참인 경우(1인 경우) 획득되고, MVD 크기 정보(abs_mvd_minus2[ ])는 제1 플래그(abs_mvd_greater0_flag[0]) 및 제2 플래그 정보(abs_mvd_greater1_flag[ ])가 모두 참인 경우(1인 경우) 획득되며, MVD 부호 정보(mvd_sign_flag[ ])는 제1 플래그 정보(abs_mvd_greater0_flag[ ])가 참인 경우(1인 경우) 획득될 수 있다.In one embodiment, the MVD coding information includes second flag information indicating whether the MVD is greater than the second reference value (eg, abs_mvd_greater1_flag[ ]), MVD size information (eg, abs_mvd_minus2[ ]), and MVD code information (eg. : mvd_sign_flag[ ]) may be further included. Here, the second flag information (abs_mvd_greater1_flag[ ]) is obtained based on the first flag information (abs_mvd_greater0_flag[ ]), and the MVD size information (abs_mvd_minus2[ ]) is the first flag information (abs_mvd_greater0_flag[ ]) and the second flag information ( It is obtained based on abs_mvd_greater1_flag[ ]), and the sign information (mvd_sign_flag[ ]) of the MVD may be obtained based on the first flag information (abs_mvd_greater0_flag[ ]). For example, as shown in Table 1, the second flag (abs_mvd_greater1_flag[ ]) is obtained when the first flag information (abs_mvd_greater0_flag[ ]) is true (if 1), and the MVD size information (abs_mvd_minus2[ ]) is zero. It is acquired when both the 1 flag (abs_mvd_greater0_flag[0]) and the second flag information (abs_mvd_greater1_flag[ ]) are true (when 1), and the MVD sign information (mvd_sign_flag[ ]) is the first flag information (abs_mvd_greater0_flag[ ]) is true. Case (if 1) can be obtained.
일 실시예에서, 제2 플래그 정보(abs_mvd_greater1_flag[ ])는 MVD의 제1 방향 성분(x 성분)이 제2 기준 값(예: 1)보다 큰지 여부를 지시하는 제3 성분 플래그(abs_mvd_greater0_flag[ 0 ]) 및 MVD의 제2 방향 성분(y 성분)이 제2 기준 값(예: 1)보다 큰지 여부를 지시하는 제4 성분 플래그(abs_mvd_greater0_flag[ 1 ])를 포함할 수 있다.In one embodiment, the second flag information (abs_mvd_greater1_flag[ ]) is a third component flag (abs_mvd_greater0_flag[0]) indicating whether the first direction component (x component) of the MVD is greater than a second reference value (eg, 1). ) And a fourth component flag (abs_mvd_greater0_flag[1]) indicating whether the second direction component (y component) of the MVD is greater than the second reference value (eg, 1).
일 실시예에서, MVD 크기 정보(abs_mvd_minus2[ ])는 2 이상의 차수를 갖는 지수 골롬(exponential Golomb) 파라미터에 기반하여 디코딩될 수 있다. 예를 들어, 표 6과 같이 MVD 크기 정보(abs_mvd_minus2[ ])는 차수 2의 지수 골롬 파라미터(EG2)에 기반하여 디코딩될 수 있다.In an embodiment, the MVD size information abs_mvd_minus2[] may be decoded based on an exponential Golomb parameter having a degree of 2 or more. For example, as shown in Table 6, MVD size information abs_mvd_minus2[] may be decoded based on the exponential Golomb parameter EG2 of order 2.
일 실시예에서, MVD 코딩 정보를 획득하는 단계(S3910)는 현재 블록에 IBC 모드가 적용되는지 여부를 결정하는 단계(예: 도 37의 S3710 단계)와, 현재 블록에 IBC 모드가 적용되는 경우 IBC MVD 코딩 정보(예: mvd_coding_IBC( ))를 획득하는 단계(예: S3730 단계)를 포함할 수 있다.In one embodiment, the step of obtaining MVD coding information (S3910) is a step of determining whether the IBC mode is applied to the current block (for example, step S3710 of FIG. 37), and when the IBC mode is applied to the current block, IBC It may include a step (eg, step S3730) of obtaining MVD coding information (eg, mvd_coding_IBC( )).
여기서 IBC MVD 코딩 정보를 획득하는 단계는, MVD의 제1 방향 성분(x 성분)의 절대 값을 나타내는 제1 MVD 크기 정보(예: abs_mvd[ 0 ])를 획득하는 단계와, MVD의 제2 방향 성분이 제1 기준 값(예: 0)보다 큰지 여부를 지시하는 제2 성분 플래그(abs_mvd_greater0_flag[ 1 ])를 획득하는 단계와, 제2 성분 플래그(abs_mvd_greater0_flag[ 1 ])에 기반하여 MVD의 제2 방향 성분(y 성분)이 제2 기준 값(예: 1)보다 큰지 여부를 지시하는 제4 성분 플래그(abs_mvd_greater1_flag[ 1 ])를 획득하는 단계와, 제2 성분 플래그(abs_mvd_greater0_flag[ 1 ]) 및 제4 성분 플래그(abs_mvd_greater1_flag[ 1 ])에 기반하여 MVD의 제2 성분의 절대 값 빼기 2를 나타내는 제2 MVD 크기 정보(abs_mvd_minus2[ 1 ])를 획득하는 단계를 포함할 수 있다.Here, the obtaining of the IBC MVD coding information includes obtaining first MVD size information (eg, abs_mvd[ 0 ]) indicating the absolute value of the first direction component (x component) of the MVD, and the second direction of the MVD. Obtaining a second component flag (abs_mvd_greater0_flag[ 1 ]) indicating whether the component is greater than a first reference value (eg, 0), and a second component of the MVD based on the second component flag (abs_mvd_greater0_flag[ 1 ]). Obtaining a fourth component flag (abs_mvd_greater1_flag[ 1 ]) indicating whether the direction component (y component) is greater than a second reference value (eg, 1), and a second component flag (abs_mvd_greater0_flag[ 1 ]) It may include the step of acquiring second MVD size information (abs_mvd_minus2[1]) indicating the absolute value of the second component of the MVD minus 2 based on the 4 component flag (abs_mvd_greater1_flag[ 1 ]).
일 실시예에서, 제1 MVD 크기 정보(abs_mvd[ 0 ])는 2 이상의 차수를 갖는 지수 골롬 파라미터에 기반하여 인코딩될 수 있다. 예를 들어, 표 8 및 표 9와 같이 제1 MVD 크기 정보(abs_mvd[ 0 ]) 차수 2의 지수 골롬 파라미터(EG2)에 기반하여 디코딩될 수 있다.In an embodiment, the first MVD size information abs_mvd[ 0] may be encoded based on an exponential Golomb parameter having a degree of 2 or more. For example, as shown in Tables 8 and 9, the first MVD size information (abs_mvd[ 0 ]) may be decoded based on the index Golomb parameter EG2 of order 2.
이후 디코더는 MVD 코딩 정보를 디코딩한다(S3920). 디코더는 디코딩된 MVD 정보의 디코딩을 통해 MVD를 획득하고, MVP 후보로부터 도출된 움직임 벡터와의 합을 통해 최종 움직임 벡터를 획득할 수 있다.Thereafter, the decoder decodes the MVD coding information (S3920). The decoder may obtain the MVD through decoding of the decoded MVD information, and obtain a final motion vector through the sum of the motion vector derived from the MVP candidate.
비트스트림Bitstream
상술한 본 명세서의 실시예들을 기반으로 인코딩 장치(100)에 의하여 도출된 인코딩된 정보(예: 인코딩된 비디오/영상 정보)는 비트스트림 형태로 출력될 수 있다. 인코딩된 정보는 비트스트림 형태로 NAL(network abstraction layer) 유닛 단위로 전송 또는 저장될 수 있다. 비트스트림은 네트워크를 통하여 전송될 수 있고, 또는 비 일시적(non-transitory) 디지털 저장매체에 저장될 수 있다. 또한, 상술한 바와 같이 비트스트림은 인코딩 장치(100)에서 디코딩 장치(200)로 바로 전송되지 않고, 외부 서버(예: 컨텐츠 스트리밍 서버)를 통하여 스트리밍/다운로드 서비스될 수도 있다. 여기서 네트워크는 방송망 및/또는 통신망 등을 포함할 수 있고, 디지털 저장매체는 USB, SD, CD, DVD, 블루레이, HDD, SSD 등 다양한 저장매체를 포함할 수 있다.The encoded information (eg, encoded video/video information) derived by the encoding apparatus 100 based on the above-described embodiments of the present specification may be output in a bitstream form. The encoded information may be transmitted or stored in a bitstream form in units of network abstraction layer (NAL) units. The bitstream may be transmitted over a network or may be stored in a non-transitory digital storage medium. In addition, as described above, the bitstream is not directly transmitted from the encoding device 100 to the decoding device 200, but may be provided with a streaming/download service through an external server (eg, a content streaming server). Here, the network may include a broadcasting network and/or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD.
상기 기술된 것과 같이, 본 발명에서 설명한 실시예들은 프로세서, 마이크로 프로세서, 컨트롤러 또는 칩 상에서 구현되어 수행될 수 있다. 예를 들어, 각 도면에서 도시한 기능 유닛들은 컴퓨터, 프로세서, 마이크로 프로세서, 컨트롤러 또는 칩 상에서 구현되어 수행될 수 있다.As described above, the embodiments described in the present invention may be implemented and performed on a processor, microprocessor, controller, or chip. For example, the functional units illustrated in each drawing may be implemented and executed on a computer, processor, microprocessor, controller, or chip.
본 명세서의 실시예에 따른 비디오 신호 처리 장치(500)는, 비디오 신호를 저장하는 메모리(520)와, 상기 메모리(520)와 결합된 프로세서(510)를 포함할 수 있다. The video signal processing apparatus 500 according to the embodiment of the present specification may include a memory 520 for storing a video signal, and a processor 510 coupled to the memory 520.
비디오 신호의 인코딩을 위하여, 상기 프로세서(510)는 움직임 예측에 기반하여 현재 블록의 움직임 벡터를 결정하고, 상기 움직임 벡터에 기반하여 상기 현재 블록의 MVD(motion vector difference)를 결정하고, 상기 MVD와 관련된 MVD 코딩 정보를 인코딩하도록 설정된다. 상기 MVD 코딩 정보는, 상기 MVD가 제1 기준 값보다 큰지 여부를 지시하는 제1 플래그 정보를 포함하고, 상기 제1 플래그 정보는 상기 MVD의 제1 방향 성분이 상기 제1 기준 값 보다 큰지 여부를 지시하는 제1 성분 플래그 정보 및 상기 MVD의 제2 방향 성분이 상기 제1 기준 값보다 큰지 여부를 지시하는 제2 성분 플래그 정보를 포함하고, 상기 제1 성분 플래그 정보와 상기 제2 성분 플래그 정보는 서로 다른 컨텍스트 모델에 기반하여 인코딩된다.To encode a video signal, the processor 510 determines a motion vector of a current block based on motion prediction, determines a motion vector difference (MVD) of the current block based on the motion vector, and determines the MVD and It is set to encode related MVD coding information. The MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value, and the first flag information indicates whether a first direction component of the MVD is greater than the first reference value. Including the indicated first component flag information and second component flag information indicating whether the second direction component of the MVD is greater than the first reference value, the first component flag information and the second component flag information They are encoded based on different context models.
일 실시예에서, 상기 MVD 코딩 정보는 상기 MVD가 제2 기준 값보다 큰지 여부를 지시하는 제2 플래그 정보, MVD 크기 정보, 및 MVD 부호 정보를 더 포함하고, 상기 제2 플래그 정보는 상기 제1 플래그 정보에 기반하여 획득되고, 상기 MVD 크기 정보는 상기 제1 플래그 정보 및 상기 제2 플래그 정보에 기반하여 인코딩되며, 상기 MVD 부호 정보는 상기 제1 플래그 정보에 기반하여 인코딩될 수 있다.In one embodiment, the MVD coding information further includes second flag information indicating whether the MVD is greater than a second reference value, MVD size information, and MVD code information, and the second flag information is the first It is obtained based on flag information, the MVD size information is encoded based on the first flag information and the second flag information, and the MVD code information may be encoded based on the first flag information.
일 실시예에서, 상기 제2 플래그 정보는 상기 MVD의 제1 방향 성분이 상기 제2 기준 값보다 큰지 여부를 지시하는 제3 성분 플래그 및 상기 MVD의 제2 방향 성분이 상기 제2 기준 값보다 큰지 여부를 지시하는 제4 성분 플래그를 포함할 수 있다.In one embodiment, the second flag information includes a third component flag indicating whether the first direction component of the MVD is greater than the second reference value, and whether the second direction component of the MVD is greater than the second reference value. It may include a fourth component flag indicating whether or not.
일 실시예에서, 상기 MVD 크기 정보는 2 이상의 차수를 갖는 지수 골롬(exponential Golomb) 파라미터에 기반하여 인코딩될 수 있다.In an embodiment, the MVD size information may be encoded based on an exponential Golomb parameter having an order of 2 or more.
일 실시예에서, 상기 프로세서(510)는, 상기 현재 블록에 IBC(intra block copy) 모드가 적용되는지 여부를 결정하고, 상기 현재 블록에 상기 IBC 모드가 적용되는 경우, IBC MVD 코딩 정보를 인코딩하도록 설정된다. 상기 프로세서(510)는, 상기 MVD의 제1 방향 성분의 절대 값을 나타내는 제1 MVD 크기 정보를 인코딩하고, 상기 MVD의 제2 방향 성분이 상기 제1 기준 값보다 큰지 여부를 지시하는 상기 제2 성분 플래그를 인코딩하고, 상기 제2 성분 플래그에 기반하여 상기 MVD의 제2 방향 성분이 상기 제2 기준 값보다 큰지 여부를 지시하는 상기 제4 성분 플래그를 인코딩하고, 상기 제2 성분 플래그 및 상기 제4 성분 플래그에 기반하여 상기 MVD의 제2 성분의 절대 값 빼기 2를 나타내는 제2 MVD 크기 정보를 인코딩하도록 설정될 수 있다.In one embodiment, the processor 510 determines whether an intra block copy (IBC) mode is applied to the current block, and when the IBC mode is applied to the current block, the processor 510 encodes IBC MVD coding information. Is set. The processor 510 encodes first MVD size information indicating an absolute value of the first direction component of the MVD, and indicates whether the second direction component of the MVD is greater than the first reference value. Encoding a component flag, encoding the fourth component flag indicating whether a second direction component of the MVD is greater than the second reference value based on the second component flag, and encoding the second component flag and the second component flag It may be set to encode second MVD size information indicating the absolute value minus 2 of the second component of the MVD based on the 4 component flag.
일 실시예에서, 상기 제1 MVD 크기 정보는 2 이상의 차수를 갖는 지수 골롬(exponential Golomb) 파라미터에 기반하여 인코딩될 수 있다.In an embodiment, the first MVD size information may be encoded based on an exponential Golomb parameter having a degree of 2 or more.
비디오 신호의 디코딩을 위하여, 상기 프로세서(510)는 현재 블록의 예측을 위한 MVD(motion vector difference)와 관련된 MVD 코딩 정보를 획득하고, 상기 MVD 코딩 정보를 디코딩하도록 설정되고, 상기 MVD 코딩 정보는, 상기 MVD가 제1 기준 값보다 큰지 여부를 지시하는 제1 플래그 정보를 포함하고, 상기 제1 플래그 정보는 상기 MVD의 제1 방향 성분이 상기 제1 기준 값 보다 큰지 여부를 지시하는 제1 성분 플래그 정보 및 상기 MVD의 제2 방향 성분이 상기 제1 기준 값보다 큰지 여부를 지시하는 제2 성분 플래그 정보를 포함하고, 상기 제1 성분 플래그 정보와 상기 제2 성분 플래그 정보는 서로 다른 컨텍스트 모델에 기반하여 디코딩된다.For decoding a video signal, the processor 510 is configured to obtain MVD coding information related to a motion vector difference (MVD) for prediction of a current block, and to decode the MVD coding information, and the MVD coding information, Includes first flag information indicating whether the MVD is greater than a first reference value, and the first flag information includes a first component flag indicating whether a first direction component of the MVD is greater than the first reference value Information and second component flag information indicating whether the second direction component of the MVD is greater than the first reference value, and the first component flag information and the second component flag information are based on different context models. And decoded.
일 실시예에서, 상기 MVD가 제2 기준 값보다 큰지 여부를 지시하는 제2 플래그 정보, 제1 MVD의 크기 정보, 및 MVD 부호 정보를 더 포함하고, 상기 제2 플래그 정보는 상기 제1 플래그 정보에 기반하여 획득되고, 상기 MVD 크기 정보는 상기 제1 플래그 정보 및 상기 제2 플래그 정보에 기반하여 획득되며, 상기 MVD 부호 정보는 상기 제1 플래그 정보에 기반하여 획득될 수 있다.In one embodiment, second flag information indicating whether the MVD is greater than a second reference value, information on a size of the first MVD, and information on an MVD code are further included, and the second flag information is the first flag information And the MVD size information may be obtained based on the first flag information and the second flag information, and the MVD code information may be obtained based on the first flag information.
일 실시예에서, 상기 제2 플래그 정보는 상기 MVD의 제1 방향 성분이 상기 제2 기준 값보다 큰지 여부를 지시하는 제3 성분 플래그 및 상기 MVD의 제2 방향 성분이 상기 제2 기준 값보다 큰지 여부를 지시하는 제4 성분 플래그를 포함할 수 있다.In one embodiment, the second flag information includes a third component flag indicating whether the first direction component of the MVD is greater than the second reference value, and whether the second direction component of the MVD is greater than the second reference value. It may include a fourth component flag indicating whether or not.
일 실시예에서, 상기 MVD 크기 정보는 2 이상의 차수를 갖는 지수 골롬(exponential Golomb) 파라미터에 기반하여 디코딩될 수 있다.In an embodiment, the MVD size information may be decoded based on an exponential Golomb parameter having an order of 2 or more.
일 실시예에서, 상기 프로세서(510)는, 상기 현재 블록에 IBC(intra block copy) 모드가 적용되는지 여부를 결정하는 단계와, 상기 현재 블록에 상기 IBC 모드가 적용되는 경우, IBC MVD 코딩 정보를 획득하도록 설정될 수 있다. 또한 프로세서(510)는 상기 MVD의 제1 방향 성분의 절대 값을 나타내는 제1 MVD 크기 정보를 획득하고, 상기 MVD의 제2 방향 성분이 상기 제1 기준 값보다 큰지 여부를 지시하는 제2 성분 플래그를 획득하고, 상기 제2 성분 플래그에 기반하여 상기 MVD의 제2 방향 성분이 제2 기준 값보다 큰지 여부를 지시하는 제4 성분 플래그를 획득하고, 상기 제2 성분 플래그 및 상기 제4 성분 플래그에 기반하여 상기 MVD의 제2 성분의 절대 값 빼기 2를 나타내는 제2 MVD 크기 정보를 획득할 수 있다.In one embodiment, the processor 510 determines whether an intra block copy (IBC) mode is applied to the current block, and when the IBC mode is applied to the current block, the processor 510 provides IBC MVD coding information. It can be set to acquire. In addition, the processor 510 obtains first MVD size information indicating the absolute value of the first direction component of the MVD, and a second component flag indicating whether the second direction component of the MVD is greater than the first reference value. And a fourth component flag indicating whether a second direction component of the MVD is greater than a second reference value based on the second component flag, and the second component flag and the fourth component flag Based on this, second MVD size information indicating the absolute value of the second component of the MVD minus 2 may be obtained.
일 실시예에서, 상기 제1 MVD 크기 정보는 2 이상의 차수를 갖는 지수 골롬(exponential Golomb) 파라미터에 기반하여 디코딩될 수 있다.In an embodiment, the first MVD size information may be decoded based on an exponential Golomb parameter having an order of 2 or more.
또한, 본 발명이 적용되는 처리 방법은 컴퓨터로 실행되는 프로그램의 형태로 생산될 수 있으며, 컴퓨터가 판독할 수 있는 기록 매체에 저장될 수 있다. 본 발명에 따른 데이터 구조를 가지는 멀티미디어 데이터도 또한 컴퓨터가 판독할 수 있는 기록 매체에 저장될 수 있다. 상기 컴퓨터가 판독할 수 있는 기록 매체는 컴퓨터로 읽을 수 있는 데이터가 저장되는 모든 종류의 저장 장치 및 분산 저장 장치를 포함한다. 상기 컴퓨터가 판독할 수 있는 기록 매체는, 예를 들어, 블루레이 디스크(BD), 범용 직렬 버스(USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크 및 광학적 데이터 저장 장치를 포함할 수 있다. 또한, 상기 컴퓨터가 판독할 수 있는 기록 매체는 반송파(예를 들어, 인터넷을 통한 전송)의 형태로 구현된 미디어를 포함한다. 또한, 인코딩 방법으로 생성된 비트스트림이 컴퓨터가 판독할 수 있는 기록 매체에 저장되거나 유무선 통신 네트워크를 통해 전송될 수 있다.Further, the processing method to which the present invention is applied may be produced in the form of a program executed by a computer, and may be stored in a computer-readable recording medium. Multimedia data having a data structure according to the present invention can also be stored in a computer-readable recording medium. The computer-readable recording medium includes all kinds of storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable recording medium includes, for example, Blu-ray disk (BD), universal serial bus (USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical It may include a data storage device. Further, the computer-readable recording medium includes media implemented in the form of a carrier wave (for example, transmission through the Internet). In addition, the bitstream generated by the encoding method may be stored in a computer-readable recording medium or transmitted through a wired or wireless communication network.
또한, 본 발명의 실시예는 프로그램 코드에 의한 컴퓨터 프로그램 제품으로 구현될 수 있고, 상기 프로그램 코드는 본 발명의 실시예에 의해 컴퓨터에서 수행될 수 있다. 상기 프로그램 코드는 컴퓨터에 의해 판독가능한 캐리어 상에 저장될 수 있다.Further, an embodiment of the present invention may be implemented as a computer program product using a program code, and the program code may be executed in a computer according to the embodiment of the present invention. The program code may be stored on a carrier readable by a computer.
본 명세서의 실시예에 따른 비-일시적 컴퓨터-판독 가능한 매체(non-transitory computer-readable medium)는 하나 또는 그 이상의 프로세서들에 의해 실행되는 하나 또는 그 이상의 명령어들을 저장한다. 상기 하나 또는 그 이상의 명령어들은, 비디오 신호의 인코딩을 위하여, 움직임 예측에 기반하여 현재 블록의 움직임 벡터를 결정하고, 상기 움직임 벡터에 기반하여 상기 현재 블록의 MVD(motion vector difference)를 결정하고, 상기 MVD와 관련된 MVD 코딩 정보를 인코딩하도록 비디오 신호 처리 장치(500)(또는 인코딩 장치(100))를 제어한다. 상기 MVD 코딩 정보는, 상기 MVD가 제1 기준 값보다 큰지 여부를 지시하는 제1 플래그 정보를 포함하고, 상기 제1 플래그 정보는 상기 MVD의 제1 방향 성분이 상기 제1 기준 값 보다 큰지 여부를 지시하는 제1 성분 플래그 정보 및 상기 MVD의 제2 방향 성분이 상기 제1 기준 값보다 큰지 여부를 지시하는 제2 성분 플래그 정보를 포함하고, 상기 제1 성분 플래그 정보와 상기 제2 성분 플래그 정보는 서로 다른 컨텍스트 모델에 기반하여 인코딩된다.A non-transitory computer-readable medium according to an embodiment of the present specification stores one or more instructions executed by one or more processors. The one or more instructions determine a motion vector of a current block based on motion prediction for encoding a video signal, determine a motion vector difference (MVD) of the current block based on the motion vector, and the The video signal processing apparatus 500 (or encoding apparatus 100) is controlled to encode MVD coding information related to MVD. The MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value, and the first flag information indicates whether a first direction component of the MVD is greater than the first reference value. Including the indicated first component flag information and second component flag information indicating whether the second direction component of the MVD is greater than the first reference value, the first component flag information and the second component flag information They are encoded based on different context models.
일 실시예에서, 상기 MVD 코딩 정보는 상기 MVD가 제2 기준 값보다 큰지 여부를 지시하는 제2 플래그 정보, 제1 MVD의 크기 정보, 및 MVD 부호 정보를 더 포함하고, 상기 제2 플래그 정보는 상기 제1 플래그 정보에 기반하여 획득되고, 상기 MVD 크기 정보는 상기 제1 플래그 정보 및 상기 제2 플래그 정보에 기반하여 인코딩되며, 상기 MVD 부호 정보는 상기 제1 플래그 정보에 기반하여 인코딩될 수 있다.In one embodiment, the MVD coding information further includes second flag information indicating whether the MVD is greater than a second reference value, size information of the first MVD, and MVD code information, and the second flag information It is obtained based on the first flag information, the MVD size information is encoded based on the first flag information and the second flag information, and the MVD code information may be encoded based on the first flag information. .
일 실시예에서, 상기 제2 플래그 정보는 상기 MVD의 제1 방향 성분이 상기 제2 기준 값보다 큰지 여부를 지시하는 제3 성분 플래그 및 상기 MVD의 제2 방향 성분이 상기 제2 기준 값보다 큰지 여부를 지시하는 제4 성분 플래그를 포함할 수 있다.In one embodiment, the second flag information includes a third component flag indicating whether the first direction component of the MVD is greater than the second reference value, and whether the second direction component of the MVD is greater than the second reference value. It may include a fourth component flag indicating whether or not.
일 실시예에서, 상기 MVD 크기 정보는 2 이상의 차수를 갖는 지수 골롬(exponential Golomb) 파라미터에 기반하여 인코딩될 수 있다.In an embodiment, the MVD size information may be encoded based on an exponential Golomb parameter having an order of 2 or more.
일 실시예에서, 하나 또는 그 이상의 명령어들은, 상기 현재 블록에 IBC(intra block copy) 모드가 적용되는지 여부를 결정하고, 상기 현재 블록에 상기 IBC 모드가 적용되는 경우, IBC MVD 코딩 정보를 인코딩하도록 비디오 신호 처리 장치(500)(또는 인코딩 장치(100))를 제어할 수 있다. 상기 하나 또는 그 이상의 명령어들은, 상기 MVD의 제1 방향 성분의 절대 값을 나타내는 제1 MVD 크기 정보를 인코딩하고, 상기 MVD의 제2 방향 성분이 상기 제1 기준 값보다 큰지 여부를 지시하는 제2 성분 플래그를 인코딩하고, 상기 제2 성분 플래그에 기반하여 상기 MVD의 제2 방향 성분이 제2 기준 값보다 큰지 여부를 지시하는 제4 성분 플래그를 인코딩하고, 상기 제2 성분 플래그 및 상기 제4 성분 플래그에 기반하여 상기 MVD의 제2 성분의 절대 값 빼기 2를 나타내는 제2 MVD 크기 정보를 인코딩하도록 비디오 신호 처리 장치(500)(또는 인코딩 장치(100))를 제어할 수 있다.In one embodiment, one or more instructions determine whether an intra block copy (IBC) mode is applied to the current block, and when the IBC mode is applied to the current block, to encode IBC MVD coding information. The video signal processing device 500 (or the encoding device 100) can be controlled. The one or more instructions encode first MVD size information indicating an absolute value of the first direction component of the MVD, and a second indicating whether the second direction component of the MVD is greater than the first reference value. Encoding a component flag, encoding a fourth component flag indicating whether a second direction component of the MVD is greater than a second reference value based on the second component flag, and the second component flag and the fourth component The video signal processing apparatus 500 (or encoding apparatus 100) may be controlled to encode the second MVD size information indicating the absolute value of the second component of the MVD minus 2 based on the flag.
일 실시예에서, 상기 제1 MVD 크기 정보는 2 이상의 차수를 갖는 지수 골롬(exponential Golomb) 파라미터에 기반하여 인코딩될 수 있다.In an embodiment, the first MVD size information may be encoded based on an exponential Golomb parameter having a degree of 2 or more.
또한, 상기 하나 또는 그 이상의 명령어들은, 비디오 신호의 디코딩을 위하여, 현재 블록의 예측을 위한 MVD(motion vector difference)와 관련된 MVD 코딩 정보를 획득하고, 상기 MVD 코딩 정보를 디코딩하도록 비디오 신호 처리 장치(500)(또는 디코딩 장치(200))를 제어한다. 상기 MVD 코딩 정보는, 상기 MVD가 제1 기준 값보다 큰지 여부를 지시하는 제1 플래그 정보를 포함하고, 상기 제1 플래그 정보는 상기 MVD의 제1 방향 성분이 상기 제1 기준 값 보다 큰지 여부를 지시하는 제1 성분 플래그 정보 및 상기 MVD의 제2 방향 성분이 상기 제1 기준 값보다 큰지 여부를 지시하는 제2 성분 플래그 정보를 포함하고, 상기 제1 성분 플래그 정보와 상기 제2 성분 플래그 정보는 서로 다른 컨텍스트 모델에 기반하여 디코딩된다.In addition, the one or more instructions may include obtaining MVD coding information related to motion vector difference (MVD) for prediction of a current block for decoding a video signal, and decoding the MVD coding information. 500) (or the decoding device 200). The MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value, and the first flag information indicates whether a first direction component of the MVD is greater than the first reference value. Including the indicated first component flag information and second component flag information indicating whether the second direction component of the MVD is greater than the first reference value, the first component flag information and the second component flag information It is decoded based on different context models.
일 실시예에서, 상기 MVD 코딩 정보는, 상기 MVD가 제2 기준 값보다 큰지 여부를 지시하는 제2 플래그 정보, MVD 크기 정보, 및 MVD 부호 정보를 더 포함하고, 상기 제2 플래그 정보는 상기 제1 플래그 정보에 기반하여 획득되고, 상기 MVD의 크기 정보는 상기 제1 플래그 정보 및 상기 제2 플래그 정보에 기반하여 획득되며, 상기 MVD 부호 정보는 상기 제1 플래그 정보에 기반하여 획득될 수 있다.In one embodiment, the MVD coding information further includes second flag information indicating whether the MVD is greater than a second reference value, MVD size information, and MVD code information, and the second flag information 1 is obtained based on flag information, the size information of the MVD is obtained based on the first flag information and the second flag information, and the MVD code information may be obtained based on the first flag information.
일 실시예에서, 상기 제2 플래그 정보는, 상기 MVD의 제1 방향 성분이 상기 제2 기준 값보다 큰지 여부를 지시하는 제3 성분 플래그 및 상기 MVD의 제2 방향 성분이 상기 제2 기준 값보다 큰지 여부를 지시하는 제4 성분 플래그를 포함할 수 있다.In one embodiment, the second flag information includes a third component flag indicating whether a first direction component of the MVD is greater than the second reference value, and a second direction component of the MVD is greater than the second reference value. A fourth component flag indicating whether or not it is large may be included.
일 실시예에서, 상기 MVD 크기 정보는 2 이상의 차수를 갖는 지수 골롬(exponential Golomb) 파라미터에 기반하여 디코딩될 수 있다.In an embodiment, the MVD size information may be decoded based on an exponential Golomb parameter having an order of 2 or more.
일 실시예에서, 하나 또는 그 이상의 명령어들은, 상기 현재 블록에 IBC(intra block copy) 모드가 적용되는지 여부를 결정하고, 상기 현재 블록에 상기 IBC 모드가 적용되는 경우, IBC MVD 코딩 정보를 획득하도록 비디오 신호 처리 장치(500)(또는 인코딩 장치(100))를 제어할 수 있다. 상기 하나 또는 그 이상의 명령어들은, 상기 MVD의 제1 방향 성분의 절대 값을 나타내는 제1 MVD 크기 정보를 획득하고, 상기 MVD의 제2 방향 성분이 상기 제1 기준 값보다 큰지 여부를 지시하는 상기 제2 성분 플래그를 획득하고, 상기 제2 성분 플래그에 기반하여 상기 MVD의 제2 방향 성분이 상기 제2 기준 값보다 큰지 여부를 지시하는 상기 제4 성분 플래그를 획득하고, 상기 제2 성분 플래그 및 상기 제4 성분 플래그에 기반하여 상기 MVD의 제2 성분의 절대 값 빼기 2를 나타내는 제2 MVD 크기 정보를 획득하도록 비디오 신호 처리 장치(500)(또는 인코딩 장치(100))를 제어할 수 있다.In one embodiment, one or more instructions determine whether an intra block copy (IBC) mode is applied to the current block, and when the IBC mode is applied to the current block, to obtain IBC MVD coding information The video signal processing device 500 (or the encoding device 100) can be controlled. The one or more commands obtain first MVD size information indicating an absolute value of the first direction component of the MVD, and indicate whether the second direction component of the MVD is greater than the first reference value. Obtain a two-component flag, obtain the fourth component flag indicating whether a second direction component of the MVD is greater than the second reference value based on the second component flag, and the second component flag and the The video signal processing apparatus 500 (or encoding apparatus 100) may be controlled to obtain second MVD size information indicating the absolute value minus 2 of the second component of the MVD based on the fourth component flag.
일 실시예에서, 상기 제1 MVD 크기 정보는 2 이상의 차수를 갖는 지수 골롬(exponential Golomb) 파라미터에 기반하여 디코딩될 수 있다.In an embodiment, the first MVD size information may be decoded based on an exponential Golomb parameter having an order of 2 or more.
또한, 본 발명이 적용되는 디코더 및 인코더는 멀티미디어 방송 송수신 장치, 모바일 통신 단말, 홈 시네마 비디오 장치, 디지털 시네마 비디오 장치, 감시용 카메라, 비디오 대화 장치, 비디오 통신과 같은 실시간 통신 장치, 모바일 스트리밍 장치, 저장 매체, 캠코더, 주문형 비디오(VoD) 서비스 제공 장치, OTT 비디오(Over the top video) 장치, 인터넷 스트리밍 서비스 제공 장치, 3차원(3D) 비디오 장치, 화상 전화 비디오 장치, 및 의료용 비디오 장치 등에 포함될 수 있으며, 비디오 신호 또는 데이터 신호를 처리하기 위해 사용될 수 있다. 예를 들어, OTT 비디오(Over the top video) 장치로는 게임 콘솔, 블루레이 플레이어, 인터넷 접속 TV, 홈시어터 시스템, 스마트폰, 태블릿 PC, DVR(Digital Video Recorder) 등을 포함할 수 있다.In addition, the decoder and encoder to which the present invention is applied include a multimedia broadcasting transmission/reception device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video chat device, a real-time communication device such as video communication, a mobile streaming device, Storage media, camcorders, video-on-demand (VoD) service providers, OTT video (Over the top video) devices, Internet streaming service providers, three-dimensional (3D) video devices, video telephony video devices, and medical video devices. And can be used to process video signals or data signals. For example, an OTT video (Over the top video) device may include a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smartphone, a tablet PC, and a digital video recorder (DVR).
이상에서 설명된 실시예들은 본 발명의 구성요소들과 특징들이 소정 형태로 결합된 것들이다. 각 구성요소 또는 특징은 별도의 명시적 언급이 없는 한 선택적인 것으로 고려되어야 한다. 각 구성요소 또는 특징은 다른 구성요소나 특징과 결합되지 않은 형태로 실시될 수 있다. 또한, 일부 구성요소들 및/또는 특징들을 결합하여 본 발명의 실시예를 구성하는 것도 가능하다. 본 발명의 실시예들에서 설명되는 동작들의 순서는 변경될 수 있다. 어느 실시예의 일부 구성이나 특징은 다른 실시예에 포함될 수 있고, 또는 다른 실시예의 대응하는 구성 또는 특징과 교체될 수 있다. 특허청구범위에서 명시적인 인용 관계가 있지 않은 청구항들을 결합하여 실시예를 구성하거나 출원 후의 보정에 의해 새로운 청구항으로 포함시킬 수 있음은 자명하다.The embodiments described above are those in which components and features of the present invention are combined in a predetermined form. Each component or feature should be considered optional unless explicitly stated otherwise. Each component or feature may be implemented in a form that is not combined with other components or features. In addition, it is also possible to constitute an embodiment of the present invention by combining some components and/or features. The order of operations described in the embodiments of the present invention may be changed. Some configurations or features of one embodiment may be included in other embodiments, or may be replaced with corresponding configurations or features of other embodiments. It is obvious that the embodiments may be configured by combining claims that do not have an explicit citation relationship in the claims or may be included as new claims by amendment after filing.
본 발명에 따른 실시예는 다양한 수단, 예를 들어, 하드웨어, 펌웨어(firmware), 소프트웨어 또는 그것들의 결합 등에 의해 구현될 수 있다. 하드웨어에 의한 구현의 경우, 본 발명의 일 실시예는 하나 또는 그 이상의 ASICs(application specific integrated circuits), DSPs(digital signal processors), DSPDs(digital signal processing devices), PLDs(programmable logic devices), FPGAs(field programmable gate arrays), 프로세서, 콘트롤러, 마이크로 콘트롤러, 마이크로 프로세서 등에 의해 구현될 수 있다.The embodiment according to the present invention may be implemented by various means, for example, hardware, firmware, software, or a combination thereof. In the case of implementation by hardware, an embodiment of the present invention is one or more ASICs (application specific integrated circuits), DSPs (digital signal processors), DSPDs (digital signal processing devices), PLDs (programmable logic devices), FPGAs ( field programmable gate arrays), processors, controllers, microcontrollers, microprocessors, etc.
펌웨어나 소프트웨어에 의한 구현의 경우, 본 발명의 일 실시예는 이상에서 설명된 기능 또는 동작들을 수행하는 모듈, 절차, 함수 등의 형태로 구현될 수 있다. 소프트웨어 코드는 메모리에 저장되어 프로세서에 의해 구동될 수 있다. 상기 메모리는 상기 프로세서 내부 또는 외부에 위치하여, 이미 공지된 다양한 수단에 의해 상기 프로세서와 데이터를 주고받을 수 있다.In the case of implementation by firmware or software, an embodiment 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 a memory and driven by a processor. The memory may be located inside or outside the processor, and may exchange data with the processor through various known means.
이 문서에서 "/"와 ","는 "및/또는"으로 해석된다. 예를 들어, "A/B"는 "A 및/또는 B"로 해석되고, "A, B"는 "A 및/또는 B"로 해석된다. 추가적으로, "A/B/C"는 "A, B 및/또는 C 중 적어도 하나"를 의미한다. 또한, "A, B, C"도 "A, B 및/또는 C 중 적어도 하나"를 의미한다. (In this document, the term "/" and "," should be interpreted to indicate "and/or." For instance, the expression "A/B" may mean "A and/or B." Further, "A, B" may mean "A and/or B." Further, "A/B/C" may mean "at least one of A, B, and/or C." Also, "A/B/C" may mean "at least one of A, B, and/or C.")In this document, "/" and "," are interpreted as "and/or". For example, "A/B" is interpreted as "A and/or B", and "A, B" is interpreted as "A and/or B". Additionally, “A/B/C” means “at least one of A, B and/or C”. In addition, "A, B, C" also means "at least one of A, B and/or C". (In this document, the term "/" and "," should be interpreted to indicate "and/or." For instance, the expression "A/B" may mean "A and/or B." Further, "A, B" may mean "A and/or B." Further, "A/B/C" may mean "at least one of A, B, and/or C." Also, "A/B/C" may mean " at least one of A, B, and/or C.")
추가적으로, 본 문서에서 "또는"는 "및/또는"으로 해석된다. 예를 들어, "A 또는 B"은, 1) "A" 만을 의미하고, 2) "B" 만을 의미하거나, 3) "A 및 B"를 의미할 수 있다. 달리 표현하면, 본 문서의 "또는"은 "추가적으로 또는 대체적으로(additionally or alternatively)"를 의미할 수 있다. (Further, in the document, the term "or" should be interpreted to indicate "and/or." For instance, the expression "A or B" may comprise 1) only A, 2) only B, and/or 3) both A and B. In other words, the term "or" in this document should be interpreted to indicate "additionally or alternatively.")Additionally, in this document "or" is interpreted as "and/or". For example, "A or B" may mean only 1) "A", 2) only "B", or 3) "A and B". In other words, "or" in this document may mean "additionally or alternatively". (Further, in the document, the term "or" should be interpreted to indicate "and/or." For instance, the expression "A or B" may comprise 1) only A, 2) only B, and/or 3) both A and B. In other words, the term "or" in this document should be interpreted to indicate "additionally or alternatively.")
본 발명은 본 발명의 필수적 특징을 벗어나지 않는 범위에서 다른 특정한 형태로 구체화될 수 있음은 당업자에게 자명하다. 따라서, 상술한 상세한 설명은 모든 면에서 제한적으로 해석되어서는 아니 되고 예시적인 것으로 고려되어야 한다. 본 발명의 범위는 첨부된 청구항의 합리적 해석에 의해 결정되어야 하고, 본 발명의 등가적 범위 내에서의 모든 변경은 본 발명의 범위에 포함된다. It is obvious to those skilled in the art that the present invention can be embodied in other specific forms without departing from the essential features of the present invention. Therefore, the above detailed description should not be construed as restrictive in all respects, but should be considered as illustrative. The scope of the present invention should be determined by reasonable interpretation of the appended claims, and all changes within the equivalent scope of the present invention are included in the scope of the present invention.
이상, 전술한 본 발명의 바람직한 실시예는, 예시의 목적을 위해 개시된 것으로, 당업자라면 이하 첨부된 특허청구범위에 개시된 본 발명의 기술적 사상과 그 기술적 범위 내에서, 다양한 다른 실시예들을 개량, 변경, 대체 또는 부가 등이 가능할 것이다.Above, the above-described preferred embodiments of the present invention are disclosed for the purpose of illustration, and those skilled in the art improve and change various other embodiments within the technical spirit and scope of the present invention disclosed in the appended claims below. , Substitution or addition may be possible.

Claims (15)

  1. 인터 예측(inter prediction)을 위한 비디오 신호의 디코딩 방법으로서, A method of decoding a video signal for inter prediction, comprising:
    현재 블록의 예측을 위한 MVD(motion vector difference)와 관련된 MVD 코딩 정보를 획득하는 단계와,Obtaining MVD coding information related to motion vector difference (MVD) for prediction of the current block; and
    상기 MVD 코딩 정보를 디코딩하는 단계를 포함하고,Including the step of decoding the MVD coding information,
    상기 MVD 코딩 정보는, 상기 MVD가 제1 기준 값보다 큰지 여부를 지시하는 제1 플래그 정보를 포함하고, The MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value,
    상기 제1 플래그 정보는 상기 MVD의 제1 방향 성분이 상기 제1 기준 값 보다 큰지 여부를 지시하는 제1 성분 플래그 정보 및 상기 MVD의 제2 방향 성분이 상기 제1 기준 값보다 큰지 여부를 지시하는 제2 성분 플래그 정보를 포함하고,The first flag information includes first component flag information indicating whether a first direction component of the MVD is greater than the first reference value, and indicating whether a second direction component of the MVD is greater than the first reference value. Contains second component flag information,
    상기 제1 성분 플래그 정보와 상기 제2 성분 플래그 정보는 서로 다른 컨텍스트 모델에 기반하여 디코딩되는 것을 특징으로 하는 디코딩 방법.The first component flag information and the second component flag information are decoded based on different context models.
  2. 제1항에 있어서,The method of claim 1,
    상기 MVD 코딩 정보는,The MVD coding information,
    상기 MVD가 제2 기준 값보다 큰지 여부를 지시하는 제2 플래그 정보, MVD 크기 정보, 및 MVD 부호 정보를 더 포함하고,Further comprising second flag information indicating whether the MVD is greater than a second reference value, MVD size information, and MVD code information,
    상기 제2 플래그 정보는 상기 제1 플래그 정보에 기반하여 획득되고,The second flag information is obtained based on the first flag information,
    상기 MVD 크기 정보는 상기 제1 플래그 정보 및 상기 제2 플래그 정보에 기반하여 획득되며, The MVD size information is obtained based on the first flag information and the second flag information,
    상기 MVD 부호 정보는 상기 제1 플래그 정보에 기반하여 획득되는 것을 특징으로 하는 디코딩 방법.The MVD code information is obtained based on the first flag information.
  3. 제2항에 있어서,The method of claim 2,
    상기 제2 플래그 정보는,The second flag information,
    상기 MVD의 제1 방향 성분이 상기 제2 기준 값보다 큰지 여부를 지시하는 제3 성분 플래그 및 상기 MVD의 제2 방향 성분이 상기 제2 기준 값보다 큰지 여부를 지시하는 제4 성분 플래그를 포함하는 것을 특징으로 하는 디코딩 방법.A third component flag indicating whether the first direction component of the MVD is greater than the second reference value, and a fourth component flag indicating whether the second direction component of the MVD is greater than the second reference value. A decoding method, characterized in that.
  4. 제2항에 있어서,The method of claim 2,
    상기 MVD 크기 정보는 2 이상의 차수를 갖는 지수 골롬(exponential Golomb) 파라미터에 기반하여 디코딩되는 것을 특징으로 하는 디코딩 방법.The MVD size information is decoded based on an exponential Golomb parameter having an order of 2 or more.
  5. 제1항에 있어서,The method of claim 1,
    상기 MVD 코딩 정보를 획득하는 단계는,Acquiring the MVD coding information,
    상기 현재 블록에 IBC(intra block copy) 모드가 적용되는지 여부를 결정하는 단계와,Determining whether an intra block copy (IBC) mode is applied to the current block; and
    상기 현재 블록에 상기 IBC 모드가 적용되는 경우, IBC MVD 코딩 정보를 획득하는 단계를 포함하고,When the IBC mode is applied to the current block, including obtaining IBC MVD coding information,
    상기 IBC MVD 코딩 정보를 획득하는 단계는, The step of obtaining the IBC MVD coding information,
    상기 MVD의 제1 방향 성분의 절대 값을 나타내는 제1 MVD 크기 정보를 획득하는 단계와, Obtaining first MVD size information indicating an absolute value of the first direction component of the MVD; and
    상기 MVD의 제2 방향 성분이 상기 제1 기준 값보다 큰지 여부를 지시하는 제2 성분 플래그를 획득하는 단계와,Obtaining a second component flag indicating whether the second direction component of the MVD is greater than the first reference value; and
    상기 제2 성분 플래그에 기반하여 상기 MVD의 제2 방향 성분이 제2 기준 값보다 큰지 여부를 지시하는 제4 성분 플래그를 획득하는 단계와, Obtaining a fourth component flag indicating whether a second direction component of the MVD is greater than a second reference value based on the second component flag; and
    상기 제2 성분 플래그 및 상기 제4 성분 플래그에 기반하여 상기 MVD의 제2 성분의 절대 값 빼기 2를 나타내는 제2 MVD 크기 정보를 획득하는 단계를 포함하는 것을 특징으로 하는 디코딩 방법.And acquiring second MVD size information indicating the absolute value of the second component of the MVD minus 2 based on the second component flag and the fourth component flag.
  6. 제5항에 있어서,The method of claim 5,
    상기 제1 MVD 크기 정보는 2 이상의 차수를 갖는 지수 골롬(exponential Golomb) 파라미터에 기반하여 디코딩되는 것을 특징으로 하는 디코딩 방법.The first MVD size information is decoded based on an exponential Golomb parameter having an order of 2 or more.
  7. 인터 예측(inter prediction)을 위한 비디오 신호의 인코딩 방법으로서, A video signal encoding method for inter prediction, comprising:
    움직임 예측에 기반하여 현재 블록의 움직임 벡터를 결정하는 단계와,Determining a motion vector of the current block based on motion prediction, and
    상기 움직임 벡터에 기반하여 상기 현재 블록의 MVD(motion vector difference)를 결정하는 단계와,Determining a motion vector difference (MVD) of the current block based on the motion vector,
    상기 MVD와 관련된 MVD 코딩 정보를 인코딩하는 단계를 포함하고,Including the step of encoding MVD coding information related to the MVD,
    상기 MVD 코딩 정보는, 상기 MVD가 제1 기준 값보다 큰지 여부를 지시하는 제1 플래그 정보를 포함하고, The MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value,
    상기 제1 플래그 정보는 상기 MVD의 제1 방향 성분이 상기 제1 기준 값 보다 큰지 여부를 지시하는 제1 성분 플래그 정보 및 상기 MVD의 제2 방향 성분이 상기 제1 기준 값보다 큰지 여부를 지시하는 제2 성분 플래그 정보를 포함하고,The first flag information includes first component flag information indicating whether a first direction component of the MVD is greater than the first reference value, and indicating whether a second direction component of the MVD is greater than the first reference value. Contains second component flag information,
    상기 제1 성분 플래그 정보와 상기 제2 성분 플래그 정보는 서로 다른 컨텍스트 모델에 기반하여 인코딩되는 것을 특징으로 하는 인코딩 방법.The encoding method, characterized in that the first component flag information and the second component flag information are encoded based on different context models.
  8. 제7항에 있어서,The method of claim 7,
    상기 MVD 코딩 정보는 상기 MVD가 제2 기준 값보다 큰지 여부를 지시하는 제2 플래그 정보, MVD 크기 정보, 및 MVD 부호 정보를 더 포함하고,The MVD coding information further includes second flag information indicating whether the MVD is greater than a second reference value, MVD size information, and MVD code information,
    상기 제2 플래그 정보는 상기 제1 플래그 정보에 기반하여 획득되고,The second flag information is obtained based on the first flag information,
    상기 MVD 크기 정보는 상기 제1 플래그 정보 및 상기 제2 플래그 정보에 기반하여 인코딩되며, The MVD size information is encoded based on the first flag information and the second flag information,
    상기 MVD 부호 정보는 상기 제1 플래그 정보에 기반하여 인코딩되는 것을 특징으로 하는 인코딩 방법.The encoding method, characterized in that the MVD code information is encoded based on the first flag information.
  9. 제8항에 있어서,The method of claim 8,
    상기 제2 플래그 정보는,The second flag information,
    상기 MVD의 제1 방향 성분이 상기 제2 기준 값보다 큰지 여부를 지시하는 제3 성분 플래그 및 상기 MVD의 제2 방향 성분이 상기 제2 기준 값보다 큰지 여부를 지시하는 제4 성분 플래그를 포함하는 것을 특징으로 하는 인코딩 방법.A third component flag indicating whether the first direction component of the MVD is greater than the second reference value, and a fourth component flag indicating whether the second direction component of the MVD is greater than the second reference value. Encoding method, characterized in that.
  10. 제8항에 있어서,The method of claim 8,
    상기 MVD 크기 정보는 2 이상의 차수를 갖는 지수 골롬(exponential Golomb) 파라미터에 기반하여 인코딩되는 것을 특징으로 하는 인코딩 방법.The encoding method, characterized in that the MVD size information is encoded based on an exponential Golomb parameter having an order of 2 or more.
  11. 제7항에 있어서,The method of claim 7,
    상기 MVD 코딩 정보를 인코딩하는 단계는,Encoding the MVD coding information,
    상기 현재 블록에 IBC(intra block copy) 모드가 적용되는지 여부를 결정하는 단계와,Determining whether an intra block copy (IBC) mode is applied to the current block; and
    상기 현재 블록에 상기 IBC 모드가 적용되는 경우, IBC MVD 코딩 정보를 인코딩하는 단계를 포함하고,When the IBC mode is applied to the current block, encoding IBC MVD coding information,
    상기 IBC MVD 코딩 정보를 인코딩하는 단계는, Encoding the IBC MVD coding information,
    상기 MVD의 제1 방향 성분의 절대 값을 나타내는 제1 MVD 크기 정보를 인코딩하는 단계와, Encoding first MVD size information indicating an absolute value of a first direction component of the MVD;
    상기 MVD의 제2 방향 성분이 상기 제1 기준 값보다 큰지 여부를 지시하는 제2 성분 플래그를 인코딩하는 단계와,Encoding a second component flag indicating whether the second direction component of the MVD is greater than the first reference value;
    상기 제2 성분 플래그에 기반하여 상기 MVD의 제2 방향 성분이 제2 기준 값보다 큰지 여부를 지시하는 제4 성분 플래그를 인코딩하는 단계와, Encoding a fourth component flag indicating whether a second direction component of the MVD is greater than a second reference value based on the second component flag; and
    상기 제2 성분 플래그 및 상기 제4 성분 플래그에 기반하여 상기 MVD의 제2 성분의 절대 값 빼기 2를 나타내는 제2 MVD 크기 정보를 인코딩하는 단계를 포함하는 것을 특징으로 하는 디코딩 방법.And encoding second MVD size information indicating an absolute value minus 2 of the second component of the MVD based on the second component flag and the fourth component flag.
  12. 제11항에 있어서,The method of claim 11,
    상기 MVD 크기 정보는 2 이상의 차수를 갖는 지수 골롬(exponential Golomb) 파라미터에 기반하여 인코딩되는 것을 특징으로 하는 인코딩 방법.The encoding method, characterized in that the MVD size information is encoded based on an exponential Golomb parameter having an order of 2 or more.
  13. 인터 예측(inter prediction)을 위한 비디오 신호의 디코딩 장치로서, A video signal decoding apparatus for inter prediction, comprising:
    상기 비디오 신호를 저장하는 메모리와, A memory for storing the video signal;
    상기 메모리와 결합된 프로세서를 포함하고,Comprising a processor coupled with the memory,
    상기 프로세서는, The processor,
    현재 블록의 예측을 위한 MVD(motion vector difference)와 관련된 MVD 코딩 정보를 획득하고,Acquire MVD coding information related to motion vector difference (MVD) for prediction of the current block,
    상기 MVD 코딩 정보를 디코딩하도록 설정되고,It is set to decode the MVD coding information,
    상기 MVD 코딩 정보는, 상기 MVD가 제1 기준 값보다 큰지 여부를 지시하는 제1 플래그 정보를 포함하고, The MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value,
    상기 제1 플래그 정보는 상기 MVD의 제1 방향 성분이 상기 제1 기준 값 보다 큰지 여부를 지시하는 제1 성분 플래그 정보 및 상기 MVD의 제2 방향 성분이 상기 제1 기준 값보다 큰지 여부를 지시하는 제2 성분 플래그 정보를 포함하고,The first flag information includes first component flag information indicating whether a first direction component of the MVD is greater than the first reference value, and indicating whether a second direction component of the MVD is greater than the first reference value. Contains second component flag information,
    상기 제1 성분 플래그 정보와 상기 제2 성분 플래그 정보는 서로 다른 컨텍스트 모델에 기반하여 디코딩되는 것을 특징으로 하는 디코딩 장치.And the first component flag information and the second component flag information are decoded based on different context models.
  14. 인터 예측(inter prediction)을 위한 비디오 신호의 인코딩 장치로서, An apparatus for encoding a video signal for inter prediction, comprising:
    상기 비디오 신호를 저장하는 메모리와, A memory for storing the video signal;
    상기 메모리와 결합된 프로세서를 포함하고,Comprising a processor coupled with the memory,
    상기 프로세서는, The processor,
    움직임 예측에 기반하여 현재 블록의 움직임 벡터를 결정하고,Determine a motion vector of the current block based on motion prediction,
    상기 움직임 벡터에 기반하여 상기 현재 블록의 MVD(motion vector difference)를 결정하고,Determine a motion vector difference (MVD) of the current block based on the motion vector,
    상기 MVD와 관련된 MVD 코딩 정보를 인코딩하도록 설정되고,It is set to encode MVD coding information related to the MVD,
    상기 MVD 코딩 정보는, 상기 MVD가 제1 기준 값보다 큰지 여부를 지시하는 제1 플래그 정보를 포함하고, The MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value,
    상기 제1 플래그 정보는 상기 MVD의 제1 방향 성분이 상기 제1 기준 값 보다 큰지 여부를 지시하는 제1 성분 플래그 정보 및 상기 MVD의 제2 방향 성분이 상기 제1 기준 값보다 큰지 여부를 지시하는 제2 성분 플래그 정보를 포함하고,The first flag information includes first component flag information indicating whether a first direction component of the MVD is greater than the first reference value, and indicating whether a second direction component of the MVD is greater than the first reference value. Contains second component flag information,
    상기 제1 성분 플래그 정보와 상기 제2 성분 플래그 정보는 서로 다른 컨텍스트 모델에 기반하여 인코딩되는 것을 특징으로 하는 인코딩 장치.The encoding apparatus, wherein the first component flag information and the second component flag information are encoded based on different context models.
  15. 하나 또는 그 이상의 명령어들을 저장하는 비일시적 컴퓨터 판독가능한 매체(non-transitory computer-readable medium)로서, 하나 또는 그 이상의 프로세서들에 의해 실행되는 상기 하나 또는 그 이상의 명령어들은, 비디오 신호 처리 장치로 하여금,As a non-transitory computer-readable medium that stores one or more instructions, the one or more instructions executed by one or more processors may cause a video signal processing apparatus to:
    현재 블록의 예측을 위한 MVD(motion vector difference)와 관련된 MVD 코딩 정보를 획득하고,Acquire MVD coding information related to motion vector difference (MVD) for prediction of the current block,
    상기 MVD 코딩 정보를 디코딩하도록 제어하고,Control to decode the MVD coding information,
    상기 MVD 코딩 정보는, 상기 MVD가 제1 기준 값보다 큰지 여부를 지시하는 제1 플래그 정보를 포함하고, The MVD coding information includes first flag information indicating whether the MVD is greater than a first reference value,
    상기 제1 플래그 정보는 상기 MVD의 제1 방향 성분이 상기 제1 기준 값 보다 큰지 여부를 지시하는 제1 성분 플래그 정보 및 상기 MVD의 제2 방향 성분이 상기 제1 기준 값보다 큰지 여부를 지시하는 제2 성분 플래그 정보를 포함하고,The first flag information includes first component flag information indicating whether a first direction component of the MVD is greater than the first reference value, and indicating whether a second direction component of the MVD is greater than the first reference value. Contains second component flag information,
    상기 제1 성분 플래그 정보와 상기 제2 성분 플래그 정보는 서로 다른 컨텍스트 모델에 기반하여 디코딩되는 것을 특징으로 하는 비일시적 컴퓨터 판독가능한 매체.The first component flag information and the second component flag information are decoded based on different context models.
PCT/KR2020/003185 2019-03-06 2020-03-06 Method and apparatus for processing video signal for inter prediction WO2020180153A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201962814848P 2019-03-06 2019-03-06
US62/814,848 2019-03-06

Publications (1)

Publication Number Publication Date
WO2020180153A1 true WO2020180153A1 (en) 2020-09-10

Family

ID=72337133

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2020/003185 WO2020180153A1 (en) 2019-03-06 2020-03-06 Method and apparatus for processing video signal for inter prediction

Country Status (1)

Country Link
WO (1) WO2020180153A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023061306A1 (en) * 2021-10-11 2023-04-20 Beijing Bytedance Network Technology Co., Ltd. Method, apparatus, and medium for video processing

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140034209A (en) * 2011-07-11 2014-03-19 파나소닉 주식회사 Image decoding method, image encoding method, image decoding apparatus, image encoding apparatus, and image encoding/decoding apparatus
JP5664762B2 (en) * 2011-03-17 2015-02-04 富士通株式会社 Moving picture decoding method, moving picture encoding method, moving picture decoding apparatus, and moving picture decoding program
JP2017055458A (en) * 2012-09-28 2017-03-16 シャープ株式会社 Image decoding device, image decoding method, image encoding device, and image encoding method
KR20180086522A (en) * 2011-06-16 2018-07-31 지이 비디오 컴프레션, 엘엘씨 Context initialization in entropy coding
KR20180116257A (en) * 2016-02-20 2018-10-24 퀄컴 인코포레이티드 Weighted prediction for screen content coding and multi-layer coding

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5664762B2 (en) * 2011-03-17 2015-02-04 富士通株式会社 Moving picture decoding method, moving picture encoding method, moving picture decoding apparatus, and moving picture decoding program
KR20180086522A (en) * 2011-06-16 2018-07-31 지이 비디오 컴프레션, 엘엘씨 Context initialization in entropy coding
KR20140034209A (en) * 2011-07-11 2014-03-19 파나소닉 주식회사 Image decoding method, image encoding method, image decoding apparatus, image encoding apparatus, and image encoding/decoding apparatus
JP2017055458A (en) * 2012-09-28 2017-03-16 シャープ株式会社 Image decoding device, image decoding method, image encoding device, and image encoding method
KR20180116257A (en) * 2016-02-20 2018-10-24 퀄컴 인코포레이티드 Weighted prediction for screen content coding and multi-layer coding

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023061306A1 (en) * 2021-10-11 2023-04-20 Beijing Bytedance Network Technology Co., Ltd. Method, apparatus, and medium for video processing

Similar Documents

Publication Publication Date Title
WO2020180155A1 (en) Method and apparatus for processing video signal
WO2020171444A1 (en) Dmvr-based inter-prediction method and device
WO2020180129A1 (en) Method and device for processing video signal for inter-prediction
WO2020141911A1 (en) Device and method for processing video signal by using inter prediction
WO2020184952A1 (en) Video signal processing method and device for processing motion vector difference information for inter prediction in video signal
WO2020251330A1 (en) Image encoding/decoding method and device for utilizing simplified mpm list generation method, and method for transmitting bitstream
WO2019194514A1 (en) Image processing method based on inter prediction mode, and device therefor
WO2020184964A1 (en) Method and apparatus for video signal processing for inter prediction
WO2020251329A1 (en) Image encoding/decoding method and device having simplified mip mode mapping, and method for transmitting bitstream
WO2021040410A1 (en) Method for decoding video for residual coding and device therefor
WO2021006579A1 (en) Video encoding/decoding method and device for deriving weight index for bidirectional prediction of merge candidate, and method for transmitting bitstream
WO2020251328A1 (en) Image encoding/decoding method and device based on intra prediction mode conversion, and method for transmitting bitstream
WO2021172914A1 (en) Image decoding method for residual coding and device for same
WO2020184958A1 (en) Method and device for processing video signal for inter prediction
WO2021060834A1 (en) Method and device for subpicture-based image encoding/decoding, and method for transmitting bitstream
WO2020262962A1 (en) Method and apparatus for encoding/decoding video using maximum size limitation of chroma transform block, and method for transmitting bitstream
WO2021006697A1 (en) Image decoding method for residual coding and apparatus therefor
WO2021006698A1 (en) Image coding method and device in image coding system
WO2020180153A1 (en) Method and apparatus for processing video signal for inter prediction
WO2020256485A1 (en) Image encoding/decoding method and device using adaptive size limiting of chroma block and bitstream transmission method
WO2021182816A1 (en) Image encoding/decoding method and apparatus for selectively encoding size information of rectangular slice, and method for transmitting bitstream
WO2021172907A1 (en) Image decoding method and apparatus therefor
WO2021172916A1 (en) Image decoding method and apparatus therefor
WO2020256486A1 (en) Image encoding and decoding method and device for limiting partition condition of chroma block, and method for transmitting bitstream
WO2020256488A1 (en) Image encoding/decoding method and apparatus for limiting size of chroma block, and method for transmitting bitstream

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20766013

Country of ref document: EP

Kind code of ref document: A1