Image encoding / decoding method based on bidirectional inter prediction, method for transmitting bitstream, and recording medium having bitstream stored therein

By using the AMVP mode and the merging mode in image encoding/decoding, constructing and sorting the reference picture list and the merging candidate list, the problem of low image encoding/decoding efficiency in the prior art is solved, and more efficient image transmission and storage is achieved.

CN119404505APending Publication Date: 2025-02-07LG ELECTRONICS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380051311.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-10-13
Filing Date
2023-07-05
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The prior art is difficult to effectively improve image encoding/decoding efficiency, especially when processing high-resolution and high-quality images, the transmission and storage costs are high.

Method used

The prediction block is generated by AMVP mode and merge mode. By constructing the reference picture list and merge candidate list, reordering the merge candidate list, and using the motion information refinement method and the two-way motion information derivation method, the accuracy of the prediction block is improved.

Benefits of technology

Improves the efficiency of image encoding/decoding, generates more accurate prediction blocks, reduces transmission and storage costs, and supports storage and transmission of non-transitory computer-readable recording media.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119404505A_ABST
    Figure CN119404505A_ABST
Patent Text Reader

Abstract

An image encoding / decoding method, a bit stream transmission method, and a computer-readable recording medium for storing a bit stream are provided. An image decoding method according to the present disclosure relates to an image decoding method performed by an image decoding device, and may comprise the steps of: reconstructing a picture from a bitstream; and transforming the reconstructed picture based on one of the at least one candidate transformation, where the at least one candidate transformation corresponds to a rotational transformation or a symmetric transformation for the picture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to an image encoding / decoding method, a method of transmitting a bitstream, and a recording medium storing the bitstream, and more particularly, to a method of generating a prediction block in an AMVP mode and a merge mode so as to generate a bidirectional inter-frame prediction. Background Art

[0002] Recently, in various fields, the demand for high-resolution and high-quality images such as high-definition (HD) images and ultra-high-definition (UHD) images is increasing. As the resolution and quality of image data are improved, the amount of information or bit amount transmitted is relatively increased compared to existing image data. The increase in the amount of information or bit amount transmitted leads to an increase in transmission cost and storage cost.

[0003] Therefore, efficient image compression technology is needed to effectively transmit, store, and reproduce information about high-resolution and high-quality images. Summary of the invention

[0004] Technical issues

[0005] An object of the present disclosure is to provide an image encoding / decoding method and apparatus with improved encoding / decoding efficiency.

[0006] In addition, an object of the present disclosure is to propose an amvpMerge mode in which an arbitrary prediction direction is predicted in the AMVP mode and another prediction direction is predicted in the merge mode.

[0007] In addition, an object of the present disclosure is to propose a method for constructing a reference picture list for amvpMerge mode.

[0008] In addition, an object of the present disclosure is to propose a method for constructing a merge candidate list for amvpMerge mode.

[0009] In addition, an object of the present disclosure is to propose a method for reordering a merge candidate list for amvpMerge mode.

[0010] In addition, the purpose of the present disclosure is to propose a motion information refinement method for the amvpMerge mode.

[0011] In addition, the purpose of the present disclosure is to propose a bidirectional motion information derivation method for the amvpMerge mode.

[0012] In addition, another object of the present disclosure is to provide a non-transitory computer-readable recording medium storing a bit stream generated by the image encoding method according to the present disclosure.

[0013] In addition, another object of the present disclosure is to provide a non-transitory computer-readable recording medium storing a bit stream received and decoded by the image decoding device according to the present disclosure and used to reconstruct an image.

[0014] In addition, another object of the present disclosure is to provide a method of transmitting a bit stream generated by the image encoding method according to the present disclosure.

[0015] The technical problems solved by the present disclosure are not limited to the above-mentioned technical problems, and other technical problems not described here will be clear to those skilled in the art through the following description.

[0016] Technical Solution

[0017] An image decoding method according to one aspect of the present disclosure is an image decoding method performed by an image decoding device. The image decoding method may include: determining prediction modes respectively applied to prediction directions of a current block, the prediction modes including an advanced motion vector prediction (AMVP) mode and a merge mode; generating a prediction block for a prediction direction based on at least one reference picture set, at least one AMVP candidate, and at least one merge candidate; and deriving a prediction block of the current block based on the prediction block. Among the prediction directions, a prediction mode of a specific prediction direction may be determined as an AMVP mode, and a prediction mode of another prediction direction may be determined as a merge mode.

[0018] An image encoding method according to another aspect of the present disclosure is an image encoding method performed by an image encoding device. The image encoding method may include: determining prediction modes respectively applied to prediction directions of a current block, the prediction modes including an advanced motion vector prediction (AMVP) mode and a merge mode; generating a prediction block for the prediction direction based on at least one reference picture set, at least one AMVP candidate, and at least one merge candidate; and deriving a prediction block of the current block based on the prediction block. Among the prediction directions, the prediction mode of a specific prediction direction may be determined as the AMVP mode, and the prediction mode of another prediction direction may be determined as the merge mode.

[0019] A computer-readable recording medium according to another aspect of the present disclosure may store a bit stream generated by the image encoding method or apparatus of the present disclosure.

[0020] A transmitting method according to another aspect of the present disclosure may transmit a bit stream generated by the image encoding method or apparatus of the present disclosure.

[0021] The above briefly summarized features of the present disclosure are merely exemplary aspects of the following detailed description of the present disclosure and do not limit the scope of the present disclosure.

[0022] Beneficial Effects

[0023] According to the present disclosure, an image encoding / decoding method and apparatus with improved encoding / decoding efficiency can be provided.

[0024] Furthermore, according to the present disclosure, it is possible to generate a more accurate prediction block by predicting an arbitrary prediction direction in the AMVP mode and predicting another prediction direction in the merge mode.

[0025] Furthermore, according to the present disclosure, compression efficiency can be improved by performing slice-level processing and low-level processing on low-latency slices.

[0026] Furthermore, according to the present disclosure, there may be provided a non-transitory computer-readable recording medium storing a bit stream generated by the image encoding method according to the present disclosure.

[0027] Furthermore, according to the present disclosure, there may be provided a non-transitory computer-readable recording medium storing a bit stream received and decoded by the image decoding apparatus according to the present disclosure and used to reconstruct an image.

[0028] Furthermore, according to the present disclosure, a method of transmitting a bit stream generated by the image encoding method according to the present disclosure may be provided.

[0029] Those skilled in the art will understand that the effects that can be achieved through the present disclosure are not limited to what has been specifically described above, and other advantages of the present disclosure will be more clearly understood from the detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 is a diagram schematically showing a video encoding system to which one embodiment of the present disclosure can be applied.

[0031] Figure 2 is a diagram schematically showing an image encoding device to which one embodiment of the present disclosure can be applied.

[0032] Figure 3 is a diagram schematically showing an image decoding device to which one embodiment of the present disclosure can be applied.

[0033] Figure 4 is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure.

[0034] Figure 5a and 5b is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure.

[0035] Figures 6a to 6c is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure.

[0036] Figure 7is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure.

[0037] Figure 8 is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure.

[0038] Figure 9a and 9b is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure.

[0039] Fig.10 is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure.

[0040] Fig.11 is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure.

[0041] Fig.12a and 12b is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure.

[0042] Fig.13a and 13b is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure.

[0043] Fig.14 is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure.

[0044] Fig.15 is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure.

[0045] Fig.16 is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure.

[0046] Fig.17 is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure.

[0047] Fig.18a and 18b is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure.

[0048] Fig.19 is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure.

[0049] Fig.20a and 20b is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure.

[0050] Fig.21 is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure.

[0051] Fig. 22 is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure.

[0052] Fig.23 is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure.

[0053] Fig.24 is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure.

[0054] Fig.25 is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure.

[0055] Fig.26 is a view illustrating a content streaming system to which an embodiment of the present disclosure can be applied. DETAILED DESCRIPTION

[0056] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings to facilitate implementation by those skilled in the art. However, the present disclosure can be implemented in various forms and is not limited to the embodiments described herein.

[0057] When describing the present disclosure, if it is determined that the detailed description of related known functions or configurations makes the scope of the present disclosure unnecessarily ambiguous, the detailed description thereof will be omitted. In the drawings, parts irrelevant to the description of the present disclosure are omitted, and like reference numerals are given to like parts.

[0058] In the present disclosure, when a component is "connected", "coupled" or "linked" to another component, it may include not only a direct connection relationship but also an indirect connection relationship with intermediate components. In addition, when a component "includes" or "has" other components, unless otherwise specified, it means that other components may also be included, rather than excluding other components.

[0059] In the present disclosure, the terms first, second, etc. are used only for the purpose of distinguishing one component from other components, and do not limit the order or importance of the components unless otherwise specified. Accordingly, within the scope of the present disclosure, a first component in one embodiment may be referred to as a second component in another embodiment, and similarly, a second component in one embodiment may be referred to as a first component in another embodiment.

[0060] In the present disclosure, components that are distinguished from each other are intended to clearly describe each feature and do not mean that the components must be separated. That is, multiple components can be integrated and implemented in one hardware or software unit, or one component can be distributed and implemented in multiple hardware or software units. Therefore, even if not specifically stated, implementations in which these components are integrated or distributed are also included in the scope of the present disclosure.

[0061] In the present disclosure, the components described in each embodiment are not necessarily indispensable components, and some components may be optional components. Therefore, the embodiments consisting of a subset of the components described in the embodiments are also included in the scope of the present disclosure. In addition, the embodiments including other components in addition to the components described in the various embodiments are included in the scope of the present disclosure.

[0062] The present disclosure relates to encoding and decoding of images. Unless otherwise defined in the present disclosure, terms used in the present disclosure may have general meanings commonly used in the technical field to which the present disclosure belongs.

[0063] In the present disclosure, "picture" generally means a basis for representing an image in a specific time period, and a slice / tile is a coding basis constituting a part of a picture. A picture may be composed of one or more slices / tiles. In addition, a slice / tile may include one or more coding tree units (CTUs).

[0064] In the present disclosure, "pixel" or "pel" may mean the smallest unit constituting a picture (or image). In addition, "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a pixel value, or may represent only a pixel / pixel value of a luminance component or only a pixel / pixel value of a chrominance component.

[0065] In the present disclosure, a "unit" may refer to a basic unit of image processing. The unit may include at least one of a specific area of ​​a picture and information related to the area. A unit may include a luminance block and two chrominance (e.g., Cb, Cr) blocks. In some cases, the unit may be used interchangeably with terms such as "sample array", "block", or "area". In general, an M×N block may include M columns and N rows of samples (or sample arrays) or a set (or array) of transform coefficients.

[0066] In the present disclosure, "current block" may mean one of "current coding block", "current coding unit", "coding target block", "decoding target block", or "processing target block". When prediction is performed, "current block" may mean "current prediction block" or "prediction target block". When transform (inverse transform) / quantization (dequantization) is performed, "current block" may mean "current transform block" or "transform target block". When filtering is performed, "current block" may mean "filtering target block".

[0067] In addition, in the present disclosure, unless explicitly stated as a chroma block, a "current block" may mean a block including both a luma component block and a chroma component block or a "luma block of the current block". A "luma component block of the current block" may be represented by an explicit description including a luma component block such as a "luma block" or a "current luma block". In addition, a "chroma component block of the current block" may be represented by an explicit description including a chroma component block such as a "chroma block" or a "current chroma block".

[0068] In the present disclosure, the slash " / " or "," should be interpreted as indicating "and / or". For example, the expressions "A / B" and "A, B" may mean "A and / or B". In addition, "A / B / C" and "A, B, C" may mean "at least one of A, B and / or C".

[0069] In the present disclosure, the term "or" should be interpreted as indicating "and / or". For example, the expression "A or B" may include 1) only "A", 2) only "B", and / or 3) both "A and B". In other words, in the present disclosure, the term "or" should be interpreted as indicating "additionally or alternatively".

[0070] Video Coding System Overview

[0071] Figure 1 is a diagram showing a video encoding system to which an embodiment of the present disclosure can be applied.

[0072] The video encoding system according to the embodiment may include an encoding device 10 and a decoding device 20. The encoding device 10 may deliver the encoded video and / or image information or data to the decoding device 20 via a digital storage medium or a network in the form of a file or a stream.

[0073] The encoding device 10 according to the embodiment may include a video source generator 11, an encoding unit (encoder) 12, and a transmitter 13. The decoding device 20 according to the embodiment may include a receiver 21, a decoding unit (decoder) 22, and a renderer 23. The encoding unit 12 may be referred to as a video / image encoding device, and the decoding unit 22 may be referred to as a video / image decoding device. The transmitter 13 may be included in the encoding unit 12. The receiver 21 may be included in the decoding unit 22. The renderer 23 may include a display and the display may be configured as a separate device or an external component.

[0074] The video source generator 11 may acquire a video / image by a process of capturing, synthesizing or generating a video / image. The video source generator 11 may include a video / image capturing device and / or a video / image generating device. The video / image capturing device may include, for example, one or more cameras, a video / image archive including previously captured videos / images, etc. The video / image generating device may include, for example, a computer, a tablet computer, and a smart phone, and may (electronically) generate a video / image. For example, a virtual video / image may be generated by a computer, etc. In this case, the video / image capturing process may be replaced by a process of generating relevant data.

[0075] The encoding unit 12 may encode the input video / image. For compression and encoding efficiency, the encoding unit 12 may perform a series of processes such as prediction, transformation, and quantization. The encoding unit 12 may output encoded data (encoded video / image information) in the form of a bitstream.

[0076] The transmitter 13 can obtain the encoded video / image information or data output in the form of a bit stream and forward it to the receiver 21 of the decoding device 20 or another external object in the form of a file or stream through a digital storage medium or a network. The digital storage medium may include various storage media, such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter 13 may include an element for generating a media file in a predetermined file format and may include an element for transmitting through a broadcast / communication network. The transmitter 13 may be set as a transmitting device separated from the encoding device 10, and in this case, the transmitting device may include at least one processor and a transmitting unit, the at least one processor obtaining the encoded video / image information or data output in the form of a bit stream, and the transmitting unit is used to transmit the encoded video / image information or data in the form of a file or stream. The receiver 21 may extract / receive a bit stream from a storage medium or a network and send the bit stream to the decoding unit 22.

[0077] The decoding unit 22 may decode a video / image by performing a series of processes corresponding to the operations of the encoding unit 12, such as dequantization, inverse transformation, and prediction.

[0078] The renderer 23 may render the decoded video / image. The rendered video / image may be displayed through a display.

[0079] Overview of Image Coding Equipment

[0080] Figure 2 is a diagram schematically showing an image encoding device to which an embodiment of the present disclosure can be applied.

[0081] like Figure 2 As shown, the image encoding device 100 may include an image segmenter 110, a subtractor 115, a transformer 120, a quantizer 130, a dequantizer 140, an inverse transformer 150, an adder 155, a filter 160, a memory 170, an inter-frame prediction unit 180, an intra-frame prediction unit 185, and an entropy encoder 190. The inter-frame prediction unit 180 and the intra-frame prediction unit 185 may be collectively referred to as a "prediction unit". The transformer 120, the quantizer 130, the dequantizer 140, and the inverse transformer 150 may be included in a residual processor. The residual processor may also include a subtractor 115.

[0082] In some embodiments, all or at least some of the components configuring the image encoding apparatus 100 may be configured by one hardware component (eg, an encoder or a processor). In addition, the memory 170 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium.

[0083] The image segmenter 110 may segment an input image (or picture or frame) input to the image encoding device 100 into one or more processing units. For example, a processing unit may be referred to as a coding unit (CU). A coding unit may be obtained by recursively segmenting a coding tree unit (CTU) or a maximum coding unit (LCU) according to a quadtree binary tree ternary tree (QT / BT / TT) structure. For example, a coding unit may be segmented into a plurality of coding units of a deeper depth based on a quadtree structure, a binary tree structure, and / or a ternary tree structure. For the segmentation of the coding unit, a quadtree structure may be applied first, and then a binary tree structure and / or a ternary tree structure may be applied. The encoding process according to the present disclosure may be performed based on the final coding unit that is no longer segmented. The maximum coding unit may be used as the final coding unit, and a coding unit of a deeper depth obtained by segmenting the maximum coding unit may also be used as the final coding unit. Here, the encoding process may include the processes of prediction, transformation, and reconstruction to be described later. As another example, the processing unit of the encoding process may be a prediction unit (PU) or a transform unit (TU). The prediction unit and the transform unit may be divided or partitioned from the final coding unit. The prediction unit may be a sample prediction unit, and the transform unit may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from the transform coefficient.

[0084] The prediction unit (inter prediction unit 180 or intra prediction unit 185) may perform prediction on the block to be processed (current block) and generate a prediction block including prediction samples of the current block. The prediction unit may determine whether to apply intra prediction or inter prediction based on the current block or CU. The prediction unit may generate various information related to the prediction of the current block and transmit the generated information to the entropy encoder 190. The information about the prediction may be encoded in the entropy encoder 190 and output in the form of a bitstream.

[0085] The intra prediction unit (intra predictor) 185 can predict the current block by referring to samples in the current picture. Depending on the intra prediction mode and / or intra prediction technology, the reference samples may be located in the neighborhood of the current block or may be placed separately. The intra prediction mode may include multiple non-directional modes and multiple directional modes. The non-directional mode may include, for example, a DC mode and a plane mode. Depending on the level of detail of the prediction direction, the directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes. However, this is only an example, and more or fewer directional prediction modes may be used depending on the setting. The intra prediction unit 185 may determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.

[0086] The inter prediction unit (inter predictor) 180 may derive a prediction block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter prediction direction (L0 prediction, L1 prediction, dual prediction, etc.) information. In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be referred to as a collocated reference block, a collocated CU (colCU), etc. The reference picture including the temporal neighboring block may be referred to as a collocated picture (colPic). For example, the inter prediction unit 180 may construct a motion information candidate list based on the neighboring blocks and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter prediction may be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the inter-frame prediction unit 180 may use the motion information of the neighboring block as the motion information of the current block. In the case of skip mode, unlike the merge mode, the residual signal may not be transmitted. In the case of motion vector prediction (MVP) mode, the motion vector of the neighboring block may be used as a motion vector predictor, and the motion vector of the current block may signal the motion vector of the current block by encoding the motion vector difference and the indicator of the motion vector predictor. The motion vector difference may mean the difference between the motion vector of the current block and the motion vector predictor.

[0087] The prediction unit may generate a prediction signal based on various prediction methods and prediction techniques described below. For example, the prediction unit may apply not only intra prediction or inter prediction, but also intra prediction and inter prediction simultaneously to predict the current block. The prediction method of applying both intra prediction and inter prediction to predict the current block may be referred to as combined inter and intra prediction (CIIP). In addition, the prediction unit may perform intra block copying (IBC) to predict the current block. Intra block copying may be used for content image / video encoding of games, etc., such as screen content coding (SCC). IBC is a method of predicting the current picture using a previously reconstructed reference block in the current picture at a predetermined distance from the current block. When IBC is applied, the position of the reference block in the current picture may be encoded as a vector (block vector) corresponding to a predetermined distance. IBC basically performs prediction in the current picture, but may be performed similarly to inter prediction because the reference block is derived within the current picture. That is, IBC may use at least one inter prediction technique described in the present disclosure.

[0088] The prediction signal generated by the prediction unit may be used to generate a reconstruction signal or to generate a residual signal. The subtractor 115 may generate a residual signal (residual block or residual sample array) by subtracting the prediction signal (prediction block or prediction sample array) output from the prediction unit from the input image signal (original block or original sample array). The generated residual signal may be transmitted to the transformer 120.

[0089] The transformer 120 may generate a transform coefficient by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a karhunen-loève transform (KLT), a graph-based transform (GBT), or a conditional nonlinear transform (CNT). Here, GBT refers to a transform obtained from a graph when relationship information between pixels is represented by a graph. CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process may be applied to square pixel blocks of the same size or may be applied to blocks of variable size instead of square.

[0090] The quantizer 130 may quantize the transform coefficients and transmit them to the entropy encoder 190. The entropy encoder 190 may encode the quantized signal (information about the quantized transform coefficients) and output a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantizer 130 may rearrange the quantized transform coefficients of the block type into a one-dimensional vector form based on the coefficient scanning order, and generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form.

[0091] The entropy encoder 190 may perform various encoding methods, such as exponential Golomb, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), etc. The entropy encoder 190 may encode information required for video / image reconstruction other than quantized transform coefficients together or separately (e.g., values ​​of syntax elements, etc.). The encoded information (e.g., encoded video / image information) may be transmitted or stored in units of a network abstraction layer (NAL) in the form of a bitstream. The video / image information may also include information about various parameter sets, such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. The signaling information, the transmitted information, and / or the syntax elements described in the present disclosure may be encoded and included in the bitstream through the above-mentioned encoding process.

[0092] The bit stream may be transmitted through a network or may be stored in a digital storage medium. The network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) that transmits a signal output from the entropy encoder 190 and / or a storage unit (not shown) that stores the signal may be included as an internal / external element of the image encoding device 100. Alternatively, a transmitter may be provided as a component of the entropy encoder 190.

[0093] The quantized transform coefficients output from the quantizer 130 may be used to generate a residual signal. For example, the residual signal (residual block or residual sample) may be reconstructed by applying dequantization and inverse transformation to the quantized transform coefficients through the dequantizer 140 and the inverse transformer 150.

[0094] The adder 155 adds the reconstructed residual signal to the prediction signal output from the inter-frame prediction unit 180 or the intra-frame prediction unit 185 to generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). If the block to be processed has no residual, such as when the skip mode is applied, the prediction block can be used as a reconstructed block. The adder 155 can be called a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current picture, and can be used for inter-frame prediction of the next picture by filtering as described below.

[0095] The filter 160 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 160 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 170, specifically, in the DPB of the memory 170. Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filtering, bilateral filtering, etc. The filter 160 can generate various information related to filtering and transmit the generated information to the entropy encoder 190, as described later in the description of each filtering method. The information related to filtering can be encoded by the entropy encoder 190 and output in the form of a bit stream.

[0096] The modified reconstructed picture transferred to the memory 170 may be used as a reference picture in the inter prediction unit 180. When inter prediction is applied by the image encoding apparatus 100, prediction mismatch between the image encoding apparatus 100 and the image decoding apparatus may be avoided and encoding efficiency may be improved.

[0097] The DPB of the memory 170 may store the modified reconstructed picture for use as a reference picture in the inter-frame prediction unit 180. The memory 170 may store the motion information of the block from which the motion information in the current picture is derived (or encoded) and / or the motion information of the reconstructed block in the picture. The stored motion information may be transmitted to the inter-frame prediction unit 180 and used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 170 may store the reconstructed samples of the reconstructed blocks in the current picture and may transmit the reconstructed samples to the intra-frame prediction unit 185.

[0098] Overview of Image Decoding Equipment

[0099] Figure 3 is a diagram schematically showing an image decoding device to which an embodiment of the present disclosure can be applied.

[0100] like Figure 3 As shown, the image decoding device 200 may include an entropy decoder 210, a dequantizer 220, an inverse transformer 230, an adder 235, a filter 240, a memory 250, an inter-frame predictor 260, and an intra-frame prediction unit 265. The inter-frame predictor (inter-frame prediction unit) 260 and the intra-frame predictor (intra-frame prediction unit) 265 may be collectively referred to as a "prediction unit (predictor)". The dequantizer 220 and the inverse transformer 230 may be included in a residual processor.

[0101] According to an embodiment, all or at least some of the plurality of components configuring the image decoding apparatus 200 may be configured by hardware components (eg, a decoder or a processor). In addition, the memory 170 may include a decoded picture buffer (DPB) or may be configured by a digital storage medium.

[0102] The image decoding device 200 having received a bit stream including video / image information may perform the same Figure 2 The image is reconstructed by processing corresponding to the processing performed by the image encoding device 100. For example, the image decoding device 200 may perform decoding using a processing unit applied in the image encoding device. Therefore, the processing unit of decoding may be, for example, a coding unit. The coding unit may be obtained by partitioning the coding tree unit or the maximum coding unit. The reconstructed image signal decoded and output by the image decoding device 200 may be reproduced by a reproduction device (not shown).

[0103] The image decoding device 200 may receive the image in the form of a bit stream from Figure 2The received signal may be decoded by the entropy decoder 210. For example, the entropy decoder 210 may parse the bitstream to derive information (e.g., video / image information) required for image reconstruction (or picture reconstruction). The video / image information may also include information about various parameter sets, such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. The image decoding device may also decode the picture based on the information about the parameter set and / or the general constraint information. The signaled / received information and / or syntax elements described in the present disclosure may be decoded and obtained from the bitstream through a decoding process. For example, the entropy decoder 210 decodes the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and outputs the values ​​of the syntax elements required for image reconstruction and the quantized values ​​of the transform coefficients of the residual. More specifically, the CABAC entropy decoding method may receive a bin corresponding to each syntax element in the bitstream, determine a context model using information of a decoding target syntax element, information of a neighboring block and a decoding target block, or information of a symbol / bin decoded at a previous stage, perform arithmetic decoding on the bin by predicting the probability of occurrence of the bin according to the determined context model, and generate a symbol corresponding to the value of each syntax element. In this case, the CABAC entropy decoding method may update the context model by using the information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. Information related to prediction in the information decoded by the entropy decoder 210 may be provided to the prediction unit (inter-frame predictor 260 and intra-frame prediction unit 265), and the residual value for which entropy decoding is performed in the entropy decoder 210, that is, the quantized transform coefficient and related parameter information may be input to the dequantizer 220. In addition, information about filtering in the information decoded by the entropy decoder 210 may be provided to the filter 240. In addition, a receiver (not shown) for receiving a signal output from the image encoding apparatus may be further configured as an internal / external element of the image decoding apparatus 200 , or the receiver may be a component of the entropy decoder 210 .

[0104] In addition, the image decoding device according to the present disclosure may be referred to as a video / image / picture decoding device. The image decoding device may be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include an entropy decoder 210. The sample decoder may include at least one of a dequantizer 220, an inverse transformer 230, an adder 235, a filter 240, a memory 250, an inter-frame prediction unit 260, or an intra-frame prediction unit 265.

[0105] The dequantizer 220 may dequantize the quantized transform coefficients and output the transform coefficients. The dequantizer 220 may rearrange the quantized transform coefficients in the form of two-dimensional blocks. In this case, the rearrangement may be performed based on a coefficient scanning order performed in an image encoding device. The dequantizer 220 may dequantize the quantized transform coefficients by using a quantization parameter (e.g., quantization step size information) and obtain the transform coefficients.

[0106] The inverse transformer 230 may inversely transform the transform coefficients to obtain a residual signal (residual block, residual sample array).

[0107] The prediction unit may perform prediction on the current block and generate a prediction block including prediction samples of the current block. The prediction unit may determine whether to apply intra prediction or inter prediction to the current block based on the information about prediction output from the entropy decoder 210, and may determine a specific intra / inter prediction mode (prediction technique).

[0108] The same as described in the prediction unit of the image encoding device 100 , the prediction unit can generate a prediction signal based on various prediction methods (techniques) described later.

[0109] The intra predictor 265 may predict the current block by referring to samples in the current picture. The description of the intra prediction unit 185 is also applicable to the intra prediction unit 265.

[0110] The inter-frame predictor 260 can derive the prediction block of the current block based on the reference block (reference sample array) specified by the motion vector on the reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter-frame prediction mode, the motion information can be predicted in units of blocks, sub-blocks or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, dual prediction, etc.) information. In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. For example, the inter-frame predictor 260 may configure a motion information candidate list based on the neighboring blocks, and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Inter-frame prediction may be performed based on various prediction modes, and the information about the prediction may include information indicating the inter-frame prediction mode of the current block.

[0111] The adder 235 can generate a reconstruction signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the prediction unit (including the inter-frame predictor 260 and / or the intra-frame prediction unit 265). If the block to be processed has no residual (for example, when the skip mode is applied), the prediction block can be used as a reconstructed block. The description of the adder 155 also applies to the adder 235. The adder 235 can be called a reconstructor or a reconstructed block generator. The generated reconstruction signal can be used for intra-frame prediction of the next block to be processed in the current picture, and can be used for inter-frame prediction of the next picture by filtering as described below.

[0112] The filter 240 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 240 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 250, specifically, in the DPB of the memory 250. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filtering, bilateral filtering, etc.

[0113] The (modified) reconstructed picture stored in the DPB of the memory 250 may be used as a reference picture in the inter-frame predictor 260. The memory 250 may store the motion information of the block from which the motion information in the current picture is derived (or decoded) and / or the motion information of the reconstructed block in the picture. The stored motion information may be transmitted to the inter-frame predictor 260 to be used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 250 may store the reconstructed samples of the reconstructed block in the current picture and transmit the reconstructed samples to the intra-frame prediction unit 265.

[0114] In the present disclosure, the embodiments described in the filter 160, the inter-frame prediction unit 180 and the intra-frame prediction unit 185 of the image encoding device 100 can be equally or correspondingly applied to the filter 240, the inter-frame predictor 260 and the intra-frame predictor 265 of the image decoding device 200.

[0115] Inter prediction

[0116] The prediction unit of the image encoding device 100 and the image decoding device 200 may derive a prediction sample by performing inter-frame prediction on a per-block basis. Inter-frame prediction may be a prediction derived in a manner that depends on data elements (e.g., sample values ​​or motion information) of a picture other than the current picture. When inter-frame prediction is applied to the current block, a prediction block (prediction sample array) for the current block may be derived based on a reference block (reference sample array) specified by a motion vector on a reference picture indicated by a reference picture index. Here, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information of the current block may be predicted based on each block, sub-block, or sample based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.) information. When inter-frame prediction is applied, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be referred to as a collocated reference block or collocated CU (colCU). A reference picture including temporally neighboring blocks may be referred to as a collocated picture (colPic). For example, a motion information candidate list may be constructed based on neighboring blocks of the current block. A flag or index information indicating which candidate is selected (used) to derive the motion vector and / or reference picture index of the current block may be signaled. Inter-frame prediction may be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the motion information of the current block may be the same as the motion information of the selected neighboring block. In the case of skip mode, unlike merge mode, a residual signal may not be sent. In the case of motion information prediction (motion vector prediction, MVP) mode, the motion vector of the selected neighboring block may be used as a motion vector predictor, and the motion vector difference may be signaled. In this case, the motion vector of the current block may be derived using the sum of the motion vector predictor and the motion vector difference. The MVP mode may be referred to as an advanced motion vector prediction (AMVP) mode.

[0117] According to the inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.), the motion information may include L0 motion information and / or L1 motion information. The motion vector in the L0 direction may be referred to as the L0 motion vector or MVL0, and the motion vector in the L1 direction may be referred to as the L1 motion vector or MVL1. Prediction based on the L0 motion vector may be referred to as L0 prediction. Prediction based on the L1 motion vector may be referred to as L1 prediction. Prediction based on both the L0 motion vector and the L1 motion vector may be referred to as dual prediction. Here, the L0 motion vector may refer to a motion vector associated with the reference picture list L0 (L0), and the L1 motion vector may refer to a motion vector associated with the reference picture list L1 (L1). The reference picture list L0 may include a picture that precedes the current picture in terms of output order as a reference picture. The reference picture list L1 may include a picture that follows the current picture in terms of output order. The previous picture may be referred to as a forward (reference) picture, and the subsequent picture may be referred to as a backward (reference) picture. The reference picture list L0 may further include a picture that follows the current picture in terms of output order as a reference picture. In this case, within the reference picture list L0, the previous picture may be indexed first, and the subsequent picture may be indexed next. The reference picture list L1 may further include a picture preceding the current picture in terms of output order as a reference picture. In this case, within the reference picture list 1, the subsequent picture may be indexed first, and the previous picture may be indexed next. Here, the output order may correspond to a picture order count (POC) order.

[0118] Template Matching (TM)

[0119] Template matching (TM) is a motion vector derivation method performed at the decoder stage, and is a method of refining motion information of a current block by finding a template (hereinafter referred to as a "reference template") that is most similar to a template (hereinafter referred to as a "current template") adjacent to a current block (e.g., a current coding unit, a current CU) in a reference picture. The current template may be a top neighboring block and / or a left neighboring block of the current block, or may be some of these neighboring blocks. In addition, it may be determined that the reference template has the same size as the current template.

[0120] When the initial motion vector of the current block is derived, a search for a better motion vector may be performed in the surrounding area of ​​the initial motion vector. For example, the range of the surrounding area where the search is performed may be within a [-8, +8]-pixel search area centered on the initial motion vector. In addition, the size of the search step used to perform the search may be determined based on the AMVR mode of the current block. In addition, template matching may be performed continuously using a bilateral matching process in a merge mode.

[0121] If the prediction mode of the current block is the AMVP mode, a motion vector predictor (MVP) candidate may be determined based on a template matching error. For example, a motion vector predictor (MVP) candidate that minimizes the error between the current template and the reference template may be selected. Afterwards, template matching for improving the motion vector may be performed on the selected motion vector predictor candidate. At this time, template matching for improving the motion vector may not be performed on the unselected motion vector predictor candidate.

[0122] More specifically, the improvement of the selected motion vector predictor candidate can start with full pixel (integer pixel) accuracy within the [-8, +8] pixel search area using an iterative diamond search. Alternatively, in the case of a 4-pixel AMVR mode, it can start with 4-pixel accuracy. Thereafter, a search with half-pixel and / or quarter-pixel accuracy can follow depending on the AMVR mode. According to the search process, the motion vector predictor candidate can maintain the same motion vector accuracy as indicated by the AMVR mode even after the template matching process. During the iterative search process, if the difference between the previous minimum cost and the current minimum cost is less than an arbitrary threshold, the search process is terminated. The threshold can be equal to the area of ​​the block, that is, the number of samples in the block. Table 1 shows an example of a search mode according to the AMVR mode and a merge mode with AMVR.

[0123] [Table 1]

[0124]

[0125] If the prediction mode of the current block is merge mode, a similar search method may be applied to the merge candidate indicated by the merge index. As shown in Table 1 above, template matching may be performed up to 1 / 8 pixel accuracy, or half pixel accuracy or lower may be skipped, which may depend on whether an alternative interpolation filter is used based on the merge motion information. In this case, the alternative interpolation filter may be a filter used when AMVR is in half pixel mode. In addition, if template matching is available, depending on whether bilateral matching (BM) is available, template matching may be operated as an independent process, or may be operated as an additional motion vector improvement process between block-based bilateral matching and sub-block-based bilateral matching. Whether template matching is available and / or whether bilateral matching is available may be determined based on an availability condition check. In the above, the accuracy of the motion vector may refer to the accuracy of the motion vector difference (MVD).

[0126] Example

[0127] The present disclosure relates to inter-frame prediction and amvpMerge mode, wherein, in the process of generating a prediction block through two or more reference pictures, AMVP prediction candidates are derived in any prediction direction to derive prediction motion information, and MERGE prediction candidates are configured in the opposite prediction direction to derive prediction motion information, thereby generating a final prediction block for the current block.

[0128] In the case of any prediction direction in which motion information is derived as an AMVP prediction candidate in the process of deriving motion information, if a specific condition is met, the motion information can be derived without explicitly signaling the MVD, and if the specific condition is not met, the motion information can be derived by explicitly signaling the MVD so as to refine the motion information in the AMVP prediction direction. The present disclosure proposes a method for the following case: a reference picture list of a slice to be encoded / decoded consists only of a POC having a smaller value than a POC of a picture (current picture) including a current slice, or a reference picture list of a slice consists only of a POC having a larger value than a POC of a current picture including the current slice.

[0129] The embodiments described below may be performed individually or in combination of two or more. In addition, the embodiments described below may be performed in the image encoding apparatus 100 and the image decoding apparatus 200.

[0130] Example 1-1

[0131] Embodiment 1-1 proposes a method for determining whether to execute the amvpMerge mode at the SPS, PPS, picture header, or slice header level.

[0132] A flag for determining whether to perform may be signaled through the bitstream, and when the value of the flag is 1, motion information may be derived through the amvpMerge mode at a level (picture, slice, coding unit, prediction unit, etc.) referring to the level at which the flag is signaled. The flag may be signaled through at least one level among the SPS, PPS, picture header, or slice header. The flag may be defined as sps_amvpMerge_enabled_flag, pps_amvpMerge_enabled_flag, ph_amvpMerge_enabled_flag, or sh_amvpMerge_enabled_flag.

[0133] Example 1-2

[0134] Embodiment 1-2 proposes a method for constructing a reference picture list for amvpMerge mode.

[0135] If the reference picture list of the slice to be encoded / decoded satisfies the proposed conditions, an amvpMerge prediction candidate for a coding unit or prediction unit in the slice is constructed and motion information can be derived.

[0136] The method of embodiment 1-2 can be as Figure 4 The illustrated example is performed on a slice-by-slice basis. That is, when a picture is composed of multiple slices, it can be determined whether the amvpMerge mode is performed on a slice-by-slice basis.

[0137] refer to Figure 4 , sliceIdx indicating one of the plurality of slices may be set to 0, and numSliceInPic indicating the number of slices in the picture may be set to N ( S402 ). If the reference picture list construction process ( S404 ) is not performed on some slices, the reference picture list construction process ( S406 ) may be performed on the corresponding slice (sliceIdx).

[0138] It may be checked whether all reference pictures in the reference picture list of the corresponding slice have a POC (Picture Order Count) forward of the current picture (S408). A slice in which all reference pictures in the reference picture list are forward of the current picture may correspond to a low-latency slice. If all reference pictures in the reference picture list of the corresponding slice have a POC forward of the current picture, bLDCFlag indicating whether the slice is a low-latency slice is set to true (S412), and if some reference pictures in the reference picture list of the corresponding slice even have a POC backward of the current picture, bLDCFlag may be set to false (S410).

[0139] It may be determined whether the type of the corresponding slice is a B (bi-prediction) type (S414), and if the type of the corresponding slice is a B type, a process of constructing a valid reference picture set in the amvpMerge mode for the reference picture list in the L0 direction (REF_PIC_LIST_0) and the reference picture list in the L1 direction (REF_PIC_LIST_1) may be performed (S416). If the type of the corresponding slice is not a B type, the process S416 may not be performed.

[0140] The process may continue to the next slice after the corresponding slice (sliceIdx=sliceIdx+1), and processes S404 to S416 may be performed. When these processes are repeated to complete the process of constructing the reference picture list for all slices (sliceIdx=numSliceInPic), the process of constructing the reference picture list may be terminated.

[0141] according to Figure 4, in the case where the slice type allows two or more motion prediction information (B slice), a process considering the presence or absence of a reference picture (which can be used for amvpMerge) on which the proposed amvpMerge mode can be performed, and a process of determining whether to enable the amvpMerge mode by considering a reference picture (which can be used in the merge mode) on which the merge mode can be performed can be performed.

[0142] The process of considering the presence or absence of a reference picture that can be used for amvpMerge can be performed in units of directions (L0, L1) of each reference picture, such as Figure 5a and 5b shown.

[0143] refer to Figure 5a and 5b , the initial value of the variable can be set (S502). Curpoc represents the POC of the current image included in the current slice, bAmvpMergeEnabledFlag represents whether the corresponding slice enables the amvpMerge mode, amvpMergeVaildRefPair and amvpMergeVaildRefIdx represent whether a pair of reference pictures in the reference picture list in a specific prediction direction and a reference picture in the reference picture list in another prediction direction are available in the amvpMerge mode and the index of the corresponding picture, and amvpMergeUniqValidRefIdx represents which reference picture in REF_PIC_LIST_X is the only reference picture that can be used in the amvpMerge mode.

[0144] Whether a reference picture set in amvpMerge mode can be constructed (S520, S528 to S536) can be performed on any reference picture (refIdxInListX) in reference picture list X (X is 0 or 1) and all reference pictures (refIdxInListY) in reference picture list Y (Y is 1-X). When the determination for all reference pictures (refIdxInListY) is completed (S520), the process proceeds to the next reference picture (S526) to perform S520, S528 to S536, thereby performing determination on all reference pictures in reference picture list X and reference picture list Y.

[0145] If all reference pictures in the reference picture list of the current slice are forward, that is, if the POC of all reference pictures is smaller than the POC of the current picture, bLDCFlag is set to true, and if the value of bLDCFlag is false (S504), it is determined whether a reference picture set for the amvpMerge mode for reference picture list L0 and reference picture list L1 can be constructed (S506 to S536), and if it can be constructed, the reference picture set for the amvpMerge mode is constructed.

[0146] REF_PIC_LIST_X may be expressed as REF_PIC_LIST_0 and REF_PIC_LIST_1, where REF_PIC_LIST_0 represents a reference picture list in an L0 direction and REF_PIC_LIST_1 represents a reference picture list in an L1 direction.

[0147] In addition, (1-REF_PIC_LIST_X) represents a reference picture list in the opposite direction to REF_PIC_LIST_X. For example, if REF_PIC_LIST_X is REF_PIC_LIST_0, (1-REF_PIC_LIST_X) may mean REF_PIC_LIST_1, and vice versa.

[0148] When amvpMergeVaildRefPair[refIdxInListX][refIdxInListY] is true, the reference pictures corresponding to refIdxInListX and refIdxInListY become a set, and this reference picture set corresponds to the reference pictures for which prediction information may be derived in amvpMerge mode.

[0149] If amvpMergeUniqValidRefIdx[REF_PIC_LIST_X] is not NOT_VALID, it indicates the index of the reference picture from which the reference picture of REF_PIC_LIST_X can be uniquely derived for motion information in amvpMerge mode. That is, if the value is not NOT_VALID, the reference picture index for amvpMerge mode can be derived from the reference picture index of amvpMergeUniqValidRefIdx[REF_PIC_LIST_X] without being explicitly signaled in the coding unit or prediction unit.

[0150] amvpMergeValidRefIdx[REF_PIC_LIST_X][refIdxInListX] may indicate whether the reference picture corresponding to refIdxInListX of REF_PIC_LIST_X is a reference picture from which motion information of the amvpMerge mode may be derived. If the value of amvpMergeValidRefIdx[REF_PIC_LIST_X][refIdxInListX] is true, the reference picture corresponding to refIdxInListX of REF_PIC_LIST_X may be a reference picture from which motion information of the amvpMerge mode may be derived.

[0151] Condition 1 ( S528 ) is a condition on the reference picture status, which may include whether the reference pictures corresponding to refIdxInLisX and refIdxInListY have been encoded / decoded through reference picture resampling (RPR) and / or whether they are long-term reference pictures and / or whether there is a weight for weighted prediction.

[0152] That is, as an example, condition 1 may be specified as a case where all or one or more of the following six conditions are satisfied.

[0153] 1. The reference picture corresponding to refIdxInListX is not an RPR

[0154] 2. The reference picture corresponding to refIdxInListY is not RPR

[0155] 3. The reference image corresponding to refIdxInListX is not a long-term reference image

[0156] 4. The reference picture corresponding to refIdxInListY is not a long-term reference picture

[0157] 5. The weights of the weighted prediction for the reference picture corresponding to refIdxInListX are not signaled

[0158] 6. The weights of the weighted prediction for the reference picture corresponding to refIdxInListY are not signaled

[0159] Assuming that all conditions 1 are satisfied, it is determined whether the reference picture corresponding to refIdxLX and refIdxLY can be used as a reference picture set for the amvpMerge mode (S532). If S532 is not satisfied, a determination is made on the next reference picture (S536).

[0160] Condition 2 ( S532 ) represents a condition for determining whether a reference picture corresponding to refIdxLX and refIdxLY is suitable as a reference picture for the amvpMerge mode by considering its POC.

[0161] If the POC of the reference picture corresponding to refIdxLX is defined as pocLX, the POC of the reference picture corresponding to refIdxLY is defined as pocLY, and the POC of the current picture is defined as curPOC (S530), when one reference picture has a POC smaller than the POC of the current picture and one reference picture has a POC greater than the POC of the current picture, Condition 2 may be satisfied.

[0162] That is, Condition 2 can be expressed as Equation 1.

[0163] [Equation 1]

[0164] Condition 2:

[0165] Examples 1-3

[0166] Embodiments 1-3 propose a method for determining whether to apply the amvpMerge mode in a coding unit or a prediction unit, and the information explicitly signaled in the bitstream for this purpose.

[0167] refer to Figures 6a to 6c , skip_flag indicating whether skip mode is applied is signaled (S602), and if skip mode is not applied (S604), pred_mode indicating prediction mode is signaled (S606). If pred_mode indicates inter prediction mode (S608), merge_flag indicating whether merge mode is applied is signaled (S610), and if merge mode is not applied (S612), it is determined whether amvpMerge mode is enabled (S614).

[0168] The amvpMerge mode is not applied (S618), information indicating a prediction direction (S622), information indicating whether an affine prediction mode is applied (S624), information indicating whether an smvd (symmetric MVD) mode is applied (S626), information about a bidirectional weight index (S628), information indicating a pair of reference pictures (S630), and information indicating a reference picture in a reference picture list (S632) may be sent using a signal.

[0169] When the amvpMerge mode is applied (S618), it is determined whether the prediction direction is the L1 prediction direction (S634), the mode to be applied to each direction among the AMVP mode and the merge mode is determined (S636), and the reference picture index and motion information predictor for the prediction direction determined to be the AMVP mode are signaled (S638, S640).

[0170] If the affine mode is not applied (S642), it is determined whether the merge mode is applied in any direction and whether the value of the motion information predictor index in the opposite direction is less than 2 (S644). If true, the MVD is set to zero (S648), and if false, the MVD in the opposite direction is signaled (S646). If the affine mode is applied (S642), the MVD of the control point (cp0, cp1, cp2) is signaled (S650 to S654).

[0171] It is determined whether the prediction direction is the L0 prediction direction (S656), it is determined whether the smvd mode is applied (S658), a mode to be applied to each direction among the AMVP mode and the merge mode is determined (S660), and a reference picture index and a motion information predictor for the prediction direction determined to be the AMVP mode are signaled (S662, S664).

[0172] If the affine mode is not applied (S66), it is determined whether the merge mode is applied in any direction and whether the value of the motion information predictor index in the opposite direction is less than 2 (S668). If true, the MVD is set to zero (S672), and if false, the MVD of the opposite direction is signaled (S670). If the affine mode is applied (S666), the MVD for the control point (cp0, cp1, cp2) is signaled (S674 to S678).

[0173] If bAmvpMergeEnabled is true (1) at the slice level, you can Figure 7 The amvpMerge_mode() procedure in io_mvpMerge_mode signals the information required for the amvpMerge mode.

[0174] refer to Figure 7, determine whether bidirectional prediction is possible (S702), and if possible, send amvpMergeFlag with a signal (S704), and whether to apply amvpMerge mode can be determined based on amvpMergeFlag (S706). If the prediction direction is bidirectional (S708), in order to distinguish between any prediction direction for deriving motion information as an AMVP prediction candidate and any prediction direction for deriving motion information as a merge prediction candidate, it can be determined whether the adaptive reference list (ARL) defined at the SPS / PPS / PH / SH level is enabled (S710) and the mvdL1ZeroFlag derived from the PH (S710, S712).

[0175] Referring to these conditions, if useARL() is disabled and mvdL1ZeroFlag is 0, a 1-bit flag (mergeDir) is signaled (S714, S718), so that any prediction direction for deriving motion prediction information as a merge prediction candidate can be determined. On the contrary, if useARL() is enabled or mvdL1ZeroFlag is 1, motion information can be derived from the merge prediction candidate in the L1 prediction direction without separate signaling (S716, S718).

[0176] The amvpMergeModeFlag[] array specifies how to derive motion information in either prediction direction. When amvpMergeModeFlag[0] is true, L0 means deriving motion information from the merge prediction candidate, and L1 means deriving motion information from the AMVP prediction candidate. Conversely, when amvpMergeModeFlag[1] is true, L1 means deriving motion information from the merge prediction candidate, and L0 means deriving motion information from the AMVP prediction candidate.

[0177] Examples 1-4

[0178] Embodiments 1-4 propose a process for determining a reference picture list to derive motion information using the amvpMerge mode in a coding unit or a prediction unit and its syntax information.

[0179] The proposed method selectively determines one of two reference picture index signaling methods to facilitate sending reference picture indexes for amvpMerge mode. The two proposed methods can be used in Figure 8 , 9a 9b and 10, and each reference picture indexing method follows Figures 6a to 6c Flowchart of the process.

[0180] The first method follows Figure 8The process shown in the figure, where Figure 8 numCombinedListAmvpMerge in represents the number of reference picture sets that can perform prediction via amvpMerge mode. In addition, useARL() represents whether the adaptive reference list construction method signaled or implicitly derived at SPS / PPS / PH / SH is enabled.

[0181] refer to Figure 8 , if useARL() is true and the IBC mode is not applied and the merge mode is not applied (S802), it is determined whether the prediction direction is bidirectional (S804). If the prediction direction is not bidirectional (S804) or the amvpMerge mode is not applied (S806), the value obtained by subtracting 1 from the number of reference pictures is set equal to the value obtained by subtracting 1 from the number of combined reference pictures (S808), and if the prediction direction is bidirectional (S804) and the amvpMerge mode is applied (S806), the value obtained by subtracting 1 from the number of reference pictures is set equal to the value obtained by subtracting 1 from the number of combined amvpMerge reference picture sets (S810).

[0182] If the setting value is greater than 0 (S812), the reference picture index is signaled (S814), but if the setting value is 0, that is, if the combined amvpMerge reference picture set is unique (numRefMinus1 is 0), the reference picture index is implicitly derived without separate signaling (S816).

[0183] numCombineListAmvpMerge represents the number of reference picture sets (combinedListAmvpMerge) used for amvpMerge derived at the slice level, and the reference picture sets (combinedListAmvpMerge) can be obtained by Figure 9a and Figure 9b The process derivation shown.

[0184] refer to Figure 9a and 9b , initialize the reference picture set (refIdxcombinedListAmvpMerge) value (S902), the reference picture index (refIdx), the number of reference pictures in the reference picture list L0 is set to the value of numRefL0, the number of reference pictures in the reference picture list L1 is set to the value of numRefL1, and the larger value between numRefL0 and numRefL1 is set to the value of numRefLX (S904).

[0185] If the value of refIdx is less than the value of numRefLX (S906) and the value of refIdx is less than the value of numRefL0 (S908), a reference picture set in the L0 direction is derived (S910 to S914). Specifically, it is determined whether the reference picture corresponding to refIdx is available for the amvpMerge mode (S910), and if available, the reference picture is added to the reference picture set (S912). The same process is repeated for the next reference picture (S914). Even if the process S910 is false, the same process is repeated for the next reference picture.

[0186] If the value of refIdx is less than the value of numRefLX (S906), but the value of refIdx is not less than the value of numRefL0 (S908), and if the value of refIdx is less than the value of numRefL1 (S916), the reference picture set in the L1 direction is derived (S918 to S924). Specifically, it is determined whether refIdx is invalid for each prediction direction (S918), and if invalid, it is determined whether the reference picture corresponding to refIdx is available for amvpMerge mode (S920), and if available, the corresponding reference picture is added to the reference picture set (S922), and the same process is repeatedly performed on the next reference picture (S924). Even if the processes S916, S918, and S920 are false, the same process is repeatedly performed on the next reference picture (S924).

[0187] If the value of refIdx is not less than the value of numRefLX (S906), the process returns to the first reference picture (S926), and if the value of refIdx is less than the value of numRefL1, it is determined whether refIdx is valid for each prediction direction (S930), and if not valid, it is determined whether the reference picture corresponding to refIdx is available for amvpMerge mode (S932), and if available, the corresponding reference picture is added to the reference picture set (S934), and the same process is repeated for the next reference picture (S936). Even if the processes S930 and S932 are false, the same process is repeated for the next reference picture (S936).

[0188] The second proposed method performs Fig.10The respective processes shown in . Determine whether the smvd mode is applied (S1002), and if applied, send a reference index for the smvd mode with a signal (S1016), and if not applied, determine whether to apply useARL() (S1004). If useARL() is not applied, determine whether to apply amvpMerge (S1006), and if amvpMerge is applied, determine the prediction direction of the merge mode and the AMVP mode (S1008). If the mode applied to the 1-REF_PIC_LIST_X direction is the merge mode, determine whether the reference picture set is unique (S1010), and if unique, implicitly derive the reference picture index (S1012), and if not unique, send the reference picture index with a signal (S1014).

[0189] like Fig.10 As illustrated in FIG. 1 , when the value of amvpMergeModeFlag[1-REF_PIC_LIST_X] is 1, that is, when amvpMergeFlag in the coding unit is 1 and the value of amvpMergeModeFlag[REF_PIC_LIST_X] is derived to be false so that the prediction direction of REF_PIC_LIST_X derives motion information from the AMVP prediction candidate, the reference picture index is signaled. Figure 8 When the reference picture index is sent by signaling, you can execute Fig.10 method, and when the reference picture set derived from the slice level is unique (when amvpMergeUniqValidRefIdx[REF_PIC_LIST_X] is not NOT_VALID), the reference picture index can be derived implicitly without separate signaling.

[0190] Examples 1-5

[0191] Embodiments 1-5 propose a method for constructing prediction candidates in the process of deriving motion information in a coding unit or a prediction unit through the amvpMerge mode.

[0192] like Fig.11 As shown, depending on the value of amvpMergModeFlag, an arbitrary prediction direction in which motion information is derived from an AMVP prediction candidate and an arbitrary prediction direction in which motion information is derived from a merge prediction candidate may be defined as refListAmvp and refListMerge, respectively, and an implicitly or explicitly derived AMVP reference index may be defined as amvpRefIdx (S1102).

[0193] Only when the reference picture indicated by amvpRefIdx is defined as a reference picture that can generate a prediction block through amvpMerge prediction (S1104), the AMVP candidate list construction process (S1106), the process of deriving a predicted motion vector based on the AMVP candidate list (S1108), the merge candidate list construction process (S1110), the process of sorting the merge candidate list based on the bilateral matching error (cost) (S1112), the process of deriving a predicted motion vector based on the merge candidate list (S1114), the process of refining the predicted motion vector (S1116), and the process of deriving MVD from the refined motion vector (S1118) are performed.

[0194] In Embodiments 1-5, methods for constructing an AMVP candidate list and merging a candidate list are proposed.

[0195] The AMVP candidate list construction process is as follows Fig.12a and 12b As shown. Fig.12a and 12b , set the values ​​of variables numCand, maxStorage and Similarity ( S1202 ), and add the motion information of the spatial candidates (LB, RT, LT) to the list in sequence, and update the value of numCand ( S1204 ).

[0196] Determine the identifier of the motion information in the AMVP candidate list, update the value of numCand (S1206), and determine whether the TMVP mode is applied, whether the amount of motion information in the AMVP candidate list is less than maxStorage, and whether the size of the current block is valid (S1208). If all three conditions are met, it can be determined based on the identifier to include the TMVP candidate in the AMVP candidate list (S1210), and if any of the three conditions is not met, it is determined whether the amount of motion information in the AMVP candidate list is less than maxStorage and whether condition 1 is met (S1212). If both conditions are met, the motion information of the non-adjacent candidate is added to the AMVP candidate list (S1214), and if any of the two conditions is not met, it is determined whether the amount of motion information in the AMVP candidate list is less than maxStorage (S1216). If one condition is met, it can be determined based on the identifier to include the HMVP candidate in the AMVP candidate list (S1218).

[0197] Thereafter, it is determined whether DMVD (decoder side motion vector derivation) is applied (S1220). If DMVD is applied, a process of sorting the AMVP candidate list based on the TM cost (S1222) and a process of refining the candidate with the highest TM cost (S1224) are performed, and then a process of adding zero MVs (S1226) is performed. Here, the highest TM cost may correspond to a TM cost with a minimum value. If DMVD is not applied, the process S1226 is immediately performed.

[0198] Thereafter, it is determined whether the amvpMerge mode is applied (S1228), and if applied, if the number of AMVP candidates is 1 (S1230), a second AMVP candidate is generated using the value of the first AMVP candidate, thereby increasing the number of AMVP candidates to 2 (S1232), and if the number of candidates is not 1 (S1230), a second AMVP candidate is generated using the value of the first AMVP candidate, and a third AMVP candidate is generated using the value of the second AMVP candidate, thereby increasing the number of AMVP candidates to 3 (S1234).

[0199] In process S1212, condition 1 indicates whether at least one of the following two conditions is satisfied.

[0200] 1. Whether the current block is an inter-frame prediction method (multi-hypothesis inter-frame prediction) that generates the final prediction block by weighted average of three or more prediction blocks.

[0201] 2. Whether template matching is enabled in the current block

[0202] Through the method of FIG. 12 , in the process of deriving the amvpMerge motion information, one or two pieces of motion information of the AMVP reference picture list can be derived and expanded to two or three pieces.

[0203] The AMVP candidate list construction process is as follows Fig.13a and 13b shown.

[0204] refer to Fig.13a and 13b, determine whether a template matching based merge mode (TM merge mode) is applied (S1302), and if applied, set a threshold based on the number of pixels (S1304), and if not applied, set the threshold to a predetermined value (1) (S1306). After the process S1304, depending on whether the AML mode is applied (S1308), if applied, set the maximum number of merge candidates to the maximum number of TM merge candidates for the TM merge mode (S1310), and if not applied, set the maximum number of merge candidates to the maximum number of TM merge candidates signaled via SPS / PPS / PH / SH (S1312). After the process S1306, set the maximum number of merge candidates to the maximum number of merge candidates signaled via SPS / PPS / PH / SH (S1314).

[0205] When the amvpMerge mode is applied ( S1316 ), depending on the applied mode (AMVP mode or merge candidate) ( S1318 ), the values ​​of amvpRefList and mergeDir are derived ( S1320 , S1322 ).

[0206] In addition, if the space, time, non-adjacent space, HMVP, paired, affine, HMVP and zero MV (S1324) that may be candidates satisfy the isValidAmvpMerge() condition (S1328), the threshold is referenced to check the similarity between the candidate and the candidate previously added to the list, and if not similar (S1334), the candidate is added to the candidate list (S1336). In this process, if the current block is in amvpMerge mode (S1330), before performing the similarity check, the interDir of the candidate and the motion information of the AMVP candidate list are reset (S1332) so that the similarity check is performed using only the motion information of the merged reference list among the motion information of the candidate.

[0207] If the current block is not in amvpMerge mode, that is, if amvpMergeFlag is 0, isValidAmvpMerge() is always true. If the current block is in amvpMerge mode, it is true only if the reference picture indicated by the reference index in the candidate merged reference picture list is a reference picture available in amvpMerge mode, and false otherwise.

[0208] That is, if the reference picture indicated by the reference index of the AMVP reference picture list and the reference picture indicated by the reference index of the merge candidate list of the merge candidate satisfy the amvpMergeVaildRefPair value derived at the slice level is true, then isValidAmvpMerge() is true. On the contrary, if the value of amvpMergeVaildRefPair is false, the candidate's isValidAmvpMerge() becomes false.

[0209] The merge candidate list derived through the process of FIG. 13 is obtained by Fig.14 The process shown in is sorted in ascending order based on the bilateral matching cost. numValidMergeCand represents the number of candidates in the derived merge candidate list. That is, if DMVD is enabled in the current block (S1410), the bilateral matching cost is calculated for all constructed merge candidates (S1412), and the merge candidates are sorted in ascending order with reference to this value, and the candidate with the smallest error (cost) among the sorted merge candidates is given priority. In addition, if the number of derived merge candidates is not 2 or more (S1402) or DMVD is disabled in the current block (S1410), the cost of the merge candidate is made to have a MAX value (S1414, S1418) without calculating the bilateral cost, so that the sorting is not affected and the order of the derived merge candidates is maintained.

[0210] The AMVP candidate list and merge candidate list derived through the above process can be used to construct a bidirectional prediction MV for the amvpMerge mode, and the process for constructing the predicted MV is as follows: Fig.15 as shown in .

[0211] exist Fig.15 In, MVPIdx represents an AMVP candidate index derived explicitly or implicitly. numValidMergeCand represents the number of merge candidates, and the curMv[] array and curRefIdx[] array represent the motion information of the current block and the motion information and reference picture index for the reference picture list (REF_PIC_LIST_0, REF_PIC_LIST_1). For example, curMv[RefListMerge] represents the motion information of the reference picture list indicated by RefListMerge, and curMv[RefListAmvp] represents the motion information of the reference picture list indicated by RefListAmvp. RefListMerge and RefListAmvp can be REF_PIC_LIST_0 or REF_PIC_LIST_1.

[0212] The MV[] array and the refIdx[] array represent the motion information of the candidate index of the AMVP candidate list or the merge candidate list, and the candidate index means the number specified in the index array[]. For example, mv[0] of the merge candidate list represents the motion information of the 0th candidate constructed in the merge candidate list.

[0213] refer to Fig.15 , depending on whether the prediction mode in the L0 direction is the merge mode, a reference picture list for the merge mode (merged reference picture list) is determined, and a reference picture list in the direction opposite to the prediction direction in which the merge mode is applied is determined as a reference picture list for the AMVP mode (AMVP reference picture list) (S1502).

[0214] The motion information of the AMVP reference picture list is set to the motion information of the AMVP candidate indicated by the MVP candidate index among the AMVP candidates in the AMVP candidate list, and the reference picture index in the AMVP reference picture list is set (S1504). When the value of the MVP candidate index is 0 or 2 (S1506) and when the value of the MVP candidate index is 1 (S1506) and the number of merge candidates is 1 (S1508), the motion information of the merge reference picture list is set to the motion information of the 0th candidate among the merge candidates in the merge candidate list, and the reference picture index in the merge reference picture list is set to the index of the reference picture of the 0th candidate in the merge candidate list (S1510). If the value of the MVP candidate index is 1 (S1506) and the number of merge candidates is not 1 (S1508), the motion information of the merge reference picture list is set to the motion information of the 1st candidate among the merge candidates in the merge candidate list, and the reference picture index in the merge reference picture list is set to the index of the reference picture of the 1st candidate in the merge candidate list (S1510).

[0215] Examples 1-6

[0216] Embodiment 1-6 proposes a method for refining the derived motion information (predicted MV) in the process of deriving motion information using the amvpMerge mode in a coding unit or a prediction unit. Fig.16 shown.

[0217] See also Fig.16 , a merged reference picture list is determined depending on whether the prediction mode in the L0 direction is a merge mode, a reference picture list in a direction opposite to the prediction direction to which the merge mode is applied is determined as an AMVP reference picture list, a POC of a reference picture indicated by the merged reference picture list and an index is determined, and a POC of a reference picture indicated by the AMVP reference picture list and an index is determined (S1602).

[0218] When DMVD is enabled ( S1604 ), motion information (predicted MV) in amvpMerge mode is adaptively refined based on bilateral matching ( S1608 ) or template matching ( S1610 ) by considering the distance between the current picture and the reference picture ( S1606 ).

[0219] Examples 1-7

[0220] Embodiments 1-7 relate to a method of deriving motion information by using derived prediction candidates and explicitly signaled MVD information in a process of deriving motion information by using an amvpMerge mode in a coding unit or a prediction unit.

[0221] The process used for the proposed method is as follows Figure 6a and 6c shown.

[0222] refer to Figures 6a to 6c , information indicating whether the amvpMerge mode is applied (S618), information indicating a prediction direction (S622), information indicating whether an affine prediction mode is applied (S624), information indicating whether a symmetric MVD (smvd) mode is applied (S626), information about a bidirectional weight index (S628), information indicating a pair of reference pictures (S630), and information indicating a reference picture in a reference picture list (S632) can be sent by signal.

[0223] When the amvpMerge mode is applied (S618), it is determined whether the prediction direction is bidirectional (S634), the mode applied to each direction among the AMVP mode and the merge mode is determined (S636), and the reference picture index and the motion information predictor for the prediction direction determined as the AMVP mode are signaled (S638, S640).

[0224] If the affine mode is not applied (S642), it is determined whether the merge mode is applied in any direction and whether the value of the motion information predictor index in the opposite direction is less than 2 (S644). If true, the MVD is set to zero (S648), and if false, the MVD in the opposite direction is signaled (S646). If the affine mode is applied (S642), the MVD for the control point (cp0, cp1, cp2) is signaled (S650 to S654).

[0225] It is determined whether the prediction direction is unidirectional (S656), it is determined whether the smvd mode is applied (S658), the mode to be applied to each direction among the AMVP mode and the merge mode is determined (S660), and the reference picture index and motion information predictor for the prediction direction determined to be the AMVP mode are sent with a signal (S662, S664).

[0226] If the affine mode is not applied (S666), it is determined whether the merge mode is applied in any direction and whether the value of the motion information predictor index in the opposite direction is less than 2 (S668). If true, the MVD is set to zero (S672), and if false, the MVD in the opposite direction is signaled (S670). If the affine mode is applied (S666), the MVD signal for the control point (cp0, cp1, cp2) is signaled (S674 to S678).

[0227] exist Figures 6a to 6c Among the processes represented in, only process S618, process S636, process S644, process S646, process S648, process S660, process S668, process S670 and process S672 will be considered. Embodiments 1-7 are described again as follows.

[0228] If amvpMergeModeFlag[1] is true (1) (S644), the mvd of REF_PIC_LIST_0 is conditionally explicitly signaled (S646) or is set to zero MV if not separately signaled (S648). In this case, the condition means that the MVP index of REF_PIC_LIST_0 of the current block is greater than or equal to 2 (S644). In addition, if amvpMergeModeFlag[1] is true, the MVD of REF_PIC_LIST_1 is set to zero MV (S672).

[0229] If amvpMergeModeFlag[0] is true (1) (S668), the mvd for REF_PIC_LIST_1 is conditionally explicitly signaled (S670) or is set to zero MV if not separately signaled (S668). In this case, the condition means that the MVP index of REF_PIC_LIST_1 of the current block is greater than or equal to 2 (S668). In addition, if amvpMergeModeFlag[0] is true, the MVD of REF_PIC_LIST_0 is set to zero MV (S648).

[0230] The final MV is derived by compensating the MVD of each reference picture list derived through Embodiments 1-7 to the predicted MV.

[0231] Example 2

[0232] Embodiment 2 is a modification of Embodiments 1-2, and proposes a method for constructing a reference picture list for amvpMerge mode.

[0233] Fig.17 A diagram for Example 2 is shown. Fig.17 Most of the processes expressed in Figure 4 The process expressed in , and therefore, hereinafter, will be described Figure 4 The process corresponding to the difference.

[0234] according to Figure 4 , after defining bLDCFlag for a low-latency slice and constructing a reference picture list for the slice to be encoded / decoded, the value of bLDCFlag is set to true if all reference pictures in the reference picture list are forward.

[0235] according to Fig.17 In process S1708, if the current block cannot construct a reference picture set that satisfies true bidirectional prediction by considering information about reference pictures in the reference picture list of the slice, that is, if all reference pictures are in forward or backward, a reference picture set available in amvpMerge mode can be constructed.

[0236] Embodiment 2 also proposes a method of constructing a reference picture set available in the amvpMerge mode when the slice is a B slice that generates a prediction block using two or more pieces of motion information.

[0237] exist Fig.18a and 18b An example of a method of constructing a reference picture set when the type of slice is a B slice is shown in FIG. Fig.18a and 18b Most of the processes expressed in Figure 5a The process expressed in , and therefore will focus on Figure 5a The process corresponding to the difference in .

[0238] refer to Fig.18a and 18b ,exist Figure 5a The process S504 for checking whether the value of bLDCFlag is true is initially executed in Fig.18a and 18b The process is not initially executed.

[0239] in addition, Figure 5a The procedures S528 to S536 are changed to Fig.18a and 18bThe process S1828 to S1844 is performed. Specifically, the value of bLDCFlag is determined (S1828), and if bLDCFlag=1, a process of checking whether the proposed condition is satisfied is performed (S1830), and if bLDCFlag=0, it is checked whether condition 1 is satisfied (S1832). Thereafter, the POC of the reference picture corresponding to refIdxLX is defined as pocLX, the POC of the reference picture corresponding to refIdxLY is defined as pocLY, and the POC of the current picture is defined as curPOC (S1834), and the value of bLDCFlag is determined again (S1836). If bLDCFlag=1, it is checked whether condition 3 is satisfied (S1840), and if bLDCFlag=0, it is checked whether condition 2 is satisfied (S1838). If condition 3 is satisfied and condition 2 is satisfied, the value of a variable (Valid) indicating whether a reference picture set available in amvpMerge mode can be constructed is set to true, and a pair of reference pictures indicated by refIdxLX and refIdxLY is set as a reference picture set available in amvpMerge mode (S1842). Thereafter, determination of the next reference picture is performed (S1844).

[0240] Condition 1 (S1832) is a condition on the state of the reference picture, which may include whether the reference pictures corresponding to refIdxInLisX and refIdxInListY have been encoded / decoded through reference picture resampling (RPR), and / or whether they are long-term reference pictures, and / or whether there is a weight for weighted prediction.

[0241] That is, as an example, condition 1 may be specified as a case where all or one or more of the following six conditions are satisfied.

[0242] 1. The reference picture corresponding to refIdxInListX is not an RPR

[0243] 2. The reference picture corresponding to refIdxInListY is not RPR

[0244] 3. The reference image corresponding to refIdxInListX is not a long-term reference image

[0245] 4. The reference picture corresponding to refIdxInListY is not a long-term reference picture

[0246] 5. The weights of the weighted prediction of the reference picture corresponding to refIdxInListX are not signaled

[0247] 6. The weights of the weighted prediction of the reference picture corresponding to refIdxInListY are not signaled

[0248] Assuming both conditions 1 are satisfied, determine whether the reference pictures corresponding to refIdxLX and refIdxLY can be used as a reference picture set for amvpMerge mode. If not, determine the next reference picture.

[0249] Condition 2 ( S1838 ) represents a condition for determining whether or not a reference picture corresponding to refIdxLX and refIdxLY is suitable as a reference picture for the amvpMerge mode by considering its POC.

[0250] If the POC of the reference picture corresponding to refIdxLX is defined as pocLX, the POC of the reference picture corresponding to refIdxLY is defined as pocLY, and the POC of the current picture is defined as curPOC, when one reference picture has a POC smaller than the current picture and the other reference picture has a POC larger than the current picture, Condition 2 may be satisfied. That is, Condition 2 may be expressed as described in Equation 1 above.

[0251] Condition 3 (S1840) represents a condition for determining whether the reference picture corresponding to refIdxLX and refIdxLY is suitable as a reference picture for amvpMerge mode prediction by considering the POC of the reference picture corresponding to refIdxLX and refIdxLY in the case of a low-latency slice. Condition 3 can be expressed as Equation 2, which means that when the POC of the reference picture corresponding to refIdxLX is defined as pocLX, the POC of the reference picture corresponding to refIdxLY is defined as pocLY, and the POC of the picture containing the slice to be encoded / decoded is defined as curPOC, the two reference pictures are not the same picture, and it can be said that Condition 3 is satisfied when the two pictures are not the same.

[0252] [Equation 2]

[0253] Condition 3:

[0254] Condition 3 can be expressed by Equation 3, which means that the two reference pictures are reference pictures having a specific distance or more, and if the two pictures have a distance difference greater than a predefined THRESHOLD, it can be said that Condition 3 is satisfied.

[0255] [Equation 3]

[0256] Condition 3:

[0257] abs() in Equation 3 means an absolute value, and THRESHOLD is a predefined value that can be explicitly or implicitly derived in a decoder / encoder.

[0258] The conditions used in the process of determining whether the proposed conditions are satisfied ( S1830 ) may be defined as follows.

[0259] 1. Is useDMVD() satisfied?

[0260] 2. Status information of reference images

[0261] The status information of the reference picture may be specified as a case where one or more of the following six conditions are satisfied.

[0262] 1. The reference picture corresponding to refIdxInListX is not an RPR

[0263] 2. The reference picture corresponding to refIdxInListY is not RPR

[0264] 3. The reference image corresponding to refIdxInListX is not a long-term reference image

[0265] 4. The reference picture corresponding to refIdxInListY is not a long-term reference picture

[0266] 5. The weights for weighted prediction of the reference picture corresponding to refIdxInListX are not signaled

[0267] 6. The weights for weighted prediction of the reference picture corresponding to refIdxInListY are not signaled

[0268] ]The satisfaction of the proposed condition can be defined as the case where the status information of the reference picture is fully satisfied when useDMVD() is satisfied, or the case where the status information of the reference picture is partially satisfied when useDMVD() is satisfied.

[0269] Example 3

[0270] Embodiment 3 is a modification of Embodiments 1-2 and 2, and proposes a method for constructing a reference picture list for amvpMerge mode.

[0271] Fig.19 The figure shows Example 3. Fig.19 Most of the processes expressed in Figure 4 The process expressed in is the same as that in Figure 4 The process corresponding to the difference.

[0272] according to Figure 4 After executing the process of constructing the valid reference picture set of the amvpMerge mode (S416), the next slice is determined. Fig.19 After performing the process of constructing a valid reference picture set of the amvpMerge mode (S1916) and performing the process of deriving a default reference picture for the amvpMerge mode (S1918), determining the next slice is performed. Here, process S1918 may correspond to a process of deriving an index (default reference index) of a default reference picture by referring to the reference picture set determined to be available in process S1916.

[0273] The process of deriving the default reference image can be done by Fig.20a and Fig.20b to execute the process represented in .

[0274] refer to Fig.20a and Fig.20b , if there is a reference picture set available in the current slice, that is, bAmvpMergeEnabledFlag is true (1) (S2002), the process of deriving a default reference picture is performed. Various variables are defined (S2004), and it is determined whether the amvpMergeUniqValidRefIdx value of the reference picture list L0 is true (S2006). If it is true, the amvpMergeUniqValidRefIdx of the reference picture list L0 is set to the default reference picture in the L0 direction (S2008) and if it is false, it is determined whether all reference pictures in the L0 direction have been determined (S2010). If there are reference pictures in the L0 direction for which determination has not been performed, it is determined whether all reference pictures in the L1 direction have been determined (S2012), and if there are reference pictures in the L1 direction for which determination has not been performed, the proposed process is performed (S2014). The processes S2010 to S2014 ( S2016 , S2018 ) are repeatedly performed, so that all reference pictures in the L0 direction and all reference pictures in the L1 direction are determined.

[0275] After initializing the reference picture indexes in the L1 direction and the L0 direction (S2020), it is determined whether the amvpMergeUniqValidRefIdx value of the reference picture list L1 is true (S2022). If it is true, the amvpMergeUniqValidRefIdx of the reference picture list L1 is set as the default reference picture in the L1 direction (S2024), and if it is false, it is determined whether all reference pictures in the L1 direction have been determined (S2026). If there is a reference picture in the L0 direction that has not been performed, it is determined whether all reference pictures in the L0 direction have been determined (S2028), and if there is a reference picture in the L0 direction that has not been determined, the proposed process is performed (S2030). The processes of S2026 to S2030 are repeatedly performed (S2032, S2034) to complete the determination of all reference pictures in the L1 direction and all reference pictures in the L0 direction.

[0276] The proposed process means that the value of amvpMergeDefaultLX is derived when the following conditions are met, where LX represents REF_PIC_LIST_0 and REF_PIC_LIST_1.

[0277] 1. amvpMergeValidRefPair[refIdxInLX][refIdxInLY] == true

[0278] 2. abs(POC of the reference picture indicated by refIdxInLX – POC of the current picture) == abs(POC of the reference picture indicated by refIdxInLY – POC of the current picture)

[0279] 3. The reference picture with the minimum value of abs (POC of the reference picture indicated by refIdxInLX – POC of the current picture)

[0280] 4. The reference picture with the minimum value of abs (POC of the reference picture indicated by refIdxInLY – POC of the current picture)

[0281] The proposed process can define the reference picture that satisfies condition 2 when condition 1 is satisfied as the default reference picture.

[0282] The proposed process can define the reference picture that satisfies condition 3 when condition 1 is satisfied as the default reference picture in the LX direction.

[0283] The proposed process may define a reference picture satisfying condition 4 as a default reference picture in the LX direction when condition 1 is satisfied.

[0284] Embodiment 3-4

[0285] Embodiment 3-4 is a modification of Embodiment 1-5, and proposes a method of constructing prediction candidates in the process of deriving motion information through the amvpMerge mode in a coding unit or a prediction unit.

[0286] In the process of deriving the merge candidate list for amvpMerge mode prediction, motion prediction information may be derived by scaling and TMVP prediction motion information targeting a default reference picture index.

[0287] In addition, in the process of deriving the merge candidate list for amvpMerge mode prediction, the motion prediction information can be derived by scaling the HMVP and AffineHMVP prediction motion information targeting the default reference picture index.

[0288] In addition, in the process of deriving the merge candidate list for amvpMerge mode prediction, the motion prediction information may be derived by scaling the pairwise prediction motion information targeting the default reference picture index.

[0289] In addition, in the process of deriving the merge candidate list for amvpMerge mode prediction, the motion prediction information may be derived by scaling the fallback prediction motion information targeting the default reference picture index.

[0290] Example 5

[0291] Embodiment 5 is a modification of Embodiments 1-5, and proposes a method for sorting a merge candidate list (merge candidates within the merge candidate list).

[0292] exist Fig.21 A diagram for Example 5 is shown in FIG. Fig.21 Most of the processes shown in Fig.14 The process shown in FIG. 1 operates identically, and therefore, hereinafter, the process described with Fig.14 The process corresponding to the difference.

[0293] according to Fig.14 , when DMVD is enabled in the current block (S1410), only the process of calculating the bilateral matching cost for all constructed merge candidates is performed (S1412). Fig.21 , when DMVD is enabled in the current block ( S2112 ), depending on whether the proposed condition is satisfied ( S2114 ), a process of calculating a template matching cost ( S2116 ) or a process of calculating a bilateral matching cost ( S2118 ) is performed.

[0294] The proposed conditions can be defined as follows:

[0295] 1. bLDCFlag == true

[0296] 2. The reference pictures of the merged candidates and the reference pictures of the amvp candidates are not bidirectional

[0297] 3. The merged candidate reference image and the amvp candidate reference image are not truly bidirectional

[0298] The proposed conditions may include one of the above three conditions. In addition, the proposed conditions may include conditions 1 and 2 or conditions 1 and 3.

[0299] The bidirectionality of condition 2 and the true bidirectionality of condition 3 may be defined as the following equations 4 and 5. When the POC of the reference picture of the merge candidate is defined as pocMerge, the POC of the reference picture of the AMVP candidate is defined as pocAmvp, and the POC of the current picture is defined as curPoc.

[0300] [Equation 4]

[0301] Bidirectional:

[0302] [Equation 5]

[0303] True Bidirectional:

[0304] Fig. 22 Another figure for Example 5 is shown. Fig. 22 Most of the processes shown in Fig.14 The process shown in FIG. 1 is identical to that shown in FIG. 1 , and therefore, in the following, only the process shown in FIG. 1 will be described. Fig.14 The process corresponding to the difference.

[0305] refer to Fig. 22 , when bLDCFlag is true (S2210) and DMVD is enabled in the current block (S2214), a process of calculating the template matching cost is performed (S2216). When bLDCFlag is true (S2210), that is, when all reference pictures of the current slice are backward or forward, the cost is defined as the maximum value without calculating the cost separately (S2218). When all reference pictures of the current slice are backward or forward, this operation is actually not affected by the sorting performance, thereby maintaining the order of the derived merge candidate list.

[0306] Example 6

[0307] Embodiment 6 is a modification of Embodiments 1-5 and 1-6, and proposes a method for constructing prediction candidates and a method for refining motion information in the process of deriving motion information through the amvpMerge mode in a coding unit or a prediction unit.

[0308] exist Fig.23 An example for Embodiment 6 is shown in FIG. Fig.23 Most of the processes shown in Fig.16 The same operation as the process shown in FIG. 1 and therefore, in the following, the same operation as that shown in FIG. 1 and FIG. 1 will be described. Fig.16 The process corresponding to the difference.

[0309] according to Fig.16 After performing the process of determining whether the DMVD is enabled (S1604), a process of considering the distance between the current picture and the reference picture (S1606) is performed. Fig.23 , if DMVD is enabled ( S2304 ), after determining whether the current picture exists between the reference picture of the merge candidate and the reference picture of the AMVP candidate based on the POC ( S2306 ), a process of considering the distance between the current picture and the reference picture is performed ( S2308 ).

[0310] When process S2304 and process S2306 are combined, the following bidirectional and true bidirectional satisfaction can be determined: pocMerge represents the POC of the reference picture of the merge candidate, pocAMVP represents the POC of the reference picture of the amvp candidate, and curPoc represents the POC of the current picture.

[0311] - Bidirectional:

[0312] -True Bidirectional:

[0313] In the case of a reference picture set without a bidirectional relationship, refinement is performed using a template matching method ( S2310 ), and if bidirectionality is satisfied but there is no true bidirectional relationship, refinement is performed using a template matching method ( S2312 ).

[0314] exist Fig.24 Another example for Embodiment 6 is shown in FIG. Fig.24 Most of the processes shown in Fig.11 The process shown in FIG. 1 operates identically, and therefore, in the following, only the process shown in FIG. 1 will be described. Fig.11 The process corresponding to the difference in .

[0315] according to Fig.11 After performing the process of deriving the prediction motion vector based on the merge candidate list (S1114), the process of refining the prediction motion vector is performed (S1116). Fig.24, derive a prediction motion vector based on the merge candidate list (S2414), and determine the value of bLDCFlag (S2416). If bLDCFlag is false, perform a process of refining the prediction motion vector (S2418), and if bLDCFlag is true, terminate the process.

[0316] According to embodiment 6, if bLDCFlag is true, that is, if all reference pictures of the current slice are backward or forward, the process of refining the motion vector can be skipped.

[0317] Example 7

[0318] Example 7 proposes a method for deriving motion information for amvpMerge mode in the case of low-delay pictures.

[0319] In the process of signaling a reference picture index, an AMVP candidate index, an MVD, etc. for deriving a prediction direction of motion information in an AMVP prediction mode, the AMVP candidate index may be derived without signaling the AMVP candidate index.

[0320] AMVP motion information may be derived as follows.

[0321] 1. After constructing multiple AMVP prediction candidates without signaling the AMVP candidate index, the AMVP prediction candidates are sorted based on the decoder-side template cost, and the prediction candidate with the minimum cost is derived as the AMVP motion information of the current block.

[0322] 2. In the case where the AMVP candidate index is not signaled, a list with only one AMVP prediction candidate is constructed and derived from the AMVP motion information of the current block.

[0323] In the process of signaling the reference picture index, AMVP candidate index, MVD, etc. for deriving the prediction direction of motion information in the AMVP prediction mode, the MVD may be set to zero MVD when the MVD is not signaled. Setting the MVD to zero may be performed when at least one of the following conditions is met.

[0324] 1. Perform the AMVP prediction candidate list sorting process based on the decoder side template cost

[0325] 2. Refine the motion information of amvpMerge mode based on the decoder side template cost

[0326] For the prediction direction that induces motion in the merge prediction mode, the merge prediction candidate at index 0 of the prediction candidate list is used without separate signaling. Here, the merge prediction candidate list may be a prediction candidate list that has undergone the process of Embodiment 4 or Embodiment 5.

[0327] Encoding method and decoding method

[0328] Hereinafter, an image encoding method and a decoding method performed by the image encoding apparatus 100 and the image decoding apparatus 200 according to one embodiment will be described.

[0329] refer to Fig.25 , the image encoding device 100 and the image decoding device 200 may determine prediction modes to be applied to prediction directions of the current block, respectively (S2502). Here, the prediction mode may include an AMVP mode and a merge mode. For example, among the prediction directions, the prediction mode of a specific prediction direction may be determined as the AMVP mode, and the prediction mode of another prediction direction may be determined as the merge mode.

[0330] The image encoding device 100 and the image decoding device 200 may generate a prediction block for each prediction direction based on at least one reference picture set, at least one AMVP candidate (AMVP prediction candidate), and at least one merge candidate (merge prediction candidate) (S2504). The image encoding device 100 and the image decoding device 200 may derive a (final) prediction block of the current block based on the prediction block generated from the process S2504 (S2506).

[0331] At least one reference picture set may be constructed based on that a POC of a reference picture of a current slice including a current block is smaller than or greater than a POC of a current picture including the current block.

[0332] In addition, if a predetermined first condition is satisfied, at least one reference picture set may be constructed. Here, the predetermined first condition may include whether DMVD is applied to at least one of status information of the current block and the reference picture.

[0333] In addition, at least one reference picture set may include a default reference picture based on at least one of the availability of a reference picture in a specific prediction direction and a reference picture in another prediction direction and the satisfaction of a predetermined second condition. Here, availability may mean whether the reference picture is a reference picture available in the amvpMerge mode. In addition, the predetermined second condition may include at least one of whether the POC difference (first difference) between the current picture and the reference picture in the specific prediction direction is the smallest and whether the POC difference (second difference) between the current picture and the reference picture in the other prediction direction is the smallest. According to an embodiment, the predetermined second condition may further include whether the first difference and the second difference are equal to each other.

[0334] If a default reference picture is included in a reference picture set, a merge candidate may be scaled using the default reference picture, and a prediction block in another prediction direction (a prediction direction in which a merge mode is applied) may be derived based on the scaled merge candidate.

[0335] At least one merge candidate may be sorted based on whether the POC of the reference picture of the current slice is less than or greater than the POC of the current picture. Depending on whether a predetermined third condition is met, the sorting of the merge candidates may be performed based on either a template matching error or a bilateral matching error. The predetermined third condition may include whether the reference picture of the merge candidate and the reference picture of the AMVP candidate have different prediction directions. In addition, the predetermined third condition may include whether the "POC difference between the reference picture of the merge candidate and the current picture" and the "POC difference between the reference picture of the AMVP candidate and the current picture" have the same absolute value.

[0336] Based on whether the predetermined fourth condition is satisfied, the AMVP candidate and the merge candidate may be refined based on either the template matching error or the bilateral matching error. The fourth condition may include whether the reference picture of the merge candidate and the reference picture of the AMVP candidate have different prediction directions. In addition, the predetermined fourth condition may include whether the "difference between the POC between the reference picture of the merge candidate and the current picture" and the "POC difference between the reference picture of the AMVP candidate and the current picture" have the same absolute value.

[0337] Fig.26 is a diagram showing a content streaming system to which an embodiment of the present disclosure can be applied.

[0338] like Fig.26 As shown, the content streaming system to which the embodiments of the present disclosure are applied may mainly include an encoding server, a streaming server, a network server, a media storage device, a user device, and a multimedia input device.

[0339] The encoding server compresses the content input from a multimedia input device such as a smart phone, camera, or camcorder into digital data to generate a bitstream and sends the bitstream to the streaming server. As another example, when a multimedia input device such as a smart phone, camera, or camcorder directly generates a bitstream, the encoding server can be omitted.

[0340] The bitstream may be generated by the image encoding method or the image encoding device to which the embodiments of the present disclosure are applied, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.

[0341] The streaming server sends multimedia data to the user device based on the user's request through the network server, and the network server is used as a medium to inform the user of the service. When the user requests the required service from the network server, the network server can deliver it to the streaming server, and the streaming server can send the multimedia data to the user. In this case, the content streaming system may include a separate control server. In this case, the control server is used to control the command / response between the devices in the content streaming system.

[0342] The streaming server may receive content from a media storage device and / or an encoding server. For example, when receiving content from an encoding server, the content may be received in real time. In this case, in order to provide a smooth streaming service, the streaming server may store the bitstream within a predetermined time.

[0343] Examples of user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation devices, tablet PCs, tablet PCs, ultrabooks, wearable devices (e.g., smart watches, smart glasses, head-mounted displays), digital televisions, desktop computers, digital signage, etc.

[0344] Each server in the content streaming system may operate as a distributed server, in which case data received from each server may be distributed.

[0345] The scope of the present disclosure includes software or machine-executable commands (e.g., operating systems, applications, firmware, programs, etc.) for enabling operations of methods according to various embodiments to be performed on a device or computer, and non-transitory computer-readable media having such software or commands stored thereon and executable on a device or computer.

[0346] Industrial Applicability

[0347] The embodiments of the present disclosure may be used to encode or decode an image.

Claims

1. An image decoding method performed by an image decoding device, the image decoding method comprising: Determining prediction modes respectively applied to prediction directions of the current block, the prediction modes comprising an advanced motion vector prediction (AMVP) mode and a merge mode; Generate a prediction block for the prediction direction based on at least one reference picture set, at least one AMVP candidate, and at least one merge candidate; as well as deriving a prediction block of the current block based on the prediction block, Among the prediction directions, a prediction mode of a specific prediction direction is determined as the AMVP mode and a prediction mode of another prediction direction is determined as the merge mode.

2. The image decoding method according to claim 1, wherein: The reference picture set is constructed based on a picture order count (POC) of a reference picture of a current slice including the current block being smaller than or larger than the POC of a current picture including the current block.

3. The image decoding method according to claim 2, in, Based on the predetermined first condition being satisfied, further constructing the reference picture set, and The predetermined first condition includes whether decoder-side motion vector derivation (DMVD) is applied to at least one of the status information of the current block or the reference picture.

4. The image decoding method according to claim 3, wherein: The reference picture set is further constructed based on whether the reference picture of the specific prediction direction and the reference picture of the other prediction direction are the same or whether the POC difference between the reference picture of the specific prediction direction and the reference picture of the other prediction direction is equal to or greater than a threshold.

5. The image decoding method according to claim 1, wherein: The reference picture set includes a default reference picture based on at least one of whether the reference picture of the specific prediction direction and the reference picture of the other prediction direction are available or whether a predetermined second condition is satisfied.

6. The image decoding method according to claim 5, wherein: The predetermined second condition includes at least one of whether a POC difference between the current picture and a reference picture of the specific prediction direction is the smallest or whether a POC difference between the current picture and a reference picture of another prediction direction is the smallest.

7. The image decoding method according to claim 5, wherein: The predetermined second condition includes whether a first difference and a second difference are the same, the first difference being a POC difference between the current picture and a reference picture of the specific prediction direction, and the second difference being a POC difference between the current picture and a reference picture of the other prediction direction.

8. The image decoding method according to claim 5, in, scaling the merge candidate using the default reference picture, and Wherein, a prediction block of the other prediction direction is derived based on the scaled merge candidate.

9. The image decoding method according to claim 1, wherein: The at least one merge candidate is sorted based on that a POC of a reference picture of a current slice including the current block is less than or greater than a POC of a current picture including the current block.

10. The image decoding method according to claim 9, wherein: The at least one merging candidate is sorted based on whether a predetermined third condition is satisfied and based on any one of a template matching error and a bilateral matching error.

11. The image decoding method according to claim 10, wherein: The predetermined third condition includes whether the reference picture of the merge candidate and the reference picture of the AMVP candidate have different prediction directions.

12. The image decoding method according to claim 11, wherein: The predetermined third condition further includes whether a POC difference between the reference picture of the merge candidate and the current picture and a POC difference between the reference picture of the AMVP candidate and the current picture have the same absolute value.

13. The image decoding method according to claim 1, in, Based on whether a predetermined fourth condition is satisfied, the AMVP candidate and the merge candidate are refined based on any one of a template matching error or a bilateral matching error, and The fourth condition includes that the reference picture of the merge candidate and the reference picture of the AMVP candidate have different prediction directions.

14. The image decoding method according to claim 13, wherein: The predetermined fourth condition further includes whether a POC difference between the reference picture of the merge candidate and the current picture and a POC difference between the reference picture of the AMVP candidate and the current picture have the same absolute value.

15. An image encoding method performed by an image encoding device, the image encoding method comprising: Determining prediction modes respectively applied to prediction directions of the current block, the prediction modes comprising an advanced motion vector prediction (AMVP) mode and a merge mode; Generate a prediction block for the prediction direction based on at least one reference picture set, at least one AMVP candidate, and at least one merge candidate; as well as deriving a prediction block of the current block based on the prediction block, Among the prediction directions, a prediction mode of a specific prediction direction is determined as the AMVP mode and a prediction mode of another prediction direction is determined as the merge mode.

16. A method for transmitting a bit stream generated by an image encoding method, the image encoding method comprising: Determining prediction modes respectively applied to prediction directions of the current block, the prediction modes comprising an advanced motion vector prediction (AMVP) mode and a merge mode; Generate a prediction block for the prediction direction based on at least one reference picture set, at least one AMVP candidate, and at least one merge candidate; as well as deriving a prediction block of the current block based on the prediction block, Among the prediction directions, a prediction mode of a specific prediction direction is determined as the AMVP mode and a prediction mode of another prediction direction is determined as the merge mode. 17 . A computer-readable recording medium storing a bit stream generated by the image encoding method according to claim 15 .