Patent Description:
Recently, demands for a high-resolution and high-quality image have increased in various fields of applications. As an image has higher resolution and higher quality, an amount of data on the image increases more. Accordingly, when image data is transferred using media such as existing wired or wireless broadband lines or image data is stored in existing storage media, the transfer cost and the storage cost increases. In order to effectively transfer, store, and reproduce information on high-resolution and high-quality images, high-efficiency image compressing techniques may be utilized.

Inter prediction and intra prediction may be used to enhance image compression efficiency.

In the inter prediction, pixel values included in a current picture are predicted from previous or subsequent pictures of the current picture. In the intra prediction, pixel values included in a current picture are predicted using pixel information in the current picture.

In addition to the inter prediction and the intra prediction, a weighting value predicting technique for preventing degradation in image quality due to a variation in illumination or the like, an entropy encoding technique of assigning a short code to a symbol with a high appearance frequency and assigning a long code to a symbol with a low appearance frequency, and the like may be used for more efficient processes.

A technical object of the invention is to provide a method and a device for performing an effective prediction.

Another technical object of the invention is to provide a method and a device which may prevent a distortion and enhance compression efficiency in deriving a temporal motion vector predictor in an inter prediction.

Another technical object of the invention is to provide a method and a device which may reduce memory capacity in storing information for deriving a temporal motion vector predictor.

Another technical object of the invention is to provide a method and a device which may reduce a computational load and reduce complexity in storing information for deriving a temporal motion vector predictor.

According to the aspects of the invention, it is possible to enhance prediction efficiency in a process of compressing image data and to improve encoding/decoding performance.

According to the aspects of the invention, it is possible to prevent a distortion and to enhance compression efficiency in deriving a temporal motion vector predictor for an inter prediction.

According to the aspects of the invention, it is possible to reduce memory capacity in storing information for deriving a temporal motion vector predictor.

According to the aspects of the invention, it is possible to reduce a computational load and to reduce complexity in storing information for deriving a temporal motion vector predictor.

The present invention may be variously modified in various forms, and specific embodiments thereof will be described and shown in the drawings. However, the embodiments are not intended for limiting the invention. The terms used in the following description are used to merely describe specific embodiments, but are not intended to limit the invention. An expression of the singular number includes an expression of the plural number, so long as it is clearly read differently. The terms such as "include" and "have" are intended to indicate that features, numbers, steps, operations, elements, components, or combinations thereof used in the following description exist and it should be thus understood that the possibility of existence or addition of one or more different features, numbers, steps, operations, elements, components, or combinations thereof is not excluded.

On the other hand, elements in the drawings described in the invention are independently drawn for the purpose of convenience for explanation of different specific functions in an image encoding/decoding device and does not mean that the elements are embodied by independent hardware or independent software. For example, two or more elements of the elements may be combined to form a single element, or one element may be divided into plural elements. The embodiments in which the elements are combined and/or divided belong to the scope of the invention without departing from the concept of the invention.

Hereinafter, exemplary embodiments of the invention will be described in detail with reference to the accompanying drawings. Like constituents in the drawings will be referenced by like reference numerals and will not be repeatedly described.

<FIG> is a block diagram schematically illustrating an image encoding device (encoder) according to an embodiment of the invention. Referring to <FIG>, an image encoding device <NUM> includes a picture partitioning module <NUM>, a prediction module <NUM>, a transform module <NUM>, a quantization module <NUM>, a rearrangement module <NUM>, an entropy encoding module <NUM>, a dequantization module <NUM>, an inverse transform module <NUM>, a filter module <NUM>, and a memory <NUM>.

The picture partitioning module <NUM> may partition an input picture into at least one process unit. Here, the process unit may be a prediction unit (hereinafter, referred to as a "PU"), a transform unit (hereinafter, referred to as a "TU"), or a coding unit (hereinafter, referred to as a "CU"). In this specification, for the purpose of convenience for explanation, a prediction unit may be expressed by a prediction block, a transform unit may be expressed by a transform block, and a coding unit may be expressed by a coding block.

The prediction module <NUM> includes an inter prediction module that performs an inter prediction process and an intra prediction module that performs an intra prediction process, as described later. The prediction module <NUM> performs a prediction process on the process units of a picture divided by the picture partitioning module <NUM> to create a prediction block. In the prediction module <NUM>, the process unit of a picture may be a CU, a TU, or a PU. It may be determined whether the prediction performed on the corresponding process unit is an inter prediction or an intra prediction, and specific details (for example, a prediction mode) of the prediction methods may be determined. The process unit subjected to the prediction process may be different from the process unit of which the prediction method and the specific details are determined. For example, the prediction method and the prediction mode may be determined by the PU units and the prediction process may be performed by the TU units.

In the inter prediction, a prediction process is performed on the basis of information on at least one of a previous picture and/or a subsequent picture of a current picture to create a prediction block. In the intra prediction, a prediction process is performed on the basis of pixel information of a current picture to create a prediction block.

In the inter prediction, a reference picture is selected for a PU, and a reference block having the same size as the PU may be selected by integer pixel samples. Then, a prediction block in which a residual signal with the current PU is minimized and the motion vector magnitude is minimized is created. On the other hand, a skip mode, a merge mode, an MVP (Motion Vector Prediction), or the like may be used as the intra prediction method. The prediction block may be created in the unit of pixel samples less than an integer pixel such as <NUM>/<NUM> pixel samples and <NUM>/<NUM> pixel samples. Here, the motion vector may also be expressed in the unit of pixel samples less than an integer pixel. For example, luma pixels may be expressed in the unit of <NUM>/<NUM> pixels and chroma pixels may be expressed in the unit of <NUM>/<NUM> pixels.

Information such as an index, a motion vector (for example, a motion vector predictor), and a residual signal of a reference picture selected through the inter prediction is entropy-encoded and is transmitted to a decoder.

When the intra prediction is performed, the prediction mode may be determined in the unit of PU and the prediction process may be performed in the unit of PU. The prediction mode may be determined in the unit of PU and the inter prediction may be performed in the unit of TU.

The prediction modes in the intra prediction include <NUM> directional prediction modes and at least two non-directional modes. The non-directional modes include a DC prediction mode and a planar mode.

In the intra prediction, a prediction block may be produced after a filter is applied to a reference sample. At this time, it may be determined whether a filter should be applied to a reference sample depending on the intra prediction mode and/or the size of a current block. The current block may be a transform unit to be subjected to a prediction process. On the other hand, use of a pixel in this specification means that information the pixel such as a pixel value is used. For the purpose of convenience for explanation, it should be noted that an expression "information of a pixel is used" or "a pixel value is used" may be simply expressed by "a pixel is used". The specific intra prediction method is as described later.

A PU has various sizes and shapes. For example, in case of inter prediction, a PU may have sizes such as 2Nx2N, 2NxN, Nx2N, and NxN. In case of intra prediction, a PU may have sizes such as 2Nx2N and NxN (where N is an integer). The PU with a size of NxN may be set to be applied to only a specific case. For example, the PU with a size of NxN may be set to be used for only a smallest coding unit or may be set to be used for only intra prediction. In addition to the Pus with the above-mentioned sizes, Pus having sizes such as NxmN, mNxN, 2NxmN, and mNx2N (where m<<NUM>) may be additionally defined and used.

Residual values (a residual block or a residual signal) between the produced prediction block and the original block are input to the transform module <NUM>. The prediction mode information, the motion vector information, and the like used for the prediction are encoded along with the residual values by the entropy encoding module <NUM> and are transmitted to the decoder.

The transform module <NUM> performs a transform process on the residual block in the unit of TU and outputs transform coefficients. The transform unit in the transform module <NUM> may be a TU and may have a quad tree structure. The size of the transform unit may be determined within a predetermined largest and smallest size range. The transform module <NUM> may transform the residual block using DCT (Discrete Cosine Transform) and/or DST (Discrete Sine Transform).

The quantization module <NUM> may quantize the residual values transformed by the transform module <NUM> and may output quantization coefficients. The values calculated by the quantization module <NUM> may be supplied to the dequantization module <NUM> and the rearrangement module <NUM>.

The rearrangement module <NUM> may rearrange the quantization coefficients supplied from the quantization module <NUM>. By rearranging the quantization coefficients, it is possible to enhance the encoding efficiency in the entropy encoding module <NUM>. The rearrangement module <NUM> may rearrange the quantization coefficients in the form of a two-dimensional block to the form of a one-dimensional vector through the use of a coefficient scanning method. The rearrangement module <NUM> may enhance the entropy encoding efficiency in the entropy encoding module <NUM> by changing the order of coefficient scanning on the basis of stochastic statistics of the coefficients transmitted from the quantization module.

The entropy encoding module <NUM> performs an entropy encoding process on the quantization coefficients rearranged by the rearrangement module <NUM>. Examples of the entropy encoding method include an exponential golomb method, a CAVLC (Context-Adaptive Variable Length Coding) method, and a CABAC (Context-Adaptive Binary Arithmetic Coding) method. The entropy encoding module <NUM> may encode a variety of information such as residual coefficient information and block type information of a coding unit, prediction mode information, dividing unit information, prediction unit information, transfer unit information, motion vector information, reference picture information, block interpolation information, and filtering information transmitted from the rearrangement module <NUM> and the prediction module <NUM>.

The entropy encoding module <NUM> may give a predetermined change to a parameter set or syntax to be transmitted, if necessary.

The dequantization module <NUM> dequantizes the values quantized by the quantization module <NUM>. The inverse transform module <NUM> inversely transforms the values dequantized by the dequantization module <NUM>. The residual values genrateed by the dequantization module <NUM> and the inverse transform module <NUM> are merged with the prediction block predicted by the prediction module <NUM> to create a reconstructed block.

The filter module <NUM> applies a deblocking filter, an ALF (Adaptive Loop Filter), an SAO (Sample Adaptive Offset) to the reconstructed picture.

The deblocking filter removes a block distortion generated at the boundary between blocks in the reconstructed picture. The ALF performs a filtering process on the basis of the result values of the comparison of the original picture with the reconstructed picture of which the blocks are filtered by the deblocking filter. The ALF may be applied only when high efficiency is necessary. The SAO reconstructs offset differences between the residual blocks having the deblocking filter applied thereto and the original picture and is applied in the form of a band offset, an edge offset, or the like.

On the other hand, the filter module <NUM> may not perform a filtering process on a reconstructed block used for the inter prediction.

The memory <NUM> stores the reconstructed block or picture calculated by the filter module <NUM>. The reconstructed block or picture stored in the memory <NUM> is supplied to the prediction module <NUM> when performing the inter prediction.

<FIG> is a block diagram schematically illustrating an image decoding device according to an embodiment of the invention. Referring to <FIG>, an image decoding device <NUM> includes an entropy decoding module <NUM>, a rearrangement module <NUM>, a dequantization module <NUM>, an inverse transform module <NUM>, a prediction module <NUM>, a filter module <NUM>, and a memory <NUM>.

When an image bitstream is input from the image encoding device, the input bitstream is decoded on the basis of the order in which image information is processed by the image encoding device.

For example, when the image encoding device uses a variable length coding (hereinafter, referred to as "VLC") method such as the CAVLC to perform the entropy encoding process, the image decoding module <NUM> may realize the same VLC table as used in the image encoding device and may perform the entropy decoding process. When the image encoding device uses the CABAC to perform the entropy encoding process, the entropy decoding module <NUM> may perform the entropy decoding process using the CABAC to correspond thereto.

Information for creating a prediction block out of the information decoded by the entropy decoding module <NUM> is supplied to the prediction module <NUM>, and the residual values entropy-decoded by the entropy decoding module are input to the rearrangement module <NUM>.

The rearrangement module <NUM> rearranges the bitstream entropy-decoded by the entropy decoding module <NUM> on the basis of the rearrangement method in the image encoding device. The rearrangement module <NUM> reconstructs and rearranges coefficients expressed in the form of one-dimensional vector into coefficients of a two-dimensional block form. The rearrangement module <NUM> is supplied with information associated with the coefficient scanning performed by the encoding module and may perform the rearrangement using a method of inversely scanning the coefficients on the basis of the scanning order in which the scanning is performed by the corresponding encoding module.

The dequantization module <NUM> performs dequantization on the basis of the quantization parameters supplied from the encoder and the rearranged coefficient values of the block.

The inverse transform module <NUM> performs the inverse DCT and inverse DST of the DCT and DST, which has been performed by the transform module of the image encoding device, on the quantization result from the image encoding device. The inverse transform is performed on the basis of a transfer unit or a division unit of a picture determined by the image encoding device. The transform module of the image encoding device selectively performs the DCT and DST depending on plural information elements such as the prediction method, the size of the current block, and the prediction direction, and the inverse transform module <NUM> of the image decoding device performs the inverse transform on the basis of the transform information on the transform performed by the transform module of the image encoding device.

The prediction module <NUM> creates a prediction block on the basis of prediction block creation information supplied from the entropy decoding module <NUM> and the previously-decoded block and/or picture information supplied from the memory <NUM>. The reconstructed block may be derived using the prediction block generated by the prediction module <NUM> and the residual block supplied from the inverse transform module <NUM>. When the prediction mode of a current PU is an intra prediction mode (intra mode), an intra prediction process of creating a prediction block on the basis of pixel information in the current picture may be performed.

When the prediction mode of a current PU is an inter prediction mode (inter mode), an inter prediction process may be performed on the current PU on the basis of information included in at least one of a previous picture or a subsequent picture of the current picture. At this time, motion information necessary for the inter prediction of the current PU supplied from the image encoding device, for example, information on motion vectors, reference picture indices, and the like, may be derived from a skip flag, a merge flag, and the like received from the encoder.

The reconstructed block and/or picture are supplied to the filter module <NUM>. The filter module <NUM> performs a deblocking filtering process, an SAO (Sample Adaptive Offset) process, and/or an adaptive loop filtering process on the reconstructed block and/or picture.

The memory <NUM> stores the reconstructed picture or block for use as a reference picture or a reference block and supplies the reconstructed picture to the output module.

In case of the inter prediction mode, the decoder and the encoder derive the motion information of a current block and perform the inter prediction on the current block on the basis of the derived motion information.

<FIG> is a flowchart schematically illustrating an example of a method of deriving a motion vector when an AMVP (Advanced Motion Vector Predictor) is applied to the inter prediction mode.

Referring to <FIG>, the encoder and the decoder may derive a motion vector predictor (hereinafter, referred to as "MVP") candidate list of a current block (S310). The MVP represents a predicted value of a motion vector of the current block.

The encoder and the decoder may generate an MVP candidate list using motion vectors of available neighbouring blocks adjacent to the current block and/or available blocks (hereinafter, referred to as "Col block" (co-located block) for the purpose of convenience for explanation) out of blocks of reference pictures co-located with the current block.

A specific method of creating the MVP candidate list will be described later.

In this specification, a block adjacent to a current block is defined as a "neighbouring block" for the purpose of convenience for explanation.

The encoder and the decoder may select the MVP of the current block out of the MVP candidates included in the MVP candidate list.

The encoder may select the optimal MVP of the current block by applying motion vector competition (MVC) on the MVP candidates included in the MVP candidate list. When an MVP is selected, the encoder transfers an MVP index to the decoder using a bitstream. The MVP index is an index indicating the MVP of the current block and is selected from the MVP candidates included in the MVP candidate list.

The decoder receives the MVP index from the encoder. The decoder selects the MVP of the current block out of the MVP candidates included in the MVP candidate list using the received MVP index.

The decoder may derive a motion vector of the current block using the selected MVP (S330).

When the MVP of the current block is selected, the encoder calculates a difference between the motion vector of the current block and the MVP. The difference between the motion vector and the MVP is referred to as a motion vector difference (hereinafter, referred to as "MVD").

The encoder may transfer information on the MVD instead of the motion vector to the decoder. In this case, as the MVD becomes smaller, the amount of information transferred from the encoder to the decoder may become smaller.

The decoder receives the information on the MVD from the encoder. When the MVP is selected of the current block is selected, the decoder adds the MVD to the selected MVP to calculate the motion vector of the current block.

<FIG> is a conceptual diagram schematically illustrating an example of a method of creating an MVP candidate list.

In this specification, for the purpose of convenience for explanation, a candidate group including a left-bottom neighbouring block A<NUM> <NUM> which is a neighbouring block at the left-bottom corner of a current block <NUM> and a left block A<NUM> <NUM> which is located at the bottom out of the left neighbouring blocks of the current block <NUM> is defined as a left candidate group. A candidate group including a top-right neighbouring block B<NUM> <NUM> which is a neighbouring block at the top-right corner of the current block <NUM>, a right neighbouring block B<NUM> <NUM> which is located on the rightmost side out of the top neighbouring blocks of the current block <NUM>, and a top-left block B<NUM> <NUM> which is a neighbouring block at the top-left corner of the current block <NUM> is defined as a top candidate group.

The encoder and the decoder selects one MVP candidate from the left candidate group (A<NUM> and A<NUM>). The MVP candidate selected from the left candidate group is defined as MVA. For example, the encoder and the decoder may select the motion vector of the first block, which has the same reference picture index as the current block and which is available, as the MVP candidate MVA of the current block while scanning the blocks included in the left candidate block in the order of A<NUM>→A<NUM>.

The encoder and the decoder also may select one MVP candidate from the top candidate group (B<NUM>, B<NUM>, and B<NUM>). The MVP candidate selected from the top candidate group is defined as MVs. For example, the encoder and the decoder select the motion vector of the first block, which has the same reference picture index as the current block and which is available, as the MVP candidate MVB of the current block while scanning the blocks included in the top candidate group in the order of B<NUM>→B<NUM>→B<NUM>.

The encoder and the decoder may select the motion vector of a Col block COL <NUM> in a reference picture as the MVP candidate of the current block. Here, the motion vector of the Col block <NUM> is expressed by mvCol.

In the above-mentioned embodiment, the MVP candidate selected from the left candidate group and the MVP candidate selected from the top candidate are referred to as spatial motion vector predictor (hereinafter, referred to as "SMVP"). The MVP candidate selected using the Col block in the reference picture is referred to as a temporal motion vector predictor (hereinafter, referred to as "TMVP"). Therefore, the MVP candidate list includes the SMVP and/or the TMVP.

When there are overlapping candidates out of the MVP candidates selected by the above-mentioned method, the encoder and the decoder may remove the other candidates other than the highest-ranked candidate out of the overlapping candidates.

As described above, the TMVP as well as the SMVP is used for the inter prediction of the current block.

<FIG> is a flowchart schematically illustrating an example of a method of deriving a TMVP for an inter prediction in a decoder. The operations of the decoder is illustrated in <FIG> for the purpose of convenience for explanation, but an encoder also performs the same operations as the decoder to perform an inter prediction using the same TMVP candidate as in the decoder. Therefore, the operations of the decoder described with reference to <FIG> may be similarly applied to the decoder.

Referring to <FIG>, the decoder first specifies a co-located picture (hereinafter, referred to as "colPic") including a col block (co-located block) or a col partition (co-located partition) (S510).

The decoder may specify the colPic on the basis of information on a slice type and information on from what reference picture list the colPic is selected.

For example, when the slice type of a current block is B and a reference picture is not selected from L0, the colPic is specified from L1.

Pictures used for encoding and decoding an image may be classified into an I picture, a P picture, and a B picture.

The I picture is a picture which is independently encoded using its own picture regardless of the previous and subsequent pictures thereof. Temporal prediction is not applied to the I picture and only intra information is used for the encoding thereof. The P picture is a picture which may be encoded by unidirectional inter prediction using a single reference picture. The P picture requires one reference picture list, which is called reference picture list <NUM> (L0). The inter prediction using a reference picture selected from L0 is also called L0 prediction. The L0 prediction is used mainly for forward prediction. The intra prediction or the L0 prediction may be performed for the P picture.

The B picture is a picture which may be encoded through forward, backward, or bidirectional inter prediction using two reference pictures. The B picture requires two reference picture lists, which are called reference picture list <NUM> (L0) and reference picture list <NUM> (L1). As described above, the inter prediction using a reference picture selected from L0 is called L0 prediction. The L0 prediction is used mainly for forward prediction. The inter prediction using a reference picture selected from L1 is called L1 prediction. The L1 prediction is used mainly for backward prediction. The inter prediction using two reference pictures selected from L0 and L1 is called bi prediction.

The intra prediction, the L0 prediction, the L1 prediction, or the bi prediction may be performed for the B picture. Two pieces of motion information may be used for the B picture. Therefore, the forward prediction may be performed for the B picture using two previous reference pictures, the backward prediction may be performed using two subsequent reference pictures, and the bi prediction may be performed using one previous reference picture and one subsequent reference picture. The B picture on which the bi prediction may be performed requires two reference picture lists of L0 and L1.

The features of the I picture, the P picture, and the B picture may be defined in the unit of slices, not in the unit of pictures. For example, an I slice having the feature of the I picture in the unit of slices, a P slice having the feature of the P picture, and a B slice having the feature of the B picture may be defined.

When the slice type of a current block is B and the colPic is selected from L0, or when the slice type of a current block is P, the colPic may be selected from L0.

The decoder may specify a co-located prediction block colPu to be used for prediction of a current block from the selected colPic (S520). The decoder may use information of the colPu specified in the colPic as the TMVP in inter prediction of a current block.

<FIG> is a diagram schematically illustrating a method of specifying a colpu. Referring to <FIG>, the position of a pixel sample STL located at the top-left corner of a col block <NUM>, corresponding to a current block, in a colPic (not shown) is specified as (xP, yP). Here, the current block and the col block may be a PU.

When the width of the current block is defined as nPSW and the height of the current block is defined as nPSH, the position of a pixel sample SRB located at the right-bottom corner of the col block <NUM> is specified as (xPRb, yPRb). Therefore, the size of the current block (col block) is specified by SRB. SRB serves as a positioning pixel as described later.

When STL and SRB belong to the same LCU (the largest CU), a prediction block covering the top-left corner of a predetermined motion data storage unit to which SRB belongs in the colPic is specified as a colPu (co-located prediction unit). For example, SRB serves as a pixel for positioning the position of the colPu.

The motion data storage unit is a unit for storing motion information used for prediction in the inter prediction. A block with a predetermined size may be set as a motion data storage unit and one piece of motion information may be stored for each motion data storage unit. For example, when one value is designated and stored for every NxN samples (where N is an integer) in a colPic and motion information of a specific block in the colPic is used for the inter prediction, motion information of the motion data storage unit covering the specific block may be used. The motion data storage unit may be set as a sample block having a specific size such as 4x4 samples, 6x6 samples, 8x8 samples, 12x12 samples, 16x16 samples, 32x32 samples, and 64x64 samples. The motion information may be stored in the unit of sample block having the set size.

For example, when the motion data storage unit is a 16x16 sample block, the position of ((xPRb>><NUM>)<<<NUM>, (yPRb>><NUM>)<<<NUM>) may be specified as the position of the colPu covering the top-left corner of the motion data storage unit to which SRB belongs.

When STL and SRB do not belong to the same LCU, the colPu may be specified on the basis of a sample SCTR located at the center (specifically, at the center right-bottom corner specified by <NUM>/<NUM> of the col block size) of the col block. Therefore, SCTR also serves as a positioning pixel for positioning the colPu. The position (xPCtr, yPCtr) of the SCTR may be specified as (xP+(nPSW>><NUM>), yP+(nPSH>><NUM>)). In this case, the prediction block covering the top left corner of the motion data storage unit to which SCTR belongs may be specified as the colPu.

In this case, when the motion data storage unit is a 16x16 sample block, the position ((xPCtr> ><NUM>)< <<NUM>, (yCtr>><NUM>)<<<NUM>) may be specified as the position of the colPu.

On the other hand, the position (xPCol, yPCol) of the colPu in the colPic may be specified as the position of the top-left sample of the colPu with respect to the position of the top-left sample of the colPic.

The decoder may derive information on a temporal motion vector and availability of a reference list to be used for prediction of a current block on the basis of information of the colPu (S530).

For example, when the colPu is coded in an intra prediction mode, when the colPu is unavailable, and when the colPic is set so as not to be used for the TMVP (Temporal Motion Vector Predictor), the temporal motion vector mvCol may be set to <NUM> and the reference list may be set to be unavailable.

At this time, availableFlagLXCol (where X is <NUM> or <NUM>) may be used as information indicating the availability of the reference list. It is determined that the reference picture list is available when the value of availableFlagLXCol is <NUM>, and it is determined that the reference picture list is unavailable when the value of availableFlagLXCol is <NUM>.

Except when the colPu is not coded in an intra prediction mode, when the colPu is unavailable, and when the colPic is set so as not to be used for the TMVP (Temporal Motion Vector Predictor), that is, when the reference picture list is available, the temporal motion vector mvCol, the reference list refidxCol, and the reference list identifier listCol as the motion information may be derived as follows.

When the utilization of L0 for the colPu is determined and it is determined that L0 is not utilized, the value of the temporal motion vector mvCol and the value of reference index refIdxCol may be specified using L1 as a reference list and using data of the colPu. For example, the value of temporal motion vector mvCol may be set to MvL1[xPCol][yPCol] and the value of reference index refIdxCol may be set to refIdxL1[xPCol][yPCol].

When the utilization of L0 is determined and it is determined that L0 is utilized but L1 is not utilized, the value of the temporal motion vector mvCol and the value of the reference index refIdxCol may be specified using L0 as a reference list and using data of the colPu. For example, the value of temporal motion vector mvCol may be set to MvL0[xPCol][yPCol] and the value of reference index refIdxCol may be set to refIdxL0[xPCol][yPCol].

When it is determined that both of L0 and L1 are utilized, temporal motion information may be determined by comparing a picture order count of a current picture with a picture order count of pictures in each reference picture list. For example, when the picture order count of the current picture is equal to or larger than the picture order count of the pictures in the reference picture lists, the motion vector and the reference index indicated by the position (xPCol, yPCol) of the colPu in the reference picture list used to derive the temporal motion information may be set as the values of mvCol and refIdxCol, respectively.

When the picture order count of at least one picture in the reference picture lists is larger than the picture order count of the current picture, the motion vector and the reference index indicated by the position (xPCol, yPCol) of the colPu in the corresponding reference picture list may be set as the values of mvCol and refIdxCol, respectively, using the reference picture list indicated by signaling from the encoder.

The decoder may use the TMVP, which has the temporal motion vector and the reference picture index derived as motion information, as an MVP candidate. Here, when the distance between the colPic and the reference picture of the colPic is equal to the distance between a current picture and the reference picture of the current picture, the derived mvCol itself may be used as a temporal motion vector. When the distance between the colPic and the reference picture of the colPic is not equal to the distance between a current picture and the reference picture of the current picture, the derived mvCol may be scaled and used as a temporal motion vector.

As described above, the motion information of the colPu used in the TMVP may be stored by a predetermined motion data storage unit. That is, the colPu may be set by a motion data storage unit and the motion information of the colPu may be used as the motion information of blocks belonging to the corresponding motion data storage unit.

This is intended to reduce memory capacity for storing the motion information. The size of N<NUM>xN<NUM> (where N<NUM> and N<NUM> are integers) block serving as a motion data storage unit may be set in advance or may be signaled from the encoder.

<FIG> is a diagram schematically illustrating a method of storing motion information. <FIG> shows an example where blocks B0 to B15 which are minimum units for setting motion information are set as a single motion data storage unit.

In this specification, the minimum unit for setting motion information is expressed a motion data block for the purpose of convenience for explanation. The motion data block may be a CU, a PU, a TU, or a unit other than the CU, the TU, and the PU. The motion data block may correspond to a block specified by STL, SRB, and SCTR described with reference to <FIG>. When the motion data block is a block of 4x4 samples, the motion data storage unit <NUM> is a block of 16x16 samples.

In <FIG>, the motion vector of each motion data block BI (where I=<NUM>,. , <NUM>) is specified as (XI, YI).

Whether to compress and store motion information by storage units and what storage unit to use may be set in advance or may be signaled from the encoder. When such information is signaled from the encoder, a flag (motion_vector_buffer_comp_flag) representing whether to compress and store motion information by storage units and compression ratio information (motion_vector_buffer_comp_ratio) on how many motion data blocks (or how many pixels) to set as a single storage unit may be used.

For example, when the value of motion_vector _buffer _comp_flag is <NUM>, motion information may be compressed and stored by the storage units. When the value of motion_vector_buffer_comp_ratio is <NUM>, 4x4 motion data blocks may be used as a single motion data storage unit as shown in <FIG>.

The decoder may first apply an adaptive loop filter thereto and then may use the motion vector (X0, Y0) of the left-uppermost motion data block B0 in the motion data storage unit shown in <FIG> may be used as the representative value of the motion data storage unit <NUM>. That is, the motion vector value of (X0, Y0) is assigned to the other <NUM> motion data blocks B1 to B15.

For the purpose of convenience for explanation in this specification, a motion data block having the motion vector stored as the representative motion vector of the motion data storage unit is referred to as a representative motion data block. When the motion data block is a PU, the representative motion data block may correspond to the colPu described with reference to <FIG>.

When the block B0 which is the representative motion data block is a block not available for the inter prediction, for example, a block encoded in an intra prediction mode (hereinafter, referred to as "intra block" for the purpose of convenience for explanation), a zero motion vector (<NUM>, <NUM>) is assigned to the <NUM> motion data blocks.

In other words, when the block B0 which is the first motion data block in the motion data storage unit <NUM> is not intra-coded, the motion vector (X0, Y0) of the motion data block B0 is stored as the representative motion vector of the <NUM> motion data blocks B0 to B15 in a motion vector buffer for deriving the temporal motion vector (TMVP). When the motion data block B0 is intra-coded, the motion vector (<NUM>, <NUM>) is stored as the representative motion vector of the motion data storage unit <NUM> in the motion vector buffer for deriving the TMVP.

When motion information is compressed and stored as described above, the motion information of the left-uppermost block B0 is assigned to the motion data blocks in the motion data storage unit.

There is a problem in that encoding efficiency is lowered by collectively assigning the motion information of the motion data block B0 to the other motion data blocks in the motion data storage unit. For example, when the block B0 is an intra block and a block encoded in an inter prediction mode (hereinafter, referred to as an "inter block" for the purpose of convenience for explanation) is present in the other blocks in the motion data storage unit, (<NUM>, <NUM>) is stored as the representative motion vector of the motion data storage unit.

A distortion may be caused by assigning the same motion vector without considering the reference indices of the motion data blocks in the motion data storage unit.

<FIG> is a diagram schematically illustrating an example where motion vector memory compression (motion vector storage reduction) is performed without considering the reference indices. Here, the motion vector storage reduction means that a single motion vector (representative motion vector) or a single piece of motion information (representative motion information) is assigned to the motion data blocks in the motion data storage unit and the result is stored and used, as described above.

Referring to <FIG>, the same motion vector (X0, Y0) is assigned to the motion information, that is, the motion vector (XI, YI) and the reference index ref_idxI (where I=<NUM>,. , <NUM>), of the motion data blocks B0 to B15 in the motion data storage unit <NUM> regardless of the value of ref_idxI by the motion vector memory compression.

Therefore, it is necessary to consider a method of storing motion information used to derive the TMVP and capable of solving the above-mentioned problems.

The method of storing motion information used to derive the TMVP according to the invention will be specifically described below with reference to embodiments shown in the drawings.

In this embodiment, when NxN (where N is an integer) motion data blocks are used as a single motion data storage unit, a motion vector of a motion data block located at another specific position instead of the motion vector of the motion data block located at the left-top corner in the motion data storage unit is stored and used as the representative motion vector of the motion data storage unit.

Here, the motion vector to be used as the representative motion vector may be any one of (<NUM>) the motion vector of a motion data block located at the right-top (RT) corner, (<NUM>) the motion vector of a motion data block located at the bottom-left (BL) corner, (<NUM>) the motion vector of a motion data block located at the bottom-right (BR) corner, (<NUM>) the motion vector of the left-top (Center_LT) motion data block of the motion data blocks located at the center, (<NUM>) the motion vector of the right-top (Center_RT) motion data block of the motion data blocks located at the center, (<NUM>) the motion vector of the bottom-left (Center_BL) motion data block of the motion data blocks located at the center, and (<NUM>) the motion vector of the bottom-right (Center_BR) motion data block of the motion data blocks located at the center in the motion data storage unit.

The decoder may assign the motion vector of the motion data block specified out of (<NUM>) to (<NUM>) instead of the motion vector of the motion data block located at the top-left corner in the motion data storage unit to the motion data blocks and may use the assigned motion vector to derive the TMVP.

<FIG> is a diagram schematically illustrating motion information of motion data blocks when 4x4 motion data blocks are set as a single motion data storage unit in a system to which the invention is applied.

Referring to <FIG>, motion vectors (XI, YI) of motion data blocks BI (where I=<NUM>, <NUM>,. , <NUM>) are shown. In this case, a motion data block other than the motion data block B0 may be designated as the representative motion data block and the motion vector of the designated representative motion data block may be used as the motion vector of the motion data storage unit <NUM>.

Here, what motion data block to designate as the representative motion data block may be determined in advance or may be signaled from the encoder.

For example, when the motion data block B3 located at the right-top (RT) corner in the motion data storage unit <NUM> is designated as the representative motion data block, the motion vector of the motion data storage unit <NUM> is (X3, Y3). When the motion data block B12 located at the bottom-left (BL) corner in the motion data storage unit <NUM> is designated as the representative motion data block, the motion vector of the motion data storage unit <NUM> is (X12, Y12). When the motion data block B15 located at the bottom-right (BR) corner in the motion data storage unit <NUM> is designated as the representative motion data block, the motion vector of the motion data storage unit <NUM> is (X15, Y15). When the motion data block B5 located at the central left-top (Center_LT) corner in the motion data storage unit <NUM> is designated as the representative motion data block, the motion vector of the motion data storage unit <NUM> is (X5, Y5). When the motion data block B6 located at the central right-top (Center_RT) corner in the motion data storage unit <NUM> is designated as the representative motion data block, the motion vector of the motion data storage unit <NUM> is (X6, Y6). When the motion data block B9 located at the central bottom-left (Center_BL) corner in the motion data storage unit <NUM> is designated as the representative motion data block, the motion vector of the motion data storage unit <NUM> is (X9, Y9). When the motion data block B10 located at the central bottom-right (Center_BR) corner in the motion data storage unit <NUM> is designated as the representative motion data block, the motion vector of the motion data storage unit <NUM> is (X10, Y10).

On the other hand, the position of the motion data block having motion information used as the representative value in motion information compression and storage may be adaptively determined depending on the unit to be compressed, that is, the size of the motion data storage unit. For example, when the unit to be compressed is determined and transferred by the encoder, the position of the block (motion data block) having the motion vector (motion information) used for compression may be determined depending on the value of motion_vector _buffer _comp_ratio.

Specifically, when the unit to be compressed is determined by the encoder and is transferred to the decoder and the value of motion_vector_buffer_comp_ratio is <NUM>, the motion vector of the motion data block located at the bottom-right corner may be used as the motion vector of the corresponding motion data storage unit (the motion data block located at the bottom-right corner may be used as the representative motion data block). When the value of motion_vector_buffer_comp_ratio is <NUM> or <NUM>, the motion vector of the motion data block located at the central bottom-right (Center_BR) corner may be used as the motion vector of the corresponding motion data storage unit (the motion data block located at the central bottom-right corner may be used as the representative motion data block).

Here, the position of the representative motion data block which is determined depending on the units to be compressed, that is, various sizes of the motion data storage unit is not limited to the above-mentioned position.

This embodiment provides a method of preventing a zero motion vector from being stored as the representative motion vector because the representative motion data block from which the representative motion vector value is designated is an intra block.

In this embodiment, it is determined whether a block is an intra block or an inter block by scanning the motion data blocks in the motion data storage unit in a predetermined order, and the motion vector of the first motion data block detected as the inter block is used as the representative motion vector of the motion data storage unit.

<FIG> is a diagram schematically illustrating an order for searching for a prediction mode in which a motion data block in a motion data storage unit is coded according to the invention.

<FIG> shows an example where a motion data storage unit <NUM> includes 4x4 motion data blocks B0 to B15. In the motion data blocks BI (where I=<NUM>, <NUM>,. , <NUM>) in <FIG>, I represents the scan order.

In the example shown in (a) of <FIG>, the motion data block located at the top-left corner in the motion data storage unit <NUM> is designated as the first block B0 for scanning the motion data blocks, and it is determined whether it is an inter block or an intra block (or whether it is available, that is, whether a motion vector is stored in L0 when a motion vector for L0 is stored) in the raster scan order.

In the example shown in (b) of <FIG>, the motion data block located at the central bottom-right corner in the motion data storage unit <NUM> is set as the first block B0 to be scanned and the scanning is performed in the spiral clockwise direction.

In the example shown in (c) of <FIG>, the motion data block located at the central top-left corner in the motion data storage unit <NUM> is set as the first block B0 to be scanned and the scanning is performed in the spiral clockwise direction.

(d) to (m) of <FIG> show embodiments for reducing a computational load in consideration of the computational load based on the scanning.

In the example shown in (d) of <FIG>, only motion data blocks located at the center of the motion data storage unit <NUM> are scanned, the motion data block located at the central bottom-right corner is set as the first block B0 to be scanned and the scanning is performed in the clockwise direction.

In the example shown in (e) of <FIG>, only motion data blocks located at the center of the motion data storage unit <NUM> are scanned, the motion data block located at the central top-left corner is set as the first block B0 to be scanned and the scanning is performed in the clockwise direction.

In the example shown in (f) of <FIG>, only motion data blocks located at the center of the motion data storage unit <NUM> are scanned and the scanning is performed in the order of the motion data block (B0) located at the central bottom-right corner → the motion data block (B1) located at the central bottom-left corner → the motion data block (B2) located at the central top-right corner → the motion data block (B3) located at the central top-left corner.

In the example shown in (g) of <FIG>, only motion data blocks located at the center of the motion data storage unit <NUM> are scanned and the scanning is performed in the order of the motion data block (B0) located at the central bottom-right corner → the motion data block (B1) located at the central top-right corner → the motion data block (B2) located at the central bottom-left corner → the motion data block (B3) located at the central top-left corner.

In the example shown in (h) of <FIG>, only motion data blocks located at the center of the motion data storage unit <NUM> are scanned and the scanning is performed in the order of the motion data block (B0) located at the central bottom-right corner → the motion data block (B1) located at the central top-left corner → the motion data block (B2) located at the central top-right corner → the motion data block (B3) located at the central top-left corner.

In the example shown in (i) of <FIG>, only motion data blocks located at the center of the motion data storage unit <NUM> are scanned and the scanning is performed in the order of the motion data block (B0) located at the central bottom-right corner → the motion data block (B1) located at the central top-left corner → the motion data block (B2) located at the central bottom-left corner → the motion data block (B3) located at the central top-right corner.

In the example shown in (j) of <FIG>, only motion data blocks located at the corners of the motion data storage unit <NUM> are scanned, the motion data block located at the central top-left corner is set as the first block B0 to be scanned and the scanning is performed in the clockwise direction.

In the examples shown in (k) to (m) of <FIG>, the scanning unit is set to double the scanning unit set in (a) to (c) of <FIG> and the scanning is performed. For example, when each motion data block in (a) to (c) of <FIG> is a block of 4x4 samples, the scanning is performed in the unit of blocks of 8x8 samples in (k) to (m) of <FIG>. Therefore, the first motion data block located at the top-left corner in the block of 8x8 samples is scanned.

When the motion data storage unit <NUM> includes 4x4 motion data blocks, the top-left motion data block in each of 2x2 motion data blocks scanned in the clockwise direction from the top-left 2x2 motion data blocks in the example shown in (k) of <FIG>. For example, the scanning order is B0 → B1 → B2 → B3 as shown in the drawing.

In the example shown in (I) of <FIG> the top-left motion data block in each of 2x2 motion data blocks scanned in the counterclockwise direction from the bottom-left 2x2 motion data blocks. For example, the scanning order is B0 → B1 → B2 → B3 as shown in the drawing.

In the example shown in (m) of <FIG> the top-left motion data block in each of 2x2 motion data blocks scanned in the zigzag direction from the bottom-left 2x2 motion data blocks. For example, the scanning order is B0 → B1 → B2 → B3 as shown in the drawing.

In the embodiment shown in <FIG>, the decoder uses the motion vector of the motion data block first detected to be encoded in an inter prediction mode as the representative motion vector of the corresponding motion data storage unit <NUM>.

In Embodiments <NUM> and <NUM>, representative motion information of a motion data storage unit may be stored on the basis of the information of an intra block. For example, when the motion data block located at a position to be referred to in Embodiment <NUM> is an intra block (or when the motion vector of a target reference list is not available) and when all the motion data blocks of the motion data storage unit are intra blocks (or when the motion vector of a target reference list is not available), the zero motion vector (<NUM>, <NUM>) is used as the representative motion vector of the motion data storage unit.

This embodiment provides a method of storing motion information with reference to neighbouring blocks of a motion data storage unit of a current block (hereinafter, referred to as a "current motion data storage unit").

<FIG> is a diagram schematically illustrating a method of storing motion information of a current motion data storage unit using neighbouring blocks of the current motion data storage unit according to the invention. <FIG> shows an example where a motion data storage unit includes 4x4 motion data blocks.

Referring to <FIG>, when all motion data blocks B0 to B15 in a current motion data storage unit <NUM> are intra blocks, motion information of the current motion data storage unit <NUM> is stored and used using the motion information of the neighbouring blocks B16 to B35 of the current motion data storage unit <NUM>. At this time, the neighbouring blocks B16 to B35 may be motion data blocks.

When only one block of the neighbouring blocks B16 to B35 is an inter block, the motion information of the block is stored and used as the motion information of the current motion data storage unit <NUM> including the intra blocks.

At this time, when only one block of the neighbouring blocks B16 to B35 is an inter block having a motion vector of a target reference list, the motion information of the block may be stored and used as the motion information of the current motion data storage unit <NUM> including the intra blocks.

When two or more blocks of the neighbouring blocks B16 to B35 are inter blocks, the representative motion vector of the current motion data storage unit may be determined using any one method of (<NUM>) to (<NUM>) described below.

For example, a difference between the bottom-right pixel of the block B16 and the top-left pixel of the block B0 is calculated. Differences between the eight bottom pixels of the block B17 and the neighboring intra block B0 (or blocks in which the motion vectors of a target reference list is not available) are calculated and the resultant value is divided by <NUM> to calculate the average pixel difference. The pixel differences between the neighbouring blocks and the intra blocks (or blocks in which the motion vectors of a target reference list is not available) in the current motion data storage unit are calculated, and the motion information of the neighbouring block having the smallest difference is used as the motion information of the current motion data storage unit. When there are neighbouring blocks having the same pixel difference, a priority order may be given thereto in advance. For example, when the neighbouring blocks are ranked as shown in <FIG>, the motion information of the neighbouring block having the lower rank may be used as the motion information of the current motion data storage unit.

On the other hand, when all the neighbouring blocks of the current motion data storage unit are intra blocks (or when all the neighbouring blocks are not available), the motion vector of the current motion data storage unit may be set to a zero vector.

This embodiment provides a method of designating and storing a representative value for reference indices as well as the motion vector of the motion data storage unit in motion information compression and storage (motion information storage reduction).

For example, in Embodiments <NUM> to <NUM>, the memory compression or the storage reduction of storing only one motion vector by the motion data storage units is described above, but a method of designating a representative reference index value of a motion data storage unit and storing the designated representative reference index value along with the motion vector value will be described in Embodiment <NUM>.

Similarly to reduction of a memory buffer for storing the motion vectors in Embodiments <NUM> to <NUM>, the memory buffer for storing the reference indices may be reduced in Embodiment <NUM>.

Specifically, in this embodiment, when a representative motion data block of a motion data storage unit is determined, the reference index as well as the motion vector of the representative motion data block is assigned to the other motion data blocks in the motion data storage unit. The decoder may use representative motion information (the motion information of the representative motion data block) as the motion information of the blocks in the motion data storage unit. Therefore, it is possible to solve the problem with a distortion because the motion vector value of the representative motion data block is assigned to the motion vectors of the motion data blocks of the motion data storage unit, but the reference indices are maintained.

<FIG> is a diagram schematically illustrating a state in which motion information memory compression (motion information storage reduction) is performed on reference indices as well as motion vectors when performing motion vector memory compression (motion vector storage reduction). Here, the motion information storage reduction means that only one piece of motion information (representative motion information) is assigned to the motion data blocks of a motion data storage unit and is stored and used as described above, similarly to the motion vector storage reduction.

<FIG> shows an example where a motion data storage unit includes 4x4 motion data blocks.

<FIG> shows an example where the motion information (the motion vector and the reference index) of the motion data block B0 located at the top-left corner of the motion data storage unit <NUM> is used as representative motion information.

Referring to <FIG>, the motion vector and the reference index of the motion data block B0 are assigned as motion information of a motion data storage unit <NUM> by the motion information storage reduction. In the example shown in <FIG>, the motion vector and the reference index of the block B0 which is the representative motion data block are (X0, Y0) and ref_idx2, respectively. Accordingly, when the motion data storage unit <NUM> includes the block specified by SCRT or SBR in <FIG> and <FIG>, the motion vector (X0, Y0) and the reference index ref_idx2 of the block B0 may be used to derive the TMVP. The use of the reference index of the colPu along with the motion vector of the colPu corresponds to the storage and use of the reference index of the representative motion data block along with the motion vector thereof as the motion information of the motion data storage unit.

The method according to Embodiment <NUM> may be applied along with the methods according to Embodiments <NUM> to <NUM>. For example, when the representative motion data block is specified according to Embodiment <NUM> or <NUM>, the motion vector and the reference index of the corresponding motion data block may be together assigned to the motion data storage unit. When a neighbouring block of which the motion vector is used is determined out of the neighbouring blocks of the current motion data storage unit according to Embodiment <NUM>, the reference index and the motion vector of the determined neighbouring block may be assigned to the current motion data storage unit.

On the other hand, when an intra block is included in target blocks (motion data blocks in the motion data storage unit) of which the motion information may be compressed according to Embodiment <NUM>, the reference index of the representative motion data block may be assigned to only the other motion data blocks without changing the reference index of the intra block.

That is, instead of setting the same reference index for all the motion data blocks of the motion data storage unit, only the reference indices of the other inter blocks may be changed to the reference index of the representative motion data block and the result may be stored without changing the reference index of the intra block in the motion data storage unit.

When only the reference indices of the inter blocks are changed to the reference index of the representative motion data block, the reference index values of the corresponding motion data block in L1 and L0 may be directly read and determined to find out the prediction direction of the col block (the L0 direction, the L1 direction, the bi-prediction, or the intra prediction).

<FIG> is a diagram schematically illustrating a state in which motion information memory compression of a motion vector and a reference index is performed on only an inter block according to the invention when performing motion vector memory compression. <FIG> shows an example where the motion data storage unit includes 4x4 motion data blocks.

In the example shown in <FIG>, it is assumed that the blocks B10, B11, B14, and B15 out of the motion data blocks B0 to B15 in a motion data storage unit <NUM> are intra blocks (of which the reference index has a value of -<NUM>).

Therefore, only the reference indices of the inter blocks other than the intra block may be changed to the reference index of the representative motion data block and the motion vector and the reference index of the motion data storage unit <NUM> may be set. Even when the motion vectors of the intra blocks B10, B11, B14, and B15 in the motion data storage unit <NUM> are changed to the motion vector of the representative motion data block, the reference indices are not changed but maintained.

According to the method described with reference to <FIG>, the motion vector of the col block may be derived using the stored reference index values regardless of the picture type (the P picture, the B picture, and the I picture) of the col block, and the motion vector of the col block may be made not to be derived from the intra block.

The method described with reference to <FIG> may be applied to Embodiments <NUM> to <NUM>. For example, when the representative motion data block is specified in Embodiment <NUM> or <NUM> and the motion vector and the reference index of the corresponding motion data block are assigned to the motion data storage unit, the reference index of the intra block may not be changed. When a neighbouring block of which the motion vector is used is determined out of the neighbouring blocks of the current motion data storage unit according to Embodiment <NUM> and the reference index of the determined neighbouring block is assigned to the current motion data storage unit, the reference index of the intra block may not be changed.

On the other hand, in <FIG>, difference reference indices may be assigned to the motion data blocks of the same motion data storage unit. In this case, only the motion vector is compressed and the reference indices are not compressed.

In order to solve this problem, <FIG> shows a method of storing only one representative value as the reference index as shown in <FIG> but inferring that a block is an intra block.

<FIG> is a diagram schematically illustrating a method of inferring an intra block in a state in which motion information memory compression of a motion vector and a reference index is performed according to the invention when performing motion vector memory compression. <FIG> shows an example where the motion data storage unit includes 4x4 motion data blocks.

Referring to <FIG>, the reference index value of the representative motion data block B0 is assigned to the blocks B10, B11, B14, and B15 which are intra blocks. Here, even when the reference index values stored for the blocks B10, B11, B14, and B15 are larger than <NUM>, the decoder may infer that the corresponding blocks are intra blocks. That is, the decoder may recognize that the motion information of the blocks B10, B11, B14, and B15 are not available.

It may be determined whether a motion data block is an intra block or an inter block by the use of the prediction type (an intra prediction mode or an inter prediction mode) of the CU to which the corresponding motion data block belongs.

The method described with reference to <FIG> may be applied along with Embodiments <NUM> to <NUM>. For example, when a representative motion data block is specified according to Embodiment <NUM> or <NUM>, the motion vector and the reference index of the corresponding motion data block may be assigned to the motion data storage unit and it may be determined whether the corresponding motion data block is an intra block on the basis of the prediction type of the CU to which the corresponding block belongs. When a neighbouring block of which the motion vector is used is determined out of the neighbouring blocks of a current motion data storage unit according to Embodiment <NUM>, the reference index of the determined neighbouring block may also be assigned to the current motion data storage unit and it may be determined whether the determined neighbouring block is an intra block on the basis of the prediction type of the CU to which the corresponding block belongs.

According to the method described with reference to <FIG>, it is possible to save the memory for storing the reference indices and to reduce a memory bandwidth. A motion vector may be made not to be derived from an intra block.

This embodiment provides a method of combining Embodiment <NUM> and Embodiment <NUM> and considering whether a reference index is <NUM> as a motion information storage reduction method.

That is, similarly to the method described in Embodiment <NUM>, it is determined whether motion data blocks of a motion data storage unit are an inter block or an intra block and it is determined whether the reference index value thereof is <NUM> when a motion data block is an inter block, on the basis of a predetermined order.

In Embodiment <NUM>, the decoder may select a first-detected motion data block, which is encoded in an inter prediction mode and which has a reference index value of <NUM>, as the representative motion data block while scanning the motion data blocks of the motion data storage unit in a predetermined order. The decoder may assign and use the motion vector and the reference index of the selected representative motion data block to the other motion data blocks of the motion data storage unit.

This embodiment provides a method of compressing and storing a prediction mode along with the motion vector and the reference index in the motion information storage reduction (motion vector memory reduction).

As for a decoded picture, information on the prediction mode may be stored by the PU. At this time, the PU of which information on the prediction mode is stored may be a smallest prediction unit or a motion data block, and the smallest prediction unit or the motion data block may be a block of 4x4 samples. For example, information on whether the prediction mode is an intra mode or an inter mode and on which one is used among a skip mode or a merge mode or an AMVP when the prediction mode is an inter mode may be stored.

The information on the prediction mode may be stored in a decoded picture buffer (DPB) to check the state of the col block. In this case, when the motion vector buffer compression (motion vector memory compression) is used, the information on the prediction mode may be stored by motion data storage units without storing the information on the prediction mode by PU units.

Therefore, in this embodiment, when the motion vector memory compression (motion information storage reduction) is applied, the prediction mode of the representative motion data block of the motion data storage unit is also compressed (stored).

<FIG> is a diagram schematically illustrating a state in which information on a prediction mode is compressed according to the invention when performing motion vector memory compression. <FIG> shows an example where a motion data storage unit includes 4x4 motion data blocks.

Referring to <FIG>, <FIG> motion data blocks of a motion data storage unit <NUM> are encoded in various prediction modes. In <FIG>, it is assumed that the representative motion data block of the motion data storage unit <NUM> is a motion data block B0 located at the top-left corner.

The same motion vector, reference index, and prediction mode as the representative motion data block B0 are assigned to 4x4 motion data blocks in a motion data storage unit <NUM> by the motion vector memory compression. Therefore, the motion vector of the motion data blocks B0 to B15 in the motion data storage unit <NUM> is stored as (X0, Y0), the reference index thereof is stored as ref_idx <NUM>, and the prediction mode thereof is stored as a skip mode.

For example, when the motion data storage unit <NUM> includes the block specified by SRB or SCRT in <FIG> and <FIG>, (X0, Y0) which is the motion vector of B0, ref_idx <NUM> which is the reference index thereof, and a skip mode which is the prediction mode thereof may be used as motion information for deriving the TMVP of the current block.

This embodiment provides a method of more effectively performing a compression process in the motion information storage reduction, for example, when compressing the motion vector buffer memory.

When the motion information storage reduction (or the motion vector buffer compress (MV buffer compression) is applied, the degradation in performance may be suppressed as the local motion information pieces are similar to each other, depending on the characteristics of a picture. The similarity of the local motion may vary depending on a picture and, for example, there may be a difference in compression performance between when a <NUM>:<NUM> picture is compressed by the motion data storage unit of 16x16 pixel blocks and when a <NUM>:<NUM> picture is compressed by the motion data storage unit of 16x16 pixel blocks.

Therefore, this embodiment provides a method of more dynamically compressing a buffer memory for storing motion information.

The encoder may signal information on the compression ratio to the decoder, when information indicating compression of motion information or motion vectors at the sequence level is transferred. For example, when the motion information of NxM (where N and M are integers) sample blocks are compressed and stored as a single motion information piece, the encoder may signal the value of N relevant to the compression ratio in the horizontal direction and the value of M relevant to the compression ratio in the vertical direction.

The encoder may transfer information such as motion_vector _buffer _comp_x_ratio_log2 as the information on the compression ratio in the horizontal direction in the motion information storage reduction and transfer information such as motion_vector_buffer_comp_y_ratio_log2 as the information on the compression ratio in the vertical direction.

For example, when the value of motion vector_buffer comp x_ratio_log2 transferred by the encoder is <NUM> and the value of motion vector_buffer comp_y_ratio_log2 is <NUM>, it may be indicated that compression of storing the motion information in the unit of 4x4 samples is performed.

When the value of motion vector_buffer comp x_ratio_log2 transferred by the encoder is <NUM> and the value of motion_vector_buffer comp_y_ratio_log2 is <NUM>, it may be indicated that compression of storing the motion information in the unit of 8x4 samples is performed.

Therefore, the compression storage ratio of motion information may be determined in consideration of the characteristics of a picture processed by the encoder and may be transferred to the decoder. The decoder may acquire information of the motion vector and/or the reference index for deriving the TMVP on the basis of the transferred compression storage ratio of motion information.

According to Embodiment <NUM>, since video data is compressed and stored in consideration of the characteristics of a picture, it is possible to maximally reduce loss in compression of a temporal motion vector buffer.

In this case, the reference index buffer compression (memory compression) may be performed in the same way using the information on the motion vector buffer compression. Information for the reference index buffer compression may be signaled separately to perform the buffer compression separately from the motion vector buffer compression.

On the other hand, the method of determining and signaling the size of a sample block which is a unit for storing motion information, that is, the compression and storage ratio, to the decoder may be similarly applied to Embodiments <NUM> to <NUM>. In this case, when the size of a sample block as the compression and storage unit determined by the encoder is NxM, the motion data storage unit in Embodiments <NUM> to <NUM> is a block with a size of NxM samples.

This embodiment provides a method of using a neighbouring block of a motion data storage unit instead of the motion data block in the motion data storage unit as the representative motion data block used to compress and store motion information. For example, in this embodiment, motion information may be compressed and stored using a 4x4 pixel block at the right-bottom corner adjacent to a current motion data storage unit as the representative motion data block having the motion information on the current motion data storage unit instead of using any motion data block in the current motion data storage unit which is a 16x16 pixel block as the representative motion data block.

<FIG> is a diagram schematically illustrating a method of utilizing information on blocks adjacent to a current motion data storage unit according to the invention when compressing and storing motion information. <FIG> shows an example where the motion data storage unit includes 4x4 motion data blocks.

In the example shown in <FIG>, a PU <NUM> includes four motion data storage units <NUM>, <NUM>, <NUM>, and <NUM> and each motion data storage unit includes motion data blocks which are 4x4 pixel blocks.

According to this embodiment, motion information (also referred to as "motion data") of a 4x4 pixel block B1 located adjacent to the right-bottom corner of the current motion data storage unit <NUM> is used as the motion information of the current motion data storage unit <NUM> to compress and store the motion information (such as the motion vector, the reference index, and the prediction mode) of the current motion data storage unit <NUM> which is a 16x16 pixel block. That is, the block B1 is used as the representative motion data block of the current motion data storage unit <NUM>.

Therefore, the motion information of the block B1 is assigned to all the blocks in the current motion data storage unit <NUM>.

The motion information of the neighbouring block adjacent to the right-bottom corner is assigned as the motion information of the respective motion data storage unit to the other motion data storage units <NUM>, <NUM>, and <NUM> in the PU <NUM> in the same way.

Therefore, when the TMVP is taken out from a reference picture of which the motion information is compressed and stored in the process of prediction of a current block, a , and the motion information of the motion data blocks (blocks located on the central top-left side, the central left-bottom side, the central top-right, and the central right-bottom side) located at the center of the current PU may be simply used without performing an additional process of searching out neighbouring PU located at the right-bottom corner of a current PU every time and taking out the motion information of the top-left block of the motion data storage unit including the corresponding PU as described above.

The motion data blocks located at the center of the current PU are B1, B2, B3, and B4 in the example shown in <FIG>.

At this time, when B1 is an intra block or an unavailable block, the other motion data blocks B2, B3, and B4 located at the center of the PU <NUM> included the current motion data storage unit <NUM> may be used as the representative motion data block of the current motion data storage unit <NUM>.

In this case, the motion data blocks are scanned for the current motion data storage unit <NUM> in any one order of (<NUM>) B1 → B2 → B3 → B4, (<NUM>) B1 → B3 → B4 → B2, (<NUM>) B1 → B4 → B3 → B2, and an inter block or an available block first detected may be used as the representative motion data block of the current motion data storage unit <NUM>. The scanning order may be determined in advance or may be signaled from the encoder.

When the width or the height of a picture is not an integer multiple of a compression and storage unit of motion information (motion data storage unit), the motion information of a block having a size smaller than the compression and storage unit of motion information may be compressed and stored.

This embodiment provides a method of compressing and storing motion information of pixel block smaller than the compression and storage unit of motion information.

<FIG> is a diagram schematically illustrating a method of compressing and storing motion information of a pixel block smaller than a compression and storage unit of motion information according to the invention when compressing and storing motion information. <FIG> shows an example where the size of a picture is not an integer multiple of the motion data storage unit and 16x16 pixel samples are used as a single motion data storage unit.

Referring to <FIG>, a picture <NUM> includes plural motion data storage units. In the example shown in <FIG>, a motion data storage unit is a 16x16 pixel block such as a block <NUM> as described above. Here, since the size of the picture <NUM> and the size of the motion data storage unit are not proportional to each other, a block (hereinafter, referred to as a "remaining block" for the purpose of convenience for explanation) having a size smaller than the motion data storage unit is present at the boundary of the picture like a block <NUM>. In the example shown in <FIG>, the size of the remaining block is assumed to be 8x16.

In order to perform inter prediction using an MVP, it is necessary to compress and store motion information of the remaining block. In Embodiment <NUM>, a method of storing motion information of the remaining block depending on what motion data block to use as the representative motion data block of the motion data storage unit will be described. The position of the motion data block which may be used as the representative motion data block is the same as described in Embodiment <NUM>.

The method of compressing and storing the motion information of the remaining block depending on the position of the representative motion data block specified in Embodiment will be described below.

<FIG> is a diagram schematically illustrating a method of compressing and storing motion information of a remaining block according to the invention when a representative motion data block is a top-left block of a motion data storage unit.

In <FIG>, it is assumed that a motion data storage unit <NUM> in a picture <NUM> is a 16x16 pixel block and a remaining block <NUM> is a 16x8 pixel block. The method to be described with reference to <FIG> may be applied to motion data storage units and remaining blocks having sizes other than described above.

When the top-left motion data block <NUM> is used as the representative motion data block of the motion data storage unit <NUM> and the unit of block of which motion information should be compressed and stored is reduced in the vicinity of the boundary of the picture <NUM> like a remaining block <NUM>, the representative motion data block of the remaining block <NUM> may be determined using the same method as the motion data storage unit <NUM>.

Therefore, the motion information of the motion data block <NUM> located at the top-left corner of the remaining block <NUM> is used as the motion information of the remaining block <NUM>.

Therefore, the representative motion data block of the remaining block may be determined using the same method as the motion data storage unit.

<FIG> is a diagram schematically illustrating a method of compressing and storing motion information of a remaining block according to the invention when a representative motion data block is a right-bottom block of a motion data storage unit.

When a right-bottom motion data block <NUM> is used as the representative motion data block of the motion data storage unit <NUM>, the motion information of a motion data block <NUM> located at the right-bottom corner of an available area of the remaining block <NUM> is used as the motion information of the remaining block <NUM>.

<FIG> is a diagram schematically illustrating a method of compressing and storing motion information of a remaining block when a representative motion data block is a right-bottom block of a motion data storage unit but an unavailable area is present in the remaining block.

Specifically, when an unavailable area is present in a remaining block <NUM>, the motion information of a motion data block <NUM> located at the top-left corner of the remaining block <NUM> is used as the motion information of the remaining block <NUM>. In this case, since the top-left area is always available, it is not necessary to perform a calculating operation for searching for a boundary of an available block.

The case where a representative motion data block is any one of motion data blocks at the center of a motion data storage unit means a case where a representative motion data block is any one of motion data blocks on the central top-left side, the central left-bottom side, the central top-right side, and the central right-bottom of a motion data storage unit. Hereinafter, for the purpose of convenience for explanation, the positions of the central motion data blocks are expressed by Center_XX. Here, XX represents any one of LT (Left-Top), RT (Right-Top), LB (Left-Bottom), and RB (Right-Bottom). What of LT, RT, LB, and RB to correspond to XX may be determined in advance or may be determined and signaled to the decoder by the encoder. For the purpose of convenience for explanation, it is assumed that XX is LT. The below description may be similarly applied to examples where XX is RT, RB, and LB.

<FIG> is a diagram schematically illustrating a method of compressing and storing motion information of a remaining block according to the invention when a representative motion data block is a central left-top (Center_LT) block of a motion data storage unit.

When a central right top motion data block <NUM> is used as the representative motion data block of the motion data storage unit <NUM>, the motion information of a motion data block <NUM> located on the central left-top side of an available area of the remaining block <NUM> is used as the motion information of the remaining block <NUM>.

<FIG> is a diagram schematically illustrating a method of compressing and storing motion information of a remaining block when a representative motion data block is a central left-top block of a motion data storage unit but an unavailable area is present in the remaining block.

Specifically, when an unavailable area is present in a remaining block <NUM>, the motion information of a motion data block <NUM> located at the top-left corner of the remaining block <NUM> is used as the motion information of the remaining block <NUM>.

When an unavailable area is present in the remaining block <NUM> but the unavailable area is a central left-top area in the remaining block <NUM>, the motion information of the motion data block <NUM> located at the top-left corner of the remaining block <NUM> may be used as the motion information of the remaining block <NUM>.

In the method described with reference to <FIG>, since the left-top area is always available, it is not necessary to perform a calculating operation for searching for a boundary of an available block.

The decoder and the encoder use the motion information of a motion data storage unit including a pixel located at a corner adjacent to the right-bottom of the col block of a current block as the TMVP motion information in the process of deriving the TMVP for the inter prediction as shown in <FIG>. The decoder and the encoder use the motion information of a representative motion data block out of the motion data blocks in the motion data storage unit as the motion information of the PUs in the motion data storage unit. The motion information of the representative motion data block of the motion data storage unit may include a reference index and a prediction mode in addition to a motion vector.

On the other hand, in motion vector prediction, the motion information of a block adjacent to a current block is used as an MVP candidate and the co-located motion vector of an adjacent frame (picture) is also used as an MVP candidate, as described above. This is called a TMVP (Temporal Motion Vector Predictor) as described above.

In order to use the TMVP, decoded information should be stored. Only when motion information such as a motion vector is stored in the unit of predetermined blocks (for example, 4x4 pixel block) after a frame (picture) is decoded, the TMVP may be used on the basis thereon in a next frame including a current block.

However, when it is intended to store all motion information in the minimum unit of 4x4, a lot of memory capacity is necessary. Accordingly, it is necessary to compress and store the motion information in a larger unit (for example, any one of a 16x16 pixel block, a 32x32 pixel block, and a 64x64 pixel block). This is described above as motion information storage reduction, motion vector memory compression, or motion vector buffer compression, and the unit of which the motion information is compressed and stored is described above as a motion data storage unit. Here, in what unit to compress and store motion information may be determined in advance or may be determined and transferred to the decoder through SPS (Sequence Parameter Set)-level signaling by the encoder.

For example, when it is assumed that motion information is compressed and stored in the unit of 16x16 pixel blocks for the purpose of convenience for explanation, the motion information (for example, the motion vector and the reference index) of a 4x4 block located at the top-left corner of the 16x16 pixel block is stored in the directions of L0 and L1. Here, the motion information of a 4x4 pixel block located at the center of the 16x16 pixel block may be used instead of the motion information the block located at the left-top corner.

<FIG> is a diagram schematically illustrating an example where motion information located at the center <NUM> is used as a TMVP instead of motion data located at the left-top corner <NUM> of a block <NUM> located at the same position as a current block <NUM> in a frame (or picture) <NUM> adjacent to a current frame (or picture) <NUM>.

As described above, when a TMV (Temporal Motion Vector) to be used is a motion vector included in an intra block, it maynot be said to be information useful for the inter prediction of a current block. In general, a TMV derived from an inter block may be set to have a value of (<NUM>, <NUM>).

<FIG> is a diagram schematically illustrating a method of processing motion information of an inter block located at the center when deriving a TMVP.

In <FIG>, it is assumed that a block which a current block <NUM> should use to derive a TMVP is a central block <NUM> in the co-located block <NUM> of a neighboring frame <NUM>. At this time, when the block <NUM> is an intra block, the value of the motion vector derived from the block <NUM> is set to (<NUM>, <NUM>) and thus inaccurate prediction may be performed. When a neighboring block <NUM> is an inter block and has a normal motion vector, it is not necessary to use the inaccurate motion vector of the block <NUM>.

On the other hand, as shown in <FIG>, when motion information of a block located at the center of a block (col block) located at the same position as the current block in a neighboring frame (colPic) is used to derive a TMVP, any one (for example, the central left-top block) of four blocks surrounding the center may be used depending on the size of the block, instead of the central block of the co-located block (col block).

The details relevant to <FIG> and <FIG> are described above, and embodiments for deriving a TMVP will be described below with reference to the accompanying drawings.

This embodiment provides a method of using motion information of blocks located at the center of a col block when it is intended to derive a TMVP of a current block having various sizes.

<FIG> is a diagram schematically illustrating a method of deriving a TMVP based on motion information of a block located at the center of a col block in a reference picture (reference frame) according to the invention. <FIG> shows an example where a storage unit (motion data storage unit) of motion information (for example, a motion vector) is a 16x16 pixel block for the purpose of convenience for explanation. As described above, the size of the motion data storage unit may be determined in advance or may be determined and transferred to the decoder through SPS-level signaling by the encoder.

(a) of <FIG> shows an example where a current block and a col block <NUM> of the current block are 64x64 pixel blocks. In (a) of <FIG>, blocks Bs0, Bs1, Bs2, and Bs3 which are motion data storage units located at the center of the col block <NUM> are used to derive the TMVP of the current block.

Specifically, any one of (<NUM>) motion information of a motion data storage unit Bs0 located at the central left-top corner of the col block, (<NUM>) motion information of a motion data storage unit Bs1 located at the central right-top corner of the col block, (<NUM>) motion information of a motion data storage unit Bs2 located at the central left-bottom corner of the col block, and (<NUM>) motion information of a motion data storage unit Bs3 located at the central right-bottom corner of the col block is used to derive the TMVP from the col block. What motion information of (<NUM>) to (<NUM>) to use may be determined in advance or may be determined and signaled to the decoder by the encoder.

The method (motion information storage reduction) of storing motion information by the motion data storage unit is described above in Embodiments <NUM> to <NUM>, and the motion information stored through the use of the method according to any one of Embodiments <NUM> to <NUM> may be used in this embodiment.

(b) of <FIG> shows an example where a current block and a col block <NUM> of the current block are 64x32 pixel blocks, unlike (a) of <FIG>. In (b) of <FIG>, blocks Bs0, Bs1, Bs2, and Bs3 which are motion data storage units located at the center of the col block <NUM> are used to derive the TMVP of the current block.

Specifically, any one of (<NUM>) motion information of a motion data storage unit Bs0 located at the central left-top corner of the col block, (<NUM>) motion information of a motion data storage unit Bs1 located at the central right-top corner of the col block, (<NUM>) motion information of a motion data storage unit Bs2 located at the central left-bottom corner of the col block, and (<NUM>) motion information of a motion data storage unit Bs3 located at the central right-bottom corner of the col block is used to derive the TMVP from the col block <NUM>. What motion information of (<NUM>) to (<NUM>) to use may be determined in advance or may be determined and signaled to the decoder by the encoder.

This embodiment provides a method of considering present of an intra block when deriving a TMVP of a current block.

<FIG> is a diagram schematically illustrating a method of deriving a TMVP in consideration of presence or absence of an intra block according to the invention. <FIG> shows TMVP candidates of a reference frame located at the same position as a current block and being overlapped with the current block. Therefore, a block <NUM>, a block <NUM>, and a block <NUM> may be considered as a current block or a col block of the current block. Here, for the purpose of convenience for explanation, it is assumed that the blocks are col blocks of a current block.

(a) of <FIG> is a diagram illustrating deriving of a TMVP using motion data storage units located at the center of a col block of a current block. For example, the TMVP candidate group in the example shown in (a) of <FIG> includes motion vectors of the motion data storage units Bs0, Bs1, Bs2, and Bs3. (a) of <FIG> shows an example where a 16x16 pixel block is used as a motion data storage unit.

In (a) of <FIG>, it is determined whether a motion data storage unit is an intra block or an inter block and motion information of the motion data storage unit which is an inter block is used to derive the TMVP, instead of using the motion vector of the motion data storage unit as the TMVP thereof not depending on whether the motion data storage unit is an intra block or an inter block.

Therefore, the decoder scans fourth motion data storage units Bs0, Bs1, Bs2, and Bs3 located at the center of the col block in a predetermined scan order and the TMVP may be derived using the motion information of the motion data storage unit which is first detected as an inter block. When all of four motion data storage units Bs0, Bs1, Bs2, and Bs3 are intra blocks (or unavailable), the TMVP may be derived using the motion information of the motion data storage unit Bs0.

The scan order may be determined to be any one of (<NUM>) Bs0 → Bs1 → Bs2 → Bs3, (<NUM>) Bs2 → Bs3 → Bs0 → Bs1, (<NUM>) Bs0 → Bs3 → Bs1 → Bs2, and (<NUM>) Bs0 → Bs2 → Bs1 → Bs3. The scan order may be determined in advance, or may be determined and signaled to the decoder by the encoder.

(b) of <FIG> shows an example where the number of TMVP candidate groups in (a) of <FIG> increases. In (b) of <FIG>, the motion information of all motion vector storage units in the col block are included in the TMVP candidate groups.

At this time, the scan order may be determined variously. In the index order of the motion data storage units, the scanning may be performed spirally in the clockwise direction from Bs0 or may be performed spirally in the counterclockwise direction. The scanning may be performed with a block other than Bs0 out of the motion data storage units at the center of the col block as a start point (for example, Bs2 → Bs3 → Bs0 → Bs1 → Bs10 → Bs11 → Bs12 → Bs13 → Bs14 → Bs15 → Bs4 → Bs5 → Bs6 → Bs7 → Bs8 → Bs9).

(c) of <FIG> is a diagram illustrating a method of deriving a TMVP using motion information of a block located outside a col block of a current block. A TMVP candidate may depart from the boundary of the col block (current block) or the TMVP candidate departing from the boundary of the col block (current block) may have a rank higher than a TMVP candidate in the col block (current block). (c) of <FIG> shows an example where a 16x16 pixel block is used as a motion data storage unit, for the purpose of convenience for explanation.

In (c) of <FIG>, two TMVP candidate groups are used for the purpose of convenience for explanation. Motion information of a block Bs0 adjacent to the right-bottom corner of a col block <NUM> as a block located outside the col block <NUM> of the current block and a motion data storage unit Bs1 located at the central right-bottom corner out of blocks located at the center of the col block <NUM> may be used as TMVP candidates. At this time, the block Bs0 may be a motion data storage unit.

The decoder first determines whether the block Bs0 outside the col block is an inter block (or an available block) or an intra block (or an unavailable block). When the block Bs0 is an inter block and is available, the decoder derives a TMVP using the motion information of the block Bs0. For example, the motion information of the block Bs0 may be used as the TMVP.

When the block Bs0 is an intra block or an unavailable block, the decoder determines whether the motion data storage unit Bs1 is an inter block (or an available block) or an intra block (or an unavailable block). When the block Bs1 is an inter block and is available, the decoder derives a TMVP using the motion information of the block Bs1.

When both the blocks Bs0 and Bs1 are intra blocks, the decoder may derive a TMVP on the basis of the motion information of Bs0.

The number, the positions, and the scan order of TMVP candidate groups in <FIG> are not limited to the above-mentioned details, and the size of the motion data storage unit is not limited to 16x16. The size of the current block and the col block is not limited 63x64, and the invention may be applied to various sizes such as 32x32. For example, when the size of a current block is 32x32 and the size of the motion data storage unit is 16x16, at most four TMVP candidates may be used for the current block.

When the size of a current block is smaller than the size of the motion vector memory buffer, that is, the motion data storage unit, the TMVP may be derived using the motion information of the left-top corner of the col block or the like in the same way as described in the existing method.

In the above description, a block index (BI or BsI, where I=<NUM>, <NUM>, <NUM>, <NUM>,. ) is used to specify a block, but is not used to indicate the priority in the searching order or the processing order as long as it is not mentioned particularly.

The above-mentioned embodiments relate to the motion information storage and compression method in an inter prediction and the method of deriving a TMVP using the stored motion information, and may be applied to an encoder and a decoder in the same way so as for the encoder and the decoder to perform the same prediction. Therefore, the embodiments are described as the operations of the decoder for the purpose of convenience for explanation, but may be similarly applied to the encoder. For example, the invention includes embodiments in which the decoder in the above-mentioned embodiments is replaced with an "encoder".

In the above description, "motion information storage reduction", "motion vector memory compression", "motion vector buffer compression", "motion vector compression and storage", "motion information compression and storage", and the like are mixed depending on situations for the purpose of convenience for explanation, but they are intended for the purpose of convenience for explanation and may be used in the same meaning. The terms used for the purpose of convenience for explanation in the above description may be defined by the accompanying drawings and the relevant explanation thereof in addition to the used names.

While the methods in the above-mentioned exemplary system have been described on the basis of flowcharts including a series of steps or blocks, the invention is not limited to the order of steps and a certain step may be performed in a step or an order other than described above or at the same time as described above. The above-mentioned embodiments may include various examples. Therefore, the invention includes embodiments in which the above-mentioned embodiments are simultaneously applied or are combined.

Claim 1:
A video decoding method performed by a decoding apparatus, the method comprising:
determining a prediction mode of a current block in a current picture as a motion vector prediction mode;
deriving a motion vector predictor, MVP, candidate list of a current block, wherein the MVP candidate list includes a temporal motion vector predictor, TMVP, candidate from a co-located prediction unit, colPu, in a reference picture;
deriving the MVP of the current block from the MVP candidate list;
deriving a motion vector of the current block based on the derived MVP; and
performing the inter prediction for the current block based on the derived motion vector,
wherein the deriving the MVP candidate list comprises deriving a TMVP,
wherein the deriving the TMVP of the current block in the current picture comprises:
determining a location of a positioning pixel in a co-located block in the reference picture;
deriving the colPu in the reference picture using the location of the positioning pixel and a size of a motion data storage unit, wherein the size of the motion data storage unit is 16x16; and
deriving the TMVP of the current block in the current picture using a motion vector of the colPu in the reference picture,
wherein the colPu is a prediction block covering a top-left corner of the motion data storage unit to which the positioning pixel belongs, and the motion vector of the colPu is derived from the motion information of the motion data storage unit covered by the colPu and characterized in that the positioning pixel is determined as a pixel at a right-bottom side among central 2x2 pixels located at the center of the co-located block, wherein the co-located block is a block having a same position and size as the current block and located in the reference picture,
wherein the location of the positioning pixel is specified by (xP+(nPSW>> <NUM>), yP+(nPSH>><NUM>)),where (xP, yP) represents a top left corner sample position of the current block, nPSW and nPSH represent a width and a height of the current block, and > > represents right shift operation.