Image encoding / decoding method, method for transmitting bit stream, and recording medium for storing bit stream
By adopting the dual prediction method in image encoding and decoding equipment and performing inter-frame prediction based on different types of prediction units, the problem of high transmission and storage costs of high-definition and ultra-high-definition images is solved, and efficient image encoding and decoding is achieved.
Patent Information
- Application Number
- CN202380021836.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-02-15
- Filing Date
- 2023-02-15
- Publication Date
- 2024-09-24
AI Technical Summary
Existing technology is difficult to effectively improve the encoding/decoding efficiency of high-definition and ultra-high-definition images, resulting in increased transmission and storage costs.
Using a bi-prediction method based on different types of prediction units, the image decoding device and encoding device perform derivation and encoding of bi-directional motion information during inter-frame prediction to improve the bit efficiency of motion vector differences.
It achieves improved image encoding/decoding efficiency, improved compression efficiency, reduced transmission and storage costs, and enhanced image quality.
Smart Images

Figure CN118696540A_ABST
Abstract
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 bi-prediction based on different types of prediction units during 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 the amount of bits transmitted is relatively increased compared to existing image data. The increase in the amount of information or the amount of bits 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] Another object of the present disclosure is to provide a method for performing bi-prediction based on different types of prediction units.
[0007] One object of the present disclosure is to provide various methods of deriving prediction candidates for bi-prediction.
[0008] An object of the present disclosure is to provide a method for encoding a motion vector difference and obtaining the motion vector difference.
[0009] 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.
[0010] 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 apparatus according to the present disclosure and used to reconstruct an image.
[0011] 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.
[0012] 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.
[0013] Technical Solution
[0014] 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 the following steps: obtaining first information based on that the prediction direction of the current block is bidirectional; specifying that different prediction types are applied to each prediction direction of the current block based on the first information, deriving at least one bidirectional motion information candidate corresponding to the different prediction types from a reference block; and based on any one of the at least one bidirectional motion information candidate, performing bi-prediction on the current block using the different prediction types. The different prediction types may be a sub-block unit (sub PU) prediction type and a non-sub-block unit (non-sub PU) prediction type.
[0015] 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 the following steps: determining whether different prediction types are applied to each prediction direction of the current block based on the prediction direction of the current block being bidirectional, and first information specifying that different prediction types are applied to each prediction direction of the current block is encoded into a bitstream; based on the different prediction types being applied to each prediction direction of the current block, deriving at least one bidirectional motion information candidate corresponding to the different prediction type from a reference block; and based on any one of the at least one bidirectional motion information candidate, performing bi-prediction on the current block using the different prediction type. The different prediction types may be a sub-block unit (sub PU) prediction type and a non-sub-block unit (non-subPU) prediction type.
[0016] 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.
[0017] 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.
[0018] 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.
[0019] Beneficial Effects
[0020] According to the present disclosure, an image encoding / decoding method and apparatus with improved encoding / decoding efficiency can be provided.
[0021] Furthermore, according to the present disclosure, compression efficiency may be improved by adaptively deriving motion information for each prediction direction.
[0022] Furthermore, according to the present disclosure, candidates for deriving different motion information for each prediction direction may be efficiently constructed.
[0023] Furthermore, according to the present disclosure, the bit efficiency for signaling a motion vector difference can be improved.
[0024] 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
[0025] Figure 1 is a diagram schematically showing a video encoding system to which one embodiment of the present disclosure can be applied.
[0026] Figure 2 is a diagram schematically showing an image encoding device to which one embodiment of the present disclosure can be applied.
[0027] Figure 3 is a diagram schematically showing an image decoding device to which one embodiment of the present disclosure can be applied.
[0028] Figure 4 is a diagram schematically showing an inter-frame prediction unit of an image encoding device.
[0029] Figure 5 is a flowchart illustrating a method of decoding an image based on inter-frame prediction.
[0030] Figure 6 is a diagram schematically showing an inter-frame prediction unit of an image decoding device.
[0031] Figure 7 is a flowchart illustrating a method of decoding an image based on inter-frame prediction.
[0032] Figure 8 is a flowchart illustrating an inter-frame prediction method.
[0033] Fig. 9 is a flowchart illustrating an image encoding method according to one embodiment of the present disclosure.
[0034] Fig.10 is a flowchart illustrating an image decoding method according to one embodiment of the present disclosure.
[0035] Fig.11 is a diagram for explaining an example of a bidirectional prediction method according to one embodiment of the present disclosure.
[0036] Figures 12 to 15 is a diagram for explaining an example of deriving bidirectional motion information candidates.
[0037] Fig.16 is a flowchart illustrating an image encoding method and an image decoding method according to another embodiment of the present disclosure.
[0038] Fig.17 is a flowchart illustrating an image encoding method and an image decoding method according to another embodiment of the present disclosure.
[0039] Fig.18 is a diagram for explaining an example of neighboring blocks that can be used to derive bidirectional motion information candidates.
[0040] Fig.19 is a flowchart illustrating an image encoding method according to another embodiment of the present disclosure.
[0041] Fig. 20 is a flowchart illustrating an image decoding method according to another embodiment of the present disclosure.
[0042] Fig.21 is a flowchart illustrating an image encoding method according to another embodiment of the present disclosure.
[0043] Fig. 22 is a flowchart illustrating an image decoding method according to another embodiment of the present disclosure.
[0044] Fig.23 is a diagram for explaining an example of signaling a motion vector difference according to the present disclosure.
[0045] Fig.24 is a diagram for explaining various positions of reference blocks.
[0046] Fig.25 is a diagram showing a content streaming system to which an embodiment of the present disclosure can be applied. DETAILED DESCRIPTION
[0047] 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 may be implemented in various forms and is not limited to the embodiments described herein.
[0048] 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.
[0049] 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.
[0050] 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.
[0051] 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.
[0052] 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.
[0053] 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.
[0054] 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).
[0055] In the present disclosure, "pixel" or "pel" may refer to 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.
[0056] 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 the 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.
[0057] 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".
[0058] 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".
[0059] 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".
[0060] 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".
[0061] Video Coding System Overview
[0062] Figure 1 is a diagram showing a video encoding system to which an embodiment of the present disclosure can be applied.
[0063] 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.
[0064] 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.
[0065] The video source generator 11 can obtain the video / image by the process of capturing, synthesizing or generating the 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 generate the video / image (electronically). 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.
[0066] 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.
[0067] 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.
[0068] 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.
[0069] The renderer 23 may render the decoded video / image. The rendered video / image may be displayed through a display.
[0070] Overview of Image Coding Equipment
[0071] Figure 2 is a diagram schematically showing an image encoding device to which an embodiment of the present disclosure can be applied.
[0072] 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.
[0073] 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.
[0074] The image segmenter 110 may segment the input image (or picture or frame) input to the image encoding device 100 into one or more processing units. For example, the processing unit may be referred to as a coding unit (CU). The 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, the quadtree structure may be applied first, and then the binary tree structure and / or the 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 the 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 prediction, transformation, and reconstruction processes described later. As another example, the processing unit of the encoding process may be a prediction unit (PU) or a transformation 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.
[0075] 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.
[0076] The intra prediction unit (intra predictor) 185 can predict the current block by referring to the samples in the current picture. Depending on the intra prediction mode and / or intra prediction technology, the reference samples can be located in the neighbors of the current block or can 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 according to the settings. 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.
[0077] 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, 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 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.
[0078] The prediction unit may generate a prediction signal based on various prediction methods and prediction techniques described below. For example, the prediction unit may not only apply intra prediction or inter prediction, but may also apply intra prediction and inter prediction simultaneously to predict the current block. The prediction method of applying both intra prediction and inter prediction simultaneously 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 position separated by 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.
[0079] The prediction signal generated by the prediction unit can be used to generate a reconstruction signal or to generate a residual signal. The subtractor 115 can 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 can be transmitted to the transformer 120.
[0080] The transformer 120 may generate transform coefficients 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.
[0081] 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.
[0082] 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.
[0083] The bitstream may be transmitted over 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) for transmitting a signal output from the entropy encoder 190 and / or a storage unit (not shown) for storing 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.
[0084] 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.
[0085] 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.
[0086] 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.
[0087] 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.
[0088] 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.
[0089] Overview of Image Decoding Equipment
[0090] Figure 3 is a diagram schematically showing an image decoding device to which an embodiment of the present disclosure can be applied.
[0091] 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.
[0092] 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.
[0093] The image decoding device 200 having received a bit stream including video / image information may perform the same Figure 2 The image encoding device 100 may reconstruct the image 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).
[0094] 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 may decode the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output 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 can receive a bin corresponding to each syntax element in the bitstream, use the decoding target syntax element information, the decoding information of the neighboring block and the decoding target block, or the information of the symbol / bin decoded in the previous stage to determine the context model, 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 can 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. The information related to the prediction in the information decoded by the entropy decoder 210 can be provided to the prediction unit (inter-frame predictor 260 and intra-frame prediction unit 265), and the residual value of the entropy decoding performed on it in the entropy decoder 210, that is, the quantized transform coefficient and related parameter information can be input to the dequantizer 220. In addition, the information about filtering in the information decoded by the entropy decoder 210 can 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 .
[0095] 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 a dequantizer 220, an inverse transformer 230, an adder 235, a filter 240, a memory 250, an inter-frame prediction unit 260, or at least one of an intra-frame prediction unit 265.
[0096] 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 the coefficient scanning order performed in the 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.
[0097] The inverse transformer 230 may inversely transform the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0098] 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).
[0099] 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.
[0100] 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.
[0101] The inter-frame predictor 260 can 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-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 a motion vector and / or a 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 information about the prediction may include information indicating the inter-frame prediction mode of the current block.
[0102] 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.
[0103] 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.
[0104] The (modified) reconstructed picture stored in the DPB of the memory 250 can be used as a reference picture in the inter-frame predictor 260. The memory 250 can 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 can 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 can store the reconstructed samples of the reconstructed block in the current picture and transmit the reconstructed samples to the intra-frame prediction unit 265.
[0105] 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.
[0106] Inter prediction
[0107] The prediction unit of the image encoding device 100 and the image decoding device 200 may derive prediction samples by performing inter-frame prediction block by block. 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. In this article, 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 on a per-block, sub-block or sample basis 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-frame prediction type (L0 prediction, L1 prediction, dual 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 sum of the motion vector predictor and the motion vector difference may be used to derive the motion vector of the current block.
[0108] Depending on the inter-frame prediction type (L0 prediction, L1 prediction, dual 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 the L0 motion vector and the L1 motion vector may be referred to as bidirectional prediction. In this document, 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 before the current picture in output order as a reference picture. The reference picture list L1 may include a picture after the current picture in 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 also include a picture after the current picture in 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 also include a picture preceding the current picture in 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. Herein, the output order may correspond to a picture order count (POC) order.
[0109] Figure 4 is a diagram schematically showing the inter-frame prediction unit 180 of the image encoding device 100, and Figure 5 is a flowchart illustrating a method of encoding an image based on inter-frame prediction.
[0110] The image encoding device 100 may perform inter prediction on the current block (S510). The image encoding device 100 may derive the inter prediction mode and motion information of the current block, and may generate a prediction sample of the current block. In this article, the process of determining the inter prediction mode, deriving the motion information, and generating the prediction sample may be performed simultaneously, or any one process may be performed before the other process. For example, the inter prediction unit 180 of the image encoding device 100 may include a prediction mode determination unit 181, a motion information derivation unit 182, and a prediction sample derivation unit 183. The prediction mode determination unit 181 may determine a prediction mode for the current block. The motion information derivation unit 182 may derive the motion information of the current block. The prediction sample derivation unit 183 may derive the prediction sample of the current block. For example, the inter prediction unit 180 of the image encoding device 100 may search for a predetermined area (search area) of a reference picture of a block similar to the current block through motion estimation, and may derive a reference block whose difference with the current block is the smallest or less than or equal to a predetermined standard. Based on this, a reference picture index indicating a reference picture where the reference block is located can be derived, and a motion vector can be derived based on a position difference between the reference block and the current block. The image encoding apparatus 100 can determine a mode applied to the current block among various prediction modes. The image encoding apparatus 100 can compare RD costs for various prediction modes, and can determine an optimal prediction mode for the current block.
[0111] For example, when the skip mode or merge mode is applied to the current block, the image encoding device 100 may construct a merge candidate list described later, and may derive a reference block whose difference with the current block is the smallest or less than or equal to a predetermined standard among the reference blocks indicated by the merge candidates included in the merge candidate list. In this case, a merge candidate associated with the derived reference block may be selected, and merge index information indicating the selected merge candidate may be generated and signaled to the decoding device. The motion information of the current block may be derived using the motion information of the selected merge candidate.
[0112] As another example, when the (A)MVP mode is applied to the current block, the image encoding device 100 may construct the (A)MVP candidate list described later, and may use the motion vector of the MVP candidate selected from the motion vector predictor (MVP) candidates included in the (A)MVP candidate list as the MVP of the current block. In this case, for example, a motion vector indicating a reference block derived by the above-mentioned motion estimation may be used as the motion vector of the current block. Among the MVP candidates, the MVP candidate having a motion vector with the smallest difference from the motion vector of the current block may be the selected MVP candidate. A motion vector difference (MVD) as the difference obtained by subtracting the MVP from the motion vector of the current block may be derived. In this case, information about the MVD may be signaled to the image decoding device 200. In addition, when the (A)MVP mode is applied, the value of the reference picture index may be constructed as reference picture index information, and may be signaled separately to the image decoding device 200.
[0113] The image encoding apparatus 100 may induce a residual sample based on the prediction sample (S520). The image encoding apparatus 100 may compare the prediction sample with an original sample of the current block to induce the residual sample.
[0114] The image encoding device 100 may encode the image information including prediction information and residual information (S530). The image encoding device 100 may output the encoded image information in the form of a bitstream. The prediction information is information related to the prediction process, and may include prediction mode information (e.g., a skip flag, a merge flag, or a mode index) and information about motion information. The information about the motion information may include candidate selection information (e.g., a merge index, an mvp flag, or an mvp index) as information for deriving a motion vector. In addition, the information about the motion information may include the above-mentioned reference picture index information and / or information about the MVD. In addition, the information about the motion information may include information indicating whether L0 prediction, L1 prediction, or bidirectional prediction is applied. The residual information is information about the residual sample. The residual information may include information about the quantized transform coefficients of the residual sample.
[0115] The output bit stream may be stored in a (digital) storage medium and sent to a decoding device, or may be sent to the image decoding device 200 via a network.
[0116] In addition, as described above, the image encoding device 100 can generate a reconstructed picture (including a reconstructed sample and a reconstructed block) based on the reference sample and the residual sample. This is to derive the same prediction result as the prediction result performed in the image decoding device 200 through the image encoding device 100, and thereby, the encoding efficiency can be improved. Therefore, the image encoding device 100 can store the reconstructed picture (or reconstructed sample, reconstructed block) in a memory, and can use it as a reference picture for inter-frame prediction. As described above, the loop filtering process can also be applied to the reconstructed picture.
[0117] Figure 6 is a diagram schematically showing the inter-frame prediction unit 260 of the image decoding device 200, and Figure 7 is a flow chart showing a method of decoding an image based on inter-frame prediction.
[0118] The image decoding apparatus 200 may perform an operation corresponding to the operation performed by the image encoding apparatus 100. The image decoding apparatus 200 may perform prediction on the current block based on the received prediction information, and may derive a prediction sample.
[0119] Specifically, the image decoding apparatus 200 may determine a prediction mode for a current block based on the received prediction information (S710). The image decoding apparatus 200 may determine which inter prediction mode is applied to the current block based on prediction mode information in the prediction information.
[0120] For example, based on the merge flag, it can be determined whether to apply the merge mode to the current block or to determine the (A) MVP mode. Alternatively, one of various inter-frame prediction mode candidates can be selected based on the mode index. The inter-frame prediction mode candidate may include a skip mode, a merge mode, and / or an (A) MVP mode, or may include various inter-frame prediction modes described later.
[0121] The image decoding device 200 may derive motion information of the current block based on the determined inter-frame prediction mode (S720). For example, when the skip mode or the merge mode is applied to the current block, the image decoding device 200 may construct a merge candidate list described later, and may select a merge candidate from among the merge candidates included in the merge candidate list. The selection may be performed based on the above-mentioned selection information (merge index). The motion information of the selected merge candidate may be used to derive the motion information of the current block. The motion information of the selected merge candidate may be used as the motion information of the current block.
[0122] As another example, when the (A)MVP mode is applied to the current block, the image decoding device 200 may construct an (A)MVP candidate list described later, and may use the motion vector of the motion vector predictor (MVP) candidate selected from the motion vector predictor (MVP) candidates included in the (A)MVP candidate list as the MVP of the current block. The selection may be performed based on the above-mentioned selection information (MVP flag or MVP index). In this case, the MVD of the current block may be derived based on the information about the MVD, and the motion vector of the current block may be derived based on the MVP and MVD of the current block. In addition, the reference picture index of the current block may be derived based on the reference picture index information. The picture indicated by the reference picture index in the reference picture list associated with the current block may be derived as a reference picture, which is referenced for inter-frame prediction of the current block.
[0123] In addition, as will be described later, the motion information of the current block can be derived without constructing a candidate list. In this case, the motion information of the current block can be derived according to the process described in the prediction mode described later. In this case, the candidate list configuration as described above can be omitted.
[0124] The image decoding apparatus 200 may generate a prediction sample for the current block based on the motion information of the current block (S730). In this case, a reference picture may be derived based on a reference picture index of the current block, and a sample of the reference block indicated on the reference picture by a motion vector of the current block may be used to derive the prediction sample of the current block. In this case, as described below, in some cases, a prediction sample filtering process may also be performed on all or part of the prediction samples of the current block.
[0125] For example, the inter prediction unit 260 of the image decoding device 200 may include a prediction mode determination unit 261, a motion information derivation unit 262, and a prediction sample derivation unit 263. The prediction mode determination unit 181 may determine a prediction mode for a current block based on the received prediction mode information. The motion information derivation unit 182 may derive motion information (motion vector and / or reference picture index) of the current block based on the received information about motion information. The prediction sample derivation unit 183 may derive a prediction sample of the current block.
[0126] The image decoding device 200 may generate residual samples for the current block based on the received residual information (S740). The image decoding device 200 may generate reconstructed samples for the current block based on the predicted samples and the residual samples, and may generate a reconstructed picture based thereon (S750). Thereafter, as described above, a loop filtering process may also be applied to the reconstructed image.
[0127] Reference Figure 8, the inter-frame prediction process may include the following steps: determining an inter-frame prediction mode (S810), deriving motion information according to the determined prediction mode (S820), and performing prediction (generating prediction samples) based on the derived motion information (S830). The inter-frame prediction process may be performed in the image encoding apparatus 100 and the image decoding apparatus 200 as described above.
[0128] Inter prediction mode determination
[0129] Various inter prediction modes can be used to predict the current block in the picture. For example, various modes such as merge mode, skip mode, motion vector prediction (MVP) mode, affine mode, sub-block merge mode, and merge with MVD (MMVD) mode can be used. Decoder-side motion vector refinement (DMVR) mode, adaptive motion vector resolution (AMVR) mode, bidirectional prediction (BCW) with CU-level weights, bidirectional optical flow (BDOF), etc. can also be used as additional modes in addition or alternatively. Affine mode can be referred to as affine motion prediction mode. MVP mode can be referred to as advanced motion vector prediction (AMVP) mode. In this document, some modes and / or motion information candidates derived by some modes can be included as one of the motion information candidates of other modes. For example, an HMVP candidate can be added as a merge candidate in merge / skip mode, or can be added as an MVP candidate in MVP mode.
[0130] Prediction mode information indicating the inter prediction mode of the current block may be signaled from the image encoding device 100 to the image decoding device 200. The prediction mode information may be included in a bitstream and received by the image decoding device 200. The prediction mode information may include index information indicating one of a plurality of candidate modes. Alternatively, the inter prediction mode may be indicated by hierarchical signaling of flag information. In this case, the prediction mode information may include one or more flags. For example, a skip flag may be signaled to indicate whether the skip mode is applied, and if the skip mode is not applied, a merge flag may be signaled to indicate whether the merge mode is applied, and if the merge mode is not applied, an MVP mode may be indicated to be applied or a flag for additional classification may be further signaled. The affine mode may be signaled in an independent mode, or the affine mode may be signaled in a mode dependent on the merge mode or the MVP mode. For example, the affine mode may include an affine merge mode and an affine MVP mode.
[0131] Derivation of motion information
[0132] Inter-frame prediction can be performed using the motion information of the current block. The image encoding device 100 can derive the best motion information for the current block through a motion estimation process. For example, the image encoding device 100 can use the original block in the original picture for the current block to search for a similar reference block with high correlation in units of fractional pixels within a predetermined search range in the reference picture, thereby deriving motion information. The similarity of the blocks can be derived based on the difference in phase-based sample values. For example, the similarity of the blocks can be calculated based on the SAD between the current block (or the template of the current block) and the reference block (or the template of the reference block). In this case, the motion information can be derived based on the reference block with the minimum SAD in the search area. The derived motion information can be signaled to the image decoding device 200 according to various methods based on the inter-frame prediction mode.
[0133] Generation of prediction samples
[0134] A prediction block for a current block may be derived based on motion information derived according to a prediction mode. The prediction block may include prediction samples (prediction sample arrays) of the current block. When a motion vector of the current block indicates a fractional sample unit, an interpolation process may be performed, by which prediction samples of the current block may be derived based on reference samples in fractional sample units within a reference picture. When affine inter prediction is applied to the current block, prediction samples may be generated based on sample / sub-block units MV. When bidirectional prediction is applied, prediction samples derived by weighting or weighted averaging (according to phase) prediction samples derived based on L0 prediction (that is, prediction using a reference picture and MVL0 in a reference picture list L0) and prediction samples derived based on L1 prediction (that is, prediction using a reference picture and MVL1 in a reference picture list L1) may be used as prediction samples of the current block. When bidirectional prediction is applied, if a reference picture for L0 prediction and a reference picture for L1 prediction are located in different temporal directions relative to the current picture (i.e., bidirectional prediction and bidirectional prediction), it may be referred to as true bidirectional prediction.
[0135] As described above, reconstructed samples and reconstructed pictures may be generated based on the derived prediction samples, and thereafter, processes such as in-loop filtering may be performed.
[0136] Affine prediction
[0137] Existing video coding systems use only one motion vector (MV) (using a translation motion model) to express the motion of a coding block. However, although the above method can express the best motion on a block basis, this is not the actual best motion for each pixel, and if the best MV can be determined on a pixel basis, the coding efficiency can be improved. To this end, in this embodiment, an affine motion prediction method that performs encoding using an affine motion model will be described. The affine motion prediction method can use 2, 3, or 4 MVs to express the MV in each pixel unit of the block.
[0138] The affine motion model can express four types of motion. Among the motions that can be expressed by the affine motion model, the affine motion model that expresses three types of motion (translation, scaling, and rotation) is called a similarity (or simplified) affine motion model, and in this article, the proposed method will be explained based on the similarity (or simplified) affine motion model. However, the method is not limited to the corresponding motion model.
[0139] Affine motion prediction can use two or more control point motion vectors (CPMVs) to determine the MVs of pixel positions included in a block. At this time, the set of MVs is called an affine motion vector field (MVF), and the affine MVF can be determined in units of pixels or in units of predefined sub-blocks during the encoding / decoding process. If the affine MVF is determined in units of pixels, the MV is obtained based on each pixel value, and in the case of a sub-block unit, the MV of the corresponding block can be obtained based on the pixel value at the center of the sub-block (the lower right side of the center, i.e., the lower right sample among the four central samples).
[0140] If affine prediction is available, the motion model applicable to the current block may include the following three models: a translation motion model, a 4-parameter affine motion model, and a 6-parameter affine motion model. Here, the translation motion model may represent a model using an existing block unit motion vector, the 4-parameter affine motion model may represent a model using two CPMVs, and the 6-parameter affine motion model may represent a model using three CPMVs.
[0141] The above-mentioned affine motion prediction may include affine MVP (or affine inter) mode and affine merging. In affine motion prediction, the motion vector of the current block may be derived based on samples or based on sub-blocks.
[0142] When the affine merge mode is applied, the CPMV of the neighboring block can be used to derive the CPMV of the current block. In this case, the CPMV of the neighboring block can be used as the CPMV of the current block as it is, or the CPMV of the neighboring block can be modified based on the size of the neighboring block and the size of the current block and used as the CPMV of the current block.
[0143] In addition, in the case of affine merging based on sub-block derived MV, it can be called sub-block merge mode, and this can be indicated based on merge_subblock_flag (value 1). In this case, the affine merge candidate list described below can also be called a sub-block merge candidate list. In this case, the sub-block merge candidate list may also include candidates derived by the SbTMVP described below. In this case, the candidate derived by the sbTMVP can be used as a candidate of index 0 of the sub-block merge candidate list. In other words, the candidate derived by the sbTMVP can be positioned in the sub-block merge candidate list before the inherited affine candidate and the constructed affine candidate described below.
[0144] In the affine MVP mode, after determining the CPMV and two or more control point motion vector predictions (CPMVP) for the current block, a control point motion vector difference (CPMVD) corresponding to the difference value may be sent from the image encoding apparatus 100 to the image decoding apparatus 200.
[0145] For example, when the value of the affine merge flag or merge_subblock_flag is 0, the affine MVP mode may be applied. Alternatively, for example, when the value of inter_affine_flg is 1, the affine MVP mode may be applied. The affine MVP mode may be referred to as the affine CP MVP mode. Alternatively, the affine MVP mode may be referred to as the affine inter mode or the inter affine mode. The affine MVP candidate list may be referred to as the control point motion vector predictor candidate list.
[0146] Implementation
[0147] The present disclosure relates to bidirectional motion compensation in an inter-frame prediction process. Specifically, the present disclosure relates to a method for performing bidirectional prediction of a current block by applying different prediction types for each prediction direction (L0 or L1).
[0148] Different prediction types may be a sub-block unit (sub PU) prediction type and a non-sub-block unit (non-sub PU) prediction type. The sub PU prediction type may be referred to as a sub PU prediction mode, and an affine mode and a sub-block merge mode based on a sub-block derived MV may be included in the sub PU prediction type. The non-sub PU prediction type is a prediction type that does not correspond to a sub PU prediction type and may be referred to as a non-sub PU prediction mode.
[0149] In the traditional bidirectional motion compensation process, when the current block has a sub PU prediction type, motion compensation is performed based on the sub PU prediction type in two directions (L0, L1), and when the current block has a non-sub PU prediction type, motion compensation is performed based on the non-sub PU prediction type in two directions, thereby generating a prediction block.
[0150] For example, in the normal merge mode, bidirectional motion information can be derived from the prediction candidate through prediction mode determination, motion information derivation, and prediction sample generation of bidirectional prediction. Specific examples of performing bidirectional prediction in the normal merge mode can be classified as follows. That is, the normal merge mode does not support a method of predicting one prediction direction based on a sub PU prediction type and predicting another prediction direction based on a non-sub PU prediction type.
[0151] - If merge_subblock_flag is 1, prediction is performed based on the sub PU prediction type in both directions.
[0152] - If merge_subblock_flag is 0, prediction is performed based on non-sub PU prediction type in both directions.
[0153] In addition, in the normal merge mode, information used for prediction varies according to each prediction type. In other words, the normal merge mode has a limitation that the same information must be used in both directions during the process of performing bidirectional prediction.
[0154] - When the sub PU prediction type is applied, if the neighboring block (reference block) is a block predicted in affine mode, the stored CPMV of the neighboring block is used.
[0155] - When non-sub PU prediction type is applied, the stored MV of the neighboring block is used.
[0156] As another example, the AMVP mode that signals MVD, MVP index, reference picture index, etc. to derive motion information can be classified as follows: That is, the conventional AMVP mode does not support a method of predicting one prediction direction based on a sub PU prediction type and predicting another prediction direction based on a non-sub PU prediction type.
[0157] - When inter_affine_flag is 1, prediction is performed based on the sub PU prediction type in both directions.
[0158] - When inter_affine_flag is 0, prediction is performed based on non-sub PU in both directions.
[0159] In addition, in the conventional AMVP mode, information used for prediction varies according to each prediction type. In other words, the conventional AMVP mode has a limitation that the same information must be used in both directions during the process of performing bidirectional prediction.
[0160] - When the sub PU prediction type is applied, if the neighboring block (reference block) is a block predicted in affine mode, the stored CPMV of the neighboring block is used.
[0161] - When non-sub PU prediction type is applied, the stored MV of the neighboring block is used.
[0162] Furthermore, in the conventional AMVP mode, the amount of information signaled through the bitstream varies according to each prediction type.
[0163] - When the sub PU prediction type is applied, two or more MVDs (xoffset, yoffset) required to derive the MV of each CP are signaled.
[0164] - When non-sub PU prediction type is applied, signaling the MVD required to generate the prediction block.
[0165] The method proposed in the present disclosure may correspond to a method for simultaneously supporting different prediction types (i.e., sub PU prediction type and non-sub PU prediction type) in a process of generating a prediction block based on a prediction direction when performing bidirectional prediction on a prediction block. Therefore, according to the method proposed in the present disclosure, since different prediction types are adaptively derived for each prediction direction, compression efficiency can be improved.
[0166] In addition, in the method proposed in the present disclosure, motion compensation by different prediction types is performed for each prediction direction, and in the process, necessary information can be adaptively referenced for each prediction direction. Therefore, according to the method proposed in the present disclosure, the efficiency of the bits required for signaling necessary information can be improved.
[0167] Implementation Method 1
[0168] Fig. 9 This is a flowchart illustrating an image encoding method according to embodiment 1.
[0169] Reference Fig. 9 , the image encoding apparatus 100 may determine whether the prediction direction of the current block is bidirectional (S900). For example, it may be determined whether the prediction direction of the current block is bidirectional based on whether the value of inter_pred_idc (which is a syntax element indicating the prediction direction of the current block) indicates bi-prediction (PRED_BI).
[0170] If the prediction direction of the current block is bidirectional, the image encoding apparatus 100 may determine whether to apply different prediction types to each prediction direction (S910). Here, the different prediction types may be a sub PU prediction type and a non-sub PU prediction type. That is, step S910 may be a process of determining whether to predict a specific direction based on a sub PU prediction type and predict another direction based on a non-sub PU prediction type. First information (merge_mixed_pu_flag or inter_mixed_pu_flag) may be encoded into a bitstream, which is information indicating whether different prediction types are applied to each prediction direction of the current block.
[0171] In the case where a different prediction type is applied to each prediction direction, the image encoding apparatus 100 may derive at least one bi-directional motion information candidate corresponding to the different prediction type from a reference block of the current block ( S920 ).
[0172] For example, if the L0 direction of the current block has a sub PU prediction type and the L1 direction has a non-sub PU prediction type, a bidirectional motion information candidate in which the L0 direction is based on sub PU motion information and the L1 direction is based on non-sub PU motion information may be derived. As another example, if the L0 direction of the current block has a non-sub PU prediction type and the L1 direction has a sub PU prediction type, a bidirectional motion information candidate in which the L0 direction is based on non-sub PU motion information and the L1 direction is based on sub PU motion information may be derived. Here, the sub PU-based motion information may be motion information that may be used for the subPU prediction type, and the non-sub PU-based motion information may be motion information that may be used for the non-sub PU prediction type. At least one bidirectional motion information candidate may constitute a motion information candidate list.
[0173] The image encoding apparatus 100 may bi-predict the current block based on different prediction types based on any one of the derived bi-directional motion information candidates (ie, based on the motion information candidate list) (S930).
[0174] Fig.10 This is a flowchart illustrating an image decoding method according to embodiment 1.
[0175] Reference Fig.10 , the image decoding apparatus 200 may determine whether the prediction direction of the current block is bidirectional (S1000). For example, it may be determined whether the prediction direction of the current block is bidirectional based on whether the value of inter_pred_idc (which is a syntax element indicating the prediction direction of the current block) indicates bidirectional prediction (PRED_BI).
[0176] When the prediction direction of the current block is bidirectional, the image decoding apparatus 200 may obtain first information (merge_mixed_pu_flag or inter_mixed_pu_flag) which is information indicating whether a different prediction type is applied to each prediction direction of the current block from a bitstream (S1010).
[0177] The image decoding device 200 may determine whether to apply different prediction types to each prediction direction of the current block based on the first information (S1020). In addition, if the first information indicates that different prediction types are applied to each prediction direction, the image decoding device 200 may derive at least one bidirectional motion information candidate corresponding to different prediction types from the reference block (S1030).
[0178] For example, if the L0 direction of the current block has a sub PU prediction type and the L1 direction has a non-sub PU prediction type, a bidirectional motion information candidate in which the L0 direction is based on sub PU motion information and the L1 direction is based on non-sub PU motion information may be derived. As another example, if the L0 direction of the current block has a non-sub PU prediction type and the L1 direction has a sub PU prediction type, a bidirectional motion information candidate in which the L0 direction is based on non-sub PU motion information and the L1 direction is based on sub PU motion information may be derived. Here, the sub PU-based motion information may be motion information that may be used for the subPU prediction type, and the non-sub PU-based motion information may be motion information that may be used for the non-sub PU prediction type. At least one bidirectional motion information candidate may constitute a motion information candidate list.
[0179] The image decoding apparatus 200 may bi-predict the current block based on different prediction types based on any one of the derived bi-directional motion information candidates (ie, based on the motion information candidate list) ( S1040 ).
[0180] Fig.11 1 is a diagram for explaining an example of a dual prediction method according to Embodiment 1. Fig.11 , it is assumed that the prediction type in the L0 direction (reference picture list (L0)) of the current block (current picture) is a sub PU prediction type, and the prediction type in the L1 direction (reference picture list (L1)) is a non-sub PU prediction type.
[0181] Under this assumption, a bidirectional motion information candidate whose prediction type in the L0 direction is a sub PU prediction type and whose prediction type in the L1 direction is a non-sub PU prediction type may be used for bi-prediction of the current block.
[0182] Therefore, sub PU-based motion compensation (MC) is performed for one direction (eg, L0) and non-sub PU-based motion compensation is performed for the opposite direction (eg, L1) so that a prediction block for the current block can be generated.
[0183] Implementation Method 2
[0184] As described above, in merge mode, since only the motion information of the prediction candidate (motion information candidate) should be used to derive the bidirectional motion information of the current block without signaling a separate syntax (except for the index), the prediction candidate of the present disclosure should satisfy the following two conditions.
[0185] -Can derive bidirectional motion information
[0186] - The required motion information for each prediction direction can be derived (e.g., L0: CPMV, L1: MV)
[0187] For example, if the reference block is encoded / decoded by the method proposed in the present disclosure, or if the reference block is bi-predicted according to the subPU prediction type, the bi-directional motion information for applying the method proposed in the present disclosure is stored in the corresponding reference block. Therefore, in this case, bi-prediction of different prediction types can be performed.
[0188] As another example, if the reference block is not encoded / decoded by the method proposed in the present disclosure, or if the reference block is bi-predicted according to the non-sub PU prediction type, the bi-directional motion information for applying the method proposed in the present disclosure may not be stored in the reference block. Therefore, in this case, the following method may be performed.
[0189] -Reconstruct the motion information required for each prediction direction to derive bidirectional motion information candidates.
[0190] - The motion information of the corresponding reference block is not used to derive the bidirectional motion information candidate.
[0191] In this way, when the method proposed in the present disclosure is applied to the merge mode, in the process of constructing a prediction candidate list (motion information candidate list) for the current block, if the reference candidate satisfies the following conditions, the reference candidate can be constructed as a prediction candidate, or the prediction information regenerated based on the reference candidate can be constructed as a prediction candidate for the current block.
[0192] - Bidirectional prediction information (bidirectional motion information) can be derived from motion information of a decoded neighboring block / a block in a decoded previous picture (ie, a reference block), and sub PU-based motion information can be derived from at least one direction of the bidirectional motion information.
[0193] - Bidirectional motion information may be derived by decomposing and recombining motion information of a reference block based on a prediction direction, and sub PU-based motion information may be derived from at least one of the recombined bidirectional motion information.
[0194] - For any prediction direction, the motion information of the current block can be combined so that it can be derived from the motion information of the reference block based on the sub PU.
[0195] In addition, when the method proposed in the present disclosure is applied to the AMVP mode, since a prediction block must be generated according to a different prediction type for each prediction direction, a motion information candidate referenced for prediction in each prediction direction must be adaptively derived.
[0196] For example, as in Fig.12 On the left side of (a), if the current block is encoded by the proposed method (e.g., L0: non-sub PU, L1: sub PU),
[0197] - The motion information candidates can be compensated by the signaled MVD to derive the motion information of the current block.
[0198] - In this process, information about a reference block that has been decoded in a surrounding area may be referred to and used as a motion information candidate, or motion information reconstructed using information about the reference block may be used as a motion information candidate.
[0199] That is, in the proposed method, since prediction is performed based on a different prediction type for each prediction direction, the referenced information becomes different for each prediction direction. Therefore, the proposed method can be applied only when necessary information is given.
[0200] For example, if the sub PU prediction type is to be applied to the L0 direction of the current block and the non-sub PU prediction type is to be applied to the L1 direction, two or more MVDs for CPMV must be signaled to derive motion information in the L0 direction, and less than two MVDs must be signaled to derive motion information in the L1 direction.
[0201] However, if the CPMV in the L0 direction is not derived from the prediction candidate (reference block), the CPMV in the L0 direction of the current block cannot be derived. Fig.12 In the right side of (a), if the reference block is bi-predicted but both directions are predicted according to a non-sub PU prediction type, or if the reference block is not bi-predicted, appropriate motion information for the current block cannot be derived.
[0202] The basic operations of the method proposed in the present disclosure when applied to the AMVP mode are summarized as follows.
[0203] like Fig.12 As shown in (b), when prediction is performed in the L0 direction based on the sub PU prediction type and prediction is performed in the L1 direction based on the non-subPU prediction type, the MVP for each CP can be derived with reference to the L0 direction CPMV of the prediction candidate (reference block), and the L0 direction CPMV (motion information) of the current block can be derived by considering each derived MVP and the MVD of each signaled CP. That is, the L0 direction motion information candidate of the current block can be derived by applying the affine model to the L0 direction motion information of the prediction candidate. In addition, the L0 direction motion information candidate of the current block can be derived by considering the L1 direction motion information of the prediction candidate and the signaled MVD.
[0204] In the present disclosure, the derived bidirectional motion information candidates can constitute a single motion information candidate list. Therefore, compared with the conventional AMVP mode that constructs a separate motion information candidate list for each prediction direction and signals separate index information, the present disclosure can simply construct the motion information candidate list and reduce the amount of bits required to signal the index information.
[0205] Based on the above reasons and contents, in Embodiment 2, a method of deriving appropriate bidirectional motion information candidates from a reference block and constructing them into a prediction candidate list (motion information candidate list) is proposed.
[0206] Implementation Method 2-1
[0207] Embodiment 2-1 is an embodiment of deriving a bidirectional motion information candidate of a current block when bidirectional motion information can be derived from motion information of a reference block and sub PU-based motion information can be derived from at least one direction among the bidirectional motion information. Here, “when sub PU-based motion information can be derived from at least one direction” may mean that at least one or more sub PU-based motion information is included in the bidirectional motion information of the reference block.
[0208] Fig.13 and Fig.14 is a diagram for explaining an example of deriving bidirectional motion information candidates when implementation mode 2-1 is applied to the merge mode.
[0209] like Fig.13 As shown in (a), if the reference block of the current block is encoded by the proposed method (L0: non-sub PU, L1: sub PU), or if the bidirectional motion information of the reference block includes at least one sub PU-based motion information, it can be derived as a bidirectional motion information candidate.
[0210] Specifically, Fig.13 As shown in (b), the L0 direction motion information of the current block (Cur) can be derived by applying an affine model based on the L0 direction CPMV of the reference block, and the L1 direction motion information of the current block can be derived from the L1 direction motion information of the reference block. Therefore, the bidirectional motion information of the reference block can be derived as a bidirectional motion information candidate.
[0211] As another example, Fig.14 As illustrated in (a), if the reference block is bi-predicted and two directions are predicted based on the sub PU prediction type, the CPMV of the neighboring block is stored in the bi-directional motion information of the reference block ( Fig.14 (b) on the left side), and at the same time, the motion information (MV) of the reference block itself is also stored ( Fig.14 on the right side of (b)).
[0212] Therefore, if Fig.14 As shown in (c), in this case, the L0 direction motion information of the current block can be derived by applying an affine model based on the CPMV of the reference block, and the MV of the reference block can be used as the L1 direction motion information of the current block. Therefore, the bidirectional motion information of the reference block can be derived as a bidirectional motion information candidate.
[0213] Fig.15 is a diagram for explaining an example of deriving bidirectional motion information candidates when implementation mode 2-1 is applied to the AMVP mode.
[0214] If CPMV is stored, such as when the reference block is decoded by the proposed method or in affine mode, bidirectional motion information candidates can be derived by combining the motion information (CPMV) with the motion information (MV) stored at the location of the reference block that is not CPMV.
[0215] For example, Fig.15 As shown in (a), different prediction types can be applied to each prediction direction (L0: non-sub PU, L1: sub PU) of the current block, and the position of the reference block used to construct the bidirectional motion information candidate can be defined as A to G. In addition, the motion information of each position (candidate position) of the reference block can be as shown in Table 1.
[0216] [Table 1]
[0217] Candidate location L0 L1 A subPU Non-subPU B Non-subPU Non-subPU C Non-subPU subPU D subPU subPU E Non-subPU subPU F Non-subPU subPU G subPU Non-subPU
[0218] In such an example, among the bidirectional motion information of the reference block, the bidirectional motion information suitable for applying the prediction method (prediction type) of the current block can be derived as the bidirectional motion information candidate. That is, as shown in Table 2, the bidirectional motion information whose prediction type in the L0 direction is a non-sub PU prediction type and whose prediction type in the L1 direction is a sub PU prediction type can be derived as the bidirectional motion information candidate.
[0219] [Table 2]
[0220] Candidate location L0 L1 C Non-subPU subPU E Non-subPU subPU F Non-subPU subPU
[0221] In some embodiments, Fig.15 As shown in (b), the CPMV (CP) of the neighboring block is stored at the D position, and at the same time, the motion information (D) of the reference block itself is also stored, so that the MV of the CP can be used for the sub PU prediction type, and its own motion information can be referenced for the non-sub PU prediction type. Therefore, the motion information encoded as the sub PU at the D position (i.e., the motion information based on the sub PU) can be processed similarly to the motion information based on the non-sub PU, and through this processing, the list in Table 2 can be modified as in Table 3 to construct a bidirectional motion information candidate list.
[0222] [Table 3]
[0223] Candidate location L0 L1 C Non-sub PU subPU D subPU→non-sub PU subPU E Non-sub PU subPU F Non-sub PU subPU
[0224] As another example, in Fig.15 In the example of (a), the motion information of each position (candidate position) of the reference block can be as in Table 4.
[0225] [Table 4]
[0226] Candidate location L0 L1 A subPU Non-sub PU B Non-sub PU - C - subPU D subPU subPU E Non-sub PU subPU F Non-sub PU subPU G subPU -
[0227] In this case, among the motion information of the reference block, motion information suitable for applying different prediction types of the current block may be derived as bidirectional motion information candidates, as shown in Table 5.
[0228] [Table 5]
[0229] Candidate location L0 L1 D subPU→non-sub PU subPU E Non-sub PU subPU F Non-sub PU subPU
[0230] Implementation method 2-2
[0231] Embodiment 2-2 is an embodiment of deriving a bidirectional motion information candidate of a current block when bidirectional motion information can be derived by decomposing and recombining motion information of a reference block based on a prediction direction and sub PU-based motion information can be derived from at least one direction of the recombined bidirectional motion information. Here, "a case where sub PU-based motion information can be derived from at least one direction" may mean that at least one sub PU-based motion information is included in the recombined bidirectional motion information.
[0232] Fig.16 It is a flowchart illustrating an image encoding method and an image decoding method according to embodiment 2-2.
[0233] Reference Fig.16 , the image encoding apparatus 100 and the image decoding apparatus 200 may determine a prediction direction of the reference block (S1600). If the prediction direction of the reference block is unidirectional, the image encoding apparatus 100 and the image decoding apparatus 200 may derive the combined bidirectional motion information by combining the motion information of the reference block based on the prediction direction (S1610). In addition, the image encoding apparatus 100 and the image decoding apparatus 200 may derive bidirectional motion information candidates based on motion information including at least one sub PU-based motion information among the combined bidirectional motion information (S1620).
[0234] In some embodiments, step S1610 and step S1620 may be performed independently of step S1610. That is, the derivation of the combined bidirectional motion information and the derivation of the bidirectional motion information candidates may be performed without determining the prediction direction of the reference block.
[0235] An example of deriving bidirectional motion information candidates when implementation mode 2-2 is applied to the merge mode will be described below.
[0236] like Fig.15 As shown in (a), different prediction types are applied to each prediction direction (L0: non-sub PU, L1: sub PU) of the current block, and the positions of the reference blocks used to construct the bidirectional motion information candidates are defined as A to G. In addition, the motion information for each position (candidate position) of the reference block can all be unidirectional motion information, as shown in Table 6.
[0237] [Table 6]
[0238] Candidate location L0 L1 A subPU - B Non-subPU - C - subPU D - subPU E - Non-subPU F Non-subPU - G subPU -
[0239] In this case, the unidirectional motion information of the reference block may be recombined to derive recombined bidirectional motion information, and bidirectional motion information candidates as in Table 7 may be derived from the recombined bidirectional motion information.
[0240] [Table 7]
[0241] Candidate location L0 Candidate location L1 0 A subPU→non-subPU C subPU 1 B Non-subPU D subPU 2 F Non-subPU C subPU 3 G subPU→non-subPU D subPU
[0242] An example of deriving bidirectional motion information candidates when implementation mode 2-2 is applied to the AMVP mode will be described below.
[0243] When the reference block is located as Fig.15 When the motion information of the reference block is as shown in (a) of FIG. 1 and the motion information of the corresponding reference block is as shown in Table 1, the motion information of the reference block may be separated for each prediction direction and reassembled to derive reassembled bidirectional motion information as shown in Table 8. The reassembled bidirectional motion information may be used as a bidirectional motion information candidate for bidirectional prediction of the current block.
[0244] [Table 8]
[0245]
[0246] Implementation 2-3
[0247] If all the motion information of the reference block is based on non-sub PU motion information, the motion information based on the sub PU motion information of the current block cannot be referenced from the reference block. Fig.15 As shown in (a), if different prediction types are applied for each prediction direction of the current block and the motion information of the reference blocks (A to G) is all non-sub PU motion information, the CPMV for supporting the sub PU prediction type in the L1 direction of the current block cannot be derived.
[0248] To solve this problem, embodiments 2-3 propose a method of deriving sub PU-based motion information of a current block not from a reference block but from neighboring blocks located around the current block.
[0249] To this end, the reference block is divided into adjacent blocks and neighboring blocks. The adjacent blocks may correspond to blocks adjacent to the current block. Fig.15 In (a), blocks A to G adjacent to the current block may correspond to adjacent blocks. In addition, adjacent blocks may be blocks predefined for deriving motion information of the current block. Neighboring blocks are blocks located around the current block and may or may not be adjacent to the current block. Neighboring blocks may be blocks that do not correspond to adjacent blocks. Reference blocks may include adjacent blocks and adjacent blocks.
[0250] Fig.17 It is a flowchart illustrating an image encoding method and an image decoding method according to embodiments 2-3.
[0251] Reference Fig.17, the image encoding device 100 and the image decoding device 200 may determine the prediction type of the reference block (S1700). If the prediction types of the reference blocks are all non-sub PU, the image encoding device 100 and the image decoding device 200 may derive the combined bidirectional motion information by combining the motion information of the reference blocks based on the prediction direction (S1710). In addition, the image encoding device 100 and the image decoding device 200 may derive the bidirectional motion information candidate based on the combined bidirectional motion information (S1720).
[0252] The neighboring block may include bidirectional motion information. Even if the motion information of the neighboring block is not bidirectional, the combined bidirectional motion information may be derived by adaptively referring to the motion information based on the prediction direction.
[0253] Examples of neighboring blocks are Fig.18 As shown in Fig.18 As shown, the neighboring blocks may be reconstructed blocks located around the CP position of the current block. That is, A0, A1, B0, and B1 may be neighboring blocks located around the lower left CP position of the current block, A2, A3, A4, B2, B3, and B4 may be neighboring blocks located around the upper left CP position of the current block, and A5, A6, B5, and B6 may be neighboring blocks located around the upper right CP position of the current block.
[0254] exist Fig.18 In the example of , one motion information for non-sub PU prediction type can be derived for L0 direction, and two or more CPMVs for sub PU prediction type can be derived for L1 direction. As a result, bidirectional motion information candidates (prediction candidate list) can be constructed as shown in Table 9.
[0255] [Table 9]
[0256] Candidate L0 (non-sub PU) L1(subPU) 0 MV(A0) CPMV(A2,A0,A5) 1 MV(A4) CPMV(A2,A1,A6) 2 MV(B5) CPMV(A3,A0,A6) 3 MV(B0) CPMV(B2,B0,B6) …
[0257] In Table 9, the information in the brackets of MV() and CPMV() may indicate Fig.18 That is, as shown in Table 9, the motion information of the neighboring blocks can be used to derive the non-sub PU-based motion information for the L0 direction, and the CPMV combining the motion information of the neighboring blocks can be used to derive the sub PU-based motion information for the L1 direction.
[0258] Implementation 3
[0259] In order to apply different prediction types for each prediction direction according to the method of the present disclosure, it is necessary to signal a syntax element to support this. Embodiment 3 is an embodiment of a method of signaling a syntax element.
[0260] Fig.19 is a flowchart illustrating an image encoding method according to Example 3.
[0261] Reference Fig.19 , the image encoding device 100 may determine whether a first condition (apply_proposed_method_condition) is satisfied (S1900). The first condition is a condition for whether to apply the method of the present disclosure, and may include whether the prediction direction of the current block is bidirectional. The specific content of the first condition will be described later.
[0262] The image encoding apparatus 100 may encode the first information into a bitstream when the first condition is satisfied (S1910). Here, the first information may be encoded as merge_mixed_pu_flag or inter_mixed_pu_flag. The image encoding apparatus 100 may determine whether to apply a different prediction type to each prediction direction of the current block (S1920).
[0263] In addition, when determining that different prediction types are applied to each prediction direction of the current block, the image encoding device 100 may encode the second information (inter_mixed_pu_l0_flag) and the third information (cu_subpu_type_flag) (S1930). In some embodiments, step S1930 may be performed only when the prediction mode of the current block is the AMVP mode. That is, when the prediction mode of the current block is the AMVP mode, the second information and the third information may be encoded.
[0264] Fig. 20 This is a flowchart illustrating an image decoding method according to embodiment 3.
[0265] Reference Fig. 20 , the image decoding device 200 may determine whether a first condition (apply_proposed_method_condition) is satisfied (S2000). The first condition is a condition for whether to apply the method of the present disclosure, and may include whether the prediction direction of the current block is bidirectional. The specific content of the first condition will be described later.
[0266] If the first condition is satisfied, the image decoding apparatus 200 may obtain first information (merge_mixed_pu_flag or inter_mixed_pu_flag) from the bitstream (S2010). The image decoding apparatus 200 may determine whether to apply a different prediction type to each prediction direction of the current block based on the first information (S2020).
[0267] When the first information indicates that different prediction types are applied to each prediction direction of the current block, the image decoding device 200 may obtain the second information (inter_mixed_pu_l0_flag) and the third information (cu_subpu_type_flag) from the bitstream (S2030). In some embodiments, step S2030 may be performed only when the prediction mode of the current block is the AMVP mode. That is, when the prediction mode of the current block is the AMVP mode, the second information and the third information may be obtained.
[0268] Implementation 3 can be divided into 1) an implementation performed similarly to the conventional merge mode, wherein other information (except index information) is not signaled (Implementation 3-1), and 2) an implementation performed similarly to the conventional AMVP mode, wherein other information is signaled (Implementation 3-2).
[0269] Implementation Method 3-1
[0270] Table 10 shows an example of a syntax structure according to implementation mode 3-1.
[0271] [Table 10]
[0272]
[0273]
[0274] merge_idx may indicate a merge candidate in a merge candidate list. merge_mixed_pu_flag is first information and may be encoded and obtained when a first condition (apply_proposed_method_condition) is satisfied. The first information may indicate whether a different prediction type is applied to each prediction direction of the current block. merge_mixed_pu_flag=1 may indicate that a different prediction type is applied to each prediction direction of the current block, and merge_mixed_pu_flag=0 may indicate that a different prediction type is not applied to each prediction direction of the current block.
[0275] In the case of merge_mixed_pu_flag=1, since the prediction block is generated by applying the method proposed in the present disclosure, information such as merge_subblock_flag or regular_merge_flag, which are additionally signaled to support the conventional method, may not be signaled. That is, when the method proposed in the present disclosure is not applied (merge_mixed_pu_flag=0), merge_subblock_flag may be signaled.
[0276] regular_merge_flag may indicate whether a merge mode (regular merge mode) is applied to the current block. regular_merge_flag=1 may indicate that the regular merge mode is used to generate inter prediction parameters of the current block.
[0277] merge_subblock_flag may indicate whether the subblock merge mode (or affine merge mode) is applied to the current block. That is, merge_subblock_flag may indicate whether the subblock merge mode is used to generate subblock-based inter prediction parameters for the current block. merge_subblock_idx may indicate a merge candidate index of a subblock-based merge candidate list.
[0278] The index information (merge_mixed_pu_idx) may indicate a bidirectional motion information candidate for predicting the current block among at least one bidirectional motion information candidate. When the maximum number (MaxNumCombinedSubblockMergeCand) of the prediction candidates (bidirectional motion information candidates) of the method proposed in the present disclosure exceeds 1, the index information may be signaled. That is, when the maximum number of prediction candidates is 1 or less, one bidirectional motion information candidate may be used to perform prediction without signaling the index information.
[0279] mmvd_merge_flag may indicate whether the MMVD (Merge mode with motion vector difference) mode is applied to the current block. mmvd_merge_flag=1 may indicate that the MMVD mode is used to generate inter prediction parameters for the current block. mmvd_cand_flag may indicate whether the first candidate (0) or the second candidate (1) in the merge candidate list is used with the MVD derived from mmvd_distance_idx and mmvd_direction_idx. mmvd_distance_idx may indicate an index for deriving the variable MmvdDistance[x0][y0], and mmvd_direction_idx may indicate an index for deriving the variable MmvdSign[x0][y0].
[0280] ciip_flag may indicate whether the combined inter-picture merging and intra-picture prediction mode is applied to the current block. merge_gpm_partition_idx may indicate a partition shape of a GPM mode (geometric partitioning merge mode), and merge_gpm_idx0 and merge_gpm_idx1 may indicate a first candidate and a second candidate in a GPM-based motion compensation candidate list, respectively.
[0281] Table 11 shows an example of a syntax structure according to implementation mode 3-1.
[0282] [Table 11]
[0283]
[0284]
[0285] The syntax structure of Table 11 is an example of the method proposed in the present disclosure being syntactically integrated with a conventional coding tool (e.g., subblock merge mode). That is, when the subblock merge mode (merge_subblock_flag=1) is applied, it is determined whether the first condition (apply_proposed_method_condition) is satisfied, and if the first condition is satisfied, it is determined whether the method proposed in the present disclosure (merge_mixed_pu_flag) is applied. In addition, in the example of Table 11, the function of the index information (merge_mixed_pu_idx) can be performed by merge_subblock_idx.
[0286] Table 12 shows another example of the syntax structure according to implementation mode 3-1.
[0287] [Table 12]
[0288]
[0289] The syntax structure of Table 12 is an example of not signaling index information for selecting a bidirectional motion information candidate. Specifically, according to Table 12, if (merge_mixed_pu_flag == 1) and if (MaxNumCombinedSubblcokMergeCand>1) of Table 11 are not executed, and merge_mixed_pu_idx of Table 11 may not be signaled. In this case, the bidirectional motion information candidate for predicting the current block is determined based on cost according to template matching, and may be determined as a bidirectional motion information candidate with the minimum cost, for example.
[0290] Implementation 3-2
[0291] Table 13 shows an example of a syntax structure according to implementation mode 3-2.
[0292] [Table 13]
[0293]
[0294]
[0295] inter_mixed_pu_flag is the first information and may be encoded and obtained when the first condition (apply_proposed_method_condition) is satisfied. The first information may indicate whether a different prediction type is applied to each prediction direction of the current block. inter_mixed_pu_flag=1 may indicate that a different prediction type is applied to each prediction direction of the current block, and inter_mixed_pu_flag=0 may indicate that a different prediction type is not applied to each prediction direction of the current block.
[0296] When a different prediction type is applied to each prediction direction of the current block (inter_mixed_pu_flag=1), the second information (inter_mixed_pu_l0_flag) may be signaled. inter_mixed_pu_l0_flag may indicate that a different prediction type is applied to each prediction direction. For example, inter_mixed_pu_l0_flag=1 may indicate that the prediction type applied to the L0 direction is a sub PU prediction type, and inter_mixed_pu_l0_flag=0 may indicate that the prediction type applied to the L0 direction is a non-sub PU prediction type. As another example, inter_mixed_pu_l0_flag=1 may indicate that the prediction type applied to the L0 direction is a non-sub PU prediction type, and inter_mixed_pu_l0_flag=0 may indicate that the prediction type applied to the L0 direction is a sub PU prediction type.
[0297] When a different prediction type is applied to each prediction direction of the current block (inter_mixed_pu_flag=1), the third information (cu_subpu_type_flag) may be signaled. cu_subpu_type_flag may be used to determine a parameter model applied to each prediction direction, and determination of the parameter model will be described later.
[0298] inter_affine_flag may indicate whether an affine mode is applied to the current block. cu_affine_type_flag may indicate that a parameter model is applied to the current block. For example, cu_affine_type_flag=1 may indicate that a 6-parameter model is applied, and cu_affine_type_flag=0 may indicate that a 4-parameter model is applied.
[0299] sym_mvd_flag may indicate whether symmetric MVD is used in MVD coding. For example, sym_mvd_flag=1 may indicate the absence of ref_idx_l0, ref_idx_l1, and mvd_coding. ref_idx_l0 may indicate a reference picture in reference picture list 0 (in L0 direction), and ref_idx_l1 may indicate a reference picture in reference picture list 1 (in L1 direction).
[0300] mvp_l0_flag may indicate a candidate selected from among candidates in MVP candidate list 0 to derive MVP of the current block when MVP mode is applied, and mvp_l1_flag may indicate a candidate selected from among candidates in MVP candidate list 1 to derive MVP of the current block when MVP mode is applied.
[0301] Table 14 shows another example of the syntax structure according to implementation mode 3-2.
[0302] [Table 14]
[0303]
[0304]
[0305] The syntax structure of Table 14 is an example of the method proposed in the present disclosure being syntactically integrated with conventional coding tools (e.g., affine mode). When inter_affine_flag=1, the sub PU prediction mode can be applied to the current block. Therefore, if the prediction direction of the current block is bidirectional (inter_pred_idc==PRED_BI), it is possible to signal whether different prediction types are applied to each prediction direction (inter_mixed_pu_flag) and which prediction type is applied to each prediction direction. In addition, in the example of Table 13, the function of the third information (cu_subpu_type_flag) can be performed by cu_affine_type_flag.
[0306] Table 15 shows an example of a method of determining a different prediction type for each prediction direction based on the second information (inter_mixed_pu_l0_flag).
[0307] [Table 15]
[0308] inter_mixed_pu_flag inter_mixed_pu_l0_flag decoding 0 X For bidirectional subpu processing 1 0 L0 subpu processing + L1 non-subpu processing 1 1 L0 non-subpu processing + L1 subpu processing
[0309] Referring to Table 15, if inter_mixed_pu_flag=0, inter_mixed_pu_l0_flag is not signaled, and both directions of the current block may be determined based on the sub PU prediction type. If inter_mixed_pu_flag=1 and inter_mixed_pu_l0_flag=0, the L0 direction of the current block is determined based on the sub PU prediction type, and the L1 direction of the current block may be determined based on the non-sub PU prediction type. If inter_mixed_pu_flag=1 and inter_mixed_pu_l0_flag=1, the L0 direction of the current block is determined based on the non-sub PU prediction type, and the L1 direction of the current block may be determined based on the subPU prediction type.
[0310] In some embodiments, the first information may indicate whether a different prediction type is applied for each prediction direction, and may also indicate a different prediction type applied for each prediction direction. In other words, the first information may also indicate a different prediction type applied for each prediction direction. To this end, the first information may be expressed in an index form (inter_mixed_pu_idc) as in Table 16, rather than in the above-mentioned flag form.
[0311] [Table 16]
[0312] … inter_mixed_pu_idc[x0][y0] ae(v) …
[0313] Table 17 shows an example of whether to apply different prediction types for each prediction direction and a method of determining the different prediction types for each prediction direction based on the first information in the form of an index.
[0314] [Table 17]
[0315] inter_mixed_pu_idc[x0][y0] decoding 0 For bidirectional subpu processing 10 L0 subpu processing + L1 non-subpu processing 11 L0 non-subpu processing + L1 subpu processing
[0316] Referring to Table 17, when inter_mixed_pu_idc=0, two directions of the current block may be determined based on the sub PU prediction type. When inter_mixed_pu_idc=10, the L0 direction of the current block may be determined based on the sub PU prediction type, and the L1 direction of the current block may be determined based on the non-sub PU prediction type. When inter_mixed_pu_idc=11, the L0 direction of the current block may be determined based on the non-sub PU prediction type, and the L1 direction of the current block may be determined based on the sub PU prediction type.
[0317] Implementation 4
[0318] Embodiment 4 is an embodiment of various examples of the first condition (apply_proposed_method_condition).
[0319] The first condition may be configured to include the following condition. That is, when the following condition is satisfied, the first information (merge_mixed_pu_flag or inter_mixed_pu_flag) may be encoded and obtained.
[0320] Condition 1. Whether the current block generates a predicted block through bi-prediction
[0321] Condition 1 is whether the prediction direction of the current block is bidirectional. For example, condition 1 is whether inter_pred_idc[x0][y0]==PRED_BI is satisfied.
[0322] Condition 2: Does the current block size meet the predefined size?
[0323] Condition 2 is whether the size of the current block (cbWidth, cbHeight) meets the predetermined size. For example, condition 2 may include cbWidth>=minimum width (MIN_COMB_PU_WIDTH), cbHeight>=minimum height (MIN_COMB_PU_HEIGHT), cbWidth<=maximum width (MAX_COMB_PU_WIDTH), and cbHeight<=maximum height (MAX_COMB_PU_HEIGHT).
[0324] MIN_COMB_PU_WIDTH, MIN_COMB_PU_HEIGHT, MAX_COMB_PU_WIDTH and MAX_COMB_PU_HEIGHT may be predefined values or values signaled from a higher layer of the bitstream. In addition, the values of MIN_COMB_PU_WIDTH, MIN_COMB_PU_HEIGHT, MAX_COMB_PU_WIDTH and MAX_COMB_PU_HEIGHT may have values within the range of minimum / maximum block sizes supported by the compression technology.
[0325] Condition 3: Whether the method proposed in the present disclosure is supported at a higher level (eg, SPS, PPS, PH, SH).
[0326] Whether the method proposed in the present disclosure is supported may be defined by a syntax element (comb_subpu_enable_flag) signaled from a higher layer, and condition 3 may be satisfied when comb_subpu_enable_flag=1.
[0327] Condition 4: Whether MVD signaling for a specific prediction direction is supported at a higher layer (such as SPS, PPS, PH, SH)
[0328] Whether MVD signaling of a specific prediction direction is supported may be defined by a syntax element (ph_mvd_l1_zero_flag) signaled from a higher layer, and condition 4 may be satisfied when ph_mvd_l1_zero_flag=0 (signaling MVD).
[0329] Implementation method 5
[0330] Embodiment 5 is an embodiment of a method of adaptively signaling the MVD for each prediction direction.
[0331] In conventional AMVP mode, the index of the prediction candidate (mvp_lx_flag), the index of the reference picture (ref_idx_lx), and the offset of the motion information (MvdLx, mvdCpLX) may be encoded into the bitstream and signaled in the bitstream. If the prediction type in a specific direction of the current block is a sub PU prediction type (e.g., affine), at least two MVDs (i.e., mvdCpLX) for each control point (CP) may be signaled. Therefore, the amount of bits of signaled information may have many disadvantages compared to a non-sub PU prediction type (e.g., non-affine). In addition, since the same prediction type is applied to each prediction direction in conventional methods, the amount of signaled information may be further increased in the case of dual prediction.
[0332] In the method proposed in the present disclosure, since different prediction types (sub PU prediction type and non-sub PU prediction type) are applied for each prediction direction, the amount of bits signaled in the case of dual prediction can be reduced, thereby improving compression efficiency.
[0333] Fig.21 This is a flowchart illustrating an image encoding method according to embodiment 5.
[0334] Reference Fig.21, the image encoding device 100 may determine a different prediction type to be applied to each prediction direction of the current block (S2100). For example, the image encoding device 100 may determine the prediction type in the L0 direction as a sub PU prediction type, and may determine the prediction type in the L1 direction as a non-sub PU prediction type. As another example, the image encoding device 100 may determine the prediction type in the L0 direction as a non-sub PU prediction type, and may determine the prediction type in the L1 direction as a sub PU prediction type. Information on the determination of the prediction type may be encoded and signaled as the second information (inter_mixed_pu_l0_flag).
[0335] The image encoding apparatus 100 may determine a parameter model to be applied to each prediction direction. The parameter model may include a translation motion model, a 4-parameter model (e.g., a 4-parameter affine motion model), and a 6-parameter model (e.g., a 6-parameter affine motion model). Information about the parameter model may be encoded and signaled as the third information (cu_subpu_type_flag).
[0336] The image encoding apparatus 100 may determine a prediction type applied to each prediction direction (S2120), and signal an MVD for each prediction direction based on the determination (S2130, S2140). For example, if a non-sub PU prediction type is applied to the L0 direction and a sub PU prediction type is applied to the L1 direction, one MVD may be encoded for the L0 direction and a plurality of MVDs may be encoded for the L1 direction. Here, the number of MVDs to be encoded for the prediction direction to which the sub PU prediction type is applied may be determined based on the parameter model determined by step S2110.
[0337] Fig. 22 This is a flowchart illustrating an image decoding method according to embodiment 5.
[0338] Reference Fig. 22 , the image decoding apparatus 200 may derive a parameter model (MotionModelIdc[lx][x][y]) in each prediction direction based on the signaled second information (inter_mixed_pu_l0_flag) and the third information (cu_subpu_type_flag) (S2200). Here, MotionModelIdc[lx][x][y] is a variable representing a motion model (parameter model) of a coding unit, and lx may represent a reference picture list direction (prediction direction).
[0339] MotionModelIdc[lx][x][y] can be derived as follows.
[0340] -When general_merge_flag=1, for lx=0, 1, MotionModelIdc[lx][x][y]=merge_subblock_flag[x0][y0].
[0341] - Otherwise (general_merge_flag=0),
[0342] - When inter_mixed_pu_flag = 1,
[0343] MotionModelIdc[0][x][y]=inter_mixed_pu_l0_flag[x0][y0]? cu_subpu_type_flag[x0][y0]+1:0
[0344] MotionModelIdc[1][x][y]=inter_mixed_pu_l0_flag[x0][y0]? 0: cu_subpu_type_flag[x0][y0]+1
[0345] - When inter_mixed_pu_flag = 1,
[0346] For lx=0, 1, MotionModelIdc[lx][x][y]=inter_affine_flag[x0][y0]+cu_affine_type_flag[x0][y0]
[0347] Table 18 shows the parameter model indicated by MotionModelIdc[lx][x][y].
[0348] [Table 18]
[0349] MotionModelIdc[lx][x][y] Motion model for motion compensation 0 Translational motion model 1 4-parameter affine motion model 2 6-parameter affine motion model
[0350] Since different prediction types are applied to each prediction direction, MotionModelIdc may represent different values for each prediction direction. In addition, since the proposed method is applied when inter_mixed_pu_flag=1, the first array of MotionModelIdc may be defined to represent each prediction direction in order to facilitate definition of each prediction direction.
[0351] The image decoding apparatus 200 may perform mvd_coding for each prediction direction to obtain the MVD of each prediction direction ( S2210 to S2250 ).
[0352] Specifically, the image decoding device 200 may perform mvd_coding to obtain a first MVD (S2210) and check the value of MotionModelIdc (S2220). If the value of MotionModelIdc indicates a 4-parameter model or a 6-parameter model (MotionModelIdc>0), the image decoding device 200 may additionally perform mvd_coding to obtain a second MVD (S2230). In contrast, if MotionModelIdc=0, additional mvd_coding may not be performed.
[0353] The image decoding device 200 may additionally check the value of MotionModelIdc (S2240). As a result, if the value of MotionModelIdc indicates a 6-parameter model (MotionModelIdc>1), the image decoding device 200 may additionally perform mvd_coding to obtain a third MVD (S2250). In contrast, if MotionModelIdc=1, additional mvd_coding may not be performed.
[0354] The above method for adaptive encoding and obtaining MVD is represented by the syntax structure shown in Table 19.
[0355] [Table 19]
[0356]
[0357]
[0358] In mvd_coding(x0, y0, lx, n) of Table 19, lx represents a prediction direction, and n represents the number of times mvd_coding is performed.
[0359] The image decoding apparatus 200 may derive bidirectional motion information of the current block based on the MVD obtained for each prediction direction and any one of the at least one bidirectional motion information candidate. In addition, the image decoding apparatus may perform bidirectional prediction based on the derived bidirectional motion information.
[0360] Fig.23 An example of bi-prediction of a current block based on different prediction types using adaptively signaled MVD is shown. Fig.23 In the example, since the L0 direction has a sub PU prediction type, multiple MVDs (e.g., as many times as the number of CPs) may be signaled, and since the L1 direction has a non-sub prediction type, a single MVD may be signaled.
[0361] Implementation 6
[0362] Embodiment 6 is an embodiment of various positions of reference blocks.
[0363] Fig.24 is a diagram used to explain in more detail the various positions of reference blocks from which motion information can be derived. Fig.24 As shown, the reference blocks may include blocks adjacent to the current block and blocks not adjacent to the current block.
[0364] Therefore, the image encoding apparatus 100 and the image decoding apparatus 200 may refer not only to motion information of blocks adjacent to the current block but also to motion information of blocks not adjacent to the current block, thereby deriving motion information of the current block in more detail.
[0365] Fig.25 is a diagram showing a content streaming system to which an embodiment of the present disclosure can be applied.
[0366] like Fig.25 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.
[0367] 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.
[0368] 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.
[0369] 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.
[0370] 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.
[0371] 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.
[0372] Each server in the content streaming system may operate as a distributed server, in which case data received from each server may be distributed.
[0373] 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.
[0374] Industrial Applicability
[0375] 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 the following steps: Obtaining first information based on that the prediction direction of the current block is bidirectional; Specifying that different prediction types are applied to each prediction direction of the current block based on the first information, deriving at least one bi-directional motion information candidate corresponding to the different prediction types from a reference block; as well as Based on any one of the at least one bidirectional motion information candidate, bi-predict the current block using the different prediction types, The different prediction types are a sub-block unit sub PU prediction type and a non-sub-block unit non-sub PU prediction type.
2. The image decoding method according to claim 1, in, The bidirectional motion information candidate is derived based on at least one sub PU-based motion information among the bidirectional motion information of the reference block, and The sub PU-based motion information is motion information used for the sub PU prediction type.
3. The image decoding method according to claim 1, in, The bidirectional motion information candidate is derived based on at least one motion information based on sub PU motion information among the motion information including combining the motion information of the reference block based on a prediction direction, and The sub PU-based motion information is motion information used for the sub PU prediction type.
4. The image decoding method according to claim 3, wherein: The combined motion information is derived based on the prediction direction of the reference block being unidirectional.
5. The image decoding method according to claim 1, in, The reference block includes neighboring blocks located around the current block and predetermined neighboring blocks adjacent to the current block, and The prediction mode of the predetermined neighboring block is the non-sub PU prediction type, and the bidirectional motion information candidate is derived according to motion information obtained by combining motion information of the neighboring blocks based on a prediction direction.
6. The image decoding method according to claim 1, wherein: The step of obtaining the first information comprises: determining a first condition regarding whether the current block is bi-predicted using the different prediction types; and obtaining the first information based on satisfying the first condition, The first condition includes a condition on the prediction direction of the current block and a predetermined size condition on the size of the current block.
7. The image decoding method according to claim 6, wherein: The first condition also includes a condition on whether to signal a motion vector difference mvd in a specific direction of the two directions.
8. The image decoding method according to claim 1, comprising the following steps: obtaining second information based on the first information specifying that a different prediction type is applied to each prediction direction of the current block, wherein the different prediction types applied to each prediction direction are determined based on the second information, and The bidirectional motion information candidates correspond to the determined different prediction types.
9. The image decoding method according to claim 1, wherein: The first information also specifies a different prediction type to be applied to each prediction direction.
10. The image decoding method according to claim 8, comprising the following steps: obtaining third information based on the first information specifying that a different prediction type is applied to each prediction direction of the current block, The parameter model applied to each prediction direction is determined based on the third information.
11. The image decoding method according to claim 10, in, The bidirectional motion information of the current block is derived based on any one of the at least one bidirectional motion information candidate and an mvd obtained for each prediction direction of the current block, and The number of mvds obtained for each prediction direction of the current block is determined based on the second information and the third information.
12. The image decoding method according to claim 1, wherein: An mvd is obtained by applying a direction of a prediction mode based on the non-sub PU among the prediction directions of the current block.
13. The image decoding method according to claim 1, wherein: The first information is obtained based on that a subblock merge mode is applied to the current block or an affine prediction mode is applied to the current block.
14. An image encoding method performed by an image encoding device, the image encoding method comprising the following steps: Determining whether a different prediction type is applied to each prediction direction of the current block based on the prediction direction of the current block being bidirectional, first information specifying that a different prediction type is applied to each prediction direction of the current block is encoded into a bitstream; Based on the different prediction types being applied to each prediction direction of the current block, deriving at least one bi-directional motion information candidate corresponding to the different prediction types from a reference block; as well as Based on any one of the at least one bidirectional motion information candidate, bi-predict the current block using the different prediction types, The different prediction types are a sub-block unit sub PU prediction type and a non-sub-block unit non-sub PU prediction type. 15 . A computer-readable recording medium storing a bit stream generated by the image encoding method according to claim 14 .
16. A method for transmitting a bit stream generated by an image encoding method, the image encoding method comprising the steps of: Determining whether a different prediction type is applied to each prediction direction of the current block based on the prediction direction of the current block being bidirectional, first information specifying that a different prediction type is applied to each prediction direction of the current block is encoded into a bitstream; Based on the different prediction types being applied to each prediction direction of the current block, deriving at least one bi-directional motion information candidate corresponding to the different prediction types from a reference block; as well as Based on any one of the at least one bidirectional motion information candidate, bi-predict the current block using the different prediction types, The different prediction types are a sub-block unit sub PU prediction type and a non-sub-block unit non-sub PU prediction type.
