Video signal processing method using current picture reference and device

By employing adaptive block copy and inter prediction modes with selective spatial neighbor positions, the method enhances coding efficiency in video signal processing, addressing inefficiencies in existing methods.

JP2025159194APending Publication Date: 2025-10-17HUMAX CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2025137148
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2019-04-24
Filing Date
2025-08-20
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing video signal processing methods lack efficiency in encoding and decoding processes, particularly in handling block copy and inter prediction modes, leading to suboptimal coding performance.

Method used

The method and apparatus enhance coding efficiency by determining and utilizing block copy (BC) and inter prediction modes, where spatial neighbor positions for decoding and encoding include specific subsets based on mode types, with adaptive parameter determination and bitstream generation.

Benefits of technology

Improves coding efficiency by optimizing block processing in video signals through strategic use of BC and inter prediction modes, enhancing decoding and encoding processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025159194000001_ABST
    Figure 2025159194000001_ABST
Patent Text Reader

Abstract

To provide a processing method for a video signal and a device, to be more specific, to provide a video signal processing method encoding or decoding a video signal and a device.SOLUTION: A video signal processing method includes the following steps of: determining a prediction mode of a current block; when a prediction mode of the current block is a BC (block copy) prediction mode referring to a current picture, decoding the current block on the basis of the BC prediction mode; and decoding the current block on the basis of an inter-prediction mode referring to at least one picture when the prediction mode of the current block is the inter-prediction mode. A set of spatial neighbor positions to be referred to for decoding the current block in the BC prediction mode is composed of a part of a set of spatial neighbor positions to be referred to for decoding the current block in the inter-prediction mode.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a video signal processing method and apparatus, and more particularly to a video signal processing method and apparatus for encoding or decoding a video signal. [Background technology]

[0002] Compression coding refers to a series of signal processing techniques for transmitting digitized information over a communication line or storing it in a form suitable for a storage medium. Compression coding can be used to encode audio, video, text, and other data, but video compression is the technology that specifically targets video. Video signal compression is performed by removing redundant information by taking into account spatial correlation, temporal correlation, and stochastic correlation. However, with the recent development of various media and data transmission media, more efficient video signal processing methods and devices are needed. Summary of the Invention [Problem to be solved by the invention]

[0003] The present invention has the object to increase the coding efficiency of video signals. [Means for solving the problem]

[0004] In order to solve the above problems, the present invention provides the following video signal processing device and video signal processing method.

[0005] First, according to an embodiment of the present invention, there is provided a video signal processing method including: a step of determining a prediction mode of a current block; a step of decoding the current block based on the BC (block copy) prediction mode if the prediction mode of the current block is a BC (block copy) prediction mode that references a current picture; and a step of decoding the current block based on the inter prediction mode if the prediction mode of the current block is an inter prediction mode that references at least one picture, wherein a set of spatial neighbor positions referenced to decode the current block in the BC prediction mode includes a portion of a set of spatial neighbor positions referenced to decode the current block in the inter prediction mode.

[0006] Also, according to one embodiment of the present invention, a video signal processing method is provided, which includes: determining a prediction mode of a current block; if the prediction mode of the current block is a BC (block copy) prediction mode that references a current picture, generating a bitstream for encoding the current block based on the BC prediction mode; and if the prediction mode of the current block is an inter prediction mode that references at least one picture, generating a bitstream for encoding the current block based on the inter prediction mode, wherein a set of spatial neighbor positions referenced for encoding the current block in the BC prediction mode includes a portion of a set of spatial neighbor positions referenced for encoding the current block in the inter prediction mode.

[0007] Also, according to one embodiment of the present invention, there is provided a video signal processing device including a processor, wherein the processor determines a prediction mode of a current block, and if the prediction mode of the current block is a BC (block copy) prediction mode that references a current picture, decodes the current block based on the BC prediction mode, and if the prediction mode of the current block is an inter prediction mode that references at least one picture, decodes the current block based on the inter prediction mode, and a set of spatial neighbor positions referenced to decode the current block in the BC prediction mode includes a portion of a set of spatial neighbor positions referenced to decode the current block in the inter prediction mode.

[0008] Also, according to one embodiment of the present invention, there is provided a video signal processing device including a processor, wherein the processor determines a prediction mode of a current block, and if the prediction mode of the current block is a BC (block copy) prediction mode that references a current picture, generates a bitstream for encoding the current block based on the BC prediction mode, and if the prediction mode of the current block is an inter prediction mode that references at least one picture, generates a bitstream for encoding the current block based on the inter prediction mode, and a set of spatial neighbor positions referenced to encode the current block in the BC prediction mode includes a portion of a set of spatial neighbor positions referenced to encode the current block in the inter prediction mode.

[0009] Also, according to one embodiment of the present invention, a computer-readable recording medium is provided that stores a bitstream for video signal processing, wherein the bitstream includes prediction mode information of a current block, and if the prediction mode of the current block is a BC (block copy) prediction mode that references a current picture, the bitstream includes a bitstream that encodes the current block based on the BC prediction mode, and if the prediction mode of the current block is an inter prediction mode that references at least one picture, the bitstream includes a bitstream that encodes the current block based on the inter prediction mode, and a set of spatial neighbor positions referenced to encode the current block in the BC prediction mode includes a portion of the set of spatial neighbor positions referenced to encode the current block in the inter prediction mode. [Effects of the Invention]

[0010] According to an embodiment of the present invention, the coding efficiency of a video signal can be improved. [Brief explanation of the drawings]

[0011] [Figure 1] 1 is a schematic block diagram of a video signal encoding apparatus according to an embodiment of the present invention; [Figure 2] 1 is a schematic block diagram of a video signal decoding device according to an embodiment of the present invention; [Figure 3] FIG. 1 illustrates an example of how coding tree units are divided into coding units within a picture. [Figure 4] FIG. 1 illustrates an embodiment of a method for signaling the splitting of quadtrees and multi-type trees. [Figure 5] 10 illustrates an example of reference samples used for prediction of a current block in an intra prediction mode. [Figure 6] 10 illustrates an example of a prediction mode used in intra prediction. [Figure 7]FIG. 1 is a diagram illustrating inter prediction according to an embodiment of the present invention. [Figure 8] 1 is a diagram illustrating a motion vector signaling method according to an embodiment of the present invention. [Figure 9] FIG. 1 is a diagram illustrating the syntax of MVD (motion vector difference) according to one embodiment of the present invention. [Figure 10] FIG. 1 is a diagram showing adaptive motion vector resolution (AMVR) signaling according to one embodiment of the present invention. [Figure 11] FIG. 10 is a diagram illustrating inter-prediction related syntax according to an embodiment of the present invention. [Figure 12] FIG. 1 illustrates spatial neighboring locations according to one embodiment of the present invention. [Figure 13] FIG. 2 is a diagram illustrating referencing of a current picture according to one embodiment of the present invention. [Figure 14] FIG. 1 is a diagram illustrating a method for referencing spatial neighboring candidates according to an embodiment of the present invention. [Figure 15] 10A and 10B are diagrams illustrating block positions and a motion candidate list configuration according to an embodiment of the present invention; [Figure 16] 10A and 10B are diagrams illustrating block positions and motion candidate list configurations according to an embodiment of the present invention; [Figure 17] FIG. 10 illustrates the use of spatial neighbor candidates according to one embodiment of the present invention. [Figure 18] FIG. 2 is a diagram illustrating motion vectors according to an embodiment of the present invention. [Figure 19] A diagram showing the syntax of an MVD according to one embodiment of the present invention. [Figure 20] FIG. 10 is a diagram illustrating motion vectors according to an embodiment of the present invention. [Figure 21]A diagram showing the syntax of an MVD according to one embodiment of the present invention. [Figure 22] A diagram showing the syntax of an MVD according to one embodiment of the present invention. [Figure 23] FIG. 1 is a diagram showing blocks and sizes according to an embodiment of the present invention. [Figure 24] FIG. 1 is a diagram illustrating a configuration of a merge candidate list according to an embodiment of the present invention. [Figure 25] FIG. 10 is a diagram illustrating block positions and syntax according to one embodiment of the present invention. [Figure 26] FIG. 10 is a diagram illustrating resetting a space for storing the history of HMVP according to one embodiment of the present invention. [Figure 27] FIG. 2 is a diagram illustrating a coding unit syntax according to one embodiment of the present invention. [Figure 28] FIG. 10 is a diagram illustrating prediction mode signaling according to one embodiment of the present invention. [Figure 29] FIG. 10 is a diagram illustrating prediction mode signaling according to one embodiment of the present invention. [Figure 30] FIG. 10 is a diagram illustrating prediction mode signaling according to one embodiment of the present invention. [Figure 31] FIG. 10 is a diagram illustrating a coding unit syntax according to one embodiment of the present invention. [Figure 32] FIG. 10 is a diagram illustrating prediction mode signaling according to one embodiment of the present invention. [Figure 33] FIG. 10 is a diagram illustrating a coding unit syntax according to one embodiment of the present invention. [Figure 34] FIG. 10 is a diagram illustrating a coding unit syntax according to one embodiment of the present invention. [Figure 35] FIG. 2 is a diagram illustrating intra-prediction mode derivation of chroma components according to one embodiment of the present invention. [Figure 36] 10 is a diagram illustrating intra-prediction mode derivation of chroma components according to an embodiment of the present invention. [Figure 37]FIG. 10 is a diagram illustrating a coding unit syntax according to one embodiment of the present invention. [Figure 38] FIG. 2 is a diagram illustrating a syntax structure according to one embodiment of the present invention. [Figure 39] FIG. 1 illustrates a signaling value infer method according to one embodiment of the present invention. [Figure 40] 1 illustrates a signaling value inference method according to an embodiment of the present invention. [Figure 41] FIG. 10 is a diagram illustrating inter_pred_idc values ​​and binarization according to one embodiment of the present invention. [Figure 42] A diagram showing inter_pred_idc values ​​and binarization in one embodiment of the present invention. [Figure 43] A diagram showing inter_pred_idc values ​​and binarization in one embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0012] In order to solve the above problems, the present invention provides the following video signal processing device and video signal processing method.

[0013] According to an embodiment of the present invention, there is provided a video signal processing method including: determining a prediction mode of a current block; if the prediction mode of the current block is a block copy (BC) prediction mode that references a current picture, decoding the current block based on the BC prediction mode; and if the prediction mode of the current block is an inter prediction mode that references at least one picture, decoding the current block based on the inter prediction mode, wherein a set of spatial neighbor positions referenced for decoding the current block in the BC prediction mode includes a portion of a set of spatial neighbor positions referenced for decoding the current block in the inter prediction mode. Here, the BC prediction mode may be called an intra block copy (IBC) prediction mode or a current picture referencing (CBR) prediction mode.

[0014] The set of spatial neighbor positions referenced to decode the current block in the inter prediction mode may include the (xCb-1, yCb-1) position when the topmost and leftmost position of the current block is (xCb, yCb), and the set of spatial neighbor positions referenced to decode the current block in the BC prediction mode may not include the (xCb-1, yCb-1) position when the topmost and leftmost position of the current block is (xCb, yCb).

[0015] The set of spatial neighbor positions referenced to decode the current block in the BC prediction mode may consist of at least one of the positions (xCb-1, yCb+cbHeight-1) and (xCb+cbWidth-1, yCb-1) when the topmost and leftmost position of the current block is (xCb, yCb), where cbWidth is the width of the current block and cbHeight is the height of the current block.

[0016] The determining the prediction mode of the current block may include obtaining a BC mode parameter (pred_mode_bc_flag) indicating whether the prediction mode of the current block is a BC prediction mode from a bitstream, and determining the prediction mode of the current block as the BC prediction mode based on the BC mode parameter. Here, the BC mode parameter may be denoted as pred_mode_ibc_flag if the BC mode is called an IBC mode.

[0017] If the BC mode parameter is not obtained from the bitstream, and if a parallel processing unit to which the current block belongs does not refer to a picture other than the current picture as a reference picture, and if signaling information (sps_bc_enabled_flag) at a higher level than the current block indicates the use of the BC prediction mode, the value of the BC mode parameter may be determined to be a value indicating the use of the BC prediction mode. Here, if the BC mode is named IBC mode, the signaling information (sps_bc_enabled_flag) at the higher level may be expressed as sps_ibc_enabled_flag.

[0018] If the BC mode parameter is not obtained from the bitstream, and the slice to which the current block belongs is a slice that does not reference a picture other than the current picture as a reference picture, and signaling information (sps_bc_enabled_flag) at a level higher than the current block indicates that BC prediction mode is available, the value of the BC mode parameter may be determined to be a value indicating that BC prediction mode is used.

[0019] If the BC mode parameter is not obtained from the bitstream, and the parallel processing unit to which the current block belongs is a unit that can reference a picture other than the current picture as a reference picture, the value of the BC mode parameter may be determined to be a value indicating that BC prediction mode is not used.

[0020] If the BC mode parameter is not obtained from the bitstream, and the slice to which the current block belongs is a slice that can reference a picture other than the current picture as a reference picture, the value of the BC mode parameter may be determined to be a value indicating that BC prediction mode is not used.

[0021] The step of determining the prediction mode of the current block may include a step of obtaining a prediction mode parameter (pred_mode_flag) indicating the prediction mode of the current block from the bitstream before obtaining a BC mode parameter indicating whether the prediction mode of the current block is a BC prediction mode from the bitstream.

[0022] If the prediction mode parameter is not obtained from the bitstream, the prediction mode parameter may be determined to be a value indicating an intra prediction mode if the parallel processing unit to which the current block belongs is a unit that does not reference a picture other than the current picture as a reference picture.

[0023] If the prediction mode parameter is not obtained from the bitstream, the prediction mode parameter may be determined to be a value indicating inter prediction mode if the parallel processing unit to which the current block belongs is a unit that can reference a picture other than the current picture as a reference picture.

[0024] The determining the prediction mode of the current block may include obtaining, from a bitstream, a BC mode parameter indicating whether the prediction mode of the current block is a BC prediction mode. If the BC mode parameter is not obtained from the bitstream, and coding tree type information (treeType) indicating division of the current block is DUAL_TREE_CHROMA indicating a chroma component, a value of the BC mode parameter may be determined to be a value indicating that the BC prediction mode is not used.

[0025] The step of determining the prediction mode of the current block includes a step of obtaining a prediction mode parameter indicating the prediction mode of the current block from a bitstream, and if the prediction mode parameter is not obtained from the bitstream, the size of the current block does not correspond to a block size that is pre-set as a block size to which inter prediction is restricted, and the parallel processing unit to which the current block belongs is a unit that can reference a picture other than the current picture as a reference picture, the prediction mode parameter may be determined to be a value indicating inter prediction.

[0026] The step of determining the prediction mode of the current block includes a step of obtaining a BC mode parameter indicating whether the prediction mode of the current block is a BC prediction mode from a bitstream, and if the BC mode parameter is not obtained from the bitstream, the parameter indicating whether the current block is in a skip mode indicates that it is in a skip mode, and if the size of the current block corresponds to a block size that is preset as a block size to which inter prediction is restricted, the value of the BC mode parameter may be determined to be a value indicating that the BC prediction mode is used.

[0027] If the BC mode parameter is not obtained from the bitstream, if the parameter indicating whether the current block is in skip mode does not indicate skip mode, if the size of the current block does not correspond to a block size preset as a block size to which inter prediction is restricted, and if the parallel processing unit to which the current block belongs is a unit that can reference a picture other than the current picture as a reference picture, the value of the BC mode parameter may be determined to be a value indicating that BC is not used.

[0028] The step of determining the prediction mode of the current block may include a step of obtaining a prediction mode parameter indicating the prediction mode of the current block from the bitstream before obtaining a BC mode parameter indicating whether the prediction mode of the current block is a BC prediction mode from the bitstream, and if the prediction mode parameter is not obtained from the bitstream, the prediction mode parameter may be determined to be a value indicating intra prediction if the size of the current block corresponds to a block size that is pre-set as a block size to which inter prediction is restricted.

[0029] The step of decoding the current block based on the inter prediction mode includes the steps of: obtaining an inter prediction type parameter (inter_pred_idc) indicating the inter prediction type of the current block from a bitstream; and determining a reference list of the current block based on the size of the current block and the inter prediction type parameter, wherein if the sum of the width and height of the current block is greater than 12, the inter prediction type parameter may indicate at least one of an L0 reference list and an L1 reference list, and if the sum of the width and height of the current block is 12, the inter prediction type parameter may indicate either an L0 reference list or an L1 reference list.

[0030] If the sum of the width and height of the current block is greater than 12, bit signaling 00 of the inter prediction type parameter may indicate an L0 reference list, bit signaling 01 may indicate an L1 reference list, and bit signaling 1 may indicate both an L0 reference list and an L1 reference list.

[0031] Also, according to one embodiment of the present invention, a video signal processing method is provided, which includes: determining a prediction mode of a current block; if the prediction mode of the current block is a BC (block copy) prediction mode that references a current picture, generating a bitstream for encoding the current block based on the BC prediction mode; and if the prediction mode of the current block is an inter prediction mode that references at least one picture, generating a bitstream for encoding the current block based on the inter prediction mode, wherein a set of spatial neighbor positions referenced for encoding the current block in the BC prediction mode includes a portion of a set of spatial neighbor positions referenced for encoding the current block in the inter prediction mode.

[0032] Also, according to one embodiment of the present invention, there is provided a video signal processing device including a processor, wherein the processor determines a prediction mode of a current block, and if the prediction mode of the current block is a BC (block copy) prediction mode that references a current picture, decodes the current block based on the BC prediction mode, and if the prediction mode of the current block is an inter prediction mode that references at least one picture, decodes the current block based on the inter prediction mode, and a set of spatial neighbor positions referenced to decode the current block in the BC prediction mode includes a portion of a set of spatial neighbor positions referenced to decode the current block in the inter prediction mode.

[0033] The set of spatial neighbor positions referenced to decode the current block in the inter prediction mode may include the (xCb-1, yCb-1) position when the topmost and leftmost position of the current block is (xCb, yCb), and the set of spatial neighbor positions referenced to decode the current block in the BC prediction mode may not include the (xCb-1, yCb-1) position when the topmost and leftmost position of the current block is (xCb, yCb).

[0034] The set of spatial neighbor positions referenced to decode the current block in the BC prediction mode may consist of at least one of the positions (xCb-1, yCb+cbHeight-1) and (xCb+cbWidth-1, yCb-1) when the topmost and leftmost position of the current block is (xCb, yCb), where cbWidth is the width of the current block and cbHeight is the height of the current block.

[0035] The processor may obtain a BC mode parameter indicating whether the prediction mode of the current block is a BC prediction mode from a bitstream, and may determine the prediction mode of the current block to be the BC prediction mode based on the BC mode parameter.

[0036] If the BC mode parameter is not obtained from the bitstream, the parallel processing unit to which the current block belongs is a unit that does not reference a picture other than the current picture as a reference picture, and signaling information (sps_bc_enabled_flag) at a level higher than the current block indicates that BC prediction mode is used, the value of the BC mode parameter may be determined to be a value indicating that BC prediction mode is used.

[0037] If the BC mode parameter is not obtained from the bitstream, and the slice to which the current block belongs is a slice that does not reference a picture other than the current picture as a reference picture, and signaling information (sps_bc_enabled_flag) at a level higher than the current block indicates that BC prediction mode is available, the value of the BC mode parameter may be determined to be a value indicating that BC prediction mode is used.

[0038] If the BC mode parameter is not obtained from the bitstream and the parallel processing unit to which the current block belongs is a unit that can reference a picture other than the current picture as a reference picture, the value of the BC mode parameter may be determined to be a value indicating that BC prediction mode is not used.

[0039] If the BC mode parameter is not obtained from the bitstream, and the slice to which the current block belongs is a slice that can reference a picture other than the current picture as a reference picture, the value of the BC mode parameter may be determined to be a value indicating that BC prediction mode is not used.

[0040] Before obtaining a BC mode parameter indicating whether the prediction mode of the current block is a BC prediction mode from the bitstream, the processor may obtain a prediction mode parameter indicating the prediction mode of the current block from the bitstream. If the prediction mode parameter is not obtained from the bitstream and the parallel processing unit to which the current block belongs is a unit that does not reference a picture other than the current picture as a reference picture, the prediction mode parameter may be determined to be a value indicating an intra prediction mode. If the prediction mode parameter is not obtained from the bitstream and the parallel processing unit to which the current block belongs is a unit that can reference a picture other than the current picture as a reference picture, the prediction mode parameter may be determined to be a value indicating an inter prediction mode.

[0041] The processor may acquire, from a bitstream, a BC mode parameter indicating whether the prediction mode of the current block is a BC prediction mode. If the BC mode parameter is not acquired from the bitstream and coding tree type information (treeType) indicating division of the current block is DUAL_TREE_CHROMA indicating a chroma component, the value of the BC mode parameter may be determined to be a value indicating that the BC prediction mode is not used.

[0042] The processor may acquire, from a bitstream, a prediction mode parameter indicating a prediction mode of the current block. If the prediction mode parameter is not acquired from the bitstream, the size of the current block does not correspond to a block size preset as a block size to which inter prediction is restricted, and a parallel processing unit to which the current block belongs is a unit that can refer to a picture other than the current picture as a reference picture, the prediction mode parameter may be determined to be a value indicating inter prediction.

[0043] The processor may acquire a BC mode parameter indicating whether the prediction mode of the current block is BC prediction mode from the bitstream, and if the BC mode parameter is not acquired from the bitstream and the parameter indicating whether the current block is in skip mode indicates skip mode, and the size of the current block corresponds to a block size that is preset as a block size to which inter prediction is restricted, the value of the BC mode parameter may be determined to be a value indicating the use of BC prediction mode.

[0044] If the BC mode parameter is not obtained from the bitstream, the parameter indicating whether the current block is in skip mode does not indicate skip mode, the size of the current block does not correspond to a block size that is pre-set as a block size to which inter prediction is restricted, and the parallel processing unit to which the current block belongs is a unit that can reference a picture other than the current picture as a reference picture, the value of the BC mode parameter may be determined to be a value indicating that BC is not used.

[0045] Also, according to one embodiment of the present invention, there is provided a video signal processing device including a processor, wherein the processor determines a prediction mode of a current block, and if the prediction mode of the current block is a BC (block copy) prediction mode that references a current picture, generates a bitstream for encoding the current block based on the BC prediction mode, and if the prediction mode of the current block is an inter prediction mode that references at least one picture, generates a bitstream for encoding the current block based on the inter prediction mode, and a set of spatial neighbor positions referenced to encode the current block in the BC prediction mode includes a portion of a set of spatial neighbor positions referenced to encode the current block in the inter prediction mode.

[0046] The processor may obtain a prediction mode parameter indicating the prediction mode of the current block from the bitstream before obtaining a BC mode parameter indicating whether the prediction mode of the current block is a BC prediction mode from the bitstream, and if the prediction mode parameter is not obtained from the bitstream, the prediction mode parameter may be determined to be a value indicating intra prediction if the size of the current block corresponds to a block size that is pre-set as a block size to which inter prediction is restricted.

[0047] The processor obtains an inter-prediction type parameter indicating an inter-prediction type of the current block from the bitstream, and determines a reference list for the current block based on the size of the current block and the inter-prediction type parameter. If the sum of the width and height of the current block is greater than 12, the inter-prediction type parameter may indicate at least one of an L0 reference list and an L1 reference list. If the sum of the width and height of the current block is 12, the inter-prediction type parameter may indicate either an L0 reference list or an L1 reference list.

[0048] If the sum of the width and height of the current block is greater than 12, bit signaling 00 of the inter prediction type parameter may indicate an L0 reference list, bit signaling 01 may indicate an L1 reference list, and bit signaling 1 may indicate both an L0 reference list and an L1 reference list.

[0049] Also, according to one embodiment of the present invention, a computer-readable recording medium is provided that stores a bitstream for video signal processing, the bitstream including prediction mode information of a current block, and if the prediction mode of the current block is a BC (block copy) prediction mode that references a current picture, including a bitstream for encoding the current block based on the BC prediction mode, and if the prediction mode of the current block is an inter prediction mode that references at least one picture, including a bitstream for encoding the current block based on the inter prediction mode, and the set of spatial neighbor positions referenced to encode the current block in the BC prediction mode includes a portion of the set of spatial neighbor positions referenced to encode the current block in the inter prediction mode.

[0050] [Example]

[0051] The terms used in this specification are generally used as widely as possible while taking into consideration the functions of the present invention, but these may vary depending on the intentions of engineers in the field, customs, or the emergence of new technologies. In addition, in certain cases, the applicant may have arbitrarily selected terms, and in such cases, the meanings of these terms will be described in the relevant mode for carrying out the invention. Therefore, it is made clear that the terms used in this specification should be interpreted not simply as terms, but based on the substantive meanings of the terms and the overall content of this specification.

[0052] In this specification, some terms may be interpreted as follows. "Coding" may be interpreted as "encoding" or "decoding" in some cases. In this specification, a device that encodes a video signal to generate a video signal bitstream is referred to as an encoding device or encoder, and a device that decodes a video signal bitstream to restore a video signal is referred to as a decoding device or decoder. In this specification, "video signal processing device" is used as a conceptual term that encompasses both an encoder and a decoder. "Information" is a term that encompasses values, parameters, coefficients, elements, etc., and may be interpreted differently in some cases, so the present invention is not limited thereto. "Unit" refers to a basic unit of image processing or a specific location in a picture, and refers to an image region that includes both luma and chroma components. "Block" refers to an image region that includes specific components of luminance and color difference components (i.e., Cb and Cr). However, depending on the embodiment, terms such as "unit," "block," "partition," and "region" may be used interchangeably. In this specification, the term "unit" is used as a concept including a coding unit, a prediction unit, and a transform unit, and the term "picture" refers to a field or a frame, and these terms may be used interchangeably depending on the embodiment.

[0053] 1 is a schematic block diagram of a video signal encoding apparatus 100 according to an embodiment of the present invention. Referring to FIG. 1, the encoding apparatus 100 of the present specification includes a transform unit 110, a quantization unit 115, an inverse quantization unit 120, an inverse transform unit 125, a filtering unit 130, a prediction unit 150, and an entropy coding unit 160.

[0054] The transform unit 110 transforms a residual signal, which is the difference between the input video signal and the prediction signal generated by the prediction unit 150, to obtain a transform coefficient value. For example, a discrete cosine transform (DCT), a discrete sine transform (DST), or a wavelet transform may be used. The discrete cosine transform and the discrete sine transform divide the input picture signal into blocks and then transform the block. During the transform, coding efficiency may vary depending on the distribution and characteristics of values ​​within the transform domain. The quantization unit 115 quantizes the transform coefficient values ​​output from the transform unit 110.

[0055] To improve coding efficiency, instead of directly coding the picture signal, the prediction unit 150 predicts a picture using a pre-coded region and adds the residual value between the original picture and the predicted picture to obtain a reconstructed picture. To avoid mismatch between the encoder and decoder, the encoder should use information available to the decoder when making predictions. To achieve this, the encoder performs a process of further reconstructing the coded current block. The inverse quantization unit 120 inversely quantizes the transform coefficient values, and the inverse transform unit 125 reconstructs the residual values ​​using the inversely quantized transform coefficient values. Meanwhile, the filtering unit 130 performs filtering operations to improve the quality of the reconstructed picture and the coding efficiency. For example, the filtering unit 130 may include a deblocking filter, a sample adaptive offset (SAO), an adaptive loop filter, etc. The filtered picture is stored in the decoded picture buffer (DPB) 156 for output or use as a reference picture.

[0056] The prediction unit 150 includes an intra prediction unit 152 and an inter prediction unit 154. The intra prediction unit 152 performs intra prediction within the current picture, and the inter prediction unit 154 performs inter prediction, predicting the current picture using a reference buffer stored in the decoded picture buffer 156. The intra prediction unit 152 performs intra prediction from reconstructed samples within the current picture and transmits intra coding information to the entropy coding unit 160. The intra coding information includes at least one of an intra prediction mode, an MPM (Most Probable Mode) flag, and an MPM index. The intra coding information includes information about reference samples. The inter prediction unit 154 includes a motion estimation unit 154a and a motion compensation unit 154b. The motion estimation unit 154a obtains motion vector values ​​for the current region by referring to a specific region of the reconstructed reference signal picture. The motion estimation unit 154a transmits motion information (reference picture index, motion vector information) for the reference region to the entropy coding unit 160. The motion compensation unit 154b performs motion compensation using the motion vector values ​​received from the motion compensation unit 154a. The inter prediction unit 154 transmits inter coding information including motion information for the reference region to the entropy coding unit 160.

[0057] After the picture prediction is performed, the transform unit 110 converts residual values ​​between the original picture and the predicted picture to obtain transform coefficient values. The transform is performed in units of specific blocks within the picture, and the size of the specific blocks varies within a predetermined range. The quantization unit 115 quantizes the transform coefficient values ​​generated by the transform unit 110 and transmits the quantized values ​​to the entropy coding unit 160.

[0058] The entropy coding unit 160 entropy codes the quantized transform coefficients, intra-coded information, and inter-coded information to generate a video signal bitstream. The entropy coding unit 160 uses a variable length coding (VLC) scheme and an arithmetic coding scheme. The VLC scheme converts input symbols into successive codewords, where the length of the codewords is variable. For example, frequently occurring symbols are represented by short codewords, and infrequently occurring symbols are represented by long codewords. Context-based adaptive variable length coding (CAVLC) is used as the variable length coding scheme. Arithmetic coding converts successive data symbols into a single prime number, and arithmetic coding obtains the optimal prime number bits required to represent each symbol. Context-based adaptive binary arithmetic coding (CABAC) is used as the arithmetic coding scheme.

[0059] The generated bitstream is encapsulated in Network Abstraction Layer (NAL) units as basic units. An NAL unit includes an integer number of coded coding tree units. In order for a video decoder to decode the bitstream, the bitstream must first be separated into NAL units and then each separated NAL unit must be decoded. Meanwhile, information required for decoding the video signal bitstream is transmitted via Raw Byte Sequence Payload (RBSP) of higher level sets such as a Picture Parameter Set (PPS), a Sequence Parameter Set (SPS), and a Video Parameter Set (VPS).

[0060] 1 illustrates an encoding device 100 according to one embodiment of the present invention, with separate blocks illustrating logically distinct elements of encoding device 100. Therefore, the elements of encoding device 100 described above may be implemented on a single chip or multiple chips depending on the device design. According to one embodiment, the operation of each element of encoding device 100 described above is performed by a processor (not shown).

[0061] 2 is a schematic block diagram of a video signal decoding apparatus 200 according to an embodiment of the present invention. Referring to FIG. 2, the decoding apparatus 200 of the present invention includes an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 225, a filtering unit 230, and a prediction unit 250.

[0062] The entropy decoding unit 210 entropy decodes the video signal bitstream to extract transform coefficients, intra-coding information, inter-coding information, etc. for each region. The inverse quantization unit 220 inverse quantizes the entropy-decoded transform coefficients, and the inverse transform unit 225 restores residual values ​​using the inversely quantized transform coefficients. The video signal processing device 200 restores original pixel values ​​by combining the residual values ​​obtained from the inverse transform unit 225 with predicted values ​​obtained from the prediction unit 250.

[0063] Meanwhile, the filtering unit 230 performs filtering on the picture to improve image quality. This includes a deblocking filter to reduce block distortion and / or an adaptive loop filter to remove distortion from the entire picture. The filtered picture is output or stored in the decoded picture buffer (DPB) 256 to be used as a reference picture for the next picture.

[0064] The prediction unit 250 includes an intra prediction unit 252 and an inter prediction unit 254. The prediction unit 250 generates a predicted picture using the coding type, transform coefficients for each region, intra / inter coding information, etc. decoded by the entropy decoding unit 210. To reconstruct the current block to be decoded, the current picture including the current block or a decoded region of another picture can be used. A picture (or tile / slice) that uses only the current picture for reconstruction, i.e., performs only intra prediction, is called an intra picture or I picture (or tile / slice), and a picture (or tile / slice) that can perform both intra prediction and inter prediction is called an inter picture (or tile / slice). Among interpictures (or tiles / slices), a picture (or tile / slice) that uses at most one motion vector and reference picture index to predict sample values ​​for each block is called a predictive picture or P picture (or tile / slice), and a picture (or tile / slice) that uses at most two motion vectors and reference picture indexes is called a bi-predictive picture or B picture (or tile / slice). In other words, a P picture (or tile / slice) uses at most one motion information set to predict each block, and a B picture (or tile / slice) uses at most two motion information sets to predict each block. Here, a motion information set includes one or more motion vectors and one reference picture index.

[0065] The intra prediction unit 252 generates a predicted block using intra coding information and reconstructed samples in the current picture. As described above, the intra coding information includes at least one of an intra prediction mode, a Most Probable Mode (MPM) flag, and an MPM index. The intra prediction unit 252 predicts pixel values ​​of the current block using reconstructed pixels located to the left and / or above the current block as reference pixels. According to one embodiment, the reference pixels may be pixels adjacent to the left boundary and / or pixels adjacent to the top boundary of the current block. According to another embodiment, the reference pixels may be pixels of neighboring blocks of the current block that are adjacent to the left boundary of the current block within a predetermined distance from the left boundary of the current block and / or pixels adjacent to the top boundary of the current block within a predetermined distance from the top boundary of the current block. In this case, the neighboring blocks of the current block may include at least one of a left (L) block, an upper (A) block, a below left (BL) block, an above right (AR) block, or an above left (AL) block adjacent to the current block.

[0066] The inter prediction unit 254 generates a prediction block using reference pictures and inter coding information stored in the decoded picture buffer 256. The inter coding information includes motion information (e.g., reference picture index, motion vector, etc.) of the current block relative to the reference block. Inter prediction includes L0 prediction, L1 prediction, and bi-prediction. L0 prediction is prediction using one reference picture included in the L0 picture list, and L1 prediction is prediction using one reference picture included in the L1 picture list. This requires one set of motion information (e.g., motion vector and reference picture index). The bi-prediction method uses up to two reference regions, and these two reference regions may exist in the same reference picture or in different pictures. That is, the bi-prediction method uses up to two sets of motion information (e.g., motion vector and reference picture index), and two motion vectors may correspond to the same reference picture index or different reference picture indexes. In this case, the reference picture may be displayed (or output) either temporally before or after the current picture. According to one embodiment, in a bi-predictive scheme, the two reference regions used may be regions selected from the L0 picture list and the L1 picture list, respectively.

[0067] The inter prediction unit 254 may obtain a reference block for the current block using a motion vector and a reference picture index. The reference block exists in a reference picture corresponding to the reference picture index. Furthermore, pixel values ​​of a block identified by the motion vector or their interpolated values ​​may be used as a predictor for the current block. For motion prediction with sub-pel pixel accuracy, for example, an 8-tab interpolation filter may be used for the luma signal and a 4-tab interpolation filter may be used for the chroma signal. However, the interpolation filters for sub-pel motion prediction are not limited thereto. In this way, the inter prediction unit 254 performs motion compensation, which predicts the texture of the current unit using motion information from a previously reconstructed picture.

[0068] A reconstructed video picture is generated by adding together the predicted value output from the intra prediction unit 252 or the inter prediction unit 254 and the residual value output from the inverse transform unit 225. That is, the video signal decoding apparatus 200 reconstructs a current block using the predicted block generated by the prediction unit 250 and the residual value obtained from the inverse transform unit 225.

[0069] 2 illustrates a decoding device 200 according to one embodiment of the present invention, with separate blocks logically separating elements of the decoding device 200. Thus, the elements of the decoding device 200 described above may be implemented on a single chip or multiple chips depending on the device design. According to one embodiment, the operation of each element of the decoding device 200 described above is performed by a processor (not shown).

[0070] FIG. 3 illustrates an embodiment in which coding tree units (CTUs) are divided into coding units (CUs) within a picture. During video signal coding, a picture is divided into a sequence of coding tree units (CTUs). A coding tree unit consists of an NXN block of luma samples and two blocks of corresponding chroma samples. In this case, the coding tree unit itself can be a coding unit. A coding unit refers to a basic unit for processing a picture during the above-mentioned video signal processing, i.e., intra / inter prediction, transform, quantization, and / or entropy coding. Within a picture, the size and shape of coding units are not constant. Coding units have a square or rectangular shape. A rectangular coding unit (or rectangular block) includes a vertical coding unit (or vertical block) and a horizontal coding unit (or horizontal block). In this specification, a vertical block is a block whose height is greater than its width, and a horizontal block is a block whose width is greater than its height. Although a non-square block refers to a rectangular block in this specification, the present invention is not limited thereto.

[0071] Referring to Figure 3, a coding tree unit is first divided into a quad tree (QT) structure. That is, in the quad tree structure, one node having a size of 2N x 2N is divided into four nodes having a size of N x N. In this specification, a quad tree is also referred to as a quaternary tree. The quad tree division is performed recursively, and all nodes do not need to be divided to the same depth.

[0072] Meanwhile, the leaf node of the above-mentioned quad tree is further divided into a multi-type tree (MTT) structure. According to an embodiment of the present invention, in the multi-type tree structure, one node is divided into a horizontally or vertically divided binary or ternary tree structure. That is, there are four division structures in the multi-type tree structure: vertical binary division, horizontal binary division, vertical ternary division, and horizontal ternary division. According to an embodiment of the present invention, in each of the tree structures, the width and height of the node are both powers of 2. For example, in a binary tree (BT) structure, a node of size 2N×2N is divided into two N×2N nodes by vertical binary division and into two 2N×N nodes by horizontal binary division. In addition, in a ternary tree (TT) structure, a node of size 2Nx2N is divided into (N / 2)x2N, Nx2N, and (N / 2)x2N nodes by vertical ternary division, and into 2Nx(N / 2), 2NxN, and 2Nx(N / 2) nodes by horizontal ternary division. Such multi-type tree division is performed recursively.

[0073] The leaf nodes of a multi-type tree can be coding units. If the coding unit is not too large compared to the maximum transform length, the coding unit is used as a unit of prediction and transformation without further division. Meanwhile, in the above-mentioned quad trees and multi-type trees, at least one of the following parameters is predefined or transmitted via the RBSP of a higher-level set such as a PPS, SPS, or VPS: 1) CTU size: the size of the root node of the quad tree; 2) minimum QT size (MinQtSize): the size of the minimum QT leaf node allowed; 3) maximum BT size (MaxBtSize): the size of the maximum BT root node allowed; 4) maximum TT size (MaxTtSize): the size of the maximum TT root node allowed; 5) maximum MTT depth (MaxMttDepth): the maximum allowed depth of MTT division from the QT leaf node; 6) minimum BT size (MinBtSize): the size of the minimum BT leaf node allowed; and 7) minimum TT size: the size of the minimum TT leaf node allowed.

[0074] 4 illustrates an embodiment of a method for signaling the splitting of a quadtree and a multi-type tree. Pre-set flags can be used to signal the splitting of the quadtree and multi-type tree. Referring to FIG. 4, at least one of a flag 'qt_split_flag' indicating whether to split a quadtree node, a flag 'mtt_split_flag' indicating whether to split a multi-type tree node, a flag 'mtt_split_vertical_flag' indicating the split direction of a multi-type tree node, and a flag 'mtt_split_binary_flag' indicating the split type of a multi-type tree node can be used.

[0075] According to an embodiment of the present invention, a coding tree unit is the root node of a quad tree and can be split into a quad tree structure first. In the quad tree structure, a 'qt_split_flag' is signaled for each node 'QT_node'. If the value of 'qt_split_flag' is 1, the corresponding node is split into four regular rectangular nodes, and if the value of 'qt_split_flag' is 0, the corresponding node becomes a leaf node 'QT_leaf_node' of the quad tree.

[0076] Each quadtree leaf node 'QT_leaf_node' can be further split into a multi-type tree structure. In a multi-type tree structure, 'mtt_split_flag' is signaled for each node 'MTT_node'. If 'mtt_split_flag' is set to 1, the node is split into multiple rectangular nodes, and if 'mtt_split_flag' is set to 0, the node becomes a leaf node 'MTT_leaf_node' of the multi-type tree. If a multi-type tree node 'MTT_node' is split into multiple rectangular nodes (i.e., if 'mtt_split_flag' is set to 1), 'mtt_split_vertical_flag' and 'mtt_split_binary_flag' can be additionally signaled for the node 'MTT_node'. If the value of 'mtt_split_vertical_flag' is 1, vertical split of node 'MTT_node' is indicated, and if the value of 'mtt_split_vertical_flag' is 0, horizontal split of node 'MTT_node' is indicated. Also, if the value of 'mtt_split_binary_flag' is 1, node 'MTT_node' is split into two rectangular nodes, and if the value of 'mtt_split_binary_flag' is 0, node 'MTT_node' is split into three rectangular nodes.

[0077] 5 and 6 illustrate an intra prediction method according to an embodiment of the present invention in more detail. As described above, the intra prediction unit predicts pixel values ​​of a current block using reconstructed pixels located to the left and / or above the current block as reference pixels.

[0078] First, FIG. 5 illustrates an example of reference samples used for predicting a current block in intra prediction mode. According to an example, the reference pixels may be pixels adjacent to the left boundary and / or the top boundary of the current block. As shown in FIG. 5, when the size of the current block is W×H and pixels of a single reference line adjacent to the current block are used for intra prediction, the reference pixels may be set using up to 2W+2H+1 neighboring pixels located to the left and / or top of the current block. Meanwhile, according to another example embodiment of the present invention, pixels of multiple reference lines may be used for intra prediction of the current block. The multiple reference lines may consist of n lines located within a predetermined range from the current block. According to an example embodiment, when pixels of multiple reference lines are used for intra prediction, separate index information indicating the lines to be set as reference pixels may be signaled. If at least some neighboring pixels used as reference pixels have not yet been restored, the intra prediction unit may obtain reference pixels by performing a reference sample padding process according to a predetermined rule. In addition, the intra prediction unit may perform a reference sample filtering process to reduce intra prediction errors. That is, the reference pixels may be obtained by filtering neighboring pixels and / or pixels obtained by the reference sample padding process. The intra prediction unit predicts pixels of the current block using the reference pixels obtained in this manner.

[0079] Next, FIG. 6 shows an example of prediction modes used for intra prediction. For intra prediction, intra prediction mode information indicating an intra prediction direction may be signaled. The intra prediction mode information indicates one of a plurality of intra prediction modes constituting an intra prediction mode set. If the current block is an intra prediction block, the decoder receives the intra prediction mode information of the current block from the bitstream. An intra prediction unit of the decoder performs intra prediction on the current block based on the extracted intra prediction mode information.

[0080] According to an embodiment of the present invention, the intra prediction mode set may include all intra prediction modes used in intra prediction (e.g., a total of 67 intra prediction modes). More specifically, the intra prediction mode set may include a planar mode, a DC mode, and a plurality of (e.g., 65) angle modes (i.e., directional modes). Each intra prediction mode may be represented by a pre-defined index (i.e., intra prediction mode index). For example, as shown in FIG. 6, an intra prediction mode index 0 indicates the planar mode, and an intra prediction mode index 1 indicates the DC mode. In addition, intra prediction mode indexes 2 to 66 may indicate different angle modes, respectively. The angle modes indicate different angles within a pre-defined angle range. For example, the angle modes may indicate angles within an angle range of 45 degrees to -135 degrees clockwise (i.e., a first angle range). The angle modes may be defined based on the 12 o'clock direction. In this case, intra-prediction mode index 2 indicates horizontal diagonal (HDIA) mode, intra-prediction mode index 18 indicates horizontal (HOR) mode, intra-prediction mode index 34 indicates diagonal (DIA) mode, intra-prediction mode index 50 indicates vertical (VER) mode, and intra-prediction mode index 66 indicates vertical diagonal (VDIA) mode.

[0081] Meanwhile, the preset angle range may be individually set according to the shape of the current block. For example, if the current block is a rectangular block, a wide angle mode indicating an angle greater than 45 degrees or less than -135 degrees in a clockwise direction may be additionally used. If the current block is a horizontal block, the angle mode may indicate an angle within an angle range of (45 + offset1) degrees to (-135 + offset1) degrees in a clockwise direction (i.e., a second angle range). In this case, angle modes 67 to 76 outside the first angle range may be additionally used. Also, if the current block is a vertical block, the angle mode may indicate an angle within an angle range of (45 - offset2) degrees to (-135 - offset2) degrees in a clockwise direction (i.e., a third angle range). In this case, angle modes -10 to -1 outside the first angle range may be additionally used. According to an embodiment of the present invention, the values ​​of offset1 and offset2 may be individually determined according to the ratio between the width and height of the rectangular block. Also, offset1 and offset2 may be positive numbers.

[0082] According to a further embodiment of the present invention, the plurality of angle modes constituting the intra prediction mode set may include a base angle mode and an extended angle mode, wherein the extended angle mode may be determined based on the base angle mode.

[0083] According to one embodiment, the basic angle mode may be a mode corresponding to an angle used in intra prediction of the existing High Efficiency Video Coding (HEVC) standard, and the extended angle mode may be a mode corresponding to an angle newly added in intra prediction of the next-generation video codec standard. More specifically, the basic angle mode may be an angle mode corresponding to one of the intra prediction modes {2, 4, 6, ..., 66}, and the extended angle mode may be an angle mode corresponding to one of the intra prediction modes {3, 5, 7, ..., 65}. That is, the extended angle mode may be an angle mode between the basic angle modes within a first angle range. Therefore, the angle indicated by the extended angle mode may be determined based on the angle indicated by the basic angle mode.

[0084] According to another embodiment, the base angle mode may be a mode corresponding to an angle within a pre-defined first angle range, and the extension angle mode may be a wide-angle mode outside the first angle range. That is, the base angle mode may be an angle mode corresponding to one of the intra-prediction modes {2, 3, 4, ..., 66}, and the extension angle mode may be an angle mode corresponding to one of the intra-prediction modes {-10, -9, ..., -1} and {67, 68, ..., 76}. The angle indicated by the extension angle mode may be determined to be the angle opposite to the angle indicated by the corresponding base angle mode. Therefore, the angle indicated by the extension angle mode may be determined based on the angle indicated by the base angle mode. However, the number of extension angle modes is not limited thereto, and additional extension angles may be defined depending on the size and / or shape of the current block. For example, the extension angle mode may be defined as an angle mode corresponding to one of the intra-prediction modes {-14, -13, ..., -1} and {67, 68, ..., 80}. Meanwhile, the total number of intra prediction modes included in the intra prediction mode set may vary depending on the configuration of the base angle mode and the extended angle mode.

[0085] In the above embodiment, the spacing between extension angle modes may be set based on the spacing between corresponding basic angle modes. For example, the spacing between extension angle modes {3, 5, 7, ..., 65} may be determined based on the spacing between corresponding basic angle modes {2, 4, 6, ..., 66}. Furthermore, the spacing between extension angle modes {-10, -9, ..., -1} may be determined based on the spacing between corresponding opposite basic angle modes {56, 57, ..., 65}, and the spacing between extension angle modes {67, 68, ..., 76} may be determined based on the spacing between corresponding opposite basic angle modes {3, 4, ..., 12}. The angular spacing between extension angle modes may be set to be the same as the angular spacing between corresponding basic angle modes. Furthermore, the number of extension angle modes in the intra prediction mode set may be set to be equal to or less than the number of basic angle modes.

[0086] According to an embodiment of the present invention, an extension angle mode may be signaled based on a base angle mode. For example, a wide angle mode (i.e., an extension angle mode) may replace at least one angle mode (i.e., a base angle mode) within a first angle range. The replaced base angle mode may be an angle mode corresponding to the opposite side of the wide angle mode. That is, the replaced base angle mode may correspond to an angle in the opposite direction to the angle indicated by the wide angle mode, or an angle separated from the opposite angle by a pre-set offset index. According to an embodiment of the present invention, the pre-set offset index is 1. An intra-prediction mode index corresponding to the replaced base angle mode may be re-mapped to the wide angle mode to signal the wide angle mode. For example, wide angle modes {-10, -9, ..., -1} may be signaled by intra-prediction mode indexes {57, 58, ..., 66}, respectively, and wide angle modes {67, 68, ..., 76} may be signaled by intra-prediction mode indexes {2, 3, ..., 11}, respectively. In this way, by having the intra prediction mode index for the base angular mode signal the extended angular mode, even if the angular mode configurations used for intra prediction of each block are different, the same set of intra prediction mode indexes can be used to signal the intra prediction mode, thereby minimizing signaling overhead due to changes in the intra prediction mode configuration.

[0087] Meanwhile, whether to use the extended angle mode may be determined based on at least one of the shape and size of the current block. According to one embodiment, if the size of the current block is larger than a predetermined size, the extended angle mode may be used for intra prediction of the current block, and if not, only the basic angle mode may be used for intra prediction of the current block. According to another embodiment, if the current block is a non-square block, the extended angle mode may be used for intra prediction of the current block, and if the current block is a square block, only the basic angle mode may be used for intra prediction of the current block.

[0088] The intra prediction unit determines reference pixels and / or interpolated reference pixels to be used for intra prediction of the current block based on intra prediction mode information of the current block. If the intra prediction mode index indicates a specific angle mode, reference pixels or interpolated reference pixels corresponding to the specific angle from the current pixel of the current block are used to predict the current pixel. Therefore, different sets of reference pixels and / or interpolated reference pixels may be used for intra prediction depending on the intra prediction mode. Once intra prediction of the current block is performed using the reference pixels and intra prediction mode information, the decoder restores pixel values ​​of the current block by combining the residual signal of the current block obtained from the inverse transform unit with the intra predicted value of the current block.

[0089] FIG. 7 is a diagram illustrating inter prediction according to an embodiment of the present invention.

[0090] As described above, when encoding or decoding a current picture or block, it can be predicted from other pictures or blocks. That is, it is possible to encode or decode based on similarity with other pictures or blocks. Similar parts of other pictures or blocks can be encoded or decoded using signaling that is omitted from the current picture or block, as will be further described below. Block-based prediction is possible.

[0091] Referring to FIG. 7, a reference picture is shown on the left and a current picture is shown on the right. The current picture or a portion of the current picture can be predicted using similarity with the reference picture or a portion of the reference picture. If the solid-line rectangle in the current picture in FIG. 7 is a block currently being encoded or decoded, the current block can be predicted from the dotted-line rectangle in the reference picture. Here, information indicating a block (reference block) to be referenced by the current block may be present, and this information may be directly signaled or generated by some convention to reduce signaling overhead. The information indicating the block to be referenced by the current block may include a motion vector. This may be a vector indicating the relative positions of the current block and the reference block within a picture. Referring to FIG. 7, the dotted-line portion of the reference picture is present, and the motion vector may be a vector indicating how the current block should move to move to the block to be referenced in the reference picture. That is, the block that appears when the current block is moved along the motion vector may be the part indicated by the dotted line in the current picture in Figure 7, and the position of this dotted line part within the picture may be the same as the reference block position of the reference picture.

[0092] Furthermore, the information indicating a block to be referenced by the current block may include information indicating a reference picture. The information indicating the reference picture may include a reference picture list and a reference picture index. The reference picture list is a list representing reference pictures, and a reference block in a reference picture included in the reference picture list can be used. That is, the current block can be predicted from a reference picture included in the reference picture list. Furthermore, the reference picture index may be an index for indicating a reference picture to be used.

[0093] FIG. 8 is a diagram illustrating a motion vector signaling method according to an embodiment of the present invention.

[0094] According to an embodiment of the present invention, a motion vector (MV) can be generated based on a motion vector predictor (MVP). For example, the MVP can be a motion vector as follows:

[0095] MV=MVP

[0096] As another example, the motion vector may be based on the motion vector difference (MVD), as follows: The MVD can be added to the MVP to indicate the exact motion vector.

[0097] MV=MVP+MVD

[0098] In addition, in video coding, motion vector information determined by an encoder can be transmitted to a decoder, and the decoder can generate motion vectors from the received motion vector information to determine a prediction block. For example, the motion vector information can include information about an MVP and an MVD. In this case, components of the motion vector information can differ depending on the mode. For example, in a merge mode, the motion vector information can include information about an MVP but not an MVD. As another example, in an advanced motion vector prediction (AMVP) mode, the motion vector information can include information about an MVP and an MVD.

[0099] To determine, transmit, and receive information about MVPs, the encoder and decoder can generate MVP candidates in the same way. For example, the encoder and decoder can generate the same MVP candidates in the same order. Then, the encoder transmits an index indicating the determined MVP from the generated MVP candidates to the decoder, and the decoder can know the determined MVP and MV based on this index.

[0100] The MVP candidate and the MVP candidate generation method may include spatial candidates, temporal candidates, etc. A spatial candidate may be a motion vector for a block at a certain position from the current block. For example, it may be a motion vector corresponding to a block or position adjacent or non-adjacent to the current block. A temporal candidate may be a motion vector corresponding to a block in the current picture and another picture. Alternatively, the MVP candidate may include an affine motion vector, ATMVP, STMVP, a combination of the above motion vectors, an average vector of the above motion vectors, a zero motion vector, etc.

[0101] In addition, the information indicating the reference picture may also be transmitted from the encoder to the decoder. Furthermore, when a reference picture corresponding to an MVP candidate does not correspond to the information indicating the reference picture, motion vector scaling may be performed. The motion vector scaling may be calculated based on the picture order count (POC) of the current picture, the POC of the reference picture of the current block, the POC of the reference picture of the MVP candidate, and the MVP candidate.

[0102] FIG. 9 is a diagram showing a motion vector difference (MVD) syntax according to an embodiment of the present invention.

[0103] The sign and absolute value of the MVD may be coded separately. That is, the sign and absolute value of the MVD may be separate syntaxes. The absolute value of the MVD may be coded directly or may be coded with a flag indicating whether the absolute value is greater than N, as shown in FIG. 9. If the absolute value is greater than N, the value (absolute value - N) may also be signaled. In the example of FIG. 9, abs_mvd_greater0_flag may be transmitted, and this flag may indicate whether the absolute value is greater than 0. If abs_mvd_greater0_flag indicates that the absolute value is not greater than 0, it can be determined that the absolute value is 0. If abs_mvd_greater0_flag indicates that the absolute value is greater than 0, an additional syntax may be present. For example, abs_mvd_greater1_flag may exist, and this flag may indicate whether the absolute value is greater than 1. If abs_mvd_greater1_flag indicates that the absolute value is not greater than 1, it may be determined that the absolute value is 1. If abs_mvd_greater1_flag indicates that the absolute value is greater than 1, additional syntax may exist. For example, abs_mvd_minus2 may exist, and this may be the value of (absolute value - 2). Since the absolute value is determined to be greater than 1 (as 2 or greater) from the aforementioned abs_mvd_greater0_flag and abs_mvd_greater1_flag, it indicates (absolute value - 2). This is because when abs_mvd_minus2 is binarized to a variable length, it can be signaled with fewer bits. For example, there are variable length binarization methods such as Exp-Golomb, truncated unary, truncated Rice, etc. Also, mvd_sign_flag may be a flag indicating the sign of MVD.

[0104] In this embodiment, the coding method has been explained using MVD, but information other than MVD can also be divided into signs and absolute values, and the absolute value can be coded as a flag indicating whether the absolute value is greater than a certain value and as the value obtained by subtracting the certain value from the absolute value.

[0105] 9, [0] and [1] can represent component indexes, for example, x-component and y-component.

[0106] 9, cpIdx may represent a control point index. The control point index may be an index corresponding to a control motion vector index in affine motion prediction. In addition, in prediction methods other than affine motion prediction, cpIdx may be used as a preset value, such as 0.

[0107] FIG. 10 is a diagram illustrating adaptive motion vector resolution (AMVR) signaling according to one embodiment of the present invention.

[0108] According to one embodiment of the present invention, the resolution at which a motion vector or MVD is indicated may vary. In other words, the resolution at which the motion vector or MVD is coded may vary. For example, the resolution may be indicated based on pixels (pels). For example, a motion vector or MVD may be signaled in units of 1 / 4 (quarter), 1 / 2 (half), 1 (integer), 2, or 4 pixels. For example, to indicate 16, a 1 / 4 unit may be coded as 64 (1 / 4*64=16), a 1 unit may be coded as 16 (1*16=16), or a 4 unit may be coded as 4 (4*4=16). That is, the value may be determined as follows:

[0109] valueDetermined=resolution*valuePerResolution

[0110] Here, valueDetermined may be a value to be transmitted, which in this embodiment may be a motion vector or MVD. Also, valuePerResolution may be a value indicating valueDetermined in [ / resolution] units.

[0111] In this case, if the value signaled as the motion vector or MVD is not divisible by the resolution, an inaccurate value may be sent instead of the motion vector or MVD with the best prediction performance due to rounding, etc. Using a higher resolution can reduce the inaccuracy, but may use more bits because the coded values ​​are large, while using a lower resolution can increase the inaccuracy, but may use fewer bits because the coded values ​​are small.

[0112] In addition, the resolution can be set individually for each unit such as block, CU, slice, etc. Therefore, an adaptive resolution can be applied according to the unit.

[0113] The resolution may be signaled from the encoder to the decoder. In this case, the signaling for the resolution may be the variable-length binarized signaling described above. In this case, if the signaling is performed using an index corresponding to the smallest value (the earliest value), signaling overhead can be reduced.

[0114] As an example, the signaling index can be matched in order from high resolution (more detailed signaling) to low resolution.

[0115] Figure 10 shows signaling for three resolutions. In this case, the three signalings can be 0, 10, and 11, and each of the three signalings can correspond to resolution 1, resolution 2, and resolution 3. Since one bit is required to signal resolution 1 and two bits are required to signal the remaining resolutions, there is less signaling overhead when signaling resolution 1. In the example of Figure 10, resolution 1, resolution 2, and resolution 3 are 1 / 4, 1, and 4 pixels, respectively.

[0116] In the following invention, motion vector resolution can mean the resolution of the MVD.

[0117] FIG. 11 is a diagram illustrating inter prediction related syntax according to an embodiment of the present invention.

[0118] According to an embodiment of the present invention, the inter prediction method may include a skip mode, a merge mode, an inter mode, etc. According to an embodiment, a residual signal may not be transmitted in the skip mode. Also, an MV determination method such as the merge mode may be used in the skip mode. Whether the skip mode is used may be determined by a skip flag. Referring to FIG. 11, whether the skip mode is used may be determined by a value of cu_skip_flag.

[0119] According to one embodiment, the merge mode does not require the use of MVD. A motion vector can be determined based on a motion candidate index. Whether the merge mode is used may be determined by a merge flag. Referring to FIG. 11, whether the merge mode is used may be determined by a merge_flag value. Also, the merge mode can be used when the skip mode is not used.

[0120] In skip mode or merge mode, one or more types of candidate lists may be selectively used. For example, merge candidates or subblock merge candidates may be used. Merge candidates may include spatial neighboring candidates, temporal candidates, etc. Merge candidates may include candidates that use a motion vector for the entire current block (CU). That is, candidates in which the motion vectors of each subblock belonging to the current block are the same may be included. Subblock merge candidates may include subblock-based temporal MVs, affine merge candidates, etc. Subblock merge candidates may include candidates that can use different motion vectors for each subblock of the current block (CU). Affine merge candidates may be created using a method of determining control point motion vectors for affine motion prediction without using MVD. Subblock merge candidates may include a method of determining motion vectors for each subblock of the current block. For example, the sub-block merging candidates may include planar MV, regression-based MV, STMVP, etc. in addition to the sub-block-based temporal MV and affine merging candidates mentioned above.

[0121] According to one embodiment, MVD can be used in inter mode. An MVP can be determined based on a motion candidate index, and a motion vector can be determined based on the MVP and MVD. Whether inter mode is used can be determined depending on whether other modes are used. As another example, whether inter mode is used can be determined by a flag. Figure 11 shows an example in which inter mode is used when other modes, such as skip mode and merge mode, are not used.

[0122] The inter mode may include an AMVP mode, an affine inter mode, etc. The inter mode may be a mode in which a motion vector is determined based on MVP and MVD. The affine inter mode may be a method in which MVD is used when determining a control point motion vector for affine motion prediction.

[0123] Referring to FIG. 11, after determining whether to use a subblock merge candidate or a merge candidate, it can be determined whether to use a subblock merge candidate or a merge candidate. For example, if a specific condition is met, a merge_subblock_flag indicating whether to use a subblock merge candidate can be parsed. The specific condition may be a condition related to block size. For example, the specific condition may be a condition related to width, height, area, etc., or a combination of these. Referring to FIG. 11, for example, the condition may be that the width and height of the current block (CU) are equal to or greater than a specific value. When parsing merge_subblock_flag, its value can be inferred as 0. If merge_subblock_flag is 1, a subblock merge candidate can be used, and if it is 0, a merge candidate can be used. When a subblock merge candidate is used, a candidate index, merge_subblock_idx, can be parsed, and when a merge candidate is used, a candidate index, merge_idx, can be parsed. In this case, if the maximum number of candidates in the candidate list is 1, parsing is not necessary. If merge_subblock_idx or merge_idx is not passed, it can be inferred to be 0.

[0124] FIG. 11 shows the coding_unit function, but the intra prediction related content may be omitted, and FIG. 11 may show the case where inter prediction is determined.

[0125] FIG. 12 is a diagram illustrating spatial neighbor locations according to one embodiment of the present invention.

[0126] As described above, neighboring positions of the current block may be referenced when making predictions. That is, motion information corresponding to neighboring positions of the current block may be referenced. For example, when using a merge mode or an AMVP mode, an MVP or MV may be set based on motion information corresponding to neighboring positions of the current block. The neighboring positions may be pre-set. Also, when there are multiple neighboring positions, the order in which they are referenced may be pre-set. Also, the neighboring positions may include spatial neighbors and temporal neighbors.

[0127] Referring to FIG. 12, positions corresponding to A0, A1, B0, B1, and B2 may be pre-set. The positions here may refer to luma positions. When the top-leftmost position of the current block is (xCb, yCb), A0, A1, B0, B1, and B2 may be (xCb-1, yCb+cbHeight), (xCb-1, yCb+cbHeight-1), (xCb+cbWidth, yCb-1), (xCb+cbWidth-1, yCb-1), and (xCb-1, yCb-1), respectively. In this case, cbWidth and cbHeight may be the width and height of the current block, respectively.

[0128] According to one embodiment of the present invention, in merge mode, spatial neighbors can be referenced in the order of A1, B1, B0, A0, B2. Spatial candidates corresponding to spatial neighbors can be added to a candidate list. In addition to spatial candidates, temporal candidates can be added, which may be located after the spatial candidates. A motion vector corresponding to a temporal candidate can be called a collocated motion vector.

[0129] Also, if the candidate list is not full, a zero motion vector can be added to the candidate list, which may be a motion vector whose motion vector indicates the current block position.

[0130] The merge candidate list may also include a history-based motion vector prediction candidate, a pairwise average candidate, etc., which may be located after the spatial candidates in the candidate list. The history-based motion vector prediction candidate may be stored motion information. The stored motion information may be motion information corresponding to a block decoded (encoded) before the current block. The pairwise average candidate may be a candidate generated based on candidates already added to the candidate list. For example, the pairwise average candidate may be an average of candidates already added to the candidate list.

[0131] The above-described process of adding a current block to a candidate list by referring to its neighboring positions may include a motion vector scaling process, which may be performed based on the picture order count (POC) of a reference picture of the referenced motion information, the POC of a picture including the current block, the POC of a reference picture of the current block, the referenced motion information, etc.

[0132] According to one embodiment of the present invention, a group can be set from pre-defined spatial neighboring positions. Also, a pre-defined number of pieces of motion information can be referenced from the group. For example, a pre-defined number of pieces of motion information can be referenced from group 1, and a pre-defined number of pieces of motion information can be referenced from group 2. For example, the pre-defined number of pieces of motion information can be 1. Also, a reference order within a group can be pre-defined. Also, a candidate addition order between groups can be pre-defined.

[0133] 12, group 1 may be A0, A1, and group 2 may be B0, B1, B2. Alternatively, candidates may be created from the motion information available in group 1, and candidates may be created from the motion information available in group 2. Alternatively, candidates from group 1 may be added to a candidate list, and candidates from group 2 may be added to the candidate list in order. For example, in AMVP mode, a candidate list may be created as described above.

[0134] Also, if the candidate list is not full, it is possible to add scaled candidates, temporal candidates, zero motion vectors, etc.

[0135] FIG. 13 is a diagram illustrating a current picture reference according to one embodiment of the present invention.

[0136] As described above, when predicting a current block, a block in a reference picture can be referenced. According to one embodiment of the present invention, the reference picture may be a picture including the current block, i.e., the current picture. Therefore, when predicting the current block, a block in the current picture can be referenced. Such a technique can be called CPR (current picture referencing).

[0137] According to one embodiment, when using CPR, the current picture may be the only reference picture, in which case signaling indicating the reference picture can be omitted and inferred.

[0138] According to an embodiment, when CPR is used, a motion vector indicating a reference block referenced by a current block may exist. According to an embodiment, when CPR is used, the position of the reference block may be restricted. For example, the position of the reference block may be restricted based on the position of the current block. For example, the position of the reference block may be restricted to within a CTU including the current block. Alternatively, the position of the reference block may be restricted to a position that includes at least a portion of the CTU including the current block. By restricting the position of the reference block, it is possible to reduce the memory burden.

[0139] According to an embodiment of the present invention, signaling may be provided to indicate whether or not a current block uses CPR. As an example, such signaling may be signaling for a larger unit including the current block. For example, signaling may be performed at a slice or tile level. For example, signaling may be performed at a level that allows parallel processing. As an example, CPR may be used when the reference picture referred to by the current block is the current picture. Alternatively, CPR may be used when the current picture is the only reference picture. Furthermore, CPR may be used when the current block is a block that does not use intra prediction. That is, for example, when the reference picture corresponding to the current block is the current picture, CPR may be used if intra prediction is not used. As an example, a variable CurrPicIsOnlyRef may indicate that the current picture is the only reference picture. Alternatively, the use of CPR may be performed when the reference picture is the current picture. Alternatively, using CPR may mean that the reference picture is the current picture and that intra prediction is not used.

[0140] According to one embodiment of the present invention, when using CPR, it is possible to indicate motion information using the merge mode, AMVP mode, etc., described above.

[0141] Furthermore, when CPR is used, the current slice or tile may be set to a P slice or P tile. Furthermore, when CPR is used, a flag indicating the use of a dual tree may be set to a value indicating the use of a dual tree. A dual tree may mean that a tree corresponding to luma and a tree corresponding to chroma may be different.

[0142] Referring to Figure 13, a current block represented by a solid line exists in the current picture. Also, a reference block represented by a dotted line exists in the current picture. In this case, motion information indicating the position of the reference block may exist. Referring to Figure 13, what is represented by an arrow may be motion information indicating the position of the reference block.

[0143] Also, according to one embodiment of the present invention, when CPR is used, the candidate list configuration may change, for example, when CPR is used, temporal candidates may not be included in the candidate list.

[0144] Furthermore, according to one embodiment of the present invention, when CPR is used, peripherally referenced motion information does not need to be scaled.

[0145] FIG. 14 is a diagram illustrating a method for referring to spatial neighbor candidates according to an embodiment of the present invention.

[0146] According to an embodiment of the present invention, when a current block uses CPR, a candidate list construction method may be different from when CPR is not used. For example, when a current block uses CPR, a method of adding spatial neighbor candidates may be different from when CPR is not used. For example, when a current block uses CPR, it may not be necessary to refer to motion information at positions beyond the possible range of a CPR reference block. Or, when a current block uses CPR, it may not be necessary to refer to motion information at positions beyond the possible range of a CPR reference block. The possible range of a CPR reference block may be the CTU range to which the current block belongs. Therefore, according to an embodiment of the present invention, it may not be necessary to refer to motion information at positions beyond the current CTU. For example, when the current block borders the possible range of a reference block, a previously set spatial neighbor position may fall outside the possible range of the reference block. In particular, referring to the previously set spatial neighbor positions of FIG. 12, when the current block borders the upper or left boundary of the possible range of a reference block, many previously set spatial neighbor positions may fall outside the possible range of the reference block.

[0147] Referring to FIG. 14, the position of the reference block may be limited to within the CTU. According to one embodiment, it is not necessary to refer to motion information from a position outside the range in which the reference block can be located. For example, if the current block is located at the boundary of the range in which the reference block can be located, the previously set spatial neighbor position may be outside the range in which the reference block can be located. In FIG. 14, the spatial neighbor positions already set around the current block are represented by small dotted rectangles. In this case, it can be determined that positions outside the CTU are unusable.

[0148] This is because, when a position beyond the possible range of a reference block is referenced, the range of motion information that the reference block of the current block or the reference block of the referenced position can have is narrow, so that the reference block of the current block or the referenced position does not exceed the limited range. For example, in FIG. 14, the reference block of a portion marked "not available" must not exceed the CTU to which it belongs. Also, in FIG. 14, the y component of the motion information of the referenced portion must be 0 so that the position indicated by the motion information of the portion marked "not available" does not exceed the possible range of the reference block of the current block. When the current block contacts the left boundary, the x component of the motion information of the referenced portion outside the boundary must be 0. Also, even if the x component or y component is 0 and the remaining components are not 0, the probability of the MVD being increased may be high if only one of the signs of a certain component (e.g., minus) is valid or if the sign is different from that sign due to the preset coding order.

[0149] To further explain this by taking the case where the reference block is limited to the inside of the current CTU, since only the inside of the CTU is used as a reference block, there will be little correlation between MVs. Also, if MVD correction is not possible, as in merge mode, if an MV outside the CTU has both x and y components, the reference block of the current block or a neighboring block will exceed the CTU range. For example, if the current block is on the boundary of the CTU, the current block or a neighboring block will exceed the CTU range if there is a y component of the MV of the upper block.

[0150] Since the entire slice is CPR, the surrounding blocks may also use intra or CPR.

[0151] If it is on a tile boundary (or in a slice that is not CPR), the surrounding MV may be an inter-VL that is not CPR. In that case, the surrounding MV may point to a distant location and may be outside the CTU. Also, since this surrounding MV points to a different picture, it may be less relevant.

[0152] Therefore, according to one embodiment of the present invention, it is possible to refer to motion information only if a spatial neighboring position referenced by a current block using CPR uses CPR, or if a spatial neighboring position referenced by a current block using CPR does not use CPR, it is possible not to refer to motion information from that position.

[0153] According to another embodiment, the motion information of the spatially adjacent position may be clipped to a range that the reference block corresponding to the current block can have before being referenced.

[0154] As in the embodiment of Figure 14, when the number of possible spatial neighboring positions is reduced, the total number of candidates can be reduced. In this case, it is possible to reduce the number of candidate index signaling. For example, if spatial neighboring candidates of already set positions and zero motion vectors can be added to the candidate list, or if i) spatial neighboring candidates of already set positions, ii) a limited number of HMVP candidates or pairwise average candidates, or iii) zero motion vectors can be added to the candidate list, reducing the number of possible spatial neighboring positions can reduce the number of possible candidates. In this case, the maximum value of the candidate index can be reduced, thereby reducing the number of bits when the index is binarized.

[0155] Alternatively, when reducing the number of possible spatial neighbor positions, as in the embodiment of FIG. 14, by allowing candidates that can be added after the spatial neighbor candidate to be added earlier in the candidate list, the number of bits corresponding to the candidate index can be reduced when using candidates that can be added after the spatial neighbor candidate.

[0156] FIG. 15 is a diagram illustrating block positions and a motion candidate list configuration according to an embodiment of the present invention.

[0157] According to an embodiment of the present invention, the number of possible candidates for referencing motion information at a previously set position may be reduced. For example, according to the situation described in FIG. 14, the number of possible spatial neighbor positions may be reduced. For example, if the current block is adjacent to the upper or left boundary of the range that the reference block can have, the number of possible candidates may be reduced. In this case, the decoder and encoder can determine that there is no candidate corresponding to the spatial neighbor without referring to the spatial neighbor to determine whether it is usable (e.g., without determining whether the spatial neighbor position uses intra prediction or inter prediction). In this case, the position in the candidate list where zero MV is placed may be moved forward.

[0158] Therefore, according to one embodiment of the present invention, it may be possible to determine whether a candidate index indicates zero motion vector (MV). For example, if some of the spatial neighbor positions are excluded based on the current block position and the range that can be referred to as neighbors, an index that is equal to or greater than the number of all remaining possible candidates may be a zero motion vector. For example, if a zero motion vector is added next to a spatial neighbor candidate, an index that is equal to or greater than the number of possible spatial neighbor candidates may be determined to be a zero motion vector. For example, if some of the spatial neighbor positions are excluded based on the current block position and the range that can be referred to as neighbors, and there are M remaining spatial neighbor positions, an index value starting from 0 with M may be determined to be a candidate to be added next to the spatial neighbor candidate, and if a zero motion vector appears next to a spatial neighbor candidate, it may be determined to be a zero motion vector.

[0159] For example, as in the case of the block marked A in FIG. 15, the current block may be adjacent to the left boundary of the range in which the reference block can be located. In this case, as described in FIG. 14, if the motion information for a position outside the range in which the reference block can be located is not referenced, the left position of the current block becomes unusable. Therefore, only positions excluding the left position can be used. Alternatively, in this case, as described in FIG. 14, if the motion information for a position outside the range in which the reference block can be located is not referenced, the A0, A1, and B2 positions described in FIG. 12 become unusable. Therefore, only B0 and B1 can be used. As an example, in merge mode, both B0 and B1 may be usable, and in AMVP mode, only one of B0 and B1 may be usable. Therefore, in merge mode, if the index is between 0 and 2, it can be determined that the candidate is the next spatial neighbor candidate. Also, in AMVP mode, if the index is between 0 and 1, it can be determined that the candidate is the next spatial neighbor candidate. That is, if a zero MV is located next to a spatial neighbor candidate, it can be determined that the zero MV is the zero MV based on the index.

[0160] Also, as in the case of the block marked B in FIG. 15, the current block may be adjacent to the upper boundary of the range in which the reference block can be located. In this case, as described in FIG. 14, if motion information for a position outside the range in which the reference block can be located is not referenced, the upper position of the current block becomes unusable. Therefore, only positions excluding the upper position of the current block can be used. Alternatively, in this case, if motion information for a position outside the range in which the reference block can be located is not referenced, as described in FIG. 14, the positions B0, B1, and B2 described in FIG. 12 become unusable. Therefore, only A0 and A1 can be used. As an example, in merge mode, both A0 and A1 may be usable, and in AMVP mode, only one of A0 and A1 may be usable. Therefore, in merge mode, if the index is 0 to 2, it can be determined that the candidate is the next spatial neighbor candidate. Also, in AMVP mode, if the index is 0 to 1, it can be determined that the candidate is the next spatial neighbor candidate. That is, when a zero MV comes next to a spatial neighbor candidate, it can be determined that the zero MV is present based on the index.

[0161] FIG. 15 illustrates the construction of an AMVP candidate list when the reference block position is limited to the range of the current CTU and motion information for positions outside the current CTU is not referenced. When the current block is adjacent to the left or top boundary of the CTU, as in A or B in FIG. 15, the maximum number of spatial neighbor candidates is one, and the remaining candidates can be filled with zero MV. For example, when constructing an AMVP candidate list, one of A0 and A1 and one of B0, B1, and B2 can be used as spatial neighbor candidates. Therefore, when the current block is adjacent to the left boundary, as in block A in FIG. 15, one of B0 and B1 can be used as a spatial neighbor candidate. When the current block is adjacent to the top boundary, as in block B in FIG. 15, one of A0 and A1 can be used as a spatial neighbor candidate. Therefore, when the candidate index is 1, it can be determined that the MVP is zero MV.

[0162] According to an embodiment of the present invention, if it is determined that a candidate index indicates zero MV, it is possible to perform the embodiments described in Figures 18 to 22. For example, it is possible to make changes to the MVD coding. For example, in certain cases, it is possible to determine the code of the MVD component without signaling transmission and syntax parsing.

[0163] FIG. 16 is a diagram illustrating block positions and a motion candidate list configuration according to an embodiment of the present invention.

[0164] According to one embodiment of the present invention, it is not necessary to refer to motion information at positions outside the picture, which may include both cases where CPR is used and cases where CPR is not used.

[0165] According to an embodiment of the present invention, the position of a reference block in CPR may be inside a picture, or may be in a region including the inside of a picture.

[0166] Referring to Figure 16, if the current block is adjacent to a picture boundary, the spatial neighboring position may be restricted. This means that motion information of a position outside the picture cannot be referenced. For example, if the current block is adjacent to the left boundary of the picture (block A in Figure 16), the left position of the current block cannot be referenced. Also, if the current block is adjacent to the top boundary of the picture (block B in Figure 16), the top position of the current block cannot be referenced.

[0167] Therefore, in this case, it is possible to reduce the maximum value of the binarization or determine that it is zero MV.

[0168] As mentioned above, if CPR is used, it is not necessary to use temporal candidates, scaled candidates, etc.

[0169] First, when using CPR and AMVP mode, if the current block is adjacent to a picture boundary, as in this embodiment, the available spatial neighbors may be limited. In particular, if the current block is adjacent to the left or top boundary, the motion information for the left and top positions of the current block, respectively, cannot be referenced. Therefore, when constructing an AMVP candidate list, the number of available spatial candidates can be limited to one. If the candidate index (which may be a flag if the maximum number of candidates is two) indicates a value of 1 (if the candidate index starts from 0), the motion vector corresponding to that candidate index can be determined to be a zero motion vector.

[0170] When using the merge mode, if the current block is adjacent to a picture boundary as in this embodiment, the available spatial neighbor positions may be limited. In particular, if the current block is adjacent to the left or top boundary, the motion information of the left and top positions of the current block cannot be referenced, respectively. Therefore, according to the embodiment of FIG. 12, the number of referenceable positions may be up to two. Therefore, if the number of merge candidate indexes is equal to or greater than the maximum number that can be referenced, the motion vector corresponding to the case where the number of referenceable merge candidate indexes is equal to or greater than the maximum number can be determined not to be from a spatial neighbor candidate.

[0171] If only spatial neighbor candidates and zero MV are used in a merge mode using CPR, the zero MV in the above case can be determined from the candidate index. However, since zero MV may be meaningless in CPR merge mode, the maximum value of the candidate index, which is a variable length, can be set to (the number of possible spatial neighbor candidates - 1). This allows the number of bits of a certain index value to be reduced.

[0172] As another example, in a merge mode using CPR, spatial neighbor candidates, HMVP candidates, and pairwise average candidates may be included in the candidate list. In this case, if the maximum possible number of spatial neighbor candidates is limited as in the above-described embodiment, the number of possible pairwise average candidates may also be reduced. This is because the number of combinations of spatial neighbor candidates may be reduced. For example, in the embodiments shown in FIGS. 12 and 16, if the number of possible spatial neighbor candidate positions is reduced to two, the number of possible pairwise average candidates may be reduced to one. Also, there may be pre-defined areas where the history storage space in HMVP is reset. For example, the history storage space in HMVP may be reset for each CTU row. This is to facilitate parallel processing because the encoder and decoder must be able to maintain the same history. Therefore, in pre-defined areas where the history storage space in HMVP is reset, HMVP candidates cannot be added to the candidate list. If CPR is used and the spatial neighbor positions are limited, resetting the history storage space in HMVP may further reduce the maximum possible number of candidates. For example, the number of spatial neighbors may be limited to a maximum of two at the left boundary of a picture, and the space for storing history in HMVP may be reset at the beginning of a CTU row. In this case, the candidate list may include a maximum of two spatial neighbor candidates, and may include HMVP candidates. Even if a pairwise average candidate can be added, only one combination is obtained when creating a pairwise average. Therefore, if a pairwise average candidate can be added, the number of candidates may be a maximum of three and a zero motion vector. In an embodiment in which a pairwise average candidate cannot be added, the number of candidates may be a maximum of two and a zero motion vector. This allows the maximum value of the candidate index to be reduced compared to the existing case, and the number of bits of the index can be reduced.

[0173] As yet another example, pairwise average candidates may not be used when CPR is used, as the number of useful motion vectors may be limited when CPR is used compared to when CPR is not used.

[0174] In yet another embodiment, if the current block is adjacent to the left boundary of the picture, an HMVP candidate may not be used. Alternatively, if the current block is adjacent to a boundary where the HMVP history is reset (e.g., the reset position is the same as the x coordinate of the left-top edge of the current block), an HMVP candidate may not be used. If the space storing the HMVP history is reset at the start of a CTU row, motion information may not be diverse in the history when coding the leftmost CTU of the picture. Therefore, for blocks adjacent to the left boundary of the picture, the x component of the motion vector must be 0 or positive. Also, since the motion vector direction stored in the history at this point is limited, it may be difficult to utilize blocks adjacent to the left boundary. Therefore, if the current block is adjacent to the left boundary of the picture, an HMVP candidate may not be used. In this case, when combined with the above embodiment, for blocks adjacent to the left boundary of the picture, it is possible to add up to two spatial neighbor candidates, up to one pairwise average candidate, and zero MV to the merge candidate list. Therefore, if zero MV can be added, the maximum index value can be binarized to 3 (if the index starts from 0), and if zero MV cannot be added, the maximum index value can be binarized to 2 (if the index starts from 0).

[0175] According to one embodiment of the present invention, whether a current block is adjacent to the left, right, top, or bottom boundary of a picture can be determined based on the coordinates of the current block, the width of the current block, the height of the current block, the width of the current picture, the height of the current picture, etc. The top-leftmost coordinates of the current block may be (x0, y0). The width and height of the current block may be cbWidth and cbHeight, respectively. The width and height of the current picture may be picWidth and picHeight, respectively. If (x0 == 0) is true, the current block may be adjacent to the left boundary of the picture. If ((x0 + cbWidth) == picWidth) is true, the current block may be adjacent to the right boundary of the picture. If (y0 == 0) is true, the current block may be adjacent to the top boundary of the picture. If ((y0 + cbHeight) == picHeight) is true, the current block may be adjacent to the bottom boundary of the picture.

[0176] Although the above description is based on the case where CPR is used, the above operation can be performed even without using CPR if a temporal motion vector cannot be used or if the reference picture of the surrounding block matches the reference picture of the current block.

[0177] FIG. 17 is a diagram illustrating the use of spatial neighbor candidates according to one embodiment of the present invention.

[0178] According to an embodiment of the present invention, there may be cases where a spatial neighbor position cannot be used. If a previously set position uses intra prediction, motion information may not be referenced from the corresponding position. Therefore, according to an embodiment of the present invention, the number of possible spatial neighbor candidates may be reduced depending on whether the previously set spatial neighbor position uses intra prediction. Alternatively, the number of possible spatial neighbor candidates may be reduced depending on whether the previously set spatial neighbor position uses inter prediction, which can be referenced. For example, the number of possible spatial neighbor candidates may be reduced depending on whether the previously set spatial neighbor position uses inter prediction using CPR.

[0179] For example, in the AMVP mode, there may be cases where all of the left positions among the spatial neighboring positions are intra-predicted, or all of the top positions are intra-predicted (this may be considered excluding portions outside the picture or positions that have not been decoded). Alternatively, there may be cases where all of the left positions among the spatial neighboring positions are not inter-predicted, or all of the top positions are not inter-predicted, which can be referenced (this may be considered excluding portions outside the picture or positions that have not been decoded). That is, there may be cases where motion information cannot be referenced for all of the left positions or all of the top positions. In this case, if only one of the left positions or the top positions is referable, the number of possible spatial neighbor candidates is 1, and if the index is 1, it can be determined that there is zero MV. Alternatively, if both the left positions and the top positions are not referable (for example, as shown in FIG. 17, if all of the previously set positions are intra-predicted), the number of possible spatial neighbor candidates is 0, and if the index is 0, it can be determined that there is zero MV. Alternatively, if neither the left position nor the top position can be referenced (for example, as shown in FIG. 17, if all the previously set positions are intra-predicted), the number of possible spatial neighbor candidates is 0, and index transmission and parsing can be omitted. Then, the index can be inferred as 0, i.e., zero MV.

[0180] As another example, if motion information cannot be referenced from a spatial neighboring position that has already been set, the position may be excluded in the syntax parsing step, thereby changing the maximum number of candidates. If motion information cannot be referenced, this may include a case where intra prediction is used for the position. Alternatively, if motion information cannot be referenced, this may include a case where the position is out of the picture or has not been decoded in the coding order.

[0181] If it is assumed that it is not possible to refer to all motion information at the positions already set in merge mode, it may not be possible to add a spatial neighbor candidate to the candidate list. Therefore, HMVP candidates, pairwise average candidates, etc. can be used as candidates. In this case, if the current block is located at a position where the space storing the HMVP history described in the previous figure is reset, the HMVP candidate may not be added. Also, if the pairwise average candidate comes before the HMVP candidate or if the HMVP candidate cannot be added, no pairwise average candidate will be found. Therefore, only zero MV remains as a possible candidate. However, zero MV may be meaningless in CPR. In this case, signaling indicating merge mode can be omitted (omitted transmission and parsing). It can then be inferred that merge mode is not being used. For example, signaling indicating merge mode may be merge_flag. Therefore, according to one embodiment of the present invention, when CPR is used, if all of the spatial neighboring positions already set around the current block are unusable (this may include when the corresponding positions are outside the picture, when the corresponding positions are intra-predicted, when the corresponding positions do not use CPR, etc.), and the current block is a position where the space for storing the HMVP history is reset, it can be inferred that the merge mode is not used by omitting signaling indicating the merge mode. The position where the space for storing the HMVP history is reset may be the position where the CTU row begins, or a position that has already been set as a position where no HMVP candidates are used.

[0182] As another example, there may be a case where motion information cannot be referenced at all but one of the spatial neighbor positions that have already been set. Examples of cases where motion information cannot be referenced include when the corresponding position is outside the picture, when intra prediction is performed at the corresponding position, and when CPR is not used at the corresponding position. In this case, as in the previous embodiment, a pairwise average candidate may not be created unless another candidate is added in addition to one spatial neighbor candidate. Furthermore, since the position where the HMVP history is stored is reset, an HMVP candidate may not be included. Therefore, the maximum value of the candidate index at such a position may be binarized differently from the existing value. For example, motion information cannot be referenced at all but one of the spatial neighbor positions that have already been set, and a maximum of one spatial neighbor candidate, zero HMVP candidates, and zero pairwise average candidates may be created at a position where the space where the HMVP history is stored is reset. Therefore, in an embodiment where zero MV can be added to a candidate, candidate index signaling is possible using a 1-bit flag. However, in this case, transmitting and parsing the candidate index may be omitted and the candidate index may be inferred as 0. This is because zero MV may be meaningless in CPR. Also, in embodiments where zero MV cannot be added to the candidates, only one candidate is possible, in which case it is possible to omit transmitting and parsing the candidate index and infer 0.

[0183] FIG. 18 is a diagram showing motion vectors according to an embodiment of the present invention.

[0184] According to an embodiment of the present invention, the values ​​that a motion vector can have may be restricted depending on the coding order. This may also be the case when CPR is used. For example, a motion vector may not point in a lower right direction depending on the coding order. This is because blocks to the right or below the current block would not have been decoded according to the block coding order. Therefore, according to an embodiment of the present invention, when CPR is used, the x component of a motion vector may not be greater than or equal to 0, and the y component may not be greater than or equal to 0. That is, when CPR is used, a motion vector may not be (x component >= 0 && y component >= 0).

[0185] Furthermore, according to the embodiments described with reference to FIGS. 14 to 17, there may be cases where the MVP is a zero MV. In particular, it may be determined that the MVP is a zero MV during syntax parsing. In this case, the MVD (MVD) does not need to indicate a bottom-right direction. That is, the MVD does not need to be (x component >= 0 && y component >= 0). In yet another embodiment, the MV does not need to be (x component > - (current block width) && y component > (-current block height)). That is, when a zero MV is used as the MVP, the MVD does not need to be (x component > - (current block width) && y component > (-current block height)). Therefore, according to one embodiment of the present invention, there may be cases where the range of the y component value can be limited by the x component value of the MV or MVD.

[0186] According to one embodiment, the components of the MVD can be coded separately. For example, the MVD can be coded as described in FIG. 9. For example, components 1 and 2 can be coded separately. Also, for example, components 1 and 2 can be coded in that order. In one embodiment, components 1 and 2 can be the x-component and y-component, respectively. The following example may be for the case where the MVP is zero MV.

[0187] According to one embodiment of the present invention, if component 1 is greater than 0, component 2 may be less than 0. More specifically, if component 1 is greater than 0, the absolute value of component 2 may be greater than or equal to the minimum block size. Also, if component 1 is greater than 0, the absolute value of component 2 may be greater than or equal to the current block height.

[0188] According to one embodiment of the present invention, if component 1 is 0, component 2 may not be 0. Also, if component 1 is 0, component 2 may be less than 0. More specifically, if component 1 is 0, the absolute value of component 2 may be equal to or greater than the minimum block size. Also, if component 1 is 0, the absolute value of component 2 may be equal to or greater than the current block height.

[0189] According to one embodiment of the present invention, when component 1 is less than 0 and its absolute value is less than the minimum block size, component 2 may not be 0. In this case, component 2 may be less than 0. More specifically, in this case, the absolute value of component 2 may be greater than or equal to the minimum block size. In this case, the absolute value of component 2 may be greater than or equal to the current block height.

[0190] According to one embodiment of the present invention, when component 1 is less than 0 and its absolute value is less than the current block width, component 2 may not be 0. In this case, component 2 may be less than 0. More specifically, in this case, the absolute value of component 2 may be greater than or equal to the minimum block size. In this case, the absolute value of component 2 may be greater than or equal to the current block height.

[0191] Referring to Figure 18, the x-component value of the MV in the current block may be as shown in the drawing. In this case, the reference block of the CPR may be placed in the shaded area in Figure 18. Therefore, the range of values ​​that the y-component may have may be limited. In other words, the value of the y-component may be limited by the x-component value.

[0192] FIG. 19 is a diagram illustrating MVD syntax according to one embodiment of the present invention.

[0193] As described in FIG. 9, MVD can be coded separately into an x-component and a y-component. Referring to FIG. 19, the values ​​corresponding to [0] and [1] may be the x-component and the y-component, respectively. Furthermore, abs_mvd_greater0_flag may be a flag indicating whether the absolute value of the component is greater than 0. Furthermore, abs_mvd_greater1_flag may be a flag indicating whether the absolute value of the component is greater than 1. Furthermore, abs_mvd_minus2 may be a value obtained by subtracting 2 from the absolute value of the component. Furthermore, mvd_sign_flag may be a flag indicating the sign of the component. Furthermore, a value of 0 for mvd_sign_flag may indicate a positive value, and a value of 1 may indicate a negative value.

[0194] The embodiment described in FIG. 18 can be reflected in the MVD coding syntax in FIG.

[0195] In Figure 19, the "zeroMVP" condition may indicate the case where MVP is zero MV, or may indicate the case where CPR is used. That is, when MVP is zero MV and CPR is used, zero MVP may be true. The condition for MVP being zero MV may follow the embodiments described with reference to Figures 14 to 17. According to the above embodiments, whether MVP is zero MV may be based on the position of the current block or the candidate index.

[0196] According to one embodiment of the present invention, in the case of a zero MVP, if the x-component is 0, the y-component does not have to be 0. Therefore, in this case, it is not necessary to parse abs_mvd_greater0_flag[1]. Also, in this case, it can be inferred that abs_mvd_greater0_flag[1] is a value indicating that it is not 0. Also, in this case, it can be inferred that abs_mvd_greater0_flag[1] is 1.

[0197] According to one embodiment of the present invention, in the case of a zero MVP, if the x-component is 0, the absolute value of the y-component may be greater than 1. This may be because the height of the current block is greater than 1. Therefore, in this case, it is not necessary to parse abs_mvd_greater1_flag[1]. Also, in this case, it is possible to infer that abs_mvd_greater1_flag[1] is a value indicating that the absolute value is greater than 1. Also, in this case, it is possible to infer that abs_mvd_greater1_flag[1] is 1. In existing MVD coding before the introduction of CPR, if abs_mvd_greater1_flag is not present, 0 is inferred. Therefore, by combining this embodiment with the present invention, if abs_mvd_greater1_flag is not present, the inferred value may be conditionally differentiated. For example, when abs_mvd_greater1_flag[compIdx] does not exist, if abs_mvd_greater0_flag[compIdx] is 0, it can be inferred as 0, and when abs_mvd_greater1_flag[compIdx] is 1, it can be inferred as 1. Or, for example, when abs_mvd_greater1_flag[compIdx] does not exist, if abs_mvd_greater0_flag[compIdx] is 0, it can be inferred as 0. Or, when abs_mvd_greater1_flag[compIdx] does not exist, it is a zero MVP, and if abs_mvd_greater0_flag[!compIdx] is 0, it can be inferred as 1.

[0198] According to one embodiment of the present invention, in the case of a zero MVP, if the x-component is a positive number or 0, the y-component may be a negative number. Therefore, in this case, it is not necessary to parse the mvd_sign_flag of the y-component. Also, in this case, it is possible to infer that mvd_sign_flag is a value indicating a negative number. In this case, it is possible to infer that mvd_sign_flag is 1. Therefore, in the case of a zero MVP and mvd_sign_flag[0] is 0, it is possible to infer that mvd_sign_flag[1] is 1 without parsing it. Also, in the case of a zero MVP and abs_mvd_greater0_flag[0] is 0, it is possible to infer that mvd_sign_flag[1] is 1 without parsing it.

[0199] Also, if mvd_sign_flag did not exist before the existence of CPR, it may have been inferred as 0. However, if mvd_sign_flag did not exist (see the embodiment of FIG. 9), the absolute value of the component would have been 0. Therefore, by combining with the embodiment of the present invention, it is possible to unify the inference to 1 when mvd_sign_flag does not exist. As another example, the value inferred for mvd_sign_flag may differ depending on the conditions. For example, if zero MVP && (mvd_sign_flag[0] == 0 || abs_mvd_greater0_flag[0] == 0), it can be inferred as 1, and otherwise it can be inferred as 0.

[0200] FIG. 20 is a diagram showing motion vectors according to an embodiment of the present invention.

[0201] According to an embodiment of the present invention, the values ​​that a motion vector can have may be limited depending on the range in which a reference block can be located. This may be the case when CPR is used. For example, a motion vector may be set so as not to deviate from the range in which a reference block can be located.

[0202] For example, if the current block is adjacent to the boundary of the range in which the reference block may be located, the motion vector may be in the opposite direction to the adjacent boundary. That is, if the current block is adjacent to the left or right boundary of the range in which the reference block may be located, the x-component may be greater than or equal to 0 and less than or equal to 0, respectively. Also, if the current block is adjacent to the top or bottom boundary of the range in which the reference block may be located, the y-component may be greater than or equal to 0 and less than or equal to 0, respectively. Also, as one embodiment, the range in which the reference block may be located may be the CTU range to which the current block belongs.

[0203] 14 to 17, there may be cases where the MVP is zero MV. In particular, the fact that the MVP is zero MV may be determined during the syntax parsing stage. In this case, the above discussion regarding motion vectors may apply to the MVD.

[0204] 20, the position of the reference block of the CPR may be limited to within the CTU to which the current block belongs. In this case, if the current block is adjacent to the left boundary as shown by A, the x-component of the motion vector may be greater than or equal to 0. Also, if the current block is adjacent to the top boundary as shown by B, the y-component of the motion vector may be greater than or equal to 0.

[0205] FIG. 21 is a diagram illustrating MVD syntax according to one embodiment of the present invention.

[0206] As described in FIG. 9, MVD can be coded separately into an x-component and a y-component. Referring to FIG. 21, the values ​​corresponding to [0] and [1] may be the x-component and the y-component, respectively. Furthermore, abs_mvd_greater0_flag may be a flag indicating whether the absolute value of the component is greater than 0. Furthermore, abs_mvd_greater1_flag may be a flag indicating whether the absolute value of the component is greater than 1. Furthermore, abs_mvd_minus2 may be a value obtained by subtracting 2 from the absolute value of the component. Furthermore, mvd_sign_flag may be a flag indicating the sign of the component. Furthermore, a value of 0 for mvd_sign_flag may indicate a positive value, and a value of 1 may indicate a negative value.

[0207] The embodiment described in FIG. 20 can be reflected in the MVD coding syntax in FIG.

[0208] In Figure 21, the "zeroMVP" condition may indicate the case where MVP is zero MV, or may indicate the case where CPR is used. That is, when MVP is zero MV and CPR is used, zero MVP may be true. The condition for MVP being zero MV may follow the embodiments described with reference to Figures 14 to 17. According to the above embodiments, whether MVP is zero MV may be based on the position of the current block or the candidate index.

[0209] Referring to FIG. 21, the conditions indicating adjacency to the left, right, top, and bottom boundaries are denoted as left_boundary, right_boundary, top_boundary, and bottom_boundary, respectively. Adjacency to a boundary can be determined based on the coordinates of the current block, the width of the current block, the height of the current block, the width of the range of possible positions of the reference block, and the height of the range of possible positions of the reference block. For example, the top-left coordinates of the current block can be denoted as (x0, y0). The width and height of the current block can be denoted as cbWidth and cbHeight, respectively. The width and height of the range of possible positions of the reference block can be denoted as rWidth and rHeight, respectively. For example, if (x0%rWidth==0) is true, it may be adjacent to the left boundary. If ((x0+cbWidth)%rWidth==0) is true, it may be adjacent to the right boundary. If (y0%rHeight==0) is true, it may be adjacent to the top boundary. If ((y0+cbHeight)%rHeight==0) is true, it may be adjacent to the bottom border. Also, according to one embodiment, rWidth and rHeight may be the CTU (CTB) width and height.

[0210] As explained in Figure 20, in the case of a zero MVP and adjacent to a boundary, the sign of the MVD may be determined. For example, in the case of a zero MVP and left_boundary, mvd_sign_flag[0] does not need to be parsed and can be inferred as a positive value (e.g., 0).

[0211] Also, if it is a zero MVP and right_boundary, mvd_sign_flag[0] does not need to be parsed and can be inferred to be a negative value (e.g., 1).

[0212] Also, in the case of a zero MVP and upper_boundary, mvd_sign_flag[1] does not need to be parsed and can be inferred to be a positive value (e.g., 0).

[0213] Also, if it is a zero MVP and lower_boundary, mvd_sign_flag[1] does not need to be parsed and can be inferred to be a negative value (e.g., 1).

[0214] 9, 19, and 21, abs_mvd_greater0_flag, abs_mvd_greater1_flag, abs_mvd_minus2, and mvd_sign_flag are coded in this order, but other embodiments can be implemented by changing this order. It is possible to infer a syntax without parsing it based on the current block position, the presence or absence of a zero MVP, the range in which the reference block may be located, other syntax values ​​that are already known, and so on.

[0215] FIG. 22 is a diagram illustrating MVD syntax according to one embodiment of the present invention.

[0216] Referring to Figure 22, the embodiments described in Figures 18 to 21 can be combined, thereby reducing the number of bits required for mvd_coding.

[0217] Also, according to one embodiment of the present invention, in the case of a zero MVP, once the absolute value of the MVD of a certain component is determined, the sign of the MVD can be determined without parsing so that the MVD value does not indicate a reference block that exceeds the possible range. For example, as in the embodiments of Figures 9, 19, and 21, the absolute value may be determined before determining the sign of the MVD. If the |MVD| of a certain component exceeds the possible range, the sign can be determined to be negative. Also, if the -|MVD| of a certain component exceeds the possible range, the sign can be determined to be positive.

[0218] FIG. 23 is a diagram showing blocks and sizes according to one embodiment of the present invention.

[0219] According to an embodiment of the present invention, the width or height of the current block may be the maximum width or maximum height. In this case, it may be impossible to reference motion information at a spatially adjacent position that has already been set. This may depend on the coding order. For example, if the width of the current block is the maximum width, it may be impossible to reference motion information from a position to the right of the current block. In the example of FIG. 12, it may be impossible to reference motion information from B0. As another example, if the height of the current block is the maximum height, it may be impossible to reference motion information from the bottom end of the current block. In the example of FIG. 12, it may be impossible to reference motion information from A0.

[0220] If the embodiment of Figure 23 is combined with the embodiment of Figure 14, the number of spatial neighboring positions for which motion information can be referenced can be reduced to one. For example, if the left boundary is adjacent and the maximum width is reached, motion information may not be referenced from A0, A1, B0, and B2 in Figure 12. Also, if the top boundary is adjacent and the maximum height is reached, motion information may not be referenced from A0, B0, B1, and B2. Therefore, since the number of possible spatial neighboring positions is reduced in this case, it is possible to implement embodiments such as determining zero MV, omitting candidate index parsing, or binarizing the maximum value of the candidate index to a smaller value, as in the previous embodiments.

[0221] FIG. 24 is a diagram showing the configuration of a merge candidate list according to an embodiment of the present invention.

[0222] According to one embodiment of the present invention, when CPR is used, the method of constructing a merge candidate list may be different from when CPR is not used. For example, some candidates that may be added to the merge candidate list when CPR is not used may not be added to the merge candidate list when CPR is used.

[0223] In one embodiment, zero MV may not be used when using CPR, since the reference block indicated by zero MV in the current picture can be the current block.

[0224] As an example, when CPR is used, temporal MV (collogated MV) does not need to be used because when CPR is used, pictures other than the current picture do not need to be referenced.

[0225] In one embodiment, when using CPR, HMVP or pairwise average candidates may not be used, in which case variations in index signaling are possible as described in the embodiments of the previous figures.

[0226] As an example, when using CPR, it is possible to use candidates based on HMVP or pairwise average candidates.

[0227] As an example, when CPR is used, the sub-block merging mode does not need to be used. The sub-block merging mode may be as described above. This allows the flag indicating the sub-block merging mode to be inferred without parsing when CPR is used.

[0228] According to an embodiment of the present invention, when CPR is used, a set of pre-established spatial neighboring positions may be different from a set of pre-established spatial neighboring positions when CPR is not used. According to an embodiment of the present invention, when CPR is used, one of B0 and B1 may not be used among the pre-established positions in FIG. 12. For example, when CPR is used, motion information may not be referenced from the B0 position. Alternatively, according to an embodiment of the present invention, when CPR is used, one of A0 and A1 may not be used among the pre-established positions in FIG. 12. For example, when CPR is used, motion information may not be referenced from the A0 position. This is because motion information when CPR is used is relatively complex and does not require various information. Alternatively, when CPR is used, motion information from nearby positions may be similar.

[0229] FIG. 25 is a diagram showing block positions and syntax according to one embodiment of the present invention.

[0230] According to one embodiment of the present invention, when CPR is used, zero MV does not need to be used as an MVP in AMVP mode. In this case, when combined with the embodiment of FIG. 15, only one spatial candidate may be added to the candidate list depending on the current block position. Also, if zero MV is not used as an MVP, only one candidate may exist in the MVP candidate list. In this case, there is no need to parse the candidate index. Also, in this case, the candidate index can be inferred as 0.

[0231] Referring to Figure 25, (a) shows a case where the current block is adjacent to the left or top boundary of the range of possible reference blocks. In this case, it is not necessary to refer to motion information from a position outside the range of possible reference blocks. In this case, when using AMVP mode, if zero MV is not used as the MVP, there can be a maximum of one MVP candidate. Therefore, in this case, as shown in (b) of Figure 25, it is not necessary to parse mvp_l0_flag and mvp_l1_flag, which indicate candidate indexes, and they can be inferred to be 0. When CPR is used, it is indicated as CurrPicIsOnlyRef. Also, l0 and l1 can indicate reference lists 0 and 1, respectively. Furthermore, when CPR is used, since the current picture is the only reference picture, only one MV may exist for one reference list. In this case, MV-related syntax can also be parsed for only one reference list.

[0232] FIG. 26 is a diagram illustrating resetting a space for storing the history of HMVP according to one embodiment of the present invention.

[0233] As mentioned above, the space for storing the HMVP history can be reset to a previously set location. The space for storing the HMVP history can be called an HMVP table.

[0234] According to an embodiment of the present invention, the pre-set positions may be different when CPR is used and when it is not used. For example, when CPR is not used, the HMVP table may be reset at the start of a CTU row. Also, for example, when CPR is used, the HMVP table may be reset at the start of a range where a reference block can exist. Or, for example, when CPR is used, the HMVP table may be reset at the start of each CTU. Or, when CPR is used, there may be more (more frequently) pre-set positions for resetting the HMVP table than when CPR is not used.

[0235] This is because when using CPR, motion information that corresponds to a position far away from the current block may have little correlation with the current block. Also, when using CPR, parallel processing can be made easier by resetting the HMVP table more frequently.

[0236] Referring to Figure 26, each small rectangle in the drawing may indicate a range where a reference block may exist or a CTU range. The portion marked with an X may be the portion where the HMVP table is reset. If the CPR shown in the upper part of Figure 26 is not used, the HMVP table may be reset at the start of a CTU row. If the CPR shown in the lower part of Figure 26 is used, the HMVP table may be reset at the start of a CTU.

[0237] According to an embodiment of the present invention, the MVD coding method when CPR is used may be different from the MVD coding method when CPR is not used. For example, when CPR is not used, the coding method shown in Fig. 9 can be used. This is because when CPR is used, the range of possible MVs may differ depending on the coding order from when CPR is not used.

[0238] In one embodiment, when CPR is used, it is not necessary to use a method of separately coding the x- and y-components, but rather a coding method based on the absolute value and direction of the vector.

[0239] As an example, when CPR is used, if MVP is zero MV, the reference point indicated by MV may be different from the existing one (vector from the top left of the current block).

[0240] As an example, when CPR is used, a different syntax from that described in FIGS. 9, 19, and 21 may be used. For example, a flag indicating whether an absolute value is greater than a certain value may have a different value when CPR is used than when it is not used. This allows signaling of a value obtained by subtracting a certain value from an absolute value. For example, in the above-described embodiment, a flag indicating whether an absolute value is greater than 1 may be used. For example, when CPR is used, a flag indicating whether an absolute value is greater than a minimum block size may be used. Alternatively, when CPR is used, a flag indicating whether an absolute value is greater than the width or height of a current block may be used. For example, when CPR is used, a flag indicating whether an absolute value is greater than the current block width may be used for the x-component, and a flag indicating whether an absolute value is greater than the current block height may be used for the y-component.

[0241] According to one embodiment of the present invention, when CPR is used, a shared merge list may not be used. A shared merge list may be a technique in which multiple blocks (e.g., coding units) use the same merge list. This allows the shared merge list to be used to facilitate parallel processing. However, when CPR is used, the current picture is used as a reference block, so the corresponding portion of the current picture must be reconstructed, and facilitating parallel processing may not be very meaningful. Furthermore, when CPR is used, using a shared merge list may result in reduced accuracy or an excessively small number of available candidates.

[0242] According to yet another embodiment, when CPR is used, the criteria for grouping blocks using the same merge list in a shared merge list may be different from when CPR is not used.

[0243] According to an embodiment of the present invention, when CPR is used, some of the methods used when CPR is not used may not be used. Alternatively, according to an embodiment of the present invention, when CPR is used, some of the methods used when CPR is not used may be used separately. The methods used when CPR is not used may include a prediction mode, etc.

[0244] FIG. 27 is a diagram illustrating a coding unit syntax according to one embodiment of the present invention.

[0245] The above-mentioned CPR can also be called IBC (intra block copy) or BC (block copy), so the CPR mode can be named IBC mode or BC mode.

[0246] According to one embodiment of the present invention, IBC may exist as an independent prediction mode. That is, the above-mentioned intra prediction and inter prediction may be MODE_INTRA and MODE_INTER, respectively, but MODE_IBC, which is different from MODE_INTRA and MODE_INTER, may exist. Also, as shown in the previous drawing, MODE_INTRA, MODE_INTER, and MODE_IBC may be indicated by a CuPredMode value.

[0247] Furthermore, a tile group may be a higher-level unit such as a CU, CTU, or PU, and may be a unit capable of being processed in parallel.

[0248] A B (bi-predictive) tile group may be capable of using intra prediction, inter prediction, IBC, etc. Also, a B tile group may use up to two motion vectors and two reference indices in a block. Alternatively, a B tile group may use one or more motion vectors and one or more reference indices in a block.

[0249] Intra prediction may be a concept that includes the IBC technique. Intra prediction may be a prediction method that references only the current picture. Inter prediction may be a method that can reference pictures other than the current picture as reference pictures.

[0250] A P (predictive) tile group may be capable of using intra prediction, inter prediction, IBC, etc. Also, a P tile group may use up to one motion vector and one reference index in a block, while a B tile group may not use more than one motion vector and two reference indexes in a block.

[0251] An I (intra) tile group may use intra prediction, IBC, and may not refer to pictures other than the current picture as reference pictures.

[0252] According to one embodiment of the present invention, if (tile_group_type !=I || sps_ibc_enabled_flag), there may be a possibility to parse cu_skip_flag, pred_mode_flag, and pred_mode_ibc_flag. That is, if (tile_group_type !=I || sps_ibc_enabled_flag), it is possible not to parse any of cu_skip_flag, pred_mode_flag, and pred_mode_ibc_flag.

[0253] Furthermore, sps_ibc_enabled_flag may be higher-level signaling indicating whether IBC is used. For example, sps_ibc_enabled_flag may be signaling in a sequence parameter set indicating whether IBC is used. Furthermore, when sps_ibc_enabled_flag is set to 0, IBC is not used, and when it is set to 1, IBC can be used. Here, when the IBC mode is called the BC mode, sps_ibc_enabled_flag may be written as sps_bc_enabled_flag.

[0254] Also, whether skip mode is used can be determined based on the cu_skip_flag value: if cu_skip_flag is 1, skip mode may be used.

[0255] Furthermore, a prediction mode can be determined based on pred_mode_flag or pred_mode_ibc_flag. That is, whether the current mode is MODE_INTRA, MODE_INTER, or MODE_IBC may be determined based on pred_mode_flag or pred_mode_ibc_flag. Alternatively, a CuPredMode value may be determined based on pred_mode_flag or pred_mode_ibc_flag. Here, pred_mode_flag may be named a prediction mode flag, and pred_mode_ibc_flag may be named a BC mode flag. Furthermore, when the IBC mode is named BC mode, pred_mode_ibc_flag may be written as pred_mode_bc_flag.

[0256] Furthermore, tile_group_type may indicate the type of tile group. As described above, the types of tile groups may include an I tile group, a P tile group, and a B tile group. Furthermore, when the tile_group_type value is I, P, or B, it may indicate an I tile group, a P tile group, or a B tile group, respectively.

[0257] According to one embodiment of the present invention, if (cu_skip_flag[x0][y0]==0 && tile_group_type !=I)), it is possible to parse pred_mode_flag. Also, if cu_skip_flag is 1, it is not necessary to parse pred_mode_flag. Also, if tile_group_type is I, it is not necessary to parse pred_mode_flag.

[0258] According to one embodiment of the present invention, pred_mode_ibc_flag can be parsed if ((tile_group_type==I && cu_skip_flag[x0][y0]==0)||(tile_group_type !=I && (cu_skip_flag[x0][y0]||CuPredMode[x0][y0]!=MODE_INTRA)) && sps_ibc_enabled_flag && blockSizeCondition). For example, pred_mode_ibc_flag can be parsed if (tile_group_type==I && cu_skip_flag[x0][y0]==0). Or, pred_mode_ibc_flag can be parsed if (tile_group_type !=I && (cu_skip_flag[x0][y0]||CuPredMode[x0][y0]!=MODE_INTRA)). Alternatively, if neither (tile_group_type==I && cu_skip_flag[x0][y0]==0) nor (tile_group_type !=I && (cu_skip_flag[x0][y0]||CuPredMode[x0][y0]!=MODE_INTRA)) holds, it is possible not to parse pred_mode_ibc_flag. Also, if sps_ibc_enabled_flag is 1, it is possible to parse pred_mode_ibc_flag, and if sps_ibc_enabled_flag is 0, it is possible not to parse pred_mode_ibc_flag. There may also be a condition based on the block size under which pred_mode_ibc_flag can be parsed. Referring to FIG. 27, the block size condition is shown as a case where both cbWidth and cbHeight are smaller than 32.

[0259] 27, it is possible to parse intra prediction related syntax elements when CuPredMode is MODE_INTRA, and it is possible not to parse motion vector related syntax elements when CuPredMode is MODE_INTRA.

[0260] Furthermore, when CuPredMode is not MODE_INTRA, inter prediction-related syntax elements can be parsed. Furthermore, when CuPredMode is not MODE_INTRA, IBC-related syntax elements can be parsed. The IBC-related syntax elements can include motion vector-related syntax elements. That is, when CuPredMode is MODE_IBC, IBC-related syntax elements can be parsed. The IBC-related syntax elements can include merge mode-related syntax elements and AMVP-related syntax elements. Furthermore, IBC may have more restrictive prediction modes than MODE_INTER, and fewer syntax elements may be parsed. For example, when MODE_IBC is set, only syntax elements for reference list L0 can be parsed. As another example, when MODE_IBC is set, some flags indicating whether a mode is used in merge_data may not need to be parsed. Furthermore, parsing inter prediction related syntax elements and parsing IBC related syntax elements when CuPredMode is not MODE_INTRA may be the case where syntax for chroma components is not parsed, or parsing inter prediction related syntax elements and parsing IBC related syntax elements when CuPredMode is not MODE_INTRA may be the case where the tree type (treeType) is not DUAL_TREE_CHROMA.

[0261] As an example, the tree type can determine which component syntax to parse and which component to process. If the tree type is SINGLE_TREE, the luma component and the chroma component can share syntax element values. If the tree type is SINGLE_TREE, the luma block and the chroma block can be partitioned in the same manner. If the tree type is DUAL_TREE, the luma block and the chroma block can be partitioned in different manners. If the tree type is DUAL_TREE, the tree type can include DUAL_TREE_LUMA and DUAL_TREE_CHROMA. Depending on whether the tree type is DUAL_TREE_LUMA or DUAL_TREE_CHROMA, it can be determined whether to process the luma component or the chroma component.

[0262] FIG. 28 is a diagram illustrating prediction mode signaling according to one embodiment of the present invention.

[0263] According to an embodiment of the present invention, a prediction mode may be indicated based on pred_mode_flag. Also, CuPredMode may be determined based on pred_mode_flag. Also, whether inter prediction or intra prediction is performed may be indicated based on pred_mode_flag.

[0264] According to one embodiment of the present invention, CuPredMode may be set to MODE_INTER if pred_mode_flag is 0. Also, CuPredMode may be set to MODE_INTRA if pred_mode_flag is 1. According to one embodiment, pred_mode_flag may indicate whether the current CU is in inter prediction mode or intra prediction mode.

[0265] If pred_mode_flag is not present, pred_mode_flag or CuPredMode can be inferred. If pred_mode_flag is not present, pred_mode_flag or CuPredMode can be inferred based on the tile group. For example, if it is an I tile group, CuPredMode can be inferred as MODE_INTRA. Also, if it is a P tile group or a B tile group, CuPredMode can be inferred as MODE_INTER.

[0266] According to an embodiment of the present invention, the prediction mode may be indicated based on pred_mode_ibc_flag, CuPredMode may be determined based on pred_mode_ibc_flag, and whether the IBC mode is indicated based on pred_mode_ibc_flag.

[0267] According to one embodiment of the present invention, if pred_mode_ibc_flag is 0, CuPredMode may be set to MODE_INTER. If pred_mode_ibc_flag is 1, CuPredMode may be set to MODE_IBC. Alternatively, if pred_mode_ibc_flag is 0, CuPredMode may be set to a value other than MODE_IBC.

[0268] If pred_mode_ibc_flag is not present, pred_mode_ibc_flag or CuPredMode can be inferred. If pred_mode_ibc_flag is not present, pred_mode_ibc_flag or CuPredMode can be inferred based on the tile group. For example, if it is an I tile group, CuPredMode can be inferred as MODE_INTRA. Also, if it is a P tile group or a B tile group, CuPredMode can be inferred as MODE_INTER.

[0269] In the present invention, the tile group may be replaced with a slice or other unit that can be processed in parallel, in addition to the tile group.

[0270] According to one embodiment of the present invention, skip mode can be used when IBC is used. For example, skip mode can be used when IBC is used for an I-tile group. For example, skip mode can be used for a CU that uses IBC for an I-tile group. However, the syntax and signaling method described with reference to FIGS. 27 and 28 may not support this. For example, a case in which IBC mode and skip mode are both in an I-tile group can be assumed. In this case, sps_ibc_enabled_flag may be 1. Furthermore, cu_skip_flag can be parsed. In this case, the value of cu_skip_flag may be 1 (a value indicating the use of skip mode). Furthermore, when cu_skip_flag is 1 or for an I-tile group, pred_mode_flag does not need to be parsed. In this case, CuPredMode can be inferred as MODE_INTRA for an I-tile group. Furthermore, when an I-tile group is involved and cu_skip_flag is 1, pred_mode_ibc_flag does not need to be parsed. In this case, it is possible to infer that CuPredMode is MODE_INTRA for the I-tile group. Therefore, a situation may arise where CuPredMode cannot be indicated as MODE_IBC despite using IBC.

[0271] FIG. 29 is a diagram illustrating prediction mode signaling according to one embodiment of the present invention.

[0272] 27 and 28 can be referred to for the explanation of pred_mode_flag and pred_mode_ibc_flag in Fig. 29. The embodiment of Fig. 29 may be intended to solve the problem described in Fig. 28.

[0273] According to one embodiment of the present invention, CuPredMode can be inferred based on cu_skip_flag. CuPredMode can also be inferred based on the type of tile group. For example, in the case of an I-tile group, CuPredMode can be inferred based on cu_skip_flag. For example, in the case of an I-tile group and cu_skip_flag is 0, CuPredMode can be inferred as MODE_INTRA. In the case of an I-tile group and cu_skip_flag is 1, CuPredMode can be inferred as MODE_IBC. Cu_skip_flag being 0 and 1 respectively indicate that skip mode is not used and is used. This embodiment can also be performed when pred_mode_flag or pred_mode_ibc_flag is not present.

[0274] Also, at this time, it is possible to set CuPredMode based on cu_skip_flag without the process of setting it to another value. Also, at this time, it is possible to set CuPredMode to MODE_IBC or MODE_INTRA based on cu_skip_flag without the process of setting it to another value. For example, if it is an I-tile group and cu_skip_flag is 1, it is possible to set CuPredMode directly to MODE_IBC. Also, if it is an I-tile group and cu_skip_flag is 0, it is possible to set CuPredMode directly to MODE_INTRA. Similarly, the above embodiment can be performed when pred_mode_flag or pred_mode_ibc_flag is not present.

[0275] Also, there may be a CuPredMode inference value that is set based on the tile group type and cu_skip_flag, and there may be a CuPredMode inference value that is set based only on the tile group type and not cu_skip_flag. For example, CuPredMode can be inferred as MODE_INTRA or MODE_IBC based on the tile group type and cu_skip_flag. Also, CuPredMode can be inferred as MODE_INTER based on the tile group type.

[0276] Existing intra prediction that is not IBC does not need to use skip mode. Therefore, if the use of skip mode is signaled, it can be determined to be IBC or inter prediction. Also, if the use of skip mode is signaled and a tile group uses only intra prediction (including IBC), it can be determined to be IBC.

[0277] Referring to Figure 29, if pred_mode_flag is not present, CuPredMode can be inferred. If it is an I-tile group and cu_skip_flag is 0, MODE_INTRA can be inferred. If it is an I-tile group and cu_skip_flag is 1, MODE_IBC can be inferred. If it is a P-tile group or a B-tile group, MODE_INTER can be inferred.

[0278] Also, referring to Figure 29, if pred_mode_ibc_flag is not present, CuPredMode can be inferred. If it is an I tile group and cu_skip_flag is 0, MODE_INTRA can be inferred. If it is an I tile group and cu_skip_flag is 1, MODE_IBC can be inferred. If it is a P tile group or a B tile group, MODE_INTER can be inferred.

[0279] FIG. 30 is a diagram illustrating prediction mode signaling according to one embodiment of the present invention.

[0280] 27 and 28 for the explanation of pred_mode_flag and pred_mode_ibc_flag in Fig. 30. The embodiment in Fig. 30 may be intended to solve the problem described in Fig. 28.

[0281] As an example, there may be different ways to infer CuPredMode or pred_mode_flag or pred_mode_ibc_flag based on sps_ibc_enabled_flag.

[0282] As an example, when sps_ibc_enabled_flag is 1, it is possible to use the inference method described in Fig. 29. Also, when sps_ibc_enabled_flag is 0, it is possible to use the inference method described in Fig. 28.

[0283] Referring to FIG. 30, there may be cases where the CuPredMode value is inferred. For example, if pred_mode_flag or pred_mode_ibc_flag is not present, the CuPredMode value can be inferred. According to one embodiment of the present invention, when sps_ibc_enabled_flag is 1 and the tile group is an I-tile group, CuPredMode can be inferred based on the cu_skip_flag value. For example, when sps_ibc_enabled_flag is 1, the tile group is an I-tile group, and the cu_skip_flag value is 0, CuPredMode can be set to MODE_INTRA. When sps_ibc_enabled_flag is 1, the tile group is an I-tile group, and the cu_skip_flag value is 1, CuPredMode can be set to MODE_IBC. When sps_ibc_enabled_flag is 1, the tile group is a P-tile group or a B-tile group, CuPredMode can be set to MODE_INTER. Also, when sps_ibc_enabled_flag is 0, if it is an I-tile group, CuPredMode can be set to MODE_INTRA. Also, when sps_ibc_enabled_flag is 0, if it is a P-tile group or a B-tile group, CuPredMode can be set to MODE_INTER.

[0284] FIG. 31 is a diagram illustrating a coding unit syntax according to one embodiment of the present invention.

[0285] According to one embodiment of the present invention, if it is an I-tile group, pred_mode_ibc_flag can be parsed. In this case, the problem described in Figure 28 can be solved. Also, if it is an I-tile group and sps_ibc_enabled_flag is 1, pred_mode_ibc_flag can be parsed. That is, even if IBC mode is used in an I-tile group and skip mode is used, pred_mode_ibc_flag can be set to indicate MODE_IBC.

[0286] Referring to FIG. 31, if (tile_group_type==I), sps_ibc_enabled_flag is 1, and if the conditions related to the block size are met, pred_mode_ibc_flag is parsed.

[0287] FIG. 32 is a diagram illustrating prediction mode signaling according to one embodiment of the present invention.

[0288] According to one embodiment of the present invention, when pred_mode_flag is not present, pred_mode_flag can be inferred. By enabling the pred_mode_flag of the current block to be inferred according to the type of upper-level group of the current block, the encoder can omit recording the pred_mode_flag of the current block in the bitstream, thereby improving compression efficiency. For example, if the tile group to which the current block belongs is an I tile group and the prediction mode of the current block is an intra prediction mode, the encoder can omit recording a pred_mode_flag value of the current block indicating a value of 1 in the bitstream. If the tile group to which the current block belongs is a B or P tile group and the prediction mode of the current block is an inter prediction mode, the encoder can omit recording a pred_mode_flag value of the current block indicating a value of 0 in the bitstream. More specifically, if the tile group to which the current block belongs is a B or P tile group and the prediction mode of the current block is skip mode (for example, if the value of cu_skip_flag is 1), the encoder can omit writing the pred_mode_flag value of the current block, which indicates a value of 0, into the bitstream.

[0289] As a result, the decoder can infer pred_mode_flag based on the type of tile group, as an example. For example, if it is an I tile group, the decoder can infer that the pred_mode_flag value is 1. If it is a P tile group, the decoder can infer that the pred_mode_flag value is 0. If it is a B tile group, the decoder can infer that the pred_mode_flag value is 0.

[0290] Also, CuPredMode can be set to MODE_INTER or MODE_INTRA based on pred_mode_flag. For example, when pred_mode_flag is 0, CuPredMode can be set to MODE_INTER. When pred_mode_flag is 1, CuPredMode can be set to MODE_INTRA.

[0291] According to one embodiment of the present invention, CuPredMode can be set based on pred_mode_flag or pred_mode_ibc_flag. For example, when pred_mode_ibc_flag is 0, CuPredMode can be set based on pred_mode_flag as well. For example, when pred_mode_ibc_flag is 0, CuPredMode can be set to MODE_INTER or MODE_INTRA based on pred_mode_flag as well. Alternatively, when pred_mode_ibc_flag is 0, CuPredMode can be set to a value other than MODE_IBC based on pred_mode_flag as well. Referring to FIG. 32, when pred_mode_ibc_flag is 0 and pred_mode_flag is 0, CuPredMode can be set to MODE_INTER. Alternatively, when pred_mode_ibc_flag is 0 and pred_mode_flag is 1, CuPredMode can be set to MODE_INTRA.

[0292] According to one embodiment of the present invention, there may be cases where CuPredMode is set based only on pred_mode_ibc_flag. For example, if pred_mode_ibc_flag is 1, CuPredMode can be set without other flags. For example, if pred_mode_ibc_flag is 1, CuPredMode can be set to MODE_IBC.

[0293] According to an embodiment of the present invention, if pred_mode_ibc_flag does not exist, pred_mode_ibc_flag can be inferred. For example, the pred_mode_ibc_flag value can be inferred based on the type of tile group. Also, the pred_mode_ibc_flag value can be inferred based on the type of tile group and the IBC mode enablement conditions. More specifically, for an I-tile group, the pred_mode_ibc_flag value can be inferred based on the IBC mode enablement conditions. For example, if the I-tile group satisfies the IBC enablement conditions, the pred_mode_ibc_flag value can be inferred to be 1. If the pred_mode_ibc_flag value is inferred to be 1, CuPredMode may be set to the MODE_IBC value. Also, if the I-tile group does not satisfy the IBC enablement conditions, the pred_mode_ibc_flag value can be inferred to be 0. Alternatively, if the I-tile group does not satisfy at least one of the IBC enablement conditions, the pred_mode_ibc_flag value can be inferred to be 0. If CuPredMode is inferred to be 0, then CuPredMode may be set to a value other than MODE_IBC. The IBC mode enablement condition may include the sps_ibc_enabled_flag value. The IBC mode enablement condition may also include a condition related to the block size. Referring to FIG. 32, if the I-tile group is one and sps_ibc_enabled_flag is 1, then it is possible to infer that the pred_mode_ibc_flag value is 1. In this case, if an IBC mode enablement condition is added and the condition is also met, then it is possible to infer that the pred_mode_ibc_flag value is 1. In FIG. 32, the additional IBC mode enablement condition is shown as a block size condition.

[0294] Also, if it is an I-tile group (condition 1) in FIG. 32) and sps_ibc_enabled_flag is 0 (condition 2a) in FIG. 32), it can be inferred that the pred_mode_ibc_flag value is 0. Also, if it is an I-tile group (condition 1) in FIG. 32) and no other IBC mode usage conditions are met (condition 2b) in FIG. 32), it can be inferred that the pred_mode_ibc_flag value is 0.

[0295] As yet another example, if the tile group is a P or B tile group, the pred_mode_ibc_flag value can be inferred to be 0. Also, if the tile group is a P or B tile group, the pred_mode_ibc_flag value can be inferred to be a previously set value without any other conditions other than the type of tile group.

[0296] If the above conditions are met during the video signal encoding process, the encoder may not write pred_mode_ibc_flag into the bitstream. In this way, the encoder can improve video compression efficiency by not writing the pred_mode_ibc_flag value into the bitstream.

[0297] In many embodiments of the present invention, the term inference may be synonymous with setting, derivation, derive, and the like.

[0298] According to one embodiment of the present invention, the tree type may be derived as follows.

[0299] If tile_group_type is I and qtbtt_dual_tree_intra_flag is 1, the tree type may be set to DUAL_TREE_LUMA. Alternatively, if tile_group_type is I, qtbtt_dual_tree_intra_flag is 1, and the luma component is processed, the tree type may be set to DUAL_TREE_LUMA.

[0300] If tile_group_type is I and qtbtt_dual_tree_intra_flag is 1, the tree type may be set to DUAL_TREE_CHROMA. Alternatively, if tile_group_type is I, qtbtt_dual_tree_intra_flag is 1, and a chroma component is being processed, the tree type may be set to DUAL_TREE_CHROMA.

[0301] If tile_group_type is not I or qtbtt_dual_tree_intra_flag is 0, the tree type may be set to SINGLE_TREE.

[0302] According to one embodiment, qtbtt_dual_tree_intra_flag may be signaling indicating whether a dual tree is allowed. A dual tree being allowed may mean that separate coding quad tree syntax structures for luma and chroma components exist. More specifically, qtbtt_dual_tree_intra_flag may be signaling indicating whether a dual tree is allowed when the current picture is the only reference picture.

[0303] FIG. 33 is a diagram illustrating a coding unit syntax according to one embodiment of the present invention.

[0304] According to an embodiment of the present invention, the IBC mode may not be used for chroma components, more specifically, for DUAL_TREE_CHROMA, the IBC mode may not be used.

[0305] 33, if the tree type is not DUAL_TREE_CHROMA, pred_mode_ibc_flag can be parsed. Also, if the tree type is DUAL_TREE_CHROMA, pred_mode_ibc_flag does not need to be parsed. According to one embodiment, if the tree type is DUAL_TREE_CHROMA, CuPredMode can be inferred as MODE_INTRA.

[0306] FIG. 34 is a diagram illustrating a coding unit syntax according to one embodiment of the present invention.

[0307] The coding unit syntax in Figure 34 may illustrate syntax related to intra prediction. According to an embodiment of the present invention, intra_chroma_pred_mode signaling may be present. Furthermore, the intra prediction mode of the chroma component may be determined based on intra_chroma_pred_mode.

[0308] 34, if the tree type is SINGLE_TREE or DUAL_TREE_CHROMA, it is possible to parse intra_chroma_pred_mode, and if the tree type is DUAL_TREE_LUMA, it is possible not to parse intra_chroma_pred_mode.

[0309] FIG. 35 is a diagram illustrating intra prediction mode derivation for chroma components according to one embodiment of the present invention.

[0310] Referring to Figure 35, IntraPredModeC may be an intra prediction mode for a chroma component. Also, xCb and yCb may represent the topmost to leftmost samples of a chroma coding block based on the luma position. Also, IntraPredModeY may be an intra prediction mode for a luma component.

[0311] According to an embodiment of the present invention, IntraPredModeC may be determined based on IntraPredModeY. Alternatively, IntraPredModeC may be determined based on IntraPredModeY and intra_chroma_pred_mode. In this case, IntraPredModeY may be a mode corresponding to a luma block corresponding to a current chroma block. According to an embodiment, a position where IntraPredModeY corresponding to IntraPredModeC for a certain position is used may be pre-set. According to an embodiment, the pre-set position may be a luma block position corresponding to the center of the current chroma block. For example, when deriving IntraPredModeC at a position (xCb, yCb), IntraPredModeY at a position (xCb+cbWidth / 2, yCb+cbHeight / 2) may be referenced. Alternatively, when deriving IntraPredModeC at a position (xCb, yCb), the pre-set position may be a position based on xCb or yCb.

[0312] For the IntraPredModeC value for a certain IntraPredModeY value, see Table 8-2 or Table 8-3 in FIG. 35. Table 8-2 may apply when CCLM cannot be used (or when sps_cclm_enalbed_flag is 0), and Table 8-3 may apply when CCLM can be used (or when sps_cclm_enalbed_flag is 1). When IntraPredModeY is one of the values, see the column corresponding to that value in FIG. 35, and the value corresponding to intra_chroma_pred_mode in that column may be IntraPredModeC. For example, if IntraPredModeY is 1 and intra_chroma_pred_mode is 1, IntraPredModeC may be 50.

[0313] According to one embodiment, sps_cclm_enalbed_flag may be higher level signaling indicating whether CCLM can be applied. For example, if sps_cclm_enalbed_flag is 1, CCLM can be applied. If sps_cclm_enalbed_flag is 0, CCLM cannot be applied.

[0314] IntraPredModeC values ​​of 81, 82, or 83 in Fig. 35 may correspond to CCLM mode. Also, when sps_cclm_enabled_flag in Fig. 35 is 0, IntraPredModeC values ​​of 4 may correspond to DM mode. Also, when sps_cclm_enabled_flag in Fig. 35 is 1, IntraPredModeC values ​​of 7 may correspond to DM mode.

[0315] There may also be a bin string definition to signal the intra_chroma_pred_mode. For example, the DM mode may be indicated using the intra_chroma_pred_mode with the fewest bits. For example, the DM mode may be indicated using a 1-bit intra_chroma_pred_mode.

[0316] According to one embodiment, when sps_cclm_enalbed_flag is 0, the number of bits representing intra_chroma_pred_mode values ​​4, 0, 1, 2, and 3 may increase or remain the same. According to one embodiment, when sps_cclm_enalbed_flag is 0, the bin strings representing intra_chroma_pred_mode values ​​4, 0, 1, 2, and 3 may be 0, 100, 101, 110, and 111, respectively.

[0317] According to one embodiment, when sps_cclm_enalbed_flag is 1, the number of bits representing intra_chroma_pred_mode values ​​7, 4, 5, 6, 0, 1, 2, and 3 may increase or remain the same. According to one embodiment, when sps_cclm_enalbed_flag is 1, the bin strings representing intra_chroma_pred_mode values ​​7, 4, 5, 6, 0, 1, 2, and 3 may be 0, 10, 1110, 1111, 11000, 11001, 11010, and 11011, respectively.

[0318] However, according to the described embodiment, a case may occur in which intra prediction for a chroma block is not easy. In particular, a case may occur in which intra prediction mode derivation for a chroma block is not easy. As described above, when a chroma block is intra predicted, the intra prediction mode for the corresponding luma block may need to be referenced to determine the intra prediction mode. However, a case may occur in which a corresponding luma position does not perform intra prediction or is not in MODE_INTRA. For example, when a corresponding luma position is in MODE_IBC, a corresponding luma intra prediction mode may not exist. According to an embodiment, in the case of SINGLE_TREE, the corresponding luma block and chroma block may use the same prediction mode. In the case of DUAL_TREE, the corresponding luma block and chroma block may use separate prediction modes. In the case of an I-tile group, DUAL_TREE may be used. In the case of an I-tile group, MODE_INTRA or MODE_IBC may be used. Therefore, a case may occur in which DUAL_TREE_LUMA uses MODE_IBC and DUAL_TREE_CHROMA uses MODE_INTRA at the same position.

[0319] FIG. 36 is a diagram illustrating intra prediction mode derivation of chroma components according to one embodiment of the present invention.

[0320] The embodiment of FIG. 36 may be a method for solving the problem described in FIG.

[0321] According to an embodiment of the present invention, if IntraPredModeY does not exist, IntraPredModeY can be set to a previously set mode (or value). Therefore, even if the luma position corresponding to the chroma block does not use intra prediction or uses the IBC mode, IntraPredModeC can be derived.

[0322] More specifically, if IntraPredModeY is not present, it is possible to set IntraPredModeY to planar mode (value 0), in which case the planar mode can be signaled using fewer bits in the signaling method described in Figure 35.

[0323] Alternatively, if IntraPredModeY is not present, it is possible to set IntraPredModeY to DC mode (value 1), in which case DC mode can be signaled using fewer bits in the signaling method described in Figure 35.

[0324] Alternatively, if IntraPredModeY is not present, it can be set to vertical mode (value 50), in which case vertical mode can be signaled using fewer bits in the signaling method described in Figure 35.

[0325] Alternatively, if IntraPredModeY is not present, it can be set to horizontal mode (value 18), in which case the horizontal mode can be signaled using fewer bits in the signaling method described in Figure 35.

[0326] As yet another embodiment, if IntraPredModeY is not present, the IntraPredModeC value corresponding to the intra_chroma_pred_mode value may be determined to a value not shown in FIG. 35. That is, a separate column may be provided in FIG. 35 for cases where the IntraPredModeY value is not present. For example, IntraPredModeC corresponding to intra_chroma_pred_mode4, 0, 1, 2, and 3 may be 0, 1, 50, and 18, respectively. Or, IntraPredModeC corresponding to intra_chroma_pred_mode4, 0, 1, 2, and 3 may be 0, 50, 18, and 1, respectively. This can be applied to both cases where sps_cclm_enabled_flag is 0 and 1.

[0327] As yet another example, if IntraPredModeY is not present, IntraPredModeC can be set to a previously set value. For example, if IntraPredModeY is not present, IntraPredModeC can be set to a previously set value regardless of intra_chroma_pred_mode. Also, if IntraPredModeY is not present, the intra_chroma_pred_mode value can always be signaled as 0. For example, if IntraPredModeY is not present, IntraPredModeC can be set to planar mode. Or, if IntraPredModeY is not present, IntraPredModeC can be set to CCLM. Or, if IntraPredModeY is not present, IntraPredModeC can be set to DM mode. Also, if IntraPredModeY is not present, it is possible not to parse the intra_chroma_pred_mode described in FIG. 34.

[0328] As yet another example, if IntraPredModeY does not exist, the location where IntraPredModeY is referenced can be changed.

[0329] In the above embodiment, the absence of IntraPredModeY may indicate that the corresponding luma position referenced when deriving a chrominance intra prediction mode is not MODE_INTRA, or that CuPredMode[xCb+cbWidth / 2][yCb+cbHeight / 2] corresponding to the luma component when deriving a chrominance intra prediction mode at the (xCb, yCb) position is not MODE_INTRA or MODE_IBC.

[0330] Alternatively, it may refer to a case where IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2] corresponding to the luma component does not exist when deriving a chrominance intra prediction mode at the (xCb, yCb) position.

[0331] 36, when deriving IntraPredModeC[xCb][yCb], if IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2] does not exist, IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2] can be set to a previously set value. Then, IntraPredModeC can be derived by referring to IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2] and the Table described in FIG.

[0332] Furthermore, when deriving IntraPredModeC[xCb][yCb], if IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2] exists, IntraPredModeC can be derived by referring to IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2] and the table described in Figure 35.

[0333] According to an embodiment of the present invention, if a corresponding luma block uses IBC mode when predicting a chroma block, the prediction mode may be restricted. More specifically, if a corresponding luma block uses IBC mode when intra-predicting a chroma block, the intra-prediction mode may be restricted. For example, in this case, it is possible to not use DM mode. This is because if the corresponding luma block and chroma block use different modes, the similarity between them may decrease.

[0334] FIG. 37 is a diagram illustrating a coding unit syntax according to one embodiment of the present invention.

[0335] According to one embodiment of the present invention, motion information for chroma blocks may exist separately from motion information for luma blocks, for example, when chroma blocks use IBC mode.

[0336] 37, when the tree type is DUAL_TREE_CHROMA, it is possible to parse motion information related syntax elements. For example, when the tree type is DUAL_TREE_CHROMA and CuPredMode is MODE_IBC, it is possible to parse motion information related syntax elements. The motion information related syntax elements may include merge_flag, syntax elements in merge_data, mvp_l0_flag, amvr_4pel_flag, etc.

[0337] FIG. 38 is a diagram showing a syntax structure according to one embodiment of the present invention.

[0338] According to an embodiment of the present invention, prediction modes may be restricted based on block size. That is, CuPredMode may be restrictive based on block size. For example, inter prediction may be restricted. This may be to reduce memory bandwidth or computational complexity. For example, prediction modes may be restricted for small-sized blocks. For example, prediction modes may be restricted for blocks with a size equal to or smaller than a threshold. For example, the threshold may be a 4x4 size. That is, in a specific embodiment, inter prediction may not be used for blocks with a size equal to or smaller than 4x4.

[0339] In yet another embodiment, the restricted prediction mode described may be inter-prediction with bi-prediction. For example, bi-prediction may not be used for block sizes equal to or smaller than a threshold value. In this case, the threshold value may indicate 4x8 or 8x4 or smaller. For example, the threshold value may be (width + height) 12. If bi-prediction is restricted, a process of converting bi-prediction to uni-prediction may exist. Alternatively, if bi-prediction is restricted, a value indicating the prediction direction or which reference list to use may be restricted.

[0340] As explained, the prediction modes may be restricted, which allows for a different syntax structure than that described in the previous figures to be used for efficient signaling.

[0341] According to one embodiment of the present invention, skip mode does not need to be used when MODE_INTRA is set, so cu_skip_flag may be 0 when MODE_INTRA is set. Therefore, if cu_skip_flag is 1, it can be determined that MODE_INTRA is not set.

[0342] Referring to FIG. 38, if the tile group type is not I or sps_ibc_enabled_flag is 1, cu_skip_flag, pred_mode_flag, and pred_mode_ibc_flag can be parsed. At this time, additional conditions can be considered when parsing. That is, if the tile group type is I and sps_ibc_enabled_flag is 0, cu_skip_flag, pred_mode_flag, and pred_mode_ibc_flag do not need to be parsed. According to one embodiment, CuPredMode may be one of MODE_INTRA, MODE_INTER, and MODE_IBC. If the tile group type is I, the possible CuPredMode values ​​may be MODE_INTRA or MODE_IBC. However, if MODE_IBC is restricted, for example, if sps_ibc_enalbed_flag is 0, the only possible CuPredMode value may be MODE_INTRA. Therefore, when the tile group type is I and sps_ibc_enabled_flag is 0, CuPredMode can be determined to be MODE_INTRA without parsing pred_mode_flag and pred_mode_ibc_flag. Also, as described above, cu_skip_flag can be determined to be 0.

[0343] According to one embodiment of the present invention, cu_skip_flag, pred_mode_flag, and pred_mode_ibc_flag can be parsed based on the block size.

[0344] For example, if the block size is one for which inter prediction is restricted and IBC is not available, cu_skip_flag does not need to be parsed. That is, if the block size is one for which inter prediction is available or IBC is available, cu_skip_flag can be parsed. If the block size is one for which inter prediction is restricted and IBC is not available, CuPredMode can be determined as MODE_INTRA. In this case, the value of cu_skip_flag can be determined and inferred as 0. In one embodiment, the block size for which inter prediction is restricted may be a 4x4 block. Also, if IBC is not available, sps_ibc_enabled_flag may be set to 0.

[0345] According to an embodiment of the present invention, if the block size is such that inter prediction is restricted, it is not necessary to parse pred_mode_flag. According to an embodiment of the present invention, it is possible to determine whether CuPredMode is MODE_INTRA or MODE_INTER based on the value of pred_mode_flag. If the block size is such that inter prediction is restricted, it is possible to determine from pred_mode_flag that CuPredMode is a value indicating MODE_INTRA. Furthermore, CuPredMode may be changed based on pred_mode_ibc_flag. That is, CuPredMode may be determined based on pred_mode_flag and pred_mode_ibc_flag, and CuPredMode determined based only on pred_mode_flag can be changed based on pred_mode_ibc_flag. According to an embodiment, it is possible to determine whether CuPredMode is MODE_IBC or a value determined based only on pred_mode_flag based on the value of pred_mode_ibc_flag.

[0346] If the block size does not restrict inter prediction, pred_mode_flag can be parsed. At this time, additional conditions can be considered. For example, whether to parse pred_mode_flag can be determined based on cu_skip_flag or the tile group type. As described above, pred_mode_flag can be a value that determines whether CuPredMode is MODE_INTRA or MODE_INTER. However, there may be cases where CuPredMode is restricted based on cu_skip_flag or the tile group type. For example, if the tile group type is I, CuPredMode can only be the MODE_INTRA value. Also, if the tile group type is not I, i.e., if the tile group type is P or B, CuPredMode can be either MODE_INTRA or MODE_INTER. However, if the tile group type is not I and cu_skip_flag is 1, CuPredMode can only be the MODE_INTER value. Therefore, according to one embodiment of the present invention, pred_mode_flag does not need to be parsed if cu_skip_flag is 1 or the tile group type is I. Therefore, according to one embodiment of the present invention, if the tile group type is I, pred_mode_flag or CuPredMode can be inferred to have a value indicating MODE_INTRA. Also, if the tile group type is P or B, pred_mode_flag or CuPredMode can be inferred to have a value indicating MODE_INTER.

[0347] As an example, the block size to which inter prediction is restricted may be a 4x4 block, or the block size to which inter prediction is restricted may be a block smaller than or equal to 4x4.

[0348] Furthermore, pred_mode_ibc_flag can be parsed based on the block size for which inter prediction is restricted. Furthermore, pred_mode_ibc_flag can be parsed based on cu_skip_flag. According to an embodiment, when a block size for which inter prediction is restricted is specified and cu_skip_flag is 1, pred_mode_ibc_flag does not need to be parsed. As described above, when a block size for which inter prediction is restricted is specified, CuPredMode does not need to be MODE_INTER. Furthermore, when cu_skip_flag is 1, CuPredMode does not need to be MODE_IBC. Therefore, when a block size for which inter prediction is restricted is specified and cu_skip_flag is 1, pred_mode_ibc_flag or CuPredMode can be determined or inferred to be MODE_IBC. Furthermore, this may be the case when it is possible to set it to MODE_IBC. For example, when sps_ibc_enabled_flag is 1, it may be possible to set it to MODE_IBC. Therefore, when the block size is one in which inter prediction is restricted and cu_skip_flag is 1, pred_mode_ibc_flag or CuPredMode can be determined and inferred from sps_ibc_enabled_flag. More specifically, when the block size is one in which inter prediction is restricted and cu_skip_flag is 1, pred_mode_ibc_flag can be inferred as sps_ibc_enabled_flag. Also, when the block size is one in which inter prediction is not restricted or cu_skip_flag is 0, pred_mode_ibc_flag can be parsed.

[0349] Also, if the tile group type is I and cu_skip_flag is 1, it is possible not to parse pred_mode_ibc_flag. In this case, it is possible to determine or infer that pred_mode_ibc_flag or CuPredMode is a value indicating MODE_IBC. This is because the possible CuPredMode values ​​for an I tile group are MODE_INTRA and MODE_IBC, and skip mode is not used when MODE_INTRA is selected. Therefore, if the tile group type is I and cu_skip_flag is 0, it is possible to parse pred_mode_ibc_flag.

[0350] Furthermore, if the tile group type is not I, CuPredMode is MODE_INTRA, and the block size is not one for which inter prediction is restricted, pred_mode_ibc_flag does not need to be parsed. In this case, the prediction mode can be determined without pred_mode_ibc_flag. Furthermore, if the tile group type is not I, CuPredMode is not MODE_INTRA, or the block size is one for which inter prediction is restricted, pred_mode_ibc_flag can be parsed. At this time, pred_mode_ibc_flag can be parsed taking additional conditions into consideration. For example, if the tile group type is not I, CuPredMode is MODE_INTRA, and the block is one for which inter prediction is restricted, pred_mode_ibc_flag can be parsed. This is because the final prediction mode can be determined to be MODE_INTRA or MODE_IBC even if inter prediction is restricted. At this time, if cu_skip_flag is 0, pred_mode_ibc_flag can be parsed.

[0351] As an example, the block size to which inter prediction is restricted may be a 4x4 block, or the block size to which inter prediction is restricted may be a block smaller than 4x4.

[0352] FIG. 39 is a diagram illustrating a signaling value inference method according to one embodiment of the present invention.

[0353] With reference to Figure 39, pred_mode_flag or pred_mode_ibc_flag can be inferred as described in Figure 38. Alternatively, CuPredMode can be determined as described in Figure 38. Furthermore, pred_mode_flag and pred_mode_ibc_flag in Figure 39 may be the same signaling as pred_mode_flag and pred_mode_ibc_flag in Figure 38, respectively.

[0354] According to one embodiment of the present invention, CuPredMode can be determined as MODE_INTER or MODE_INTRA based on the value of pred_mode_flag. If this value is set to MODE_TEMP, CuPredMode can be determined as MODE_TEMP or MODE_IBC based on the value of pred_mode_ibc_flag.

[0355] As described in Figure 38, when the block size is such that inter prediction is restricted, it can be inferred that pred_mode_flag has a value indicating MODE_INTRA. That is, when the block size is such that inter prediction is restricted, it can be inferred that pred_mode_flag is 1. Referring to Figure 39, when the block size is 4x4, it can be inferred that the pred_mode_flag value is 1.

[0356] Also, as described in Figure 38, when the block size is such that inter prediction is restricted and the mode is skip mode, it can be inferred that pred_mode_ibc_flag is a value indicating MODE_IBC. This may be the case when MODE_IBC can be used. For example, when MODE_IBC can be used, it may be the case when sps_ibc_enabled_flag is 1. For example, when the block size is such that inter prediction is restricted and the mode is skip mode, it can be inferred that pred_mode_ibc_flag is the sps_ibc_enabled_flag value. Referring to Figure 39, when the block size is 4x4 and the mode is skip mode, it can be inferred that pred_mode_ibc_flag is the sps_ibc_enabled_flag value.

[0357] FIG. 40 illustrates a signaling value inference method according to one embodiment of the present invention.

[0358] The methods for parsing, inferring, or determining cu_skip_flag, pred_mode_flag, pred_mode_ibc_flag, and CuPredMode have been described in Figures 38 and 39. However, there may be a conflict in the inference method shown in Figure 39.

[0359] For example, when the block size is one for which inter prediction is restricted and the tile group type is P or B, it may be difficult to infer the pred_mode_flag value. In Figure 39, the pred_mode_flag value can be inferred as one of two values, but both cases may be satisfied.

[0360] Also, it may be difficult to infer the pred_mode_ibc_flag value when the block size is limited for inter prediction, the mode is skip, and the tile group type is P or B. In Figure 39, the pred_mode_ibc_flag value can be inferred as one of two values, but it may also satisfy both cases.

[0361] FIG. 40 may be an example to solve this problem.

[0362] When the tile group type is P or B, possible prediction modes are MODE_INTRA, MODE_INTER, and MODE_IBC. In this case, if the block size is one for which inter prediction is restricted, MODE_INTER may not be available among MODE_INTRA, MODE_INTER, and MODE_IBC. Therefore, according to an embodiment of the present invention, in this case, it is possible to infer that pred_mode_flag is a value indicating MODE_INTRA. This is because MODE_IBC can be determined using pred_mode_ibc_flag. Therefore, it can be summarized as follows:

[0363] If the tile group type is I or the block size is such that inter prediction is restricted, it can be inferred that pred_mode_flag is a value indicating MODE_INTRA. Also, if 1) the tile group type is P or B and 2) the block size is not such that inter prediction is restricted, it can be inferred that pred_mode_flag is a value indicating MODE_INTER.

[0364] When the tile group type is P or B, possible prediction modes are MODE_INTRA, MODE_INTER, and MODE_IBC. In this case, if the block size is such that inter prediction is restricted, MODE_INTER may not be available among MODE_INTRA, MODE_INTER, and MODE_IBC. Also, if the skip mode is selected, MODE_INTRA may not be available among MODE_INTRA, MODE_INTER, and MODE_IBC. Therefore, if the tile group type is P or B, the block size is such that inter prediction is restricted, and the skip mode is selected, only MODE_IBC can be used. Therefore, in this case, it is possible to infer that pred_mode_ibc_flag is 1. Therefore, the following can be summarized:

[0365] If 1) the tile group type is I, or 2) the inter prediction is a restricted block size and the mode is skip, pred_mode_ibc_flag can be inferred to be a value indicating MODE_IBC, for example, 1. Also, if i) the tile group type is P or B, and ii) the inter prediction is not a restricted block size or not skip mode, pred_mode_ibc_flag can be inferred to be a value indicating MODE_IBC, for example, 0.

[0366] As an example, the block size to which inter prediction is restricted may be a 4x4 block, or the block size to which inter prediction is restricted may be a block smaller than or equal to 4x4.

[0367] FIG. 40 illustrates the described pred_mode_flag and pred_mode_ibc_flag inference method using an example in which the block size to which inter prediction is restricted is 4×4.

[0368] Also, in the described invention, the tile group type may be a slice type, and whether it is in skip mode may be determined from cu_skip_flag.

[0369] 41 is a diagram illustrating the inter_pred_idc value and binarization according to an embodiment of the present invention. inter_pred_idc is a parameter indicating the type of inter prediction and may be referred to as an inter prediction type parameter.

[0370] As described in FIG. 38 , bi-prediction may not be used depending on the block size. Accordingly, according to one embodiment of the present invention, for a certain block size, possible inter-predictions may be L0 uni-prediction, L1 uni-prediction, and bi-prediction, and for another block size, possible inter-predictions may be L0 uni-prediction and L1 uni-prediction. The type of inter-prediction may be indicated by inter_pred_idc. L0 uni-prediction may be inter-prediction using only reference list 0. L1 uni-prediction may be inter-prediction using only reference list 1. Bi-prediction may be inter-prediction using both reference list 0 and reference list 1. The type of inter-prediction may be determined for each CU. The inter_pred_idc values ​​indicating L0 uni-prediction, L1 uni-prediction, and bi-prediction may be PRED_L0, PRED_L1, and PRED_BI, respectively. Furthermore, the inter_pred_idc values ​​indicating L0 uni-prediction, L1 uni-prediction, and bi-prediction may be 0, 1, and 2, respectively.

[0371] According to an embodiment of the present invention, in the case of a block size in which bi-prediction is not used, the inter_pred_idc value corresponding to bi-prediction may not exist.

[0372] There may also be a binarization method for representing inter_pred_idc. This method may differ between blocks in which bi-prediction is allowed and blocks in which bi-prediction is not allowed. This may be a bin string used when parsing inter_pred_idc. If bi-prediction is allowed, inter_pred_idc may be a value corresponding to L0 uni-prediction, L1 uni-prediction, or bi-prediction. To indicate this, inter_pred_idc may be represented using a variable length binarization method. For example, values ​​corresponding to L0 uni-prediction, L1 uni-prediction, and bi-prediction may be represented as 00, 01, and 1, respectively. Alternatively, values ​​corresponding to L0 uni-prediction, L1 uni-prediction, and bi-prediction may be represented as 10, 11, and 0, respectively. Furthermore, if bi-prediction is not allowed, inter_pred_idc may be a value corresponding to L0 uni-prediction or L1 uni-prediction. Therefore, inter_pred_idc can be represented by 1 bit. For example, values ​​corresponding to L0 uni-prediction and L1 uni-prediction can be represented as 0 and 1, respectively. Alternatively, values ​​corresponding to L0 uni-prediction and L1 uni-prediction can be represented as 1 and 0, respectively.

[0373] According to one embodiment, the block size for which bi-prediction is not used may be a block size equal to or smaller than a threshold value. For example, the threshold value may be a 4x8 block or an 8x4 block. If 4x4 inter-prediction is not allowed, the block size for which bi-prediction is not used may be a 4x8 or 8x4 block. A 4x4 block may be represented as having a width + height == 8. A 4x8 or 8x4 block may be represented as having a width + height == 12.

[0374] 41, in the case of a 4x8 or 8x4 block, inter_pred_idc may have values ​​corresponding to PRED_L0 and PRED_L1. In this case, inter_pred_idc may be represented as 0 or 1.

[0375] FIG. 42 is a diagram illustrating inter_pred_idc values ​​and binarization according to one embodiment of the present invention.

[0376] As described in FIG. 41, there may be many sets of values ​​that inter_pred_idc can indicate and many signaling methods for them. For example, in a certain block, there may be three types of values ​​that inter_pred_idc can indicate, and in this case, they may be signaled using one or two bits. Also, in a certain block, there may be two types of values ​​that inter_pred_idc can indicate, and they may be signaled using b-bits. Also, in this case, the types of values ​​that inter_pred_idc can indicate and their signaling may vary based on the block size. For example, the types of values ​​that inter_pred_idc can indicate and their signaling may vary depending on whether the block size allows bi-prediction.

[0377] However, in the method described in Figure 41, there may be ambiguity in the types of values ​​that inter_pred_idc can indicate and the signaling for a certain block size. For example, when the block size is 4x8 or 8x4, both the (width + height) != 8 condition and the ((width + height == 8) || (width + height == 12)) condition may be satisfied. This may cause a mismatch in the signaling and bitstream between the encoder and decoder.

[0378] The embodiment of FIG. 42 may be a method for solving this problem. According to one embodiment of the present invention, the types of values ​​that inter_pred_idc can indicate and the signaling method may differ between when condition 1 is satisfied and when !condition 1 is satisfied. For example, condition 1 may be a block size condition under which bi-prediction is not allowed. For example, condition 1 may be a condition for a 4×8 or 8×4 block. If inter_pred_idc is signaled using 2 bits when bi-prediction is not allowed, signaling may be inefficient. In other words, PRED_BI is not indicated as the inter_pred_idc value when bi-prediction is not allowed. In one embodiment, the block size condition under which bi-prediction is not allowed may be a block size equal to or smaller than 4×8 or 8×4. Therefore, the block size under which bi-prediction is not allowed may be 4×8, 8×4, or 4×4.

[0379] Referring to FIG. 42, if the width plus height is 8 or 12, the possible values ​​for inter_pred_idc may be PRED_L0, PRED_L1. In this case, inter_pred_idc can be indicated by 1 bit. Signaling may be 0 or 1. In addition, if the width plus height is not 8 or 12, the possible values ​​for inter_pred_idc may be PRED_L0, PRED_L1, PRED_BI. In this case, inter_pred_idc can be indicated by 1 or 2 bits. Signaling may be 00, 01, 1.

[0380] FIG. 43 is a diagram illustrating inter_pred_idc values ​​and binarization according to one embodiment of the present invention.

[0381] FIG. 43 may be an embodiment for solving the problems described with reference to FIGS. 41 and 42. Also, FIG. 43 may be a method for improving efficiency over the embodiment of FIG. 42. As described above, there may be block sizes for which inter prediction is not permitted. In the embodiment of FIG. 42, if the block sizes for which inter prediction is not permitted are not taken into consideration, unnecessary condition checks may be required. For example, if inter prediction is not permitted, the inter_pred_idc value may be meaningless. However, if the condition for when inter prediction is not permitted is checked in the inter_pred_idc signaling, this would be meaningless. Therefore, according to one embodiment of the present invention, the inter_pred_idc signaling and value set may be determined by checking the condition for when bi-prediction is not permitted without checking the condition for when inter prediction is not permitted. For example, if inter prediction is not permitted, the block size may be 4x4, and if bi-prediction is not permitted, the block size may be 4x8 or 8x4.

[0382] Referring to FIG. 43, if the width + height is 12, possible values ​​for inter_pred_idc may be PRED_L0, PRED_L1. In this case, inter_pred_idc can be indicated by 1 bit. Signaling may be 0 or 1. In addition, if the width + height is not 12, possible values ​​for inter_pred_idc may be PRED_L0, PRED_L1, PRED_BI. In this case, inter_pred_idc can be indicated by 1 or 2 bits. Signaling may be 00, 01, 1.

[0383] Therefore, in effect, in the embodiment of Figure 43, for a 4x4 block, the set of inter_pred_idc values ​​and signaling corresponds to the left of the two columns in Figure 43 (the third column overall), which may differ from the embodiment of Figure 42.

[0384] According to an embodiment of the present invention, if the tree type is DUAL_TREE_CHROMA, cu_skip_flag can be parsed. If the tree type is DUAL_TREE_CHROMA, the division of luma blocks and chroma blocks may be different, and it may be possible to indicate that the corresponding chroma block is to be processed. Furthermore, if the tree type is DUAL_TREE_CHROMA and MODE_IBC is available, cu_skip_flag can be parsed. If MODE_IBC is available, sps_ibc_enabled_flag may be set to 1. This is to enable skip mode when the prediction mode of a chroma block is MODE_IBC.

[0385] The above-described embodiments of the present invention may be implemented in various ways, for example, in hardware, firmware, software, or a combination thereof.

[0386] In the case of a hardware implementation, the method according to an embodiment of the present invention may be implemented by one or more ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSDPs (Digital Signal Processing Devices), PDLs (Programmable Logic Devices), FPGAs (Field Programmable Gate Arrays), processors, controllers, microcontrollers, microprocessors, etc.

[0387] In the case of implementation by firmware or software, the methods according to the embodiments of the present invention may be implemented in the form of modules, procedures, or functions that perform the functions or operations described above. The software code is stored in a memory and executed by a processor. The memory may be located inside or outside the processor and exchange data with the processor through various means known in the art.

[0388] The above description of the present invention is for illustrative purposes only, and those skilled in the art will understand that the present invention can be easily modified into other specific forms without changing the technical spirit or essential features of the present invention. Therefore, it should be understood that the above-described embodiments are illustrative in all respects and are not limiting. For example, each component described as a single component may be implemented in a distributed form, and components described as distributed may also be implemented in a combined form.

[0389] The scope of the present invention is indicated by the claims that follow rather than by the above detailed description, and all modifications and variations that fall within the meaning and scope of the claims and their equivalents should be interpreted as being included within the scope of the present invention. [Explanation of symbols]

[0390] 110 Conversion unit 115 Quantization section 120 Inverse quantization section 125 Inverse conversion unit 130 Filtering section 150 Prediction Department 152 Intra prediction unit 154 Inter Prediction Unit 154a Motion estimation unit 154b Motion Compensation Unit 160 Entropy Coding Unit 210 Entropy Decoding Unit 220 Inverse quantization section 225 Inverse conversion unit 230 Filtering Section 250 Prediction Department 252 Intra prediction unit 254 Inter Prediction Unit

Claims

1. 1. A method for processing a video signal, comprising: determining a prediction mode for a current block; If the prediction mode of the current block is a block copy (BC) prediction mode that refers to a current picture, decoding the current block based on the BC prediction mode; and If a prediction mode of the current block is an inter prediction mode that refers to at least one picture, decoding the current block based on the inter prediction mode, A video signal processing method, wherein a set of spatial neighbor positions referenced to decode the current block in the BC prediction mode includes a portion of a set of spatial neighbor positions referenced to decode the current block in the inter prediction mode.

2. 2. The video signal processing method of claim 1, wherein a set of spatial neighbor positions referenced for decoding the current block in the inter prediction mode includes a (xCb-1, yCb-1) position when a topmost leftmost position of the current block is (xCb, yCb), and a set of spatial neighbor positions referenced for decoding the current block in the BC prediction mode does not include a (xCb-1, yCb-1) position when a topmost leftmost position of the current block is (xCb, yCb).

3. 2. The video signal processing method of claim 1, wherein a set of spatial neighbor positions referenced to decode the current block in the BC prediction mode is composed of at least one of a (xCb-1, yCb+cbHeight-1) position and a (xCb+cbWidth-1, yCb-1) position when the topmost leftmost position of the current block is (xCb, yCb), wherein the cbWidth is the width of the current block and the cbHeight is the height of the current block.

4. The step of determining a prediction mode of the current block includes: obtaining a BC mode parameter (pred_mode_bc_flag) indicating whether the prediction mode of the current block is a BC prediction mode from a bitstream; and determining a prediction mode of the current block as a BC prediction mode based on the BC mode parameter; If the BC mode parameter is not obtained from the bitstream, if a slice to which the current block belongs is a slice that does not refer to a picture other than the current picture as a reference picture, and if signaling information (sps_bc_enabled_flag) at a level higher than the current block indicates that the BC prediction mode is available, the value of the BC mode parameter is determined to be a value indicating that the BC prediction mode is used; 2. The video signal processing method of claim 1, wherein, when the BC mode parameter is not obtained from the bitstream, if the slice to which the current block belongs is a slice that can reference a picture other than the current picture as a reference picture, the value of the BC mode parameter is determined to be a value indicating that BC prediction mode is not used.

5. The step of determining a prediction mode of the current block includes: obtaining a prediction mode parameter (pred_mode_flag) indicating a prediction mode of the current block from the bitstream before obtaining a BC mode parameter (pred_mode_bc_flag) indicating whether a prediction mode of the current block is a BC prediction mode from the bitstream; 2. The video signal processing method of claim 1, wherein when the prediction mode parameter is not obtained from the bitstream, if a parallel processing unit to which the current block belongs does not refer to a picture other than the current picture as a reference picture, the prediction mode parameter is determined to be a value indicating an intra prediction mode; and when the prediction mode parameter is not obtained from the bitstream, if a parallel processing unit to which the current block belongs can refer to a picture other than the current picture as a reference picture, the prediction mode parameter is determined to be a value indicating an inter prediction mode.

6. The step of determining a prediction mode of the current block includes: obtaining a BC mode parameter (pred_mode_bc_flag) indicating whether a prediction mode of the current block is a BC prediction mode from a bitstream; 2. The video signal processing method of claim 1, wherein, when the BC mode parameter is not obtained from the bitstream, if coding tree type information (treeType) indicating division of the current block is DUAL_TREE_CHROMA indicating a chroma component, a value of the BC mode parameter is determined to be a value indicating that a BC prediction mode is not used.

7. The step of determining a prediction mode of the current block includes: obtaining a prediction mode parameter (pred_mode_flag) indicating a prediction mode of the current block from a bitstream; 2. The video signal processing method of claim 1, wherein, when the prediction mode parameter is not obtained from the bitstream, if the size of the current block does not correspond to a block size that is preset as a block size to which inter prediction is restricted, and if the parallel processing unit to which the current block belongs is a unit that can reference a picture other than the current picture as a reference picture, the prediction mode parameter is determined to be a value indicating inter prediction.

8. The step of determining a prediction mode of the current block includes: obtaining a BC mode parameter (pred_mode_bc_flag) indicating whether a prediction mode of the current block is a BC prediction mode from a bitstream; 2. The video signal processing method of claim 1, wherein, when the BC mode parameter is not obtained from the bitstream, a parameter indicating whether the current block is in skip mode indicates skip mode, and when the size of the current block corresponds to a block size that is preset as a block size to which inter prediction is restricted, the value of the BC mode parameter is determined to be a value indicating the use of BC prediction mode.

9. 9. The video signal processing method of claim 8, wherein, when the BC mode parameter is not obtained from the bitstream, if a parameter indicating whether the current block is in skip mode does not indicate skip mode, if the size of the current block does not correspond to a block size preset as a block size to which inter prediction is restricted, and if a parallel processing unit to which the current block belongs is a unit that can reference a picture other than the current picture as a reference picture, the value of the BC mode parameter is determined to be a value indicating that BC is not used.

10. 1. A method for processing a video signal, comprising: determining a prediction mode for a current block; If the prediction mode of the current block is a block copy (BC) prediction mode that refers to a current picture, generating a bitstream for encoding the current block based on the BC prediction mode; and If a prediction mode of the current block is an inter prediction mode that refers to at least one picture, generating a bitstream for encoding the current block based on the inter prediction mode; A video signal processing method, wherein a set of spatial neighbor positions referenced for encoding the current block in the BC prediction mode includes a portion of a set of spatial neighbor positions referenced for encoding the current block in the inter prediction mode.

11. 1. A video signal processing device, comprising: a processor; The processor: determining a prediction mode for the current block; If the prediction mode of the current block is a block copy (BC) prediction mode that refers to a current picture, the current block is decoded based on the BC prediction mode; If a prediction mode of the current block is an inter prediction mode that refers to at least one picture, decoding the current block based on the inter prediction mode; A video signal processing device, wherein a set of spatial neighbor positions referenced to decode the current block in the BC prediction mode includes a portion of a set of spatial neighbor positions referenced to decode the current block in the inter prediction mode.

12. 12. The video signal processing device of claim 11, wherein a set of spatial neighbor positions referenced for decoding the current block in the inter prediction mode includes a (xCb-1, yCb-1) position when a topmost leftmost position of the current block is (xCb, yCb), and a set of spatial neighbor positions referenced for decoding the current block in the BC prediction mode does not include a (xCb-1, yCb-1) position when a topmost leftmost position of the current block is (xCb, yCb).

13. 12. The video signal processing device of claim 11, wherein a set of spatial neighbor positions referenced for decoding the current block in the BC prediction mode includes at least one of a (xCb-1, yCb+cbHeight-1) position and a (xCb+cbWidth-1, yCb-1) position when a topmost leftmost position of the current block is (xCb, yCb), wherein the cbWidth is a width of the current block and the cbHeight is a height of the current block.

14. The processor acquires a BC mode parameter (pred_mode_bc_flag) indicating whether a prediction mode of the current block is a BC prediction mode from a bitstream, and determines the prediction mode of the current block to be a BC prediction mode based on the BC mode parameter; 12. The video signal processing device of claim 11, wherein, when the BC mode parameter is not obtained from the bitstream, the slice to which the current block belongs is a slice that does not reference a picture other than the current picture as a reference picture, and signaling information (sps_bc_enabled_flag) at a level higher than the current block indicates that the BC prediction mode is available, the value of the BC mode parameter is determined to be a value indicating that the BC prediction mode is used; and when the BC mode parameter is not obtained from the bitstream, and the slice to which the current block belongs is a slice that does not reference a picture other than the current picture as a reference picture, the value of the BC mode parameter is determined to be a value indicating that the BC prediction mode is not used.

15. The processor obtains a prediction mode parameter (pred_mode_flag) indicating a prediction mode of the current block from the bitstream before obtaining a BC mode parameter (pred_mode_bc_flag) indicating whether the prediction mode of the current block is a BC prediction mode from the bitstream; If the prediction mode parameter is not obtained from the bitstream and a parallel processing unit to which the current block belongs does not refer to a picture other than the current picture as a reference picture, the prediction mode parameter is determined to be a value indicating an intra prediction mode; The video signal processing device of claim 11, wherein if the prediction mode parameter is not obtained from the bitstream and the parallel processing unit to which the current block belongs is a unit that can reference a picture other than the current picture as a reference picture, the prediction mode parameter is determined to be a value indicating an inter prediction mode.

16. The processor obtains a BC mode parameter (pred_mode_bc_flag) indicating whether a prediction mode of the current block is a BC prediction mode from a bitstream; 12. The video signal processing apparatus of claim 11, wherein if the BC mode parameter is not acquired from the bitstream and coding tree type information (treeType) indicating division of the current block is DUAL_TREE_CHROMA indicating a chroma component, a value of the BC mode parameter is determined to be a value indicating that a BC prediction mode is not used.

17. The processor obtains a prediction mode parameter (pred_mode_flag) indicating a prediction mode of the current block from a bitstream; 12. The video signal processing device of claim 11, wherein if the prediction mode parameter is not obtained from the bitstream, the size of the current block does not correspond to a block size that is preset as a block size to which inter prediction is restricted, and a parallel processing unit to which the current block belongs is a unit that can reference a picture other than the current picture as a reference picture, the prediction mode parameter is determined to be a value indicating inter prediction.

18. The processor obtains a BC mode parameter (pred_mode_bc_flag) indicating whether a prediction mode of the current block is a BC prediction mode from a bitstream; 12. The video signal processing device of claim 11, wherein if the BC mode parameter is not acquired from the bitstream, a parameter indicating whether the current block is in skip mode indicates skip mode, and the size of the current block corresponds to a block size that is preset as a block size to which inter prediction is restricted, the value of the BC mode parameter is determined to be a value indicating the use of BC prediction mode.

19. 20. The video signal processing device of claim 18, wherein if the BC mode parameter is not acquired from the bitstream, a parameter indicating whether the current block is in skip mode does not indicate skip mode, the size of the current block does not correspond to a block size that is preset as a block size to which inter prediction is restricted, and a parallel processing unit to which the current block belongs is a unit that can reference a picture other than the current picture as a reference picture, the value of the BC mode parameter is determined to be a value indicating that BC is not used.

20. 1. A video signal processing device, comprising: a processor; The processor: determining a prediction mode for the current block; If the prediction mode of the current block is a block copy (BC) prediction mode that refers to a current picture, a bitstream for encoding the current block is generated based on the BC prediction mode; If a prediction mode of the current block is an inter prediction mode that refers to at least one picture, generating a bitstream for encoding the current block based on the inter prediction mode; A video signal processing device, wherein a set of spatial neighbor positions referenced for encoding the current block in the BC prediction mode includes a portion of a set of spatial neighbor positions referenced for encoding the current block in the inter prediction mode.

21. A computer-readable recording medium storing a bitstream for video signal processing, comprising: the bitstream includes prediction mode information of a current block; If a prediction mode of the current block is a block copy (BC) prediction mode that refers to a current picture, a bitstream encoding the current block based on the BC prediction mode is included; If the prediction mode of the current block is an inter prediction mode that refers to at least one picture, a bitstream encoding the current block based on the inter prediction mode is included; A computer-readable recording medium, wherein a set of spatial neighbor positions referenced for encoding the target block in the BC prediction mode includes a portion of a set of spatial neighbor positions referenced for encoding the target block in the inter prediction mode.

Citation Information

Patent Citations

  • Unified intra-block copy and inter-prediction

    US20160057420A1

  • Unified intra block copy and inter prediction modes

    WO2015192353A1

  • Intra block copy coding with temporal block vector prediction

    WO2016048834A1

  • Weights in combined inter intra prediction mode

    WO2020098782A1

  • Buffer management for intra block copy in video coding

    WO2020156540A1