[go: up one dir, main page]

WO2017043734A1 - Method for processing image on basis of inter prediction mode and device therefor - Google Patents

Method for processing image on basis of inter prediction mode and device therefor Download PDF

Info

Publication number
WO2017043734A1
WO2017043734A1 PCT/KR2016/005727 KR2016005727W WO2017043734A1 WO 2017043734 A1 WO2017043734 A1 WO 2017043734A1 KR 2016005727 W KR2016005727 W KR 2016005727W WO 2017043734 A1 WO2017043734 A1 WO 2017043734A1
Authority
WO
WIPO (PCT)
Prior art keywords
motion information
block
candidate list
information candidate
list
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/KR2016/005727
Other languages
French (fr)
Korean (ko)
Inventor
서정동
임재현
박내리
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
LG Electronics Inc
Original Assignee
LG Electronics Inc
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 LG Electronics Inc filed Critical LG Electronics Inc
Publication of WO2017043734A1 publication Critical patent/WO2017043734A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/109Selection of coding mode or of prediction mode among a plurality of temporal predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • H04N19/139Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors

Definitions

  • the present invention relates to a still image or moving image processing method, and more particularly, to a method for encoding / decoding a still image or moving image based on an inter prediction mode and an apparatus supporting the same.
  • Compression coding refers to a series of signal processing techniques for transmitting digitized information through a communication line or for storing in a form suitable for a storage medium.
  • Media such as an image, an image, an audio, and the like may be a target of compression encoding.
  • a technique of performing compression encoding on an image is called video image compression.
  • Next-generation video content will be characterized by high spatial resolution, high frame rate and high dimensionality of scene representation. Processing such content would result in a tremendous increase in terms of memory storage, memory access rate, and processing power.
  • the present invention proposes a method for efficiently encoding motion information by constructing a list in consideration of the frequency of the motion information generated in each item of the motion information list around the current block.
  • the present invention proposes a method of considering long term motion information when listing surrounding motion information.
  • An aspect of the present invention is a method for processing an image based on inter prediction, comprising: a spatial motion information candidate derived from a block spatially neighboring a current block and a block temporally neighboring the current block Constructing the motion information candidate list by adding the derived temporal motion information candidate to the motion information candidate list of the current block in a predetermined order, from the motion information candidate selected from the motion information candidates added to the motion information candidate list; Deriving motion information of a current block and generating a prediction block of the current block by using motion information of the current block, wherein the motion information candidate is added to the motion information candidate list according to a frequency of occurrence of the motion information candidate added to the motion information candidate list. Sequence of motion information candidates Can be aligned.
  • An aspect of the present invention is an apparatus for processing an image based on inter prediction, comprising: a spatial motion information candidate derived from a block spatially neighboring a current block and a block temporally neighboring the current block A motion information candidate list constructing unit constituting the motion information candidate list by adding the derived temporal motion information candidates to the motion information candidate list of the current block in a predetermined order, and selecting among motion information candidates added to the motion information candidate list A motion information derivation unit for deriving motion information of the current block from a motion information candidate; and a prediction block generator for generating a prediction block of the current block by using motion information of the current block, and adding to the motion information candidate list.
  • the motion information candidates may be ordered according to the frequency of occurrence of beams.
  • only the order of motion information candidates in which the difference in frequency of occurrence is greater than or equal to a predetermined level may be changed.
  • a block that is spatially neighboring to the left of the current block a block that is spatially neighboring to the upper left of the current block, a block that is spatially neighboring to the upper right of the current block, and spatially neighboring to the lower left of the current block
  • the motion information candidate may be derived in the order of a block and a block temporally neighboring the current block.
  • motion information candidates are alternately derived from a block adjacent to the left side of the current block and a block adjacent to the top of the current block, the block next to the left side of the left side of the current block.
  • the motion information candidate may be derived in the order of a block adjacent to the upper right end of the current block, a block adjacent to the lower left end of the current block, and a block temporally adjacent to the current block.
  • the motion information candidate list may be sorted.
  • a candidate may be added to the motion information candidate list.
  • a zero motion vector may be added to the motion information candidate list.
  • the long-term motion information candidate selected from the long-term motion information list including motion information of a block spaced apart from the current block by a predetermined number of blocks or more and / or global motion information of a picture to which the current block belongs.
  • the information may be added to the candidate list.
  • the long-term motion information candidate may be added to the motion information candidate list.
  • the long-term motion information candidate when the long-term motion information candidate is added to the motion information candidate list, the long-term motion information candidate may be added so as not to overlap with the motion information candidate added to the motion information candidate list.
  • the motion information when motion information is inserted into the long-term motion list, the motion information may be inserted into the highest item of the long-term motion list.
  • the first motion information when the first motion information is inserted in the long-term motion list, if second motion information identical to the first motion information exists in the long-term motion list, the second motion information is deleted and the first motion is deleted. Information may be inserted at the top of the long-term movement list.
  • the global motion information is a mean of absolute difference between the current picture and the reference picture from a top-left pixel of the current picture before moving when the current picture is moved with respect to a reference picture. Or a difference between the top-left pixel and the direction of the current picture at a location that minimizes Mean of Squared Error (MSE).
  • MSE Mean of Squared Error
  • motion information having the highest frequency in the picture to which the current block belongs in the long-term motion information list may be added to the motion information candidate list.
  • a probability model is reflected when encoding a list index selected from a motion information list, thereby improving encoding efficiency.
  • the non-overlapping peripheral motion information can be used in various ways for higher coding efficiency, encoding performance can be improved.
  • various motion information can be applied to the motion information list, thereby improving the accuracy of inter prediction.
  • FIG. 1 is a schematic block diagram of an encoder in which encoding of a still image or video signal is performed according to an embodiment to which the present invention is applied.
  • FIG. 2 is a schematic block diagram of a decoder in which encoding of a still image or video signal is performed according to an embodiment to which the present invention is applied.
  • FIG. 3 is a diagram for describing a division structure of a coding unit that may be applied to the present invention.
  • FIG. 4 is a diagram for describing a prediction unit that may be applied to the present invention.
  • FIG. 5 is a diagram illustrating a direction of inter prediction as an embodiment to which the present invention may be applied.
  • FIG 6 illustrates integer and fractional sample positions for quarter sample interpolation, as an embodiment to which the present invention may be applied.
  • FIG. 7 illustrates a position of a spatial candidate as an embodiment to which the present invention may be applied.
  • FIG. 8 is a diagram illustrating an inter prediction method as an embodiment to which the present invention is applied.
  • FIG. 9 is a diagram illustrating a motion compensation process as an embodiment to which the present invention may be applied.
  • FIG. 10 is a diagram illustrating a process of constructing a merge candidate list.
  • FIG. 11 illustrates an example of a configuration of a motion information candidate list according to an embodiment of the present invention.
  • FIG. 12 is a diagram illustrating a method of sorting a motion information candidate list according to an embodiment of the present invention.
  • FIG. 13 is a diagram illustrating a method of sorting a motion information candidate list according to an embodiment of the present invention.
  • FIG. 14 is a diagram illustrating a method of constructing a motion information candidate list according to an embodiment of the present invention.
  • FIG. 15 is a diagram illustrating a spatial / temporal neighbor block that can be referred to to generate a motion information candidate list according to an embodiment of the present invention.
  • 16 is a diagram illustrating a spatial neighboring block that can be referred to for generating a motion information candidate list according to an embodiment of the present invention.
  • 17 is a diagram illustrating a method of constructing a motion information candidate list according to an embodiment of the present invention.
  • FIG. 18 is a diagram illustrating a method of constructing a motion information candidate list according to an embodiment of the present invention.
  • FIG. 19 illustrates a method of constructing a motion information candidate list using long-term motion information according to an embodiment of the present invention.
  • 20 illustrates global motion information of a picture as long-term motion information according to an embodiment of the present invention.
  • 21 illustrates a method of deriving global motion information of a picture as long-term motion information according to an embodiment of the present invention.
  • FIG. 22 illustrates a method of constructing a motion information candidate list using long-term motion information according to an embodiment of the present invention.
  • FIG. 23 is a diagram illustrating an inter prediction based image processing method according to an embodiment of the present invention.
  • 24 is a diagram illustrating an inter predictor according to an embodiment of the present invention.
  • a 'processing unit' refers to a unit in which an encoding / decoding process such as prediction, transformation, and / or quantization is performed.
  • a processing unit may be referred to as a 'processing block' or 'block'.
  • the processing unit may be interpreted to include a unit for a luma component and a unit for a chroma component.
  • the processing unit may correspond to a Coding Tree Unit (CTU), a Coding Unit (CU), a Prediction Unit (PU), or a Transform Unit (TU).
  • CTU Coding Tree Unit
  • CU Coding Unit
  • PU Prediction Unit
  • TU Transform Unit
  • the processing unit may be interpreted as a unit for a luma component or a unit for a chroma component.
  • the processing unit may be a coding tree block (CTB), a coding block (CB), a prediction block (PU), or a transform block (TB) for a luma component. May correspond to. Or, it may correspond to a coding tree block (CTB), a coding block (CB), a prediction block (PU), or a transform block (TB) for a chroma component.
  • CTB coding tree block
  • CB coding block
  • PU prediction block
  • TB transform block
  • the present invention is not limited thereto, and the processing unit may be interpreted to include a unit for a luminance component and a unit for a chroma component.
  • processing unit is not necessarily limited to a square block, but may also be configured in a polygonal form having three or more vertices.
  • FIG. 1 is a schematic block diagram of an encoder in which encoding of a still image or video signal is performed according to an embodiment to which the present invention is applied.
  • the encoder 100 may include an image divider 110, a subtractor 115, a transform unit 120, a quantizer 130, an inverse quantizer 140, an inverse transform unit 150, and a filtering unit. 160, a decoded picture buffer (DPB) 170, a predictor 180, and an entropy encoder 190.
  • the predictor 180 may include an inter predictor 181 and an intra predictor 182.
  • the image divider 110 divides an input video signal (or a picture or a frame) input to the encoder 100 into one or more processing units.
  • the subtractor 115 subtracts the difference from the prediction signal (or prediction block) output from the prediction unit 180 (that is, the inter prediction unit 181 or the intra prediction unit 182) in the input image signal. Generate a residual signal (or difference block). The generated difference signal (or difference block) is transmitted to the converter 120.
  • the transform unit 120 may convert a differential signal (or a differential block) into a transform scheme (eg, a discrete cosine transform (DCT), a discrete sine transform (DST), a graph-based transform (GBT), and a karhunen-loeve transform (KLT)). Etc.) to generate transform coefficients.
  • a transform scheme eg, a discrete cosine transform (DCT), a discrete sine transform (DST), a graph-based transform (GBT), and a karhunen-loeve transform (KLT)
  • the quantization unit 130 quantizes the transform coefficients and transmits the transform coefficients to the entropy encoding unit 190, and the entropy encoding unit 190 entropy codes the quantized signals and outputs them as bit streams.
  • the quantized signal output from the quantization unit 130 may be used to generate a prediction signal.
  • the quantized signal may recover the differential signal by applying inverse quantization and inverse transformation through an inverse quantization unit 140 and an inverse transformation unit 150 in a loop.
  • a reconstructed signal may be generated by adding the reconstructed difference signal to a prediction signal output from the inter predictor 181 or the intra predictor 182.
  • the filtering unit 160 applies filtering to the reconstruction signal and outputs it to the reproduction apparatus or transmits the decoded picture buffer to the decoding picture buffer 170.
  • the filtered signal transmitted to the decoded picture buffer 170 may be used as the reference picture in the inter prediction unit 181. As such, by using the filtered picture as a reference picture in the inter prediction mode, not only image quality but also encoding efficiency may be improved.
  • the decoded picture buffer 170 may store the filtered picture for use as a reference picture in the inter prediction unit 181.
  • the inter prediction unit 181 performs temporal prediction and / or spatial prediction to remove temporal redundancy and / or spatial redundancy with reference to a reconstructed picture.
  • the reference picture used to perform the prediction is a transformed signal that has been quantized and dequantized in units of blocks at the time of encoding / decoding in the previous time, blocking artifacts or ringing artifacts may exist. have.
  • the inter prediction unit 181 may interpolate the signals between pixels in sub-pixel units by applying a lowpass filter to solve performance degradation due to discontinuity or quantization of such signals.
  • the sub-pixels mean virtual pixels generated by applying an interpolation filter
  • the integer pixels mean actual pixels existing in the reconstructed picture.
  • the interpolation method linear interpolation, bi-linear interpolation, wiener filter, or the like may be applied.
  • the interpolation filter may be applied to a reconstructed picture to improve the precision of prediction.
  • the inter prediction unit 181 generates an interpolation pixel by applying an interpolation filter to integer pixels, and uses an interpolated block composed of interpolated pixels as a prediction block. You can make predictions.
  • the intra predictor 182 predicts the current block by referring to samples in the vicinity of the block to which the current encoding is to be performed.
  • the intra prediction unit 182 may perform the following process to perform intra prediction. First, reference samples necessary for generating a prediction signal may be prepared. The prediction signal may be generated using the prepared reference sample. Then, the prediction mode is encoded. In this case, the reference sample may be prepared through reference sample padding and / or reference sample filtering. Since the reference sample has been predicted and reconstructed, there may be a quantization error. Accordingly, the reference sample filtering process may be performed for each prediction mode used for intra prediction to reduce such an error.
  • the prediction signal (or prediction block) generated by the inter prediction unit 181 or the intra prediction unit 182 is used to generate a reconstruction signal (or reconstruction block) or a differential signal (or differential block). It can be used to generate.
  • FIG. 2 is a schematic block diagram of a decoder in which encoding of a still image or video signal is performed according to an embodiment to which the present invention is applied.
  • the decoder 200 includes an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an adder 235, a filtering unit 240, and a decoded picture buffer (DPB).
  • Buffer Unit (250) the prediction unit 260 may be configured.
  • the predictor 260 may include an inter predictor 261 and an intra predictor 262.
  • the reconstructed video signal output through the decoder 200 may be reproduced through the reproducing apparatus.
  • the decoder 200 receives a signal (ie, a bit stream) output from the encoder 100 of FIG. 1, and the received signal is entropy decoded through the entropy decoding unit 210.
  • the inverse quantization unit 220 obtains a transform coefficient from the entropy decoded signal using the quantization step size information.
  • the inverse transform unit 230 applies an inverse transform scheme to inverse transform the transform coefficients to obtain a residual signal (or a differential block).
  • the adder 235 outputs the obtained difference signal (or difference block) from the prediction unit 260 (that is, the prediction signal (or prediction block) output from the inter prediction unit 261 or the intra prediction unit 262. ) Generates a reconstructed signal (or a reconstruction block).
  • the filtering unit 240 applies filtering to the reconstructed signal (or the reconstructed block) and outputs the filtering to the reproduction device or transmits the decoded picture buffer unit 250 to the reproduction device.
  • the filtered signal transmitted to the decoded picture buffer unit 250 may be used as a reference picture in the inter predictor 261.
  • the embodiments described by the filtering unit 160, the inter prediction unit 181, and the intra prediction unit 182 of the encoder 100 are respectively the filtering unit 240, the inter prediction unit 261, and the decoder of the decoder. The same may be applied to the intra predictor 262.
  • a still image or video compression technique uses a block-based image compression method.
  • the block-based image compression method is a method of processing an image by dividing the image into specific block units, and may reduce memory usage and calculation amount.
  • FIG. 3 is a diagram for describing a division structure of a coding unit that may be applied to the present invention.
  • the encoder splits one image (or picture) into coding units of a coding tree unit (CTU) in a rectangular shape.
  • CTU coding tree unit
  • one CTU is sequentially encoded according to a raster scan order.
  • the size of the CTU may be set to any one of 64 ⁇ 64, 32 ⁇ 32, and 16 ⁇ 16.
  • the encoder may select and use the size of the CTU according to the resolution of the input video or the characteristics of the input video.
  • the CTU includes a coding tree block (CTB) for luma components and a CTB for two chroma components corresponding thereto.
  • CTB coding tree block
  • One CTU may be divided into a quad-tree structure. That is, one CTU has a square shape and is divided into four units having a half horizontal size and a half vertical size to generate a coding unit (CU). have. This partitioning of the quad-tree structure can be performed recursively. That is, a CU is hierarchically divided into quad-tree structures from one CTU.
  • CU coding unit
  • the CU refers to a basic unit of coding in which an input image is processed, for example, intra / inter prediction is performed.
  • the CU includes a coding block (CB) for a luma component and a CB for two chroma components corresponding thereto.
  • CB coding block
  • the size of a CU may be set to any one of 64 ⁇ 64, 32 ⁇ 32, 16 ⁇ 16, and 8 ⁇ 8.
  • the root node of the quad-tree is associated with the CTU.
  • the quad-tree is split until it reaches a leaf node, which corresponds to a CU.
  • the CTU may not be divided according to the characteristics of the input image.
  • the CTU corresponds to a CU.
  • a node that is no longer divided ie, a leaf node
  • CU a node that is no longer divided
  • CU a node that is no longer divided
  • CU a node corresponding to nodes a, b, and j are divided once in the CTU and have a depth of one.
  • a node (ie, a leaf node) that is no longer divided in a lower node having a depth of 2 corresponds to a CU.
  • CU (c), CU (h) and CU (i) corresponding to nodes c, h and i are divided twice in the CTU and have a depth of two.
  • a node that is no longer partitioned (ie, a leaf node) in a lower node having a depth of 3 corresponds to a CU.
  • CU (d), CU (e), CU (f), and CU (g) corresponding to nodes d, e, f, and g are divided three times in the CTU, Has depth.
  • the maximum size or the minimum size of the CU may be determined according to characteristics (eg, resolution) of the video image or in consideration of encoding efficiency. Information about this or information capable of deriving the information may be included in the bitstream.
  • a CU having a maximum size may be referred to as a largest coding unit (LCU), and a CU having a minimum size may be referred to as a smallest coding unit (SCU).
  • LCU largest coding unit
  • SCU smallest coding unit
  • a CU having a tree structure may be hierarchically divided with predetermined maximum depth information (or maximum level information).
  • Each partitioned CU may have depth information. Since the depth information indicates the number and / or degree of division of the CU, the depth information may include information about the size of the CU.
  • the size of the SCU can be obtained by using the size and maximum depth information of the LCU. Or conversely, using the size of the SCU and the maximum depth information of the tree, the size of the LCU can be obtained.
  • information indicating whether the corresponding CU is split may be transmitted to the decoder.
  • This split mode is included in all CUs except the SCU. For example, if the flag indicating whether to split or not is '1', the CU is divided into 4 CUs again. If the flag indicating whether to split or not is '0', the CU is not divided further. Processing may be performed.
  • a CU is a basic unit of coding in which intra prediction or inter prediction is performed.
  • HEVC divides a CU into prediction units (PUs) in order to code an input image more effectively.
  • the PU is a basic unit for generating a prediction block, and may generate different prediction blocks in PU units within one CU. However, PUs belonging to one CU are not mixed with intra prediction and inter prediction, and PUs belonging to one CU are coded by the same prediction method (ie, intra prediction or inter prediction).
  • the PU is not divided into quad-tree structures, but is divided once in a predetermined form in one CU. This will be described with reference to the drawings below.
  • FIG. 4 is a diagram for describing a prediction unit that may be applied to the present invention.
  • the PU is divided differently according to whether an intra prediction mode or an inter prediction mode is used as a coding mode of a CU to which the PU belongs.
  • FIG. 4A illustrates a PU when an intra prediction mode is used
  • FIG. 4B illustrates a PU when an inter prediction mode is used.
  • N ⁇ N type PU when divided into N ⁇ N type PU, one CU is divided into four PUs, and different prediction blocks are generated for each PU unit.
  • the division of the PU may be performed only when the size of the CB for the luminance component of the CU is the minimum size (that is, the CU is the SCU).
  • one CU has 8 PU types (ie, 2N ⁇ 2N). , N ⁇ N, 2N ⁇ N, N ⁇ 2N, nL ⁇ 2N, nR ⁇ 2N, 2N ⁇ nU, 2N ⁇ nD).
  • PU partitioning in the form of N ⁇ N may be performed only when the size of the CB for the luminance component of the CU is the minimum size (that is, the CU is the SCU).
  • AMP Asymmetric Motion Partition
  • 'n' means a 1/4 value of 2N.
  • AMP cannot be used when the CU to which the PU belongs is a CU of the minimum size.
  • an optimal partitioning structure of a coding unit (CU), a prediction unit (PU), and a transformation unit (TU) is performed through the following process to achieve the minimum rate-distortion. It can be determined based on the value. For example, looking at the optimal CU partitioning process in 64 ⁇ 64 CTU, rate-distortion cost can be calculated while partitioning from a 64 ⁇ 64 CU to an 8 ⁇ 8 CU.
  • the specific process is as follows.
  • the partition structure of the optimal PU and TU that generates the minimum rate-distortion value is determined by performing inter / intra prediction, transform / quantization, inverse quantization / inverse transform, and entropy encoding for a 64 ⁇ 64 CU.
  • the 32 ⁇ 32 CU is subdivided into four 16 ⁇ 16 CUs, and a partition structure of an optimal PU and TU that generates a minimum rate-distortion value for each 16 ⁇ 16 CU is determined.
  • 16 ⁇ 16 blocks by comparing the sum of the rate-distortion values of the 16 ⁇ 16 CUs calculated in 3) above with the rate-distortion values of the four 8 ⁇ 8 CUs calculated in 4) above. Determine the partition structure of the optimal CU within. This process is similarly performed for the remaining three 16 ⁇ 16 CUs.
  • a prediction mode is selected in units of PUs, and prediction and reconstruction are performed in units of actual TUs for the selected prediction mode.
  • the TU means a basic unit in which actual prediction and reconstruction are performed.
  • the TU includes a transform block (TB) for a luma component and a TB for two chroma components corresponding thereto.
  • TB transform block
  • the TUs are hierarchically divided into quad-tree structures from one CU to be coded.
  • the TU divided from the CU can be further divided into smaller lower TUs.
  • the size of the TU may be set to any one of 32 ⁇ 32, 16 ⁇ 16, 8 ⁇ 8, and 4 ⁇ 4.
  • a root node of the quad-tree is associated with a CU.
  • the quad-tree is split until it reaches a leaf node, which corresponds to a TU.
  • the CU may not be divided according to the characteristics of the input image.
  • the CU corresponds to a TU.
  • a node ie, a leaf node
  • TU (a), TU (b), and TU (j) corresponding to nodes a, b, and j are divided once in a CU and have a depth of 1.
  • FIG. 3B TU (a), TU (b), and TU (j) corresponding to nodes a, b, and j are divided once in a CU and have a depth of 1.
  • a node (ie, a leaf node) that is no longer divided in a lower node having a depth of 2 corresponds to a TU.
  • TU (c), TU (h), and TU (i) corresponding to nodes c, h, and i are divided twice in a CU and have a depth of two.
  • a node that is no longer partitioned (ie, a leaf node) in a lower node having a depth of 3 corresponds to a CU.
  • TU (d), TU (e), TU (f), and TU (g) corresponding to nodes d, e, f, and g are divided three times in a CU. Has depth.
  • a TU having a tree structure may be hierarchically divided with predetermined maximum depth information (or maximum level information). Each divided TU may have depth information. Since the depth information indicates the number and / or degree of division of the TU, it may include information about the size of the TU.
  • information indicating whether the corresponding TU is split may be delivered to the decoder.
  • This partitioning information is included in all TUs except the smallest TU. For example, if the value of the flag indicating whether to split is '1', the corresponding TU is divided into four TUs again. If the value of the flag indicating whether to split is '0', the corresponding TU is no longer divided.
  • the decoded portion of the current picture or other pictures containing the current processing unit may be used to restore the current processing unit in which decoding is performed.
  • Intra picture or I picture (slice) using only the current picture for reconstruction i.e. performing only intra-picture prediction, and picture (slice) using up to one motion vector and reference index to predict each unit
  • a picture using a predictive picture or P picture (slice), up to two motion vectors, and a reference index (slice) may be referred to as a bi-predictive picture or a B picture (slice).
  • Intra prediction means a prediction method that derives the current processing block from data elements (eg, sample values, etc.) of the same decoded picture (or slice). That is, a method of predicting pixel values of the current processing block by referring to reconstructed regions in the current picture.
  • data elements eg, sample values, etc.
  • Inter Inter prediction (or inter screen prediction)
  • Inter prediction means a prediction method of deriving a current processing block based on data elements (eg, sample values or motion vectors, etc.) of pictures other than the current picture. That is, a method of predicting pixel values of the current processing block by referring to reconstructed regions in other reconstructed pictures other than the current picture.
  • data elements eg, sample values or motion vectors, etc.
  • Inter prediction (or inter picture prediction) is a technique for removing redundancy existing between pictures, and is mostly performed through motion estimation and motion compensation.
  • FIG. 5 is a diagram illustrating a direction of inter prediction as an embodiment to which the present invention may be applied.
  • inter prediction includes uni-directional prediction that uses only one past picture or a future picture as a reference picture on a time axis with respect to one block, and bidirectional prediction that simultaneously refers to past and future pictures. Bi-directional prediction).
  • uni-directional prediction includes forward direction prediction using one reference picture displayed (or output) before the current picture in time and 1 displayed (or output) after the current picture in time. It can be divided into backward direction prediction using two reference pictures.
  • the motion parameter (or information) used to specify which reference region (or reference block) is used to predict the current block in the inter prediction process is an inter prediction mode (where
  • the inter prediction mode may indicate a reference direction (i.e., unidirectional or bidirectional) and a reference list (i.e., L0, L1 or bidirectional), a reference index (or reference picture index or reference list index), Contains motion vector information.
  • the motion vector information may include a motion vector, a motion vector prediction (MVP), or a motion vector difference (MVD).
  • the motion vector difference value means a difference value between the motion vector and the motion vector prediction value.
  • motion parameters for one direction are used. That is, one motion parameter may be needed to specify the reference region (or reference block).
  • Bidirectional prediction uses motion parameters for both directions.
  • up to two reference regions may be used.
  • the two reference regions may exist in the same reference picture or may exist in different pictures, respectively. That is, up to two motion parameters may be used in the bidirectional prediction scheme, and two motion vectors may have the same reference picture index or different reference picture indexes. In this case, all of the reference pictures may be displayed (or output) before or after the current picture in time.
  • the encoder performs motion estimation to find the reference region most similar to the current processing block from the reference pictures in the inter prediction process.
  • the encoder may provide a decoder with a motion parameter for the reference region.
  • the encoder / decoder may obtain a reference region of the current processing block using the motion parameter.
  • the reference region exists in a reference picture having the reference index.
  • the pixel value or interpolated value of the reference region specified by the motion vector may be used as a predictor of the current processing block. That is, using motion information, motion compensation is performed to predict an image of a current processing block from a previously decoded picture.
  • a method of acquiring a motion vector prediction value mvp using motion information of previously coded blocks and transmitting only a difference value mvd thereof may be used. That is, the decoder obtains a motion vector prediction value of the current processing block using motion information of other decoded blocks, and obtains a motion vector value for the current processing block using the difference value transmitted from the encoder. In obtaining the motion vector prediction value, the decoder may obtain various motion vector candidate values by using motion information of other blocks that are already decoded, and obtain one of them as the motion vector prediction value.
  • a set of previously decoded pictures are stored in a decoded picture buffer (DPB) for decoding the remaining pictures.
  • DPB decoded picture buffer
  • a reference picture refers to a picture including a sample that can be used for inter prediction in a decoding process of a next picture in decoding order.
  • a reference picture set refers to a set of reference pictures associated with a picture, and is composed of all pictures previously associated in decoding order.
  • the reference picture set may be used for inter prediction of an associated picture or a picture following an associated picture in decoding order. That is, reference pictures maintained in the decoded picture buffer DPB may be referred to as a reference picture set.
  • the encoder may provide the decoder with reference picture set information in a sequence parameter set (SPS) (ie, a syntax structure composed of syntax elements) or each slice header.
  • SPS sequence parameter set
  • a reference picture list refers to a list of reference pictures used for inter prediction of a P picture (or slice) or a B picture (or slice).
  • the reference picture list may be divided into two reference picture lists, and may be referred to as reference picture list 0 (or L0) and reference picture list 1 (or L1), respectively.
  • a reference picture belonging to reference picture list 0 may be referred to as reference picture 0 (or L0 reference picture)
  • a reference picture belonging to reference picture list 1 may be referred to as reference picture 1 (or L1 reference picture).
  • one reference picture list i.e., reference picture list 0
  • two reference picture lists i.e., reference Picture list 0 and reference picture list 1
  • Such information for distinguishing a reference picture list for each reference picture may be provided to the decoder through reference picture set information.
  • the decoder adds the reference picture to the reference picture list 0 or the reference picture list 1 based on the reference picture set information.
  • a reference picture index (or reference index) is used to identify any one specific reference picture in the reference picture list.
  • a sample of the prediction block for the inter predicted current processing block is obtained from the sample value of the corresponding reference region in the reference picture identified by the reference picture index.
  • the corresponding reference region in the reference picture represents the region of the position indicated by the horizontal component and the vertical component of the motion vector.
  • Fractional sample interpolation is used to generate predictive samples for noninteger sample coordinates, except when the motion vector has an integer value. For example, a motion vector of one quarter of the distance between samples may be supported.
  • fractional sample interpolation of luminance components applies an 8-tap filter in the horizontal and vertical directions, respectively.
  • fractional sample interpolation of the color difference component applies a 4-tap filter in the horizontal direction and the vertical direction, respectively.
  • FIG 6 illustrates integer and fractional sample positions for quarter sample interpolation, as an embodiment to which the present invention may be applied.
  • the shaded block in which the upper-case letter (A_i, j) is written indicates the integer sample position
  • the shaded block in which the lower-case letter (x_i, j) is written is the fractional sample position. Indicates.
  • Fractional samples are generated by applying interpolation filters to integer sample values in the horizontal and vertical directions, respectively.
  • an 8-tap filter may be applied to four integer sample values on the left side and four integer sample values on the right side based on the fractional sample to be generated.
  • a merge mode and advanced motion vector prediction may be used to reduce the amount of motion information.
  • Merge mode refers to a method of deriving a motion parameter (or information) from a neighboring block spatially or temporally.
  • the set of candidates available in merge mode is composed of spatial neighbor candidates, temporal candidates and generated candidates.
  • FIG. 7 illustrates a position of a spatial candidate as an embodiment to which the present invention may be applied.
  • each spatial candidate block is available according to the order of ⁇ A1, B1, B0, A0, B2 ⁇ . In this case, when the candidate block is encoded in the intra prediction mode and there is no motion information, or when the candidate block is located outside the current picture (or slice), the candidate block is not available.
  • the spatial merge candidate can be constructed by excluding unnecessary candidate blocks from candidate blocks of the current processing block. For example, when the candidate block of the current prediction block is the first prediction block in the same coding block, the candidate block having the same motion information may be excluded except for the corresponding candidate block.
  • the temporal merge candidate configuration process is performed in the order of ⁇ T0, T1 ⁇ .
  • the block when the right bottom block T0 of the collocated block of the reference picture is available, the block is configured as a temporal merge candidate.
  • the colocated block refers to a block existing at a position corresponding to the current processing block in the selected reference picture.
  • the block T1 located at the center of the collocated block is configured as a temporal merge candidate.
  • the maximum number of merge candidates may be specified in the slice header. If the number of merge candidates is larger than the maximum number, the number of spatial candidates and temporal candidates smaller than the maximum number is maintained. Otherwise, additional merge candidates (ie, combined bi-predictive merging candidates) are generated by combining the candidates added to date. Even if the merge candidate list is constructed using the combined bi-predictive merge candidates, if the number of merge candidates is still smaller than the maximum number, the number of merge candidates is zero movement while changing the reference picture index until the number of candidate candidates is the maximum number. Zero motion vector merging candidates are added to the merge candidate list.
  • the encoder constructs a merge candidate list in the above manner and performs motion estimation to merge candidate block information selected from the merge candidate list into a merge index (for example, merge_idx [x0] [y0] '). Signal to the decoder.
  • a merge index for example, merge_idx [x0] [y0] '.
  • the B1 block is selected from the merge candidate list.
  • “index 1” may be signaled to the decoder as a merge index.
  • the decoder constructs a merge candidate list similarly to the encoder, and derives the motion information of the current block from the motion information of the candidate block corresponding to the merge index received from the encoder in the merge candidate list.
  • the decoder generates a prediction block for the current processing block based on the derived motion information (ie, motion compensation).
  • the AMVP mode refers to a method of deriving a motion vector prediction value from neighboring blocks.
  • horizontal and vertical motion vector difference (MVD), reference index, and inter prediction modes are signaled to the decoder.
  • the horizontal and vertical motion vector values are calculated using the derived motion vector prediction value and the motion vector difference (MVD) provided from the encoder.
  • the encoder constructs a motion vector predictor candidate list and performs motion estimation to perform a motion estimation flag (ie, candidate block information) selected from the motion vector predictor candidate list (for example, mvp_lX_flag [x0] [y0). ] ') Is signaled to the decoder.
  • the decoder constructs a motion vector predictor candidate list similarly to the encoder, and derives a motion vector predictor of the current processing block using the motion information of the candidate block indicated by the motion reference flag received from the encoder in the motion vector predictor candidate list.
  • the decoder obtains a motion vector value for the current processing block by using the derived motion vector prediction value and the motion vector difference value transmitted from the encoder.
  • the decoder generates a prediction block for the current processing block based on the derived motion information (ie, motion compensation).
  • the first spatial motion candidate is selected from the set of ⁇ A0, A1 ⁇ located on the left side
  • the second spatial motion candidate is selected from the set of ⁇ B0, B1, B2 ⁇ located above.
  • the candidate configuration is terminated, but if less than two, the temporal motion candidate is added.
  • FIG. 8 is a diagram illustrating an inter prediction method as an embodiment to which the present invention is applied.
  • a decoder decodes a motion parameter for a processing block (eg, a prediction unit) (S801).
  • the decoder may decode the merge index signaled from the encoder.
  • the motion parameter of the current processing block can be derived from the motion parameter of the candidate block indicated by the merge index.
  • the decoder may decode horizontal and vertical motion vector difference (MVD), reference index, and inter prediction mode signaled from the encoder.
  • the motion vector prediction value may be derived from the motion parameter of the candidate block indicated by the motion reference flag, and the motion vector value of the current processing block may be derived using the motion vector prediction value and the received motion vector difference value.
  • the decoder performs motion compensation on the prediction unit by using the decoded motion parameter (or information) (S802).
  • the encoder / decoder performs motion compensation that predicts an image of a current unit from a previously decoded picture by using the decoded motion parameter.
  • FIG. 9 is a diagram illustrating a motion compensation process as an embodiment to which the present invention may be applied.
  • FIG. 9 illustrates a case in which a motion parameter for a current block to be encoded in a current picture is unidirectional prediction, a second picture in LIST0, LIST0, and a motion vector (-a, b). do.
  • the current block is predicted using values of positions (ie, sample values of reference blocks) that are separated from the current block by (-a, b) in the second picture of LIST0.
  • another reference list (eg, LIST1), a reference index, and a motion vector difference value are transmitted so that the decoder derives two reference blocks and predicts the current block value based on the reference block.
  • the merge mode used in HEVC collects and lists neighboring (block) motion information of the current block to be encoded, selects one of them, and transmits only an index indicating the corresponding block.
  • the encoder / decoder includes five spatial peripheral motion information (A1, B1, B0, A0, B2), and two temporal peripheral motion information (T0, T1).
  • A1, B1, B0, A0, B2 the encoder / decoder includes five spatial peripheral motion information (A1, B1, B0, A0, B2), and two temporal peripheral motion information (T0, T1).
  • T0, T1 two temporal peripheral motion information
  • the duplicate candidate is checked while constructing the merge candidate list, and if duplicate motion information exists, the next candidate is considered as a list insertion target. This will be described with reference to the drawings below.
  • FIG. 10 is a diagram illustrating a process of constructing a merge candidate list.
  • the encoder / decoder selects up to four pieces of spatial peripheral motion information and adds them to the merge candidate list except for duplication (S1001).
  • the spatial peripheral motion information refers to the motion information of the A1, B1, B0, A0, and B2 blocks (ie, parts of the prediction unit) that are spatially neighbored to the current block in the example of FIG. 7.
  • the motion information of a block spatially neighboring the current block e.g., when a spatially neighboring block is encoded in intra prediction mode
  • the motion information of the neighboring block is searched along with the motion information of the previous neighboring block (ie, motion information added to the merge candidate list)
  • the motion information of the neighboring block is not added to the merge list.
  • the motion vector and the reference index are the same, it may be determined that the motion information is the same.
  • the encoder / decoder may add motion information of neighboring blocks available in the order of spatially neighboring A1, B1, B0, A0, and B2 (see FIG. 7) to the merge candidate list so as not to overlap.
  • motion information added to a merge candidate list from a spatially neighboring block may be referred to as a spatial merge candidate (or a spatial motion information candidate).
  • the encoder / decoder selects one of the temporal peripheral motion information except for duplication and adds it to the merge candidate list (S1002).
  • the temporal peripheral motion information refers to motion information of the T0 and T1 blocks (ie, parts of the prediction unit) that are temporally neighbored to the current block in the example of FIG. 7.
  • the motion information of the T0 block that is temporally neighbored to the current block may be added to the merge candidate list.
  • the motion information of the T0 block may be added to the merge candidate list.
  • the motion information of each neighboring block is the same as the motion information (ie, the motion information added to the merge candidate list) of the previous neighboring block, it may not be added to the merge candidate list.
  • the encoder / decoder may add motion information of neighboring blocks available in the order of neighboring T0 and T1 (see FIG. 7) to the merge candidate list so as not to overlap.
  • the motion information added to the merge candidate list from the temporal neighboring block may be referred to as a temporal merge candidate (or spatial motion information candidate).
  • the encoder / decoder determines whether there are five items (or items) in the merge candidate list (S1003). That is, it is determined whether the number of merge candidates added to the merge candidate list is five.
  • the encoder / decoder completes the merge candidate list construction.
  • the encoder / decoder combines all of the current merge candidates in the merge list (ie, spatial merge candidates and / or temporal merge candidates). (Ie, the combined bidirectional motion information candidates) are added to the merge candidate list (S1004).
  • the encoder / decoder determines whether there are five items (or items) in the merge candidate list (S1005). That is, it is determined whether the number of merge candidates added to the merge candidate list is five.
  • the encoder / decoder completes the merge candidate list construction.
  • the encoder / decoder adds non-scaled bidirectional prediction candidates (ie, non-scaled motion information candidates) to the merge candidate list (S1006).
  • the encoder / decoder determines whether there are five items (or items) in the merge candidate list (S1007). That is, it is determined whether the number of merge candidates added to the merge candidate list is five.
  • the encoder / decoder completes the merge candidate list construction.
  • the encoder / decoder adds a zero vector to the merge candidate list (S1008).
  • the encoder / decoder merges zero motion vector merging candidates (ie, zero motion vector candidates) while changing the reference picture index until the number of merge candidates reaches the maximum number of candidates.
  • step S1006 and S1007 are deleted, and if there are not five list items in step S1005, step S1008 may be performed.
  • the merge candidate list construction method described above is simple. High efficiency
  • the aforementioned order does not always match, and since the index of the merge mode is encoded by truncated rice code, it is optimal to construct the merge candidate list in the order of most likely candidates. Will be shown.
  • the present invention proposes a method of constructing a motion information candidate list of the current block.
  • the motion information candidate list is collectively referred to herein as a merge candidate list and a motion vector predictor candidate list.
  • the motion information may include a reference picture index and a motion vector indicating the reference picture.
  • it may further include an inter prediction mode and a motion vector prediction value indicating the direction of the reference picture.
  • a method for constructing a motion information list using a frequency of occurrence of a motion information candidate added to a motion information candidate list of a current block is proposed.
  • the method proposed in the present embodiment proceeds in the same manner as the motion information candidate list construction order described with reference to FIG. 10, but there is a difference in that the number of overlaps is recorded.
  • the subsequent procedure is not inserted into the motion information candidate list.
  • duplicated motion information that is, the motion information of the neighboring block is searched in a predetermined order while the motion information of the neighboring block is added to the previous neighboring block (ie, motion added to the motion information candidate list) Information
  • the frequency of occurrence is increased to the same existing motion information item (ie, motion information added to the motion information candidate list) and the subsequent procedure is performed. Will be performed.
  • the encoder / decoder may search for motion information of spatially neighboring blocks of the current prediction unit in the order of A1, B1, B0, A0, and B2 (see FIG. 7).
  • the encoder / decoder may add motion information of the A1 block to the motion information candidate list.
  • the motion information of the B1 block is the same as the motion information of A1
  • the frequency of the motion information (ie, duplicated motion information) of the already added A1 block is not added to the motion information candidate list without adding the motion information of the B1 block to the motion information candidate list. Increment frequency by 1 Thereafter, the same method may be applied to the motion information of other spatial / temporal neighboring blocks.
  • Block A1 is a block containing pixels having coordinates (x-1, y + H-1), and block B0 includes pixels having coordinates (x + W, y-1).
  • the block B1 may be a block including a pixel having coordinates (x + W-1, y-1), and the block B2 may represent a block including a pixel having coordinates (x-1, y-1).
  • the T0 block is a block including pixels having coordinates (x + W, y + H) in a picture different from the picture to which the current block belongs
  • the T1 block is a coordinate (x +) in a picture different from the picture to which the current block belongs.
  • a block including a pixel of W / 2, y + H / 2) may be represented.
  • the sequence of the spatial motion information candidate, the temporal motion information candidate, the combined bidirectional prediction candidate (ie, the combined motion information candidate), and the zero motion vector prediction candidate (ie, the zero motion information candidate) are shown. It can be added to the motion information candidate list.
  • the motion information candidate list may be configured using only some of the above four motion information candidates, or the motion information candidate list may be configured including other motion information. Also, the motion information candidate list may be configured in a different order from that in FIG.
  • the motion information candidate list can be sorted according to the frequency of occurrence of each motion information candidate. Accordingly, the motion information candidate close to the actual occurrence probability may be located above the motion information candidate list.
  • FIG. 11 illustrates an example of a configuration of a motion information candidate list according to an embodiment of the present invention.
  • FIG 11 shows an example of a motion information candidate list (eg, merge candidate list) generated through the present embodiment.
  • a motion information candidate list eg, merge candidate list
  • the motion information candidate list includes motion information of the A1 block, motion information of the B0 block, motion information of the B1 block, motion information of the T0 block, and combined motion information of the motion information candidate (ie, the merge candidate list). For example, an item added to a list is shown. In this case, it is assumed that the occurrence frequency of the motion information of the A1 block is three times, the occurrence frequency of the motion information of the B0 block is two times, and the occurrence frequency of the remaining motion information is one time.
  • the encoder / decoder may add motion information of neighboring blocks available in the order of spatially neighboring A1, B1, B0, A0, and B2 (see FIG. 7) to the merge candidate list so as not to overlap.
  • the motion information candidate list is located such that the motion information of the B0 block is located above the motion information candidate list than the motion information of the B1 block.
  • the items of (ie, motion information candidates) may be sorted.
  • list items ie, motion information candidates
  • the sorting may be performed only (ie, the order of motion information candidates) when the difference in the frequency of occurrence is more than a predetermined level. For example, assuming that a predetermined predetermined level is 2 in the example of FIG. 11, the order of the motion information of the B0 block and the motion information of the B1 block is not changed, and the motion information of the B1 block is the motion information candidate rather than the motion information of the B0 block. It can be located above the list.
  • FIG. 12 is a diagram illustrating a method of sorting a motion information candidate list according to an embodiment of the present invention.
  • the motion information candidate list is configured as shown in FIG. 12 (a).
  • the encoder / decoder may determine the position (or position) of each motion information candidate in the order from the top to the bottom in the motion information candidate list.
  • the position of each motion information candidate can be determined by comparing the occurrence frequency of each motion information candidate with the occurrence frequency of the motion information candidate located one step higher. In this case, when the position of the corresponding motion information candidate is changed, the position of the corresponding motion information candidate may be determined by comparing again with the occurrence frequency of the motion information candidate located one step higher than the changed position.
  • the encoder / decoder compares the occurrence frequency of the motion information candidate 2 with the occurrence frequency of the motion information candidate 1 located higher than itself, and if the occurrence frequency of the motion information candidate 2 is greater than the occurrence frequency of the motion information candidate 1, FIG. As shown in 12 (b), the position of the motion information candidate 2 may be replaced with the position of the motion information candidate 1.
  • the encoder / decoder compares the occurrence frequency of the motion information candidate 3 with the occurrence frequency of the motion information candidate 1 located one step higher than its current position, and the occurrence frequency of the motion information candidate 3 is equal to that of the motion information candidate 1. If it is larger than the occurrence frequency, the position of the motion information candidate 3 can be replaced with the position of the motion information candidate 1 as shown in FIG.
  • the encoder / decoder compares the occurrence frequency of the motion information candidate 3 with the occurrence frequency of the motion information candidate 2 located one step higher than the current position, and generates the motion information candidate 3. If the frequency is greater than the occurrence frequency of the motion information candidate 2, the position of the motion information candidate 3 can be replaced with the position of the motion information candidate 2 as shown in FIG.
  • the encoder / decoder compares the occurrence frequency of the motion information candidate 4 with the occurrence frequency of the motion information candidate 1 located above the current position, and the occurrence frequency of the motion information candidate 4 is greater than the occurrence frequency of the motion information candidate 1. Otherwise, the position of the motion information candidate 4 may not be changed.
  • the encoder / decoder compares the occurrence frequency of the motion information candidate 5 with the occurrence frequency of the motion information candidate 4 located above the current position, and if the occurrence frequency of the motion information candidate 5 is greater than the occurrence frequency of the motion information candidate 4 12, the position of the motion information candidate 5 may be replaced with the position of the motion information candidate 4. As shown in FIG.
  • the encoder / decoder compares the occurrence frequency of the motion information candidate 5 with the occurrence frequency of the motion information candidate 1 located one step higher than the current position, and generates the motion information candidate 5. If the frequency is greater than the occurrence frequency of the motion information candidate 1, the position of the motion information candidate 5 can be replaced with the position of the motion information candidate 1 as shown in FIG.
  • the encoder / decoder compares the occurrence frequency of the motion information candidate 5 with the occurrence frequency of the motion information candidate 2 located one step higher than the current position, If the occurrence frequency is not greater than the occurrence frequency of the motion information candidate 2, the position of the motion information candidate 5 may not be changed.
  • FIG. 13 is a diagram illustrating a method of sorting a motion information candidate list according to an embodiment of the present invention.
  • FIG. 13 it is assumed that the number of items (items) of the motion information candidate list is 5, and that the motion information candidate list is configured as shown in FIG. 13 (a).
  • the level for determining whether to change the position of the motion information candidate is' Assume that 2 'is predetermined.
  • the encoder / decoder compares the occurrence frequency of the motion information candidate 2 with the occurrence frequency of the motion information candidate 1 located higher than itself, and if the occurrence frequency of the motion information candidate 2 is two or more greater than the occurrence frequency of the motion information candidate 1 As shown in FIG. 13B, the position of the motion information candidate 2 may be replaced with the position of the motion information candidate 1.
  • the encoder / decoder compares the occurrence frequency of the motion information candidate 3 with the occurrence frequency of the motion information candidate 1 located one step higher than its current position, and the occurrence frequency of the motion information candidate 3 is equal to that of the motion information candidate 1. If the frequency is greater than 2, the position of the motion information candidate 3 can be replaced with the position of the motion information candidate 1 as shown in FIG.
  • the encoder / decoder compares the occurrence frequency of the motion information candidate 3 with the occurrence frequency of the motion information candidate 2 located one step higher than the current position, and generates the motion information candidate 3. If the frequency is not greater than two or more than the occurrence frequency of the motion information candidate 2, the position of the motion information candidate 3 may not be changed.
  • the encoder / decoder compares the occurrence frequency of the motion information candidate 4 with the occurrence frequency of the motion information candidate 1 located above the current position, and the occurrence frequency of the motion information candidate 4 is 2 higher than the occurrence frequency of the motion information candidate 1. If it is not large, the position of motion information candidate 4 may not be changed.
  • the encoder / decoder compares the occurrence frequency of the motion information candidate 5 with the occurrence frequency of the motion information candidate 4 located above the current position, and the occurrence frequency of the motion information candidate 5 is greater than the occurrence frequency of the motion information candidate 4. If it is not large, the position of the motion information candidate 5 may not be changed.
  • FIG. 14 is a diagram illustrating a method of constructing a motion information candidate list according to an embodiment of the present invention.
  • the total number of items (ie, motion information candidates) of the merge candidate list (ie, motion information candidate list) is 5, similar to FIG. 10, and is spatial in the merge candidate list. Up to four merge candidates may be added, and assuming that one merge candidate may be added.
  • the present invention is not limited thereto. That is, the present invention can be applied equally even if the number of items of the predefined motion information candidate list and the number of spatial motion information candidates and temporal motion information candidates included in the motion information candidate list are different from each other.
  • the encoder / decoder selects up to four of spatial peripheral motion information except for overlap and adds the merge candidate list to the merge candidate list, but increases the frequency in the case of duplication (S1401).
  • the spatial peripheral motion information may refer to motion information of blocks A1, B1, B0, A0, and B2 (that is, part of a prediction unit) that are spatially neighbored to the current block in the example of FIG. 7.
  • Motion information that is not available in the motion information of a block that is spatially neighboring to the current block may not be added to the merge list (eg, when the spatially neighboring block is encoded in the intra prediction mode).
  • motion information of a neighboring block currently being searched for is motion information of a previous neighboring block (ie, motion information added to a merge candidate list). If it is equal to and is not added to the merge list, the frequency of occurrence of motion information (ie, duplicate motion information) of a previous neighboring block may be increased by one. In this case, if the motion vector and the reference index are the same, it may be determined that the motion information is the same.
  • the encoder / decoder adds motion information of neighboring blocks available in the order of spatially neighboring A1, B1, B0, A0, and B2 blocks (see FIG. 7) to the merge candidate list so as not to overlap, but duplicate motion information. Is generated, the frequency of occurrence of duplication of the corresponding motion information may be increased by one.
  • the encoder / decoder selects one of the temporal peripheral motion information except for duplication and adds it to the merge candidate list, but increases the frequency in the case of duplication (S1402).
  • the temporal peripheral motion information may refer to motion information of the T0 and T1 blocks (ie, parts of the prediction unit) that are temporally neighbored to the current block in the example of FIG. 7.
  • the motion information of the T0 block that is temporally neighbored to the current block may be added to the merge candidate list.
  • the motion information of the T0 block may be added to the merge candidate list.
  • the motion information of the neighboring block currently being searched for is the same as the motion information or the spatial merge candidate of the previous neighboring block, the motion information of the previous neighboring block is not added to the merge candidate list, that is, the duplicated motion information.
  • the frequency of occurrence may be increased by one.
  • the encoder / decoder adds motion information of neighboring blocks available in the order of neighboring T0 and T1 (see FIG. 7) to the merge candidate list so as not to overlap, but duplicates the motion information when duplicate motion information is generated.
  • the frequency of occurrence can be increased by one.
  • the encoder / decoder determines whether there are five items (or items) in the merge candidate list (S1403). That is, it is determined whether the number of merge candidates added to the merge candidate list is five.
  • the encoder / decoder sorts the items in the merge candidate list based on the frequency (S1409).
  • merge candidates of the merge candidate list are sorted in ascending order, and merge candidates having the same occurrence frequency are arranged according to a predetermined merge candidate list construction order (i.e., search order of motion information of spatial / temporal neighboring blocks). Can be aligned.
  • a predetermined merge candidate list construction order i.e., search order of motion information of spatial / temporal neighboring blocks.
  • the merge candidate list may be sorted only when the difference in occurrence frequency is greater than or equal to a predetermined level.
  • the merge candidate list may be sorted according to the process of FIGS. 12 and / or 13.
  • step S1403 if it is determined in step S1403 that the merge candidate list has not five items (ie, if there are less than five), the encoder / decoder indicates that all current merge candidates (ie, spatial merge candidates and / or temporal merge candidates) in the merge list. ), The combined bidirectional prediction candidates (ie, the combined bidirectional motion information candidates) are added to the merge candidate list (S1404).
  • the encoder / decoder determines whether there are five items (or items) in the merge candidate list (S1405). That is, it is determined whether the number of merge candidates added to the merge candidate list is five.
  • the encoder / decoder sorts the items of the merge candidate list based on the frequency (S1409).
  • merge candidates of the merge candidate list are sorted in ascending order, and merge candidates having the same occurrence frequency are arranged in a predetermined merge candidate list structure (that is, motion information of spatial / temporal neighboring blocks and combined bidirectional prediction candidates). Search order).
  • the merge candidate list may be sorted only when the difference in occurrence frequency is greater than or equal to a predetermined level.
  • the merge candidate list may be sorted according to the process of FIGS. 12 and / or 13.
  • step S1405 determines whether there are not five items in the merge candidate list (that is, if there are less than five).
  • the non-scaled bidirectional prediction candidates that is, the non-scaled bidirectional motion information candidates.
  • the encoder / decoder determines whether there are five items (or items) in the merge candidate list (S1407). That is, it is determined whether the number of merge candidates added to the merge candidate list is five.
  • the encoder / decoder sorts the items of the merge candidate list based on the frequency (S1409).
  • merge candidates of the merge candidate list are sorted in ascending order, and merge candidates having the same occurrence frequency are arranged in a predetermined merge candidate list order (i.e., motion information of spatial / temporal neighboring blocks, combined bidirectional prediction candidates). And search order of non-scaled bidirectional prediction candidates).
  • the merge candidate list may be sorted only when the difference in occurrence frequency is greater than or equal to a predetermined level.
  • the merge candidate list may be sorted according to the process of FIGS. 12 and / or 13.
  • step S1407 if it is determined in step S1407 that the merge candidate list has not five items (i.e., less than five), the encoder / decoder inserts a zero vector (i.e., zero motion vector candidate) into the merge candidate list. It adds (S1408).
  • the encoder / decoder zero motion vector merge candidate (zero motion) while changing the reference picture index until the number of merge candidates added to the merge candidate list is a predetermined number (for example, five) of the merge candidate list. Add vector merging candidates to the merge candidate list.
  • the encoder / decoder sorts the items of the merge candidate list based on the frequency (S1409).
  • merge candidates of the merge candidate list are sorted in ascending order, and merge candidates having the same occurrence frequency are arranged in a predetermined merge candidate list order (i.e., motion information of spatial / temporal neighboring blocks, combined bidirectional prediction candidates). , Search order of non-scaled bidirectional prediction candidates, zero motion vector candidates).
  • the merge candidate list may be sorted only when the difference in occurrence frequency is greater than or equal to a predetermined level.
  • the merge candidate list may be sorted according to the process of FIGS. 12 and / or 13.
  • motion information ie, spatial motion information candidate, temporal motion information candidate, combined bidirectional prediction candidate, and non-scaled bidirectional prediction
  • the candidate, zero vector is just one example, and the search may be performed on only some of the motion information in the example of FIG. 14, or motion information not illustrated in FIG. 14 may be further searched.
  • step S1406 and S1407 are deleted, and if there are not five list items in step S1405, step S1408 may be performed.
  • the construction order of the motion information candidate list (ie, spatial motion information candidate, temporal motion information candidate, combined bidirectional prediction candidate, non-scaled bidirectional prediction candidate, and zero vector) is shown. Order) is just one example, and may proceed in a different predetermined order.
  • the above-described embodiment has described a case in which a motion information candidate list is generated while updating the frequency of occurrence of duplicated motion information only for positions of spatial / temporal neighboring blocks referred to in the existing merge candidate list generation process.
  • the invention is not limited thereto.
  • the present embodiment proposes a method of using spatial / temporal surrounding information of various positions to generate a neighboring motion list (ie, motion information candidate list) of the current block in consideration of the occurrence frequency. That is, in this embodiment, the occurrence frequency of the motion information may be checked using the motion information of various spatial / temporal neighboring blocks, and a motion information candidate list may be generated based on the occurrence frequency.
  • FIG. 15 is a diagram illustrating a spatial / temporal neighbor block that can be referred to to generate a motion information candidate list according to an embodiment of the present invention.
  • neighboring blocks adjacent to the left of the current block in space are referred to as L0, L1, ..., and blocks adjacent to the top of the current block in space are referred to as A0, A1, ....
  • a block adjacent to the upper left end of the current block is called AL
  • a block adjacent to the upper right end is referred to as AR
  • a block adjacent to the lower left end is referred to as BL.
  • T4 is the block corresponding to the upper left portion of the current block in another picture temporally
  • T3 is the upper left block at the position corresponding to the center of the current block in another picture temporally, and the center of the current block in another picture temporally.
  • T2 is the right bottom block at the position corresponding to T2
  • T1 is the block corresponding to the bottom right portion of the current block in another picture temporally
  • T0 is the block adjacent to the bottom right end of the block corresponding to the current block in another picture temporally. It is called.
  • each block may be represented as follows. .
  • the A0 block may be a block including a pixel having coordinates (x, y-1), and the A1 block may be a block including a pixel having coordinates (x + A0 width, y-1). Similarly, the A2 block may be a block including a pixel having (x + A0 width + A1 width, y-1).
  • the L0 block may be a block including pixels having coordinates (x-1, y), and the L1 block may be a block including pixels having coordinates (x-1, y + L0 heights). Similarly, the L2 block may be a block including a pixel of (x-1, y + L0 height + L1 height).
  • the AL block is a block containing pixels with coordinates (x-1, y-1)
  • the AR block is a block containing pixels with coordinates (x + W, y-1)
  • the BL block is a coordinate (x-1 , y + H).
  • the T0 block is a block including pixels having coordinates (x + W, y + H) in a picture different from the picture to which the current block belongs
  • the T1 block is a coordinate (x +) in a picture different from the picture to which the current block belongs.
  • W-1, y + H-1 the block T2 includes pixels having coordinates (x + W / 2, y + H / 2) in a picture different from the picture to which the current block belongs.
  • Block, and the T3 block is a block containing pixels with coordinates (x + W / 2-1, y + H / 2-1) within a picture different from the picture to which the current block belongs
  • the T4 block is a picture to which the current block belongs. It may be a block including a pixel having a coordinate (x, y) in a picture different from.
  • the encoder / decoder may generate a motion information candidate list of the current block by referring to motion information of a block (for example, a part of a prediction unit) corresponding to each position spatially and temporally.
  • the encoder / decoder may generate a motion information candidate list using the surrounding motion information that can be referenced in a predetermined order.
  • the motion information candidate list may be generated in the following order.
  • the encoder / decoder searches for motion information in the order of L0, L1, L2, ..., AL, A0, A1, A2, ..., AR, BL, T0, T1, ..., T4 blocks. While new items (ie, motion information) are inserted into the motion information candidate list, the duplicated motion information can be updated (that is, increased by 1) without being inserted into the motion information candidate list.
  • the encoder / decoder may terminate the motion information candidate list generation process when the number of items of the predefined motion information candidate list is reached.
  • the encoder / decoder searches for motion information in the order of L0, A0, L1, A1, ..., AL, AR, BL, T0, T1, ...., T4 blocks, Information) can be inserted into the motion information candidate list, and the frequency can be updated (ie, increased by 1) without inserting duplicate motion information into the motion information candidate list.
  • the encoder / decoder may terminate the motion information candidate list generation process when the number of items of the predefined motion information candidate list is reached.
  • 16 is a diagram illustrating a spatial neighboring block that can be referred to for generating a motion information candidate list according to an embodiment of the present invention.
  • available neighboring blocks may be defined as temporal neighboring blocks as illustrated in FIG. 7 or FIG. 16.
  • each block may be represented as follows.
  • the A0 block may be a block including a pixel having coordinates (x, y-1), and the A1 block may be a block including a pixel having coordinates (x + W / 2, y-1).
  • the L0 block may be a block including a pixel having coordinates (x-1, y), and the L1 block may be a block including a pixel having coordinates (x-1, y + H / 2).
  • the AL block is a block containing pixels with coordinates (x-1, y-1)
  • the AR block is a block containing pixels with coordinates (x + W, y-1)
  • the BL block is a coordinate (x-1 , y + H).
  • the encoder / decoder may generate a motion information candidate list using the surrounding motion information that can be referenced in a predetermined order.
  • the motion information candidate list may be generated in the following order.
  • the encoder / decoder may generate a motion information candidate list by referring to motion information of a left block, AL, motion information of an upper block, AR, BL, and temporal peripheral motion information.
  • the encoder / decoder searches for motion information in the order of L0, L1, AL, A0, A1, AR, BL, and temporally neighboring blocks, and inserts a new item (i.e., motion information) into the motion information candidate list.
  • the frequency information can be updated (that is, increased by 1) without overlapping the motion information candidate list.
  • the encoder / decoder may terminate the motion information candidate list generation process when the number of items of the predefined motion information candidate list is reached.
  • the encoder / decoder searches for motion information in the order of L0, A0, L1, A1, AL, AR, BL, and temporally neighboring blocks, and inserts a new item (ie, motion information) into the motion information candidate list in the case of a new item (ie, motion information).
  • the frequency information can be updated (that is, increased by 1) without overlapping the motion information candidate list.
  • the encoder / decoder may terminate the motion information candidate list generation process when the number of items of the predefined motion information candidate list is reached.
  • the encoder / decoder may refer to the motion information of all the spatial / temporal neighboring blocks, which can be referred to as shown in FIG. 15, but may refer to only the motion information of the spatial / temporal neighboring block of a specific location as shown in FIG. 16.
  • the encoder / decoder may generate a list by referring to motion information of a block selected at predetermined intervals from all the spatial / temporal neighboring blocks that can be referred to as shown in FIG. 15.
  • the encoder / decoder may refer to the blocks of A0, A2, A4, ... by selecting in two block intervals for blocks adjacent to the top of the current block and / or for blocks adjacent to the left of the current block. It is also possible to refer to blocks L0, L2, ... by selecting at intervals of two blocks.
  • the encoder / decoder of each block may be used only when the left and / or top blocks of the current block are divided into blocks smaller than the size of the current block by using divided information (eg, prediction unit division).
  • the motion information candidate list may be generated with reference to the motion information (or motion information of blocks selected at predetermined intervals).
  • 17 is a diagram illustrating a method of constructing a motion information candidate list according to an embodiment of the present invention.
  • the encoder / decoder adds spatial peripheral motion information to a motion information candidate list by a predetermined number, and updates (ie, increases) the frequency when duplicates (S1701).
  • the spatial peripheral motion information is previously shown in the examples of FIGS. 15 and / or 16.
  • AL, AR, BL, A0, ..., L0, ... blocks (ie, parts of prediction units) spatially neighboring the current block. ) May mean motion information.
  • Motion information that is not available in the motion information of a block spatially neighboring the current block may not be added to the motion information candidate list (eg, when the spatially neighboring block is encoded in the intra prediction mode).
  • the motion information of the neighboring block currently being searched for is the same as the motion information of the previous neighboring block (ie, motion information added to the motion information candidate list).
  • the frequency of occurrence of motion information (ie, duplicate motion information) of a previous neighboring block may be increased by one. In this case, if the motion vector and the reference index are the same, it may be determined that the motion information is the same.
  • the encoder / decoder adds the motion information of neighboring blocks to the motion information candidate list so as not to be overlapped spatially in a predetermined order, and increases the frequency of duplication of the corresponding motion information by 1 when duplicate motion information is generated. Can be.
  • the encoder / decoder adds temporal peripheral motion information to the motion information candidate list by a predetermined number, but updates (ie, increases) the frequency in the case of overlapping (S1702).
  • the temporal peripheral motion information may refer to motion information of the T0, ... block (ie, part of the prediction unit) that is temporally neighbored to the current block in the example of FIG. 15 and / or 16.
  • Motion information that is not available in the motion information of a block temporally neighboring to the current block may not be added to the motion information candidate list (eg, when a spatially neighboring block is encoded in an intra prediction mode).
  • the motion information of the neighboring block currently being searched for is the same as the motion information of the previous neighboring block (ie, motion information added to the motion information candidate list).
  • the frequency of occurrence of motion information (ie, duplicate motion information) of a previous neighboring block may be increased by one. In this case, if the motion vector and the reference index are the same, it may be determined that the motion information is the same.
  • the encoder / decoder adds motion information of neighboring blocks to the motion information candidate list in a predetermined order so as not to overlap, and increases the frequency of duplication of the corresponding motion information by 1 when duplicate motion information is generated. Can be.
  • the encoder / decoder determines whether the number of motion information candidates added to the motion information candidate list is N (S1703).
  • step S1703 If it is determined in step S1703 that the number of motion information candidates added to the motion information candidate list is N, the encoder / decoder sorts the items of the motion information candidate list based on the frequency number (S1709).
  • motion information candidates of the motion information candidate list are arranged in order of occurrence frequency, and motion information candidates having the same occurrence frequency are arranged in a predetermined motion information candidate configuration order (i.e., search order of motion information of spatial / temporal neighboring blocks).
  • a predetermined motion information candidate configuration order i.e., search order of motion information of spatial / temporal neighboring blocks.
  • the motion information candidate list may be sorted only when the difference in the frequency of occurrence is greater than or equal to a predetermined level.
  • the motion information candidate list may be sorted according to the process of FIGS. 12 and / or 13.
  • step S1703 if it is determined in step S1703 that the number of motion information candidates added to the motion information candidate list is not N (that is, if it is less than N), the encoder / decoder adds all motion information candidates added to the present in the motion information candidate list.
  • the encoder / decoder adds all motion information candidates added to the present in the motion information candidate list.
  • the combined bidirectional prediction candidates ie, the combined motion information candidates
  • the encoder / decoder determines whether the number of motion information candidates added to the motion information candidate list is N (S1705).
  • step S1705 If it is determined in step S1705 that the number of motion information candidates added to the motion information candidate list is N, the encoder / decoder sorts the items of the motion information candidate list based on the frequency number (S1709).
  • motion information candidates of the motion information candidate list are arranged in order of occurrence frequency, and motion information candidates having the same occurrence frequency are arranged in a predetermined order of motion information candidate configuration (i.e., motion information of spatial / temporal neighboring blocks and combined). Search order of bidirectional prediction candidates).
  • the motion information candidate list may be sorted only when the difference in the frequency of occurrence is greater than or equal to a predetermined level.
  • the motion information candidate list may be sorted according to the process of FIGS. 12 and / or 13.
  • step S1705 if it is determined in step S1705 that the number of motion information candidates added to the motion information candidate list is not N (that is, less than N), the encoder / decoder is a non-scaled bidirectional prediction candidate ( That is, a non-scaled bidirectional motion information candidate) is added to the motion information candidate list (S1706).
  • the encoder / decoder determines whether the number of motion information candidates added to the motion information candidate list is N (S1707).
  • step S1707 If it is determined in step S1707 that the number of motion information candidates added to the motion information candidate list is N, the encoder / decoder sorts the items of the motion information candidate list based on the frequency number (S1709).
  • motion information candidates of the motion information candidate list are arranged in order of occurrence frequency, and motion information candidates having the same occurrence frequency are arranged in a predetermined order of motion information candidate configuration (that is, motion information of spatial / temporal neighboring blocks, combined Search order of bidirectional prediction candidates and non-scaled prediction candidates).
  • the motion information candidate list may be sorted only when the difference in the frequency of occurrence is greater than or equal to a predetermined level.
  • the motion information candidate list may be sorted according to the process of FIGS. 12 and / or 13.
  • step S1707 if it is determined in step S1707 that the number of motion information candidates added to the motion information candidate list is not N (that is, less than N), the encoder / decoder is a zero vector (that is, zero motion vector candidates). ) Is added to the motion information candidate list (S1708).
  • the encoder / decoder changes the reference picture index until the number of motion information candidates added to the motion information candidate list becomes the number of items (items) of the predetermined motion information candidate list, and selects zero motion vector candidates. Can be added to the motion information candidate list.
  • the encoder / decoder sorts the items of the motion information candidate list based on the frequency (S1409).
  • the motion information candidates of the motion information candidate list are arranged in the order of occurrence frequency, and the motion information candidates having the same occurrence frequency are arranged in the order of the predetermined motion information candidate list construction (that is, the motion information and the combination of the spatial / temporal neighboring blocks).
  • the motion information candidate list may be sorted only when the difference in the frequency of occurrence is greater than or equal to a predetermined level.
  • the motion information candidate list may be sorted according to the process of FIGS. 12 and / or 13.
  • motion information ie, spatial motion information candidate, temporal motion information candidate, combined bidirectional motion information candidate, and non-scaled bidirectional
  • the motion information candidate and the zero vector candidate are just one example.
  • a search may be performed on only some of the motion information, or motion information not illustrated in FIG. 17 may be further searched. It may be.
  • step S1708 the process of adding a non-scaled bidirectional prediction candidate to the list can be omitted.
  • steps S1706 and S1707 are deleted, and if there are not N items (that is, motion information candidates) added to the motion information candidate list in step S1705, step S1708 may be performed.
  • the construction order of the motion information candidate list ie, spatial motion information candidate, temporal motion information candidate, combined bidirectional motion information candidate, non-scaled bidirectional motion information candidate, zero vector (zero) vector
  • the order of the candidates is only one example, and may proceed in a different predetermined order.
  • the following method may be performed for additional encoding gain.
  • a method of constructing an existing motion information list according to the degree of partitioning of a current block eg, a partition depth of a coding unit or a partition mode of a prediction unit
  • a method of constructing an existing motion information list according to the degree of partitioning of a current block eg, a partition depth of a coding unit or a partition mode of a prediction unit
  • an existing merge candidate list construction method and / or AMVP motion eg.g, an existing merge candidate list construction method and / or AMVP motion
  • the influence on the current block may be small.
  • a method of constructing a motion information candidate list may be set differently according to the split depth (or block size or split mode) of the current block (eg, coding unit and / or prediction unit).
  • the motion information configuration method according to each division depth or block size or division mode may be transmitted through each header for each sequence unit and slice unit.
  • split depth information of a block for example, split depth information of a coding unit
  • a block size for example, Coding units and / or prediction unit sizes
  • the present embodiment proposes A method of constructing a motion information candidate list may be applied.
  • a division mode (eg, a division mode of a prediction unit) to which a method of constructing a motion information candidate list proposed in this embodiment is applied in a sequence and a slice header may be signaled.
  • the method of constructing the motion information candidate list proposed in this embodiment may be applied.
  • split depth information eg, split depth information of a coding unit
  • block size eg, coding unit and / or prediction
  • the size of the unit) or the splitting mode of the block eg, the splitting mode of the prediction unit
  • the motion proposed in this embodiment is proposed.
  • the construction method of the information candidate list may be applied.
  • the method of constructing the motion information candidate list proposed in this embodiment may be applied.
  • the motion information candidate list construction method proposed in the present embodiment can be applied not only to the motion information list construction for the merge mode but also to the list construction process for the AMVP mode as described above. Even when applied to the list construction process for the AMVP mode, the motion information candidate list construction method proposed in this embodiment is applied according to the partition depth (or block size or partition mode) of the current block as described in 1) above. Whether or not applied may be determined.
  • the method of encoding / decoding the motion information list index (for example, the merge index or the motion reference flag) in consideration of the distribution of the frequencies may be changed.
  • the frequency of a particular motion information candidate is very high, a context model (ie, information on occurrence probability of a symbol) or a code word for an index indicating the motion information candidate may be changed.
  • the initial value of the context is 122 for a P slice and 137 for a B slice, and all of the Most Probable Symbols (MPSs) may be set to have a probability that a symbol is 0 (70-85%).
  • the context for the index indicating the motion information candidate may be set to have a higher probability of being 0 (eg, 90% or more).
  • the motion information index is (00, 01, 10, 110, 111) for each motion candidate. Binarization may be performed in the form of. In this case, when the frequency of occurrence of a specific motion candidate is overwhelmingly high, a codeword different from the above may be assigned to the index indicating the motion information candidate (for example, shorter codeword allocation).
  • a separate flag for indicating this when another context or binarization is performed on an index indicating a specific motion information candidate may be transmitted from an encoder.
  • the present invention proposes a method of defining long term motion information when listing the motion information of the surroundings and considering this when constructing a motion information candidate list.
  • long-term motion information refers to motion information that cannot be obtained in the vicinity of the current block (ie, a spatially adjacent block). That is, motion information of blocks that are spatially separated from the current block by two or more blocks, motion information that exhibits overall tendency of the picture to which the current block belongs, and the like may belong to this.
  • the long-term motion information may include at least one of the following motion information.
  • FIG. 18 is a diagram illustrating a method of constructing a motion information candidate list according to an embodiment of the present invention.
  • the encoder / decoder adds spatial peripheral motion information to a motion information candidate list as a predetermined number, except for duplicate motion information (S1801).
  • the spatial peripheral motion information may mean motion information of blocks A1, B1, B0, A0, and B2 (that is, a part of a prediction unit) in the example of FIG. 7, or may be previously described with reference to FIGS. 15 and / or 16.
  • this may mean motion information of AL, AR, BL, A0, ..., L0, ... blocks (that is, parts of prediction units) spatially neighboring the current block.
  • Motion information that is not available in the motion information of a block spatially neighboring the current block may not be added to the motion information candidate list (eg, when the spatially neighboring block is encoded in the intra prediction mode).
  • the motion information of the neighboring block currently being searched for is the same as the motion information of the previous neighboring block (ie, motion information added to the motion information candidate list). It is not added to the information candidate list. In this case, if the motion vector and the reference index are the same, it may be determined that the motion information is the same.
  • the encoder / decoder may add the motion information of the neighboring block in the predetermined order to the motion information candidate list so as not to overlap, except for the overlapped motion information.
  • the encoder / decoder adds temporal peripheral motion information to the motion information candidate list in a predetermined number, except for duplicate motion information (S1802).
  • the temporal peripheral motion information may mean motion information of the T0 and T1 blocks (that is, a part of the prediction unit) in the example of FIG. 7, or may be temporal to the current block in the examples of FIGS. 15 and / or 16. This may mean motion information of neighboring T0, ... blocks (that is, parts of prediction units).
  • Motion information that is not available in the motion information of a block temporally neighboring to the current block may not be added to the motion information candidate list (eg, when a spatially neighboring block is encoded in an intra prediction mode).
  • the motion information of the neighboring block currently being searched for is the same as the motion information of the previous neighboring block (ie, motion information added to the motion information candidate list). It is not added to the information candidate list. In this case, if the motion vector and the reference index are the same, it may be determined that the motion information is the same.
  • the encoder / decoder may add the motion information of the neighboring block to the motion information candidate list so as not to overlap in time available in a predetermined order.
  • the encoder / decoder determines whether the number of motion information candidates added to the motion information candidate list is N (S1803).
  • step S1803 If it is determined in step S1803 that the number of motion information candidates added to the motion information candidate list is N, the encoder / decoder ends the construction of the motion information candidate list.
  • step S1803 if it is determined in step S1803 that the number of motion information candidates added to the motion information candidate list is not N (that is, less than N), the encoder / decoder excludes the long motion information candidates except for duplicate motion information. It is added to the motion information candidate list (S1804).
  • the encoder / decoder determines whether the number of motion information candidates added to the motion information candidate list is N (S1805).
  • step S1805 If it is determined in step S1805 that the number of motion information candidates added to the motion information candidate list is N, the encoder / decoder ends the construction of the motion information candidate list.
  • step S1805 if it is determined in step S1805 that the number of motion information candidates added to the motion information candidate list is not N (that is, if it is less than N), the encoder / decoder indicates all the motion information candidates added to the present time in the motion information candidate list. (I.e., combining spatial motion information candidates, temporal motion information candidates, and / or long-term motion information candidates) to add a combined bidirectional prediction candidate (i.e., combined motion information candidates) to the motion information candidate list (S1806). ).
  • a combined bidirectional prediction candidate i.e., combined motion information candidates
  • the encoder / decoder determines whether the number of motion information candidates added to the motion information candidate list is N (S1807).
  • step S1807 If it is determined in step S1807 that the number of motion information candidates added to the motion information candidate list is N, the encoder / decoder ends the construction of the motion information candidate list.
  • step S1807 if it is determined in step S1807 that the number of motion information candidates added to the motion information candidate list is not N (that is, less than N), the encoder / decoder is a non-scaled bidirectional prediction candidate ( That is, the non-scaled bidirectional motion information candidate) is added to the motion information candidate list (S1808).
  • the encoder / decoder determines whether the number of motion information candidates added to the motion information candidate list is N (S1809).
  • step S1809 If it is determined in step S1809 that the number of motion information candidates added to the motion information candidate list is N, the encoder / decoder ends the construction of the motion information candidate list.
  • step S1809 if it is determined in step S1809 that the number of motion information candidates added to the motion information candidate list is not N (that is, less than N), the encoder / decoder is a zero vector (that is, zero motion vector candidates). ) Is added to the motion information candidate list (S1810).
  • the encoder / decoder changes the reference picture index until the number of motion information candidates added to the motion information candidate list becomes the number of items (items) of the predetermined motion information candidate list, and selects zero motion vector candidates. Can be added to the motion information candidate list.
  • motion information ie, spatial motion information candidate, temporal motion information candidate, combined bidirectional motion information candidate, and non-scaled bidirectional
  • the motion information candidate and the zero vector candidate are just one example.
  • a search may be performed on only some of the motion information, or motion information not illustrated in FIG. 18 may be further searched. It may be.
  • step S1810 the process of adding a non-scaled bidirectional prediction candidate to the list can be omitted.
  • steps S1808 and S1809 are deleted, and if there are not N items (that is, motion information candidates) added to the motion information candidate list in step S1807, step S1810 may be performed.
  • the construction order of the motion information candidate list (ie, spatial motion information candidate, temporal motion information candidate, long-term motion information candidate, combined bidirectional motion information candidate, and non-scaled bidirectional motion information candidate).
  • Order of zero vector candidates is just one example, and may be differently performed in a predetermined order.
  • long-term motion information may be added to the motion information candidate list after the spatial motion information candidate is added to the motion information candidate list, or long-term motion information after the combined bidirectional motion information candidate is added to the motion information candidate list. May be added to the motion information candidate list, or long-term motion information may be added to the motion information candidate list after a non-scaled bidirectional motion information candidate is added to the motion information candidate list, and a zero vector After the (zero vector) candidate is added to the motion information candidate list, the long-term motion information may be added to the motion information candidate list.
  • the long-term motion information candidate is added to the motion information candidate list after the spatial motion information candidate and the temporal motion information candidate are added to the motion information candidate list as shown in the example of FIG. 18.
  • motion information that is recently used but does not exist in the current motion information candidate list that is, motion information of blocks more than M blocks spatially independent of the current block. Examine the case.
  • the encoder / decoder may be used in the process of constructing a motion information candidate list for the current block after storing recently used motion information that is not inserted in the current motion information list as long-term motion info. This will be described in more detail with reference to the drawings below.
  • FIG. 19 illustrates a method of constructing a motion information candidate list using long-term motion information according to an embodiment of the present invention.
  • FIG. 19A illustrates a motion information candidate list configured in a coding / decoding process of a previous block (for example, a previous CU), and FIG. 19B illustrates a current block (example).
  • a motion information candidate list configured in a coding / decoding process of a current coding unit (Current CU) is illustrated.
  • FIG. 19 it is assumed that a previous block and a current block are encoded in a merge mode, but the present invention is not limited thereto.
  • the motion information applied in the encoding / decoding process of the previous block is stored in a long term motion information list, and the information can be used when the motion information candidate list of the current block is constructed.
  • the previous block refers to a block that is spaced apart from the current block by at least M blocks regardless of a direction.
  • a motion information candidate index 1 selected in a motion information candidate list (ie, a merge candidate list) of a previous CU (ie, a merge candidate list) The case where the motion information of index 1) is inserted into the third item of the long term motion information list is illustrated.
  • N is inserted. If the list items (that is, the number of items of the predetermined motion information candidate list) are not completed, the long-term motion information of the long term motion information list is selected and inserted into the motion information candidate list of the current block. .
  • items of the long-term motion information list may also be inserted in consideration of overlap with items (ie, motion information) added to the motion information candidate list of the current block. Therefore, the second item or the subsequent item of the long-term motion information list may be inserted into the motion information candidate list of the current block.
  • the motion information of the first item (LT motion info. 1) of the long-term motion information list is the same as the motion information candidate present in the motion information candidate list of the current block.
  • the motion information of the second item (LT motion info. 2) is inserted into the motion information candidate list of the current block.
  • the size of the long-term motion information list (that is, the number of items) may be fixed, and the process of managing the long-term motion information list in the encoder / decoder is as follows.
  • the most recently selected (or used) motion information may be inserted at the top of the long-term motion information list. That is, when long-term motion information is inserted into the long-term motion list, the long-term motion information may be inserted at the highest item. For example, in the process of encoding / decoding each block by the z scan method, the motion information of the current block may be inserted at the top of the long-term motion information list for the blocks to be encoded / decoded next.
  • the first motion information when the first motion information is inserted into the long-term motion information list, if the second motion information identical to the first motion information exists in a specific item of the long-term motion information list, the second motion information is deleted and then the first motion information is deleted.
  • One motion information may be inserted at the highest item of the long-term motion information lease.
  • whether the motion information is the same may be determined whether the reference picture and the motion vector are the same.
  • the motion picture closest to the current picture and the picture order count (POC) may be inserted into the upper item.
  • POC difference (a) between the reference picture of the motion information A and the current picture and the POC difference (a ') between the reference picture of the motion information A' and the current picture are compared. If the POC difference (a ') between the reference picture of the motion information A' and the current picture is smaller, the motion information A 'rather than the motion information A may be inserted at the top of the long-term motion information list.
  • the motion information candidate list of the current block (for example, the current coding unit or the prediction unit)
  • the motion information of the uppermost item is the motion information candidate list of the current block.
  • each item in the long-term motion information list is identical to the motion information candidate added to the motion information candidate list of the current block sequentially, and if the same motion information is not in the motion information candidate list of the current block, It may be added to the motion information candidate list.
  • the encoder / decoder determines whether motion information identical to the first item of the long-term motion information list is added to the motion information candidate list of the current block. If the same motion information as the first item of the long-term motion information list is not added to the motion information candidate list of the current block, the motion information of the first item may be added to the motion information candidate list of the current block. On the other hand, when the same motion information as the first item of the long-term motion information list is added to the motion information candidate list of the current block, whether the same motion information as the second item of the long-term motion information list is added to the motion information candidate list of the current block. You can judge. The same is true for subsequent steps.
  • the long-term motion information list is set to a predetermined size (that is, the number of items) and can be equally applied to the receiving end (decoder) and the transmitting end (encoder).
  • the size of the long-term motion information list may be individually reset for each sequence, each picture, or each slice, and may be transmitted from a transmitting end (encoder) to a receiving end (decoder).
  • 20 illustrates global motion information of a picture as long-term motion information according to an embodiment of the present invention.
  • Global motion information / vector of a picture means that the previous picture and the current picture tend to move as a whole as shown in FIG. 20.
  • images captured by panning (horizontal shooting) or tilting (vertical shooting) may exhibit higher efficiency than images taken with the camera fixed. have.
  • the current picture and the reference picture are superimposed at the same position, and then moved within the search range, and the Mean of Absolute Difference (MAD) between the current picture and another picture.
  • MAD Mean of Absolute Difference
  • MSE mean of squared error
  • Global motion information may be derived by calculating the MAD or MSE between the current picture and the reference picture.
  • the global motion information is used to minimize the MAD or MSE between the current picture and the reference picture from the top-left pixel of the current picture before moving the current picture when the current picture is moved relative to the reference picture. It can be derived from the direction and the difference between the position and the top-left pixel of the current picture at the position.
  • the encoder / decoder may have global motion information with the current picture for each reference picture present in the reference list. That is, the encoder / decoder may derive global motion information of the current picture based on the reference picture.
  • the global motion information is calculated based on a few reference pictures and then the virtual POC distance between the current picture and other reference pictures is taken into consideration.
  • Global motion information can be generated. This will be described with reference to the drawings below.
  • 21 illustrates a method of deriving global motion information of a picture as long-term motion information according to an embodiment of the present invention.
  • the global motion information for the reference picture T-2 may be derived by calculating a difference and a direction from the initial start position.
  • the global motion information between the current picture T0 and the reference picture T-2 may be derived by considering the POC distance from the global motion information between the current picture T0 and another reference picture T1.
  • the global motion information between the current picture T0 and the reference picture T-2 may include a difference in POC between the current picture T0 and the reference picture T-2, and a reference picture T1 different from the current picture T0.
  • Can be derived by scaling global motion information between the current picture T0 and another reference picture T1 as a ratio of the POC difference between the < RTI ID 0.0 >
  • the global motion information between the current picture T0 and the reference picture T-2 may be derived by considering the POC distance relatively from the global motion information between the current picture T0 and another reference picture T2.
  • the global motion information between the current picture T0 and the reference picture T-2 includes a POC difference between the current picture T0 and the reference picture T-2, and a reference picture T2 different from the current picture T0.
  • Can be derived by scaling global motion information between the current picture T0 and another reference picture T2 as a ratio of POC differences between the < RTI ID 0.0 >
  • the global motion information between the current picture T0 and the reference picture T-2 may include first global motion information between the current picture T0 and another reference picture 1 (T1) and another reference picture 2 different from the current picture T0. It can be derived by considering the POC distance relatively from the second global motion information between (T2).
  • the global motion information between the current picture T0 and the reference picture T-2 may include a difference in POC between the current picture T0 and the reference picture T-2, and another reference picture 1 different from the current picture T0.
  • First motion information that scales first global motion information between the current picture T0 and another reference picture 1 (T1) as a ratio of the POC difference between T1), and between the current picture T0 and the reference picture T-2.
  • Averaging the second motion information by scaling the second global motion information between the current picture (T0) and another reference picture (T1) as a ratio of the POC difference and the POC difference between the current picture (T0) and another reference picture 2 (T2). (Or weighted).
  • a method of directly transmitting global motion information by a transmitting end (ie, an encoder) in a slice header (or a sequence header) may be used without predicting global motion information at a receiving end (ie, a decoder).
  • the transmitting end ie, the encoder
  • the reference picture for calculating the global motion information of the current picture is a picture that was encoded just before the encoding order.
  • a picture that is used or has a value of POC-1 of the current picture on a POC basis may be used, or the first picture of a group of pictures (GOP) of the current picture may be used.
  • the above-described reference picture may be used as a reference picture, or a specific picture (eg, the first picture) of the list 0 LIST0 may be used.
  • a specific picture eg, the first picture of List0 (LIST0) and a specific picture (eg, the first picture) of List1 (LIST1) may be applied simultaneously.
  • the global motion information derived based on the reference picture may be inserted in the long-term motion information list by applying scaling in proportion to the POC distance. That is, global motion information derived based on the reference picture is scaled as a ratio of the POC difference between the current picture and the reference picture and the POC difference between the current picture and the reference picture, and then inserted into the long-term motion information list.
  • the motion information having the highest frequency in the picture reflects the characteristics of the image and may not exist in the surrounding motion information, it may contribute to the diversity of the motion information list when it is managed as long-term motion information.
  • a specific number of motion information storage spaces may be created to find the highest frequency of motion information in the picture, and the motion information selected to represent the motion of the current block may be stored in the storage space. That is, the long-term motion information list may be constructed to find the highest frequency of motion information in the picture.
  • the process of updating the occurrence frequency of the motion information is performed.
  • FIG. 22 illustrates a method of constructing a motion information candidate list using long-term motion information according to an embodiment of the present invention.
  • FIG. 22A illustrates a motion information candidate list configured in a coding / decoding process of a previous block (eg, a previous CU), and FIG. 22B illustrates a current block (eg, a CU).
  • a motion information candidate list configured in a coding / decoding process of a current coding unit (Current CU) is illustrated.
  • the motion information applied in the encoding / decoding process of the previous block is stored in a long term motion information list, and the information can be used when the motion information candidate list of the current block is constructed.
  • the previous block refers to a block that is spaced apart from the current block by at least M blocks regardless of a direction.
  • a motion information candidate index 0 (ie, a merge candidate list index) selected from a motion information candidate list (ie, merge candidate list) of a previous CU (previous CU)
  • the motion information of index 0 is inserted as a second item of a long term motion information list.
  • the motion information selected in the previous block is the merge candidate list index 0 as shown in FIG. 22, since the corresponding motion information is inserted into the long-term motion information list and is the same as the second item of the long-term motion information list, the frequency of the second item is 6 Can be updated to 7.
  • the motion information candidate list of the current block is generated in consideration of the updated long-term motion information list. That is, the long-term motion information list is composed of long-term motion information and occurrence frequency, and motion information having the highest occurrence frequency in the long-term motion information list may be inserted as a motion information candidate of the motion information candidate list of the current block.
  • the first item of the long-term motion information list as shown in FIG. 22 has the highest occurrence frequency, it may be inserted as the fifth item of the motion information candidate list of the current block.
  • items of the long-term motion information list may also be inserted in consideration of overlap with items (ie, motion information) added to the motion information candidate list of the current block. Therefore, even if the first item of the long-term motion information list is the most frequent, if it is the same as the motion information added to the motion information candidate list of the current block, the second item or a subsequent item is added to the motion information candidate list of the current block. Can be inserted.
  • the result of scaling the motion vector in consideration of the POC difference with the current picture is the same or different. If it is below a certain level, it is determined that the same motion information, and the frequency of the corresponding item of the long-term motion information list can be updated.
  • the reference picture that is closest to the current picture may be selected and the motion vector according to the picture may be calculated and managed as a long-term motion information list. have.
  • a motion information A ' having a different reference picture list or reference picture but having the same motion vector due to scaling exists in the third item of the long-term motion information list.
  • the POC difference (a) between the reference picture of the motion information A and the current picture and the POC difference (a ') between the reference picture of the motion information A' and the current picture are compared. If the POC difference a 'between the reference picture of the motion information A' and the current picture is smaller, the motion information A 'instead of the motion information A may be replaced with a corresponding third item of the long-term motion information list.
  • Embodiment 1 and Embodiment 2 described above may be used in combination.
  • the order of the motion information candidates in the motion information candidate list of the current block can be sorted according to the first embodiment. have.
  • FIG. 23 is a diagram illustrating an inter prediction based image processing method according to an embodiment of the present invention.
  • the encoder / decoder constructs a motion information candidate list for deriving motion information of the current block (S2301).
  • the encoder / decoder may configure the motion information candidate list according to the first and / or second embodiments described above.
  • the encoder / decoder may assign, in a predetermined order, one or more spatial motion information candidates derived from the current block and one or more neighboring blocks spatially and / or one or more temporal motion information candidates derived from one or more temporally neighboring blocks. By adding accordingly, a motion information candidate list can be constructed.
  • the encoder / decoder uses motion information candidates derived from blocks spatially neighboring the current block and / or blocks temporally neighboring the current block. Lists can be constructed.
  • the encoder / decoder may sort the motion information candidates according to the frequency of occurrence of the motion information candidates added to the motion information candidate list (that is, the frequency of occurrence in descending order).
  • the motion information candidate list may be sorted as shown in the example of FIG. 12.
  • the encoder / decoder may sort the motion information candidate list only when the difference in frequency of occurrence is more than a predetermined level.
  • the motion information candidate list may be sorted as in the example of FIG. 13 described above.
  • the number of motion information candidates added to the current motion information candidate list is determined by a predetermined item of the motion information candidate list. If smaller than the number, the combined bidirectional motion information candidate may be added to the motion information candidate list by combining the motion information added to the motion information candidate list. In particular, a combined bidirectional motion information candidate may be added to the motion information candidate list when the slice (or picture) to which the current block belongs is a bidirectional slice (or picture).
  • the number of motion information candidates added to the current motion information candidate list is added to the motion information candidate list. If less than a predetermined number of items, a non-scaled bidirectional motion information candidate may be added to the motion information candidate list.
  • a non-scaled bidirectional motion information candidate may be added to the motion information candidate list.
  • the motion information candidate added to the current motion information candidate list. If the number of times is smaller than the number of predetermined items in the motion information candidate list, a zero motion vector candidate may be added to the motion information candidate list. In this case, the zero motion vector candidate may be added to the motion information candidate list until the number of motion information candidates added to the current motion information candidate list is equal to the number of predetermined items of the motion information candidate list. .
  • the encoder / decoder may generate and manage a long-term motion information list including long-term motion information.
  • the long-term motion information candidate is motion information that is recently used but does not exist in the current motion information candidate list (that is, motion information of M blocks or more away from the current block regardless of spatial direction), At least one of the global motion information of the picture and the motion information showing the highest frequency in the picture.
  • the encoder / decoder may add the long-term motion information to the motion information candidate list of the current block as the long-term motion information candidate.
  • the long-term motion information candidate may be added to the motion information candidate list before the spatial motion information candidate is added (that is, the first priority), or may be added to the motion information candidate list after the spatial motion information candidate is added. , Or may be added to the motion information candidate list after the temporal motion information candidate is added, the combined bidirectional motion information candidate may be added to the motion information candidate list, and then added to the motion information candidate list, and may be added to a non-scaled ( non-scaled) The bidirectional motion information candidate may be added to the motion information candidate list after being added to the motion information candidate list, and the zero motion vector candidate may be added to the motion information candidate list after being added.
  • the encoder / decoder derives the motion information of the current block from the motion information candidate selected from the motion information candidates added to the motion information candidate list (S2302).
  • the decoder may receive a motion information candidate index for specifying motion information of the current block from the motion information candidate list of the current block from the encoder.
  • the motion information of the current block may be derived from the motion information candidate indicated by the received motion information candidate index.
  • the decoder may receive the merge index from the encoder and decode the received merge index.
  • the motion information indicated by the merge index in the merge candidate index may be derived as the motion information of the current block.
  • the decoder may receive a motion reference flag from the encoder and decode the received motion reference flag.
  • the motion information indicated by the motion reference flag in the motion vector predictor candidate list can be derived as the motion vector predictor of the current block.
  • the decoder may decode the motion vector difference value, the reference picture index, and the inter prediction mode received from the encoder, and derive the motion vector of the current block by adding the derived motion vector prediction value and the decoded motion vector difference value.
  • the encoder / decoder generates the prediction block of the current block by using the derived motion information of the current block (S2303).
  • the encoder / decoder may generate the predictive block of the current block from the block specified by the motion information (especially the motion vector) in the reference picture specified by the motion information (especially the reference picture index).
  • the encoder / decoder may generate (derive) the sample value of the prediction unit of the current block from the sample value of the block (region) specified by the motion vector in the reference picture.
  • 24 is a diagram illustrating an inter predictor according to an embodiment of the present invention.
  • the inter prediction unit 181 (see FIG. 1; see 261 and FIG. 2) is shown as one block for convenience of description, but the inter prediction units 181 and 261 are included in the encoder and / or the decoder. It can be implemented as.
  • the inter prediction units 181 and 261 implement the functions, processes, and / or methods proposed in FIGS. 1 to 23.
  • the inter predictors 181 and 261 may include a motion information candidate list constructer 2401, a subblock divider 2402, and a predictive block generator 2403.
  • the long-term motion information list construction unit 2404 may be further included.
  • the motion information candidate list constructing unit 2401 constructs a motion information candidate list for deriving motion information of the current block.
  • the motion information candidate list constructing unit 2401 may construct a motion information candidate list according to the first and / or second embodiments described above.
  • the motion information candidate list constructer 2401 may include one or more spatial motion information candidates derived from the current block and one or more neighboring blocks spatially and / or one or more temporal motion information derived from one or more temporally neighboring blocks.
  • the motion information candidate list can be constructed by adding candidates in a predetermined order.
  • the motion information candidate list constructer 2401 is a motion information candidate derived from a block spatially neighboring the current block and / or a block temporally neighboring the current block.
  • the motion information candidate list can be constructed using.
  • the motion information candidate list constructing unit 2401 sorts the order of the motion information candidates according to the frequency of occurrence of the motion information candidate added to the motion information candidate list (that is, in descending order of occurrence frequency). Sorting). For example, the motion information candidate list may be sorted as shown in the example of FIG. 12.
  • the motion information candidate list construction unit 2401 may sort the motion information candidate list only when the difference in the frequency of occurrence between the motion information candidates is equal to or greater than a predetermined level. That is, only the order of motion information candidates whose difference in frequency of occurrence in the motion information candidate list is greater than or equal to a predetermined level may be changed.
  • the motion information candidate list may be sorted as in the example of FIG. 13 described above.
  • the number of motion information candidates added to the current motion information candidate list is determined by a predetermined item of the motion information candidate list. If less than the number, the combined bidirectional motion information candidate generated by combining the motion information candidates added to the motion information candidate list may be added to the motion information candidate list. In particular, a combined bidirectional motion information candidate may be added to the motion information candidate list when the slice (or picture) to which the current block belongs is a bidirectional slice (or picture).
  • the number of motion information candidates added to the current motion information candidate list is added to the motion information candidate list. If less than a predetermined number of items, a non-scaled bidirectional motion information candidate may be added to the motion information candidate list.
  • a non-scaled bidirectional motion information candidate may be added to the motion information candidate list.
  • the motion information candidate added to the current motion information candidate list. If the number of times is smaller than the number of predetermined items in the motion information candidate list, a zero motion vector candidate may be added to the motion information candidate list. In this case, the zero motion vector candidate may be added to the motion information candidate list until the number of motion information candidates added to the current motion information candidate list is equal to the number of predetermined items of the motion information candidate list. .
  • the long-term motion information list constructer 2404 may generate and manage a long-term motion information list composed of long-term motion information candidates.
  • the long-term motion information candidate is motion information that is recently used but does not exist in the current motion information candidate list (that is, motion information of M blocks or more away from the current block regardless of spatial direction), At least one of the global motion information of the picture and the motion information showing the highest frequency in the picture.
  • the motion information candidate list configuring unit 2401 may configure the motion information candidate list of the current block by using the long-term motion information list generated by the long-term motion information list forming unit 2404. have. That is, the motion information candidate list generator 2401 may add the long-term motion information in the long-term motion information list generated by the long-term motion information list generator 2404 to the motion information candidate list of the current block as the long-term motion information candidate. .
  • the long-term motion information candidate may be added to the motion information candidate list before the spatial motion information candidate is added (that is, the first priority), or may be added to the motion information candidate list after the spatial motion information candidate is added. , Or may be added to the motion information candidate list after the temporal motion information candidate is added, the combined bidirectional motion information candidate may be added to the motion information candidate list, and then added to the motion information candidate list, and may be added to a non-scaled ( non-scaled) The bidirectional motion information candidate may be added to the motion information candidate list after being added to the motion information candidate list, and the zero motion vector candidate may be added to the motion information candidate list after being added.
  • the subblock dividing unit 2402 derives motion information of the current block from the motion information candidate selected from the motion information candidates added to the motion information candidate list.
  • the sub-block dividing unit 2402 may derive the motion information of the current block from the motion information candidate indicated by the motion information candidate index (for example, the merge index or the motion reference flag) received from the encoder.
  • the motion information candidate index for example, the merge index or the motion reference flag
  • the prediction block generator 2403 generates a prediction block of the current block by using the derived motion information of the current block.
  • the prediction block generator 2403 may generate the prediction block of the current block from the block specified by the motion information (particularly, the motion vector) in the reference picture specified by the motion information (particularly, the reference picture index).
  • the prediction block generator 2403 may generate (derive) the sample value of the prediction unit of the current block from the sample value of the block (region) specified by the motion vector in the reference picture.
  • each component or feature is to be considered optional unless stated otherwise.
  • Each component or feature may be embodied in a form that is not combined with other components or features. It is also possible to combine some of the components and / or features to form an embodiment of the invention.
  • the order of the operations described in the embodiments of the present invention may be changed. Some components or features of one embodiment may be included in another embodiment or may be replaced with corresponding components or features of another embodiment. It is obvious that the claims may be combined to form an embodiment by combining claims that do not have an explicit citation relationship in the claims or as new claims by post-application correction.
  • Embodiments according to the present invention may be implemented by various means, for example, hardware, firmware, software, or a combination thereof.
  • an embodiment of the present invention may include one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), FPGAs ( field programmable gate arrays), processors, controllers, microcontrollers, microprocessors, and the like.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGAs field programmable gate arrays
  • processors controllers, microcontrollers, microprocessors, and the like.
  • an embodiment of the present invention may be implemented in the form of a module, procedure, function, etc. that performs the functions or operations described above.
  • the software code may be stored in memory and driven by the processor.
  • the memory may be located inside or outside the processor, and may exchange data with the processor by various known means.

Landscapes

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

Abstract

A method for processing an image on the basis of an inter prediction mode and a device therefor are disclosed. Particularly, the method for processing an image on the basis of inter prediction comprises the steps of: configuring motion information candidate lists by adding, to the motion information candidate lists of a current block, according to a predetermined order, spatial motion information candidates derived from blocks spatially neighboring the current block and temporal motion information candidates derived from blocks temporally neighboring the current block; deriving motion information of the current block from a motion information candidate selected among the motion information candidates added to the motion information candidate list; and generating a prediction block of the current block by using the motion information of the current block, wherein the order of the motion information candidates can be sorted according to occurrence frequency of the motion information candidates added to the motion information candidate list.

Description

인터 예측 모드 기반 영상 처리 방법 및 이를 위한 장치Inter prediction mode based image processing method and apparatus therefor

본 발명은 정지 영상 또는 동영상 처리 방법에 관한 것으로서, 보다 상세하게 인터 예측 모드(inter prediction mode) 기반으로 정지 영상 또는 동영상을 인코딩/디코딩하는 방법 및 이를 지원하는 장치에 관한 것이다. The present invention relates to a still image or moving image processing method, and more particularly, to a method for encoding / decoding a still image or moving image based on an inter prediction mode and an apparatus supporting the same.

압축 부호화란 디지털화한 정보를 통신 회선을 통해 전송하거나, 저장 매체에 적합한 형태로 저장하기 위한 일련의 신호 처리 기술을 의미한다. 영상, 이미지, 음성 등의 미디어가 압축 부호화의 대상이 될 수 있으며, 특히 영상을 대상으로 압축 부호화를 수행하는 기술을 비디오 영상 압축이라고 일컫는다. Compression coding refers to a series of signal processing techniques for transmitting digitized information through a communication line or for storing in a form suitable for a storage medium. Media such as an image, an image, an audio, and the like may be a target of compression encoding. In particular, a technique of performing compression encoding on an image is called 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. Processing such content would result in a tremendous increase in terms of memory storage, memory access rate, and processing power.

따라서, 차세대 비디오 컨텐츠를 보다 효율적으로 처리하기 위한 코딩 툴을 디자인할 필요가 있다. Accordingly, there is a need to design coding tools for more efficiently processing next generation video content.

동영상의 인코딩/디코딩 과정에서 픽쳐간 예측을 수행할 때, 움직임 정보를 효율적으로 부호화하기 위해 현재 블록의 주변 움직임 정보들을 리스트화하고, 현재 블록의 움직임을 표현하기 적합한 항목을 선택하여 움직임 보상에 사용한다. 이때, 리스트에 속한 주변 움직임 정보들은 현재 블록의 움직임 정보와 동일한 확률이 높은 순서대로 정렬되어야 높은 부호화 효율을 얻을 수 있다. When performing inter-picture prediction during encoding / decoding of video, list motion information around the current block in order to encode motion information efficiently, and select a suitable item to represent motion of the current block and use it for motion compensation. do. At this time, the neighboring motion information belonging to the list must be arranged in the same order of high probability as the motion information of the current block to obtain high coding efficiency.

이에 따라, 본 발명은 움직임 정보 리스트의 각 항목이 현재 블록의 주변에서 발생되는 움직임 정보의 빈도 수를 고려하여 리스트를 구성함으로써 움직임 정보를 효율적으로 부호화 하는 방법을 제안한다.Accordingly, the present invention proposes a method for efficiently encoding motion information by constructing a list in consideration of the frequency of the motion information generated in each item of the motion information list around the current block.

또한, 본 발명은 주변 움직임 정보를 리스트화 할 때 장기 움직임 정보 (long term motion information)를 고려하는 방법을 제안한다.In addition, the present invention proposes a method of considering long term motion information when listing surrounding motion information.

본 발명에서 이루고자 하는 기술적 과제들은 이상에서 언급한 기술적 과제들로 제한되지 않으며, 언급하지 않은 또 다른 기술적 과제들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.The technical problems to be achieved in the present invention are not limited to the technical problems mentioned above, and other technical problems not mentioned above will be clearly understood by those skilled in the art from the following description. Could be.

본 발명의 일 양상은, 인터 예측(inter prediction)을 기반으로 영상을 처리하는 방법에 있어서, 현재 블록과 공간적으로 이웃한 블록으로부터 도출된 공간적 움직임 정보 후보와 상기 현재 블록과 시간적으로 이웃한 블록으로부터 도출된 시간적 움직임 정보 후보를 미리 정해진 순서에 따라 현재 블록의 움직임 정보 후보 리스트에 추가함으로써 상기 움직임 정보 후보 리스트를 구성하는 단계, 상기 움직임 정보 후보 리스트에 추가된 움직임 정보 후보 중에서 선택된 움직임 정보 후보로부터 상기 현재 블록의 움직임 정보를 도출하는 단계 및 상기 현재 블록의 움직임 정보를 이용하여 상기 현재 블록의 예측 블록을 생성하는 단계를 포함하고, 상기 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 발생 빈도수에 따라 상기 움직임 정보 후보의 순서가 정렬될 수 있다. An aspect of the present invention is a method for processing an image based on inter prediction, comprising: a spatial motion information candidate derived from a block spatially neighboring a current block and a block temporally neighboring the current block Constructing the motion information candidate list by adding the derived temporal motion information candidate to the motion information candidate list of the current block in a predetermined order, from the motion information candidate selected from the motion information candidates added to the motion information candidate list; Deriving motion information of a current block and generating a prediction block of the current block by using motion information of the current block, wherein the motion information candidate is added to the motion information candidate list according to a frequency of occurrence of the motion information candidate added to the motion information candidate list. Sequence of motion information candidates Can be aligned.

본 발명의 일 양상은, 인터 예측(inter prediction)을 기반으로 영상을 처리하는 장치에 있어서, 현재 블록과 공간적으로 이웃한 블록으로부터 도출된 공간적 움직임 정보 후보와 상기 현재 블록과 시간적으로 이웃한 블록으로부터 도출된 시간적 움직임 정보 후보를 미리 정해진 순서에 따라 현재 블록의 움직임 정보 후보 리스트에 추가함으로써 상기 움직임 정보 후보 리스트를 구성하는 움직임 정보 후보 리스트 구성부, 상기 움직임 정보 후보 리스트에 추가된 움직임 정보 후보 중에서 선택된 움직임 정보 후보로부터 상기 현재 블록의 움직임 정보를 도출하는 움직임 정보 도출부 및 상기 현재 블록의 움직임 정보를 이용하여 상기 현재 블록의 예측 블록을 생성하는 예측 블록 생성부를 포함하고, 상기 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 발생 빈도수에 따라 상기 움직임 정보 후보의 순서가 정렬될 수 있다. An aspect of the present invention is an apparatus for processing an image based on inter prediction, comprising: a spatial motion information candidate derived from a block spatially neighboring a current block and a block temporally neighboring the current block A motion information candidate list constructing unit constituting the motion information candidate list by adding the derived temporal motion information candidates to the motion information candidate list of the current block in a predetermined order, and selecting among motion information candidates added to the motion information candidate list A motion information derivation unit for deriving motion information of the current block from a motion information candidate; and a prediction block generator for generating a prediction block of the current block by using motion information of the current block, and adding to the motion information candidate list. After the movement information The motion information candidates may be ordered according to the frequency of occurrence of beams.

바람직하게, 상기 발생 빈도수의 차이가 미리 정해진 수준 이상인 움직임 정보 후보의 순서만이 변경될 수 있다.Preferably, only the order of motion information candidates in which the difference in frequency of occurrence is greater than or equal to a predetermined level may be changed.

바람직하게, 상기 현재 블록과 공간적으로 좌측에 이웃한 블록, 상기 현재 블록과 공간적으로 좌상단에 이웃한 블록, 상기 현재 블록과 공간적으로 우상단에 이웃한 블록, 상기 현재 블록과 공간적으로 좌하단에 이웃한 블록, 상기 현재 블록과 시간적으로 이웃한 블록의 순서로 움직임 정보 후보가 도출될 수 있다. Preferably, a block that is spatially neighboring to the left of the current block, a block that is spatially neighboring to the upper left of the current block, a block that is spatially neighboring to the upper right of the current block, and spatially neighboring to the lower left of the current block The motion information candidate may be derived in the order of a block and a block temporally neighboring the current block.

바람직하게, 상기 현재 블록과 공간적으로 좌측에 이웃한 블록과 상기 현재 블록과 공간적으로 상단에 이웃한 블록으로부터 교대로 움직임 정보 후보가 도출된 후, 상기 현재 블록과 공간적으로 좌상단에 이웃한 블록, 상기 현재 블록과 공간적으로 우상단에 이웃한 블록, 상기 현재 블록과 공간적으로 좌하단에 이웃한 블록, 상기 현재 블록과 시간적으로 이웃한 블록의 순서로 움직임 정보 후보가 도출될 수 있다.Preferably, after motion information candidates are alternately derived from a block adjacent to the left side of the current block and a block adjacent to the top of the current block, the block next to the left side of the left side of the current block, The motion information candidate may be derived in the order of a block adjacent to the upper right end of the current block, a block adjacent to the lower left end of the current block, and a block temporally adjacent to the current block.

바람직하게, 상기 현재 블록이 분할되는 깊이가 미리 정해진 값 이상인 경우 또는 상기 현재 블록의 크기가 미리 정해진 크기 보다 작은 경우, 상기 움직임 정보 후보 리스트가 정렬될 수 있다.Preferably, when the depth at which the current block is divided is equal to or larger than a predetermined value or when the size of the current block is smaller than a predetermined size, the motion information candidate list may be sorted.

바람직하게, 상기 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 개수가 상기 움직임 정보 후보 리스트의 미리 정해진 항목의 수보다 작은 경우, 상기 움직임 정보 후보 리스트에 추가된 움직임 정보 후보를 조합함으로써 생성된 움직임 정보 후보가 상기 움직임 정보 후보 리스트에 추가될 수 있다.Preferably, when the number of motion information candidates added to the motion information candidate list is smaller than the number of predetermined items of the motion information candidate list, motion information generated by combining the motion information candidates added to the motion information candidate list. A candidate may be added to the motion information candidate list.

바람직하게, 상기 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 개수가 상기 움직임 정보 후보 리스트의 미리 정해진 항목의 수보다 작은 경우, 제로 움직임 벡터(zero motion vector)가 상기 움직임 정보 후보 리스트에 추가될 수 있다. Preferably, when the number of motion information candidates added to the motion information candidate list is smaller than the number of predetermined items of the motion information candidate list, a zero motion vector may be added to the motion information candidate list. have.

바람직하게, 상기 현재 블록으로부터 공간적으로 소정의 개수의 블록 이상 떨어진 블록의 움직임 정보 및/또는 상기 현재 블록이 속한 픽쳐의 전역적인 움직임 정보를 포함하는 장기 움직임 정보 리스트로부터 선택된 장기 움직임 정보 후보가 상기 움직임 정보 후보 리스트에 추가될 수 있다. Preferably, the long-term motion information candidate selected from the long-term motion information list including motion information of a block spaced apart from the current block by a predetermined number of blocks or more and / or global motion information of a picture to which the current block belongs. The information may be added to the candidate list.

바람직하게, 상기 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 개수가 상기 움직임 정보 후보 리스트의 미리 정해진 항목의 수보다 작은 경우, 상기 장기 움직임 정보 후보가 상기 움직임 정보 후보 리스트에 추가될 수 있다. Preferably, when the number of motion information candidates added to the motion information candidate list is smaller than the number of predetermined items of the motion information candidate list, the long-term motion information candidate may be added to the motion information candidate list.

바람직하게, 상기 장기 움직임 정보 후보가 상기 움직임 정보 후보 리스트에 추가될 때, 상기 움직임 정보 후보 리스트에 추가된 움직임 정보 후보와 중복되지 않게 추가될 수 있다.Preferably, when the long-term motion information candidate is added to the motion information candidate list, the long-term motion information candidate may be added so as not to overlap with the motion information candidate added to the motion information candidate list.

바람직하게, 상기 장기 움직임 리스트에 움직임 정보가 삽입될 때, 상기 장기 움직임 리스트의 가장 상위 항목에 삽입될 수 있다.Preferably, when motion information is inserted into the long-term motion list, the motion information may be inserted into the highest item of the long-term motion list.

바람직하게, 상기 장기 움직임 리스트에 제1 움직임 정보가 삽입될 때, 상기 제1 움직임 정보와 동일한 제2 움직임 정보가 상기 장기 움직임 리스트 내 존재하는 경우, 상기 제2 움직임 정보를 삭제되며 상기 제1 움직임 정보는 상기 장기 움직임 리스트의 가장 상위 항목에 삽입될 수 있다. Preferably, when the first motion information is inserted in the long-term motion list, if second motion information identical to the first motion information exists in the long-term motion list, the second motion information is deleted and the first motion is deleted. Information may be inserted at the top of the long-term movement list.

바람직하게, 상기 전역적인 움직임 정보는 기준 픽쳐를 기준으로 현재 픽쳐를 이동시킬 때, 이동하기 전 상기 현재 픽쳐의 좌상단(top-left) 화소로부터 상기 현재 픽쳐와 상기 기준 픽쳐 간의 MAD(Mean of Absolute Difference) 혹은 MSE(Mean of Squared Error)를 최소화하는 위치에서의 상기 현재 픽쳐의 좌상단(top-left) 화소와의 위치의 차이 및 방향으로 도출될 수 있다.Preferably, the global motion information is a mean of absolute difference between the current picture and the reference picture from a top-left pixel of the current picture before moving when the current picture is moved with respect to a reference picture. Or a difference between the top-left pixel and the direction of the current picture at a location that minimizes Mean of Squared Error (MSE).

바람직하게, 상기 장기 움직임 정보 리스트에서 상기 현재 블록이 속한 픽쳐 내에서 가장 높은 빈도 수를 가지는 움직임 정보가 상기 움직임 정보 후보 리스트에 추가될 수 있다. Preferably, motion information having the highest frequency in the picture to which the current block belongs in the long-term motion information list may be added to the motion information candidate list.

본 발명의 실시예에 따르면, 현재 블록의 움직임 정보 리스트에서 움직임 정보가 중복되는 빈도수를 이용하여 항목을 정렬함으로써, 움직임 정보 리스트에서 선택된 리스트 인덱스를 부호화할 때 확률 모델이 반영되어 부호화 효율을 높일 수 있다. According to an embodiment of the present invention, by sorting items using a frequency of overlapping motion information in a motion information list of a current block, a probability model is reflected when encoding a list index selected from a motion information list, thereby improving encoding efficiency. have.

또한, 본 발명의 실시예에 따르면, 인터 예측 모드에서 움직임 정보 리스트를 이용할 경우 보다 높은 부호화 효율을 위해 중복되지 않은 주변 움직임 정보를 최대한 다양하게 사용할 수 있으므로, 부호화 성능을 높일 수 있다. In addition, according to the embodiment of the present invention, when using the motion information list in the inter prediction mode, since the non-overlapping peripheral motion information can be used in various ways for higher coding efficiency, encoding performance can be improved.

또한, 본 발명의 실시예에 따르면, 다양한 움직임 정보를 움직임 정보 리스트에 적용할 수 있으므로, 인터 예측의 정확도를 향상시킬 수 있다. In addition, according to an embodiment of the present invention, various motion information can be applied to the motion information list, thereby improving the accuracy of inter prediction.

본 발명에서 얻을 수 있는 효과는 이상에서 언급한 효과로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.The effects obtainable in the present invention are not limited to the above-mentioned effects, and other effects not mentioned will be clearly understood by those skilled in the art from the following description. .

본 발명에 관한 이해를 돕기 위해 상세한 설명의 일부로 포함되는, 첨부 도면은 본 발명에 대한 실시예를 제공하고, 상세한 설명과 함께 본 발명의 기술적 특징을 설명한다.BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, included as part of the detailed description in order to provide a thorough understanding of the present invention, provide embodiments of the present invention and together with the description, describe the technical features of the present invention.

도 1은 본 발명이 적용되는 실시예로서, 정지 영상 또는 동영상 신호의 인코딩이 수행되는 인코더의 개략적인 블록도를 나타낸다.1 is a schematic block diagram of an encoder in which encoding of a still image or video signal is performed according to an embodiment to which the present invention is applied.

도 2는 본 발명이 적용되는 실시예로서, 정지 영상 또는 동영상 신호의 인코딩이 수행되는 디코더의 개략적인 블록도를 나타낸다.2 is a schematic block diagram of a decoder in which encoding of a still image or video signal is performed according to an embodiment to which the present invention is applied.

도 3은 본 발명에 적용될 수 있는 코딩 단위의 분할 구조를 설명하기 위한 도면이다.3 is a diagram for describing a division structure of a coding unit that may be applied to the present invention.

도 4는 본 발명에 적용될 수 있는 예측 단위를 설명하기 위한 도면이다. 4 is a diagram for describing a prediction unit that may be applied to the present invention.

도 5는 본 발명이 적용될 수 있는 실시예로서, 인터 예측의 방향을 예시하는 도면이다.5 is a diagram illustrating a direction of inter prediction as an embodiment to which the present invention may be applied.

도 6은 본 발명이 적용될 수 있는 실시예로서, 1/4 샘플 보간을 위한 정수 및 분수 샘플 위치를 예시한다. 6 illustrates integer and fractional sample positions for quarter sample interpolation, as an embodiment to which the present invention may be applied.

도 7은 본 발명이 적용될 수 있는 실시예로서, 공간적 후보의 위치를 예시한다. 7 illustrates a position of a spatial candidate as an embodiment to which the present invention may be applied.

도 8은 본 발명이 적용되는 실시예로서, 인터 예측 방법을 예시하는 도면이다. 8 is a diagram illustrating an inter prediction method as an embodiment to which the present invention is applied.

도 9는 본 발명이 적용될 수 있는 실시예로서, 움직임 보상 과정을 예시하는 도면이다. 9 is a diagram illustrating a motion compensation process as an embodiment to which the present invention may be applied.

도 10은 머지 후보 리스트를 구성하는 과정을 예시하는 도면이다. 10 is a diagram illustrating a process of constructing a merge candidate list.

도 11은 본 발명의 일 실시예에 따른 움직임 정보 후보 리스트의 구성 예를 도시한다. 11 illustrates an example of a configuration of a motion information candidate list according to an embodiment of the present invention.

도 12는 본 발명의 일 실시예에 따른 움직임 정보 후보 리스트를 정렬하는 방법을 예시하는 도면이다. 12 is a diagram illustrating a method of sorting a motion information candidate list according to an embodiment of the present invention.

도 13은 본 발명의 일 실시예에 따른 움직임 정보 후보 리스트를 정렬하는 방법을 예시하는 도면이다. 13 is a diagram illustrating a method of sorting a motion information candidate list according to an embodiment of the present invention.

도 14는 본 발명의 일 실시예에 따른 움직임 정보 후보 리스트 구성 방법을 예시하는 도면이다. 14 is a diagram illustrating a method of constructing a motion information candidate list according to an embodiment of the present invention.

도 15는 본 발명의 일 실시예에 따른 움직임 정보 후보 리스트를 생성하기 위하여 참조 가능한 공간적/시간적 이웃 블록을 예시하는 도면이다. 15 is a diagram illustrating a spatial / temporal neighbor block that can be referred to to generate a motion information candidate list according to an embodiment of the present invention.

도 16은 본 발명의 일 실시예에 따른 움직임 정보 후보 리스트를 생성하기 위하여 참조 가능한 공간적 이웃 블록을 예시하는 도면이다. 16 is a diagram illustrating a spatial neighboring block that can be referred to for generating a motion information candidate list according to an embodiment of the present invention.

도 17은 본 발명의 일 실시예에 따른 움직임 정보 후보 리스트 구성 방법을 예시하는 도면이다.17 is a diagram illustrating a method of constructing a motion information candidate list according to an embodiment of the present invention.

도 18은 본 발명의 일 실시예에 따른 움직임 정보 후보 리스트 구성 방법을 예시하는 도면이다. 18 is a diagram illustrating a method of constructing a motion information candidate list according to an embodiment of the present invention.

도 19는 본 발명의 일 실시예에 따른 장기 움직임 정보를 이용하여 움직임 정보 후보 리스트를 구성하는 방법을 예시한다. 19 illustrates a method of constructing a motion information candidate list using long-term motion information according to an embodiment of the present invention.

도 20은 본 발명의 일 실시예에 따른 장기 움직임 정보로서 픽쳐의 전역적인 움직임 정보를 예시한다. 20 illustrates global motion information of a picture as long-term motion information according to an embodiment of the present invention.

도 21은 본 발명의 일 실시예에 따른 장기 움직임 정보로서 픽쳐의 전역적인 움직임 정보를 도출하는 방법을 예시한다. 21 illustrates a method of deriving global motion information of a picture as long-term motion information according to an embodiment of the present invention.

도 22는 본 발명의 일 실시예에 따른 장기 움직임 정보를 이용하여 움직임 정보 후보 리스트를 구성하는 방법을 예시한다.22 illustrates a method of constructing a motion information candidate list using long-term motion information according to an embodiment of the present invention.

도 23은 본 발명의 일 실시예에 따른 인터 예측 기반 영상 처리 방법을 예시하는 도면이다. 23 is a diagram illustrating an inter prediction based image processing method according to an embodiment of the present invention.

도 24는 본 발명의 일 실시예에 따른 인터 예측부를 예시하는 도면이다.24 is a diagram illustrating an inter predictor according to an embodiment of the present invention.

이하, 본 발명에 따른 바람직한 실시 형태를 첨부된 도면을 참조하여 상세하게 설명한다. 첨부된 도면과 함께 이하에 개시될 상세한 설명은 본 발명의 예시적인 실시형태를 설명하고자 하는 것이며, 본 발명이 실시될 수 있는 유일한 실시형태를 나타내고자 하는 것이 아니다. 이하의 상세한 설명은 본 발명의 완전한 이해를 제공하기 위해서 구체적 세부사항을 포함한다. 그러나, 당업자는 본 발명이 이러한 구체적 세부사항 없이도 실시될 수 있음을 안다. Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. The detailed description, which will be given below with reference to the accompanying drawings, is intended to explain 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 in order to provide a thorough understanding of the present invention. However, one of ordinary skill in the art appreciates that the present invention may be practiced without these specific details.

몇몇 경우, 본 발명의 개념이 모호해지는 것을 피하기 위하여 공지의 구조 및 장치는 생략되거나, 각 구조 및 장치의 핵심기능을 중심으로 한 블록도 형식으로 도시될 수 있다. In some instances, well-known structures and devices may be omitted or shown in block diagram form centering on the core functions of the structures and devices in order to avoid obscuring the concepts of the present invention.

아울러, 본 발명에서 사용되는 용어는 가능한 한 현재 널리 사용되는 일반적인 용어를 선택하였으나, 특정한 경우는 출원인이 임의로 선정한 용어를 사용하여 설명한다. 그러한 경우에는 해당 부분의 상세 설명에서 그 의미를 명확히 기재하므로, 본 발명의 설명에서 사용된 용어의 명칭만으로 단순 해석되어서는 안 될 것이며 그 해당 용어의 의미까지 파악하여 해석되어야 함을 밝혀두고자 한다.In addition, the terminology used in the present invention was selected as a general term widely used as possible now, in a specific case will be described using terms arbitrarily selected by the applicant. In such a case, since the meaning is clearly described in the detailed description of the 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 understood that the meaning of the term should be interpreted. .

이하의 설명에서 사용되는 특정 용어들은 본 발명의 이해를 돕기 위해서 제공된 것이며, 이러한 특정 용어의 사용은 본 발명의 기술적 사상을 벗어나지 않는 범위에서 다른 형태로 변경될 수 있다. 예를 들어, 신호, 데이터, 샘플, 픽쳐, 프레임, 블록 등의 경우 각 코딩 과정에서 적절하게 대체되어 해석될 수 있을 것이다.Specific terms used in the following description are provided to help the understanding of the present invention, and the use of such specific terms may be changed to 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.

이하 본 명세서에서 '처리 단위'은 예측, 변환 및/또는 양자화 등과 같은 인코딩/디코딩의 처리 과정이 수행되는 단위를 의미한다. 이하, 설명의 편의를 위해 처리 단위는 '처리 블록' 또는 '블록'으로 지칭될 수도 있다. Hereinafter, in the present specification, a 'processing unit' refers to a unit in which an encoding / decoding process such as prediction, transformation, and / or quantization is performed. Hereinafter, for convenience of description, a processing unit may be referred to as a 'processing block' or 'block'.

처리 단위는 휘도(luma) 성분에 대한 단위와 색차(chroma) 성분에 대한 단위를 포함하는 의미로 해석될 수 있다. 예를 들어, 처리 단위는 코딩 트리 단위(CTU: Coding Tree Unit), 코딩 단위(CU: Coding Unit), 예측 단위(PU: Prediction Unit) 또는 변환 단위(TU: Transform Unit)에 해당될 수 있다. The processing unit may be interpreted to include a unit for a luma component and a unit for a chroma component. For example, the processing unit may correspond to a Coding Tree Unit (CTU), a Coding Unit (CU), a Prediction Unit (PU), or a Transform Unit (TU).

또한, 처리 단위는 휘도(luma) 성분에 대한 단위 또는 색차(chroma) 성분에 대한 단위로 해석될 수 있다. 예를 들어, 처리 단위는 휘도(luma) 성분에 대한 코딩 트리 블록(CTB: Coding Tree Block), 코딩 블록(CB: Coding Block), 예측 블록(PU: Prediction Block) 또는 변환 블록(TB: Transform Block)에 해당될 수 있다. 또는, 색차(chroma) 성분에 대한 코딩 트리 블록(CTB), 코딩 블록(CB), 예측 블록(PU) 또는 변환 블록(TB)에 해당될 수 있다. 또한, 이에 한정되는 것은 아니며 처리 단위는 휘도(luma) 성분에 대한 단위와 색차(chroma) 성분에 대한 단위를 포함하는 의미로 해석될 수도 있다. In addition, the processing unit may be interpreted as a unit for a luma component or a unit for a chroma component. For example, the processing unit may be a coding tree block (CTB), a coding block (CB), a prediction block (PU), or a transform block (TB) for a luma component. May correspond to. Or, it may correspond to a coding tree block (CTB), a coding block (CB), a prediction block (PU), or a transform block (TB) for a chroma component. In addition, the present invention is not limited thereto, and the processing unit may be interpreted to include a unit for a luminance component and a unit for a chroma component.

또한, 처리 단위는 반드시 정사각형의 블록으로 한정되는 것은 아니며, 3개 이상의 꼭지점을 가지는 다각형 형태로 구성될 수도 있다. In addition, the processing unit is not necessarily limited to a square block, but may also be configured in a polygonal form having three or more vertices.

도 1은 본 발명이 적용되는 실시예로서, 정지 영상 또는 동영상 신호의 인코딩이 수행되는 인코더의 개략적인 블록도를 나타낸다.1 is a schematic block diagram of an encoder in which encoding of a still image or video signal is performed according to an embodiment to which the present invention is applied.

도 1을 참조하면, 인코더(100)는 영상 분할부(110), 감산기(115), 변환부(120), 양자화부(130), 역양자화부(140), 역변환부(150), 필터링부(160), 복호 픽쳐 버퍼(DPB: Decoded Picture Buffer)(170), 예측부(180) 및 엔트로피 인코딩부(190)를 포함하여 구성될 수 있다. 그리고, 예측부(180)는 인터 예측부(181), 인트라 예측부(182)을 포함하여 구성될 수 있다. Referring to FIG. 1, the encoder 100 may include an image divider 110, a subtractor 115, a transform unit 120, a quantizer 130, an inverse quantizer 140, an inverse transform unit 150, and a filtering unit. 160, a decoded picture buffer (DPB) 170, a predictor 180, and an entropy encoder 190. The predictor 180 may include an inter predictor 181 and an intra predictor 182.

영상 분할부(110)는 인코더(100)에 입력된 입력 영상 신호(Input video signal)(또는, 픽쳐, 프레임)를 하나 이상의 처리 단위로 분할한다. The image divider 110 divides an input video signal (or a picture or a frame) input to the encoder 100 into one or more processing units.

감산기(115)는 입력 영상 신호에서 예측부(180)로부터(즉, 인터 예측부(181) 또는 인트라 예측부(182))로부터 출력된 예측 신호(prediction signal)(또는 예측 블록)를 감산하여 차분 신호(residual signal)(또는 차분 블록)를 생성한다. 생성된 차분 신호(또는 차분 블록)는 변환부(120)로 전송된다. The subtractor 115 subtracts the difference from the prediction signal (or prediction block) output from the prediction unit 180 (that is, the inter prediction unit 181 or the intra prediction unit 182) in the input image signal. Generate a residual signal (or difference block). The generated difference signal (or difference block) is transmitted to the converter 120.

변환부(120)는 차분 신호(또는 차분 블록)에 변환 기법(예를 들어, DCT(Discrete Cosine Transform), DST(Discrete Sine Transform), GBT(Graph-Based Transform), KLT(Karhunen-Loeve transform) 등)을 적용하여 변환 계수(transform coefficient)를 생성한다. 이때, 변환부(120)는 차분 블록에 적용된 예측 모드와 차분 블록의 크기에 따라서 결정된 변환 기법을 이용하여 변환을 수행함으로써 변환 계수들을 생성할 수 있다. The transform unit 120 may convert a differential signal (or a differential block) into a transform scheme (eg, a discrete cosine transform (DCT), a discrete sine transform (DST), a graph-based transform (GBT), and a karhunen-loeve transform (KLT)). Etc.) to generate transform coefficients. In this case, the transform unit 120 may generate transform coefficients by performing a transform using a transform mode determined according to the prediction mode applied to the difference block and the size of the difference block.

양자화부(130)는 변환 계수를 양자화하여 엔트로피 인코딩부(190)로 전송하고, 엔트로피 인코딩부(190)는 양자화된 신호(quantized signal)를 엔트로피 코딩하여 비트 스트림으로 출력한다.The quantization unit 130 quantizes the transform coefficients and transmits the transform coefficients to the entropy encoding unit 190, and the entropy encoding unit 190 entropy codes the quantized signals and outputs them as bit streams.

한편, 양자화부(130)로부터 출력된 양자화된 신호(quantized signal)는 예측 신호를 생성하기 위해 이용될 수 있다. 예를 들어, 양자화된 신호(quantized signal)는 루프 내의 역양자화부(140) 및 역변환부(150)를 통해 역양자화 및 역변환을 적용함으로써 차분 신호를 복원할 수 있다. 복원된 차분 신호를 인터 예측부(181) 또는 인트라 예측부(182)로부터 출력된 예측 신호(prediction signal)에 더함으로써 복원 신호(reconstructed signal)가 생성될 수 있다. Meanwhile, the quantized signal output from the quantization unit 130 may be used to generate a prediction signal. For example, the quantized signal may recover the differential signal by applying inverse quantization and inverse transformation through an inverse quantization unit 140 and an inverse transformation unit 150 in a loop. A reconstructed signal may be generated by adding the reconstructed difference signal to a prediction signal output from the inter predictor 181 or the intra predictor 182.

한편, 위와 같은 압축 과정에서 인접한 블록들이 서로 다른 양자화 파라미터에 의해 양자화됨으로써 블록 경계가 보이는 열화가 발생될 수 있다. 이러한 현상을 블록킹 열화(blocking artifacts)라고 하며, 이는 화질을 평가하는 중요한 요소 중의 하나이다. 이러한 열화를 줄이기 위해 필터링 과정을 수행할 수 있다. 이러한 필터링 과정을 통해 블록킹 열화를 제거함과 동시에 현재 픽쳐에 대한 오차를 줄임으로써 화질을 향상시킬 수 있게 된다.Meanwhile, in the compression process as described above, adjacent blocks are quantized by different quantization parameters, thereby causing deterioration of the block boundary. This phenomenon is called blocking artifacts, which is one of the important factors in evaluating image quality. In order to reduce such deterioration, a filtering process may be performed. Through this filtering process, the image quality can be improved by removing the blocking degradation and reducing the error of the current picture.

필터링부(160)는 복원 신호에 필터링을 적용하여 이를 재생 장치로 출력하거나 복호 픽쳐 버퍼(170)에 전송한다. 복호 픽쳐 버퍼(170)에 전송된 필터링된 신호는 인터 예측부(181)에서 참조 픽쳐로 사용될 수 있다. 이처럼, 필터링된 픽쳐를 화면간 예측 모드에서 참조 픽쳐로 이용함으로써 화질 뿐만 아니라 부호화 효율도 향상시킬 수 있다. The filtering unit 160 applies filtering to the reconstruction signal and outputs it to the reproduction apparatus or transmits the decoded picture buffer to the decoding picture buffer 170. The filtered signal transmitted to the decoded picture buffer 170 may be used as the reference picture in the inter prediction unit 181. As such, by using the filtered picture as a reference picture in the inter prediction mode, not only image quality but also encoding efficiency may be improved.

복호 픽쳐 버퍼(170)는 필터링된 픽쳐를 인터 예측부(181)에서의 참조 픽쳐으로 사용하기 위해 저장할 수 있다.The decoded picture buffer 170 may store the filtered picture for use as a reference picture in the inter prediction unit 181.

인터 예측부(181)는 복원 픽쳐(reconstructed picture)를 참조하여 시간적 중복성 및/또는 공간적 중복성을 제거하기 위해 시간적 예측 및/또는 공간적 예측을 수행한다. The inter prediction unit 181 performs temporal prediction and / or spatial prediction to remove temporal redundancy and / or spatial redundancy with reference to a reconstructed picture.

여기서, 예측을 수행하기 위해 이용되는 참조 픽쳐는 이전 시간에 부호화/복호화 시 블록 단위로 양자화와 역양자화를 거친 변환된 신호이기 때문에, 블로킹 아티팩트(blocking artifact)나 링잉 아티팩트(ringing artifact)가 존재할 수 있다. Here, since the reference picture used to perform the prediction is a transformed signal that has been quantized and dequantized in units of blocks at the time of encoding / decoding in the previous time, blocking artifacts or ringing artifacts may exist. have.

따라서, 인터 예측부(181)는 이러한 신호의 불연속이나 양자화로 인한 성능 저하를 해결하기 위해, 로우패스 필터(lowpass filter)를 적용함으로써 픽셀들 사이의 신호를 서브-픽셀 단위로 보간할 수 있다. 여기서, 서브-픽셀은 보간 필터를 적용하여 생성된 가상의 화소를 의미하고, 정수 픽셀은 복원된 픽쳐에 존재하는 실제 화소를 의미한다. 보간 방법으로는 선형 보간, 양선형 보간(bi-linear interpolation), 위너 필터(wiener filter) 등이 적용될 수 있다.Accordingly, the inter prediction unit 181 may interpolate the signals between pixels in sub-pixel units by applying a lowpass filter to solve performance degradation due to discontinuity or quantization of such signals. Herein, the sub-pixels mean virtual pixels generated by applying an interpolation filter, and the integer pixels mean actual pixels existing in the reconstructed picture. As the interpolation method, linear interpolation, bi-linear interpolation, wiener filter, or the like may be applied.

보간 필터는 복원 픽쳐(reconstructed picture)에 적용되어 예측의 정밀도를 향상시킬 수 있다. 예를 들어, 인터 예측부(181)는 정수 픽셀에 보간 필터를 적용하여 보간 픽셀을 생성하고, 보간 픽셀들(interpolated pixels)로 구성된 보간 블록(interpolated block)을 예측 블록(prediction block)으로 사용하여 예측을 수행할 수 있다. The interpolation filter may be applied to a reconstructed picture to improve the precision of prediction. For example, the inter prediction unit 181 generates an interpolation pixel by applying an interpolation filter to integer pixels, and uses an interpolated block composed of interpolated pixels as a prediction block. You can make predictions.

인트라 예측부(182)는 현재 부호화를 진행하려고 하는 블록의 주변에 있는 샘플들을 참조하여 현재 블록을 예측한다. 인트라 예측부(182)는, 인트라 예측을 수행하기 위해 다음과 같은 과정을 수행할 수 있다. 먼저, 예측 신호를 생성하기 위해 필요한 참조 샘플을 준비할 수 있다. 그리고, 준비된 참조 샘플을 이용하여 예측 신호를 생성할 수 있다. 이후, 예측 모드를 부호화하게 된다. 이때, 참조 샘플은 참조 샘플 패딩 및/또는 참조 샘플 필터링을 통해 준비될 수 있다. 참조 샘플은 예측 및 복원 과정을 거쳤기 때문에 양자화 에러가 존재할 수 있다. 따라서, 이러한 에러를 줄이기 위해 인트라 예측에 이용되는 각 예측 모드에 대해 참조 샘플 필터링 과정이 수행될 수 있다. The intra predictor 182 predicts the current block by referring to samples in the vicinity of the block to which the current encoding is to be performed. The intra prediction unit 182 may perform the following process to perform intra prediction. First, reference samples necessary for generating a prediction signal may be prepared. The prediction signal may be generated using the prepared reference sample. Then, the prediction mode is encoded. In this case, the reference sample may be prepared through reference sample padding and / or reference sample filtering. Since the reference sample has been predicted and reconstructed, there may be a quantization error. Accordingly, the reference sample filtering process may be performed for each prediction mode used for intra prediction to reduce such an error.

인터 예측부(181) 또는 상기 인트라 예측부(182)를 통해 생성된 예측 신호(prediction signal)(또는 예측 블록)는 복원 신호(또는 복원 블록)를 생성하기 위해 이용되거나 차분 신호(또는 차분 블록)를 생성하기 위해 이용될 수 있다. The prediction signal (or prediction block) generated by the inter prediction unit 181 or the intra prediction unit 182 is used to generate a reconstruction signal (or reconstruction block) or a differential signal (or differential block). It can be used to generate.

도 2는 본 발명이 적용되는 실시예로서, 정지 영상 또는 동영상 신호의 인코딩이 수행되는 디코더의 개략적인 블록도를 나타낸다.2 is a schematic block diagram of a decoder in which encoding of a still image or video signal is performed according to an embodiment to which the present invention is applied.

도 2를 참조하면, 디코더(200)는 엔트로피 디코딩부(210), 역양자화부(220), 역변환부(230), 가산기(235), 필터링부(240), 복호 픽쳐 버퍼(DPB: Decoded Picture Buffer Unit)(250), 예측부(260)를 포함하여 구성될 수 있다. 그리고, 예측부(260)는 인터 예측부(261) 및 인트라 예측부(262)를 포함하여 구성될 수 있다. 2, the decoder 200 includes an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an adder 235, a filtering unit 240, and a decoded picture buffer (DPB). Buffer Unit (250), the prediction unit 260 may be configured. The predictor 260 may include an inter predictor 261 and an intra predictor 262.

그리고, 디코더(200)를 통해 출력된 복원 영상 신호(reconstructed video signal)는 재생 장치를 통해 재생될 수 있다.The reconstructed video signal output through the decoder 200 may be reproduced through the reproducing apparatus.

디코더(200)는 도 1의 인코더(100)로부터 출력된 신호(즉, 비트 스트림)을 수신하고, 수신된 신호는 엔트로피 디코딩부(210)를 통해 엔트로피 디코딩된다. The decoder 200 receives a signal (ie, a bit stream) output from the encoder 100 of FIG. 1, and the received signal is entropy decoded through the entropy decoding unit 210.

역양자화부(220)에서는 양자화 스텝 사이즈 정보를 이용하여 엔트로피 디코딩된 신호로부터 변환 계수(transform coefficient)를 획득한다. The inverse quantization unit 220 obtains a transform coefficient from the entropy decoded signal using the quantization step size information.

역변환부(230)에서는 역변환 기법을 적용하여 변환 계수를 역변환하여 차분 신호(residual signal)(또는 차분 블록)를 획득하게 된다. The inverse transform unit 230 applies an inverse transform scheme to inverse transform the transform coefficients to obtain a residual signal (or a differential block).

가산기(235)는 획득된 차분 신호(또는 차분 블록)를 예측부(260)(즉, 인터 예측부(261) 또는 인트라 예측부(262))로부터 출력된 예측 신호(prediction signal)(또는 예측 블록)에 더함으로써 복원 신호(reconstructed signal)(또는 복원 블록)가 생성된다.The adder 235 outputs the obtained difference signal (or difference block) from the prediction unit 260 (that is, the prediction signal (or prediction block) output from the inter prediction unit 261 or the intra prediction unit 262. ) Generates a reconstructed signal (or a reconstruction block).

필터링부(240)는 복원 신호(reconstructed signal)(또는 복원 블록)에 필터링을 적용하여 이를 재생 장치로 출력하거나 복호 픽쳐 버퍼부(250)에 전송한다. 복호 픽쳐 버퍼부(250)에 전송된 필터링된 신호는 인터 예측부(261)에서 참조 픽쳐로 사용될 수 있다. The filtering unit 240 applies filtering to the reconstructed signal (or the reconstructed block) and outputs the filtering to the reproduction device or transmits the decoded picture buffer unit 250 to the reproduction device. The filtered signal transmitted to the decoded picture buffer unit 250 may be used as a reference picture in the inter predictor 261.

본 명세서에서, 인코더(100)의 필터링부(160), 인터 예측부(181) 및 인트라 예측부(182)에서 설명된 실시예들은 각각 디코더의 필터링부(240), 인터 예측부(261) 및 인트라 예측부(262)에도 동일하게 적용될 수 있다.In the present specification, the embodiments described by the filtering unit 160, the inter prediction unit 181, and the intra prediction unit 182 of the encoder 100 are respectively the filtering unit 240, the inter prediction unit 261, and the decoder of the decoder. The same may be applied to the intra predictor 262.

처리 단위 분할 구조Processing unit partition structure

일반적으로 정지 영상 또는 동영상 압축 기술(예를 들어, HEVC)에서는 블록 기반의 영상 압축 방법을 이용한다. 블록 기반의 영상 압축 방법은 영상을 특정 블록 단위로 나누어서 처리하는 방법으로서, 메모리 사용과 연산량을 감소시킬 수 있다. In general, a still image or video compression technique (eg, HEVC) uses a block-based image compression method. The block-based image compression method is a method of processing an image by dividing the image into specific block units, and may reduce memory usage and calculation amount.

도 3은 본 발명에 적용될 수 있는 코딩 단위의 분할 구조를 설명하기 위한 도면이다.3 is a diagram for describing a division structure of a coding unit that may be applied to the present invention.

인코더는 하나의 영상(또는 픽쳐)을 사각형 형태의 코딩 트리 단위(CTU: Coding Tree Unit) 단위로 분할한다. 그리고, 래스터 스캔 순서(raster scan order)에 따라 하나의 CTU 씩 순차적으로 인코딩한다.The encoder splits one image (or picture) into coding units of a coding tree unit (CTU) in a rectangular shape. In addition, one CTU is sequentially encoded according to a raster scan order.

HEVC에서 CTU의 크기는 64×64, 32×32, 16×16 중 어느 하나로 정해질 수 있다. 인코더는 입력된 영상의 해상도 또는 입력된 영상의 특성 등에 따라 CTU의 크기를 선택하여 사용할 수 있다. CTU은 휘도(luma) 성분에 대한 코딩 트리 블록(CTB: Coding Tree Block)과 이에 대응하는 두 개의 색차(chroma) 성분에 대한 CTB를 포함한다. In HEVC, the size of the CTU may be set to any one of 64 × 64, 32 × 32, and 16 × 16. The encoder may select and use the size of the CTU according to the resolution of the input video or the characteristics of the input video. The CTU includes a coding tree block (CTB) for luma components and a CTB for two chroma components corresponding thereto.

하나의 CTU은 쿼드-트리(Quad-tree) 구조로 분할될 수 있다. 즉, 하나의 CTU은 정사각형 형태를 가지면서 절반의 수평 크기(half horizontal size) 및 절반의 수직 크기(half vertical size)를 가지는 4개의 단위로 분할되어 코딩 단위(CU: Coding Unit)이 생성될 수 있다. 이러한 쿼드-트리 구조의 분할은 재귀적으로 수행될 수 있다. 즉, CU은 하나의 CTU로부터 쿼드-트리 구조로 계층적으로 분할된다.One CTU may be divided into a quad-tree structure. That is, one CTU has a square shape and is divided into four units having a half horizontal size and a half vertical size to generate a coding unit (CU). have. This partitioning of the quad-tree structure can be performed recursively. That is, a CU is hierarchically divided into quad-tree structures from one CTU.

CU은 입력 영상의 처리 과정, 예컨대 인트라(intra)/인터(inter) 예측이 수행되는 코딩의 기본 단위를 의미한다. CU은 휘도(luma) 성분에 대한 코딩 블록(CB: Coding Block)과 이에 대응하는 두 개의 색차(chroma) 성분에 대한 CB를 포함한다. HEVC에서 CU의 크기는 64×64, 32×32, 16×16, 8×8 중 어느 하나로 정해질 수 있다. CU refers to a basic unit of coding in which an input image is processed, for example, intra / inter prediction is performed. The CU includes a coding block (CB) for a luma component and a CB for two chroma components corresponding thereto. In HEVC, the size of a CU may be set to any one of 64 × 64, 32 × 32, 16 × 16, and 8 × 8.

도 3을 참조하면, 쿼드-트리의 루트 노드(root node)는 CTU와 관련된다. 쿼드-트리는 리프 노드(leaf node)에 도달할 때까지 분할되고, 리프 노드는 CU에 해당한다. Referring to FIG. 3, the root node of the quad-tree is associated with the CTU. The quad-tree is split until it reaches a leaf node, which corresponds to a CU.

보다 구체적으로 살펴보면, CTU는 루트 노드(root node)에 해당되고, 가장 작은 깊이(depth)(즉, depth=0) 값을 가진다. 입력 영상의 특성에 따라 CTU가 분할되지 않을 수도 있으며, 이 경우 CTU은 CU에 해당한다. More specifically, the CTU corresponds to a root node and has a smallest depth (ie, depth = 0). The CTU may not be divided according to the characteristics of the input image. In this case, the CTU corresponds to a CU.

CTU은 쿼드 트리 형태로 분할될 수 있으며, 그 결과 깊이 1(depth=1)인 하위 노드들이 생성된다. 그리고, 1의 깊이를 가지는 하위 노드에서 더 이상 분할되지 않은 노드(즉, 리프 노드)는 CU에 해당한다. 예를 들어, 도 3(b)에서 노드 a, b 및 j에 대응하는 CU(a), CU(b), CU(j)는 CTU에서 한 번 분할되었으며, 1의 깊이를 가진다.The CTU may be divided into quad tree shapes, resulting in lower nodes having a depth of 1 (depth = 1). In addition, a node that is no longer divided (ie, a leaf node) in a lower node having a depth of 1 corresponds to a CU. For example, in FIG. 3 (b), CU (a), CU (b), and CU (j) corresponding to nodes a, b, and j are divided once in the CTU and have a depth of one.

1의 깊이를 가지는 노드 중 적어도 어느 하나는 다시 퀴드 트리 형태로 분할될 수 있으며, 그 결과 깊이 1(즉, depth=2)인 하위 노드들이 생성된다. 그리고, 2의 깊이를 가지는 하위 노드에서 더 이상 분할되지 않은 노드(즉, 리프 노드)는 CU에 해당한다. 예를 들어, 도 3(b)에서 노드 c, h 및 i에 대응하는 CU(c), CU(h), CU(i)는 CTU에서 두 번 분할되었으며, 2의 깊이를 가진다. At least one of the nodes having a depth of 1 may be split into a quad tree again, resulting in lower nodes having a depth of 1 (ie, depth = 2). In addition, a node (ie, a leaf node) that is no longer divided in a lower node having a depth of 2 corresponds to a CU. For example, in FIG. 3 (b), CU (c), CU (h) and CU (i) corresponding to nodes c, h and i are divided twice in the CTU and have a depth of two.

또한, 2의 깊이를 가지는 노드 중 적어도 어느 하나는 다시 쿼드 트리 형태로 분할될 수 있으며, 그 결과 깊이 3(즉, depth=3)인 하위 노드들이 생성된다. 그리고, 3의 깊이를 가지는 하위 노드에서 더 이상 분할되지 않은 노드(즉, 리프 노드)는 CU에 해당한다. 예를 들어, 도 3(b)에서 노드 d, e, f, g에 대응하는 CU(d), CU(e), CU(f), CU(g)는 CTU에서 3번 분할되었으며, 3의 깊이를 가진다.In addition, at least one of the nodes having a depth of 2 may be divided into quad tree shapes, resulting in lower nodes having a depth of 3 (ie, depth = 3). And, a node that is no longer partitioned (ie, a leaf node) in a lower node having a depth of 3 corresponds to a CU. For example, in FIG. 3 (b), CU (d), CU (e), CU (f), and CU (g) corresponding to nodes d, e, f, and g are divided three times in the CTU, Has depth.

인코더에서는 비디오 영상의 특성(예를 들어, 해상도)에 따라서 혹은 부호화의 효율을 고려하여 CU의 최대 크기 또는 최소 크기를 결정할 수 있다. 그리고, 이에 대한 정보 또는 이를 유도할 수 있는 정보가 비트스트림에 포함될 수 있다. 최대 크기를 가지는 CU를 최대 코딩 단위(LCU: Largest Coding Unit)이라고 지칭하며, 최소 크기를 가지는 CU를 최소 코딩 단위(SCU: Smallest Coding Unit)이라고 지칭할 수 있다. In the encoder, the maximum size or the minimum size of the CU may be determined according to characteristics (eg, resolution) of the video image or in consideration of encoding efficiency. Information about this or information capable of deriving the information may be included in the bitstream. A CU having a maximum size may be referred to as a largest coding unit (LCU), and a CU having a minimum size may be referred to as a smallest coding unit (SCU).

또한, 트리 구조를 갖는 CU은 미리 정해진 최대 깊이 정보(또는, 최대 레벨 정보)를 가지고 계층적으로 분할될 수 있다. 그리고, 각각의 분할된 CU은 깊이 정보를 가질 수 있다. 깊이 정보는 CU의 분할된 횟수 및/또는 정도를 나타내므로, CU의 크기에 관한 정보를 포함할 수도 있다.In addition, a CU having a tree structure may be hierarchically divided with predetermined maximum depth information (or maximum level information). Each partitioned CU may have depth information. Since the depth information indicates the number and / or degree of division of the CU, the depth information may include information about the size of the CU.

LCU가 쿼드 트리 형태로 분할되므로, LCU의 크기 및 최대 깊이 정보를 이용하면 SCU의 크기를 구할 수 있다. 또는 역으로, SCU의 크기 및 트리의 최대 깊이 정보를 이용하면, LCU의 크기를 구할 수 있다.Since the LCU is divided into quad tree shapes, the size of the SCU can be obtained by using the size and maximum depth information of the LCU. Or conversely, using the size of the SCU and the maximum depth information of the tree, the size of the LCU can be obtained.

하나의 CU에 대하여, 해당 CU이 분할 되는지 여부를 나타내는 정보(예를 들어, 분할 CU 플래그(split_cu_flag))가 디코더에 전달될 수 있다. 이 분할 모드는 SCU을 제외한 모든 CU에 포함되어 있다. 예를 들어, 분할 여부를 나타내는 플래그의 값이 '1'이면 해당 CU은 다시 4개의 CU으로 나누어지고, 분할 여부를 나타내는 플래그의 값이 '0'이면 해당 CU은 더 이상 나누어지지 않고 해당 CU에 대한 처리 과정이 수행될 수 있다.For one CU, information indicating whether the corresponding CU is split (for example, a split CU flag split_cu_flag) may be transmitted to the decoder. This split mode is included in all CUs except the SCU. For example, if the flag indicating whether to split or not is '1', the CU is divided into 4 CUs again. If the flag indicating whether to split or not is '0', the CU is not divided further. Processing may be performed.

상술한 바와 같이, CU는 인트라 예측 또는 인터 예측이 수행되는 코딩의 기본 단위이다. HEVC는 입력 영상을 보다 효과적으로 코딩하기 위하여 CU를 예측 단위(PU: Prediction Unit) 단위로 분할한다. As described above, a CU is a basic unit of coding in which intra prediction or inter prediction is performed. HEVC divides a CU into prediction units (PUs) in order to code an input image more effectively.

PU는 예측 블록을 생성하는 기본 단위로서, 하나의 CU 내에서도 PU 단위로 서로 다르게 예측 블록을 생성할 수 있다. 다만, 하나의 CU 내에 속한 PU들은 인트라 예측과 인터 예측이 혼합되어 사용되지 않으며, 하나의 CU 내에 속한 PU들은 동일한 예측 방법(즉, 인트라 예측 혹은 인터 예측)으로 코딩된다.The PU is a basic unit for generating a prediction block, and may generate different prediction blocks in PU units within one CU. However, PUs belonging to one CU are not mixed with intra prediction and inter prediction, and PUs belonging to one CU are coded by the same prediction method (ie, intra prediction or inter prediction).

PU는 쿼드-트리 구조로 분할되지 않으며, 하나의 CU에서 미리 정해진 형태로 한번 분할된다. 이에 대하여 아래 도면을 참조하여 설명한다.The PU is not divided into quad-tree structures, but is divided once in a predetermined form in one CU. This will be described with reference to the drawings below.

도 4는 본 발명에 적용될 수 있는 예측 단위를 설명하기 위한 도면이다. 4 is a diagram for describing a prediction unit that may be applied to the present invention.

PU는 PU가 속하는 CU의 코딩 모드로 인트라 예측 모드가 사용되는지 인터 예측 모드가 사용되는지에 따라 상이하게 분할된다.The PU is divided differently according to whether an intra prediction mode or an inter prediction mode is used as a coding mode of a CU to which the PU belongs.

도 4(a)는 인트라 예측 모드가 사용되는 경우의 PU를 예시하고, 도 4(b)는 인터 예측 모드가 사용되는 경우의 PU를 예시한다. FIG. 4A illustrates a PU when an intra prediction mode is used, and FIG. 4B illustrates a PU when an inter prediction mode is used.

도 4(a)를 참조하면, 하나의 CU의 크기가 2N×2N(N=4,8,16,32)인 경우를 가정하면, 하나의 CU는 2가지 타입(즉, 2N×2N 또는 N×N)으로 분할될 수 있다. Referring to FIG. 4 (a), assuming that a size of one CU is 2N × 2N (N = 4,8,16,32), one CU has two types (ie, 2N × 2N or N). XN).

여기서, 2N×2N 형태의 PU로 분할되는 경우, 하나의 CU 내에 하나의 PU만이 존재하는 것을 의미한다. Here, when divided into 2N × 2N type PU, it means that only one PU exists in one CU.

반면, N×N 형태의 PU로 분할되는 경우, 하나의 CU는 4개의 PU로 분할되고, 각 PU 단위 별로 서로 다른 예측 블록이 생성된다. 다만, 이러한 PU의 분할은 CU의 휘도 성분에 대한 CB의 크기가 최소 크기인 경우(즉, CU가 SCU인 경우)에만 수행될 수 있다. On the other hand, when divided into N × N type PU, one CU is divided into four PUs, and different prediction blocks are generated for each PU unit. However, the division of the PU may be performed only when the size of the CB for the luminance component of the CU is the minimum size (that is, the CU is the SCU).

도 4(b)를 참조하면, 하나의 CU의 크기가 2N×2N(N=4,8,16,32)인 경우를 가정하면, 하나의 CU는 8가지의 PU 타입(즉, 2N×2N, N×N, 2N×N, N×2N, nL×2N, nR×2N, 2N×nU, 2N×nD)으로 분할될 수 있다.Referring to FIG. 4 (b), assuming that a size of one CU is 2N × 2N (N = 4,8,16,32), one CU has 8 PU types (ie, 2N × 2N). , N × N, 2N × N, N × 2N, nL × 2N, nR × 2N, 2N × nU, 2N × nD).

인트라 예측과 유사하게, N×N 형태의 PU 분할은 CU의 휘도 성분에 대한 CB의 크기가 최소 크기인 경우(즉, CU가 SCU인 경우)에만 수행될 수 있다. Similar to intra prediction, PU partitioning in the form of N × N may be performed only when the size of the CB for the luminance component of the CU is the minimum size (that is, the CU is the SCU).

인터 예측에서는 가로 방향으로 분할되는 2N×N 형태 및 세로 방향으로 분할되는 N×2N 형태의 PU 분할을 지원한다. In inter prediction, 2N × N splitting in the horizontal direction and N × 2N splitting in the vertical direction are supported.

또한, 비대칭 움직임 분할(AMP: Asymmetric Motion Partition) 형태인 nL×2N, nR×2N, 2N×nU, 2N×nD 형태의 PU 분할을 지원한다. 여기서, 'n'은 2N의 1/4 값을 의미한다. 다만, AMP는 PU가 속한 CU가 최소 크기의 CU인 경우 사용될 수 없다. In addition, it supports PU partitions of nL × 2N, nR × 2N, 2N × nU, and 2N × nD types, which are Asymmetric Motion Partition (AMP). Here, 'n' means a 1/4 value of 2N. However, AMP cannot be used when the CU to which the PU belongs is a CU of the minimum size.

하나의 CTU 내의 입력 영상을 효율적으로 부호화하기 위해 코딩 단위(CU), 예측 단위(PU), 변환 단위(TU)의 최적의 분할 구조는 아래와 같은 수행 과정을 거쳐 최소 율-왜곡(Rate-Distortion) 값을 기반으로 결정될 수 있다. 예를 들어, 64×64 CTU 내 최적의 CU 분할 과정을 살펴보면, 64×64 크기의 CU에서 8×8 크기의 CU까지의 분할 과정을 거치면서 율-왜곡 비용을 계산할 수 있다. 구체적인 과정은 다음과 같다.In order to efficiently encode an input image in one CTU, an optimal partitioning structure of a coding unit (CU), a prediction unit (PU), and a transformation unit (TU) is performed through the following process to achieve the minimum rate-distortion. It can be determined based on the value. For example, looking at the optimal CU partitioning process in 64 × 64 CTU, rate-distortion cost can be calculated while partitioning from a 64 × 64 CU to an 8 × 8 CU. The specific process is as follows.

1) 64×64 크기의 CU에 대해 인터/인트라 예측, 변환/양자화, 역양자화/역변환 및 엔트로피 인코딩 수행을 통해 최소의 율-왜곡 값을 발생시키는 최적의 PU와 TU의 분할 구조를 결정한다.1) The partition structure of the optimal PU and TU that generates the minimum rate-distortion value is determined by performing inter / intra prediction, transform / quantization, inverse quantization / inverse transform, and entropy encoding for a 64 × 64 CU.

2) 64×64 CU를 32×32 크기의 CU 4개로 분할하고 각 32×32 CU에 대해 최소의 율-왜곡 값을 발생시키는 최적의 PU와 TU의 분할 구조를 결정한다.2) Divide the 64 × 64 CU into four 32 × 32 CUs and determine the optimal PU and TU partitioning structure that generates the minimum rate-distortion value for each 32 × 32 CU.

3) 32×32 CU를 16×16 크기의 CU 4개로 다시 분할하고, 각 16×16 CU에 대해 최소의 율-왜곡 값을 발생시키는 최적의 PU와 TU의 분할 구조를 결정한다.3) The 32 × 32 CU is subdivided into four 16 × 16 CUs, and a partition structure of an optimal PU and TU that generates a minimum rate-distortion value for each 16 × 16 CU is determined.

4) 16×16 CU를 8×8 크기의 CU 4개로 다시 분할하고, 각 8×8 CU에 대해 최소의 율-왜곡 값을 발생시키는 최적의 PU와 TU의 분할 구조를 결정한다.4) Subdivide the 16 × 16 CU into four 8 × 8 CUs and determine the optimal PU and TU partitioning structure that generates the minimum rate-distortion value for each 8 × 8 CU.

5) 위의 3)의 과정에서 산출한 16×16 CU의 율-왜곡 값과 위의 4)의 과정에서 산출한 4개 8×8 CU의 율-왜곡 값의 합을 비교하여 16×16 블록 내에서 최적의 CU의 분할 구조를 결정한다. 이 과정을 나머지 3개의 16×16 CU들에 대해서도 동일하게 수행한다.5) 16 × 16 blocks by comparing the sum of the rate-distortion values of the 16 × 16 CUs calculated in 3) above with the rate-distortion values of the four 8 × 8 CUs calculated in 4) above. Determine the partition structure of the optimal CU within. This process is similarly performed for the remaining three 16 × 16 CUs.

6) 위의 2)의 과정에서 계산된 32×32 CU의 율-왜곡 값과 위의 5)의 과정에서 획득한 4개 16×16 CU의 율-왜곡 값의 합을 비교하여 32×32 블록 내에서 최적의 CU의 분할 구조를 결정한다. 이 과정을 나머지 3개의 32×32 CU들에 대해서도 동일하게 수행한다.6) 32 × 32 block by comparing the sum of the rate-distortion values of the 32 × 32 CUs calculated in 2) above with the rate-distortion values of the four 16 × 16 CUs obtained in 5) above. Determine the partition structure of the optimal CU within. Do this for the remaining three 32x32 CUs.

7) 마지막으로, 위의 1)의 과정에서 계산된 64×64 CU의 율-왜곡 값과 위의 6)의 과정에서 획득한 4개 32×32 CU의 율-왜곡 값의 합을 비교하여 64×64 블록 내에서 최적의 CU의 분할 구조를 결정한다.7) Finally, compare the sum of the rate-distortion values of the 64 × 64 CUs calculated in step 1) with the rate-distortion values of the four 32 × 32 CUs obtained in step 6). The partition structure of the optimal CU is determined within the x64 block.

인트라 예측 모드에서, PU 단위로 예측 모드가 선택되고, 선택된 예측 모드에 대해 실제 TU 단위로 예측과 재구성이 수행된다.In the intra prediction mode, a prediction mode is selected in units of PUs, and prediction and reconstruction are performed in units of actual TUs for the selected prediction mode.

TU는 실제 예측과 재구성이 수행되는 기본 단위를 의미한다. TU는 휘도(luma) 성분에 대한 변환 블록(TB: Transform Block)과 이에 대응하는 두 개의 색차(chroma) 성분에 대한 TB를 포함한다. TU means a basic unit in which actual prediction and reconstruction are performed. The TU includes a transform block (TB) for a luma component and a TB for two chroma components corresponding thereto.

앞서 도 3의 예시에서 하나의 CTU가 쿼드-트리 구조로 분할되어 CU가 생성되는 것과 같이, TU는 코딩하려는 하나의 CU로부터 쿼드-트리 구조로 계층적으로 분할된다. In the example of FIG. 3, as one CTU is divided into quad-tree structures to generate CUs, the TUs are hierarchically divided into quad-tree structures from one CU to be coded.

TU는 쿼드-트리 구조로 분할되므로 CU로부터 분할된 TU는 다시 더 작은 하위 TU로 분할될 수 있다. HEVC에서는 TU의 크기는 32×32, 16×16, 8×8, 4×4 중 어느 하나로 정해질 수 있다.Since the TU is divided into quad-tree structures, the TU divided from the CU can be further divided into smaller lower TUs. In HEVC, the size of the TU may be set to any one of 32 × 32, 16 × 16, 8 × 8, and 4 × 4.

다시 도 3을 참조하면, 쿼드-트리의 루트 노드(root node)는 CU와 관련된다고 가정한다. 쿼드-트리는 리프 노드(leaf node)에 도달할 때까지 분할되고, 리프 노드는 TU에 해당한다. Referring again to FIG. 3, it is assumed that a root node of the quad-tree is associated with a CU. The quad-tree is split until it reaches a leaf node, which corresponds to a TU.

보다 구체적으로 살펴보면, CU는 루트 노드(root node)에 해당되고, 가장 작은 깊이(depth)(즉, depth=0) 값을 가진다. 입력 영상의 특성에 따라 CU가 분할되지 않을 수도 있으며, 이 경우 CU은 TU에 해당한다. In more detail, a CU corresponds to a root node and has a smallest depth (that is, depth = 0). The CU may not be divided according to the characteristics of the input image. In this case, the CU corresponds to a TU.

CU은 쿼드 트리 형태로 분할될 수 있으며, 그 결과 깊이 1(depth=1)인 하위 노드들이 생성된다. 그리고, 1의 깊이를 가지는 하위 노드에서 더 이상 분할되지 않은 노드(즉, 리프 노드)는 TU에 해당한다. 예를 들어, 도 3(b)에서 노드 a, b 및 j에 대응하는 TU(a), TU(b), TU(j)는 CU에서 한 번 분할되었으며, 1의 깊이를 가진다.The CU may be divided into quad tree shapes, resulting in lower nodes having a depth of 1 (depth = 1). In addition, a node (ie, a leaf node) that is no longer divided in a lower node having a depth of 1 corresponds to a TU. For example, in FIG. 3B, TU (a), TU (b), and TU (j) corresponding to nodes a, b, and j are divided once in a CU and have a depth of 1. FIG.

1의 깊이를 가지는 노드 중 적어도 어느 하나는 다시 퀴드 트리 형태로 분할될 수 있으며, 그 결과 깊이 1(즉, depth=2)인 하위 노드들이 생성된다. 그리고, 2의 깊이를 가지는 하위 노드에서 더 이상 분할되지 않은 노드(즉, 리프 노드)는 TU에 해당한다. 예를 들어, 도 3(b)에서 노드 c, h 및 i에 대응하는 TU(c), TU(h), TU(i)는 CU에서 두 번 분할되었으며, 2의 깊이를 가진다. At least one of the nodes having a depth of 1 may be split into a quad tree again, resulting in lower nodes having a depth of 1 (ie, depth = 2). In addition, a node (ie, a leaf node) that is no longer divided in a lower node having a depth of 2 corresponds to a TU. For example, in FIG. 3B, TU (c), TU (h), and TU (i) corresponding to nodes c, h, and i are divided twice in a CU and have a depth of two.

또한, 2의 깊이를 가지는 노드 중 적어도 어느 하나는 다시 쿼드 트리 형태로 분할될 수 있으며, 그 결과 깊이 3(즉, depth=3)인 하위 노드들이 생성된다. 그리고, 3의 깊이를 가지는 하위 노드에서 더 이상 분할되지 않은 노드(즉, 리프 노드)는 CU에 해당한다. 예를 들어, 도 3(b)에서 노드 d, e, f, g에 대응하는 TU(d), TU(e), TU(f), TU(g)는 CU에서 3번 분할되었으며, 3의 깊이를 가진다.In addition, at least one of the nodes having a depth of 2 may be divided into quad tree shapes, resulting in lower nodes having a depth of 3 (ie, depth = 3). And, a node that is no longer partitioned (ie, a leaf node) in a lower node having a depth of 3 corresponds to a CU. For example, in FIG. 3 (b), TU (d), TU (e), TU (f), and TU (g) corresponding to nodes d, e, f, and g are divided three times in a CU. Has depth.

트리 구조를 갖는 TU은 미리 정해진 최대 깊이 정보(또는, 최대 레벨 정보)를 가지고 계층적으로 분할될 수 있다. 그리고, 각각의 분할된 TU은 깊이 정보를 가질 수 있다. 깊이 정보는 TU의 분할된 횟수 및/또는 정도를 나타내므로, TU의 크기에 관한 정보를 포함할 수도 있다.A TU having a tree structure may be hierarchically divided with predetermined maximum depth information (or maximum level information). Each divided TU may have depth information. Since the depth information indicates the number and / or degree of division of the TU, it may include information about the size of the TU.

하나의 TU에 대하여, 해당 TU이 분할 되는지 여부를 나타내는 정보(예를 들어, 분할 TU 플래그(split_transform_flag))가 디코더에 전달될 수 있다. 이 분할 정보는 최소 크기의 TU을 제외한 모든 TU에 포함되어 있다. 예를 들어, 분할 여부를 나타내는 플래그의 값이 '1'이면 해당 TU은 다시 4개의 TU으로 나누어지고, 분할 여부를 나타내는 플래그의 값이 '0'이면 해당 TU은 더 이상 나누어지지 않는다. For one TU, information indicating whether the corresponding TU is split (for example, split TU flag split_transform_flag) may be delivered to the decoder. This partitioning information is included in all TUs except the smallest TU. For example, if the value of the flag indicating whether to split is '1', the corresponding TU is divided into four TUs again. If the value of the flag indicating whether to split is '0', the corresponding TU is no longer divided.

예측(prediction)Prediction

디코딩이 수행되는 현재 처리 단위를 복원하기 위해서 현재 처리 단위가 포함된 현재 픽쳐 또는 다른 픽쳐들의 디코딩된 부분을 이용할 수 있다. The decoded portion of the current picture or other pictures containing the current processing unit may be used to restore the current processing unit in which decoding is performed.

복원에 현재 픽쳐만을 이용하는, 즉 화면내 예측만을 수행하는 픽쳐(슬라이스)를 인트라 픽쳐 또는 I 픽쳐(슬라이스), 각 단위를 예측하기 위하여 최대 하나의 움직임 벡터 및 레퍼런스 인덱스를 이용하는 픽쳐(슬라이스)를 예측 픽쳐(predictive picture) 또는 P 픽쳐(슬라이스), 최대 두 개의 움직임 벡터 및 레퍼런스 인덱스를 이용하는 픽쳐(슬라이스)를 쌍예측 픽쳐(Bi-predictive picture) 또는 B 픽쳐(슬라이스)라고 지칭할 수 있다. Intra picture or I picture (slice) using only the current picture for reconstruction, i.e. performing only intra-picture prediction, and picture (slice) using up to one motion vector and reference index to predict each unit A picture using a predictive picture or P picture (slice), up to two motion vectors, and a reference index (slice) may be referred to as a bi-predictive picture or a B picture (slice).

인트라 예측은 동일한 디코딩된 픽쳐(또는 슬라이스)의 데이터 요소(예를 들어, 샘플 값 등)으로부터 현재 처리 블록을 도출하는 예측 방법을 의미한다. 즉, 현재 픽쳐 내의 복원된 영역들을 참조하여 현재 처리 블록의 픽셀값을 예측하는 방법을 의미한다. Intra prediction means a prediction method that derives the current processing block from data elements (eg, sample values, etc.) of the same decoded picture (or slice). That is, a method of predicting pixel values of the current processing block by referring to reconstructed regions in the current picture.

이하, 인터 예측에 대하여 보다 상세히 살펴본다.Hereinafter, the inter prediction will be described in more detail.

인터Inter 예측(Inter prediction)(또는 화면 간 예측) Inter prediction (or inter screen prediction)

인터 예측은 현재 픽쳐 이외의 픽쳐의 데이터 요소(예를 들어, 샘플 값 또는 움직임 벡터 등)의 기반하여 현재 처리 블록을 도출하는 예측 방법을 의미한다. 즉, 현재 픽쳐 이외의 복원된 다른 픽쳐 내의 복원된 영역들을 참조하여 현재 처리 블록의 픽셀값을 예측하는 방법을 의미한다.Inter prediction means a prediction method of deriving a current processing block based on data elements (eg, sample values or motion vectors, etc.) of pictures other than the current picture. That is, a method of predicting pixel values of the current processing block by referring to reconstructed regions in other reconstructed pictures other than the current picture.

인터 예측(또는 픽처간 예측)은 픽처들 사이에 존재하는 중복성을 제거하는 기술로 대부분 움직임 추정(motion estimation) 및 움직임 보상(motion compensation)을 통해 이루어진다.Inter prediction (or inter picture prediction) is a technique for removing redundancy existing between pictures, and is mostly performed through motion estimation and motion compensation.

도 5는 본 발명이 적용될 수 있는 실시예로서, 인터 예측의 방향을 예시하는 도면이다.5 is a diagram illustrating a direction of inter prediction as an embodiment to which the present invention may be applied.

도 5를 참조하면, 인터 예측은 하나의 블록에 대해 시간축 상에서 과거의 픽쳐 혹은 미래의 픽쳐 하나만을 참조 픽처로 사용하는 단방향 예측(Uni-directional prediction)과 과거와 미래 픽쳐들을 동시에 참조하는 양방향 예측(Bi-directional prediction)으로 나눌 수 있다. Referring to FIG. 5, inter prediction includes uni-directional prediction that uses only one past picture or a future picture as a reference picture on a time axis with respect to one block, and bidirectional prediction that simultaneously refers to past and future pictures. Bi-directional prediction).

또한, 단방향 예측(Uni-directional prediction)은 시간적으로 현재 픽쳐 이전에 표시(또는 출력)되는 1개의 참조 픽쳐를 이용하는 순방향 예측(forward direction prediction)과 시간적으로 현재 픽쳐 이후에 표시(또는 출력)되는 1개의 참조 픽쳐를 이용하는 역방향 예측(backward direction prediction)으로 구분될 수 있다. In addition, uni-directional prediction includes forward direction prediction using one reference picture displayed (or output) before the current picture in time and 1 displayed (or output) after the current picture in time. It can be divided into backward direction prediction using two reference pictures.

인터 예측 과정(즉, 단방향 또는 양방향 예측)에서 현재 블록을 예측하는데 어떤 참조 영역(또는 참조 블록)이 이용되는지 특정하기 위하여 사용되는 움직임 파라미터(또는 정보)는 인터 예측 모드(inter prediction mode)(여기서, 인터 예측 모드는 참조 방향(즉, 단방향 또는 양방향)과 참조 리스트(즉, L0, L1 또는 양방향)을 지시할 수 있음), 참조 인덱스(reference index)(또는 참조 픽쳐 인덱스 또는 참조 리스트 인덱스), 움직임 벡터(motion vector) 정보를 포함한다. 상기 움직임 벡터 정보는 움직임 벡터, 움직임 벡터 예측값(MVP: motion vector prediction) 또는 움직임 벡터 차분값(MVD: motion vector difference)을 포함할 수 있다. 움직임 벡터 차분값은 상기 움직임 벡터와 움직임 벡터 예측값 간의 차분값을 의미한다.The motion parameter (or information) used to specify which reference region (or reference block) is used to predict the current block in the inter prediction process (i.e., unidirectional or bidirectional prediction) is an inter prediction mode (where The inter prediction mode may indicate a reference direction (i.e., unidirectional or bidirectional) and a reference list (i.e., L0, L1 or bidirectional), a reference index (or reference picture index or reference list index), Contains motion vector information. The motion vector information may include a motion vector, a motion vector prediction (MVP), or a motion vector difference (MVD). The motion vector difference value means a difference value between the motion vector and the motion vector prediction value.

단방향 예측은 한 쪽 방향에 대한 움직임 파라미터가 사용된다. 즉, 참조 영역(또는 참조 블록)을 특정하기 위하여 1개의 움직임 파라미터가 필요할 수 있다. For unidirectional prediction, motion parameters for one direction are used. That is, one motion parameter may be needed to specify the reference region (or reference block).

양방향 예측은 양쪽 방향에 대한 움직임 파라미터가 사용된다. 양방향 예측 방식에서는 최대 2개의 참조 영역을 이용할 수 있는데, 이 2개의 참조 영역은 동일한 참조 픽쳐에 존재할 수도 있고, 서로 다른 픽쳐에 각각 존재할 수도 있다. 즉, 양방향 예측 방식에서는 최대 2개의 움직임 파라미터가 이용될 수 있는데, 2개의 움직임 벡터가 동일한 참조 픽쳐 인덱스를 가질 수도 있고 서로 다른 참조 픽쳐 인덱스를 가질 수도 있다. 이때, 참조 픽쳐들은 시간적으로 현재 픽쳐 이전에 모두 표시(또는 출력)되거나 이후에 모두 표시(또는 출력)될 수 있다.Bidirectional prediction uses motion parameters for both directions. In the bidirectional prediction method, up to two reference regions may be used. The two reference regions may exist in the same reference picture or may exist in different pictures, respectively. That is, up to two motion parameters may be used in the bidirectional prediction scheme, and two motion vectors may have the same reference picture index or different reference picture indexes. In this case, all of the reference pictures may be displayed (or output) before or after the current picture in time.

인코더는 인터 예측 과정에서 현재 처리 블록과 가장 유사한 참조 영역을 참조 픽쳐들로부터 찾는 움직임 추정(Motion Estimation)을 수행한다. 그리고, 인코더는 참조 영역에 대한 움직임 파라미터를 디코더에게 제공할 수 있다.The encoder performs motion estimation to find the reference region most similar to the current processing block from the reference pictures in the inter prediction process. In addition, the encoder may provide a decoder with a motion parameter for the reference region.

인코더/디코더는 움직임 파라미터를 이용하여 현재 처리 블록의 참조 영역을 획득할 수 있다. 상기 참조 영역은 상기 참조 인덱스를 가진 참조 픽쳐 내에 존재한다. 또한, 상기 움직임 벡터에 의해서 특정된 참조 영역의 픽셀값 또는 보간(interpolation)된 값이 상기 현재 처리 블록의 예측값(predictor)으로 이용될 수 있다. 즉, 움직임 정보를 이용하여, 이전에 디코딩된 픽쳐로부터 현재 처리 블록의 영상을 예측하는 움직임 보상(motion compensation)이 수행된다.The encoder / decoder may obtain a reference region of the current processing block using the motion parameter. The reference region exists in a reference picture having the reference index. In addition, the pixel value or interpolated value of the reference region specified by the motion vector may be used as a predictor of the current processing block. That is, using motion information, motion compensation is performed to predict an image of a current processing block from a previously decoded picture.

움직임 벡터 정보와 관련한 전송량을 줄이기 위하여, 이전에 코딩된 블록들의 움직임 정보를 이용하여 움직임 벡터 예측값(mvp)을 획득하고, 이에 대한 차분값(mvd)만을 전송하는 방법을 이용할 수 있다. 즉, 디코더에서는 디코딩된 다른 블록들의 움직임 정보들을 이용하여 현재 처리 블록의 움직임 벡터 예측값을 구하고, 인코더로부터 전송된 차분값을 이용하여 현재 처리 블록에 대한 움직임 벡터값을 획득하게 된다. 움직임 벡터 예측값을 획득함에 있어서, 디코더는 이미 디코딩된 다른 블록들의 움직임 정보을 이용하여 다양한 움직임 벡터 후보 값들을 획득하고 그 중 하나를 움직임 벡터 예측값으로 획득할 수 있다. In order to reduce the amount of transmission associated with the motion vector information, a method of acquiring a motion vector prediction value mvp using motion information of previously coded blocks and transmitting only a difference value mvd thereof may be used. That is, the decoder obtains a motion vector prediction value of the current processing block using motion information of other decoded blocks, and obtains a motion vector value for the current processing block using the difference value transmitted from the encoder. In obtaining the motion vector prediction value, the decoder may obtain various motion vector candidate values by using motion information of other blocks that are already decoded, and obtain one of them as the motion vector prediction value.

- 참조 픽쳐 세트 및 참조 픽쳐 리스트Reference picture set and reference picture list

다중의 참조 픽쳐를 관리하기 위하여, 이전에 디코딩된 픽쳐의 세트가 남은 픽쳐의 디코딩을 위해 복호 픽쳐 버퍼(DPB)내 저장된다. To manage multiple reference pictures, a set of previously decoded pictures are stored in a decoded picture buffer (DPB) for decoding the remaining pictures.

DPB에 저장된 복원된 픽쳐 중 인터 예측에 이용되는 복원된 픽쳐를 참조 픽쳐(referece picture)로 지칭한다. 다시 말해, 참조 픽쳐(reference picture)는 디코딩 순서 상 다음의 픽쳐의 디코딩 프로세스에서 인터 예측을 위해 사용될 수 있는 샘플을 포함하는 픽쳐를 의미한다. The reconstructed picture used for inter prediction among the reconstructed pictures stored in the DPB is referred to as a reference picture. In other words, a reference picture refers to a picture including a sample that can be used for inter prediction in a decoding process of a next picture in decoding order.

참조 픽쳐 세트(RPS: reference picture set)는 픽쳐와 연관된 참조 픽쳐의 세트를 의미하고, 디코딩 순서 상 이전에 연관된 모든 픽쳐로 구성된다. 참조 픽쳐 세트는 연관된 픽쳐 또는 디코딩 순서 상 연관된 픽쳐에 뒤따르는 픽쳐의 인터 예측에 이용될 수 있다. 즉, 복호 픽쳐 버퍼(DPB)에 유지되는 참조 픽쳐들은 참조 픽쳐 세트로 지칭될 수 있다. 인코더는 시퀀스 파라미터 세트(SPS: sequence parameter set)(즉, 신택스 요소로 구성되는 신택스 구조) 또는 각 슬라이스 헤더에서 참조 픽쳐 세트 정보를 디코더에게 제공할 수 있다. A reference picture set (RPS) refers to a set of reference pictures associated with a picture, and is composed of all pictures previously associated in decoding order. The reference picture set may be used for inter prediction of an associated picture or a picture following an associated picture in decoding order. That is, reference pictures maintained in the decoded picture buffer DPB may be referred to as a reference picture set. The encoder may provide the decoder with reference picture set information in a sequence parameter set (SPS) (ie, a syntax structure composed of syntax elements) or each slice header.

참조 픽쳐 리스트(reference picture list)는 P 픽쳐(또는 슬라이스) 또는 B 픽쳐(또는 슬라이스)의 인터 예측을 위해 이용되는 참조 픽쳐의 리스트를 의미한다. 여기서, 참조 픽쳐 리스트는 2개의 참조 픽쳐 리스트로 구분될 수 있으며, 각각 참조 픽쳐 리스트 0(또는 L0) 및 참조 픽쳐 리스트 1(또는 L1)로 지칭할 수 있다. 또한, 참조 픽쳐 리스트 0에 속한 참조 픽쳐를 참조 픽쳐 0(또는 L0 참조 픽쳐)로 지칭하고, 참조 픽쳐 리스트 1에 속한 참조 픽쳐를 참조 픽쳐 1(또는 L1 참조 픽쳐)로 지칭할 수 있다.A reference picture list refers to a list of reference pictures used for inter prediction of a P picture (or slice) or a B picture (or slice). Here, the reference picture list may be divided into two reference picture lists, and may be referred to as reference picture list 0 (or L0) and reference picture list 1 (or L1), respectively. Also, a reference picture belonging to reference picture list 0 may be referred to as reference picture 0 (or L0 reference picture), and a reference picture belonging to reference picture list 1 may be referred to as reference picture 1 (or L1 reference picture).

P 픽쳐(또는 슬라이스)의 디코딩 프로세스에 있어서, 하나의 참조 픽쳐 리스트(즉, 참조 픽쳐 리스트 0)가 이용되고, B 픽쳐(또는 슬라이스)의 디코딩 프로세스에 있어서, 2개의 참조 픽쳐 리스트(즉, 참조 픽쳐 리스트 0 및 참조 픽쳐 리스트 1)가 이용될 수 있다. 이러한, 각 참조 픽쳐 별로 참조 픽쳐 리스트를 구분하기 위한 정보는 참조 픽쳐 세트 정보를 통해 디코더에게 제공될 수 있다. 디코더는 참조 픽쳐 세트(reference picture set) 정보를 기반으로 참조 픽쳐를 참조 픽쳐 리스트 0 또는 참조 픽쳐 리스트 1에 추가한다. In the decoding process of P pictures (or slices), one reference picture list (i.e., reference picture list 0) is used, and in the decoding process of B pictures (or slices), two reference picture lists (i.e., reference) Picture list 0 and reference picture list 1) may be used. Such information for distinguishing a reference picture list for each reference picture may be provided to the decoder through reference picture set information. The decoder adds the reference picture to the reference picture list 0 or the reference picture list 1 based on the reference picture set information.

참조 픽쳐 리스트 내 어느 하나의 특정 참조 픽쳐를 식별하기 위하여 참조 픽쳐 인덱스(reference picture index)(또는 참조 인덱스)가 이용된다. A reference picture index (or reference index) is used to identify any one specific reference picture in the reference picture list.

- 분수 샘플 보간(fractional sample interpolation)Fractional sample interpolation

인터 예측된 현재 처리 블록에 대한 예측 블록의 샘플은 참조 픽쳐 인덱스(reference picture index)에 의해 식별되는 참조 픽쳐 내 해당 참조 영역의 샘플 값으로부터 획득된다. 여기서, 참조 픽쳐 내 해당 참조 영역은 움직임 벡터의 수평 요소(horizontal component) 및 수직 요소(vertical component)에 의해 지시되는 위치의 영역을 나타낸다. 움직임 벡터가 정수 값을 가지는 경우를 제외하고, 비정수(noninteger) 샘플 좌표를 위한 예측 샘플을 생성하기 위하여 분수 샘플 보간(fractional sample interpolation)이 사용된다. 예를 들어, 샘플 간의 거리의 1/4 단위의 움직임 벡터가 지원될 수 있다.  A sample of the prediction block for the inter predicted current processing block is obtained from the sample value of the corresponding reference region in the reference picture identified by the reference picture index. Here, the corresponding reference region in the reference picture represents the region of the position indicated by the horizontal component and the vertical component of the motion vector. Fractional sample interpolation is used to generate predictive samples for noninteger sample coordinates, except when the motion vector has an integer value. For example, a motion vector of one quarter of the distance between samples may be supported.

HEVC의 경우, 휘도 성분의 분수 샘플 보간(fractional sample interpolation)은 8탭 필터를 가로 방향 및 세로 방향으로 각각 적용한다. 그리고, 색차 성분의 분수 샘플 보간(fractional sample interpolation)은 4탭 필터를 가로 방향 및 세로 방향으로 각각 적용한다.For HEVC, fractional sample interpolation of luminance components applies an 8-tap filter in the horizontal and vertical directions, respectively. In addition, fractional sample interpolation of the color difference component applies a 4-tap filter in the horizontal direction and the vertical direction, respectively.

도 6은 본 발명이 적용될 수 있는 실시예로서, 1/4 샘플 보간을 위한 정수 및 분수 샘플 위치를 예시한다. 6 illustrates integer and fractional sample positions for quarter sample interpolation, as an embodiment to which the present invention may be applied.

도 6을 참조하면, 대문자(upper-case letter)(A_i,j)가 기재된 음영 블록은 정수 샘플 위치를 나타내고, 소문자(lower-case letter)(x_i,j)가 기재된 음영 없는 블록은 분수 샘플 위치를 나타낸다. Referring to FIG. 6, the shaded block in which the upper-case letter (A_i, j) is written indicates the integer sample position, and the shaded block in which the lower-case letter (x_i, j) is written is the fractional sample position. Indicates.

분수 샘플은 수평 방향 및 수직 방향으로 각각 정수 샘플 값에 보간 필터가 적용되어 생성된다. 예를 들어, 수평 방향의 경우, 생성하려는 분수 샘플을 기준으로 좌측의 4개의 정수 샘플 값과 우측의 4개의 정수 샘플 값에 8탭 필터가 적용될 수 있다. Fractional samples are generated by applying interpolation filters to integer sample values in the horizontal and vertical directions, respectively. For example, in the horizontal direction, an 8-tap filter may be applied to four integer sample values on the left side and four integer sample values on the right side based on the fractional sample to be generated.

- 인터 예측 모드Inter prediction mode

HEVC에서는 움직임 정보의 양을 줄이기 위하여 머지(Merge) 모드, AMVP(Advanced Motion Vector Prediction)를 이용될 수 있다. In HEVC, a merge mode and advanced motion vector prediction (AMVP) may be used to reduce the amount of motion information.

1) 머지(Merge) 모드1) Merge Mode

머지(Merge) 모드는 공간적(spatially) 또는 시간적(temporally)으로 이웃하는 블록으로부터 움직임 파라미터(또는 정보)를 도출하는 방법을 의미한다. Merge mode refers to a method of deriving a motion parameter (or information) from a neighboring block spatially or temporally.

머지 모드에서 이용 가능한 후보의 세트는 공간적으로 이웃하는 후보(spatial neighbor candidates), 시간적 후보(temporal candidates) 및 생성된 후보(generated candidates)로 구성된다. The set of candidates available in merge mode is composed of spatial neighbor candidates, temporal candidates and generated candidates.

도 7은 본 발명이 적용될 수 있는 실시예로서, 공간적 후보의 위치를 예시한다. 7 illustrates a position of a spatial candidate as an embodiment to which the present invention may be applied.

도 7(a)를 참조하면, {A1, B1, B0, A0, B2}의 순서에 따라 각 공간적 후보 블록이 이용 가능한지 여부가 판단된다. 이때, 후보 블록이 인트라 예측 모드로 인코딩되어 움직임 정보가 존재하지 않는 경우 또는 후보 블록이 현재 픽쳐(또는 슬라이스)의 밖에 위치하는 경우에는 해당 후보 블록은 이용할 수 없다. Referring to FIG. 7A, it is determined whether each spatial candidate block is available according to the order of {A1, B1, B0, A0, B2}. In this case, when the candidate block is encoded in the intra prediction mode and there is no motion information, or when the candidate block is located outside the current picture (or slice), the candidate block is not available.

공간적 후보의 유효성의 판단 후, 현재 처리 블록의 후보 블록에서 불필요한 후보 블록을 제외함으로써 공간적 머지 후보가 구성될 수 있다. 예를 들어, 현재 예측 블록의 후보 블록이 동일 코딩 블록 내 첫 번째 예측 블록인 경우 해당 후보 블록을 제외하고 또한 동일한 움직임 정보를 가지는 후보 블록들을 제외할 수 있다. After determining the validity of the spatial candidate, the spatial merge candidate can be constructed by excluding unnecessary candidate blocks from candidate blocks of the current processing block. For example, when the candidate block of the current prediction block is the first prediction block in the same coding block, the candidate block having the same motion information may be excluded except for the corresponding candidate block.

공간적 머지 후보 구성이 완료되면, {T0, T1}의 순서에 따라 시간적 머지 후보 구성 과정이 진행된다. When the spatial merge candidate configuration is completed, the temporal merge candidate configuration process is performed in the order of {T0, T1}.

시간적 후보 구성에 있어서, 참조 픽쳐의 동일 위치(collocated) 블록의 우하단(right bottom) 블록(T0)이 이용 가능한 경우, 해당 블록을 시간적 머지 후보로 구성한다. 동일 위치(collocated) 블록은 선택된 참조 픽쳐에서 현재 처리 블록에 대응되는 위치에 존재하는 블록을 의미한다. 반면, 그렇지 않은 경우, 동일 위치(collocated) 블록의 중앙(center)에 위치하는 블록(T1)을 시간적 머지 후보로 구성한다.In the temporal candidate configuration, when the right bottom block T0 of the collocated block of the reference picture is available, the block is configured as a temporal merge candidate. The colocated block refers to a block existing at a position corresponding to the current processing block in the selected reference picture. On the other hand, otherwise, the block T1 located at the center of the collocated block is configured as a temporal merge candidate.

머지 후보의 최대 개수는 슬라이스 헤더에서 특정될 수 있다. 머지 후보의 개수가 최대 개수보다 큰 경우, 최대 개수 보다 작은 개수의 공간적 후보와 시간적 후보가 유지된다. 그렇지 않은 경우, 현재까지 추가된 후보들을 조합하여 추가적인 머지 후보(즉, 조합된 양방향 예측 머지 후보(combined bi-predictive merging candidates))가 생성된다. 조합된 양방향 예측 머지 후보를 사용하여 머지 후보 리스트를 구성하더라도, 여전히 머지 후보의 개수가 최대 개수보다 작은 경우, 머지 후보의 개수는 후보 개수가 최대 개수가 될 때까지 참조 픽쳐 인덱스를 변경하면서 제로 움직임 벡터 머지 후보(zero motion vector merging candidates)가 머지 후보 리스트에 추가된다. The maximum number of merge candidates may be specified in the slice header. If the number of merge candidates is larger than the maximum number, the number of spatial candidates and temporal candidates smaller than the maximum number is maintained. Otherwise, additional merge candidates (ie, combined bi-predictive merging candidates) are generated by combining the candidates added to date. Even if the merge candidate list is constructed using the combined bi-predictive merge candidates, if the number of merge candidates is still smaller than the maximum number, the number of merge candidates is zero movement while changing the reference picture index until the number of candidate candidates is the maximum number. Zero motion vector merging candidates are added to the merge candidate list.

인코더에서는 위와 같은 방법으로 머지 후보 리스트를 구성하고, 움직임 추정(Motion Estimation)을 수행함으로써 머지 후보 리스트에서 선택된 후보 블록 정보를 머지 인덱스(merge index)(예를 들어, merge_idx[x0][y0]')로써 디코더에게 시그널링한다. 도 7(b)에서는 머지 후보 리스트에서 B1 블록이 선택된 경우를 예시하고 있으며, 이 경우, 머지 인덱스(merge index)로 "인덱스 1(Index 1)"이 디코더로 시그널링될 수 있다. The encoder constructs a merge candidate list in the above manner and performs motion estimation to merge candidate block information selected from the merge candidate list into a merge index (for example, merge_idx [x0] [y0] '). Signal to the decoder. In FIG. 7B, the B1 block is selected from the merge candidate list. In this case, “index 1” may be signaled to the decoder as a merge index.

디코더에서는 인코더와 동일하게 머지 후보 리스트를 구성하고, 머지 후보 리스트에서 인코더로부터 수신한 머지 인덱스(merge index)에 해당하는 후보 블록의 움직임 정보로부터 현재 블록에 대한 움직임 정보를 도출한다. 그리고, 디코더는 도출한 움직임 정보를 기반으로 현재 처리 블록에 대한 예측 블록을 생성한다(즉, 움직임 보상).The decoder constructs a merge candidate list similarly to the encoder, and derives the motion information of the current block from the motion information of the candidate block corresponding to the merge index received from the encoder in the merge candidate list. The decoder generates a prediction block for the current processing block based on the derived motion information (ie, motion compensation).

2) AMVP(Advanced Motion Vector Prediction) 모드2) Advanced Motion Vector Prediction (AMVP) Mode

AMVP 모드는 주변 블록으로부터 움직임 벡터 예측 값을 유도하는 방법을 의미한다. 따라서, 수평 및 수직 움직임 벡터 차분 값(MVD: motion vector difference), 참조 인덱스 및 인터 예측 모드가 디코더로 시그널링된다. 수평 및 수직 움직임 벡터 값은 유도된 움직임 벡터 예측 값과 인코더로부터 제공된 움직임 벡터 차분 값(MVD: motion vector difference)를 이용하여 계산된다.The AMVP mode refers to a method of deriving a motion vector prediction value from neighboring blocks. Thus, horizontal and vertical motion vector difference (MVD), reference index, and inter prediction modes are signaled to the decoder. The horizontal and vertical motion vector values are calculated using the derived motion vector prediction value and the motion vector difference (MVD) provided from the encoder.

즉, 인코더에서는 움직임 벡터 예측값 후보 리스트를 구성하고, 움직임 추정(Motion Estimation)을 수행함으로써 움직임 벡터 예측값 후보 리스트에서 선택된 움직임 참조 플래그(즉, 후보 블록 정보)(예를 들어, mvp_lX_flag[x0][y0]')를 디코더에게 시그널링한다. 디코더에서는 인코더와 동일하게 움직임 벡터 예측값 후보 리스트를 구성하고, 움직임 벡터 예측값 후보 리스트에서 인코더로부터 수신한 움직임 참조 플래그에서 지시된 후보 블록의 움직임 정보를 이용하여 현재 처리 블록의 움직임 벡터 예측값을 도출한다. 그리고, 디코더는 도출된 움직임 벡터 예측값과 인코더로부터 전송된 움직임 벡터 차분값을 이용하여 현재 처리 블록에 대한 움직임 벡터값을 획득하게 된다. 그리고, 디코더는 도출한 움직임 정보를 기반으로 현재 처리 블록에 대한 예측 블록을 생성한다(즉, 움직임 보상). That is, the encoder constructs a motion vector predictor candidate list and performs motion estimation to perform a motion estimation flag (ie, candidate block information) selected from the motion vector predictor candidate list (for example, mvp_lX_flag [x0] [y0). ] ') Is signaled to the decoder. The decoder constructs a motion vector predictor candidate list similarly to the encoder, and derives a motion vector predictor of the current processing block using the motion information of the candidate block indicated by the motion reference flag received from the encoder in the motion vector predictor candidate list. The decoder obtains a motion vector value for the current processing block by using the derived motion vector prediction value and the motion vector difference value transmitted from the encoder. The decoder generates a prediction block for the current processing block based on the derived motion information (ie, motion compensation).

AMVP 모드의 경우, 앞서 도 7에서 5개의 이용 가능한 후보들 중에서 2개의 공간적 움직임 후보가 선택된다. 첫 번째 공간적 움직임 후보는 좌측에 위치한 {A0, A1} 세트로부터 선택되고, 두 번째 공간적 움직임 후보는 상위에 위치한 {B0, B1, B2} 세트로부터 선택된다. 이때, 이웃한 후보 블록의 참조 인덱스가 현재 예측 블록과 동일하지 않은 경우, 움직임 벡터가 스케일링된다. In the AMVP mode, two spatial motion candidates are selected from among the five available candidates in FIG. 7. The first spatial motion candidate is selected from the set of {A0, A1} located on the left side, and the second spatial motion candidate is selected from the set of {B0, B1, B2} located above. At this time, when the reference index of the neighboring candidate block is not the same as the current prediction block, the motion vector is scaled.

공간적 움직임 후보의 탐색 결과 선택된 후보 개수가 2개라면 후보 구성을 종료하나, 2개 미만인 경우 시간적 움직임 후보가 추가된다.If the number of candidates selected as a result of the search for the spatial motion candidate is two, the candidate configuration is terminated, but if less than two, the temporal motion candidate is added.

도 8은 본 발명이 적용되는 실시예로서, 인터 예측 방법을 예시하는 도면이다. 8 is a diagram illustrating an inter prediction method as an embodiment to which the present invention is applied.

도 8을 참조하면, 디코더(특히, 도 2에서 디코더의 인터 예측부(261))는 처리 블록(예를 들어, 예측 단위)에 대한 움직임 파라미터를 복호화한다(S801). Referring to FIG. 8, a decoder (in particular, the inter prediction unit 261 of the decoder in FIG. 2) decodes a motion parameter for a processing block (eg, a prediction unit) (S801).

예를 들어, 처리 블록이 머지 모드가 적용된 경우, 디코더는 인코더로부터 시그널링된 머지 인덱스를 복호화할 수 있다. 그리고, 머지 인덱스에서 지시된 후보 블록의 움직임 파라미터로부터 현재 처리 블록의 움직임 파라미터를 도출할 수 있다. For example, if the processing block has a merge mode applied, the decoder may decode the merge index signaled from the encoder. The motion parameter of the current processing block can be derived from the motion parameter of the candidate block indicated by the merge index.

또한, 처리 블록이 AMVP 모드가 적용된 경우, 디코더는 인코더로부터 시그널링된 수평 및 수직 움직임 벡터 차분 값(MVD: motion vector difference), 참조 인덱스 및 인터 예측 모드를 복호화할 수 있다. 그리고, 움직임 참조 플래그로부터 지시된 후보 블록의 움직임 파라미터로부터 움직임 벡터 예측값을 도출하고, 움직임 벡터 예측값과 수신한 움직임 벡터 차분 값을 이용하여 현재 처리 블록의 움직임 벡터값을 도출할 수 있다. In addition, when the processing block is applied with the AMVP mode, the decoder may decode horizontal and vertical motion vector difference (MVD), reference index, and inter prediction mode signaled from the encoder. The motion vector prediction value may be derived from the motion parameter of the candidate block indicated by the motion reference flag, and the motion vector value of the current processing block may be derived using the motion vector prediction value and the received motion vector difference value.

디코더는 복호화된 움직임 파라미터(또는 정보)를 이용하여 예측 단위에 대한 움직임 보상을 수행한다(S802).The decoder performs motion compensation on the prediction unit by using the decoded motion parameter (or information) (S802).

즉, 인코더/디코더에서는 복호화된 움직임 파라미터를 이용하여, 이전에 디코딩된 픽쳐로부터 현재 단위의 영상을 예측하는 움직임 보상(motion compensation)을 수행한다. That is, the encoder / decoder performs motion compensation that predicts an image of a current unit from a previously decoded picture by using the decoded motion parameter.

도 9는 본 발명이 적용될 수 있는 실시예로서, 움직임 보상 과정을 예시하는 도면이다. 9 is a diagram illustrating a motion compensation process as an embodiment to which the present invention may be applied.

도 9에서는 현재 픽쳐(current picture)에서 부호화 하고자 하는 현재 블록(current block)을 위한 움직임 파라미터는 단방향 예측, LIST0, LIST0 내 두번 째 픽쳐(picture), 움직임 벡터 (-a, b) 인 경우를 예시한다.9 illustrates a case in which a motion parameter for a current block to be encoded in a current picture is unidirectional prediction, a second picture in LIST0, LIST0, and a motion vector (-a, b). do.

이 경우, 도 9와 같이 현재 블록은 LIST0의 두번째 픽쳐에서 현재 블록과 (-a, b) 만큼 떨어져 있는 위치의 값(즉, 참조 블록(reference block)의 샘플값)들을 사용하여 예측된다. In this case, as shown in FIG. 9, the current block is predicted using values of positions (ie, sample values of reference blocks) that are separated from the current block by (-a, b) in the second picture of LIST0.

양방향 예측의 경우는, 또다른 참조 리스트(예를 들어, LIST1)와 참조 인덱스, 움직임 벡터 차분값이 전송되어, 디코더는 두 개의 참조 블록을 도출하고, 이를 기반으로 현재 블록 값을 예측한다. In the case of bidirectional prediction, another reference list (eg, LIST1), a reference index, and a motion vector difference value are transmitted so that the decoder derives two reference blocks and predicts the current block value based on the reference block.

인터Inter 예측 기반 영상 처리 방법 Prediction-based Image Processing Method

앞서 설명한 바와 같이, HEVC에서 사용되는 머지 모드(merge mode)는 부호화 대상인 현재 블록의 주변 (블록) 움직임 정보를 취합하여 리스트화하고 이 가운데서 하나를 선택하여 해당 블록을 지시하는 인덱스만을 전송한다.As described above, the merge mode used in HEVC collects and lists neighboring (block) motion information of the current block to be encoded, selects one of them, and transmits only an index indicating the corresponding block.

앞서 도 7을 다시 참조하여 현재 블록의 주변 움직임 정보를 취합(리스트화)하는 순서를 살펴보면, 아래 표 1과 같다. Referring to FIG. 7 again, the order of collecting (listing) peripheral motion information of the current block is shown in Table 1 below.

Figure PCTKR2016005727-appb-T000001
Figure PCTKR2016005727-appb-T000001

표 1을 참조하면, 머지 모드 움직임 정보 후보 리스트를 구성하기 위하여, 인코더/디코더는 공간적 주변 움직임 정보 5개(A1, B1, B0, A0, B2), 시간적 주변 움직임 정보 2개(T0, T1), 조합된 양방향 예측 후보(Combined bi-predicted candidate), 비-스케일링된 양방향 예측 부호(Non-scaled bi-predicted candidate), 제로(zero) 벡터의 순서에 따라 총 5개의 움직임 정보를 선택하는 과정을 수행한다. Referring to Table 1, in order to construct a merge mode motion information candidate list, the encoder / decoder includes five spatial peripheral motion information (A1, B1, B0, A0, B2), and two temporal peripheral motion information (T0, T1). The process of selecting a total of five motion information in order of a combined bi-predicted candidate, a non-scaled bi-predicted candidate, and a zero vector. Perform.

머지 후보 리스트를 구성하면서 중복을 확인하며 중복되는 움직임 정보가 존재할 경우 그 다음 후보가 리스트 삽입 대상으로 고려된다. 이에 대하여 아래 도면을 참조하여 설명한다. The duplicate candidate is checked while constructing the merge candidate list, and if duplicate motion information exists, the next candidate is considered as a list insertion target. This will be described with reference to the drawings below.

도 10은 머지 후보 리스트를 구성하는 과정을 예시하는 도면이다. 10 is a diagram illustrating a process of constructing a merge candidate list.

도 10을 참조하면, 인코더/디코더는 중복을 제외하고 공간적 주변 움직임 정보 중에서 최대 4개를 선택하여 머지 후보 리스트에 추가한다(S1001).Referring to FIG. 10, the encoder / decoder selects up to four pieces of spatial peripheral motion information and adds them to the merge candidate list except for duplication (S1001).

여기서, 공간적 주변 움직임 정보는 앞서 도 7의 예시에서 현재 블록에 공간적으로 이웃한 A1, B1, B0, A0, B2 블록(즉, 예측 단위의 부분)의 움직임 정보를 의미한다. Here, the spatial peripheral motion information refers to the motion information of the A1, B1, B0, A0, and B2 blocks (ie, parts of the prediction unit) that are spatially neighbored to the current block in the example of FIG. 7.

현재 블록에 공간적으로 이웃한 블록의 움직임 정보에서 이용 가능하지 않거나(예를 들어, 공간적으로 이웃한 블록이 인트라 예측 모드로 부호화된 경우) 및/또는 A1, B1, B0, A0, B2의 순서에 따라 탐색되면서 이웃 블록의 움직임 정보가 이전의 이웃한 블록의 움직임 정보(즉, 머지 후보 리스트에 추가된 움직임 정보)와 동일하면 머지 리스트에 추가되지 않는다. 이때, 움직임 벡터와 참조 인덱스가 동일하면 움직임 정보가 동일하다고 판단될 수 있다. Not available in the motion information of a block spatially neighboring the current block (e.g., when a spatially neighboring block is encoded in intra prediction mode) and / or in the order of A1, B1, B0, A0, B2 If the motion information of the neighboring block is searched along with the motion information of the previous neighboring block (ie, motion information added to the merge candidate list), the motion information of the neighboring block is not added to the merge list. In this case, if the motion vector and the reference index are the same, it may be determined that the motion information is the same.

즉, 인코더/디코더는 공간적으로 이웃한 A1, B1, B0, A0, B2(도 7 참조)의 순서로 이용 가능한 이웃 블록의 움직임 정보를 중복되지 않도록 머지 후보 리스트에 추가할 수 있다. That is, the encoder / decoder may add motion information of neighboring blocks available in the order of spatially neighboring A1, B1, B0, A0, and B2 (see FIG. 7) to the merge candidate list so as not to overlap.

여기서, 공간적으로 이웃한 블록으로부터 머지 후보 리스트에 추가된 움직임 정보를 공간적 머지 후보(또는 공간적 움직임 정보 후보)라고 지칭할 수 있다. Here, motion information added to a merge candidate list from a spatially neighboring block may be referred to as a spatial merge candidate (or a spatial motion information candidate).

인코더/디코더는 중복을 제외하고 시간적 주변 움직임 정보 중에서 1개를 선택하여 머지 후보 리스트에 추가한다(S1002).The encoder / decoder selects one of the temporal peripheral motion information except for duplication and adds it to the merge candidate list (S1002).

여기서, 시간적 주변 움직임 정보는 앞서 도 7의 예시에서 현재 블록에 시간적으로 이웃한 T0, T1 블록(즉, 예측 단위의 부분)의 움직임 정보를 의미한다. Here, the temporal peripheral motion information refers to motion information of the T0 and T1 blocks (ie, parts of the prediction unit) that are temporally neighbored to the current block in the example of FIG. 7.

현재 블록에 시간적으로 이웃한 T0 블록의 움직임 정보가 이용 가능하면 T0 블록의 움직임 정보가 머지 후보 리스트에 추가될 수 있다. 반면, T0 블록의 움직임 정보가 이용 가능하지 않은 경우 T1 블록의 움직임 정보가 이용 가능하면 T1 블록의 움직임 정보가 머지 후보 리스트에 추가될 수 있다. 이 경우에도 각 이웃한 블록의 움직임 정보가 이전의 이웃한 블록의 움직임 정보(즉, 머지 후보 리스트에 추가된 움직임 정보)와 동일하면 머지 후보 리스트에 추가되지 않을 수 있다.If the motion information of the T0 block that is temporally neighbored to the current block is available, the motion information of the T0 block may be added to the merge candidate list. On the other hand, when the motion information of the T0 block is not available, if the motion information of the T1 block is available, the motion information of the T1 block may be added to the merge candidate list. Even in this case, if the motion information of each neighboring block is the same as the motion information (ie, the motion information added to the merge candidate list) of the previous neighboring block, it may not be added to the merge candidate list.

즉, 인코더/디코더는 시간적으로 이웃한 T0, T1(도 7 참조) 순서로 이용 가능한 이웃 블록의 움직임 정보를 중복되지 않도록 머지 후보 리스트에 추가할 수 있다. That is, the encoder / decoder may add motion information of neighboring blocks available in the order of neighboring T0 and T1 (see FIG. 7) to the merge candidate list so as not to overlap.

여기서, 시간적으로 이웃한 블록으로부터 머지 후보 리스트에 추가된 움직임 정보를 시간적 머지 후보(또는 공간적 움직임 정보 후보)라고 지칭할 수 있다. Here, the motion information added to the merge candidate list from the temporal neighboring block may be referred to as a temporal merge candidate (or spatial motion information candidate).

인코더/디코더는 머지 후보 리스트의 항목(또는 아이템)이 5개인지 판단한다(S1003). 즉, 머지 후보 리스트에 추가된 머지 후보의 수가 5개인지 판단한다.The encoder / decoder determines whether there are five items (or items) in the merge candidate list (S1003). That is, it is determined whether the number of merge candidates added to the merge candidate list is five.

만약, 머지 후보 리스트의 항목이 5개인 경우, 인코더/디코더는 머지 후보 리스트 구성을 완료한다. If there are five items in the merge candidate list, the encoder / decoder completes the merge candidate list construction.

반면, 머지 후보 리스트의 항목이 5개가 아닌 경우, 인코더/디코더는 머지 리스트 내 현재 모든 머지 후보(즉, 공간적 머지 후보 및/또는 시간적 머지 후보)들을 조합함으로써 생성된 조합된 양방향 예측 후보(combined)(즉, 조합된 양방향 움직임 정보 후보)를 머지 후보 리스트에 추가한다(S1004). On the other hand, if there are not five items in the merge candidate list, the encoder / decoder combines all of the current merge candidates in the merge list (ie, spatial merge candidates and / or temporal merge candidates). (Ie, the combined bidirectional motion information candidates) are added to the merge candidate list (S1004).

인코더/디코더는 머지 후보 리스트의 항목(또는 아이템)이 5개인지 판단한다(S1005). 즉, 머지 후보 리스트에 추가된 머지 후보의 수가 5개인지 판단한다.The encoder / decoder determines whether there are five items (or items) in the merge candidate list (S1005). That is, it is determined whether the number of merge candidates added to the merge candidate list is five.

만약, 머지 후보 리스트의 항목이 5개인 경우, 인코더/디코더는 머지 후보 리스트 구성을 완료한다. If there are five items in the merge candidate list, the encoder / decoder completes the merge candidate list construction.

반면, 머지 후보 리스트 항목이 5개가 아닌 경우, 인코더/디코더는 비-스케일링된(non-scaled) 양방향 예측 후보(즉, 비-스케일링된 움직임 정보 후보)를 머지 후보 리스트에 추가한다(S1006). On the other hand, if there are not five merge candidate list items, the encoder / decoder adds non-scaled bidirectional prediction candidates (ie, non-scaled motion information candidates) to the merge candidate list (S1006).

인코더/디코더는 머지 후보 리스트의 항목(또는 아이템)이 5개인지 판단한다(S1007). 즉, 머지 후보 리스트에 추가된 머지 후보의 수가 5개인지 판단한다.The encoder / decoder determines whether there are five items (or items) in the merge candidate list (S1007). That is, it is determined whether the number of merge candidates added to the merge candidate list is five.

만약, 머지 후보 리스트 항목이 5개인 경우, 인코더/디코더는 머지 후보 리스트 구성을 완료한다. If there are five merge candidate list items, the encoder / decoder completes the merge candidate list construction.

반면, 머지 후보 리스트 항목이 5개가 아닌 경우, 인코더/디코더는 제로 벡터(zero vector)를 머지 후보 리스트에 추가한다(S1008).On the other hand, if there are not five merge candidate list items, the encoder / decoder adds a zero vector to the merge candidate list (S1008).

즉, 인코더/디코더는 머지 후보의 개수가 후보 개수가 최대 개수가 될 때까지 참조 픽쳐 인덱스를 변경하면서 제로 움직임 벡터 머지 후보(zero motion vector merging candidates)(즉, 제로 움직임 벡터 후보)를 머지 후보 리스트에 추가한다.That is, the encoder / decoder merges zero motion vector merging candidates (ie, zero motion vector candidates) while changing the reference picture index until the number of merge candidates reaches the maximum number of candidates. Add to

한편, 앞서 도 10에서 비-스케일링된(non-scaled) 양방향 예측 후보를 리스트에 추가하는 과정은 생략될 수 있다. 이 경우, S1006 단계 및 S1007 단계는 삭제되며, S1005 단계에서 리스트 항목이 5개가 아닌 경우, S1008 단계가 수행될 수 있다. Meanwhile, in FIG. 10, the process of adding the non-scaled bidirectional prediction candidate to the list may be omitted. In this case, steps S1006 and S1007 are deleted, and if there are not five list items in step S1005, step S1008 may be performed.

일반적으로 공간적인 주변 움직임 정보가 현재 블록의 움직임 정보와 동일할 확률이 높고 그 이후로 시간적 주변의 움직임 정보, 조합된(Combined) 양방향 예측 후보 등의 순서이므로 앞서 설명한 머지 후보 리스트 구성 방법은 단순하면서도 높은 효율을 보인다. In general, since the neighboring motion information has a high probability of being identical to the motion information of the current block, and then the motion information around the temporal neighbors and the combined bidirectional prediction candidates, the merge candidate list construction method described above is simple. High efficiency

하지만 경우에 따라서 앞서 언급된 순서가 항상 일치하는 것은 아니며 머지 모드의 인덱스는 절삭된 라이스 코드(truncated rice code)로 부호화 되기 때문에 가장 발생 확률이 높은 후보순으로 머지 후보 리스트가 구성되는 것이 최적의 효율을 보이게 된다.However, in some cases, the aforementioned order does not always match, and since the index of the merge mode is encoded by truncated rice code, it is optimal to construct the merge candidate list in the order of most likely candidates. Will be shown.

이에 따라 본 발명에서는 현재 블록의 움직임 정보 후보 리스트를 구성하는 방법을 제안한다. Accordingly, the present invention proposes a method of constructing a motion information candidate list of the current block.

이하, 설명의 편의를 위해 머지 후보 리스트를 구성하는 경우를 위주로 설명하나 본 발명이 이에 한정되는 것은 아니며, 현재 블록에 AMVP 모드가 적용되어 움직임 벡터 예측값 후보 리스트를 구성하는 경우에도 동일한 방식이 적용될 수 있다. 즉, 본 명세서에서 움직임 정보 후보 리스트는 머지 후보 리스트와 움직임 벡터 예측값 후보 리스트를 통칭한다. Hereinafter, a case of constructing a merge candidate list will be described for convenience of description. However, the present invention is not limited thereto, and the same method may be applied to the case of constructing a motion vector prediction value candidate list by applying an AMVP mode to a current block. have. That is, the motion information candidate list is collectively referred to herein as a merge candidate list and a motion vector predictor candidate list.

이하, 움직임 정보는 참조 픽쳐를 지시하는 참조 픽쳐 인덱스, 움직임 벡터를 포함할 수 있다. 또한, 추가로 참조 픽쳐의 방향을 지시하는 인터 예측 모드, 움직임 벡터 예측값을 포함할 수도 있다. Hereinafter, the motion information may include a reference picture index and a motion vector indicating the reference picture. In addition, it may further include an inter prediction mode and a motion vector prediction value indicating the direction of the reference picture.

실시예Example 1 One

본 발명에 따른 일 실시예로서, 현재 블록의 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 발생 빈도를 이용하여 움직임 정보 리스트를 구성하는 방법에 대해 제안한다. According to an embodiment of the present invention, a method for constructing a motion information list using a frequency of occurrence of a motion information candidate added to a motion information candidate list of a current block is proposed.

본 실시예에서 제안하는 방법은 앞서 도 10에서 설명한 움직임 정보 후보 리스트 구성 순서와 동일하게 진행하지만 중복되는 횟수를 기록한다는 부분에서 차이가 있다. The method proposed in the present embodiment proceeds in the same manner as the motion information candidate list construction order described with reference to FIG. 10, but there is a difference in that the number of overlaps is recorded.

앞서 도 10의 예시에 따르면 움직임 정보 후보 리스트를 생성하면서 중복이 발생하는 경우(즉, 이전의 움직임 정보 후보와 동일한 움직임 정보인 경우), 움직임 정보 후보 리스트에 삽입되지 않고 이후 절차를 수행한다. According to the example of FIG. 10, when duplication occurs while generating the motion information candidate list (that is, the same motion information as the previous motion information candidate), the subsequent procedure is not inserted into the motion information candidate list.

반면, 본 실시예에 따르면, 중복된 움직임 정보가 확인되면(즉, 미리 정해진 순서에 따라 탐색되면서 이웃 블록의 움직임 정보가 이전의 이웃한 블록의 움직임 정보(즉, 움직임 정보 후보 리스트에 추가된 움직임 정보)와 동일하면), 움직임 정보 후보 리스트에 삽입되지 않으나, 기존에 존재하는 동일한 움직임 정보 항목(즉, 움직임 정보 후보 리스트에 추가된 움직임 정보)에 발생 빈도(frequency) 숫자를 증가 시키고 이후 절차를 수행하게 된다. On the other hand, according to the present embodiment, when duplicated motion information is identified (that is, the motion information of the neighboring block is searched in a predetermined order while the motion information of the neighboring block is added to the previous neighboring block (ie, motion added to the motion information candidate list) Information) is not inserted into the motion information candidate list, but the frequency of occurrence is increased to the same existing motion information item (ie, motion information added to the motion information candidate list) and the subsequent procedure is performed. Will be performed.

예를 들어, 인코더/디코더는 A1, B1, B0, A0, B2(도 7 참조)의 순서로 현재 예측 단위의 공간적으로 이웃한 블록의 움직임 정보를 탐색할 수 있다. 먼저, A1 블록의 움직임 정보가 이용 가능한 경우 인코더/디코더는 움직임 정보 후보 리스트에 A1 블록의 움직임 정보를 추가할 수 있다. 이때, 그리고, B1 블록의 움직임 정보가 A1의 움직임 정보와 동일한 경우, B1 블록의 움직임 정보를 움직임 정보 후보 리스트에 추가하지 않으나 이미 추가된 A1 블록의 움직임 정보(즉, 중복된 움직임 정보)의 빈도 횟수(frequency)를 1 증가시킨다. 이후, 다른 공간적/시간적 이웃한 블록의 움직임 정보에 대하여도 동일한 방식이 적용될 수 있다. For example, the encoder / decoder may search for motion information of spatially neighboring blocks of the current prediction unit in the order of A1, B1, B0, A0, and B2 (see FIG. 7). First, when motion information of the A1 block is available, the encoder / decoder may add motion information of the A1 block to the motion information candidate list. At this time, if the motion information of the B1 block is the same as the motion information of A1, the frequency of the motion information (ie, duplicated motion information) of the already added A1 block is not added to the motion information candidate list without adding the motion information of the B1 block to the motion information candidate list. Increment frequency by 1 Thereafter, the same method may be applied to the motion information of other spatial / temporal neighboring blocks.

이때, 현재 블록의 좌상단(top-left) 화소의 좌표가 (x, y)이고, 현재 블록의 너비가 W, 현재 블록의 높이가 H인 경우, A0 블록은 좌표 (x-1, y+H)인 화소를 포함하는 블록이고, A1 블록은 좌표 (x-1, y+H-1)인 화소를 포함하는 블록이고, B0 블록은 좌표 (x+W, y-1)인 화소를 포함하는 블록이고, B1 블록은 좌표 (x+W-1, y-1)인 화소를 포함하는 블록이고, B2 블록은 좌표 (x-1, y-1)인 화소를 포함하는 블록을 나타낼 수 있다. In this case, when the coordinate of the top-left pixel of the current block is (x, y), the width of the current block is W, and the height of the current block is H, the A0 block is the coordinate (x-1, y + H). Block A1 is a block containing pixels having coordinates (x-1, y + H-1), and block B0 includes pixels having coordinates (x + W, y-1). The block B1 may be a block including a pixel having coordinates (x + W-1, y-1), and the block B2 may represent a block including a pixel having coordinates (x-1, y-1).

또한, T0 블록은 현재 블록이 속한 픽쳐와 다른 픽쳐 내에서 좌표 (x+W, y+H)인 화소를 포함하는 블록이고, T1 블록은 현재 블록이 속한 픽쳐와 다른 픽쳐 내에서 좌표 (x+W/2, y+H/2)인 화소를 포함하는 블록을 나타낼 수 있다. In addition, the T0 block is a block including pixels having coordinates (x + W, y + H) in a picture different from the picture to which the current block belongs, and the T1 block is a coordinate (x +) in a picture different from the picture to which the current block belongs. A block including a pixel of W / 2, y + H / 2) may be represented.

이때, 앞서 도 10과 같이 공간적 움직임 정보 후보, 시간적 움직임 정보 후보, 조합된 양방향 예측 후보(즉, 조합된 움직임 정보 후보), 제로 움직임 벡터 예측 후보(즉, 제로(zero) 움직임 정보 후보)의 순서로 움직임 정보 후보 리스트에 추가될 수 있다. 다만, 본 발명이 이에 한정되는 것은 아니며 위의 4가지의 움직임 정보 후보 중 일부만으로 움직임 정보 후보 리스트가 구성되거나 또는 이외 다른 움직임 정보를 포함하여 움직임 정보 후보 리스트가 구성될 수도 있다. 또한, 도 10과 상이한 순서로 움직임 정보 후보 리스트가 구성될 수도 있다. In this case, as shown in FIG. 10, the sequence of the spatial motion information candidate, the temporal motion information candidate, the combined bidirectional prediction candidate (ie, the combined motion information candidate), and the zero motion vector prediction candidate (ie, the zero motion information candidate) are shown. It can be added to the motion information candidate list. However, the present invention is not limited thereto, and the motion information candidate list may be configured using only some of the above four motion information candidates, or the motion information candidate list may be configured including other motion information. Also, the motion information candidate list may be configured in a different order from that in FIG.

모든 절차가 종료(즉, 움직임 정보 후보 리스트의 구성 완료)된 후에, 움직임 정보 후보 리스트를 각 움직임 정보 후보의 발생 빈도에 따라 정렬할 수 있다. 이에 따라, 실제 발생 확률에 가까운 움직임 정보 후보가 움직임 정보 후보 리스트의 상위에 위치할 수 있다. After all procedures are completed (that is, the construction of the motion information candidate list is completed), the motion information candidate list can be sorted according to the frequency of occurrence of each motion information candidate. Accordingly, the motion information candidate close to the actual occurrence probability may be located above the motion information candidate list.

도 11은 본 발명의 일 실시예에 따른 움직임 정보 후보 리스트의 구성 예를 도시한다. 11 illustrates an example of a configuration of a motion information candidate list according to an embodiment of the present invention.

도 11에서는 본 실시예를 통해서 생성된 움직임 정보 후보 리스트(예를 들어, 머지 후보 리스트)의 예를 보여준다. 11 shows an example of a motion information candidate list (eg, merge candidate list) generated through the present embodiment.

도 11을 참조하면, 움직임 정보 후보 리스트는 A1 블록의 움직임 정보, B0 블록의 움직임 정보, B1 블록의 움직임 정보, T0 블록의 움직임 정보, 조합된 움직임 정보가 움직임 정보 후보(즉, 머지 후보 리스트의 아이템)으로 리스트에 추가된 경우를 예시한다. 이때, A1 블록의 움직임 정보의 발생 빈도가 3회, B0 블록의 움직임 정보의 발생 빈도가 2회, 나머지 움직임 정보의 발생 빈도가 1회인 경우를 가정한다. Referring to FIG. 11, the motion information candidate list includes motion information of the A1 block, motion information of the B0 block, motion information of the B1 block, motion information of the T0 block, and combined motion information of the motion information candidate (ie, the merge candidate list). For example, an item added to a list is shown. In this case, it is assumed that the occurrence frequency of the motion information of the A1 block is three times, the occurrence frequency of the motion information of the B0 block is two times, and the occurrence frequency of the remaining motion information is one time.

이 경우, 앞서 도 10의 예시에 따라 머지 모드에서 적용되는 움직임 정보 후보 리스트의 순서와는 달리, B0와 B1의 순서가 바뀌어 있음을 확인할 수 있다. In this case, unlike the order of the motion information candidate list applied in the merge mode according to the example of FIG. 10, it may be confirmed that the order of B0 and B1 is changed.

다시 말해, 인코더/디코더는 공간적으로 이웃한 A1, B1, B0, A0, B2(도 7 참조)의 순서로 이용 가능한 이웃 블록의 움직임 정보를 중복되지 않도록 머지 후보 리스트에 추가할 수 있다. 다만, B0 블록의 움직임 정보가 2회이고, B1 블록의 움직임 정보의 발생 빈도가 1회이므로, B0 블록의 움직임 정보가 B1 블록의 움직임 정보보다 움직임 정보 후보 리스트의 상위에 위치하도록 움직임 정보 후보 리스트의 항목(즉, 움직임 정보 후보)이 정렬될 수 있다. In other words, the encoder / decoder may add motion information of neighboring blocks available in the order of spatially neighboring A1, B1, B0, A0, and B2 (see FIG. 7) to the merge candidate list so as not to overlap. However, since the motion information of the B0 block is twice and the frequency of occurrence of the motion information of the B1 block is one time, the motion information candidate list is located such that the motion information of the B0 block is located above the motion information candidate list than the motion information of the B1 block. The items of (ie, motion information candidates) may be sorted.

또한, 움직임 정보 후보 리스트를 정렬하는 과정에서 앞서 설명한 바와 같이 단순히 발생 빈도에 따라서 리스트 항목(즉, 움직 정보 후보)이 정렬될 수도 있으나, 발생 빈도에 차이가 있어도 기존 머지 후보 리스트 구성의 순서에 비중을 두어 발생 빈도 수의 차이가 미리 정해진 일정 수준 이상일 때에만 정렬이 수행(즉, 움직임 정보 후보의 순서 변경)될 수도 있다. 예를 들어, 도 11의 예시에서 미리 정해진 일정 수준이 2라고 가정하면, B0 블록의 움직임 정보와 B1 블록의 움직임 정보의 순서는 바뀌지 않고 B1 블록의 움직임 정보가 B0 블록의 움직임 정보 보다 움직임 정보 후보 리스트의 상위에 위치할 수 있다. In addition, in the process of sorting the motion information candidate list, as described above, list items (ie, motion information candidates) may be simply sorted according to the frequency of occurrence. In this case, the sorting may be performed only (ie, the order of motion information candidates) when the difference in the frequency of occurrence is more than a predetermined level. For example, assuming that a predetermined predetermined level is 2 in the example of FIG. 11, the order of the motion information of the B0 block and the motion information of the B1 block is not changed, and the motion information of the B1 block is the motion information candidate rather than the motion information of the B0 block. It can be located above the list.

움직임 정보 후보 리스트를 정렬하는 과정에 대하여 아래 도면을 참조하여 보다 상세히 설명한다. A process of sorting the motion information candidate list will be described in more detail with reference to the following drawings.

도 12는 본 발명의 일 실시예에 따른 움직임 정보 후보 리스트를 정렬하는 방법을 예시하는 도면이다. 12 is a diagram illustrating a method of sorting a motion information candidate list according to an embodiment of the present invention.

도 12에서는 움직임 정보 후보 리스트의 항목(아이템)의 개수가 5개이며, 도 12(a)와 같이 움직임 정보 후보 리스트가 구성되었다고 가정한다. In FIG. 12, it is assumed that the number of items (items) of the motion information candidate list is five, and the motion information candidate list is configured as shown in FIG. 12 (a).

인코더/디코더는 움직임 정보 후보 리스트에서 상위부터 하위의 순서로 각 움직임 정보 후보의 위치(또는 순위)(position)를 결정할 수 있다. 그리고, 각 움직임 정보 후보의 발생 빈도를 한 단계 상위에 위치하는 움직임 정보 후보의 발생 빈도와 비교함으로써, 각 움직임 정보 후보의 위치를 결정할 수 있다. 이때, 해당 움직임 정보 후보의 위치가 변경된 경우, 변경된 위치보다 한 단계 상위에 위치하는 움직임 정보 후보의 발생 빈도와 다시 비교함으로써 해당 움직임 정보 후보의 위치를 결정할 수 있다. The encoder / decoder may determine the position (or position) of each motion information candidate in the order from the top to the bottom in the motion information candidate list. The position of each motion information candidate can be determined by comparing the occurrence frequency of each motion information candidate with the occurrence frequency of the motion information candidate located one step higher. In this case, when the position of the corresponding motion information candidate is changed, the position of the corresponding motion information candidate may be determined by comparing again with the occurrence frequency of the motion information candidate located one step higher than the changed position.

먼저, 인코더/디코더는 움직임 정보 후보 2의 발생 빈도를 자신보다 상위에 위치하는 움직임 정보 후보 1의 발생 빈도와 비교하고, 움직임 정보 후보 2의 발생 빈도가 움직임 정보 후보 1의 발생 빈도 보다 크면, 도 12(b)와 같이 움직임 정보 후보 2의 위치를 움직임 정보 후보 1의 위치와 바꿀 수 있다. First, the encoder / decoder compares the occurrence frequency of the motion information candidate 2 with the occurrence frequency of the motion information candidate 1 located higher than itself, and if the occurrence frequency of the motion information candidate 2 is greater than the occurrence frequency of the motion information candidate 1, FIG. As shown in 12 (b), the position of the motion information candidate 2 may be replaced with the position of the motion information candidate 1.

다음으로, 인코더/디코더는 움직임 정보 후보 3의 발생 빈도를 현재 자신의 위치보다 한 단계 상위에 위치하는 움직임 정보 후보 1의 발생 빈도와 비교하고, 움직임 정보 후보 3의 발생 빈도가 움직임 정보 후보 1의 발생 빈도 보다 크면, 도 12(c)와 같이 움직임 정보 후보 3의 위치를 움직임 정보 후보 1의 위치와 바꿀 수 있다. Next, the encoder / decoder compares the occurrence frequency of the motion information candidate 3 with the occurrence frequency of the motion information candidate 1 located one step higher than its current position, and the occurrence frequency of the motion information candidate 3 is equal to that of the motion information candidate 1. If it is larger than the occurrence frequency, the position of the motion information candidate 3 can be replaced with the position of the motion information candidate 1 as shown in FIG.

이때, 움직임 정보 후보 3의 위치가 변경되었으므로, 인코더/디코더는 움직임 정보 후보 3의 발생 빈도를 현재 위치보다 한 단계 상위에 위치하는 움직임 정보 후보 2의 발생 빈도와 비교하고, 움직임 정보 후보 3의 발생 빈도가 움직임 정보 후보 2의 발생 빈도 보다 크면, 도 12(d)와 같이 움직임 정보 후보 3의 위치를 움직임 정보 후보 2의 위치와 바꿀 수 있다. At this time, since the position of the motion information candidate 3 is changed, the encoder / decoder compares the occurrence frequency of the motion information candidate 3 with the occurrence frequency of the motion information candidate 2 located one step higher than the current position, and generates the motion information candidate 3. If the frequency is greater than the occurrence frequency of the motion information candidate 2, the position of the motion information candidate 3 can be replaced with the position of the motion information candidate 2 as shown in FIG.

다음으로, 인코더/디코더는 움직임 정보 후보 4의 발생 빈도를 현재 위치보다 상위에 위치하는 움직임 정보 후보 1의 발생 빈도와 비교하고, 움직임 정보 후보 4의 발생 빈도가 움직임 정보 후보 1의 발생 빈도 보다 크지 않으면, 움직임 정보 후보 4의 위치를 변경하지 않을 수 있다. Next, the encoder / decoder compares the occurrence frequency of the motion information candidate 4 with the occurrence frequency of the motion information candidate 1 located above the current position, and the occurrence frequency of the motion information candidate 4 is greater than the occurrence frequency of the motion information candidate 1. Otherwise, the position of the motion information candidate 4 may not be changed.

다음으로, 인코더/디코더는 움직임 정보 후보 5의 발생 빈도를 현재 위치보다 상위에 위치하는 움직임 정보 후보 4의 발생 빈도와 비교하고, 움직임 정보 후보 5의 발생 빈도가 움직임 정보 후보 4의 발생 빈도 보다 크면, 도 12(e)와 같이 움직임 정보 후보 5의 위치를 움직임 정보 후보 4의 위치와 바꿀 수 있다. Next, the encoder / decoder compares the occurrence frequency of the motion information candidate 5 with the occurrence frequency of the motion information candidate 4 located above the current position, and if the occurrence frequency of the motion information candidate 5 is greater than the occurrence frequency of the motion information candidate 4 12, the position of the motion information candidate 5 may be replaced with the position of the motion information candidate 4. As shown in FIG.

이때, 움직임 정보 후보 5의 위치가 변경되었으므로, 인코더/디코더는 움직임 정보 후보 5의 발생 빈도를 현재 위치보다 한 단계 상위에 위치하는 움직임 정보 후보 1의 발생 빈도와 비교하고, 움직임 정보 후보 5의 발생 빈도가 움직임 정보 후보 1의 발생 빈도 보다 크면, 도 12(f)와 같이 움직임 정보 후보 5의 위치를 움직임 정보 후보 1의 위치와 바꿀 수 있다. At this time, since the position of the motion information candidate 5 is changed, the encoder / decoder compares the occurrence frequency of the motion information candidate 5 with the occurrence frequency of the motion information candidate 1 located one step higher than the current position, and generates the motion information candidate 5. If the frequency is greater than the occurrence frequency of the motion information candidate 1, the position of the motion information candidate 5 can be replaced with the position of the motion information candidate 1 as shown in FIG.

이때, 움직임 정보 후보 5의 위치가 다시 변경되었으므로, 인코더/디코더는 움직임 정보 후보 5의 발생 빈도를 현재 위치보다 한 단계 상위에 위치하는 움직임 정보 후보 2의 발생 빈도와 비교하고, 움직임 정보 후보 5의 발생 빈도가 움직임 정보 후보 2의 발생 빈도 보다 크지 않으면, 움직임 정보 후보 5의 위치를 변경하지 않을 수 있다. At this time, since the position of the motion information candidate 5 is changed again, the encoder / decoder compares the occurrence frequency of the motion information candidate 5 with the occurrence frequency of the motion information candidate 2 located one step higher than the current position, If the occurrence frequency is not greater than the occurrence frequency of the motion information candidate 2, the position of the motion information candidate 5 may not be changed.

도 13은 본 발명의 일 실시예에 따른 움직임 정보 후보 리스트를 정렬하는 방법을 예시하는 도면이다. 13 is a diagram illustrating a method of sorting a motion information candidate list according to an embodiment of the present invention.

도 13에서는 움직임 정보 후보 리스트의 항목(아이템)의 개수가 5개이며, 도 13(a)와 같이 움직임 정보 후보 리스트가 구성되었다고 가정하며, 움직임 정보 후보의 위치를 변경 여부를 결정하는 수준이 '2'라고 미리 정해졌다고 가정한다. In FIG. 13, it is assumed that the number of items (items) of the motion information candidate list is 5, and that the motion information candidate list is configured as shown in FIG. 13 (a). The level for determining whether to change the position of the motion information candidate is' Assume that 2 'is predetermined.

먼저, 인코더/디코더는 움직임 정보 후보 2의 발생 빈도를 자신보다 상위에 위치하는 움직임 정보 후보 1의 발생 빈도와 비교하고, 움직임 정보 후보 2의 발생 빈도가 움직임 정보 후보 1의 발생 빈도 보다 2이상 크면, 도 13(b)와 같이 움직임 정보 후보 2의 위치를 움직임 정보 후보 1의 위치와 바꿀 수 있다. First, the encoder / decoder compares the occurrence frequency of the motion information candidate 2 with the occurrence frequency of the motion information candidate 1 located higher than itself, and if the occurrence frequency of the motion information candidate 2 is two or more greater than the occurrence frequency of the motion information candidate 1 As shown in FIG. 13B, the position of the motion information candidate 2 may be replaced with the position of the motion information candidate 1.

다음으로, 인코더/디코더는 움직임 정보 후보 3의 발생 빈도를 현재 자신의 위치보다 한 단계 상위에 위치하는 움직임 정보 후보 1의 발생 빈도와 비교하고, 움직임 정보 후보 3의 발생 빈도가 움직임 정보 후보 1의 발생 빈도 보다 2이상 크면, 도 13(c)와 같이 움직임 정보 후보 3의 위치를 움직임 정보 후보 1의 위치와 바꿀 수 있다. Next, the encoder / decoder compares the occurrence frequency of the motion information candidate 3 with the occurrence frequency of the motion information candidate 1 located one step higher than its current position, and the occurrence frequency of the motion information candidate 3 is equal to that of the motion information candidate 1. If the frequency is greater than 2, the position of the motion information candidate 3 can be replaced with the position of the motion information candidate 1 as shown in FIG.

이때, 움직임 정보 후보 3의 위치가 변경되었으므로, 인코더/디코더는 움직임 정보 후보 3의 발생 빈도를 현재 위치보다 한 단계 상위에 위치하는 움직임 정보 후보 2의 발생 빈도와 비교하고, 움직임 정보 후보 3의 발생 빈도가 움직임 정보 후보 2의 발생 빈도 보다 2이상 크지 않으면, 움직임 정보 후보 3의 위치를 변경하지 않을 수 있다. At this time, since the position of the motion information candidate 3 is changed, the encoder / decoder compares the occurrence frequency of the motion information candidate 3 with the occurrence frequency of the motion information candidate 2 located one step higher than the current position, and generates the motion information candidate 3. If the frequency is not greater than two or more than the occurrence frequency of the motion information candidate 2, the position of the motion information candidate 3 may not be changed.

다음으로, 인코더/디코더는 움직임 정보 후보 4의 발생 빈도를 현재 위치보다 상위에 위치하는 움직임 정보 후보 1의 발생 빈도와 비교하고, 움직임 정보 후보 4의 발생 빈도가 움직임 정보 후보 1의 발생 빈도 보다 2이상 크지 않으면, 움직임 정보 후보 4의 위치를 변경하지 않을 수 있다. Next, the encoder / decoder compares the occurrence frequency of the motion information candidate 4 with the occurrence frequency of the motion information candidate 1 located above the current position, and the occurrence frequency of the motion information candidate 4 is 2 higher than the occurrence frequency of the motion information candidate 1. If it is not large, the position of motion information candidate 4 may not be changed.

다음으로, 인코더/디코더는 움직임 정보 후보 5의 발생 빈도를 현재 위치보다 상위에 위치하는 움직임 정보 후보 4의 발생 빈도와 비교하고, 움직임 정보 후보 5의 발생 빈도가 움직임 정보 후보 4의 발생 빈도 보다 2이상 크지 않으면, 움직임 정보 후보 5의 위치를 변경하지 않을 수 있다. Next, the encoder / decoder compares the occurrence frequency of the motion information candidate 5 with the occurrence frequency of the motion information candidate 4 located above the current position, and the occurrence frequency of the motion information candidate 5 is greater than the occurrence frequency of the motion information candidate 4. If it is not large, the position of the motion information candidate 5 may not be changed.

도 14는 본 발명의 일 실시예에 따른 움직임 정보 후보 리스트 구성 방법을 예시하는 도면이다. 14 is a diagram illustrating a method of constructing a motion information candidate list according to an embodiment of the present invention.

도 14에서는 설명의 편의를 위해 앞서 도 10과 동일하게 머지 후보 리스트(즉, 움직임 정보 후보 리스트)의 항목(즉, 움직임 정보 후보)의 총 개수가 5인 경우를 가정하고, 머지 후보 리스트에 공간적 머지 후보는 최대 4개까지 추가될 수 있으며, 시간적 머지 후보는 1개 추가될 수 있다고 가정하여 설명하나, 본 발명이 이에 한정되는 것은 아니다. 즉, 사전에 정의된 움직임 정보 후보 리스트의 항목 개수와, 움직임 정보 후보 리스트에 포함될 수 있는 공간적 움직임 정보 후보와 시간적 움직임 정보 후보의 개수가 이와 상이하더라도 본 발명이 동일하게 적용될 수 있음은 물론이다. In FIG. 14, for convenience of description, it is assumed that the total number of items (ie, motion information candidates) of the merge candidate list (ie, motion information candidate list) is 5, similar to FIG. 10, and is spatial in the merge candidate list. Up to four merge candidates may be added, and assuming that one merge candidate may be added. However, the present invention is not limited thereto. That is, the present invention can be applied equally even if the number of items of the predefined motion information candidate list and the number of spatial motion information candidates and temporal motion information candidates included in the motion information candidate list are different from each other.

도 14를 참조하면, 인코더/디코더는 중복을 제외하고 공간적 주변 움직임 정보 중에서 최대 4개를 선택하여 머지 후보 리스트에 추가하되, 중복인 경우 빈도수를 증가시킨다(S1401).Referring to FIG. 14, the encoder / decoder selects up to four of spatial peripheral motion information except for overlap and adds the merge candidate list to the merge candidate list, but increases the frequency in the case of duplication (S1401).

여기서, 공간적 주변 움직임 정보는 앞서 도 7의 예시에서 현재 블록에 공간적으로 이웃한 A1, B1, B0, A0, B2 블록(즉, 예측 단위의 부분)의 움직임 정보를 의미할 수 있다. Here, the spatial peripheral motion information may refer to motion information of blocks A1, B1, B0, A0, and B2 (that is, part of a prediction unit) that are spatially neighbored to the current block in the example of FIG. 7.

현재 블록에 공간적으로 이웃한 블록의 움직임 정보에서 이용 가능하지 않은 움직임 정보는 머지 리스트에 추가되지 않을 수 있다(예를 들어, 공간적으로 이웃한 블록이 인트라 예측 모드로 부호화된 경우). Motion information that is not available in the motion information of a block that is spatially neighboring to the current block may not be added to the merge list (eg, when the spatially neighboring block is encoded in the intra prediction mode).

또한, A1, B1, B0, A0, B2의 순서에 따라 움직임 정보가 탐색되면서 현재 탐색 대상이 되는 이웃 블록의 움직임 정보가 이전의 이웃 블록의 움직임 정보(즉, 머지 후보 리스트에 추가된 움직임 정보)와 동일하면 머지 리스트에 추가되지 않으며, 이전의 이웃 블록의 움직임 정보(즉, 중복된 움직임 정보)의 발생 빈도가 1씩 증가될 수 있다. 이때, 움직임 벡터와 참조 인덱스가 동일하면 움직임 정보가 동일하다고 판단될 수 있다. Also, as motion information is searched in the order of A1, B1, B0, A0, and B2, motion information of a neighboring block currently being searched for is motion information of a previous neighboring block (ie, motion information added to a merge candidate list). If it is equal to and is not added to the merge list, the frequency of occurrence of motion information (ie, duplicate motion information) of a previous neighboring block may be increased by one. In this case, if the motion vector and the reference index are the same, it may be determined that the motion information is the same.

즉, 인코더/디코더는 공간적으로 이웃한 A1, B1, B0, A0, B2 블록(도 7 참조)의 순서로 이용 가능한 이웃 블록의 움직임 정보를 중복되지 않도록 머지 후보 리스트에 추가하되, 중복된 움직임 정보가 발생되면 해당 움직임 정보의 중복 발생 빈도를 1씩 증가시킬 수 있다. That is, the encoder / decoder adds motion information of neighboring blocks available in the order of spatially neighboring A1, B1, B0, A0, and B2 blocks (see FIG. 7) to the merge candidate list so as not to overlap, but duplicate motion information. Is generated, the frequency of occurrence of duplication of the corresponding motion information may be increased by one.

인코더/디코더는 중복을 제외하고 시간적 주변 움직임 정보 중에서 1개를 선택하여 머지 후보 리스트에 추가하되, 중복인 경우 빈도수를 증가시킨다(S1402).The encoder / decoder selects one of the temporal peripheral motion information except for duplication and adds it to the merge candidate list, but increases the frequency in the case of duplication (S1402).

여기서, 시간적 주변 움직임 정보는 앞서 도 7의 예시에서 현재 블록에 시간적으로 이웃한 T0, T1 블록(즉, 예측 단위의 부분)의 움직임 정보를 의미할 수 있다. Here, the temporal peripheral motion information may refer to motion information of the T0 and T1 blocks (ie, parts of the prediction unit) that are temporally neighbored to the current block in the example of FIG. 7.

현재 블록에 시간적으로 이웃한 T0 블록의 움직임 정보가 이용 가능하면 T0 블록의 움직임 정보가 머지 후보 리스트에 추가될 수 있다. 반면, T0 블록의 움직임 정보가 이용 가능하지 않은 경우 T1 블록의 움직임 정보가 이용 가능하면 T1 블록의 움직임 정보가 머지 후보 리스트에 추가될 수 있다. 이 경우에도 현재 탐색 대상이 되는 이웃 블록의 움직임 정보가 이전의 이웃 블록의 움직임 정보 또는 공간적 머지 후보와 동일하면 머지 후보 리스트에 추가되지 않으며, 이전의 이웃 블록의 움직임 정보(즉, 중복된 움직임 정보)의 발생 빈도가 1씩 증가될 수 있다.If the motion information of the T0 block that is temporally neighbored to the current block is available, the motion information of the T0 block may be added to the merge candidate list. On the other hand, when the motion information of the T0 block is not available, if the motion information of the T1 block is available, the motion information of the T1 block may be added to the merge candidate list. Even in this case, if the motion information of the neighboring block currently being searched for is the same as the motion information or the spatial merge candidate of the previous neighboring block, the motion information of the previous neighboring block is not added to the merge candidate list, that is, the duplicated motion information. ), The frequency of occurrence may be increased by one.

즉, 인코더/디코더는 시간적으로 이웃한 T0, T1(도 7 참조) 순서로 이용 가능한 이웃 블록의 움직임 정보를 중복되지 않도록 머지 후보 리스트에 추가하되, 중복된 움직임 정보가 발생되면 해당 움직임 정보의 중복 발생 빈도를 1씩 증가시킬 수 있다. That is, the encoder / decoder adds motion information of neighboring blocks available in the order of neighboring T0 and T1 (see FIG. 7) to the merge candidate list so as not to overlap, but duplicates the motion information when duplicate motion information is generated. The frequency of occurrence can be increased by one.

인코더/디코더는 머지 후보 리스트의 항목(또는 아이템)이 5개인지 판단한다(S1403). 즉, 머지 후보 리스트에 추가된 머지 후보의 수가 5개인지 판단한다.The encoder / decoder determines whether there are five items (or items) in the merge candidate list (S1403). That is, it is determined whether the number of merge candidates added to the merge candidate list is five.

만약, S1403 단계에서 판단한 결과, 머지 후보 리스트의 항목이 5개인 경우, 인코더/디코더는 빈도 수를 기준으로 머지 후보 리스트의 항목을 정렬한다(S1409). If it is determined in step S1403 that there are five items in the merge candidate list, the encoder / decoder sorts the items in the merge candidate list based on the frequency (S1409).

즉, 머지 후보 리스트의 머지 후보는 발생 빈도가 큰 순서대로 정렬되고, 발생 빈도가 동일한 머지 후보는 미리 정해진 머지 후보 리스트 구성의 순서(즉, 공간적/시간적 이웃 블록의 움직임 정보의 탐색 순서)에 따라 정렬될 수 있다. That is, merge candidates of the merge candidate list are sorted in ascending order, and merge candidates having the same occurrence frequency are arranged according to a predetermined merge candidate list construction order (i.e., search order of motion information of spatial / temporal neighboring blocks). Can be aligned.

이때, 상술한 바와 같이, 발생 빈도가 큰 순서대로 정렬할 때, 발생 빈도의 차이가 미리 정해진 수준 이상인 경우에만 머지 후보 리스트의 정렬이 수행될 수도 있다. In this case, as described above, when sorting in the order of occurrence frequency, the merge candidate list may be sorted only when the difference in occurrence frequency is greater than or equal to a predetermined level.

일례로, 앞서 도 12 및/또는 도 13의 과정에 따라 머지 후보 리스트가 정렬될 수 있다. For example, the merge candidate list may be sorted according to the process of FIGS. 12 and / or 13.

반면, S1403 단계에서 판단한 결과, 머지 후보 리스트의 항목이 5개가 아닌 경우(즉, 5개 미만인 경우), 인코더/디코더는 머지 리스트 내 현재 모든 머지 후보(즉, 공간적 머지 후보 및/또는 시간적 머지 후보)들을 조합함으로써 조합된 양방향 예측 후보(combined)(즉, 조합된 양방향 움직임 정보 후보)를 머지 후보 리스트에 추가한다(S1404).On the other hand, if it is determined in step S1403 that the merge candidate list has not five items (ie, if there are less than five), the encoder / decoder indicates that all current merge candidates (ie, spatial merge candidates and / or temporal merge candidates) in the merge list. ), The combined bidirectional prediction candidates (ie, the combined bidirectional motion information candidates) are added to the merge candidate list (S1404).

인코더/디코더는 머지 후보 리스트의 항목(또는 아이템)이 5개인지 판단한다(S1405). 즉, 머지 후보 리스트에 추가된 머지 후보의 수가 5개인지 판단한다.The encoder / decoder determines whether there are five items (or items) in the merge candidate list (S1405). That is, it is determined whether the number of merge candidates added to the merge candidate list is five.

만약, S1405 단계에서 판단한 결과, 머지 후보 리스트의 항목이 5개인 경우, 인코더/디코더는 빈도 수를 기준으로 머지 후보 리스트의 항목을 정렬한다(S1409). If it is determined in step S1405 that there are five items of the merge candidate list, the encoder / decoder sorts the items of the merge candidate list based on the frequency (S1409).

즉, 머지 후보 리스트의 머지 후보는 발생 빈도가 큰 순서대로 정렬되고, 발생 빈도가 동일한 머지 후보는 미리 정해진 머지 후보 리스트 구성의 순서(즉, 공간적/시간적 이웃 블록의 움직임 정보 및 조합된 양방향 예측 후보의 탐색 순서)에 따라 정렬될 수 있다. That is, merge candidates of the merge candidate list are sorted in ascending order, and merge candidates having the same occurrence frequency are arranged in a predetermined merge candidate list structure (that is, motion information of spatial / temporal neighboring blocks and combined bidirectional prediction candidates). Search order).

이때, 상술한 바와 같이, 발생 빈도가 큰 순서대로 정렬할 때, 발생 빈도의 차이가 미리 정해진 수준 이상인 경우에만 머지 후보 리스트의 정렬이 수행될 수도 있다. In this case, as described above, when sorting in the order of occurrence frequency, the merge candidate list may be sorted only when the difference in occurrence frequency is greater than or equal to a predetermined level.

일례로, 앞서 도 12 및/또는 도 13의 과정에 따라 머지 후보 리스트가 정렬될 수 있다. For example, the merge candidate list may be sorted according to the process of FIGS. 12 and / or 13.

반면, S1405 단계에서 판단한 결과, 머지 후보 리스트의 항목이 5개가 아닌 경우(즉, 5개 미만인 경우), 비-스케일링된(non-scaled) 양방향 예측 후보(즉, 비-스케일링된 양방향 움직임 정보 후보)를 머지 후보 리스트에 추가한다(S1406). On the other hand, if it is determined in step S1405 that there are not five items in the merge candidate list (that is, if there are less than five), the non-scaled bidirectional prediction candidates (that is, the non-scaled bidirectional motion information candidates). ) Is added to the merge candidate list (S1406).

인코더/디코더는 머지 후보 리스트의 항목(또는 아이템)이 5개인지 판단한다(S1407). 즉, 머지 후보 리스트에 추가된 머지 후보의 수가 5개인지 판단한다.The encoder / decoder determines whether there are five items (or items) in the merge candidate list (S1407). That is, it is determined whether the number of merge candidates added to the merge candidate list is five.

만약, S1407 단계에서 판단한 결과, 머지 후보 리스트의 항목이 5개인 경우, 인코더/디코더는 빈도 수를 기준으로 머지 후보 리스트의 항목을 정렬한다(S1409). If it is determined in step S1407 that there are five items of the merge candidate list, the encoder / decoder sorts the items of the merge candidate list based on the frequency (S1409).

즉, 머지 후보 리스트의 머지 후보는 발생 빈도가 큰 순서대로 정렬되고, 발생 빈도가 동일한 머지 후보는 미리 정해진 머지 후보 리스트 구성의 순서(즉, 공간적/시간적 이웃 블록의 움직임 정보, 조합된 양방향 예측 후보 및 비-스케일링된(non-scaled) 양방향 예측 후보의 탐색 순서)에 따라 정렬될 수 있다. That is, merge candidates of the merge candidate list are sorted in ascending order, and merge candidates having the same occurrence frequency are arranged in a predetermined merge candidate list order (i.e., motion information of spatial / temporal neighboring blocks, combined bidirectional prediction candidates). And search order of non-scaled bidirectional prediction candidates).

이때, 상술한 바와 같이, 발생 빈도가 큰 순서대로 정렬할 때, 발생 빈도의 차이가 미리 정해진 수준 이상인 경우에만 머지 후보 리스트의 정렬이 수행될 수도 있다. In this case, as described above, when sorting in the order of occurrence frequency, the merge candidate list may be sorted only when the difference in occurrence frequency is greater than or equal to a predetermined level.

일례로, 앞서 도 12 및/또는 도 13의 과정에 따라 머지 후보 리스트가 정렬될 수 있다. For example, the merge candidate list may be sorted according to the process of FIGS. 12 and / or 13.

반면, S1407 단계에서 판단한 결과, 머지 후보 리스트의 항목이 5개가 아닌 경우(즉, 5개 미만인 경우), 인코더/디코더는 제로 벡터(zero vector)(즉, 제로 움직임 벡터 후보)를 머지 후보 리스트에 추가한다(S1408).On the other hand, if it is determined in step S1407 that the merge candidate list has not five items (i.e., less than five), the encoder / decoder inserts a zero vector (i.e., zero motion vector candidate) into the merge candidate list. It adds (S1408).

즉, 인코더/디코더는 머지 후보 리스트에 추가된 머지 후보의 개수가 머지 후보 리스트의 미리 정해진 개수(예를 들어, 5개)가 될 때까지 참조 픽쳐 인덱스를 변경하면서 제로 움직임 벡터 머지 후보(zero motion vector merging candidates)를 머지 후보 리스트에 추가한다.That is, the encoder / decoder zero motion vector merge candidate (zero motion) while changing the reference picture index until the number of merge candidates added to the merge candidate list is a predetermined number (for example, five) of the merge candidate list. Add vector merging candidates to the merge candidate list.

그리고, 인코더/디코더는 빈도 수를 기준으로 머지 후보 리스트의 항목을 정렬한다(S1409). The encoder / decoder sorts the items of the merge candidate list based on the frequency (S1409).

즉, 머지 후보 리스트의 머지 후보는 발생 빈도가 큰 순서대로 정렬되고, 발생 빈도가 동일한 머지 후보는 미리 정해진 머지 후보 리스트 구성의 순서(즉, 공간적/시간적 이웃 블록의 움직임 정보, 조합된 양방향 예측 후보, 비-스케일링된(non-scaled) 양방향 예측 후보, 제로 움직임 벡터 후보의 탐색 순서)에 따라 정렬될 수 있다. That is, merge candidates of the merge candidate list are sorted in ascending order, and merge candidates having the same occurrence frequency are arranged in a predetermined merge candidate list order (i.e., motion information of spatial / temporal neighboring blocks, combined bidirectional prediction candidates). , Search order of non-scaled bidirectional prediction candidates, zero motion vector candidates).

이때, 상술한 바와 같이, 발생 빈도가 큰 순서대로 정렬할 때, 발생 빈도의 차이가 미리 정해진 수준 이상인 경우에만 머지 후보 리스트의 정렬이 수행될 수도 있다. In this case, as described above, when sorting in the order of occurrence frequency, the merge candidate list may be sorted only when the difference in occurrence frequency is greater than or equal to a predetermined level.

일례로, 앞서 도 12 및/또는 도 13의 과정에 따라 머지 후보 리스트가 정렬될 수 있다. For example, the merge candidate list may be sorted according to the process of FIGS. 12 and / or 13.

한편, 앞서 도 14에서 움직임 정보 후보 리스트를 구성하기 위하여 탐색 대상이 되는 움직임 정보(즉, 공간적 움직임 정보 후보, 시간적 움직임 정보 후보, 조합된 양방향 예측 후보, 비-스케일링된(non-scaled) 양방향 예측 후보, 제로 벡터(zero vector))는 하나의 예시에 불과하며, 도 14의 예시에서 일부의 움직임 정보만을 대상으로 탐색이 수행되거나, 도 14에서 예시되지 않은 움직임 정보가 추가로 탐색될 수도 있다. Meanwhile, motion information (ie, spatial motion information candidate, temporal motion information candidate, combined bidirectional prediction candidate, and non-scaled bidirectional prediction) that are searched for constructing the motion information candidate list in FIG. The candidate, zero vector) is just one example, and the search may be performed on only some of the motion information in the example of FIG. 14, or motion information not illustrated in FIG. 14 may be further searched.

특히, 비-스케일링된(non-scaled) 양방향 예측 후보를 리스트에 추가하는 과정은 생략될 수 있다. 이 경우, S1406 단계 및 S1407 단계는 삭제되며, S1405 단계에서 리스트 항목이 5개가 아닌 경우, S1408 단계가 수행될 수 있다. In particular, the process of adding a non-scaled bidirectional prediction candidate to the list can be omitted. In this case, steps S1406 and S1407 are deleted, and if there are not five list items in step S1405, step S1408 may be performed.

또한, 도 14에서 움직임 정보 후보 리스트의 구성 순서(즉, 공간적 움직임 정보 후보, 시간적 움직임 정보 후보, 조합된 양방향 예측 후보, 비-스케일링된(non-scaled) 양방향 예측 후보, 제로 벡터(zero vector)의 순서)는 하나의 예시에 불과하며, 이와 상이하게 미리 정해진 순서로 진행될 수 있다. In addition, in FIG. 14, the construction order of the motion information candidate list (ie, spatial motion information candidate, temporal motion information candidate, combined bidirectional prediction candidate, non-scaled bidirectional prediction candidate, and zero vector) is shown. Order) is just one example, and may proceed in a different predetermined order.

한편, 앞서 설명한 실시예에서는 기존의 머지 후보 리스트 생성 과정에서 참조하는 공간적/시간적 주변 블록의 위치만을 대상으로 움직임 정보의 중복 발생 빈도 수를 갱신하면서 움직임 정보 후보 리스트가 생성되는 경우를 설명하였으나, 본 발명이 이에 한정되는 것은 아니다. Meanwhile, the above-described embodiment has described a case in which a motion information candidate list is generated while updating the frequency of occurrence of duplicated motion information only for positions of spatial / temporal neighboring blocks referred to in the existing merge candidate list generation process. The invention is not limited thereto.

이에 따라, 본 실시예에서는 발생 빈도를 고려한 현재 블록의 주변 움직임 리스트(즉, 움직임 정보 후보 리스트)를 만들기 위해 다양한 위치의 공간적/시간적 주변 정보를 사용하는 방법을 제안한다. 즉, 본 실시예에서는 다양한 공간적/시간적 주변 블록의 움직임 정보를 이용하여 움직임 정보의 발생 빈도를 확인하고 이를 기반으로 움직임 정보 후보 리스트를 생성할 수 있다. Accordingly, the present embodiment proposes a method of using spatial / temporal surrounding information of various positions to generate a neighboring motion list (ie, motion information candidate list) of the current block in consideration of the occurrence frequency. That is, in this embodiment, the occurrence frequency of the motion information may be checked using the motion information of various spatial / temporal neighboring blocks, and a motion information candidate list may be generated based on the occurrence frequency.

도 15는 본 발명의 일 실시예에 따른 움직임 정보 후보 리스트를 생성하기 위하여 참조 가능한 공간적/시간적 이웃 블록을 예시하는 도면이다. 15 is a diagram illustrating a spatial / temporal neighbor block that can be referred to to generate a motion information candidate list according to an embodiment of the present invention.

도 15에서, 공간적으로 현재 블록의 좌측에 인접한 주변 블록들은 L0, L1, ...로 지칭하고, 공간적으로 현재 블록의 위쪽에 인접한 블록들은 A0, A1, ...로 지칭한다. 또한, 공간적으로 현재 블록의 좌상단에 인접한 블록을 AL, 우상단에 인접한 블록을 AR, 좌하단에 인접한 블록을 BL이라고 지칭한다. 또한, 시간적으로 다른 픽쳐 내에서 현재 블록의 좌상단 부분에 대응하는 블록을 T4, 시간적으로 다른 픽쳐 내에서 현재 블록의 중앙에 대응하는 위치의 좌상단 블록을 T3, 시간적으로 다른 픽쳐 내에서 현재 블록의 중앙에 대응하는 위치의 우하단 블록을 T2, 시간적으로 다른 픽쳐 내에서 현재 블록의 우하단 부분에 대응하는 블록을 T1, 시간적으로 다른 픽쳐 내에서 현재 블록에 대응하는 블록의 우하단에 인접한 블록을 T0라고 지칭한다. In FIG. 15, neighboring blocks adjacent to the left of the current block in space are referred to as L0, L1, ..., and blocks adjacent to the top of the current block in space are referred to as A0, A1, .... Also, a block adjacent to the upper left end of the current block is called AL, a block adjacent to the upper right end is referred to as AR, and a block adjacent to the lower left end is referred to as BL. Also, T4 is the block corresponding to the upper left portion of the current block in another picture temporally, T3 is the upper left block at the position corresponding to the center of the current block in another picture temporally, and the center of the current block in another picture temporally. T2 is the right bottom block at the position corresponding to T2, T1 is the block corresponding to the bottom right portion of the current block in another picture temporally, T0 is the block adjacent to the bottom right end of the block corresponding to the current block in another picture temporally. It is called.

이때, 현재 블록의 좌상단(top-left) 화소의 좌표가 (x, y)이고, 현재 블록의 너비가 W, 현재 블록의 높이가 H인 경우를 가정하여 각 블록을 나타내면 다음과 같이 나타낼 수 있다. At this time, assuming that the coordinates of the top-left pixel of the current block is (x, y), the width of the current block is W, and the height of the current block is H, each block may be represented as follows. .

A0 블록은 좌표 (x, y-1)인 화소를 포함하는 블록이고, A1 블록은 좌표 (x+A0 너비, y-1)인 화소를 포함하는 블록일 수 있다. 마찬가지로, A2 블록은 (x+A0 너비+A1 너비, y-1)인 화소를 포함하는 블록일 수 있다. The A0 block may be a block including a pixel having coordinates (x, y-1), and the A1 block may be a block including a pixel having coordinates (x + A0 width, y-1). Similarly, the A2 block may be a block including a pixel having (x + A0 width + A1 width, y-1).

L0 블록은 좌표 (x-1, y)인 화소를 포함하는 블록이고, L1 블록은 좌표 (x-1, y+L0 높이)인 화소를 포함하는 블록일 수 있다. 마찬가지로, L2 블록은 (x-1, y+L0 높이+L1 높이)인 화소를 포함하는 블록일 수 있다. The L0 block may be a block including pixels having coordinates (x-1, y), and the L1 block may be a block including pixels having coordinates (x-1, y + L0 heights). Similarly, the L2 block may be a block including a pixel of (x-1, y + L0 height + L1 height).

AL 블록은 좌표 (x-1, y-1)인 화소를 포함하는 블록이고, AR 블록은 좌표 (x+W, y-1)인 화소를 포함하는 블록이고, BL 블록은 좌표 (x-1, y+H)인 화소를 포함하는 블록일 수 있다. The AL block is a block containing pixels with coordinates (x-1, y-1), the AR block is a block containing pixels with coordinates (x + W, y-1), and the BL block is a coordinate (x-1 , y + H).

또한, T0 블록은 현재 블록이 속한 픽쳐와 다른 픽쳐 내에서 좌표 (x+W, y+H)인 화소를 포함하는 블록이고, T1 블록은 현재 블록이 속한 픽쳐와 다른 픽쳐 내에서 좌표 (x+W-1, y+H-1)인 화소를 포함하는 블록이고, T2 블록은 현재 블록이 속한 픽쳐와 다른 픽쳐 내에서 좌표 (x+W/2, y+H/2)인 화소를 포함하는 블록이고, T3 블록은 현재 블록이 속한 픽쳐와 다른 픽쳐 내에서 좌표 (x+W/2-1, y+H/2-1)인 화소를 포함하는 블록이고, T4 블록은 현재 블록이 속한 픽쳐와 다른 픽쳐 내에서 좌표 (x, y)인 화소를 포함하는 블록일 수 있다. In addition, the T0 block is a block including pixels having coordinates (x + W, y + H) in a picture different from the picture to which the current block belongs, and the T1 block is a coordinate (x +) in a picture different from the picture to which the current block belongs. W-1, y + H-1), and the block T2 includes pixels having coordinates (x + W / 2, y + H / 2) in a picture different from the picture to which the current block belongs. Block, and the T3 block is a block containing pixels with coordinates (x + W / 2-1, y + H / 2-1) within a picture different from the picture to which the current block belongs, and the T4 block is a picture to which the current block belongs. It may be a block including a pixel having a coordinate (x, y) in a picture different from.

인코더/디코더는 공간적/시간적으로 각 위치에 해당하는 블록(예를 들어, 예측 단위의 부분)의 움직임 정보를 참조하여 현재 블록의 움직임 정보 후보 리스트를 생성할 수 있다. The encoder / decoder may generate a motion information candidate list of the current block by referring to motion information of a block (for example, a part of a prediction unit) corresponding to each position spatially and temporally.

이때, 인코더/디코더는 미리 정해진 순서에 따라 참조 가능한 주변 움직임 정보들을 이용하여 움직임 정보 후보 리스트를 생성할 수 있다. 일례로 다음과 같은 순서에 따라 움직임 정보 후보 리스트를 생성할 수 있다. In this case, the encoder / decoder may generate a motion information candidate list using the surrounding motion information that can be referenced in a predetermined order. For example, the motion information candidate list may be generated in the following order.

1) 왼쪽 블록의 움직임 정보, AL, 위쪽 블록의 움직임 정보, AR, BL, 시간적 주변 움직임 정보 참조1) Refer to motion information of left block, AL, motion information of upper block, AR, BL, and temporal peripheral motion information

이 경우, 인코더/디코더는 L0, L1, L2, ..., AL, A0, A1, A2, ..., AR, BL, T0, T1, ...,T4 블록의 순서로 움직임 정보를 탐색하면서 새로운 항목(즉, 움직임 정보)의 경우 움직임 정보 후보 리스트에 삽입하고, 중복되는 움직임 정보는 움직임 정보 후보 리스트에 삽입하지 않고 빈도수를 갱신(즉, 1씩 증가)할 수 있다. 그리고, 인코더/디코더는 사전에 정의된 움직임 정보 후보 리스트의 항목의 개수에 다다르면 움직임 정보 후보 리스트 생성 과정을 종료할 수 있다.In this case, the encoder / decoder searches for motion information in the order of L0, L1, L2, ..., AL, A0, A1, A2, ..., AR, BL, T0, T1, ..., T4 blocks. While new items (ie, motion information) are inserted into the motion information candidate list, the duplicated motion information can be updated (that is, increased by 1) without being inserted into the motion information candidate list. The encoder / decoder may terminate the motion information candidate list generation process when the number of items of the predefined motion information candidate list is reached.

2) 왼쪽 블록의 움직임 정보와 위쪽 블록의 움직임 정보를 번갈아 가면서 참조, AL, AR, BL, 시간적 주변 움직임 정보 참조2) Alternately reference the motion information of the left block and the motion information of the upper block, and refer to AL, AR, BL, and temporal surrounding motion information.

이 경우, 인코더/디코더는 L0, A0, L1, A1, ..., AL, AR, BL, T0, T1, ...., T4 블록의 순서로 움직임 정보를 탐색하면서 새로운 항목(즉, 움직임 정보)의 경우 움직임 정보 후보 리스트에 삽입하고, 중복되는 움직임 정보는 움직임 정보 후보 리스트에 삽입하지 않고 빈도수를 갱신(즉, 1씩 증가)할 수 있다. 그리고, 인코더/디코더는 사전에 정의된 움직임 정보 후보 리스트의 항목의 개수에 다다르면 움직임 정보 후보 리스트 생성 과정을 종료할 수 있다.In this case, the encoder / decoder searches for motion information in the order of L0, A0, L1, A1, ..., AL, AR, BL, T0, T1, ...., T4 blocks, Information) can be inserted into the motion information candidate list, and the frequency can be updated (ie, increased by 1) without inserting duplicate motion information into the motion information candidate list. The encoder / decoder may terminate the motion information candidate list generation process when the number of items of the predefined motion information candidate list is reached.

앞서 예시한 두 가지 방법 이외에도 AL, AR, BR의 위치와 시간적 주변 움직임 정보가 고려되는 순서에 따라 다양한 움직임 정보 후보 리스트 생성을 위한 참조 순서가 존재할 수 있다. In addition to the above two methods, there may be a reference order for generating various motion information candidate lists according to the order in which the positions of the AL, AR, and BR and the temporal peripheral motion information are considered.

도 16은 본 발명의 일 실시예에 따른 움직임 정보 후보 리스트를 생성하기 위하여 참조 가능한 공간적 이웃 블록을 예시하는 도면이다. 16 is a diagram illustrating a spatial neighboring block that can be referred to for generating a motion information candidate list according to an embodiment of the present invention.

도 16에서는 공간적 이웃 블록만을 예시하고 있으나, 시간적 이웃 블록은 앞서 도 7 또는 도 16의 예시와 같이 이용 가능한 이웃 블록이 정해질 수 있다. Although only spatial neighboring blocks are illustrated in FIG. 16, available neighboring blocks may be defined as temporal neighboring blocks as illustrated in FIG. 7 or FIG. 16.

현재 블록의 좌상단(top-left) 화소의 좌표가 (x, y)이고, 현재 블록의 너비가 W, 현재 블록의 높이가 H인 경우를 가정하여 각 블록을 나타내면 다음과 같이 나타낼 수 있다. Assuming that the coordinates of the top-left pixel of the current block is (x, y), the width of the current block is W, and the height of the current block is H, each block may be represented as follows.

A0 블록은 좌표 (x, y-1)인 화소를 포함하는 블록이고, A1 블록은 좌표 (x+W/2, y-1)인 화소를 포함하는 블록일 수 있다. The A0 block may be a block including a pixel having coordinates (x, y-1), and the A1 block may be a block including a pixel having coordinates (x + W / 2, y-1).

L0 블록은 좌표 (x-1, y)인 화소를 포함하는 블록이고, L1 블록은 좌표 (x-1, y+H/2)인 화소를 포함하는 블록일 수 있다. The L0 block may be a block including a pixel having coordinates (x-1, y), and the L1 block may be a block including a pixel having coordinates (x-1, y + H / 2).

AL 블록은 좌표 (x-1, y-1)인 화소를 포함하는 블록이고, AR 블록은 좌표 (x+W, y-1)인 화소를 포함하는 블록이고, BL 블록은 좌표 (x-1, y+H)인 화소를 포함하는 블록일 수 있다. The AL block is a block containing pixels with coordinates (x-1, y-1), the AR block is a block containing pixels with coordinates (x + W, y-1), and the BL block is a coordinate (x-1 , y + H).

이때, 인코더/디코더는 미리 정해진 순서에 따라 참조 가능한 주변 움직임 정보들을 이용하여 움직임 정보 후보 리스트를 생성할 수 있다. 일례로 다음과 같은 순서에 따라 움직임 정보 후보 리스트를 생성할 수 있다. In this case, the encoder / decoder may generate a motion information candidate list using the surrounding motion information that can be referenced in a predetermined order. For example, the motion information candidate list may be generated in the following order.

1) 앞서 도 15의 예시와 같이, 인코더/디코더는 왼쪽 블록의 움직임 정보, AL, 위쪽 블록의 움직임 정보, AR, BL, 시간적 주변 움직임 정보를 참조하여 움직임 정보 후보 리스트를 생성할 수 있다. 1) As shown in FIG. 15, the encoder / decoder may generate a motion information candidate list by referring to motion information of a left block, AL, motion information of an upper block, AR, BL, and temporal peripheral motion information.

이 경우, 인코더/디코더는 L0, L1, AL, A0, A1, AR, BL, 시간적으로 이웃한 블록의 순서로 움직임 정보를 탐색하면서 새로운 항목(즉, 움직임 정보)의 경우 움직임 정보 후보 리스트에 삽입하고, 중복되는 움직임 정보는 움직임 정보 후보 리스트에 삽입하지 않고 빈도수를 갱신(즉, 1씩 증가)할 수 있다. 그리고, 인코더/디코더는 사전에 정의된 움직임 정보 후보 리스트의 항목의 개수에 다다르면 움직임 정보 후보 리스트 생성 과정을 종료할 수 있다.In this case, the encoder / decoder searches for motion information in the order of L0, L1, AL, A0, A1, AR, BL, and temporally neighboring blocks, and inserts a new item (i.e., motion information) into the motion information candidate list. The frequency information can be updated (that is, increased by 1) without overlapping the motion information candidate list. The encoder / decoder may terminate the motion information candidate list generation process when the number of items of the predefined motion information candidate list is reached.

2) 또는, 왼쪽 블록의 움직임 정보와 위쪽 블록의 움직임 정보를 번갈아 가면서 참조, AL, AR, BL, 시간적 주변 움직임 정보 참조2) Alternatively, refer to alternating motion information of the left block and motion information of the upper block, AL, AR, BL, and temporal peripheral motion information.

이 경우, 인코더/디코더는 L0, A0, L1, A1, AL, AR, BL, 시간적으로 이웃한 블록의 순서로 움직임 정보를 탐색하면서 새로운 항목(즉, 움직임 정보)의 경우 움직임 정보 후보 리스트에 삽입하고, 중복되는 움직임 정보는 움직임 정보 후보 리스트에 삽입하지 않고 빈도수를 갱신(즉, 1씩 증가)할 수 있다. 그리고, 인코더/디코더는 사전에 정의된 움직임 정보 후보 리스트의 항목의 개수에 다다르면 움직임 정보 후보 리스트 생성 과정을 종료할 수 있다.In this case, the encoder / decoder searches for motion information in the order of L0, A0, L1, A1, AL, AR, BL, and temporally neighboring blocks, and inserts a new item (ie, motion information) into the motion information candidate list in the case of a new item (ie, motion information). The frequency information can be updated (that is, increased by 1) without overlapping the motion information candidate list. The encoder / decoder may terminate the motion information candidate list generation process when the number of items of the predefined motion information candidate list is reached.

인코더/디코더는 앞서 도 15와 같이 참조 가능한 모든 공간적/시간적 이웃 블록의 움직임 정보를 참조할 수도 있으나, 도 16과 같이 특정 위치의 공간적/시간적 이웃 블록의 움직임 정보만을 참조할 수도 있다. The encoder / decoder may refer to the motion information of all the spatial / temporal neighboring blocks, which can be referred to as shown in FIG. 15, but may refer to only the motion information of the spatial / temporal neighboring block of a specific location as shown in FIG. 16.

또는, 인코더/디코더는 도 15와 같이 참조 가능한 모든 공간적/시간적 이웃 블록에서 일정 간격으로 선택된 블록의 움직임 정보를 참조하여 리스트를 생성할 수도 있다. 예를 들어, 인코더/디코더는 현재 블록의 상단에 인접한 블록의 경우, 2 블록 간격으로 선택함으로써 A0, A2, A4, ...의 블록을 참조하거나 및/또는 현재 블록의 좌측에 인접한 블록의 경우, 2 블록 간격으로 선택함으로써 L0, L2, ...의 블록을 참조할 수도 있다. Alternatively, the encoder / decoder may generate a list by referring to motion information of a block selected at predetermined intervals from all the spatial / temporal neighboring blocks that can be referred to as shown in FIG. 15. For example, the encoder / decoder may refer to the blocks of A0, A2, A4, ... by selecting in two block intervals for blocks adjacent to the top of the current block and / or for blocks adjacent to the left of the current block. It is also possible to refer to blocks L0, L2, ... by selecting at intervals of two blocks.

또한, 인코더/디코더는 현재 블록의 왼쪽 및/또는 위쪽의 블록이 분할된 정보(예를 들어, 예측 단위의 분할)를 이용하여 현재 블록의 크기보다 작은 크기의 블록으로 분할되었을 경우에만 각 블록의 움직임 정보(또는 일정 간격으로 선택된 블록의 움직임 정보)를 참조하여 움직임 정보 후보 리스트를 생성할 수도 있다. In addition, the encoder / decoder of each block may be used only when the left and / or top blocks of the current block are divided into blocks smaller than the size of the current block by using divided information (eg, prediction unit division). The motion information candidate list may be generated with reference to the motion information (or motion information of blocks selected at predetermined intervals).

도 17은 본 발명의 일 실시예에 따른 움직임 정보 후보 리스트 구성 방법을 예시하는 도면이다.17 is a diagram illustrating a method of constructing a motion information candidate list according to an embodiment of the present invention.

도 17에서는 미리 정해진 움직임 정보 후보 리스트의 항목(아이템)의 수가 N개라고 가정한다. In FIG. 17, it is assumed that the number of items (items) of the predetermined motion information candidate list is N.

도 17을 참조하면, 인코더/디코더는 공간적 주변 움직임 정보를 미리 정해진 개수만큼 움직임 정보 후보 리스트에 추가하되, 중복인 경우 빈도수를 갱신(즉, 증가)한다(S1701).Referring to FIG. 17, the encoder / decoder adds spatial peripheral motion information to a motion information candidate list by a predetermined number, and updates (ie, increases) the frequency when duplicates (S1701).

여기서, 공간적 주변 움직임 정보는 앞서 도 15 및/또는 도 16의 예시에서 현재 블록에 공간적으로 이웃한 AL, AR, BL, A0, ..., L0, ... 블록(즉, 예측 단위의 부분)의 움직임 정보를 의미할 수 있다. Here, the spatial peripheral motion information is previously shown in the examples of FIGS. 15 and / or 16. AL, AR, BL, A0, ..., L0, ... blocks (ie, parts of prediction units) spatially neighboring the current block. ) May mean motion information.

현재 블록에 공간적으로 이웃한 블록의 움직임 정보에서 이용 가능하지 않은 움직임 정보는 움직임 정보 후보 리스트에 추가되지 않을 수 있다(예를 들어, 공간적으로 이웃한 블록이 인트라 예측 모드로 부호화된 경우). Motion information that is not available in the motion information of a block spatially neighboring the current block may not be added to the motion information candidate list (eg, when the spatially neighboring block is encoded in the intra prediction mode).

또한, 미리 정해진 순서에 따라 이웃 블록의 움직임 정보가 탐색되면서 현재 탐색 대상이 되는 이웃 블록의 움직임 정보가 이전의 이웃 블록의 움직임 정보(즉, 움직임 정보 후보 리스트에 추가된 움직임 정보)와 동일하면 움직임 정보 후보 리스트에 추가되지 않으며, 이전의 이웃 블록의 움직임 정보(즉, 중복된 움직임 정보)의 발생 빈도가 1씩 증가될 수 있다. 이때, 움직임 벡터와 참조 인덱스가 동일하면 움직임 정보가 동일하다고 판단될 수 있다. In addition, when motion information of a neighboring block is searched according to a predetermined order, the motion information of the neighboring block currently being searched for is the same as the motion information of the previous neighboring block (ie, motion information added to the motion information candidate list). Not added to the information candidate list, the frequency of occurrence of motion information (ie, duplicate motion information) of a previous neighboring block may be increased by one. In this case, if the motion vector and the reference index are the same, it may be determined that the motion information is the same.

즉, 인코더/디코더는 미리 정해진 순서로 이용 가능한 공간적으로 이웃 블록의 움직임 정보를 중복되지 않도록 움직임 정보 후보 리스트에 추가하되, 중복된 움직임 정보가 발생되면 해당 움직임 정보의 중복 발생 빈도를 1씩 증가시킬 수 있다. That is, the encoder / decoder adds the motion information of neighboring blocks to the motion information candidate list so as not to be overlapped spatially in a predetermined order, and increases the frequency of duplication of the corresponding motion information by 1 when duplicate motion information is generated. Can be.

인코더/디코더는 시간적 주변 움직임 정보를 미리 정해진 개수만큼 움직임 정보 후보 리스트에 추가하되, 중복인 경우 빈도수를 갱신(즉, 증가)한다(S1702).The encoder / decoder adds temporal peripheral motion information to the motion information candidate list by a predetermined number, but updates (ie, increases) the frequency in the case of overlapping (S1702).

여기서, 시간적 주변 움직임 정보는 앞서 도 15 및/또는 도 16의 예시에서 현재 블록에 시간적으로 이웃한 T0, ... 블록(즉, 예측 단위의 부분)의 움직임 정보를 의미할 수 있다. Here, the temporal peripheral motion information may refer to motion information of the T0, ... block (ie, part of the prediction unit) that is temporally neighbored to the current block in the example of FIG. 15 and / or 16.

현재 블록에 시간적으로 이웃한 블록의 움직임 정보에서 이용 가능하지 않은 움직임 정보는 움직임 정보 후보 리스트에 추가되지 않을 수 있다(예를 들어, 공간적으로 이웃한 블록이 인트라 예측 모드로 부호화된 경우). Motion information that is not available in the motion information of a block temporally neighboring to the current block may not be added to the motion information candidate list (eg, when a spatially neighboring block is encoded in an intra prediction mode).

또한, 미리 정해진 순서에 따라 이웃 블록의 움직임 정보가 탐색되면서 현재 탐색 대상이 되는 이웃 블록의 움직임 정보가 이전의 이웃 블록의 움직임 정보(즉, 움직임 정보 후보 리스트에 추가된 움직임 정보)와 동일하면 움직임 정보 후보 리스트에 추가되지 않으며, 이전의 이웃 블록의 움직임 정보(즉, 중복된 움직임 정보)의 발생 빈도가 1씩 증가될 수 있다. 이때, 움직임 벡터와 참조 인덱스가 동일하면 움직임 정보가 동일하다고 판단될 수 있다. In addition, when motion information of a neighboring block is searched according to a predetermined order, the motion information of the neighboring block currently being searched for is the same as the motion information of the previous neighboring block (ie, motion information added to the motion information candidate list). Not added to the information candidate list, the frequency of occurrence of motion information (ie, duplicate motion information) of a previous neighboring block may be increased by one. In this case, if the motion vector and the reference index are the same, it may be determined that the motion information is the same.

즉, 인코더/디코더는 미리 정해진 순서로 이용 가능한 시간적으로 이웃 블록의 움직임 정보를 중복되지 않도록 움직임 정보 후보 리스트에 추가하되, 중복된 움직임 정보가 발생되면 해당 움직임 정보의 중복 발생 빈도를 1씩 증가시킬 수 있다. That is, the encoder / decoder adds motion information of neighboring blocks to the motion information candidate list in a predetermined order so as not to overlap, and increases the frequency of duplication of the corresponding motion information by 1 when duplicate motion information is generated. Can be.

인코더/디코더는 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 N개인지 판단한다(S1703). The encoder / decoder determines whether the number of motion information candidates added to the motion information candidate list is N (S1703).

즉, 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 미리 정해진 움직임 정보 후보 리스트의 항목(아이템)의 수와 동일한지 여부를 판단할 수 있다.That is, it may be determined whether the number of motion information candidates added to the motion information candidate list is equal to the number of items (items) of the predetermined motion information candidate list.

만약, S1703 단계에서 판단한 결과, 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 N개인 경우, 인코더/디코더는 빈도 수를 기준으로 움직임 정보 후보 리스트의 항목을 정렬한다(S1709). If it is determined in step S1703 that the number of motion information candidates added to the motion information candidate list is N, the encoder / decoder sorts the items of the motion information candidate list based on the frequency number (S1709).

즉, 움직임 정보 후보 리스트의 움직임 정보 후보는 발생 빈도가 큰 순서대로 정렬되고, 발생 빈도가 동일한 움직임 정보 후보는 미리 정해진 움직임 정보 후보 구성의 순서(즉, 공간적/시간적 이웃 블록의 움직임 정보의 탐색 순서)에 따라 정렬될 수 있다. That is, motion information candidates of the motion information candidate list are arranged in order of occurrence frequency, and motion information candidates having the same occurrence frequency are arranged in a predetermined motion information candidate configuration order (i.e., search order of motion information of spatial / temporal neighboring blocks). Can be sorted according to

이때, 상술한 바와 같이, 발생 빈도가 큰 순서대로 정렬할 때, 발생 빈도의 차이가 미리 정해진 수준 이상인 경우에만 움직임 정보 후보 리스트의 정렬이 수행될 수도 있다. In this case, as described above, when the frequency of occurrence is sorted in ascending order, the motion information candidate list may be sorted only when the difference in the frequency of occurrence is greater than or equal to a predetermined level.

일례로, 앞서 도 12 및/또는 도 13의 과정에 따라 움직임 정보 후보 리스트가 정렬될 수 있다. For example, the motion information candidate list may be sorted according to the process of FIGS. 12 and / or 13.

반면, S1703 단계에서 판단한 결과, 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 N개가 아닌 경우(즉, N개 미만인 경우), 인코더/디코더는 움직임 정보 후보 리스트 내 현재까지 추가된 모든 움직임 정보 후보(즉, 공간적 움직임 정보 후보 및/또는 시간적 움직임 정보 후보)들을 조합함으로써 조합된 양방향 예측 후보(combined)(즉, 조합된 움직임 정보 후보)를 움직임 정보 후보 리스트에 추가한다(S1704).On the other hand, if it is determined in step S1703 that the number of motion information candidates added to the motion information candidate list is not N (that is, if it is less than N), the encoder / decoder adds all motion information candidates added to the present in the motion information candidate list. By combining the spatial motion information candidates and / or the temporal motion information candidates, the combined bidirectional prediction candidates (ie, the combined motion information candidates) are added to the motion information candidate list (S1704).

인코더/디코더는 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 N개인지 여부를 판단한다(S1705). The encoder / decoder determines whether the number of motion information candidates added to the motion information candidate list is N (S1705).

즉, 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 미리 정해진 움직임 정보 후보 리스트의 항목(아이템)의 수와 동일한지 여부를 판단할 수 있다.That is, it may be determined whether the number of motion information candidates added to the motion information candidate list is equal to the number of items (items) of the predetermined motion information candidate list.

만약, S1705 단계에서 판단한 결과, 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 N개인 경우, 인코더/디코더는 빈도 수를 기준으로 움직임 정보 후보 리스트의 항목을 정렬한다(S1709). If it is determined in step S1705 that the number of motion information candidates added to the motion information candidate list is N, the encoder / decoder sorts the items of the motion information candidate list based on the frequency number (S1709).

즉, 움직임 정보 후보 리스트의 움직임 정보 후보는 발생 빈도가 큰 순서대로 정렬되고, 발생 빈도가 동일한 움직임 정보 후보는 미리 정해진 움직임 정보 후보 구성의 순서(즉, 공간적/시간적 이웃 블록의 움직임 정보 및 조합된 양방향 예측 후보의 탐색 순서)에 따라 정렬될 수 있다. That is, motion information candidates of the motion information candidate list are arranged in order of occurrence frequency, and motion information candidates having the same occurrence frequency are arranged in a predetermined order of motion information candidate configuration (i.e., motion information of spatial / temporal neighboring blocks and combined). Search order of bidirectional prediction candidates).

이때, 상술한 바와 같이, 발생 빈도가 큰 순서대로 정렬할 때, 발생 빈도의 차이가 미리 정해진 수준 이상인 경우에만 움직임 정보 후보 리스트의 정렬이 수행될 수도 있다. In this case, as described above, when the frequency of occurrence is sorted in ascending order, the motion information candidate list may be sorted only when the difference in the frequency of occurrence is greater than or equal to a predetermined level.

일례로, 앞서 도 12 및/또는 도 13의 과정에 따라 움직임 정보 후보 리스트가 정렬될 수 있다. For example, the motion information candidate list may be sorted according to the process of FIGS. 12 and / or 13.

반면, S1705 단계에서 판단한 결과, 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 N개가 아닌 경우(즉, N개 미만인 경우), 인코더/디코더는 비-스케일링된(non-scaled) 양방향 예측 후보(즉, 비-스케일링된 양방향 움직임 정보 후보)를 움직임 정보 후보 리스트에 추가한다(S1706).On the other hand, if it is determined in step S1705 that the number of motion information candidates added to the motion information candidate list is not N (that is, less than N), the encoder / decoder is a non-scaled bidirectional prediction candidate ( That is, a non-scaled bidirectional motion information candidate) is added to the motion information candidate list (S1706).

인코더/디코더는 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 N개인지 여부를 판단한다(S1707). The encoder / decoder determines whether the number of motion information candidates added to the motion information candidate list is N (S1707).

즉, 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 미리 정해진 움직임 정보 후보 리스트의 항목(아이템)의 수와 동일한지 여부를 판단할 수 있다.That is, it may be determined whether the number of motion information candidates added to the motion information candidate list is equal to the number of items (items) of the predetermined motion information candidate list.

만약, S1707 단계에서 판단한 결과, 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 N개인 경우, 인코더/디코더는 빈도 수를 기준으로 움직임 정보 후보 리스트의 항목을 정렬한다(S1709). If it is determined in step S1707 that the number of motion information candidates added to the motion information candidate list is N, the encoder / decoder sorts the items of the motion information candidate list based on the frequency number (S1709).

즉, 움직임 정보 후보 리스트의 움직임 정보 후보는 발생 빈도가 큰 순서대로 정렬되고, 발생 빈도가 동일한 움직임 정보 후보는 미리 정해진 움직임 정보 후보 구성의 순서(즉, 공간적/시간적 이웃 블록의 움직임 정보, 조합된 양방향 예측 후보 및 비-스케일링된 예측 후보의 탐색 순서)에 따라 정렬될 수 있다. That is, motion information candidates of the motion information candidate list are arranged in order of occurrence frequency, and motion information candidates having the same occurrence frequency are arranged in a predetermined order of motion information candidate configuration (that is, motion information of spatial / temporal neighboring blocks, combined Search order of bidirectional prediction candidates and non-scaled prediction candidates).

이때, 상술한 바와 같이, 발생 빈도가 큰 순서대로 정렬할 때, 발생 빈도의 차이가 미리 정해진 수준 이상인 경우에만 움직임 정보 후보 리스트의 정렬이 수행될 수도 있다. In this case, as described above, when the frequency of occurrence is sorted in ascending order, the motion information candidate list may be sorted only when the difference in the frequency of occurrence is greater than or equal to a predetermined level.

일례로, 앞서 도 12 및/또는 도 13의 과정에 따라 움직임 정보 후보 리스트가 정렬될 수 있다. For example, the motion information candidate list may be sorted according to the process of FIGS. 12 and / or 13.

반면, S1707 단계에서 판단한 결과, 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 N개가 아닌 경우(즉, N개 미만인 경우), 인코더/디코더는 제로 벡터(zero vector)(즉, 제로 움직임 벡터 후보)를 움직임 정보 후보 리스트에 추가한다(S1708).On the other hand, if it is determined in step S1707 that the number of motion information candidates added to the motion information candidate list is not N (that is, less than N), the encoder / decoder is a zero vector (that is, zero motion vector candidates). ) Is added to the motion information candidate list (S1708).

즉, 인코더/디코더는 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 미리 정해진 움직임 정보 후보 리스트의 항목(아이템)의 수가 될 때까지 참조 픽쳐 인덱스를 변경하면서 제로 움직임 벡터(zero motion vector) 후보를 움직임 정보 후보 리스트에 추가할 수 있다.That is, the encoder / decoder changes the reference picture index until the number of motion information candidates added to the motion information candidate list becomes the number of items (items) of the predetermined motion information candidate list, and selects zero motion vector candidates. Can be added to the motion information candidate list.

그리고, 인코더/디코더는 빈도 수를 기준으로 움직임 정보 후보 리스트의 항목을 정렬한다(S1409). The encoder / decoder sorts the items of the motion information candidate list based on the frequency (S1409).

즉, 움직임 정보 후보 리스트의 움직임 정보 후보는 발생 빈도가 큰 순서대로 정렬되고, 발생 빈도가 동일한 움직임 정보 후보는 미리 정해진 움직임 정보 후보 리스트 구성의 순서(즉, 공간적/시간적 이웃 블록의 움직임 정보, 조합된 양방향 예측 후보, 비-스케일링된(non-scaled) 양방향 예측 후보, 제로 움직임 벡터 후보의 탐색 순서)에 따라 정렬될 수 있다. That is, the motion information candidates of the motion information candidate list are arranged in the order of occurrence frequency, and the motion information candidates having the same occurrence frequency are arranged in the order of the predetermined motion information candidate list construction (that is, the motion information and the combination of the spatial / temporal neighboring blocks). Ordered bidirectional prediction candidates, non-scaled bidirectional predictive candidates, and search order of zero motion vector candidates).

이때, 상술한 바와 같이, 발생 빈도가 큰 순서대로 정렬할 때, 발생 빈도의 차이가 미리 정해진 수준 이상인 경우에만 움직임 정보 후보 리스트의 정렬이 수행될 수도 있다. In this case, as described above, when the frequency of occurrence is sorted in ascending order, the motion information candidate list may be sorted only when the difference in the frequency of occurrence is greater than or equal to a predetermined level.

일례로, 앞서 도 12 및/또는 도 13의 과정에 따라 움직임 정보 후보 리스트가 정렬될 수 있다. For example, the motion information candidate list may be sorted according to the process of FIGS. 12 and / or 13.

한편, 앞서 도 17에서 움직임 정보 후보 리스트를 구성하기 위하여 탐색 대상이 되는 움직임 정보(즉, 공간적 움직임 정보 후보, 시간적 움직임 정보 후보, 조합된 양방향 움직임 정보 후보, 비-스케일링된(non-scaled) 양방향 움직임 정보 후보, 제로 벡터(zero vector) 후보)는 하나의 예시에 불과하며, 도 17의 예시에서 일부의 움직임 정보만을 대상으로 탐색이 수행되거나, 도 17에서 예시되지 않은 움직임 정보가 추가로 탐색될 수도 있다. Meanwhile, motion information (ie, spatial motion information candidate, temporal motion information candidate, combined bidirectional motion information candidate, and non-scaled bidirectional) that are searched for constructing the motion information candidate list in FIG. The motion information candidate and the zero vector candidate) are just one example. In the example of FIG. 17, a search may be performed on only some of the motion information, or motion information not illustrated in FIG. 17 may be further searched. It may be.

특히, 비-스케일링된(non-scaled) 양방향 예측 후보를 리스트에 추가하는 과정은 생략될 수 있다. 이 경우, S1706 단계 및 S1707 단계는 삭제되며, S1705 단계에서 움직임 정보 후보 리스트에 추가된 항목(즉, 움직임 정보 후보)이 N개가 아닌 경우, S1708 단계가 수행될 수 있다. In particular, the process of adding a non-scaled bidirectional prediction candidate to the list can be omitted. In this case, steps S1706 and S1707 are deleted, and if there are not N items (that is, motion information candidates) added to the motion information candidate list in step S1705, step S1708 may be performed.

또한, 도 17에서 움직임 정보 후보 리스트의 구성 순서(즉, 공간적 움직임 정보 후보, 시간적 움직임 정보 후보, 조합된 양방향 움직임 정보 후보, 비-스케일링된(non-scaled) 양방향 움직임 정보 후보, 제로 벡터(zero vector) 후보의 순서)는 하나의 예시에 불과하며, 이와 상이하게 미리 정해진 순서로 진행될 수 있다. In addition, in FIG. 17, the construction order of the motion information candidate list (ie, spatial motion information candidate, temporal motion information candidate, combined bidirectional motion information candidate, non-scaled bidirectional motion information candidate, zero vector (zero) vector) the order of the candidates is only one example, and may proceed in a different predetermined order.

본 실시예에서는 추가적인 부호화 이득을 위해 다음과 같은 방법을 수행할 수 있다In the present embodiment, the following method may be performed for additional encoding gain.

1) 현재 블록의 분할 정도(예를 들어, 부호화 단위의 분할 깊이 또는 예측 단위의 분할 모드)에 따라 기존의 움직임 정보 리스트 구성 방법(예를 들어, 기존의 머지 후보 리스트 구성 방법 및/또는 AMVP 움직임 벡터 예측값 후보 리스트 구성 방법)을 사용할 것인지 본 실시예세서 제안 방법을 사용할 것인지 결정될 수 있다. 1) A method of constructing an existing motion information list according to the degree of partitioning of a current block (eg, a partition depth of a coding unit or a partition mode of a prediction unit) (eg, an existing merge candidate list construction method and / or AMVP motion) Vector prediction value candidate list construction method) or the present invention proposal method may be determined.

블록의 크기가 큰 경우 주변의 움직임 정보가 높은 빈도를 보인다고 해도 현재 블록에 주는 영향은 작을 수 있으며, 블록의 크기가 작을수록 주변 움직임 정보와 현재 블록의 움직임 정보가 유사할 확률이 높다. If the size of the block is large, even if the surrounding motion information shows a high frequency, the influence on the current block may be small. The smaller the block size is, the higher the probability that the neighboring motion information is similar to the motion information of the current block.

따라서, 현재 블록(예를 들어, 부호화 단위 및/또는 예측 단위)의 분할되는 깊이(또는 블록의 크기 또는 분할 모드)에 따라서 움직임 정보 후보 리스트 구성 방법을 다르게 설정할 수 있다.Accordingly, a method of constructing a motion information candidate list may be set differently according to the split depth (or block size or split mode) of the current block (eg, coding unit and / or prediction unit).

이 경우, 각 분할 깊이 또는 블록의 크기 또는분할 모드에 따른 움직임 정보 구성 방법은 시퀀스(sequence) 단위, 슬라이스(slice) 단위 마다 각 헤더(header)를 통해 전송될 수 있다. In this case, the motion information configuration method according to each division depth or block size or division mode may be transmitted through each header for each sequence unit and slice unit.

예를 들어, 시퀀스, 슬라이스 헤더에서 본 실시예에서 제안하는 움직임 정보 후보 리스트의 구성 방법이 적용되는 블록의 분할 깊이 정보(예를 들어, 부호화 단위의 분할 깊이 정보) 또는 블록의 크기(예를 들어, 부호화 단위 및/또는 예측 단위의 크기)가 전송될 수 있다. 이때, 전송된 블록의 분할 깊이 정보 보다 현재 블록의 분할 깊이가 더 큰 경우(즉, 더 작게 분할된 경우) 또는 전송된 블록의 크기 보다 현재 블록의 크기가 더 작은 경우, 본 실시예에서 제안하는 움직임 정보 후보 리스트의 구성 방법이 적용될 수 있다. For example, in the sequence and slice header, split depth information of a block (for example, split depth information of a coding unit) to which the method of constructing the motion information candidate list proposed in this embodiment is applied, or a block size (for example, , Coding units and / or prediction unit sizes) may be transmitted. In this case, when the partition depth of the current block is larger than the partition depth information of the transmitted block (that is, the partition is smaller) or the size of the current block is smaller than the size of the transmitted block, the present embodiment proposes A method of constructing a motion information candidate list may be applied.

또는, 시퀀스, 슬라이스 헤더에서 본 실시예에서 제안하는 움직임 정보 후보 리스트의 구성 방법이 적용되는 블록의 분할 모드(예를 들어, 예측 단위의 분할 모드)가 시그널링될 수 있다. 이때, 전송된 블록의 분할 모드에 따라 현재 블록이 분할된 경우, 본 실시예에서 제안하는 움직임 정보 후보 리스트의 구성 방법이 적용될 수 있다.Alternatively, a division mode (eg, a division mode of a prediction unit) to which a method of constructing a motion information candidate list proposed in this embodiment is applied in a sequence and a slice header may be signaled. At this time, when the current block is divided according to the partitioning mode of the transmitted block, the method of constructing the motion information candidate list proposed in this embodiment may be applied.

또는, 본 실시예에서 제안하는 움직임 정보 후보 리스트의 구성 방법이 적용되는 블록의 분할 깊이 정보(예를 들어, 부호화 단위의 분할 깊이 정보) 또는 블록의 크기(예를 들어, 부호화 단위 및/또는 예측 단위의 크기) 또는 블록의 분할 모드(예를 들어, 예측 단위의 분할 모드)는 미리 정의될 수 있다. Alternatively, split depth information (eg, split depth information of a coding unit) or block size (eg, coding unit and / or prediction) of a block to which the method for constructing a motion information candidate list proposed in this embodiment is applied. The size of the unit) or the splitting mode of the block (eg, the splitting mode of the prediction unit) may be predefined.

이 경우, 미리 정해진 블록의 분할 깊이 정보 보다 현재 블록의 분할 깊이가 더 크면(즉, 더 작게 분할되면) 또는 미리 정해진 블록의 크기 보다 현재 블록의 크기가 더 작으면, 본 실시예에서 제안하는 움직임 정보 후보 리스트의 구성 방법이 적용될 수 있다. 또는, 미리 정해진 블록의 분할 모드에 따라 현재 블록이 분할되면, 본 실시예에서 제안하는 움직임 정보 후보 리스트의 구성 방법이 적용될 수 있다.In this case, if the partition depth of the current block is larger than the partition depth information of the predetermined block (i.e., the partition is smaller) or if the size of the current block is smaller than the size of the predetermined block, the motion proposed in this embodiment is proposed. The construction method of the information candidate list may be applied. Alternatively, if the current block is partitioned according to the partition mode of the predetermined block, the method of constructing the motion information candidate list proposed in this embodiment may be applied.

2) 본 실시예에서 제안하는 움직임 정보 후보 리스트 구성 방법은 상술한 바와 같이 머지 모드를 위한 움직임 정보 리스트 구성뿐 아니라 AMVP 모드를 위한 리스트 구성 과정에서도 적용될 수 있다. AMVP 모드를 위한 리스트 구성 과정에 적용되는 경우에도, 앞서 1)에서 설명한 바와 같이 현재 블록의 분할되는 깊이(또는 블록의 크기 또는 분할 모드)에 따라서 본 실시예에서 제안하는 움직임 정보 후보 리스트 구성 방법이 적용되는지 여부가 결정될 수 있다. 2) The motion information candidate list construction method proposed in the present embodiment can be applied not only to the motion information list construction for the merge mode but also to the list construction process for the AMVP mode as described above. Even when applied to the list construction process for the AMVP mode, the motion information candidate list construction method proposed in this embodiment is applied according to the partition depth (or block size or partition mode) of the current block as described in 1) above. Whether or not applied may be determined.

3) 또한, 빈도 수를 고려하여 움직임 정보 후보 리스트의 구성이 완료된 후에, 빈도의 분포를 고려하여 움직임 정보 리스트 인덱스(예를 들어, 머지 인덱스 또는 움직임 참조 플래그)를 부호화/복호화 하는 방법을 변화 시킬 수 있다. 특정 움직임 정보 후보의 빈도가 매우 높을 경우 해당 움직임 정보 후보를 가리키는 인덱스를 위한 콘텍스트 모델(context model)(즉, 심볼의 발생 확률에 관한 정보)이나 코드 워드(code word) 등을 변화시킬 수 있다. 3) After the construction of the motion information candidate list in consideration of the frequency number is completed, the method of encoding / decoding the motion information list index (for example, the merge index or the motion reference flag) in consideration of the distribution of the frequencies may be changed. Can be. When the frequency of a particular motion information candidate is very high, a context model (ie, information on occurrence probability of a symbol) or a code word for an index indicating the motion information candidate may be changed.

예를 들어, 5개의 움직임 정보 후보를 허용하는 경우 움직임 정보 인덱스는 절삭된 라이스(TR: Truncated Rice)(예를 들어, 절삭된 라이스 이진화를 위한 변수 cMax=4, 파라미터 cRiceParam=0)로 이진화(binarization)을 수행하여 최대 4개의 심볼에 대해 부호화하며, 첫 번째 심볼에 대해서만 콘텍스트 모델이 적용될 수 있다. 예를 들어, 콘텍스트의 초기 값은 P 슬라이스의 경우 122, B 슬라이스의 경우 137 이며 모두 MPS(Most Probable Symbol)는 심볼이 0일 확률이 우세한 것으로 설정될 수도 있다(70~85%). For example, if five motion information candidates are allowed, the motion information index may be binarized with truncated rice (e.g., variable cMax = 4, parameter cRiceParam = 0 for truncated rice binarization). binarization) is performed to encode up to four symbols, and the context model can be applied only to the first symbol. For example, the initial value of the context is 122 for a P slice and 137 for a B slice, and all of the Most Probable Symbols (MPSs) may be set to have a probability that a symbol is 0 (70-85%).

이때, 특정 움직임 후보의 발생 빈도가 압도적으로 높을 경우, 해당 움직임 정보 후보를 가리키는 인덱스를 위한 콘텍스트는 0일 확률이 더 높게(예를 들어, 90%이상) 설정될 수도 있다. In this case, when the frequency of occurrence of a specific motion candidate is overwhelmingly high, the context for the index indicating the motion information candidate may be set to have a higher probability of being 0 (eg, 90% or more).

또한 코드워드를 변경하는 이진화는 움직임 후보들의 발생빈도가 균일한 편일 경우, 예를 들어, 5개의 움직임 정보 후보를 허용할 때 움직임 정보 인덱스는 각 움직임 후보 별로 (00, 01, 10, 110, 111)와 같은 형태로 이진화가 수행될 수 있다. 이때, 특정 움직임 후보의 발생 빈도가 압도적으로 높을 경우, 해당 움직임 정보 후보를 가리키는 인덱스에는 위와 상이한 코드워드가 할당(예를 들어, 더 짧은 코드워드 할당)될 수 있다. In addition, when the binarization of changing codewords has a uniform frequency of motion candidates, for example, when five motion information candidates are allowed, the motion information index is (00, 01, 10, 110, 111) for each motion candidate. Binarization may be performed in the form of. In this case, when the frequency of occurrence of a specific motion candidate is overwhelmingly high, a codeword different from the above may be assigned to the index indicating the motion information candidate (for example, shorter codeword allocation).

이때, 디코더에서 파싱을 디코딩 과정의 의존성 없이 수행하기 위하여, 특정 움직임 정보 후보를 가리키는 인덱스에 대하여 다른 콘텍스트나 이진화를 수행할 경우 이를 지시하기 위한 별도의 플래그가 인코더로부터 전송될 수도 있다. In this case, in order to perform parsing at the decoder without dependency of a decoding process, a separate flag for indicating this when another context or binarization is performed on an index indicating a specific motion information candidate may be transmitted from an encoder.

실시예Example 2 2

본 발명은 주변의 움직임 정보를 리스트화 할 때 장기 움직임 정보(long term motion information)를 정의하여, 이를 움직임 정보 후보 리스트의 구성 시 고려하는 방법을 제안한다. The present invention proposes a method of defining long term motion information when listing the motion information of the surroundings and considering this when constructing a motion information candidate list.

본 명세서에서 장기 움직임 정보는 현재 블록의 주변(즉, 공간적으로 인접한 블록)에서 획득할 수 없는 움직임 정보를 의미한다. 즉, 공간적으로 현재 블록과 2 블록 이상 떨어져 있는 블록의 움직임 정보, 현재 블록이 속한 픽쳐의 전체적인 경향성을 띄는 움직임 정보 등이 이에 속할 수 있다. In the present specification, long-term motion information refers to motion information that cannot be obtained in the vicinity of the current block (ie, a spatially adjacent block). That is, motion information of blocks that are spatially separated from the current block by two or more blocks, motion information that exhibits overall tendency of the picture to which the current block belongs, and the like may belong to this.

장기 움직임 정보는 다음과 같은 움직임 정보 중 적어도 어느 하나를 포함할 수 있다. The long-term motion information may include at least one of the following motion information.

- 최근에 사용되었으나 현재 움직임 정보 후보 리스트에 존재하지 않는 움직임 정보(즉, 현재 블록으로부터 공간적으로 방향과 무관하게 M개의 블록 이상 떨어진 블록의 움직임 정보)-Motion information recently used but not present in the current motion information candidate list (ie motion information of blocks more than M blocks away from the current block regardless of spatial direction)

- 픽쳐의 전역적인 움직임 정보(global motion information)Global motion information of the picture

- 픽쳐 내에서 가장 높은 빈도를 보이는 움직임 정보Motion information with the highest frequency in the picture

도 18은 본 발명의 일 실시예에 따른 움직임 정보 후보 리스트 구성 방법을 예시하는 도면이다. 18 is a diagram illustrating a method of constructing a motion information candidate list according to an embodiment of the present invention.

도 18에서는 미리 정해진 움직임 정보 후보 리스트의 항목(아이템)의 수가 N개라고 가정한다. In FIG. 18, it is assumed that the number of items (items) of the predetermined motion information candidate list is N.

도 18을 참조하면, 인코더/디코더는 중복된 움직임 정보를 제외하고, 공간적 주변 움직임 정보를 미리 정해진 개수만큼 움직임 정보 후보 리스트에 추가한다(S1801).Referring to FIG. 18, the encoder / decoder adds spatial peripheral motion information to a motion information candidate list as a predetermined number, except for duplicate motion information (S1801).

여기서, 공간적 주변 움직임 정보는 앞서 도 7의 예시에서 A1, B1, B0, A0, B2 블록(즉, 예측 단위의 부분)의 움직임 정보를 의미할 수도 있으며, 또는 앞서 도 15 및/또는 도 16의 예시에서 현재 블록에 공간적으로 이웃한 AL, AR, BL, A0, ..., L0, ... 블록(즉, 예측 단위의 부분)의 움직임 정보를 의미할 수 있다. Here, the spatial peripheral motion information may mean motion information of blocks A1, B1, B0, A0, and B2 (that is, a part of a prediction unit) in the example of FIG. 7, or may be previously described with reference to FIGS. 15 and / or 16. In the example, this may mean motion information of AL, AR, BL, A0, ..., L0, ... blocks (that is, parts of prediction units) spatially neighboring the current block.

현재 블록에 공간적으로 이웃한 블록의 움직임 정보에서 이용 가능하지 않은 움직임 정보는 움직임 정보 후보 리스트에 추가되지 않을 수 있다(예를 들어, 공간적으로 이웃한 블록이 인트라 예측 모드로 부호화된 경우). Motion information that is not available in the motion information of a block spatially neighboring the current block may not be added to the motion information candidate list (eg, when the spatially neighboring block is encoded in the intra prediction mode).

또한, 미리 정해진 순서에 따라 이웃 블록의 움직임 정보가 탐색되면서 현재 탐색 대상이 되는 이웃 블록의 움직임 정보가 이전의 이웃 블록의 움직임 정보(즉, 움직임 정보 후보 리스트에 추가된 움직임 정보)와 동일하면 움직임 정보 후보 리스트에 추가되지 않는다. 이때, 움직임 벡터와 참조 인덱스가 동일하면 움직임 정보가 동일하다고 판단될 수 있다.In addition, when motion information of a neighboring block is searched according to a predetermined order, the motion information of the neighboring block currently being searched for is the same as the motion information of the previous neighboring block (ie, motion information added to the motion information candidate list). It is not added to the information candidate list. In this case, if the motion vector and the reference index are the same, it may be determined that the motion information is the same.

즉, 인코더/디코더는 중복된 움직임 정보를 제외하고, 미리 정해진 순서로 이용 가능한 시간적으로 이웃 블록의 움직임 정보를 중복되지 않도록 움직임 정보 후보 리스트에 추가할 수 있다.That is, the encoder / decoder may add the motion information of the neighboring block in the predetermined order to the motion information candidate list so as not to overlap, except for the overlapped motion information.

인코더/디코더는 중복된 움직임 정보를 제외하고, 시간적 주변 움직임 정보를 미리 정해진 개수만큼 움직임 정보 후보 리스트에 추가한다(S1802).The encoder / decoder adds temporal peripheral motion information to the motion information candidate list in a predetermined number, except for duplicate motion information (S1802).

여기서, 시간적 주변 움직임 정보는 앞서 도 7의 예시에서 T0, T1 블록(즉, 예측 단위의 부분)의 움직임 정보를 의미할 수도 있으며, 또는 앞서 도 15 및/또는 도 16의 예시에서 현재 블록에 시간적으로 이웃한 T0, ... 블록(즉, 예측 단위의 부분)의 움직임 정보를 의미할 수 있다. In this case, the temporal peripheral motion information may mean motion information of the T0 and T1 blocks (that is, a part of the prediction unit) in the example of FIG. 7, or may be temporal to the current block in the examples of FIGS. 15 and / or 16. This may mean motion information of neighboring T0, ... blocks (that is, parts of prediction units).

현재 블록에 시간적으로 이웃한 블록의 움직임 정보에서 이용 가능하지 않은 움직임 정보는 움직임 정보 후보 리스트에 추가되지 않을 수 있다(예를 들어, 공간적으로 이웃한 블록이 인트라 예측 모드로 부호화된 경우). Motion information that is not available in the motion information of a block temporally neighboring to the current block may not be added to the motion information candidate list (eg, when a spatially neighboring block is encoded in an intra prediction mode).

또한, 미리 정해진 순서에 따라 이웃 블록의 움직임 정보가 탐색되면서 현재 탐색 대상이 되는 이웃 블록의 움직임 정보가 이전의 이웃 블록의 움직임 정보(즉, 움직임 정보 후보 리스트에 추가된 움직임 정보)와 동일하면 움직임 정보 후보 리스트에 추가되지 않는다. 이때, 움직임 벡터와 참조 인덱스가 동일하면 움직임 정보가 동일하다고 판단될 수 있다.In addition, when motion information of a neighboring block is searched according to a predetermined order, the motion information of the neighboring block currently being searched for is the same as the motion information of the previous neighboring block (ie, motion information added to the motion information candidate list). It is not added to the information candidate list. In this case, if the motion vector and the reference index are the same, it may be determined that the motion information is the same.

즉, 인코더/디코더는 미리 정해진 순서로 이용 가능한 시간적으로 이웃 블록의 움직임 정보를 중복되지 않도록 움직임 정보 후보 리스트에 추가할 수 있다. That is, the encoder / decoder may add the motion information of the neighboring block to the motion information candidate list so as not to overlap in time available in a predetermined order.

인코더/디코더는 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 N개인지 판단한다(S1803). The encoder / decoder determines whether the number of motion information candidates added to the motion information candidate list is N (S1803).

즉, 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 미리 정해진 움직임 정보 후보 리스트의 항목(아이템)의 수와 동일한지 여부를 판단할 수 있다.That is, it may be determined whether the number of motion information candidates added to the motion information candidate list is equal to the number of items (items) of the predetermined motion information candidate list.

만약, S1803 단계에서 판단한 결과, 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 N개인 경우, 인코더/디코더는 움직임 정보 후보 리스트의 구성을 종료한다. If it is determined in step S1803 that the number of motion information candidates added to the motion information candidate list is N, the encoder / decoder ends the construction of the motion information candidate list.

반면, S1803 단계에서 판단한 결과, 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 N개가 아닌 경우(즉, N개 미만인 경우), 인코더/디코더는 중복된 움직임 정보를 제외하고, 장기 움직임 정보 후보를 움직임 정보 후보 리스트에 추가한다(S1804).On the other hand, if it is determined in step S1803 that the number of motion information candidates added to the motion information candidate list is not N (that is, less than N), the encoder / decoder excludes the long motion information candidates except for duplicate motion information. It is added to the motion information candidate list (S1804).

인코더/디코더는 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 N개인지 판단한다(S1805). The encoder / decoder determines whether the number of motion information candidates added to the motion information candidate list is N (S1805).

즉, 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 미리 정해진 움직임 정보 후보 리스트의 항목(아이템)의 수와 동일한지 여부를 판단할 수 있다.That is, it may be determined whether the number of motion information candidates added to the motion information candidate list is equal to the number of items (items) of the predetermined motion information candidate list.

만약, S1805 단계에서 판단한 결과, 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 N개인 경우, 인코더/디코더는 움직임 정보 후보 리스트의 구성을 종료한다. If it is determined in step S1805 that the number of motion information candidates added to the motion information candidate list is N, the encoder / decoder ends the construction of the motion information candidate list.

반면, S1805 단계에서 판단한 결과, 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 N개가 아닌 경우(즉, N개 미만인 경우), 인코더/디코더는 움직임 정보 후보 리스트 내 현재까지 추가된 모든 움직임 정보 후보(즉, 공간적 움직임 정보 후보, 시간적 움직임 정보 후보 및/또는 장기 움직임 정보 후보)들을 조합함으로써 조합된 양방향 예측 후보(combined)(즉, 조합된 움직임 정보 후보)를 움직임 정보 후보 리스트에 추가한다(S1806).On the other hand, if it is determined in step S1805 that the number of motion information candidates added to the motion information candidate list is not N (that is, if it is less than N), the encoder / decoder indicates all the motion information candidates added to the present time in the motion information candidate list. (I.e., combining spatial motion information candidates, temporal motion information candidates, and / or long-term motion information candidates) to add a combined bidirectional prediction candidate (i.e., combined motion information candidates) to the motion information candidate list (S1806). ).

인코더/디코더는 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 N개인지 판단한다(S1807). The encoder / decoder determines whether the number of motion information candidates added to the motion information candidate list is N (S1807).

즉, 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 미리 정해진 움직임 정보 후보 리스트의 항목(아이템)의 수와 동일한지 여부를 판단할 수 있다.That is, it may be determined whether the number of motion information candidates added to the motion information candidate list is equal to the number of items (items) of the predetermined motion information candidate list.

만약, S1807 단계에서 판단한 결과, 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 N개인 경우, 인코더/디코더는 움직임 정보 후보 리스트의 구성을 종료한다. If it is determined in step S1807 that the number of motion information candidates added to the motion information candidate list is N, the encoder / decoder ends the construction of the motion information candidate list.

반면, S1807 단계에서 판단한 결과, 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 N개가 아닌 경우(즉, N개 미만인 경우), 인코더/디코더는 비-스케일링된(non-scaled) 양방향 예측 후보(즉, 비-스케일링된 양방향 움직임 정보 후보)를 움직임 정보 후보 리스트에 추가한다(S1808).On the other hand, if it is determined in step S1807 that the number of motion information candidates added to the motion information candidate list is not N (that is, less than N), the encoder / decoder is a non-scaled bidirectional prediction candidate ( That is, the non-scaled bidirectional motion information candidate) is added to the motion information candidate list (S1808).

인코더/디코더는 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 N개인지 판단한다(S1809). The encoder / decoder determines whether the number of motion information candidates added to the motion information candidate list is N (S1809).

즉, 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 미리 정해진 움직임 정보 후보 리스트의 항목(아이템)의 수와 동일한지 여부를 판단할 수 있다.That is, it may be determined whether the number of motion information candidates added to the motion information candidate list is equal to the number of items (items) of the predetermined motion information candidate list.

만약, S1809 단계에서 판단한 결과, 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 N개인 경우, 인코더/디코더는 움직임 정보 후보 리스트의 구성을 종료한다. If it is determined in step S1809 that the number of motion information candidates added to the motion information candidate list is N, the encoder / decoder ends the construction of the motion information candidate list.

반면, S1809 단계에서 판단한 결과, 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 N개가 아닌 경우(즉, N개 미만인 경우), 인코더/디코더는 제로 벡터(zero vector)(즉, 제로 움직임 벡터 후보)를 움직임 정보 후보 리스트에 추가한다(S1810).On the other hand, if it is determined in step S1809 that the number of motion information candidates added to the motion information candidate list is not N (that is, less than N), the encoder / decoder is a zero vector (that is, zero motion vector candidates). ) Is added to the motion information candidate list (S1810).

즉, 인코더/디코더는 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 수가 미리 정해진 움직임 정보 후보 리스트의 항목(아이템)의 수가 될 때까지 참조 픽쳐 인덱스를 변경하면서 제로 움직임 벡터(zero motion vector) 후보를 움직임 정보 후보 리스트에 추가할 수 있다.That is, the encoder / decoder changes the reference picture index until the number of motion information candidates added to the motion information candidate list becomes the number of items (items) of the predetermined motion information candidate list, and selects zero motion vector candidates. Can be added to the motion information candidate list.

한편, 앞서 도 18에서 움직임 정보 후보 리스트를 구성하기 위하여 탐색 대상이 되는 움직임 정보(즉, 공간적 움직임 정보 후보, 시간적 움직임 정보 후보, 조합된 양방향 움직임 정보 후보, 비-스케일링된(non-scaled) 양방향 움직임 정보 후보, 제로 벡터(zero vector) 후보)는 하나의 예시에 불과하며, 도 18의 예시에서 일부의 움직임 정보만을 대상으로 탐색이 수행되거나, 도 18에서 예시되지 않은 움직임 정보가 추가로 탐색될 수도 있다. Meanwhile, motion information (ie, spatial motion information candidate, temporal motion information candidate, combined bidirectional motion information candidate, and non-scaled bidirectional) that are searched for constructing the motion information candidate list in FIG. 18. The motion information candidate and the zero vector candidate) are just one example. In the example of FIG. 18, a search may be performed on only some of the motion information, or motion information not illustrated in FIG. 18 may be further searched. It may be.

특히, 비-스케일링된(non-scaled) 양방향 예측 후보를 리스트에 추가하는 과정은 생략될 수 있다. 이 경우, S1808 단계 및 S1809 단계는 삭제되며, S1807 단계에서 움직임 정보 후보 리스트에 추가된 항목(즉, 움직임 정보 후보)이 N개가 아닌 경우, S1810 단계가 수행될 수 있다. In particular, the process of adding a non-scaled bidirectional prediction candidate to the list can be omitted. In this case, steps S1808 and S1809 are deleted, and if there are not N items (that is, motion information candidates) added to the motion information candidate list in step S1807, step S1810 may be performed.

또한, 도 18에서 움직임 정보 후보 리스트의 구성 순서(즉, 공간적 움직임 정보 후보, 시간적 움직임 정보 후보, 장기 움직임 정보 후보, 조합된 양방향 움직임 정보 후보, 비-스케일링된(non-scaled) 양방향 움직임 정보 후보, 제로 벡터(zero vector) 후보의 순서)는 하나의 예시에 불과하며, 이와 상이하게 미리 정해진 순서로 진행될 수 있다. In addition, in FIG. 18, the construction order of the motion information candidate list (ie, spatial motion information candidate, temporal motion information candidate, long-term motion information candidate, combined bidirectional motion information candidate, and non-scaled bidirectional motion information candidate). , Order of zero vector candidates) is just one example, and may be differently performed in a predetermined order.

특히, 장기 움직임 정보가 움직임 정보 후보 리스트에 추가되는 과정은 도 18과 상이한 단계에서 수행될 수 있다. 예를 들어, 공간적 움직임 정보 후보가 움직임 정보 후보 리스트에 추가된 후에 장기 움직임 정보가 움직임 정보 후보 리스트에 추가될 수도 있으며, 또는 조합된 양방향 움직임 정보 후보가 움직임 정보 후보 리스트에 추가된 후에 장기 움직임 정보가 움직임 정보 후보 리스트에 추가될 수도 있으며, 또는 비-스케일링된(non-scaled) 양방향 움직임 정보 후보가 움직임 정보 후보 리스트에 추가된 후에 장기 움직임 정보가 움직임 정보 후보 리스트에 추가될 수도 있으며, 제로 벡터(zero vector) 후보가 움직임 정보 후보 리스트에 추가된 후에 장기 움직임 정보가 움직임 정보 후보 리스트에 추가될 수도 있다. In particular, the process of adding the long-term motion information to the motion information candidate list may be performed at a different step from FIG. 18. For example, long-term motion information may be added to the motion information candidate list after the spatial motion information candidate is added to the motion information candidate list, or long-term motion information after the combined bidirectional motion information candidate is added to the motion information candidate list. May be added to the motion information candidate list, or long-term motion information may be added to the motion information candidate list after a non-scaled bidirectional motion information candidate is added to the motion information candidate list, and a zero vector After the (zero vector) candidate is added to the motion information candidate list, the long-term motion information may be added to the motion information candidate list.

이하, 장기 움직임 정보에 대하여 보다 상세히 설명한다. Hereinafter, the long term motion information will be described in more detail.

설명의 편의를 위해 앞서 도 18의 예시와 같이 공간적 움직임 정보 후보와 시간적 움직임 정보 후보가 움직임 정보 후보 리스트에 추가된 후, 장기 움직임 정보 후보가 움직임 정보 후보 리스트에 추가되는 경우를 가정하여 설명한다. For convenience of explanation, it is assumed that the long-term motion information candidate is added to the motion information candidate list after the spatial motion information candidate and the temporal motion information candidate are added to the motion information candidate list as shown in the example of FIG. 18.

- 먼저, 장기 움직임 정보의 일례로, 최근에 사용되었으나 현재 움직임 정보 후보 리스트에 존재하지 않는 움직임 정보(즉, 현재 블록으로부터 공간적으로 방향과 무관하게 M개의 블록 이상 떨어진 블록의 움직임 정보)가 이용되는 경우에 대하여 살펴본다. First, as an example of the long-term motion information, motion information that is recently used but does not exist in the current motion information candidate list (that is, motion information of blocks more than M blocks spatially independent of the current block) is used. Examine the case.

인코더/디코더는 최근 사용되었으나 현재 움직임 정보 리스트에 삽입되지 않은 움직임 정보를 장기 움직임 정보(long-term motion info)로 저장한 뒤에 현재 블록에 대한 움직임 정보 후보 리스트를 구성하는 과정에서 사용할 수 있다. 이에 대하여 아래 도면을 참조하여 보다 상세히 살펴본다. The encoder / decoder may be used in the process of constructing a motion information candidate list for the current block after storing recently used motion information that is not inserted in the current motion information list as long-term motion info. This will be described in more detail with reference to the drawings below.

도 19는 본 발명의 일 실시예에 따른 장기 움직임 정보를 이용하여 움직임 정보 후보 리스트를 구성하는 방법을 예시한다. 19 illustrates a method of constructing a motion information candidate list using long-term motion information according to an embodiment of the present invention.

도 19(a)는 이전 블록(예를 들어 이전 부호화 단위(prvious CU))의 부호화/복호화(coding/decoding) 과정에서 구성된 움직임 정보 후보 리스트를 예시하고, 도 19(b)는 현재 블록(예를 들어, 현재 부호화 단위(Current CU))의 부호화/복호화(coding/decoding) 과정에서 구성된 움직임 정보 후보 리스트를 예시한다. FIG. 19A illustrates a motion information candidate list configured in a coding / decoding process of a previous block (for example, a previous CU), and FIG. 19B illustrates a current block (example). For example, a motion information candidate list configured in a coding / decoding process of a current coding unit (Current CU) is illustrated.

도 19에서는 이전 블록 및 현재 블록이 머지 모드로 부호화된 경우를 가정하나, 본 발명이 이에 한정되는 것은 아니다. In FIG. 19, it is assumed that a previous block and a current block are encoded in a merge mode, but the present invention is not limited thereto.

이전 블록의 부호화/복호화 과정에서 적용된 움직임 정보는 장기 움직임 정보 리스트(Long term motion information list)에 저장되고 이 정보들은 현재 블록의 움직임 정보 후보 리스트가 구성될 때에 이용될 수 있다. The motion information applied in the encoding / decoding process of the previous block is stored in a long term motion information list, and the information can be used when the motion information candidate list of the current block is constructed.

이때, 이전 블록은 현재 블록으로부터 공간적으로 방향과 무관하게 M개의 블록 이상 떨어진 블록을 의미한다. In this case, the previous block refers to a block that is spaced apart from the current block by at least M blocks regardless of a direction.

도 19(a)를 참조하면, 이전 블록(previous CU)의 움직임 정보 후보 리스트(즉, 머지 후보 리스트(Merge Candidate List))에서 선택된 움직임 정보 후보 인덱스 1(즉, 머지 후보 리스트 인덱스(merge candidate list index) 1)의 움직임 정보가 장기 움직임 정보 리스트(Long term motion information list)의 3번째 항목으로 삽입된 경우를 예시한다. Referring to FIG. 19A, a motion information candidate index 1 selected in a motion information candidate list (ie, a merge candidate list) of a previous CU (ie, a merge candidate list) The case where the motion information of index 1) is inserted into the third item of the long term motion information list is illustrated.

그리고, 도 19(b)와 같이, 현재 블록(current CU)의 움직임 정보 후보 리스트(즉, 머지 후보 리스트(Merge Candidate List)) 생성 과정에서 공간적 움직임 정보 후보와 시간적 움직임 정보 후보가 삽입된 이후에도 N개의 리스트 항목(즉, 미리 정해진 움직임 정보 후보 리스트의 항목 개수)을 완성하지 못한 경우, 장기 움직임 정보 리스트(Long term motion information list)의 장기 움직임 정보가 선택되어 현재 블록의 움직임 정보 후보 리스트에 삽입된다. In addition, as shown in FIG. 19B, even after the spatial motion information candidate and the temporal motion information candidate are inserted in the process of generating the motion information candidate list (that is, the merge candidate list) of the current CU, N is inserted. If the list items (that is, the number of items of the predetermined motion information candidate list) are not completed, the long-term motion information of the long term motion information list is selected and inserted into the motion information candidate list of the current block. .

이때, 장기 움직임 정보 리스트의 항목들도 현재 블록의 움직임 정보 후보 리스트에 추가된 항목(즉, 움직임 정보)들과 중복을 고려하여 삽입될 수 있다. 따라서, 장기 움직임 정보 리스트의 두 번째 항목 혹은 그 이후의 항목이 현재 블록의 움직임 정보 후보 리스트에 삽입될 수 있다. In this case, items of the long-term motion information list may also be inserted in consideration of overlap with items (ie, motion information) added to the motion information candidate list of the current block. Therefore, the second item or the subsequent item of the long-term motion information list may be inserted into the motion information candidate list of the current block.

도 19에서는 장기 움직임 정보 리스트의 첫 번째 항목(LT motion info. 1)의 움직임 정보가 현재 블록(current CU)의 움직임 정보 후보 리스트에 존재하는 움직임 정보 후보와 동일한 경우를 가정하고, 다른 움직임 정보인 두 번째 항목(LT motion info. 2)의 움직임 정보가 현재 블록(current CU)의 움직임 정보 후보 리스트에 삽입된 경우를 예시한다. In FIG. 19, it is assumed that the motion information of the first item (LT motion info. 1) of the long-term motion information list is the same as the motion information candidate present in the motion information candidate list of the current block. For example, the motion information of the second item (LT motion info. 2) is inserted into the motion information candidate list of the current block.

장기 움직임 정보 리스트의 크기(즉, 항목의 개수)는 고정될 수 있으며, 인코더/디코더에서 장기 움직임 정보 리스트의 관리 과정은 다음과 같다.The size of the long-term motion information list (that is, the number of items) may be fixed, and the process of managing the long-term motion information list in the encoder / decoder is as follows.

1) 가장 최근에 선택된(혹은 사용된) 움직임 정보는 장기 움직임 정보 리스트의 가장 상위 항목에 삽입될 수 있다. 즉, 장기 움직임 리스트에 장기 움직임 정보가 삽입될 때, 항상 가장 상위 항목에 삽입될 수 있다. 예를 들어, z 스캔 방식으로 각 블록을 부호화/복호화하는 과정에서 현재 블록의 움직임 정보는 다음에 부호화/복호화될 블록들을 위한 장기 움직임 정보 리스트의 가장 상위 항목에 삽입될 수 있다.1) The most recently selected (or used) motion information may be inserted at the top of the long-term motion information list. That is, when long-term motion information is inserted into the long-term motion list, the long-term motion information may be inserted at the highest item. For example, in the process of encoding / decoding each block by the z scan method, the motion information of the current block may be inserted at the top of the long-term motion information list for the blocks to be encoded / decoded next.

2) 장기 움직임 정보 리스트에 삽입될 때, 장기 움직임 정보 리스트에 동일한 움직임 정보가 존재할 경우 해당 위치에 있는 아이템(즉, 움직임 정보)은 삭제하고 장기 움직임 정보 리스트의 가장 상위에 움직임 정보가 삽입된다. 2) When inserted into the long-term motion information list, if the same motion information exists in the long-term motion information list, the item (ie motion information) at the corresponding position is deleted and the motion information is inserted at the top of the long-term motion information list.

예를 들어, 장기 움직임 정보 리스트에 제1 움직임 정보가 삽입될 때, 장기 움직임 정보 리스트의 특정 항목에 제1 움직임 정보와 동일한 제2 움직임 정보가 존재하는 경우, 제2 움직임 정보가 삭제된 후 제1 움직임 정보가 장기 움직임 정보 리스의 가장 상위 항목에 삽입될 수 있다. For example, when the first motion information is inserted into the long-term motion information list, if the second motion information identical to the first motion information exists in a specific item of the long-term motion information list, the second motion information is deleted and then the first motion information is deleted. One motion information may be inserted at the highest item of the long-term motion information lease.

이때, 움직임 정보가 동일한지 여부는 참조 픽쳐와 움직임 벡터가 모두 동일한지 여부로 판단될 수 있다. In this case, whether the motion information is the same may be determined whether the reference picture and the motion vector are the same.

또는, 참조 픽쳐가 다른 경우라도 스케일링(scaling)을 수행하여 움직임 벡터가 같은 값을 가지게 될 경우에 움직임 정보가 동일하다고 판단될 수도 있다. 이 경우, 참조 픽쳐가 현재 픽쳐와 POC(Picture Order Count) 상에서 가장 가까운 움직임 정보가 상위 항목에 삽입될 수 있다. 예를 들어, 장기 움직임 정보 리스트에 움직임 정보 A가 삽입될 때, 장기 움직임 정보 리스트의 세 번째 항목에 참조 픽쳐는 다르지만 스케일링에 의해 움직임 벡터가 동일한 움직임 정보 A'가 존재하는 경우를 가정한다. 이때, 움직임 정보 A의 참조 픽쳐와 현재 픽쳐와의 POC 차이(a)와 움직임 정보 A'의 참조 픽쳐와 현재 픽쳐와의 POC 차이(a')를 비교한다. 만약, 움직임 정보 A'의 참조 픽쳐와 현재 픽쳐와의 POC 차이(a')가 보다 작은 경우, 움직임 정보 A가 아닌 움직임 정보 A'가 장기 움직임 정보 리스트의 가장 상위 항목에 삽입될 수 있다. Alternatively, even when the reference picture is different, it may be determined that the motion information is the same when the motion vector has the same value by scaling. In this case, the motion picture closest to the current picture and the picture order count (POC) may be inserted into the upper item. For example, when motion information A is inserted in the long-term motion information list, it is assumed that motion information A 'having a different reference picture but the same motion vector exists due to scaling in the third item of the long-term motion information list. At this time, the POC difference (a) between the reference picture of the motion information A and the current picture and the POC difference (a ') between the reference picture of the motion information A' and the current picture are compared. If the POC difference (a ') between the reference picture of the motion information A' and the current picture is smaller, the motion information A 'rather than the motion information A may be inserted at the top of the long-term motion information list.

3) 움직임 정보가 삽입될 때, 장기 움직임 정보 리스트에 아이템(즉, 움직임 정보 후보)이 가득 차 있을 경우, 최하단의 움직임 정보를 삭제하고 새로운 움직임 정보가 장기 움직임 정보 리스트의 가장 상위 항목에 삽입될 수 있다. 3) When the motion information is inserted, if the item (i.e., motion information candidate) is full in the long-term motion information list, the lowest motion information is deleted and the new motion information is inserted in the highest item of the long-term motion information list. Can be.

4) 현재 블록(예를 들어, 현재 부호화 단위 또는 예측 단위)의 움직임 정보 후보 리스트가 생성될 때, 장기 움직임 정보 리스트에서 움직임 정보를 가져올 경우 최상단의 항목의 움직임 정보가 현재 블록의 움직임 정보 후보 리스트의 모든 항목의 움직임 정보와 비교하여 동일한지 여부를 판단할 수 있다. 그리고, 동일한 움직임 정보가 없을 때 현재 블록의 움직임 정보 후보 리스트에 장기 움직임 정보 리스트의 해당 움직임 정보가 삽입될 수 있다. 4) When the motion information candidate list of the current block (for example, the current coding unit or the prediction unit) is generated, when the motion information is obtained from the long-term motion information list, the motion information of the uppermost item is the motion information candidate list of the current block. By comparing the motion information of all items of the can determine whether or not. When there is no identical motion information, corresponding motion information of the long-term motion information list may be inserted into the motion information candidate list of the current block.

즉, 장기 움직임 정보 리스트에서 각 항목 별로 순차적으로 현재 블록의 움직임 정보 후보 리스트에 추가된 움직임 정보 후보와 동일한지 여부를 판단하고, 동일한 움직임 정보가 현재 블록의 움직임 정보 후보 리스트에 없는 경우 현재 블록의 움직임 정보 후보 리스트에 추가될 수 있다. That is, it is determined whether each item in the long-term motion information list is identical to the motion information candidate added to the motion information candidate list of the current block sequentially, and if the same motion information is not in the motion information candidate list of the current block, It may be added to the motion information candidate list.

보다 구체적으로, 인코더/디코더는 장기 움직임 정보 리스트의 첫 번째 항목과 동일한 움직임 정보가 현재 블록의 움직임 정보 후보 리스트에 추가되었는지 판단한다. 그리고, 장기 움직임 정보 리스트의 첫 번째 항목과 동일한 움직임 정보가 현재 블록의 움직임 정보 후보 리스트에 추가되지 않은 경우, 해당 첫 번째 항목의 움직임 정보를 현재 블록의 움직임 정보 후보 리스트에 추가할 수 있다. 반면, 장기 움직임 정보 리스트의 첫 번째 항목과 동일한 움직임 정보가 현재 블록의 움직임 정보 후보 리스트에 추가된 경우, 장기 움직임 정보 리스트의 두 번째 항목과 동일한 움직임 정보가 현재 블록의 움직임 정보 후보 리스트에 추가되었는지 판단할 수 있다. 이후의 과정도 마찬가지이다. More specifically, the encoder / decoder determines whether motion information identical to the first item of the long-term motion information list is added to the motion information candidate list of the current block. If the same motion information as the first item of the long-term motion information list is not added to the motion information candidate list of the current block, the motion information of the first item may be added to the motion information candidate list of the current block. On the other hand, when the same motion information as the first item of the long-term motion information list is added to the motion information candidate list of the current block, whether the same motion information as the second item of the long-term motion information list is added to the motion information candidate list of the current block. You can judge. The same is true for subsequent steps.

도 19에서는 장기 움직임 정보 리스트가 5개로 설정된 경우를 예시하나, 본 발명이 이에 한정되는 것은 아니다. 19 illustrates a case where five long-term motion information lists are set, but the present invention is not limited thereto.

즉, 장기 움직임 정보 리스트는 미리 정해진 크기(즉, 항목의 개수)로 설정되어 수신단(디코더)과 송신단(인코더)에서 동일하게 적용할 수 있다. That is, the long-term motion information list is set to a predetermined size (that is, the number of items) and can be equally applied to the receiving end (decoder) and the transmitting end (encoder).

또한, 각 시퀀스(sequence), 각 픽쳐 또는 각 슬라이스 별로 개별적으로 장기 움직임 정보 리스트의 크기가 재설정되어, 송신단(인코더)으로부터 수신단(디코더)에게 전달될 수 있다. In addition, the size of the long-term motion information list may be individually reset for each sequence, each picture, or each slice, and may be transmitted from a transmitting end (encoder) to a receiving end (decoder).

- 다음으로, 장기 움직임 정보의 일례로, 픽쳐의 전역적인 움직임 정보가 이용되는 경우에 대하여 살펴본다. Next, as an example of long-term motion information, a case in which global motion information of a picture is used will be described.

도 20은 본 발명의 일 실시예에 따른 장기 움직임 정보로서 픽쳐의 전역적인 움직임 정보를 예시한다. 20 illustrates global motion information of a picture as long-term motion information according to an embodiment of the present invention.

픽쳐의 전역적인 움직임 정보(global motion information/vector)는 도 20과 같이 이전 픽처와 현재 픽처가 전체적으로 움직이는 경향성을 나타내는 것을 의미한다. 예를 들어, 카메라가 고정된 상태에서 촬영된 영상보다는 패닝(panning)(수평 방향으로 촬영하는 기법)이나 틸팅(tilting)(수직 방향으로 촬영하는 기법)에 의해 촬영된 영상에서 높은 효율을 보일 수 있다. Global motion information / vector of a picture means that the previous picture and the current picture tend to move as a whole as shown in FIG. 20. For example, images captured by panning (horizontal shooting) or tilting (vertical shooting) may exhibit higher efficiency than images taken with the camera fixed. have.

전역적인 움직임 정보를 표현(도출)하기 위해서 현재 픽쳐와 기준 픽쳐(예를 들어, 참조 픽쳐)를 동일한 위치에 겹쳐 놓은 뒤에 탐색 범위 내에서 이동하며 현재 픽쳐와 다른 픽쳐 간의 MAD(Mean of Absolute Difference) 혹은 MSE(Mean of Squared Error)를 계산하여 가장 작은 값을 보이는 위치와 처음 시작 위치와의 차이 및 방향을 계산하는 방법이 사용될 수 있다. 전역적인 움직임 정보는 현재 픽쳐와 기준 픽쳐 간의 MAD 혹은 MSE를 계산함으로써 도출될 수 있다. 예를 들어, 전역적인 움직임 정보는 기준 픽쳐를 기준으로 현재 픽쳐를 이동시킬 때, 현재 픽쳐를 이동시키기 전 현재 픽쳐의 좌상단(top-left) 화소로부터 현재 픽쳐와 참조 픽쳐 간의 MAD 혹은 MSE를 최소화하는 위치에서의 현재 픽쳐의 좌상단(top-left) 화소와의 위치의 차이 및 방향으로 도출될 수 있다. To represent (derive) global motion information, the current picture and the reference picture (for example, the reference picture) are superimposed at the same position, and then moved within the search range, and the Mean of Absolute Difference (MAD) between the current picture and another picture. Alternatively, a method of calculating a mean of squared error (MSE) and calculating a difference and direction between a position showing the smallest value and an initial start position may be used. Global motion information may be derived by calculating the MAD or MSE between the current picture and the reference picture. For example, the global motion information is used to minimize the MAD or MSE between the current picture and the reference picture from the top-left pixel of the current picture before moving the current picture when the current picture is moved relative to the reference picture. It can be derived from the direction and the difference between the position and the top-left pixel of the current picture at the position.

이렇게 계산함으로써 실제적으로 참조 픽쳐와 현재 픽쳐가 이동한 거리와 방향의 정보를 얻을 수 있으며, 동영상 부호화/복호화기에서 사용되는 움직임 벡터의 해상도에 맞추어 이동한 거리가 표현될 수 있다. In this way, information about the distance and direction in which the reference picture and the current picture have moved can be obtained, and the distance moved in accordance with the resolution of the motion vector used in the video encoder / decoder can be expressed.

전역적인 움직임 정보는 현재 픽쳐와 참조 픽쳐간의 관계이므로, 인코더/디코더는 참조 리스트에 존재하는 각 참조 픽쳐마다 현재 픽쳐와의 전역 움직임 정보를 가지고 있을 수 있다. 즉, 인코더/디코더는 참조 픽쳐를 기준으로 현재 픽쳐의 전역 움직임 정보를 도출할 수 있다. Since the global motion information is a relationship between the current picture and the reference picture, the encoder / decoder may have global motion information with the current picture for each reference picture present in the reference list. That is, the encoder / decoder may derive global motion information of the current picture based on the reference picture.

앞서 설명한 현재 픽쳐와 참조 픽쳐간의 계산에 의해 전역 움직임 정보의 계산이 어려울 경우 몇 개의 참조 픽쳐를 기준으로 전역적 움직임 정보를 계산한 뒤에 현재 픽쳐와 다른 참조 픽쳐간의 POC 거리를 상대적으로 고려하여 가상의 전역 움직임 정보를 생성할 수 있다. 이에 대하여 아래 도면을 참조하여 설명한다. If it is difficult to calculate the global motion information by the calculation between the current picture and the reference picture described above, the global motion information is calculated based on a few reference pictures and then the virtual POC distance between the current picture and other reference pictures is taken into consideration. Global motion information can be generated. This will be described with reference to the drawings below.

도 21은 본 발명의 일 실시예에 따른 장기 움직임 정보로서 픽쳐의 전역적인 움직임 정보를 도출하는 방법을 예시한다. 21 illustrates a method of deriving global motion information of a picture as long-term motion information according to an embodiment of the present invention.

도 21에서는 현재 픽쳐(current picture, T0)의 참조 픽쳐(reference picture)가 T-2라고 가정한다. In FIG. 21, it is assumed that a reference picture of a current picture T0 is T-2.

앞서 설명한 바와 같이, 현재 픽쳐(T0)와 참조 픽쳐(T-2) 간의 동일한 위치에 겹쳐 놓은 뒤에 탐색 범위 내에서 이동하며 현재 픽쳐와 참조 픽쳐 간의 MAD 혹은 MSE를 계산하여 가장 작은 값을 보이는 위치와 처음 시작 위치와의 차이 및 방향을 계산하여 참조 픽쳐(T-2)에 대한 전역 움직임 정보가 도출될 수 있다. As described above, after overlapping at the same position between the current picture (T0) and the reference picture (T-2) and moving within the search range and calculating the MAD or MSE between the current picture and the reference picture, The global motion information for the reference picture T-2 may be derived by calculating a difference and a direction from the initial start position.

이때, 현재 픽쳐(T0)와 참조 픽쳐(T-2) 간의 전역 움직임 정보는 현재 픽쳐(T0)와 다른 참조 픽쳐(T1) 간의 전역 움직임 정보로부터 POC 거리를 상대적으로 고려함으로써 도출될 수 있다. 예를 들어, 현재 픽쳐(T0)와 참조 픽쳐(T-2) 간의 전역 움직임 정보는 현재 픽쳐(T0)와 참조 픽쳐(T-2) 간의 POC 차이와 현재 픽쳐(T0)와 다른 참조 픽쳐(T1) 간의 POC 차이의 비율로 현재 픽쳐(T0)와 다른 참조 픽쳐(T1) 간의 전역 움직임 정보를 스케일링함으로써 도출될 수 있다. In this case, the global motion information between the current picture T0 and the reference picture T-2 may be derived by considering the POC distance from the global motion information between the current picture T0 and another reference picture T1. For example, the global motion information between the current picture T0 and the reference picture T-2 may include a difference in POC between the current picture T0 and the reference picture T-2, and a reference picture T1 different from the current picture T0. Can be derived by scaling global motion information between the current picture T0 and another reference picture T1 as a ratio of the POC difference between the < RTI ID = 0.0 >

또는, 현재 픽쳐(T0)와 참조 픽쳐(T-2) 간의 전역 움직임 정보는 현재 픽쳐(T0)와 다른 참조 픽쳐(T2) 간의 전역 움직임 정보로부터 POC 거리를 상대적으로 고려함으로써 도출될 수 있다. 예를 들어, 현재 픽쳐(T0)와 참조 픽쳐(T-2) 간의 전역 움직임 정보는 현재 픽쳐(T0)와 참조 픽쳐(T-2) 간의 POC 차이와 현재 픽쳐(T0)와 다른 참조 픽쳐(T2) 간의 POC 차이의 비율로 현재 픽쳐(T0)와 다른 참조 픽쳐(T2) 간의 전역 움직임 정보를 스케일링함으로써 도출될 수 있다.Alternatively, the global motion information between the current picture T0 and the reference picture T-2 may be derived by considering the POC distance relatively from the global motion information between the current picture T0 and another reference picture T2. For example, the global motion information between the current picture T0 and the reference picture T-2 includes a POC difference between the current picture T0 and the reference picture T-2, and a reference picture T2 different from the current picture T0. ) Can be derived by scaling global motion information between the current picture T0 and another reference picture T2 as a ratio of POC differences between the < RTI ID = 0.0 >

또는, 현재 픽쳐(T0)와 참조 픽쳐(T-2) 간의 전역 움직임 정보는 현재 픽쳐(T0)와 다른 참조 픽쳐 1(T1) 간의 제1 전역 움직임 정보와 현재 픽쳐(T0)와 다른 참조 픽쳐 2(T2) 간의 제2 전역 움직임 정보로부터 POC 거리를 상대적으로 고려함으로써 도출될 수 있다. 예를 들어, 현재 픽쳐(T0)와 참조 픽쳐(T-2) 간의 전역 움직임 정보는 현재 픽쳐(T0)와 참조 픽쳐(T-2) 간의 POC 차이와 현재 픽쳐(T0)와 다른 참조 픽쳐 1(T1) 간의 POC 차이의 비율로 현재 픽쳐(T0)와 다른 참조 픽쳐 1(T1) 간의 제1 전역 움직임 정보를 스케일링한 제1 움직임 정보와, 현재 픽쳐(T0)와 참조 픽쳐(T-2) 간의 POC 차이와 현재 픽쳐(T0)와 다른 참조 픽쳐 2(T2) 간 POC 차이의 비율로 현재 픽쳐(T0)와 다른 참조 픽쳐 2(T1) 간의 제2 전역 움직임 정보를 스케일링한 제2 움직임 정보를 평균(또는 가중함)하여 도출될 수 있다. Alternatively, the global motion information between the current picture T0 and the reference picture T-2 may include first global motion information between the current picture T0 and another reference picture 1 (T1) and another reference picture 2 different from the current picture T0. It can be derived by considering the POC distance relatively from the second global motion information between (T2). For example, the global motion information between the current picture T0 and the reference picture T-2 may include a difference in POC between the current picture T0 and the reference picture T-2, and another reference picture 1 different from the current picture T0. First motion information that scales first global motion information between the current picture T0 and another reference picture 1 (T1) as a ratio of the POC difference between T1), and between the current picture T0 and the reference picture T-2. Averaging the second motion information by scaling the second global motion information between the current picture (T0) and another reference picture (T1) as a ratio of the POC difference and the POC difference between the current picture (T0) and another reference picture 2 (T2). (Or weighted).

또는, 수신단(즉, 디코더)에서 전역적 움직임 정보를 예측하지 않고 슬라이스 헤더(slice header)(또는 시퀀스 헤더)에서 송신단(즉, 인코더)이 전역적 움직임 정보를 직접 전송하는 방법을 이용될 수도 있다. Alternatively, a method of directly transmitting global motion information by a transmitting end (ie, an encoder) in a slice header (or a sequence header) may be used without predicting global motion information at a receiving end (ie, a decoder). .

이때, 송신단(즉, 인코더)은 입력된 현재 픽쳐를 이용하여 전역적 움직임 정보를 계산할 때, 현재 픽쳐의 전역적 움직임 정보를 계산하기 위하여 기준이 되는 픽쳐는 부호화 순서상 바로 이전에 부호화된 픽쳐가 사용되거나 또는 POC 기준으로 현재 픽쳐의 POC-1의 값을 가지는 픽쳐가 사용되거나 또는 현재 픽쳐의 그룹(GOP: Group of Pictures)의 첫 번째 픽쳐가 사용될 수도 있다. In this case, when the transmitting end (ie, the encoder) calculates the global motion information by using the input current picture, the reference picture for calculating the global motion information of the current picture is a picture that was encoded just before the encoding order. A picture that is used or has a value of POC-1 of the current picture on a POC basis may be used, or the first picture of a group of pictures (GOP) of the current picture may be used.

부호화된 전역적 움직임 정보가 장기 움직임 정보로 사용될 때, 상술한 기준 픽쳐를 참조 픽쳐로 사용할 수도 있으며, 또는 리스트0(LIST0)의 특정 픽쳐(예를 들어, 첫 번째 픽쳐)가 사용될 수도 있다. 또는, 양방향 예측의 경우 리스트0(LIST0)의 특정 픽쳐(예를 들어, 첫 번째 픽쳐)와 리스트1(LIST1)의 특정 픽쳐(예를 들어, 첫 번째 픽쳐)가 동시에 적용될 수도 있다.When the encoded global motion information is used as the long-term motion information, the above-described reference picture may be used as a reference picture, or a specific picture (eg, the first picture) of the list 0 LIST0 may be used. Alternatively, in the case of bidirectional prediction, a specific picture (eg, the first picture) of List0 (LIST0) and a specific picture (eg, the first picture) of List1 (LIST1) may be applied simultaneously.

이때, 기준 픽쳐와 참조를 위한 픽쳐가 다를 경우, 기준 픽쳐를 기반으로 도출된 전역 움직임 정보에 POC 거리에 비례하여 스케일링(scaling)을 적용하여 장기 움직임 정보 리스트에 삽입될 수 있다. 즉, 현재 픽쳐와 기준 픽쳐 간의 POC 차이와 현재 픽쳐와 참조 픽쳐 간의 POC 차이의 비율로 기준 픽쳐를 기준으로 도출된 전역 움직임 정보가 스케일링된 후, 장기 움직임 정보 리스트에 삽입될 수 있다. In this case, when the reference picture is different from the picture for reference, the global motion information derived based on the reference picture may be inserted in the long-term motion information list by applying scaling in proportion to the POC distance. That is, global motion information derived based on the reference picture is scaled as a ratio of the POC difference between the current picture and the reference picture and the POC difference between the current picture and the reference picture, and then inserted into the long-term motion information list.

- 다음으로, 장기 움직임 정보의 일례로, 픽쳐 내에서 가장 높은 빈도를 보이는 움직임 정보가 이용되는 경우에 대하여 살펴본다. Next, as an example of the long-term motion information, the case where the motion information showing the highest frequency in the picture is used will be described.

픽쳐 내에서 가장 높은 빈도 수를 가지는 움직임 정보는 영상의 특성을 반영하면서도 주변 움직임 정보에서 존재하지 않을 수 있기 때문에 장기 움직임 정보로 관리 될 경우 움직임 정보 리스트의 다양성에 기여할 수 있다. Since the motion information having the highest frequency in the picture reflects the characteristics of the image and may not exist in the surrounding motion information, it may contribute to the diversity of the motion information list when it is managed as long-term motion information.

따라서, 픽쳐 내에서 가장 높은 빈도의 움직임 정보를 찾기 위해 특정 개수의 움직임 정보 저장 공간을 생성하고, 현재 블록의 움직임을 표현하기 위해 선택된 움직임 정보를 저장 공간에 저장할 수 있다. 즉, 픽쳐 내에서 가장 높은 빈도의 움직임 정보를 찾기 위해 장기 움직임 정보 리스트를 구성할 수 있다. 이때, 현재 블록의 움직임을 표현하기 위해 선택된 움직임 정보를 저장 공간에 저장할 때, 저장 공간내에 동일한 움직임 정보가 존재하는 경우 해당 움직임 정보의 발생 빈도를 업데이트 하는 방식으로 진행한다. Accordingly, a specific number of motion information storage spaces may be created to find the highest frequency of motion information in the picture, and the motion information selected to represent the motion of the current block may be stored in the storage space. That is, the long-term motion information list may be constructed to find the highest frequency of motion information in the picture. At this time, when the motion information selected to represent the motion of the current block is stored in the storage space, if the same motion information exists in the storage space, the process of updating the occurrence frequency of the motion information is performed.

도 22는 본 발명의 일 실시예에 따른 장기 움직임 정보를 이용하여 움직임 정보 후보 리스트를 구성하는 방법을 예시한다.22 illustrates a method of constructing a motion information candidate list using long-term motion information according to an embodiment of the present invention.

도 22(a)는 이전 블록(예를 들어 이전 부호화 단위(prvious CU))의 부호화/복호화(coding/decoding) 과정에서 구성된 움직임 정보 후보 리스트를 예시하고, 도 22(b)는 현재 블록(예를 들어, 현재 부호화 단위(Current CU))의 부호화/복호화(coding/decoding) 과정에서 구성된 움직임 정보 후보 리스트를 예시한다. FIG. 22A illustrates a motion information candidate list configured in a coding / decoding process of a previous block (eg, a previous CU), and FIG. 22B illustrates a current block (eg, a CU). For example, a motion information candidate list configured in a coding / decoding process of a current coding unit (Current CU) is illustrated.

도 22에서는 이전 블록 및 현재 블록이 머지 모드로 부호화된 경우를 가정하나, 본 발명이 이에 한정되는 것은 아니다. In FIG. 22, it is assumed that a previous block and a current block are encoded in a merge mode, but the present invention is not limited thereto.

이전 블록의 부호화/복호화 과정에서 적용된 움직임 정보는 장기 움직임 정보 리스트(Long term motion information list)에 저장되고 이 정보들은 현재 블록의 움직임 정보 후보 리스트가 구성될 때에 이용될 수 있다. The motion information applied in the encoding / decoding process of the previous block is stored in a long term motion information list, and the information can be used when the motion information candidate list of the current block is constructed.

이때, 이전 블록은 현재 블록으로부터 공간적으로 방향과 무관하게 M개의 블록 이상 떨어진 블록을 의미한다. In this case, the previous block refers to a block that is spaced apart from the current block by at least M blocks regardless of a direction.

도 22(a)를 참조하면, 이전 블록(previous CU)의 움직임 정보 후보 리스트(즉, 머지 후보 리스트(Merge Candidate List))에서 선택된 움직임 정보 후보 인덱스 0(즉, 머지 후보 리스트 인덱스(merge candidate list index) 0)의 움직임 정보가 장기 움직임 정보 리스트(Long term motion information list)의 2번째 항목으로 삽입된 경우를 예시한다. Referring to FIG. 22A, a motion information candidate index 0 (ie, a merge candidate list index) selected from a motion information candidate list (ie, merge candidate list) of a previous CU (previous CU) For example, the motion information of index 0) is inserted as a second item of a long term motion information list.

도 22와 같이 이전 블록에서 선택된 움직임 정보가 머지 후보 리스트 인덱스 0인 경우, 해당 움직임 정보는 장기 움직임 정보 리스트에 삽입되며 장기 움직임 정보 리스트의 두 번째 항목과 동일하기 때문에 두 번째 항목의 빈도수는 6에서 7로 갱신될 수 있다. When the motion information selected in the previous block is the merge candidate list index 0 as shown in FIG. 22, since the corresponding motion information is inserted into the long-term motion information list and is the same as the second item of the long-term motion information list, the frequency of the second item is 6 Can be updated to 7.

현재 블록의 움직임 정보 후보 리스트는 갱신된 장기 움직임 정보 리스트를 고려하여 생성된다. 즉, 장기 움직임 정보 리스트는 장기 움직임 정보와 발생 빈도수로 구성되며, 장기 움직임 정보 리스트에서 가장 발생 빈도수가 높은 움직임 정보가 현재 블록의 움직임 정보 후보 리스트의 움직임 정보 후보로서 삽입될 수 있다. The motion information candidate list of the current block is generated in consideration of the updated long-term motion information list. That is, the long-term motion information list is composed of long-term motion information and occurrence frequency, and motion information having the highest occurrence frequency in the long-term motion information list may be inserted as a motion information candidate of the motion information candidate list of the current block.

도 22와 같이 장기 움직임 정보 리스트의 첫 번째 항목이 가장 발생 빈도수가 높으므로, 현재 블록의 움직임 정보 후보 리스트의 5번째 항목으로 삽입될 수 있다. As the first item of the long-term motion information list as shown in FIG. 22 has the highest occurrence frequency, it may be inserted as the fifth item of the motion information candidate list of the current block.

이때, 장기 움직임 정보 리스트의 항목들도 현재 블록의 움직임 정보 후보 리스트에 추가된 항목(즉, 움직임 정보)들과 중복을 고려하여 삽입될 수 있다. 따라서, 장기 움직임 정보 리스트의 첫 번째 항목이 가장 빈도수가 높더라도, 현재 블록의 움직임 정보 후보 리스트에 추가된 움직임 정보와 동일한 경우, 두 번째 항목 혹은 그 이후의 항목이 현재 블록의 움직임 정보 후보 리스트에 삽입될 수 있다. In this case, items of the long-term motion information list may also be inserted in consideration of overlap with items (ie, motion information) added to the motion information candidate list of the current block. Therefore, even if the first item of the long-term motion information list is the most frequent, if it is the same as the motion information added to the motion information candidate list of the current block, the second item or a subsequent item is added to the motion information candidate list of the current block. Can be inserted.

장기 움직임 정보의 빈도수를 갱신할 때(즉 현재 블록의 움직임 정보 후보 리스트에서 선택된 현재 블록의 움직임 정보를 장기 움직임 정보 리스트에 추가할 때), 기존 장기 움직임 정보 리스트에 존재하는 항목인지 아닌지를 판단(즉, 기존 장기 움직임 정보 리스트에 추가된 움직임 정보와 동일한지 아닌지 판단)할 때에는 다음과 같은 방법들이 사용될 수 있다.When updating the frequency of the long-term motion information (that is, adding the motion information of the current block selected from the motion information candidate list of the current block to the long-term motion information list), it is determined whether or not the item exists in the existing long-term motion information list. That is, when determining whether or not the same as the motion information added to the existing long-term motion information list) the following methods can be used.

1) 기존의 장기 움직임 정보 리스트의 항목들과 현재 블록의 움직임 정보가 움직임 벡터 참조 픽쳐 리스트, 참조 픽처 인덱스가 모두 같을 때에만 기존에 존재하는 항목과 동일하다고 판단하고, 장기 움직임 정보 리스트의 해당 항목의 빈도수를 갱신할 수 있다. 1) It is determined that the items of the existing long-term motion information list and the motion information of the current block are the same as the existing items only when the motion vector reference picture list and the reference picture index are the same, and the corresponding item of the long-term motion information list. You can update the frequency of.

2) 기존의 장기 움직임 정보 리스트의 항목들과 현재 블록의 움직임 정보가 참조 픽쳐 리스트와 참조 픽처 인덱스가 동일하고 움직임 벡터의 차이가 특정 수준 이하일때에 동일하다고 판단하고, 장기 움직임 정보 리스트의 해당 항목의 빈도수를 갱신할 수 있다. 2) The items of the existing long-term motion information list and the motion information of the current block are determined to be the same when the reference picture list and the reference picture index are the same and the difference between the motion vectors is equal to or less than a certain level. You can update the frequency of.

3) 기존의 장기 움직임 정보 리스트의 항목들과 현재 블록의 움직임 정보가 참조 픽쳐리스트 혹은 참조 픽처 인덱스가 다르지만 현재 픽쳐와의 POC 차이를 고려하여 움직임 벡터를 스케일링(scaling)한 결과가 같거나 차이가 특정 수준 이하일 경우 동일한 움직임 정보라고 판단하고, 장기 움직임 정보 리스트의 해당 항목의 빈도수를 갱신할 수 있다. 3) Although the items of the existing long-term motion information list and the motion information of the current block are different from the reference picture list or the reference picture index, the result of scaling the motion vector in consideration of the POC difference with the current picture is the same or different. If it is below a certain level, it is determined that the same motion information, and the frequency of the corresponding item of the long-term motion information list can be updated.

위의 3번째 방식이 적용될 경우 움직임 정보가 참조 픽처에 따라 여러 가지 정보가 생성될 수 있으므로 현재 픽쳐에서 가장 가까운 참조 픽처를 선택하고 그 픽처에 따른 움직임 벡터를 계산하여 장기 움직임 정보 리스트로 관리할 수 있다. When the third method is applied, various pieces of information may be generated according to the reference picture. Therefore, the reference picture that is closest to the current picture may be selected and the motion vector according to the picture may be calculated and managed as a long-term motion information list. have.

예를 들어, 장기 움직임 정보 리스트에 움직임 정보 A가 삽입될 때, 장기 움직임 정보 리스트의 세 번째 항목에 참조 픽쳐리스트 혹은 참조 픽쳐는 다르지만 스케일링에 의해 움직임 벡터가 동일한 움직임 정보 A'가 존재하는 경우를 가정한다. 이때, 움직임 정보 A의 참조 픽쳐와 현재 픽쳐와의 POC 차이(a)와 움직임 정보 A'의 참조 픽쳐와 현재 픽쳐와의 POC 차이(a')를 비교한다. 만약, 움직임 정보 A'의 참조 픽쳐와 현재 픽쳐와의 POC 차이(a')가 보다 작은 경우, 움직임 정보 A가 아닌 움직임 정보 A'가 장기 움직임 정보 리스트의 해당 세 번째 항목으로 교체될 수 있다. For example, when motion information A is inserted into the long-term motion information list, a motion information A 'having a different reference picture list or reference picture but having the same motion vector due to scaling exists in the third item of the long-term motion information list. Assume At this time, the POC difference (a) between the reference picture of the motion information A and the current picture and the POC difference (a ') between the reference picture of the motion information A' and the current picture are compared. If the POC difference a 'between the reference picture of the motion information A' and the current picture is smaller, the motion information A 'instead of the motion information A may be replaced with a corresponding third item of the long-term motion information list.

한편, 앞서 설명한 실시예 1과 실시예 2는 결합되어 이용될 수도 있다. 예를 들어, 앞서 실시예 2에 따른 장기 움직임 정보 후보가 현재 블록의 움직임 정보 후보 리스트에 추가된 후, 앞서 실시예 1에 따라 현재 블록의 움직임 정보 후보 리스트 내 움직임 정보 후보의 순서가 정렬될 수 있다. Meanwhile, Embodiment 1 and Embodiment 2 described above may be used in combination. For example, after the long-term motion information candidate according to the second embodiment is added to the motion information candidate list of the current block, the order of the motion information candidates in the motion information candidate list of the current block can be sorted according to the first embodiment. have.

도 23은 본 발명의 일 실시예에 따른 인터 예측 기반 영상 처리 방법을 예시하는 도면이다. 23 is a diagram illustrating an inter prediction based image processing method according to an embodiment of the present invention.

도 23을 참조하면, 인코더/디코더는 현재 블록의 움직임 정보를 도출하기 위한 움직임 정보 후보 리스트를 구성한다(S2301). Referring to FIG. 23, the encoder / decoder constructs a motion information candidate list for deriving motion information of the current block (S2301).

이때, 인코더/디코더는 앞서 설명한 실시예 1 및/또는 실시예 2에 따라 움직임 정보 후보 리스트를 구성할 수 있다. In this case, the encoder / decoder may configure the motion information candidate list according to the first and / or second embodiments described above.

다시 말해, 인코더/디코더는 현재 블록과 공간적으로 하나 이상의 이웃한 블록으로부터 도출된 하나 이상의 공간적 움직임 정보 후보 및/또는 시간적으로 이웃한 하나 이상의 블록으로부터 도출된 하나 이상의 시간적 움직임 정보 후보를 미리 정해진 순서에 따라 추가함으로써 움직임 정보 후보 리스트를 구성할 수 있다. In other words, the encoder / decoder may assign, in a predetermined order, one or more spatial motion information candidates derived from the current block and one or more neighboring blocks spatially and / or one or more temporal motion information candidates derived from one or more temporally neighboring blocks. By adding accordingly, a motion information candidate list can be constructed.

이때, 도 7 또는 도 15 또는 도 16에서 설명한 바와 같이, 인코더/디코더는 현재 블록에 공간적으로 이웃한 블록 및/또는 현재 블록에 시간적으로 이웃한 블록으로부터 도출된 움직임 정보 후보를 이용하여 움직임 정보 후보 리스트를 구성할 수 있다.In this case, as described with reference to FIG. 7, 15, or 16, the encoder / decoder uses motion information candidates derived from blocks spatially neighboring the current block and / or blocks temporally neighboring the current block. Lists can be constructed.

또한, 앞서 설명한 실시예 1과 같이, 인코더/디코더는 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 발생 빈도수에 따라 움직임 정보 후보의 순서를 정렬(즉, 발생 빈도수를 내림 차순으로 정렬)할 수 있다. 예를 들어, 앞서 도 12의 예시와 같이 움직임 정보 후보 리스트가 정렬될 수 있다. In addition, as in the first embodiment described above, the encoder / decoder may sort the motion information candidates according to the frequency of occurrence of the motion information candidates added to the motion information candidate list (that is, the frequency of occurrence in descending order). . For example, the motion information candidate list may be sorted as shown in the example of FIG. 12.

이처럼 발생 빈도 수가 큰 순서대로 정렬할 때, 인코더/디코더는 발생 빈도의 차이가 미리 정해진 수준 이상인 경우에만 움직임 정보 후보 리스트를 정렬할 수도 있다. 예를 들어, 앞서 설명한 도 13의 예시와 같이 움직임 정보 후보 리스트가 정렬될 수 있다.When sorting in this order of occurrence frequency, the encoder / decoder may sort the motion information candidate list only when the difference in frequency of occurrence is more than a predetermined level. For example, the motion information candidate list may be sorted as in the example of FIG. 13 described above.

앞서 설명한 실시예 1과 같이, 공간적 움직임 정보 후보 및 시간적 움직임 정보 후보가 움직임 정보 후보 리스트에 추가된 후, 현재 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 개수가 움직임 정보 후보 리스트의 미리 정해진 항목의 수보다 작으면, 움직임 정보 후보 리스트에 추가된 움직임 정보를 조합함으로써 조합된 양방향 움직임 정보 후보가 움직임 정보 후보 리스트에 추가될 수도 있다. 특히, 현재 블록이 속한 슬라이스(또는 픽쳐)가 양방향 슬라이스(또는 픽쳐)인 경우에 조합된 양방향 움직임 정보 후보가 움직임 정보 후보 리스트에 추가될 수 있다.As in Embodiment 1 described above, after the spatial motion information candidate and the temporal motion information candidate are added to the motion information candidate list, the number of motion information candidates added to the current motion information candidate list is determined by a predetermined item of the motion information candidate list. If smaller than the number, the combined bidirectional motion information candidate may be added to the motion information candidate list by combining the motion information added to the motion information candidate list. In particular, a combined bidirectional motion information candidate may be added to the motion information candidate list when the slice (or picture) to which the current block belongs is a bidirectional slice (or picture).

앞서 설명한 실시예 1과 같이, 조합된 양방향 움직임 정보 후보가 움직임 정보 후보 리스트에 추가된 후(또는 추가되지 않을 수도 있음), 현재 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 개수가 움직임 정보 후보 리스트의 미리 정해진 항목의 수보다 작으면, 비-스케일링된(non-scaled) 양방향 움직임 정보 후보가 움직임 정보 후보 리스트에 추가될 수도 있다. 특히, 현재 블록이 속한 슬라이스(또는 픽쳐)가 양방향 슬라이스(또는 픽쳐)인 경우에 비-스케일링된(non-scaled) 양방향 움직임 정보 후보가 움직임 정보 후보 리스트에 추가될 수 있다.As in Embodiment 1 described above, after the combined bidirectional motion information candidate is added to (or may not be added to) the motion information candidate list, the number of motion information candidates added to the current motion information candidate list is added to the motion information candidate list. If less than a predetermined number of items, a non-scaled bidirectional motion information candidate may be added to the motion information candidate list. In particular, when the slice (or picture) to which the current block belongs is a bidirectional slice (or picture), a non-scaled bidirectional motion information candidate may be added to the motion information candidate list.

앞서 설명한 실시예 1과 같이, 비-스케일링된(non-scaled) 양방향 움직임 정보 후보가 움직임 정보 후보 리스트에 추가된 후(또는 추가되지 않을 수도 있음), 현재 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 개수가 움직임 정보 후보 리스트의 미리 정해진 항목의 수보다 작으면, 제로 움직임 벡터(zero motion vector) 후보가 움직임 정보 후보 리스트에 추가될 수도 있다. 이때, 제로 움직임 벡터(zero motion vector) 후보는 현재 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 개수가 움직임 정보 후보 리스트의 미리 정해진 항목의 수와 동일할 때까지 움직임 정보 후보 리스트에 추가될 수 있다. As in Embodiment 1 described above, after the non-scaled bidirectional motion information candidate is added to (or may not be added to) the motion information candidate list, the motion information candidate added to the current motion information candidate list. If the number of times is smaller than the number of predetermined items in the motion information candidate list, a zero motion vector candidate may be added to the motion information candidate list. In this case, the zero motion vector candidate may be added to the motion information candidate list until the number of motion information candidates added to the current motion information candidate list is equal to the number of predetermined items of the motion information candidate list. .

또한, 앞서 설명한 실시예 2와 같이, 인코더/디코더는 장기 움직임 정보로 구성되는 장기 움직임 정보 리스트를 생성 및 관리할 수 있다. 여기서, 장기 움직임 정보 후보는 상술한 바와 같이, 최근에 사용되었으나 현재 움직임 정보 후보 리스트에 존재하지 않는 움직임 정보(즉, 현재 블록으로부터 공간적으로 방향과 무관하게 M개의 블록 이상 떨어진 블록의 움직임 정보), 픽쳐의 전역적인 움직임 정보, 픽쳐 내에서 가장 높은 빈도를 보이는 움직임 정보 중 적어도 어느 하나를 포함할 수 있다. In addition, as in the second embodiment described above, the encoder / decoder may generate and manage a long-term motion information list including long-term motion information. Here, as described above, the long-term motion information candidate is motion information that is recently used but does not exist in the current motion information candidate list (that is, motion information of M blocks or more away from the current block regardless of spatial direction), At least one of the global motion information of the picture and the motion information showing the highest frequency in the picture.

그리고, 인코더/디코더는 장기 움직임 정보를 장기 움직임 정보 후보로서 현재 블록의 움직임 정보 후보 리스트에 추가할 수도 있다. The encoder / decoder may add the long-term motion information to the motion information candidate list of the current block as the long-term motion information candidate.

이때, 장기 움직임 정보 후보는 공간적 움직임 정보 후보가 추가되기 전(즉, 제일 우선적으로) 움직임 정보 후보 리스트에 추가될 수도 있으며, 또는 공간적 움직임 정보 후보가 추가된 후 움직임 정보 후보 리스트에 추가될 수도 있으며, 또는 시간적 움직임 정보 후보가 추가된 후 움직임 정보 후보 리스트에 추가될 수도 있으며, 조합된 양방향 움직임 정보 후보가 움직임 정보 후보 리스트에 추가된 후 움직임 정보 후보 리스트에 추가될 수도 있으며, 비-스케일링된(non-scaled) 양방향 움직임 정보 후보가 움직임 정보 후보 리스트에 추가된 후 움직임 정보 후보 리스트에 추가될 수도 있으며, 제로 움직임 벡터(zero motion vector) 후보가 추가된 후 움직임 정보 후보 리스트에 추가될 수도 있다. In this case, the long-term motion information candidate may be added to the motion information candidate list before the spatial motion information candidate is added (that is, the first priority), or may be added to the motion information candidate list after the spatial motion information candidate is added. , Or may be added to the motion information candidate list after the temporal motion information candidate is added, the combined bidirectional motion information candidate may be added to the motion information candidate list, and then added to the motion information candidate list, and may be added to a non-scaled ( non-scaled) The bidirectional motion information candidate may be added to the motion information candidate list after being added to the motion information candidate list, and the zero motion vector candidate may be added to the motion information candidate list after being added.

인코더/디코더는 움직임 정보 후보 리스트에 추가된 움직임 정보 후보 중에서 선택된 움직임 정보 후보로부터 현재 블록의 움직임 정보를 도출한다(S2302). The encoder / decoder derives the motion information of the current block from the motion information candidate selected from the motion information candidates added to the motion information candidate list (S2302).

이때, 디코더의 경우, 인코더로부터 현재 블록의 움직임 정보 후보 리스트에서 현재 블록의 움직임 정보를 특정하기 위한 움직임 정보 후보 인덱스를 수신할 수 있다. 이 경우, 수신된 움직임 정보 후보 인덱스에 의해 지시되는 움직임 정보 후보로부터 현재 블록의 움직임 정보가 도출될 수 있다. In this case, the decoder may receive a motion information candidate index for specifying motion information of the current block from the motion information candidate list of the current block from the encoder. In this case, the motion information of the current block may be derived from the motion information candidate indicated by the received motion information candidate index.

예를 들어, 현재 블록에 머지 모드가 적용되는 경우, 디코더는 인코더로부터 머지 인덱스를 수신하고, 수신한 머지 인덱스를 복호화할 수 있다. 그리고, 머지 후보 인덱스 내에서 머지 인덱스가 지시하는 움직임 정보를 현재 블록의 움직임 정보로서 도출할 수 있다. For example, when the merge mode is applied to the current block, the decoder may receive the merge index from the encoder and decode the received merge index. The motion information indicated by the merge index in the merge candidate index may be derived as the motion information of the current block.

또한, 현재 블록에 AMVP 모드가 적용되는 경우, 디코더는 인코더로부터 움직임 참조 플래그를 수신하고, 수신한 움직임 참조 플래그를 복호화할 수 있다. 그리고, 움직임 벡터 예측값 후보 리스트 내에서 움직임 참조 플래그가 지시하는 움직임 정보를 현재 블록의 움직임 벡터 예측값으로서 도출할 수 있다. 또한, 디코더는 인코더로부터 수신한 움직임 벡터 차분값, 참조 픽쳐 인덱스, 인터 예측 모드를 복호화하고, 도출된 움직임 벡터 예측값과 복호화한 움직임 벡터 차분값을 합하여 현재 블록의 움직임 벡터를 도출할 수 있다. In addition, when the AMVP mode is applied to the current block, the decoder may receive a motion reference flag from the encoder and decode the received motion reference flag. The motion information indicated by the motion reference flag in the motion vector predictor candidate list can be derived as the motion vector predictor of the current block. The decoder may decode the motion vector difference value, the reference picture index, and the inter prediction mode received from the encoder, and derive the motion vector of the current block by adding the derived motion vector prediction value and the decoded motion vector difference value.

인코더/디코더는 도출된 현재 블록의 움직임 정보를 이용하여 현재 블록의 예측 블록을 생성한다(S2303).The encoder / decoder generates the prediction block of the current block by using the derived motion information of the current block (S2303).

인코더/디코더는 움직임 정보(특히, 참조 픽쳐 인덱스)에 의해 특정된 참조 픽쳐에서 움직임 정보(특히, 움직임 벡터)에 의해 특정된 블록으로부터 현재 블록의 예측 블록을 생성할 수 있다. The encoder / decoder may generate the predictive block of the current block from the block specified by the motion information (especially the motion vector) in the reference picture specified by the motion information (especially the reference picture index).

다시 말해, 인코더/디코더는 참조 픽쳐 내에서 움직임 벡터에 의해 특정된 블록(영역)의 샘플값으로부터 현재 블록의 예측 단위의 샘플값으로 생성(도출)할 수 있다. In other words, the encoder / decoder may generate (derive) the sample value of the prediction unit of the current block from the sample value of the block (region) specified by the motion vector in the reference picture.

도 24는 본 발명의 일 실시예에 따른 인터 예측부를 예시하는 도면이다.24 is a diagram illustrating an inter predictor according to an embodiment of the present invention.

도 24에서는 설명의 편의를 위해 인터 예측부(181, 도 1 참조; 261, 도 2 참조)를 하나의 블록으로 도시하였으나, 인터 예측부(181, 261)는 인코더 및/또는 디코더에 포함되는 구성으로 구현될 수 있다. In FIG. 24, the inter prediction unit 181 (see FIG. 1; see 261 and FIG. 2) is shown as one block for convenience of description, but the inter prediction units 181 and 261 are included in the encoder and / or the decoder. It can be implemented as.

도 24를 참조하면, 인터 예측부(181, 261)는 앞서 도 1 내지 도 23에서 제안된 기능, 과정 및/또는 방법을 구현한다. 구체적으로, 인터 예측부(181, 261)는 움직임 정보 후보 리스트 구성부(2401), 서브 블록 분할부(2402) 및 예측 블록 생성부(2403)를 포함하여 구성될 수 있다. 또한, 장기 움직임 정보 리스트 구성부(2404)를 더 포함하여 구성될 수도 있다. Referring to FIG. 24, the inter prediction units 181 and 261 implement the functions, processes, and / or methods proposed in FIGS. 1 to 23. In detail, the inter predictors 181 and 261 may include a motion information candidate list constructer 2401, a subblock divider 2402, and a predictive block generator 2403. In addition, the long-term motion information list construction unit 2404 may be further included.

움직임 정보 후보 리스트 구성부(2401)는 현재 블록의 움직임 정보를 도출하기 위한 움직임 정보 후보 리스트를 구성한다. The motion information candidate list constructing unit 2401 constructs a motion information candidate list for deriving motion information of the current block.

움직임 정보 후보 리스트 구성부(2401)는 앞서 설명한 실시예 1 및/또는 실시예 2에 따라 움직임 정보 후보 리스트를 구성할 수 있다.The motion information candidate list constructing unit 2401 may construct a motion information candidate list according to the first and / or second embodiments described above.

다시 말해, 움직임 정보 후보 리스트 구성부(2401)는 현재 블록과 공간적으로 하나 이상의 이웃한 블록으로부터 도출된 하나 이상의 공간적 움직임 정보 후보 및/또는 시간적으로 이웃한 하나 이상의 블록으로부터 도출된 하나 이상의 시간적 움직임 정보 후보를 미리 정해진 순서에 따라 추가함으로써 움직임 정보 후보 리스트를 구성할 수 있다. In other words, the motion information candidate list constructer 2401 may include one or more spatial motion information candidates derived from the current block and one or more neighboring blocks spatially and / or one or more temporal motion information derived from one or more temporally neighboring blocks. The motion information candidate list can be constructed by adding candidates in a predetermined order.

이때, 도 7 또는 도 15 또는 도 16에서 설명한 바와 같이, 움직임 정보 후보 리스트 구성부(2401)는 현재 블록에 공간적으로 이웃한 블록 및/또는 현재 블록에 시간적으로 이웃한 블록으로부터 도출된 움직임 정보 후보를 이용하여 움직임 정보 후보 리스트를 구성할 수 있다.In this case, as described with reference to FIG. 7, FIG. 15, or FIG. 16, the motion information candidate list constructer 2401 is a motion information candidate derived from a block spatially neighboring the current block and / or a block temporally neighboring the current block. The motion information candidate list can be constructed using.

또한, 앞서 설명한 실시예 1과 같이, 움직임 정보 후보 리스트 구성부(2401)는 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 발생 빈도수에 따라 움직임 정보 후보의 순서를 정렬(즉, 발생 빈도수를 내림 차순으로 정렬)할 수 있다. 예를 들어, 앞서 도 12의 예시와 같이 움직임 정보 후보 리스트가 정렬될 수 있다. In addition, as in the first embodiment described above, the motion information candidate list constructing unit 2401 sorts the order of the motion information candidates according to the frequency of occurrence of the motion information candidate added to the motion information candidate list (that is, in descending order of occurrence frequency). Sorting). For example, the motion information candidate list may be sorted as shown in the example of FIG. 12.

이처럼 발생 빈도 수가 큰 순서대로 정렬할 때, 움직임 정보 후보 리스트 구성부(2401)는 움직임 정보 후보 간의 발생 빈도의 차이가 미리 정해진 수준 이상인 경우에만 움직임 정보 후보 리스트를 정렬할 수도 있다. 즉, 움직임 정보 후보 리스트 내 발생 빈도의 차이가 미리 정해진 수준 이상인 움직임 정보 후보의 순서만이 변경될 수 있다. 예를 들어, 앞서 설명한 도 13의 예시와 같이 움직임 정보 후보 리스트가 정렬될 수 있다.As such, when the frequency of occurrence is sorted in ascending order, the motion information candidate list construction unit 2401 may sort the motion information candidate list only when the difference in the frequency of occurrence between the motion information candidates is equal to or greater than a predetermined level. That is, only the order of motion information candidates whose difference in frequency of occurrence in the motion information candidate list is greater than or equal to a predetermined level may be changed. For example, the motion information candidate list may be sorted as in the example of FIG. 13 described above.

앞서 설명한 실시예 1과 같이, 공간적 움직임 정보 후보 및 시간적 움직임 정보 후보가 움직임 정보 후보 리스트에 추가된 후, 현재 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 개수가 움직임 정보 후보 리스트의 미리 정해진 항목의 수보다 작으면, 움직임 정보 후보 리스트에 추가된 움직임 정보 후보를 조합함으로써 생성된 조합된 양방향 움직임 정보 후보가 움직임 정보 후보 리스트에 추가될 수도 있다. 특히, 현재 블록이 속한 슬라이스(또는 픽쳐)가 양방향 슬라이스(또는 픽쳐)인 경우에 조합된 양방향 움직임 정보 후보가 움직임 정보 후보 리스트에 추가될 수 있다.As in Embodiment 1 described above, after the spatial motion information candidate and the temporal motion information candidate are added to the motion information candidate list, the number of motion information candidates added to the current motion information candidate list is determined by a predetermined item of the motion information candidate list. If less than the number, the combined bidirectional motion information candidate generated by combining the motion information candidates added to the motion information candidate list may be added to the motion information candidate list. In particular, a combined bidirectional motion information candidate may be added to the motion information candidate list when the slice (or picture) to which the current block belongs is a bidirectional slice (or picture).

앞서 설명한 실시예 1과 같이, 조합된 양방향 움직임 정보 후보가 움직임 정보 후보 리스트에 추가된 후(또는 추가되지 않을 수도 있음), 현재 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 개수가 움직임 정보 후보 리스트의 미리 정해진 항목의 수보다 작으면, 비-스케일링된(non-scaled) 양방향 움직임 정보 후보가 움직임 정보 후보 리스트에 추가될 수도 있다. 특히, 현재 블록이 속한 슬라이스(또는 픽쳐)가 양방향 슬라이스(또는 픽쳐)인 경우에 비-스케일링된(non-scaled) 양방향 움직임 정보 후보가 움직임 정보 후보 리스트에 추가될 수 있다.As in Embodiment 1 described above, after the combined bidirectional motion information candidate is added to (or may not be added to) the motion information candidate list, the number of motion information candidates added to the current motion information candidate list is added to the motion information candidate list. If less than a predetermined number of items, a non-scaled bidirectional motion information candidate may be added to the motion information candidate list. In particular, when the slice (or picture) to which the current block belongs is a bidirectional slice (or picture), a non-scaled bidirectional motion information candidate may be added to the motion information candidate list.

앞서 설명한 실시예 1과 같이, 비-스케일링된(non-scaled) 양방향 움직임 정보 후보가 움직임 정보 후보 리스트에 추가된 후(또는 추가되지 않을 수도 있음), 현재 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 개수가 움직임 정보 후보 리스트의 미리 정해진 항목의 수보다 작으면, 제로 움직임 벡터(zero motion vector) 후보가 움직임 정보 후보 리스트에 추가될 수도 있다. 이때, 제로 움직임 벡터(zero motion vector) 후보는 현재 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 개수가 움직임 정보 후보 리스트의 미리 정해진 항목의 수와 동일할 때까지 움직임 정보 후보 리스트에 추가될 수 있다. As in Embodiment 1 described above, after the non-scaled bidirectional motion information candidate is added to (or may not be added to) the motion information candidate list, the motion information candidate added to the current motion information candidate list. If the number of times is smaller than the number of predetermined items in the motion information candidate list, a zero motion vector candidate may be added to the motion information candidate list. In this case, the zero motion vector candidate may be added to the motion information candidate list until the number of motion information candidates added to the current motion information candidate list is equal to the number of predetermined items of the motion information candidate list. .

장기 움직임 정보 리스트 구성부(2404)는 장기 움직임 정보 후보로 구성되는 장기 움직임 정보 리스트를 생성 및 관리할 수 있다. 여기서, 장기 움직임 정보 후보는 상술한 바와 같이, 최근에 사용되었으나 현재 움직임 정보 후보 리스트에 존재하지 않는 움직임 정보(즉, 현재 블록으로부터 공간적으로 방향과 무관하게 M개의 블록 이상 떨어진 블록의 움직임 정보), 픽쳐의 전역적인 움직임 정보, 픽쳐 내에서 가장 높은 빈도를 보이는 움직임 정보 중 적어도 어느 하나를 포함할 수 있다. The long-term motion information list constructer 2404 may generate and manage a long-term motion information list composed of long-term motion information candidates. Here, as described above, the long-term motion information candidate is motion information that is recently used but does not exist in the current motion information candidate list (that is, motion information of M blocks or more away from the current block regardless of spatial direction), At least one of the global motion information of the picture and the motion information showing the highest frequency in the picture.

이때, 앞서 설명한 실시예 2와 같이, 움직임 정보 후보 리스트 구성부(2401)는 장기 움직임 정보 리스트 구성부(2404)에서 생성한 장기 움직임 정보 리스트를 이용하여 현재 블록의 움직임 정보 후보 리스트를 구성할 수도 있다. 즉, 움직임 정보 후보 리스트 구성부(2401)는 장기 움직임 정보 리스트 구성부(2404)에서 생성한 장기 움직임 정보 리스트 내 장기 움직임 정보를 장기 움직임 정보 후보로서 현재 블록의 움직임 정보 후보 리스트에 추가할 수도 있다. In this case, as in the above-described second embodiment, the motion information candidate list configuring unit 2401 may configure the motion information candidate list of the current block by using the long-term motion information list generated by the long-term motion information list forming unit 2404. have. That is, the motion information candidate list generator 2401 may add the long-term motion information in the long-term motion information list generated by the long-term motion information list generator 2404 to the motion information candidate list of the current block as the long-term motion information candidate. .

이때, 장기 움직임 정보 후보는 공간적 움직임 정보 후보가 추가되기 전(즉, 제일 우선적으로) 움직임 정보 후보 리스트에 추가될 수도 있으며, 또는 공간적 움직임 정보 후보가 추가된 후 움직임 정보 후보 리스트에 추가될 수도 있으며, 또는 시간적 움직임 정보 후보가 추가된 후 움직임 정보 후보 리스트에 추가될 수도 있으며, 조합된 양방향 움직임 정보 후보가 움직임 정보 후보 리스트에 추가된 후 움직임 정보 후보 리스트에 추가될 수도 있으며, 비-스케일링된(non-scaled) 양방향 움직임 정보 후보가 움직임 정보 후보 리스트에 추가된 후 움직임 정보 후보 리스트에 추가될 수도 있으며, 제로 움직임 벡터(zero motion vector) 후보가 추가된 후 움직임 정보 후보 리스트에 추가될 수도 있다. In this case, the long-term motion information candidate may be added to the motion information candidate list before the spatial motion information candidate is added (that is, the first priority), or may be added to the motion information candidate list after the spatial motion information candidate is added. , Or may be added to the motion information candidate list after the temporal motion information candidate is added, the combined bidirectional motion information candidate may be added to the motion information candidate list, and then added to the motion information candidate list, and may be added to a non-scaled ( non-scaled) The bidirectional motion information candidate may be added to the motion information candidate list after being added to the motion information candidate list, and the zero motion vector candidate may be added to the motion information candidate list after being added.

서브 블록 분할부(2402)는 움직임 정보 후보 리스트에 추가된 움직임 정보 후보 중에서 선택된 움직임 정보 후보로부터 현재 블록의 움직임 정보를 도출한다. The subblock dividing unit 2402 derives motion information of the current block from the motion information candidate selected from the motion information candidates added to the motion information candidate list.

이때, 서브 블록 분할부(2402)는 인코더로부터 수신된 움직임 정보 후보 인덱스(예를 들어, 머지 인덱스 또는 움직임 참조 플래그)에 의해 지시되는 움직임 정보 후보로부터 현재 블록의 움직임 정보를 도출할 수 있다.In this case, the sub-block dividing unit 2402 may derive the motion information of the current block from the motion information candidate indicated by the motion information candidate index (for example, the merge index or the motion reference flag) received from the encoder.

예측 블록 생성부(2403)는 도출된 현재 블록의 움직임 정보를 이용하여 현재 블록의 예측 블록을 생성한다. The prediction block generator 2403 generates a prediction block of the current block by using the derived motion information of the current block.

예측 블록 생성부(2403)는 움직임 정보(특히, 참조 픽쳐 인덱스)에 의해 특정된 참조 픽쳐에서 움직임 정보(특히, 움직임 벡터)에 의해 특정된 블록으로부터 현재 블록의 예측 블록을 생성할 수 있다. The prediction block generator 2403 may generate the prediction block of the current block from the block specified by the motion information (particularly, the motion vector) in the reference picture specified by the motion information (particularly, the reference picture index).

다시 말해, 예측 블록 생성부(2403)는 참조 픽쳐 내에서 움직임 벡터에 의해 특정된 블록(영역)의 샘플값으로부터 현재 블록의 예측 단위의 샘플값으로 생성(도출)할 수 있다. In other words, the prediction block generator 2403 may generate (derive) the sample value of the prediction unit of the current block from the sample value of the block (region) specified by the motion vector in the reference picture.

이상에서 설명된 실시예들은 본 발명의 구성요소들과 특징들이 소정 형태로 결합된 것들이다. 각 구성요소 또는 특징은 별도의 명시적 언급이 없는 한 선택적인 것으로 고려되어야 한다. 각 구성요소 또는 특징은 다른 구성요소나 특징과 결합되지 않은 형태로 실시될 수 있다. 또한, 일부 구성요소들 및/또는 특징들을 결합하여 본 발명의 실시예를 구성하는 것도 가능하다. 본 발명의 실시예들에서 설명되는 동작들의 순서는 변경될 수 있다. 어느 실시예의 일부 구성이나 특징은 다른 실시예에 포함될 수 있고, 또는 다른 실시예의 대응하는 구성 또는 특징과 교체될 수 있다. 특허청구범위에서 명시적인 인용 관계가 있지 않은 청구항들을 결합하여 실시예를 구성하거나 출원 후의 보정에 의해 새로운 청구항으로 포함시킬 수 있음은 자명하다.The embodiments described above are the components and features of the present invention are combined in a predetermined form. Each component or feature is to be considered optional unless stated otherwise. Each component or feature may be embodied in a form that is not combined with other components or features. It is also possible to combine some of the components and / or features to form an embodiment of the invention. The order of the operations described in the embodiments of the present invention may be changed. Some components or features of one embodiment may be included in another embodiment or may be replaced with corresponding components or features of another embodiment. It is obvious that the claims may be combined to form an embodiment by combining claims that do not have an explicit citation relationship in the claims or as new claims by post-application correction.

본 발명에 따른 실시예는 다양한 수단, 예를 들어, 하드웨어, 펌웨어(firmware), 소프트웨어 또는 그것들의 결합 등에 의해 구현될 수 있다. 하드웨어에 의한 구현의 경우, 본 발명의 일 실시예는 하나 또는 그 이상의 ASICs(application specific integrated circuits), DSPs(digital signal processors), DSPDs(digital signal processing devices), PLDs(programmable logic devices), FPGAs(field programmable gate arrays), 프로세서, 콘트롤러, 마이크로 콘트롤러, 마이크로 프로세서 등에 의해 구현될 수 있다.Embodiments according to the present invention may be implemented by various means, for example, hardware, firmware, software, or a combination thereof. In the case of a hardware implementation, an embodiment of the present invention may include one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), FPGAs ( field programmable gate arrays), processors, controllers, microcontrollers, microprocessors, and the like.

펌웨어나 소프트웨어에 의한 구현의 경우, 본 발명의 일 실시예는 이상에서 설명된 기능 또는 동작들을 수행하는 모듈, 절차, 함수 등의 형태로 구현될 수 있다. 소프트웨어 코드는 메모리에 저장되어 프로세서에 의해 구동될 수 있다. 상기 메모리는 상기 프로세서 내부 또는 외부에 위치하여, 이미 공지된 다양한 수단에 의해 상기 프로세서와 데이터를 주고 받을 수 있다.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, function, etc. that performs the functions or operations described above. The software code may be stored in memory and driven by the processor. The memory may be located inside or outside the processor, and may exchange data with the processor by various known means.

본 발명은 본 발명의 필수적 특징을 벗어나지 않는 범위에서 다른 특정한 형태로 구체화될 수 있음은 당업자에게 자명하다. 따라서, 상술한 상세한 설명은 모든 면에서 제한적으로 해석되어서는 아니 되고 예시적인 것으로 고려되어야 한다. 본 발명의 범위는 첨부된 청구항의 합리적 해석에 의해 결정되어야 하고, 본 발명의 등가적 범위 내에서의 모든 변경은 본 발명의 범위에 포함된다. It will be apparent to those skilled in the art that the present invention may be embodied in other specific forms without departing from the essential features of the present invention. Accordingly, the above detailed description should not be construed as limiting in all aspects and should be considered as illustrative. The scope of the invention should be determined by reasonable interpretation of the appended claims, and all changes within the equivalent scope of the invention are included in the scope of the invention.

이상, 전술한 본 발명의 바람직한 실시예는, 예시의 목적을 위해 개시된 것으로, 당업자라면 이하 첨부된 특허청구범위에 개시된 본 발명의 기술적 사상과 그 기술적 범위 내에서, 다양한 다른 실시예들을 개량, 변경, 대체 또는 부가 등이 가능할 것이다.As mentioned above, preferred embodiments of the present invention are disclosed for purposes of illustration, and those skilled in the art can improve and change various other embodiments within the spirit and technical scope of the present invention disclosed in the appended claims below. , Replacement or addition would be possible.

Claims (15)

인터 예측(inter prediction)을 기반으로 영상을 처리하는 방법에 있어서, In the method for processing an image based on inter prediction, 현재 블록과 공간적으로 이웃한 블록으로부터 도출된 공간적 움직임 정보 후보와 상기 현재 블록과 시간적으로 이웃한 블록으로부터 도출된 시간적 움직임 정보 후보를 미리 정해진 순서에 따라 현재 블록의 움직임 정보 후보 리스트에 추가함으로써 상기 움직임 정보 후보 리스트를 구성하는 단계;The motion by adding spatial motion information candidates derived from a block spatially neighboring the current block and temporal motion information candidates derived from a block temporally neighboring the current block to the motion information candidate list of the current block in a predetermined order; Constructing an information candidate list; 상기 움직임 정보 후보 리스트에 추가된 움직임 정보 후보 중에서 선택된 움직임 정보 후보로부터 상기 현재 블록의 움직임 정보를 도출하는 단계; 및Deriving motion information of the current block from the motion information candidate selected from the motion information candidates added to the motion information candidate list; And 상기 현재 블록의 움직임 정보를 이용하여 상기 현재 블록의 예측 블록을 생성하는 단계를 포함하고, Generating a prediction block of the current block by using motion information of the current block, 상기 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 발생 빈도수에 따라 상기 움직임 정보 후보의 순서가 정렬되는 인터 예측 모드 기반 영상 처리 방법.And an order of the motion information candidates according to the frequency of occurrence of the motion information candidates added to the motion information candidate list. 제1항에 있어서,The method of claim 1, 상기 발생 빈도수의 차이가 미리 정해진 수준 이상인 움직임 정보 후보의 순서만이 변경되는 인터 예측 모드 기반 영상 처리 방법.And only a sequence of motion information candidates whose difference in frequency is greater than or equal to a predetermined level is changed. 제1항에 있어서,The method of claim 1, 상기 현재 블록과 공간적으로 좌측에 이웃한 블록, 상기 현재 블록과 공간적으로 좌상단에 이웃한 블록, 상기 현재 블록과 공간적으로 우상단에 이웃한 블록, 상기 현재 블록과 공간적으로 좌하단에 이웃한 블록, 상기 현재 블록과 시간적으로 이웃한 블록의 순서로 움직임 정보 후보가 도출되는 인터 예측 모드 기반 영상 처리 방법.A block neighboring to the left of the current block spatially, a block neighboring to the upper left of the current block, a block neighboring to the upper right of the current block spatially, a block spatially neighboring to the lower left of the current block, the An inter prediction mode based image processing method in which motion information candidates are derived in an order of a neighboring block in time with a current block. 제1항에 있어서,The method of claim 1, 상기 현재 블록과 공간적으로 좌측에 이웃한 블록과 상기 현재 블록과 공간적으로 상단에 이웃한 블록으로부터 교대로 움직임 정보 후보가 도출된 후, 상기 현재 블록과 공간적으로 좌상단에 이웃한 블록, 상기 현재 블록과 공간적으로 우상단에 이웃한 블록, 상기 현재 블록과 공간적으로 좌하단에 이웃한 블록, 상기 현재 블록과 시간적으로 이웃한 블록의 순서로 움직임 정보 후보가 도출되는 인터 예측 모드 기반 영상 처리 방법.After motion information candidates are alternately derived from a block adjacent to the left side of the current block and a block adjacent to the top of the current block, the block next to the left side of the current block and the current block An inter prediction mode based image processing method in which motion information candidates are derived in the order of a spatially neighboring right uppermost block, the current block and a spatially lower left neighboring block, and the current block and a temporal neighboring block. 제1항에 있어서,The method of claim 1, 상기 현재 블록이 분할되는 깊이가 미리 정해진 값 이상인 경우 또는 상기 현재 블록의 크기가 미리 정해진 크기 보다 작은 경우, 상기 움직임 정보 후보 리스트가 정렬되는 인터 예측 모드 기반 영상 처리 방법.And the motion information candidate list is arranged when the depth at which the current block is divided is equal to or larger than a predetermined value or when the size of the current block is smaller than a predetermined size. 제1항에 있어서,The method of claim 1, 상기 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 개수가 상기 움직임 정보 후보 리스트의 미리 정해진 항목의 수보다 작은 경우, 상기 움직임 정보 후보 리스트에 추가된 움직임 정보 후보를 조합함으로써 생성된 움직임 정보 후보가 상기 움직임 정보 후보 리스트에 추가되는 인터 예측 모드 기반 영상 처리 방법.If the number of motion information candidates added to the motion information candidate list is smaller than the number of predetermined items of the motion information candidate list, the motion information candidates generated by combining the motion information candidates added to the motion information candidate list are determined. An inter prediction mode based image processing method added to a motion information candidate list. 제1항에 있어서,The method of claim 1, 상기 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 개수가 상기 움직임 정보 후보 리스트의 미리 정해진 항목의 수보다 작은 경우, 제로 움직임 벡터(zero motion vector)가 상기 움직임 정보 후보 리스트에 추가되는 인터 예측 모드 기반 영상 처리 방법.When the number of motion information candidates added to the motion information candidate list is smaller than the number of predetermined items of the motion information candidate list, a zero motion vector is added to the motion information candidate list. Image processing method. 제1항에 있어서,The method of claim 1, 상기 현재 블록으로부터 공간적으로 소정의 개수의 블록 이상 떨어진 블록의 움직임 정보 및/또는 상기 현재 블록이 속한 픽쳐의 전역적인 움직임 정보를 포함하는 장기 움직임 정보 리스트로부터 선택된 장기 움직임 정보 후보가 상기 움직임 정보 후보 리스트에 추가되는 인터 예측 모드 기반 영상 처리 방법.The long-term motion information candidate selected from the long-term motion information list including motion information of a block spaced apart from the current block by a predetermined number of blocks or more and global motion information of a picture to which the current block belongs is included in the motion information candidate list. Inter prediction mode based image processing method added to the. 제8항에 있어서, The method of claim 8, 상기 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 개수가 상기 움직임 정보 후보 리스트의 미리 정해진 항목의 수보다 작은 경우, 상기 장기 움직임 정보 후보가 상기 움직임 정보 후보 리스트에 추가되는 인터 예측 모드 기반 영상 처리 방법.When the number of motion information candidates added to the motion information candidate list is smaller than a predetermined number of items of the motion information candidate list, the long-term motion information candidate is added to the motion information candidate list. . 제9항에 있어서, The method of claim 9, 상기 장기 움직임 정보 후보가 상기 움직임 정보 후보 리스트에 추가될 때, 상기 움직임 정보 후보 리스트에 추가된 움직임 정보 후보와 중복되지 않게 추가되는 인터 예측 모드 기반 영상 처리 방법.And when the long-term motion information candidate is added to the motion information candidate list, the long-term motion information candidate is added not to overlap with the motion information candidate added to the motion information candidate list. 제8항에 있어서, The method of claim 8, 상기 장기 움직임 리스트에 움직임 정보가 삽입될 때, 상기 장기 움직임 리스트의 가장 상위 항목에 삽입되는 상기 인터 예측 모드 기반 영상 처리 방법.When the motion information is inserted into the long-term motion list, the inter prediction mode based image processing method is inserted into the highest item of the long-term motion list. 제11항에 있어서,The method of claim 11, 상기 장기 움직임 리스트에 제1 움직임 정보가 삽입될 때, 상기 제1 움직임 정보와 동일한 제2 움직임 정보가 상기 장기 움직임 리스트 내 존재하는 경우, 상기 제2 움직임 정보를 삭제되며 상기 제1 움직임 정보는 상기 장기 움직임 리스트의 가장 상위 항목에 삽입되는 인터 예측 모드 기반 영상 처리 방법.When the first motion information is inserted into the long-term motion list, if second motion information identical to the first motion information exists in the long-term motion list, the second motion information is deleted and the first motion information is determined. An inter prediction mode based image processing method inserted into an uppermost item of a long-term motion list. 제8항에 있어서,The method of claim 8, 상기 전역적인 움직임 정보는 기준 픽쳐를 기준으로 현재 픽쳐를 이동시킬 때, 이동하기 전 상기 현재 픽쳐의 좌상단(top-left) 화소로부터 상기 현재 픽쳐와 상기 기준 픽쳐 간의 MAD(Mean of Absolute Difference) 혹은 MSE(Mean of Squared Error)를 최소화하는 위치에서의 상기 현재 픽쳐의 좌상단(top-left) 화소와의 위치의 차이 및 방향으로 도출되는 인터 예측 모드 기반 영상 처리 방법.The global motion information is a mean of absolute difference (MAD) or MSE between the current picture and the reference picture from a top-left pixel of the current picture before moving when the current picture is moved relative to the reference picture. An inter prediction mode based image processing method derived from a position and a difference between a position and a top-left pixel of the current picture at a position of minimizing a mean of squared error. 제8항에 있어서, The method of claim 8, 상기 장기 움직임 정보 리스트에서 상기 현재 블록이 속한 픽쳐 내에서 가장 높은 빈도 수를 가지는 움직임 정보가 상기 움직임 정보 후보 리스트에 추가되는 인터 예측 모드 기반 영상 처리 방법.And the motion information having the highest frequency in the picture to which the current block belongs in the long-term motion information list is added to the motion information candidate list. 인터 예측(inter prediction)을 기반으로 영상을 처리하는 장치에 있어서, An apparatus for processing an image based on inter prediction, 현재 블록과 공간적으로 이웃한 블록으로부터 도출된 공간적 움직임 정보 후보와 상기 현재 블록과 시간적으로 이웃한 블록으로부터 도출된 시간적 움직임 정보 후보를 미리 정해진 순서에 따라 현재 블록의 움직임 정보 후보 리스트에 추가함으로써 상기 움직임 정보 후보 리스트를 구성하는 움직임 정보 후보 리스트 구성부;The motion by adding spatial motion information candidates derived from a block spatially neighboring the current block and temporal motion information candidates derived from a block temporally neighboring the current block to the motion information candidate list of the current block in a predetermined order; A motion information candidate list constructing unit constituting the information candidate list; 상기 움직임 정보 후보 리스트에 추가된 움직임 정보 후보 중에서 선택된 움직임 정보 후보로부터 상기 현재 블록의 움직임 정보를 도출하는 움직임 정보 도출부; 및A motion information derivation unit for deriving motion information of the current block from a motion information candidate selected from the motion information candidates added to the motion information candidate list; And 상기 현재 블록의 움직임 정보를 이용하여 상기 현재 블록의 예측 블록을 생성하는 예측 블록 생성부를 포함하고,A prediction block generation unit generating a prediction block of the current block by using motion information of the current block, 상기 움직임 정보 후보 리스트에 추가된 움직임 정보 후보의 발생 빈도수에 따라 상기 움직임 정보 후보의 순서가 정렬되는 장치.And ordering the motion information candidates according to a frequency of occurrence of the motion information candidates added to the motion information candidate list.
PCT/KR2016/005727 2015-09-07 2016-05-30 Method for processing image on basis of inter prediction mode and device therefor Ceased WO2017043734A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
US201562215041P 2015-09-07 2015-09-07
US62/215,041 2015-09-07
US201562222787P 2015-09-24 2015-09-24
US62/222,787 2015-09-24

Publications (1)

Publication Number Publication Date
WO2017043734A1 true WO2017043734A1 (en) 2017-03-16

Family

ID=58239990

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2016/005727 Ceased WO2017043734A1 (en) 2015-09-07 2016-05-30 Method for processing image on basis of inter prediction mode and device therefor

Country Status (1)

Country Link
WO (1) WO2017043734A1 (en)

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110740329A (en) * 2018-07-19 2020-01-31 腾讯美国有限责任公司 Video encoding and decoding method and device, computer equipment and storage medium
WO2020147773A1 (en) * 2019-01-16 2020-07-23 Beijing Bytedance Network Technology Co., Ltd. Inserting order of motion candidates in lut
US10778997B2 (en) 2018-06-29 2020-09-15 Beijing Bytedance Network Technology Co., Ltd. Resetting of look up table per slice/tile/LCU row
US10873756B2 (en) 2018-06-29 2020-12-22 Beijing Bytedance Network Technology Co., Ltd. Interaction between LUT and AMVP
US20200413044A1 (en) 2018-09-12 2020-12-31 Beijing Bytedance Network Technology Co., Ltd. Conditions for starting checking hmvp candidates depend on total number minus k
CN113287302A (en) * 2019-01-04 2021-08-20 世宗大学校产学协力团 Method and apparatus for image encoding/decoding
US11134243B2 (en) 2018-07-02 2021-09-28 Beijing Bytedance Network Technology Co., Ltd. Rules on updating luts
US11134267B2 (en) 2018-06-29 2021-09-28 Beijing Bytedance Network Technology Co., Ltd. Update of look up table: FIFO, constrained FIFO
US11140383B2 (en) 2019-01-13 2021-10-05 Beijing Bytedance Network Technology Co., Ltd. Interaction between look up table and shared merge list
US11140385B2 (en) 2018-06-29 2021-10-05 Beijing Bytedance Network Technology Co., Ltd. Checking order of motion candidates in LUT
US11146785B2 (en) 2018-06-29 2021-10-12 Beijing Bytedance Network Technology Co., Ltd. Selection of coded motion information for LUT updating
US11159817B2 (en) 2018-06-29 2021-10-26 Beijing Bytedance Network Technology Co., Ltd. Conditions for updating LUTS
US11159807B2 (en) 2018-06-29 2021-10-26 Beijing Bytedance Network Technology Co., Ltd. Number of motion candidates in a look up table to be checked according to mode
CN113992910A (en) * 2018-12-29 2022-01-28 北京大学 Video processing method and device
EP3818702A4 (en) * 2018-07-02 2022-04-27 Tencent America LLC VIDEO CODING METHOD AND APPARATUS
CN114584788A (en) * 2018-10-10 2022-06-03 华为技术有限公司 Inter-frame prediction method and device
US11528500B2 (en) 2018-06-29 2022-12-13 Beijing Bytedance Network Technology Co., Ltd. Partial/full pruning when adding a HMVP candidate to merge/AMVP
US11589071B2 (en) 2019-01-10 2023-02-21 Beijing Bytedance Network Technology Co., Ltd. Invoke of LUT updating
US11641483B2 (en) 2019-03-22 2023-05-02 Beijing Bytedance Network Technology Co., Ltd. Interaction between merge list construction and other tools
CN116389750A (en) * 2018-12-28 2023-07-04 Jvc建伍株式会社 Moving image decoding device and method, and moving image encoding device and method
US11895318B2 (en) 2018-06-29 2024-02-06 Beijing Bytedance Network Technology Co., Ltd Concept of using one or multiple look up tables to store motion information of previously coded in order and use them to code following blocks
US12549756B2 (en) 2018-06-29 2026-02-10 Beijing Bytedance Network Technology Co., Ltd. Partial/full pruning when adding a HMVP candidate to merge/AMVP

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140049958A (en) * 2012-10-12 2014-04-28 한국전자통신연구원 Video encoding and decoding method and apparatus using the same
KR20140100462A (en) * 2011-09-09 2014-08-14 주식회사 케이티 Methods of decision of candidate block on inter prediction and appratuses using the same
KR20150076235A (en) * 2012-10-25 2015-07-06 퀄컴 인코포레이티드 Reference picture status for video coding
JP2015128252A (en) * 2013-12-27 2015-07-09 日本電信電話株式会社 Prediction image generating method, prediction image generating device, prediction image generating program, and recording medium
KR20150099486A (en) * 2011-11-08 2015-08-31 한국전자통신연구원 Method and apparratus of video decoding

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140100462A (en) * 2011-09-09 2014-08-14 주식회사 케이티 Methods of decision of candidate block on inter prediction and appratuses using the same
KR20150099486A (en) * 2011-11-08 2015-08-31 한국전자통신연구원 Method and apparratus of video decoding
KR20140049958A (en) * 2012-10-12 2014-04-28 한국전자통신연구원 Video encoding and decoding method and apparatus using the same
KR20150076235A (en) * 2012-10-25 2015-07-06 퀄컴 인코포레이티드 Reference picture status for video coding
JP2015128252A (en) * 2013-12-27 2015-07-09 日本電信電話株式会社 Prediction image generating method, prediction image generating device, prediction image generating program, and recording medium

Cited By (53)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11146786B2 (en) 2018-06-20 2021-10-12 Beijing Bytedance Network Technology Co., Ltd. Checking order of motion candidates in LUT
US11134267B2 (en) 2018-06-29 2021-09-28 Beijing Bytedance Network Technology Co., Ltd. Update of look up table: FIFO, constrained FIFO
US11140385B2 (en) 2018-06-29 2021-10-05 Beijing Bytedance Network Technology Co., Ltd. Checking order of motion candidates in LUT
US10873756B2 (en) 2018-06-29 2020-12-22 Beijing Bytedance Network Technology Co., Ltd. Interaction between LUT and AMVP
US12167018B2 (en) 2018-06-29 2024-12-10 Beijing Bytedance Network Technology Co., Ltd. Interaction between LUT and AMVP
US12058364B2 (en) 2018-06-29 2024-08-06 Beijing Bytedance Network Technology Co., Ltd. Concept of using one or multiple look up tables to store motion information of previously coded in order and use them to code following blocks
US12034914B2 (en) 2018-06-29 2024-07-09 Beijing Bytedance Network Technology Co., Ltd Checking order of motion candidates in lut
US11973971B2 (en) 2018-06-29 2024-04-30 Beijing Bytedance Network Technology Co., Ltd Conditions for updating LUTs
US11909989B2 (en) 2018-06-29 2024-02-20 Beijing Bytedance Network Technology Co., Ltd Number of motion candidates in a look up table to be checked according to mode
US11895318B2 (en) 2018-06-29 2024-02-06 Beijing Bytedance Network Technology Co., Ltd Concept of using one or multiple look up tables to store motion information of previously coded in order and use them to code following blocks
US11245892B2 (en) 2018-06-29 2022-02-08 Beijing Bytedance Network Technology Co., Ltd. Checking order of motion candidates in LUT
US10778997B2 (en) 2018-06-29 2020-09-15 Beijing Bytedance Network Technology Co., Ltd. Resetting of look up table per slice/tile/LCU row
US12549756B2 (en) 2018-06-29 2026-02-10 Beijing Bytedance Network Technology Co., Ltd. Partial/full pruning when adding a HMVP candidate to merge/AMVP
US11877002B2 (en) 2018-06-29 2024-01-16 Beijing Bytedance Network Technology Co., Ltd Update of look up table: FIFO, constrained FIFO
US11146785B2 (en) 2018-06-29 2021-10-12 Beijing Bytedance Network Technology Co., Ltd. Selection of coded motion information for LUT updating
US11706406B2 (en) 2018-06-29 2023-07-18 Beijing Bytedance Network Technology Co., Ltd Selection of coded motion information for LUT updating
US11695921B2 (en) 2018-06-29 2023-07-04 Beijing Bytedance Network Technology Co., Ltd Selection of coded motion information for LUT updating
US11153557B2 (en) 2018-06-29 2021-10-19 Beijing Bytedance Network Technology Co., Ltd. Which LUT to be updated or no updating
US11528500B2 (en) 2018-06-29 2022-12-13 Beijing Bytedance Network Technology Co., Ltd. Partial/full pruning when adding a HMVP candidate to merge/AMVP
US11159817B2 (en) 2018-06-29 2021-10-26 Beijing Bytedance Network Technology Co., Ltd. Conditions for updating LUTS
US11159807B2 (en) 2018-06-29 2021-10-26 Beijing Bytedance Network Technology Co., Ltd. Number of motion candidates in a look up table to be checked according to mode
US11528501B2 (en) 2018-06-29 2022-12-13 Beijing Bytedance Network Technology Co., Ltd. Interaction between LUT and AMVP
US11463685B2 (en) 2018-07-02 2022-10-04 Beijing Bytedance Network Technology Co., Ltd. LUTS with intra prediction modes and intra mode prediction from non-adjacent blocks
US11134243B2 (en) 2018-07-02 2021-09-28 Beijing Bytedance Network Technology Co., Ltd. Rules on updating luts
EP3818702A4 (en) * 2018-07-02 2022-04-27 Tencent America LLC VIDEO CODING METHOD AND APPARATUS
US11134244B2 (en) 2018-07-02 2021-09-28 Beijing Bytedance Network Technology Co., Ltd. Order of rounding and pruning in LAMVR
US11153559B2 (en) 2018-07-02 2021-10-19 Beijing Bytedance Network Technology Co., Ltd. Usage of LUTs
US11153558B2 (en) 2018-07-02 2021-10-19 Beijing Bytedance Network Technology Co., Ltd. Update of look-up tables
CN110740329A (en) * 2018-07-19 2020-01-31 腾讯美国有限责任公司 Video encoding and decoding method and device, computer equipment and storage medium
US11997253B2 (en) 2018-09-12 2024-05-28 Beijing Bytedance Network Technology Co., Ltd Conditions for starting checking HMVP candidates depend on total number minus K
US20210297659A1 (en) 2018-09-12 2021-09-23 Beijing Bytedance Network Technology Co., Ltd. Conditions for starting checking hmvp candidates depend on total number minus k
US20200413044A1 (en) 2018-09-12 2020-12-31 Beijing Bytedance Network Technology Co., Ltd. Conditions for starting checking hmvp candidates depend on total number minus k
US11159787B2 (en) 2018-09-12 2021-10-26 Beijing Bytedance Network Technology Co., Ltd. Conditions for starting checking HMVP candidates depend on total number minus K
CN114584788B (en) * 2018-10-10 2022-09-23 华为技术有限公司 Inter-frame prediction method and device
US11765343B2 (en) 2018-10-10 2023-09-19 Huawei Technologies Co., Ltd. Inter prediction method and apparatus
CN114584788A (en) * 2018-10-10 2022-06-03 华为技术有限公司 Inter-frame prediction method and device
US12132891B2 (en) 2018-10-10 2024-10-29 Huawei Technologies Co., Ltd. Inter prediction method and apparatus
CN116389750A (en) * 2018-12-28 2023-07-04 Jvc建伍株式会社 Moving image decoding device and method, and moving image encoding device and method
US12407814B2 (en) 2018-12-29 2025-09-02 SZ DJI Technology Co., Ltd. Video processing method and device thereof
CN113992910A (en) * 2018-12-29 2022-01-28 北京大学 Video processing method and device
CN113992910B (en) * 2018-12-29 2025-09-23 北京大学 Video processing method and device
CN113287302A (en) * 2019-01-04 2021-08-20 世宗大学校产学协力团 Method and apparatus for image encoding/decoding
US12368880B2 (en) 2019-01-10 2025-07-22 Beijing Bytedance Network Technology Co., Ltd. Invoke of LUT updating
US11589071B2 (en) 2019-01-10 2023-02-21 Beijing Bytedance Network Technology Co., Ltd. Invoke of LUT updating
US11909951B2 (en) 2019-01-13 2024-02-20 Beijing Bytedance Network Technology Co., Ltd Interaction between lut and shared merge list
US11140383B2 (en) 2019-01-13 2021-10-05 Beijing Bytedance Network Technology Co., Ltd. Interaction between look up table and shared merge list
CN113330739A (en) * 2019-01-16 2021-08-31 北京字节跳动网络技术有限公司 Insertion order of motion candidates in LUT
US11962799B2 (en) 2019-01-16 2024-04-16 Beijing Bytedance Network Technology Co., Ltd Motion candidates derivation
CN113330739B (en) * 2019-01-16 2025-01-10 北京字节跳动网络技术有限公司 Insertion order of motion candidates in LUT
US11956464B2 (en) 2019-01-16 2024-04-09 Beijing Bytedance Network Technology Co., Ltd Inserting order of motion candidates in LUT
WO2020147773A1 (en) * 2019-01-16 2020-07-23 Beijing Bytedance Network Technology Co., Ltd. Inserting order of motion candidates in lut
US12401820B2 (en) 2019-03-22 2025-08-26 Beijing Bytedance Network Technology Co., Ltd. Interaction between merge list construction and other tools
US11641483B2 (en) 2019-03-22 2023-05-02 Beijing Bytedance Network Technology Co., Ltd. Interaction between merge list construction and other tools

Similar Documents

Publication Publication Date Title
WO2017043734A1 (en) Method for processing image on basis of inter prediction mode and device therefor
WO2017043816A1 (en) Joint inter-intra prediction mode-based image processing method and apparatus therefor
WO2019112394A1 (en) Method and apparatus for encoding and decoding using selective information sharing between channels
WO2017039117A1 (en) Method for encoding/decoding image and device therefor
WO2018226015A1 (en) Video encoding/decoding method and device, and recording medium storing bit stream
WO2019177354A1 (en) Method and device for encoding/decoding image and recording medium having bitstream stored thereon
WO2018012886A1 (en) Image encoding/decoding method and recording medium therefor
WO2016137149A1 (en) Polygon unit-based image processing method, and device for same
WO2017183751A1 (en) Inter prediction mode-based image processing method and device therefor
WO2019083334A1 (en) Method and device for image encoding/decoding on basis of asymmetric sub-block
WO2018030773A1 (en) Method and apparatus for image encoding/decoding
WO2018097692A2 (en) Method and apparatus for encoding/decoding image, and recording medium in which bit stream is stored
WO2018066867A1 (en) Method and apparatus for encoding and decoding image, and recording medium for storing bitstream
WO2018012851A1 (en) Image encoding/decoding method and recording medium therefor
WO2021015581A1 (en) Method, apparatus, and recording medium for encoding/decoding image by using geometric partitioning
WO2017171107A1 (en) Inter-prediction mode based image processing method, and apparatus therefor
WO2019107927A1 (en) Bidirectional intra prediction method and apparatus
WO2018084339A1 (en) Inter prediction mode-based image processing method and device therefor
WO2017003063A1 (en) Method for processing image based on inter prediction mode and system therefor
WO2015133838A1 (en) Method for encoding/decoding image on basis of polygon unit and apparatus therefor
WO2018034373A1 (en) Image processing method and apparatus therefor
WO2017069505A1 (en) Method for encoding/decoding image and device therefor
WO2017188509A1 (en) Inter prediction mode-based image processing method and apparatus therefor
WO2020184979A1 (en) Method for encoding/decoding image signal, and device therefor
WO2018101700A1 (en) Image encoding/decoding method and device, and recording medium having stored bitstream therein

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

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

Country of ref document: EP

Kind code of ref document: A1