Method and device for coding video based on inter prediction
By employing combined inter-picture merge and intra-picture prediction flags and CU skip conditions, the method optimizes inter prediction and merge data syntax, enhancing video coding efficiency and reducing unnecessary signaling.
Patent Information
- Application Number
- JP2024110782
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2019-06-19
- Filing Date
- 2024-07-10
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2040-06-19
AI Technical Summary
Existing video coding technologies face inefficiencies in inter prediction, leading to unnecessary signaling and suboptimal merge data syntax handling, which hampers the overall efficiency of video compression.
The method involves determining the availability of combined inter-picture merge and intra-picture prediction (CIIP) through flags, and conditions based on coding unit (CU) skip flags and block sizes to efficiently perform inter prediction, reducing unnecessary signaling and optimizing merge data syntax.
This approach enhances video coding efficiency by improving inter prediction performance, reducing unnecessary syntax signaling, and enabling efficient merge data syntax, thereby improving overall video compression efficiency.
Smart Images

Figure 2024138404000001_ABST
Abstract
Description
[Technical field]
[0001] The present technology relates to a method and apparatus for coding video based on inter prediction. [Background technology]
[0002] In recent years, 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 to be transmitted increases relatively compared to existing image / video data, so that when image data is transmitted using a medium such as an existing wired or wireless broadband line or image / video data is stored using an existing storage medium, the transmission cost and storage cost increase.
[0003] In addition, in recent years, interest in and demand for immersive media such as virtual reality (VR), artificial reality (AR) content, and holograms has been increasing, and the broadcast of images / videos having different image characteristics from real images, such as game images, has been increasing.
[0004] Therefore, there is a demand for highly efficient image / video compression technology to effectively compress and transmit, store, and play back high-resolution, high-quality image / video information having the various characteristics described above. Summary of the Invention [Problem to be solved by the invention]
[0005] The technical problem of this document is to provide a method and apparatus for improving video coding efficiency.
[0006] Another technical problem of this document is to provide a method and apparatus for efficiently performing inter prediction.
[0007] Another technical problem of this document is to provide a method and apparatus for preventing unnecessary signaling during inter prediction.
[0008] Yet another technical problem of this document is to provide a method and apparatus for efficiently signaling merge data syntax. [Means for solving the problem]
[0009] According to one embodiment of this document, a decoding method performed by a decoding device includes a step of obtaining at least one of a CIIP (combined inter-picture merge and intra-picture prediction) availability flag and a CU (coding unit) skip flag indicating whether a skip mode is applied to a current block from a bitstream, a step of obtaining a regular merge flag from the bitstream based on whether a condition based on the CIIP availability flag and at least one of a condition based on the CU skip flag and a condition based on a size of the current block are satisfied, a step of performing inter prediction based on the regular merge flag to generate a predicted sample of the current block, and a step of generating a reconstructed sample based on the predicted sample.
[0010] According to another embodiment of the present document, an encoding method performed by an encoding device includes the steps of deriving a prediction sample of a current block based on inter prediction, generating information regarding a prediction mode indicating a prediction mode of the current block, deriving a residual sample based on the prediction sample, generating residual information based on the residual sample, and encoding video information including information regarding the prediction mode and the residual information, wherein the video information further includes at least one of a CIIP available flag and a CU skip flag indicating whether a skip mode is applied to the current block, and the video information includes a regular merge flag based on at least one of a condition based on the CIIP available flag and a condition based on the CU skip flag and a condition based on the size of the current block being satisfied.
[0011] According to another embodiment of the present document, a computer-readable digital storage medium includes information for causing a decoding device to perform a decoding method, the decoding method including the steps of obtaining at least one of a CIIP availability flag and a CU skip flag indicating whether a skip mode is applied to a current block from a bitstream, obtaining a regular merge flag from the bitstream based on whether a condition based on the CIIP availability flag and at least one of a condition based on the CU skip flag and a condition based on a size of the current block are satisfied, performing inter prediction based on the regular merge flag to generate a predicted sample for the current block, and generating a reconstructed picture based on the predicted sample. Effect of the Invention
[0012] According to an embodiment of the present document, the overall image / video compression efficiency can be improved.
[0013] According to one embodiment of the present document, inter prediction can be performed efficiently.
[0014] According to one embodiment of this document, unnecessary syntax signaling during inter prediction can be efficiently removed.
[0015] According to one embodiment of this document, a merge data syntax can be efficiently signaled. [Brief description of the drawings]
[0016] [Figure 1] 1 illustrates generally an example of a video / image coding system in 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 this document can be applied. [Diagram 3] 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] 1 illustrates an example of an inter-prediction based video / image encoding method. [Diagram 5] 1 illustrates an example of an inter-prediction based video / picture decoding method. [Figure 6] 1 illustrates an exemplary inter-prediction procedure. [Figure 7] FIG. 1 illustrates spatial candidates that can be used for inter prediction. [Figure 8] 1 illustrates a schematic of a merge candidate list construction method. [Figure 9] FIG. 2 illustrates a sub-block-based temporal motion vector prediction process that can be used during inter prediction. [Figure 10] 1 illustrates a schematic diagram of an example video / picture encoding method and associated components including an inter-prediction method according to an embodiment of the present document; [Figure 11] 1 illustrates a schematic diagram of an example video / picture encoding method and associated components including an inter-prediction method according to an embodiment of the present document; [Figure 12] 1 illustrates a schematic diagram of an example of a video / picture decoding method including an inter-prediction method and related components according to an embodiment of the present document; [Figure 13] 1 illustrates a schematic diagram of an example of a video / picture decoding method including an inter-prediction method and related components according to an embodiment of the present document; [Figure 14] 1 illustrates an example of a content streaming system to which the embodiments disclosed herein may be applied. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0017] Since the disclosure of this document can be modified in various ways and can have various embodiments, a specific embodiment will be illustrated in the drawings and described in detail. The terms used in this document are merely used to describe a specific embodiment and are not intended to limit the technical ideas of this document. A singular expression includes the expression "at least one" unless the context clearly indicates otherwise. In this document, the terms "include" or "have" are intended to specify the presence of a feature, number, step, operation, component, part, or combination 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.
[0018] Meanwhile, each component in the drawings described in this document is illustrated independently for the convenience of describing 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 disclosure scope of this document as long as it does not deviate from the essence of the method disclosed in this document.
[0019] In this document, the term " / " and "," should be interpreted to indicate "and / or". For instance, the expression "A / B" may mean "A and / or B." Further, "A, B" may mean "A and / or B." Further, "A / B / C" may mean "at least one of A, B, and / or C." Also, "A / B / C" may mean "at least one of A, B, and / or C."
[0020] Further, in the document, the term "or" should be interpreted to indicate "and / or." For instance, the expression "A or B" may comprise 1) only A, 2) only B, and / or 3) both A and B. In other words, the term "or" in this document should be interpreted to indicate "additionally or alternatively."
[0021] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document can be applied to methods disclosed in the versatile video coding (VVC) standard. Also, the methods / embodiments disclosed in this document can 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 (ex. H.267, H.268, etc.).
[0022] Various embodiments relating to video / image coding are presented in this document and, unless otherwise stated, the embodiments may be combined with each other.
[0023] Hereinafter, the embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. In the following, the same reference numerals are used for the same components in the drawings, and the duplicated description of the same components will be omitted.
[0024] FIG. 1 illustrates a schematic diagram of an example video / image coding system in which embodiments of the present document may be applied.
[0025] As shown in Figure 1, the video / image coding system includes a first device (source device) and a second device (receiving device). The source device can 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.
[0026] The source device may include a video source, an encoding device, and a sending unit. The receiving device may include a receiving unit, a decoding device, and a renderer. The encoding device may be referred to as a video / video encoding device, and the decoding device may be referred to as 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.
[0027] 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 with a process in which related data is generated.
[0028] An encoding device may encode an input video / image. The encoding device may perform a series of steps such as prediction, transformation, quantization, etc. for compression and coding efficiency. The encoded data (encoded video / image information) may be output in the form of a bitstream.
[0029] 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.
[0030] The decoding device can decode the video / image by performing a series of steps such as inverse quantization, inverse transformation, and prediction that correspond to the operations of the encoding device.
[0031] The renderer may render the decoded video / image, and the rendered video / image may be displayed via a display unit.
[0032] In this document, at least one of quantization / dequantization and / or transform / inverse transform may be omitted. If the quantization / dequantization is omitted, the quantized transform coefficients may be referred to as transform coefficients. If the transform / inverse transform is omitted, the transform coefficients may be referred to as coefficients or residual coefficients, or may be referred to as transform coefficients for uniformity of representation.
[0033] 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 includes information on the transform coefficient(s), and the information on the transform coefficient(s) may be signaled via a residual coding syntax. Transform coefficients may be derived based on the residual information (or information on the transform coefficient(s)), and scaled transform coefficients may be derived by inverse transform (scaling) on the transform coefficients. Residual samples may be derived based on inverse transform (transform) on the scaled transform coefficients. This may be similarly applied / expressed in other parts of this document.
[0034] In this document, a video may mean a collection of a series of images over time. A picture generally means a unit showing one image at a specific time, and a slice / tile is a unit constituting a part of a picture in coding. A slice / tile includes one or more coding tree units (CTUs). A picture is composed of one or more slices / tiles. A picture is composed of one or more tile groups. A tile group includes one or more tiles. A brick may represent a rectangular region of CTU rows within a tile in a picture. A tile may be partitioned into multiple bricks, each of which consisting of one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks may also be referred to as a brick.A brick scan is a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a brick, bricks within a tile are ordered consecutively in a raster scan of the bricks of the tile, and tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture. A tile is a rectangular region of CTUs within a particular tile column and a 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 is 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 bricks of a picture that may be exclusively contained in a single NAL unit. A slice may consist of either a number of complete tiles or only a consecutive sequence of complete bricks of one tile. In this document, the terms tile group and slice may be used interchangeably.For example, in this document, a tile group / tile group header may be referred to as a slice / slice header.
[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 the spatial domain, or may refer to a transform coefficient in the frequency domain when such a pixel value is transformed into the 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. One unit may include one luma block and two chroma (e.g., cb, cr) blocks. A unit may be used in combination with terms such as block or area depending on the case. 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] 2 is a diagram for explaining the schematic configuration of a video / image encoding device to which the embodiment of this document can be applied. Hereinafter, the video encoding device includes the image encoding device.
[0038] As shown in FIG. 2, the encoding apparatus 200 may be configured to 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) according to an embodiment. In addition, the memory 270 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware components may further include the memory 270 as an internal / external component.
[0039] 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 units may be called coding units (CUs). In this case, the coding units 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 structure. In this case, for example, the quad-tree structure may be applied first, and then the binary tree structure and / or the ternary structure may be applied. Alternatively, the binary tree structure may be applied first. The coding procedure according to the present disclosure may be performed based on a 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) or a transform unit (TU). 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 may be a unit of sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.
[0040] The unit may be used interchangeably with terms such as block or area. In general, an M×N block may refer to a collection 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 that corresponds to a pixel or pel of one picture (or image).
[0041] The encoding apparatus 200 subtracts 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) to generate a residual signal (residual block, residual sample array), and the generated residual signal is transmitted to the conversion unit 232. In this case, as shown in the figure, a unit in the encoder 200 that subtracts a prediction signal (predicted block, prediction sample array) from an input video signal (original block, original sample array) is called a subtraction unit 231. The prediction unit 220 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 220 determines whether intra prediction or inter prediction is applied in units of the current block or CU. The prediction unit 220 may generate various information related to prediction, such as prediction mode information, as will be described later in the description of each prediction mode, and transmit the information to the entropy encoding unit 240. The prediction information can be encoded in the entropy encoding unit 240 and output in the form of a bitstream.
[0042] 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. In the intra prediction, the prediction mode 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 fineness 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 the prediction mode to be applied to the current block using the prediction modes applied to the neighboring blocks.
[0043] The inter prediction unit 221 may derive a predicted block for a 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 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 direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, 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 (col CU), 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 derive a motion vector and / or a reference picture index of the current block by forming a motion information candidate list based on neighboring blocks. Inter prediction may be performed based on various prediction modes, and for example, in the case of a skip mode and a merge mode, the inter prediction unit 221 may use motion information of a neighboring block as motion information of the current block. In the case of the skip mode, unlike the merge mode, a residual signal may not be transmitted.In the case of motion vector prediction (MVP) mode, the motion vector of the neighboring block 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.
[0044] The prediction unit 220 generates a prediction signal based on various prediction methods described later. For example, the prediction unit 220 can apply intra prediction or inter prediction for prediction of one block, as well as intra prediction and inter prediction simultaneously. This is called combined inter and intra prediction (CIIP). The prediction unit can 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 can be used for content image / video coding such as games, for example, as in screen content coding (SCC). IBC basically performs prediction within a current picture, but is similar to inter prediction in that a reference block is derived within the current picture. That is, IBC can use at least one of the inter prediction techniques described in this document. The palette mode can be considered as an example of intra coding or intra prediction. When the palette mode is applied, a sample value within a picture can be signaled based on information regarding a palette table and a palette index.
[0045] The prediction signal generated via the prediction unit (including the inter prediction unit 221 and / or the intra prediction unit 222) can be used to generate a reconstructed signal or can be used to generate a residual signal.
[0046] 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 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 predicted 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 variable sizes that are not square.
[0047] The quantization unit 233 quantizes the transform coefficients and transmits the quantized transform coefficients to the entropy encoding unit 240, and the entropy encoding unit 240 encodes the quantized signal (information about the quantized transform coefficients) and outputs it as a bitstream. The information about the quantized transform coefficients may be called residual information. The quantization unit 233 may rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form.
[0048] The entropy encoding unit 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 encoding unit 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 / image information) may be transmitted or stored in a network abstraction layer (NAL) unit unit in the form of a 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). The video / image information may also include general constraint information. In this document, information and / or syntax elements transmitted / signaled from an encoding device to a decoding device are included in video / image information. The video / image information is encoded through the above-mentioned encoding procedure and included in the bitstream. The bitstream may be transmitted via a network or stored in a digital storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) for transmitting and / or a storage unit (not shown) for storing the signal output from the entropy encoding unit 240 may be configured as an internal / external element of the encoding device 200, or the transmitter may be included in the entropy encoding unit 240.
[0049] 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) is restored by applying inverse quantization and inverse transform to the quantized transform coefficients via the inverse quantizer 234 and the inverse transformer 235. A reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) is generated by the adder 250 adding the reconstructed residual signal to the prediction signal output from the inter prediction unit 221 or the intra prediction unit 222. When there is no residual for the current block, such as when the 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 is 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.
[0050] Meanwhile, luma mapping with chroma scaling (LMCS) may be applied in the picture encoding and / or restoration process.
[0051] 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 store the modified reconstructed picture in the memory 270, specifically, in the DPB of the memory 270. The various filtering methods include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc. The filtering unit 260 generates various information related to filtering, as will be described later in the description of each filtering method, and transmits the information to the entropy encoding unit 240. The information related to filtering is encoded in the entropy encoding unit 240 and output in the form of a bitstream.
[0052] The modified reconstructed picture transmitted to the memory 270 can be used as a reference picture in the inter prediction unit 221. In this way, when inter prediction is applied, the encoding apparatus can avoid prediction mismatch between the encoding apparatus 100 and the decoding apparatus, and can also improve coding efficiency.
[0053] The DPB of the memory 270 may store the modified reconstructed picture to be used 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 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 270 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 222.
[0054] FIG. 3 is a diagram illustrating the schematic configuration of a video / image decoding device to which the embodiments of this document can be applied.
[0055] As shown in FIG. 3, the decoding device 300 may be configured to 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 decoding unit 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 hardware components may further include a memory 360 as an internal / external component.
[0056] If 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. 3. For example, the decoding apparatus 300 can derive a unit / block 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 can be, 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 quad tree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units can be derived from the coding unit. And, the restored image signal decoded and output by the decoding apparatus 300 can be reproduced by a reproduction device.
[0057] The decoding apparatus 300 receives a signal output from the encoding apparatus of FIG. 2 in the form of a bitstream, and the received signal is decoded by 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). The video / image information may also include general constraint information. The decoding apparatus may decode a picture further 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 obtained from the bitstream by being decoded through the decoding procedure. For example, the entropy decoding unit 310 decodes information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC (context-adaptive variable length coding), or CABAC (context-adaptive arithmetic coding), and outputs values of syntax elements required for image restoration and quantized values of transform coefficients related to residuals. More specifically, the CABAC entropy decoding method receives bins corresponding to each syntax element in the bitstream, determines a context model using information on the syntax element to be decoded and decoding information on neighboring and to-be-decoded blocks or information on symbols / bins decoded in previous steps, predicts the occurrence probability of bins according to the determined context model, and performs arithmetic decoding of the bins to generate symbols corresponding to the values of each syntax element.At this time, 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. Prediction information among the information decoded in the entropy decoding unit 310 is provided to a prediction unit (inter prediction unit 332 and intra prediction unit 331), and residual values entropy decoded in the entropy decoding unit 310, i.e., quantized transform coefficients and related parameter information, may be input to the residual processing unit 320.
[0058] The residual processing unit 320 may derive a residual signal (residual block, residual sample, residual sample array). In addition, information related to filtering among the information decoded in the entropy decoding unit 310 is provided to the filtering unit 350. Meanwhile, a receiving unit (not shown) for receiving a signal output from the encoding device may be further configured as an internal / external element of the decoding device 300, and 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 divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder includes the entropy decoding unit 310, and the sample decoder includes 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.
[0059] 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 an encoding apparatus. 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.
[0060] The inverse transform unit 322 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0061] The prediction unit 330 performs prediction on a current block and generates a predicted block including prediction samples for the current block. The prediction unit 330 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.
[0062] The prediction unit 330 may generate a prediction signal based on various prediction methods 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 / movie 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 is included in the video / image information and signaled.
[0063] 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 away from the current block depending on the prediction mode. In intra prediction, prediction modes include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 331 may also determine the prediction mode applied to the current block using the prediction modes applied to the neighboring blocks.
[0064] 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. At that time, 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 correlation of motion information between neighboring blocks and the current block. The motion information includes 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 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 on the prediction includes information indicating an inter prediction mode for the current block.
[0065] The adder 340 may 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 may be used as a reconstructed block.
[0066] 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 a next block to be processed in a current picture, may be output after filtering as described below, or may be used for inter prediction of a next picture.
[0067] Meanwhile, luma mapping with chroma scaling (LMCS) can be applied during the picture decoding process.
[0068] 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 60, specifically, to the DPB of the memory 360. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.
[0069] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter prediction unit 332. The memory 360 can 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 is transmitted to the inter prediction unit 221 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 360 can store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 331.
[0070] In this specification, the embodiments described in the filtering unit 260, the inter prediction unit 221 and the intra prediction unit 222 of the encoding apparatus 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 apparatus 300, respectively.
[0071] Meanwhile, as described above, prediction is performed to improve compression efficiency when performing video coding. As a result, 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 way by an encoding device and a decoding device, and the encoding device can improve image coding efficiency by signaling information (residual information) about the residual between the original block and the 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, and generate a reconstructed block including reconstructed samples by adding the residual block and the predicted block, and generate a reconstructed picture including the reconstructed block.
[0072] The residual information may be generated through a transform and quantization procedure. For example, the encoding apparatus may derive a residual block between the original block and the predicted block, perform a transform procedure on the residual samples (residual sample array) included in the residual block to derive transform coefficients, and perform a quantization procedure on the transform coefficients to derive quantized transform coefficients, and then signal the related residual information (through a bitstream) to the decoding apparatus. Here, the residual information may include information such as value information, position information, transform technique, transform kernel, and quantization parameter of the quantized transform coefficients. The decoding apparatus may derive a residual sample (or a residual block) by performing an inverse quantization / inverse transform procedure 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 coefficients for reference for inter-prediction of a future picture, and generate a reconstructed picture based on the residual block.
[0073] When inter prediction is applied to the current block, a prediction unit of the encoding device / decoding device may perform inter prediction in units of blocks to derive a prediction sample. Inter prediction refers to a prediction derived in a manner that is dependent on data elements (e.g., sample values or motion information) of picture(s) 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 indicated 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 in units of blocks, sub-blocks, or samples based on correlation of motion information between a neighboring block and the current block. The motion information includes a motion vector and a reference picture index. The motion information may further include information on an inter prediction type (L0 prediction, L1 prediction, Bi prediction, etc.). When inter prediction is applied, the neighboring blocks include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring blocks may be the same or different. The temporal neighboring blocks may be called collocated reference blocks, collocated CUs (colCUs), etc., and the reference pictures including the temporal neighboring blocks may be called collocated pictures (colPic).For example, a motion information candidate list may be constructed based on neighboring blocks of the current block, and flag or index information indicating which candidate is selected (used) to derive a motion vector and / or a reference picture index of the current block may be signaled. Inter prediction may be performed based on various prediction modes, and for example, in the case of skip mode and (normal) merge mode, the motion information of the current block may be the same as the motion information of the selected neighboring block. In the case of skip mode, unlike the merge mode, a residual signal may not be transmitted. In the case of 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.
[0074] A video / picture encoding procedure based on inter prediction generally includes, for example, the following:
[0075] FIG. 4 illustrates an example of an inter-prediction based video / image encoding method.
[0076] The encoding apparatus performs inter prediction on a current block (S400). The encoding apparatus derives an inter prediction mode and motion information of the current block, and generates a prediction sample of the current block. Here, the procedures of determining the inter prediction mode, deriving the motion information, and generating the prediction sample may be performed simultaneously, or one procedure may be performed before the other procedures. For example, the inter prediction unit of the encoding apparatus includes a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit, and the prediction mode determination unit determines a prediction mode for the current block, the motion information derivation unit derives motion information of the current block, and the prediction sample derivation unit derives 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 certain region (search area) of a reference picture by motion estimation, and derive a reference block whose difference with the current block is minimum or equal to a certain criterion. Based on this, a reference picture index indicating a reference picture in which the reference block is located is derived, and a motion vector is derived based on a position difference between the reference block and the current block. The encoding apparatus may determine a mode to be applied to the current block from among various prediction modes. The encoding apparatus may compare rate-distortion (RD) costs for the various prediction modes to determine an optimal prediction mode for the current block.
[0077] 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 (to be described later) and derive a reference block whose difference from the current block is minimum or equal to or less than a certain criterion among reference blocks indicated by merge candidates included in the merge candidate list. In this case, a merge candidate related to the derived reference block is selected, and merge index information indicating the selected merge candidate is generated and signaled to a decoding apparatus. Motion information of the current block may be derived using motion information of the selected merge candidate.
[0078] As another example, when the (A)MVP mode is applied to the current block, the encoding apparatus may construct an (A)MVP candidate list, which will be described later, and may 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. 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 be 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. Also, when the (A)MVP mode is applied, the value of the reference picture index may be configured as reference picture index information and separately signaled to the decoding apparatus.
[0079] The encoding apparatus derives a residual sample based on the predicted sample (S410). The encoding apparatus may derive the residual sample by comparing an original sample of the current block with the predicted sample.
[0080] The encoding apparatus encodes video information including prediction information and residual information (S420). The encoding apparatus may output the encoded video information in the form of a bitstream. The prediction information is information related to the prediction procedure and includes prediction mode information (e.g., skip flag, merge flag, or mode index) and information on motion information. The information on the motion information includes candidate selection information (e.g., merge index, mvp flag, or mvp index) which is information for deriving a motion vector. The information on the motion information also includes information on the above-mentioned MVD and / or reference picture index information. The information on the motion information also includes information indicating whether L0 prediction, L1 prediction, or bi-prediction is applied. The residual information is information on the residual sample. The residual information includes information on quantized transform coefficients for the residual sample.
[0081] The output bitstream may be stored in a (digital) storage medium and transmitted to the decoding device, or may be transmitted to the decoding device via a network.
[0082] Meanwhile, as described above, the encoding apparatus can generate a reconstructed picture (including reconstructed samples and reconstructed blocks) based on the reference samples and the residual samples. This is because the same prediction result as that performed in the decoding apparatus is derived in the encoding 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 can be further applied to the reconstructed picture.
[0083] A video / picture decoding procedure based on inter prediction generally includes, for example, the following.
[0084] FIG. 5 illustrates an example of an inter-prediction based video / picture decoding method.
[0085] As shown in Fig. 5, the decoding apparatus may perform operations corresponding to those performed by the encoding apparatus. The decoding apparatus may perform prediction on the current block based on received prediction information to derive a prediction sample.
[0086] Specifically, the decoding apparatus determines a prediction mode for the current block based on received prediction information (S500). The decoding apparatus determines which inter prediction mode is applied to the current block based on prediction mode information in the prediction information.
[0087] For example, it may determine whether the merge mode or (A)MVP mode is applied to the current block based on the merge flag, or may select one of various inter prediction mode candidates based on the mode index. The inter prediction mode candidates may include skip mode, merge mode, and / or (A)MVP mode, or may include various inter prediction modes described below.
[0088] The decoding apparatus derives motion information of the current block based on the determined inter prediction mode (S510). For example, when a skip mode or a merge mode is applied to the current block, the decoding apparatus may form a merge candidate list (described later) and select one of the merge candidates included in the merge candidate list. The selection is performed based on the above-mentioned 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.
[0089] As another example, when the (A)MVP mode is applied to the current block, the decoding apparatus may construct an (A)MVP candidate list described below, 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 is 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 of the current block and the MVD. Also, the reference picture index of the current block may be derived based on the reference picture index information. A picture pointed to by the 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.
[0090] On the other hand, the motion information of the current block may be derived without constructing a candidate list, as described below, in which case the motion information of the current block may be derived according to a procedure disclosed in a prediction mode, as described below. In this case, the candidate list construction as described above may be omitted.
[0091] The decoding apparatus generates a prediction sample for the current block based on the motion information of the current block (S520). In this case, the reference picture may be derived based on a reference picture index of the current block, and the prediction sample for the current block may be derived using a sample of a reference block to which the motion vector of the current block points on the reference picture. In this case, as described below, a prediction sample filtering procedure may be further performed on all or some of the prediction samples of the current block, depending on the circumstances.
[0092] 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 the current block based on prediction mode information received in 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 in the motion information derivation unit, and derive a prediction sample of the current block in the prediction sample derivation unit.
[0093] The decoding apparatus generates a residual sample for the current block based on the received residual information (S530). The decoding apparatus generates a reconstructed sample for the current block based on the predicted sample and the residual sample, and generates a reconstructed picture based on the reconstructed sample (S540). Then, an in-loop filtering procedure can be further applied to the reconstructed picture, as described above.
[0094] FIG. 6 exemplarily illustrates an inter prediction procedure.
[0095] As shown in Figure 6, as described above, the inter prediction procedure includes 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. The inter prediction procedure is performed in an encoding device and a decoding device as described above. In this document, the coding device includes an encoding device and / or a decoding device.
[0096] As shown in FIG. 6, the coding apparatus determines an inter prediction mode for a current block (S600). Various inter prediction modes are 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, merge with MVD (MMVD) mode, historical motion vector prediction (HMVP) 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 to or instead as additional modes. The affine mode may be referred to as an "affine motion prediction mode". The MVP mode may also be referred to as "AMVP (advanced motion vector prediction) 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 of the merge / skip mode, or may be added as an MVP candidate of the MVP mode.
[0097] 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 is included in a bitstream and received by the decoding apparatus. The prediction mode information includes 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 includes one or more flags. For example, a skip flag may be signaled to indicate whether or not a skip mode is applied, a merge flag may be signaled to indicate whether or not a merge mode is applied when the skip mode is not applied, and an MVP mode may be indicated to be applied when the merge mode is not applied, or a flag for additional classification may be further signaled. The affine mode may be signaled as an independent mode, or may be signaled as a mode dependent on the merge mode or MVP mode. For example, the affine mode may include an affine merge mode and an affine MVP mode.
[0098] Meanwhile, information indicating whether the above-mentioned list0 (L0) prediction, list1 (L1) prediction, or bi-prediction is used for the current block (current coding unit) is signaled. The information may be called motion prediction direction information, inter prediction direction information, or inter prediction indication information, and may be configured / encoded / signaled in the form of, for example, an inter_pred_idc syntax element. That is, the inter_pred_idc syntax element may indicate whether the above-mentioned list0 (L0) prediction, list1 (L1) prediction, or bi-prediction is used for the current block (current coding unit). In this document, for convenience of explanation, the inter prediction type (L0 prediction, L1 prediction, or BI prediction) indicated by the inter_pred_idc syntax element may be represented as a motion prediction direction. L0 prediction may be represented as pred_L0, L1 prediction as pred_L1, and bi-prediction as pred_BI. For example, the following prediction types can be indicated depending on the value of the inter_pred_idc syntax element:
[0099] As described above, one picture includes one or more slices. A slice has one of slice types including an I (intra) slice, a P (predictive) slice, and a B (bi-predictive) slice. The slice type is indicated based on slice type information. For blocks in an I slice, inter prediction is not used for prediction, and only intra prediction is used. Of course, in this case, original sample values can also be coded and signaled without prediction. For blocks in a P slice, intra prediction or inter prediction is used, and when inter prediction is used, only uni prediction is used. Meanwhile, for blocks in a B slice, intra prediction or inter prediction is used, and when inter prediction is used, up to bi prediction is used.
[0100] L0 and L1 include reference pictures encoded / decoded before the current picture. For example, L0 includes reference pictures before and / or after the current picture in POC order, and L1 includes reference pictures after and / or before the current picture in POC order. In this case, a lower reference picture index is assigned to L0 relative to a reference picture before the current picture in POC order, and a lower reference picture index is assigned to L1 relative to a reference picture after the current picture in POC order. In the case of B slices, bi-prediction is applied, and in this case, unidirectional bi-prediction or bi-directional bi-prediction may also be applied. Bi-directional bi-prediction may be called true bi-prediction.
[0101] Specifically, for example, information regarding the inter prediction mode of the current block may be coded and signaled at a level such as a CU (CU syntax), or may be implicitly determined according to conditions, in which case some modes may be explicitly signaled and the remaining some modes may be derived implicitly.
[0102] For example, the CU syntax can carry information about the (inter) prediction mode as shown in Table 1 below.
[0103] [Table 1-1]
[0104] [Table 1-2]
[0105] [Table 1-3]
[0106] [Table 1-4]
[0107] [Table 1-5]
[0108] [Table 1-6]
[0109] [Table 1-7]
[0110] [Table 1-8]
[0111] [Table 1-9]
[0112] [Table 1-10]
[0113] [Table 1-11]
[0114] [Table 1-12]
[0115] [Table 1-13]
[0116] Here, cu_skip_flag indicates whether the skip mode is applied to the current block (CU).
[0117] A value of 0 for pred_mode_flag indicates that the current coding unit is coded in inter prediction mode. A value of 1 for pred_mode_flag indicates that the current coding unit is coded in intra prediction mode. (pred_mode_flag equal to 0 specifies that the current coding unit is coded in inter prediction mode. pred_mode_flag equal to 1 specifies that the current coding unit is coded in intra prediction mode.)
[0118] A value of 1 in pred_mode_ibc_flag indicates that the current coding unit is coded in IBC prediction mode. A value of 0 in pred_mode_ibc_flag indicates that the current coding unit is not coded in IBC prediction mode (pred_mode_ibc_flag equal to 1 specifies that the current coding unit is coded in IBC prediction mode. pred_mode_ibc_flag equal to 0 specifies that the current coding unit is not coded in IBC prediction mode).
[0119] When pcm_flag[x0][y0] has a value of 1, it indicates that the pcm_sample( ) syntax structure is present and the transform_tree( ) syntax structure is not present in the coding unit including the luma coding block at the location (x0, y0). When pcm_flag[x0][y0] has a value of 0, it indicates that the pcm_sample( ) syntax structure is not present. (pcm_flag[x0][y0] equal to 1 specifies that the pcm_sample( ) syntax structure is present and the transform_tree( ) syntax structure is not present in the coding unit including the luma coding block at the location (x0, y0). pcm_flag[x0][y0] equal to 0 specifies that pcm_sample( ) syntax structure is not present.) That is, pcm_flag indicates whether or not a pulse coding modulation (PCM) mode is applied to the current block. When a PCM mode is applied to the current block, prediction, transformation, quantization, etc. are not applied, and the value of the original sample in the current block is coded and signaled.
[0120] When the value of intra_mip_flag[x0][y0] is 1, it indicates that the intra prediction type for the luma sample is matrix-based intra prediction (MIP). When the value of intra_mip_flag[x0][y0] is 0, it indicates that the intra prediction type for the luma sample is not matrix-based intra prediction. (intra_mip_flag[x0][y0] equal to 1 specifies that the intra prediction type for luma samples is matrix-based intra prediction (MIP). intra_mip_flag[x0][y0] equal to 0 specifies that the intra prediction type for luma samples is not matrix-based intra prediction.) In other words, intra_mip_flag indicates whether or not a MIP prediction mode (type) is applied to the current block (luma sample).
[0121] intra_chroma_pred_mode[x0][y0] specifies the intra prediction mode for chroma samples in the current block.
[0122] general_merge_flag[x0][y0] indicates whether the inter prediction parameters for the current coding unit are inferred from a neighbouring inter-predicted partition. That is, general_merge_flag indicates that general merging is available, and when the value of general_merge_flag is 1, regular merge mode, mmvd mode, and merge subblock mode (subblock merge mode) are available. For example, when the value of general_merge_flag is 1, merge data syntax is parsed from the encoded video / image information (or bitstream), and the merge data syntax is configured / coded to include information such as that shown in Table 2 below.
[0123] [Table 2-1]
[0124] [Table 2-2]
[0125] [Table 2-3]
[0126] Here, when the value of regular_merge_flag[x0][y0] is 1, it indicates that the regular merge mode is used to generate the inter prediction parameters of the current coding unit. In other words, regular_merge_flag indicates whether the merge mode (regular merge mode) is applied to the current block.
[0127] When the value of mmvd_merge_flag[x0][y0] is 1, it indicates that merge mode with motion vector difference is used to generate the inter prediction parameters of the current coding unit. In other words, mmvd_merge_flag indicates whether MMVD is applied to the current block.
[0128] mmvd_cand_flag[x0][y0] specifies whether the first (0) or the second (1) candidate in the merging candidate list is used with the motion vector difference derived from mmvd_distance_idx[x0][y0] and mmvd_direction_idx[x0][y0].
[0129] mmvd_distance_idx[x0][y0] specifies the index used to derive MmvdDistance[x0][y0].
[0130] mmvd_direction_idx[x0][y0] specifies index used to derive MmvdSign[x0][y0].
[0131] merge_subblock_flag[x0][y0] indicates whether the subblock-based inter prediction parameters for the current coding. That is, merge_subblock_flag indicates whether the subblock merge mode (or the affine merge mode) is applied to the current block.
[0132] merge_subblock_idx[x0][y0] specifies the merging candidate index of the subblock-based merging candidate list.
[0133] ciip_flag[x0][y0] specifies whether the combined inter-picture merge and intra-picture prediction is applied for the current coding unit.
[0134] merge_triangle_idx0[x0][y0] specifies the first merging candidate index of the triangular shape based motion compensation candidate list.
[0135] merge_triangle_idx1[x0][y0] specifies the second merging candidate index of the triangular shape based motion compensation candidate list.
[0136] merge_idx[x0][y0] specifies the merging candidate index of the merging candidate list.
[0137] Meanwhile, referring again to the CU syntax in Table 1, mvp_l0_flag[x0][y0] specifies the motion vector predictor index of list 0. In other words, when the MVP mode is applied, mvp_l0_flag indicates a candidate in MVP candidate list 0 to be selected for MVP derivation of the current block.
[0138] mvp_l1_flag[x0][y0] has the same semantics as mvp_l0_flag, and l0 and list 0 can be replaced by l1 and list 1, respectively. (ref_idx_l1[x0][y0] has the same semantics as ref_idx_l0, with l0, L0 and list 0 replaced by l1, L1 and list 1, respectively.)
[0139] inter_pred_idc[x0][y0] specifies whether list0, list1, or bi-prediction is used for the current coding unit.
[0140] The value of sym_mvd_flag[x0][y0] equal to 1 specifies that the syntax elements ref_idx_l0[x0][y0] and ref_idx_l1[x0][y0], and the mvd_coding(x0, y0, refList, cpIdx) syntax structure for refList equal to 1 are not present. In other words, sym_mvd_flag indicates whether symmetric MVD is used in mvd coding.
[0141] ref_idx_l0[x0][y0] specifies the list 0 reference picture index for the current coding unit.
[0142] ref_idx_l1[x0][y0] has the same semantics as ref_idx_l0, with l0, L0 and list 0 replaced by l1, L1 and list 1, respectively.
[0143] A value of 1 for inter_affine_flag[x0][y0] specifies that for the current coding unit, when decoding a P or B slice, affine model based motion compensation is used to generate the prediction samples of the current coding unit.
[0144] A value of 1 in cu_affine_type_flag[x0][y0] indicates that 6-parameter affine model based motion compensation is used to generate the prediction samples of the current coding unit when decoding a P or B slice for the current coding unit. A value of 0 in cu_affine_type_flag[x0][y0] indicates that 4-parameter affine model based motion compensation is used to generate the prediction samples of the current coding unit. (cu_affine_type_flag[x0][y0] equal to 1 specifies that for the current coding unit, when decoding a P or B slice, 6-parameter affine model based motion compensation is used to generate the prediction samples of the current coding unit. cu_affine_type_flag[x0][y0] equal to 0 specifies that 4-parameter affine model based motion compensation is used to generate the prediction samples of the current coding unit.)
[0145] amvr_flag[x0][y0] indicates the resolution of the motion vector differential. The array indexes x0, y0 indicate the position (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture. A value of 0 in amvr_flag[x0][y0] indicates that the resolution of the motion vector differential is ¼ of the luma sample. A value of 1 for amvr_flag[x0][y0] indicates that the resolution of the motion vector difference is additionally specified by amvr_precision_flag[x0][y0]. (amvr_flag[x0][y0] specifies the resolution of motion vector difference. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture. amvr_flag[x0][y0] equal to 0 specifies that the resolution of the motion vector difference is 1 / 4 of a luma sample. amvr_flag[x0][y0] equal to 1 specifies that the resolution of the motion vector difference is further specified by amvr_precision_flag[x0][y0].)
[0146] A value of 0 for amvr_precision_flag[x0][y0] indicates that the resolution of the motion vector differential is 1 integer luma sample if the value of inter_affine_flag[x0][y0] is 0, and 1 / 16 of a luma sample otherwise. A value of 1 for amvr_precision_flag[x0] indicates that the resolution of the motion vector differential is 4 luma samples if the value of inter_affine_flag[x0][y0] is 0, and 1 integer luma sample otherwise. amvr_precision_flag[x0][y0] equal to 0 specifies that the resolution of the motion vector difference is one integer luma sample if inter_affine_flag[x0][y0] is equal to 0, and 1 / 16 of a luma sample otherwise. amvr_precision_flag[x0][y0] equal to 1 specifies that the resolution of the motion vector difference is four luma samples if inter_affine_flag[x0][y0] is equal to 0, and one integer luma sample otherwise. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[0147] bcw_idx[x0][y0] specifies the weight index of bi-prediction with CU weights.
[0148] When the (inter) prediction mode for the current block is determined, the coding apparatus derives motion information for the current block based on the prediction mode (S610).
[0149] The coding apparatus performs inter prediction using motion information of the current block. The encoding apparatus can derive optimal motion information for the current block through a motion estimation procedure. For example, the encoding apparatus can use an original block in an original picture for the current block to search for a similar reference block with high correlation in a fractional pixel unit within a determined search range in the reference picture, thereby deriving motion information. The similarity of the blocks is derived based on a difference in phase-based sample values. For example, the similarity of the blocks is calculated based on the SAD between the current block (or the template of the current block) and the reference block (or the template of the reference block). In this case, the motion information can be derived based on the reference block with the smallest SAD in the search area. The derived motion information is signaled to the decoding apparatus in various ways based on the inter prediction mode.
[0150] When the motion information for the current block is derived, the coding apparatus performs inter prediction based on the motion information for the current block (S620). The coding apparatus may derive prediction sample(s) for the current block based on the motion information. The current block including the prediction sample(s) may be referred to as a predicted block.
[0151] Based on the derived prediction samples, reconstructed samples and reconstructed pictures are generated, after which procedures such as in-loop filtering can be performed.
[0152] FIG. 7 is a diagram illustrating the merge mode and skip mode that can be used in inter prediction.
[0153] When a merge mode is applied during inter prediction, motion information of the current block is not directly transmitted, but is derived using motion information of a neighboring predicted block. Thus, the encoding apparatus can indicate motion information of the current block by transmitting flag information indicating that the merge mode is used and a merge index indicating which neighboring predicted block is used. The merge mode may be called a regular merge mode.
[0154] The coding device searches for merge candidate blocks used to derive motion information of the current block to perform the merge mode. For example, the number of merge candidate blocks may be up to 5, but this embodiment is not limited thereto. Also, information regarding the maximum number of merge candidate blocks may be transmitted in a slice header or a tile group header, but this embodiment is not limited thereto. After finding the merge candidate blocks, the coding device may generate a merge candidate list, and select a merge candidate block having a minimum cost among them as a final merge candidate block.
[0155] This document provides various embodiments for the merge candidate blocks that make up the merge candidate list.
[0156] The merge candidate list includes, for example, five merge candidate blocks. For example, four spatial merge candidates and one temporal merge candidate can be used. As a specific example, in the case of spatial merge candidates, the blocks (A0, A1, B0, B1, B2) shown in FIG. 7 can also be used as spatial merge candidates. Hereinafter, the spatial merge candidates or spatial MVP candidates described later may be referred to as SMVPs, and the temporal merge candidates or temporal MVP candidates described later may be referred to as TMVPs.
[0157] The merge candidate list for the current block is constructed, for example, according to the following procedure.
[0158] FIG. 8 shows a schematic diagram of a merge candidate list construction method.
[0159] First, a coding apparatus (encoding apparatus / decoding apparatus) searches spatial neighboring blocks of a current block and inserts derived spatial merge candidates into a merge candidate list (S810). For example, the spatial neighboring blocks include a lower left corner neighboring block (A0), a left side neighboring block (A1), a right top corner neighboring block (B0), an upper side neighboring block (B1), and an upper left corner neighboring block (B2) of the current block. However, this is merely an example, and additional neighboring blocks such as a right side neighboring block, a lower side neighboring block, and a lower right side neighboring block may be used as the spatial neighboring blocks in addition to the above-mentioned spatial neighboring blocks. The coding apparatus searches the spatial neighboring blocks based on a priority order to detect available blocks, and derives motion information of the detected blocks as the spatial merge candidates. For example, the encoding apparatus and / or the decoding apparatus may search the five blocks shown in FIG. 7 in the order of A1, B1, B0, A0, and B2, and sequentially index available candidates to form a merge candidate list.
[0160] The coding apparatus also searches for temporal neighboring blocks of the current block and inserts derived temporal merging candidates into the merging candidate list (S820). The temporal neighboring blocks may be located on a reference picture that is a different picture from the current picture in which the current block is located. The reference picture in which the temporal neighboring blocks are located may be called a collocated picture or col picture. The temporal neighboring blocks may be searched for in the order of a lower right corner neighboring block and a lower right center block of a co-located block with respect to the current block on the col picture.
[0161] Meanwhile, when motion data compression is applied, specific motion information may be stored as representative motion information for each fixed storage unit in the col picture. In this case, it is not necessary to store motion information for all blocks in the fixed storage unit, and thus a motion data compression effect can be obtained. In this case, the fixed storage unit may be predetermined, for example, a 16×16 sample unit or an 8×8 sample unit, or size information regarding the fixed storage unit may be signaled from the encoding device to the decoding device. When the motion data compression is applied, the motion information of the temporal peripheral block may be replaced with representative motion information of the fixed storage unit in which the temporal peripheral block is located. That is, in this case, from the perspective of implementation, the temporal merge candidate may be derived based on the motion information of a predictive block that covers a position arithmetically shifted left after arithmetically shifting a fixed value based on the coordinates (upper left sample position) of the temporal peripheral block, rather than a predictive block located at the coordinates of the temporal peripheral block. For example, when the fixed storage unit is 2 n ×2 nWhen it is in sample units, if the coordinates of the temporal neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the corrected position ((xTnb>>n)<<n), (yTnb>>n)<<n)) can be used for the temporal merge candidate. Specifically, for example, when the fixed storage unit is 16×16 sample units, if the coordinates of the temporal neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the corrected position ((xTnb>>4)<<4), (yTnb>>4)<<4)) can be used for the temporal merge candidate. Or, for example, when the fixed storage unit is 8×8 sample units, if the coordinates of the temporal neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the corrected position ((xTnb>>3)<<3), (yTnb>>3)<<3)) can be used for the temporal merge candidate.
[0162] On the other hand, the coding device checks whether the number of current merge candidates is smaller than the number of maximum merge candidates (S830). The number of the maximum merge candidates is defined in advance or signaled from the encoding device to the decoding device. For example, the encoding device generates information regarding the number of the maximum merge candidates, encodes it, and transmits it to the decoding device in the form of a bit stream. When the number of the maximum merge candidates is filled, the subsequent candidate addition process may not be performed.
[0163] As a result of the check, if the number of current merge candidates is smaller than the number of maximum merge candidates, the coding device inserts an additional merge candidate into the merge candidate list (S840). The additional merge candidate may include, for example, at least one of history based merge candidate(s), pair-wise average merge candidate(s), ATMP, combined bi-predictive merge candidate (when the slice / tile / group type of the current slice / tile / group is of B type) and / or zero vector merge candidate.
[0164] If it is determined that the number of current merge candidates is not less than the maximum number of merge candidates, the coding apparatus terminates the construction of the merge candidate list (S850). In this case, the encoding apparatus may select an optimal merge candidate from among the merge candidates constituting the merge candidate list based on a rate-distortion (RD) cost, and may signal selection information (e.g., a merge index) indicating the selected merge candidate to the decoding apparatus. The decoding apparatus may select the optimal merge candidate based on the merge candidate list and the selection information.
[0165] As described above, the motion information of the selected merging candidate may be used as the motion information of the current block, and a predicted sample of the current block may be derived based on the motion information of the current block. The encoding apparatus may derive a residual sample of the current block based on the predicted sample, and signal residual information on the residual sample to a decoding apparatus. As described above, the decoding apparatus may generate a reconstructed sample based on the residual sample derived based on the residual information and the predicted sample, and generate a reconstructed picture based on the reconstructed sample.
[0166] When a skip mode is applied during inter prediction, the motion information of the current block can be derived in the same manner as when the merge mode is applied, except that when the skip mode is applied, the residual signal for the corresponding block is omitted, and therefore the predicted samples can be used directly as reconstructed samples.
[0167] Meanwhile, in addition to the merge mode where the implicitly derived motion information is directly used for prediction samples generation of the current CU, the merge mode with motion vector differences (MMVD) is introduced in VVC. Because similar motion information derivation methods are used for the skip mode and the merge mode, MMVD may be applied to the skip mode. An MMVD flag (ex. mmvd_flag) may be signaled right after sending a skip flag and a merge flag to specify whether MMVD mode is used for a CU.
[0168] In MMVD, after an amerge candidate is selected, it is further refined by the signaled MVDs information. When MMVD is applied to the current block (ie when the mmvd_flag is equal to 1), further information for the MMVD may be signaled.
[0169] The further information includes a merge candidate flag (ex. mmvd_merge_flag) indicating whether the first (0) or the second (1) candidate in the merging candidate list is used with the motion vector difference, an index to specify motion magnitude (ex. mmvd_distance_idx), and an index for indication of motion direction (ex. mmvd_direction_idx). In MMVD mode, one for the first two candidates in the merge list is selected to be used as MV basis. The merge candidate flag is signaled to specify which one is used.
[0170] The distance index specifies motion magnitude information and indicates the pre-defined offset from the starting point.
[0171] An offset is added to either the horizontal component or the vertical component of the starting MV. The relation of distance index and pre-defined offset is specified in Table 3.
[0172] [Table 3]
[0173] Here, slice_fpel_mmvd_enabled_flag equal to 1 specifies that merge mode with motion vector difference uses integer sample precision in the current slice. When slice_fpel_mmvd_enabled_flag is 0, it specifies that merge mode with motion vector difference can use fractional sample precision in the current slice. When not present, the value of slice_fpel_mmvd_enabled_flag is inferred to be 0. The slice_fpel_mmvd_enabled_flag syntax element may be signaled through (may be comprised in) a slice header.
[0174] The direction index indicates the direction of the MVD relative to the starting point. The direction index represents the direction of the MVD relative to the starting point. The meaning of the MVD sign can be varied according to the information of starting MVs. When the starting MVs is an un-prediction MV or bi-prediction MVs with both lists point to the same side of the current picture (i.e. POCs of two references are both larger than the POC of the current picture, or are both smaller than the POC of the current picture), the sign in Table 4 specifies the sign of MV offset added to the starting MV.When the starting MVs is bi-prediction MVs with the two MVs point to the different sides of the current picture (ie the POC of one reference is larger than the POC of the current picture, and the POC of the other reference is smaller than the POC of the current picture), the sign in Table 4 specifies the sign of MV offset added to the list0 MV component of starting MV and the sign for the list1 MV has opposite value.
[0175] [Table 4]
[0176] Both components of the merge plus MVD offset MmvdOffset[x0][y0] are derived as follows.
[0177]
number
[0178] FIG. 9 is a diagram illustrating a sub-block-based temporal motion vector prediction process that can be used during inter prediction.
[0179] Subblock-based temporal motion vector prediction (SbTMVP) method can be used for inter prediction. Similar to TMVP (temporal motion vector prediction), SbTMVP uses the motion field in the collocated picture to improve motion vector prediction and merge mode for CUs in the current picture. The same collocated picture used by TMVP is used for SbTVMP. SbTMVP differs from TMVP in the following two main aspects.
[0180] 1.TMVP predicts motion at CU level but SbTMVP predicts motion at sub-CU level.
[0181] 2. Whereas TMVP fetches the temporal motion vectors from the collocated block in the collocated picture (the collocated block is the bottom-right or center (below-right center) block relative to the current CU), SbTMVP applies a motion shift before fetching the temporal motion information from the collocated picture, where the motion shift is obtained from the motion vector from one of the spatial neighbouring blocks of the current CU.
[0182] SbTMVP predicts the motion vectors of the sub-CUs within the current CU in two steps. In the first step, the spatial neighbour A1 is examined. If A1 has a motion vector that uses the collocated picture as its reference picture is identified, this motion vector (may be referred to as a temporal MV (tempMV)) is selected to be the motion shift to be applied. If no such motion is identified, then the motion shift is set to (0, 0).
[0183] In the second step, the motion shift identified in Step 1 is applied (i.e., added as a candidate for the current block) to obtain sub-CU-level motion information (motion vectors and reference indices) from the collocated picture as shown in Figure 9. The example in Figure 9 assumes the motion shift is set to block A1's motion. Then, for each sub-CU, the motion information of its corresponding block (the smallest motion grid that covers the center sample) in the collocated picture is used to derive the motion information for the sub-CU.The center sample (below right center sample) may correspond to a below-right sample among 4 central samples in the sub-CU when the sub-block has even length width and height.
[0184] After the motion information of the collocated sub-CU is identified, it is converted to the motion vectors and reference indices of the current sub-CU in a similar way as the TMVP process, where temporal motion scaling may be applied to align the reference pictures of the temporal motion vectors to those of the current CU.
[0185] A combined sub-block based merge list which contains both SbTVMP candidate and affine merge candidates may be used for the signalling of affine merge mode (may be referred to as sub-block (based) merge mode). The SbTVMP mode is enabled / disabled by a sequence parameter set (SPS) flag. If the SbTMVP mode is enabled, the SbTMVP predictor is added as the first entry of the list of sub-block merge candidates, and followed by the affine merge candidates. The maximum allowed size of the affine merge candidate list may be 5.
[0186] The sub-CU size used in SbTMVP may be fixed to be 8x8, and as done for affine merge mode, SbTMVP mode may be only applicable to the CU with both width and height are larger than or equal to 8.
[0187] The encoding logic of the additional SbTMVP merge candidate is the same as for the other merge candidates, that is, for each CU in P or B slice, an additional RD check may be performed to decide whether to use the SbTMVP candidate.
[0188] On the other hand, a triangle partition mode may be used for inter prediction. The triangle partition mode may be only applied to CUs that are 8x8 or larger. The triangle partition mode is signalled using a CU-level flag as one kind of merge mode, with other merge modes including the regular merge mode, the MMVD mode, the CIIP mode and the subblock merge mode.
[0189] When this mode is used, a CU may be split evenly into two triangle-shaped partitions, using either the diagonal split or the anti-diagonal split. Each triangle partition in the CU is inter-predicted using its own motion; only uni-prediction is allowed for each partition, that is, each partition has one motion vector and one reference index. The uni-prediction motion constraint is applied to ensure that same as the conventional bi-prediction, only two motion compensated predictions are needed for each CU.
[0190] If triangle partition mode is used for the current CU, then a flag indicating the direction of the triangle partition (diagonal or anti-diagonal), and two merge indices (one for each partition) are further signalled. The number of maximum TPM candidate size is signalled explicitly at slice level and specifies syntax binarization for TPM merge indices. After predicting each of the triangle partitions, the sample values along the diagonal or anti-diagonal edge are adjusted using a blending process with adaptive weights.This is the prediction signal for the whole CU, and transform and quantization process will be applied to the whole CU as in other prediction modes. Finally, the motion field of a CU predicted using the triangle partition mode is stored in 4x4 units. The triangle partition mode is not used in combination with SBT (subblock transform). That is, when the signalled triangle mode value is 1, the cu_sbt_flag is inferred to be 0 without signalling.
[0191] The uni-prediction candidate list is derived directly from the merge candidate list constructed as described above.
[0192] After predicting each triangle partition using its own motion, blending is applied to the two prediction signals to derive samples around the diagonal or anti-diagonal edge.
[0193] Also, combined inter and intra prediction can be applied to a current block. An additional flag (ex. ciip_flag) may be signalled to indicate if the combined inter / intra prediction (CIIP) mode is applied to the current CU. For example, when a CU is coded in merge mode, if the CU contains at least 64 luma samples (that is, CU width times CU height is equal to or larger than 64), and if both CU width and CU height are less than 128 luma samples, the additional flag is signalled to indicate if the combined inter / intra prediction (CIIP) mode is applied to the current CU. As its name indicates, the CIIP prediction combines an inter prediction signal with an intra prediction signal.The inter prediction signal in the CIIP mode P_inter is derived using the same inter prediction process applied to regular merge mode; and the intra prediction signal P_intra is derived following the regular intra prediction process with the planar mode. Then, the intra and inter prediction signals are combined using weighted averaging, where the weight value is calculated depending on the coding modes of the top and left neighbouring blocks as follows.
[0194] If the top neighbor is available and intra coded, then set isIntraTop to 1, otherwise set isIntraTop to 0.
[0195] If the left neighbor is available and intra coded, then set isIntraLeft to 1, otherwise set isIntraLeft to 0.
[0196] If (isIntraLeft + isIntraLeft) is equal to 2, then wt is set to 3.
[0197] Otherwise, if (isIntraLeft + isIntraLeft) is equal to 1, then wt is set to 2.
[0198] Otherwise, set wt to 1.
[0199] The CIIP prediction is formed as follows:
[0200]
number
[0201] Meanwhile, to generate a prediction block in a coding device, motion information can be derived based on the above-mentioned regular merge mode, skip mode, SbTMVP mode, MMVD mode, triangle partition mode (partitioning mode), and / or CIIP mode. Each mode is activated / disabled via an on / off flag for each mode included in a sequence parameter set (SPS). If an on / off flag for a particular mode is deactivated, the encoding device does not signal a syntax that is explicitly transmitted for the corresponding prediction mode on a CU or PU basis.
[0202] Therefore, in the existing operation process, if all or some of the specific modes for the merge / skip modes are disabled, a problem occurs in which the on / off flag is signaled redundantly. Therefore, in this document, in the process of selecting the merge mode to be applied to the current block based on the merge data syntax in Table 2, one of the following methods is used to prevent the same information (flag) from being signaled redundantly.
[0203] In order to select a prediction mode that can be used in the process of deriving motion information, the encoding apparatus may signal a flag based on a sequence parameter set such as that shown in Table 5. Each prediction mode is turned on / off based on the sequence parameter set in Table 5, and each syntax element of the merge data syntax in Table 2 is parsed or induced according to the flags in Table 5 and the conditions under which each mode can be used.
[0204] [Table 5-1]
[0205] [Table 5-2]
[0206] [Table 5-3]
[0207] [Table 5-4]
[0208] [Table 5-5]
[0209] [Table 5-6]
[0210] [Table 5-7]
[0211] [Table 5-8]
[0212] [Table 5-9]
[0213] [Table 5-10]
[0214] The following drawings are created to illustrate a specific example of the present document. The names of specific devices and names of specific signals / information shown in the drawings are presented for illustrative purposes only, and the technical features of the present specification are not limited to the specific names used in the drawings.
[0215] 10 and 11 illustrate an example of a video / picture encoding method and associated components including an inter-prediction method according to an embodiment of the present document.
[0216] The encoding method disclosed in Fig. 10 may be performed by the encoding apparatus 200 disclosed in Fig. 2. Specifically, for example, S1000 and S1010 in Fig. 10 are performed by the prediction unit 220 of the encoding apparatus 200, S1020 and S1030 are performed by the residual processing unit 230 of the encoding apparatus 200, and S1040 is performed by the entropy encoding unit 240 of the encoding apparatus 200. The encoding method disclosed in Fig. 10 includes the embodiments described above in this document.
[0217] Specifically, as shown in Figures 10 and 11, a prediction unit of an encoding device may derive a prediction sample of a current block based on inter prediction (S1000). As an example, the prediction unit of the encoding device may derive a prediction sample for the current block using one of inter prediction modes, a regular merge mode, a skip mode, an MMVD mode, a sub-block merge mode, a partitioning mode, and a CIIP mode.
[0218] Here, the regular merge mode is defined as a mode in which motion information of a current block is derived using motion information of a neighboring block. The skip mode is defined as a mode in which a predicted block is used as a restored block. The MMVD mode is applied to the merge mode or the skip mode and is defined as a merge (or skip) mode using a motion vector difference. The sub-block merge mode is defined as a merge mode based on a sub-block. The partitioning mode is defined as a mode in which a current block is divided into two partitions (diagonal or semi-diagonal) and prediction is performed. The CIIP mode is defined as a mode in which inter-picture merge and intra-picture prediction are combined.
[0219] Meanwhile, the prediction unit of the encoding apparatus may search for a block similar to the current block within a certain region (search region) of the reference picture through motion estimation, derive a reference block having a minimum or a certain criterion difference from the current block, and may derive a reference picture index indicating a reference picture in which the reference block is located based on the reference block, and may derive a motion vector based on the position difference between the reference block and the current block.
[0220] A prediction unit of an encoding apparatus generates a prediction sample (prediction block) of a current block based on a prediction mode of the current block and a motion vector of the current block, and generates information about the prediction mode indicating the prediction mode (S1010). Here, the information about the prediction mode includes inter / intra prediction classification information, inter prediction mode information, etc., and includes various syntax elements related thereto.
[0221] The residual processing unit of the encoding apparatus derives residual samples based on original samples (original block) for the current block and predicted samples (predicted block) for the current block (S1020), and generates information about the residual samples based on the residual samples (S1030).
[0222] An encoding unit of the encoding device encodes image information including information on the residual samples, information on the prediction mode, etc. (S1040). The image information includes partitioning-related information, prediction mode-related information, residual information, in-loop filtering-related information, etc., and includes various syntax elements related thereto. The encoded information in the encoding of the encoding device is output in the form of a bitstream. The bitstream is transmitted to a decoding device via a network or a storage medium.
[0223] For example, the video information includes 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 information also includes information on a prediction mode of a current block such as a coding unit syntax, a merge data syntax, etc. Here, the sequence parameter set includes a combined inter-picture merge and intra-picture prediction (CIIP) enable flag, an availability flag for a partitioning mode, etc. The coding unit syntax includes a CU skip flag indicating whether a skip mode is applied to the current block.
[0224] According to an embodiment, for example, the encoding apparatus may include a regular merge flag in the video information when a condition based on the CIIP availability flag and a condition based on the size of the current block are satisfied so that the same syntax is not transmitted redundantly. Here, the condition based on the size of the current block may be when a product of the height and width of the current block is equal to or greater than 64, and the height and width of the current block are each smaller than 128. The condition based on the CIIP availability flag may be when the value of the CIIP availability flag is 1. That is, the encoding apparatus may signal a regular merge flag when a product of the height and width of the current block is equal to or greater than 64, the height and width of the current block are each smaller than 128, and the value of the CIIP availability flag is 1.
[0225] As another example, the encoding apparatus may include the regular merge flag in the video information when a condition based on the CU skip flag and the size of the current block is satisfied. Here, the condition based on the CU skip flag may be when the value of the CU skip flag is 0. In other words, the encoding apparatus may signal a regular merge flag when a product of the height and width of the current block is 64 or more, the height and width of the current block are each less than 128, and the value of the CU skip flag is 0.
[0226] As another example, the encoding apparatus may include the regular merge flag in the video information when at least one of a condition based on the CIIP available flag, a condition based on the CU skip flag, and a condition based on the size of the current block are satisfied. Here, the condition based on the CIIP available flag is when the value of the CIIP available flag is 1. The condition based on the CU skip flag is when the value of the CU skip flag is 0. In other words, the encoding apparatus may signal a regular merge flag when a product of a height of a current block and a width of the current block is equal to or greater than 64, each of the height of the current block and the width of the current block is less than 128, and the value of the CIIP available flag is 1 or the value of the CU skip flag is 0.
[0227] As another example, the encoding apparatus may include the regular merge flag in the video information when a condition based on a CU skip flag is further satisfied in addition to the condition based on the CIIP available flag and the condition based on the size of the current block. Here, the condition based on the CU skip flag may be when the value of the CU skip flag is 0. In other words, the encoding apparatus may signal a regular merge flag when a product of a height of a current block and a width of the current block is 64 or more, the height of the current block and the width of the current block are each less than 128, the value of the CIIP available flag is 1, and the value of the CU skip flag is 0.
[0228] As another example, the encoding apparatus may include a regular merge flag in the image information based on whether a condition based on information about the current block and the partitioning mode available flag is satisfied. Here, the condition based on the information about the current block includes whether a product of a width and height of the current block is 64 or more and / or whether a type of a slice including the current block is a B slice. The condition based on the partitioning mode available flag may be when the value of the partitioning mode available flag is 1. That is, the encoding apparatus may signal a regular merge flag when both a condition based on the height of the current block and information about the current block and a condition based on the partitioning mode available flag are satisfied.
[0229] The encoding apparatus determines whether a condition based on the information on the current block and the partitioning mode available flag is satisfied when the condition based on the CIIP availability flag and the size of the current block are not satisfied, or determines whether a condition based on the information on the current block and the partitioning mode available flag and the size of the current block are satisfied when the condition based on the information on the current block and the partitioning mode available flag are not satisfied.
[0230] On the other hand, the encoding device may also signal a regular merge flag if the product of the width and height of the current block is not 32 and the value of the MMVD available flag is 1, or if the maximum number of sub-block merge candidates is greater than 0 and the width and height of the current block are each greater than or equal to 8.
[0231] For this purpose, as an example, the merge data syntax is configured as shown in Table 6 below.
[0232] [Table 6-1]
[0233] [Table 6-2]
[0234] [Table 6-3]
[0235] In Table 6, a value of 1 for the regular merge flag indicates that the regular merge mode is used to generate the inter prediction parameters of the current coding unit (current block). The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[0236] When regular_merge_flag[x0][y0] is not present, it is inferred as follows.
[0237] If all of the following conditions are true, regular_merge_flag[x0][y0] is inferred to be equal to 1.
[0238] - The value of the general merge flag is 1 (general_merge_flag[x0][y0] is equal to 1)
[0239] -The value of the SPS MMVD enable flag is 0 or the product of the width and height of the current block is 32 (sps_mmvd_enable_flag is equal to 0 or cbWidth*cbHeight==32)
[0240] -The maximum number of subblock merge candidates is 0 or less, or the width of the current block is less than 8, or the height of the current block is less than 8 (MaxNumSubblockMergeCand<=0 or cbWidth<8 or cbHeight<8)
[0241] -The value of the SPS CIIP enabled flag is 0 or the product of the width and height of the current block is less than 64 or the width of the current block is 128 or more or the value of the CU skip flag is 1 (sps_ciip_enabled_flag is equal to 0 or cbWidth*cbHeight<64 or cbWidth>=128 or cbHeight>=128 or cu_skip_flag[x0][y0] is equal to 1)
[0242] -The value of the SPS partitioning enabled flag is 0 or the maximum number of partitioning merge candidates is less than 2 or the slice type is not equal to B_SLICE (sps_triangle_enabled_flag is equal to 0 or MaxNumTriangleMergeCand<2 or slice_type is not equal to B_SLICE)
[0243] Otherwise, the value of the regular merge flag is inferred to be equal to 0.
[0244] Meanwhile, according to another embodiment, for example, the encoding apparatus may include an MMVD merge flag in the video information when a condition based on the CIIP availability flag and a condition based on the size of the current block are satisfied so that the same syntax is not transmitted redundantly. Here, the condition based on the size of the current block may be when a product of the height and width of the current block is equal to or greater than 64, and the height and width of the current block are each smaller than 128. The condition based on the CIIP availability flag is when the value of the CIIP availability flag is 1. In other words, the encoding apparatus may signal an MMVD merge flag when a product of the height and width of the current block is equal to or greater than 64, the height and width of the current block are each smaller than 128, and the value of the CIIP availability flag is 1.
[0245] As another example, the encoding apparatus may include the MMVD merge flag in the video information when a condition based on a CU skip flag is further satisfied in addition to the condition based on the CIIP availability flag and the condition based on the size of the current block. Here, the condition based on the CU skip flag is when the value of the CU skip flag is 0. That is, the encoding apparatus may signal the MMVD merge flag when a product of the height and width of the current block is 64 or more, the height and width of the current block are each less than 128, the value of the CIIP availability flag is 1, and the value of the CU skip flag is 0.
[0246] As another example, the encoding apparatus may include an MMVD merge flag in the video information based on whether a condition based on information about the current block and the partitioning mode available flag is satisfied. Here, the condition based on information about the current block includes whether a product of a width and height of the current block is 64 or more and / or whether a type of a slice including the current block is a b-slice. The condition based on the partitioning mode available flag is whether the value of the partitioning mode available flag is 1. That is, the encoding apparatus may signal an MMVD merge flag when both a condition based on the height of the current block and information about the current block and a condition based on the partitioning mode available flag are satisfied.
[0247] The encoding device may determine whether a condition based on the CIIP availability flag and a condition based on the size of the current block are satisfied when the condition based on the CIIP availability flag and the size of the current block are not satisfied, or may determine whether a condition based on the CIIP availability flag and a condition based on the size of the current block are satisfied when the condition based on the information on the current block and the partitioning mode availability flag are not satisfied.
[0248] On the other hand, the encoding device may also signal the MMVD merge flag if the product of the width and height of the current block is not 32 and the value of the MMVD available flag is 1, or if the maximum number of sub-block merge candidates is greater than 0 and the width and height of the current block are each greater than or equal to 8.
[0249] For this purpose, as an example, the merge data syntax is configured as shown in Table 7 below.
[0250] [Table 7-1]
[0251] [Table 7-2]
[0252] [Table 7-3]
[0253] [Table 7-4]
[0254] A value of 1 in the MMVD merge flag indicates that merge mode with motion vector difference is used to generate the inter prediction parameters of the current coding unit (current block). The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[0255] When the MMVD merge flag is not present, it is derived as follows:
[0256] If all of the following conditions are true, mmvd_merge_flag[x0][y0] is inferred to be equal to 1.
[0257] - The value of the general merge flag is 1 (general_merge_flag[x0][y0] is equal to 1)
[0258] -The value of the regular merge flag is 0 (regular_merge_flag[x0][y0] is equal to 0)
[0259] -The value of the SPS MMVD enable flag is 1 (sps_mmvd_enable_flag is equal to 1)
[0260] -The product of the current block's width and height is not 32 (cbWidth*cbHeight != 32)
[0261] -The maximum number of subblock merge candidates is 0 or less, or the width of the current block is less than 8, or the height of the current block is less than 8 (MaxNumSubblockMergeCand<=0 or cbWidth<8 or cbHeight<8)
[0262] -The value of the SPS CIIP enabled flag is 0 or the width of the current block is 128 or more or the height of the current block is 128 or more or the value of the CU skip flag is 1 (sps_ciip_enabled_flag is equal to 0 or cbWidth>=128 or cbHeight>=128 or cu_skip_flag[x0][y0] is equal to 1)
[0263] -The value of the SPS partitioning enabled flag is 0 or the maximum number of partitioning merge candidates is less than 2 or the slice type is not equal to B_SLICE (sps_triangle_enabled_flag is equal to 0 or MaxNumTriangleMergeCand<2 or slice_type is not equal to B_SLICE)
[0264] Otherwise, the value of the MMVD merge flag is inferred to be equal to 0.
[0265] Meanwhile, according to another embodiment, for example, the encoding apparatus may include a merge sub-block flag in the video information when a condition based on the CIIP availability flag and a condition based on the size of the current block are satisfied so that the same syntax is not transmitted redundantly. Here, the condition based on the size of the current block is when a product of the height and width of the current block is 64 or more, and the height and width of the current block are each less than 128. The condition based on the CIIP availability flag is when the value of the CIIP availability flag is 1. In other words, the encoding apparatus may signal a merge sub-block flag when a product of the height and width of the current block is 64 or more, the height and width of the current block are each less than 128, and the value of the CIIP availability flag is 1.
[0266] As another example, the encoding apparatus may include the remaining sub-block flags in the video information when a condition based on a CU skip flag is further satisfied in addition to the condition based on the CIIP available flag and the condition based on the size of the current block, where the condition based on the CU skip flag is when the value of the CU skip flag is 0. In other words, the encoding apparatus may signal a merged sub-block flag when a product of a height of a current block and a width of the current block is equal to or greater than 64, the height of the current block and the width of the current block are each less than 128, the value of the CIIP available flag is 1, and the value of the CU skip flag is 0.
[0267] As another example, the encoding apparatus may include a merge sub-block flag in the image information based on whether a condition based on information about the current block and the partitioning mode available flag is satisfied. Here, the condition based on information about the current block includes whether a product of a width and height of the current block is 64 or more and / or whether a type of a slice including the current block is a B slice. The condition based on the partitioning mode available flag is whether a value of the partitioning mode available flag is 1. That is, the encoding apparatus may signal a merge sub-block flag when both a condition based on a height of the current block and information about the current block and a condition based on the partitioning mode available flag are satisfied.
[0268] The encoding device may determine whether a condition based on the CIIP availability flag and a condition based on the size of the current block are satisfied when the condition based on the CIIP availability flag and the size of the current block are not satisfied, or may determine whether a condition based on the CIIP availability flag and a condition based on the size of the current block are satisfied when the condition based on the information on the current block and the partitioning mode availability flag are not satisfied.
[0269] Meanwhile, the encoding apparatus may signal a merge sub-block flag if the maximum number of sub-block merging candidates is greater than 0 and the width and height of the current block are each equal to or greater than 8.
[0270] For this purpose, as an example, the merge data syntax is configured as shown in Table 8 below.
[0271] [Table 8-1]
[0272] [Table 8-2]
[0273] [Table 8-3]
[0274] The merge_subblock_flag[x0][y0] specifies whether the subblock-based inter prediction parameters for the current coding unit are inferred from neighbouring blocks. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[0275] When merge_subblock_flag[x0][y0] is not present, it is inferred as follow.
[0276] If all of the following conditions are true, merge_subblock_flag[x0][y0] is inferred to be equal to 1.
[0277] - The value of the general merge flag is 1 (general_merge_flag[x0][y0] is equal to 1)
[0278] -The value of the regular merge flag is 0 (regular_merge_flag[x0][y0] is equal to 0)
[0279] -The value of the merge subblock flag is 0 (merge_subblock_flag[x0][y0] is equal to 0)
[0280] - The value of the MMVD merge flag is 0 (mmvd_merge_flag[x0][y0] is equal to 0)
[0281] -The maximum number of subblock merge candidates is greater than 0 (MaxNumSubblockMergeCand>0).
[0282] -The width and height of the current block are both 8 or more (cbWidth>=8 and cbHeight>=8)
[0283] -The value of the SPS CIIP enabled flag is 0 or the width of the current block is 128 or more or the height of the current block is 128 or more or the value of the CU skip flag is 1 (sps_ciip_enabled_flag is equal to 0 or cbWidth>=128 or cbHeight>=128 or cu_skip_flag[x0][y0] is equal to 1)
[0284] -The value of the SPS partitioning enabled flag is 0 or the maximum number of partitioning merge candidates is less than 2 or the slice type is not equal to B_SLICE (sps_triangle_enabled_flag is equal to 0 or MaxNumTriangleMergeCand<2 or slice_type is not equal to B_SLICE)
[0285] Otherwise, the value of the merge subblock flag is inferred to be equal to 0.
[0286] Meanwhile, according to another embodiment, for example, the encoding apparatus may include a CIIP flag in the video information when a condition based on the CIIP availability flag and a condition based on the size of the current block are satisfied so that the same syntax is not transmitted redundantly. Here, the condition based on the size of the current block may be when a product of the height and width of the current block is equal to or greater than 64, and the height and width of the current block are each smaller than 128. The condition based on the CIIP availability flag is when the value of the CIIP availability flag is 1. That is, the encoding apparatus may signal a CIIP flag when a product of the height and width of the current block is equal to or greater than 64, the height and width of the current block are each smaller than 128, and the value of the CIIP availability flag is 1.
[0287] As another example, the encoding apparatus may include the CIIP flag in the video information when a condition based on a CU skip flag is further satisfied in addition to the condition based on the CIIP available flag and the condition based on the size of the current block, where the condition based on the CU skip flag is when the value of the CU skip flag is 0. In other words, the encoding apparatus may signal the CIIP flag when a product of a height of a current block and a width of the current block is equal to or greater than 64, the height of the current block and the width of the current block are each less than 128, the value of the CIIP available flag is 1, and the value of the CU skip flag is 0.
[0288] As another example, the encoding apparatus may include a CIIP flag in the image information based on whether a condition based on information about the current block and the partitioning mode available flag is satisfied. Here, the condition based on information about the current block includes whether a product of a width and a height of the current block is 64 or more and / or whether a type of a slice including the current block is a B slice. The condition based on the partitioning mode available flag is whether a value of the partitioning mode available flag is 1. In other words, the encoding apparatus may signal a CIIP flag when both a condition based on a height of the current block and information about the current block and a condition based on the partitioning mode available flag are satisfied.
[0289] The encoding apparatus determines whether a condition based on the information on the current block and the partitioning mode available flag is satisfied when the condition based on the CIIP availability flag and the size of the current block are not satisfied, or determines whether a condition based on the information on the current block and the partitioning mode available flag and the size of the current block are satisfied when the condition based on the information on the current block and the partitioning mode available flag are not satisfied.
[0290] For this purpose, as an example, the merge data syntax is configured as shown in Table 9 below.
[0291] [Table 9-1]
[0292] [Table 9-2]
[0293] [Table 9-3]
[0294] The CIIP flag specifies whether the combined inter-picture merge and intra-picture prediction is applied for the current coding unit. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[0295] When the CIIP flag is not present, it is derived as follows:
[0296] If all of the following conditions are true, ciip_flag[x0][y0] is inferred to be equal to 1.
[0297] - The value of the general merge flag is 1 (general_merge_flag[x0][y0] is equal to 1)
[0298] -The value of the regular merge flag is 0 (regular_merge_flag[x0][y0] is euqal to 0)
[0299] -The value of the merge subblock flag is 0 (merge_subblock_flag[x0][y0] is equal to 0)
[0300] - The value of the MMVD merge flag is 0 (mmvd_merge_flag[x0][y0] is equal to 0)
[0301] -The value of the SPS CIIP enabled flag is 1 (sps_ciip_enabled_flag is equal to 1)
[0302] - The value of the CU skip flag is 0 (cu_skip_flag[x0][y0] is equal to 0)
[0303] - The product of the current block's width and height is 64 or more, and the current block's width and height are each less than 128 (cbWidth*cbHeight>=64 and cbWidth<128 and cbHeight<128)
[0304] -The value of the SPS partitioning enabled flag is 0 or the maximum number of partitioning merge candidates is less than 2 or the slice type is not equal to B_SLICE (sps_triangle_enabled_flag is equal to 0 or MaxNumTriangleMergeCand<2 or slice_type is not equal to B_SLICE)
[0305] Otherwise, the value of the CIIP flag is inferred to be equal to 0.
[0306] 12 and 13 illustrate an example of a video / picture decoding method and associated components including an inter-prediction method consistent with embodiments of the present document.
[0307] The decoding method disclosed in Figure 12 may be performed by the decoding apparatus 300 disclosed in Figures 3 and 13. Specifically, for example, S1200 and S1210 in Figure 12 are performed in the entropy decoding unit 310 of the decoding apparatus, S1220 is performed in the prediction unit 330 of the decoding apparatus 300, and S1230 is performed by the addition unit 340 of the decoding apparatus 300. The decoding method disclosed in Figure 12 includes the embodiments described above in this document.
[0308] As shown in Figures 12 and 13, the decoding device obtains at least one of a CIIP available flag and a CU skip flag from a bitstream (S1200). Specifically, the entropy decoding unit 310 of the decoding device may derive residual information and information about a prediction mode from a signal received in the form of a bitstream from the encoding device of Figure 2. Here, the information about the prediction mode may be referred to as prediction-related information. The information about the prediction mode may include inter / intra prediction classification information, inter prediction mode information, etc., and may include various syntax elements related thereto.
[0309] The bitstream includes video information including 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 information further includes information on a prediction mode of a current block such as a coding unit syntax, a merge data syntax, etc. The sequence parameter set includes a CIIP available flag, an available flag for a partitioning mode, etc. The coding unit syntax includes a CU skip flag indicating whether a skip mode is applied to the current block.
[0310] The predictor 330 of the decoding device obtains a regular merge flag from the bitstream based on whether at least one of a condition based on the CIIP available flag, a condition based on the CU skip flag, and a condition based on the size of the current block is satisfied (S1210). Also, the predictor 330 performs inter prediction based on the regular merge flag to generate a predicted sample of the current block (S1220). For example, when the regular merge flag is parsed from the bitstream, the predictor 330 of the decoding device may perform inter prediction in the (regular) merge mode. In this case, the predictor 330 of the decoding device may configure a merge candidate list through the procedure of FIG. 8 and select an optimal merge candidate using a merge index obtained from the bitstream. Also, the predictor 330 may generate a predicted sample of the current block using motion information of the optimal merge candidate as motion information of the current block.
[0311] Meanwhile, the residual processor 320 of the decoding device may generate a residual sample based on the residual information. The adder 340 of the decoding device generates a reconstructed sample based on the prediction sample generated in the prediction unit 330 and the residual sample generated in the residual processor 320 (S1230). A reconstructed picture may be generated based on the reconstructed sample. Then, in-loop filtering procedures such as deblocking filtering, SAO and / or ALF procedures may be applied to the reconstructed picture to improve subjective / objective picture quality as necessary.
[0312] As an example, the decoding device may obtain a regular merge flag from the bitstream when a condition based on the CIIP availability flag and a condition based on the size of the current block are satisfied in deriving the prediction mode of the current block. Here, the condition based on the size of the current block may be when a product of the height and width of the current block is 64 or more, and the height and width of the current block are each less than 128. The condition based on the CIIP availability flag is when the value of the CIIP availability flag is 1. In other words, when a product of the height and width of the current block is 64 or more, the height and width of the current block are each less than 128, and the value of the CIIP availability flag is 1, the decoding device may parse the regular image flag from a merge data syntax included in the bitstream.
[0313] As another example, a regular merge flag may be obtained from the bitstream based on whether a condition based on a CU skip flag and a size of a current block is satisfied. Here, the condition based on the size of the current block may be that a product of the height and width of the current block is equal to or greater than 64, and the height and width of the current block are each smaller than 128. The condition based on the CU skip flag is that the value of the CU skip flag is 0. In other words, if a product of the height and width of the current block is equal to or greater than 64, the height and width of the current block are each smaller than 128, and the value of the CU skip flag is 0, the decoding device may parse the regular image flag from a merge data syntax included in the bitstream.
[0314] As another example, the decoding device may obtain a regular merge flag from the bitstream based on at least one of a condition based on the CIIP available flag, a condition based on the CU skip flag, and a condition based on the size of the current block being satisfied. Here, the condition based on the CIIP available flag may be when the value of the CIIP available flag is 1. The condition based on the CU skip flag is when the value of the CU skip flag is 0. In other words, the decoding device may parse a regular merge flag from a merge data syntax when a product of a height of a current block and a width of the current block is 64 or more, the height of the current block and the width of the current block are each less than 128, and the value of the CIIP available flag is 1 or the value of the CU skip flag is 0.
[0315] As another example, the decoding device may obtain the regular merge flag from the bitstream based on a condition based on a CU skip flag being further satisfied in addition to the condition based on the CIIP available flag and the condition based on the size of the current block. Here, the condition based on the CU skip flag is when the value of the CU skip flag is 0. In other words, the decoding device may parse the regular merge flag from the merge data syntax when the product of the height and width of the current block is 64 or more, the height and width of the current block are each less than 128, the value of the CIIP available flag is 1, and the value of the CU skip flag is 0.
[0316] As another example, the decoding device may obtain the regular merge flag from the bitstream based on whether a condition based on information about the current block and the partitioning mode available flag is satisfied. Here, the condition based on information about the current block includes whether a product of a width and a height of the current block is 64 or more and / or whether a type of a slice including the current block is a B slice. The condition based on the partitioning mode available flag is whether a value of the partitioning mode available flag is 1. In other words, the decoding device may parse a regular merge flag from the merge data syntax when both a condition based on a height of the current block and information about the current block and a condition based on the partitioning mode available flag are satisfied.
[0317] If the condition based on the CIIP availability flag and the condition based on the size of the current block are not satisfied, the decoding device determines whether the condition based on the information on the current block and the partitioning mode availability flag is satisfied, or, if the condition based on the information on the current block and the partitioning mode availability flag is not satisfied, the decoding device may determine whether the condition based on the CIIP availability flag and the condition based on the size of the current block are satisfied.
[0318] Meanwhile, the decoding device may parse the regular image flag from the bitstream if the product of the width and height of the current block is not 32 and the value of the MMVD available flag is 1, or if the maximum number of sub-block merging candidates is greater than 0 and the width and height of the current block are each equal to or greater than 8. For this purpose, the merge data syntax is configured as shown in Table 6 above.
[0319] The decoding apparatus may derive the regular merge flag as 1 if the bitstream does not include a regular merge flag, the general merge flag has a value of 1, the MMVD available flag of the SPS has a value of 0 or the product of the width and height of the current block is 32 and the maximum number of sub-block merge candidates is 0 or less, or the width of the current block is less than 8 or the height of the current block is less than 8, the CIIP available flag of the SPS has a value of 0 or the product of the width and height of the current block is less than 64 or the width of the current block is 128 or more, or the CU skip flag has a value of 1, and the partitioning available flag of the SPS has a value of 0 or the maximum number of partitioning merge candidates is less than 2 or the slice type is not a B slice. Otherwise, the regular merge flag is derived as 0.
[0320] In another embodiment, the decoding device may obtain an MMVD merge flag from the bitstream when a condition based on the CIIP availability flag and a condition based on the size of the current block are satisfied in deriving the prediction mode of the current block. Here, the condition based on the size of the current block may be when a product of the height and width of the current block is equal to or greater than 64, and the height and width of the current block are each smaller than 128. The condition based on the CIIP availability flag is when the value of the CIIP availability flag is 1. In other words, when a product of the height and width of the current block is equal to or greater than 64, the height and width of the current block are each smaller than 128, and the value of the CIIP availability flag is 1, the decoding device may parse an MMVD merge flag from a merge data syntax included in the bitstream.
[0321] As another example, an MMVD merge flag may be obtained from the bitstream based on whether a condition based on a CU skip flag and a size of a current block is satisfied. Here, the condition based on the size of the current block may be that a product of the height and width of the current block is equal to or greater than 64, and the height and width of the current block are each smaller than 128. The condition based on the CU skip flag is that the value of the CU skip flag is 0. In other words, if a product of the height and width of the current block is equal to or greater than 64, the height and width of the current block are each smaller than 128, and the value of the CU skip flag is 0, the decoding device may parse an MMVD merge flag from a merge data syntax included in the bitstream.
[0322] As another example, the decoding device may obtain the MMVD merge flag from the bitstream based on a condition based on a CU skip flag being further satisfied in addition to the condition based on the CIIP available flag and the condition based on the size of the current block. Here, the condition based on the CU skip flag is when the value of the CU skip flag is 0. In other words, the decoding device may parse the MMVD merge flag from the merge data syntax when the product of the height and width of the current block is 64 or more, the height and width of the current block are each less than 128, the value of the CIIP available flag is 1, and the value of the CU skip flag is 0.
[0323] As another example, the decoding device may obtain an MMVD merge flag from the bitstream based on whether a condition based on information about the current block and the partitioning mode available flag is satisfied. Here, the condition based on information about the current block includes a case where a product of a width and a height of the current block is 64 or more and / or a case where a type of a slice including the current block is a B slice. The condition based on the partitioning mode available flag is a case where a value of the partitioning mode available flag is 1. In other words, the decoding device may parse an MMVD merge flag from the merge data syntax when both a condition based on a height of the current block and information about the current block and a condition based on the partitioning mode available flag are satisfied.
[0324] If the condition based on the CIIP availability flag and the condition based on the size of the current block are not satisfied, the decoding device determines whether the condition based on the information on the current block and the partitioning mode availability flag is satisfied, or if the condition based on the information on the current block and the partitioning mode availability flag is not satisfied, the decoding device may determine whether the condition based on the CIIP availability flag and the condition based on the size of the current block are satisfied.
[0325] Meanwhile, the decoding device may parse the MMVD merge flag from the bitstream if the product of the width and height of the current block is not 32 and the value of the MMVD available flag is 1, or if the maximum number of sub-block merge candidates is greater than 0 and the width and height of the current block are each equal to or greater than 8. For this purpose, the merge data syntax is configured as shown in Table 7 above.
[0326] The decoding device may derive the value of the MMVD merge flag as 1 if the bitstream does not contain an MMVD merge flag, if the value of the general merge flag is 1, the value of the regular merge flag is 0, the value of the MMVD available flag of the SPS is 1, the product of the width and height of the current block is not 32, the maximum number of sub-block merge candidates is 0 or less, or the width of the current block is less than 8, or the height of the current block is less than 8, the value of the CIIP available flag of the SPS is 0, or the width of the current block is 128 or more, or the height of the current block is 128 or more, or the value of the CU skip flag is 1, and the value of the partitioning available flag of the SPS is 0, or the maximum number of partitioning merge candidates is less than 2, or the slice type is not a B slice. Otherwise, the value of the MMVD merge flag may be derived as 0.
[0327] In another embodiment, the decoding device may obtain a merge sub-block flag from the bitstream when a condition based on the CIIP availability flag and a condition based on the size of the current block are satisfied in deriving the prediction mode of the current block. Here, the condition based on the size of the current block may be a case where a product of the height and width of the current block is equal to or greater than 64, and the height and width of the current block are each smaller than 128. The condition based on the CIIP availability flag is a case where a value of the CIIP availability flag is 1. In other words, if a product of the height and width of the current block is equal to or greater than 64, the height and width of the current block are each smaller than 128, and the value of the CIIP availability flag is 1, the decoding device may parse a merge sub-block flag from a merge data syntax included in the bitstream.
[0328] As another example, a merge sub-block flag may be obtained from the bitstream based on whether a condition based on a CU skip flag and a size of a current block is satisfied. Here, the condition based on the size of the current block may be that a product of the height and width of the current block is equal to or greater than 64, and the height and width of the current block are each smaller than 128. The condition based on the CU skip flag is that a value of the CU skip flag is 0. In other words, if a product of the height and width of the current block is equal to or greater than 64, the height and width of the current block are each smaller than 128, and the value of the CU skip flag is 0, the decoding device may parse the merge sub-block flag from a merge data syntax included in the bitstream.
[0329] As another example, the decoding device may obtain merge sub-block flags from the bitstream based on a condition based on a CU skip flag being further satisfied in addition to the condition based on the CIIP available flag and the condition based on the size of the current block. Here, the condition based on the CU skip flag is when the value of the CU skip flag is 0. In other words, the decoding device may parse merge sub-block flags from the merge data syntax when a product of a height of a current block and a width of the current block is equal to or greater than 64, the height of the current block and the width of the current block are each less than 128, the value of the CIIP available flag is 1, and the value of the CU skip flag is 0.
[0330] As another example, the decoding apparatus may obtain a merge sub-block flag from the bitstream based on whether a condition based on information about the current block and the partitioning mode available flag is satisfied. Here, the condition based on information about the current block includes whether a product of a width and a height of the current block is 64 or more and / or whether a type of a slice including the current block is a B slice. The condition based on the partitioning mode available flag is whether a value of the partitioning mode available flag is 1. In other words, the decoding apparatus may parse a merge sub-block flag from the merge data syntax when both a condition based on a height of the current block and information about the current block and a condition based on the partitioning mode available flag are satisfied.
[0331] If the condition based on the CIIP availability flag and the condition based on the size of the current block are not satisfied, the decoding device may determine whether the condition based on the information on the current block and the partitioning mode availability flag is satisfied, or if the condition based on the information on the current block and the partitioning mode availability flag is not satisfied, the decoding device may determine whether the condition based on the CIIP availability flag and the condition based on the size of the current block are satisfied.
[0332] Meanwhile, the decoding apparatus may parse the merge sub-block flag from the bitstream if the maximum number of sub-block merging candidates is greater than 0 and the width and height of the current block are each greater than or equal to 8. To this end, the merge data syntax is configured as shown in Table 8 above.
[0333] The decoding apparatus may derive the value of the merge sub-block flag as 1 if the bitstream does not include a merge sub-block flag, if the general merge flag has a value of 1, the regular merge flag has a value of 0, the merge sub-block flag has a value of 0, the MMVD merge flag has a value of 0, the maximum number of sub-block merge candidates is greater than 0, the width and height of the current block are each greater than or equal to 8, the CIIP available flag of the SPS has a value of 0, or the width of the current block is greater than or equal to 128, or the height of the current block is greater than or equal to 128, or the CU skip flag has a value of 1, and the partitioning available flag of the SPS has a value of 9, or the maximum number of partitioning merge candidates is less than 2, or the slice type is not a B slice. Otherwise, the merge sub-block flag may be derived as 0.
[0334] In another embodiment, the decoding device may obtain a CIIP flag from the bitstream when a condition based on the CIIP availability flag and a condition based on the size of the current block are satisfied in deriving the prediction mode of the current block. Here, the condition based on the size of the current block may be when a product of the height and width of the current block is equal to or greater than 64, and the height and width of the current block are each smaller than 128. The condition based on the CIIP availability flag is when the value of the CIIP availability flag is 1. In other words, the decoding device may parse the CIIP flag from the merge data syntax when a product of the height and width of the current block is equal to or greater than 64, the height and width of the current block are each smaller than 128, and the value of the CIIP availability flag is 1.
[0335] As another example, the decoding device may obtain the CIIP flag from a bitstream based on a condition based on a CU skip flag being further satisfied in addition to the condition based on the CIIP available flag and the condition based on the size of the current block, where the condition based on the CU skip flag is when the value of the CU skip flag is 0. In other words, the decoding device may parse the CIIP flag from a merge data syntax when a product of a height of a current block and a width of the current block is equal to or greater than 64, the height of the current block and the width of the current block are each less than 128, the value of the CIIP available flag is 1, and the value of the CU skip flag is 0.
[0336] As another example, the decoding device may obtain a CIIP flag from a bitstream based on whether a condition based on information about the current block and the partitioning mode available flag is satisfied. Here, the condition based on information about the current block includes a case where a product of a width and a height of the current block is 64 or more and / or a case where a type of a slice including the current block is a B slice. The condition based on the partitioning mode available flag is a case where a value of the partitioning mode available flag is 1. In other words, the decoding device may parse a CIIP flag from a merge data syntax when both a condition based on a height of the current block and information about the current block and a condition based on the partitioning mode available flag are satisfied.
[0337] The decoding device determines whether a condition based on the CIIP availability flag and a condition based on the size of the current block are satisfied when the condition based on the CIIP availability flag and the size of the current block are not satisfied. Alternatively, the decoding device may determine whether a condition based on the CIIP availability flag and a condition based on the size of the current block are satisfied when the condition based on the information on the current block and the partitioning mode availability flag are not satisfied. To this end, the merge data syntax is configured as shown in Table 9 above.
[0338] The decoding device may derive the CIIP flag value as 1 if the bitstream does not contain a CIIP flag, if the general merge flag has a value of 1, the regular merge flag has a value of 0, the merge sub-block flag has a value of 0, the MMVD merge flag has a value of 0, the CIIP available flag of the SPS has a value of 1, the CU skip flag has a value of 0, the product of the width and height of the current block is greater than or equal to 64 and the width and height of the current block are each less than 128, the partitioning available flag of the SPS has a value of 0 or the maximum number of partitioning merge candidates is less than 2 or the slice type is not a B slice. Otherwise, the CIIP flag value is derived as 0.
[0339] In the above embodiments, the methods are described with reference to flow charts as a series of steps or blocks, but the embodiments are not limited to the order of steps, and certain steps may occur in a different order or simultaneously with other steps than those described. Additionally, those skilled in the art will appreciate that the steps shown in the flow charts are not exclusive, and other steps may be included, or one or more steps of the flow charts may be omitted without affecting the scope of the embodiments herein.
[0340] The methods according to the embodiments of 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.
[0341] In this document, when the embodiments are implemented in software, the methods described above may be implemented with modules (processes, functions, etc.) that perform 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 a read-only memory (ROM), a random access memory (RAM), a flash memory, a memory card, a storage medium, and / or other storage devices. That is, the embodiments described in this document may be implemented and executed on a processor, 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 on a digital storage medium.
[0342] In addition, the decoding device and encoding device to which the embodiment(s) of this document are 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 custom video (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 argument reality (AR) device, an image telephone video device, a transportation means terminal (e.g., a vehicle (including an autonomous vehicle) terminal, 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.
[0343] In addition, the processing method to which the embodiment(s) of the present document are applied may be produced in the form of a program executed by a computer and may be stored in a computer-readable recording medium. In addition, multimedia data having a data structure according to the embodiment(s) of the present document may also be stored in a computer-readable recording medium. The computer-readable recording medium includes all kinds of storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable recording medium may 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 recording medium may include a medium embodied in the form of a carrier wave (e.g., transmission via the Internet). In addition, a bitstream generated by the encoding method may be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.
[0344] Furthermore, the embodiment(s) 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 embodiment(s) of the present document, and the program code may be stored on a computer readable carrier.
[0345] FIG. 14 illustrates an example of a content streaming system in which the embodiments disclosed in this document can be applied.
[0346] As shown in FIG. 14, a content streaming system to which the embodiments of this document are applied mainly includes an encoding server, a streaming server, a web server, a media repository, a user device, and a multimedia input device.
[0347] 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.
[0348] 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.
[0349] 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 transmits 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.
[0350] The streaming server can receive content from a media repository and / or an encoding server. For example, when the content is received from the encoding server, the content can be received in real time. In this case, the streaming server can store the bitstream for a certain period of time to provide a smooth streaming service.
[0351] Examples of the user devices include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glass, head mounted displays (HMDs), digital TVs, desktop computers, and digital signage.
[0352] 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.
Claims
1. A decoding method performed by a decoding device, Obtaining an availability flag and a general merge flag for a partitioning mode in which a current block is divided into two partitions and prediction is performed from the bitstream; determining whether to obtain a regular merge flag from the bitstream based on a first condition and a second condition; obtaining the regular merge flag from the bitstream based on the first condition and the second condition being satisfied; generating a predicted sample of the current block by performing inter prediction based on the regular merge flag; generating reconstructed samples based on the predicted samples; the first condition is met based only on a condition related to a height of the current block and a width of the current block; the second condition is satisfied based on a condition based on an availability flag for the partitioning mode, a condition based on a type of a slice including the current block, and a condition based on a size of the current block being satisfied; The general merge flag indicates whether merge data syntax is included in the bitstream; The merge data syntax includes the regular merge flag indicating whether a regular merge mode is used as a prediction mode for the current block based on the first condition and the second condition.
2. An encoding method performed by an encoding device, deriving a predicted sample of the current block based on inter prediction; generating prediction mode information indicating a prediction mode of the current block; deriving a residual sample based on the prediction sample; generating residual information based on the residual samples; encoding video information including information about the prediction mode and the residual information; The image information includes an availability flag and a general merge flag for a partitioning mode in which a current block is divided into two partitions for prediction; the video information includes a regular merge flag based on a first condition and a second condition being satisfied; the first condition is met based only on a condition related to a height of the current block and a width of the current block; the second condition is satisfied based on a condition based on an availability flag for the partitioning mode, a condition based on a type of a slice including the current block, and a condition based on a size of the current block being satisfied; The general merge flag indicates whether a merge data syntax is included in the bitstream; The merge data syntax includes the regular merge flag indicating whether a regular merge mode is used as a prediction mode for the current block based on the first condition and the second condition.
3. In a method of transmitting data for video, obtaining a bitstream for the image, the bitstream being generated by deriving a prediction sample of a current block based on inter prediction, generating information on a prediction mode indicating a prediction mode of the current block, deriving a residual sample based on the prediction sample, generating residual information based on the residual sample, and encoding image information including the information on the prediction mode and the residual information; transmitting the data including the bitstream; The image information includes an availability flag and a general merge flag for a partitioning mode in which a current block is divided into two partitions for prediction; the video information includes a regular merge flag based on a first condition and a second condition being satisfied; the first condition is met based only on a condition related to a height of the current block and a width of the current block; the second condition is satisfied based on a condition based on an availability flag for the partitioning mode, a condition based on a type of a slice including the current block, and a condition based on a size of the current block being satisfied; The general merge flag indicates whether merge data syntax is included in the bitstream; The merge data syntax includes the regular merge flag indicating whether a regular merge mode is used as a prediction mode for the current block based on the first condition and the second condition.
Citation Information
Patent Citations
Method and apparatus for video coding
WO2020117619A1
System and method for signaling of motion merge modes in video coding
WO2020142448A1
Video signal processing method and device using motion compensation
WO2020149725A1
