Method and apparatus for image coding using motion vector
By using the information of motion vector difference in the image/video compilation system for inter-frame prediction, the problem of increased cost of high-resolution image/video data compression and transmission is solved, and efficient image/video compression and transmission is achieved.
Patent Information
- Application Number
- CN202510230545.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-06-14
- Filing Date
- 2020-06-15
- Publication Date
- 2025-05-06
AI Technical Summary
The prior art is difficult to effectively compress and transmit high-resolution, high-quality image/video data, especially in the case of increased transmission and storage costs.
Inter prediction is performed by using the information of motion vector difference in the image/video compilation system, especially when applying double prediction to the current block, effectively deduce and signal the L0 motion vector difference and L1 motion vector difference, and perform the prediction process based on the type of reference picture.
Improves overall image/video compression efficiency, reduces the complexity of the compilation system, and achieves efficient image/video data transmission and storage through effective inter-frame prediction.
Smart Images

Figure CN119946302A_ABST
Abstract
Description
[0001] This application is a divisional application of a patent application with application number 202080049988.4 (PCT / KR2020 / 007716) filed on January 7, 2022, application date on June 15, 2020, and titled “Method and device for image coding using motion vectors”. Technical Field
[0002] This document relates to a method and apparatus for image coding using motion vectors. Background Art
[0003] Recently, there is an increasing demand for high-resolution, high-quality images / videos such as 4K or 8K ultra-high definition (UHD) images / videos in various fields. As the image / video resolution or quality becomes higher, relatively more information or bits are transmitted compared to conventional image / video data. Therefore, if the image / video data is transmitted via a medium such as an existing wired / wireless broadband line or is stored in a conventional storage medium, the cost of transmission and storage is easily increased.
[0004] In addition, there is growing interest and demand for virtual reality (VR) and artificial reality content and immersive media such as holograms; and there is also growing broadcasting of images / videos that exhibit image / video characteristics different from real images / videos (e.g., game images / videos).
[0005] Therefore, highly efficient image / video compression technology is required to effectively compress and transmit, store, or play high-resolution, high-quality images / videos showing various characteristics as described above.
[0006] In addition, inter-frame prediction in image / video coding can include a process for symmetric motion vector difference (SMVD) reference indexing and / or a process for merged motion vector difference (MMVD). Considering reference picture marking (e.g., short-term or long-term reference), there is a discussion of techniques for performing these processes. Summary of the invention
[0007] Technical Solution
[0008] According to an embodiment of the present disclosure, a method and apparatus for improving image / video coding efficiency are provided.
[0009] According to one embodiment of the present disclosure, a method and apparatus for efficiently performing inter-frame prediction in an image / video coding system are provided.
[0010] According to one embodiment of the present disclosure, a method and apparatus for signaling information about a motion vector difference in inter prediction are provided.
[0011] According to one embodiment of the present disclosure, when bi-prediction is applied to a current block, a method and apparatus for signaling information about an L0 motion vector difference and an L1 motion vector difference are provided.
[0012] According to one embodiment of the present disclosure, a method and apparatus for signaling an SMVD flag are provided.
[0013] According to one embodiment of the present disclosure, a prediction process may be performed based on the type of reference picture used for bi-prediction.
[0014] According to one embodiment of the present disclosure, a process for deriving an SMVD reference index may be performed based on a reference picture marker.
[0015] According to one embodiment of the present disclosure, a process for deriving an SMVD reference index may be performed using a short-term reference picture (labeled as a short-term reference).
[0016] According to an embodiment of this document, a video / image decoding method performed by a decoding device is provided.
[0017] According to an embodiment of this document, a decoding device for performing video / image decoding is provided.
[0018] According to an embodiment of this document, a video / image encoding method performed by an encoding device is provided.
[0019] According to an embodiment of this document, an encoding device for performing video / image encoding is provided.
[0020] According to one embodiment of this document, a computer-readable digital storage medium is provided, in which encoded video / image information generated according to the video / image encoding method disclosed in at least one embodiment of this document is stored.
[0021] According to an embodiment of the present document, there is provided a computer-readable digital storage medium in which encoding information or encoded video / image information for enabling a decoding device to perform a video / image decoding method disclosed in at least one embodiment of the present document is stored.
[0022] Beneficial Effects
[0023] According to the present disclosure, the overall image / video compression efficiency can be improved.
[0024] According to the present disclosure, signaling of information about a motion vector difference may be efficiently performed.
[0025] According to the present disclosure, when bi-prediction is applied to a current block, an L1 motion vector difference may be efficiently derived.
[0026] According to the present disclosure, information used to derive an L1 motion vector difference may be signaled based on the type of a reference picture, and thus the complexity of a coding system may be reduced.
[0027] According to one embodiment of the present disclosure, efficient inter-frame prediction may be performed using a short-term reference picture for deriving a reference picture index for SMVD.
[0028] The effects obtained by the specific embodiments of the present disclosure are not limited to those effects described above. For example, various other technical effects that can be understood or derived from the present disclosure by a person skilled in the relevant art can be obtained. Therefore, the specific effects of the present disclosure are not limited to those explicitly disclosed in this document, and may include various other effects that can be understood or derived from the technical features of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 An example of a video / image coding system to which embodiments of this document can be applied is illustrated.
[0030] Figure 2 is a diagram schematically illustrating a configuration of a video / image encoding device to which an embodiment of this document can be applied.
[0031] Figure 3 is a schematic diagram illustrating a configuration of a video / image decoding device to which embodiments of this document can be applied.
[0032] Figure 4 An example of a video / image encoding method based on inter-frame prediction is shown.
[0033] Figure 5 An example of a video / image decoding method based on inter-frame prediction is shown.
[0034] Figure 6 The inter-frame prediction process is exemplarily shown.
[0035] Figure 7 A method for constructing a merge candidate list according to the present disclosure is shown.
[0036] Figure 8 A method for constructing an MVP candidate list according to the present disclosure is shown.
[0037] Fig. 9 A diagram describing the symmetric motion vector difference (SMVD).
[0038] Fig.10 is a diagram for describing a method of deriving a motion vector in inter-frame prediction.
[0039] Fig.11 FIG. 4 illustrates a process of deriving an MVD of an MMVD according to an embodiment of the present disclosure.
[0040] Fig.12 FIG. 4 illustrates a process of deriving an MVD of an MMVD according to another embodiment of the present disclosure.
[0041] Fig.13 FIG. 4 illustrates a process of deriving an MVD of an MMVD according to yet another embodiment of the present disclosure.
[0042] Fig.14 FIG. 4 illustrates a process of deriving an MVD of an MMVD according to an embodiment of the present disclosure.
[0043] Fig.15 FIG. 4 illustrates a process of deriving an MVD of an MMVD according to an embodiment of the present disclosure.
[0044] Fig.16 and 17 An example of a video / image encoding method and related components according to an embodiment of the present disclosure is illustrated.
[0045] Fig.18 and 19 An example of an image / video decoding method and related components according to an embodiment of the present disclosure is illustrated.
[0046] Fig. 20 An example of a content streaming system to which embodiments of this document can be applied is illustrated. DETAILED DESCRIPTION
[0047] This document can be modified in various ways, and its specific embodiments will be described and shown in the accompanying drawings. However, the embodiments are not intended to limit this document. The terms used in the following description are only used to describe specific embodiments and are not intended to limit this document. Singular expressions include plural expressions as long as it is not clearly understood differently. Terms such as "including" or "having" should be understood to indicate the presence of the characteristics, numbers, steps, operations, elements, components, or combinations thereof used in the following description, without excluding the possibility of the presence or addition of one or more different characteristics, numbers, steps, operations, elements, components, or combinations thereof.
[0048] At the same time, in order to facilitate the description of different feature functions, each configuration in the drawings described in this document is shown independently, and it does not mean that each configuration is implemented as separate hardware or separate software. For example, two or more components in each component can be combined to form one component, or one component can be divided into multiple components. Embodiments in which each component is integrated and / or separated are also included in the scope of disclosure of this document.
[0049] Hereinafter, an example of the present embodiment will be described in detail with reference to the accompanying drawings. In addition, in the accompanying drawings, the same reference numerals are used to indicate the same elements, and repeated description of the same elements may be omitted.
[0050] Figure 1 An example of a video / image coding system to which embodiments of this document may be applied is illustrated.
[0051] refer to Figure 1 The video / image coding system may include a first device (source device) and a second device (receiving device). The source device may transmit the encoded video / image information or data to the receiving device in the form of a file or stream via a digital storage medium or a network.
[0052] The source device may include a video source, an encoding device, and a transmitter. The receiving device may include a receiver, 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, and the display may be configured as a separate device or an external component.
[0053] The video source can obtain the video / image by capturing, synthesizing or generating the video / image process. The video source may include a video / image capturing device and / or a video / image generating device. The video / image capturing device may include, for example, one or more cameras, a video / image archive including previously captured videos / images, etc. The video / image generating device may include, for example, a computer, a tablet computer, and a smart phone, and may (electronically) generate the video / image. For example, a virtual video / image may be generated by a computer, etc. In this case, the video / image capturing process may be replaced by a process for generating relevant data.
[0054] The encoding device can encode the input video / image. The encoding device can perform a series of processes such as prediction, transformation and quantization for compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.
[0055] The transmitter may transmit the encoded image / image information or data output in the form of a bit stream to a receiver of a receiving device in the form of a file or stream through a digital storage medium or a network. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter may include an element for generating a media file in a predetermined file format, and may include an element for transmitting through a broadcast / communication network. The receiver may receive / extract a bit stream and transmit the received bit stream to a decoding device.
[0056] The decoding device may decode a video / image by performing a series of processes corresponding to the operations of the encoding device, such as dequantization, inverse transformation, prediction, and the like.
[0057] The renderer can render the decoded video / image, and the rendered video / image can be displayed through a display.
[0058] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document can be applied to methods disclosed in the Versatile Video Coding (VVC), the Essential Video Coding (EVC) standard, the AOMedia Video1 (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.).
[0059] This document proposes various embodiments of video / image coding, and unless mentioned to the contrary, these embodiments may be performed in combination with each other.
[0060] In this document, video may refer to a series of images over time. A picture generally refers to a unit representing an image at a specific time frame, and a slice / tile refers to a unit that constitutes a part of a picture in terms of coding. A slice / tile may include one or more coding tree units (CTUs). A picture may consist of one or more slices / tiles. A picture may consist of one or more tile groups. A tile group may include one or more tiles. A tile may represent a rectangular area of a CTU row within a tile in a picture. A tile may be partitioned into a plurality of tiles, each of which may be constructed using one or more CTU rows within a tile. Tiles that are not partitioned into a plurality of tiles may also be referred to as tiles. Tile scanning may represent a specific ordering of CTUs that partition a picture, wherein CTUs may be sorted in a CTU raster scan within a tile, and tiles within a tile may be sorted continuously with a raster scan of tiles of a tile, and tiles in a picture may be sorted continuously with a raster scan of tiles of a tile. A tile is a rectangular area of a CTU within a specific tile column and a specific tile row within a picture. A tile column is a rectangular area of a CTU having a height equal to the height of the picture and a width specified by a syntax element in the picture parameter set. A tile row is a rectangular area of a CTU having a height specified by a syntax element in the picture parameter set and a width equal to the width of the picture. Tile scanning is a specific order sorting of CTUs that partition a picture, where CTUs are sorted continuously in tiles with a CTU raster scan and tiles in a picture are sorted continuously with a raster scan of tiles of the picture. A slice includes an integer number of tiles of a picture, which can be exclusively included in a single NAL unit. A slice can consist of multiple complete tiles, or only a sequence of continuous complete tiles of a tile. In this document, tile groups and slices can be used instead of each other. For example, in this document, a tile group / tile group header can be referred to as a slice / slice header.
[0061] At the same time, a picture can be divided into two or more sub-pictures. A sub-picture can be a rectangular area of one or more slices within a picture.
[0062] A pixel or a picture element (pel) may refer to the smallest unit constituting a picture (or image). In addition, a "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a value of a pixel, and may represent only a pixel / pixel value of a luminance component or only a pixel / pixel value of a chrominance component.
[0063] A unit may represent a basic unit of image processing. A unit may include at least one of a specific area of a picture and information related to the area. A unit may include a luminance block and two chrominance (e.g., cb, cr) blocks. In some cases, a unit may be used interchangeably with terms such as a block or an area. In general, an M×N block may include M columns and N rows of samples (or sample arrays) or a set (or array) of transform coefficients. Alternatively, a sample may refer to a pixel value in the spatial domain, and when such a pixel value is transformed to the frequency domain, it may refer to a transform coefficient in the frequency domain.
[0064] In this document, "A or B" may mean "only A", "only B", or "both A and B". In other words, in this document, "A or B" may be interpreted as "A and / or B". For example, in this document, "A, B, or C" means "only A", "only B", "only C", or "any combination of A, B, and C".
[0065] A slash “ / ” or a comma (,) used in this document 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”.
[0066] In this document, "at least one of A and B" may mean "only A", "only B", or "both A and B". In addition, in this document, the expression "at least one of A or B" or "at least one of A and / or B" may be interpreted as "at least one of A and B".
[0067] Furthermore, in this document, “at least one of A, B, and C” may mean “only A,” “only B,” “only C,” or “any combination of A, B, and C.” Furthermore, “at least one of A, B, or C” or “at least one of A, B and / or C” may mean “at least one of A, B, and C.”
[0068] In addition, brackets used in this document may mean "for example". Specifically, when "prediction (intra-frame prediction)" is indicated, "intra-frame prediction" may be proposed as an example of "prediction". In other words, "prediction" in this document is not limited to "intra-frame prediction", and "intra-frame prediction" may be proposed as an example of "prediction". In addition, even when "prediction (i.e., intra-frame prediction)" is indicated, "intra-frame prediction" may be proposed as an example of "prediction".
[0069] Technical features described individually in one drawing of this document can be implemented individually or simultaneously.
[0070] Figure 2The structure of a video / image encoding device to which the embodiments of this document can be applied is shown. Hereinafter, the so-called video encoding device may include an image encoding device.
[0071] refer to Figure 2 , the encoding device 200 includes an image segmenter 210, a predictor 220, a residual processor 230 and 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 also include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstructed block generator. According to an embodiment, the 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), or may be configured by a digital storage medium. The hardware component may also include the memory 270 as an internal / external component.
[0072] The image divider 210 may partition the input image (or picture or frame) input to the encoding device 200 into one or more processors. For example, a processor may be referred to as a coding unit (CU). In this case, the coding unit may be recursively partitioned from a coding tree unit (CTU) or a maximum coding unit (LCU) according to a quadtree binary tree ternary tree (QTBTTT) structure. For example, a coding unit may be partitioned into multiple coding units with a deeper depth based on a quadtree structure, a binary tree structure, and / or a ternary structure. In this case, for example, a quadtree structure may be applied first, and a binary tree structure and / or a ternary structure may be applied later. Alternatively, a binary tree structure may be applied first. The coding process according to this document may be performed based on a final coding unit that is no longer partitioned. In this case, the maximum coding unit may be used as the final coding unit based on coding efficiency according to image characteristics, or if necessary, the coding unit may be recursively partitioned into coding units with a deeper depth and a coding unit with an optimal size may be used as the final coding unit. Here, the coding process may include a process of prediction, transformation, and reconstruction (described later). As another example, the processor may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may be split or partitioned from the above-mentioned final coding unit. The prediction unit may be a unit for 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 a transform coefficient.
[0073] In some cases, a unit may be used interchangeably with terms such as a block or region. In general, an M×N block may represent a set of samples or transform coefficients 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 luminance component or only a pixel / pixel value of a chrominance component. A sample may be used as a term corresponding to a picture (or image) of a pixel or a pel.
[0074] In the encoding device 200, a prediction signal (prediction block, prediction sample array) output from the inter predictor 221 or the intra predictor 222 is subtracted from an input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is sent to the transformer 232. In this case, as shown, a unit that subtracts a prediction signal (prediction block, prediction sample array) from an input image signal (original block, original sample array) in the encoding device 200 may be referred to as a subtractor 231. The predictor may perform prediction on a block to be processed (hereinafter, referred to as a current block) and generate a prediction block including prediction samples of the current block. The predictor may determine whether to apply intra prediction or inter prediction in units of a current block or CU. As described later in the description of each prediction mode, the predictor may generate various information related to prediction (e.g., prediction mode information) and send the generated information to the entropy encoder 240. 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 with reference to samples in the current picture. Depending on the prediction mode, the referenced samples can be located near the current block or can be spaced apart. In intra-frame prediction, the prediction mode may include multiple non-directional modes and multiple directional modes. For example, the non-directional mode may include a DC mode and a plane mode. For example, depending on the level of detail of the prediction direction, the directional mode may include 33 directional prediction modes or 65 directional prediction modes. However, this is only an example, and more or fewer directional prediction modes may be used depending on the settings. The intra-frame predictor 222 may use the prediction mode applied to the neighboring blocks to determine the prediction mode applied to the current block.
[0076] The inter-frame predictor 221 may derive a prediction block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. Here, 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 also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of 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-frame prediction may be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the inter-frame predictor 221 may use the motion information of the neighboring block as the motion information of the current block. In skip mode, unlike merge mode, a residual signal may not be transmitted. In the case of motion vector prediction (MVP) mode, the motion vector of the neighboring block may be used as a motion vector predictor, and the motion vector of the current block may be indicated by signaling a motion vector difference.
[0077] The predictor 220 may generate a prediction signal based on various prediction methods described below. For example, the predictor may not only apply intra prediction or inter prediction to predict a block, but also apply both intra prediction and inter prediction at the same time. This may be referred to as combined inter and intra prediction (CIIP). In addition, the predictor may predict a block based on an intra block copy (IBC) prediction mode or a palette mode. The IBC prediction mode or the palette mode may be used for content image / video encoding of games, etc., such as screen content coding (SCC). IBC basically performs prediction in the current picture, but may be performed similarly to inter prediction so that a reference block is derived in the current picture. That is, IBC may use at least one inter prediction technique described in this document. 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.
[0078] The prediction signal generated by the predictor (including the inter-frame predictor 221 and / or the intra-frame predictor 222) can be used to generate a reconstruction signal or to generate a residual signal. The transformer 232 can generate a transform coefficient by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a karhunen-loève transform (KLT), a graph-based transform (GBT), or a conditional nonlinear transform (CNT). Here, when the relationship information between pixels is represented by a graph, GBT means a transform obtained from a graph. CNT refers to a transform generated based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process can be applied to square pixel blocks of the same size or can be applied to blocks of variable size other than squares.
[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 a bitstream. Information about the quantized transform coefficients may be referred to as residual information. The quantizer 233 may rearrange the block type quantized transform coefficients into a one-dimensional vector form based on the coefficient scanning order, and generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. Information about the transform coefficients may be generated. 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 required for video / image reconstruction other than the quantized transform coefficients (e.g., the value of a syntax element, etc.) together or separately. The encoded information (e.g., encoded video / image information) may be transmitted or stored in units of NAL (network abstraction layer) in the form of a bitstream. The video / image information may also include information about various parameter sets, such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. In this document, information and / or syntax elements sent from an encoding device / signaled to a decoding device may be included in the video / picture information. The video / image information may be encoded by the above-mentioned encoding process and included in a bitstream. The bitstream may be sent via a network or may be stored in a digital storage medium. The network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) that sends a signal output from the entropy encoder 240 and / or a storage unit (not shown) that stores the signal may be included as an internal / external element of the encoding device 200, and alternatively, the transmitter may be included in the entropy encoder 240.
[0080] 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 transformation to the quantized transform coefficients via the dequantizer 234 and the inverse transformer 235. The adder 250 adds 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). If there is no residual in the block to be processed (for example, the case where 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. As described below, the generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current picture and can be used for inter-frame prediction of the next picture by filtering.
[0081] Furthermore, luma mapping and chroma scaling (LMCS) may be applied during picture encoding and / or reconstruction.
[0082] 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 store the modified reconstructed picture in the memory 270 (specifically, the DPB of the memory 270). For example, various filtering methods may include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filter 260 can generate various information related to filtering and send the generated information to the entropy encoder 240, as described later in the description of each filtering method. The information related to filtering can be encoded by the entropy encoder 240 and output in the form of a bit stream.
[0083] 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 by the encoding apparatus, prediction mismatch between the encoding apparatus 200 and the decoding apparatus may be avoided and encoding efficiency may be improved.
[0084] The DPB of the memory 270 may store a modified reconstructed picture used as a reference picture in the inter-frame predictor 221. The memory 270 may store motion information of a block for deriving (or encoding) motion information in the current picture and / or motion information of a reconstructed block in the picture. The stored motion information may be sent to the inter-frame predictor 221 and used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 270 may store reconstructed samples of a reconstructed block in the current picture and may transmit the reconstructed samples to the intra-frame predictor 222.
[0085] Figure 3 The configuration of a video / image decoding device to which the embodiments of the present specification can be applied is shown.
[0086] refer to Figure 3 , the decoding device 300 may include 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 intra-frame predictor 331 and an inter-frame predictor 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 322. According to an embodiment, the entropy decoder 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be configured by a hardware component (e.g., a decoder chipset or a processor). In addition, the memory 360 may include a decoded picture buffer (DPB) or may be configured by a digital storage medium. The hardware component may also include a memory 360 as an internal / external component.
[0087] When a bit stream including video / image information is input, the decoding device 300 can reconstruct the same Figure 2 The image corresponding to the processing of the video / image information in the encoding device. For example, the decoding device 300 can derive the unit / block based on the block partition related information obtained from the bit stream. The decoding device 300 can perform decoding using a processor applied in the encoding device. Therefore, for example, the decoding processor can be a coding unit, and the coding unit can be partitioned from the coding tree unit or the maximum coding unit according to a quadtree structure, a binary tree structure and / or a ternary tree structure. One or more transform units can be derived from the coding unit. The reconstructed image signal decoded and output by the decoding device 300 can be reproduced by a reproduction device.
[0088] The decoding device 300 may receive Figure 2The 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) required for image reconstruction (or picture reconstruction). The video / image information may also include information about various parameter sets, such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. The decoding device may also decode the picture based on the information about the parameter set and / or the general constraint information. The information and / or syntax elements sent / received with the signal described later in this document may be decoded and obtained from the bitstream by the decoding process. For example, the entropy decoder 310 decodes the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and outputs the syntax elements required for image reconstruction and the quantized values of the transform coefficients of the residual. More specifically, the CABAC entropy decoding method can receive bins (binary bits) corresponding to each syntax element in the bitstream, use the decoding target syntax element information, the decoding information of the decoding target block, or the information of the symbol / bin decoded in the previous stage to determine the context model, and perform arithmetic decoding on the bin by predicting the probability of the bin appearing according to the determined context model, and generate symbols corresponding to the values of each syntax element. In this case, the CABAC entropy decoding method can update the context model by using the information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. Information related to prediction among the information decoded by the entropy decoder 310 can be provided to the predictor (inter-frame predictor 332 and intra-frame predictor 331), and the residual value (ie, quantized transform coefficients and related parameter information) performed entropy decoding 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 by the entropy decoder 310 can be provided to the filter 350. In addition, a receiver (not shown) for receiving a signal output from the encoding device may also be configured as an internal / external element of the decoding device 300, or the receiver may be a component of the entropy decoder 310. In addition, the decoding device according to the present document may be referred to as a video / image / picture decoding device, and the decoding device may be classified into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoder 310, and the sample decoder may include at least one of the dequantizer 321, the inverse transformer 322, the adder 340, the filter 350, the memory 360, the inter-frame predictor 332, and the intra-frame predictor 331.
[0089] The dequantizer 321 may dequantize the quantized transform coefficients and output the transform coefficients. The dequantizer 321 may rearrange the quantized transform coefficients in 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 perform dequantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) and obtain the transform coefficients.
[0090] The inverse transformer 322 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0091] The predictor may perform prediction on the current block and generate a prediction block including prediction samples of the current block. The predictor may determine whether to apply intra prediction or inter prediction to the current block based on information on prediction output from the entropy decoder 310 and may determine a specific intra / inter prediction mode.
[0092] The predictor 330 can generate a prediction signal based on various prediction methods described below. For example, the predictor 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. This can be called combined inter and intra prediction (CIIP). In addition, the predictor can predict blocks based on intra block copy (IBC) prediction mode or palette mode. IBC prediction mode or palette mode can be used for content image / video encoding of games, such as screen content coding (SCC). IBC basically performs prediction in the current picture, but can be performed similarly to inter prediction so that a reference block is derived in the current picture. That is, IBC can use at least one inter prediction technique described in this document. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, the sample value in the picture can be sent with a signal based on information about the palette table and the palette index.
[0093] The intra-frame predictor 331 can predict the current block with reference to samples in the current picture. Depending on the prediction mode, the referenced samples can be located near the current block or can be spaced apart. In intra-frame prediction, the prediction mode can include multiple non-directional modes and multiple directional modes. The intra-frame predictor 331 can use the prediction mode applied to the neighboring block to determine the prediction mode applied to the current block.
[0094] The inter-frame predictor 332 may derive a prediction block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information 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 also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of 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 neighboring blocks and derive a motion vector and / or reference picture index of the current block based on the received candidate selection information. Inter-frame prediction may be performed based on various prediction modes, and information about the prediction may include information indicating the inter-frame prediction mode of the current block.
[0095] The adder 340 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the predictor (including the inter-frame predictor 332 and / or the intra-frame predictor 331). If there is no residual in the block to be processed, for example, when the skip mode is applied, the prediction block can be used as the reconstructed block.
[0096] 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 as described below, or may be used for inter prediction of the next picture.
[0097] In addition, luma mapping and chroma scaling (LMCS) may be applied in the picture decoding process.
[0098] 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 store the modified reconstructed picture in the memory 360 (specifically, the DPB of the memory 360). For example, the various filtering methods may include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.
[0099] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter-frame predictor 332. The memory 360 can store the motion information of the block from which the motion information in the current picture is derived (or decoded) and / or the motion information of the reconstructed block in the picture. The stored motion information can be sent to the inter-frame predictor 332 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 transmit the reconstructed samples to the intra-frame predictor 331.
[0100] In this document, the embodiments described in the filter 260, the inter-frame predictor 221, and the intra-frame predictor 222 of the encoding device 200 may be the same as or applied correspondingly to the filter 350, the inter-frame predictor 332, and the intra-frame predictor 331 of the decoding device 300, respectively.
[0101] As described above, when performing video coding, prediction is performed to increase compression efficiency. By this, a prediction block including prediction samples for the current block (block to be coded) can be generated. Here, the prediction block includes prediction samples in the spatial domain (or pixel domain). The prediction block is derived identically in the encoding device and the decoding device, and the encoding device decodes information about the residual between the original block and the prediction block (residual information), rather than the original sample value of the original block itself. By sending a signal to the device, the image coding efficiency can be increased. The decoding device can derive a residual block including residual samples based on the residual information, generate a reconstructed block including reconstructed samples by summing the residual block and the prediction block, and generate a reconstructed picture including the reconstructed block.
[0102] The residual information can be generated by a transform process and a quantization process. For example, the encoding device can derive a residual block between the original block and the prediction block, and perform a transform process on the residual samples (residual sample array) included in the residual block to derive the transform coefficients, and then, derive the quantized transform coefficients by performing a quantization process of the transform coefficients to send the residual related information (through a bit stream) to the decoding device with a signal. Here, the residual information may include position information, transform technology, transform kernel and quantization parameters, value information of quantized transform coefficients, etc. The decoding device can perform a dequantization / inverse transform process based on the residual information and derive residual samples (or residual blocks). The decoding device can generate a reconstructed picture based on the prediction block and the residual block. The encoding device can also dequantize / inverse transform the quantized transform coefficients for inter-frame prediction reference of subsequent pictures to derive residual blocks, and generate reconstructed pictures based on them.
[0103] In this document, at least one of quantization / dequantization and / or transform / inverse transform may be omitted. When quantization / dequantization is omitted, the quantized transform coefficient may be referred to as a transform coefficient. When transform / inverse transform is omitted, the transform coefficient may be referred to as a coefficient or a residual coefficient, or may still be referred to as a transform coefficient for the sake of uniformity of expression.
[0104] In this document, quantized transform coefficients and transform coefficients may be referred to as transform coefficients and scaled transform coefficients, respectively. In this case, the residual information may include information about the transform coefficients, and the information about the transform coefficients may be signaled through residual coding syntax. The transform coefficients may be derived based on the residual information (or information about the transform coefficients), and the scaled transform coefficients may be derived by inversely transforming (scaling) the transform coefficients. The residual samples may be derived based on an inverse transform (transform) of the scaled transform coefficients. This may also be applied / represented in other parts of this document.
[0105] Intra-frame prediction may refer to the prediction of prediction samples for the current block generated based on reference samples in a picture to which the current block belongs (hereinafter referred to as the current picture). When intra-frame prediction is applied to the current block, neighboring reference samples to be used for intra-frame prediction of the current block may be derived. The neighboring reference samples of the current block may include samples adjacent to the left boundary of the current block of size nWxnH and a total of 2xnH samples adjacent to the lower left, samples adjacent to the upper boundary of the current block and a total of 2xnW samples adjacent to the upper right, and one sample adjacent to the upper left of the current block. Alternatively, the neighboring reference samples of the current block may include multiple upper neighboring samples and multiple left neighboring samples. In addition, the neighboring reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block of size nWxnH, a total of nW samples adjacent to the lower boundary of the current block, and one sample adjacent to the lower right of the current block (adjacent to the lower right).
[0106] However, some of the neighboring reference samples of the current block have not yet been decoded or may not be available. In this case, the decoder can configure the neighboring reference samples to be used for prediction by replacing the unavailable samples with available samples. Alternatively, the neighboring reference samples to be used for prediction can be configured by interpolation of available samples.
[0107] When deriving neighboring reference samples, (i) the prediction sample may be derived based on an average or interpolation of neighboring reference samples of the current block, and (ii) the prediction sample may be derived based on reference samples existing in a specific (prediction) direction for the prediction sample among peripheral reference samples of the current block. The case of (i) may be referred to as a non-directional mode or a non-angular mode, and the case of (ii) may be referred to as a directional mode or an angular mode.
[0108] In addition, the prediction sample can also be generated by interpolation between the first neighboring sample and the second neighboring sample located in the direction opposite to the prediction direction of the intra prediction mode of the current block based on the prediction sample of the current block among the neighboring reference samples. The above situation can be called linear interpolation intra prediction (LIP). In addition, the chrominance prediction sample can be generated based on the luma sample using a linear model. This situation can be called LM mode.
[0109] In addition, the temporary prediction sample of the current block can be derived based on the filtered neighboring reference sample, and the prediction sample of the current block can also be derived by weighted summing at least one reference sample derived from the existing neighboring reference sample (i.e., the unfiltered neighboring reference sample) according to the intra prediction mode and the temporary prediction sample. The foregoing situation can be referred to as position-dependent intra prediction (PDPC).
[0110] In addition, the reference sample line with the highest prediction accuracy can be selected among the neighboring multiple reference sample lines of the current block to derive the prediction sample by using the reference sample in the prediction direction located in the corresponding line, and then the reference sample line used herein can be indicated (signaled) to the decoding device, thereby performing intra-frame prediction encoding. The above situation can be referred to as multi-reference line (MRL) intra-frame prediction or MRL-based intra-frame prediction.
[0111] In addition, intra prediction can be performed based on the same intra prediction mode by dividing the current block into vertical or horizontal sub-partitions, and adjacent reference samples can be derived and used in units of sub-partitions. That is, in this case, the intra prediction mode for the current block is equally applied to the sub-partitions, and the intra prediction performance can be improved in some cases by deriving and using adjacent reference samples in units of sub-partitions. This prediction method may be referred to as intra sub-partition (ISP) intra prediction or ISP-based intra prediction.
[0112] The above-mentioned intra-frame prediction method may be referred to as an intra-frame prediction type separate from the intra-frame prediction mode. The intra-frame prediction type may be referred to as various terms such as intra-frame prediction technology or additional intra-frame prediction mode. For example, the intra-frame prediction type (or additional intra-frame prediction mode, etc.) may include at least one of the above-mentioned LIP, PDPC, MRL and ISP. General intra-frame prediction methods other than specific intra-frame prediction types such as LIP, PDPC, MRL and ISP may be referred to as normal intra-frame prediction types. When a specific intra-frame prediction type is not applied, a normal intra-frame prediction type may generally be applied, and prediction may be performed based on the above-mentioned intra-frame prediction mode. At the same time, post-filtering may also be performed on the prediction samples derived as needed.
[0113] Specifically, the intra prediction process may include an intra prediction mode / type determination step, a neighboring reference sample derivation step, and a prediction sample derivation step based on the intra prediction mode / type. In addition, a post-filtering step may also be performed on the prediction samples derived as needed.
[0114] When intra prediction is applied, the intra prediction mode of the neighboring block can be used to determine the intra prediction mode applied to the current block. For example, the decoding device can select one of the MPM candidates of the MPM list derived from the intra prediction mode of the neighboring block (e.g., left and / or upper neighboring block) of the current block based on the received MPM (most probable mode) index, and can select one of the other remaining intra prediction modes (and plane modes) not included in the MPM candidate based on the remaining intra prediction mode information. The MPM list can be configured to include or exclude the plane mode as a candidate. For example, if the MPM list includes the plane mode as a candidate, the MPM list can have 6 candidates. If the MPM list does not include the plane mode as a candidate, the MPM list can have 5 candidates. When the MPM list does not include the plane mode as a candidate, a non-planar flag (e.g., intra_luma_not_planar_flag) indicating whether the intra prediction mode of the current block is not a plane mode can be sent with a signal. For example, the MPM flag can be sent with a signal first, and the MPM index and the non-planar flag can be sent with a signal when the value of the MPM flag is 1. In addition, the MPM index may be signaled when the value of the non-planar flag is 1. Here, since the planar mode is always regarded as the MPM, the MPM list is configured to not include the planar mode because the candidate does not first signal the non-planar flag to check whether it is the planar mode.
[0115] For example, it can be indicated based on an MPM flag (e.g., intra_luma_mpm_flag) whether the intra prediction mode applied to the current block is among the MPM candidates (and planar mode) or among the remaining modes. An MPM flag value of 1 can indicate that the intra prediction mode for the current block is within the MPM candidates (and planar mode), and an MPM flag value of 0 can indicate that the intra prediction mode for the current block is not among the MPM candidates (and planar mode). A non-planar flag (e.g., intra_luma_not_planar_flag) value of 0 can indicate that the intra prediction mode for the current block is a planar mode, and a non-planar flag value of 1 can indicate that the intra prediction mode for the current block is not a planar mode. The MPM index can be signaled in the form of an mpm_idx or intra_luma_mpm_idx syntax element, and the remaining intra prediction mode information can be signaled in the form of a rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element. For example, the remaining intra prediction mode information may index the remaining intra prediction modes not included in the MPM candidates (and planar modes) among all intra prediction modes in the order of the prediction mode numbers to indicate one of them. The intra prediction mode may be an intra prediction mode of a luminance component (sample). In the following, the intra prediction mode information may include at least one of the following: an MPM flag (e.g., intra_luma_mpm_flag), a non-planar flag (e.g., intra_luma_not_planar_flag), an MPM index (e.g., mpm_idx or intra_luma_mpm_idx), and remaining intra prediction mode information (rem_intra_luma_pred_mode or intra_luma_mpm_remainder). In this document, the MPM list can be referred to by a variety of terms such as MPM candidate list and candModeList. When a MIP is applied to the current block, a separate mpm flag (eg, intra_mip_mpm_flag), an mpm index (eg, intra_mip_mpm_idx), and remaining intra prediction mode information (eg, intra_mip_mpm_remainder) for the MIP may be signaled, and the non-planar flag may not be signaled.
[0116] In other words, generally, when block segmentation is performed on an image, the current block to be coded and the neighboring blocks have similar image characteristics. Therefore, the possibility that the current block and the neighboring blocks have the same or similar intra-frame prediction mode is high. Therefore, the encoder can use the intra-frame prediction mode of the neighboring block to encode the intra-frame prediction mode of the current block.
[0117] For example, the encoder / decoder may configure a list of most probable modes (MPMs) for the current block. The MPM list may be referred to as an MPM candidate list. Here, MPM may refer to a mode for improving coding efficiency by considering the similarity between the current block and the neighboring blocks in intra-prediction mode coding. As described above, the MPM list may be configured to include a planar mode, or may be configured to exclude a planar mode. For example, when the MPM list includes a planar mode, the number of candidates in the MPM list may be 6. And, if the MPM list does not include a planar mode, the number of candidates in the MPM list may be 5.
[0118] The encoder / decoder can be configured with an MPM list consisting of 5 or 6 MPMs.
[0119] To configure the MPM list, three modes may be considered: default intra mode, neighboring intra mode, and derived intra mode.
[0120] For the neighboring intra mode, two neighboring blocks may be considered, namely, the left neighboring block and the upper neighboring block.
[0121] As described above, if the MPM list is configured not to include the planar mode, the planar mode is excluded from the list, and the number of candidates for the MPM list may be set to five.
[0122] Furthermore, the non-directional mode (or non-angular mode) among the intra prediction modes may include a DC mode based on an average of neighboring reference samples of the current block or a planar mode based on interpolation.
[0123] When inter-frame prediction is applied, the predictor of the encoding device / decoding device can derive prediction samples by performing inter-frame prediction in units of blocks. Inter-frame prediction can be a 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-frame prediction is applied to the current block, a prediction block (prediction sample array) for the current block can be derived based on a reference block (reference sample array) specified by a motion vector on a reference picture indicated by a reference picture index. Here, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information of the current block can be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of 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 as or different from each other. A temporally neighboring block may be referred to as a collocated reference block, a collocated CU (colCU), etc., and a reference picture including a temporally neighboring block may be referred to as a collocated picture (colPic). For example, a motion information candidate list may be configured based on a neighboring block of the current block, and a flag or index information indicating which candidate is selected (used) may be signaled to derive a motion vector and / or a reference picture index of the current block. Inter-frame prediction may be performed based on various prediction modes. For example, in the case of a skip mode and a merge mode, the motion information of the current block may be the same as the motion information of the neighboring block. In the case of the skip mode, unlike the merge mode, a residual signal may not be sent. In the case of a 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 of the current block may be signaled. In this case, the motion vector of the current block may be derived using the sum of the motion vector predictor and the motion vector difference.
[0124] The motion information may include L0 motion information and / or L1 motion information according to the inter prediction type (L0 prediction, L1 prediction, Bi prediction, etc.). The motion vector in the L0 direction may be referred to as the L0 motion vector or MVL0, and the motion vector in the L1 direction may be referred to as the L1 motion vector or MVL1. Prediction based on the L0 motion vector may be referred to as the L0 prediction, prediction based on the L1 motion vector may be referred to as the L1 prediction, and prediction based on both the L0 motion vector and the L1 motion vector may be referred to as dual prediction. Here, the L0 motion vector may indicate a motion vector associated with the reference picture list L0 (L0), and the L1 motion vector may indicate a motion vector associated with the reference picture list L1 (L1). The reference picture list L0 may include a picture before the current picture in the output order as a reference picture, and the reference picture list L1 may include a picture after the current picture in the output order. The previous picture may be referred to as a forward (reference) picture and the subsequent picture may be referred to as a backward (reference) picture. The reference picture list L0 may further include a picture after the current picture in the output order as a reference picture. In this case, the previous picture may be indexed first in the reference picture list L0, and then the subsequent picture may be indexed. The reference picture list L1 may further include a picture preceding the current picture in the output order as a reference picture. In this case, the subsequent picture may be indexed first in the reference picture list L1, and then the previous picture may be indexed. The output order may correspond to a picture order count (POC) order.
[0125] The video / image encoding process based on inter-frame prediction may include, for example, the following.
[0126] Figure 4 An example of a video / image encoding method based on inter-frame prediction is shown.
[0127] The encoding device performs 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 a prediction sample of the current block. Here, the process of determining the inter prediction mode, deriving the motion information, and generating the prediction sample may be performed simultaneously, or any one process may be performed before the other process. For example, the inter predictor of the encoding device may include a prediction mode determiner, a motion information deriver, and a prediction sample deriver, and the prediction mode determiner may determine the prediction mode of the current block, the motion information deriver may derive the motion information of the current block, and the prediction sample deriver may derive the prediction sample of the current block. For example, the inter predictor of the encoding device may 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 with the smallest difference from the current block or a specific reference or below. Based on this, a reference picture index indicating the reference picture where the reference block is located may be derived, and a motion vector may be derived based on the position difference between the reference block and the current block. The encoding device may determine the mode applied to the current block among various prediction modes. The encoding apparatus may compare RD costs of various prediction modes and determine an optimal prediction mode for the current block.
[0128] For example, if the skip mode or merge mode is applied to the current block, the encoding device may configure a merge candidate list described later, and derive a reference block having the smallest difference with the current block or a specific reference or below 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 with a signal. The motion information of the current block may be derived using the motion information of the selected merge candidate.
[0129] As another example, if the (A)MVP mode is applied to the current block, the encoding device may configure the (A)MVP candidate list described later, and use the motion vector of the selected MVP candidate among the motion vector predictor (MVP) candidates included in the (A)MVP candidate list as the MVP of the current block. In this case, for example, the motion vector indicating the reference block derived by the above-mentioned motion estimation can be used as the motion vector of the current block, and the MVP candidate having the motion vector with the smallest difference from the motion vector of the current block among the MVP candidates can be the selected MVP candidate. A motion vector difference (MVD) can be derived, which is the difference obtained by subtracting the MVP from the motion vector of the current block. In this case, information about the MVD can be sent to the decoding device with a signal. In addition, if the (A)MVP mode is applied, the value of the reference picture index can be configured as reference picture index information and sent to the decoding device with a signal separately.
[0130] The encoding apparatus may induce residual samples based on the prediction samples (S410). The encoding apparatus may induce residual samples by comparing original samples of the current block with the prediction samples.
[0131] The encoding device encodes the image information including prediction information and residual information (S420). The encoding device may output the encoded image information in the form of a bitstream. The prediction information may include information about prediction mode information (e.g., skip flag, merge flag, mode index, etc.) and motion information as information related to the prediction process. The information about the motion information may include candidate selection information (e.g., merge index, mvp flag or mvp index) as information for deriving a motion vector. In addition, the information about the motion information may include the above-mentioned information about the MVD and / or reference picture index information. In addition, the information about the motion information may include information indicating whether L0 prediction, L1 prediction or bi prediction is applied. The residual information is information about the residual sample. The residual information may include information about the quantized transform coefficients of the residual sample.
[0132] The output bit stream may be stored in a (digital) storage medium and transmitted to a decoding device, or may also be transmitted to a decoding device via a network.
[0133] In addition, 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. This is to derive the same prediction result derived by the decoding device by the encoding device, so that the coding efficiency can be increased. 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, an in-loop filtering process, etc. can also be applied to the reconstructed picture.
[0134] The video / image decoding process based on inter-frame prediction may include, for example, the following.
[0135] Figure 5 An example of a video / image decoding method based on inter-frame prediction is shown.
[0136] refer to Figure 5 The decoding device may perform an operation corresponding to the operation performed by the encoding device. The decoding device may perform prediction on the current block based on the received prediction information and derive a prediction sample.
[0137] Specifically, the decoding device may determine a prediction mode of the current block based on the received prediction information (S500). The decoding device may determine an inter prediction mode applied to the current block based on prediction mode information in the prediction information.
[0138] For example, the decoding device may determine whether to apply a merge mode to the current block or determine the (A) MVP mode based on the merge flag. Alternatively, the decoding device may select one of various inter-frame prediction mode candidates based on the mode index. The inter-frame prediction mode candidate may include a skip mode, a merge mode, and / or an (A) MVP mode, or may include various inter-frame prediction modes described later.
[0139] The decoding device derives motion information of the current block based on the determined inter prediction mode (S510). For example, if the skip mode or merge mode is applied to the current block, the decoding device may configure a merge candidate list described later and select a merge candidate from among the merge candidates included in the merge candidate list. The selection may be performed based on the above-mentioned selection information (merge index). The motion information of the selected merge candidate may be used to derive the motion information of the current block. The motion information of the selected merge candidate may be used as the motion information of the current block.
[0140] As another example, if the (A)MVP mode is applied to the current block, the decoding device may configure the (A)MVP candidate list described later, and use the motion vector of the selected MVP candidate 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 above-mentioned selection information (MVP flag or MVP index). In this case, the MVD of the current block may be derived based on the information about the MVD, and the motion vector of the current block may be derived based on the MVP and MVD of the current block. In addition, the reference picture index of the current block may be derived based on the reference picture index information. The picture indicated by the reference picture index in the reference picture list on the current block may be derived as the reference picture referenced by the inter-frame prediction of the current block.
[0141] In addition, as described later, the motion information of the current block can be derived without configuring the candidate list, and in this case, the motion information of the current block can be derived according to the process disclosed in the prediction mode described later. In this case, the configuration of the above-mentioned candidate list can be omitted.
[0142] The decoding device may generate a prediction sample of the current block based on the motion information of the current block (S520). In this case, the decoding device may derive a reference picture based on a reference picture index of the current block, and use a sample of the reference block indicated by a motion vector of the current block on the reference picture to derive a prediction sample of the current block. In this case, as described later, a prediction sample filtering process for all or some prediction samples of the current block may also be performed in some cases.
[0143] For example, the inter-frame predictor of the decoding device may include a prediction mode determiner, a motion information deriver and a prediction sample deriver, and the prediction mode determiner can determine the prediction mode of the current block based on the received prediction mode information, the motion information deriver can derive the motion information (such as a motion vector and / or a reference picture index) of the current block based on the information about the received motion information, and the prediction sample deriver can derive the prediction sample of the current block.
[0144] The decoding device generates residual samples of the current block based on the received residual information (S530). The decoding device can generate reconstructed samples of the current block based on the predicted samples and the residual samples, and generate a reconstructed picture based thereon (S540). Thereafter, an in-loop filtering process, etc., can also be applied to the reconstructed picture as described above.
[0145] Figure 6 The inter-frame prediction process is exemplarily shown.
[0146] 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 by the encoding device and the decoding device as described above. The coding device in this document may include an encoding device and / or a decoding device.
[0147] refer to Figure 6 , the coding device determines an inter prediction mode for the current block (S600). Various inter prediction modes can be used to predict the current block in the picture. For example, various modes such as merge mode, skip mode, motion vector prediction (MVP) mode, affine mode, sub-block merge mode, and merge with MVD (MMVD) mode can be used. In addition or as an additional mode instead of these modes, decoder side motion vector refinement (DMVR) mode, adaptive motion vector resolution (AMVR) mode, dual prediction with CU level weight (BCW), bidirectional optical flow (BDOF), etc. can be used. Affine mode can be referred to as affine motion prediction mode. MVP mode can be referred to as advanced motion vector prediction (AMVP) mode. In this document, some modes and / or motion information candidates derived by some modes can also be included as one of the motion information related candidates in another mode. For example, an HMVP candidate can be added as a merge candidate in merge / skip mode, or can be added as an MVP candidate in MVP mode. If an HMVP candidate is used as a motion information candidate in merge mode or skip mode, the HMVP candidate can be referred to as an HMVP merge candidate.
[0148] Prediction mode information indicating the inter prediction mode of the current block may be sent from the encoding device to the decoding device by signal. The prediction mode information may be included in the bitstream and received by the 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. In this case, the prediction mode information may include one or more flags. For example, whether the skip mode is applied may be indicated by signaling a skip flag, and if the skip mode is not applied, whether the merge mode is applied may be indicated by signaling a merge flag, and indicating the application of the MVP mode or further signaling a flag for additional classification. The affine mode may be signaled as an independent mode or as a subordinate mode with respect to the merge mode or the MVP mode. For example, the affine mode may include an affine merge mode and an affine MVP mode.
[0149] At the same time, information indicating whether the above-mentioned list 0 (L0) prediction, list 1 (L1) prediction or dual prediction is used in the current block (current coding unit) may be signaled in the current block. This information may be referred to as motion prediction direction information, inter-frame prediction direction information or inter-frame prediction indication information, and may be configured / encoded / signaled in the form of, for example, an inter_pred_idc syntax element. That is, the inter_pred_idc syntax element may indicate whether the above-mentioned list 0 (L0) prediction, list 1 (L1) prediction or dual prediction is used for the current block (current coding unit). In this document, for ease of description, the inter-frame prediction type (L0 prediction, L1 prediction or BI prediction) indicated by the inter_pred_idc syntax element may be indicated as a motion prediction direction. L0 prediction may be represented as pred_L0, L1 prediction as pred_L1, and dual prediction as pred_BI. For example, the following prediction types may be indicated according to the value of the inter_pred_idc syntax element.
[0150] [Table 1]
[0151]
[0152] As described above, a picture may include one or more slices. A slice may have one of slice types including an intra (I) slice, a predicted (P) slice, and a bi-predicted (B) slice. The slice type may be indicated based on slice type information. For blocks in an I slice, inter prediction may not be used for prediction, and only intra prediction may be used. Of course, even in this case, the original sample values may be encoded and signaled without prediction. For blocks in a P slice, intra prediction or inter prediction may be used, and when inter prediction is used, only single prediction may be used. At the same time, for blocks in a B slice, intra prediction or inter prediction may be used, and when inter prediction is used, up to bi-prediction may be used.
[0153] L0 and L1 may include reference pictures previously encoded / decoded before the current picture. For example, L0 may include reference pictures before and / or after the current picture in POC order, and L1 may include reference pictures after and / or before the current picture in POC order. In this case, L0 may be assigned a reference picture index lower than the current reference picture relative to the previous reference picture in POC order, and L1 may be assigned a reference picture index lower than the current picture relative to the subsequent reference picture in POC order. In the case of B slices, bi-prediction may be applied, and in this case, unidirectional bi-prediction may be applied, or bi-directional bi-prediction may be applied. Bi-directional bi-prediction may be referred to as true bi-prediction.
[0154] The following table shows the syntax for a compilation unit according to an embodiment of this document.
[0155] [Table 2]
[0156]
[0157]
[0158]
[0159]
[0160]
[0161] The coding apparatus derives motion information for a current block (S610). The motion information may be derived based on an inter prediction mode.
[0162] The encoding device may use the motion information of the current block to perform inter-frame prediction. The encoding device may derive the optimal motion information of the current block through a motion estimation process. For example, the encoding device may use the original block in the original picture to search for a similar reference block with high correlation in units of fractional pixels within a predetermined search range in the reference picture for the current block, thereby deriving motion information. The similarity of the blocks may be derived based on the difference between the phase-based sample values. 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 in the search area. The derived motion information may be signaled to the decoding device according to various methods based on the inter-frame prediction mode.
[0163] The coding device performs inter prediction based on the motion information of the current block (S620). The coding device may derive a prediction sample of the current block based on the motion information. The current block including the prediction sample may be referred to as a prediction block.
[0164] When the merge mode is applied, the motion information of the current prediction block is not directly sent, and the motion information of the neighboring prediction blocks is used to derive the motion information of the current prediction block. Therefore, the motion information of the current prediction block can be indicated by sending flag information indicating the use of the merge mode and a merge index indicating which neighboring prediction block to use. The merge mode may be referred to as a normal merge mode.
[0165] The encoder must search for a merge candidate block for deriving motion information of the current prediction block to perform the merge mode. For example, up to five merge candidate blocks can be used, but the embodiments of this document are not limited to this. The maximum number of merge candidate blocks can be sent in a slice header or a tile group header, and the embodiments of this document are not limited to this. After finding the merge candidate block, the encoder can generate a merge candidate list and select the merge candidate block with the lowest cost among them as the final merge candidate block.
[0166] The merge candidate list may use, for example, five merge candidate blocks. For example, four spatial merge candidates and one temporal merge candidate may be used. Hereinafter, a spatial merge candidate or spatial MVP candidate described later may be referred to as SMVP, and a temporal merge candidate or temporal MVP candidate described later may be referred to as TMVP.
[0167] Figure 7 A method for constructing a merge candidate list according to this document is schematically illustrated.
[0168] The coding device (encoder / decoder) inserts the spatial merge candidate derived by searching the spatial neighboring blocks of the current block into the merge candidate list (S700). For example, the spatial neighboring blocks may include the lower left neighboring block, the left neighboring block, the upper right neighboring block, the upper neighboring block, and the upper left neighboring block of the current block. However, this is an example, and in addition to the above-mentioned spatial neighboring blocks, additional neighboring blocks such as the right neighboring block, the lower neighboring block, and the lower right neighboring block may be further used as the spatial neighboring blocks. The coding device may detect an available block by searching the spatial neighboring blocks based on priority, and may derive motion information of the detected block as a spatial merge candidate.
[0169] The compiling device inserts time merge candidates derived by searching for temporally adjacent blocks of the current block into the merge candidate list (S710). The temporally adjacent blocks may be located on a reference picture that is a picture different from the current picture in which the current block is located. The reference picture on which the temporally adjacent blocks are located may be referred to as a collocated picture or col picture. The temporally adjacent blocks may be searched in the order of the bottom-right adjacent block and the bottom-right center block of the collocated block for the current block on the col picture. Meanwhile, when motion data compression is applied, specific motion information may be stored as representative motion information for each predetermined storage unit in the col picture. In this case, it is not necessary to store the motion information for all blocks in the predetermined storage unit, thereby obtaining a motion data compression effect. In this case, the predetermined storage unit may be previously determined, for example, as 16x16 sample units, 8x8 sample units, etc., or the size information about the predetermined storage unit may be signaled from the encoder to the decoder. When motion data compression is applied, the motion information of the temporally adjacent blocks may be replaced with the representative motion information of the predetermined storage unit in which the temporally adjacent blocks are located. That is, in this case, from an implementation perspective, a predetermined value is arithmetically shifted to the right based on the coordinates (top-left sample position) of the temporally adjacent blocks, and thereafter, the motion information of the prediction block covering the arithmetically left-shifted position may be used to derive the time merge candidate. For example, in the case where the sample unit of the predetermined storage unit is 2nx2n, if the coordinates of the temporally adjacent block are (xTnb, yTnb), the motion information of the prediction block located at the modified position ((xTnb>>n)<<n),(yTnb>>n)<<n)) may be used for the time merge candidate. Specifically, for example, in the case where the predetermined storage unit is 16x16 sample units, if the coordinates of the temporally adjacent block are (xTnb, yTnb), the motion information of the prediction block located at the modified position ((xTnb>>4)<<4),(yTnb>>4)<<4)) may be used for the time merge candidate. Or, for example, in the case where the predetermined storage unit is 8x8 sample units, if the coordinates of the temporally adjacent block are (xTnb, yTnb), the motion information of the prediction block located at the modified position ((xTnb>>3)<<3),(yTnb>>3)<<3)) may be used for the time merge candidate.
[0170] The compiling device may determine whether the number of current merge candidates is less than the number of maximum merge candidates (S720). The number of maximum merge candidates may be predefined or signaled from the encoder to the decoder. For example, the encoder may generate information about the number of maximum merge candidates, encode the information, and send the encoded information to the decoder in the form of a bitstream. If the number of maximum merge candidates is filled, the subsequent candidate addition process may not be performed.
[0171] As a result of the checking, if the number of current merge candidates is less than the number of maximum merge candidates, the compiling apparatus inserts an additional merge candidate into the merge candidate list ( S730 ).
[0172] As a result of the check, if the number of current merge candidates is not less than the number of maximum merge candidates, the coding device may terminate the construction of the merge candidate list (S740). In this case, the encoder may select the best merge candidate among the merge candidates configuring the merge candidate list based on the rate distortion (RD) cost and signal selection information (e.g., a merge index) indicating the selected merge candidate to the decoder. The decoder may select the best merge candidate based on the merge candidate list and the selection information.
[0173] The motion information of the selected merge candidate may be used as the motion information of the current block, and the prediction sample of the current block may be derived based on the motion information of the current block. The encoder may derive the residual sample of the current block based on the prediction sample, and may signal the residual information about the residual sample to the decoder. The decoder may generate a reconstructed sample based on the residual sample and the prediction sample derived based on the residual information, and generate a reconstructed picture based thereon as described above.
[0174] When the skip mode is applied, the motion information of the current block can be derived in the same manner as the case where the merge mode is applied. However, when the skip mode is applied, the residual signal of the corresponding block is omitted, so the prediction sample can be used as the reconstructed sample.
[0175] When the MVP mode is applied, a motion vector predictor (MVP) candidate list may be generated using the motion vector of the reconstructed spatial neighboring block and / or the motion vector of the temporal neighboring block (or Col block). That is, the motion vector corresponding to the reconstructed spatial neighboring block and / or the motion vector corresponding to the temporal neighboring block may be used as a motion vector predictor candidate. When dual prediction is applied, an MVP candidate list for deriving L0 motion information and an MVP candidate list for deriving L1 motion information may be generated and used respectively. The above-mentioned prediction information (or information about prediction) may include selection information (e.g., an MVP flag or an MVP index) indicating the best motion vector predictor candidate selected from the motion vector predictor candidates included in the list. In this case, the predictor may use the selection information to select the motion vector predictor of the current block from the motion vector predictor candidates included in the motion vector candidate list. The predictor of the encoding device may obtain the motion vector difference (MVD) between the motion vector of the current block and the motion vector predictor, encode it, and output it in the form of a bitstream. That is, the MVD may be obtained as a value obtained by subtracting the motion vector predictor from the motion vector of the current block. In this case, the predictor of the decoding device may obtain the motion vector difference included in the information about the prediction, and derive the motion vector of the current block by adding the motion vector difference to the motion vector predictor. The predictor of the decoding device may obtain or derive the reference picture index indicating the reference picture from the information about the prediction.
[0176] Figure 8 is a flow chart illustrating a method of constructing a motion vector predictor candidate list.
[0177] refer to Figure 8 , an embodiment may first search for spatial candidate blocks for motion vector prediction and insert them into the prediction candidate list (S800). Thereafter, the embodiment may determine whether the number of spatial candidate blocks is less than 2 (S810). For example, in an embodiment, when the number of spatial candidate blocks is less than 2, a temporal candidate block may be searched and additionally inserted into the prediction candidate list (S820), and when a temporal candidate block is not available, a zero motion vector may be used (S830). That is, a zero motion vector may be additionally inserted into the prediction candidate list. Thereafter, the embodiment may end the construction of the preliminary candidate list (S840). Alternatively, according to an embodiment, when the number of spatial candidate blocks is not less than two, the construction of the preliminary candidate list may be terminated. Here, the preliminary candidate list may indicate an MVP candidate list (S840).
[0178] Meanwhile, when the MVP mode is applied, the reference picture index may be explicitly signaled. In this case, the reference picture index refidxL0 for L0 prediction and the reference picture index refidxL1 for L1 prediction may be signaled separately. For example, when the MVP mode is applied and BI prediction is applied, both information about refidxL0 and information about refidxL1 may be signaled.
[0179] When the MVP mode is applied, as described above, information about the MVD derived from the encoding device may be signaled to the decoding device. The information about the MVD may include, for example, information representing the x and y components of the MVD absolute value and sign. In this case, information indicating whether the MVD absolute value is greater than 0 and greater than 1 and the MVD residual may be signaled step by step. For example, only when the value of the flag information indicating whether the MVD absolute value is greater than 0 is 1, the information indicating whether the MVD absolute value is greater than 1 may be signaled.
[0180] For example, information about the MVD may be configured as the following syntax, encoded in the encoding device, and signaled to the decoding device.
[0181] [Table 3]
[0182]
[0183] For example, in Table 3, the abs_mvd_greater0_flag syntax element may indicate information about whether the difference MVD is greater than 0, and the abs_mvd_greater1_flag syntax element may indicate information about whether the difference MVD is greater than 1. In addition, the abs_mvd_minus2 syntax element may indicate information about a value obtained by subtracting the difference MVD by 2, and the mvd_sign_flag syntax element may indicate information about the sign of the difference MVD. In addition, in Table 3, [0] of each syntax element may indicate information about L0, and [1] may indicate information about L1.
[0184] For example, MVD[compIdx] may be derived based on abs_mvd_greater0_flag[compIdx]*(abs_mvd_minus2[compIdx]+2)*(1-2*mvd_sign_flag[compIdx]). Here, compIdx (or cpIdx) represents the index of each component and may have a value of 0 or 1. compIdx 0 may indicate an x component, and compIdx 1 may indicate a y component. However, this is merely an example, and the value of each component may be expressed by using a coordinate system other than the x and y coordinate system.
[0185] Meanwhile, the MVD (MVDL0) for L0 prediction and the MVD (MVDL1) for L1 prediction may be separately signaled, and the information about the MVD may include information about MVDL0 and / or information about MVDL1. For example, when the MVP mode is applied to the current block and BI prediction is applied, both the information about MVDL0 and the information about MVDL1 may be signaled.
[0186] Fig. 9 A diagram describing the symmetric motion vector difference (SMVD).
[0187] When BI prediction is applied, symmetric MVD can be used in consideration of coding efficiency. In this case, the signaling of some motion information can be omitted. For example, when symmetric MVD is applied to the current block, information about refidxL0, information about refidxL1, and information about MVDL1 may not be sent from the encoding device to the decoding device with a signal, and may be derived internally. For example, when MVP mode and BI prediction are applied to the current block, flag information indicating whether symmetric MVD is applied (e.g., symmetric MVD flag information or sym_mvd_flag syntax element) may be sent with a signal, and when the value of the flag information is 1, the decoding device may determine that symmetric MVD is applied to the current block.
[0188] When the symmetric MVD mode is applied (i.e., the value of the symmetric MVD flag information is 1), information about mvp_l0_flag, mvp_l1_flag, and MVDL0 may be explicitly signaled, and as described above, signaling of information about refidxL0, information about refidxL1, and information about MVDL1 may be omitted and derived internally. For example, refidxL0 may be derived as an index indicating a previous reference picture closest to the current picture in the POC order in reference picture list 0 (which may be referred to as list 0 or L0). refidxL1 may be derived as an index indicating a next reference picture closest to the current picture in the POC order in reference picture list 1 (which may be referred to as list 1 or L1). Alternatively, for example, both refidxL0 and refidxL1 may be derived as 0. Alternatively, for example, refidxL0 and refidxL1 may be derived as the minimum index having the same POC difference with the current picture. Specifically, for example, when [POC of the current picture]-[POC of the first reference picture indicated by refidxL0] is the first POC difference and [POC of the current picture]-[POC of the second reference picture indicated by refidxL1] is the second POC difference, only when the first POC difference and the second POC difference are the same, the value of refidxL0 indicating the first reference picture can be derived as the value of refidxL0 of the current block, and the value of refidxL1 indicating the second reference picture can be derived as the value of refidxL1 of the current block. In addition, for example, when there are multiple sets in which the first POC difference and the second POC difference are the same, refidxL0 and refidxL1 of the set with the smallest difference can be derived as refidxL0 and refidxL1 of the current block.
[0189] refer to Fig. 9 , shows reference picture list 0, reference picture list 1, and MVDL0 and MVDL1. Here, MVDL1 is symmetrical to MVDL0.
[0190] MVDL1 may be derived as negative (-) MVDL0. For example, the final (improved or modified) motion information (motion vector; MV) for the current block may be derived based on the following equation.
[0191] [Equation 1]
[0192]
[0193] In Equation 1, mvx0 and mvy0 may represent the x component and y component of L0 motion information or a motion vector for L0 prediction, and mvx1 and mvy1 may represent the x component and y component of L1 motion information or a motion vector for L1 prediction. In addition, mvpx0 and mvpy0 may represent the x component and y component of a motion vector predictor for L0 prediction, and mvpx1 and mvpy1 may represent the x component and y component of a motion vector predictor for L1 prediction. In addition, mvdx0 and mvdy0 may represent the x component and y component of a motion vector difference for L0 prediction.
[0194] Meanwhile, the MMVD mode is a method of applying a motion vector difference (MVD) to a merge mode, and can implicitly derive motion information directly used to generate a prediction sample of a current block (ie, current CU). For example, an MMVD flag (ie, mmvd_flag) indicating whether MMVD is used for the current block (ie, current CU) may be signaled, and MMVD may be performed based on the MMVD flag. When MMVD is applied to the current block (ie, when mmvd_flag is 1), additional information about MMVD may be signaled.
[0195] Here, the additional information about MMVD includes a merge candidate flag (ie, mmvd_cand_flag) indicating whether the first candidate or the second candidate in the merge candidate list is used with MVD, and a distance index (ie, mmvd_distance_idx) for indicating the motion magnitude and a direction index (ie, mmvd_direction_idx) for indicating the motion direction.
[0196] In MMVD mode, two candidates (i.e., the first candidate or the second candidate) in the first entry and the second entry among the candidates in the merge candidate list can be used, and two candidates (i.e., the first candidate or the second candidate) can be used. One of them can be used as a basic MV. For example, a merge candidate flag (i.e., mmvd_cand_flag) can be signaled to indicate either of the two candidates (i.e., the first candidate or the second candidate) in the merge candidate list.
[0197] In addition, the distance index (ie, mmvd_distance_idx) specifies the motion magnitude information and indicates a predefined offset from the starting point. The offset can be added to the horizontal component or the vertical component of the starting MV. The following table specifies the relationship between the distance index and the predefined offset.
[0198] [Table 4]
[0199]
[0200] Referring to Table 4 above, the distance (e.g., MmvdDistance) of the MVD is determined according to the value of the distance index (e.g., mmvd_distance_idx), and the distance (e.g., MmvdDistance) of the MVD may be derived by using integer sample precision or fractional sample precision based on the value of tile_group_fpel_mmvd_enabled_flag. For example, when tile_group_fpel_mmvd_enabled_flag is equal to 1, it indicates that the distance of the MVD is derived by using integer sample precision in the current tile group (or picture header), and when tile_group_fpel_mmvd_enabled_flag is equal to 0, it indicates that the distance of the MVD is derived by using fractional sample precision in the tile group (or picture header). In Table 1, the information (flag) for the tile group may be replaced with the information of the picture header, for example, tile_group_fpel_mmvd_enabled_flag may be replaced with ph_fpel_mmvd_enabled_flag (or ph_mmvd_fullpel_only_flag).
[0201] In addition, the direction index (eg, mmvd_direction_idx) indicates the direction of the MVD relative to the starting point, and may indicate four directions as shown in Table 5 below. In this case, the direction of the MVD may indicate the sign of the MVD. The relationship between the direction index and the MVD sign may be expressed as in the following table.
[0202] [Table 5]
[0203] mmvd_direction_iddx[x0]][y0] MmvdSign[x0][y0][0] MmvdSign[x0][y0][1] 0 +1 0 1 -1 0 2 0 +1 3 0 -1
[0204] Referring to Table 5, the sign of MVD (eg, MmvdSign) is determined according to the value of the direction index (eg, mmvd_direction_idx), and the sign of MVD (eg, MmvdSign) may be derived for an L0 reference picture and an L1 reference picture.
[0205] Based on the above distance index (eg, mmvd_distance_idx) and direction index (eg, mmvd_direction_idx), the offset of the MVD may be calculated using the following equation.
[0206] [Equation 2]
[0207] MmvdOffset[x0][y0][0]=(MmvdDistance[x0][y0]<<2)*MmvdSign[x0][y0][0]
[0208] [Equation 3]
[0209] MmvdOffset[x0][y0][1]=(MmvdDistance[x0][y0]<<2)*MmvdSign[x0][y0][1]
[0210] In Equations 2 and 3, the MMVD distance (MmvdDistance[x0][y0]) and the MMVD sign (MmvdSign[x0][y0][0], MmvdSign[x0][y0][1]) may be derived based on Table 4 and / or Table 5. In summary, in MMVD mode, a merge candidate indicated by a merge candidate flag (e.g., mmvd_cand_flag) is selected from among the merge candidates in the merge candidate list derived based on the neighboring block, and the selected merge candidate is used as a basic candidate (e.g., MVP). In addition, the motion information (i.e., motion vector) of the current block may be derived by adding the MVD derived using the distance index (e.g., mmvd_distance_idx) and the direction index (e.g., mmvd_direction_idx) based on the basic candidate.
[0211] A prediction block for a current block may be derived based on motion information derived according to a prediction mode. The prediction block may include prediction samples (prediction sample arrays) of the current block. When a motion vector of the current block indicates a fractional sample unit, an interpolation process may be performed by which prediction samples of the current block may be derived based on reference samples in units of fractional samples within a reference picture. When bi-prediction is applied, prediction samples derived by weighting or weighted averaging (according to phase) of prediction samples derived based on L0 prediction (i.e., prediction using a reference picture in reference picture list L0 and MVL0) and prediction samples derived based on L1 prediction (i.e., prediction using a reference picture in reference picture list L1 and MVL1) may be used as prediction samples of the current block. When bi-prediction is applied, if a reference picture for L0 prediction and a reference picture for L1 prediction are located in different temporal directions relative to the current picture (i.e., bi-prediction and bidirectional prediction), it may be referred to as true bi-prediction.
[0212] As described above, reconstructed samples and reconstructed pictures may be generated based on the derived prediction samples, and then processes such as in-loop filtering may be performed.
[0213] As described above, according to this document, when dual prediction is applied to the current block, a prediction sample can be derived based on a weighted average. Typically, a dual prediction signal (i.e., a dual prediction sample) can be derived by a simple average of an L0 prediction signal (L0 prediction sample) and an L1 prediction signal (L1 prediction sample). That is, the dual prediction sample is derived as an average of an L0 prediction sample based on an L0 reference picture and MVL0 and an L1 prediction sample based on an L1 reference picture and MVL1. However, according to this document, when dual prediction is applied, a dual prediction signal (dual prediction sample) can be derived by a weighted average of an L0 prediction signal and an L1 prediction signal as follows.
[0214] In the above-mentioned MMVD-related embodiments, a method for considering long-term reference pictures in the MVD derivation process of MMVD can be proposed, thereby maintaining and increasing compression efficiency in various applications. In addition, in addition to the MMVD technology used in MERGE, the methods proposed in the embodiments of this document can also be applied to SMVD, which is a symmetric MVD technology used in inter-frame mode (MVP mode).
[0215] Fig.10 is a diagram for describing a method of deriving a motion vector in inter-frame prediction.
[0216] In an embodiment of this document, an MV derivation method considering long-term reference pictures is used in the motion vector scaling process of a temporal motion candidate (temporal motion candidate, temporal merge candidate, or temporal mvp candidate). The temporal motion candidate may correspond to mvCol (mvLXCol). The temporal motion candidate may be referred to as TMVP.
[0217] The following table describes the definition of long-term reference pictures.
[0218] [Table 6]
[0219]
[0220] Refer to the above Figure 6 , if LongTermRefPic(aPic, aPb, refIdx, LX) is equal to 1 (true), the corresponding reference picture may be marked for long-term reference. For example, a reference picture that is not marked for long-term reference may be a reference picture marked for short-term reference. In another example, a reference picture that is not marked for long-term reference and not marked as unused may be a reference picture marked for short-term reference. Hereinafter, a reference picture marked for long-term reference may be referred to as a long-term reference picture, and a reference picture marked for short-term reference may be referred to as a short-term reference picture.
[0221] The following table describes the derivation of TMVP(mvLXCol).
[0222] [Table 7]
[0223]
[0224]
[0225] refer to Fig.10 and Table 7, when the type of the reference picture pointed to by the current picture (for example, indicating whether it is a long-term reference picture (LTRP) or a short-term reference picture (STRP)) is not equal to the type of the collocated reference picture pointed to by the collocated picture, the temporal motion vector mvLXCol is not used. That is, when all of them are long-term reference pictures or short-term reference pictures, colMV is derived, otherwise, colMV is not derived. In addition, in the case where all of them are long-term reference pictures, and in the case where the POC difference between the reference picture of the current picture and the reference picture of the current picture is the same as the POC difference between the collocated picture and the reference picture of the collocated picture, the collocated motion vector can be used as it is without scaling. If it is a short-term reference picture and the POC difference is different, the motion vector of the collocated block is used after scaling.
[0226] In an embodiment of this document, the MMVD used in the MERGE / SKIP mode signals a basic motion vector index (basic MV index), a distance index, and a direction index for one coding block as information for deriving MVD information. In the case of unidirectional prediction, MVD is derived from motion information, and in the case of bidirectional prediction, a mirror and scaling method is used to generate symmetric MVD information.
[0227] In the case of bidirectional prediction, the MVD information for L0 or L1 is scaled to generate the MVD for L1 or L0. However, when referring to a long-term reference picture, it needs to be modified in the MVD derivation process.
[0228] Fig.11 The MVD derivation process of the MMVD according to an embodiment of this document is illustrated. Fig.11 The method shown can be used for blocks to which bidirectional prediction is applied.
[0229] refer to Fig.11 , when the distance to the L0 reference picture and the distance to the L1 reference picture are the same, the derived MmvdOffset can be used as the MVD as is, and the POC differences (the POC difference between the L0 reference picture and the current picture and the POC difference between the L1 reference picture and the current picture) are different, the MVD can be derived according to the POC difference and whether it is a long-term or short-term reference picture by scaling or simple mirroring (i.e., -1*MmvdOffset).
[0230] In one example, a method for deriving a symmetric MVD using MMVD for a block to which bi-prediction is applied is not suitable for a block using a long-term reference picture. It is difficult to expect performance improvement. Therefore, in the following figures and embodiments, an example is introduced in which MMVD is not applied when the reference picture types of L0 and L1 are different.
[0231] Fig.12 FIG. 4 is a diagram showing the MVD derivation process of the MMVD according to another embodiment of the present disclosure. Fig.13 The method shown in can be used for blocks to which bidirectional prediction is applied.
[0232] refer to Fig.12 , the method of deriving MVD may vary depending on whether the reference picture referenced by the current picture (or current slice or current block) is a long-term reference picture (LTRP) or a short-term reference picture (STRP). In one example, when applying Fig.12 When implementing the method of the embodiment, some standard specifications according to this embodiment can be described as shown in the following table.
[0233] [Table 8]
[0234]
[0235]
[0236]
[0237]
[0238] Fig.13 The MVD derivation process of MMVD according to another embodiment of this document is shown in FIG. Fig.13 The method shown in can be used for blocks to which bidirectional prediction is applied.
[0239] refer to Fig.13 , depending on whether the reference picture referred to by the current picture (or current slice, current block) is a long-term reference picture (LTRP) or a short-term reference picture (STRP), the method for deriving MVD may be different. In one example, when applying Fig.13 When describing the method of the embodiment, a portion of the standard document according to the embodiment may be described as shown in the following table.
[0240] [Table 9]
[0241]
[0242]
[0243]
[0244]
[0245] In summary, an MVD derivation process of MMVD without deriving MVD when the reference picture type in each direction is different has been described.
[0246] In one embodiment according to this document, MVD may not be derived in all cases where long-term reference pictures are referenced. That is, when at least one L0 and L1 reference picture is a long-term reference picture, MVD is set to 0, and MVD can be derived only when a short-term reference picture is included. This is described in detail in the following figures and tables.
[0247] Fig.14 The MVD derivation process of the MMVD according to the embodiment of this document is illustrated. Fig.14 The method shown in can be used for blocks to which bi-prediction is applied.
[0248] refer to Fig.14 , based on the highest priority condition (RefPicL0!=LTRP &&RefPicL1!=STRP), when the current picture (or current slice, current block) only refers to short-term reference pictures, the MVD for MMVD can be derived. In one example, when applying Fig.12 When describing the method of the embodiment, a portion of the standard document according to the embodiment may be described as shown in the following table.
[0249] [Table 10]
[0250]
[0251]
[0252]
[0253] In an embodiment according to this document, when the reference picture type in each direction is different, the MVD is derived when a short-term reference picture is obtained, and the MVD is derived to be 0 when a long-term reference picture is included. This is described in detail in the following figures and tables.
[0254] Fig.15 The MVD derivation process of the MMVD according to the embodiment of this document is shown. Fig.15 The method shown in can be used for blocks to which bidirectional prediction is applied.
[0255] refer to Fig.15, when the reference picture type in each direction is different, MmvdOffset is applied when referencing a reference picture close to the current picture (short-term reference picture), and when referencing a reference picture far from the current picture (long-term reference picture), MVD has a value of 0. In this case, a picture close to the current picture may be regarded as having a short-term reference picture, but when the close picture is a long-term reference picture, mmvdOffset may be applied to a motion vector indicating a list of short-term reference pictures.
[0256] [Table 11]
[0257]
[0258] For example, the four paragraphs included in Table 11 can be replaced sequentially. Fig.15 The bottommost block (content) of the flowchart included in.
[0259] In one example, when the application is based on Fig.15 When the method of the embodiment is described, a part of the standard document according to the embodiment can be described as in the following table.
[0260] [Table 12]
[0261]
[0262]
[0263]
[0264] The following table shows a comparison table between the examples included in this document.
[0265] [Table 13]
[0266]
[0267] Referring to Table 13, it is shown that Figures 11 to 15 In Table 13, embodiment A may relate to the existing MMVD, and embodiment B may illustrate the method of applying the offset of the reference picture type derived by the MMVD described in the embodiments of FIG. Figures 11 to 13 Embodiment C can be shown according to Fig.14 Embodiments, and Embodiment D can show that according to Fig.15 Embodiment of the invention.
[0268] That is, according to Fig.11 , Fig.12 and Fig.13 In the embodiment of FIG. 1 , a method for deriving MVD only when the reference picture types in the two directions are the same has been described, and in accordance with Fig.14In the embodiment of , a method has been described in which MVD is derived only when both directions are short-term reference pictures. Fig.14 In the case of an embodiment of the present invention, in the case of a long-term reference picture for unidirectional prediction, the MVD may be set to 0. Fig.15 In the embodiment of the present invention, a method of deriving MVD only in one direction when the reference picture types in the two directions are different has been described. The differences between the embodiments represent various features of the technology described in this document, and a person of ordinary skill in the art can understand that the effects to be achieved according to the embodiments of this document can be achieved based on these features.
[0269] In an embodiment according to the present document, when the reference picture type is a long-term reference picture, separate processing is performed. When a long-term reference picture is included, scaling or mirroring based on a POC difference (POCDiff) does not affect performance improvement, so an MmvdOffset value is assigned to the MVD in a direction with a short-term reference picture, and a value of 0 is assigned to the MVD in a direction with a long-term reference picture. In one example, when this embodiment is applied, a portion of a standard document conforming to this embodiment may be described as shown in the following table.
[0270] [Table 14]
[0271]
[0272]
[0273]
[0274]
[0275] In another example, a portion of Table 14 may be replaced with the following table. Referring to Table 15, an offset may be applied based on a reference picture type other than POCDiff.
[0276] [Table 15]
[0277]
[0278] In another example, a portion of Table 14 may be replaced with the following table. Referring to Table 16, MmvdOffset may always be set to L0, and -MmvdOffset may be set to L1 regardless of the reference picture type.
[0279] [Table 16]
[0280]
[0281] According to an embodiment of the present document, the SMVD in the inter-frame mode may be performed similarly to the MMVD used in the above-mentioned MERGE mode. In the case of bidirectional prediction, whether to derive a symmetric MVD is signaled from the encoding device to the decoding device, and when the relevant flag (e.g., sym_mvd_flag) is true (or has a value of 1), the second direction MVD (e.g., MVDL1) is derived by mirroring the first direction MVD (e.g., MVDL0). In this case, scaling of the first direction MVD may not be performed.
[0282] The following table shows the syntax for a compilation unit according to an embodiment of this document.
[0283] [Table 17]
[0284]
[0285] [Table 18]
[0286]
[0287] Referring to Tables 17 and 18, when inter_pred_idc == PRED_BI and reference pictures of L0 and L1 are available (eg, RefIdxSymL0>-1&&RefIdxSymL1>-1), sym_mvd_flag is signaled.
[0288] The following table shows the decoding process of the MMVD reference index according to an example.
[0289] [Table 19]
[0290]
[0291]
[0292] Referring to Table 19, a process for deriving the availability of reference pictures of L0 and L1 is described. That is, if there is a reference picture in the forward direction among the L0 reference pictures, the index of the reference picture closest to the current picture is set to RefIdxSymL0, and the corresponding value is set to the reference index of L0. In addition, when there is a reference picture in the backward direction among the L1 reference pictures, the index of the reference picture closest to the current picture is set to RefIdxSymL1, and the corresponding value is set to the reference index of L1.
[0293] Table 20 below shows a decoding process of an MMVD reference index according to another example.
[0294] [Table 20]
[0295]
[0296]
[0297] Refer to Table 20, as in Fig.11 , Fig.12 and Fig.13 In the described embodiment, when the type of L0 or L1 reference pictures is different, that is, if the reference picture types of L0 and L1 are different after the reference index derivation for SMVD, SMVD is not used when using long-term reference pictures and short-term reference pictures in order to prevent SMVD (see the bottom paragraph of Table 20).
[0298] In embodiments of this document, SMVD can be applied in inter-mode similar to MMVD used in merge mode. Fig.14 When long-term reference pictures are used as in the embodiments described in , long-term reference pictures can be excluded from the reference index derivation process for SMVD, as shown in the following table, in order to prevent SMVD.
[0299] [Table 21]
[0300]
[0301]
[0302]
[0303] The following table of another example according to the present embodiment shows a processing example in which SMVD is not applied when a long-term reference picture is used after reference picture index derivation for SMVD.
[0304] [Table 22]
[0305]
[0306]
[0307] In one embodiment of this document, in the colMV derivation process of TMVP, when the reference picture type of the current picture and the reference picture type of the collocated picture are different, the motion vector MV is set to 0, but the derivation method in the case of MMVD and SMVD is different from TMVP, and they need to be unified.
[0308] Even when the reference picture type of the current picture is a long-term reference picture and the reference picture type of the collocated picture is a long-term reference picture, the motion vector uses the value of the collocated motion vector as is, but the MV can be set to 0 in MMVD and SMVD. In this case, TMVP also sets the MV to 0 without additional derivation.
[0309] Furthermore, even if the reference picture type is different, there may be a long-term reference picture with a close distance to the current picture. Therefore, instead of setting the MV to 0, colMV can be used as the MV without scaling.
[0310] The following figures are created to explain specific examples of this specification. Since the names of specific devices or the names of specific signals / messages / fields described in the figures are presented by way of example, the technical features of this specification are not limited to the specific names used in the following figures.
[0311] Fig.16 and 17 An example of a video / image encoding method and related components according to an embodiment of the present disclosure is shown. Figure 2 The encoding device can perform Fig.16 Specifically, for example, the predictor 220 of the encoding device may perform Fig.16 The entropy encoder 240 of the encoding device may perform step S1660. Fig.16 The method may include the above-mentioned embodiments of the present disclosure.
[0312] Reference Fig.16 , the encoding apparatus derives an inter prediction mode of a current block within a current picture S1600. Here, the inter prediction mode may include a merge mode, an AMVP mode (a mode using a motion vector predictor candidate), MMVD, and SMVD.
[0313] The encoding device derives a reference picture for an inter prediction mode. In one example, reference picture list 0 (or L0, reference picture list L0) or reference picture list 1 (or L1, reference picture list L1) may include reference pictures. For example, the encoding device may configure a reference picture list for each slice included in the current picture.
[0314] The encoding device derives motion information for prediction of the current block based on the inter prediction mode S1620. The motion information may include a reference picture index and a motion vector. For example, the encoding device may derive a reference index for SMVD. The reference index for SMVD may indicate a reference picture to which the SMVD is applied. The reference index for SMVD may include a reference index L0 (RefIdxSumL0) and a reference index L1 (RefIdxSumL1).
[0315] The encoding device may construct a motion vector predictor candidate list and derive a motion vector predictor based on the list. The encoding device may derive a motion vector based on the symmetric MVD and the motion vector predictor.
[0316] The encoding device generates a prediction sample based on the motion information S1630. The encoding device may generate the prediction sample based on the motion vector and the reference picture index included in the motion information. For example, the prediction sample may be generated based on a block (or sample) indicated by the motion vector among blocks (or samples) within the reference picture indicated by the reference picture index.
[0317] The encoding apparatus generates prediction-related information including the inter prediction mode S1640. The prediction-related information may include information about the MMVD and information about the SMVD.
[0318] The encoding device derives residual information based on the prediction sample S1650. Specifically, the encoding device may derive residual samples based on the prediction sample and the original sample. The encoding device may derive residual information based on the residual sample. The above-mentioned transformation and quantization process may be performed to derive residual information.
[0319] The encoding device encodes the image / video information including the prediction related information and the residual information S1660. The encoded image / video information can be output in the form of a bit stream. The bit stream can be sent to the decoding device via a network or a (digital) storage medium.
[0320] According to an embodiment of the present disclosure, the image / video information may include various types of information. For example, the image / video information may include information disclosed in at least one of Tables 1 to 23 above.
[0321] In one embodiment, the prediction related information may include inter prediction type information indicating whether bi-prediction is applied to the current block in the current picture. For example, based on the inter prediction type information, the prediction related information may include SMVD flag information indicating whether SMVD is applied. In addition, the reference picture may include a short-term reference picture. Based on the SMVD flag information, at least one reference picture index among the reference picture indexes indicating the short-term reference picture may be used to derive motion information.
[0322] In one embodiment, the reference picture index for deriving motion information may be derived based on the POC difference between each short-term reference picture and the current picture. Here, according to one embodiment, the POC difference between the current picture and the previous reference picture of the current picture may be greater than 0. In another example, the POC difference between the current picture and the next reference picture of the current picture may be less than 0. However, the above description is only an example.
[0323] In one embodiment, the encoding device may configure a reference picture list L0 (or reference picture list 0) for L0 prediction and a reference picture list L1 (or reference picture list 0) for L1 prediction. As an example, the short-term reference picture may include a first reference picture included in the reference picture list L0 and a second reference picture included in the reference picture list L1. The POC difference may include a first POC difference between the first reference picture and the current picture and a second POC difference between the second reference picture and the current picture. A first reference picture index pointing to the first reference picture may be derived based on the first POC difference, and a second reference picture index pointing to the second reference picture may be derived based on the second POC difference. The first and second reference picture indexes may be used as at least one reference picture index for deriving motion information.
[0324] In one embodiment, the first POC difference may be the same as the second POC difference.
[0325] In one embodiment, the encoding device may configure a reference picture list L0 for L0 prediction. The short-term reference picture may include the third and fourth reference pictures included in the reference picture list L0. As an example, the POC difference may include a third POC difference between the third reference picture and the current picture and a fourth POC difference between the fourth reference picture and the current picture. In addition, based on a comparison between the third and fourth POC differences, a third reference picture index indicating the third reference picture may be used as at least one reference picture index for deriving motion information.
[0326] In one embodiment, when the third POC difference is greater than the fourth POC difference, a third reference picture index pointing to the third reference picture may be used to derive motion information.
[0327] In one embodiment, the image information may include information about a motion vector difference (MVD). The motion information may include a motion vector. A first MVD for L0 prediction may be derived based on the information about the MVD. A second MVD for L1 prediction may be derived based on the first MVD.
[0328] In one embodiment, the size of the second MVD may be the same as the size of the first MVD. The sign of the second MVD may be opposite to the sign of the first MVD.
[0329] Fig.18 and 19 An example of an image / video decoding method and related components according to an embodiment of the present disclosure is illustrated. Figure 3 The decoding device can perform Fig.18 Specifically, for example, the entropy decoder 310 of the decoding device may perform Fig.18The predictor 330 of the decoding device may perform steps S1810 to S1830, the residual processor 320 of the decoding device may perform step S1840, and the adder 340 of the decoding device may perform step S1850. Fig.18 The method may include the above-mentioned embodiments of the present disclosure.
[0330] Reference Fig.18 , the decoding device receives / obtains image / video information S1800. The decoding device may receive / obtain image / video information through a bit stream. The image / video information may include prediction related information (including prediction mode information) and residual information. The prediction related information may include information about MMVD and information about SMVD. In addition, according to an embodiment of the present disclosure, the image / video information may include various types of information. For example, the image / video information may include reference information. Figures 1 to 15 Information described and / or referenced to information disclosed in at least one of Tables 1 to 23 above.
[0331] The decoding apparatus derives an inter prediction mode of the current block based on the prediction related information S1810. Here, the inter prediction mode may include a merge mode, an AMVP mode (a mode using a motion vector predictor candidate), MMVD, and SMVD.
[0332] The decoding device derives motion information for prediction of the current block based on the inter prediction mode S1820. The motion information may include a reference picture index and a motion vector. For example, the decoding device may derive a reference index for SMVD. The reference index for SMVD may indicate a reference picture to which the SMVD is applied. The reference index for SMVD may include a reference index L0 (RefIdxSumL0) and a reference index L1 (RefIdxSumL1).
[0333] The decoding device may construct a motion vector predictor candidate list and derive a motion vector predictor based on the list.The decoding device may derive a motion vector based on the symmetric MVD and the motion vector predictor.
[0334] The decoding device generates a prediction sample based on the motion information S1830. The decoding device may generate the prediction sample based on the motion vector and the reference picture index included in the motion information. For example, the prediction sample may be generated based on a block (or sample) indicated by the motion vector among blocks (or samples) within the reference picture indicated by the reference picture index.
[0335] The decoding device may generate residual samples based on the residual information S1840. Specifically, the decoding device may derive quantized transform coefficients based on the residual information. The quantized transform coefficients may have a one-dimensional vector form based on a coefficient scanning order. The decoding device may derive the transform coefficients based on an inverse quantization process for the quantized transform coefficients. The decoding device may derive residual samples based on an inverse transform process for the transform coefficients.
[0336] The decoding device may generate a reconstructed sample of the current picture based on the prediction sample and the residual sample S1850. The decoding device may further perform a filtering procedure to generate a (modified) reconstructed sample.
[0337] In one embodiment, the prediction related information may include inter prediction type information indicating whether bi-prediction is applied to the current block in the current picture. For example, based on the inter prediction type information, the prediction related information may include SMVD flag information indicating whether SMVD is applied. In addition, the reference picture may include a short-term reference picture. Based on the SMVD flag information, at least one reference picture index among the reference picture indexes indicating the short-term reference picture may be used to derive motion information.
[0338] In one embodiment, the reference picture index for deriving motion information may be derived based on the POC difference between each of the short-term reference pictures and the current picture. Here, according to one embodiment, the POC difference between the current picture and the previous reference picture of the current picture may be greater than 0. In another example, the POC difference between the current picture and the next reference picture of the current picture may be less than 0. However, the above description is only an example.
[0339] In one embodiment, the decoding device may configure a reference picture list L0 (or reference picture list 0) for L0 prediction and a reference picture list L1 (or reference picture list 0) for L1 prediction. As an example, the short-term reference picture may include a first reference picture included in the reference picture list L0 and a second reference picture included in the reference picture list L1. The POC difference may include a first POC difference between the first reference picture and the current picture and a second POC difference between the second reference picture and the current picture. A first reference picture index pointing to the first reference picture may be derived based on the first POC difference, and a second reference picture index pointing to the second reference picture may be derived based on the second POC difference. The first and second reference picture indexes may be used as at least one reference picture index for deriving motion information.
[0340] In one embodiment, the first POC difference may be the same as the second POC difference.
[0341] In one embodiment, the decoding device may configure a reference picture list L0 for L0 prediction. The short-term reference picture may include the third and fourth reference pictures included in the reference picture list L0. As an example, the POC difference may include a third POC difference between the third reference picture and the current picture and a fourth POC difference between the fourth reference picture and the current picture. In addition, based on a comparison between the third and fourth POC differences, a third reference picture index indicating the third reference picture may be used as at least one reference picture index for deriving motion information.
[0342] In one embodiment, when the third POC difference is greater than the fourth POC difference, a third reference picture index pointing to the third reference picture may be used to derive motion information.
[0343] In one embodiment, the image information may include information about the MVD. The motion information may include a motion vector. For example, a first MVD for L0 prediction may be derived based on the information about the MVD, and a second MVD for L1 prediction may be derived based on the first MVD. Therefore, a motion vector may be derived based on the first and second MVDs.
[0344] In one embodiment, the size of the second MVD may be the same as the size of the first MVD. The sign of the second MVD may be opposite to the sign of the first MVD.
[0345] In the above embodiments, the method is described based on the flowchart as a series of steps or boxes, but the corresponding embodiments are not limited to the order of steps, and specific steps may occur in an order different from the above order or at the same time as steps different from the above order. In addition, those skilled in the art will understand 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 this document.
[0346] The above-mentioned method according to the embodiment of the present document may be implemented in the form of software, and the encoding device and / or decoding device according to the present document may be included in a device for performing image processing, such as a TV, a computer, a smart phone, a set-top box, a display device, etc.
[0347] When the embodiments in this document are implemented in software, the above methods can be implemented as modules (processes, functions, etc.) for performing the above functions. The module can be stored in a memory and 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), other chipsets, logic circuits, and / or data processing devices. 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. That is, the embodiments described in this document may be implemented and executed on a processor, a microprocessor, a controller, or a chip. For example, the functional units shown in the various figures may be implemented and executed on a computer, a processor, a microprocessor, a controller, or a chip. In this case, information (e.g., information about instructions) or algorithms for implementation may be stored in a digital storage medium.
[0348] In addition, the decoding device and the encoding device to which the embodiments of this document are applied may be included in a multimedia broadcast sending and receiving device, a mobile communication terminal, a home theater video device, a digital theater video device, a surveillance camera, a video chat device, a real-time communication device (e.g., video communication), a mobile streaming device, a storage medium, a camera, a video on demand (VoD) service provider, an over-the-top (OTT) video device, an Internet streaming service provider, a 3D video device, a virtual reality (VR) device, an augmented reality device, a video phone video device, a transportation tool terminal (e.g., a vehicle (including an autonomous vehicle) terminal, an aircraft terminal, a ship terminal, etc.), a medical video device, etc., and may be used to process a video signal or a data signal. For example, an over-the-top video (OTT) device may include a game console, a Blu-ray player, an Internet access TV, a home theater system, a smart phone, a tablet PC, a digital video recorder (DVR), etc.
[0349] In addition, the processing method of the embodiment of the present document is applied and 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 the embodiment of the present document 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. For example, computer-readable recording media may include Blu-ray discs (BD), universal serial buses (USB), ROMs, PROMs, EPROMs, EEPROMs, RAMs, CD-ROMs, magnetic tapes, floppy disks, and optical data storage devices. In addition, computer-readable recording media also include media implemented in the form of carrier waves (e.g., transmission via the Internet). In addition, the bit stream generated by the encoding method can be stored in a computer-readable recording medium or sent via wired and wireless communication networks.
[0350] In addition, the embodiments of this document may be implemented as a computer program product through program code, and the program code may be executed on a computer through the embodiments of this document. The program code may be stored on a carrier that can be read by a computer.
[0351] Fig. 20 An example of a content streaming system to which the embodiments disclosed in this document can be applied is shown.
[0352] refer to Fig. 20 The content streaming system to which the embodiments of this document are applied may mainly include an encoding server, a streaming server, a web server, a media storage device, a user device, and a multimedia input device.
[0353] The encoding server compresses the content input from the multimedia input device (e.g., a smart phone, a camera, or a video camera) into digital data to generate a bitstream and sends the generated bitstream to the streaming server. As another example, when the multimedia input device (e.g., a smart phone, a camera, or a video camera) directly generates the bitstream, the encoding server can be omitted.
[0354] The bitstream may be generated by applying the encoding method or the method of generating a bitstream of the present disclosure, and the streaming server may temporarily store the bitstream while transmitting or receiving the bitstream.
[0355] The streaming server sends multimedia data to the user device based on the user request through the web server, and the web server plays the role of informing the user which services are available. If the user requests the desired service from the web server, the web server sends the request to the streaming server, and the streaming server sends the multimedia data to the user. At this time, the content streaming system may include a separate control server, and in this case, the control server plays the role of controlling the command / response between the devices in the content streaming system.
[0356] The streaming server may receive content from a media storage device and / or an encoding server. For example, if the content is received 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 predetermined period of time.
[0357] Examples of user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation terminals, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smart watches or smart glasses), digital TVs, desktop computers, and digital signage.
[0358] Each individual server within the content streaming system may operate as a distributed server, and in such a case, data received by the individual servers may be processed in a distributed manner.
[0359] The claims described herein can be combined in various ways. For example, the technical features of the method claims of this document can be combined and implemented as a device, and the technical features of the device claims of this document can be combined and implemented as a method. In addition, the technical features of the method claims of this document and the technical features of the device claims can be combined to be implemented as a device, and the technical features of the method claims of this document and the technical features of the device claims can be combined and implemented as a method.
Claims
1. A decoding device for image decoding, the decoding device comprising: Memory; as well as at least one processor connected to the memory, the at least one processor being configured to: receiving image information including prediction related information and residual information from a bitstream; deriving an inter-frame prediction mode for a current block based on the prediction related information; deriving motion information of the current block based on the inter-frame prediction mode; generating a prediction sample of the current block based on the motion information; generating a residual sample of the current block based on the residual information; as well as generating a reconstructed sample of the current block based on the predicted sample and the residual sample, The prediction related information includes inter-frame prediction type information specifying whether bi-prediction is applied to the current block, Wherein, based on the inter-frame prediction type information, the prediction related information further includes SMVD flag information specifying whether to apply a symmetric motion vector difference (SMVD), wherein, based on the SMVD flag information, at least one reference picture index indicating a short-term reference picture among the reference picture indexes is derived as the motion information, and The at least one reference picture index used to derive the motion information is derived based on a picture order count (POC) difference between the short-term reference picture and the current picture.
2. A coding device for image coding, the coding device comprising: Memory; as well as at least one processor connected to the memory, the at least one processor being configured to: deriving an inter prediction mode for a current block; deriving motion information of the current block based on the inter-frame prediction mode; generating a prediction sample of the current block based on the motion information; generating prediction related information related to the inter-frame prediction mode; generating residual information based on the prediction samples; as well as encoding the image information including the prediction related information and the residual information, The prediction related information includes inter-frame prediction type information specifying whether bi-prediction is applied to the current block, Wherein, based on the inter-frame prediction type information, the prediction related information further includes SMVD flag information specifying whether to apply a symmetric motion vector difference (SMVD), wherein, based on the SMVD flag information, at least one reference picture index indicating a short-term reference picture among the reference picture indexes is derived as the motion information, and The at least one reference picture index used to derive the motion information is derived based on a picture order count (POC) difference between the short-term reference picture and the current picture.
3. A device for transmitting data for an image, the device comprising: at least one processor configured to obtain a bitstream for an image, wherein the bitstream is generated based on the following steps: deriving an inter-frame prediction mode for a current block, deriving motion information of the current block based on the inter-frame prediction mode, generating a prediction sample of the current block based on the motion information, generating prediction-related information related to the inter-frame prediction mode, generating residual information based on the prediction sample, and encoding image information including the prediction-related information and the residual information; as well as a transmitter configured to transmit the data including the bit stream, The prediction related information includes inter-frame prediction type information specifying whether bi-prediction is applied to the current block, Wherein, based on the inter-frame prediction type information, the prediction related information further includes SMVD flag information specifying whether to apply a symmetric motion vector difference (SMVD), wherein, based on the SMVD flag information, at least one reference picture index indicating a short-term reference picture among the reference picture indexes is derived as the motion information, and The at least one reference picture index used to derive the motion information is derived based on a picture order count (POC) difference between the short-term reference picture and the current picture.