Temporal motion vector predictor candidate-based image or video coding of sub block unit

The sbTMVP method addresses the challenge of efficiently compressing high-resolution video data by deriving temporal motion vectors at sub-block levels, enhancing compression efficiency and reducing costs in video coding.

JP2024169600AActive Publication Date: 2024-12-05LG ELECTRONICS INC
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2024162338
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2019-06-13
Filing Date
2024-09-19
Publication Date
2024-12-05
Estimated Expiration
2040-06-15

AI Technical Summary

Technical Problem

The increasing demand for high-resolution and high-quality images/videos, such as 4K or 8K UHD, along with the rise of immersive media like VR and AR, poses challenges in efficiently compressing, transmitting, and storing video data due to the increased amount of information, leading to higher transmission and storage costs.

Method used

A method and apparatus for video coding that utilizes sub-block temporal motion vector prediction (sbTMVP) to derive temporal motion vectors based on sub-blocks, integrating corresponding positions at both sub-coding and coding block levels for improved prediction performance.

Benefits of technology

This approach enhances video compression efficiency, reduces computational complexity, and simplifies hardware implementation by efficiently calculating temporal motion vectors, thereby improving overall coding efficiency and reducing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024169600000001_ABST
    Figure 2024169600000001_ABST
Patent Text Reader

Abstract

To provide methods and apparatuses enabling video / image coding efficiency to increase.SOLUTION: An image decoding method performed by a decoding device includes: deriving a reference sub block in a collocated reference picture relative to a sub block in a current block; deriving motion information relative to a sub block in the current block, on the basis of temporal motion information candidates based on a sub block derived based on the reference sub block; and generating reconstructed samples on the basis of prediction samples generated based on the motion information and residual samples generated based on residual information obtained from bit streams. The reference sub block is derived from the collocated reference picture by applying a motion shift in a bottom-right center sample position of each sub block in the current block, and the motion shift is executed based on a motion vector derived from a spatial neighboring block of the current block, the spatial neighboring block being a left-neighboring block.SELECTED DRAWING: Figure 23
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present technology relates to video or image coding, for example, image or video coding techniques based on sub-block-based temporal motion vector predictor candidates. [Background technology]

[0002] Recently, the demand for high-resolution, high-quality images / videos such as 4K or 8K or higher UHD (Ultra High Definition) images / videos is increasing in various fields. As the image / video data has higher resolution and quality, the amount of information or bits transmitted increases relatively compared to existing image / video data, so when the image data is transmitted using existing media such as wired or wireless broadband lines, or when the image / video data is stored using existing storage media, the transmission costs and storage costs increase.

[0003] In addition, interest in and demand for immersive media such as virtual reality (VR), artificial reality (AR) content and holograms has been increasing recently, and the broadcast of images / videos with different visual characteristics from real images, such as game images, is on the rise.

[0004] Therefore, there is a demand for a highly efficient image / video compression technology in order to effectively compress, transmit, store, and play back high-resolution, high-quality image / video information having the above-mentioned various characteristics.

[0005] In addition, there is a discussion about a sub-block unit temporal motion vector prediction technique to improve the efficiency of image / video coding. For this purpose, a method is required to efficiently perform a process of patching a sub-block unit motion vector in the sub-block unit temporal motion vector prediction. Summary of the Invention [Problem to be solved by the invention]

[0006] The technical problem of this document is to provide a method and apparatus for improving the efficiency of video / image coding.

[0007] Another technical problem of this document is to provide an efficient inter-prediction method and apparatus.

[0008] It is still another technical object of the present invention to provide a method and apparatus for deriving sub-block based temporal motion vectors to improve prediction performance.

[0009] It is still another technical object of the present invention to provide a method and apparatus for efficiently deriving corresponding positions of sub-blocks for deriving (guiding) a sub-block-based temporal motion vector.

[0010] It is still another technical object of the present invention to provide a method and apparatus for integrating corresponding positions at a sub-coding block level and corresponding positions at a coding block level to derive a sub-block-based temporal motion vector. [Means for solving the problem]

[0011] According to one embodiment of this document, in subblock-based Temporal Motion Vector Prediction (sbTMVP), a subblock-based motion vector for a current block can be derived based on a reference subblock on (within) a collocated reference picture.

[0012] According to one embodiment of this document, reference sub-blocks on a collocated reference picture for multiple sub-blocks in a current block can be derived based on center sample positions of each of the sub-blocks in the current block.

[0013] According to one embodiment of this document, for subblock-wise motion vectors for unavailable reference subblocks in a reference subblock, a base motion vector may be used.

[0014] According to one embodiment of this document, a base motion vector can be derived on (from) a co-located reference picture based on a center sample position of the current block.

[0015] According to an embodiment of the present document, there is provided a video / image decoding method performed by a decoding device, the video / image decoding method may include the methods disclosed in the embodiments of the present document.

[0016] According to an embodiment of the present document, there is provided a decoding device for performing video / image decoding, the decoding device being capable of executing the method disclosed in the embodiment of the present document.

[0017] According to an embodiment of the present document, there is provided a video / image encoding method performed by an encoding device, the video / image encoding method may include the methods disclosed in the embodiments of the present document.

[0018] According to an embodiment of the present document, an encoding device for performing video / image encoding is provided, the encoding device being capable of performing the method disclosed in the embodiment of the present document.

[0019] According to one embodiment of the present document, there is provided a computer-readable digital storage medium having encoded video / image information stored thereon generated according to the video / image encoding method disclosed in at least one of the embodiments of the present document.

[0020] According to one embodiment of the present document, there is provided a computer-readable digital storage medium having encoded information or encoded video / image information stored thereon, which causes a decoding device to execute the video / image decoding method disclosed in at least one of the embodiments of the present document. Effect of the Invention

[0021] The present document may provide various effects. For example, the overall image / video compression efficiency may be improved. In addition, the computational complexity may be reduced through efficient inter-prediction, thereby improving the overall coding efficiency. In addition, the efficiency in terms of complexity and prediction performance may be improved by efficiently calculating the corresponding positions of sub-blocks for deriving sub-block-based temporal motion vectors in subblock-based temporal motion vector prediction (sbTMVP). In addition, the method of calculating the corresponding positions of sub-coding block level and coding block level for deriving sub-block-based temporal motion vectors may be integrated, thereby simplifying the implementation of hardware.

[0022] The effects obtained through the specific embodiments of this document are not limited to the effects listed above. For example, there may be various technical effects that a person having ordinary skill in the related art can understand or derive from this document. Thus, the specific effects of this document are not limited to those explicitly described in this document, and may include various effects that can be understood or derive from the technical features of this document. [Brief description of the drawings]

[0023] [Figure 1] FIG. 1 illustrates a schematic diagram of an example video / image coding system to which embodiments of the present document may be applied. [Diagram 2] FIG. 1 is a diagram illustrating the configuration of a video / image encoding device to which an embodiment of the present document can be applied. [Diagram 3] FIG. 1 is a diagram illustrating the configuration of a video / image decoding device to which an embodiment of the present document can be applied. [Figure 4] FIG. 1 illustrates an example of a general video / image encoding method to which embodiments of the present document may be applied. [Diagram 5] FIG. 1 illustrates an example of a general video / image decoding method to which embodiments of the present document may be applied. [Figure 6] FIG. 1 illustrates an example of a general inter-prediction based video / image encoding method to which embodiments of the present document can be applied. [Figure 7] FIG. 1 illustrates an example of a general inter-prediction based video / picture decoding method to which embodiments of the present document can be applied. [Figure 8] FIG. 13 is a diagram exemplarily illustrating an inter prediction procedure. [Figure 9] FIG. 2 is a diagram illustrating an example of spatial and temporal neighboring blocks of a current block. [Figure 10] A diagram showing an example of spatially adjacent blocks that can be used to derive sub-block based temporal motion information candidates (sbTMVP candidates). [Figure 11] FIG. 1 is a diagram for explaining the process of deriving sub-block based temporal motion information candidates (sbTMVP candidates). [Figure 12] FIG. 13 is a diagram illustrating a method for calculating corresponding positions for deriving default MVs and sub-block MVs according to block size during the sbTMVP derivation process. [Figure 13] FIG. 13 is a diagram illustrating a method for calculating corresponding positions for deriving default MVs and sub-block MVs according to block size during the sbTMVP derivation process. [Figure 14]FIG. 13 is a diagram illustrating a method for calculating corresponding positions for deriving default MVs and sub-block MVs according to block size during the sbTMVP derivation process. [Figure 15] FIG. 13 is a diagram illustrating a method for calculating corresponding positions for deriving default MVs and sub-block MVs according to block size during the sbTMVP derivation process. [Figure 16] FIG. 13 is an exemplary diagram illustrating a method of integrating corresponding positions for deriving a default MV and a sub-block MV according to a block size in the process of deriving an sbTMVP. [Figure 17] FIG. 13 is an exemplary diagram illustrating a method of integrating corresponding positions for deriving a default MV and a sub-block MV according to a block size in the process of deriving an sbTMVP. [Figure 18] FIG. 13 is an exemplary diagram illustrating a method of integrating corresponding positions for deriving a default MV and a sub-block MV according to a block size in the process of deriving an sbTMVP. [Figure 19] FIG. 13 is an exemplary diagram illustrating a method of integrating corresponding positions for deriving a default MV and a sub-block MV according to a block size in the process of deriving an sbTMVP. [Figure 20] FIG. 13 is an exemplary diagram illustrating a schematic configuration of a pipeline that can integrate and calculate corresponding positions for deriving default MVs and sub-block MVs in the process of deriving sbTMVP. [Figure 21] FIG. 13 is an exemplary diagram illustrating a schematic configuration of a pipeline that can integrate and calculate corresponding positions for deriving default MVs and sub-block MVs in the process of deriving sbTMVP. [Figure 22]FIG. 1 illustrates a schematic diagram of an example video / image encoding method according to an embodiment of the present document. [Figure 23] FIG. 2 is a schematic diagram illustrating an example of a video / image decoding method according to an embodiment of the present document; [Figure 24] FIG. 1 illustrates an example of a content streaming system in which the embodiments disclosed herein can be applied. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0024] This document may have various modifications and may have various embodiments, and a specific embodiment will be illustrated in the drawings and described in detail. However, this is not intended to limit this document to a specific embodiment. Commonly used terms in this document are used merely to describe a specific embodiment, and are not intended to limit the technical ideas of this document. A singular expression includes a plural expression unless the context clearly indicates otherwise. In this document, the terms "include" or "have" are intended to specify the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and should be understood not to preclude the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.

[0025] Meanwhile, each component in the drawings described in this document is illustrated independently for the convenience of explaining the different characteristic functions, and does not mean that each component is realized by separate hardware or software. For example, two or more components among the components may be combined to form one component, or one component may be divided into multiple components. An embodiment in which each component is integrated and / or separated is also included in the scope of the rights of this document as long as it does not deviate from the essence of this document.

[0026] In this document, "A or B" can mean "only A," "only B," or "both A and B." Also, in this document, "A or B" can be interpreted as "A and / or B." For example, in this document, "A, B or C" can mean "only A," "only B," "only C," or "any combination of A, B and C."

[0027] A slash ( / ) or a comma (comma) used in this document can mean "and / or." For example, "A / B" can mean "A and / or B." Thus, "A / B" can mean "only A," "only B," or "both A and B." For example, "A, B, C" can mean "A, B, or C."

[0028] In this document, "at least one of A and B" can mean "only A," "only B," or "both A and B." Also, in this document, the expressions "at least one of A or B" and "at least one of A and / or B" can be interpreted in the same way as "at least one of A and B."

[0029] Additionally, in this document, "at least one of A, B and C" can mean "only A," "only B," "only C," or "any combination of A, B and C." Additionally, "at least one of A, B or C" and "at least one of A, B and / or C" can mean "at least one of A, B and C."

[0030] Furthermore, parentheses used in this document may mean "for example." Specifically, when "prediction (intra prediction)" is displayed, "intra prediction" is proposed as an example of "prediction." In other words, "prediction" in this document is not limited to "intra prediction," and "intra prediction" is proposed as an example of "prediction." Furthermore, when "prediction (i.e., intra prediction)" is displayed, "intra prediction" is proposed as an example of "prediction."

[0031] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document may be applied to methods disclosed in the Versatile Video Coding (VVC) standard. Also, the methods / embodiments disclosed in this document may be applied to methods disclosed in the Essential Video Coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the 2nd Generation Of Audio Video Coding Standard (AVS2) or next-generation video / image coding standards (e.g., H.267 or H.267).

[0032] This document presents various embodiments for video / image coding, which may also be implemented in combination with one another, unless otherwise stated.

[0033] In this document, video may mean a collection of a series of images over time. A picture generally means a unit showing one image in a particular time period, and a slice / tile is a unit constituting a part of a picture in coding. A slice / tile may include one or more coding tree units (CTUs). One picture may be composed of one or more slices / tiles. A tile is a rectangular region of CTUs within a particular tile column and particular tile row in a picture. The tile column is a rectangular region of CTUs having a height equal to the height of the picture and a width specified by syntax elements in the picture parameter set. The tile row is a rectangular region of CTUs having a height specified by syntax elements in the picture parameter set and a width equal to the width of the picture.A tile scan may indicate a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a tile whereas tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture. A slice includes an integer number of complete tiles or an integer number of consecutive complete CTU rows within a tile of a picture that may be exclusively contained in a single NAL unit.

[0034] On the other hand, a picture can be partitioned into two or more sub-pictures, where a sub-picture is a rectangular region of one or more slices within a picture.

[0035] A pixel or a pel may refer to the smallest unit constituting one picture (or image). A term corresponding to a pixel may also be used as a "sample." A sample may generally refer to a pixel or a pixel value, may refer to only a pixel / pixel value of a luma component, or may refer to only a pixel / pixel value of a chroma component. Alternatively, a sample may refer to a pixel value in a spatial domain, or may refer to a transform coefficient in the frequency domain when such a pixel value is transformed into a frequency domain.

[0036] A unit may indicate a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. A unit may include one luma block and two chroma (e.g., cb, cr) blocks. A unit may be mixed with terms such as block or area in some cases. In a general case, an M×N block may include a sample (or sample array) consisting of M columns and N rows, or a set (or array) of transform coefficients.

[0037] Also, in this document, at least one of quantization / dequantization and / or transform / inverse transform can be omitted. When quantization / dequantization is omitted, the quantized transform coefficients can be referred to as transform coefficients. When transform / inverse transform is omitted, the transform coefficients can also be referred to as coefficients or residual coefficients, or can still be referred to as transform coefficients for uniformity of expression.

[0038] In this document, the quantized transform coefficients and the 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 coefficient(s), and the information about the transform coefficient(s) may be signaled via a residual coding syntax. Based on the residual information (or information about the transform coefficient(s)), the transform coefficients may be derived, and the scaled transform coefficients may be derived via an inverse transform (scaling) on ​​the transform coefficients. Based on the inverse transform (transform) on the scaled transform coefficients, the residual samples may be derived. This may be similarly applied / expressed in other parts of this document.

[0039] In this document, technical features described separately in one drawing may be embodied separately or simultaneously.

[0040] Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the accompanying drawings. Hereinafter, the same components in the drawings will be designated by the same reference numerals, and duplicated descriptions of the same components may be omitted.

[0041] FIG. 1 illustrates a schematic diagram of an example of a video / image coding system to which embodiments of the present document can be applied.

[0042] Referring to Figure 1, a video / image coding system may include a first device (source device) and a second device (receiving device). The source device may transmit encoded video / image information or data to the receiving device in a file or streaming form via a digital storage medium or a network.

[0043] The source device may include a video source, an encoding device, and a sending unit. The receiving device may include a receiving unit, a decoding device, and a renderer. The encoding device may be called a video / video encoding device, and the decoding device may be called a video / video decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may also include a display unit, which may be a separate device or an external component.

[0044] A video source may acquire video / images through a video / image capture, synthesis, or generation process, etc. A video source may include a video / image capture device and / or a video / image generation device. A video / image capture device may include, for example, one or more cameras, a video / image archive containing previously captured video / images, etc. A video / image generation device may include, for example, a computer, a tablet, a smartphone, etc., and may (electronically) generate video / images. For example, a virtual video / image may be generated via a computer, etc., in which case the video / image capture process may be replaced by a process in which related data is generated.

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

[0046] The transmitting unit can transmit the encoded video / image information or data output in the form of a bitstream to a receiving unit of a receiving device via a digital storage medium or a network in the form of a file or streaming. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitting unit can include elements for generating a media file through a predetermined file format and can include elements for transmission via a broadcasting / communication network. The receiving unit can receive / extract the bitstream and transmit it to a decoding device.

[0047] The decoding device can decode the video / image by performing a series of steps such as inverse quantization, inverse transformation, prediction, etc. that correspond to the operations of the encoding device.

[0048] The renderer can render the decoded video / image. The rendered video / image can be displayed via a display unit.

[0049] 2 is a diagram for illustrating a schematic configuration of a video / image encoding device to which an embodiment of this document can be applied. Hereinafter, the encoding device may include an image encoding device and / or a video encoding device.

[0050] Referring to FIG. 2, the encoding apparatus 200 may include an image partitioner 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter predictor 221 and an intra predictor 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 may further include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstructed block generator. The image division unit 210, the prediction unit 220, the residual processing unit 230, the entropy encoding unit 240, the addition unit 250, and the filtering unit 260 may be configured by one or more hardware components (e.g., an encoder chip set or a processor) depending on the embodiment. In addition, the memory 270 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The above hardware components may further include the memory 270 as an internal / external component.

[0051] The image division unit 210 may divide an input image (or picture, frame) input to the encoding device 200 into one or more processing units. As an example, the processing unit may be called a coding unit (CU). In this case, the coding unit may be recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) according to a quad-tree, binary-tree, ternary-tree (QTBTTT) structure. For example, one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad-tree structure, a binary tree structure, and / or a ternary tree structure. In this case, for example, the quad-tree structure may be applied first, and then the binary tree structure and / or the ternary tree structure may be applied. Alternatively, the binary tree structure may be applied first. The coding procedure according to this document may be performed based on the final coding unit that is not further divided. In this case, the largest coding unit may be used as the final coding unit based on coding efficiency according to image characteristics, or the coding unit may be recursively divided into coding units of lower depths as necessary, and a coding unit of an optimal size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later. As another example, the processing unit may further include a prediction unit (PU: Prediction Unit) or a transform unit (TU: Transform Unit). In this case, the prediction unit and the transform unit may each be divided or partitioned from the final coding unit described above.The prediction unit is a unit of sample prediction, and the transform unit is a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.

[0052] The unit may be mixed with terms such as block or area in some cases. In the general case, an M×N block may refer to a set of samples or transform coefficients consisting of M columns and N rows. A sample may generally refer to a pixel or pixel value, may refer to only a pixel / pixel value of a luma component, or may refer to only a pixel / pixel value of a chroma component. A sample may be used as a term corresponding to a pixel or pel of a picture (or image).

[0053] The encoding apparatus 200 may generate a residual signal (residual block, residual sample array) by subtracting a prediction signal (predicted block, prediction sample array) output from the inter prediction unit 221 or the intra prediction unit 222 from an input video signal (original block, original sample array), and the generated residual signal is transmitted to the conversion unit 232. In this case, as illustrated, a unit that subtracts a prediction signal (prediction block, prediction sample array) from an input video signal (original block, original sample array) in the encoder 200 may be called a subtraction unit 231. The prediction unit may perform prediction on a processing target block (hereinafter, referred to as a current block) and generate a predicted block including a prediction sample for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied in units of the current block or CU. The prediction unit may generate various information related to prediction, such as prediction mode information, and transmit the information to the entropy encoding unit 240, as will be described later in the description of each prediction mode. The prediction information can be encoded by the entropy encoder 240 and output in the form of a bitstream.

[0054] The intra prediction unit 222 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from the current block depending on the prediction mode. Prediction modes in intra prediction may include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes may include, for example, a DC mode and a planar mode. The directional modes may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the degree of granularity of the prediction direction. However, this is merely an example, and more or less directional prediction modes may be used depending on the setting. The intra prediction unit 222 may also determine a prediction mode to be applied to the current block using a prediction mode applied to a neighboring block.

[0055] The inter prediction unit 221 may derive a predicted block for the current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring blocks may include a spatial neighboring block present in the current picture and a temporal neighboring block 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 called a collocated reference block, a collocated CU (colCU), etc., and the reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, the inter prediction unit 221 may generate information indicating which candidate is used to construct a motion information candidate list based on neighboring blocks and derive a motion vector and / or a reference picture index of the current block. Inter prediction may be performed based on various prediction modes, and for example, in the case of skip mode and merge mode, the inter prediction unit 221 may use the motion information of the neighboring blocks as the motion information of the current block. In the case of skip mode, unlike the merge mode, a residual signal may not be transmitted.In the case of a Motion Vector Prediction (MVP) mode, the motion vector of a neighboring block can be used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling the motion vector difference.

[0056] The prediction unit 220 may generate a prediction signal based on various prediction methods, which will be described later. For example, the prediction unit may apply intra prediction or inter prediction for prediction of one block, and may simultaneously apply intra prediction and inter prediction. This may be called combined inter and intra prediction (CIIP). The prediction unit may also be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode may be used for content image / moving image coding such as games, for example, as in Screen Content Coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in deriving a reference block within the current picture. That is, IBC may utilize at least one of the inter prediction techniques described in this document. The palette mode may be considered as an example of intra coding or intra prediction. When the palette mode is applied, a sample value within a picture may be signaled based on information regarding a palette table and a palette index.

[0057] The prediction signal generated through the prediction unit (including the inter prediction unit 221 and / or the intra prediction unit 222) may be used to generate a reconstruction signal or may be used to generate a residual signal. The transform unit 232 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loeve transform (KLT), a graph-based transform (GBT), or a conditionally non-linear transform (CNT). Here, the GBT refers to a transform obtained from a graph when the relationship information between pixels is expressed as a graph. The CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process may be applied to pixel blocks having the same square size, or may be applied to blocks of various (variable) sizes that are not square.

[0058] The quantizer 233 quantizes the transform coefficients and transmits them to the entropy encoder 240, which may encode the quantized signal (information on the quantized transform coefficients) and output the encoded signal to a bitstream. The information on the quantized transform coefficients may be referred to as residual information. The quantizer 233 may rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and may generate information on the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. The entropy encoder 240 may perform various encoding methods, such as exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC). The entropy encoder 240 may also encode information required for video / image restoration (e.g., values ​​of syntax elements, etc.) together with or separately from the quantized transform coefficients. The encoded information (e.g., encoded video / video information) may be transmitted or stored in the form of a bitstream in Network Abstraction Layer (NAL) unit units. The video / video information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / video information may further include general constraint information. In this document, information and / or syntax elements transmitted / signaled from an encoding device to a decoding device may be included in the video / video information. The video / video information may be encoded through the above-mentioned encoding procedure and included in the bitstream.The bitstream may be transmitted via a network or may be stored in a digital storage medium. Here, the network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitting unit (not shown) for transmitting the signal output from the entropy encoding unit 240 and / or a storage unit (not shown) for storing the signal may be configured as an internal / external element of the encoding device 200, or the transmitting unit may be included in the entropy encoding unit 240.

[0059] The quantized transform coefficients output from the quantizer 233 may be used to generate a prediction signal. For example, a residual signal (residual block or residual sample) may be restored by applying inverse quantization and inverse transform to the quantized transform coefficients via the inverse quantizer 234 and the inverse transformer 235. The adder 155 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the inter predictor 221 or the intra predictor 222. When there is no residual for the current block, such as when a skip mode is applied, the predicted block may be used as the reconstructed block. The adder 250 may be referred to as a reconstruction unit or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of the next current block in the current picture, and may also be used for inter prediction of the next picture after filtering, as described below.

[0060] Meanwhile, Luma Mapping with Chroma Scaling (LMCS) may be applied during picture encoding and / or restoration.

[0061] The filtering unit 260 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 260 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may store the modified reconstructed picture in the memory 270, specifically, in the DPB of the memory 270. The various filtering methods may include, for example, deblock filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc. The filtering unit 260 may generate various information related to filtering and transmit it to the entropy encoding unit 240, as will be described later in relation to each filtering method. The information related to filtering may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.

[0062] The modified reconstructed picture transmitted to the memory 270 may be used as a reference picture in the inter prediction unit 221. When inter prediction is applied through this, the encoding apparatus may avoid a prediction mismatch between the encoding apparatus 100 and the decoding apparatus, and may also improve encoding efficiency.

[0063] The DPB of the memory 270 may store the modified reconstructed picture for use as a reference picture in the inter prediction unit 221. The memory 270 may store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 221 for use as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 270 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 222.

[0064] 3 is a diagram for explaining the configuration of a video / image decoding device to which the embodiments of the present document can be applied. Hereinafter, the decoding device may include an image decoding device and / or a video decoding device.

[0065] Referring to FIG. 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 inter predictor 331 and an intra predictor 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 321. The entropy decoder 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be configured as one hardware component (e.g., a decoder chipset or processor) according to an embodiment. Also, the memory 360 may include a decoded picture buffer (DPB) and may be configured as a digital storage medium. The above hardware components may further include a memory 360 as an internal / external component.

[0066] When a bitstream including video / image information is input, the decoding apparatus 300 can restore an image corresponding to a process in which the video / image information is processed by the encoding apparatus of FIG. 2. For example, the decoding apparatus 300 can derive units / blocks based on block division related information obtained from the bitstream. The decoding apparatus 300 can perform decoding using a processing unit applied in the encoding apparatus. Thus, the processing unit for decoding is, for example, a coding unit, and the coding unit can be divided from a coding tree unit or a maximal 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. Then, the restored image signal decoded and output by the decoding apparatus 300 can be reproduced by a reproduction device.

[0067] The decoding device 300 may receive a signal output from the encoding device of FIG. 2 in the form of a bitstream, and the received signal may be decoded via the entropy decoding unit 310. For example, the entropy decoding unit 310 may derive information (e.g., video / image information) required for image restoration (or picture restoration) by parsing the bitstream. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. The decoding device may decode a picture based on information on the parameter set and / or the general constraint information. Signaling / received information and / or syntax elements described later in this document may be decoded via the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 may decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output values ​​of syntax elements required for image restoration and quantized values ​​of transform coefficients related to residuals. More specifically, the CABAC entropy decoding method may receive bins corresponding to each syntax element in a bitstream, determine a context model using syntax element information (and adjacent and) to be decoded, decoding information of a block to be decoded, or symbol / bin information decoded in a previous step, predict the occurrence probability of bins according to the determined context model, and perform arithmetic decoding of the bins to generate symbols corresponding to the values ​​of each syntax element.In this case, the CABAC entropy decoding method may update the context model using information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. Among the information decoded by the entropy decoding unit 310, information related to prediction is provided to a prediction unit (inter prediction unit 332 and intra prediction unit 331), and the residual value entropy-decoded by the entropy decoding unit 310, i.e., the quantized transform coefficient and related parameter information, may be input to the residual processing unit 320. The residual processing unit 320 may derive a residual signal (residual block, residual sample, residual sample array). In addition, among the information decoded by the entropy decoding unit 310, information related to filtering may be provided to the filtering unit 350. Meanwhile, a receiving unit (not shown) that receives a signal output from the encoding device may be further configured as an internal / external element of the decoding device 300, or the receiving unit may be a component of the entropy decoding unit 310. Meanwhile, the decoding device according to this document may be called 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 decoding unit 310, and the sample decoder may include at least one of the inverse quantization unit 321, the inverse transform unit 322, the addition unit 340, the filtering unit 350, the memory 360, the inter prediction unit 332, and the intra prediction unit 331.

[0068] The inverse quantization unit 321 may inverse quantize the quantized transform coefficients to output transform coefficients. The inverse quantization unit 321 may rearrange the quantized transform coefficients in a two-dimensional block form. In this case, the rearrangement may be performed based on a coefficient scan order performed in the encoding device. The inverse quantization unit 321 may perform inverse quantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.

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

[0070] The prediction unit may perform prediction on a current block and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on information on the prediction output from the entropy decoding unit 310, and may determine a specific intra / inter prediction mode.

[0071] The prediction unit 320 may generate a prediction signal based on various prediction methods, which will be described later. For example, the prediction unit may apply intra prediction or inter prediction for prediction of one block, and may simultaneously apply intra prediction and inter prediction. This may be called combined inter and intra prediction (CIIP). In addition, the prediction unit may be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode may be used for content image / moving image coding such as games, for example, as in Screen Content Coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in that a reference block is derived within the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document. The palette mode may be considered as an example of intra coding or intra prediction. When the palette mode is applied, information regarding a palette table and a palette index may be included in the video / image information and signaled.

[0072] The intra prediction unit 331 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located far away depending on the prediction mode. Prediction modes in intra prediction may include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 331 may also determine a prediction mode to be applied to the current block using a prediction mode applied to a neighboring block.

[0073] The inter prediction unit 332 may derive a predicted block for the current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the inter prediction unit 332 may configure a motion information candidate list based on the neighboring blocks and derive a motion vector and / or a reference picture index for the current block based on the received candidate selection information. Inter prediction may be performed based on various prediction modes, and the information regarding the prediction may include information indicating a mode of inter prediction for the current block.

[0074] The adder 340 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to a prediction signal (predicted block, predicted sample array) output from a prediction unit (including the inter prediction unit 332 and / or the intra prediction unit 331). When there is no residual for a current block, such as when a skip mode is applied, the predicted block can be used as a reconstructed block.

[0075] The adder 340 may be referred to as a reconstruction unit or a reconstruction block generator. The generated reconstruction signal may be used for intra prediction of the next block to be processed in the current picture, and may be output after filtering as described below, or may be used for inter prediction of the next picture.

[0076] Meanwhile, Luma Mapping with Chroma Scaling (LMCS) can be applied in the picture decoding process.

[0077] The filtering unit 350 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 350 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may transmit the modified reconstructed picture to the memory 360, specifically, to the DPB of the memory 360. The various filtering methods may include, for example, deblock filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.

[0078] The (modified) reconstructed picture stored in the DPB of the memory 360 may be used as a reference picture in the inter prediction unit 332. The memory 360 may store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 260 to be utilized as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 360 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 331.

[0079] In this document, the embodiments described for the filtering unit 260, the inter prediction unit 221, and the intra prediction unit 222 of the encoding device 200 can also be applied identically or correspondingly to the filtering unit 350, the inter prediction unit 332, and the intra prediction unit 331 of the decoding device 300, respectively.

[0080] As described above, prediction is performed to improve compression efficiency when performing video coding. Through this, a predicted block including predicted samples for a current block, which is a block to be coded, can be generated. Here, the predicted block includes predicted samples in a spatial domain (or a pixel domain). The predicted block is derived in the same manner by an encoding device and a decoding device, and the encoding device can improve video coding efficiency by signaling information (residual information) on a residual between an original block and a predicted block, which is not an original sample value of the original block, to a decoding device. The decoding device can derive a residual block including residual samples based on the residual information, combine the residual block and the predicted block to generate a reconstructed block including reconstructed samples, and generate a reconstructed picture including the reconstructed block.

[0081] The residual information may be generated through a transform and quantization procedure. For example, the encoding apparatus may derive a residual block between an original block and a predicted block, perform a transform procedure on a residual sample (residual sample array) included in the residual block to derive a transform coefficient, and perform a quantization procedure on the transform coefficient to derive a quantized transform coefficient, and then signal the related residual information to a decoding apparatus (through a bitstream). Here, the residual information may include information such as value information, position information, transform technique, transform kernel, and quantization parameter of the quantized transform coefficient. The decoding apparatus may derive a residual sample (or a residual block) by performing an inverse quantization / inverse transform process based on the residual information. The decoding apparatus may generate a reconstructed picture based on the predicted block and the residual block. In addition, the encoding apparatus may derive a residual block by inverse quantizing / inverse transforming the quantized transform coefficient for reference for inter-prediction of a subsequent picture, and generate a reconstructed picture based on the residual block.

[0082] FIG. 4 shows an example of a schematic video / image encoding method to which embodiments of the present document may be applied.

[0083] The method disclosed in Fig. 4 may be performed by the encoding device 200 of Fig. 2. Specifically, S400 may be performed by the inter prediction unit 221 or the intra prediction unit 222 of the encoding device 200, and S410, S420, S430, and S440 may be performed by the subtraction unit 231, the transformation unit 232, the quantization unit 233, and the entropy encoding unit 240 of the encoding device 200, respectively.

[0084] Referring to Fig. 4, the encoding apparatus may derive a prediction sample through prediction for a current block (S400). The encoding apparatus may determine whether to perform inter prediction or intra prediction for the current block, and may determine a specific inter prediction mode or a specific intra prediction mode based on an RD cost. Depending on the determined mode, the encoding apparatus may derive a prediction sample for the current block.

[0085] The encoding apparatus can derive residual samples by comparing original samples and predicted samples for the current block (S410).

[0086] The encoding apparatus may derive transform coefficients via a transform procedure on the residual samples (S420), and quantize the derived transform coefficients to derive quantized transform coefficients (S430).

[0087] The encoding device may encode video information including prediction information and residual information, and output the encoded video information in the form of a bitstream (S440). The prediction information is information related to a prediction procedure, and may include prediction mode information and information related to motion information (e.g., when inter-prediction is applied), etc. The residual information may include information related to quantized transform coefficients. The residual information may be entropy coded.

[0088] The output bitstream can be transmitted to a decoding device via a storage medium or a network.

[0089] FIG. 5 shows an example of a schematic video / image decoding method to which the embodiments of this document can be applied.

[0090] The method disclosed in Fig. 5 may be performed by the decoding device 300 of Fig. 3 described above. Specifically, S500 may be performed by the inter prediction unit 332 or the intra prediction unit 331 of the decoding device 300. In S500, the procedure of decoding prediction information included in the bitstream to derive values ​​of related syntax elements may be performed by the entropy decoding unit 310 of the decoding device 300. S510, S520, S530, and S540 may be performed by the entropy decoding unit 310, the inverse quantization unit 321, the inverse transform unit 322, and the addition unit 340 of the decoding device 300, respectively.

[0091] 5, the decoding device may perform operations corresponding to those performed by the encoding device. The decoding device may perform inter prediction or intra prediction on a current block based on received prediction information to derive a prediction sample (S500).

[0092] The decoding device may derive quantized transform coefficients for the current block based on the received residual information (S510). The decoding device may derive the quantized transform coefficients from the residual information through entropy decoding.

[0093] The decoding device may dequantize the quantized transform coefficients to derive the transform coefficients (S520).

[0094] The decoding device derives residual samples through an inverse transform process on the transform coefficients (S530).

[0095] The decoding apparatus may generate a reconstructed sample for the current block based on the prediction sample and the residual sample, and may generate a reconstructed picture based on the reconstructed sample (S540). Thereafter, as described above, an in-loop filtering procedure may be further applied to the reconstructed picture.

[0096] Meanwhile, as described above, intra prediction or inter prediction can be applied to perform prediction on the current block. Hereinafter, a case where inter prediction is applied to the current block will be described.

[0097] A prediction unit (more specifically, an inter prediction unit) of an encoding / decoding device may perform inter prediction on a block-by-block basis to derive a prediction sample. Inter prediction may indicate a prediction derived in a manner dependent on data elements (e.g., sample values, motion information, etc.) of a picture other than the current picture. When inter prediction is applied to the current block, a predicted block (prediction sample array) for the current block may be derived based on a reference block (reference sample array) identified by a motion vector on a reference picture pointed to by a reference picture index. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, motion information of the current block may be predicted on a block, sub-block, or sample-by-block basis based on correlation of motion information between a neighboring block and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction type (L0 prediction, L1 prediction, Bi prediction, etc.) information. When inter prediction is applied, the neighboring block may include a spatial neighboring block present in the current picture and a temporal neighboring block 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 called a collocated reference block, a collocated CU (colCU), etc., and the reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, a motion information candidate list may be constructed based on the neighboring blocks of the current block, and a flag or index information indicating which candidate is selected (used) to derive the motion vector and / or reference picture index of the current block may be signaled.Inter prediction may be performed based on various prediction modes, for example, in the case of skip mode and merge mode, the motion information of the current block may be the same as that of the selected neighboring block. In the case of skip mode, unlike the merge mode, a residual signal may not be transmitted. 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 a motion vector difference may be signaled. In this case, the motion vector of the current block may be derived using the sum of the motion vector predictor and the motion vector difference.

[0098] The motion information may include L0 motion information and / or L1 motion information depending on the inter prediction type (L0 prediction, L1 prediction, Bi prediction, etc.). A motion vector in the L0 direction may be referred to as an L0 motion vector or MVL0, and a motion vector in the L1 direction may be referred to as an L1 motion vector or MVL1. A prediction based on an L0 motion vector may be referred to as an L0 prediction, a prediction based on an L1 motion vector may be referred to as an L1 prediction, and a prediction based on both an L0 motion vector and an L1 motion vector may be referred to as a bi-prediction. Here, the L0 motion vector may indicate a motion vector related to a reference picture list L0 (L0), and the L1 motion vector may indicate a motion vector related to a reference picture list L1 (L1). The reference picture list L0 may include pictures that are earlier in output order than the current picture as reference pictures, and the reference picture list L1 may include pictures that are later in output order than the current picture. The previous picture may be called a forward (reference) picture, and the subsequent picture may be called a backward (reference) picture. The reference picture list L0 may further include a picture that is later in output order than the current picture as a reference picture. In this case, the previous picture may be indexed first in the reference picture list L0, and the subsequent picture may be indexed next. The reference picture list L1 may further include a picture that is earlier in output order than the current picture as a reference picture. In this case, the subsequent picture may be indexed first in the reference picture list L1, and the previous picture may be indexed next. Here, the output order may correspond to a POC (Picture Order Count) order.

[0099] Also, various inter prediction modes may be used for prediction of a current block in a picture. For example, various modes such as merge mode, skip mode, Motion Vector Prediction (MVP) mode, Affine mode, sub-block merge mode, MMVD (Merge with MVD) mode, and HMVP (Historical Motion Vector Prediction) mode may be used. Decoder side Motion Vector Refinement (DMVR) mode, Adaptive Motion Vector Resolution (AMVR) mode, Bi-prediction with CU-level Weight (BCW), Bi-Directional Optical Flow (BDOF), etc. may be further used as auxiliary modes. Affine mode may also be referred to as affine motion prediction mode. MVP mode may also be referred to as Advanced Motion Vector Prediction (AMVP) mode. In this document, some modes and / or motion information candidates derived by some modes may be included as one of the motion information related candidates of other modes. For example, an HMVP candidate may be added as a merge candidate in a merge / skip mode, or may be added as an MVP candidate in an MVP mode. When an HMVP candidate is used as a motion information candidate in a merge mode or a skip mode, the HMVP candidate may be referred to as an HMVP merge candidate.

[0100] Prediction mode information indicating an inter prediction mode of a current block may be signaled from an encoding apparatus to a decoding apparatus. In this case, the prediction mode information may be included in a bitstream and received by the decoding apparatus. The prediction mode information may include index information indicating one of a number of candidate modes. Alternatively, the inter prediction mode may be indicated through hierarchical signaling of flag information. In this case, the prediction mode information may include one or more flags. For example, a skip flag may be signaled to indicate whether a skip mode can be applied, and if the skip mode is not applied, a merge flag may be signaled to indicate whether a merge mode can be applied, and if the merge mode is not applied, an MVP mode may be indicated to be applied, or a flag for additional distinction may be further signaled. The affine mode may be signaled as an independent mode, or may be signaled as a mode subordinate to the merge mode or MVP mode. For example, the affine mode may include an affine merge mode and an affine MVP mode.

[0101] In addition, the motion information of the current block may be used when applying inter prediction to the current block. The encoding apparatus may derive optimal motion information for the current block through a motion estimation procedure. For example, the encoding apparatus may search for a similar reference block with high correlation in a predetermined search range in the reference picture in fractional pixel units using an original block in an original picture for the current block, and may derive motion information through this. The similarity of the blocks may be derived based on a difference in sample values ​​based on a phase. For example, the similarity of the blocks may be calculated based on a Sum of Absolute Differences (SAD) between the current block (or a template of the current block) and a reference block (or a template of the reference block). In this case, the motion information may be derived based on a reference block with the smallest SAD in a search space. The derived motion information may be signaled to a decoding apparatus according to various methods based on an inter prediction mode.

[0102] As described above, a predicted block for the current block may be derived based on the motion information derived by the inter prediction mode. The predicted block may include a prediction sample (prediction sample array) of the current block. If the motion vector (MV) of the current block indicates a fractional sample unit, an interpolation procedure may be performed, through which a prediction sample of the current block may be derived based on a reference sample of a fractional sample unit in a reference picture. If affine inter prediction is applied to the current block, a prediction sample may be generated based on a sample / sub-block unit MV. If bi-prediction is applied, a prediction sample derived through a weighted sum or weighted average (by phase) of a prediction sample derived based on L0 prediction (i.e., prediction using a reference picture in a reference picture list L0 and MVL0) and a prediction sample derived based on L1 prediction (i.e., prediction using a reference picture in a reference picture list L1 and MVL1) may be used as a prediction sample of the current block. When bi-prediction is applied, if the reference picture used for L0 prediction and the reference picture used for L1 prediction are located in different time directions from each other based on the current picture (i.e., when it is bi-predictive and supports both directions at the same time), this can be called true bi-prediction.

[0103] As mentioned above, reconstructed samples and reconstructed pictures may be generated based on the predicted samples derived as described above, after which procedures such as in-loop filtering may be performed.

[0104] FIG. 6 illustrates an example of a schematic inter-prediction based video / image encoding method to which embodiments of this document can be applied.

[0105] The method disclosed in Fig. 6 may be performed by the encoding device 200 of Fig. 2. Specifically, S600 may be performed by the inter prediction unit 221 of the encoding device 200, S610 may be performed by the subtraction unit 231 of the encoding device 200, and S620 may be performed by the entropy encoding unit 240 of the encoding device 200.

[0106] Referring to FIG. 6, the encoding apparatus may perform inter prediction on a current block (S600). The encoding apparatus may derive an inter prediction mode and motion information of the current block, and generate a prediction sample of the current block. Here, the processes of determining the inter prediction mode, deriving the motion information, and generating the prediction sample may be performed simultaneously, or one process may be performed prior to the other processes. For example, the inter prediction unit of the encoding apparatus may include a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit, and the prediction mode determination unit may determine a prediction mode for the current block, the motion information derivation unit may derive motion information of the current block, and the prediction sample derivation unit may derive a prediction sample of the current block. For example, the inter prediction unit of the encoding apparatus may search for a block similar to the current block within a predetermined area (search area) of a reference picture through motion estimation, and derive a reference block whose difference with the current block is minimum or equal to or less than a predetermined criterion. Based on this, a reference picture index indicating a reference picture in which the reference block is located may be derived, and a motion vector may be derived based on a position difference between the reference block and the current block. The encoding device may determine a mode to be applied to the current block from among various prediction modes, and may compare RD costs for the various prediction modes to determine an optimal prediction mode for the current block.

[0107] For example, when a skip mode or a merge mode is applied to the current block, the encoding apparatus may construct a merge candidate list and derive a reference block whose difference from the current block is minimum or equal to or less than a predetermined criterion among reference blocks indicated by merge candidates included in the merge candidate list. In this case, a merge candidate associated with the derived reference block may be selected, and merge index information indicating the selected merge candidate may be generated and signaled to the decoding apparatus. Motion information of the current block may be derived using motion information of the selected merge candidate.

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

[0109] The encoding apparatus may derive a residual sample based on the predicted sample (S610). The encoding apparatus may derive the residual sample through a comparison between an original sample of the current block and the predicted sample.

[0110] The encoding apparatus may encode video information including prediction information and residual information (S620). The encoding apparatus may output the encoded video information in the form of a bitstream. Here, the prediction information may include prediction mode information (e.g., skip flag, merge flag, or mode index) and information on motion information as information on a prediction procedure. The information on the motion information may include candidate selection information (e.g., merge index, mvp flag, or mvp index) which is information for deriving a motion vector. In addition, the information on the motion information may include the above-mentioned information on the MVD and / or reference picture index information. In addition, the information on the motion information may include information indicating whether L0 prediction, L1 prediction, or bi-prediction is applied. The residual information is information on a residual sample. The residual information may include information on a quantized transform coefficient for the residual sample.

[0111] The output bitstream can be stored on a (digital) storage medium and transmitted to the decoding device, or it can be transmitted to the decoding device via a network.

[0112] Meanwhile, as described above, the encoding apparatus can generate a reconstructed picture (including reconstructed samples and reconstructed blocks) based on a reference sample and a residual sample. This is because the encoding apparatus derives the same prediction result as that performed by the decoding apparatus, thereby improving coding efficiency. Therefore, the encoding apparatus can store the reconstructed picture (or reconstructed sample, reconstructed block) in a memory and use it as a reference picture for inter prediction. As described above, an in-loop filtering procedure, etc. can be further applied to the reconstructed picture.

[0113] FIG. 7 illustrates an example of a general inter-prediction based video / picture decoding method to which embodiments of this document can be applied.

[0114] The method disclosed in Fig. 7 may be performed by the decoding device 300 of Fig. 3 described above. Specifically, S700 may be performed by the inter prediction unit 332 of the decoding device 300. In S700, the procedure of decoding prediction information included in the bitstream to derive values ​​of related syntax elements may be performed by the entropy decoding unit 310 of the decoding device 300. S710 and S720 may be performed by the inter prediction unit 332 of the decoding device 300, S730 may be performed by the residual processing unit 320 of the decoding device 300, and S740 may be performed by the addition unit 340 of the decoding device 300.

[0115] 7, the decoding device may perform operations corresponding to those performed by the encoding device. The decoding device may perform prediction on the current block based on the received prediction information to derive a prediction sample.

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

[0117] For example, it may be determined whether a merge mode is applied to the current block or whether an (A)MVP mode is determined based on a merge flag. Alternatively, it may be possible to select one of various inter prediction mode candidates based on a mode index. The inter prediction mode candidates may include a skip mode, a merge mode, and / or an (A)MVP mode, or may include various inter prediction modes.

[0118] The decoding apparatus may derive motion information of the current block based on the determined inter prediction mode (S710). For example, when a skip mode or a merge mode is applied to the current block, the decoding apparatus may construct a merge candidate list and select one of the merge candidates included in the merge candidate list. The selection may be performed based on the selection information (merge index). Motion information of the selected merge candidate may be used to derive motion information of the current block. The motion information of the selected merge candidate may be used as motion information of the current block.

[0119] As another example, when the (A)MVP mode is applied to the current block, the decoding apparatus may construct an (A)MVP candidate list, and use a motion vector of an MVP candidate selected from among the MVP (motion vector predictor) 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 information on the MVD, and the motion vector of the current block may be derived based on the mvp and MVD of the current block. Also, the reference picture index of the current block may be derived based on the reference picture index information. A picture indicated by a reference picture index in a reference picture list for the current block may be derived as a reference picture referenced for inter prediction of the current block.

[0120] On the other hand, the motion information of the current block may be derived without constructing a candidate list, in which case the motion information of the current block may be derived according to a procedure disclosed in a prediction mode described below. In this case, the construction of the candidate list as described above may be omitted.

[0121] The decoding device may generate a prediction sample for the current block based on the motion information of the current block (S720). In this case, a reference picture may be derived based on the reference picture index of the current block, and the prediction sample of the current block may be derived using a sample of the reference block indicated on the reference picture by the motion vector of the current block. In this case, as described below, a prediction sample filtering procedure may be further performed on all or a part of the prediction sample of the current block, depending on the case.

[0122] For example, the inter prediction unit of the decoding device may include a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit, and may determine a prediction mode for a current block based on the prediction mode information received by the prediction mode determination unit, derive motion information (such as a motion vector and / or a reference picture index) of the current block based on information regarding the motion information received by the motion information derivation unit, and derive a prediction sample of the current block by the prediction sample derivation unit.

[0123] The decoding apparatus may generate a residual sample for the current block based on the received residual information (S730). The decoding apparatus may generate a reconstructed sample for the current block based on the prediction sample and the residual sample, and generate a reconstructed picture based on the reconstructed sample (S740). As described above, an in-loop filtering procedure or the like may then be further applied to the reconstructed picture.

[0124] 8 exemplarily illustrates an inter prediction procedure. The inter prediction procedure disclosed in FIG 8 may be applied to the inter prediction process (when an inter prediction mode is applied) disclosed in FIG 6 and FIG 7.

[0125] Referring to Figure 8, as described above, the inter prediction procedure may include an inter prediction mode determination step, a motion information derivation step according to the determined prediction mode, and a prediction execution (prediction sample generation) step based on the derived motion information. As described above, the inter prediction procedure may be performed in an encoding device and a decoding device. In this document, a coding device may include an encoding device and / or a decoding device.

[0126] The coding apparatus may determine an inter prediction mode for a current block (S800). Various inter prediction modes may be used for prediction of a current block in a picture. For example, various modes such as merge mode, skip mode, Motion Vector Prediction (MVP) mode, Affine mode, sub-block merge mode, MMVD (Merge with MVD) mode, etc. may be used. Decoder side Motion Vector Refinement (DMVR) mode, Adaptive Motion Vector Resolution (AMVR) mode, Bi-prediction with CU-level Weight (BCW), Bi-Directional Optical Flow (BDOF), etc. may be used in addition or instead as an additional mode. Affine mode may be referred to as affine motion prediction mode. MVP mode may be referred to as Advanced Motion Vector Prediction (AMVP) mode. In this document, some modes and / or motion information candidates derived by some modes may be included as one of the motion information related candidates of other modes. For example, an HMVP candidate may be added as a merge candidate in a merge / skip mode, or may be added as an MVP candidate in an MVP mode. When an HMVP candidate is used as a motion information candidate in a merge mode or a skip mode, the HMVP candidate may be referred to as an HMVP merge candidate.

[0127] Prediction mode information indicating an inter prediction mode of a current block may be signaled from an encoding apparatus to a decoding apparatus. The prediction mode information may be included in a bitstream and received by the decoding apparatus. The prediction mode information may include index information indicating one of a number of candidate modes. Alternatively, the inter prediction mode may be indicated through hierarchical signaling of flag information. In this case, the prediction mode information may include one or more flags. For example, a skip flag may be signaled to indicate whether a skip mode can be applied, and if the skip mode is not applied, a merge flag may be signaled to indicate whether a merge mode can be applied, and if the merge mode is not applied, an MVP mode may be indicated to be applied or a flag for additional discrimination may be further signaled. The affine mode may be signaled as an independent mode or may be signaled as a mode subordinate to the merge mode or MVP mode. For example, the affine mode may include an affine merge mode and an affine MVP mode.

[0128] The coding apparatus may derive motion information for the current block (S810). The motion information may be derived based on an inter prediction mode.

[0129] The coding apparatus may perform inter prediction using motion information of the current block. The encoding apparatus may derive optimal motion information for the current block through a motion estimation procedure. For example, the encoding apparatus may search for a similar reference block with high correlation in a predetermined search range in the reference picture in units of fractional pixels using an original block in an original picture for the current block, and may derive motion information through this. The similarity of the blocks may be derived based on a difference in sample values ​​based on a phase. For example, the similarity of the blocks may be calculated based on the SAD between the current block (or a template of the current block) and the reference block (or a template of the reference block). In this case, the motion information may be derived based on the reference block with the smallest SAD in the search space. The derived motion information may be signaled to the decoding apparatus in various ways based on the inter prediction mode.

[0130] The coding device may perform inter prediction based on the motion information for the current block (S820). The coding device may derive predictive samples for the current block based on the motion information. The current block including the predictive samples may be referred to as a predicted block.

[0131] Meanwhile, in deriving the motion information of the current block, a motion information candidate may be derived based on the spatial neighboring blocks and the temporal neighboring blocks, and the motion information candidate for the current block may be selected based on the derived motion information candidate. In this case, the selected motion information candidate may be used as the motion information of the current block.

[0132] FIG. 9 exemplarily illustrates spatial and temporal neighboring blocks of a current block.

[0133] 9, the spatial neighboring blocks refer to neighboring blocks located around a current block 900 on which inter prediction is currently being performed, and may include neighboring blocks located around the left side of the current block 900 or neighboring blocks located around the top side of the current block 900. For example, the spatial neighboring blocks may include a lower left corner neighboring block, a left side neighboring block, a upper right corner neighboring block, an upper side neighboring block, and an upper left corner neighboring block of the current block 900. In FIG. 9, the spatial neighboring blocks are indicated by "S".

[0134] In one embodiment, the encoding device / decoding device can search spatial neighboring blocks of a current block (e.g., the lower left corner neighboring block, the left side neighboring block, the upper right corner neighboring block, the upper neighboring block, and the upper left corner neighboring block) in a specified order to detect usable neighboring blocks, and derive motion information of the detected neighboring blocks as candidate spatial motion information.

[0135] The temporal neighboring block is a block located on a picture (i.e., a reference picture) different from the current picture including the current block 900, and refers to a block (collocated block; col block) that is co-located with the current block 900 in the reference picture. Here, the reference picture may be earlier or later than the current picture on the POC (Picture Order Count). In addition, the reference picture used in deriving the temporal neighboring block may be referred to as a co-located reference picture or a col picture (collocated picture; col picture). In addition, the co-located block (collocated block) may indicate a block located in a col picture corresponding to the position of the current block 900, and may be referred to as a col block. For example, the temporal neighboring blocks may include a col block (i.e., a col block including a lower right corner sample) located in a reference picture (i.e., a col picture) corresponding to a lower right corner sample position of the current block 900 and / or a col block (i.e., a col block including a center lower right sample) located in a reference picture (i.e., a col picture) corresponding to a center lower right sample position of the current block 900, as shown in Figure 9. In Figure 9, the temporal neighboring blocks are denoted by "T".

[0136] In one embodiment, the encoding device / decoding device can search for a current block's temporal neighboring blocks (e.g., a col block including a lower right corner sample, a col block including a center lower right sample) according to a specified order to detect a usable block, and derive motion information of the detected block as a temporal motion information candidate. In this way, the technique of using the temporal neighboring blocks can be called TMVP (Temporal Motion Vector Prediction). Also, the temporal motion information candidate can be called a TMVP candidate.

[0137] On the other hand, depending on the inter prediction mode, it is also possible to derive motion information on a subblock basis to perform prediction. For example, in the case of affine mode or TMVP mode, motion information can be derived on a subblock basis. In particular, a method of deriving a temporal motion information candidate on a subblock basis can be called subblock-based TMVP (sbTMVP; subblock-based Temporal Motion Vector Prediction).

[0138] sbTMVP is a method of utilizing motion fields in a col picture to improve the motion vector prediction (MVP) and merge mode of coding units in a current picture, and the col picture of sbTMVP may be the same as the col picture used by TMVP. However, TMVP performs motion prediction at a coding unit (CU) level, whereas sbTMVP can perform motion prediction at a sub-block level or a sub-coding unit (sub-CU) level. Also, TMVP derives temporal motion information from a col block in a col picture (wherein the col block is a col block corresponding to the lower right corner sample position of the current block or the lower right center sample position of the current block), whereas sbTMVP derives temporal motion information after applying a motion shift from the col picture. Here, the motion shift can include a process of obtaining a motion vector from one of the spatially neighboring blocks of the current block and shifting by the motion vector.

[0139] FIG. 10 exemplarily illustrates spatially neighboring blocks that can be used to derive sub-block based temporal motion information candidates (sbTMVP candidates).

[0140] Referring to Fig. 10, the spatial neighboring blocks may include at least one of the lower left corner neighboring block A0, the left side neighboring block A1, the upper right corner neighboring block B0, and the upper side neighboring block B1 of the current block. In some cases, the spatial neighboring blocks may further include other neighboring blocks than the neighboring blocks shown in Fig. 10, or may not include a specific neighboring block among the neighboring blocks shown in Fig. 10. Also, the spatial neighboring blocks may include only a specific neighboring block, for example, only the left side neighboring block A1 of the current block.

[0141] For example, the encoding / decoding device may search for spatial neighboring blocks according to a predetermined search order, detect the motion vector of the spatial neighboring block that can be used first, and determine a block in a reference picture that is located at a position indicated by the motion vector of the spatial neighboring block as a col block (i.e., a collocated reference block). Here, the motion vector of the spatial neighboring block may be referred to as a temporal motion vector (temporal MV).

[0142] In this case, the availability of the spatial neighboring block may be determined based on the reference picture information, prediction mode information, position information, etc. of the spatial neighboring block. For example, if the reference picture of the spatial neighboring block is the same as the reference picture of the current block, the spatial neighboring block may be determined to be available. Alternatively, if the spatial neighboring block is coded in an intra prediction mode or is located outside the current picture / tile, the spatial neighboring block may be determined to be unavailable.

[0143] Also, the search order of the spatial neighboring blocks may be variously defined, for example, A1, B1, B0, A0, or it may be possible to search only A1 to determine whether A1 is available.

[0144] FIG. 11 is a diagram for explaining in outline the process of deriving sub-block based temporal motion information candidates (sbTMVP candidates).

[0145] Referring to FIG. 11, first, the encoding / decoding apparatus may determine whether a spatial neighboring block (e.g., A1 block) of a current block is usable. For example, if a reference picture of the spatial neighboring block (e.g., A1 block) uses a col picture, the spatial neighboring block (e.g., A1 block) may be determined to be usable, and a motion vector of the spatial neighboring block (e.g., A1 block) may be derived. In this case, the motion vector of the spatial neighboring block (e.g., A1 block) may be referred to as a temporal MV (tempMV), and this motion vector may be used for motion shifting. Alternatively, if it is determined that the spatial neighboring block (e.g., A1 block) is not usable, the temporal MV (i.e., the motion vector of the spatial neighboring block) may be set to a zero vector. In other words, in this case, the motion shift may be applied with a motion vector set to (0,0).

[0146] Next, the encoding / decoding device can apply a motion shift based on the motion vector of the spatially adjacent block (e.g., A1 block). For example, the motion shift can be shifted (e.g., A1`) to a position indicated by the motion vector of the spatially adjacent block (e.g., A1 block). That is, by applying the motion shift, the motion vector of the spatially adjacent block (e.g., A1 block) can be added to the coordinates of the current block.

[0147] Then, the encoding / decoding device can derive the motion-shifted col subblocks on the col picture and obtain the motion information (motion vector, reference index, etc.) of each col subblock. For example, the encoding / decoding device can derive each col subblock on the col picture corresponding to the motion-shifted position (i.e., the position indicated by the motion vector of the spatially adjacent block (e.g., A1)) at each subblock position in the current block. Then, the motion information of each col subblock can be used as the motion information of each subblock relative to the current block (i.e., sbTMVP candidate).

[0148] Also, scaling may be applied to the motion vector of the col sub-block. The scaling may be performed based on a difference in temporal distance between the reference picture of the col block and the reference picture of the current block. Therefore, the scaling may be referred to as temporal motion scaling, through which the reference picture of the current block and the reference picture of the temporal motion vector may be aligned. In this case, the encoding / decoding apparatus may obtain the motion vector of the scaled col sub-block as motion information of each sub-block with respect to the current block.

[0149] In addition, when deriving sbTMVP candidates, there may be cases where motion information does not exist for the col sub-block. In this case, base motion information (or default motion information) can be derived for the col sub-block for which no motion information exists, and this base motion information can be used as the motion information of the sub-block for the current block. The base motion information can be derived from a block located at the center of the col block (i.e., a col CU including the col sub-block). For example, motion information (e.g., a motion vector) can be derived from a block including a sample located at the bottom right among the four samples located at the center of the col block, and this can be used as the base motion information.

[0150] As described above, in the case of the affine mode or sbTMVP mode in which motion information is derived on a sub-block basis, an affine merge candidate and an sbTMVP candidate can be derived, and a sub-block-based merge candidate list can be constructed based on such candidates. In this case, flag information indicating whether the affine mode or the sbTMVP mode is enabled or disabled can be signaled. If the sbTMVP mode is enabled based on the flag information, the sbTMVP candidate derived as described above can be added to the first entry (firstly-ordered) of the sub-block-based merge candidate list. Then, the affine merge candidate can be added to the next entry of the sub-block-based merge candidate list. Here, the maximum number of candidates in the sub-block-based merge candidate list may be five.

[0151] In addition, in the case of the sbTMVP mode, the size of the subblock may be fixed, for example, to a size of 8 × 8. In addition, the sbTMVP mode can be applied only to blocks whose width and height are both 8 or more.

[0152] On the other hand, in the current VVC standard, it is possible to derive sub-block based temporal motion information candidates (sbTMVP candidates) as shown in Table 1 below.

[0153] [Table 1-1]

[0154] [Table 1-2]

[0155] [Table 1-3]

[0156] In deriving sbTMVP candidates according to the method as shown in Table 1 above, a default MV and subblock MV(s) may be considered. Here, the default MV may be referred to as subblock-based temporal merging base motion data or base motion data (base motion information). With reference to Table 1 above, the default MV may correspond to ctrMV (or ctrMVLX) in Table 1. The subblock MV may correspond to mvSbCol (or mvLXSbcol) in Table 1.

[0157] For example, if a subblock or a subblock MV is available through the derivation process of sbTMVP, the subblock MV is assigned to the subblock, or if a subblock or a subblock MV is unavailable, the default MV can be used as the subblock MV for the subblock. Here, the default MV derives motion information from a position corresponding to the center pixel position of the corresponding block (i.e., col CU) on the col picture, and each subblock MV can derive motion information from the top-left position of the corresponding subblock (i.e., col subblock) on the col picture. In this case, the corresponding block (i.e., col CU) can be derived from a position motion-shifted based on the motion vector (i.e., temporal MV) of the spatial neighboring block A1, as shown in FIG. 11.

[0158] 12 to 15 are diagrams for explaining a method of calculating corresponding positions for deriving a default MV and a sub-block MV according to a block size in the process of deriving the sbTMVP.

[0159] In Figures 12 to 15, pixels (samples) shaded with dotted lines indicate the corresponding positions within each sub-block for deriving each sub-block MV, and pixels (samples) shaded with solid lines indicate the corresponding positions within a CU for deriving a default MV.

[0160] For example, referring to FIG. 12, when the current block (i.e., the current CU) is 8x8 in size, the motion information of the sub-block can be derived based on the top left sample position within the 8x8 sized sub-block, and the default motion information of the sub-block can be derived based on the center sample position within the 8x8 sized current block (i.e., the current CU).

[0161] Alternatively, for example, referring to FIG. 13, when the current block (i.e., the current CU) is 16x8 size, the motion information of each sub-block can be derived based on the top left sample position within each 8x8 size sub-block, and the default motion information of each sub-block can be derived based on the center sample position within the 16x8 size current block (i.e., the current CU).

[0162] Alternatively, for example, referring to FIG. 14, when the current block (i.e., the current CU) is 8x16 in size, the motion information of each sub-block can be derived based on the top left sample position within each 8x8 sized sub-block, and the default motion information of each sub-block can be derived based on the center sample position within the 8x16 sized current block (i.e., the current CU).

[0163] Alternatively, for example, referring to FIG. 15, when the current block (i.e., the current CU) is 16x16 size, the motion information of each sub-block can be derived based on the top left sample position within each 8x8 size sub-block, and the default motion information of each sub-block can be derived based on the center sample position within the 16x16 size current block (i.e., the current CU).

[0164] As can be seen from Figures 12 to 15, since the motion information of the sub-block is biased toward the top left pixel position, there is a problem that the sub-block MV is derived at a position far away from the position where the default MV indicating the representative motion information of the current CU is derived. As a typical example, in the case of an 8x8 block shown in Figure 12, one CU includes one sub-block, but there is a contradiction in that the sub-block MV and the default MV are represented by different motion information. In addition, since the methods of calculating the corresponding position between the sub-block and the current CU block are different (i.e., the corresponding position for deriving the MV of the sub-block is the top left sample position, and the corresponding position for deriving the default MV is the center sample position), an additional module may be required when implementing hardware (H / W).

[0165] In order to solve the above problems, this document proposes a method of unifying a method of deriving a corresponding position of a CU for a default MV and a method of deriving a corresponding position of a subblock for each subblock MV in the process of deriving an sbTMVP candidate. According to an embodiment of this document, the unification is achieved by using only one module that derives each corresponding position according to the block size in terms of hardware (H / W). For example, a method of calculating a corresponding position when the block size is 16×16 blocks and a method of calculating a corresponding position when the block size is 8×8 blocks can be implemented in the same manner, which can simplify the implementation of hardware. Here, the 16×16 blocks can represent CUs, and the 8×8 blocks can represent each subblock.

[0166] In one embodiment, when deriving an sbTMVP candidate, a center sample position can be used as a corresponding position for deriving motion information of a sub-block and as a corresponding position for deriving default motion information, which can be implemented as shown in Table 2 below.

[0167] Table 2 below is a spec showing an example of how to derive sub-block motion information and default motion information according to one embodiment in this document.

[0168] [Table 2-1]

[0169] [Table 2-2]

[0170] [Table 2-3]

[0171] Referring to Table 2, when deriving sbTMVP candidates, the position of a current block (i.e., current CU) including a sub-block can be derived. The top left sample position (xCtb, yCtb) of a coding tree block (or coding tree unit) including the current block and the bottom right center sample position (xCtr, yCtr) of the current block can be derived as shown in Equations (8-514) to (8-517) of Table 2. In this case, the positions (xCtb, yCtb) and (xCtr, yCtr) can be calculated based on the top left sample position (xCb, yCb) of the current block with respect to the top left sample of the current picture.

[0172] Also, a col block (i.e., col CU) on the col picture located corresponding to the current block (i.e., current CU) including the sub-block can be derived. In this case, the position of the col block can be set to (xColCtrCb, yColCtrCb), which can indicate the position of the col block including the position (xCtr, yCtr) in the col picture based on the top left sample of the col picture.

[0173] Also, base motion data (i.e., default motion information) for sbTMVP may be derived. The base motion data may include a default MV (e.g., ctrMvLX). For example, a col block on a col picture may be derived. In this case, the position of the col block may be derived as (xColCb, yColCb), which may be a position where a motion shift (e.g., tempMv) is applied to the derived col block position (xColCtrCb, yColCtrCb). The motion shift may be performed by adding a motion vector (e.g., tempMv) derived from a spatial neighboring block (e.g., A1 block) of the current block to the current col block position (xColCtrCb, yColCtrCb) as described above. Then, a default MV (e.g., ctrMvLX) may be derived based on the motion-shifted col block position (xColCb, yColCb). Here, the default MV (eg, ctrMvLX) may indicate a motion vector derived from a position corresponding to the center sample at the bottom right of the col block.

[0174] Also, a col sub-block on the col picture corresponding to a sub-block (referred to as a current sub-block) in the current block may be derived. First, the position of each current sub-block may be derived. The position of each sub-block may be represented by (xSb, ySb), and this position (xSb, ySb) may represent the position of the current sub-block based on the top left sample of the current picture. For example, the position (xSb, ySb) of the current sub-block may be calculated as in Equations (8-523) to (8-524) of Table 2, which may represent the position of the center sample at the bottom right of the sub-block. Next, the position of each col sub-block on the col picture may be derived. The position of each col sub-block may be represented by (xColSb, yColSb), and this position (xColSb, yColSb) may represent the position of the current sub-block with a motion shift (e.g., tempMv) applied to the position (xSb, ySb) of the current sub-block. As described above, the motion shifting can be performed by adding a motion vector (e.g., tempMv) derived from a spatially neighboring block (e.g., A1 block) of the current block to the position (xSb, ySb) of the current sub-block. Then, motion information (e.g., motion vector mvLXSbCol, availableFlagLXSbCol indicating whether it is available or not) of the col sub-block can be derived based on the position (xColSb, yColSb) of each of the motion-shifted col sub-blocks.

[0175] In this case, if there is an unavailable col sub-block in the col sub-block (e.g., availableFlagLXSbCol is 0), the base motion data (i.e., default motion information) can be used for the unavailable col sub-block. For example, the motion vector (e.g., mvLXSbCol) for the unavailable col sub-block can use the default MV (e.g., ctrMvLX).

[0176] 16 to 19 are exemplary diagrams for briefly explaining a method of integrating corresponding positions for deriving a default MV and a sub-block MV according to a block size in the process of deriving an sbTMVP.

[0177] In Figures 16 to 19, pixels (samples) shaded with dotted lines indicate corresponding positions within each sub-block for deriving each sub-block MV, and pixels (samples) shaded with solid lines indicate corresponding positions within a CU for deriving a default MV.

[0178] For example, referring to FIG. 16, when the current block (i.e., the current CU) is 8×8 size, the motion information of the current sub-block can be derived from the col sub-block at a corresponding position on the col picture based on the center sample position at the bottom right edge of the 8×8 size sub-block. The default motion information of the current sub-block can be derived from the col block (i.e., col CU) at a corresponding position on the col picture based on the center sample position at the bottom right edge of the 8×8 size current block (i.e., the current CU). In this case, as shown in FIG. 16, the motion information of the current sub-block and the default motion information can be derived from the same sample position (the same corresponding position).

[0179] 17, for example, when the current block (i.e., the current CU) is 16×8 size, the motion information of the current sub-block can be derived from the col sub-block at the corresponding position on the col picture based on the right bottom center sample position in the 8×8 size sub-block. The default motion information of the current sub-block can be derived from the col block (i.e., col CU) at the corresponding position on the col picture based on the right bottom center sample position in the 16×8 size current block (i.e., the current CU).

[0180] 18, for example, when the current block (i.e., the current CU) is 8×16 size, the motion information of the current sub-block can be derived from the col sub-block at a corresponding position on the col picture based on the bottom right center sample position in the 8×8 size sub-block. The default motion information of the current sub-block can be derived from the col block (i.e., col CU) at a corresponding position on the col picture based on the bottom right center sample position in the 8×16 size current block (i.e., the current CU).

[0181] 19, for example, when the current block (i.e., the current CU) is 16×16 or larger, the motion information of the current sub-block can be derived from the col sub-block at a corresponding position on the col picture based on the right bottom center sample position in the 8×8 sub-block. The default motion information of the current sub-block can be derived from the col block (i.e., col CU) at a corresponding position on the col picture based on the right bottom center sample position in the current block (i.e., current CU) of 16×16 size (or larger).

[0182] However, the above embodiment in this document is merely an example, and the default motion information and the motion information of the current sub-block can be derived based on other sample positions besides the center position (i.e., the right bottom sample position). For example, the default motion information can be derived based on the left top sample position of the current CU, and the motion information of the current sub-block can be derived based on the left top sample position of the sub-block.

[0183] When implementing the embodiments described above in this document in hardware, the same H / W modules can be used to derive temporal motion, so that a pipeline such as that shown in Figures 20 and 21 can be constructed.

[0184] 20 and 21 are diagrams illustrating an example of a pipeline configuration that can integrate and calculate corresponding positions for deriving a default MV and a sub-block MV in the sbTMVP derivation process.

[0185] 20 and 21, a corresponding position calculation module can calculate a corresponding position for deriving a default MV and a sub-block MV. For example, as shown in FIG. 20 and FIG. 21, when a block position (posX, posY) and a block size (blkszX, blkszY) are input to the corresponding position calculation module, a center position (i.e., a right bottom sample position) of the input block can be output. When a current CU position and a block size are input to the corresponding position calculation module, a center position (i.e., a right bottom sample position) of a col block on a col picture, which is a corresponding position for deriving a default MV, can be output. Alternatively, when a current sub-block position and a block size are input to the corresponding position calculation module, a center position (i.e., a right bottom sample position) of a col sub-block on a col picture, which is a corresponding position for deriving a current sub-block MV, can be output.

[0186] In this way, when the corresponding positions for deriving the default MV and the sub-block MV are output from the corresponding position calculation module, the motion vector (i.e., temporal mv) derived from the corresponding positions can be patched. Then, sub-block-based temporal motion information (i.e., sbTMVP candidates) can be derived based on the patched motion vector (i.e., temporal mv). For example, as shown in Figures 20 and 21, sbTMVP candidates can be derived in parallel or sequentially based on the clock cycle depending on the implementation of H / W.

[0187] The following drawings are created to explain a specific example of the present document. The names of specific devices and specific terms and names (e.g., names of syntax / syntax elements, etc.) described in the drawings are presented for illustrative purposes only, and therefore the technical features of the present document are not limited to the specific names used in the following drawings.

[0188] FIG. 22 illustrates a schematic diagram of an example video / image encoding method according to an embodiment of the present document.

[0189] The method disclosed in FIG. 22 may be performed by the encoding device 200 disclosed in FIG. 2. Specifically, steps (S2200) to (S2230) in FIG. 22 may be performed by the prediction unit 220 (more specifically, the inter prediction unit 221) disclosed in FIG. 2, step (S2240) in FIG. 22 may be performed by the residual processing unit 230 disclosed in FIG. 2, and step (S2250) in FIG. 22 may be performed by the entropy encoding unit 240 disclosed in FIG. 2. In addition, the method disclosed in FIG. 22 may be performed including the embodiments described above in this document. Therefore, in FIG. 22, detailed descriptions of contents overlapping with the embodiments described above will be omitted or simplified.

[0190] Referring to FIG. 22, the encoding apparatus may derive a reference sub-block on a collocated reference picture for a sub-block in a current block (S2200).

[0191] Here, the collocated reference picture refers to a reference picture used to derive temporal motion information (i.e., sbTMVP) as described above, and may refer to the col picture described above. The reference sub-block may refer to the col sub-block described above.

[0192] In one embodiment, the encoding device may derive a reference sub-block on a co-located reference picture based on a position of the sub-block within a current block, where the current block may be referred to as a current coding unit (CU) or a current coding block (CB), and the sub-block included within the current block may also be referred to as a current coding sub-block.

[0193] For example, the encoding apparatus may first determine the position of the current block, and then determine the position of the sub-block within the current block. As described with reference to Table 2 above, the position of the current block may be represented based on the left top sample position (xCtb, yCtb) of the coding tree block and the right bottom center sample position (xCtr, yCtr) of the current block. The positions of the sub-blocks within the current block may be represented by (xSb, ySb), and the positions (xSb, ySb) may represent the right bottom center sample position of the sub-block. Here, the right bottom center sample position (xSb, ySb) of the sub-block may be calculated based on the left top sample position of the sub-block and the sub-block size, and may be calculated as in Equations (8-523) to (8-524) of Table 2 above.

[0194] Then, the encoding apparatus can derive a reference sub-block on the collocated reference picture based on the right-bottom center sample position of each of the sub-blocks in the current block. As described above with reference to Table 2, the reference sub-block can be indicated by a position (xColSb, yColSb) on the collocated reference picture, and the position (xColSb, yColSb) can be derived on the collocated reference picture based on the right-bottom center sample position (xSb, ySb) of each of the sub-blocks in the current block.

[0195] On the other hand, the top left sample position used in this document may also be referred to as the top left sample position or the top left sample position, and the bottom right center sample position may also be referred to as the bottom right center sample position, the center bottom right sample position, the lower right center sample position, the center lower right sample position, or the center lower right sample position.

[0196] In addition, a motion shift may be applied when deriving the reference sub-block. The encoding apparatus may perform a motion shift based on a motion vector derived from a spatial neighboring block of the current block. The spatial neighboring block of the current block may be a left neighboring block located to the left of the current block, and may be referred to as, for example, the A1 block shown in FIG. 10 and FIG. 11. In this case, if the left neighboring block (e.g., the A1 block) is available, a motion vector may be derived from the left neighboring block, or if the left neighboring block is unavailable, a zero vector may be derived. Here, whether or not the spatial neighboring block is available may be determined based on reference picture information, prediction mode information, position information, etc. of the spatial neighboring block. For example, if the reference picture of the spatial neighboring block and the reference picture of the current block are the same, the spatial neighboring block may be determined to be available. Alternatively, if the spatial neighboring block is coded in an intra prediction mode or if the spatial neighboring block is located outside the current picture / tile, the spatial neighboring block may be determined to be unavailable.

[0197] That is, the encoding apparatus may apply a motion shift (i.e., a motion vector of a spatially adjacent block (e.g., block A1)) to the right bottom center sample position (xSb, ySb) of each sub-block in the current block, and derive a reference sub-block on the co-located reference picture based on the motion shifted position. In this case, the position (xColSb, yColSb) of the reference sub-block may be indicated by a position motion-shifted from the right bottom center sample position (xSb, ySb) of each sub-block in the current block to a position indicated by the motion vector of the spatially adjacent block (e.g., block A1), and may be calculated as in Equations (8-525) to (8-526) of Table 2 above.

[0198] The encoding apparatus may derive sub-block based temporal motion information candidates based on the reference sub-blocks (S2210).

[0199] Meanwhile, in this document, the subblock-based temporal motion information candidate is referred to as the above-mentioned sbTMVp (subblock-based Temporal Motion Vector Prediction) candidate, and may be replaced or mixed with the subblock-based temporal motion vector predictor candidate. That is, when deriving motion information and performing prediction on a subblock basis as described above, an sbTMVP candidate may be derived, and motion prediction may be performed at the subblock level (or sub-coding unit (sub-CU) level) based on the sbTMVP candidate.

[0200] The encoding apparatus may derive motion information for sub-blocks within the current block based on the sub-block-based temporal motion information candidates (S2220).

[0201] The sub-block based temporal motion information candidate may include a sub-block based motion vector, where the sub-block based motion vector may include a motion vector derived based on a reference sub-block.

[0202] In one embodiment, the encoding apparatus may derive a subblock-wise motion vector for a reference subblock as motion information for a subblock in a current block. For example, the encoding apparatus may derive a subblock-wise motion vector based on whether the reference subblock is available. For a available reference subblock in a reference subblock, the encoding apparatus may derive a subblock-wise motion vector for the available reference subblock based on the motion vector of the available reference subblock. For an unavailable reference subblock in a reference subblock, the encoding apparatus may use a base motion vector as the subblock-wise motion vector for the unavailable reference subblock.

[0203] The base motion vector may correspond to the default motion vector mentioned above, and may be derived on the co-located reference picture based on the position of the current block.

[0204] In one embodiment, the encoding apparatus may identify a position of a reference coding block on a co-located reference picture based on a right-bottom center sample position of the current block, and derive a base motion vector based on the position of the reference coding block. The reference coding block may refer to a col block located on a co-located reference picture corresponding to the current block including the sub-block. As described with reference to Table 2 above, the position of the reference coding block may be indicated by (xColCtrCb, yColCtrCb), and the position (xColCtrCb, yColCtrCb) may indicate the position of a reference coding block covering the position (xCtr, yCtr) in the co-located reference picture based on the left-top sample of the co-located reference picture. The position (xCtr, yCtr) may indicate the right-bottom center sample position of the current block.

[0205] Also, in deriving the base motion vector, a motion shift may be applied to the position (xColCtrCb, yColCtrCb) of the reference coding block. As described above, the motion shift may be performed by adding a motion vector derived from a spatially neighboring block (e.g., A1 block) of the current block to the reference coding block position (xColCtrCb, yColCtrCb) covering the right bottom center sample. The encoding apparatus may derive the base motion vector based on the motion shifted reference coding block position (xColCb, yColCb). That is, the base motion vector may be a motion vector derived from a motion shifted position on the co-located reference picture based on the right bottom center sample position of the current block.

[0206] Meanwhile, whether the reference sub-block is usable can be determined based on whether it is located outside the co-located reference picture or on a motion vector. For example, the unusable reference sub-block can include a reference sub-block located outside the co-located reference picture or a reference sub-block for which a motion vector is unavailable. For example, if the reference sub-block is based on an intra mode, an Intra Block Copy (IBC) mode, or a palette mode, the reference sub-block can be a sub-block for which a motion vector is unavailable. Alternatively, if a reference coding block covering a modified position derived based on the position of the reference sub-block is based on an intra mode, an IBC mode, or a palette mode, the reference sub-block can be a sub-block for which a motion vector is unavailable.

[0207] In this case, in one embodiment, the motion vector of the available reference sub-block may be derived based on the motion vector of the block covering the modified location derived based on the top left sample location of the reference sub-block. For example, as shown in Table 2 above, the modified location may be derived based on a formula such as ((xColSb>>3)<<3, (yColSb>>3)<<3). Here, xColSb and yColSb may respectively indicate the x and y coordinates of the top left sample location of the reference sub-block, >> may indicate an arithmetic right shift, and << may indicate an arithmetic left shift.

[0208] Meanwhile, as described above, in deriving a temporal motion information candidate based on a sub-block, it can be seen that a motion vector for a reference sub-block is derived based on the position of the sub-block in a current block, and a base motion vector is derived based on the position of the current block. For example, as described in FIG. 16 to FIG. 19, for a current block having a size of 8×8, a motion vector for a reference sub-block and a base motion vector can be derived based on a right-bottom center sample position of the current block. For a current block having a size larger than 8×8, a motion vector for a reference sub-block can be derived based on a right-bottom center sample position of each of the sub-blocks in the current block, and a base motion vector can be derived based on a right-bottom center sample position of the current block.

[0209] The encoding apparatus may generate a predicted sample of the current block based on motion information for a sub-block within the current block (S2230).

[0210] The encoding device may select optimal motion information based on a rate-distortion (RD) cost and generate a prediction sample based on the optimal motion information. For example, if motion information derived on a sub-block basis for the current block (i.e., sbTMVP) is selected as optimal motion information, the encoding device may generate a prediction sample for the current block based on the motion information for the sub-blocks of the current block derived as described above.

[0211] The encoding apparatus may derive residual samples based on the prediction samples (S2240) and encode video information including information about the residual samples (S2250).

[0212] That is, the encoding apparatus may derive residual samples based on original samples for the current block and predicted samples of the current block, and may generate information about the residual samples, where the information about the residual samples may include information about values ​​of quantized transform coefficients derived by performing transform and quantization on the residual samples, position information, a transform technique, a transform kernel, a quantization parameter, and the like.

[0213] The encoding device can encode information about the residual samples and output it in a bitstream, which can be transmitted to the decoding device via a network or a storage medium.

[0214] FIG. 23 illustrates a schematic diagram of an example video / image decoding method according to an embodiment of the present document.

[0215] The method disclosed in FIG. 23 may be performed by the decoding device 300 disclosed in FIG. 3. Specifically, steps (S2300) to (S2330) in FIG. 23 may be performed by the prediction unit 330 (more specifically, the inter prediction unit 332) disclosed in FIG. 3, and step (S2340) in FIG. 23 may be performed by the addition unit 340 disclosed in FIG. 3. In addition, the method disclosed in FIG. 23 may be performed including the embodiments described above in this document. Therefore, in FIG. 23, detailed descriptions of contents that overlap with the embodiments described above will be omitted or simplified.

[0216] Referring to FIG. 23, the decoding device can derive a reference sub-block on a collocated reference picture for a sub-block in a current block (S2300).

[0217] Here, the collocated reference picture refers to a reference picture used to derive temporal motion information (i.e., sbTMVP) as described above, and may refer to the col picture described above. The reference sub-block may refer to the col sub-block described above.

[0218] In one embodiment, the decoding device can derive a reference sub-block on a co-located reference picture based on the position of the sub-block within a current block, where the current block may be referred to as a current coding unit (CU) or a current coding block (CB), and the sub-block included within the current block may also be referred to as a current coding sub-block.

[0219] For example, the decoding apparatus may first determine the position of the current block, and then determine the position of the sub-block within the current block. As described with reference to Table 2 above, the position of the current block may be represented based on the left top sample position (xCtb, yCtb) of the coding tree block and the right bottom center sample position (xCtr, yCtr) of the current block. The positions of the sub-blocks within the current block may be represented by (xSb, ySb), and the positions (xSb, ySb) may represent the right bottom center sample positions of the sub-blocks. Here, the right bottom center sample positions (xSb, ySb) of the sub-blocks may be calculated based on the left top sample position of the sub-block and the sub-block size, and may be calculated as in Equations (8-523) to (8-524) of Table 2 above.

[0220] Then, the decoding device can derive a reference sub-block on the collocated reference picture based on the right-bottom center sample position of each of the sub-blocks in the current block. As described with reference to Table 2 above, the reference sub-block can be indicated by a position (xColSb, yColSb) on the collocated reference picture, and the position (xColSb, yColSb) can be derived on the collocated reference picture based on the right-bottom center sample position (xSb, ySb) of each of the sub-blocks in the current block.

[0221] On the other hand, the top left sample position used in this document may also be referred to as the top left sample position or the top left sample position, and the bottom right center sample position may also be referred to as the bottom right center sample position, the center bottom right sample position, the lower right center sample position, the center lower right sample position, or the center lower right sample position.

[0222] Also, a motion shift may be applied when deriving the reference sub-block. The decoding apparatus may perform a motion shift based on a motion vector derived from a spatial neighboring block of the current block. The spatial neighboring block of the current block may be a left neighboring block located to the left of the current block, and may be referred to as the A1 block shown in FIG. 10 and FIG. 11, for example. In this case, if the left neighboring block (e.g., the A1 block) is available, a motion vector may be derived from the left neighboring block, or if the left neighboring block is unavailable, a zero vector may be derived. Here, whether or not the spatial neighboring block is available may be determined based on the reference picture information, prediction mode information, position information, etc. of the spatial neighboring block. For example, if the reference picture of the spatial neighboring block and the reference picture of the current block are the same, the spatial neighboring block may be determined to be available. Alternatively, if the spatial neighboring block is coded in an intra prediction mode or if the spatial neighboring block is located outside the current picture / tile, the spatial neighboring block may be determined to be unavailable.

[0223] That is, the decoding apparatus may apply a motion shift (i.e., a motion vector of a spatially adjacent block (e.g., block A1)) to the right bottom center sample position (xSb, ySb) of each sub-block in the current block, and derive a reference sub-block on the co-located reference picture based on the motion shifted position. In this case, the position (xColSb, yColSb) of the reference sub-block may be indicated by a position motion-shifted to a position indicated by the motion vector of the spatially adjacent block (e.g., block A1) at the right bottom center sample position (xSb, ySb) of each sub-block in the current block, and may be calculated as in Equations (8-525) to (8-526) of Table 2 above.

[0224] The decoding apparatus may derive sub-block based temporal motion information candidates based on the reference sub-blocks (S2310).

[0225] Meanwhile, in this document, the subblock-based temporal motion information candidate is referred to as the above-mentioned sbTMVp (Subblock-Based Temporal Motion Vector Prediction) candidate, and may be replaced or mixed with the subblock-based temporal motion vector predictor candidate. That is, when deriving motion information in subblock units and performing prediction as described above, the sbTMVP candidate may be derived, and motion prediction may be performed at the subblock level (or sub-coding unit (sub-CU) level) based on the sbTMVP candidate.

[0226] The decoding apparatus may derive motion information for the sub-blocks in the current block based on the sub-block-based temporal motion information candidates (S2320).

[0227] The sub-block based temporal motion information candidate may include a sub-block based motion vector, where the sub-block based motion vector may include a motion vector derived based on a reference sub-block.

[0228] In one embodiment, the decoding device can derive a subblock-wise motion vector for a reference subblock as motion information for a subblock in a current block. For example, the decoding device can derive a subblock-wise motion vector based on whether the reference subblock is available. For a available reference subblock in a reference subblock, the decoding device can derive a subblock-wise motion vector for the available reference subblock based on the motion vector of the available reference subblock. For an unavailable reference subblock in a reference subblock, the decoding device can use a base motion vector as the subblock-wise motion vector for the unavailable reference subblock.

[0229] The base motion vector may correspond to the default motion vector mentioned above, and may be derived on the co-located reference picture based on the position of the current block.

[0230] In one embodiment, the decoding apparatus may identify a position of a reference coding block on a co-located reference picture based on a right-bottom center sample position of a current block, and derive a base motion vector based on the position of the reference coding block. The reference coding block may refer to a col block located on a co-located reference picture corresponding to a current block including a sub-block. As described with reference to Table 2 above, the position of the reference coding block may be indicated by (xColCtrCb, yColCtrCb), and the position (xColCtrCb, yColCtrCb) may indicate the position of a reference coding block covering a position (xCtr, yCtr) in the co-located reference picture based on the left-top sample of the co-located reference picture. The position (xCtr, yCtr) may indicate the right-bottom center sample position of the current block.

[0231] Also, in deriving the base motion vector, a motion shift may be applied to the position (xColCtrCb, yColCtrCb) of the reference coding block. As described above, the motion shift may be performed by adding a motion vector derived from a spatially neighboring block (e.g., A1 block) of the current block to the reference coding block position (xColCtrCb, yColCtrCb) covering the right bottom center sample. The decoding apparatus may derive the base motion vector based on the motion shifted reference coding block position (xColCb, yColCb). That is, the base motion vector may be a motion vector derived from a motion shifted position on the co-located reference picture based on the right bottom center sample position of the current block.

[0232] Meanwhile, whether the reference sub-block is usable can be determined based on whether it is located outside the co-located reference picture or on a motion vector. For example, the unusable reference sub-block can include a reference sub-block that deviates from the outside of the co-located reference picture or a reference sub-block for which a motion vector is unavailable. For example, if the reference sub-block is based on an intra mode, an Intra Block Copy (IBC) mode, or a palette mode, the reference sub-block may be a sub-block for which a motion vector is unavailable. Alternatively, if a reference coding block covering a modified position derived based on the position of the reference sub-block is based on an intra mode, an IBC mode, or a palette mode, the reference sub-block may be a sub-block for which a motion vector is unavailable.

[0233] In this case, in one embodiment, the motion vector of the available reference sub-block may be derived based on the motion vector of the block covering the modified location derived based on the top left sample location of the reference sub-block. For example, as shown in Table 2 above, the modified location may be derived based on a formula such as ((xColSb>>3)<<3, (yColSb>>3)<<3). Here, xColSb and yColSb may respectively indicate the x and y coordinates of the top left sample location of the reference sub-block, >> may indicate an arithmetic right shift, and << may indicate an arithmetic left shift.

[0234] Meanwhile, as described above, in deriving a temporal motion information candidate based on a sub-block, it can be seen that a motion vector for a reference sub-block is derived based on the position of the sub-block in a current block, and a base motion vector is derived based on the position of the current block. For example, as described in FIG. 16 to FIG. 19, for a current block having a size of 8×8, a motion vector for a reference sub-block and a base motion vector can be derived based on a right-bottom center sample position of the current block. For a current block having a size larger than 8×8, a motion vector for a reference sub-block can be derived based on a right-bottom center sample position of each of the sub-blocks in the current block, and a base motion vector can be derived based on a right-bottom center sample position of the current block.

[0235] The decoding apparatus may generate a predicted sample of the current block based on the motion information for the sub-blocks in the current block (S2330).

[0236] In one embodiment, for a prediction mode in which prediction is performed based on sub-block-based motion information for the current block (i.e., sbTMVP mode), the decoding device can generate a predicted sample for the current block based on motion information for sub-blocks of the current block derived as described above.

[0237] The decoding device may generate reconstructed samples based on the predicted samples (S2340).

[0238] In one embodiment, the decoding device can use the predicted samples directly as reconstructed samples according to a prediction mode, or can add residual samples to the predicted samples to generate reconstructed samples.

[0239] The decoding apparatus may receive information about a residual for the current block if a residual sample for the current block exists. The information about the residual may include a transform coefficient for the residual sample. The decoding apparatus may derive a residual sample (or a residual sample array) for the current block based on the residual information. The decoding apparatus may generate a reconstructed sample based on the prediction sample and the residual sample, and may derive a reconstructed block or picture based on the reconstructed sample. As described above, the decoding apparatus may then apply an in-loop filtering procedure, such as a deblock filtering and / or SAO procedure, to the reconstructed picture, if necessary, to improve subjective / objective image quality.

[0240] In the above embodiments, the method is described based on a flow chart with a series of steps or blocks, but the embodiments of this document are not limited to the order of steps, and certain steps may occur in a different order or simultaneously with different steps than described above. In addition, those skilled in the art will understand that the steps shown in the flow chart are not exclusive, and other steps may be included, or one or more steps of the flow chart may be deleted without affecting the scope of this document.

[0241] The method according to the present document described above may be embodied in software form, and the encoding device and / or decoding device according to the present document may be included in a device that performs video processing, such as a TV, a computer, a smartphone, a set-top box, or a display device.

[0242] When the embodiments in this document are implemented in software, the methods described above may be implemented with modules (processes, functions, etc.) performing the functions described above. The modules may be stored in a memory and executed by a processor. The memory may be internal or external to the processor and may be coupled to the processor in various well-known ways. The processor may include an Application-Specific Integrated Circuit (ASIC), other chipsets, logic circuits, and / or data processing devices. The memory may include Read-Only Memory (ROM), Random Access Memory (RAM), flash memory, memory cards, storage media, and / or other storage devices. That is, the embodiments described in this document may be implemented and executed on a processor, microprocessor, controller, or chip. For example, the functional units shown in each drawing may be implemented and executed on a computer, processor, microprocessor, controller, or chip. In this case, information (e.g., information on instructions) or algorithms for implementation may be stored in a digital storage medium.

[0243] In addition, the decoding device and encoding device to which this document is applied may be included in a multimedia broadcast transmitting / receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video interactive device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camcorder, a video on demand (VoD) service providing device, an over-the-top video (OTT) device, an internet streaming service providing device, a three-dimensional (3D) video device, a virtual reality (VR) device, an augmented reality (AR) device, an image telephone video device, a transportation terminal (e.g., a vehicle (including an autonomous vehicle), an airplane terminal, a ship terminal, etc.), and a medical video device, 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-connected TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), etc.

[0244] In addition, the processing method to which this document is applied can be produced in the form of a program executed by a computer and can be stored in a computer-readable storage medium. In addition, multimedia data having a data structure according to this document can also be stored in a computer-readable storage medium. The computer-readable storage medium includes all kinds of storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable storage medium can include, for example, a Blu-ray Disc (BD), a Universal Serial Bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. In addition, the computer-readable storage medium includes a medium embodied in the form of a carrier wave (e.g., transmission via the Internet). In addition, a bit stream generated by the encoding method can be stored in a computer-readable storage medium or transmitted via a wired or wireless communication network.

[0245] Furthermore, the embodiments of the present document may be embodied in a computer program product by program code, the program code being executable by a computer in accordance with the embodiments of the present document. The program code may be stored on a carrier readable by a computer.

[0246] FIG. 24 illustrates an example of a content streaming system in which the embodiments disclosed herein can be applied.

[0247] Referring to FIG. 24, the content streaming system applied to the embodiments of this document can broadly include an encoding server, a streaming server, a web server, a media storage device (storage facility), a user device, and a multimedia input device.

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

[0249] The bitstream may be generated by an encoding method or a bitstream generation method applied to an embodiment of this document, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.

[0250] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server acts as a medium to inform the user of available services. When a user requests a desired service from the web server, the web server transfers the request to the streaming server, and the streaming server transmits multimedia data to the user. In this case, the content streaming system may include a separate control server, and in this case, the control server controls commands / responses between devices in the content streaming system.

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

[0252] Examples of the above user devices include mobile phones, smart phones, laptop computers, digital broadcasting terminals, PDAs (Personal Digital Assistants), PMPs (Portable Multimedia Players), navigation systems, slate PCs, tablet PCs, ultrabooks (ULTRABOOK (registered trademark)), wearable devices (e.g., smart watches (watch-type terminals), smart glasses (glass-type terminals), HMDs (Head Mounted Displays), digital TVs, desktop computers, and digital signatures.

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

[0254] The claims described herein may be combined in various ways. For example, the technical features of the method claims herein may be combined and embodied in an apparatus, the technical features of the device claims herein may be combined and embodied in a method, the technical features of the method claims herein and the technical features of the device claims herein may be combined and embodied in an apparatus, and the technical features of the method claims herein and the technical features of the device claims herein may be combined and embodied in a method.

Claims

1. A video decoding method executed by a decoding device, comprising: obtaining residual information from the bitstream; deriving a co-located sub-block in a co-located picture for a sub-block in a current block; deriving sub-block based candidate temporal motion information based on the collocated sub-blocks; deriving motion information for the sub-block within the current block based on the sub-block based candidate temporal motion information; generating a prediction sample for the current block based on the motion information for the sub-block within the current block; generating residual samples for the current block based on the residual information; generating reconstructed samples based on the prediction samples and the residual samples; a position of each of the co-located sub-blocks is derived from the co-located picture by applying a motion shift to a right-bottom center sample position of each of the sub-blocks within the current block; the motion shifting is performed based on motion vectors derived from spatially neighboring blocks of the current block; the spatially adjacent block is a left-side adjacent block, the sub-block based temporal motion information candidate comprises a sub-block per-motion vector; A method in which a base motion vector is used as a subblock-wise motion vector for unavailable co-located sub-blocks among the co-located sub-blocks.

2. A video encoding method executed by an encoding device, comprising: deriving a co-located sub-block in a co-located picture for a sub-block in a current block; deriving sub-block based candidate temporal motion information based on the collocated sub-blocks; deriving motion information for the sub-block within the current block based on the sub-block based candidate temporal motion information; generating a prediction sample for the current block based on the motion information for the sub-block within the current block; deriving residual samples based on the prediction samples; and encoding video information including information about the residual samples; a position of each of the co-located sub-blocks is derived from the co-located picture by applying a motion shift to a right-bottom center sample position of each of the sub-blocks within the current block; the motion shifting is performed based on motion vectors derived from spatially neighboring blocks of the current block; the spatially adjacent block is a left-side adjacent block, the sub-block based temporal motion information candidate comprises a sub-block per-motion vector; A method, wherein a base motion vector is used as a subblock-wise motion vector for unavailable co-located sub-blocks among the co-located sub-blocks.

3. A method for transmitting data relating to a video, comprising the steps of: obtaining a bitstream relating to the video, the bitstream comprising: deriving a co-located sub-block in a co-located picture for a sub-block in a current block; deriving sub-block based candidate temporal motion information based on the collocated sub-blocks; deriving motion information for the sub-block within the current block based on the sub-block based candidate temporal motion information; generating a prediction sample for the current block based on the motion information for the sub-block within the current block; deriving residual samples based on the prediction samples; encoding video information including information about the residual samples to output the bitstream; transmitting the data including the bitstream; a position of each of the co-located sub-blocks is derived from the co-located picture by applying a motion shift to a right-bottom center sample position of each of the sub-blocks within the current block; the motion shifting is performed based on motion vectors derived from spatially neighboring blocks of the current block; the spatially adjacent block is a left-side adjacent block, the sub-block based temporal motion information candidate comprises a sub-block per-motion vector; A method, wherein a base motion vector is used as a subblock-wise motion vector for unavailable co-located sub-blocks among the co-located sub-blocks.

Citation Information

Patent Citations

  • Moving image decoding device

    WO2017195608A1

  • Method for processing video on basis of inter prediction mode and apparatus therefor

    WO2018066927A1

  • System and method for signaling of motion merge modes in video coding

    WO2020142448A1