Image encoding / decoding method and apparatus, and recording medium on which bit stream is stored

By using a multi-hypothesis prediction mode inter-frame prediction method, the basic and additional prediction blocks of the current block are generated and weighted summed, which solves the problem of insufficient compression performance in high-resolution image inter-frame prediction and achieves more efficient image compression and decoding.

CN118923108APending Publication Date: 2024-11-08LG ELECTRONICS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380033027.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-04-12
Filing Date
2023-04-12
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

Existing image compression techniques struggle to effectively handle inter-frame prediction for high-resolution and high-quality images, especially in multi-hypothesis prediction modes. The syntax parsing conditions and order of inter-frame prediction modes are not sufficiently optimized, resulting in inadequate compression performance.

Method used

An inter-frame prediction method based on multiple hypothesis prediction modes is adopted. By generating the basic prediction block and the additional prediction block of the current block and weighted summing them, the syntax parsing conditions and order between various inter-frame prediction modes are defined, including merging mode, AMVP mode and multiple hypothesis prediction mode. Relevant information is obtained from the bit stream for image decoding.

Benefits of technology

It improves the accuracy of inter-frame prediction and image compression performance, optimizes the syntax structure, and enhances coding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118923108A_ABST
    Figure CN118923108A_ABST
Patent Text Reader

Abstract

An image encoding / decoding method and apparatus according to the present disclosure may: perform bidirectional prediction based on a first inter prediction mode to generate a basic prediction block of a current block; generating an additional prediction block of the current block based on the second inter prediction mode; and calculating a weighted sum of the basic prediction block and the additional prediction block to generate a final prediction block of the current block.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to an image encoding / decoding method and apparatus and a recording medium storing a bit stream. Background Art

[0002] Recently, demands for high-resolution and high-quality images such as HD (High Definition) images and UHD (Ultra High Definition) images have been increasing in various application fields, and therefore, efficient image compression technology is being discussed.

[0003] There are various technologies, such as inter-frame prediction technology that uses video compression technology to predict pixel values ​​included in the current picture from pictures before or after the current picture, intra-frame prediction technology that predicts pixel values ​​included in the current picture by using pixel information in the current picture, entropy coding technology that assigns short symbols to values ​​with high occurrence frequency and assigns long symbols to values ​​with low occurrence frequency, etc., and these image compression technologies can be used to effectively compress image data and transmit or store it. Summary of the invention

[0004] Technical issues

[0005] The present disclosure provides a method and apparatus for performing inter-frame prediction based on multiple hypothesis prediction modes.

[0006] The present disclosure provides a method and apparatus for defining syntax parsing conditions and orders between various inter-frame prediction modes including a multi-hypothesis prediction mode.

[0007] Technical Solution

[0008] According to the image decoding method and device of the present disclosure, bidirectional prediction can be performed based on the first inter-frame prediction mode to generate a basic prediction block of the current block, an additional prediction block of the current block can be generated based on the second inter-frame prediction mode, and the basic prediction block and the additional prediction block can be weighted and summed to generate a final prediction block of the current block.

[0009] In the image decoding method and apparatus according to the present disclosure, the first inter prediction mode may include at least one of a merge mode, an AMVP mode, or a merge-AMVP combined mode.

[0010] In the image decoding method and apparatus according to the present disclosure, the second inter prediction mode may include a multi-hypothesis prediction mode.

[0011] In the image decoding method and apparatus according to the present disclosure, when a plurality of additional prediction blocks are generated, a final prediction block may be generated by sequentially weighting and summing the plurality of additional prediction blocks to a basic prediction block.

[0012] The image decoding method and apparatus according to the present disclosure may further include acquiring information about the second inter prediction mode from the bitstream.

[0013] In the image decoding method and apparatus according to the present disclosure, the information about the second inter prediction mode may include at least one of weight information or prediction information.

[0014] In the image decoding method and apparatus according to the present disclosure, the weight information may represent information indicating a weight used for a weighted sum of additional prediction blocks.

[0015] In the image decoding method and apparatus according to the present disclosure, the prediction information may represent information for deriving an additional prediction block.

[0016] In the image decoding method and apparatus according to the present disclosure, the prediction information may include a mode flag indicating whether the merge mode or the AMVP mode is used to derive the additional prediction block.

[0017] In the image decoding method and apparatus according to the present disclosure, when the mode flag indicates that the merge mode is used to derive the additional prediction block, the prediction information may further include a merge index.

[0018] In the image decoding method and apparatus according to the present disclosure, when the mode flag indicates that the AMVP mode is used to derive the additional prediction block, the prediction information may include at least one of a motion vector predictor flag, a reference index, or motion vector difference information.

[0019] In the image decoding method and apparatus according to the present disclosure, when a predefined condition is satisfied, information about the second inter prediction mode may be acquired from a bitstream.

[0020] In the image decoding method and apparatus according to the present disclosure, the predefined condition may be defined without considering adaptive motion vector resolution (AMVR) information.

[0021] The image decoding method and apparatus according to the present disclosure may acquire adaptive motion vector resolution (AMVR) information from a bitstream.

[0022] In the image decoding method and apparatus according to the present disclosure, acquiring the AMVR information may be performed before acquiring the information about the second inter prediction mode.

[0023] The image decoding method and apparatus according to the present disclosure may acquire a motion vector sign derivation (MVSD) index specifying a candidate among a plurality of sign combination candidates from a bitstream.

[0024] In the image decoding method and apparatus according to the present disclosure, acquiring the MVSD index may be performed before acquiring the information about the second inter prediction mode.

[0025] According to the image encoding method and device of the present disclosure, bidirectional prediction can be performed based on the first inter-frame prediction mode to generate a basic prediction block of the current block, an additional prediction block of the current block can be generated based on the second inter-frame prediction mode, and a final prediction block of the current block can be generated by weighted summing the basic prediction block and the additional prediction block.

[0026] A computer-readable digital storage medium is provided, which stores encoded video / image information, resulting in execution of an image decoding method due to a decoding device according to the present disclosure.

[0027] A computer-readable digital storage medium storing video / image information generated according to an image encoding method according to the present disclosure is provided.

[0028] A method and apparatus for transmitting video / image information generated according to an image encoding method according to the present disclosure are provided.

[0029] Technical Effects

[0030] The present disclosure may improve the accuracy of prediction by performing inter-frame prediction based on multiple hypothesis prediction modes.

[0031] The present disclosure may improve syntax structure and enhance compression performance by defining syntax parsing conditions and orders between various inter-frame prediction modes including a multi-hypothesis prediction mode. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 A video / image compilation system according to the present disclosure is shown.

[0033] Figure 2 A rough block diagram of an encoding device to which an embodiment of the present disclosure can be applied and which performs encoding of a video / image signal is shown.

[0034] Figure 3 A rough block diagram of a decoding device to which an embodiment of the present disclosure can be applied and which performs decoding of a video / image signal is shown.

[0035] Figure 4 An example of a video / image encoding method based on inter-frame prediction to which an embodiment of the present disclosure can be applied is shown.

[0036] Figure 5 An example of a video / image decoding method based on inter-frame prediction to which an embodiment of the present disclosure can be applied is shown.

[0037] Figure 6 An inter-frame prediction process to which the embodiments of the present disclosure can be applied is illustratively shown.

[0038] Figure 7An inter-frame prediction method performed by the decoding device 300 according to an embodiment of the present disclosure is shown.

[0039] Figure 8 is a flowchart illustrating an example of a syntax parsing sequence according to an embodiment of the present disclosure.

[0040] Fig. 9 A rough configuration of the inter-frame predictor 332 that performs the inter-frame prediction method according to the present disclosure is shown.

[0041] Fig.10 An inter-frame prediction method performed by the encoding apparatus 200 as an embodiment according to the present disclosure is shown.

[0042] Fig.11 A rough configuration of the inter-frame predictor 221 performing the inter-frame prediction method according to the present disclosure is shown.

[0043] Fig.12 An example of a content streaming system to which an embodiment of the present disclosure can be applied is shown. DETAILED DESCRIPTION

[0044] Because the present disclosure can make various changes and has several embodiments, specific embodiments will be illustrated in the drawings and described in detail in the detailed description. However, it is not intended to limit the present disclosure to specific embodiments, and it should be understood to include all changes, equivalents and substitutes included in the spirit and technical scope of the present disclosure. While describing each of the accompanying drawings, similar reference numerals are used for similar components.

[0045] Terms such as first, second, etc. can be used to describe various components, but components should not be limited by these terms. These terms are only used to distinguish one component from other components. For example, without departing from the scope of the present disclosure, a first component can be referred to as a second component, and similarly, a second component can also be referred to as a first component. Terms and / or combinations of any one or more related statement items in a plurality of related statement items are included.

[0046] When a component is referred to as being "connected" or "linked" to another component, it should be understood that it can be directly connected or linked to another component, but another component may also exist in between. On the other hand, when a component is referred to as being "directly connected" or "directly linked" to another component, it should be understood that another component does not exist in between.

[0047] The terms used in this application are only used to describe specific embodiments and are not intended to limit the present disclosure. Unless the context clearly indicates otherwise, singular expressions include plural expressions. In this application, it should be understood that terms such as "including" or "having" are intended to designate the existence of features, numbers, steps, operations, components, parts or combinations thereof described in the specification, but do not exclude the possibility of the existence or addition of one or more other features, numbers, steps, operations, components, parts or combinations thereof in advance.

[0048] The present disclosure relates to video / image coding. For example, the methods / embodiments disclosed herein may be applied to methods disclosed in the Universal Video Coding (VVC) standard. In addition, the methods / embodiments disclosed herein may be applied to methods disclosed in the Basic Video Coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the second generation audio video coding standard (AVS2), or the next generation video / image coding standard (e.g., H.267 or H.268, etc.).

[0049] This specification proposes various embodiments of video / image coding, and unless otherwise stated, these embodiments may be performed in combination with each other.

[0050] Here, video may refer to a collection of a series of images over time. A picture generally refers to a unit representing an image within a specific time period, and a slice / tile is a unit that forms a part of a picture in coding. A slice / tile may include at least one coding tree unit (CTU). A picture may consist of at least one slice / tile. A tile is a rectangular area consisting of multiple CTUs within a specific tile column and a specific tile row of a picture. A tile column is a rectangular area of ​​a CTU having the same height as the picture and a width assigned by the syntax requirements of the picture parameter set. A tile row is a rectangular area of ​​a CTU having a height assigned by the picture parameter set and the same width as the width of the picture. The CTU within a tile may be arranged continuously according to a CTU raster scan, and the tiles within a picture may be arranged continuously according to a raster scan of the tile. A slice may include an integer number of complete tiles or an integer number of continuous complete CTU rows within a tile of a picture that may be exclusively included in a single NAL unit. At the same time, a picture may be divided into at least two sub-pictures. A sub-picture may be a rectangular area of ​​at least one slice within a picture.

[0051] Pixel, pixel or picture element 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, and may represent only a pixel / pixel value of a luminance component, or only a pixel / pixel value of a chrominance component.

[0052] A unit may represent a basic unit of image processing. A unit may include at least one of a specific region of a picture and information associated with the corresponding region. A unit may include a luminance block and two chrominance (e.g., cb, cr) blocks. In some cases, a unit may be used interchangeably with terms such as a block or region. In general, an MxN block may include a set (or array) of transform coefficients or samples (or sample arrays) consisting of M columns and N rows.

[0053] Here, "A or B" may refer to "only A", "only B", or "both A and B". In other words, herein, "A or B" may be interpreted as "A and / or B". For example, herein, "A, B or C" may refer to "only A", "only B", "only C", or "any combination of A, B, and C".

[0054] As used herein, a slash ( / ) or a comma may mean "and / or". For example, "A / B" may mean "A and / or B". Thus, "A / B" may mean "only A", "only B", or "both A and B". For example, "A, B, C" may mean "A, B, or C".

[0055] Here, "at least one of A and B" may refer to "only A", "only B", or "both A and B". In addition, herein, expressions such as "at least one of A or B" or "at least one of A and / or B" can be interpreted in the same manner as "at least one of A and B".

[0056] In addition, herein, “at least one of A, B, and C” may refer to “only A”, “only B”, “only C”, or “any combination of A, B, and C”. In addition, “at least one of A, B, or C” or “at least one of A, B and / or C” may refer to “at least one of A, B, and C”.

[0057] In addition, the brackets used herein may refer to "for example". Specifically, when the indication is "prediction (intra-frame prediction)", "intra-frame prediction" may be proposed as an example of "prediction". In other words, the "prediction" here is not limited to "intra-frame prediction", and "intra-frame prediction" may be proposed as an example of "prediction". In addition, even when the indication is "prediction (ie, intra-frame prediction)", "intra-frame prediction" may be proposed as an example of "prediction".

[0058] Here, technical features described individually in one drawing may be implemented individually or simultaneously.

[0059] Figure 1 A video / image compilation system according to the present disclosure is shown.

[0060] refer to Figure 1, a video / image coding system may include a first device (source device) and a second device (receiving device).

[0061] The source device may send the encoded video / image information or data to the receiving device in the form of a file or stream transmission through a digital storage medium or a network. The source device may include a video source, an encoding device, and a sending unit. The receiving device may include a receiving unit, a decoding device, and a renderer. The encoding device may be referred to as a video / image encoding device, and the decoding device may be referred to as a video / image decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display unit, and the display unit may be composed of a separate device or an external component.

[0062] The video source may obtain the video / image through the process of capturing, synthesizing or generating the video / image. The video source may include a device for capturing the video / image and a device for generating the video / image. The device for capturing the video / image may include at least one camera, a video / image archive including previously captured videos / images, etc. The device for generating the video / image may include a computer, a tablet computer, a smart phone, etc., and may (electronically) generate the video / image. For example, a virtual video / image may be generated by a computer, etc., and in this case, the process of capturing the video / image may be replaced by the process of generating the relevant data.

[0063] The encoding device can encode the input video / image. The encoding device can perform a series of processes such as prediction, transformation, quantization, etc. for compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.

[0064] The sending unit may send the encoded video / image information or data output in the form of a bit stream to the receiving unit of the receiving device in the form of a file or stream transmission 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 sending unit may include an element for generating a media file in a predetermined file format and may include an element for transmission through a broadcast / communication network. The receiving unit may receive / extract a bit stream and send it to a decoding device.

[0065] The decoding device may decode the video / image by performing a series of processes corresponding to the operations of the encoding device, such as dequantization, inverse transformation, prediction, etc.

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

[0067] Figure 2A rough block diagram of an encoding device to which an embodiment of the present disclosure can be applied and which performs encoding of a video / image signal is shown.

[0068] refer to Figure 2 , the encoding device 200 may be composed of an image segmenter 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter-frame predictor 221 and an intra-frame predictor 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 may further include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstructed block generator. According to an embodiment, the above-mentioned image segmenter 210, the predictor 220, the residual processor 230, the entropy encoder 240, the adder 250, and the filter 260 may be configured by at least one hardware component (e.g., an encoder chipset or processor). In addition, the memory 270 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware component may further include a memory 270 as an internal / external component.

[0069] The image divider 210 may divide the input image (or picture, frame) input to the encoding device 200 into at least one processing unit. As an example, the processing unit may be referred to as a coding unit (CU). In this case, the coding unit may be recursively divided from a coding tree unit (CTU) or a maximum coding unit (LCU) according to a quadtree binary tree ternary tree (QTBTTT) structure.

[0070] For example, one coding unit may be segmented into a plurality of coding units having a deeper depth based on a quadtree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quadtree structure may be applied first, and the binary tree structure and / or the ternary structure may be applied later. Alternatively, the binary tree structure may be applied before the quadtree structure. The coding process according to this specification may be performed based on a final coding unit that is no longer segmented. In this case, based on coding efficiency according to image characteristics, etc., the maximum coding unit may be directly used as the final coding unit, or if necessary, the coding unit may be recursively segmented into coding units of a deeper depth, and the coding unit with the best size may be used as the final coding unit. Here, the coding process may include processes such as prediction, transformation, and reconstruction described later.

[0071] As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may be divided or partitioned from the above-mentioned final coding unit, respectively. The prediction unit may be a unit of sample prediction, 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.

[0072] In some cases, a unit may be used interchangeably with terms such as a block or region. In general, an MxN block may represent a set of transform coefficients or samples consisting of M columns and N rows. A sample may generally represent a pixel or a pixel value, and may represent only a pixel / pixel value of a luma component, or only a pixel / pixel value of a chroma component. A sample may be used as a term to make a picture (or image) correspond to a pixel or a picture element.

[0073] The encoding device 200 may subtract the prediction signal (prediction block, prediction sample array) output from the inter predictor 221 or the intra predictor 222 from the input image signal (original block, original sample array) to generate a residual signal (residual signal, residual sample array), and the generated residual signal is transmitted to the transformer 232. In this case, a unit that subtracts the prediction signal (prediction block, prediction sample array) from the input image signal (original block, original sample array) within the encoding device 200 may be referred to as a subtractor 231.

[0074] The predictor 220 may perform prediction on a block to be processed (hereinafter referred to as a current block) and generate a predicted block including a prediction sample for the current block. The predictor 220 may determine whether intra prediction or inter prediction is applied in units of a current block or CU. The predictor 220 may generate various information about the prediction, such as prediction mode information, and send it to the entropy encoder 240, as described later in the description of each prediction mode. The information about the prediction may be encoded in the entropy encoder 240 and output in the form of a bitstream.

[0075] The intra-frame predictor 222 can predict the current block by referring to the samples in the current picture. Depending on the prediction mode, the referenced sample can be located near the current block or can be located at a certain distance away from the current block. In intra-frame prediction, the prediction mode may include at least one non-directional mode and multiple directional modes. The non-directional mode may include at least one of the DC mode or the plane mode. Depending on the detail level of the prediction direction, the directional mode may include 33 directional modes or 65 directional modes. However, this is only an example, and more or less directional modes may be used depending on the configuration. The intra-frame predictor 222 may determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.

[0076] The inter-frame predictor 221 may derive a prediction block for 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 sent in the inter-frame prediction mode, the motion information may 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 further include inter-frame prediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). For inter-frame 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., and the reference picture including the temporal neighboring block may be referred to as a collocated picture (colPic). For example, the inter-frame predictor 221 may configure 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, and for example, for skip mode and merge mode, the inter predictor 221 may use motion information of neighboring blocks as motion information of the current block. For skip mode, unlike merge mode, a residual signal may not be transmitted. For motion vector prediction (MVP) mode, motion vectors of surrounding blocks are used as motion vector predictors, and motion vector differences are signaled to indicate the motion vector of the current block.

[0077] The predictor 220 may generate a prediction signal based on various prediction methods described later. For example, the predictor may not only apply intra prediction or inter prediction to predict a block, but may also apply intra prediction and inter prediction at the same time. It may be referred to as a combined inter and intra prediction (CIIP) mode. In addition, the predictor may be based on an intra block copy (IBC) prediction mode or may be based on a palette mode for prediction of a block. The IBC prediction mode or the palette mode may be used for content image / video coding of games, such as screen content coding (SCC), etc. IBC basically performs prediction within the current picture, but it may be performed similarly to inter prediction because it derives a reference block within the current picture. In other words, IBC may use at least one of the inter prediction techniques described herein. The palette mode may be considered an example of intra coding or intra prediction. When the palette mode is applied, the sample values ​​within the picture may be signaled based on information about the palette table and the palette index. The prediction signal generated by the predictor 220 may be used to generate a reconstructed signal or a residual signal.

[0078] The transformer 232 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 expressed as a graph. CNT refers to a transform obtained based on generating a prediction signal 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 non-square blocks of variable size.

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

[0080] The entropy encoder 240 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 240 may encode information necessary for video / video image reconstruction (e.g., values ​​of syntax elements, etc.) in addition to transform coefficients quantized together or individually.

[0081] The encoded information (e.g., encoded video / image information) can be transmitted or stored in units of network abstraction layer (NAL) units in the form of a bitstream. The video / image information may further 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 further include general constraint information. Here, information and / or syntax elements transmitted / signaled from the encoding device to the decoding device may be included in the video / image information. The video / image information may be encoded and included in the bitstream through the above-mentioned encoding process. The bitstream may be transmitted through a network or may be stored in a digital storage medium. Here, the network may include a broadcast network and / or a communication network, etc., and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmission unit (not shown) for transmission and / or a storage unit (not shown) for storing a signal output from the entropy encoder 240 may be configured as an internal / external element of the encoding device 200, or the transmission unit may also be included in the entropy encoder 240.

[0082] The quantized transform coefficients output from the quantizer 233 can be used to generate a prediction signal. For example, the residual signal (residual block or residual sample) can be reconstructed by applying dequantization and inverse transform to the quantized transform coefficients through the dequantizer 234 and the inverse transformer 235. The adder 250 can add the reconstructed residual signal to the prediction signal output from the inter-frame predictor 221 or the intra-frame predictor 222 to generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). When there is no residual of the block to be processed, such as when the skip mode is applied, the prediction block can be used as a reconstructed block. The adder 250 can be referred to as 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 also be used for inter-frame prediction of the next picture through filtering described later. At the same time, luminance mapping with chroma scaling (LMCS) can be applied in the picture encoding and / or reconstruction process.

[0083] The filter 260 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 260 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and the modified reconstructed picture can be stored in the memory 270, specifically in the DPB of the memory 270. Various filtering methods may include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filter 260 can generate various information about filtering and send it to the entropy encoder 240. The information about filtering can be encoded in the entropy encoder 240 and output in the form of a bit stream.

[0084] The modified reconstructed picture transmitted to the memory 270 may be used as a reference picture in the inter predictor 221. When inter prediction is applied therethrough, the encoding apparatus can avoid prediction mismatch in the encoding apparatus 200 and the decoding apparatus, and can also improve encoding efficiency.

[0085] The DPB of the memory 270 may store the modified reconstructed picture to be used as a reference picture in the inter-frame predictor 221. The memory 270 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 block in the pre-reconstructed picture. The stored motion information may be sent to the inter-frame predictor 221 to be used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 270 may store the reconstructed samples of the reconstructed block in the current picture and send them to the intra-frame predictor 222.

[0086] Figure 3 A rough block diagram of a decoding device to which an embodiment of the present disclosure can be applied and which performs decoding of a video / image signal is shown.

[0087] refer to Figure 3 , the decoding device 300 may be configured by including an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 may include an inter-frame predictor 331 and an intra-frame predictor 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 321.

[0088] According to an embodiment, the above-mentioned entropy decoder 310, residual processor 320, predictor 330, adder 340 and filter 350 may be configured by one hardware component (e.g., decoder chipset or processor). In addition, the memory 360 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware component may further include the memory 360 as an internal / external component.

[0089] When a bit stream including video / image information is input, the decoding device 300 may respond to the Figure 2 The image is reconstructed by a process of processing video / image information in an encoding device. For example, the decoding device 300 can derive a unit / block based on relevant information of block segmentation obtained from a bitstream. The decoding device 300 can perform decoding by using a processing unit applied in the encoding device. Therefore, the processing unit of decoding can be a coding unit, and the coding unit can be divided from a coding tree unit or a maximum coding unit according to a quadtree structure, a binary tree structure and / or a ternary tree structure. At least one transform unit can be derived from the coding unit. And, the reconstructed image signal decoded and output by the decoding device 300 can be played by a playback device.

[0090] The decoding device 300 may receive the bit stream from Figure 2 The received signal can be decoded by the entropy decoder 310. For example, the entropy decoder 310 can parse the bitstream to derive information (e.g., video / image information) necessary for image reconstruction (or picture reconstruction). The video / image information may further 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 further include general constraint information. The decoding device may further decode the picture based on the information about the parameter set and / or the general constraint information. The signaled / received information and / or the syntax elements described later in this document may be decoded and obtained from the bitstream by a decoding process. For example, the entropy decoder 310 may decode the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, CABAC, etc., and output the values ​​of the syntax elements necessary for image reconstruction and the quantized values ​​of the transform coefficients of the residual. In more detail, the CABAC entropy decoding method can receive a bin corresponding to each syntax element from a bitstream, determine a context model by using information of syntax elements to be decoded, decoding information of surrounding blocks and blocks to be decoded, or information of symbols / bins decoded in the previous step, perform arithmetic decoding on bins by predicting the probability of occurrence of bins according to the determined context model, and generate symbols corresponding to the values ​​of each syntax element. In this case, after determining the context model, the CABAC entropy decoding method can update the context model by using information about decoded symbols / bins of the context model for the next symbol / bin. Among the information decoded in the entropy decoder 310, information about prediction is provided to the predictor (inter-frame predictor 332 and intra-frame predictor 331), and the residual value, that is, the quantized transform coefficient and related parameter information, which is entropy decoded in the entropy decoder 310, can be input to the residual processor 320. The residual processor 320 can derive a residual signal (residual block, residual sample, residual sample array). In addition, information about filtering among the information decoded in the entropy decoder 310 can be provided to the filter 350. Meanwhile, a receiving unit (not shown) that receives a signal output from the encoding device may be further configured as an internal / external element of the decoding device 300 or the receiving unit may be a component of the entropy decoder 310 .

[0091] Meanwhile, the decoding device according to this specification may be referred to as a video / image / picture decoding device, and the 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 310, and the sample decoder may include at least one of a dequantizer 321, an inverse transformer 322, an adder 340, a filter 350, a memory 360, an inter-frame predictor 332, and an intra-frame predictor 331.

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

[0093] The inverse transformer 322 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).

[0094] The predictor 320 may perform prediction on the current block and generate a prediction block including prediction samples for the current block. The predictor 320 may determine whether to apply intra prediction or inter prediction to the current block based on the information on prediction output from the entropy decoder 310, and determine a specific intra / inter prediction mode.

[0095] The predictor 320 can generate a prediction signal based on various prediction methods described later. For example, the predictor 320 can not only apply intra prediction or inter prediction to predict a block, but also apply intra prediction and inter prediction at the same time. It can be called a combined inter and intra prediction (CIIP) mode. In addition, the predictor can be based on an intra block copy (IBC) prediction mode or can be based on a palette mode for prediction of a block. The IBC prediction mode or the palette mode can be used for content image / video coding of games, such as screen content coding (SCC), etc. IBC basically performs prediction within the current picture, but it can be performed similarly to inter prediction because it derives a reference block within the current picture. In other words, IBC can use at least one of the inter prediction techniques described herein. The palette mode can be considered as an example of intra coding or intra prediction. When the palette mode is applied, information about the palette table and the palette index can be included in the video / image information and sent with a signal.

[0096] The intra-frame predictor 331 can predict the current block by referring to samples within the current picture. Depending on the prediction mode, the referenced sample can be located near the current block or can be located at a certain distance away from the current block. In intra-frame prediction, the prediction mode may include at least one non-directional mode and multiple directional modes. The intra-frame predictor 331 can determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring block.

[0097] The inter-frame predictor 332 may derive a prediction block for 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 sent in the inter-frame prediction mode, the motion information may 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 further include inter-frame prediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). For inter-frame prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the inter-frame predictor 332 may configure a motion information candidate list based on the neighboring blocks, and derive a motion vector and / or a reference picture index for 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 an inter-frame prediction mode for the current block.

[0098] The adder 340 may add the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the predictor (including the inter-frame predictor 332 and / or the intra-frame predictor 331) to generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). When there is no residual of the block to be processed, such as when the skip mode is applied, the prediction block may be used as the reconstructed block.

[0099] The adder 340 may be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of the next block to be processed in the current picture, may be output through filtering described later, or may be used for inter prediction of the next picture. At the same time, luminance mapping with chroma scaling (LMCS) may be applied during picture decoding.

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

[0101] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter-frame prediction unit 332. The memory 360 can be derived from the motion information in its current picture (or decoded) The motion information of the block and / or the motion information of the block in the pre-reconstructed picture. The stored motion information can be sent 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 360 can store the reconstructed samples of the reconstructed block in the current picture and send them to the intra-frame predictor 331.

[0102] Here, the embodiments described in the filter 260, the inter-frame predictor 221, and the intra-frame predictor 222 of the encoding device 200 may also be equally or correspondingly applied to the filter 350, the inter-frame predictor 332, and the intra-frame predictor 331 of the decoding device 300, respectively.

[0103] Meanwhile, when inter prediction is applied, the predictor of the encoding device / decoding device can perform inter prediction in units of blocks to derive prediction samples. Inter prediction may refer to prediction derived in a manner that depends on data elements (e.g., sample values ​​or motion information) of pictures other than the current picture. When inter 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.

[0104] In this case, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information of the current block 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 / or a reference picture index. The motion information may further include information about the inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.). When inter-frame prediction is applied, the neighboring blocks may include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture.

[0105] The reference picture including the reference block may be the same as or different from the reference picture including the temporally neighboring block. The temporally neighboring block may be referred to as a co-located reference block, a co-located CU (colCU), etc., and the reference picture including the temporally neighboring block may be referred to as a co-located picture (colPic). For example, a motion information candidate list may be configured based on the neighboring blocks of the current block, and 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.

[0106] Inter-frame prediction may be performed based on various prediction modes, and for example, for 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. For skip mode, unlike merge mode, a residual signal may not be sent. For motion vector prediction (MVP) mode, the motion vector of the selected neighboring block may be used as a motion vector predictor, and the motion vector difference may be signaled. In this case, the motion vector of the current block may be derived by using the sum of the motion vector predictor and the motion vector difference.

[0107] Depending on the inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.), the motion information may include L0 motion information and / or L1 motion information. The motion vector in the L0 direction may be referred to as an L0 motion vector or MVL0, and the motion vector in the L1 direction may be referred to as an L1 motion vector or MVL1. Prediction based on the L0 motion vector may be referred to as an L0 prediction, prediction based on the L1 motion vector may be referred to as an L1 prediction, and prediction based on both the L0 motion vector and the L1 motion vector may be referred to as a Bi prediction. Here, the L0 motion vector may represent a motion vector associated with the reference picture list L0 (L0), and the L1 motion vector may represent a motion vector associated with the reference picture list L1 (L1). The reference picture list L0 may include a picture before the current picture as a reference picture in output order, and 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.

[0108] The reference picture list L0 may further include a picture after the current picture as a reference picture in the output order. In this case, within the reference picture list L0, the previous picture may be indexed first, and the subsequent picture may be indexed next. The reference picture list L1 may further include a picture before the current picture as a reference picture in the output order. In this case, within the reference picture list 1, the subsequent picture may be indexed first, and the previous picture may be indexed next. Here, the output order may correspond to a picture order count (POC) order.

[0109] For example, the video / image encoding process based on inter-frame prediction may generally include the following.

[0110] Figure 4 An example of a video / image encoding method based on inter-frame prediction to which an embodiment of the present disclosure can be applied is shown.

[0111] The encoding device may perform inter prediction on the current block S400. The encoding device may derive the inter prediction mode and motion information of the current block and generate prediction samples of the current block. Here, the processes of determining the inter prediction mode, deriving the motion information, and generating the prediction samples may be performed simultaneously, or any one of the processes may be performed before the other processes. For example, the inter predictor of the encoding device may include a prediction mode determination unit, a motion information deriving unit, and a prediction sample deriving unit, the prediction mode determination unit may determine the prediction mode for the current block, the motion information deriving unit may derive the motion information of the current block, and the prediction sample deriving unit may derive the prediction samples of the current block.

[0112] For example, the inter-frame predictor of the encoding device can search for a block similar to the current block in a specific area (search area) of the reference picture through motion estimation, and derive a reference block whose difference with the current block is the smallest or less than or equal to a specific standard. Based on this, a reference picture index indicating the reference picture where the reference block is located can be derived, and a motion vector can be derived based on the position difference between the reference block and the current block. The encoding device can determine the mode applied to the current block among various prediction modes. The encoding device can compare the RD costs for various prediction modes and determine the best prediction mode for the current block.

[0113] For example, when a skip mode or a merge mode is applied to the current block, the encoding device may configure a merge candidate list described below, and derive a reference block whose difference with the current block is the smallest or less than or equal to a specific 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 sent to the decoding device by a signal. The motion information of the current block may be derived by using the motion information of the selected merge candidate.

[0114] As another example, when the (A) MVP mode is applied to the current block, the encoding device may configure the (A) MVP candidate list described below, and use the motion vector of the motion vector predictor (MVP) candidate selected from the motion vector predictor candidates included in the (A) MVP candidate list as the motion vector predictor of the current block. In this case, for example, the motion vector indicating the reference block derived by the above-mentioned motion estimation may be used as the motion vector of the current block, and the motion vector predictor candidate having the smallest difference between the motion vector of the current block and the motion vector predictor candidate among the motion vector predictor candidates may become the selected motion vector predictor candidate. A motion vector difference (MVD) may be derived, which is the difference obtained by subtracting the motion vector predictor from the motion vector of the current block. In this case, information about the MVD may be signaled to the decoding device. In addition, when the (A) MVP mode is applied, the value of the reference picture index may be configured as reference picture index information and signaled separately to the decoding device.

[0115] The encoding apparatus may derive residual samples based on the prediction samples S410. The encoding apparatus may derive residual samples by comparing original samples of the current block with the prediction samples.

[0116] The encoding device may encode the image information including prediction information and residual information S420. The encoding device can 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 merge index, etc.) and / or motion information. The motion information may include candidate selection information (e.g., a merge index, an mvp flag, or an mvp index), which is information for deriving a motion vector. In addition, the motion information may include information about the above-mentioned MVD and / or reference picture index information. In addition, the motion information may include information indicating whether L0 prediction, L1 prediction, or dual prediction is applied. The residual information is information about the residual sample. The residual information may include information about the quantized transform coefficients used for the residual sample.

[0117] The output bitstream may be stored in a (digital) storage medium and sent to a decoding device, or may be sent to a decoding device over a network.

[0118] At the same time, as described above, the encoding device can generate a reconstructed picture (including a reconstructed sample and a reconstructed block) based on the reference sample and the residual sample. To derive the same prediction result as that performed in the decoding device in the encoding device, the coding efficiency can be improved. Therefore, the encoding device can store the reconstructed picture (or reconstructed sample, reconstructed block) in a memory and use it as a reference picture for inter-frame prediction. As described above, a loop filtering process, etc. can be further applied to the reconstructed picture.

[0119] For example, the video / image decoding process based on inter-frame prediction may generally include the following.

[0120] Figure 5 An example of a video / image decoding method based on inter-frame prediction to which an embodiment of the present disclosure can be applied is shown.

[0121] refer to Figure 5 The decoding device may perform operations corresponding to the operations performed in the encoding device. The decoding device may perform prediction on the current block based on the received prediction information and derive a prediction sample.

[0122] Specifically, the decoding device may determine a prediction mode for the current block based on the received prediction information S500. The decoding device may determine which inter prediction mode is applied to the current block based on prediction mode information in the prediction information.

[0123] For example, whether to apply the merge mode to the current block or whether to determine the (A) MVP mode may be determined based on the merge flag. Alternatively, one of various inter prediction mode candidates may be selected based on the mode index. The inter prediction mode candidate may include a skip mode, a merge mode, and / or an (A) MVP mode, or may include various inter prediction modes described below.

[0124] The decoding device may derive motion information of the current block based on the determined inter prediction mode S510. For example, when the skip mode or merge mode is applied to the current block, the decoding device may configure a merge candidate list described below and select one of 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 current block may be derived by using the motion information of the selected merge candidate. The motion information of the selected merge candidate may be used as the motion information of the current block.

[0125] As another example, when the (A) MVP mode is applied to the current block, the decoding device may configure the (A) MVP candidate list described below, and use the motion vector of the motion vector predictor (MVP) candidate selected from among 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 selection information (MVP flag or MVP index) described above. 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 for the current block may be derived as a reference picture referenced for inter-frame prediction of the current block.

[0126] Meanwhile, as described below, the motion information of the current block may be derived without configuring the candidate list, and in this case, the motion information of the current block may be derived according to the process initiated in the prediction mode described below. In this case, the candidate list configuration as described above may be omitted.

[0127] The decoding device may generate a prediction sample for the current block based on the motion information of the current block S520. In this case, the reference picture may be derived based on the reference picture index of the current block, and the prediction sample of the current block may be derived by using the sample of the reference block indicated by the motion vector of the current block on the reference picture. In this case, as described below, in some cases, a prediction sample filtering process may be further performed on all or part of the prediction samples of the current block.

[0128] For example, the inter-frame predictor of the decoding device may include a prediction mode determination unit, a motion information export unit and a prediction sample export unit. The prediction mode determination unit can determine the prediction mode for the current block based on the received prediction mode information, the motion information export unit can export the motion information (motion vector and / or reference picture index, etc.) of the current block based on the received motion information, and the prediction sample export unit can export the prediction sample of the current block.

[0129] The decoding device generates residual samples for the current block based on the received residual information S530. The decoding device can generate reconstructed samples for the current block based on the prediction samples and the residual samples, and generate a reconstructed picture based thereon S540. As described above, thereafter, an in-loop filtering process or the like can be further applied to the reconstructed picture.

[0130] Figure 6 The inter-frame prediction process to which the embodiments of the present disclosure can be applied is exemplified.

[0131] refer to Figure 6 As described above, the inter-frame prediction process may include determining an inter-frame prediction mode, deriving motion information according to the determined prediction mode, and performing prediction (generating prediction samples) based on the derived motion information. The inter-frame prediction process may be performed in the encoding device and the decoding device as described above. In this document, the encoding device may include an encoding device and / or a decoding device.

[0132] refer to Figure 6, the coding device determines the inter prediction mode for the current block S600. Various inter prediction modes can be used for the prediction of 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, merge with MVD (MMVD) mode, etc. can be used. Decoder-side motion vector refinement (DMVR) mode, adaptive motion vector resolution (AMVR) mode, bidirectional prediction with CU-level weights (BCW), bidirectional optical flow (BDOF), etc. can be used additionally or alternatively as incidental modes. In addition, according to an embodiment of the present disclosure, the above-mentioned inter prediction mode may include a multi-hypothesis prediction (MHP) mode. The multi-hypothesis prediction mode represents a method for performing prediction by weighted summing of prediction blocks generated based on additional motion information for bidirectional prediction (or bi-prediction) blocks. The multi-hypothesis prediction mode will be described in detail later.

[0133] In the present disclosure, the affine mode may be referred to as an affine motion prediction mode. In addition, the MVP mode may be referred to as an advanced motion vector prediction (AMVP) mode. In the present disclosure, some modes and / or motion information candidates derived from some modes may be included as one of the motion information related candidates of another mode. For example, an HMVP candidate may be added as a merge candidate for a merge / skip mode, or may be added as a motion vector predictor candidate for an AMVP mode. When an HMVP candidate is used as a motion information candidate for a merge mode or a skip mode, the HMVP candidate may be referred to as an HMVP merge candidate.

[0134] Prediction mode information indicating an inter prediction mode of a current block may be sent from an encoding device to a decoding device using a signal. The prediction mode information may be included in a bitstream and received in a decoding device. 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.

[0135] In this case, the prediction mode information may include at least one flag. For example, a skip flag may be signaled to indicate whether the skip mode is applied, a merge flag may be signaled to indicate whether the merge mode is applied when the skip mode is not applied, and a flag indicating that the MVP mode is applied or used for additional partitioning may be further signaled when the merge mode is not applied. The affine mode may be signaled as an independent mode, or may be signaled as a mode dependent on the merge mode or the MVP mode, etc. For example, the affine mode may include an affine merge mode and an affine MVP mode.

[0136] The coding device may derive motion information for the current block S610. The motion information may be derived based on an inter prediction mode. The coding device may perform inter prediction by using the motion information of the current block. The coding device may derive optimal motion information for the current block through a motion estimation process.

[0137] For example, the encoding device may use the original block in the original picture for the current block to search for a similar reference block with high correlation in the fractional pixel unit within the determined search range within the reference picture, and derive motion information therefrom. The similarity of the blocks may be derived based on the difference between the sample values ​​based on the phase. For example, the similarity of the blocks may 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 may be derived based on the reference block with the minimum SAD within the search range. The derived motion information may be signaled to the decoding device according to various methods based on the inter-frame prediction mode.

[0138] The coding apparatus may perform inter prediction based on the motion information for the current block S620. The coding apparatus may generate a prediction sample for the current block based on the motion information. The current block including the prediction sample may be referred to as a prediction block.

[0139] Hereinafter, the multi-hypothesis prediction mode is described in detail. As described above, the multi-hypothesis prediction mode represents a prediction method that takes into account an additional prediction block (or predictor) of a bidirectional prediction block. The multi-hypothesis prediction mode can be selectively used as one of the various inter-frame prediction modes mentioned above. Of course, the multi-hypothesis prediction mode according to an embodiment of the present disclosure is not limited to this name. In the present disclosure, the multi-hypothesis prediction mode may also be referred to as an MHP mode, a multi-hypothesis inter-frame prediction mode, an inter-frame combined prediction mode, a combined inter-frame prediction mode, a combined prediction mode, a multi-frame inter-frame prediction mode, a multi-prediction mode, the like.

[0140] Figure 7 An inter-frame prediction method performed by the decoding device 300 according to an embodiment of the present disclosure is illustrated.

[0141] refer to Figure 7 , the decoding device may perform bidirectional prediction to generate a basic prediction block S700. When the MHP mode is applied, the decoding device may generate and combine additional prediction blocks in addition to the prediction blocks generated (or derived) by the bidirectional prediction. As an example, the basic prediction block may include an L0 prediction block and / or an L1 prediction block. In the present disclosure, the basic prediction block may be referred to as an initial prediction block, a temporary prediction block, a reference prediction block, etc. In addition, as an example, the basic prediction block may be a prediction block obtained by weighted summing the L0 and L1 prediction blocks.

[0142] In an embodiment, the weights may be used for weighted summation of L0 and L1 prediction blocks. As weights for weighted prediction, the weights may be collectively referred to as bidirectional prediction with CU-based weights (BCW) or CU-based weights (CW). The weights may be derived from a weight candidate list. The weight candidate list may include multiple weight candidates and may be predefined in an encoding / decoding device.

[0143] The weight candidate may be a set of weights (i.e., a first weight and a second weight) indicating a weight applied to each bidirectional prediction block, or may be a weight applied to a prediction block in either direction. When only a weight applied to a prediction block in any one direction is derived from the weight candidate list, a weight applied to a prediction block in the other direction may be derived based on the weight derived from the weight candidate list. For example, the weight applied to a prediction block in the other direction may be derived by subtracting a weight derived from the weight candidate list from a predetermined value.

[0144] In an embodiment, a weight index indicating a weight for weighted prediction of a current block may be derived in a weight candidate list. In the present disclosure, a weight index may be referred to as bcw_idx, bcw index. The weight index may be derived by a decoding device, or may be signaled from an encoding device. When derived by a decoding device, the weight index may be derived as a weight index for a specific merge candidate in a merge candidate list. As an example, a specific merge candidate may be specified by a merge index in a merge candidate list.

[0145] The decoding apparatus may generate an additional prediction block based on the MHP mode S710. The decoding apparatus may generate an additional prediction block in addition to the basic prediction block, and combine (or weighted sum) the basic prediction block and the generated additional prediction block.

[0146] As an embodiment, when the MHP mode is applied, the decoding device may generate and combine up to a predefined number of additional prediction blocks. In other words, the decoding device may combine (or weighted sum) additional prediction blocks less than or equal to the predefined number to the basic prediction block. As an example, the predefined number may be 2. Alternatively, as an example, the predefined number may be one of 1, 2, 3, and 4. The predefined number may be referred to as the maximum number of MHP.

[0147] In addition, when a plurality of additional prediction blocks are combined, the plurality of additional prediction blocks may be weighted and summed sequentially into a basic prediction block. For example, when up to 2 additional prediction blocks are generated, the basic prediction block and the first additional prediction block may be weighted and summed to generate a prediction block, and the generated prediction block and the second additional prediction block may be weighted and summed to generate a final prediction block. The prediction block generated by weighted summing the basic prediction block and the first additional prediction block may be referred to as an intermediate prediction block.

[0148] Alternatively, when combining multiple additional prediction blocks, the basic prediction block and the multiple generated additional prediction blocks may be weighted summed at once. In other words, after generating the multiple additional prediction blocks, weights may be applied to each of the multiple additional prediction blocks and the basic prediction block (or the L0 prediction block and the L1 prediction block) and weighted summed at once.

[0149] In addition, as an embodiment, the decoding device may determine whether to apply MHP. In this case, a step of determining whether to apply MHP may be added before S710. As an example, whether to apply MHP may be explicitly signaled or may be implicitly derived by the decoding device.

[0150] In addition, as an embodiment, whether to apply MHP can be sent from the encoding device to the decoding device by signaling. For example, an MHP flag indicating whether to apply MHP can be sent from the encoding device to the decoding device by signaling. In this case, the conditions for signaling / parsing the MHP flag can be defined in advance. The signaling / parsing conditions of the MHP flag can be the availability conditions of the MHP. When the signaling / parsing conditions are met, the decoding device can parse the MHP flag from the bitstream. Alternatively, as an embodiment, whether to apply MHP can be derived by the decoding device based on predefined encoding information. As an example, whether to apply MHP can be defined in the same manner as the MHP availability condition (or signaling / parsing condition) described below.

[0151] In addition, as an embodiment, the decoding device may obtain MHP information (or may be referred to as MHP prediction information) to generate an additional prediction block. As an example, the MHP information may include weight information and / or prediction information. A reference block according to the MHP mode, that is, an additional prediction block, may be derived based on the prediction information, and the additional prediction block derived based on the weight information may be weighted and summed with the basic prediction block (or intermediate prediction block). In addition, as an example, the MHP information may further include an MHP flag indicating whether MHP is applied.

[0152] As an example, the prediction information may include mode information used to derive the additional prediction block and motion information according to the mode. The mode information may be inter-prediction mode information indicating whether it is a merge mode or an AMVP mode. For example, the mode information may be a merge flag. In other words, the additional prediction block may be derived using the merge mode or the AMVP mode, and a flag syntax element indicating it may be signaled. Alternatively, the additional prediction block may be derived using a predefined mode among the merge mode or the AMVP mode. Alternatively, the merge mode or the AMVP mode may be selected based on predefined encoding information.

[0153] As an example, when the merge mode is used to derive the additional prediction block, the prediction information may include a merge index. The merge index may specify a merge candidate in the merge candidate list. When the AMVP mode is used to derive the additional prediction block, the prediction information may include a motion vector predictor flag, a reference index, and motion vector difference information. The motion vector predictor flag may specify a candidate in the motion vector predictor candidate list.

[0154] The decoding device may generate a final prediction block by weighted summing the basic prediction block and the additional prediction block S720. As described above, the number of additional prediction blocks may be less than or equal to the predefined number. For example, when the number of additional prediction blocks is 2, the final prediction block may be a block in which the basic prediction block and the two additional prediction blocks are weighted summed.

[0155] As described above, when a plurality of additional prediction blocks are combined, the plurality of additional prediction blocks may be weighted-added sequentially to form a basic prediction block, or the basic prediction block and the plurality of generated additional prediction blocks may be weighted-added at one time.

[0156] Figure 8 is a flowchart illustrating an example of a syntax parsing sequence according to an embodiment of the present disclosure.

[0157] refer to Figure 8 , the decoding device may obtain (or parse) the weight index S800. As information (or syntax element) showing weight information for weighted summation of bidirectional prediction blocks, the weight index may be a bcw index, bcw_idx. The decoding device may generate a basic prediction block by weighted summation of L0 and L1 reference blocks based on the weight index. The weight index may be the same as above. Figure 7 and the related overlapping descriptions are omitted.

[0158] The decoding device may obtain MHP information S810. The decoding device may generate an additional prediction block based on the obtained MHP information. The MHP information may be Figure 7 and the related overlapping descriptions are omitted.

[0159] The decoding device may obtain basic prediction information S820. The decoding device may generate a basic prediction block based on the obtained basic prediction information. The decoding device may specify L0 and L1 reference blocks based on the obtained basic prediction information, and may generate a basic prediction block by weighted summing the L0 and L1 reference blocks based on the weight index. The basic prediction information may include a motion vector predictor flag, a reference index, and motion vector difference information. The basic prediction information may be the same as the above Figures 4 to 7 The same as described in , and the related repeated description is omitted.

[0160] The decoding device may obtain adaptive motion vector resolution (AMVR) information S830. In the present disclosure, AMVR may also be referred to as integer motion vector (IMV). The motion vector derived based on the prediction information obtained in S820 may be transformed by a shift operation based on a variable predetermined for adaptive motion vector resolution (hereinafter referred to as AmvrShift). The motion vector may be derived based on the transformed motion vector and the sum of the motion vector difference.

[0161] The variable AmvrShift may be determined based on at least one of a flag regarding adaptive motion vector resolution (hereinafter referred to as an AMVR flag) or an index regarding adaptive motion vector resolution (hereinafter referred to as an AMVR index). The AMVR information may include an AMVR flag and / or an AMVR index. Here, the AMVR flag may indicate whether the adaptive motion vector resolution is applied to the current block. Alternatively, the AMVR flag may be defined as indicating whether the motion vector difference of the current block has a predefined default resolution (e.g., 1 / 4 sample unit). The AMVR index may indicate any one of a plurality of motion vector resolution candidates that are equally predefined in the encoding device and the decoding device. The plurality of motion vector resolution candidates may include at least two of a 1 / 16 sample unit, a 1 / 8 sample unit, a 1 / 4 sample unit, a 1 / 2 sample unit, a 1 sample unit, or a 4 sample unit. The maximum number of motion vector resolution candidates that may be used by the current block may be 3, 4, 5, or 6. The AMVR flag and the AMVR index may be acquired for the first direction.

[0162] As an example, the variable AmvrShift may be determined as shown in Table 1 below.

[0163]

Table 1

[0164] amvr_flag amvr_precision_idx AmvrShift 0 - 2 (1 / 4 sample unit) 1 0 3 (1 / 2 sample unit) 1 1 4 (1 sample unit) 1 2 6 (4 sample units)

[0165] In Table 1, amvr_flag corresponds to the above flag regarding adaptive motion vector resolution, and may indicate whether adaptive motion vector resolution is applied to the current block. amvr_precision_idx corresponds to the above index regarding adaptive motion vector resolution, and may indicate any one of a plurality of predefined motion vector resolution candidates.

[0166] According to Table 1, when amvr_flag is 0, adaptive motion vector resolution is not applied to the current block, and the variable AmvrShift is determined to be 2. This may mean that the calibrated first motion vector and motion vector difference of the current block are transformed to have a default resolution (ie, 1 / 4 sample unit resolution).

[0167] Meanwhile, adaptive motion vector resolution may be applied to the current block when amvr_flag is 1. In this case, the variable AmvrShift may be determined to be 3, 4, or 6 based on amvr_precision_idx.

[0168] In other words, when amvr_precision_idx is 0, the variable AmvrShift may be determined as 3, and the calibrated first motion vector and motion vector difference of the current block may be transformed to have a resolution in 1 / 2 sample units. The calibrated first motion vector and motion vector difference of the current block may be bit-shifted to the left by 3, respectively obtaining the first motion vector and motion vector difference having a resolution in 1 / 2 sample units. Similarly, when amvr_precision_idx is 1, the variable AmvrShift may be determined as 4, and the calibrated first motion vector and motion vector difference of the current block may be transformed to have a resolution in 1 sample unit. The calibrated first motion vector and motion vector difference of the current block may be bit-shifted to the left by 4, respectively obtaining the first motion vector and motion vector difference having a resolution in 1 sample unit. When amvr_precision_idx is 2, the variable AmvrShift may be determined as 6, and the calibrated first motion vector and motion vector difference of the current block may be transformed to have a resolution in 4 sample units. The calibrated first motion vector and motion vector difference of the current block may be bit-shifted to the left by 6 to obtain a first motion vector and a motion vector difference having a resolution in units of 4 samples, respectively.

[0169] At least one of the AMVR flag or the AMVR index may be signaled through the bitstream only when a predetermined condition is met. Here, the predetermined condition may include at least one of the following conditions.

[0170] An AMVR flag and / or an AMVR index may be signaled via a bitstream based on a first flag indicating whether adaptive motion vector resolution is allowed for an image unit to which a current block belongs. An image unit may refer to at least one of a sequence, a picture, or a slice. The first flag may be signaled in at least one of a sequence parameter set, a picture parameter set, a picture header, or a slice header of a bitstream.

[0171] As an example, when the first flag is a first value, the AMVR flag and / or the AMVR index may be signaled through the bitstream, and when the first flag is a second value, the AMVR flag and / or the AMVR index may not be signaled through the bitstream.

[0172] The decoding device may obtain a motion vector sign derivation (MVSD) index S840. According to an embodiment of the present disclosure, instead of separately signaling the sign information of the horizontal direction (x-axis) and the vertical direction (y-axis) of the motion vector difference of each L0 and L1 for the motion vector difference information of the inter-frame prediction, the sign of the motion vector difference of each L0 and L1 may be signaled by using an index. MVSD means a method for signaling the sign of the motion vector difference of each L0, L1 by using an index, and the MVSD index means an index used here.

[0173] As an embodiment, the MVSD index may indicate one of the x,y symbol combinations of (+, +), (+, -), (-, +), (-, -). In addition, as an example, the x,y symbol combinations of (+, +), (+, -), (-, +), (-, -) may be sorted (or re-sorted) based on template matching. In this case, the costs may be compared based on template matching and sorted in ascending order. The MVSD index may represent a specific candidate within the ordered symbol combination candidate group.

[0174] According to an embodiment of the present disclosure, by considering the trade-off between performance and complexity, the above MHP mode may not be applied when at least one condition in the following Table 2 is met. In other words, the MHP unavailable condition as shown in the following Table 2 may be defined.

[0175]

Table 2

[0176]

[0177] The MHP mode may not be applied when one or more conditions defined in Table 2 are met. The MHP mode may not be available when one or more conditions defined in Table 2 are met and in this case, the MHP flag and the MHP information indicating whether the MHP mode is applied may not be parsed.

[0178] Can be followed with Figure 8 The MHP information is parsed from the bitstream in the same order as shown in (ie, S810). However, when the MHP unavailable condition is defined as in Table 2 above, the MHP information may have parsing dependency according to the corresponding condition.

[0179] Specifically, when the merge flag value is not 1, the affine mode is applied and the imv value is not 0 (i.e., when the AMVR flag value is not 0), the MHP mode may not be available and may not be parsed from the bitstream. In other words, as in Table 2, when the AMVR information is defined as the MHP information parsing condition, although the AMVR information is obtained in S830 after S810, there is a problem that the parsing dependency occurs because the AMVR information is confirmed as the MHP information parsing condition in step S810 before S830 to parse the MHP information.

[0180] Therefore, to solve this problem, consider Figure 8 The MHP information parsing condition may be redefined by changing the order of inter-frame prediction related syntax parsing in S810. As an embodiment, in order to parse the MHP information, the syntax information obtained in the steps after S810 may not be regarded as the MHP information parsing condition. For example, the MHP information may be parsed without considering the AMVR information. As an example, the MHP unavailable condition as shown in Table 3 below may be defined.

[0181]

Table 3

[0182]

[0183] Referring to Table 3, the condition when the merge flag value is not 1, the affine mode is applied, and the imv value is not 0 (ie, when the AMVR flag value is not 0) may not be considered. Even when the merge flag value is not 1, the affine mode is applied, and the imv value is not 0 (ie, when the AMVR flag value is not 0), the MHP information may be parsed.

[0184] In addition, as an embodiment, MVSD may not be applied when MHP is applied, and MVSD may be applied when MHP is not applied. In this case, as shown in Table 4 below, MHP information may be referred to in the process of parsing MVD and MVD symbol index.

[0185]

Table 4

[0186]

[0187] Referring to Table 4, when MHP is not available and MVSD is available, MVSD can be used. In this case, there is a problem of dependency between MHP and MVSD. Therefore, in order to eliminate the dependency between MHP and MVSD, it can be determined whether to apply by considering whether MVD and MVSD are available regardless of MHP, as shown in the following Table 5.

[0188]

Table 5

[0189]

[0190] Referring to Table 5, whether the MHP can be used to parse the MVSD index or the MVD symbol can be ignored. It can improve the parsing dependency and increase the compression efficiency. Specifically, the freedom of the parsing order of the MHP information can be improved by eliminating the parsing dependency between the MHP and the MVSD, and the compression efficiency can be improved according to the transformation of the parsing order of the AMVR information, the MVSD index, and the MHP prediction information described below. In addition, according to an embodiment of the present disclosure, the parsing order can be changed to solve the parsing dependency. As described above, the parsing dependency may be a problem between the MHP information and the AMVR information. In addition, the parsing dependency may be a problem because the symbol of the MVD is parsed when the MHP information does not exist. In order to solve this problem, a method for changing the parsing order is described.

[0191] In an embodiment, the decoding device may first obtain (or parse) the weight index. Thereafter, the decoding device may obtain the basic prediction information. Furthermore, the decoding device may obtain the AMVR information. Furthermore, the decoding device may obtain the MVSD index. Thereafter, the decoding device may obtain the MHP information. In other words, in this embodiment, the above Figure 8 The parsing order in may be changed to the order of S800, S820, S830, S840, S810. According to this embodiment, the above-mentioned parsing dependency may be improved by obtaining AMVR information before parsing MHP information.

[0192] In addition, in the embodiment, the decoding device may first obtain the weight index. Then, the decoding device may obtain the basic prediction information. Also, the decoding device may obtain the MVSD index. Also, the decoding device may obtain the AMVR information. Then, the decoding device may obtain the MHP information. In other words, in this embodiment, the above Figure 8 The parsing order in can be changed to the order of S800, S820, S840, S830, S810. According to this embodiment, the above-mentioned parsing dependency can be improved by obtaining AMVR information before parsing MHP information.

[0193] In addition, in the embodiment, the decoding device may first obtain basic prediction information. And, the decoding device may obtain AMVR information. And, the decoding device may obtain MVSD index. Then, the decoding device may obtain weight index. Then, the decoding device may obtain MHP information. In other words, in this embodiment, the above Figure 8 The parsing order in can be changed to the order of S820, S830, S840, S800, S810. According to this embodiment, the above-mentioned parsing dependency can be improved by obtaining AMVR information before parsing MHP information.

[0194] In addition, in the embodiment, the decoding device may first obtain basic prediction information. And, the decoding device may obtain MVSD index. And, the decoding device may obtain AMVR information. Then, the decoding device may obtain weight index. Then, the decoding device may obtain MHP information. In other words, in this embodiment, the above Figure 8 The parsing order in becomes the order of S820, S840, S830, S800, S810. According to this embodiment, the above-mentioned parsing dependency can be improved by obtaining AMVR information before parsing MHP information.

[0195] As described above, in order to solve the above-mentioned parsing dependency, the parsing order of the MHP information can be changed to be after the AMVR information is parsed. In addition, as described above, when parsing the MVD and MVSD that reference the MHP information, they can be changed to not reference the MHP information. In addition, as in Tables 2 and 3 above, when the MHP information is parsed only when the BCW index is not the default value, the MHP information can be parsed after the BCW index is parsed, but the order can be the same as the above-mentioned embodiment.

[0196] Fig. 9 A rough configuration of the inter-frame predictor 332 that performs the inter-frame prediction method according to the present disclosure is shown.

[0197] refer to Fig. 9 , the inter-frame predictor 332 may include a basic prediction block generation unit 900 , an additional prediction block generation unit 910 , and a final prediction block generation unit 920 .

[0198] The basic prediction block generation unit 900 may perform bidirectional prediction to generate a basic prediction block. When the MHP mode is applied, the basic prediction block generation unit 900 may generate and combine additional prediction blocks in addition to the prediction blocks generated (or derived) by the bidirectional prediction. As an example, the basic prediction block may include an L0 prediction block and / or an L1 prediction block. In the present disclosure, the basic prediction block may be referred to as an initial prediction block, a temporary prediction block, a reference prediction block, etc. In addition, as an example, the basic prediction block may be a prediction block obtained by weighted summing the L0 and L1 prediction blocks.

[0199] In an embodiment, the weights may be used for weighted summation of L0 and L1 prediction blocks. As weights for weighted prediction, the weights may be collectively referred to as bidirectional prediction with CU-based weights (BCW) or CU-based weights (CW). The weights may be derived from a weight candidate list. The weight candidate list may include multiple weight candidates and may be predefined in an encoding / decoding device.

[0200] The weight candidate may be a set of weights (i.e., a first weight and a second weight) that indicates a weight applied to each bidirectional prediction block or may be a weight applied to a prediction block in either direction. When only a weight applied to a prediction block in either direction is derived from the weight candidate list, a weight applied to a prediction block in the other direction may be derived based on the weight derived from the weight candidate list. For example, the weight applied to a prediction block in the other direction may be derived by subtracting the weight derived from the weight candidate list from a predetermined value.

[0201] In an embodiment, a weight index indicating a weight for weighted prediction of a current block may be derived in a weight candidate list. In the present disclosure, the weight index may be referred to as bcw_idx, bcw index. The weight index may be derived by a decoding device, or may be signaled from an encoding device. When derived by a decoding device, the weight index may be derived as a weight index for a specific merge candidate in a merge candidate list. As an example, a specific merge candidate may be specified by a merge index in a merge candidate list.

[0202] The additional prediction block generation unit 910 may generate an additional prediction block based on the MHP mode. The additional prediction block generation unit 910 may generate an additional prediction block in addition to the basic prediction block, and combine (or weighted sum) the basic prediction block and the generated additional prediction block.

[0203] As an embodiment, when the MHP mode is applied, the additional prediction block generation unit 910 may generate up to a predefined number of additional prediction blocks. In other words, the additional prediction block generation unit 910 may combine (or weighted sum) additional prediction blocks less than or equal to the predefined number to the basic prediction block. As an example, the predefined number may be 2. Alternatively, as an example, the predefined number may be one of 1, 2, 3, and 4. The predefined number may be referred to as the maximum number of the MHP.

[0204] In addition, when a plurality of additional prediction blocks are combined, the plurality of additional prediction blocks may be weighted-added to the basic prediction block in sequence. For example, when up to 2 additional prediction blocks are generated, the basic prediction block and the first additional prediction block may be weighted-added to generate a prediction block, and the generated prediction block and the second additional prediction block may be weighted-added to generate a final prediction block. The prediction block generated by weighted-adding the basic prediction block and the first additional prediction block may be referred to as an intermediate prediction block.

[0205] Alternatively, when combining multiple additional prediction blocks, the basic prediction block and the multiple generated additional prediction blocks may be weighted and summed at once. In other words, after generating the multiple additional prediction blocks, weights may be applied to each of the multiple additional prediction blocks and the basic prediction block (or the L0 prediction block and the L1 prediction block) and weighted and summed at once.

[0206] In addition, as an embodiment, the additional prediction block generation unit 910 may determine whether to apply MHP. As an example, whether to apply MHP may be explicitly signaled, or may be implicitly derived by the decoding device.

[0207] In addition, as an embodiment, whether MHP is applied may be signaled from the encoding device to the decoding device. For example, an MHP flag indicating whether MHP is applied may be signaled from the encoding device to the decoding device. In this case, conditions for signaling / parsing the MHP flag may be defined in advance. The signaling / parsing condition of the MHP flag may be an availability condition of the MHP. When the signaling / parsing condition is met, the decoding device may parse the MHP flag from the bitstream. Alternatively, as an embodiment, whether MHP is applied may be derived by the decoding device based on predefined encoding information. As an example, whether MHP is applied may be defined in the same manner as the MHP availability condition (or signaling / parsing condition) described below.

[0208] In addition, as an embodiment, the additional prediction block generation unit 910 may obtain MHP information (or may be referred to as MHP prediction information) to generate an additional prediction block. As an example, the MHP information may include weight information and / or prediction information. A reference block according to the MHP mode, that is, an additional prediction block, may be derived based on the prediction information, and the additional prediction block derived based on the weight information may be weighted summed with the basic prediction block (or intermediate prediction block). In addition, as an example, the MHP information may further include an MHP flag indicating whether MHP is applied.

[0209] As an example, the prediction information may include mode information for deriving an additional prediction block and motion information according to the mode. The mode information may be inter-prediction mode information indicating whether it is a merge mode or an AMVP mode. For example, the mode information may be a merge flag. In other words, the additional prediction block may be derived using the merge mode or the AMVP mode, and a flag syntax element indicating it may be signaled. Alternatively, the additional prediction block may be derived using a predefined mode among the merge mode or the AMVP mode. Alternatively, the merge mode or the AMVP mode may be selected based on predefined encoding information.

[0210] As an example, when the merge mode is used to derive the additional prediction block, the prediction information may include a merge index. The merge index may specify a merge candidate in the merge candidate list. When the AMVP mode is used to derive the additional prediction block, the prediction information may include a motion vector predictor flag, a reference index, and motion vector difference information. The motion vector predictor flag may specify a candidate in the motion vector predictor candidate list.

[0211] The final prediction block generation unit 920 may generate a final prediction block by weighted summing the basic prediction block and the additional prediction block. As described above, the number of additional prediction blocks may be less than or equal to the predefined number. For example, when the number of additional prediction blocks is 2, the final prediction block may be a block in which the basic prediction block and the two additional prediction blocks are weighted summed.

[0212] As described above, when a plurality of additional prediction blocks are combined, the plurality of additional prediction blocks may be weighted-added to the basic prediction block in sequence, or the basic prediction block and the plurality of generated additional prediction blocks may be weighted-added at once.

[0213] Meanwhile, as an embodiment, the syntax parsing order associated with various inter-frame prediction modes including the MHP mode may be defined or changed. In this case, the following may be applied: Figure 8 The method described in , and repeated description is omitted here.

[0214] In addition, as an example, consider Figure 8 The inter-frame prediction related syntax parsing order in can redefine the MHP information parsing conditions. For example, the MHP information can be parsed without considering the AMVR information. In this case, the Figure 8 , the methods described in Table 2 and Table 3, and the repeated description is omitted here.

[0215] In addition, as an embodiment, whether to apply can be determined by considering whether MVD and MVSD are available regardless of MHP. In this case, it can be applied Figure 8 , the methods described in Table 4 and Table 5, and the repeated description is omitted here.

[0216] Additionally, as an example, parsing dependency can be a problem between MHP information and AMVR information as described above. Additionally, parsing dependency can be a problem because the symbols of the MVD are parsed when the MHP information is not present. To address this issue, the parsing order can be changed in various ways. In this case, the Figure 8 The method described in , and repeated description is omitted here.

[0217] Fig.10 An inter-frame prediction method performed by the encoding apparatus 200 as an embodiment according to the present disclosure is shown.

[0218] refer to Fig.10 , the encoding device may perform bidirectional prediction to generate a basic prediction block S1000. When the MHP mode is applied, the encoding device may generate and combine additional prediction blocks in addition to the prediction blocks generated (or derived) by the bidirectional prediction. As an example, the basic prediction block may include an L0 prediction block and / or an L1 prediction block. In the present disclosure, the basic prediction block may be referred to as an initial prediction block, a temporary prediction block, a reference prediction block, etc. In addition, as an example, the basic prediction block may be a prediction block obtained by weighted summing the L0 and L1 prediction blocks.

[0219] In an embodiment, the weights may be used for weighted summation of L0 and L1 prediction blocks. As weights for weighted prediction, the weights may be collectively referred to as bidirectional prediction with CU-based weights (BCW) or CU-based weights (CW). The weights may be derived from a weight candidate list. The weight candidate list may include multiple weight candidates and may be predefined in an encoding / decoding device.

[0220] The weight candidate may be a set of weights (i.e., a first weight and a second weight) indicating a weight applied to each bidirectional prediction block, or may be a weight applied to a prediction block in either direction. When only a weight applied to a prediction block in any one direction is derived from the weight candidate list, a weight applied to a prediction block in the other direction may be derived based on the weight derived from the weight candidate list. For example, the weight applied to a prediction block in the other direction may be derived by subtracting a weight derived from the weight candidate list from a predetermined value.

[0221] In an embodiment, a weight index indicating a weight for weighted prediction of a current block may be derived in a weight candidate list. In the present disclosure, a weight index may be referred to as bcw_idx, bcw index. The weight index may be derived by a decoding device, or may be signaled from an encoding device. When derived by a decoding device, the weight index may be derived as a weight index for a specific merge candidate in a merge candidate list. As an example, a specific merge candidate may be specified by a merge index in a merge candidate list.

[0222] The encoding apparatus may generate an additional prediction block based on the MHP mode S1010. The encoding apparatus may generate an additional prediction block in addition to the basic prediction block, and combine (or weighted sum) the basic prediction block and the generated additional prediction block.

[0223] As an embodiment, when the MHP mode is applied, the encoding device may generate up to a predefined number of additional prediction blocks. In other words, the encoding device may combine (or weighted sum) additional prediction blocks less than or equal to the predefined number to the basic prediction block. As an example, the predefined number may be 2. Alternatively, as an example, the predefined number may be one of 1, 2, 3, and 4. The predefined number may be referred to as the maximum number of MHP.

[0224] In addition, when a plurality of additional prediction blocks are combined, the plurality of additional prediction blocks may be weighted-added to the basic prediction block in sequence. For example, when up to 2 additional prediction blocks are generated, the basic prediction block and the first additional prediction block may be weighted-added to generate a prediction block, and the generated prediction block and the second additional prediction block may be weighted-added to generate a final prediction block. The prediction block generated by weighted-adding the basic prediction block and the first additional prediction block may be referred to as an intermediate prediction block.

[0225] Alternatively, when a plurality of additional prediction blocks are combined, the basic prediction block and the plurality of generated additional prediction blocks may be weighted-summed at once. In other words, after the plurality of additional prediction blocks are generated, weights may be applied to each of the plurality of additional prediction blocks and the basic prediction block (or the L0 prediction block and the L1 prediction block) and weighted-summed at once.

[0226] In addition, as an embodiment, the encoding device may determine whether to apply MHP. In this case, a step of determining whether to apply MHP may be added before S1010. As an example, whether to apply MHP may be explicitly signaled or may be implicitly derived by the decoding device.

[0227] In addition, as an embodiment, whether MHP is applied may be signaled from the encoding device to the decoding device. For example, an MHP flag indicating whether MHP is applied may be signaled from the encoding device to the decoding device. In this case, conditions for signaling / parsing the MHP flag may be defined in advance. The signaling / parsing conditions of the MHP flag may be availability conditions of the MHP. When the signaling / parsing conditions are met, the encoding device may signal the MHP flag from the bitstream. Alternatively, as an embodiment, whether MHP is applied may be derived by the decoding device based on predefined encoding information. As an example, whether MHP is applied may be defined in the same manner as the MHP availability condition (or signaling / parsing condition) described below.

[0228] In addition, as an embodiment, the encoding device may obtain MHP information (or may be referred to as MHP prediction information) to generate an additional prediction block. As an example, the MHP information may include weight information and / or prediction information. A reference block according to the MHP mode, that is, an additional prediction block, may be derived based on the prediction information, and the additional prediction block derived based on the weight information may be weighted summed with the basic prediction block (or intermediate prediction block). In addition, as an example, the MHP information may further include an MHP flag indicating whether MHP is applied.

[0229] As an example, the prediction information may include mode information for deriving an additional prediction block and motion information according to the mode. The mode information may be inter-prediction mode information indicating whether it is a merge mode or an AMVP mode. For example, the mode information may be a merge flag. In other words, the additional prediction block may be derived using the merge mode or the AMVP mode, and a flag syntax element indicating it may be signaled. Alternatively, the additional prediction block may be derived using a predefined mode among the merge mode or the AMVP mode. Alternatively, the merge mode or the AMVP mode may be selected based on predefined encoding information.

[0230] As an example, when the merge mode is used to derive the additional prediction block, the prediction information may include a merge index. The merge index may specify a merge candidate in the merge candidate list. When the AMVP mode is used to derive the additional prediction block, the prediction information may include a motion vector predictor flag, a reference index, and motion vector difference information. The motion vector predictor flag may specify a candidate in the motion vector predictor candidate list.

[0231] The encoding device may generate a final prediction block by weighted summing the basic prediction block and the additional prediction block. As described above, the number of additional prediction blocks may be less than or equal to the predefined number. For example, when the number of additional prediction blocks is 2, the final prediction block may be a block in which the basic prediction block and the two additional prediction blocks are weighted summed.

[0232] As described above, when a plurality of additional prediction blocks are combined, the plurality of additional prediction blocks may be weighted-added to the basic prediction block in sequence, or the basic prediction block and the plurality of generated additional prediction blocks may be weighted-added at once.

[0233] Meanwhile, as an embodiment, the syntax parsing order associated with various inter-frame prediction modes including the MHP mode may be defined or changed. In this case, the following may be applied: Figure 8 The method described in , and repeated description is omitted here.

[0234] In addition, as an example, consider Figure 8The inter-frame prediction related syntax parsing order in can redefine the MHP information parsing conditions. For example, the MHP information can be parsed without considering the AMVR information. In this case, the Figure 8 , the methods described in Table 2 and Table 3, and the repeated description is omitted here.

[0235] In addition, as an embodiment, whether to apply can be determined by considering whether MVD and MVSD are available regardless of MHP. In this case, it can be applied Figure 8 , the methods described in Table 4 and Table 5, and the repeated description is omitted here.

[0236] Additionally, as an example, parsing dependency can be a problem between MHP information and AMVR information as described above. Additionally, parsing dependency can be a problem because the symbols of the MVD are parsed when the MHP information is not present. To address this problem, the parsing order can be changed in various ways. In this case, the Figure 8 The method described in , and repeated description is omitted here.

[0237] Fig.11 A rough configuration of the inter-frame predictor 221 performing the inter-frame prediction method according to the present disclosure is shown.

[0238] refer to Fig.11 , the inter-frame predictor 221 may include a basic prediction block generation unit 1100 , an additional prediction block generation unit 1110 , and a final prediction block generation unit 1120 .

[0239] The basic prediction block generation unit 1100 may perform bidirectional prediction to generate a basic prediction block. When the MHP mode is applied, the basic prediction block generation unit 1100 may generate and combine additional prediction blocks in addition to the prediction blocks generated (or derived) by the bidirectional prediction. As an example, the basic prediction block may include an L0 prediction block and / or an L1 prediction block. In the present disclosure, the basic prediction block may be referred to as an initial prediction block, a temporary prediction block, a reference prediction block, etc. In addition, as an example, the basic prediction block may be a prediction block obtained by weighted summing the L0 and L1 prediction blocks.

[0240] In an embodiment, the weight may be used for the weighted sum of the L0 and L1 prediction blocks. As weights for weighted prediction, the weights may be collectively referred to as bidirectional prediction with CU-based weights (BCW) or CU-based weights (CW). The weights may be derived from a weight candidate list. The weight candidate list may include multiple weight candidates and may be predefined in an encoding / decoding device.

[0241] The weight candidate may be a set of weights (i.e., a first weight and a second weight) indicating a weight applied to each bidirectional prediction block, or may be a weight applied to a prediction block in either direction. When only a weight applied to a prediction block in either direction is derived from the weight candidate list, a weight applied to a prediction block in the other direction may be derived based on the weight derived from the weight candidate list. For example, the weight applied to a prediction block in the other direction may be derived by subtracting the weight derived from the weight candidate list from a predetermined value.

[0242] In an embodiment, a weight index indicating a weight for weighted prediction of a current block may be derived in a weight candidate list. In the present disclosure, a weight index may be referred to as bcw_idx, bcw index. The weight index may be derived by a decoding device, or may be signaled from an encoding device. When derived by a decoding device, the weight index may be derived as a weight index for a specific merge candidate in a merge candidate list. As an example, a specific merge candidate may be specified by a merge index in a merge candidate list.

[0243] The additional prediction block generation unit 1110 may generate an additional prediction block based on the MHP mode. The additional prediction block generation unit 1110 may generate an additional prediction block in addition to the basic prediction block, and combine (or weighted sum) the basic prediction block and the generated additional prediction block.

[0244] As an embodiment, when the MHP mode is applied, the additional prediction block generation unit 1110 may generate up to a predefined number of additional prediction blocks. In other words, the additional prediction block generation unit 1110 may combine (or weighted sum) additional prediction blocks less than or equal to the predefined number to the basic prediction block. As an example, the predefined number may be 2. Alternatively, as an example, the predefined number may be one of 1, 2, 3, and 4. The predefined number may be referred to as the maximum number of MHP.

[0245] In addition, when a plurality of additional prediction blocks are combined, the plurality of additional prediction blocks may be weighted-added to the basic prediction block in sequence. For example, when up to 2 additional prediction blocks are generated, the basic prediction block and the first additional prediction block may be weighted-added to generate a prediction block, and the generated prediction block and the second additional prediction block may be weighted-added to generate a final prediction block. The prediction block generated by weighted-adding the basic prediction block and the first additional prediction block may be referred to as an intermediate prediction block.

[0246] Alternatively, when combining multiple additional prediction blocks, the basic prediction block and the multiple generated additional prediction blocks may be weighted summed at once. In other words, after generating the multiple additional prediction blocks, weights may be applied to each of the multiple additional prediction blocks and the basic prediction block (or the L0 prediction block and the L1 prediction block) and weighted summed at once.

[0247] In addition, as an embodiment, the additional prediction block generation unit 910 may determine whether to apply MHP. As an example, whether to apply MHP may be explicitly signaled or may be implicitly derived by the decoding device.

[0248] In addition, as an embodiment, whether to apply MHP can be sent from the encoding device to the decoding device by signal. For example, an MHP flag indicating whether to apply MHP can be sent from the encoding device to the decoding device by signal. In this case, the conditions for signaling / parsing the MHP flag can be defined in advance. The signaling / parsing conditions of the MHP flag can be the availability conditions of the MHP. When the signaling / parsing conditions are met, the decoding device can parse the MHP flag from the bitstream. Alternatively, as an embodiment, whether to apply MHP can be derived by the decoding device based on predefined encoding information. As an example, whether to apply MHP can be defined in the same manner as the MHP availability conditions (or signaling / parsing conditions) described below.

[0249] In addition, as an embodiment, the additional prediction block generation unit 1110 may obtain MHP information (or may be referred to as MHP prediction information) to generate an additional prediction block. As an example, the MHP information may include weight information and / or prediction information. A reference block according to the MHP mode, that is, an additional prediction block, may be derived based on the prediction information, and the additional prediction block derived based on the weight information may be weighted summed with the basic prediction block (or intermediate prediction block). In addition, as an example, the MHP information may further include an MHP flag indicating whether MHP is applied.

[0250] As an example, the prediction information may include mode information for deriving an additional prediction block and motion information according to the mode. The mode information may be inter-prediction mode information indicating whether it is a merge mode or an AMVP mode. For example, the mode information may be a merge flag. In other words, the additional prediction block may be derived using the merge mode or the AMVP mode, and a flag syntax element indicating it may be signaled. Alternatively, the additional prediction block may be derived using a predefined mode among the merge mode or the AMVP mode. Alternatively, the merge mode or the AMVP mode may be selected based on predefined encoding information.

[0251] As an example, when the merge mode is used to derive the additional prediction block, the prediction information may include a merge index. The merge index may specify a merge candidate in the merge candidate list. When the AMVP mode is used to derive the additional prediction block, the prediction information may include a motion vector predictor flag, a reference index, and motion vector difference information. The motion vector predictor flag may specify a candidate in the motion vector predictor candidate list.

[0252] The final prediction block generation unit 1120 may generate a final prediction block by weighted summing the basic prediction block and the additional prediction block. As described above, the number of additional prediction blocks may be less than or equal to the predefined number. For example, when the number of additional prediction blocks is 2, the final prediction block may be a block in which the basic prediction block and the two additional prediction blocks are weighted summed.

[0253] As described above, when a plurality of additional prediction blocks are combined, the plurality of additional prediction blocks may be weighted-added to the basic prediction block in sequence, or the basic prediction block and the plurality of generated additional prediction blocks may be weighted-added at once.

[0254] Meanwhile, as an embodiment, the syntax parsing order associated with various inter-frame prediction modes including the MHP mode may be defined or changed. In this case, the following may be applied: Figure 8 The method described in , and repeated description is omitted here.

[0255] In addition, as an example, consider Figure 8 The inter-frame prediction related syntax parsing order in can redefine the MHP information parsing conditions. For example, the MHP information can be parsed without considering the AMVR information. In this case, the Figure 8 , the methods described in Table 2 and Table 3, and the repeated description is omitted here.

[0256] In addition, as an embodiment, whether to apply can be determined by considering whether MVD and MVSD are available regardless of MHP. In this case, it can be applied Figure 8 , the methods described in Table 4 and Table 5, and the repeated description is omitted here.

[0257] Additionally, as an example, parsing dependency may be an issue between MHP information and AMVR information as described above. Additionally, parsing dependency may be an issue because of parsing the MVD flag when MHP information is not present. To address this issue, the parsing order can be changed in various ways. In this case, the Figure 8 The method described in , and repeated description is omitted here.

[0258] In the above embodiments, the method is described as a series of steps or boxes based on the flowchart, but the corresponding embodiments are not limited to the order of the steps, and some steps may occur simultaneously or in a different order than other steps described above. In addition, those skilled in the art will appreciate that the steps shown in the flowchart are not exclusive, and other steps may be included or one or more steps in the flowchart may be deleted without affecting the scope of the embodiments of the present disclosure.

[0259] The above-mentioned method according to the embodiment of the present disclosure can be implemented in the form of software, and the encoding device and / or decoding device according to the present disclosure can be included in a device that performs image processing, such as a TV, a computer, a smart phone, a set-top box, a display device, etc.

[0260] In the present disclosure, when the embodiment is implemented as software, the above method can be implemented as a module (process, function, etc.) that performs the above functions. The module can be stored in a memory and can be executed by a processor. The memory can be located inside or outside the processor and can be connected to the processor by various well-known means. The processor may include an application-specific integrated circuit (ASIC), another chipset, a logic circuit, and / or a data processing device. The memory may include a read-only memory (ROM), a random access memory (RAM), a flash memory, a memory card, a storage medium, and / or other storage devices. In other words, the embodiments described herein can be implemented on a processor, a microprocessor, a controller, or a chip. For example, the functional unit shown in each of the figures can be implemented on a computer, a processor, a microprocessor, a controller, or a chip. In this case, information (e.g., information about instructions) or an algorithm for implementation can be stored in a digital storage medium.

[0261] In addition, the decoding device and the encoding device of the embodiment of the present disclosure can be included in multimedia broadcast sending and receiving devices, mobile communication terminals, home theater video devices, digital theater video devices, surveillance cameras, video conversation devices, real-time communication devices such as video communication, mobile streaming devices, storage media, cameras, devices for providing video on demand (VoD) services, over-the-top video (OTT) devices, devices for providing Internet streaming services, three-dimensional (3D) video devices, virtual reality (VR) devices, augmented reality (AR) devices, videophone video devices, transportation terminals (e.g., vehicle (including autonomous driving vehicle) terminals, aircraft terminals, ship terminals, etc.) and medical video devices, etc., and can be used to process video signals or data signals. For example, over-the-top video (OTT) devices can include game consoles, Blu-ray players, networked TVs, home theater systems, smart phones, tablet computers, digital video recorders (DVRs), etc.

[0262] In addition, the processing method of the embodiment of the present disclosure can be generated in the form of a program executed by a computer and can be stored in a computer-readable recording medium. Multimedia data having a data structure according to an embodiment of the present disclosure can also be stored in a computer-readable recording medium. Computer-readable recording media include all types of storage devices and distributed storage devices that store computer-readable data. Computer-readable recording media may include, for example, Blu-ray discs (BD), universal serial buses (USB), ROMs, PROMs, EPROMs, EEPROMs, RAMs, CD-ROMs, tapes, floppy disks, and optical media storage devices. In addition, computer-readable recording media include media implemented in the form of carrier waves (e.g., transmitted via the Internet). In addition, the bit stream generated by the encoding method may be stored in a computer-readable recording medium or may be sent via a wired or wireless communication network.

[0263] In addition, the embodiments of the present disclosure may be implemented by a computer program product through a program code, and the program code may be executed on a computer by the embodiments of the present disclosure. The program code may be stored on a computer-readable carrier.

[0264] Fig.12 An example of a content streaming system to which an embodiment of the present disclosure can be applied is shown.

[0265] refer to Fig.12 The content streaming transmission system to which the embodiments of the present disclosure are applied may mainly include an encoding server, a streaming transmission server, a web server, a media storage, a user device, and a multimedia input device.

[0266] The encoding server generates a bitstream by compressing content input from a multimedia input device such as a smartphone, a camera, a camcorder, etc. into digital data and transmits it to the streaming server. As another example, when a multimedia input device such as a smartphone, a camera, a camcorder, etc. directly generates a bitstream, the encoding server may be omitted.

[0267] A bitstream may be generated by applying the encoding method or the bitstream generating method of the embodiment of the present disclosure, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.

[0268] The streaming server sends multimedia data to the user device through the web server based on the user's request, and the web server serves as a medium to inform the user what services are available. When the user requests the required service from the web server, the web server delivers it to the streaming server, and the streaming server sends the multimedia data to the user. In this case, the content streaming system may include a separate control server, and in this case, the control server controls the command / response between each device in the content streaming system.

[0269] The streaming server may receive content from a media storage and / or 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 for a specific period of time.

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

[0271] Each server in the content streaming system may be operated as a distributed server, and in this case, data received from each server may be distributed and processed.

[0272] The claims set forth herein can be combined in various ways. For example, the technical features of the method claims of the present disclosure can be combined and implemented as a device, and the technical features of the device claims of the present disclosure can be combined and implemented as a method. In addition, the technical features of the method claims of the present disclosure and the technical features of the device claims can be combined and implemented as a device, and the technical features of the method claims of the present disclosure and the technical features of the device claims can be combined and implemented as a method.

Claims

1. An image decoding method, the method comprising: performing bidirectional prediction based on the first inter prediction mode to generate a basic prediction block for the current block; generating an additional prediction block for the current block based on a second inter prediction mode; as well as A final prediction block of the current block is generated by weighted summing the basic prediction block and the additional prediction block.

2. The method according to claim 1, wherein: The first inter-frame prediction includes at least one of a merge mode, an AMVP mode, or a merge-AMVP combined mode.

3. The method according to claim 2, wherein: The second inter prediction mode comprises a multi-hypothesis prediction mode.

4. The method according to claim 1, wherein: When a plurality of additional prediction blocks are generated, the final prediction block is generated by sequentially weighting and summing the plurality of additional prediction blocks to the basic prediction block.

5. The method according to claim 1, wherein: The method further includes acquiring information about the second inter prediction mode from a bitstream.

6. The method according to claim 5, wherein: The information about the second inter prediction mode includes at least one of weight information or prediction information, The weight information represents information indicating a weight for a weighted sum of the additional prediction blocks, The prediction information represents information used to derive the additional prediction block.

7. The method according to claim 6, wherein: The prediction information includes a mode flag indicating whether merge mode or AMVP mode is used to derive the additional prediction block.

8. The method according to claim 7, wherein: When the mode flag indicates that the merge mode is used to derive the additional prediction block, the prediction information further includes a merge index, When the mode flag indicates that the AMVP mode is used to derive the additional prediction block, the prediction information includes at least one of a motion vector predictor flag, a reference index, or motion vector difference information.

9. The method according to claim 5, wherein: When a predefined condition is met, obtaining information about the second inter prediction mode from the bitstream, The predefined condition is defined without considering adaptive motion vector resolution (AMVR) information.

10. The method according to claim 5, wherein: The method further comprises obtaining adaptive motion vector resolution (AMVR) information from the bitstream, Acquiring the AMVR information is performed before acquiring information about the second inter prediction mode.

11. The method according to claim 5, wherein: The method further comprises obtaining a motion vector sign derivation (MVSD) index specifying a candidate among a plurality of sign combination candidates from the bitstream, Acquiring the MVSD index is performed before acquiring information about the second inter prediction mode.

12. A method for encoding an image, the method comprising: performing bidirectional prediction based on the first inter prediction mode to generate a basic prediction block for the current block; generating an additional prediction block for the current block based on a second inter prediction mode; as well as A final prediction block of the current block is generated by weighted summing the basic prediction block and the additional prediction block.

13. A computer-readable storage medium storing a bit stream generated by the image encoding method according to claim 12.

14. A method for transmitting data for image information, the method comprising: performing bidirectional prediction based on the first inter prediction mode to generate a basic prediction block for the current block; generating an additional prediction block for the current block based on a second inter prediction mode; as well as Calculating a weighted sum of the basic prediction block and the additional prediction block to generate a final prediction block of the current block; Based on the final prediction block, generating a bitstream by encoding the current block; as well as Data including the bit stream is transmitted.