Image encoding / decoding method and device, and recording medium storing bitstream

The video encoding/decoding method corrects merge motion vectors using advanced matching techniques and weighted summation to improve prediction accuracy, addressing the challenges of high-resolution video data transmission and storage costs by optimizing the AMVP-merge mode in video encoding/decoding processes.

WO2025018679A1PCT designated stage expired Publication Date: 2025-01-23HYUNDAI MOTOR CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2024/009777
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-09
Filing Date
2024-07-09
Publication Date
2025-01-23

AI Technical Summary

Technical Problem

The increasing demand for high-resolution, high-quality video data, such as UHD images, leads to higher data volumes, resulting in increased transmission and storage costs, and existing video encoding/decoding technologies, particularly in AMVP-merge mode, face challenges in maintaining prediction accuracy due to the reliance on merge motion vector information without additional data.

Method used

A video encoding/decoding method that corrects the initial merge motion vector using bidirectional matching, template matching, and motion vector difference information, allowing for weighted summation of AMVP and merge prediction blocks to improve prediction accuracy, and includes a method to rearrange merge candidates based on similarity, enabling independent correction of the merge motion vector.

Benefits of technology

This approach enhances encoding/decoding efficiency and prediction accuracy, reducing data transmission and storage costs while maintaining high video quality by optimizing the merge motion vector correction in AMVP-merge mode.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2024009777_23012025_PF_FP_ABST
    Figure KR2024009777_23012025_PF_FP_ABST
Patent Text Reader

Abstract

An image encoding / decoding method and device, a recording medium storing a bitstream, and a transmission method are provided. The image decoding method may comprise the steps of: deriving an AMVP motion vector of a current block; generating an AMVP prediction block of the current block on the basis of the AMVP motion vector; deriving a merge motion vector of the current block; generating a merge prediction block of the current block on the basis of the merge motion vector; and generating a prediction block of the current block by weighted-summing the AMVP prediction block and the merge prediction block, wherein the merge motion vector is derived by correcting an initial merge motion vector derived on the basis of a merge candidate list.
Need to check novelty before this filing date? Find Prior Art

Description

Video encoding / decoding method, device, and recording medium storing bitstream

[0001] The present invention relates to a video encoding / decoding method, a device, and a recording medium storing a bitstream. Specifically, the present invention relates to a video encoding / decoding method, a device, and a recording medium storing a bitstream based on merge motion vector compensation in an AMVP (Advanced Motion Vector Prediction)-merge mode.

[0002] Recently, the demand for high-resolution, high-quality images, such as UHD (Ultra High Definition) images, is increasing across various application fields. As image data becomes higher in resolution and quality, the relative amount of data increases compared to conventional image data. Therefore, transmitting image data using existing media such as wired or wireless broadband lines or storing it using existing storage media leads to increased transmission and storage costs. To address these issues arising from the increasing resolution and quality of image data, high-efficiency image encoding / decoding technologies for higher-resolution and higher-quality images are required.

[0003] In AMVP-Merge mode, the merge mode uses the motion vector information of the merge candidate selected from the merge candidate list without additional information to predict the current block, which may result in lower prediction accuracy.

[0004] The purpose of the present invention is to provide a video encoding / decoding method and device with improved encoding / decoding efficiency.

[0005] In addition, the present invention aims to provide a recording medium storing a bitstream generated by an image decoding method or device according to the present invention.

[0006] In addition, the present invention aims to provide a merge motion vector compensation method to solve the problems of the existing AMVP-merge mode as described above.

[0007] A video decoding method according to one embodiment of the present invention includes the steps of: deriving an AMVP motion vector of a current block; generating an AMVP prediction block of the current block based on the AMVP motion vector; deriving a merge motion vector of the current block; generating a merge prediction block of the current block based on the merge motion vector; and generating a prediction block of the current block by weighting the AMVP prediction block and the merge prediction block, wherein the merge motion vector can be derived by correcting an initial merge motion vector derived based on a merge candidate list.

[0008] In the above image decoding method, the AMVP reference picture used to derive the AMVP prediction block and the merge reference picture used to derive the merge prediction block may have different prediction directions.

[0009] In the above image decoding method, correction of the initial merge motion vector is performed based on bidirectional matching, and the bidirectional matching can search for a reference block most similar to the AMVP prediction block in the merge reference picture.

[0010] In the above image decoding method, the weighted sum is performed by applying a first weight value and a second weight value to the AMVP prediction block and the merge prediction block, respectively, and the first weight value and the second weight value can be determined based on a distance between a current picture in which the current block is located and the AMVP reference picture and a distance between the current picture and the merge reference picture.

[0011] In the above image decoding method, the weighted sum is performed by applying a first weight value and a second weight value to the AMVP prediction block and the merge prediction block, respectively, and the first weight value and the second weight value may be determined based on at least one of a quantization coefficient of the AMVP reference picture, a quantization coefficient of the merge reference picture, a picture type of the AMVP reference picture, a picture type of the merge reference picture, and a prediction mode of a surrounding reference block of the current block.

[0012] In the above image decoding method, correction of the initial merge motion vector is performed based on template matching, and the template matching can search for a reference template that is most similar to the current template of the current block in the merge reference picture.

[0013] In the above image decoding method, the weighted sum is performed by applying a first weight value and a second weight value to the AMVP prediction block and the merge prediction block, respectively, and the first weight value and the second weight value can be determined based on a distortion value between the current template and the AMVP reference template and a distortion value between the current template and the searched reference template.

[0014] In the above image decoding method, the first weight value may be proportional to a distortion value between the current template and the searched reference template, and the second weight value may be proportional to a distortion value between the current template and the AMVP reference template.

[0015] In the above image decoding method, correction of the initial merge motion vector can be performed based on motion vector difference information.

[0016] In the above image decoding method, the motion vector difference information may include direction information and distance information.

[0017] In the above image decoding method, the direction information may include vertical direction information and horizontal direction information, and the distance information may include vertical distance information and horizontal distance information.

[0018] In the above image decoding method, the merge candidates in the merge candidate list can be reordered based on the similarity between the template of the reference block indicated by the merge candidates and the current template of the current block.

[0019] In the above image decoding method, correction of the initial merge motion vector can be performed independently of the distance between the current picture located in the current block and the AMVP reference picture and the distance between the current picture and the merge reference picture.

[0020] In the above image decoding method, the method further includes a step of determining whether the prediction mode of the current block is an AMVP-merge mode, and the step of determining whether the prediction mode is an AMVP-merge mode can be independently determined based on a distance between a current picture in which the current block is located and the AMVP reference picture and a distance between the current picture and the merge reference picture.

[0021] A video encoding method according to one embodiment of the present invention includes the steps of deriving an AMVP motion vector of a current block, generating an AMVP prediction block of the current block based on the AMVP motion vector, deriving a merge motion vector of the current block, generating a merge prediction block of the current block based on the merge motion vector, and generating a prediction block of the current block by weighting the AMVP prediction block and the merge prediction block, wherein the merge motion vector can be derived by correcting an initial merge motion vector derived based on a merge candidate list.

[0022] A non-transitory computer-readable recording medium according to one embodiment of the present invention can store a bitstream generated by the image encoding method.

[0023] A bitstream transmission method according to one embodiment of the present invention can transmit a bitstream generated by the image encoding method.

[0024] The features briefly summarized above regarding the present disclosure are merely exemplary aspects of the detailed description of the present disclosure that follows and do not limit the scope of the present disclosure.

[0025] According to the present invention, a video encoding / decoding method and device with improved encoding / decoding efficiency can be provided.

[0026] Additionally, according to the present invention, a method for correcting a merge motion vector in AMVP-merge mode can be provided.

[0027] Additionally, according to the present invention, prediction accuracy can be improved.

[0028] The effects that can be obtained from the present disclosure are not limited to the effects mentioned above, and other effects that are not mentioned will be clearly understood by a person having ordinary skill in the art to which the present disclosure pertains from the description below.

[0029] Figure 1 is a block diagram showing the configuration according to one embodiment of an encoding device to which the present invention is applied.

[0030] Figure 2 is a block diagram showing the configuration according to one embodiment of a decryption device to which the present invention is applied.

[0031] FIG. 3 is a diagram schematically showing a video coding system to which the present invention can be applied.

[0032] FIG. 4 is a diagram for explaining an AMVP-merge mode prediction method according to one embodiment of the present invention.

[0033] FIG. 5 is a drawing for explaining a merge motion vector correction method using bidirectional matching according to an embodiment of the present invention.

[0034] FIG. 6 is a drawing for explaining a merge motion vector correction method using template matching according to one embodiment of the present invention.

[0035] FIG. 7 is a diagram for explaining four-directional information included in motion vector difference information according to one embodiment of the present invention.

[0036] FIG. 8 is a diagram for explaining 8-directional information included in motion vector difference information according to one embodiment of the present invention.

[0037] FIG. 9 is a diagram for explaining 16 direction information included in motion vector difference information according to one embodiment of the present invention.

[0038] Figure 10 is a flowchart illustrating an image decoding method according to one embodiment of the present invention.

[0039] FIG. 11 is a drawing exemplifying a content streaming system to which an embodiment according to the present invention can be applied.

[0040] A video decoding method according to one embodiment of the present invention includes the steps of: deriving an AMVP motion vector of a current block; generating an AMVP prediction block of the current block based on the AMVP motion vector; deriving a merge motion vector of the current block; generating a merge prediction block of the current block based on the merge motion vector; and generating a prediction block of the current block by weighting the AMVP prediction block and the merge prediction block, wherein the merge motion vector can be derived by correcting an initial merge motion vector derived based on a merge candidate list.

[0041] The present invention is susceptible to various modifications and embodiments. Therefore, specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present invention to specific embodiments, but rather to encompass all modifications, equivalents, and substitutes falling within the spirit and scope of the present invention. In the drawings, similar reference numerals designate the same or similar functions throughout. The shape and size of elements in the drawings may be provided by way of example only for clarity. The detailed description of the exemplary embodiments described below refers to the accompanying drawings, which illustrate specific embodiments. These embodiments are described in sufficient detail to enable those skilled in the art to practice the embodiments. It should be understood that the various embodiments, while different, are not necessarily mutually exclusive. For example, specific shapes, structures, and characteristics described herein may be implemented in other embodiments without departing from the spirit and scope of the present invention. Furthermore, it should be understood that the location or arrangement of individual components within each disclosed embodiment may be modified without departing from the spirit and scope of the embodiment. Accordingly, the detailed description set forth below is not intended to be taken in a limiting sense, and the scope of the exemplary embodiments, if properly described, is defined only by the appended claims, along with the full scope equivalents to which such claims are entitled.

[0042] In the present invention, terms such as first, second, etc. may be used to describe various components, but the components should not be limited by these terms. These terms are used solely to distinguish one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component. The term "and / or" includes a combination of multiple related described items or any of multiple related described items.

[0043] The components shown in the embodiments of the present invention are independently depicted to represent different characteristic functions, and do not mean that each component is composed of separate hardware or a single software component. That is, each component is listed and included as a separate component for convenience of explanation, and at least two components among each component may be combined to form a single component, or a single component may be divided into multiple components to perform a function, and such integrated and separate embodiments of each component are also included in the scope of the present invention as long as they do not deviate from the essence of the present invention.

[0044] The terminology used herein is merely used to describe specific embodiments and is not intended to limit the present invention. The singular expression includes the plural expression unless the context clearly indicates otherwise. In addition, some components of the present invention are not essential components that perform essential functions in the present invention and may be optional components merely for performance enhancement. The present invention may be implemented by including only components essential to realizing the essence of the present invention, excluding components used only for performance enhancement, and a structure including only essential components, excluding optional components used only for performance enhancement, is also within the scope of the present invention.

[0045] In an embodiment, the term "at least one" may mean one of a number greater than or equal to 1, such as 1, 2, 3, and 4. In an embodiment, the term "a plurality of" may mean one of a number greater than or equal to 2, such as 2, 3, and 4.

[0046] Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In describing the embodiments of this specification, if it is determined that a detailed description of a related known configuration or function may obscure the gist of this specification, the detailed description will be omitted. The same reference numerals will be used for identical components in the drawings, and duplicate descriptions of identical components will be omitted.

[0047] Glossary of Terms

[0048] Hereinafter, “video” may mean a single picture constituting a video, or may refer to the video itself. For example, “encoding and / or decoding of a video” may mean “encoding and / or decoding of a video,” or may mean “encoding and / or decoding of one of the videos constituting the video.”

[0049] Hereinafter, the terms "video" and "movie" may be used interchangeably and have the same meaning. Furthermore, the target image may be an encoding target image, which is the target of encoding, and / or a decoding target image, which is the target of decoding. Furthermore, the target image may be an input image input to an encoding device, or an input image input to a decoding device. Here, the target image may have the same meaning as the current image.

[0050] Hereinafter, the terms encoder and image encoding device may be used interchangeably and have the same meaning.

[0051] Hereinafter, the terms decoder and image decoding device may be used interchangeably and have the same meaning.

[0052] Hereinafter, “image”, “picture”, “frame” and “screen” may be used with the same meaning and may be used interchangeably.

[0053] Hereinafter, the term "target block" may refer to an encoding target block, which is the target of encoding, and / or a decoding target block, which is the target of decoding. Furthermore, the target block may refer to a current block, which is the target of current encoding and / or decoding. For example, the terms "target block" and "current block" may be used interchangeably and have the same meaning.

[0054] Hereinafter, "block" and "unit" may be used with the same meaning and may be used interchangeably. In addition, "unit" may mean including a luminance component block and a corresponding chroma component block to distinguish it from a block. For example, a coding tree unit (CTU) may be composed of one luma component (Y) coding tree block (CTB) and two chroma component (Cb, Cr) coding tree blocks associated with it.

[0055] Hereinafter, the terms “sample,” “pixel,” and “pixel” may be used interchangeably and have the same meaning. Here, a sample may represent a basic unit that constitutes a block.

[0056] Hereinafter, “inter” and “between screens” may be used interchangeably and have the same meaning.

[0057] Hereinafter, “intra” and “within screen” may be used interchangeably and have the same meaning.

[0058]

[0059] Figure 1 is a block diagram showing the configuration according to one embodiment of an encoding device to which the present invention is applied.

[0060] The encoding device (100) may be an encoder, a video encoding device, or an image encoding device. A video may include one or more images. The encoding device (100) may sequentially encode one or more images.

[0061] Referring to FIG. 1, the encoding device (100) may include an image segmentation unit (110), an intra prediction unit (120), a motion prediction unit (121), a motion compensation unit (122), a switch (115), a subtractor (113), a transformation unit (130), a quantization unit (140), an entropy encoding unit (150), an inverse quantization unit (160), an inverse transformation unit (170), an adder (117), a filter unit (180), and a reference picture buffer (190).

[0062] Additionally, the encoding device (100) can generate a bitstream including encoded information through encoding an input image and output the generated bitstream. The generated bitstream can be stored in a computer-readable recording medium or can be streamed via a wired / wireless transmission medium.

[0063] The video segmentation unit (110) can segment the input video into various forms to increase the efficiency of video encoding / decoding. That is, the input video is composed of multiple pictures, and one picture can be hierarchically segmented and processed for compression efficiency, parallel processing, etc. For example, one picture can be segmented into one or more tiles or slices, which can then be segmented into multiple Coding Tree Units (CTUs). Alternatively, one picture can first be segmented into multiple sub-pictures defined as groups of rectangular slices, and each sub-picture can then be segmented into the tiles / slices. Here, the sub-pictures can be utilized to support the function of partially independently encoding / decoding and transmitting the picture. Since multiple sub-pictures can each be individually restored, there is an advantage of easy editing in applications that configure multi-channel input into a single picture. In addition, tiles can be segmented horizontally to generate bricks. Here, a brick can be utilized as the basic unit of intra-picture parallel processing. In addition, one CTU can be recursively split into a quadtree (QT), and the terminal node of the split can be defined as a coding unit (CU). The CU can be split into a prediction unit (PU) and a transformation unit (TU), and prediction and splitting can be performed. Meanwhile, the CU can be utilized as a prediction unit and / or a transformation unit itself. Here, for flexible splitting, each CTU can be recursively split into a multi-type tree (MTT) as well as a quadtree (QT). Splitting of a CTU into a multi-type tree can start from the terminal node of a QT, and the MTT can be composed of a binary tree (BT) and a triple tree (TT).For example, the MTT structure can be divided into vertical binary split mode (SPLIT_BT_VER), horizontal binary split mode (SPLIT_BT_HOR), vertical ternary split mode (SPLIT_TT_VER), and horizontal ternary split mode (SPLIT_TT_HOR). In addition, the minimum block size (MinQTSize) of the quad tree of the luminance block during splitting can be set to 16x16, the maximum block size (MaxBtSize) of the binary tree can be set to 128x128, and the maximum block size (MaxTtSize) of the triple tree can be set to 64x64. In addition, the minimum block size (MinBtSize) of the binary tree and the minimum block size (MinTtSize) of the triple tree can be set to 4x4, and the maximum depth (MaxMttDepth) of the multi-type tree can be set to 4. Additionally, to improve the encoding efficiency of the I slice, a dual tree can be applied that uses different CTU partition structures for luminance and chrominance components. On the other hand, in the P and B slices, the luminance and chrominance CTBs (Coding Tree Blocks) within the CTU can be partitioned into a single tree that shares the coding tree structure.

[0064] The encoding device (100) may perform encoding on the input image in intra mode and / or inter mode. Alternatively, the encoding device (100) may perform encoding on the input image in a third mode (e.g., IBC mode, Palette mode, etc.) other than the intra mode and inter mode. However, if the third mode has functional characteristics similar to the intra mode or inter mode, it may be classified as intra mode or inter mode for convenience of explanation. In the present invention, the third mode will be classified and described separately only when a specific description is required.

[0065] When the intra mode is used as the prediction mode, the switch (115) can be switched to intra, and when the inter mode is used as the prediction mode, the switch (115) can be switched to inter. Here, the intra mode can mean an intra-screen prediction mode, and the inter mode can mean an inter-screen prediction mode. The encoding device (100) can generate a prediction block for an input block of an input image. In addition, after the prediction block is generated, the encoding device (100) can encode a residual block using a residual of the input block and the prediction block. The input image can be referred to as a current image that is currently a target of encoding. The input block can be referred to as a current block that is currently a target of encoding or an encoding target block.

[0066] When the prediction mode is intra mode, the intra prediction unit (120) can use samples of blocks already encoded / decoded around the current block as reference samples. The intra prediction unit (120) can perform spatial prediction on the current block using the reference samples, and can generate prediction samples for the input block through spatial prediction. Here, intra prediction can mean prediction within the screen.

[0067] As an intra prediction method, non-directional prediction modes such as DC mode and Planar mode, as well as directional prediction modes (e.g., 65 directions) can be applied. Here, the intra prediction method can be expressed as an intra prediction mode or an intra-screen prediction mode.

[0068] When the prediction mode is inter mode, the motion prediction unit (121) can search for an area that best matches the input block from the reference image during the motion prediction process and derive a motion vector using the searched area. At this time, the area can be used as a search area. The reference image can be stored in the reference picture buffer (190). Here, when encoding / decoding for the reference image is processed, it can be stored in the reference picture buffer (190).

[0069] The motion compensation unit (122) can generate a prediction block for the current block by performing motion compensation using a motion vector. Here, inter prediction may mean inter-screen prediction or motion compensation.

[0070] The above motion prediction unit (121) and motion compensation unit (122) can generate a prediction block by applying an interpolation filter to a portion of an area within a reference image when the value of the motion vector does not have an integer value. In order to perform inter-screen prediction or motion compensation, it is possible to determine whether the motion prediction and motion compensation method of the prediction unit included in the corresponding encoding unit is one of Skip Mode, Merge Mode, Advanced Motion Vector Prediction (AMVP) mode, and Intra Block Copy (IBC) mode based on the encoding unit, and perform inter-screen prediction or motion compensation according to each mode.

[0071] In addition, based on the above inter-screen prediction method, the AFFINE mode of sub-PU based prediction, the SbTMVP (Subblock-based Temporal Motion Vector Prediction) mode, and the MMVD (Merge with MVD) mode and the GPM (Geometric Partitioning Mode) mode of PU based prediction can be applied. In addition, in order to improve the performance of each mode, the HMVP (History based MVP), the PAMVP (Pairwise Average MVP), the CIIP (Combined Intra / Inter Prediction), the AMVR (Adaptive Motion Vector Resolution), the BDOF (Bi-Directional Optical-Flow), the BCW (Bi-predictive with CU Weights), the LIC (Local Illumination Compensation), the TM (Template Matching), and the OBMC (Overlapped Block Motion Compensation) can be applied.

[0072] Among these, AFFINE mode is a technology that is used in both AMVP and MERGE modes and also has high encoding efficiency. In the existing video coding standard, since MC (Motion Compensation) is performed by considering only the parallel translation of the block, there was a disadvantage in that it could not properly compensate for motions that occur in reality, such as zoom in / out and rotation. To supplement this, a 4-parameter affine motion model using two control point motion vectors (CPMV) and a 6-parameter affine motion model using three control point motion vectors can be applied to inter prediction. Here, CPMV is a vector representing the affine motion model of one of the upper left, upper right, and lower left of the current block.

[0073] The subtractor (113) can generate a residual block using the difference between the input block and the predicted block. The residual block may also be referred to as a residual signal. The residual signal may refer to the difference between the original signal and the predicted signal. Alternatively, the residual signal may be a signal generated by transforming, quantizing, or transforming and quantizing the difference between the original signal and the predicted signal. The residual block may be a residual signal in block units.

[0074] The transform unit (130) can perform a transform on the residual block to generate a transform coefficient and output the generated transform coefficient. Here, the transform coefficient may be a coefficient value generated by performing a transform on the residual block. When the transform skip mode is applied, the transform unit (130) may also skip the transform on the residual block.

[0075] Quantized levels can be generated by applying quantization to transform coefficients or residual signals. In the following embodiments, quantized levels may also be referred to as transform coefficients.

[0076] For example, a 4x4 luminance residual block generated through within-screen prediction can be transformed using a basis vector based on DST (Discrete Sine Transform), and the remaining residual blocks can be transformed using a basis vector based on DCT (Discrete Cosine Transform). In addition, through RQT (Residual Quad Tree) technology, the transform block is divided into a quad tree shape for one block, and after performing transformation and quantization on each transform block divided through RQT, a coded block flag (cbf) can be transmitted to increase encoding efficiency when all coefficients become 0.

[0077] Another alternative is to apply Multiple Transform Selection (MTS) technology, which selectively performs transformation using multiple transformation bases. That is, instead of dividing CUs into TUs via RQT, a Sub-block Transform (SBT) technology can perform a function similar to TU division. Specifically, SBT is applied only to inter-screen prediction blocks, and unlike RQT, it can divide the current block into ½ or ¼ blocks vertically or horizontally, and then perform transformation on only one of the blocks. For example, in a vertically divided block, the transformation can be performed on the leftmost or rightmost block, and in a horizontally divided block, the transformation can be performed on the topmost or bottommost block.

[0078] Additionally, LFNST (Low Frequency Non-Separable Transform), a secondary transform technique that further transforms the residual signal converted to the frequency domain through DCT or DST, can be applied. LFNST additionally performs a transform on the low-frequency region of 4x4 or 8x8 in the upper left, which allows the residual coefficients to be concentrated in the upper left.

[0079] The quantization unit (140) can generate a quantized level by quantizing a transform coefficient or residual signal according to a quantization parameter (QP), and can output the generated quantized level. At this time, the quantization unit (140) can quantize the transform coefficient using a quantization matrix.

[0080] For example, a quantizer with QP values ​​of 0 to 51 can be used. Alternatively, if the image size is larger and high encoding efficiency is required, a QP of 0 to 63 can be used. In addition, a Dependent Quantization (DQ) method that uses two quantizers instead of a single quantizer can be applied. DQ performs quantization using two quantizers (e.g., Q0 and Q1), but even without signaling information about the use of a specific quantizer, the quantizer to be used for the next transform coefficient can be selected based on the current state through a state transition model.

[0081] The entropy encoding unit (150) can generate a bitstream by performing entropy encoding according to a probability distribution on values ​​produced by the quantization unit (140) or coding parameter values ​​produced during the encoding process, and can output the bitstream. The entropy encoding unit (150) can perform entropy encoding on information about image samples and information for decoding the image. For example, the information for decoding the image can include syntax elements, etc.

[0082] When entropy encoding is applied, a small number of bits are allocated to symbols with a high occurrence probability, and a large number of bits are allocated to symbols with a low occurrence probability, thereby representing the symbols, whereby the size of the bit string for the symbols to be encoded can be reduced. The entropy encoding unit (150) can use an encoding method such as exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), or Context-Adaptive Binary Arithmetic Coding (CABAC) for entropy encoding. For example, the entropy encoding unit (150) can perform entropy encoding using a Variable Length Coding / Code (VLC) table. In addition, the entropy encoding unit (150) may perform arithmetic encoding using the binarization method, probability model, and context model derived from the binarization method of the target symbol and the probability model of the target symbol / bin.

[0083] In this regard, when applying CABAC, the table probability update method can be changed to a simple formula-based table update method to reduce the size of the probability table stored in the decryption device. Furthermore, two different probability models can be used to obtain more accurate symbol probability values.

[0084] The entropy encoding unit (150) can change a two-dimensional block form coefficient into a one-dimensional vector form through a transform coefficient scanning method to encode a transform coefficient level (quantized level).

[0085] Coding parameters may include not only information (flags, indexes, etc.) encoded in an encoding device (100) and signaled to a decoding device (200), such as syntax elements, but also information derived during an encoding process or a decoding process, and may mean information necessary when encoding or decoding an image.

[0086] Here, signaling a flag or index may mean that the encoder entropy encodes the flag or index and includes it in the bitstream, and that the decoder entropy decodes the flag or index from the bitstream.

[0087] The encoded current image can be used as a reference image for other images to be processed later. Accordingly, the encoding device (100) can reconstruct or decode the encoded current image again and store the reconstructed or decoded image as a reference image in the reference picture buffer (190).

[0088] The quantized level can be dequantized in the dequantization unit (160) and inversely transformed in the inverse transformation unit (170). The dequantized and / or inversely transformed coefficients can be combined with a prediction block through an adder (117), and a reconstructed block can be generated by combining the dequantized and / or inversely transformed coefficients and the prediction block. Here, the dequantized and / or inversely transformed coefficients refer to coefficients on which at least one of dequantization and inverse transformation has been performed, and may refer to a reconstructed residual block. The dequantization unit (160) and the inverse transformation unit (170) can be performed in the reverse process of the quantization unit (140) and the transformation unit (130).

[0089] The restoration block may pass through a filter unit (180). The filter unit (180) may apply a deblocking filter, a sample adaptive offset (SAO), an adaptive loop filter (ALF), a bilateral filter (BIF), a Luma Mapping with Chroma Scaling (LMCS), etc. as a filtering technique, in whole or in part, to the restoration sample, restoration block, or restoration image. The filter unit (180) may also be referred to as an in-loop filter. In this case, the in-loop filter is also used as a name excluding LMCS.

[0090] A deblocking filter can remove block distortion that occurs at the boundaries between blocks. Whether to apply a deblocking filter to the current block can be determined based on the samples contained in several columns or rows within the block. When applying a deblocking filter to a block, different filters can be applied depending on the required deblocking filtering strength.

[0091] Sample adaptive offset can be used to compensate for encoding errors by adding an appropriate offset value to sample values. Sample adaptive offset can compensate for the offset from the original image on a sample-by-sample basis for deblocked images. This can be done by dividing the samples contained in the image into a fixed number of regions, determining the regions to be offset, and applying the offset to those regions. Alternatively, the offset can be applied by considering the edge information of each sample.

[0092] Bilateral filter (BIF) can also compensate for the offset from the original image on a sample-by-sample basis for the deblocked image.

[0093] An adaptive loop filter can perform filtering based on a comparison between a reconstructed image and the original image. By dividing the samples contained in the image into predetermined groups and determining the filter to be applied to each group, filtering can be performed differentially for each group. Information regarding whether to apply an adaptive loop filter can be signaled for each coding unit (CU), and the shape and filter coefficients of the adaptive loop filter applied to each block can vary.

[0094] In LMCS (Luma Mapping with Chroma Scaling), luma mapping (LM) refers to remapping luminance values ​​through a piece-wise linear model, and chroma scaling (CS) refers to a technique that scales the residual values ​​of chrominance components according to the average luminance value of the prediction signal. In particular, LMCS can be utilized as an HDR correction technique that reflects the characteristics of HDR (High Dynamic Range) images.

[0095] The restored block or restored image that has passed through the filter unit (180) may be stored in the reference picture buffer (190). The restored block that has passed through the filter unit (180) may be a part of the reference image. In other words, the reference image may be a restored image composed of restored blocks that have passed through the filter unit (180). The stored reference image may be used for inter-screen prediction or motion compensation thereafter.

[0096] Figure 2 is a block diagram showing the configuration according to one embodiment of a decryption device to which the present invention is applied.

[0097] The decoding device (200) may be a decoder, a video decoding device, or an image decoding device.

[0098] Referring to FIG. 2, the decoding device (200) may include an entropy decoding unit (210), an inverse quantization unit (220), an inverse transformation unit (230), an intra prediction unit (240), a motion compensation unit (250), an adder (201), a switch (203), a filter unit (260), and a reference picture buffer (270).

[0099] The decoding device (200) can receive a bitstream output from the encoding device (100). The decoding device (200) can receive a bitstream stored in a computer-readable recording medium, or a bitstream streamed through a wired / wireless transmission medium. The decoding device (200) can perform decoding on the bitstream in intra mode or inter mode. In addition, the decoding device (200) can generate a restored image or a decoded image through decoding, and can output the restored image or the decoded image.

[0100] If the prediction mode used for decryption is intra mode, the switch (203) can be switched to intra. If the prediction mode used for decryption is inter mode, the switch (203) can be switched to inter.

[0101] The decoding device (200) can decode the input bitstream to obtain a reconstructed residual block and generate a prediction block. Once the reconstructed residual block and the prediction block are obtained, the decoding device (200) can generate a reconstructed block to be decoded by adding the reconstructed residual block and the prediction block. The block to be decoded may be referred to as a current block.

[0102] The entropy decoding unit (210) can generate symbols by performing entropy decoding according to a probability distribution for the bitstream. The generated symbols may include symbols in the form of quantized levels. Here, the entropy decoding method may be the reverse process of the entropy encoding method described above.

[0103] The entropy decoding unit (210) can change a one-dimensional vector-shaped coefficient into a two-dimensional block-shaped coefficient through a transform coefficient scanning method to decode a transform coefficient level (quantized level).

[0104] The quantized level can be inversely quantized in the inverse quantization unit (220) and inversely transformed in the inverse transformation unit (230). The quantized level can be generated as a restored residual block as a result of performing inverse quantization and / or inverse transformation. At this time, the inverse quantization unit (220) can apply a quantization matrix to the quantized level. The inverse quantization unit (220) and inverse transformation unit (230) applied to the decoding device can apply the same technology as the inverse quantization unit (160) and inverse transformation unit (170) applied to the encoding device described above.

[0105] When intra mode is used, the intra prediction unit (240) can generate a predicted block by performing spatial prediction on the current block using sample values ​​of already decoded blocks surrounding the block to be decoded. The intra prediction unit (240) applied to the decoding device can apply the same technology as the intra prediction unit (120) applied to the encoding device described above.

[0106] When the inter mode is used, the motion compensation unit (250) can generate a prediction block by performing motion compensation using a motion vector and a reference image stored in the reference picture buffer (270) on the current block. The motion compensation unit (250) can generate a prediction block by applying an interpolation filter to a portion of the reference image when the value of the motion vector does not have an integer value. In order to perform motion compensation, it is possible to determine whether the motion compensation method of the prediction unit included in the corresponding encoding unit is skip mode, merge mode, AMVP mode, or current picture reference mode based on the encoding unit, and motion compensation can be performed according to each mode. The motion compensation unit (250) applied to the decoding device can apply the same technology as the motion compensation unit (122) applied to the encoding device described above.

[0107] The adder (201) can add the restored residual block and the predicted block to generate a restored block. The filter unit (260) can apply at least one of an Inverse-LMCS, a deblocking filter, a sample adaptive offset, and an adaptive loop filter to the restored block or restored image. The filter unit (260) applied to the decoding device can apply the same filtering technology as that applied to the filter unit (180) applied to the encoding device described above.

[0108] The filter unit (260) can output a restored image. The restored block or restored image can be stored in the reference picture buffer (270) and used for inter prediction. The restored block that has passed through the filter unit (260) can be a part of the reference image. In other words, the reference image can be a restored image composed of restored blocks that have passed through the filter unit (260). The stored reference image can be used for inter-screen prediction or motion compensation thereafter.

[0109] FIG. 3 is a diagram schematically showing a video coding system to which the present invention can be applied.

[0110] A video coding system according to one embodiment may include an encoding device (10) and a decoding device (20). The encoding device (10) may transmit encoded video and / or image information or data to the decoding device (20) in the form of a file or streaming through a digital storage medium or a network.

[0111] An encoding device (10) according to one embodiment may include a video source generation unit (11), an encoding unit (12), and a transmission unit (13). A decoding device (20) according to one embodiment may include a reception unit (21), a decoding unit (22), and a rendering unit (23). The encoding unit (12) may be referred to as a video / image encoding unit, and the decoding unit (22) may be referred to as a video / image decoding unit. The transmission unit (13) may be included in the encoding unit (12). The reception unit (21) may be included in the decoding unit (22). The rendering unit (23) may include a display unit, and the display unit may be configured as a separate device or an external component.

[0112] The video source generation unit (11) can obtain video / images through a process of capturing, synthesizing, or generating video / images. The video source generation unit (11) can include a video / image capture device and / or a video / image generation device. The video / image capture device can include, for example, one or more cameras, a video / image archive including previously captured video / images, etc. The video / image generation device can include, for example, a computer, a tablet, a smartphone, etc., and can (electronically) generate video / images. For example, a virtual video / image can be generated through a computer, etc., in which case the video / image capture process can be replaced with a process of generating related data.

[0113] The encoding unit (12) can encode the input video / image. The encoding unit (12) can perform a series of procedures such as prediction, transformation, and quantization for compression and encoding efficiency. The encoding unit (12) can output encoded data (encoded video / image information) in the form of a bitstream. The detailed configuration of the encoding unit (12) can also be configured in the same manner as the encoding device (100) of FIG. 1 described above.

[0114] The transmission unit (13) can transmit encoded video / image information or data output in the form of a bitstream to the reception unit (21) of the decoding device (20) via a digital storage medium or a network in the form of a file or streaming. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmission unit (13) can include an element for generating a media file through a predetermined file format and can include an element for transmission via a broadcasting / communication network. The reception unit (21) can extract / receive the bitstream from the storage medium or network and transmit it to the decoding unit (22).

[0115] The decoding unit (22) can decode video / image by performing a series of procedures such as inverse quantization, inverse transformation, and prediction corresponding to the operation of the encoding unit (12). The detailed configuration of the decoding unit (22) can also be configured in the same manner as the decoding device (200) of FIG. 2 described above.

[0116] The rendering unit (23) can render the decrypted video / image. The rendered video / image can be displayed through the display unit.

[0117]

[0118] In this specification, an embodiment of a method for compensating a merge motion vector in an Advanced Motion Vector Prediction (AMVP)-Merge mode is described.

[0119] AMVP-Merge mode is a prediction mode that combines AMVP and Merge modes. In AMVP-Merge mode, AMVP prediction blocks are generated based on AMVP mode, and merge prediction blocks are generated based on Merge mode. Then, the AMVP prediction blocks and merge prediction blocks are weighted and combined to generate the prediction block of the current block.

[0120] To improve the accuracy of AMVP-merge mode prediction, the encoder and / or decoder of the present invention may correct the merge motion vector. Here, the merge motion vector refers to a motion vector derived based on a merge candidate list in merge mode. In this case, the merge candidate list may be a list storing motion vector information of reference blocks of the current block.

[0121] Additionally, the initial merge motion vector may mean the merge motion vector before correction, and the final merge motion vector may mean the merge motion vector after the initial merge motion vector has been corrected.

[0122] Additionally, a merge reference picture refers to a picture referenced for prediction of the current block in merge mode, and an AMVP reference picture refers to a picture referenced for prediction of the current block in AMVP mode.

[0123] Before explaining a method for correcting a merge motion vector, an AMVP-merge mode prediction method according to an embodiment of the present invention will be explained with reference to FIG. 4.

[0124]

[0125] FIG. 4 is a diagram for explaining an AMVP-merge mode prediction method according to one embodiment of the present invention.

[0126] In Fig. 4, the reference picture in L0 (410) in the L0 direction and the reference picture in L1 (420) in the L1 direction represent the past reference picture of the current picture (400) in the playback order and the future reference picture of the current picture (400) in the playback order, respectively. In addition, the AMVP prediction block (411) and the merge prediction block (421) represent the AMVP motion vector (MV AMVP , 412) based on the predicted block and merge motion vector (MV) Merge , 422) represents a prediction block based on.

[0127] POC (Picture Order Count) is a number assigned to pictures in chronological order. Therefore, a reference picture with a POC value smaller than that of the current picture represents a picture that is relatively older than the current picture, and a reference picture with a POC value larger than that of the current picture represents a picture that is relatively future than the current picture.

[0128] In Fig. 4, the distance (POCDiff) between the current picture (400) and the reference picture (410) in the L0 direction L0 , 413) means the absolute value of the difference between the POC value of the current picture and the POC value of the reference picture in the L0 direction. In addition, the distance (POCDiff) between the current picture (400) and the reference picture (420) in the L1 direction L1, 423) represents the absolute value of the difference between the POC value of the current picture and the POC value of the reference picture in the L1 direction. Meanwhile, POCDiff L0 and POCDiff L1 is any positive integer.

[0129] Therefore, in Fig. 4, the reference picture (410) in the L0 direction is POCDiff than the time (t) of the current picture (400).L0 It is a picture of the past, and the reference picture (420) in the L1 direction is POCDiff L1 It is a picture of the future.

[0130] AMVP mode motion information may include information about a reference picture (e.g., a reference index), motion vector candidate information, and motion vector difference information. AMVP mode motion information may be signaled in an encoder / decoder.

[0131] Referring to FIG. 4, an AMVP motion vector (412) can be derived in the AMVP mode. That is, the AMVP motion vector (412) can be derived based on AMVP mode motion information. Specifically, a motion vector of a surrounding block can be derived as a predicted motion vector based on motion vector candidate information, and the AMVP motion vector (412) can be derived by adding a differential vector based on motion vector differential information and a predicted motion vector. Then, an AMVP prediction block (411) of a current block (Current block, 401) can be generated based on the AMVP motion vector (412).

[0132] Merge mode motion information may include merge candidate index information that references the motion information. Merge mode motion information may be signaled in the encoder / decoder.

[0133] Referring to FIG. 4, a merge motion vector (422) can be derived in merge mode. That is, a merge motion vector (422) can be derived based on merge mode motion information. Specifically, a merge candidate can be determined from among candidates included in a merge candidate list based on merge candidate index information, and the motion vector of the determined merge candidate can be used as the merge motion vector. In addition, a merge prediction block (421) of the current block (401) can be generated based on the merge motion vector (422).

[0134] Meanwhile, the merge motion vector can be corrected. At this time, a merge prediction block of the current block can be generated based on the corrected merge motion vector.

[0135] Meanwhile, the merge motion vector before correction can be called the initial merge motion vector, and the corrected merge motion vector can be called the final merge motion vector.

[0136] In AMVP-merge mode, an AMVP prediction block (411) and a merge prediction block (421) may be weighted and combined to generate a prediction block of the current block (401). At this time, the merge prediction block may be a merge prediction block generated based on a corrected merge motion vector.

[0137] Meanwhile, weighted sum can be performed by applying the first weight value and the second weight value to the AMVP prediction block and the merge prediction block, respectively.

[0138] Meanwhile, in the AMVP-merge mode of FIG. 4, the AMVP reference picture is a reference picture in the L0 direction, and the merge reference picture is a reference picture in the L1 direction. However, this is just one example, and the AMVP reference picture and the merge reference picture may be reference pictures in the L0 or L1 direction. In this case, the AMVP-merge mode is a bidirectional prediction mode, so the AMVP reference picture and the merge reference picture must have different prediction directions. For example, if the AMVP reference picture is a reference picture in the L0 direction, the merge reference picture must be a reference picture in the L1 direction. As another example, if the AMVP reference picture is a reference picture in the L1 direction, the merge reference picture must be a reference picture in the L0 direction.

[0139] Meanwhile, the prediction mode of the current block is the distance between the current picture and the reference picture in the L0 direction (POCDiff L0, 413) and the distance between the current picture and the reference picture in the L1 direction (POCDiff L1, 423) can be determined in AMVP-merge mode, i.e. POCDiff L0and POCDiff L1 Independently, the prediction mode of the current block can be determined as AMVP-merge mode. For example, POCDiff L0 Wow POCDiff L1 AMVP-Merge mode prediction can be performed even when the POCDiff L0 Wow POCDiff L1 AMVP-Merge mode prediction can be performed even when the .

[0140]

[0141] Hereinafter, with reference to FIGS. 5 to 9, a merge motion vector correction method in AMVP-merge mode according to one embodiment of the present invention will be described.

[0142] In the conventional AMVP-Merge mode, when a merge prediction block is generated, a merge candidate is determined from among the candidates included in the merge candidate list, and the motion vector of the determined merge candidate is used as the merge motion vector. Therefore, there is a limitation in that optimal motion information is not reflected. Therefore, to improve prediction accuracy, the present invention proposes a method for correcting the merge motion vector in AMVP-Merge mode.

[0143]

[0144] FIG. 5 is a drawing for explaining a merge motion vector correction method using bidirectional matching according to one embodiment of the present invention.

[0145] In a merge motion vector correction method using bidirectional matching, the merge motion vector can be corrected based on bidirectional matching. That is, an initial merge motion vector derived based on a merge candidate list can be corrected by performing bidirectional matching, and a merge prediction block of the current block can be generated based on the corrected merge motion vector. Specifically, using the initial merge motion vector as a starting point, a search for a reference block most similar to an AMVP prediction block is performed in a merge reference picture, and the initial motion vector can be corrected so that a motion vector representing the searched reference block becomes the merge motion vector of the current block.

[0146] In Fig. 5, the reference picture in the L0 direction (Reference picture in L0, 510) and the reference picture in the L1 direction (Reference picture in L1, 520) represent the past reference picture of the current picture (500) in the playback order, and the future reference picture of the current picture (500) in the playback order, respectively. In addition, the AMVP prediction block (AMVP prediction block, 511) represents the AMVP motion vector (MV AMVP , 512) represents a prediction block based on the initial merge prediction block (521). And, the initial merge prediction block (521) represents the merge motion vector (MV) before correction. Merge , 522) represents a prediction block based on the corrected merge motion vector (MV) and the final merge prediction block (Final Merge prediction block, 524) represents a prediction block based on the corrected merge motion vector (MV) Merge ', 526) represents a prediction block based on.

[0147] In Fig. 5, the distance (POCDiff) between the current picture (500) and the reference picture (510) in the L0 direction L0, 513) means the absolute value of the difference between the POC value of the current picture and the POC value of the reference picture in the L0 direction. In addition, the distance (POCDiff) between the current picture (500) and the reference picture (520) in the L1 direction L1, 523) means the absolute value of the difference between the POC value of the current picture and the POC value of the reference picture in the L1 direction.

[0148] Therefore, in Fig. 5, the reference picture (510) in the L0 direction is POCDiff than the time (t) of the current picture (500). L0 It is a picture of the past, and the reference picture (520) in the L1 direction is POCDiff L1 It is a picture of the future.

[0149] Referring to FIG. 5, in the AMVP-merge mode, an initial merge motion vector (522) can be derived based on merge mode motion information. Specifically, a merge candidate can be determined from among candidates included in a merge candidate list based on merge candidate index information, and the motion vector of the determined merge candidate can be used as the initial merge motion vector (522). An initial merge prediction block (521) of the current block (501) can be generated based on the initial merge motion vector (522).

[0150] Then, a search can be performed in a merge reference picture, which is a reference picture (520) in the L1 direction, using the initial motion vector (522) as a starting point. At this time, the search can be performed within a preset m candidate vectors or a preset area (e.g., an nxn pixel area). At this time, m and n are arbitrary positive integers.

[0151] And, as a result of the search, the reference block most similar to the AMVP prediction block (511) can be derived as the final merge prediction block (524). Here, similarity may mean that the distortion with respect to the AMVP prediction block is the smallest. At this time, the distortion measurement method may be either the sum of absolute difference (SAD) measurement method or the sum of square error (SSE) measurement method.

[0152] And, the initial merge motion vector (522) can be corrected so that the motion vector representing the final merge prediction block becomes the final merge motion vector (526). At this time, the correction is performed by adding a differential merge motion vector (MV) to the initial merge motion vector (522). diffMerge , 525) can be added to obtain the final merge motion vector (526).

[0153] Meanwhile, information about the differential merge motion vector can be signaled in the encoder / decoder.

[0154] Meanwhile, the correction of the initial merge motion vector is the distance between the current picture and the reference picture in the L0 direction (POCDiff L0, 513) and the distance between the current picture and the reference picture in the L1 direction (POCDiff L1, 523) can be performed independently. For example, POCDiff L0 and POCDiff L1 Correction of the initial merge motion vectors can be performed even if they are not identical to each other.

[0155] Meanwhile, in the AMVP-merge mode of FIG. 5, the AMVP reference picture is a reference picture in the L0 direction and the merge reference picture is a reference picture in the L1 direction. However, this is just one example, and the AMVP reference picture and the merge reference picture may be reference pictures in the L0 or L1 direction. At this time, the AMVP-merge mode is a bidirectional prediction mode, so the AMVP reference picture and the merge reference picture must have different prediction directions. For example, if the AMVP reference picture is a reference picture in the L1 direction, the merge reference picture must be a reference picture in the L0 direction. At this time, the initial merge motion vector in the L0 direction can be corrected.

[0156] Also, in Fig. 5, information about the differential merge motion vector is signaled in the encoder / decoder, but this is only an example. A search may be performed in the decoder to derive the differential merge motion vector.

[0157] Meanwhile, in FIG. 5, the method for measuring the distortion between the AMVP prediction block and the reference block is either the SAD measurement method or the SSE measurement method, but this is only one example, and any measurement method may be used to measure the distortion.

[0158] Meanwhile, merge motion vector compensation using bidirectional matching can be adaptively applied depending on the number of samples in the encoding unit, the width and height of the encoding unit block, available information around the current block, and related syntax elements.

[0159] Then, the AMVP prediction block (511) and the merge prediction block can be weighted and combined to generate a prediction block of the current block (501). At this time, the merge prediction block is the final merge prediction block (524) indicated by the corrected merge motion vector.

[0160] Meanwhile, weighted summation can be performed by applying a first weight value and a second weight value to the AMVP prediction block and the merge prediction block, respectively. At this time, the first weight value and the second weight value can be determined as in mathematical expression 1.

[0161]

[0162]

[0163] In mathematical expression 1, P Final means the predicted block of the current block. And, P L0 means a prediction block included in a reference picture in the L0 direction, and in Fig. 5, the AMVP prediction block (511) corresponds to this. And, P L1 refers to a prediction block included in a reference picture in the L1 direction, and in Fig. 5, refers to the final merge prediction block (524). And, POCDiff L0 means the distance between the current picture and the reference picture in the L0 direction, and POCDiff L1 represents the distance between the current picture and the reference picture in the L1 direction.

[0164] Also, in mathematical expression 1, W L0 and W L1 Each represents a weight value of a prediction block included in a reference picture in the L0 direction and a weight value of a prediction block included in a reference picture in the L1 direction. Therefore, in Fig. 5, W L0 corresponds to the first weight value, which is the weight value of the AMVP prediction block (511), and W L1 corresponds to the second weight value, which is the weight value of the final merge prediction block (524).

[0165] According to mathematical formula 1, POCDiff L0 Wow POCDiff L1 If are the same, the prediction block of the current block can be the average of the AMVP prediction block and the merge prediction block. In addition, according to mathematical expression 1, W L0 is POCDiff L1 is proportional to W L1is POCDiff L0 is proportional to

[0166] Meanwhile, the first weight value and the second weight value determined according to mathematical expression 1 can be signaled in the encoder / decoder.

[0167] Additionally, the first weight value and the second weight value determined according to mathematical expression 1 can be calculated in the decoder without signaling.

[0168] Another method for determining weight values ​​may be to determine the first and second weight values ​​using the quantization parameters (QP) of the reference picture. For example, when the QPs of the reference pictures in the L0 direction and the L1 direction are different, the first and second weight values ​​may be determined so that a higher weight value is applied to a prediction block included in the reference picture with a lower QP. As another example, an arbitrary weight value according to the QP may be determined according to an agreement between the encoder and decoder.

[0169] In another method of determining weight values, the first weight value and the second weight value may be determined using previously coded syntax elements. For example, using syntax elements indicating prediction mode information of neighboring blocks of the current block, if a certain percentage or more of the prediction modes of the neighboring blocks are merge mode, the second weight value may be determined to be greater than the first weight value. In another example, using syntax elements indicating prediction mode information of neighboring blocks of the current block, if a certain percentage or more of the prediction modes of the neighboring blocks are AMVP mode, the first weight value may be determined to be greater than the second weight value. In this case, the first weight value and the second weight value may be determined according to an agreement between the encoder / decoder or may be determined based on the ratio of the prediction modes of the neighboring blocks.

[0170] Another method for determining weight values ​​may be to determine the first weight value and the second weight value according to the picture type of the reference picture. For example, if one of the AMVP reference picture and the merge reference picture is a P picture and the reference picture in the opposite direction is a B picture, the first weight value and the second weight value may be determined so that a higher weight value is applied to the prediction block included in the P picture. In this case, the weight value according to the picture type may be determined according to an agreement between the encoder / decoder.

[0171] In another method of determining weight values, the first weight value and the second weight value can be determined from a predefined set of weight values. Specifically, K sets of weight values ​​can be defined, each set comprising a first weight value and a second weight value, which are weight values ​​of a prediction block included in a reference picture in the L0 direction and weight values ​​of a prediction block included in a reference picture in the L1 direction. In this case, K is an arbitrary positive integer. Then, an index for a determined set of weight values ​​among the sets of weight values ​​can be signaled in the encoder / decoder, and the first weight value and the second weight value can be determined as weight values ​​of the determined set of weight values.

[0172] Meanwhile, the binarization method of the index for the determined weight value set can be any efficient method, such as the fixed length code (FLC) method, the unary code method, or the truncated binary code method, considering the number K of the weight value set.

[0173]

[0174] FIG. 6 is a drawing for explaining a merge motion vector correction method using template matching according to one embodiment of the present invention.

[0175] In a method for correcting a merge motion vector using template matching, correction of the merge motion vector can be performed based on template matching. That is, in a merge mode, an initial merge motion vector derived based on a merge candidate list can be corrected based on a matching block derived by performing template matching, and a merge prediction block of a current block can be generated based on the corrected merge motion vector. Specifically, template matching is performed to search for a reference template most similar to a current template of a current block in a merge reference picture, and to derive a matching block based on the searched reference template, and the initial merge motion vector can be corrected so that a motion vector representing the matching block becomes a merge motion vector of the current block.

[0176] In Fig. 6, the reference picture in the L0 direction (Reference picture in L0, 610) and the reference picture in the L1 direction (Reference picture in L1, 620) represent the past reference picture of the current picture (600) in the playback order, and the future reference picture of the current picture (600) in the playback order, respectively. In addition, the AMVP prediction block (AMVP prediction block, 611) represents the AMVP motion vector (MV AMVP , 612) represents a prediction block based on the initial merge prediction block (Initial Merge reference block, 621). And, the initial merge prediction block (Initial Merge reference block, 621) represents the merge motion vector (MV) before correction. Merge , 622) represents a prediction block based on the template matching, and the matching block (Matching block, 624) represents a reference block derived by performing template matching. And the corrected merge motion vector (MV' Merge , 626) refers to a motion vector indicating a merge prediction block used to generate a prediction block of the current block.

[0177] And, the neighboring ┌ region (i.e., left, top, and top-left region) of the current block (601) can be defined as the current template (Current template, 602). And, the neighboring ┌ region (i.e., left, top, and top-left region) of the matching block (624) can be defined as the reference template (L1 reference template, 627). And, the neighboring ┌ region (i.e., left, top, and top-left region) of the AMVP prediction block (611) can be defined as the AMVP reference template (L0 AMVP reference template, 614).

[0178] In Fig. 6, the distance (POCDiff) between the current picture (600) and the reference picture (610) in the L0 direction L0 , 613) means the absolute value of the difference between the POC value of the current picture and the POC value of the reference picture in the L0 direction. In addition, the distance (POCDiff) between the current picture (600) and the reference picture (620) in the L1 direction L1, 623) means the absolute value of the difference between the POC value of the current picture and the POC value of the reference picture in the L1 direction.

[0179] Therefore, in Fig. 6, the reference picture (610) in the L0 direction is POCDiff than the time (t) of the current picture (600). L0 It is a picture of the past, and the reference picture (620) in the L1 direction is POCDiff L1 It is a picture of the future.

[0180] Referring to FIG. 6, an initial merge motion vector (622) can be derived based on merge mode motion information. Specifically, a merge candidate can be determined from among candidates included in a merge candidate list based on merge candidate index information, and the motion vector of the determined merge candidate can be used as the initial merge motion vector. Then, an initial merge prediction block (621) of the current block (601) can be generated based on the initial merge motion vector (622).

[0181] In addition, a reference template (627) most similar to the current template (602) can be searched for in the reference picture (620) in the L1 direction. Meanwhile, being most similar may mean that the distortion from the current template is the smallest. At this time, the distortion measurement method may be either the sum of absolute difference (SAD) measurement method or the sum of square error (SSE) measurement method.

[0182] And, in the searched reference template (627), a block corresponding to the current block (601) can be derived as a matching block (624).

[0183] And, the initial merge motion vector (622) can be corrected to become the final merge motion vector (626), which is a motion vector representing the matching block (624). Specifically, the correction is performed by adding a differential merge motion vector (MV) to the initial merge motion vector (622). diffMerge , 625) can be added to obtain the final merge motion vector (626). At this time, information about the differential merge motion vector can be signaled in the encoder / decoder.

[0184] Meanwhile, the correction of the initial merge motion vector is the distance between the current picture and the reference picture in the L0 direction (POCDiff L0, 613) and the distance between the current picture and the reference picture in the L1 direction (POCDiff L1, 623) can be performed independently. For example, POCDiff L0 Wow POCDiff L1 Correction of the initial merge motion vectors can be performed even if they are not identical to each other.

[0185] Additionally, in FIG. 6, information regarding differential merge motion vectors can be signaled in the encoder / decoder, but this is only an example. Differential merge motion vectors can also be derived by performing a search in the decoder.

[0186] Then, the AMVP prediction block (611) and the merge prediction block generated based on the final merge motion vector can be weighted and combined to generate a prediction block of the current block (601). At this time, the merge prediction block is a reference block indicated by the corrected merge motion vector.

[0187] Meanwhile, weighted summation can be performed by applying a first weight value and a second weight value to the AMVP prediction block and the merge prediction block, respectively. At this time, the first weight value and the second weight value can be determined as in mathematical expression 2.

[0188]

[0189]

[0190] In mathematical expression 2, P' Final means the predicted block of the current block, and P AMVP Wow P Merge denote AMVP prediction blocks and merge prediction blocks, respectively, and W AMVP Wow W Merge represent the first weight value and the second weight value, respectively.

[0191] And, D AMVP means the distortion value between the current template and the AMVP reference template, and D Merge refers to the distortion value between the current template and the reference template. At this time, the distortion measurement method may be either the SAD measurement method or the SSE measurement method.

[0192] According to Equation 2, if the distortion value between the AMVP reference template and the current template is greater than the distortion value between the reference template and the current template, the distortion of the AMVP prediction block is judged to be greater, and thus the merge prediction block is more reflected in the prediction block generation of the current block. In other words, the second weight value is greater than the first weight value. Conversely, the first weight value is greater than the second weight value.

[0193] Meanwhile, the first weight value and the second weight value determined according to mathematical expression 1 can be signaled in the encoder / decoder.

[0194] Additionally, the first weight value and the second weight value determined according to mathematical expression 1 can be calculated in the decoder without signaling.

[0195] Meanwhile, in the AMVP-merge mode of FIG. 6, the AMVP reference picture is a reference picture in the L0 direction and the merge reference picture is a reference picture in the L1 direction. However, this is just one example, and the AMVP reference picture and the merge reference picture may be reference pictures in the L0 or L1 direction. At this time, the AMVP-merge mode is a bidirectional prediction mode, so the AMVP reference picture and the merge reference picture must have different prediction directions. For example, if the AMVP reference picture is a reference picture in the L1 direction, the merge reference picture must be a reference picture in the L0 direction. At this time, the initial merge motion vector in the L0 direction can be corrected.

[0196] Also, in Fig. 6, the distortion measurement method with respect to the current template is either the SAD measurement method or the SSE measurement method, but this is only one example, and any measurement method may be used to measure the distortion.

[0197] Meanwhile, merge motion vector correction using template matching can be adaptively applied depending on the number of samples in the encoding unit, the width and height of the encoding unit block, available information around the current block, and related syntax elements.

[0198] Meanwhile, information regarding the size and shape of the current template can be determined by the encoder and transmitted to the decoder. Furthermore, the size and shape of the current template can be set to preset values ​​in the encoder / decoder.

[0199] For example, instead of a ┌-shaped template that uses both the left restoration area and the top restoration area, only the top restoration area or the left restoration area can be used as a template.

[0200] With respect to the template shape, in the example of FIG. 6, one ┌-shaped template is used to search for a reference template most similar to the current template, but this can also be done using, for example, an L-shaped template, a template that uses only the top region, a template that uses only the left region, or a template of any shape to search for a reference template most similar to the current template.

[0201]

[0202] A merge motion vector correction method based on a motion vector differential merge mode according to one embodiment of the present invention is a method of correcting a merge motion vector using motion vector differential information in an AMVP-merge mode. This will be described below with reference to FIGS. 7 to 9.

[0203] In a merge motion vector correction method based on a motion vector differential merge mode, a merge motion vector can be corrected using motion vector differential information. Specifically, a differential vector derived from the motion vector differential information can be used to correct an initial merge motion vector derived based on a merge candidate list. Then, a merge prediction block can be generated based on the corrected merge motion vector.

[0204] When the motion vector differential merge mode is applied, the motion vector information of the neighboring blocks of the current block can be used to generate a merge candidate list. At this time, the merge candidate list can be a list that stores the motion vector information of the reference blocks neighboring the current block.

[0205] Meanwhile, the merge candidates in the merge candidate list can be reordered. Specifically, the merge candidates in the merge candidate list can be reordered from highest priority to lowest priority, and the initial merge motion vector for the current block can be derived based on the reordered merge candidate list. In this case, a higher priority may mean matching a lower index in the merge candidate list.

[0206] Meanwhile, the method for reordering merge candidates in the merge candidate list may be an adaptive reordering of merge candidates with template matching (ARMC-TM). The adaptive reordering of merge candidates with template matching refers to a method for reordering merge candidates in the merge candidate list based on the similarity between the template of the reference block represented by each merge candidate and the template of the current block.

[0207] For example, merge candidates can be reordered so that a merge candidate corresponding to a template of a reference block with a high degree of similarity to the template of the current block has a higher priority in the merge candidate list. In this case, a high degree of similarity may indicate a small distortion between the template of the current block and the template of the reference block indicated by the merge candidate. Meanwhile, the distortion measurement method may be either the SSE method or the SAD method.

[0208] Additionally, an initial merge motion vector of the current block can be derived based on the merge candidate list. Specifically, when one merge candidate is determined among the candidates included in the merge candidate list, the motion vector of the determined merge candidate can be used as the initial merge motion vector of the current block.

[0209] Additionally, when a single merge candidate is determined from the merge candidate list, the optimal merge candidate can be determined, and the initial merge motion vector of the current block can be derived from the optimal merge candidate. In this case, the optimal merge candidate may refer to the candidate with the lowest cost value among the candidates included in the merge candidate list.

[0210] Additionally, when the merge candidates in the merge candidate list are reordered, the initial merge motion vector of the current block can be derived based on the reordered merge candidate list. Specifically, when a merge candidate is determined from the reordered merge candidates, the motion vector of the determined merge candidate can be used as the initial merge motion vector of the current block.

[0211] Additionally, the initial merge motion vector of the current block can be derived from one of the n merge candidates with a high priority in the merge candidate list. Specifically, one of the n candidates with a high priority in the merge candidate list can be determined, and the motion vector of the determined merge candidate can be used as the initial merge motion vector of the current block. In this case, n is an arbitrary positive integer that is equal to or less than the total number of merge candidates included in the merge candidate list.

[0212] Meanwhile, priority can be determined by cost values. Specifically, candidates in the merge candidate list with lower cost values ​​may have higher priorities. Here, a higher priority may mean matching a lower index in the merge candidate list.

[0213] Meanwhile, the cost value can be calculated using a predefined cost function. Furthermore, the cost value calculation method can be either the SAD method or the SSE method.

[0214] Then, the initial merge motion vector is corrected using motion vector difference information, and a merge prediction block of the current block can be generated using the corrected merge motion vector.

[0215] For example, the corrected merge motion vector can be calculated as in Equation 3.

[0216]

[0217]

[0218] In mathematical expression 3, the initial merge motion vector means the initial merge motion vector of the current block derived from the merge candidate list, and the final merge motion vector means the corrected merge motion vector.

[0219] Meanwhile, the difference vector can be derived using motion vector difference information.

[0220] Meanwhile, motion vector difference information may include direction information and distance information. In this case, the direction information may refer to information regarding the direction of the difference vector, and the distance information may refer to information regarding the size of the difference vector.

[0221] Meanwhile, the direction information may include horizontal direction information and vertical direction information.

[0222] Figures 7 to 9 are diagrams for explaining direction information included in motion vector difference information according to one embodiment of the present invention. Referring to Figures 7 to 9, a circle shape indicates the initial position of the difference vector, and a square shape indicates the direction of the difference vector.

[0223] Fig. 7 is a diagram for explaining four-directional information included in motion vector difference information according to one embodiment of the present invention. Specifically, Fig. 7 shows that the direction of the difference vector corresponds to one of four directions (right horizontal direction, left horizontal direction, upward vertical direction, and downward vertical direction).

[0224]

[0225]

[0226] Referring to Table 1, direction information indicating the direction of the difference vector among the four directions can be signaled by matching it to an index. Here, the direction information can include horizontal direction information and vertical direction information.

[0227] For example, direction information including horizontal direction (+1) information and vertical direction (0) information may be matched to index 0. Additionally, direction information including horizontal direction (0) information and vertical direction (+1) information may be matched to index 2. In this case, when direction information is signaled with index 0, the direction of the difference vector may be the right horizontal direction (700), and when direction information is signaled with index 2, the direction of the difference vector may be the upward vertical direction (710).

[0228] Meanwhile, Table 1 is an example in which the direction information of the difference vector can be signaled by matching it to an arbitrary index. Here, the arbitrary index can be a preset index.

[0229] Fig. 8 is a diagram for explaining eight direction information included in motion vector difference information according to one embodiment of the present invention. Specifically, Fig. 8 shows that the direction of the difference vector is one of eight directions (right horizontal direction, left horizontal direction, upper vertical direction, lower vertical direction, upper right diagonal direction, upper left diagonal direction, lower right diagonal direction, and lower left diagonal direction).

[0230] FIG. 9 is a diagram for explaining 16 directional information included in motion vector difference information according to one embodiment of the present invention. Specifically, FIG. 9 shows that the direction of the difference vector is one of 16 directions, which is an additional 8 directions added to the 8 directions described above.

[0231] The 8-directional information and 16-directional information described in FIGS. 8 and 9 can also be signaled by matching the direction information of the difference vector to an arbitrary index in the same manner as in Table 1 described above.

[0232] Meanwhile, although Figures 7 to 9 represent 4-direction information, 8-direction information, and 16-direction information, respectively, this is only an example, and the direction of the difference vector can be any one of N directions. Here, N is any positive integer.

[0233] Distance information included in the difference vector information can be signaled by matching any index in the range of 1 / 4 pixel to 32 pixels.

[0234]

[0235]

[0236] Referring to Table 2, the distances from 1 / 4 pixel to 32 pixels are matched to 8 indices, so that distance information can be signaled with an index matching the size of the difference vector. For example, if the size of the difference vector corresponds to a distance of 1 pixel, distance information can be signaled with the corresponding index 2, and if the size of the difference vector corresponds to a distance of 8 pixels, distance information can be signaled with the corresponding index 5.

[0237] Meanwhile, Table 2 shows an example in which pixel distances ranging from 1 / 4 pixel to 32 pixels are matched to K indices, and the distance information of the difference vector can be signaled by an index matching the pixel distance corresponding to the size of the difference vector. Here, K is an arbitrary positive integer.

[0238] Additionally, the distance information may include vertical distance information and horizontal distance information. The vertical distance information represents the absolute value of the vertical component of the difference vector. The horizontal distance information represents the absolute value of the horizontal component of the difference vector.

[0239] Meanwhile, the difference vector can be derived using motion vector difference information. Specifically, the direction of the difference vector can be determined using signaled direction information, and the magnitude of the difference vector can be determined using signaled distance information.

[0240] For example, if the direction of the difference vector is a right horizontal direction and the size corresponds to a distance of 1 pixel, motion vector difference information including an index for the right horizontal direction as direction information and an index for the distance of 1 pixel as distance information is signaled, and the initial merge motion vector can be corrected using the difference vector having the corresponding size and direction.

[0241] Meanwhile, merge motion vector compensation using the motion vector differential merge mode can be adaptively applied depending on the number of samples in the encoding unit, the width and height of the encoding unit block, available information around the current block, and related syntax elements.

[0242]

[0243] Fig. 10 is a flowchart illustrating an image decoding method according to one embodiment of the present invention. Specifically, Fig. 10 is a flowchart illustrating a merge motion vector correction method in AMVP-merge mode in an image decoding method. The merge motion vector correction method of Fig. 10 can be performed by a decoding device.

[0244] The video decoding device can derive the AMVP motion vector of the current block (S1000).

[0245] And, based on the AMVP motion vector, an AMVP prediction block of the current block can be generated (S1001).

[0246] And, the merge motion vector of the current block can be derived. Specifically, an initial merge motion vector can be derived based on a merge candidate list (S1002). And, a merge motion vector can be derived by correcting the initial merge motion vector (S1003). And, a merge prediction block of the current block can be generated based on the merge motion vector (S1004).

[0247] Meanwhile, the correction of the initial merge motion vector is performed based on bidirectional matching, and the bidirectional matching can search for a reference block most similar to the AMVP prediction block in the merge reference picture.

[0248] Meanwhile, the correction of the initial merge motion vector is performed based on template matching, and the template matching can search for a reference template most similar to the current template of the current block in the merge reference picture.

[0249] Meanwhile, the correction of the initial merge motion vector can be performed based on motion vector difference information.

[0250] Meanwhile, the motion vector difference information may include direction information and distance information.

[0251] Meanwhile, the direction information may include vertical direction information and horizontal direction information, and the distance information may include vertical distance information and horizontal distance information.

[0252] Meanwhile, the merge candidates in the merge candidate list can be reordered based on the similarity between the template of the reference block indicated by the merge candidates and the current template of the current block.

[0253] The correction of the above initial merge motion vector can be performed independently of the distance between the current picture located in the current block and the AMVP reference picture and the distance between the current picture and the merge reference picture.

[0254] And, the AMVP prediction block and the merge prediction block can be weighted and combined to generate a prediction block of the current block (S1005).

[0255] Meanwhile, the weighted sum is performed by applying a first weight value and a second weight value to the AMVP prediction block and the merge prediction block, respectively, and the first weight value and the second weight value can be determined based on a distance between a current picture in which the current block is located and the AMVP reference picture and a distance between the current picture and the merge reference picture.

[0256] Meanwhile, the weighted sum is performed by applying a first weight value and a second weight value to the AMVP prediction block and the merge prediction block, respectively, and the first weight value and the second weight value may be determined based on at least one of a quantization coefficient of the AMVP reference picture, a quantization coefficient of the merge reference picture, a picture type of the AMVP reference picture, a picture type of the merge reference picture, and a prediction mode of a surrounding reference block of the current block.

[0257] The above weighted sum is performed by applying a first weight value and a second weight value to the AMVP prediction block and the merge prediction block, respectively, and the first weight value and the second weight value can be determined based on a distortion value between the current template and the AMVP reference template and a distortion value between the current template and the searched reference template.

[0258] The first weight value may be proportional to a distortion value between the current template and the searched reference template, and the second weight value may be proportional to a distortion value between the current template and the AMVP reference template.

[0259] Meanwhile, the AMVP reference picture used to derive the AMVP prediction block and the merge reference picture used to derive the merge prediction block may have different prediction directions.

[0260] Meanwhile, the video decoding device can determine whether the prediction mode of the current block is AMVP-merge mode. Specifically, whether the prediction mode of the current block is AMVP-merge mode can be determined independently of the distance between the current picture in which the current block is located and the AMVP reference picture and the distance between the current picture and the merge reference picture.

[0261] Meanwhile, the steps described in FIG. 10 can be performed in the same manner in an image encoding method. Furthermore, a bitstream can be generated by an image encoding method including the steps described in FIG. 10. The bitstream can be stored on a non-transitory computer-readable recording medium and can also be transmitted (or streamed).

[0262]

[0263] FIG. 11 is a drawing exemplifying a content streaming system to which an embodiment according to the present invention can be applied.

[0264] As illustrated in FIG. 11, a content streaming system to which an embodiment of the present invention is applied may largely include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.

[0265] The encoding server compresses content input from multimedia input devices such as smartphones, cameras, and CCTVs into digital data, generates a bitstream, and transmits it to the streaming server. Alternatively, if multimedia input devices such as smartphones, cameras, and CCTVs directly generate bitstreams, the encoding server may be omitted.

[0266] The above bitstream can be generated by an image encoding method and / or an image encoding device to which an embodiment of the present invention is applied, and the streaming server can temporarily store the bitstream during the process of transmitting or receiving the bitstream.

[0267] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server can act as an intermediary to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, and the streaming server can transmit multimedia data to the user. At this time, the content streaming system may include a separate control server, and in this case, the control server may control commands / responses between each device within the content streaming system.

[0268] The streaming server can receive content from a media repository and / or encoding server. For example, when receiving content from the encoding server, the content can be received in real time. In this case, to provide a smooth streaming service, the streaming server can store the bitstream for a certain period of time.

[0269] Examples of the user devices may include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation devices, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, HMDs), digital TVs, desktop computers, digital signage, etc.

[0270] Each server within the above content streaming system can be operated as a distributed server, in which case data received from each server can be processed in a distributed manner.

[0271]

[0272] The above embodiments can be performed in the same or corresponding manner in an encoding device and a decoding device. In addition, an image can be encoded / decoded using at least one or a combination of at least one of the above embodiments.

[0273] The order in which the above embodiments are applied may be different in the encoding device and the decoding device. Alternatively, the order in which the above embodiments are applied may be the same in the encoding device and the decoding device.

[0274] The above embodiments can be performed for each of the luminance and chrominance signals. Alternatively, the above embodiments can be performed identically for the luminance and chrominance signals.

[0275] In the above embodiments, the methods are described based on a flowchart as a series of steps or units. However, the present invention is not limited to the order of the steps, and some steps may occur in a different order or simultaneously with other steps described above. Furthermore, those skilled in the art will understand that the steps depicted in the flowchart are not exclusive, and that other steps may be included, or one or more steps in the flowchart may be deleted without affecting the scope of the present invention.

[0276] The above embodiments may be implemented in the form of program commands that can be executed by various computer components and recorded on a computer-readable recording medium. The computer-readable recording medium may include program commands, data files, data structures, etc., either singly or in combination. The program commands recorded on the computer-readable recording medium may be those specifically designed and constructed for the present invention, or may be known and usable by those skilled in the art of computer software.

[0277] The bitstream generated by the encoding method according to the above embodiment can be stored in a non-transitory computer-readable recording medium. In addition, the bitstream stored in the non-transitory computer-readable recording medium can be decoded by the decoding method according to the above embodiment.

[0278] Here, examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as floptical disks, and hardware devices specifically configured to store and execute program instructions such as ROMs, RAMs, and flash memories. Examples of program instructions include not only machine language codes such as those generated by a compiler, but also high-level language codes that can be executed by a computer using an interpreter, etc. The hardware devices may be configured to operate as one or more software modules to perform processing according to the present invention, and vice versa.

[0279] Although the present invention has been described above with specific details such as specific components and limited examples and drawings, these are provided only to help a more general understanding of the present invention, and the present invention is not limited to the above examples, and those with ordinary knowledge in the technical field to which the present invention pertains can make various modifications and variations from this description.

[0280] Therefore, the idea of ​​the present invention should not be limited to the embodiments described above, and all things that are modified equally or equivalently to the following claims as well as the claims are considered to fall within the scope of the idea of ​​the present invention.

[0281]

[0282] The present invention can be used in a device for encoding / decoding an image and a recording medium storing a bitstream.

Claims

1. In the video decryption method, Step of deriving the AMVP motion vector of the current block; A step of generating an AMVP prediction block of the current block based on the AMVP motion vector; A step of deriving a merge motion vector of the current block; A step of generating a merge prediction block of the current block based on the merge motion vector; and A step of generating a prediction block of the current block by weighting the AMVP prediction block and the merge prediction block, An image decoding method, characterized in that the above merge motion vector is derived by correcting an initial merge motion vector derived based on a merge candidate list.

2. In paragraph 1, An image decoding method, characterized in that the AMVP reference picture used to derive the AMVP prediction block and the merge reference picture used to derive the merge prediction block have different prediction directions.

3. In paragraph 2, The correction of the above initial merge motion vector is performed based on bidirectional matching, A video decoding method, characterized in that the bidirectional matching searches for a reference block most similar to the AMVP prediction block in the merge reference picture.

4. In paragraph 3, The above weighted sum is performed by applying a first weight value and a second weight value to the AMVP prediction block and the merge prediction block, respectively, A video decoding method, characterized in that the first weight value and the second weight value are determined based on the distance between the current picture where the current block is located and the AMVP reference picture and the distance between the current picture and the merge reference picture.

5. In paragraph 3, The above weighted sum is performed by applying a first weight value and a second weight value to the AMVP prediction block and the merge prediction block, respectively, A video decoding method, characterized in that the first weight value and the second weight value are determined based on at least one of a quantization coefficient of the AMVP reference picture, a quantization coefficient of the merge reference picture, a picture type of the AMVP reference picture, a picture type of the merge reference picture, and a prediction mode of a surrounding reference block of the current block.

6. In paragraph 2, The correction of the above initial merge motion vector is performed based on template matching, A video decoding method, characterized in that the template matching searches for a reference template most similar to the current template of the current block in the merge reference picture.

7. In paragraph 6, The above weighted sum is performed by applying a first weight value and a second weight value to the AMVP prediction block and the merge prediction block, respectively, An image decoding method, characterized in that the first weight value and the second weight value are determined based on a distortion value between the current template and the AMVP reference template and a distortion value between the current template and the searched reference template.

8. In paragraph 7, The above first weight value is proportional to the distortion value between the current template and the searched reference template, An image decoding method, characterized in that the second weight value is proportional to a distortion value between the current template and the AMVP reference template.

9. In paragraph 1, An image decoding method, characterized in that the correction of the above initial merge motion vector is performed based on motion vector differential information.

10. In paragraph 9, An image decoding method, characterized in that the above motion vector difference information includes direction information and distance information.

11. In clause 10, An image decoding method, characterized in that the direction information includes vertical direction information and horizontal direction information, and the distance information includes vertical distance information and horizontal distance information.

12. In paragraph 9, An image decoding method, characterized in that the merge candidates in the merge candidate list are reordered based on the similarity between the template of the reference block indicated by the merge candidates and the current template of the current block.

13. In paragraph 2, A video decoding method, characterized in that the correction of the initial merge motion vector is performed independently of the distance between the current picture located in the current block and the AMVP reference picture and the distance between the current picture and the merge reference picture.

14. In paragraph 2, Further comprising a step of determining whether the prediction mode of the current block is AMVP-merge mode; A video decoding method, characterized in that the step of determining whether the prediction mode of the current block is the AMVP-merge mode is independently determined based on the distance between the current picture in which the current block is located and the AMVP reference picture and the distance between the current picture and the merge reference picture.

15. In a video encoding method, Step of deriving the AMVP motion vector of the current block; A step of generating an AMVP prediction block of the current block based on the AMVP motion vector; A step of deriving a merge motion vector of the current block; A step of generating a merge prediction block of the current block based on the merge motion vector; and A step of generating a prediction block of the current block by weighting the AMVP prediction block and the merge prediction block, An image encoding method, characterized in that the above merge motion vector is derived by correcting an initial merge motion vector derived based on a merge candidate list.

16. A non-transitory computer-readable recording medium storing a bitstream generated by a video encoding method, The above image encoding method is, Step of deriving the AMVP motion vector of the current block; A step of generating an AMVP prediction block of the current block based on the AMVP motion vector; A step of deriving a merge motion vector of the current block; A step of generating a merge prediction block of the current block based on the merge motion vector; and A step of generating a prediction block of the current block by weighting the AMVP prediction block and the merge prediction block, A non-transitory computer-readable recording medium, characterized in that the above merge motion vector is derived by correcting an initial merge motion vector derived based on a merge candidate list.

17. A method for transmitting a bitstream generated by a video encoding method, The above transmission method comprises a step of transmitting the bitstream, The above encoding method is, Step of deriving the AMVP motion vector of the current block; A step of generating an AMVP prediction block of the current block based on the AMVP motion vector; A step of deriving a merge motion vector of the current block; A step of generating a merge prediction block of the current block based on the merge motion vector; and A step of generating a prediction block of the current block by weighting the AMVP prediction block and the merge prediction block, A transmission method, characterized in that the above merge motion vector is derived by correcting an initial merge motion vector derived based on a merge candidate list.

Citation Information

Patent Citations

  • Method and apparatus for processing a video signal

    KR1020180005119A

  • Apparatus of preventing lonely death using artificial intelligence

    KR1020250025532A

  • KR20210144944A