Video signal processing method and apparatus using current picture reference

By adjusting the reference location set of the prediction mode in video signal processing, the encoding and decoding process of video signals is optimized, solving the problem of insufficient encoding efficiency in existing technologies and achieving more efficient video signal processing.

CN118741098APending Publication Date: 2024-10-01VIDACIO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410898268.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2019-04-24
Filing Date
2019-12-12
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing video signal processing methods are inefficient in terms of coding efficiency, and more efficient video signal processing methods and devices are needed.

Method used

By determining the prediction mode of the current block and adjusting the set of reference locations in both block copy (BC) prediction mode and inter-frame prediction mode, the encoding and decoding process of the video signal is optimized. This includes adjusting the set of spatially adjacent locations of the current block reference in BC prediction mode, which is also included in some of the locations in inter-frame prediction mode.

Benefits of technology

It improves the encoding efficiency of video signals and enhances the performance of encoding and decoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118741098A_ABST
    Figure CN118741098A_ABST
Patent Text Reader

Abstract

The invention relates to a video signal processing method and apparatus using a current picture reference. 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.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the patent application with application number 201980082678.X (PCT / KR2019 / 017639) filed on June 11, 2021, with an international application date of December 12, 2019, and the invention name is "Video signal processing method and device using current picture reference". Technical Field

[0002] The present disclosure relates to a method and apparatus for processing a video signal, and more particularly, to a video signal processing method and apparatus for encoding and decoding a video signal. Background Art

[0003] Compression coding refers to a series of signal processing techniques for sending digitized information through communication lines or storing information in a form suitable for storage media. Objects of compression coding include objects such as voice, video, and text, and in particular, the technology for performing compression coding on images is called video compression. Compression coding of video signals is performed by removing excess information in consideration of spatial correlation, temporal correlation, and random 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

[0004] Technical issues

[0005] An aspect of the present disclosure is to improve coding efficiency of video signals.

[0006] Technical Solution

[0007] In order to solve the above problems, the present disclosure provides a video signal processing device and a video signal processing method.

[0008] According to an embodiment of the present disclosure, a method for processing a video signal is provided. The method includes: determining a prediction mode of a current block; when the prediction mode of the current block is a block copy (BC) prediction mode with reference to a current picture, decoding the current block based on the BC prediction mode; when the prediction mode of the current block is an inter-frame prediction mode with reference to at least one picture, decoding the current block based on the inter-frame prediction mode, wherein a set of spatial neighboring positions referenced in the BC prediction mode for decoding the current block includes some of the set of spatial neighboring positions referenced in the inter-frame prediction mode for decoding the current block.

[0009] According to an embodiment of the present disclosure, a method for processing a video signal is provided. The method includes: determining a prediction mode of a current block; when the prediction mode of the current block is a block copy (BC) prediction mode in which a current picture is referenced, generating a bitstream for encoding the current block based on the BC prediction mode; and when the prediction mode of the current block is an inter-frame prediction mode in which at least one picture is referenced, generating a bitstream for encoding the current block based on the inter-frame prediction mode, wherein a set of spatial neighboring positions referenced for encoding the current block in the BC prediction mode includes some of the set of spatial neighboring positions referenced for encoding the current block in the inter-frame prediction mode.

[0010] According to an embodiment of the present disclosure, a device for processing a video signal is provided. The device includes: a processor, wherein the processor is configured to determine a prediction mode of a current block, when the prediction mode of the current block is a block copy (BC) prediction mode in which a current picture is referenced, decode the current block based on the BC prediction mode; and when the prediction mode of the current block is an inter-frame prediction mode in which at least one picture is referenced, decode the current block based on the inter-frame prediction mode, and a set of spatial neighboring positions referenced in the BC prediction mode for decoding the current block includes some of the set of spatial neighboring positions referenced in the inter-frame prediction mode for decoding the current block.

[0011] According to an embodiment of the present disclosure, a device for processing a video signal is provided. The device includes: a processor, wherein the processor is configured to determine a prediction mode of a current block; when the prediction mode of the current block is a block copy (BC) prediction mode in which a current picture is referenced, a bit stream for encoding the current block is generated based on the BC prediction mode; and when the prediction mode of the current block is an inter-frame prediction mode in which at least one picture is referenced, a bit stream for encoding the current block is generated based on the inter-frame prediction mode, and a set of spatial neighboring positions referenced in the BC prediction mode for encoding the current block includes some of the set of spatial neighboring positions referenced in the inter-frame prediction mode for encoding the current block.

[0012] According to an embodiment of the present disclosure, a computer-readable recording medium storing a bitstream for processing a video signal is provided. The bitstream contains prediction mode information of a target block, and includes a bitstream for encoding the target block based on a block copy (BC) prediction mode when the prediction mode of the target block is a BC prediction mode in which a target picture is referenced, and a bitstream for encoding the target block based on an inter-prediction mode when the prediction mode of the target block is an inter-prediction mode in which at least one picture is referenced, wherein a set of spatial neighboring positions referenced for encoding the target block in the BC prediction mode includes some of the sets of spatial neighboring positions referenced for encoding the target block in the inter-prediction mode.

[0013] Beneficial Effects

[0014] According to the embodiments of the present disclosure, the coding efficiency of a video signal can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 is a schematic block diagram of a video signal encoding apparatus according to an embodiment of the present invention.

[0016] Figure 2 is a schematic block diagram of a video signal decoding apparatus according to an embodiment of the present invention.

[0017] Figure 3 An embodiment in which a coding tree unit is divided into coding units in a picture is shown.

[0018] Figure 4 Embodiments of methods for signaling partitioning of quadtrees and multi-type trees are shown.

[0019] Figure 5 An embodiment of reference samples used to predict a current block in an inter prediction mode is illustrated.

[0020] Figure 6 An embodiment of a prediction mode used in intra prediction is illustrated.

[0021] Figure 7 Inter-frame prediction according to an embodiment of the present disclosure is illustrated.

[0022] Figure 8 A motion vector signaling method according to an embodiment of the present disclosure is illustrated.

[0023] Fig. 9 The syntax of the motion vector difference (MVD) according to an embodiment of the present disclosure is illustrated.

[0024] Fig.10 Adaptive Motion Vector Resolution (AMVR) signaling according to an embodiment of the present disclosure is illustrated.

[0025] Fig.11 FIG. 1 illustrates inter-prediction related syntax according to an embodiment of the present disclosure.

[0026] Fig.12 The spatial proximity according to an embodiment of the present disclosure is illustrated.

[0027] Fig.13 A reference to a current picture according to an embodiment of the present disclosure is illustrated.

[0028] Fig.14 A method of referring to neighboring candidates according to an embodiment of the present disclosure is illustrated.

[0029] Fig.15 FIG. 1 illustrates a block position and a configuration of a motion candidate list according to an embodiment of the present disclosure.

[0030] Fig.16 FIG. 1 illustrates a block position and a configuration of a motion candidate list according to an embodiment of the present disclosure.

[0031] Fig.17 The use of spatial neighboring candidates according to an embodiment of the present disclosure is illustrated.

[0032] Fig.18 A motion vector according to an embodiment of the present disclosure is illustrated.

[0033] Fig.19 The syntax of MVD according to an embodiment of the present disclosure is illustrated.

[0034] Fig. 20 A motion vector according to an embodiment of the present disclosure is illustrated.

[0035] Fig.21 The syntax of MVD according to an embodiment of the present disclosure is illustrated.

[0036] Fig. 22 The syntax of MVD according to an embodiment of the present disclosure is illustrated.

[0037] Fig.23 Blocks and sizes according to an embodiment of the present disclosure are illustrated.

[0038] Fig.24 A configuration of a merge candidate list according to an embodiment of the present disclosure is illustrated.

[0039] Fig.25 Block positions and syntax according to an embodiment of the present disclosure are illustrated.

[0040] Fig.26 Illustrated is the resetting of the space for storing the history of the HMVP according to an embodiment of the present disclosure.

[0041] Fig. 27 A compilation unit syntax according to an embodiment of the present disclosure is illustrated.

[0042] Fig.28 Prediction mode signaling according to an embodiment of the present disclosure is illustrated.

[0043] Fig.29 Prediction mode signaling according to an embodiment of the present disclosure is illustrated.

[0044] Fig.30 Prediction mode signaling according to an embodiment of the present disclosure is illustrated.

[0045] Fig.31 A compilation unit syntax according to an embodiment of the present disclosure is illustrated.

[0046] Fig.32Prediction mode signaling according to an embodiment of the present disclosure is illustrated.

[0047] Fig.33 A compilation unit syntax according to an embodiment of the present disclosure is illustrated.

[0048] Fig.34 A compilation unit syntax according to an embodiment of the present disclosure is illustrated.

[0049] Fig.35 Derivation of intra prediction modes for chroma components according to an embodiment of the present disclosure is illustrated.

[0050] Fig.36 Derivation of intra prediction modes for chroma components according to an embodiment of the present disclosure is illustrated.

[0051] Fig.37 A compilation unit syntax according to an embodiment of the present disclosure is illustrated.

[0052] Fig.38 A grammatical structure according to an embodiment of the present disclosure is illustrated.

[0053] Fig.39 A method of inferring a signaling value according to an embodiment of the present disclosure is illustrated.

[0054] Fig.40 A method of inferring a signaling value according to an embodiment of the present disclosure is illustrated.

[0055] Fig.41 The value and binarization of inter_pred_idc according to an embodiment of the present disclosure are illustrated.

[0056] Fig.42 The value and binarization of inter_pred_idc according to an embodiment of the present disclosure are illustrated.

[0057] Fig.43 The value and binarization of inter_pred_idc according to an embodiment of the present disclosure are illustrated. DETAILED DESCRIPTION

[0058] In order to solve the above problems, the present disclosure provides a video signal processing device and a video signal processing method.

[0059] According to an embodiment of the present disclosure, a method for processing a video signal is provided. The method includes: determining a prediction mode of a current block; when the prediction mode of the current block is a block copy (BC) prediction mode with reference to a current picture, decoding the current block based on the BC prediction mode; when the prediction mode of the current block is an inter-frame prediction mode with reference to at least one picture, decoding the current block based on the inter-frame prediction mode, wherein the set of spatial neighboring positions referenced in the BC prediction mode for decoding the current block includes some of the set of spatial neighboring positions referenced in the inter-frame prediction mode for decoding the current block. The BC prediction mode may be named an intra-block copy (IBC) prediction mode or a current picture reference (CPR) prediction mode.

[0060] When the upper left position of the current block is (xCb, yCb), the set of spatial neighboring positions referenced for decoding the current block in the inter-prediction mode may include the position of (xCb-1, yCb-1), and when the upper left position of the current block is (xCb, yCb), the set of spatial neighboring positions referenced for decoding the current block in the BC prediction mode may not include the position of (xCb-1, yCb-1).

[0061] When the upper left position of the current block is (xCb, yCb), the set of spatial neighboring positions referenced for decoding the current block in the BC prediction mode may include at least one of the position of (xCb-1, yCb+cbHeight-1) and the position of (xCb+cbWidth-1, yCb-1), and cbWidth may be the width of the current block, and cbHeight may be the height of the current block.

[0062] The operation of 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 the BC prediction mode from the bitstream and determining the prediction mode of the current block as the BC prediction mode based on the BC mode parameter. When the BC mode is named IBC mode, the BC mode parameter may be indicated by pred_mode_ibc_flag.

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

[0064] When the BC mode parameter is not obtained from the bitstream, if the 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 when signaling information (sps_bc_enabled_flag) at a higher level than the current block indicates that the BC prediction mode is available, the value of the BC mode parameter can be determined as a value indicating that the BC prediction mode is not used.

[0065] When the BC mode parameter is not obtained from the bitstream, if the 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 value of the BC mode parameter can be determined as a value indicating that the BC prediction mode is not used.

[0066] 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 refer to a picture other than the current picture as a reference picture, the value of the BC mode parameter can be determined as a value indicating that the BC prediction mode is not used.

[0067] The operation of determining the prediction mode of the current block may include an operation of acquiring a prediction mode parameter (pred_mode_flag) indicating the prediction mode of the current block from the bitstream before acquiring a BC mode parameter (pred_mode_bc_flag) indicating whether the prediction mode of the current block is the BC prediction mode from the bitstream.

[0068] When the prediction mode parameter is not acquired from the bitstream, if the parallel processing unit to which the current block belongs is a unit that does not refer to a picture other than the current picture as a reference picture, the prediction mode parameter is determined as a value indicating the intra prediction mode.

[0069] When the prediction mode parameter is not obtained from the bitstream, if the 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 can be determined as a value indicating the inter-frame prediction mode.

[0070] The operation of determining the prediction mode of the current block may include an operation of obtaining a BC mode parameter indicating whether the prediction mode of the current block is the BC prediction mode from the bitstream. When the BC mode parameter is not obtained from the bitstream, if the coding tree type information (treeType) indicating the partition of the current block is DUAL_TREE_CHROMA indicating the chroma component, the value of the BC mode parameter may be determined as a value indicating that the BC prediction mode is not used.

[0071] The operation of determining the prediction mode of the current block may include an operation of obtaining a prediction mode parameter indicating the prediction mode of the current block from a bitstream, and 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 preset as a block size restricted for inter-frame prediction and the 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 can be determined as a value indicating inter-frame prediction.

[0072] The operation of determining the prediction mode of the current block may include an operation of obtaining a BC mode parameter indicating whether the prediction mode of the current block is the BC prediction mode from a bitstream, and when the BC mode parameter is not obtained from the bitstream, if the parameter indicating whether the mode of the current block is the skip mode indicates the skip mode and the size of the current block corresponds to a block size preset as a block size in which inter-frame prediction is restricted, the value of the BC mode parameter may be determined as a value indicating that the BC prediction mode is used.

[0073] When the BC mode parameter is not obtained from the bitstream, if the parameter indicating whether the mode of the current block is the skip mode does not indicate the skip mode, the size of the current block does not correspond to the block size restricted by inter-frame prediction, and the 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 value of the BC mode parameter can be determined as a value indicating that BC is not used.

[0074] The operation of determining the prediction mode of the current block may include, before obtaining from the bitstream a BC mode parameter indicating whether the prediction mode of the current block is the BC prediction mode, an operation of obtaining from the bitstream a prediction mode parameter indicating the prediction mode of the current block, and when the prediction mode parameter is not obtained from the bitstream, if the size of the current block corresponds to a block size preset as a block size in which inter-frame prediction is restricted, the prediction mode parameter may be determined as a value indicating intra-frame prediction.

[0075] The operation of decoding the current block based on the inter-frame prediction mode may include: an operation of obtaining an inter-frame prediction type parameter (inter_pred_idc) indicating the inter-frame prediction type of the current block from a bitstream, and an operation of determining a reference list of the current block based on the size of the current block and the inter-frame prediction type parameter, when the sum of the width and height of the current block is greater than 12, the inter-frame prediction type parameter may indicate at least one of reference list L0 and reference list L1, and when the sum of the width and height of the current block is 12, the inter-frame prediction type parameter may indicate one of reference list L0 and reference list L1.

[0076] When 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 reference list L0, bit signaling 01 may indicate reference list L1, and bit signaling 1 may indicate reference list L0 and reference list L1.

[0077] According to an embodiment of the present disclosure, a method for processing a video signal is provided. The method includes: determining a prediction mode of a current block; when the prediction mode of the current block is a block copy (BC) prediction mode in which a current picture is referenced, generating a bitstream for encoding the current block based on the BC prediction mode; and when the prediction mode of the current block is an inter-frame prediction mode in which at least one picture is referenced, generating a bitstream for encoding the current block based on the inter-frame prediction mode, wherein a set of spatial neighboring positions referenced for encoding the current block in the BC prediction mode includes some of the set of spatial neighboring positions referenced for encoding the current block in the inter-frame prediction mode.

[0078] According to an embodiment of the present disclosure, a device for processing a video signal is provided. The device includes: a processor, wherein the processor is configured to determine a prediction mode of a current block, when the prediction mode of the current block is a block copy (BC) prediction mode in which a current picture is referenced, decode the current block based on the BC prediction mode; and when the prediction mode of the current block is an inter-frame prediction mode in which at least one picture is referenced, decode the current block based on the inter-frame prediction mode, and a set of spatial neighboring positions referenced in the BC prediction mode for decoding the current block includes some of the set of spatial neighboring positions referenced in the inter-frame prediction mode for decoding the current block.

[0079] When the upper left position of the current block is (xCb, yCb), the set of spatial neighboring positions referenced for decoding the current block in the inter-prediction mode may include the position of (xCb-1, yCb-1), and when the upper left position of the current block is (xCb, yCb), the set of spatial neighboring positions referenced for decoding the current block in the BC prediction mode may not include the position of (xCb-1, yCb-1).

[0080] When the upper leftmost position of the current block is (xCb, yCb), the set of spatial neighboring positions referenced for decoding the current block in the BC prediction mode may include at least one of the position of (xCb-1, yCb+cbHeight-1) and the position of (xCb+cbWidth-1, yCb-1), and cbWidth may be the width of the current block, and cbHeight may be the height of the current block.

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

[0082] When 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 refer to a picture other than the current picture as a reference picture, and the signaling information (sps_bc_enabled_flag) at a higher level than the current block indicates that the BC prediction mode is available, the value of the BC mode parameter can be determined as a value indicating the use of the BC prediction mode.

[0083] When the BC mode parameter is not obtained from the bitstream, if the 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, the value of the BC mode parameter may be determined as a value indicating that the BC prediction mode is not used.

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

[0085] 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 refer to a picture other than the current picture as a reference picture, the value of the BC mode parameter can be determined as a value indicating that the BC prediction mode is not used.

[0086] The processor may be configured to obtain a prediction mode parameter indicating a prediction mode of a current block from a 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 when the prediction mode parameter is not obtained from the bitstream, if the parallel processing unit to which the current block belongs is a unit that does not refer to a picture other than the current picture as a reference picture, the prediction mode parameter may be determined as a value indicating an intra-frame prediction mode, and when the prediction mode parameter is not obtained from the bitstream, if the 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 as a value indicating an inter-frame prediction mode.

[0087] The processor may be configured to obtain a BC mode parameter indicating whether the prediction mode of the current block is the BC prediction mode from the bitstream. When the BC mode parameter is not obtained from the bitstream and the coding tree type information (treeType) indicating the partition of the current block is DUAL_TREE_CHROMA indicating the chroma component, the value of the BC mode parameter may be determined as a value indicating that the BC prediction mode is not used.

[0088] The processor may be configured to obtain a prediction mode parameter indicating a prediction mode of a current block from a bitstream. When the prediction mode parameter is not obtained from the bitstream, the size of the current block does not correspond to a block size preset as a block size limited for inter-frame prediction, and the 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 is determined as a value indicating inter-frame prediction.

[0089] The processor may be configured to obtain a BC mode parameter indicating whether a prediction mode of a current block is a BC prediction mode from a bitstream, and when the BC mode parameter is not obtained from the bitstream, the parameter indicating whether the mode of the current block is a skip mode indicates a skip mode, and the size of the current block corresponds to a block size preset as a block size in which inter-frame prediction is restricted, determine the value of the BC mode parameter as a value indicating use of the BC prediction mode.

[0090] When the BC mode parameter is not obtained from the bitstream, the parameter indicating whether the mode of the current block is the skip mode does not indicate the skip mode, the size of the current block does not correspond to the block size restricted for inter-frame prediction, and the 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 value of the BC mode parameter can be determined as a value indicating that BC is not used.

[0091] According to an embodiment of the present disclosure, a device for processing a video signal is provided. The device includes: a processor, wherein the processor is configured to determine a prediction mode of a current block; when the prediction mode of the current block is a block copy (BC) prediction mode with reference to a current picture, generate a bitstream for encoding the current block based on the BC prediction mode; and when the prediction mode of the current block is an inter-frame prediction mode with reference to at least one picture, generate a bitstream for encoding the current block based on the inter-frame prediction mode, and the set of spatial neighboring positions referenced in the BC prediction mode for encoding the current block includes some of the set of spatial neighboring positions referenced in the inter-frame prediction mode for encoding the current block.

[0092] The processor may be configured to obtain a prediction mode parameter indicating a prediction mode of a current block from a bitstream before obtaining a BC mode parameter indicating whether a prediction mode of a current block is a BC prediction mode from a bitstream, and when the prediction mode parameter is not obtained from the bitstream, if a size of the current block corresponds to a block size preset as a block size restricted for inter-frame prediction, the prediction mode parameter may be determined as a value indicating intra-frame prediction.

[0093] The processor can be configured to obtain an inter-frame prediction type parameter indicating the inter-frame prediction type of the current block from the bitstream, and determine a reference list of the current block based on the size of the current block and the inter-frame prediction type parameter, and when the sum of the width and height of the current block is greater than 12, the inter-frame prediction type parameter can indicate at least one of reference list L0 and reference list L1, and when the sum of the width and height of the current block is 12, it can indicate one of reference list L0 and reference list L1.

[0094] When 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 reference list L0, bit signaling 01 may indicate reference list L1, and bit signaling 1 may indicate reference list L0 and reference list L1.

[0095] According to an embodiment of the present disclosure, a computer-readable recording medium storing a bitstream for processing a video signal is provided. The bitstream may include prediction mode information of a target block, and includes a bitstream for encoding the target block based on a block copy (BC) prediction mode when the prediction mode of the target block is a block copy (BC) prediction mode in which a target picture is referenced, and a bitstream for encoding the target block based on an inter-frame prediction mode when the prediction mode of the target block is an inter-frame prediction mode in which at least one picture is referenced, wherein a set of spatial neighboring positions referenced for encoding the target block in the BC prediction mode includes some of the set of spatial neighboring positions referenced for encoding the target block in the inter-frame prediction mode.

[0096] Mode for carrying out the invention

[0097] Considering the functions in the present disclosure, the terms used in this specification may be common terms that are currently widely used, but may be changed according to the intention of those skilled in the art, customs, or the emergence of new technologies. In addition, in some cases, there may be terms arbitrarily selected by the applicant, and in this case, their meanings are described in the corresponding description section of the present disclosure. Therefore, the terms used in this specification should be interpreted based on the substantial meaning of the terms and contents throughout the specification.

[0098] In this specification, some terms may be explained as follows. In some cases, coding may be explained as encoding or decoding. In this specification, a device that generates a video signal bit stream by performing coding (coding) of a video signal is referred to as a coding device or encoder, and a device that performs decoding (decoding) of a video signal bit stream to reconstruct a video signal is referred to as a decoding device or decoder. In addition, in this specification, a video signal processing device is used as a term that includes the concepts of both encoders and decoders. Information is a term that includes all values, parameters, coefficients, elements, etc. In some cases, the meaning is interpreted differently, so the present disclosure is not limited thereto. "Unit" is used as a meaning that refers to a basic unit of image processing or a specific position of a picture, and refers to an image area that includes both luminance components and chrominance components. In addition, "block" refers to an image area that includes a specific component among luminance components and chrominance components (ie, Cb and Cr). However, depending on the embodiment, terms such as "unit", "block", "partition" and "area" may be used interchangeably. In addition, in this specification, a unit may be used as a concept that includes all of a coding unit, a prediction unit and a transform unit. A picture indicates a field or a frame, and these terms may be used interchangeably according to an embodiment.

[0099] Figure 1 is a schematic block diagram of a video signal encoding apparatus according to an embodiment of the present invention. Figure 1 , the encoding device 100 of the present disclosure 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.

[0100] The transform unit 110 obtains the value of the transform coefficient by transforming the residual signal, which is the difference between the input video signal and the prediction signal generated by the prediction unit 150. For example, discrete cosine transform (DCT), discrete sine transform (DST) or wavelet transform can be used. DCT and DST perform transformation by dividing the input image signal into a plurality of blocks. In the transformation, the coding efficiency can vary according to the distribution and characteristics of the values ​​in the transformation area. The quantization unit 115 quantizes the value of the transform coefficient value output from the transform unit 110.

[0101] In order to improve the coding efficiency, instead of the method of coding the image signal as it is, a method is used to predict the picture using the area that has been encoded by the prediction unit 150, and to obtain the reconstructed image by adding the residual value between the original picture and the predicted picture to the predicted picture. In order to prevent the mismatch between the encoder and the decoder, when the prediction is performed in the encoder, information that can be used in the decoder should be used. To this end, the encoder performs the process of reconstructing the encoded current block again. The inverse quantization unit 120 inversely quantizes the value of the transform coefficient, and the inverse transform unit 125 reconstructs the residual value using the inversely quantized transform coefficient value. At the same time, the filtering unit 130 performs a filtering operation to improve the quality of the reconstructed picture and improve the coding efficiency. For example, a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter may be included. The filtered picture is output or stored in a decoded picture buffer (DPB) 156 to be used as a reference picture.

[0102] 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 to predict the current picture by using the reference picture stored in the DBP 156. The intra prediction unit 152 performs intra prediction according to the reconstructed sample in the current picture, and transmits intra encoding information to the entropy coding unit 160. The intra encoding information may include at least one of an intra prediction mode, a most probable mode (MPM) flag, and an MPM index. The inter prediction unit 154 may include a motion estimation unit 154a and a motion compensation unit 154b. The motion estimation unit 154a obtains a motion vector value of a current area by referring to a specific area of ​​the reconstructed reference picture. The motion estimation unit 154a transmits motion information (reference picture index, motion vector information, etc.) for the reference area to the entropy coding unit 160. The motion compensation unit 154b performs motion compensation by using the motion vector value transferred from the motion estimation unit 154a. The inter prediction unit 154 transfers the inter encoding information including the motion information about the reference region to the entropy coding unit 160 .

[0103] When performing the above-mentioned picture prediction, the transform unit 110 transforms the residual value between the original picture and the predicted picture to obtain a transform coefficient value. In this case, the transform can be performed in units of a specific block within the picture, and the size of the specific block can be changed within a preset range. The quantization unit 115 quantizes the transform coefficient value generated in the transform unit 110 and sends it to the entropy coding unit 160.

[0104] The entropy coding unit 160 performs entropy coding on the quantized transform coefficients, intra-frame coding information, inter-frame coding information, etc. to generate a video signal bit stream. In the entropy coding unit 160, a variable length coding (VLC) scheme, an arithmetic coding scheme, etc. can be used. The variable length coding (VLC) scheme includes transforming the input symbol into a continuous codeword, and the length of the codeword can be variable. For example, frequently occurring symbols are represented by short codewords, while symbols that rarely occur are represented by long codewords. A context-based adaptive variable length coding (CAVLC) scheme can be used as a variable length coding scheme. Arithmetic coding can transform continuous data symbols into a single prime number, wherein arithmetic coding can obtain the optimal bits required to represent each symbol. Context-based adaptive binary arithmetic coding (CABAC) can be used as arithmetic coding.

[0105] The generated bitstream is encapsulated using a network abstraction layer (NAL) unit as a basic unit. A NAL unit includes an integer number of coded coding tree units. In order to decode the bitstream in a video decoder, first, the bitstream must be separated into NAL units, and then each separated NAL unit must be decoded. At the same time, the information required to decode the video signal bitstream can be sent through a raw byte sequence payload (RBSP) of a high-level set such as a picture parameter set (PPS), a sequence parameter set (SPS), a video parameter set (VPS), etc.

[0106] at the same time, Figure 1 The block diagram of the encoding device 100 according to an embodiment of the present invention is shown, and the blocks shown separately logically distinguish and show the elements of the encoding device 100. Therefore, the elements of the encoding device 100 described above may be installed as one chip or multiple chips depending on the design of the device. According to an embodiment, the operation of each element of the encoding device 100 described above may be performed by a processor (not shown).

[0107] Figure 2 2 is a schematic block diagram of a video signal decoding apparatus 200 according to an embodiment of the present invention. Figure 2 The decoding device 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.

[0108] The entropy decoding unit 210 performs entropy decoding on the video signal bit stream to extract transform coefficient information, intra-frame coding information, inter-frame coding information, etc. for each region. The entropy decoding unit 210 obtains a quantized transform coefficient by inversely binarizing the binary code. The inverse quantization unit 220 inversely quantizes the quantized transform coefficient, and the inverse transform unit 225 reconstructs a residual value by using the inversely quantized transform coefficient. The video signal processing apparatus 200 reconstructs the original pixel value by adding the residual value obtained by the inverse transform unit 225 to the predicted value obtained by the prediction unit 250.

[0109] At the same time, the filtering unit 230 performs filtering on the picture to improve the image quality. This may include a deblocking filter for reducing block distortion and / or an adaptive loop filter for removing distortion of the entire picture. The filtered picture is output or stored in the DPB 256 to be used as a reference picture for the next picture.

[0110] The prediction unit 250 includes an intra prediction unit 252 and an inter prediction unit 254. The prediction unit 250 generates a predicted picture by using the encoding type, the transform coefficient of each region, and the intra / inter coding information decoded by the above-mentioned entropy decoding unit 210. In order to reconstruct the current block in which decoding is performed, the decoded region of the current picture or other pictures including the current block can be used. In reconstruction, only the current picture, that is, the picture (or tile / slice) in which intra prediction is performed is called an intra picture or an I picture (or tile / slice), and the picture (or tile / slice) in which all intra predictions and inter predictions can be performed is called an inter picture (or tile / slice). In order to predict the sample value of each block in the inter picture (or tile / slice), the picture (or tile / slice) using at most one motion vector and a reference picture index is called a predicted picture or a P picture (or tile / slice), and the picture (or tile / slice) using at most two motion vectors and reference picture indexes is called a bidirectional prediction picture or a 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 a reference picture index.

[0111] The intra prediction unit 252 generates a prediction block using intra coding information and reconstructed samples in the current picture. As described above, the intra coding information may include at least one of an intra prediction mode, a most probable mode (MPM) flag, and an MPM index. The intra prediction unit 252 predicts the pixel value of the current block by using the reconstructed pixels located on the left and / or upper side of the current block as reference pixels. According to an embodiment, the reference pixel may be a pixel adjacent to the left boundary and / or the upper boundary of the current block. According to another embodiment, the reference pixel may be a pixel of a neighboring block of the current block, a neighboring pixel within a preset distance from the left boundary of the current block and / or a neighboring pixel within a preset distance from the upper boundary of the current block. In this case, the neighboring block of the current block may include at least one of a left (L) block, an upper (A) block, a lower left (BL) block, an upper right (AR) block, or an upper left (AL) block adjacent to the current block.

[0112] The inter prediction unit 254 generates a prediction block using the reference picture and inter coding information stored in the DPB 256. The inter coding information may include a motion information set (reference picture index, motion vector information, etc.) for the current block of the reference block. Inter prediction may include L0 prediction, L1 prediction, and bidirectional prediction. L0 prediction means prediction using a reference picture included in the L0 picture list, and L1 prediction means prediction using a reference picture included in the L1 picture list. To this end, a motion information set (e.g., motion vector and reference picture index) may be required. In the bidirectional prediction method, up to two reference areas may be used, and the two reference areas may exist in the same reference picture or may exist in different pictures. That is, in the bidirectional prediction method, up to two motion information sets (e.g., motion vector and reference picture index) may be used, and the two motion vectors may correspond to the same reference picture index or different reference picture indexes. In this case, in terms of time, the reference picture may be displayed (or output) before and after the current picture.

[0113] The inter-frame prediction unit 254 can use the motion vector and the reference picture index to obtain a reference block of the current block. The reference block is in the reference picture corresponding to the reference picture index. Moreover, the pixel value of the block specified by the motion vector or its interpolated value can be used as a predictor of the current block. For motion prediction with sub-pel unit pixel accuracy, for example, an 8-tap interpolation filter for luminance signals and a 4-tap interpolation filter for chrominance signals can be used. However, the interpolation filter for motion prediction in sub-pixel units is not limited to this. In this way, the inter-frame prediction unit 254 performs motion compensation to predict the texture of the current unit based on a motion picture previously reconstructed using motion information.

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

[0115] at the same time, Figure 2 The block diagram of the decoding device 200 according to an embodiment of the present invention is shown, and the blocks shown separately logically distinguish and show the elements of the decoding device 200. Therefore, the elements of the above-mentioned decoding device 200 may be installed as one chip or multiple chips depending on the design of the device. According to the embodiment, the operation of each element of the above-mentioned decoding device 200 may be performed by a processor (not shown).

[0116] Figure 3 An embodiment in which a coding tree unit (CTU) is partitioned into coding units (CU) in a picture is illustrated. In the encoding process of a video signal, a picture may be partitioned into a series of coding tree units (CTUs). A coding tree unit consists of an NxN block of luminance samples and two blocks of chrominance samples corresponding thereto. A coding tree unit may be partitioned into a plurality of coding units. A coding unit refers to a basic unit for processing a picture in the processing of the above-mentioned video signal, i.e., intra / inter prediction, transform, quantization and / or entropy coding. The size and shape of a coding unit in a picture may not be constant. A coding unit may 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. In addition, in this specification, a non-square block may refer to a rectangular block, but the present disclosure is not limited thereto.

[0117] refer to Figure 3 , firstly, the compilation tree unit is split into a quadtree (QT) structure. That is, a node having a size of 2NX2N in the quadtree structure can be split into four nodes having a size of NXN. In this specification, a quadtree may also be referred to as a quadtree. Quadtree splitting may be performed recursively, and not all nodes need to be split at the same depth.

[0118] At the same time, the leaf nodes of the above-mentioned quadtree can be further divided into a multi-type tree (MTT) structure. According to an embodiment of the present invention, in a multi-type tree structure, a node can be divided into a binary or ternary tree structure divided horizontally or vertically. That is, in a multi-type tree structure, there are four segmentation structures, such as vertical binary segmentation, horizontal binary segmentation, vertical ternary segmentation and horizontal ternary segmentation. According to an embodiment of the present invention, in each tree structure, the width and height of the node can have a power of 2. For example, in a binary tree (BT) structure, a node of 2NX2N size can be divided into two NX2N nodes by vertical binary segmentation, and divided into two 2NXN nodes by horizontal binary segmentation. In addition, in a ternary tree (TT) structure, a node of 2NX2N size is divided into (N / 2)X2N, NX2N and (N / 2)X2N nodes by vertical ternary segmentation, and is divided into 2NX(N / 2), 2NXN and 2NX(N / 2) nodes by horizontal binary segmentation. This multi-type tree splitting can be performed recursively.

[0119] The leaf nodes of the multi-type tree can be coding units. If the coding unit is not large for the maximum transform length, the coding unit is used as a unit of prediction and transformation without further division. On the other hand, at least one of the following parameters in the above-mentioned quadtree and multi-type tree can be predefined or sent through the RBSP of the high-level set such as PPS, SPS, VPS, etc. 1) CTU size: the root node size of the quadtree, 2) Minimum QT size MinQtSize: the minimum allowed QT leaf node size, 3) Maximum BT size MaxBtSize: the maximum allowed BT root node size, 4) Maximum TT size MaxTtSize: the maximum allowed TT root node size, 5) Maximum MTT depth MaxMttDepth: the maximum allowed depth of the MTT split from the leaf node of the QT, 6) Minimum BT size MinBtSize: the minimum allowed BT leaf node size, 7) Minimum TT size MinTtSize: the minimum allowed TT leaf node size.

[0120] Figure 4 An embodiment of a method for signaling the partitioning of a quadtree and a multi-type tree is shown. Preset flags may be used to signal the partitioning of the quadtree and the multi-type tree. Figure 4 , at least one of the flag “qt_split_flag” indicating whether to split a quadtree node, the flag “mtt_split_flag” indicating whether to split a multi-type tree node, the flag “mtt_split_vertical_flag” indicating the split direction of the multi-type tree node, or the flag “mtt_split_binary_flag” indicating the split type of the multi-type tree node may be used.

[0121] According to an embodiment of the present invention, the coding tree unit is the root node of the quadtree and can be first split into a quadtree structure. In the quadtree structure, a signal "qt_split_flag" is sent for each node "QT_node". If the value of "qt_split_flag" is 1, the node is split into 4 square nodes, and if the value of "qt_split_flag" is 0, the corresponding node becomes a leaf node "QT_leaf_node" of the quadtree.

[0122] Each quad leaf node "QT_leaf_node" can be further split into a multi-type tree structure. In the multi-type tree structure, "mtt_split_flag" is signaled for each node "MTT_node". When the value of "mtt_split_flag" is 1, the corresponding node is split into multiple rectangular nodes, and when the value of "mtt_split_flag" is 0, the corresponding node is a leaf node "MTT_leaf_node" of the multi-type tree. When the multi-type tree node "MTT_node" is split into multiple rectangular nodes (that is, when the value of "mtt_split_flag" is 1), the "mtt_split_vertical_flag" and "mtt_split_binary_flag" of the node "MTT_node" can be additionally signaled. When the value of "mtt_split_vertical_flag" is 1, it indicates the vertical division of the node "MTT_node", and when the value of "mtt_split_vertical_flag" is 0, it indicates the horizontal division of the node "MTT_node". In addition, when the value of "mtt_split_binary_flag" is 1, the node "MTT_node" is divided into 2 rectangular nodes, and when the value of "mtt_split_binary_flag" is 0, the node "MTT_node" is divided into 3 rectangular nodes.

[0123] Figure 5 and 6 The intra prediction method according to an embodiment of the present invention is illustrated in more detail. As described above, the intra prediction unit predicts pixel values ​​of a current block by using reconstructed pixels located on the left and / or upper side of the current block as reference samples.

[0124] first, Figure 5 FIG. 1 illustrates an embodiment of a reference sample for predicting a current block in an intra prediction mode. According to an embodiment, the reference pixel may be a pixel adjacent to the left boundary and / or the upper boundary of the current block. Figure 5As shown, when the size of the current block is W×H and the pixels of a single reference line adjacent to the current block are used for intra prediction, a maximum of 2W+2H+1 adjacent pixels located on the left and / or upper side of the current block can be used to configure the reference pixels. At the same time, according to additional embodiments of the present disclosure, pixels of multiple reference lines can be used for intra prediction of the current block. Multiple reference lines may include n lines located within a preset range from the current block. According to an embodiment, when pixels of multiple reference lines are used for intra prediction, separate index information indicating the lines to be configured to the reference pixels can be signaled. When at least some of the adjacent pixels to be used as reference pixels have not been reconstructed, the intra predictor can obtain reference pixels through a reference sample filling process according to preset rules. In addition, the intra predictor can perform a reference sample filtering process to reduce the error of intra prediction. That is, the reference pixels can be obtained by filtering the adjacent pixels and / or the pixels obtained through the reference sample filling process. The intra predictor uses the obtained reference pixels to predict the pixels of the current block.

[0125] Next, Figure 6 An embodiment of a prediction mode for intra prediction is shown. 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 included in an intra prediction mode set. When a current block is an intra prediction block, a decoder receives the intra prediction mode information of the current block from a bitstream. An intra prediction unit of the decoder performs intra prediction on the current block based on the extracted intra prediction mode information.

[0126] 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 plane mode, a DC mode, and a plurality of (e.g., 65) angle modes (i.e., directional modes). Each intra prediction mode may be indicated by a preset index (i.e., an intra prediction mode index). For example, Figure 6As shown, intra-frame prediction mode index 0 indicates plane mode, and intra-frame prediction mode index 1 indicates DC mode. In addition, intra-frame prediction mode indexes 2 to 66 may indicate different angle modes, respectively. The angle modes respectively indicate angles that are different from each other within a preset angle range. For example, the angle mode may indicate an angle within an angle range (i.e., a first angle range) between 45 degrees and -135 degrees in a clockwise direction. The angle mode may be defined based on the 12 o'clock direction. In this case, intra-frame prediction mode index 2 indicates a horizontal diagonal (HDIA) mode, intra-frame prediction mode index 18 indicates a horizontal (horizontal, HOR) mode, intra-frame prediction mode index 34 indicates a diagonal (DIA) mode, intra-frame prediction mode index 50 indicates a vertical (VER) mode, and intra-frame prediction mode index 66 indicates a vertical diagonal (VDIA) mode.

[0127] At the same time, the preset angle range can be configured differently according to the shape of the current block. For example, when the current block is a rectangular block, a wide-angle mode indicating an angle greater than 45 degrees and less than -135 degrees in the clockwise direction can be additionally used. When the current block is a horizontal block, the angle mode can indicate an angle within an angle range (i.e., a second angle range) between (45+offset1) degrees and (-135+offset1) degrees in the clockwise direction. In this case, angle modes 67 to 76 outside the first angle range can be additionally used. When the current block is a vertical block, the angle mode can indicate an angle within an angle range (i.e., a third angle range) between (45-offset2) degrees and (-135-offset2) degrees in the clockwise direction. In this case, angle modes -10 to -1 outside the first angle range can be additionally used. According to an embodiment of the present disclosure, the values ​​of offset1 and offset2 can be determined to be different from each other according to the ratio between the width and height of the rectangular block. In addition, offset1 and offset2 can be positive numbers.

[0128] According to an additional embodiment of the present disclosure, the plurality of angle modes included in the intra prediction mode set may include a basic angle mode and an extended angle mode. In this case, the extended angle mode may be determined based on the basic angle mode.

[0129] According to an embodiment, the basic angle mode may be a mode corresponding to the angle used in the intra prediction of the conventional high efficiency video coding (HEVC) standard, and the extended angle mode may be a mode corresponding to the angle of the intra prediction newly added to 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 the 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.

[0130] According to another embodiment, the basic angle mode may be a mode corresponding to an angle within a preset first angle range, and the extended angle mode may be a wide-angle mode outside the first angle range. That is, the basic angle mode may be an angle mode corresponding to one of the intra prediction modes {2, 3, 4, ..., 66}, and the extended 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 extended angle mode may be determined as an angle opposite to the angle indicated by the basic angle mode. Therefore, the angle indicated by the extended angle mode may be determined based on the angle indicated by the basic angle mode. Meanwhile, the number of extended angle modes is not limited thereto, and additional extended angles may be defined according to the size and / or shape of the current block. For example, the extended 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 according to the configuration of the basic angle mode and the extended angle mode.

[0131] In this embodiment, the intervals between the extended angle modes can be configured based on the intervals between the basic angle modes. For example, the intervals between the extended angle modes {3,5,7,...,65} can be configured based on the intervals between the basic angle modes {2,4,6,...,66}. Further, the intervals between the extended angle modes {-10,-9,...,-1} can be determined based on the intervals between the corresponding basic angle modes {56,57,...,65} on the opposite side, and the intervals between the extended angle modes {67,68,...,76} can be determined based on the intervals between the corresponding basic angle modes {3,4,...,12} on the opposite side. The angular intervals between the extended angle modes can be configured to be the same as the angular intervals between the basic angle modes. Further, the number of extended angle modes in the intra-frame prediction mode set can be configured to be equal to or less than the number of basic angle modes.

[0132] According to an embodiment of the present disclosure, an extended angle mode can be signaled based on a basic angle mode. For example, a wide-angle mode (i.e., an extended angle mode) can replace at least one angle mode (i.e., a basic angle mode) within a first angle range. The replaced basic angle mode may be an angle mode corresponding to the opposite side of the wide-angle mode. That is, the replaced basic angle mode may be an angle mode corresponding to an angle in a direction opposite to the angle indicated by the wide-angle mode, or an angle mode corresponding to an angle having a difference of a preset offset index from the angle in the relative direction. According to an embodiment of the present disclosure, the preset offset index is 1. The intra-frame prediction mode index corresponding to the replaced basic angle mode may be mapped to the wide-angle mode again and the corresponding wide-angle mode may be signaled. For example, a wide-angle mode {-10, -9, ..., -1} may be signaled by an intra-frame prediction mode index {57, 58, ..., 66}, and a wide-angle mode {67, 68, ..., 76} may be signaled by an intra-frame prediction mode index {2, 3, ..., 11}. Since the intra prediction mode index for the basic angle mode signals the extended angle mode, even if the configurations of the angle modes for intra prediction of a block are different from each other, the prediction mode indexes in the same set can be used to signal the intra prediction mode. Therefore, according to the change in the configuration of the intra prediction mode, the signaling overhead can be minimized.

[0133] 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 an embodiment, when the size of the current block is greater than a preset size, the extended angle mode may be used for intra-frame prediction of the current block. Otherwise, only the basic angle mode may be used for intra-frame prediction of the current block. According to another embodiment, when the current block is not a rectangular block, the extended angle mode may be used for intra-frame prediction of the current block. When the current block is a rectangular block, only the basic angle mode may be used for intra-frame prediction of the current block.

[0134] The intra-frame predictor determines the reference pixels and / or interpolated reference pixels to be used for intra-frame prediction of the current block based on the intra-frame prediction mode information of the current block. When the intra-frame prediction mode index indicates a specific angle mode, the reference pixels or interpolated reference pixels corresponding to the current pixel at a specific angle from the current block can be used for the prediction of the current pixel. Therefore, depending on the intra-frame prediction mode, reference pixels and / or interpolated reference pixels in different sets can be used for intra-frame prediction. When performing intra-frame prediction of the current block using reference pixels and intra-frame prediction mode information, the decoder reconstructs the pixel value of the current block by adding the residual signal of the current block obtained from the inverse converter to the intra-frame prediction value of the current block.

[0135] Figure 7Inter-frame prediction according to an embodiment of the present disclosure is illustrated.

[0136] As described above, when encoding or decoding the current picture or block, prediction can be performed from another picture or block. That is, encoding or decoding can be performed based on similarity with another picture or block. A portion similar to another picture or block can be encoded or decoded by omitting signaling in the current picture or block, which will be described in more detail below. Prediction can be performed in units of blocks.

[0137] refer to Figure 7 , with a reference picture on the left and a current picture on the right, the current picture or part of the current picture can be predicted using the similarity with the reference picture or part of the reference picture. Figure 7 When the rectangle indicated by the solid line in the current picture is the block to be encoded or decoded, the current block can be predicted based on the rectangle indicated by the dotted line in the reference picture. In this case, there may be information indicating the block (reference block) that the current block should refer to, and the information can be directly signaled or implemented by convention to reduce signaling overhead. The information indicating the block that the current block should refer to may include a motion vector. The motion vector can be a vector indicating the relative position between the current block and the reference block within the picture. Reference Figure 7 , there is a portion indicated by a dotted line of the reference picture, and a vector indicating how to move the current block to the block that the current block should refer to may be a motion vector. That is, the block that appears when the current block moves according to the motion vector may be a vector indicated by a dotted line of the reference picture. Figure 7 The position of the portion shown by the dotted line in the current picture and the portion indicated by the dotted line in the picture may be the same as the position of the reference block of the reference picture.

[0138] The information indicating the block that the current block should refer to 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 indicating reference pictures, and the reference block may be used in the reference pictures included in the reference picture list. That is, the current block may be predicted from the reference pictures included in the reference picture list. The reference picture index may be an index indicating the reference picture to be used.

[0139] Figure 8 A motion vector signaling method according to an embodiment of the present disclosure is illustrated.

[0140] According to an embodiment of the present disclosure, a motion vector (MV) may be generated based on a motion vector predictor (MVP). For example, the MVP may be converted into a motion vector as shown below.

[0141] MV=MVP

[0142] In another example, the motion vector may be based on a motion vector difference (MVD), as shown below: The MVD may be added to the MVP in order to indicate the exact motion vector.

[0143] MV=MVP+MVD

[0144] The motion vector information determined by the encoder in the video coding can be sent to the decoder, and the decoder can generate a motion vector and determine a prediction block based on the received motion vector information. For example, the motion vector information may include information about the MVP and the MVD. In this case, the elements of the motion vector information may vary according to the mode. For example, in the merge mode, the motion vector information may include information about the MVP but may not include the MVD. In another example, in the advanced motion vector prediction (AMVP) mode, the motion vector information may include information about the MVP and the MVD.

[0145] In order to determine, send and receive information about MVP, the encoder and decoder can generate MVP candidates by the same method. For example, the encoder and decoder can generate the same MVP candidates in the same order. The encoder can send an index indicating the determined MVP among the generated MVP candidates to the decoder, and the decoder can identify the determined MVP and MV based on the index.

[0146] MVP candidates and methods for generating MVP candidates may include spatial candidates, temporal candidates, and the like. A spatial candidate may be a motion vector for a block at a predetermined position from a current block. For example, a spatial candidate 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 within a picture different from the current picture. Alternatively, MVP candidates may include an affine motion vector, an ATMVP, a STMVP, a combination of the above motion vectors, an average vector of the above motion vectors, a zero motion vector, and the like.

[0147] Information indicating a reference picture may also be sent from the encoder to the decoder. When a reference picture corresponding to the MVP candidate does not correspond to the information indicating the reference picture, motion vector scaling may be performed. Motion vector scaling may be based on a picture sequence number (POC) of the current picture, a POC of a reference picture of the current block, a POC of a reference picture of the MVP candidate, and a calculation of the MVP candidate.

[0148] Fig. 9 The MVD syntax according to an embodiment of the present disclosure is illustrated.

[0149] The MVD may be compiled while separating the sign and the absolute value of the MVD. That is, the sign and the absolute value of the MVD may be different syntaxes. In addition, the absolute value of the MVD may be compiled directly, but may be compiled while including a flag indicating whether the absolute value is greater than N, such as Fig. 9 When the absolute value is greater than N, a signal may also be sent to inform the value of (absolute value - N). Fig. 9 In the example of , abs_mvd_greater0_flag may be sent, and the flag may indicate whether the absolute value is greater than 0. When abs_mvd_greater0_flag indicates that the absolute value is not greater than 0, it may be determined that the absolute value is 0. When abs_mvd_greater0_flag indicates that the absolute value is greater than 0, there may be other syntax. For example, abs_mvd_greater1_flag may exist, and the flag may indicate whether the absolute value is greater than 1. When 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, there may be other syntax. For example, abs_mvd_minus2 may exist and may correspond to a value of (absolute value - 2). Since the absolute value is determined to be greater than 1 (greater than or equal to 2) by abs_mvd_greater0_flag and abs_mvd_greater1_flag, (absolute value -2) is indicated. Binarization of abs_mvd_minus2 into a variable length is for signaling with fewer bits. For example, there are variable length binarization methods such as Exp-Golomb, Truncated Unary, Truncated Rice, etc. mvd_sign_flag may be a flag indicating the sign of MVD.

[0150] Although the coding method is described by MVD in this embodiment, information other than MVD may be divided into a sign and an absolute value, and the absolute value may be coded with a flag indicating whether the absolute value is greater than any value and a value obtained by subtracting any value from the absolute value.

[0151] exist Fig. 9 In the example, [0] and [1] may indicate a component index. For example, [0] and [1] may indicate an x ​​component and a y component.

[0152] In addition, Fig. 9 In the affine motion prediction method, cpIdx may be used as a preset value, such as 0.

[0153] Fig.10 Adaptive Motion Vector Resolution (AMVR) signaling according to an embodiment of the present disclosure is illustrated.

[0154] According to an embodiment of the present disclosure, there may be various resolutions for indicating a motion vector or MVD. In other words, there may be various resolutions with which a motion vector or MVD is encoded. For example, the resolution may be indicated based on pixels (pel). 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, when 16 is expected according to the result, encoding may be performed in units of 1 / 4 to 64 (1 / 4*64=16), encoding may be performed in units of 1 to 16 (1*16=16), and encoding may be performed in units of 4 to 4 (4*.4=16). That is, the value may be determined as shown below.

[0155] valueDetermined = resolution * valuePerResolution

[0156] valueDetermined may be a value, ie, a motion vector or MVD in this embodiment. valuePerResolution may be a value indicating valueDetermined in units of [ / resolution].

[0157] In this case, when the value signaled by the motion vector or MVD is not divisible by the resolution, an inaccurate value that is not the best performing motion vector or MVD may be sent due to rounding, etc. Using a higher resolution may reduce the inaccuracy but increases the value to be coded, so more bits may be used. Using a lower resolution may increase the inaccuracy but reduces the value to be coded, so fewer bits may be used.

[0158] Furthermore, the resolution may be configured differently in units of blocks, CUs, slices, etc. Therefore, the resolution may be adaptively applied to fit the unit.

[0159] The resolution may be signaled from the encoder to the decoder. The signaling of the resolution may be signaling using variable length binarization. In this case, when the signaling is performed with an index corresponding to the minimum value (the frontmost value), the signaling overhead is reduced.

[0160] In an embodiment, the signaling index may match the resolution in order from high resolution (detailed signaling) to low resolution.

[0161] Fig.10The figure shows the signaling of three resolutions. These three signals can be 0, 10 and 11, corresponding to resolution 1, resolution 2 and resolution 3 respectively. Since the signaling of resolution 1 requires 1 bit and the signaling of other resolutions requires 2 bits, the signaling overhead of resolution 1 is relatively small. Fig.10 In the example, resolution 1, resolution 2, and resolution 3 are 1 / 4, 1, and 4 pixels (pel), respectively.

[0162] Hereinafter, motion vector resolution may refer to the resolution of MVD in the present disclosure.

[0163] Fig.11 An inter-prediction related syntax according to an embodiment of the present disclosure is illustrated.

[0164] According to an embodiment of the present disclosure, the inter-frame prediction method may include a skip mode, a merge mode, an inter-frame mode, etc. According to an embodiment, in the skip mode, a residual signal may not be transmitted. In the skip mode, the same MV determination method as in the merge mode may be used. Whether to use the skip mode may be determined according to the skip flag. Reference Fig.11 , you can determine whether to use skip mode based on the value of cu_skip_flag.

[0165] According to an embodiment, MVD may not be used in merge mode. A motion vector may be determined based on a motion candidate index. Whether to use merge mode may be determined based on a merge flag. Fig.11 , the merge mode can be used according to the value of merge_flag. When skip mode is not used, merge mode can be used.

[0166] One candidate may be selectively used in one or more candidate list types in skip mode or merge mode. For example, a merge candidate or a sub-block merge candidate may be used. The merge candidate may include a spatial neighboring candidate, a temporal neighboring candidate, and the like. In addition, the merge candidate may include a candidate that uses a motion vector for the entire current block (CU). That is, the motion vectors of the various sub-blocks belonging to the current block may include the same candidate. The sub-block merge candidate may include a temporal MV based on a sub-block, an affine merge candidate, and the like. In addition, the sub-block merge candidate may include a candidate that may use different motion vectors for the various sub-blocks of the current block (CU). The affine merge candidate may be a method implemented by a scheme for determining a control point motion vector for affine motion prediction without using MVD. The sub-block merge candidate may include a method for determining a motion vector in units of sub-blocks in the current block. For example, the sub-block merge candidate may include a plane MV, a regression-based MV, an STMVP, and the like, as well as a temporal MV and an affine merge candidate based on a sub-block.

[0167] According to an embodiment, MVD may be used in inter-frame mode. MVP may be determined based on a motion candidate index, and a motion vector may be determined based on MVP and MVD. Whether to use inter-frame mode may be determined based on information about whether other modes are used. In another embodiment, whether to use inter-frame mode may be determined by a flag. Fig.11 An example of using the inter mode without using other modes such as the skip mode and the merge mode is illustrated.

[0168] The inter mode may include an AMVP mode, an affine inter mode, etc. The inter mode may be a mode for determining a motion vector based on MVP and MVD. The affine inter mode may be a method for using MVD when determining a control point motion vector for affine motion prediction.

[0169] refer to Fig.11 , after determining the skip mode or merge mode, it can be determined whether to use a subblock merge candidate or a merge candidate. For example, when a specific condition is met, merge_subblock_flag indicating whether to use a subblock merge candidate can be parsed. The specific condition can be a condition related to the block size. For example, the specific condition can be a condition related to width, height, area, etc., or a combination of them can be used. Reference Fig.11 , the specific condition may be, for example, a condition where the width and height of the current block (CU) are greater than or equal to specific values. When merge_subblock_flag is parsed, the value may be inferred to be 0. When merge_subblock_flag is 1, a sub-block merge candidate may be used. When merge_subblock_flag is 0, a merge candidate may be used. When a sub-block merge candidate is used, merge_subblock_idx corresponding to the candidate index may be parsed, and when a merge candidate is used, merge_idx corresponding to the candidate index may be parsed. When the maximum number of candidate lists is 1, parsing may not be performed. When merge_subblock_idx or merge_idx is not parsed, the value may be inferred to be 0.

[0170] Fig.11 The function of coding_unit is shown, and the content related to intra-frame prediction can be omitted, or Fig.11 A case where inter prediction is determined may be indicated.

[0171] Fig.12 Spatially adjacent locations according to an embodiment of the present disclosure are illustrated.

[0172] As described above, the positions around the current block may be referenced when performing prediction. This may mean referring to the motion information corresponding to the positions around the current block. For example, when using merge mode, AMVP mode, etc., MVP or MV may be configured based on the motion information corresponding to the positions around the current block. The positions around it may be preset. When there are multiple positions around it, the order of the reference positions may be preset. The positions around it may include spatial proximity and temporal proximity.

[0173] refer to Fig.12 , positions corresponding to A0, A1, B0, B1, and B2 may be preset. These positions may be brightness positions. When the upper left 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.

[0174] According to an embodiment of the present disclosure, spatial proximity may be referenced in the order of A1, B1, B0, A0, and B2 in the merge mode. A spatial candidate corresponding to a spatially adjacent position may be added to a candidate list. A temporal candidate may be added in addition to the spatial candidate and may be added after the spatial candidate. A motion vector corresponding to a temporal candidate may be referred to as a collocated motion vector.

[0175] When the candidate list is not full, a zero motion vector may be added to the candidate list. The zero motion vector may be a motion vector indicating the position of the current block.

[0176] The merge candidate list may include historical motion vector prediction candidates, paired average candidates, and the like. The candidate may be located after the spatial candidate in the candidate list. The historical 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 paired average candidate may be a candidate generated based on a candidate that has been added to the candidate list. For example, the paired average candidate may be the average of the candidates that have been added to the candidate list.

[0177] The method of adding a candidate to a candidate list with reference to a position around the current block may include a vector scaling process. Motion vector scaling may be performed based on a picture sequence number (POC) of a reference picture of referenced motion information, a POC of a picture including the current block, a POC of a reference picture of the current block, and referenced motion information.

[0178] According to an embodiment of the present disclosure, preset spatial adjacent positions may be grouped. A group may refer to a preset number of motion information. For example, group 1 may refer to a preset number of motion information, and group 2 may refer to a preset number of motion information. For example, the preset number may be 1. Further, a reference order within a group may be preset. An order of adding candidates between groups may be preset.

[0179] refer to Fig.12 , group 1 may include A0 and A1, and group 2 may include B0, B1, and B2. In addition, candidates may be generated from motion information available in group 1, and candidates may be generated from motion information available in group 2. Candidates from group 1 may be added to a candidate list and candidates from group 2 may be added to a candidate list sequentially. For example, a candidate list may be implemented as described above in the AMVP mode.

[0180] When the candidate list is not full, scaling candidates, temporal candidates, zero motion vectors, etc. can be added.

[0181] Fig.13 A current picture reference according to an embodiment of the present disclosure is illustrated.

[0182] As described above, when predicting the current block, a block within the reference block may be referenced. According to an embodiment of the present disclosure, the reference picture may be a picture including the current block, i.e., the current picture. Therefore, when predicting the current block, a block of the current picture may be referenced. This technique may be referred to as current picture reference (CPR).

[0183] According to an embodiment, when CPR is used, the current block may be the only reference picture. In this case, inference may be performed without signaling indicating the reference picture.

[0184] According to an embodiment, when CPR is used, there may be a motion vector indicating a reference block to which the current block refers. According to an embodiment, when CPR is used, the position of the reference block may be limited. For example, the position of the reference block may be limited based on the position of the current block. For example, the position of the reference block may be limited to the inside of the CTU including the current block. Alternatively, the position of the reference block may be limited to a position including at least some of the CTU including the current block. Limiting the position of the reference block may be to reduce memory load.

[0185] According to an embodiment of the present disclosure, there may be signaling indicating whether the current block uses CPR. In an embodiment, the signaling may be signaling in a larger unit including the current block. For example, it may be signaling at a slice level or a tile level. For example, it may be signaling at a level where parallel processing is performed. In an embodiment, for example, when the reference picture referenced by the current block is the current picture, CPR may be used. Alternatively, when the current picture is the only reference picture, CPR may be used. In addition, when the current block is a block that does not use intra-frame prediction, CPR may be used. That is, for example, when the reference picture corresponding to the current block is the current picture, if intra-frame prediction is not used, CPR may be used. In an embodiment, information indicating that the current picture is the only reference picture may be indicated by a parameter of CurrPicIsOnlyRef. Alternatively, using CPR may mean that the reference picture is the current picture. Alternatively, using CPR may mean that the reference picture is the current picture and intra-frame prediction is not used.

[0186] According to an embodiment of the present disclosure, when CPR is used, a merge mode, an AMVP mode, etc. may be used to indicate motion information.

[0187] In addition, when CPR is used, the current slice or tile may be configured as a P slice or a P tile. When CPR is used, a flag indicating the use of a dual tree may be configured as a value indicating the use of a dual tree. The dual tree may mean that the tree corresponding to brightness and the tree corresponding to chrominance are different.

[0188] refer to Fig.13 , the current block indicated by the solid line may be within the current picture. In addition, the reference block indicated by the dotted line may exist within the current picture. In this case, there may be motion information indicating the location of the reference block. Fig.13 , the arrow may be motion information indicating the position of the reference block.

[0189] According to an embodiment of the present disclosure, when CPR is used, the configuration of the candidate list may become different. For example, when CPR is used, the time candidate may not be added to the candidate list.

[0190] According to an embodiment of the present disclosure, when CPR is used, motion information referenced from surroundings may not be scaled.

[0191] Fig.14 A spatial neighboring candidate reference method according to an embodiment of the present disclosure is illustrated.

[0192] According to an embodiment of the present disclosure, when the current block uses CPR, the candidate list configuration method may be different from the case where CPR is not used. For example, when the current block uses CPR, the spatial neighboring candidate adding method may be different from the case where CPR is not used. For example, when the current block uses CPR, motion information at positions beyond the range where the reference block of CPR may be located may not be referenced. Alternatively, when the current block uses CPR, motion information at positions outside the range where the reference block based on CPR may be located may not be referenced. The range where the reference block of CPR may be located may be the CTU range to which the current block belongs. According to an embodiment of the present disclosure, motion information may not be referenced from positions beyond the current CTU. For example, when the current block is adjacent to the boundary of the range where the reference block is located, the preset spatial neighboring position may be outside the range where the reference block may be located. In particular, when the reference Fig.12 When the preset spatial neighboring positions are determined, if the current block is adjacent to the upper boundary or the left boundary of the range where the reference block may be located, multiple preset spatial neighboring positions may be out of the range where the reference block may be located.

[0193] refer to Fig.14 , the position of the reference block may be limited to the inside of the CTU. According to an embodiment, motion from a position beyond the range where the reference block may be located may not be referenced. For example, when the current block is located at the boundary of the range where the reference block may be located, the preset spatial neighboring position may be out of the range where the reference block may be located. Fig.14 In the example, the preset spatial neighborhood around the current block is marked with a small dotted rectangle. In this case, it can be determined that the location outside the CTU is unavailable.

[0194] This is because, if the reference is made to a position beyond the range where the reference block may be located, the motion information at that position has a narrower range in order to prevent the reference block of the current block or the reference block at the reference position from exceeding the restricted range. Fig.14 In the case of unavailable parts, the reference blocks in the parts marked as unavailable should not be outside the CTU to which the reference blocks belong. In order to prevent the position indicated by the motion information in the parts marked as unavailable from being out of the range where the reference blocks of the current block may be located, Fig.14 The y component of the motion information in the reference part of the current block should be 0. When the current block is adjacent to the left boundary, the x component of the motion information in the reference part beyond the boundary should be 0. Even in a state where the x component or the y component is 0 and the remaining components are not 0, if only one sign (for example, negative) in one component is valid in the preset coding order, or the component has other signs, it is very likely to make the MVD larger.

[0195] In the additional description that the reference block is limited to the inside of the current CTU, only the inside of the CTU is used as the reference block, so there is almost no correlation between MVs. When MVD cannot be corrected, such as in merge mode, if the x and y components of the MV exist outside the CTU, the reference block of the current block or the neighboring block will exceed the CTU range. For example, when the current block is on the boundary above the CTU, if the y component of the MV of the upper block exists, the current block or the neighboring block will exceed the CTU range.

[0196] Since the entire slice is referenced to the current picture (CPR), neighboring blocks may also have used intra or CPR.

[0197] When the current block is on a tile boundary (or in the case of a slice instead of CPR), the surrounding may use inter instead of CPR, in which case the neighboring MV may indicate a location far away, thus out of the CTU. Since the neighboring MV indicates another picture, there may be little correlation.

[0198] According to an embodiment of the present disclosure, only when the spatial neighboring position referenced by the current block using CPR uses CPR, motion information can be referenced. Alternatively, when the spatial neighboring position referenced by the current block using CPR does not use CPR, motion information may not be referenced thereby.

[0199] According to another embodiment, motion information at a spatially neighboring position may be referenced after being cropped to a range that a reference block corresponding to the current block may have.

[0200] like Fig.14 As shown in the embodiment of , when the available spatial neighboring positions are reduced, the total number of candidates can be reduced. In this case, the candidate index signaling can be reduced. For example, when spatial neighboring candidates at preset positions and zero motion vectors can be added to the candidate list, or when i) spatial neighboring candidates at preset positions, ii) a limited number of HMVP candidates or paired average candidates, or iii) zero motion vectors can be added to the candidate list, if the available spatial neighboring positions are reduced, the total number of candidates can be reduced. In this case, the number of bits when binarizing the index can be reduced by reducing the maximum value of the candidate index.

[0201] Alternatively, when Fig.14 As shown in the embodiment, when the available spatial neighboring positions are reduced, the candidates added after the spatial neighboring candidates can be added to the front of the candidate list, so when the candidates added after the spatial neighboring candidates are used, the number of bits corresponding to the candidate index can be reduced.

[0202] Fig.15 FIG. 1 illustrates a block position and a configuration of a motion candidate list according to an embodiment of the present disclosure.

[0203] According to an embodiment of the present disclosure, the number of candidates for reference motion information at a preset position may be small. Fig.14 In the case described above, the available spatial neighbors can be reduced. For example, when the current block is adjacent to the upper boundary or left boundary of the range that the reference block may have, the number of available candidates may be small. In this case, even if the availability of the spatial neighbors corresponding to the reference is not detected (for example, even if the corresponding spatial neighbors are not detected whether intra-frame prediction or inter-frame prediction is used), the decoder and the encoder can determine that there are no candidates corresponding to the corresponding spatial neighbors. In this case, the position of the zero MV can be moved forward in the candidate list.

[0204] Therefore, according to an embodiment of the present disclosure, it is possible to determine whether a candidate index indicates a zero MV through a candidate index. For example, when some spatially adjacent positions are excluded based on the current block position and the spatially adjacent positions that can be referenced as a neighboring range, if the number of indexes is greater than or equal to the number of all remaining available candidates, it can be determined that it is a zero motion vector. For example, when a zero motion vector is added after a spatially adjacent candidate, if the number of indexes is greater than or equal to the number of available spatially adjacent candidates, it can be determined that it is a zero motion vector. For example, when some spatially adjacent positions are excluded based on the current block position and the spatially adjacent positions that can be referenced as a neighboring range, if the number of remaining spatially adjacent positions is M and the value of the index starting from 0 is M, it can be determined that it is a candidate added after the spatially adjacent candidate, and if there is a zero MV after the spatially adjacent candidate, it can be determined that it is a zero MV.

[0205] For example, Fig.15 In the case of the block marked with A in , there may be a situation where the current block is adjacent to the left boundary of the range where the reference block may be located. In this case, Fig.14 As shown in FIG. 1 , if motion information at a position outside the range where the reference block may be located is not referenced, the left position of the current block may not be used. Therefore, only positions other than the left position may be used. Alternatively, in this case, as Fig.14 As shown, when the motion information at a position outside the range where the reference block may be located is not referenced, it may not be used. Fig.12 Positions A0, A1 and B3 described in . Only B0 and B1 may be used. In an embodiment, in merge mode, both B0 and B1 may be used, while in AMVP mode, only one of B0 and B1 may be used. Therefore, when the index is 2 (starting from 0) in merge mode, it can be determined that the candidate is a candidate after a spatially adjacent candidate. Further, when the index is 1 (starting from 0) in AMVP mode, it can be determined that the candidate is a candidate after a spatially adjacent candidate. That is, when a zero MV appears after a spatially adjacent candidate, the zero MV can be determined by the index.

[0206] In addition, similar to Fig.15 In the case of the block marked with B in , there may be a situation where the current block is adjacent to the upper boundary of the range where the reference block may be located. In this case, Fig.14 As shown in FIG. 1 , when motion information at a position outside the range where the reference block may be located is not referenced, the upper position of the current block may not be used. Therefore, only positions other than the upper position of the current block may be used. Alternatively, in this case, as Fig.14 When the motion information at a position outside the range where the reference block may be located is not referenced, the Fig.12 B0, B1 and B2 described in . Therefore, only A0 and A1 are available. In an embodiment, both A0 and A1 can be used in merge mode, while in AMVP mode, only one of A0 and A1 can be used. Therefore, when the index is 2 (starting from 0) in merge mode, it can be determined that the candidate is a candidate after the spatially adjacent candidate. Further, when the index is 1 (starting from 0) in AMVP mode, it can be determined that the candidate is a candidate after the spatially adjacent candidate. That is, when zero MV appears after the spatially adjacent candidate, zero MV can be determined by the index.

[0207] refer to Fig.15 , shows the configuration of the AMVP candidate list when the position of the reference block is limited to the current CTU range and does not refer to the motion information at a position outside the current CTU. When the current block is adjacent to the left boundary or the upper boundary of the CTU, such as Fig.15 As shown in A or B in , the maximum number of spatial neighboring candidates can be 1, and the remaining candidates can be filled with zero MV. For example, in the configuration of the AMVP candidate list, the position of one of A0 and A1 and the position of one of B0, B1 and B2 can be used as spatial neighboring candidates. Therefore, when the current block is adjacent to the left boundary, as Fig.15 The position of one of the blocks A, B0 and B1 in can be used as a spatial neighbor candidate. When the current block is adjacent to the previous block, such as Fig.15 For block B in , the position of one of A0 and A1 can be used as a spatial neighboring candidate. Therefore, when the candidate index is 1, it can be determined that the MVP is the zero MV.

[0208] According to an embodiment of the present disclosure, if a zero MV is indicated by a candidate index, a reference may be performed. Figures 18 to 22 The embodiments described above may, for example, change the MVD compilation. For example, in certain cases, the signs of the MVD components may be signaled and determined without any syntax parsing.

[0209] Fig.16 FIG. 1 illustrates a block position and a configuration of a motion candidate list according to an embodiment of the present disclosure.

[0210] According to an embodiment of the present disclosure, it may not be possible to refer to motion information at a position outside the picture. This may include both a case where CPR is used and a case where CPR is not used.

[0211] According to an embodiment of the present disclosure, the possible position of the reference block in the CPR may be inside the picture. Alternatively, according to an embodiment of the present disclosure, the possible position of the reference block in the CPR may be an area including the inside of the picture.

[0212] refer to Fig.16 , when the current block is adjacent to the picture boundary, the spatial proximity may be limited. This is because it may not be possible to reference motion information at locations outside the picture. For example, when the current block is adjacent to the left boundary of the picture (in Fig.16 In the case of the block marked with A in the figure), the left position of the current block cannot be referenced. In addition, when the current block is adjacent to the upper boundary of the picture (in Fig.16 In the case of the block marked with B in the figure, it is not possible to refer to the upper position of the current block.

[0213] Therefore, in this case, the maximum value of binarization may be lowered or determined to be zero MV.

[0214] When CPR is used as described above, time candidates, scaling candidates, etc. may not be used.

[0215] In the case where CPR is used first and the AMVP mode is used, when the current block is adjacent to the picture boundary according to the present embodiment, the available spatial adjacent positions may be limited. In particular, when the current block is adjacent to the left boundary or the upper boundary, it may not be possible to reference the motion information of the left position of the current block and the upper position of the current block. Therefore, the maximum number of available spatial candidates when configuring the AMVP candidate list can be 1. When the value indicated by the candidate index (or flag if the maximum number of candidates is 2) is 1 (when the candidate index starts from 0), the motion vector corresponding to the candidate index can be determined as a zero motion vector.

[0216] When using the merge mode, if the current block is adjacent to the picture boundary according to the present embodiment, the available spatial neighboring positions may be limited. In particular, when the current block is adjacent to the left boundary or the top boundary, it may not be possible to refer to the motion information of the left position of the current block and the top position of the current block. Fig.12 In the embodiment of , the maximum number of positions that can be referenced may be 2. Therefore, it can be determined that the motion vector corresponding to the case where the number of merge candidate indexes is greater than or equal to the maximum number that can be referenced will not come from the spatial neighboring candidates.

[0217] When only spatial neighboring candidates and zero MV are used in the merge mode using CPR, the zero MV can be determined by the candidate index in the above case. However, since the zero MV may not make sense in the CPR merge mode, the maximum value of the candidate index corresponding to the variable length can be configured as (the number of available spatial neighboring candidates - 1). Therefore, the number of bits of any index value can be reduced.

[0218] In another embodiment, in the merge mode using CPR, spatial neighbor candidates, HMVP candidates, pairwise average candidates, etc. may be included in the candidate list. In this case, when the maximum number of available spatial neighbor candidates is limited as shown in the above embodiment, the number of available pairwise average candidates may be reduced. This is because the number of combinations of spatial neighbor candidates may be reduced. Fig.12 and 16 In the embodiment of , the available spatial neighboring candidate positions are 2, then the number of paired average candidates can be 1. In addition, there may be a preset part of the space for storing history in the HMVP that is reset. For example, the space for storing history in the HMVP can be reset in each CTU row. This is to facilitate parallel processing. In addition, this is because the encoder and decoder should keep the same history. Therefore, the HMVP candidate may not be added to the candidate list in the preset part of the space for storing history in the HMVP. When CPR is used and the spatial neighboring positions are limited, if the space for storing history is reset in the HMVP, the maximum number of available candidates can be further reduced. For example, the maximum number of spatial neighboring positions in the left boundary of the picture can be limited to 2, and the space for storing history in the HMVP can be reset in the beginning of the CTU row. In this case, up to two spatial neighboring candidates can be included in the candidate list, and the HMVP candidate can be included. Even if paired average candidates can be added, there is only one combination when paired average is performed. Therefore, when paired average candidates can be added, there can be up to three candidates and zero motion vectors. In an embodiment where paired average candidates may not be added, there can be up to two candidates and zero motion vectors. Therefore, the maximum value of the candidate index can be reduced and the number of bits of the index can be reduced.

[0219] In another embodiment, when CPR is used, the pairwise average candidate may not be used. This is because the useful motion vectors are more limited when CPR is used than when CPR is not used.

[0220] In another embodiment, when the current block is adjacent to the left boundary of the picture, the HMVP candidate may not be used. Alternatively, when the current block is adjacent to the boundary where the history of the HMVP is reset (for example, when the reset position is the same as the x coordinate of the upper left side of the current block), the HMVP candidate may not be used. If the space for storing the history of the HMVP is reset at the beginning of the CTU row, the motion information in the history may not be very diverse when the leftmost CTU of the picture is compiled. Therefore, in the case of a block adjacent to the left boundary of the picture, the x component of the motion vector should be 0 or positive. In addition, in this case, the direction of the motion vector stored in the history is limited, so the block adjacent to the left boundary may be difficult to use. Therefore, when the current block is adjacent to the left boundary of the picture, the HMVP candidate may not be used. In this case, by combining the above embodiments, in the case of a block adjacent to the left boundary of the picture, up to two spatial neighboring candidates, up to one pairwise average candidate, and zero MV can be added to the merge candidate list. Therefore, when zero MV can be added, the maximum value of the index can be binarized to 3 (if the index starts from 0), and when zero MV is not added, the maximum value of the index can be binarized to 2 (if the index starts from 0).

[0221] According to an embodiment of the present disclosure, the current block adjacent to the left, right, upper, and lower boundaries of the 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 upper left coordinate 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 upper boundary of the picture. If ((y0+cbHeight)==picHeight) is true, the current block is adjacent to the lower boundary of the picture.

[0222] The case where CPR is used has been described above, but even if CPR is not used, an operation may be performed if a temporal motion vector cannot be used or if a reference picture of a neighboring block and a reference picture of a current block are the same.

[0223] Fig.17 The use of spatial neighboring candidates according to an embodiment of the present disclosure is illustrated.

[0224] According to an embodiment of the present disclosure, there may be a situation where a spatially neighboring position cannot be used. If a preset position has been intra-predicted, motion information may not be referenced from the corresponding position. According to an embodiment of the present disclosure, the number of available spatially neighboring candidates can be reduced according to whether the preset spatially neighboring position uses intra-prediction. Alternatively, the number of available spatially neighboring candidates can be reduced according to whether the preset spatially neighboring position uses inter-prediction that can be referenced. For example, the number of available spatially neighboring candidates can be reduced according to whether the preset spatially neighboring position uses inter-prediction using CPR.

[0225] For example, in AMVP mode, among the spatially neighboring positions, all left positions or all upper positions have undergone intra-frame prediction (except for the portion beyond the picture or the position that has not been decoded yet). Alternatively, in AMVP mode, among the spatially neighboring positions, neither the left position nor the upper position has undergone inter-frame prediction that can be referenced (except for the portion beyond the picture or the position that has not been decoded yet). That is, neither the left position nor the upper position may be able to reference motion information. In this case, when only one of the left position or the upper position can be referenced, the number of available spatially neighboring candidates can be 1, and when the index is 1, it can be determined to be zero MV. Alternatively, when neither the left position nor the upper position can be referenced (for example, all preset positions have performed inter-frame prediction, such as Fig.17 As shown), the number of available spatial neighboring candidates may be 0, and when the index is 0, it can be determined to be a zero MV. Alternatively, when neither the left position nor the top position is referenced (for example, all preset positions perform inter-frame prediction, such as Fig.17 As shown), the number of available spatial neighbor candidates can be 0, and index transmission and parsing can be omitted. In addition, the index can be 0 and can be inferred to be zero MV.

[0226] In another example, when motion information cannot be referenced in preset spatial neighboring positions, these positions can be excluded in the syntax parsing step, and the maximum number of candidates can be changed. The case where motion information cannot be referenced may include a case where the corresponding position uses intra prediction. Alternatively, the case where motion information cannot be referenced may include a case where the corresponding position is out of the picture or has not been decoded in the coding order.

[0227] If it is assumed that motion information cannot be referenced at all preset positions in merge mode, no spatial neighboring candidates can be added to the candidate list. Therefore, HMVP candidates, paired average candidates, etc. can be used as candidates. In this case, when the current block is located at the position where the space for storing the history of HMVP is reset as described above, the HMVP candidate may not be added. Further, when the paired average candidate is before the HMVP candidate or the HMVP candidate cannot be added, the paired average candidate may not appear. Therefore, only zero MV can still be used as an available candidate. However, in CPR, zero MV may not make sense. In this case, the signaling indicating the merge mode can be omitted (transmission and parsing can be omitted). In addition, it can be inferred that the merge mode is not used. For example, the signaling indicating the merge mode can be merge_flag. According to an embodiment of the present disclosure, when CPR is used, the preset spatial neighboring positions around the current block may not be used (including the case where the corresponding position is out of the picture, the case where the corresponding position has been intra-predicted, and the case where the corresponding position does not use CPR), and when the current block is located at the position where the space for storing the history of HMVP is reset, the signaling indicating the merge mode can be omitted, and it can be inferred that the merge mode is not used. The position where the space for storing the history of HMVP is reset can be the same as the position where the CTU line starts or the preset position where the HMVP candidate is not used.

[0228] In another example, except for a preset spatial neighboring position, motion information may not be referenced. The situation where motion information may not be referenced may include a situation where the corresponding position is out of the picture, a situation where the corresponding position has been intra-predicted, and a situation where the corresponding position does not use CPR. In this case, if another candidate is not added in addition to a spatial neighboring candidate as described in the above embodiment, it may not be possible to perform a pairwise average candidate. Since the space for storing the history of HMVP is a reset part, the HMVP candidate may not be included. Therefore, at such a position, the maximum value of the candidate index may be changed and binarized. For example, any remaining position other than a preset spatial neighboring position may not be able to reference motion information, and a maximum of one spatial neighboring candidate, a maximum of 0 HMVP candidates, and a maximum of 0 pairwise average candidates may be implemented in the part of the space for resetting the history of HMVP. Therefore, in an embodiment where zero MV can be added to the candidate, the candidate index can be signaled by a 1-bit flag. However, in this case, the transmission and parsing of the candidate index can be omitted, and the index can be inferred to be 0. This is because zero MV is meaningless in CPR. In embodiments where a zero MV cannot be added to the candidates, the number of available candidates may be only 1, in which case the transmission and parsing of the candidate index may be omitted and the index may be inferred to be 0.

[0229] Fig.18 A motion vector according to an embodiment of the present disclosure is illustrated.

[0230] According to an embodiment of the present disclosure, the value that a motion vector can have may be limited according to the coding order. In addition, this may correspond to the case where CPR is used. For example, depending on the coding order, a motion vector may not indicate a lower right direction. This is because, according to the coding order, the blocks on the right or lower side of the current block have not yet been decoded. According to an embodiment of the present disclosure, when CPR is used, the x component of the motion vector may 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 correspond to (x component>=0&&y component>=0).

[0231] according to Figures 14 to 17 In the illustrated embodiment, the MVP may be a zero MV. In particular, the fact that the MVP is a zero MV may be known during the syntax parsing step. In this case, the MVD (MVD) may not indicate a lower right direction. That is, the MVD may not correspond to (x component >= 0 && y component >= 0). In another embodiment, the MV may not correspond to (x component >-(current block width) && y component >(-current block height)). That is, when a zero MV is used as the MVP, the MVD may not correspond to (x component >-(current block width) && y component >(-current block height)). According to an embodiment of the present disclosure, the range of the y component may be limited according to the x component of the MV or MVD.

[0232] According to an embodiment, the components of the MVD may be separated and compiled. Fig. 9 MVD is compiled as shown. For example, component 1 and component 2 may be compiled separately. For example, component 1 and component 2 may be compiled sequentially. In an embodiment, component 1 and component 2 may be x component and y component, respectively. The following embodiment may be a case where MVP is zero MV.

[0233] According to an embodiment of the present disclosure, when component 1 is greater than 0, component 2 may be less than 0. More specifically, when component 1 is greater than 0, the absolute value of component 2 may be greater than or equal to the minimum block size. When component 1 is greater than 0, the absolute value of component 2 may be greater than or equal to the current block height.

[0234] According to an embodiment of the present disclosure, when component 1 is 0, component 2 may not be 0. When component 1 is 0, component 2 may be less than 0. More specifically, when component 1 is 0, the absolute value of component 2 may be greater than or equal to the minimum block size. When component 1 is 0, the absolute value of component 2 may be greater than or equal to the current block height.

[0235] According to an embodiment of the present disclosure, when component 1 is less than 0 and its absolute value is less than the minimum block size, component 2 may not be 0. Further, 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.

[0236] According to one embodiment of the present disclosure, when component 1 is less than 0 and its absolute value is less than the current block width, component 2 may not be 0. Further, 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.

[0237] refer to Fig.18 , the x-component value of the MV in the current block can be as shown. In this case, the reference block of the CPR can be Fig.18 Therefore, the possible values ​​that the y component may have may be restricted. That is, the y component value may be restricted according to the x component value.

[0238] Fig.19 The MVD syntax according to an embodiment of the present disclosure is illustrated.

[0239] like Fig. 9 As shown, the MVD can be compiled while being separated into x-component and y-component. Fig.19 , the values ​​corresponding to [0] and [1] may be the x component and the y component, respectively. Further, abs_mvd_greater0_flag may be a flag indicating whether the absolute value of the corresponding component is greater than 0. abs_mvd_greater1_flag may be a flag indicating whether the absolute value of the corresponding component is greater than 1. abs_mvd_minus2 may be a value obtained by subtracting 2 from the absolute value of the corresponding component. mvd_sign_flag may be a flag indicating the sign of the corresponding component. A value of 0 of mvd_sign_flag may indicate positive, while a value of 1 of mvd_sign_flag may indicate negative.

[0240] Can be Fig.19 The MVD compilation syntax is reflected in Fig.18 The embodiment shown.

[0241] exist Fig.19 In the example, the condition "zeroMVP" may indicate the case where the MVP is zero MV and CPR is used. That is, zero MVP may be true in the case where the MVP is zero MV and CPR is used. The condition indicating that the MVP is zero MV may follow Figures 14 to 17According to the above-mentioned embodiment, whether the MVP is a zero MV can be known based on the position of the current block or the candidate index.

[0242] According to an embodiment of the present disclosure, in the case of zero MVP, if the x component is 0, the y component may not be 0. Therefore, in this case, abs_mvd_greater0_flag[1] may not be parsed. In addition, in this case, abs_mvd_greater0_flag[1] may be inferred to indicate a non-zero value. In this case, abs_mvd_greater0_flag[1] may be inferred to be 1.

[0243] According to an embodiment of the present disclosure, in the case of zero MVP, if the x component is 0, the absolute value of the y component may be greater than 1. This is because the current block height is greater than 1. Therefore, in this case, abs_mvd_greater1_flag[1] may not be parsed. In addition, in this case, abs_mvd_greater1_flag[1] may be inferred to indicate a value with an absolute value greater than 1. In this case, abs_mvd_greater1_flag[1] may be inferred to be 1. In conventional MVD compilation before CPR, when abs_mvd_greater1_flag does not exist, it is inferred to be 0. By combining with the present embodiment, when abs_mvd_greater1_flag does not exist, the inferred value may vary according to the conditions. For example, when abs_mvd_greater1_flag[compIdx] does not exist, if abs_mvd_greater0_flag[compIdx] is 0, it may be inferred to be 0. When abs_mvd_greater1_flag[compIdx] is 1, it can be inferred to be 1. Alternatively, for example, when abs_mvd_greater1_flag[compIdx] is not present, if abs_mvd_greater0_flag[compIdx] is 0, it can be inferred to be 0. Alternatively, when abs_mvd_greater1_flag[compIdx] is not present, in the case of zero MVP and abs_mvd_greater0_flag[!compIdx] is 0, it can be inferred to be 1.

[0244] According to an embodiment of the present disclosure, in the case of zero MVP, if the x component is a positive value or 0, the y component may be a negative value. Therefore, in this case, the mvd_sign_flag of the y component may not be parsed. In addition, in this case, mvd_sign_flag may be inferred to be a value indicating a negative value. In this case, mvd_sign_flag may be inferred to be 1. Therefore, in the case of zero MVP and when mvd_sign_flag[0] is 0, mvd_sign_flag[1] may not be parsed and may be inferred to be 1. Therefore, in the case of zero MVP and when mvd_sign_flag[0] is 0, mvd_sign_flag[1] may not be parsed and may be inferred to be 1.

[0245] When mvd_sign_flag is not present before CPR, it can be inferred to be 0. However, in the case where mvd_sign_flag is not present (see Fig. 9 Embodiment) may only correspond to the case where the absolute value of the corresponding component is 0. Therefore, by combining with the embodiment of the present invention, it can be inferred to be 1 in all cases where mvd_sign_flag does not exist. In another embodiment, the inferred value of mvd_sign_flag may vary according to conditions. For example, in the case of zero MVP && (mvd_sign_flag[0]==0||abs_mvd_greater0_flag[0]==0), it can be inferred to be 1. Otherwise, it can be inferred to be 0.

[0246] Fig. 20 A motion vector according to an embodiment of the present disclosure is illustrated.

[0247] According to an embodiment of the present disclosure, the value that a motion vector can have can be limited according to the range in which a reference block can be located. In addition, this can correspond to the case of using CPR. For example, a motion vector can be configured not to deviate from the range in which a reference block can be located.

[0248] For example, when the current block is adjacent to a boundary of a range where the reference block may be located, the motion vector may be in the opposite direction of the adjacent boundary. That is, when the current block is adjacent to the left boundary or the right boundary of the range where the reference block may be located, the x component may be greater than or equal to 0 or equal to or less than 0. When the current block is adjacent to the upper boundary or the lower boundary of the range where the reference block may be located, the y component may be greater than or equal to 0 or less than or equal to 0. In an embodiment, the range where the reference block may be located may be the CTU range to which the current block belongs.

[0249] according to Figures 14 to 17In the illustrated embodiment, the MVP may be a zero MV. In particular, the fact that the MVP is a zero MV may be known during the syntax parsing step. In this case, the above description about the motion vector may be applied to the MVD.

[0250] refer to Fig. 20 , the position that the reference block of the CPR may have may be restricted to the CTU to which the current block belongs. In this case, when the current block is adjacent to the left boundary as indicated by A, the x component of the motion vector may be greater than or equal to 0. When the current block is adjacent to the upper boundary as indicated by B, the y component of the motion vector may be greater than or equal to 0.

[0251] Fig.21 The MVD syntax according to an embodiment of the present disclosure is illustrated.

[0252] like Fig. 9 As shown, the MVD can be compiled while being separated into x-component and y-component. Fig.21 , the values ​​corresponding to [0] and [1] may be the x component and the y component, respectively. Further, abs_mvd_greater0_flag may be a flag indicating whether the absolute value of the corresponding component is greater than 0. abs_mvd_greater1_flag may be a flag indicating whether the absolute value of the corresponding component is greater than 1. abs_mvd_minus2 may be a value obtained by subtracting 2 from the absolute value of the corresponding component. mvd_sign_flag may be a flag indicating the sign of the corresponding component. A value of 0 of mvd_sign_flag may indicate positive, while a value of 1 of mvd_sign_flag may indicate negative.

[0253] Can be Fig.21 The MVD compilation syntax is reflected in Fig.19 The embodiment shown.

[0254] exist Fig.21 In the example, the condition "zeroMVP" may indicate the case where the MVP is zero MV and CPR is used. That is, zero MVP may be true in the case where the MVP is zero MV and CPR is used. The condition indicating that the MVP is zero MV may follow Figures 14 to 17 According to the aforementioned embodiment, whether the MVP is the zero MV can be known based on the position of the current block or the candidate index.

[0255] refer to Fig.21, indicating that the conditions that the current block is adjacent to the left boundary, the right boundary, the upper boundary, and the lower boundary are respectively expressed as left_boundary, right_boundary, upper_boundary, and lower_boundary. Further, the fact that the current block is adjacent to the 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 positions that can be used as reference blocks, the height of the range of positions that can be used as reference blocks, etc. For example, the upper left coordinate of the current block can be (x0, y0). The width and height of the current block can be cbWidth and cbHeight, respectively. The width and height of the range of positions that can be used as reference blocks can be rWidth and rHeight, respectively. For example, when (x0%rWidth==0) is true, the current block may be adjacent to the left boundary. When ((x0+cbWidth)%rWidth==0) is true, the current block may be adjacent to the right boundary. When (y0%rHeight==0) is true, the current block may be adjacent to the upper boundary. When ((y0+cbHeight)%rHeight==0) is true, the current block may be adjacent to the lower boundary. According to an embodiment, rWidth and rHeight may be the width and height of a CTU (CTB).

[0256] like Fig. 20 As shown, in the case of zero MVP and the case where the current block is adjacent to the boundary, the sign of the MVD may be determined. For example, in the case of zero MVP and left_boundary, mvd_sign_flag[0] may not be parsed and may be inferred to indicate a positive value (eg, 0).

[0257] For example, in the case of zero MVP and right_boundary, mvd_sign_flag[0] may not be interpreted and may be inferred to indicate a negative value (eg, 1).

[0258] In the case of zero MVP and upper_boundary, mvd_sign_flag[1] may not be interpreted and may be inferred to indicate a positive value (eg, 0).

[0259] For example, in the case of zero MVP and lower_boundary, mvd_sign_flag[1] may not be interpreted and may be inferred to indicate a negative value (eg, 1).

[0260] exist Fig. 9 , 19In 21, abs_mvd_greater0_flag, abs_mvd_greater1_flag, abs_mvd_minus2 and mvd_sign_flag may be sequentially compiled, but if the order is changed, different embodiments may be performed. It may be inferred based on the position of the current block, zero MVP, a range where the reference block may be located, another known syntax value, etc. without parsing the syntax.

[0261] Fig. 22 The MVD syntax according to an embodiment of the present disclosure is illustrated.

[0262] refer to Fig. 22 , which can be achieved Figures 18 to 21 Combination of the illustrated embodiments. Therefore, the number of bits required for mvd coding can be reduced.

[0263] According to an embodiment of the present disclosure, in the case of zero MVP, if the absolute value of the MVD of any component is determined, the sign of the MVD can be determined without parsing so that the MVD does not indicate a reference block that is beyond the available range. Fig. 9 , 19 The absolute value is determined before determining the sign of the MVD as shown in the embodiments of FIG. 21. If the |MVD| of any component exceeds the available range, the sign can be determined to be negative. If the -|MVD| of any component exceeds the available range, the sign can be determined to be positive.

[0264] Fig.23 Blocks and sizes according to an embodiment of the present disclosure are illustrated.

[0265] According to an embodiment of the present disclosure, the width or height of the current block may be the maximum width or the maximum height. In this case, motion information may not be referenced at a preset spatial neighboring position. This may follow the coding order. For example, when the width of the current block is the maximum width, motion information may not be referenced from the right position of the current block. Fig.12 In an embodiment of, it may not be possible to reference motion information from B0. In another example, when the height of the current block is the maximum height, it may not be possible to reference motion information from the lower position of the current block. Fig.12 In an embodiment of the present invention, it may not be possible to reference motion information from A0.

[0266] if Fig.23 Examples and Fig.14 In combination with the embodiment of the present invention, the number of spatially adjacent locations where motion information can be referenced may be reduced to 1. For example, when the current block is adjacent to the left boundary and its width is the maximum width, it may not be possible to obtain the motion information from Fig.12A0, A1, B0, and B2 of the reference motion information. When the current block is adjacent to the upper boundary and its height is the maximum height, it may not be possible to reference motion information from A0, B0, B1, and B2. Therefore, in this case, the number of available spatial neighboring positions is reduced, so it is possible to implement an embodiment of determining a zero MV, omitting the parsing of the candidate index, or binarizing the maximum value of the candidate index to a small value as in the above embodiment.

[0267] Fig.24 FIG. 1 illustrates a configuration of a merge candidate list according to an embodiment of the present disclosure.

[0268] According to an embodiment of the present disclosure, the method of configuring the merge candidate list when using CPR may be different from the method when not using CPR. For example, some candidates that can be added to the merge candidate list when not using CPR may not be added to the merge candidate list when using CPR.

[0269] In an embodiment, when CPR is used, zero MV may not be used because the reference block indicated by zero MV in the current picture may be the current block.

[0270] In an embodiment, when CPR is used, temporal MV (co-located MV) may not be used. This is because when CPR is used, it may not be possible to refer to pictures other than the current picture.

[0271] In an embodiment, when CPR is used, HMVP candidates or pairwise average candidates may not be used. In this case, the index signaling may be changed as described in the embodiments of the above figures.

[0272] In an embodiment, when CPR is used, candidates based on HMVP candidates or pairwise average candidates may be used.

[0273] In an embodiment, when CPR is used, the sub-block merge mode may not be used. The sub-block merge mode may be the same as described above. Therefore, when CPR is used, the flag indicating the sub-block merge mode may not be parsed and may be inferred.

[0274] According to an embodiment of the present disclosure, the set of preset spatial adjacent positions when using CPR may be different from the set of preset spatial adjacent positions when not using CPR. Fig.12 One of B0 and B1 may not be used at a preset position of. For example, when CPR is used, motion information may not be referenced from position B0. Alternatively, according to an embodiment of the present disclosure, when CPR is used, Fig.12One of A0 and A1 may not be used at a preset position of. For example, when CPR is used, motion information may not be referenced from position A0. This is because the motion information when CPR is used may not need to be relatively complex and diverse. Alternatively, this is because when CPR is used, motion information from close positions may be similar.

[0275] Fig.25 Block positions and syntax according to an embodiment of the present disclosure are illustrated.

[0276] According to an embodiment of the present disclosure, when CPR is used, in AMVP mode, zero MV may not be used as MVP. In this case, by combining Fig.15 In an embodiment, only one spatial candidate may be added to the candidate list depending on the position of the current block. When zero MV is not used as MVP, there may be only one candidate in the MVP candidate list. In this case, the candidate index may not be parsed. Furthermore, in this case, the candidate index may be inferred to be 0.

[0277] refer to Fig.25 (a), the current block is adjacent to the left boundary or the upper boundary of the range that the reference block may have. In this case, motion information from a position beyond the range that the reference block may have may not be referenced. When the AMVP mode is used, if zero MV is not used as MVP, the maximum number of available MVP candidates may be 1. Therefore, if Fig.25 As shown in (b), mvp_l0_flag and mvp_l1_flag indicating the candidate index may not be parsed. In this case, it can be inferred to be 0. The case where CPR is used can be indicated by CurrPicIsOnlyRef. l0 and l1 can represent reference lists 0 and 1, respectively. When CPR is used, the current picture may be the only reference picture, so there may be MVs that are only used for one reference list. In this case, the syntax related to the MV may also be parsed for only one reference list.

[0278] Fig.26 Illustrated is the resetting of the space for storing the history of the HMVP according to an embodiment of the present disclosure.

[0279] As described above, the space for storing the history of the HMVP may be reset at a preset position. The space for storing the history of the HMVP may be referred to as an HMVP table.

[0280] According to an embodiment of the present disclosure, the preset position may be different in a case where CPR is used and a case where CPR is not used. For example, when CPR is not used, the HMVP table may be reset at the beginning of a CTU row. For example, when CPR is used, the HMVP table may be reset at the beginning of a range where a reference block may exist. Alternatively, when CPR is used, the HMVP table may be reset at the beginning of each CTU. Alternatively, when CPR is used, there may be more preset positions (more frequently) for resetting the HMVP table than in a case where CPR is not used.

[0281] When CPR is used, motion information corresponding to locations far from the current block may have little relevance to the current block. When CPR is used, parallel processing can be facilitated by resetting the HMVP table more frequently.

[0282] Fig.26 Each small rectangle in the may indicate a range or CTU range where a reference block may exist. In addition, the portion marked with an X may be a portion where the HMVP table is reset. When CPR is not used, such as Fig.26 As shown on the upper side of the , the HMVP table can be reset at the beginning of the CTU line. When using CPR, such as Fig.26 As shown on the lower side of , the HMVP table can be reset at the beginning of the CTU.

[0283] According to an embodiment of the present disclosure, the method of compiling MVD when CPR is used may be different from the method of compiling MVD when CPR is not used. For example, when CPR is not used, the method of compiling MVD may be used. Fig. 9 This is because when CPR is used, the range of available MVs according to the compilation order may be different from the range when CPR is not used.

[0284] In an embodiment, when CPR is used, a scheme for separately coding the x component and the y component may not be used. For example, a coding scheme based on the absolute value and direction of a vector may be used.

[0285] In an embodiment, when CPR is used, when the MVP is zero MV, the reference point indicated by the MV may be different from the regular vector (the vector from the upper left side of the current block).

[0286] In an embodiment, when CPR is used, a different Fig. 9 , 19and the syntax described in 21. For example, in the flag indicating whether the absolute value is greater than any value, the value may be different in the case where CPR is used and in the case where CPR is not used. Therefore, the value obtained by subtracting any value from the absolute value can be signaled. For example, in the above embodiment, there is a flag indicating whether the absolute value is greater than 1. For example, when CPR is used, there may be a flag indicating whether the absolute value is greater than the minimum block size. Alternatively, when CPR is used, a flag indicating whether the absolute value is greater than the width or height of the current block can be used. For example, when CPR is used, a flag indicating whether the absolute value is greater than the width of the current block can be used for the x component, and a flag indicating whether the absolute value is greater than the height of the current block can be used for the y component.

[0287] According to an embodiment of the present disclosure, when CPR is used, a shared merge list may not be used. A shared merge list may correspond to a technique in which multiple blocks (e.g., a coding unit) use the same merge list. A shared merge list may 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 should be reconstructed and facilitating parallel processing may not be of much value. In addition, when CPR is used, if a shared merge list is used, the accuracy may be reduced or the number of available candidates may be too small.

[0288] According to another embodiment, when CPR is used, a reference for grouping blocks using the same merging list in a shared merging list may be different from a reference when CPR is not used.

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

[0290] Fig. 27 A compilation unit syntax according to an embodiment of the present disclosure is illustrated.

[0291] CPR may also be referred to as intra-block copy (IBC) or block copy (BC). Therefore, the CPR mode may be named IBC mode or BC mode.

[0292] According to an embodiment of the present disclosure, IBC may exist as an independent prediction mode. That is, intra prediction and inter prediction may be MODE_INTRA and MODE_INTER, respectively, and there may be a MODE_IBC different from MODE_INTRA and MODE_INTER. In addition, as shown in the previous figure, MODE_INTRA, MODE_INTER, and MODE_IBC may be indicated by a CuPredMode value.

[0293] The tile group may be a unit higher than CU, CTU, PU, ​​etc. Also, the tile group may be a unit that can be processed in parallel.

[0294] Bi-directional prediction (B) picture block groups can use intra prediction or inter prediction, IBC, etc. A B picture block group can use up to two motion vectors and up to two reference indices in a block. Alternatively, a B picture block group can use up to one or more motion vectors and up to one or more reference indices in a block.

[0295] Intra prediction may be a concept including an IBC scheme. Intra prediction may be a prediction method that refers to only a current picture. Inter prediction may be a method that refers to a picture other than the current picture as a reference picture.

[0296] Prediction (P) picture block groups can use intra prediction or inter prediction, IBC, etc. P picture block groups can use at most one motion vector and at most one reference index in a block. Alternatively, B picture block groups can use no more than 2 motion vectors and no more than 2 reference indexes in a block.

[0297] Intra (I) block groups may use intra prediction and IBC. I block groups may not refer to pictures other than the current picture as reference pictures.

[0298] According to an embodiment of the present disclosure, in the case of (tile_group_type!=I||sps_ibc_enabled_flag), there may be a possibility of parsing cu_skip_flag, pred_mode_flag, and pred_mode_ibc_flag. That is, in the case of not corresponding to (tile_group_type!=I||sps_ibc_enabled_flag), it is possible not to parse all cu_skip_flag, pred_mode_flag, and pred_mode_ibc_flag.

[0299] In addition, sps_ibc_enabled_flag may be signaling at a higher level indicating whether IBC is used. For example, sps_ibc_enabled_flag may be signaling in a sequence parameter set indicating whether IBC is used. IBC may not be used when sps_ibc_enabled_flag is configured to 0, and IBC may be used when sps_ibc_enabled_flag is configured to 1. When the IBC mode is referred to as the BC mode, sps_ibc_enabled_flag may be expressed as sps_bc_enabled_flag.

[0300] Whether to use skip mode can be determined based on the value of cu_skip_flag. When cu_skip_flag is 1, skip mode can be used.

[0301] The prediction mode may 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, the value of CuPredMode may be determined based on pred_mode_flag or pred_mode_ibc_flag. pred_mode_flag may be named a prediction mode flag, and pred_mode_ibc_flag may be named a BC mode flag. When the IBC mode is named BC mode, pred_mode_ibc_flag may be expressed as pred_mode_bc_flag.

[0302] tile_group_type may indicate a tile group type. The tile group type may include an I tile group, a P tile group, and a B tile group as described above. In addition, the I, P, and B values ​​of tile_group_type may indicate an I tile group, a P tile group, and a B tile group, respectively.

[0303] According to an embodiment of the present disclosure, in the case of (cu_skip_flag[x0][y0]==0&&tile_group_type!=1), pred_mode_flag may be parsed. When cu_skip_flag is 1, pred_mode_flag may not be parsed. When tile_group_type is 1, pred_mode_flag may not be parsed.

[0304] According to an embodiment, in the case of ((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), pred_mode_ibc_flag may be parsed. For example, in the case of (tile_group_type==I&&cu_skip_flag[x0][y0]==0), pred_mode_ibc_flag may be parsed. Alternatively, in the case of ((tile_group_type!=I&&(cu_skip_flag[x0][y0]||CuPredMode[x0][y0]!=MODE_INTRA)), pred_mode_ibc_flag may be parsed. Alternatively, in the case of 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)), pred_mode_ibc_flag may be parsed. =MODE_INTRA)), pred_mode_ibc_flag may not be parsed. Further, pred_mode_ibc_flag may be parsed when sps_ibc_enabled_flag is 1, and may not be parsed when sps_ibc_enabled_flag is 0. There may be conditions based on the block size at which pred_mode_ibc_flag may be parsed. Fig. 27 , the block size condition corresponds to the case where both cbWidth and cbHeight are less than 32.

[0305] Further, refer to Fig. 27 When CuPredMode is MODE_INTRA, the syntax elements related to intra prediction can be parsed. When CuPredMode is MODE_INTRA, the syntax elements related to motion vectors may not be parsed.

[0306] When CuPredMode is not MODE_INTRA, the syntax elements related to inter-frame prediction can be parsed. When CuPredMode is not MODE_INTRA, the syntax elements related to IBC can be parsed. The IBC-related syntax elements may include motion vector-related syntax elements. That is, when CuPredMode is not MODE_IBC, the IBC-related syntax elements can be parsed. The IBC-related syntax elements may include merge mode-related syntax elements and AMVP-related syntax elements. Compared with MODE_INTER, IBC may have a more restricted prediction mode and fewer syntax elements to be parsed. For example, in the case of MODE_IBC, only the syntax elements for reference list L0 may be parsed. In another example, in the case of MODE_IBC, some flags indicating whether the mode is used in merge_data may not be parsed. When CuPredMode is not MODE_INTRA, the syntax elements related to inter-frame prediction can be parsed. Parsing the IBC-related syntax elements may be a case where the syntax for the chrominance component is not parsed. When CuPredMode is not MODE_INTRA, the syntax elements related to inter-frame prediction can be parsed. Parsing of IBC related syntax elements may be a case where the tree type (treeType) is not DUAL_TREE_CHROMA.

[0307] In an embodiment, the syntax for parsing which component and determining the component to be processed can be determined by the tree type. When the tree type is SINGLE_TREE, the luminance component and the chrominance component can share syntax element values. When the tree type is SINGLE_TREE, the luminance block and the chrominance block can be segmented by the same method. When the tree type is DUAL_TREE, the luminance block and the chrominance block can be segmented by different methods. The tree type of DUAL_TREE may include DUAL_TREE_LUMA and DUAL_TREE_CHROMA. It can be determined whether to process the luminance component or the chrominance component based on whether the tree type is DUAL_TREE_LUMA or DUAL_TREE_CHROMA.

[0308] Fig.28 FIG. 4 illustrates prediction mode signaling according to an embodiment of the present disclosure.

[0309] According to an embodiment of the present disclosure, the prediction mode may be indicated based on pred_mode_flag. CuPredMode may be determined based on pred_mode_flag. In addition, inter prediction or intra prediction may be indicated based on pred_mode_flag.

[0310] According to an embodiment of the present disclosure, when pred_mode_flag is 0, CuPredMode may be configured as MODE_INTER. When pred_mode_flag is 1, CuPredMode may be configured as MODE_INTRA. According to an embodiment, pred_mode_flag may indicate whether the current CU is in an inter prediction mode or an intra prediction mode.

[0311] When pred_mode_flag is not present, pred_mode_flag or CuPredMode can be inferred. When pred_mode_flag is not present, pred_mode_flag or CuPredMode can be inferred based on its tile group. For example, in the case of an I tile group, CuPredMode can be inferred as MODE_INTRA. In the case of a P tile group or a B tile group, CuPredMode can be inferred as MODE_INTER.

[0312] According to an embodiment of the present disclosure, the prediction mode may be indicated based on pred_mode_ibc_flag. CuPredMode may be determined based on pred_mode_ibc_flag. In addition, the IBC mode may be indicated based on pred_mode_ibc_flag.

[0313] According to an embodiment of the present disclosure, when pred_mode_ibc_flag is 0, CuPredMode may be configured as MODE_INTER. When pred_mode_ibc_flag is 1, CuPredMode may be configured as MODE_IBC. When pred_mode_ibc_flag is 0, CuPredMode may be configured as a value other than MODE_IBC.

[0314] When pred_mode_ibc_flag is not present, pred_mode_ibc_flag or CuPredMode may be inferred. When pred_mode_ibc_flag is not present, pred_mode_ibc_flag or CuPredMode may be inferred based on its tile group. For example, in the case of an I tile group, CuPredMode may be inferred as MODE_INTRA. In the case of a P tile group or a B tile group, CuPredMode may be inferred as MODE_INTER.

[0315] In the present disclosure, tilesets may be replaced with slices or other units in which parallel processing can be performed as well as tile groups.

[0316] According to an embodiment of the present disclosure, when IBC is used, skip mode may be used. For example, when IBC is used for an I tile group, skip mode may be used. For example, skip mode may be used for a CU that uses IBC for an I tile group. However, referring to Figures 27 to 28 The syntax and signaling methods described may not support this. For example, IBC mode and skip mode may be assumed in I tile groups. In this case, sps_ibc_enabled_flag may be 1. In addition, cu_skip_flag may be parsed. In this case, the value of cu_skip_flag may be 1 (a value indicating the use of skip mode). For a value of 1 for cu_skip_flag or an I tile group, pred_mode_flag may not be parsed. In this case, CuPredMode may be inferred to be MODE_INTRA for I tile groups. For I tile groups and cu_skip_flag with a value of 1, pred_mode_ibc_flag may not be parsed. In this case, CuPredMode may be inferred to be MODE_INTRA for I tile groups. Therefore, there may be a situation where CuPredMode may not be indicated by MODE_IBC even if IBC is used.

[0317] Fig.29 Prediction mode signaling according to an embodiment of the present disclosure is illustrated.

[0318] Fig.29 The description of pred_mode_flag and pred_mode_ibc_flag can refer to Figures 27 to 28 . Fig.29 The embodiments can be used to solve the reference Fig.28 Describe the problem.

[0319] According to an embodiment of the present disclosure, CuPredMode can be inferred based on cu_skip_flag. In addition, CuPredMode can be inferred based on its 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 the value of cu_skip_flag is 0, CuPredMode can be inferred as MODE_INTRA. For example, in the case of an I tile group and the value of cu_skip_flag is 1, CuPredMode can be inferred as MODE_IBC. The values ​​of cu_skip_flag are 0 and 1, respectively, which can indicate not using and using skip mode. This embodiment can be performed when pred_mode_flag or pred_mode_ibc_flag does not exist.

[0320] In addition, CuPredMode can be configured based on cu_skip_flag without any process to configure CuPredMode to another value. In addition, based on cu_skip_flag, CuPredMode can be configured to MODE_IBC or MODE_INTRA without any process to configure CuPredMode to another value. For example, in the case of I tile group and the value of cu_skip_flag is 1, CuPredMode can be configured to MODE_IBC. In addition, in the case of I tile group and the value of cu_skip_flag is 0, CuPredMode can be configured to MODE_INTRA. Similarly, this embodiment can be performed when pred_mode_flag or pred_mode_ibc_flag does not exist.

[0321] There may be CuPredMode-inferred values ​​based on tile group type and cu_skip_flag configuration, and there may be CuPredMode-inferred values ​​based on tile group type and not based on cu_skip_flag configuration. For example, CuPredMode may be inferred as MODE_INTRA and MODE_IBC based on tile group type and cu_skip_flag. In addition, CuPredMode may be inferred as MODE_INTER based on tile group type.

[0322] Conventional intra prediction that is not IBC may not use skip mode. Therefore, when signaling indicating the use of skip mode is performed, it can be determined to be IBC or inter prediction. In the case of a tile group that signals the use of skip mode and only uses intra prediction (including IBC), it can be determined to be IBC.

[0323] refer to Fig.29 , when pred_mode_flag is not present, CuPredMode can be inferred. In the case of I tile groups and cu_skip_flag is 0, MODE_INTRA can be inferred. In the case of I tile groups and cu_skip_flag is 1, MODE_IBC can be inferred. In the case of P tile groups or B tile groups, MODE_INTER can be inferred.

[0324] refer to Fig.29, when pred_mode_ibc_flag is not present, CuPredMode can be inferred. In the case of I tile groups and cu_skip_flag is 0, MODE_INTRA can be inferred. In the case of I tile groups and cu_skip_flag is 1, MODE_IBC can be inferred. In the case of P tile groups or B tile groups, MODE_INTER can be inferred.

[0325] Fig.30 Prediction mode signaling according to an embodiment of the present disclosure is illustrated.

[0326] Fig.30 The description of pred_mode_flag and pred_mode_ibc_flag can refer to Figures 27 to 28 . Fig.30 The embodiments can be used to solve the reference Fig.28 Describe the problem.

[0327] In an embodiment, a method of inferring CuPredMode, pred_mode_flag, or pred_mode_ibc_flag may be changed according to sps_ibc_enabled_flag.

[0328] In an embodiment, when sps_ibc_enabled_flag is 1, the Fig.29 When sps_ibc_enabled_flag is 0, you can use Fig.28 The reasoning method shown in .

[0329] refer to Fig.30, CuPredMode can be inferred. For example, when pred_mode_flag or pred_mode_ibc_flag does not exist, CuPredMode can be inferred. According to an embodiment of the present disclosure, in the case where sps_ibc_enabled_flag is 1 and in the case of I tile group, CuPredMode can be inferred based on cu_skip_flag. For example, in the case where sps_ibc_enabled_flag is 1 and in the case of I tile group, if cu_skip_flag is 0, CuPredMode can be configured as MODE_INTRA. In the case where sps_ibc_enabled_flag is 1 and in the case of I tile group, if cu_skip_flag is 1, CuPredMode can be configured as MODE_IBC. In the case where sps_ibc_enabled_flag is 1 and in the case of P tile group or B tile group, CuPredMode can be configured as MODE_INTER. In the case where sps_ibc_enabled_flag is 0 and in the case of I tile group, CuPredMode can be configured as MODE_INTRA. In the case where sps_ibc_enabled_flag is 0 and in the case of a P tile group or a B tile group, CuPredMode may be configured as MODE_INTER.

[0330] Fig.31 A compilation unit syntax according to an embodiment of the present disclosure is illustrated.

[0331] According to an embodiment of the present disclosure, in the case of an I tile group, pred_mode_ibc_flag can be parsed. In this case, Fig.28 In the case of an I tile group and sps_ibc_enabled_flag is 1, pred_mode_ibc_flag can be parsed. That is, even when an I tile group uses the IBC mode and the skip mode, pred_mode_ibc_flag can be configured and MODE_IBC can be indicated.

[0332] refer to Fig.31 , in the case of (tile_group_type==I), sps_ibc_enabled_flag can be 1, and when the conditions related to the block size are met, pred_mode_ibc_flag is parsed.

[0333] Fig.32 Prediction mode signaling according to an embodiment of the present disclosure is illustrated.

[0334] According to an embodiment of the present disclosure, when pred_mode_flag does not exist, pred_mode_flag can be inferred. The encoder can infer the pred_mode_flag of the current block according to the type of the higher-level group of the current block, thereby omitting the record of the pred_mode_flag of the current block in the bitstream, thereby improving the compression efficiency. For example, when 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-frame prediction mode, the encoder can omit the record of the pred_mode_flag of the current block with an indication value of 1 in the bitstream. For example, when 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-frame prediction mode, the encoder can omit the record of the pred_mode_flag of the previous block when the indication value is 0 in the bitstream. More specifically, when 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, when the value of cu_skip_flag is 1), the encoder may omit recording of pred_mode_flag indicating a value of 0 for the current block in the bitstream.

[0335] Therefore, according to an embodiment, the decoder may infer pred_mode_flag based on the tile group type. For example, in the case of an I tile group, pred_mode_flag may be inferred to be 1. In the case of a P tile group, pred_mode_flag may be inferred to be 0. In the case of a B tile group, pred_mode_flag may be inferred to be 0.

[0336] CuPredMode can be configured as MODE_INTER or MODE_INTRA based on pred_mode_flag. For example, when pred_mode_flag is 0, CuPredMode can be configured as MODE_INTER. In addition, when pred_mode_flag is 1, CuPredMode can be configured as MODE_INTRA.

[0337] According to an embodiment of the present disclosure, CuPredMode may be configured based on pred_mode_flag or pred_mode_ibc_flag. For example, when pred_mode_ibc_flag is 0, CuPredMode may be configured based on pred_mode_flag. For example, when pred_mode_ibc_flag is 0, CuPredMode may be configured to MODE_INTER or MODE_INTRA based on pred_mode_flag. Alternatively, when pred_mode_ibc_flag is 0, CuPredMode may be configured to a value other than MODE_IBC based on pred_mode_flag. Reference Fig.32 , when pred_mode_ibc_flag is 0 and pred_mode_flag is 0, CuPredMode can be configured as MODE_INTER. In addition, when pred_mode_ibc_flag is 0 and pred_mode_flag is 1, CuPredMode can be configured as MODE_INTRA.

[0338] According to an embodiment of the present disclosure, CuPredMode may be configured based only on pred_mode_ibc_flag. For example, when pred_mode_ibc_flag is 1, CuPredMode may be configured without any other flags. For example, when pred_mode_ibc_flag is 1, CuPredMode may be configured as MODE_IBC.

[0339] According to an embodiment of the present disclosure, when pred_mode_ibc_flag does not exist, pred_mode_ibc_flag may be inferred. For example, the value of pred_mode_ibc_flag may be inferred based on the tile group type. In addition, the value of pred_mode_ibc_flag may be inferred based on the tile group type and the IBC mode availability condition. More specifically, in the case of an I tile group, the value of pred_mode_ibc_flag may be inferred based on the IBC mode availability condition. For example, in the case of an I tile group and in the case where the IBC mode availability condition is met, the value of pred_mode_ibc_flag may be inferred to be 1. When inferred to be 1, CuPredMode may be configured to the value of MODE_IBC. Further, in the case of an I tile group and in the case where the IBC mode availability condition is not met, the value of pred_mode_ibc_flag may be inferred to be 0. Alternatively, in the case of an I tile group and in the case where at least one of the IBC mode availability conditions is not met, the value of pred_mode_ibc_flag may be inferred to be 0. When inferred to be 0, CuPredMode can be configured to a value other than MODE_IBC. The IBC mode availability condition can include the value of sps_ibc_enabled_flag. In addition, the IBC mode availability condition can include conditions related to block size. Fig.32 , in the case of I tile group and when sps_ibc_enabled_flag is 1, the value of pred_mode_ibc_flag can be inferred to be 1. In this case, when the IBC mode availability condition is added and satisfied, the value of pred_mode_ibc_flag can be inferred to be 1. Fig.32 In , additional IBC mode availability conditions are indicated as block size conditions.

[0340] Even in the I tile group ( Fig.32 Condition 1) and sps_ibc_enabled_flag is 0 ( Fig.32 In the case of condition 2a), the value of pred_mode_ibc_flag may also be inferred to be 0. In the case of I tile group ( Fig.32 Condition 1) and does not meet another IBC mode availability condition ( Fig.32 Under condition 2b), the value of pred_mode_ibc_flag can be inferred to be 0.

[0341] In another embodiment, in case of P or B tile groups, the value of pred_mode_ibc_flag may be inferred to be 0. In case of P or B tile groups, the value of pred_mode_ibc_flag may be inferred to be a preset value without any other conditions except the tile group type.

[0342] When the above conditions are met during the encoding process of the video signal, the encoder may not declare pred_mode_ibc_flag in the bitstream. Therefore, the encoder can improve video compression efficiency by not declaring the value of pred_mode_ibc_flag in the bitstream.

[0343] The term “inference (infer)” in various embodiments of the present disclosure may refer to configuration (configure), derivation (derive), and the like.

[0344] According to an embodiment of the present disclosure, a tree type may be derived as follows.

[0345] When tile_group_type is 1 and qtbtt_dual_tree_intra_flag is 1, the tree type may be configured as DUAL_TREE_LUMA. When tile_group_type is 1, qtbtt_dual_tree_intra_flag is 1, and the luma component is processed, the tree type may be configured as DUAL_TREE_LUMA.

[0346] When tile_group_type is 1 and qtbtt_dual_tree_intra_flag is 1, the tree type may be configured as DUAL_TREE_CHROMA. Alternatively, when tile_group_type is 1, qtbtt_dual_tree_intra_flag is 1, and a chroma component is processed, the tree type may be configured as DUAL_TREE_CHROMA.

[0347] When tile_group_type is not 1 or qtbtt_dual_tree_intra_flag is 0, the tree type can be configured as SINGLE_TREE.

[0348] According to an embodiment, qtbtt_dual_tree_intra_flag may be signaling indicating whether dual trees are allowed. Allowing dual trees may mean that there are separate coded quadtree syntax structures for luma and chroma components. More specifically, when the current picture is the only reference picture, qtbtt_dual_tree_intra_flag may be signaling indicating whether dual trees are allowed.

[0349] Fig.33 A compilation unit syntax according to an embodiment of the present disclosure is illustrated.

[0350] According to an embodiment of the present disclosure, in the case of chrominance components, the IBC mode may not be used. More specifically, in the case of DUAL_TREE_CHROMA, the IBC mode may not be used.

[0351] refer to Fig.33 , when the tree type is not DUAL_TREE_CHROMA, pred_mode_ibc_flag may be parsed. When the tree type is DUAL_TREE_CHROMA, pred_mode_ibc_flag may not be parsed. According to an embodiment, when the tree type is DUAL_TREE_CHROMA, CuPredMode may be inferred to be MODE_INTRA.

[0352] Fig.34 A compilation unit syntax according to an embodiment of the present disclosure is illustrated.

[0353] Fig.34 The coding unit syntax of may indicate syntax related to intra prediction. According to an embodiment of the present disclosure, intra_chroma_pred_mode signaling may exist. The intra prediction mode of the chroma component may be determined based on intra_chroma_pred_mode.

[0354] refer to Fig.34 When the tree type is SINGLE_TREE or DUAL_TREE_CHROMA, intra_chroma_pred_mode can be parsed. When the tree type is DUAL_TREE_LUMA, intra_chroma_pred_mode may not be parsed.

[0355] Fig.35 Derivation of intra prediction modes for chroma components according to an embodiment of the present disclosure is illustrated.

[0356] refer to Fig.35, IntraPredModeC may be the intra prediction mode for the chroma component. xCb and yCb may indicate the top leftmost sample of the chroma coding block based on the luma position. IntraPredModeY may be the intra prediction mode for the luma component.

[0357] According to an embodiment of the present disclosure, IntraPredModeC may be determined based on IntraPredModeY. IntraPredModeC may be determined based on IntraPredModeY and intra_chroma_pred_mode. IntraPredModeY may be a mode corresponding to a luminance block corresponding to a current chroma block. According to an embodiment, a position of IntraPredModeY corresponding to IntraPredModeC used for any position may be preset. According to an embodiment, the preset position may be a luminance block position corresponding to the center of the current chroma block. For example, when deriving IntraPredModeC of a position (xCb, yCb), the IntraPredModeY of a position (xCb+cbWidth / 2, yCb+cbHeight / 2) may be referenced. Alternatively, when deriving IntraPredModeC of a position (xCb, yCb), the preset position may be a position based on xCb or yCb.

[0358] For any value of IntraPredModeY, the value of IntraPredModeC can be referenced Fig.35 Table 8-2 or Table 8-3. Table 8-2 may correspond to the case where CCML is not used (or sps_cclm_enabled_flag is 0), and Table 8-3 may correspond to the case where CCLM can be used (or sps_cclm_enabled_flag is 1). When IntraPredModeY is any value, Fig.35 In the column corresponding to the value, reference may be made to the column, and in the column, the value corresponding to intra_chroma_pred_mode may be IntraPredModeC. For example, when IntraPredModeY is 1 and intra_chroma_pred_mode is 1, IntraPredModeC may be 50.

[0359] According to an embodiment, sps_cclm_enabled_flag may be a higher level signaling indicating whether CCLM may be applied. For example, when sps_cclm_enabled_flag is 1, CCLM may be applied. When sps_cclm_enabled_flag is 0, CCLM may not be applied.

[0360] Fig.35 In the example, the value of IntraPredModeC of 81, 82 or 83 may correspond to the CCLM mode. Fig.35 When sps_cclm_enabled_flag is 0, the value of IntraPredModeC is 4, which corresponds to DM mode. Fig.35 When sps_cclm_enabled_flag is 1, the value of IntraPredModeC is 7, which corresponds to the DM mode.

[0361] There may be a definition of a bin string for signaling intra_chroma_pred_mode. For example, a minimum number of intra_chroma_pred_modes may be used to indicate DM mode. For example, 1 bit of intra_chroma_pred_mode may be used to indicate DM mode.

[0362] According to an embodiment, when sps_cclm_enabled_flag is 0, the number of bits indicating the value 4, 0, 1, 2, or 3 corresponding to intra_chroma_pred_mode may increase or remain the same. According to an embodiment, when sps_cclm_enabled_flag is 0, the bin string indicating the value 4, 0, 1, 2, or 3 corresponding to intra_chroma_pred_mode may be 0, 100, 101, 110, or 111.

[0363] According to an embodiment, when sps_cclm_enabled_flag is 1, the number of bits indicating the value 7, 4, 5, 6, 0, 1, 2, or 3 corresponding to intra_chroma_pred_mode may be increased or the same. According to an embodiment, when sps_cclm_enabled_flag is 1, the bin string indicating the value 7, 4, 5, 6, 0, 1, 2, or 3 corresponding to intra_chroma_pred_mode may be 0, 10, 1110, 1111, 11000, 11001, 11010, or 11011.

[0364] However, according to the above-mentioned embodiment, intra prediction for chroma blocks may not be easy. In particular, the derivation of intra prediction modes for chroma blocks may not be easy. As described above, when a chroma block is intra-predicted, the intra prediction mode for the corresponding luminance block should be referenced in order to determine the intra prediction mode. However, the corresponding luminance position may not perform intra prediction or may not be MODE_INTRA. For example, when the corresponding luminance position is MODE_IBC, the corresponding luminance intra prediction mode may not exist. According to an embodiment, in the case of SINGLE_TREE, the corresponding luminance block and chroma block may use the same prediction mode. Further, in the case of DUAL_TREE, the corresponding luminance block and chroma block may use different prediction modes. In addition, in the case of I block groups, DUAL_TREE may be used. In addition, in the case of I block groups, MODE_INTRA or MODE_IBC may be used. Therefore, at the same position, DUAL_TREE_LUMA may use MODE_IBC, while DUAL_TREE_CHROMA may use MODE_INTRA.

[0365] Fig.36 Derivation of intra prediction modes for chroma components according to an embodiment of the present disclosure is illustrated.

[0366] Fig.36 An embodiment may be to solve Fig.35 The method for the problem described in .

[0367] According to an embodiment of the present disclosure, when IntraPredModeY does not exist, IntraPredModeY can be configured as a preset mode (or value). Therefore, even when the luma position corresponding to the chroma block does not use intra prediction or uses the IBC mode, IntraPredModeC can be derived.

[0368] More specifically, when IntraPredModeY does not exist, IntraPredModeY can be configured as flat mode (value 0). In this case, Fig.35 It is possible to use fewer bits to signal the planar mode in the signaling method described in .

[0369] Alternatively, when IntraPredModeY is not present, IntraPredModeY can be configured to DC mode (value 1). In this case, Fig.35 In the signaling method described in , it is possible to use fewer bits to signal the DC mode.

[0370] Alternatively, when IntraPredModeY is not present, IntraPredModeY can be configured to vertical mode (value 50). In this case, Fig.35 In the signaling method described in , it is possible to signal the vertical mode using fewer bits.

[0371] Alternatively, when IntraPredModeY is not present, IntraPredModeY can be configured to horizontal mode (value 18). In this case, Fig.35 In the signaling method described in , it is possible to signal the horizontal mode using fewer bits.

[0372] In another embodiment, when IntraPredModeY does not exist, the value of IntraPredModeC corresponding to the value of intra_chroma_pred_mode may be determined as Fig.35 That is, in Fig.35 The column where the value of IntraPredModeY does not exist may exist alone. For example, IntraPredModeC corresponding to intra_chroma_pred_modes 4, 0, 1, 2, and 3 may be 0, 1, 50, and 18, respectively. Alternatively, IntraPredModeC corresponding to intra_chroma_pred_modes 4, 0, 1, 2, and 3 may be 0, 50, 18, and 1, respectively. This may apply to both cases where sps_cclm_enabled_flag is 0 and 1.

[0373] In another embodiment, when IntraPredModeY does not exist, IntraPredModeC can be configured to a preset value. For example, when IntraPredModeY does not exist, IntraPredModeC can be configured to a preset value regardless of intra_chroma_pred_mode. In addition, when IntraPredModeY does not exist, the value of intra_chroma_pred_mode can always be signaled with a value of 0. For example, when IntraPredModeY does not exist, IntraPredModeC can be configured to planar mode. Alternatively, when IntraPredModeY does not exist, IntraPredModeC can be configured to CCLM. Alternatively, when IntraPredModeY does not exist, IntraPredModeC can be configured to DM mode. In addition, when IntraPredModeY does not exist, it can be not parsed. Fig.34intra_chroma_pred_mode described in .

[0374] In another embodiment, when IntraPredModeY does not exist, the position of the reference IntraPredModeC may be changed.

[0375] In the above embodiment, the case where IntraPredModeY does not exist may refer to the case where the corresponding luma position referred to when deriving the chroma intra prediction mode is not MODE_INTRA. Alternatively, the case may refer to the case where CuPredMode[xCb+cbWidth / 2][yCb+cbHeight / 2] corresponding to the luma component when deriving the chroma intra prediction mode at the position (xCb, yCb) is not MODE_INTRA or MODE_IBC.

[0376] Alternatively, this case may refer to a case where IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2] corresponding to the luma component when the chroma intra prediction mode at the (xCb, yCb) position is derived does not exist.

[0377] refer to Fig.36 If IntraPredModeC[xCb][yCb] does not exist when deriving IntraPredModeC[xCb][yCb], you can configure IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2] to a preset value. Fig.35 IntraPredModeC is derived from the table described in .

[0378] If IntraPredModeC[xCb][yCb] exists when deriving IntraPredModeC[xCb][yCb], then IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2] and IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2] may be referenced. Fig.35 IntraPredMode is derived from the table described in .

[0379] According to an embodiment of the present disclosure, if the corresponding luminance block uses the IBC mode when predicting the chrominance block, the prediction mode may be limited. More specifically, if the corresponding luminance block uses the IBC mode when the chrominance block is intra-predicted, the intra-prediction mode may be limited. For example, in this case, the DM mode may not be used. This is because when the corresponding luminance block and the chrominance block use different modes, the similarity between them is reduced.

[0380] Fig.37 A compilation unit syntax according to an embodiment of the present disclosure is illustrated.

[0381] According to an embodiment of the present disclosure, the motion information of the chroma block may exist separately from the motion information of the luminance block. For example, when the chroma block uses the IBC mode, the motion information of the chroma block may exist separately from the motion information for the luminance block.

[0382] refer to Fig.37 , when the tree type is DUAL_TREE_CHROMA, the syntax elements related to motion information can be parsed. For example, when the tree type is DUAL_TREE_CHROMA and CuPredMode is MODE_IBC, the syntax elements related to motion information can be parsed. The syntax elements related to motion information may include merge_flag, syntax elements in merge_data, mvp_l0_flag, amvr_4pel_flag, etc.

[0383] Fig.38 Syntax elements according to an embodiment of the present disclosure are illustrated.

[0384] According to an embodiment of the present disclosure, the prediction mode may be limited based on the block size. That is, the CuPredMode may be limited based on the block size. For example, inter-frame prediction may be limited. This is to reduce memory bandwidth or computational complexity. For example, the prediction mode may be limited in blocks with a small size. For example, the prediction mode may be limited in blocks with a size equal to or less than a threshold. For example, the threshold may be a size of 4x4. That is, in a detailed embodiment, inter-frame prediction may not be used in blocks with a size equal to or less than 4x4.

[0385] The limited prediction mode described in another embodiment can be an inter-frame prediction of a bidirectional prediction. For example, bidirectional prediction may not be used in a block size equal to or less than a threshold. In this case, the threshold can indicate a size equal to or less than 4x8 or 8x4. For example, the threshold can be 12 (width+height). When bidirectional prediction is limited, there may be a process of converting bidirectional prediction to unidirectional prediction. Alternatively, when bidirectional prediction is limited, the value indicating the prediction direction or reference list can be limited.

[0386] As described above, the prediction mode may be restricted, and thus a syntax structure different from that described in the above figures may be used for efficient signaling.

[0387] According to an embodiment of the present disclosure, in the case of MODE_INTRA, the skip mode may not be used. Therefore, in the case of MODE_INTRA, cu_skip_flag may be 0. Therefore, if cu_skip_flag is 1, it may be determined to be non-MODE_INTRA.

[0388] refer to Fig.38 , when 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 may be parsed. In this case, the parsing may be performed taking into account additional conditions. That is, when the tile group type is I and sps_ibc_enabled_flag is 0, cu_skip_flag, pred_mode_flag, and pred_mode_ibc_flag may not be parsed. According to an embodiment, CuPredMode may be a value of one of MODE_INTRA, MODE_INTER, and MODE_IBC. The available CuPredMode value when the tile group type is I may be MODE_INTRA or MODE_IBC. However, when MODE_IBC is limited, for example, when sps_ibc_enabled_flag is 0, the available CuPredMode value may be only MODE_INTRA. Therefore, when the tile group type is 1 and sps_ibc_enabled_flag is 0, pred_mode_flag and pred_mode_ibc_flag may not be parsed and CuPredMode may be determined as MODE_INTRA. In addition, as described above, cu_skip_flag may be determined as 0.

[0389] According to an embodiment of the present disclosure, cu_skip_flag, pred_mode_flag, and pred_mode_ibc_flag may be parsed based on the block size.

[0390] For example, in the case of a block size where inter-frame prediction is limited and where IBC may not be used, cu_skip_flag may not be parsed. That is, in the case of a block size where inter-frame prediction can be used or where IBC may be used, cu_skip_flag may be parsed. In the case of a block size where inter-frame prediction is limited and where IBC may not be used, CuPredMode may be determined to be MODE_INTRA. In this case, the value of cu_skip_flag may be determined and inferred to be 0. In an embodiment, the block size where inter-frame prediction is limited may be a 4x4 block. In addition, the case where IBC may not be used may be a case where sps_ibc_enabled_flag is 0.

[0391] According to an embodiment of the present disclosure, in the case of a block size where inter-frame prediction is limited, pred_mode_flag may not be parsed. According to an embodiment of the present disclosure, it may be determined whether CuPredMode is MODE_INTRA or MODE_INTER based on the value of pred_mode_flag. In the case of a block size where inter-frame prediction is limited, it may be determined that pred_mode_flag is a value indicating that CuPredMode is MODE_INTRA. 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 only based on pred_mode_flag may be changed based on pred_mode_ibc_flag. According to an embodiment, whether CuPredMode is MODE_IBC and whether CuPredMode is determined only based on pred_mode_flag may be determined based on the value of pred_mode_ibc_flag.

[0392] In the case of an unrestricted block size for inter-frame prediction, pred_mode_flag may be parsed. In this case, additional conditions may be considered. For example, whether to parse pred_mode_flag may be determined based on cu_skip_flag or the tile group type. As described above, pred_mode_flag may be a value for determining whether CuPredMode is MODE_INTRA or MODE_INTER, because CuPredMode may be limited based on cu_skip_flag or the tile group type. For example, when the tile group type is I, CuPredMode may be only the value of MODE_INTRA. When the tile group type is not I, that is, the tile group type is P or B, CuPredMode may be both MODE_INTRA and MODE_INTER. However, when the tile group type is not I and cu_skip_flag is 1, CuPredMode may be only the value of MODE_INTER. According to an embodiment of the present disclosure, when cu_skip_flag is 1 or the tile group type is I, pred_mode_flag may not be parsed. According to an embodiment of the present disclosure, when the tile group type is I, pred_mode_flag or CuPredMode may be inferred as a value indicating MODE_INTRA. When the tile group type is P or B, pred_mode_flag or CuPredMode may be inferred as a value indicating MODE_INTER.

[0393] In an embodiment, the block size to which inter prediction is restricted may be a 4x4 block. Alternatively, the block size to which inter prediction is restricted may be a block of a size equal to or smaller than 4x4.

[0394] pred_mode_ibc_flag may be parsed based on a block size where inter prediction is restricted. In addition, pred_mode_ibc_flag may be parsed based on cu_skip_flag. According to an embodiment, in the case of a block size where inter prediction is restricted and cu_skip_flag is 1, pred_mode_ibc_flag may not be parsed. As described above, in a block size where inter prediction is restricted, CuPredMode may not be MODE_INTER. When cu_skip_flag is 1, CuPredMode may not be MODE_IBC. Therefore, in the case of a block size where inter prediction is restricted and cu_skip_flag is 1, pred_mode_ibc_flag or CuPredMode may be determined and inferred as MODE_IBC. In addition, there may be a case where it is configured as MODE_IBC. For example, when sps_ibc_enabled_flag is 1, it may be configured as MODE_IBC. Therefore, in the case of a block size where inter prediction is restricted and cu_skip_flag is 1, pred_mode_ibc_flag or CuPredMode may be determined and inferred from sps_ibc_enabled_flag. More specifically, in the case of a block size where inter prediction is restricted and cu_skip_flag is 1, pred_mode_ibc_flag may be inferred as sps_ibc_enabled_flag. In the case of a block size where inter prediction is not restricted and cu_skip_flag is 0, pred_mode_ibc_flag may be parsed.

[0395] When the tile group type is I and cu_skip_flag is 1, pred_mode_ibc_flag may not be parsed. In addition, in this case, pred_mode_ibc_flag or CuPredMode may be determined and inferred as a value indicating MODE_IBC. The value of CuPredMode available in the I tile group is MODE_INTRA or MODE_IBC. This is because the skip mode is not used in MODE_INTRA. Therefore, when the tile group type is I and cu_skip_flag is 0, pred_mode_ibc_flag may be parsed.

[0396] When the tile group type is not I, CuPredMode is MODE_INTRA, and in the case of a block size that does not correspond to inter-frame prediction restriction, pred_mode_ibc_flag may not be parsed. In this case, the prediction mode may be determined without pred_mode_ibc_flag. When the tile group type is not I, CuPredMode is not MODE_INTRA, and in the case of a block size that is restricted for inter-frame prediction, pred_mode_ibc_flag may be parsed. In this case, additional conditions may be considered to parse pred_mode_ibc_flag. For example, when the tile group type is not I, when CuPredMode is MODE_INTRA, and in the case of a block that is restricted for inter-frame prediction, pred_mode_ibc_flag may be parsed. This is because even if inter-frame prediction is restricted, the final prediction mode is determined to be MODE_INTRA or MODE_IBC. In addition, when cu_skip_flag is 0, pred_mode_ibc_flag may be parsed.

[0397] In an embodiment, the block size to which inter prediction is restricted may be a 4x4 block. Alternatively, the block size to which inter prediction is restricted may be a block of a size equal to or smaller than 4x4.

[0398] Fig.39 A method of inferring a signaling value according to an embodiment of the present disclosure is illustrated.

[0399] refer to Fig.39 , you can Fig.38 Alternatively, the pred_mode_flag or pred_mode_ibc_flag may be inferred as described in Fig.38 Determine CuPredMode as described in . Fig.39 The pred_mode_flag and pred_mode_ibc_flag can be the same as Fig.38 The signaling of pred_mode_flag and pred_mode_ibc_flag is the same.

[0400] According to an embodiment of the present disclosure, CuPredMode may be determined as MODE_INTER or MODE_INTRA based on the value of pred_mode_flag. When the value is MODE_TEMP, CuPredMode may be determined as MODE_TEMP or MODE_IBC based on the value of pred_mode_ibc_flag.

[0401] like Fig.38As shown, in the case of a block size where inter prediction is restricted, pred_mode_flag may be inferred to be a value indicating MODE_INTRA. That is, in the case of a block size where inter prediction is restricted, pred_mode_flag may be inferred to be 1. Fig.39 , when the block size is 4x4, the value of pred_mode_flag can be inferred to be 1.

[0402] like Fig.38 As shown, in the case of a block size where inter-frame prediction is restricted and in the case of skip mode, pred_mode_ibc_flag can be inferred to indicate the value of MODE_IBC. This may be a case where MODE_IBC can be used. For example, a case where MODE_IBC can be used may be a case where sps_ibc_enabled_flag is 1. For example, in the case of a block size where inter-frame prediction is restricted and in the case of skip mode, pred_mode_ibc_flag can be inferred to be the value of sps_ibc_enabled_flag. Reference Fig.39 , in the case where the block size is 4x4 and in the case of skip mode, pred_mode_ibc_flag can be inferred to be the value of sps_ibc_enabled_flag.

[0403] Fig.40 A method of inferring a signaling value according to an embodiment of the present disclosure is illustrated.

[0404] Figures 38 to 39 Methods for parsing, inferring, or determining cu_skip_flag, pred_mode_flag, pred_mode_ibc_flag, and CuPredMode have been described. Fig.39 In the inference method shown, conflicts may exist.

[0405] For example, in the case where inter prediction is limited to a limited block size and the tile group type is P or B, it may be difficult to infer the value of pred_mode_flag. Fig.39 In , the value of pred_mode_flag can be inferred to be one of two values, and both cases can be satisfied.

[0406] In the case of inter prediction limited block size, skip mode, and when the tile group type is P or B, it may be difficult to infer the value of pred_mode_ibc_flag. Fig.39 In , the value of pred_mode_ibc_flag can be inferred to be one of two values, and both cases can be satisfied.

[0407] Fig.40 It can be an embodiment to solve the problem.

[0408] The prediction modes available when the tile group type is P or B may be MODE_INTRA, MODE_INTER, or MODE_IBC. In the case of a block size where inter-frame prediction is limited, MODE_INTER may not be used among MODE_INTRA, MODE_INTER, and MODE_IBC. According to an embodiment of the present disclosure, in this case, pred_mode_flag may be inferred as a value indicating MODE_INTRA. This is because MODE_IBC can be determined by pred_mode_ibc_flag. Therefore, the above description can be summarized as follows.

[0409] In the case where the tile group type is I or the block size where inter prediction is restricted, pred_mode_flag may be inferred to indicate a value of MODE_INTRA. In addition, 1) in the case where the tile group type is P or B and 2) does not correspond to a block size where inter prediction is restricted, pred_mode_flag may be inferred to indicate a value of MODE_INTER.

[0410] The prediction modes available when the tile group type is P or B may be MODE_INTRA, MODE_INTER, or MODE_IBC. In the case of a block size where inter prediction is restricted, MODE_INTER may not be used among MODE_INTRA, MODE_INTER, and MODE_IBC. In the case of skip mode, MODE_INTRA may not be used among MODE_INTRA, MODE_INTER, and MODE_IBC. Therefore, in the case where the tile group type is P or B, in the case of a block size where inter prediction is restricted, and in the case of skip mode, only MODE_IBC may be used. Therefore, in this case, pred_mode_ibc_flag may be inferred to be 1. Therefore, the above description can be summarized as follows.

[0411] 1) When the tile group type is I or 2) in the case of a block size where inter prediction is restricted and in the case of skip mode, pred_mode_ibc_flag may be inferred as a value indicating MODE_IBC, for example, 1. In addition, i) when the tile group type is P or B and ii) in the case of a block size that does not correspond to inter prediction or in the case of skip mode, pred_mode_ibc_flag may be inferred as a value that does not indicate MODE_IBC, for example, 0.

[0412] In an embodiment, the block size to which inter prediction is restricted may be a 4x4 block. Alternatively, the block size to which inter prediction is restricted may be a block of a size equal to or smaller than 4x4.

[0413] Fig.40 Illustrated is an example of a case where the method of inferring pred_mode_flag and pred_mode_ibc_flag is a case where the block size to which inter prediction is restricted is 4×4.

[0414] In the described present disclosure, the tile group type may be a slice type. Whether the mode is a skip mode may be determined by cu_skip_flag.

[0415] Fig.41 The value and binarization of inter_pred_idc according to an embodiment of the present disclosure are illustrated. inter_pred_idc is a parameter indicating the type of inter prediction and may be referred to as an inter prediction type parameter.

[0416] like Fig.38 As shown, bidirectional prediction may not be used based on the block size. According to an embodiment of the present disclosure, the inter-frame prediction available for any block size may be L0 unidirectional prediction, L1 unidirectional prediction or bidirectional prediction, and the inter-frame prediction available for any block size may be L0 unidirectional prediction or L1 unidirectional prediction. In addition, the type of inter-frame prediction may be indicated by inter_pred_idc. L0 unidirectional prediction may be an inter-frame prediction using only reference list 0. L1 unidirectional prediction may be an inter-frame prediction using only reference list 1. Bidirectional prediction may be an inter-frame prediction using both reference list 0 and reference list 1. In addition, the inter-frame prediction type may be determined for each CU. The values ​​of inter_pred_idc indicating L0 unidirectional prediction, L1 unidirectional prediction and bidirectional prediction may be PRED_L0, PRED_L1 and PRED_BI, respectively. The values ​​of inter_pred_idc indicating L0 unidirectional prediction, L1 unidirectional prediction and bidirectional prediction may be 0, 1 and 2, respectively.

[0417] According to an embodiment of the present disclosure, in case of a block size not using bidirectional prediction, a value of inter_pred_idc corresponding to bidirectional prediction may not exist.

[0418] In addition, there may be a binarization method for indicating inter_pre_idc. The method may be different in blocks that allow bidirectional prediction and blocks that do not allow bidirectional prediction. In addition, this may be a bin string used in the case of parsing inter_pre_idc. When bidirectional prediction is allowed, the value corresponding to L0 unidirectional prediction, L1 unidirectional prediction or bidirectional prediction may be used as inter_pre_idc. In order to express this, inter_pred_idc may be indicated by a variable length binarization method. For example, the values ​​corresponding to L0 unidirectional prediction, L1 unidirectional prediction and bidirectional prediction may be indicated as 00, 01 and 1, respectively. Alternatively, the values ​​corresponding to L0 unidirectional prediction, L1 unidirectional prediction and bidirectional prediction may be indicated as 10, 11 and 0, respectively. When bidirectional prediction is not allowed, the value corresponding to L0 unidirectional prediction or L1 unidirectional prediction may be used as inter_pre_idc. Therefore, inter_pre_idc may be indicated by 1 bit. For example, the values ​​corresponding to L0 unidirectional prediction and L1 unidirectional prediction may be indicated as 0 and 1, respectively. Alternatively, values ​​corresponding to L0 unidirectional prediction and L1 unidirectional prediction may be indicated as 1 and 0, respectively.

[0419] According to an embodiment, the block size for not using bidirectional prediction may be a block size equal to or less than a threshold. For example, the threshold may be a 4x8 block or an 8x4 block. When 4x4 inter-frame prediction is not allowed, the block size for not using bidirectional prediction may be a 4x8 or 8x4 block. A 4x4 block may be represented by (width+height==8). A 4x8 or 8x4 block may be represented by (width+height==12).

[0420] refer to Fig.41 In the case where the block is 4x8 or 8x4, inter_pred_idc may have only values ​​corresponding to PRED_L0, PRED_L1. In this case, inter_pred_idc may be indicated by 0 or 1.

[0421] Fig.42 The value and binarization of inter_pred_idc according to an embodiment of the present disclosure are illustrated.

[0422] like Fig.41As shown, there may be a set of multiple values ​​that inter_pred_idc can indicate and its signaling method. For example, in any block, the number of types of values ​​that inter_pred_idc can indicate is 3, in which case 1 or 2 bits can be used to perform signaling. In addition, in any block, the number of types of values ​​that inter_pred_idc can indicate is 2, where b bits can be used to perform signaling. The type of value that inter_pred_idc can indicate and the signaling can vary depending on the block size. For example, depending on the block size that allows bidirectional prediction, the type of value that inter_pred_idc can indicate and the signaling can be different.

[0423] However, in Fig.41 In the method shown, there may be ambiguity in the type and signaling of the value that inter_pred_idc can indicate in any block size. For example, when the block size is 4x8 or 8x4, all conditions (width+height)! = 8) and conditions ((width+height == 8)||(width+height == 12) may be satisfied. Therefore, the signaling and bitstream between the encoder and decoder may not match.

[0424] Fig.42 An embodiment of the present disclosure may be a method for solving the problem. According to an embodiment of the present disclosure, the type of value and signaling method that inter_pred_idc can indicate may be different when condition 1 is satisfied and when condition 1 is not satisfied. For example, condition 1 may be a block size condition that does not allow bidirectional prediction. For example, condition 1 may be a condition for a block of 4x8 or 8x4. When bidirectional prediction is not allowed, if 2 bits are used to signal inter_pred_idc, the signaling is considered inefficient. This is because the value of inter_pred_idc does not indicate PRED_BI when bidirectional prediction is not allowed. In an embodiment, the block size condition that does not allow bidirectional prediction may be a block size of 4x8 or 8x4. Therefore, the block size that does not allow bidirectional prediction may be 4x8, 8x4, or 4x4.

[0425] refer to Fig.42 , when width+height corresponds to 8 or 12, the possible values ​​of inter_pred_idc may be PRED_L0, PRED_L1. In addition, inter_pred_idc may be indicated by 1 bit. The signaling may be 0 or 1. When width+height is neither 8 nor 12, the possible values ​​of inter_pred_idc may be PRED_L0, PRED_L1, or PRED_BI. In addition, inter_pred_idc may be indicated by 1 bit or 2 bits. The signaling may be 00, 01, or 1.

[0426] Fig.43 The value and binarization of inter_pred_idc according to an embodiment of the present disclosure are illustrated.

[0427] Fig.43 Can be used to solve Figures 41 to 42 An embodiment of the problem shown. In addition, Fig.43 It can be to improve Fig.42 As described above, there may be block sizes that do not allow inter-frame prediction. Fig.42 In an embodiment of the present disclosure, if the block size where inter-frame prediction is not allowed is not considered, unnecessary conditional checks may be required. For example, when inter-frame prediction is not allowed, the value of inter_pred_idc is meaningless. If the conditions for the case where inter-frame prediction is not allowed are checked in the inter_pred_idc signaling, it may not make sense. According to an embodiment of the present disclosure, the set of inter_pred_idc signaling and values ​​can be determined by checking the conditions for the case where bidirectional prediction is not allowed without checking the conditions for the case where inter-frame prediction is not allowed. For example, the case where inter-frame prediction is not allowed may be a block size of 4x4, and the case where bidirectional prediction is not allowed may be a block size of 4x8 or 8x4.

[0428] refer to Fig.43 , when width+height corresponds to 12, the value that inter_pred_idc may have may be PRED_L0 or PRED_L1. In addition, inter_pred_idc may be indicated by 1 bit. The signaling may be 0 or 1. When width+height does not correspond to 12, the value that inter_pred_idc may have may be PRED_L0, PRED_L1, or PRED_BI. In addition, inter_pred_idc may be indicated by 1 bit or 2 bits. The signaling may be 00, 01, or 1.

[0429] Therefore, in Fig.43 In the embodiment of FIG. 1 , in fact, in the case of 4×4 blocks, the set and signaling of inter_pred_idc values ​​may correspond to Fig.43 The leftmost of the two columns (the third column among all the columns), which may be related to Fig.42 The embodiments are different.

[0430] According to an embodiment of the present disclosure, when the tree type is DUAL_TREE_CHROMA, cu_skip_flag can be parsed. In the tree type corresponding to DUAL_TREE_CHROMA, the partitions of the luminance block and the chrominance block can be different, and the processing corresponding to the chrominance can be indicated. In addition, when the tree type is DUAL_TREE_CHROMA, if MODE_IBC is available, cu_skip_flag can be parsed. The case where MODE_IBC can be used may be the case where sps_ibc_enabled_flag is 1. This is to allow the use of skip mode when the prediction mode of the chrominance block is MODE_IBC.

[0431] The above-mentioned embodiments of the present invention may be implemented by various means. For example, the embodiments of the present invention may be implemented by hardware, firmware, software or a combination thereof.

[0432] For the case of implementation through hardware, the method according to the embodiment of the present invention can be implemented by one or more of an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a processor, a controller, a microcontroller, a microprocessor, etc.

[0433] In the case of implementation by firmware or software, the method according to the embodiment of the present invention can be implemented in the form of a module, process or function that performs the above functions or operations. The software code can be stored in a memory and driven by a processor. The memory can be located inside or outside the processor and can exchange data with the processor in various known ways.

[0434] The above description of the present invention is for illustrative purposes only, and it will be understood that those skilled in the art to which the present invention belongs can change the present invention without changing the technical ideas or basic features of the present invention, and the present invention can be easily modified in other specific forms. Therefore, the above embodiments are illustrative and are not limited in all aspects. For example, each component described as a single entity can be distributed and implemented, and similarly, the components described as distributed can also be implemented in an associated manner.

[0435] The scope of the present invention is defined by the appended claims rather than the detailed description above, and all changes or modifications derived from the meaning and scope of the appended claims and their equivalents should be construed as being included in the scope of the present invention.

Claims

1. A video signal decoding device comprising a processor, in, The processor is configured to: determining whether the prediction mode of the current block is an intra block copy (IBC) prediction mode based on a value of an IBC mode parameter, wherein, when the IBC mode parameter is obtained, the value of the IBC mode parameter is determined by parsing the IBC mode parameter, decoding the current block based on a prediction mode of the current block, Wherein, when the IBC mode parameters are not obtained: When the coding tree type information (treeType) indicating the partition of the current block is DUAL_TREE_CHROMA indicating a chroma component, the value of the IBC mode parameter is inferred to be a value indicating that the prediction mode of the current block is not the IBC prediction mode.

2. The video signal decoding device according to claim 1, in, The processor is configured to: Determining whether the prediction mode of the current block is an inter-frame prediction mode or an intra-frame prediction mode based on the value of the prediction mode parameter, Wherein, when the prediction mode parameters are not obtained: When the slice to which the current block belongs is the first slice, the value of the prediction mode parameter is inferred to be a value indicating that the prediction mode of the current block is the inter prediction mode, When the slice to which the current block belongs is the second slice, the value of the prediction mode parameter is inferred to be a value indicating that the prediction mode of the current block is the intra prediction mode, The first slice is a slice that can refer to a picture other than the current picture as a reference picture, and the second slice is a slice that refers to the current picture as a reference picture.

3. The video signal decoding device according to claim 2, in, When the IBC mode parameters are not obtained: When skip mode is applied to the current block and the size of the current block is 4×4, the value of the IBC mode parameter is inferred to be a value indicating that the prediction mode is the IBC prediction mode, When i) the skip mode is not applied to the current block or the size of the current block is not the 4x4, and ii) the slice to which the current block belongs is the first slice, the value of the IBC mode parameter is inferred as a value indicating that the prediction mode is not the IBC prediction mode.

4. The video signal decoding device according to claim 2, in, When the IBC mode parameters are not obtained: When the slice to which the current block belongs is the second slice and signaling information at a higher level than the current block indicates that the IBC prediction mode is enabled, inferring the value of the IBC mode parameter as a value indicating that the prediction mode of the current block is the IBC prediction mode, When the slice to which the current block belongs is the first slice, the value of the IBC mode parameter is inferred to be a value indicating that the prediction mode of the current block is not the IBC prediction mode.

5. The video signal decoding device according to claim 2, in, The set of spatial neighboring positions referenced for decoding the current block in the IBC prediction mode includes some of the set of spatial neighboring positions referenced for decoding the current block in the inter prediction mode.

6. The video signal decoding device according to claim 5, in, When the upper leftmost position of the current block is (xCb, yCb), the set of spatial neighboring positions referenced for decoding the current block in the inter prediction mode includes the position of (xCb-1, yCb-1), and When the upper leftmost position of the current block is (xCb, yCb), the set of spatial neighboring positions referenced in the IBC prediction mode for decoding the current block does not include the position of (xCb-1, yCb-1).

7. The video signal decoding device according to claim 5, in, When the upper leftmost position of the current block is (xCb, yCb), the set of spatial neighboring positions referenced for decoding the current block in the IBC prediction mode includes at least one of a position of (xCb-1, yCb+cbHeight-1) and a position of (xCb+cbWidth-1, yCb-1), and Herein, the cbWidth is the width of the current block and the cbHeight is the height of the current block.

8. The video signal decoding device according to claim 2, in, When the prediction mode parameter is not obtained, a value of the prediction mode parameter is inferred based on the size of the current block.

9. A video signal encoding device comprising a processor, in, The processor is configured to: Determine whether the prediction mode of the current block is an intra block copy (IBC) prediction mode, encoding a bitstream for decoding the current block based on a prediction mode of the current block, Wherein, when an IBC mode parameter indicating whether the prediction mode of the current block is the IBC prediction mode is not included in the bitstream: When the coding tree type information (treeType) indicating the partition of the current block is DUAL_TREE_CHROMA indicating a chroma component, the prediction mode of the current block is not the IBC prediction mode.

10. The video signal encoding device according to claim 9, in, The processor is configured to: Determining whether the prediction mode of the current block is an inter-frame prediction mode or an intra-frame prediction mode, Wherein, when the prediction mode parameter indicating that the prediction mode of the current block is the inter-frame prediction mode or the intra-frame prediction mode is not included in the bitstream: When the slice to which the current block belongs is the first slice, the prediction mode of the current block is the inter-frame prediction mode, When the slice to which the current block belongs is the second slice, the prediction mode of the current block is the intra prediction mode, The first slice is a slice that can refer to a picture other than the current picture as a reference picture, and the second slice is a slice that refers to the current picture as a reference picture.

11. The video signal encoding device according to claim 10, in, When the IBC mode parameters are not included in the bitstream: When the skip mode is applied to the current block and the size of the current block is 4×4, the prediction mode is the IBC prediction mode, When i) the skip mode is not applied to the current block or the size of the current block is not the 4×4, and ii) the slice to which the current block belongs is the first slice, the prediction mode is not the IBC prediction mode.

12. The video signal encoding device according to claim 10, in, When the IBC mode parameters are not included in the bitstream: When the slice to which the current block belongs is the second slice and signaling information at a higher level than the current block indicates that the IBC prediction mode is enabled, the prediction mode of the current block is the IBC prediction mode, When the slice to which the current block belongs is the first slice, the prediction mode of the current block is not the IBC prediction mode.

13. The video signal encoding device according to claim 10, in, The set of spatial neighboring positions referenced for decoding the current block in the IBC prediction mode includes some of the set of spatial neighboring positions referenced for decoding the current block in the inter prediction mode.

14. The video signal encoding device according to claim 13, in, When the upper leftmost position of the current block is (xCb, yCb), the set of spatial neighboring positions referenced for decoding the current block in the inter prediction mode includes the position of (xCb-1, yCb-1), and When the upper leftmost position of the current block is (xCb, yCb), the set of spatial neighboring positions referenced in the IBC prediction mode for decoding the current block does not include the position of (xCb-1, yCb-1).

15. The video signal encoding device according to claim 13, in, When the upper leftmost position of the current block is (xCb, yCb), the set of spatial neighboring positions referenced for decoding the current block in the IBC prediction mode includes at least one of a position of (xCb-1, yCb+cbHeight-1) and a position of (xCb+cbWidth-1, yCb-1), and Herein, the cbWidth is the width of the current block and the cbHeight is the height of the current block.

16. The video signal encoding device according to claim 10, in, When the prediction mode parameter is not included in the bitstream, it is inferred that the prediction mode of the current block is the inter prediction mode or the intra prediction mode based on the size of the current block.

17. A method for obtaining a bit stream, the method comprising: Determining whether a prediction mode of a current block is an intra block copy (IBC) prediction mode; as well as obtaining the bitstream for decoding the current block based on the prediction mode of the current block, Wherein, when the IBC mode parameter indicating whether the prediction mode of the current block is the IBC prediction mode is not included in the bitstream, When the coding tree type information (treeType) indicating the partition of the current block is DUAL_TREE_CHROMA indicating a chroma component, the prediction mode of the current block is not the IBC prediction mode.

18. The method according to claim 17, in, The method further comprises: Determining whether the prediction mode of the current block is an inter-frame prediction mode or an intra-frame prediction mode, Wherein, when the prediction mode parameter indicating that the prediction mode of the current block is the inter-frame prediction mode or the intra-frame prediction mode is not included in the bitstream: When the slice to which the current block belongs is the first slice, the prediction mode of the current block is the inter-frame prediction mode, When the slice to which the current block belongs is the second slice, the prediction mode of the current block is the intra prediction mode, The first slice is a slice that can refer to a picture other than the current picture as a reference picture, and the second slice is a slice that refers to the current picture as a reference picture.

19. The method according to claim 18, in, When the IBC mode parameters are not included in the bitstream: When the skip mode is applied to the current block and the size of the current block is 4×4, the prediction mode is the IBC prediction mode, When i) the skip mode is not applied to the current block or the size of the current block is not the 4×4, and ii) the slice to which the current block belongs is the first slice, the prediction mode is not the IBC prediction mode.

20. A video signal processing method, comprising: determining whether the prediction mode of the current block is an intra block copy (IBC) prediction mode based on a value of an IBC mode parameter, wherein, when the IBC mode parameter is obtained, the value of the IBC mode parameter is determined by parsing the IBC mode parameter, and decoding the current block based on a prediction mode of the current block, Wherein, when the IBC mode parameters are not obtained: When the coding tree type information (treeType) indicating the partition of the current block is DUAL_TREE_CHROMA indicating a chroma component, the value of the IBC mode parameter is inferred to be a value indicating that the prediction mode of the current block is not the IBC prediction mode.