Image encoding / decoding method and apparatus using IBC

By adopting the intra-block copy mode and block size judgment method in image encoding/decoding, the problem of low high-resolution image encoding and decoding is solved, and efficient image encoding and decoding is realized, reducing transmission and storage costs.

CN114258674BActive Publication Date: 2024-12-31TCL KING ELECTRICAL APPLIANCES HUIZHOU
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202080058656.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-07-24
Filing Date
2020-07-20
Publication Date
2024-12-31
Estimated Expiration
2040-07-20

AI Technical Summary

Technical Problem

The prior art is difficult to effectively improve the encoding/decoding efficiency of high resolution and high-quality images, resulting in increased transmission and storage costs.

Method used

The image is encoded/decoded by intra-block copy (IBC) mode, and determine whether the IBC mode is parsed by determining whether the width or height of the block is less than or equal to 64, thereby improving the encoding/decoding efficiency.

Benefits of technology

Improved image encoding/decoding efficiency is achieved, transmission and storage costs are reduced, and bitstreams generated by the image encoding method are supported.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114258674B_ABST
    Figure CN114258674B_ABST
Patent Text Reader

Abstract

Provided is an image encoding / decoding method and apparatus. The image decoding method performed by the image decoding apparatus may include: determining whether to parse first information specifying whether a skip mode is applied to a current block, determining whether to parse second information specifying whether an IBC (Intra Block Copy) mode is applied to the current block, determining whether the IBC mode is applied to the current block based on the first information and the second information, and deriving a prediction block of the current block based on whether the IBC mode is applied. Whether to parse the first information may be determined based on at least one of a width or a height of the current block.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to an image encoding / decoding method and apparatus, and a method for transmitting a bit stream, and more particularly, to a method and apparatus for encoding / decoding an image using filtering, and a method for transmitting a bit stream generated by the image encoding method / apparatus of the present disclosure. Background Art

[0002] Recently, the demand for high-resolution and high-quality images, such as high-definition (HD) images and ultra-high-definition (UHD) images, is increasing in various fields. As the resolution and quality of image data are improved, the amount of information or bits transmitted is relatively increased compared to existing image data. The increase in the amount of information or bits transmitted leads to an increase in transmission cost and storage cost.

[0003] Therefore, efficient image compression technology is needed to effectively transmit, store, and reproduce information about high-resolution and high-quality images. Summary of the invention

[0004] Technical issues

[0005] An object of the present disclosure is to provide an image encoding / decoding method and apparatus with improved encoding / decoding efficiency.

[0006] Another object of the present disclosure is to provide a method and apparatus for encoding / decoding an image using an IBC (Intra Block Copy) mode.

[0007] Another object of the present disclosure is to provide a method for transmitting a bit stream generated by the image encoding method or apparatus according to the present disclosure.

[0008] Another object of the present disclosure is to provide a recording medium storing a bit stream generated by the image encoding method or apparatus according to the present disclosure.

[0009] Another object of the present disclosure is to provide a recording medium storing a bit stream received and decoded by the image decoding apparatus according to the present disclosure and used to reconstruct an image.

[0010] The technical problems solved by the present disclosure are not limited to the above-mentioned technical problems, and other technical problems not described here will be clear to those skilled in the art through the following description.

[0011] Technical Solution

[0012] According to an image encoding / decoding method according to one aspect of the present disclosure, application of the IBC mode to blocks exceeding VPDU (Virtual Pipeline Data Unit) is restricted, thereby increasing image encoding / decoding efficiency.

[0013] An image decoding method according to an aspect of the present disclosure may include: determining whether to parse first information specifying whether a skip mode is applied to a current block; determining whether to parse second information specifying whether an IBC (Intra Block Copy) mode is applied to the current block; determining whether the IBC mode is applied to the current block based on the first information and the second information; and deriving a prediction block of the current block based on whether the IBC mode is applied. Whether to parse the first information may be determined based on at least one of a width or a height of the current block.

[0014] In the image decoding method of the present disclosure, based on the width and height of the current block being equal to or smaller than the first value, it is determined that the first information can be parsed.

[0015] In the image decoding method of the present invention, the first value may be 64.

[0016] In the image decoding method of the present disclosure, whether to parse the first information may be further determined based on third information specifying whether the IBC mode is applicable to the current block.

[0017] In the image decoding method of the present disclosure, based on the third information specifying that the IBC mode is applicable to the current block, it can be determined that the first information is parsed.

[0018] In the image decoding method of the present disclosure, the third information may be signaled at a higher level of the current block.

[0019] In the image decoding method of the present disclosure, whether to parse the first information may be further determined based on the type of the slice including the current block.

[0020] In the image decoding method of the present disclosure, based on the fact that the slice including the current block is an I slice, it can be determined that the first information is parsed.

[0021] In the image decoding method of the present disclosure, whether to parse the second information may be determined based on at least one of the first information or the width or height of the current block.

[0022] According to another aspect of the present disclosure, an image decoding device may include a memory and at least one processor. The at least one processor may: determine whether to parse first information specifying whether a skip mode is applied to a current block, determine whether to parse second information specifying whether an IBC (Intra Block Copy) mode is applied to the current block, determine whether the IBC mode is applied to the current block based on the first information and the second information, and derive a prediction block of the current block based on whether the IBC mode is applied. Whether to parse the first information may be determined based on at least one of a width or a height of the current block.

[0023] According to another aspect of the present disclosure, an image encoding method may include: determining whether to encode first information specifying whether a skip mode is applied to a current block; determining whether to encode second information specifying whether an IBC (Intra Block Copy) mode is applied to the current block; and generating a bitstream for the current block based on whether the first information and the second information are encoded. Whether to encode the first information may be determined based on at least one of a width or a height of the current block.

[0024] In the image encoding method of the present disclosure, based on the width and height of the current block being equal to or smaller than the first value, it may be determined that the first information is encoded.

[0025] In the image encoding method of the present disclosure, the first value may be 64.

[0026] In the image encoding method of the present disclosure, whether to encode the first information may be further determined based on whether the IBC mode is applicable to the current block.

[0027] In addition, a computer-readable recording medium according to another aspect of the present disclosure may store a bit stream generated by the image encoding device or the image encoding method of the present disclosure.

[0028] The features described above in brief summary of the present disclosure are merely exemplary aspects of the following detailed description of the present disclosure and do not limit the scope of the present disclosure.

[0029] Beneficial Effects

[0030] According to the present disclosure, it is possible to provide an image encoding / decoding method and apparatus with improved encoding / decoding efficiency.

[0031] According to the present disclosure, it is possible to provide a method and apparatus for encoding / decoding an image using an IBC (Intra Block Copy) mode.

[0032] Furthermore, according to the present disclosure, it is possible to provide a method of transmitting a bit stream generated by the image encoding method or apparatus according to the present disclosure.

[0033] Furthermore, according to the present disclosure, it is possible to provide a recording medium storing a bit stream generated by the image encoding method or apparatus according to the present disclosure.

[0034] Furthermore, according to the present disclosure, it is possible to provide a recording medium that stores a bit stream received and decoded by the image decoding device according to the present disclosure and used to reconstruct an image.

[0035] Those skilled in the art will understand that the effects that can be achieved through the present disclosure are not limited to what has been specifically described above, and other advantages of the present disclosure will be more clearly understood from the detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 is a view schematically showing a video coding system to which an embodiment of the present disclosure is applicable.

[0037] Figure 2 is a diagram schematically showing an image encoding device to which an embodiment of the present disclosure is applicable.

[0038] Figure 3 is a diagram schematically showing an image decoding device to which an embodiment of the present disclosure is applicable.

[0039] Figure 4 is a view showing partition types of blocks according to a multi-type tree structure.

[0040] Figure 5 is a schematic diagram illustrating a signaling mechanism of partition splitting information in a quadtree with a nested multi-type tree structure according to the present disclosure.

[0041] Figure 6 is a flowchart illustrating a video / image encoding method based on inter-frame prediction.

[0042] Figure 7 is a view illustrating a configuration of the inter prediction unit 180 according to the present disclosure.

[0043] Figure 8 is a flowchart illustrating a video / image decoding method based on inter-frame prediction.

[0044] Fig. 9 is a view illustrating a configuration of the inter prediction unit 260 according to the present disclosure.

[0045] Fig.10 is a view illustrating neighboring blocks that may be used as spatial merging candidates.

[0046] Fig.11 is a view schematically illustrating a merge candidate list construction method according to an example of the present disclosure.

[0047] Fig.12 is a view schematically illustrating a motion vector predictor candidate list construction method according to an example of the present disclosure.

[0048] Fig.13 is a view illustrating a syntax structure for transmitting an MVD from an image encoding device to an image decoding device according to an example of the present disclosure.

[0049] Fig.14 is a flow chart illustrating a video / image encoding method based on IBC.

[0050] Fig.15is a view illustrating a configuration of a prediction unit for performing an IBC-based video / image encoding method according to the present disclosure.

[0051] Fig.16 is a flowchart illustrating an IBC-based video / image decoding method according to an embodiment.

[0052] Fig.17 is a view illustrating a configuration of a prediction unit for performing an IBC-based video / image decoding method according to the present disclosure.

[0053] Fig.18 is a view illustrating a bitstream structure according to an embodiment of the present disclosure.

[0054] Fig.19 is a view illustrating an image decoding method according to an embodiment of the present disclosure.

[0055] Fig. 20 is a view illustrating an image encoding method according to an embodiment of the present disclosure.

[0056] Figure 21 to Figure 24 is a diagram illustrating a bitstream structure according to some embodiments of the present disclosure.

[0057] Fig.25 is a diagram showing a content streaming system to which an embodiment of the present disclosure is applicable. DETAILED DESCRIPTION

[0058] Hereinafter, the embodiments of the present disclosure will be described in detail with reference to the accompanying drawings to facilitate implementation by those skilled in the art. However, the present disclosure can be implemented in various forms and is not limited to the embodiments described herein.

[0059] When describing the present disclosure, if it is determined that the detailed description of related known functions or configurations makes the scope of the present disclosure unnecessarily ambiguous, the detailed description thereof will be omitted. In the drawings, parts irrelevant to the description of the present disclosure are omitted, and like reference numerals are given to like parts.

[0060] In the present disclosure, when a component is "connected", "coupled" or "linked" to another component, it may include not only a direct connection relationship but also an indirect connection relationship with intermediate components. In addition, when a component "includes" or "has" other components, unless otherwise specified, it means that other components may also be included, rather than excluding other components.

[0061] In the present disclosure, the terms first, second, etc. are used only for the purpose of distinguishing one component from other components, and do not limit the order or importance of the components unless otherwise specified. Accordingly, within the scope of the present disclosure, the first component in one embodiment may be referred to as the second component in another embodiment, and similarly, the second component in one embodiment may be referred to as the first component in another embodiment.

[0062] In the present disclosure, components that are distinguished from each other are intended to clearly describe each feature and do not mean that the components must be separated. That is, multiple components can be integrated and implemented in one hardware or software unit, or one component can be distributed and implemented in multiple hardware or software units. Therefore, even if not specifically stated, embodiments in which these components are integrated or distributed are also included in the scope of the present disclosure.

[0063] In the present disclosure, the components described in the various embodiments are not necessarily essential components, and some components may be optional components. Therefore, embodiments consisting of a subset of the components described in the embodiments are also included in the scope of the present disclosure. In addition, embodiments that include other components in addition to the components described in the various embodiments are included in the scope of the present disclosure.

[0064] The present disclosure relates to encoding and decoding of images. Unless otherwise defined in the present disclosure, terms used in the present disclosure may have general meanings commonly used in the technical field to which the present disclosure belongs.

[0065] In the present disclosure, a "picture" generally refers to a unit representing an image within a specific time period, and a slice / tile is a coding unit that constitutes a part of a picture. A picture may be composed of one or more slices / tiles. In addition, a slice / tile may include one or more coding tree units (CTUs).

[0066] In the present disclosure, "pixel" or "pel" may mean the smallest single unit constituting a picture (or image). In addition, "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a pixel value, or may represent only a pixel / pixel value of a luminance component or only a pixel / pixel value of a chrominance component.

[0067] In the present disclosure, a "unit" may refer to a basic unit of image processing. The unit may include at least one of a specific area of ​​a picture and information related to the area. In some cases, the unit may be used interchangeably with terms such as "sample array", "block" or "area". In general, an M×N block may include M columns and N rows of samples (or sample arrays) or a set (or array) of transform coefficients.

[0068] In the present disclosure, "current block" may mean one of "current coding block", "current coding unit", "coding target block", "decoding target block" or "processing target block". When prediction is performed, "current block" may mean "current prediction block" or "prediction target block". When transform (inverse transform) / quantization (dequantization) is performed, "current block" may mean "current transform block" or "transform target block". When filtering is performed, "current block" may mean "filtering target block".

[0069] Furthermore, in the present disclosure, unless explicitly stated as a chroma block, “current block” may mean “luminance block of the current block.” “Chroma block of the current block” may be expressed by including an explicit description of a chroma block such as “chroma block” or “current chroma block.”

[0070] In the present disclosure, the slash " / " or "," may be interpreted as indicating "and / or". For example, "A / B" and "A, B" may mean "A and / or B". In addition, "A / B / C" and "A / B / C" may mean "at least one of A, B, and / or C".

[0071] In the present disclosure, the term "or" should be interpreted to indicate "and / or". For example, the expression "A or B" may include 1) only "A", 2) only "B", or 3) both "A and B". In other words, in the present disclosure, "or" should be interpreted to indicate "additionally or alternatively".

[0072] Video compilation system overview

[0073] Figure 1 is a view schematically illustrating a video coding system according to the present disclosure.

[0074] The video coding system according to an embodiment may include an encoding device 10 and a decoding device 20. The encoding device 10 may deliver encoded video and / or image information or data to the decoding device 20 via a digital storage medium or a network in the form of a file or a stream.

[0075] The encoding device 10 according to the embodiment may include a video source generator 11, an encoding unit 12, and a transmitter 13. The decoding device 20 according to the embodiment may include a receiver 21, a decoding unit 22, and a renderer 23. The encoding unit 12 may be called a video / image encoding unit, and the decoding unit 22 may be called a video / image decoding unit. The transmitter 13 may be included in the encoding unit 12. The receiver 21 may be included in the decoding unit 22. The renderer 23 may include a display and the display may be configured as a separate device or an external component.

[0076] The video source generator 11 may acquire the video / image through a process of capturing, synthesizing or generating the video / image.

[0077] The video source generator 11 may include a video / image capture device and / or a video / image generation device. The video / image capture device may include, for example, one or more cameras, a video / image archive including previously captured videos / images, etc. The video / image generation device may include, for example, a computer, a tablet computer, and a smart phone, and may (electronically) generate a video / image. For example, a virtual video / image may be generated by a computer, etc. In this case, the video / image capture process may be replaced by a process for generating relevant data.

[0078] The encoding unit 12 may encode the input video / image. For compression and coding efficiency, the encoding unit 12 may perform a series of processes such as prediction, transformation, and quantization. The encoding unit 12 may output encoded data (encoded video / image information) in the form of a bitstream.

[0079] The transmitter 13 may transmit the encoded video / image information or the data output in the form of a bit stream to the receiver 21 of the decoding device 20 in the form of a file or stream through a digital storage medium or a network. The digital storage medium may include various storage media, such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter 13 may include an element for generating a media file in a predetermined file format and may include an element for transmitting through a broadcast / communication network. The receiver 21 may extract / receive a bit stream from a storage medium or a network and transmit the bit stream to the decoding unit 22.

[0080] The decoding unit 22 may decode a video / image by performing a series of processes corresponding to the operations of the encoding unit 12, such as dequantization, inverse transformation, and prediction.

[0081] The renderer 23 may render the decoded video / image. The rendered video / image may be displayed through a display.

[0082] Overview of Image Coding Device

[0083] Figure 2 is a diagram schematically showing an image encoding device to which an embodiment of the present disclosure is applicable.

[0084] like Figure 2As shown, the image encoding device 100 may include an image segmenter 110, a subtractor 115, a transformer 120, a quantizer 130, a dequantizer 140, an inverse transformer 150, an adder 155, a filter 160, a memory 170, an inter-frame prediction unit 180, an intra-frame prediction unit 185, and an entropy encoder 190. The inter-frame prediction unit 180 and the intra-frame prediction unit 185 may be collectively referred to as a "prediction unit". The transformer 120, the quantizer 130, the dequantizer 140, and the inverse transformer 150 may be included in a residual processor. The residual processor may also include a subtractor 115.

[0085] In some embodiments, all or at least some of the components configuring the image encoding apparatus 100 may be configured by one hardware component (eg, an encoder or a processor). In addition, the memory 170 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium.

[0086] The image divider 110 may partition an input image (or picture or frame) input to the image encoding device 100 into one or more processing units. For example, a processing unit may be referred to as a coding unit (CU). A coding unit may be obtained by recursively partitioning a coding tree unit (CTU) or a maximum coding unit (LCU) according to a quadtree binary tree ternary tree (QT / BT / TT) structure. For example, a coding unit may be partitioned into multiple coding units of a deeper depth based on a quadtree structure, a binary tree structure, and / or a ternary tree structure. For the partitioning of the coding unit, a quadtree structure may be applied first, and then a binary tree structure and / or a ternary tree structure may be applied. The coding process according to the present disclosure may be performed based on a final coding unit that is no longer partitioned. The maximum coding unit may be used as the final coding unit, or a coding unit of a deeper depth obtained by partitioning the maximum coding unit may be used as the final coding unit. Here, the coding process may include the prediction, transformation, and reconstruction processes described later. As another example, the processing unit of the coding process may be a prediction unit (PU) or a transformation unit (TU). The prediction unit and the transform unit may be split or partitioned from the final coding unit. The prediction unit may be a sample prediction unit, and the transform unit may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from a transform coefficient.

[0087] The prediction unit (inter prediction unit 180 or intra prediction unit 185) may perform prediction on the block to be processed (current block) and generate a prediction block including prediction samples of the current block. The prediction unit may determine whether to apply intra prediction or inter prediction based on the current block or CU. The prediction unit may generate various information related to the prediction of the current block and transmit the generated information to the entropy encoder 190. The information about the prediction may be encoded in the entropy encoder 190 and output in the form of a bitstream.

[0088] The intra prediction unit 185 can predict the current block by referring to the samples in the current picture. Depending on the intra prediction mode and / or the intra prediction technology, the reference samples can be located in the neighbors of the current block or can be placed separately. The intra prediction mode may include multiple non-directional modes and multiple directional modes. The non-directional mode may include, for example, a DC mode and a plane mode. Depending on the level of detail of the prediction direction, the directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes. However, this is only an example, and more or fewer directional prediction modes may be used according to the settings. The intra prediction unit 185 may determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.

[0089] The inter prediction unit 180 may derive a prediction block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be referred to as a collocated reference block, a collocated CU (colCU), etc. The reference picture including the temporal neighboring block may be referred to as a collocated picture (colPic). For example, the inter prediction unit 180 may configure a motion information candidate list based on the neighboring blocks and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter prediction may be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the inter prediction unit 180 may use the motion information of the neighboring blocks as the motion information of the current block. In the case of skip mode, unlike the merge mode, the residual signal may not be transmitted. In the case of motion vector prediction (MVP) mode, the motion vector of the neighboring block may be used as a motion vector predictor, and the motion vector of the current block may be signaled by encoding the motion vector difference and an indicator of the motion vector predictor. The motion vector difference may mean the difference between the motion vector of the current block and the motion vector predictor.

[0090] The prediction unit may generate a prediction signal based on various prediction methods and prediction techniques described below. For example, the prediction unit may not only apply intra prediction or inter prediction, but may also apply intra prediction and inter prediction simultaneously to predict the current block. The prediction method of applying both intra prediction and inter prediction simultaneously to predict the current block may be referred to as combined inter and intra prediction (CIIP). In addition, the prediction unit may perform intra block copy (IBC) to predict the current block. Intra block copy may be used for content image / video coding of games, etc., such as screen content coding (SCC). IBC is a method of predicting the current picture using a previously reconstructed reference block in the current picture at a position separated by a predetermined distance from the current block. When IBC is applied, the position of the reference block in the current picture may be encoded as a vector (block vector) corresponding to a predetermined distance. IBC basically performs prediction in the current picture, but may be performed similarly to inter prediction because the reference block is derived within the current picture. That is, IBC may use at least one of the inter prediction techniques described in the present disclosure. IBC basically performs prediction in the current picture, but may be performed similarly to inter prediction because the reference block is derived within the current picture. That is, IBC may use at least one of the inter-frame prediction techniques described in this disclosure.

[0091] The prediction signal generated by the prediction unit can be used to generate a reconstruction signal or to generate a residual signal. The subtractor 115 can generate a residual signal (residual block or residual sample array) by subtracting the prediction signal (prediction block or prediction sample array) output from the prediction unit from the input image signal (original block or original sample array). The generated residual signal can be transmitted to the transformer 120.

[0092] The transformer 120 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a karhunen-loève transform (KLT), a graph-based transform (GBT), or a conditional nonlinear transform (CNT). Here, GBT refers to a transform obtained from a graph when relationship information between pixels is represented by a graph. CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process may be applied to square pixel blocks of the same size or may be applied to blocks of variable size rather than square.

[0093] The quantizer 130 may quantize the transform coefficients and transmit them to the entropy encoder 190. The entropy encoder 190 may encode the quantized signal (information about the quantized transform coefficients) and output a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantizer 130 may rearrange the quantized transform coefficients in the block form into a one-dimensional vector form based on the coefficient scanning order, and generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form.

[0094] The entropy encoder 190 may perform various encoding methods, such as exponential Golomb, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), etc. The entropy encoder 190 may encode information required for video / image reconstruction (e.g., values ​​of syntax elements, etc.) together or separately in addition to quantized transform coefficients. The encoded information (e.g., encoded video / image information) may be transmitted or stored in units of a network abstraction layer (NAL) in the form of a bitstream. The video / image information may also include information about various parameter sets, such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. The information transmitted by signal, the transmitted information, and / or syntax elements described in the present disclosure may be encoded by the above-mentioned encoding process and included in the bitstream.

[0095] The bitstream may be transmitted over a network or may be stored in a digital storage medium. The network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) that transmits a signal output from the entropy encoder 190 and / or a storage unit (not shown) that stores the signal may be included as an internal / external element of the image encoding device 100. Alternatively, a transmitter may be provided as a component of the entropy encoder 190.

[0096] The quantized transform coefficients output from the quantizer 130 may be used to generate a residual signal. For example, the residual signal (residual block or residual sample) may be reconstructed by applying dequantization and inverse transformation to the quantized transform coefficients through the dequantizer 140 and the inverse transformer 150.

[0097] The adder 155 adds the reconstructed residual signal to the prediction signal output from the inter-frame prediction unit 180 or the intra-frame prediction unit 185 to generate a reconstructed signal (reconstructed image, reconstructed block, reconstructed sample array). If there is no residual in the block to be processed, such as when the skip mode is applied, the prediction block can be used as a reconstructed block. The adder 155 can be called a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current picture, and can be used for inter-frame prediction of the next picture by filtering as described below.

[0098] The filter 160 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 160 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 170, specifically, in the DPB of the memory 170. Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filtering, bilateral filtering, etc. The filter 160 can generate various information related to filtering and transmit the generated information to the entropy encoder 190, as described later in the description of each filtering method. The information related to filtering can be encoded by the entropy encoder 190 and output in the form of a bit stream.

[0099] The modified reconstructed picture transferred to the memory 170 may be used as a reference picture in the inter prediction unit 180. When inter prediction is applied by the image encoding device 100, prediction mismatch between the image encoding device 100 and the image decoding device may be avoided and encoding efficiency may be improved.

[0100] The DPB of the memory 170 may store the modified reconstructed picture for use as a reference picture in the inter-frame prediction unit 180. The memory 170 may store the motion information of the block from which the motion information in the current picture is derived (or encoded) and / or the motion information of the reconstructed block in the picture. The stored motion information may be transmitted to the inter-frame prediction unit 180 and used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 170 may store the reconstructed samples of the reconstructed blocks in the current picture and may transmit the reconstructed samples to the intra-frame prediction unit 185.

[0101] Overview of image decoding device

[0102] Figure 3 is a diagram schematically showing an image decoding device to which an embodiment of the present disclosure is applicable.

[0103] like Figure 3As shown, the image decoding device 200 may include an entropy decoder 210, a dequantizer 220, an inverse transformer 230, an adder 235, a filter 240, a memory 250, an inter-frame prediction unit 260, and an intra-frame prediction unit 265. The inter-frame prediction unit 260 and the intra-frame prediction unit 265 may be collectively referred to as a "prediction unit". The dequantizer 220 and the inverse transformer 230 may be included in a residual processor.

[0104] According to an embodiment, all or at least some of the plurality of components configuring the image decoding apparatus 200 may be configured by hardware components (eg, a decoder or a processor). In addition, the memory 250 may include a decoded picture buffer (DPB) or may be configured by a digital storage medium.

[0105] The image decoding apparatus 200 having received a bit stream including video / image information may perform the same operation as that performed by Figure 2 The image may be reconstructed by a process corresponding to the process performed by the image encoding device 100. For example, the image decoding device 200 may perform decoding using a processing unit applied in the image encoding device. Therefore, the processing unit of decoding may be, for example, a coding unit. The coding unit may be obtained by partitioning the coding tree unit or the maximum coding unit. The reconstructed image signal decoded and output by the image decoding device 200 may be reproduced by a reproduction device (not shown).

[0106] The image decoding apparatus 200 may receive the image in the form of a bit stream from Figure 2The received signal may be decoded by the entropy decoder 210. For example, the entropy decoder 210 may parse the bitstream to derive information (e.g., video / image information) required for image reconstruction (or picture reconstruction). The video / image information may also include information about various parameter sets, such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may also include general constraint information. The image decoding device may also decode the picture based on the parameter set information and / or the general constraint information. The information and / or syntax elements sent / received by the signal described in the present disclosure may be decoded and obtained from the bitstream through a decoding process. For example, the entropy decoder 210 decodes the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and outputs the values ​​of the syntax elements required for image reconstruction and the quantized values ​​of the transform coefficients of the residual. More specifically, the CABAC entropy decoding method can receive a bin corresponding to each syntax element in the bitstream, use the decoding target syntax element information, the decoding information of the neighboring block and the decoding target block, or the information of the symbol / bin decoded in the previous stage to determine the context model, and perform arithmetic decoding on the bin by predicting the probability of occurrence of the bin according to the determined context model, and generate a symbol corresponding to the value of each syntax element. In this case, the CABAC entropy decoding method can update the context model by using the information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. The information related to the prediction in the information decoded by the entropy decoder 210 can be provided to the prediction unit (inter-frame prediction unit 260 and intra-frame prediction unit 265), and the residual value on which entropy decoding is performed in the entropy decoder 210, that is, the quantized transform coefficient and related parameter information can be input to the dequantizer 220. In addition, information about filtering among the information decoded by the entropy decoder 210 can be provided to the filter 240. Meanwhile, a receiver (not shown) for receiving a signal output from the image encoding device may be further configured as an internal / external element of the image decoding device 200 , or the receiver may be a component of the entropy decoder 210 .

[0107] Meanwhile, the image decoding device according to the present disclosure may be referred to as a video / image / picture decoding device. The image decoding device may be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include an entropy decoder 210. The sample decoder may include a dequantizer 220, an inverse transformer 230, an adder 235, a filter 240, a memory 250, an inter-frame prediction unit 260, or at least one of an intra-frame prediction unit 265.

[0108] The dequantizer 220 may dequantize the quantized transform coefficient and output the transform coefficient. The dequantizer 220 may rearrange the quantized transform coefficient in the form of a two-dimensional block. In this case, the rearrangement may be performed based on the coefficient scanning order performed in the image encoding device. The dequantizer 220 may perform dequantization on the quantized transform coefficient by using a quantization parameter (e.g., quantization step size information) and obtain the transform coefficient.

[0109] The inverse transformer 230 may inversely transform the transform coefficients to obtain a residual signal (residual block, residual sample array).

[0110] The prediction unit may perform prediction on the current block and generate a prediction block including a prediction sample of the current block. The prediction unit may determine whether to apply intra prediction or inter prediction to the current block based on the information about the prediction output from the entropy decoder 210, and may determine a specific intra / inter prediction mode (prediction technique).

[0111] The same as described in the prediction unit of the image encoding device 100 , the prediction unit can generate a prediction signal based on various prediction methods (techniques) described later.

[0112] The intra prediction unit 265 may predict the current block by referring to samples in the current picture. The description of the intra prediction unit 185 is also applicable to the intra prediction unit 265.

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

[0114] The adder 235 can generate a reconstructed block by adding the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the prediction unit (including the inter-frame prediction unit 260 and / or the intra-prediction unit 265). If the block to be processed has no residual, such as when the skip mode is applied, the prediction block can be used as the reconstructed block. The description of the adder 155 is also applicable to the adder 235. The adder 235 can be called a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current picture, and can be used for inter-frame prediction of the next picture by filtering as described below.

[0115] The filter 240 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 240 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 250, specifically, in the DPB of the memory 250. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filtering, bilateral filtering, etc.

[0116] The (modified) reconstructed picture stored in the DPB of the memory 250 may be used as a reference picture in the inter prediction unit 260. The memory 250 may store the motion information of the block from which the motion information in the current picture is derived (or decoded) and / or the motion information of the reconstructed block in the picture. The stored motion information may be transmitted to the inter prediction unit 260 to be used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 250 may store the reconstructed samples of the reconstructed block in the current picture and transmit the reconstructed samples to the intra prediction unit 265.

[0117] In the present disclosure, the embodiments described in the filter 160, the inter-frame prediction unit 180 and the intra-frame prediction unit 185 of the image encoding device 100 can be equally or correspondingly applied to the filter 240, the inter-frame prediction unit 260 and the intra-frame prediction unit 265 of the image decoding device 200.

[0118] Overview of CTU Partitions

[0119] As described above, the coding unit may be obtained by recursively partitioning the coding tree unit (CTU) or the largest coding unit (LCU) according to the quadtree / binary tree / ternary tree (QT / BT / TT) structure. For example, the CTU may be first partitioned into a quadtree structure. Thereafter, the leaf nodes of the quadtree structure may be further partitioned by a multi-type tree structure.

[0120] Partitioning according to a quadtree means that the current CU (or CTU) is equally partitioned into four. By partitioning according to a quadtree, the current CU can be partitioned into four CUs with the same width and the same height. When the current CU is no longer partitioned into a quadtree structure, the current CU corresponds to a leaf node of the quadtree structure. The CU corresponding to the leaf node of the quadtree structure may no longer be partitioned and may be used as the above-mentioned final coding unit. Alternatively, the CU corresponding to the leaf node of the quadtree structure may be further partitioned by a multi-type tree structure.

[0121] Figure 4 is a view showing an embodiment of partition types of a block according to a multi-type tree structure. The partition according to the multi-type tree structure may include two types of partitions according to a binary tree structure and two types of partitions according to a ternary tree structure.

[0122] The two types of splits according to the binary tree structure may include vertical binary split (SPLIT_BT_VER) and horizontal binary split (SPLIT_BT_HOR). Vertical binary split (SPLIT_BT_VER) means that the current CU is equally split into two in the vertical direction. Figure 4 As shown in FIG, through vertical binary splitting, two CUs with the same height as the current CU and half the width of the current CU can be generated. Horizontal binary splitting (SPLIT_BT_HOR) means that the current CU is equally split into two in the horizontal direction. Figure 5 As shown, through horizontal binary splitting, two CUs with a height half of the height of the current CU and the same width as the current CU can be generated.

[0123] The two types of splits according to the triad structure may include vertical triad split (SPLIT_TT_VER) and horizontal triad split (SPLIT_TT_HOR). In vertical triad split (SPLIT_TT_VER), the current CU is split in a vertical direction at a ratio of 1:2:1. Figure 4 As shown, through vertical three-pronged splitting, two CUs with the same height as the current CU and a width of 1 / 4 of the width of the current CU, and a CU with the same height as the current CU and a width of half the width of the current CU can be generated. In horizontal three-pronged splitting (SPLIT_TT_HOR), the current CU is split in the horizontal direction at a ratio of 1:2:1. Figure 4 As shown, through horizontal trifurcated splitting, two CUs whose height is 1 / 4 of the height of the current CU and whose width is the same as the current CU, and a CU whose height is half of the height of the current CU and whose width is the same as the current CU can be generated.

[0124] Figure 5is a diagram illustrating a signaling mechanism of partition splitting information in a quadtree having a nested multi-type tree structure according to the present disclosure.

[0125] Here, the CTU is regarded as the root node of the quadtree and is partitioned into a quadtree structure for the first time. Information (e.g., qt_split_flag) indicating whether quadtree segmentation is performed relative to the current CU (CTU or node (QT_node) of the quadtree) is sent with a signal. For example, when qt_split_flag has a first value (e.g., "1"), the current CU can be partitioned by the quadtree. In addition, when qt_split_flag has a second value (e.g., "0"), the current CU is not quadtree partitioned, but becomes a leaf node (QT_leaf_node) of the quadtree. Each quadtree leaf node can then be further partitioned into a multi-type tree structure. That is, the leaf node of the quadtree can become a node (MTT_node) of a multi-type tree. In the multi-type tree structure, a first flag (e.g., Mtt_split_cu_flag) is sent with a signal to indicate whether the current node is additionally partitioned. If the corresponding node is additionally partitioned (e.g., if the first flag is 1), a second flag (e.g., Mtt_split_cu_vertical_flag) may be signaled to indicate the direction of the partition. For example, the partition direction may be a vertical direction when the second flag is 1, and a horizontal direction when the second flag is 0. Then, a third flag (e.g., Mtt_split_cu_binary_flag) may be signaled to indicate whether the partition type is a binary partition type or a ternary partition type. For example, the partition type may be a binary partition type when the third flag is 1, and a ternary partition type when the third flag is 0. The nodes of the multi-type tree obtained by binary partitioning or ternary partitioning may be further partitioned into a multi-type tree structure. However, the nodes of the multi-type tree may not be partitioned into a quadtree structure. If the first flag is 0, the corresponding node of the multi-type tree is no longer partitioned, but becomes a leaf node (MTT_leaf_node) of the multi-type tree. The CU corresponding to the leaf node of the multi-type tree may be used as the above-mentioned final coding unit.

[0126] Based on mtt_split_cu_vertical_flag and mtt_split_cu_binary_flag, a multi-type tree partition mode (MttSplitMode) of a CU may be derived as shown in the following Table 1. In the following description, a multi-type tree partition mode may be referred to as a multi-tree partition type or a partition type.

[0127] [Table 1]

[0128] MttSplitMode mtt_split_cu_vertical_flag mtt_split_cu_binary_flag SPLIT_TT_HOR 0 0 SPLIT_BT_HOR 0 1 SPLIT_TT_VER 1 0 SPLIT_BT_VER 1 1

[0129] A CTU may include a coding block of luma samples (hereinafter referred to as a "luminance block") and two coding blocks of chroma samples corresponding thereto (hereinafter referred to as "chroma blocks"). The above coding tree scheme may be applied equally or individually to the luma block and chroma block of the current CU. Specifically, the luma block and chroma block in a CTU may be partitioned into the same block tree structure, and in this case, the tree structure is represented as SINGLE_TREE. Alternatively, the luma block and chroma block in a CTU may be partitioned into separate block tree structures, and in this case, the tree structure may be represented as DUAL_TREE. That is, when a CTU is partitioned into a dual tree, a block tree structure for a luma block and a block tree structure for a chroma block may exist separately. In this case, the block tree structure for the luma block may be referred to as DUAL_TREE_LUMA, and the block tree structure for the chroma component may be referred to as DUAL_TREE_CHROMA. For P and B slices / block groups, the luma block and the chroma block in a CTU may be restricted to have the same coding tree structure. However, for I slices / patch groups, luma blocks and chroma blocks may have separate block tree structures from each other. If a separate block tree structure is applied, luma CTBs may be partitioned into CUs based on a specific coding tree structure, and chroma CTBs may be partitioned into chroma CUs based on another coding tree structure. That is, this means that a CU in an I slice / patch group to which a separate block tree structure is applied may include a coding block of a luma component or a coding block of two chroma components, and a CU of a P or B slice / patch group may include blocks of three color components (one luma component and two chroma components).

[0130] Although a quadtree coding tree structure with nested multi-type trees has been described, the structure for partitioning a CU is not limited thereto. For example, the BT structure and the TT structure may be interpreted as concepts included in a multi-partition tree (MPT) structure, and the CU may be interpreted as being partitioned by the QT structure and the MPT structure. In an example where a CU is partitioned by the QT structure and the MPT structure, a syntax element (e.g., MPT_split_type) including information about how many blocks a leaf node of the QT structure is partitioned into and a syntax element (e.g., MPT_split_mode) including information about which of the vertical and horizontal directions a leaf node of the QT structure is partitioned into may be signaled to determine the partition structure.

[0131] In another example, the CU may be partitioned in a manner different from the QT structure, the BT structure, or the TT structure. That is, instead of partitioning a CU of a lower depth into 1 / 4 of a CU of a higher depth according to the QT structure, partitioning a CU of a lower depth into 1 / 2 of a CU of a higher depth according to the BT structure, or partitioning a CU of a lower depth into 1 / 4 or 1 / 2 of a CU of a higher depth according to the TT structure, in some cases the CU of a lower depth may be partitioned into 1 / 5, 1 / 3, 3 / 8, 3 / 5, 2 / 3, or 5 / 8 of a CU of a higher depth, and the method of partitioning the CU is not limited thereto.

[0132] Overview of Inter Prediction

[0133] Hereinafter, inter prediction according to the present disclosure will be described.

[0134] The prediction unit of the image encoding device / image decoding device according to the present disclosure may perform inter-frame prediction in units of blocks to derive prediction samples. Inter-frame prediction may represent a prediction derived in a manner that depends on data elements (e.g., sample values, motion information, etc.) of a picture other than the current picture. When inter-frame prediction is applied to the current block, the prediction block (prediction block or prediction sample array) of the current block may be derived based on a reference block (reference sample array) specified by a motion vector on a reference picture indicated by a reference picture index. In this case, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information of the current block may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.) information. When inter-frame prediction is applied, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. A temporally neighboring block may be referred to as a collocated reference block, a collocated CU (ColCU), or a colBlock, and a reference picture including a temporally neighboring block may be referred to as a collocated picture (colPic) or a colPicture. For example, a motion information candidate list may be constructed based on neighboring blocks of a current block, and a flag or index information indicating which candidate is selected (used) may be signaled to derive a motion vector and / or a reference picture index of the current block.

[0135] Inter prediction may be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the motion information of the current block may be equal to the motion information of the selected neighboring block. In the case of skip mode, unlike merge mode, a residual signal may not be sent. In the case of motion information prediction (MVP) mode, the motion vector of the selected neighboring block may be used as a motion vector predictor and the motion vector difference may be signaled. In this case, the motion vector of the current block may be derived using the sum of the motion vector predictor and the motion vector difference. In the present disclosure, MVP mode may have the same meaning as advanced motion vector prediction (AMVP).

[0136] According to the inter prediction type (L0 prediction, L1 prediction, Bi prediction, etc.), the motion information may include L0 motion information and / or L1 motion information. The motion vector in the L0 direction may be referred to as an L0 motion vector or MVL0, and the motion vector in the L1 direction may be referred to as an L1 motion vector or MVL1. Prediction based on the L0 motion vector may be referred to as an L0 prediction, prediction based on the L1 motion vector may be referred to as an L1 prediction, and prediction based on both the L0 motion vector and the L1 motion vector may be referred to as a Bi prediction. Here, the L0 motion vector may indicate a motion vector associated with the reference picture list L0 (L0), and the L1 motion vector may indicate a motion vector associated with the reference picture list L1 (L1). The reference picture list L0 may include a picture before the current picture in the output order as a reference picture, and the reference picture list L1 may include a picture after the current picture in the output order. The previous picture may be referred to as a forward (reference) picture, and the subsequent picture may be referred to as a backward (reference) picture. The reference picture list L0 may also include a picture after the current picture in the output order as a reference picture. In this case, within the reference picture list L0, the previous picture may be indexed first, and then the subsequent picture may be indexed. The reference picture list L1 may further include a picture preceding the current picture in the output order as a reference picture. In this case, within the reference picture list L1, the subsequent picture may be indexed first, and then the previous picture may be indexed. Here, the output order may correspond to a picture order count (POC) order.

[0137] Figure 6 is a flowchart illustrating a video / image encoding method based on inter-frame prediction.

[0138] Figure 7 is a view illustrating a configuration of the inter prediction unit 180 according to the present disclosure.

[0139] Figure 6 The encoding method can be Figure 2The image encoding device of the present invention may be performed. Specifically, step S610 may be performed by the inter-frame prediction unit 180, and step S620 may be performed by the residual processor. Specifically, step S620 may be performed by the subtractor 115. Step S630 may be performed by the entropy encoder 190. The prediction information of step S630 may be derived by the inter-frame prediction unit 180, and the residual information of step S630 may be derived by the residual processor. The residual information is information about the residual sample. The residual information may include information about the quantized transform coefficient for the residual sample. As described above, the residual sample may be derived as a transform coefficient by the transformer 120 of the image encoding device, and the transform coefficient may be derived as a quantized transform coefficient by the quantizer 130. The information about the quantized transform coefficient may be encoded by the entropy encoder 190 through the residual coding process.

[0140] The image encoding device may perform inter-frame prediction with respect to the current block (S610). The image encoding device may derive the inter-frame prediction mode and motion information of the current block and generate a prediction sample of the current block. Here, the inter-frame prediction mode determination, motion information derivation, and prediction sample generation processes may be performed simultaneously or any one of them may be performed before the other processes. For example, Figure 7 As shown, the inter-frame prediction unit 180 of the image encoding device may include a prediction mode determination unit 181, a motion information derivation unit 182, and a prediction sample derivation unit 183. The prediction mode determination unit 181 may determine the prediction mode of the current block, the motion information derivation unit 182 may derive the motion information of the current block, and the prediction sample derivation unit 183 may derive the prediction sample of the current block. For example, the inter-frame prediction unit 180 of the image encoding device may search for a block similar to the current block in a predetermined area (search area) of the reference picture through motion estimation, and derive a reference block whose difference with the current block is equal to or less than a predetermined criterion or a minimum value. Based on this, a reference picture index indicating a reference picture in which the reference block is located may be derived, and a motion vector may be derived based on the position difference between the reference block and the current block. The image encoding device may determine a mode applied to the current block among various prediction modes. The image encoding device may compare rate-distortion (RD) costs for various prediction modes, and determine the best prediction mode for the current block. However, the method of determining the prediction mode of the current block by the image encoding device is not limited to the above example, and various methods may be used.

[0141] For example, when the skip mode or merge mode is applicable to the current block, the image encoding device may derive a merge candidate from a neighboring block of the current block, and use the derived merge candidate to construct a merge candidate list. In addition, the image encoding device may derive a reference block whose difference with the current block is equal to or less than a predetermined criterion or minimum value from the reference blocks indicated by the merge candidates included in the merge candidate list. In this case, a merge candidate associated with the derived reference block may be selected, and merge index information indicating the selected merge candidate may be generated and sent to the image decoding device with a signal. The motion information of the selected merge candidate may be used to derive the motion information of the current block.

[0142] As another example, when the MVP mode is applicable to the current block, the image encoding device may derive a motion vector predictor (MVP) candidate from a neighboring block of the current block, and use the derived MVP candidate to construct an MVP candidate list. In addition, the image encoding device may use the motion vector of the MVP candidate selected from the MVP candidates included in the MVP candidate list as the MVP of the current block. In this case, for example, the motion vector indicating the reference block derived by the above-mentioned motion estimation may be used as the motion vector of the current block, and the current block having the motion vector with the smallest difference from the motion vector of the current block among the MVP candidates may be the selected MVP candidate. A motion vector difference (MVD) as the difference obtained by subtracting MVP from the motion vector of the current block may be derived. In this case, index information indicating the selected MVP candidate and information about MVD may be sent to the image decoding device with a signal. In addition, when the MVP mode is applied, the value of the reference picture index may be constructed as reference picture index information and sent to the image decoding device with a signal separately.

[0143] The image encoding device may derive residual samples based on the predicted samples (S620). The image encoding device may derive residual samples by comparing the original samples of the current block with the predicted samples. For example, the residual samples may be derived by subtracting the corresponding predicted samples from the original samples.

[0144] The image encoding device may encode the image information including the prediction information and the residual information (S630). The image encoding device may output the encoded image information in the form of a bitstream. The prediction information may include prediction mode information (e.g., a skip flag, a merge flag, or a mode index, etc.) and information about motion information as information related to the prediction process. Among the prediction mode information, the skip flag indicates whether the skip mode is applicable to the current block, and the merge flag indicates whether the merge mode is applicable to the current block. Alternatively, the prediction mode information may indicate one of a plurality of prediction modes, such as a mode index. When the skip flag and the merge flag are 0, it can be determined that the MVP mode is applicable to the current block. The information about the motion information may include candidate selection information (e.g., a merge index, an mvp flag, or an mvp index) as information for deriving a motion vector. Among the candidate selection information, the merge index may be sent with a signal when the merge mode is applicable to the current block and may be information for selecting one of the merge candidates included in the merge candidate list. Among the candidate selection information, the mvp flag or the mvp index may be sent with a signal when the MVP mode is applicable to the current block and may be information for selecting one of the mvp candidates in the mvp candidate list. In addition, the information about the motion information may include information about the above-mentioned MVD and / or reference picture index information. In addition, the information about the motion information may include information indicating whether L0 prediction, L1 prediction or Bi prediction is applied. The residual information is information about the residual sample. The residual information may include information about the quantized transform coefficient for the residual sample.

[0145] The output bit stream may be stored in a (digital) storage medium and transmitted to the image decoding device or may be transmitted to the image decoding device via a network.

[0146] As described above, the image encoding device can generate a reconstructed picture (a picture including reconstructed samples and reconstructed blocks) based on the reference sample and the residual sample. This is for the image encoding device to derive the same prediction result as the prediction result performed by the image decoding device, thereby improving the coding efficiency. Therefore, the image encoding device can store the reconstructed picture (or reconstructed sample and reconstructed block) in a memory and use it as a reference picture for inter-frame prediction. As described above, the in-loop filtering process is also applicable to the reconstructed picture.

[0147] Figure 8 is a flowchart illustrating a video / image decoding method based on inter-frame prediction.

[0148] Fig. 9 is a view illustrating a configuration of the inter prediction unit 260 according to the present disclosure.

[0149] The image decoding apparatus may perform an operation corresponding to the operation performed by the image encoding apparatus. The image decoding apparatus may perform prediction with respect to the current block based on the received prediction information and derive a prediction sample.

[0150] Figure 8 The decoding method can be obtained by Figure 3 The image decoding device of the present invention is performed. Steps S810 to S830 may be performed by the inter-frame prediction unit 260, and the prediction information of step S810 and the residual information of step S840 may be obtained from the bitstream by the entropy decoder 210. The residual processor of the image decoding device may derive the residual samples of the current block based on the residual information (S840). Specifically, the dequantizer 220 of the residual processor may perform dequantization based on the dequantized transform coefficient derived according to the residual information to derive the transform coefficient, and the inverse transformer 230 of the residual processor may perform inverse transform with respect to the transform coefficient to derive the residual sample of the current block. Step S850 may be performed by the adder 235 or the reconstructor.

[0151] Specifically, the image decoding apparatus may determine a prediction mode of the current block based on the received prediction information (S810). The image decoding apparatus may determine which inter prediction mode is applicable to the current block based on prediction mode information in the prediction information.

[0152] For example, it may be determined whether the skip mode is applicable to the current block based on a skip flag. In addition, it may be determined whether the merge mode or the MVP mode is applicable to the current block based on a merge flag. Alternatively, one of various inter-frame prediction mode candidates may be selected based on a mode index. The inter-frame prediction mode candidates may include a skip mode, a merge mode, and / or an MVP mode or may include various inter-frame prediction modes to be described below.

[0153] The image decoding device may derive motion information of the current block based on the determined inter prediction mode (S820). For example, when the skip mode or merge mode is applicable to the current block, the image decoding device may construct a merge candidate list to be described below, and select one of the merge candidates included in the merge candidate list. The selection may be performed based on the above-mentioned candidate selection information (merge index). The motion information of the selected merge candidate may be used to derive the motion information of the current block. For example, the motion information of the selected merge candidate may be used as the motion information of the current block.

[0154] As another example, when the MVP mode is applicable to the current block, the image decoding device may construct an MVP candidate list, and use the motion vector of the MVP candidate selected from the MVP candidates included in the MVP candidate list as the MVP of the current block. The selection may be performed based on the above-mentioned candidate selection information (MVP flag or MVP index). In this case, the MVD of the current block may be derived based on the information about the MVD, and the motion vector of the current block may be derived based on the MVP and MVD of the current block. In addition, the reference picture index of the current block may be derived based on the reference picture index information. The picture indicated by the reference picture index in the reference picture list of the current block may be derived as a reference picture referenced for inter-frame prediction of the current block.

[0155] The image decoding apparatus may generate a prediction sample of the current block based on the motion information of the current block (S830). In this case, a reference picture may be derived based on a reference picture index of the current block, and a sample of the reference block indicated by a motion vector of the current block on the reference picture may be used to derive the prediction sample of the current block. In some cases, a prediction sample filtering process may also be performed with respect to all or some of the prediction samples of the current block.

[0156] For example, Fig. 9 As shown in , the inter-prediction unit 260 of the image decoding device may include a prediction mode determination unit 261, a motion information derivation unit 262, and a prediction sample derivation unit 263. In the inter-prediction unit 260 of the image decoding device, the prediction mode determination unit 261 may determine the prediction mode of the current block based on the received prediction mode information, the motion information derivation unit 262 may derive motion information (motion vector and / or reference picture index, etc.) of the current block based on the received motion information, and the prediction sample derivation unit 263 may derive the prediction sample of the current block.

[0157] The image decoding device may generate residual samples of the current block based on the received residual information (S840). The image decoding device may generate reconstructed samples of the current block based on the predicted samples and the residual samples and generate a reconstructed picture based thereon (S850). Thereafter, the in-loop filtering process is applied to the reconstructed picture as described above.

[0158] As described above, the inter-frame prediction process may include a step of determining an inter-frame prediction mode, a step of deriving motion information according to the determined prediction mode, and a step of performing prediction (generating prediction samples) based on the derived motion information. As described above, the inter-frame prediction process may be performed by an image encoding device and an image decoding device.

[0159] Hereinafter, the steps of deriving motion information according to the prediction mode will be described in more detail.

[0160] As described above, inter-frame prediction can be performed using the motion information of the current block. The image encoding device can derive the best motion information of the current block through a motion estimation process. For example, the image encoding device can use the original block in the original picture of the current block in fractional pixel units to search for a similar reference block with high correlation within a predetermined search range in the reference picture, and use it to derive motion information. The similarity of the block can be calculated based on the sum of absolute differences (SAD) between the current block and the reference block. In this case, motion information can be derived based on the reference block with the smallest SAD in the search area. The derived motion information can be sent to the image decoding device with a signal according to various methods based on the inter-frame prediction mode.

[0161] When the merge mode is applicable to the current block, the motion information of the current block is not directly sent, and the motion information of the neighboring blocks is used to derive the motion information of the current block. Therefore, the motion information of the current prediction block can be indicated by sending flag information indicating that the merge mode is used and candidate selection information (e.g., merge index) indicating which neighboring block is used as a merge candidate. In the present disclosure, since the current block is a unit of prediction performance, the current block can be used as the same meaning as the current prediction block, and the neighboring block can be used as the same meaning as the neighboring prediction block.

[0162] The image encoding device may search for a merge candidate block for deriving motion information of the current block to perform a merge mode. For example, up to five merge candidate blocks may be used, but not limited thereto. The maximum number of merge candidate blocks may be sent in a slice header or a tile group header, but not limited thereto. After finding the merge candidate block, the image encoding device may generate a merge candidate list and select the merge candidate block with the minimum RD cost as the final merge candidate block.

[0163] The present disclosure provides various embodiments for configuring a merge candidate block of a merge candidate list. The merge candidate list may use, for example, five merge candidate blocks. For example, four spatial merge candidates and one temporal merge candidate may be used.

[0164] Fig.10 is a view illustrating neighboring blocks that may be used as spatial merging candidates.

[0165] Fig.11 is a view schematically illustrating a merge candidate list construction method according to an example of the present disclosure.

[0166] The image encoding / decoding apparatus may insert a spatial merge candidate derived by searching for spatial neighboring blocks of the current block into the merge candidate list (S1110). Fig.10 As shown in FIG, the spatial neighboring block may include the left bottom corner neighboring block A of the current block. 0 , left neighboring block A1 , right top corner adjacent block B 0 , top adjacent block B 1 and the left top corner adjacent block B 2 However, this is an example, and in addition to the above-mentioned spatial neighboring blocks, additional neighboring blocks such as right neighboring blocks, bottom neighboring blocks, and right bottom neighboring blocks may be further used as spatial neighboring blocks. The image encoding / decoding device may detect available blocks by searching spatial neighboring blocks based on priority, and derive motion information of the detected blocks as spatial merging candidates. For example, the image encoding / decoding device may detect available blocks by pressing A 1 , B 1 , B 0 , A 0 and B 2 Sequential search Fig.10 The five blocks shown are used and the available candidates are indexed sequentially to build a merge candidate list.

[0167] The image encoding / decoding device may insert a temporal merge candidate derived by searching for temporal neighboring blocks of the current block into a merge candidate list (S1120). The temporal neighboring block may be located on a reference picture different from the current picture in which the current block is located. The reference picture in which the temporal neighboring block is located may be referred to as a collocated picture or a col picture. The temporal neighboring blocks may be searched in the order of the right bottom corner neighboring block and the right bottom center block of the collocated block of the current block on the col picture. Meanwhile, when motion data compression is applied in order to reduce memory load, specific motion information may be stored as representative motion information of each predetermined storage unit of the col picture. In this case, it is not necessary to store motion information of all blocks in the predetermined storage unit, thereby obtaining a motion data compression effect. In this case, the predetermined storage unit may be predetermined to be, for example, a 16×16 sample unit or an 8×8 sample unit, or the size information of the predetermined storage unit may be sent from the image encoding device to the image decoding device by a signal. When motion data compression is applied, the motion information of the temporal neighboring block may be replaced with the representative motion information of the predetermined storage unit in which the temporal neighboring block is located. That is, in this case, from the perspective of implementation, the temporal merging candidate can be derived based on the motion information of the prediction block covering the arithmetically left shifted position after being arithmetically right shifted by a predetermined value based on the coordinates (left top sample position) of the temporal neighboring block (rather than the prediction block located on the coordinates of the temporal neighboring block). For example, when the predetermined storage unit is 2 n x2 nWhen the coordinates of the sample unit and the temporally neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the modified position ((xTnb >> n) << n), (yTnb >> n) << n)) can be used for temporal merge candidates. Specifically, for example, when the predetermined storage unit is a 16x16 sample unit and the coordinates of the temporally neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the modified position ((xTnb >> 4) << 4), (yTnb >> 4) << 4)) can be used for temporal merge candidates. Alternatively, for example, when the predetermined storage unit is an 8x8 sample unit and the coordinates of the temporally neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the modified position ((xTnb >> 3) << 3), (yTnb >> 3) << 3)) can be used for temporal merge candidates.

[0168] Referring again to Fig.11 , the image encoding / decoding device may check whether the number of current merge candidates is less than the maximum number of merge candidates (S1130). The maximum number of merge candidates may be predefined or signaled from the image encoding device to the image decoding device. For example, the image encoding device may generate and encode information about the maximum number of merge candidates and send the encoded information to the image decoding device in the form of a bitstream. When the maximum number of merge candidates is satisfied, the subsequent candidate addition process S1140 may not be performed.

[0169] When, as a result of the check in step S1130, the number of current merge candidates is less than the maximum number of merge candidates, the image encoding / decoding device may derive additional merge candidates according to a predetermined method and then insert the additional merge candidates into the merge candidate list (S1140).

[0170] When, as a result of the check in step S1130, the number of current merge candidates is not less than the maximum number of merge candidates, the image encoding / decoding device may end the construction of the merge candidate list. In this case, the image encoding device may select the best merge candidate from among the merge candidates configuring the merge candidate list and signal candidate selection information (e.g., merge index) indicating the selected merge candidate to the image decoding device. The image decoding device may select the best merge candidate based on the merge candidate list and the candidate selection information.

[0171] As described above, the motion information of the selected merge candidate can be used as the motion information of the current block, and the prediction sample of the current block can be derived based on the motion information of the current block. The image encoding device can derive the residual sample of the current block based on the prediction sample, and send the residual information of the residual sample to the image decoding device with a signal. As described above, the image decoding device can generate a reconstructed sample based on the residual sample derived from the residual information and the prediction sample, and generate a reconstructed picture based thereon.

[0172] When skip mode is applied to the current block, the motion information of the current block can be derived using the same method as the case where merge mode is applied. However, when skip mode is applied, the residual signal of the corresponding block is omitted, and thus the prediction sample can be directly used as the reconstructed sample.

[0173] When the MVP mode is applied to the current block, the reconstructed spatial neighboring blocks (e.g., Fig.10 The motion vector predictor (MVP) candidate list is generated by reconstructing the motion vector of the spatial neighboring block (as shown) and / or the motion vector corresponding to the temporal neighboring block (or Col block). That is, the motion vector of the reconstructed spatial neighboring block and the motion vector corresponding to the temporal neighboring block can be used as the motion vector predictor candidate of the current block. When bi prediction is applied, the MVP candidate list for L0 motion information derivation and the MVP candidate list for L1 motion information derivation are generated and used separately. The prediction information (or information about the prediction) of the current block may include candidate selection information (e.g., MVP flag or MVP index) indicating the best motion vector predictor candidate selected from the motion vector predictor candidates included in the MVP candidate list. In this case, the prediction unit can use the candidate selection information to select the motion vector predictor of the current block from the motion vector predictor candidates included in the MVP candidate list. The prediction unit of the image encoding device can obtain the motion vector difference (MVD) between the motion vector of the current block and the motion vector predictor and encode it, and output the encoded MVD in the form of a bitstream. That is, the MVD can be obtained by subtracting the motion vector predictor from the motion vector of the current block. The prediction unit of the image decoding device can obtain the motion vector difference included in the information about the prediction and derive the motion vector of the current block by adding the motion vector difference and the motion vector predictor. The prediction unit of the image encoding device can obtain or derive a reference picture index indicating the reference picture from the information about the prediction.

[0174] Fig.12 is a view schematically illustrating a motion vector predictor candidate list construction method according to an example of the present disclosure.

[0175] First, the spatial candidate blocks of the current block can be searched and the available candidate blocks can be inserted into the MVP candidate list (S1210). Thereafter, it is determined whether the number of MVP candidates included in the MVP candidate list is less than 2 (S1220), and when the number of MVP candidates is 2, the construction of the MVP candidate list can be completed.

[0176] In step S1220, when the number of available spatial candidate blocks is less than 2, the temporal candidate blocks of the current block can be searched and the available candidate blocks can be inserted into the MVP candidate list (S1230). When the temporal candidate block is not available, a zero motion vector can be inserted into the MVP candidate list, thereby completing the construction of the MVP candidate list.

[0177] Meanwhile, when the MVP mode is applied, the reference picture index may be explicitly signaled. In this case, the reference picture index refidxL0 for L0 prediction and the reference picture index refidxL1 for L1 prediction may be signaled separately. For example, when the MVP mode is applied and Bi prediction is applied, information about refidxL0 and information about refidxL1 may be signaled.

[0178] As described above, when the MVP mode is applied, information about the MVP derived by the image encoding device may be signaled to the image decoding device. For example, the information about the MVD may include the MVD absolute value and information indicating the x and y components of the sign. In this case, when the MVD absolute value is greater than 0, whether the MVD absolute value is greater than 1 and information indicating the MVD remainder may be signaled in steps. For example, only when the value of the flag information indicating whether the MVD absolute value is greater than 0 is 1, the information indicating whether the MVD absolute value is greater than 1 may be signaled.

[0179] Fig.13 is a view illustrating a syntax structure for transmitting an MVD from an image encoding apparatus to an image decoding apparatus according to an embodiment of the present disclosure.

[0180] exist Fig.13 In the , abs_mvd_greater0_flag[0] indicates whether the absolute value of the x component of the MVD is greater than 0, and abs_mvd_greater0_flag[1] indicates whether the absolute value of the y component of the MVD is greater than 0. Similarly, abs_mvd_greater1_flag[0] indicates whether the absolute value of the x component of the MVD is greater than 1, and abs_mvd_greater1_flag[1] indicates whether the absolute value of the y component of the MVD is greater than 1. Fig.13As shown in the figure, abs_mvd_greater1_flag can be sent only when abs_mvd_greater0_flag is 1. Fig.13 In the MVD_SRC_MVR ... Fig.13 The grammatical structure shown, the MVD can be derived as shown in the following equation 1.

[0181] [Equation 1]

[0182] MVD[compIdx]=abs_mvd_greater0_flag[compIdx]*(abs_mvd_minus2[compIdx]+2)

[0183] *(1-2*mvd_sign_flag[compIdx])

[0184] Meanwhile, the MVD (MVDL0) for L0 prediction and the MVD (MVDL1) for L1 prediction may be signaled separately, and the information about the MVD may include information about MVDL0 and / or information about MVDL1. For example, when the MVP mode is applied to the current block and the BI prediction is applied, the information about MVDL0 and the information about MVDL1 may be signaled.

[0185] Overview of Intra Block Copy (IBC) Prediction

[0186] Hereinafter, IBC prediction according to the present disclosure will be described.

[0187] IBC prediction can be performed by a prediction unit of an image encoding / decoding device. IBC prediction can be referred to as IBC for short. IBC can be used for content image / motion image coding such as screen content coding (SCC). IBC prediction can basically perform IBC prediction in the current picture, but can be performed similarly to inter-frame prediction because the reference block is derived within the current picture. That is, IBC can use at least one of the inter-frame prediction techniques described in the present disclosure. For example, IBC can use at least one of the above-mentioned motion information (motion vector) derivation methods. It can be considered that IBC prediction partially modifies and uses at least one of the inter-frame prediction techniques. IBC can refer to the current picture and can therefore be called a current picture reference (CPR).

[0188] For IBC, the image encoding device may perform block matching (BM) and derive the best block vector (or motion vector) of the current block (e.g., CU). The derived block vector (or motion vector) may be sent to the image decoding device by signaling through a bitstream using a method similar to the signaling of motion information (motion vector) in the above-mentioned inter-frame prediction. The image decoding device may derive the reference block of the current block in the current picture through the block vector (motion vector) sent by the signal, and thereby derive the prediction signal (prediction block or prediction sample) of the current block. Here, the block vector (or motion vector) may indicate the displacement from the current block to the reference block located in the reconstructed area in the current picture. Therefore, the block vector (or motion vector) may be referred to as a displacement vector. In the following, in IBC, the motion vector may correspond to a block vector or a displacement vector. The motion vector of the current block may include a motion vector of a luminance component (luminance motion vector) or a motion vector of a chrominance component (chrominance motion vector). For example, the luminance motion vector of a CU encoded by IBC may be an integer sample unit (i.e., integer precision). The chrominance motion vector may be pruned in integer sample units. As described above, IBC may use at least one of the inter-frame prediction techniques, and, for example, may encode / decode the luma motion vector using the above-described merge mode or MVP mode.

[0189] When applying a merge mode to a luma IBC block, you can use the same Fig.11 The described merge candidate list in inter mode constructs a merge candidate list for a luma IBC block. However, in the case of a luma IBC block, temporally neighboring blocks may not be used as merge candidates.

[0190] When MVP mode is applied to the brightness IBC block, it can be similar to the reference Fig.12 The MVP candidate list in the inter mode described above constructs the MVP candidate list for the luma IBC block. However, in the case of the luma IBC block, the temporal candidate block may not be used as the MVP candidate.

[0191] In IBC, the reference block is derived from an already reconstructed area in the current picture. In this case, in order to reduce the memory consumption and complexity of the image decoding device, a predefined area among the already reconstructed areas in the current picture can be referenced. The predefined area can include the current CTU in which the current block is included. By limiting the referenceable reconstruction area to the predefined area, the IBC mode can be implemented in hardware using local on-chip memory.

[0192] An image encoding apparatus for performing IBC may search a predefined area to determine a reference block having a minimum RD cost and derive a motion vector (block vector) based on positions of the reference block and a current block.

[0193] Whether to apply IBC to the current block may be signaled as IBC performance information at the CU level. Information about the signaling method (IBC MVP mode or IBC skip / merge mode) of the motion vector of the current block may be signaled. The IBC performance information may be used to determine the prediction mode of the current block. Therefore, the IBC performance information may be included in the information about the prediction mode of the current block.

[0194] In case of the IBC skip / merge mode, a merge candidate index may be signaled to indicate a block vector to be used for prediction of the current luma block among block vectors included in the merge candidate list.

[0195] In this case, the merge candidate list may include neighboring blocks encoded by IBC. The merge candidate list may be configured to include spatial merge candidates but not temporal merge candidates. In addition, the merge candidate list may also include history-based motion vector predictor (HMVP) candidates and / or paired candidates.

[0196] In the case of the IBC MVP mode, the block vector difference can be encoded using the same method as the motion vector difference of the inter-frame mode described above. The block vector prediction method can be constructed similarly to the MVP mode of the inter-frame mode and use an MVP candidate list including two candidates as predictors. One of the two candidates can be derived from the left neighboring block, and the other candidate can be derived from the top neighboring block. In this case, candidates can only be derived from the corresponding neighboring block when the left or top neighboring block is encoded in IBC. If the left or top neighboring block is not available, for example, it is not encoded in IBC, the default block vector can be included in the MVP candidate list as a predictor. In addition, information indicating one of the two block vector predictors (e.g., a flag) is signaled similarly to the MVP mode of the inter-frame mode and used as candidate selection information. The MVP candidate list may include an HMVP candidate and / or a zero motion vector as a default block vector.

[0197] The HMVP candidate may be referred to as a history-based MVP candidate, and an MVP candidate, a merge candidate, or a block vector candidate used before encoding / decoding of the current block may be stored in the HMVP list as an HMVP candidate. Thereafter, when the merge candidate list or the mvp candidate list of the current block does not include the maximum number of candidates, the candidate stored in the HMVP list may be added as an HMVP candidate to the merge candidate list or the mvp candidate list of the current block.

[0198] The pair of candidates means candidates derived by selecting two candidates from among candidates already included in the merge candidate list of the current block according to a predetermined order and calculating an average of the selected two candidates.

[0199] Fig.14is a flow chart illustrating a video / image encoding method based on IBC.

[0200] Fig.15 is a view illustrating a configuration of a prediction unit for performing an IBC-based video / image encoding method according to the present disclosure.

[0201] Fig.14 The encoding method can be Figure 2 The image encoding device of the present invention may be performed. Specifically, step S1410 may be performed by the prediction unit and step S1420 may be performed by the residual processor. Specifically, step S1420 may be performed by the subtractor 115. Step S1430 may be performed by the entropy encoder 190. The prediction information of step S1430 may be derived by the prediction unit and the residual information of step S1430 may be derived by the residual processor. The residual information is information about the residual sample. The residual information may include information about the quantized transform coefficient for the residual sample. As described above, the residual sample may be derived through the transform coefficient via the transformer 120 of the image encoding device, and the transform coefficient may be derived through the transform coefficient quantized by the quantizer 130. The information about the quantized transform coefficient may be encoded by the entropy encoder 190 through the residual coding process.

[0202] The image encoding device may perform IBC prediction (IBC-based prediction) for the current block (S1410). The image encoding device may derive a prediction mode and a motion vector (block vector) of the current block and generate a prediction sample of the current block. The prediction mode may include at least one of the above-mentioned inter-frame prediction modes. Here, the prediction mode determination, motion vector derivation, and prediction sample generation processes may be performed simultaneously, or any one process may be performed before the other processes. For example, Fig.15 As shown, the prediction unit of the image encoding device for performing the video / image encoding method based on IBC may include a prediction mode determination unit, a motion vector deriving unit, and a prediction sample deriving unit. The prediction mode determination unit may determine the prediction mode of the current block, the motion vector deriving unit may derive the motion vector of the current block, and the prediction sample deriving unit may derive the prediction sample of the current block. For example, the prediction unit of the image encoding device may search for a block similar to the current block in the reconstruction area of ​​the current picture (or a certain area (search area) of the reconstruction area) and derive a reference block whose difference with the current block is equal to or less than a certain criterion or minimum value. The image encoding device may derive a motion vector based on the displacement difference between the reference block and the current block. The image encoding device may determine a mode applied to the current block among various prediction modes. The image encoding device may compare RD costs for various prediction modes and determine the best prediction mode for the current block. However, the method for determining the prediction mode of the current block by the image encoding device is not limited to the above example and various methods may be used.

[0203] For example, when a skip mode or a merge mode is applied to the current block, the image encoding device may derive a merge candidate from a neighboring block of the current block, and use the derived merge candidate to construct a merge candidate list. In addition, the image encoding device may derive a reference block whose difference with the current block is equal to or less than a specific criterion or a minimum value from the reference blocks indicated by the merge candidates included in the merge candidate list. In this case, a merge candidate associated with the derived reference block may be selected, and merge index information indicating the selected merge candidate may be generated and sent to the image decoding device by a signal. Using the motion vector of the selected merge candidate, the motion vector of the current block may be derived.

[0204] As another example, when the MVP mode is applied to the current block, the image encoding device may derive a motion vector predictor (MVP) candidate from a neighboring block of the current block, and use the derived MVP candidate to construct an MVP candidate list. In addition, the image encoding device may use the motion vector of an MVP candidate selected from among the MVP candidates included in the MVP candidate list as the MVP of the current block. In this case, for example, the motion vector indicating the reference block derived by the above-mentioned motion estimation may be used as the motion vector of the current block, and the MVP candidate with the smallest difference from the motion vector of the current block among the MVP candidates may become the selected MVP candidate. The motion vector difference (MVD) obtained by subtracting the MVP from the motion vector of the current block may be derived. In this case, the index information indicating the selected MVP candidate and the information about the MVD may be sent to the image decoding device by a signal.

[0205] The image encoding device may derive residual samples based on the predicted samples (S1420). The image encoding device may derive residual samples by comparing the original samples of the current block with the predicted samples. For example, the residual samples may be derived by subtracting the corresponding predicted samples from the original samples.

[0206] The image encoding device may encode the image information including the prediction information and the residual information (S1430). The image encoding device may output the encoded image information in the form of a bitstream. The prediction information may include prediction mode information (e.g., a skip flag, a merge flag, or a mode index) and information about a motion vector as information related to the prediction process. Among the prediction mode information, the skip flag indicates whether the skip mode is applied to the current block, and the merge flag indicates whether the merge mode is applied to the current block. Alternatively, the prediction mode information may indicate one of a plurality of prediction modes, such as a mode index. When the skip flag and the merge flag are 0, it may be determined that the MVP mode is applicable to the current block. The information about the motion vector may include candidate selection information (e.g., a merge index, an mvp flag, or an mvp index) as information for deriving the motion vector. Among the candidate selection information, the merge index may be sent with a signal when the merge mode is applied to the current block, and may be information for selecting one of the merge candidates included in the merge candidate list. Among the candidate selection information, an MVP flag or an MVP index may be signaled when the MVP mode is applied to the current block, and may be information for selecting one of the MVP candidates included in the MVP candidate list. In addition, the information about the motion vector may include information about the above-mentioned MVD. In addition, the information about the motion vector may include information indicating whether L0 prediction, L1 prediction or bi prediction is applied. The residual information is information about the residual sample. The residual information may include information about the quantized transform coefficients used for the residual sample.

[0207] The output bit stream may be stored in a (digital) storage medium and transmitted to the image decoding device or may be transmitted to the image decoding device via a network.

[0208] At the same time, as described above, the image encoding device can generate a reconstructed picture (a picture including reconstructed samples and reconstructed blocks) based on the reference sample and the residual sample. This is for the image encoding device to derive the same prediction result as the prediction result performed by the image decoding device, thereby improving the coding efficiency. Therefore, the image encoding device can store the reconstructed picture (or reconstructed sample and reconstructed block) in a memory and use it as a reference picture for inter-frame prediction. As described above, the in-loop filtering process is also applicable to the reconstructed picture.

[0209] Fig.16 is a flow chart illustrating a video / image decoding method based on IBC.

[0210] Fig.17 is a view illustrating a configuration of a prediction unit for performing an IBC-based video / image decoding method according to the present disclosure.

[0211] The image decoding device may perform an operation corresponding to the operation performed by the image encoding device. The image decoding device may perform IBC prediction on the current block based on the received prediction information to derive a prediction sample.

[0212] Fig.16 The decoding method can be obtained by Figure 3 The image decoding device of the present invention is performed. Steps S1610 to S1630 may be performed by a prediction unit, and the prediction information of step S1610 and the residual information of step S1640 may be obtained from the bitstream by the entropy decoder 210. The residual processor of the image decoding device may derive the residual samples of the current block based on the residual information (S1640). Specifically, the dequantizer 220 of the residual processor may perform dequantization based on the quantized transform coefficient derived according to the residual information to derive the transform coefficient, and the inverse transformer 230 of the residual processor may perform inverse transform on the transform coefficient to derive the residual sample of the current block. Step S1650 may be performed by the adder 235 or the reconstructor.

[0213] Specifically, the image decoding apparatus may determine a prediction mode of the current block based on the received prediction information (S1610). The image decoding apparatus may determine which prediction mode is applicable to the current block based on prediction mode information in the prediction information.

[0214] For example, it can be determined based on the skip flag whether to apply the skip mode to the current block. In addition, it can be determined based on the merge flag whether to apply the merge node or MVP mode to the current block. Alternatively, one of the various prediction mode candidates can be selected based on the mode index. The prediction mode candidate may include the skip mode, the merge mode and / or the MVP mode or may include the various inter-frame prediction modes described above.

[0215] The image encoding device may derive the motion vector of the current block based on the determined prediction mode (S1620). For example, when the skip mode or merge mode is applied to the current block, the image decoding device may construct the above-mentioned merge candidate list and select one of the merge modes included in the merge candidate list. The selection may be performed based on the above-mentioned candidate selection information (merge index). The motion vector of the current block may be derived using the motion vector of the selected merge candidate. For example, the motion vector of the selected merge candidate may be used as the motion vector of the current block.

[0216] As another example, when the MVP mode is applied to the current block, the image decoding device may construct an MVP candidate list, and use the motion vector of the MVP candidate selected from the MVP candidates included in the MVP candidate list as the MVP of the current block. The selection may be performed based on the above-mentioned candidate selection information (MVP flag or MVP index). In this case, the MVD of the current block may be derived based on the information about the MVD, and the motion vector of the current block may be derived based on the MVP and MVD of the current block.

[0217] The image decoding device may generate a prediction sample of the current block based on the motion vector of the current block (S1630). The prediction sample of the current block may be derived using a sample of a reference block indicated by the motion vector of the current block on the current picture. In some cases, a prediction sample filtering process may be further performed for all or some of the prediction samples of the current block.

[0218] For example, Fig.17 As shown, the prediction unit of the image decoding device for performing the IBC-based video / image decoding method may include a prediction mode determination unit, a motion vector deriving unit, and a prediction sample deriving unit. The prediction unit of the image decoding device may determine the prediction mode of the current block based on the received prediction mode information in the prediction mode determination unit, derive the motion vector of the current block based on the received information about the motion vector in the motion vector deriving unit, and derive the prediction sample of the current block in the prediction sample deriving unit.

[0219] The image decoding device may generate a residual sample of the current block based on the received residual information (S1640). The image decoding device may generate a reconstructed sample of the current block based on the predicted sample and the residual sample, and generate a reconstructed picture based thereon (S1650). Thereafter, as described above, the in-loop filtering process is also applicable to the reconstructed picture.

[0220] As described above, one unit (e.g., coding unit (CU)) may include a luma block (luma coding block (CB)) and a chroma block (chroma CB). In this case, the luma block and the chroma block corresponding thereto may have the same motion information (e.g., motion vector) or different motion information. For example, the motion information of the chroma block may be derived based on the motion information of the luma block, so that the luma block and the chroma block corresponding thereto have the same motion information.

[0221] Example #1

[0222] Hereinafter, a method of applying the IBC mode according to some embodiments of the present disclosure will be described.

[0223] Fig.18is a view illustrating a bitstream structure according to an embodiment of the present disclosure.

[0224] Fig.18 Shows the grammatical structure of a compilation unit. Fig.18 , at least one of the syntax elements cu_skip_flag, pred_mode_flag, and / or pred_mode_ibc_flag may be signaled according to a preset condition. In the following description, the first value may be 0 and the second value may be 2, but the scope of the present invention is not limited thereto, and an embodiment in which the first value is 1 and the second value is 0 may be included in the scope of the present disclosure.

[0225] The syntax element cu_skip_flag may specify whether the skip mode is applied to the current coding unit. For example, when cu_skip_flag has a first value, the skip mode may not be applied to the current block. Meanwhile, when cu_skip_flag is not signaled, its value may be determined to be the first value. Specifically, whether to signal cu_skip_flag may depend on whether the current block satisfies the condition of Equation 2.

[0226] [Equation 2]

[0227] treeType! =DUAL_TREE_CHROMA&&! (((cbWidth==4&&cbHeight==4)||modeType==MODE_TYPE_INTRA)&&! sps_ibc_enabled_flag)

[0228] In the following description, treeType may specify a tree structure of the current block, and cbWidth and cbHeight may specify the width and height of the current block, respectively. In addition, the syntax element sps_ibc_enabled_flag may specify whether the IBC mode is applicable to the current block, and may be signaled at the SPS level. When sps_ibc_enabled_flag has a first value, the IBC mode is not applicable to blocks in pictures within the corresponding sequence. Conversely, when sps_ibc_enabled_flag has a second value, the IBC mode is applicable to blocks in pictures within the corresponding sequence.

[0229] The syntax element pred_mode_flag may specify a prediction mode of the current block. For example, when pred_mode_flag has a first value, the current block may be encoded / decoded in an inter prediction mode. When pred_mode_flag has a second value, the current block may be encoded / decoded in an intra prediction mode. Specifically, whether to signal pred_mode_flag may depend on whether the current block satisfies Equation 3.

[0230] [Equation 3]

[0231] cu_skip_flag[x0][y0]==0&&slice_type! =I&&! (cbWidth==4&&cbHeight==4)&&modeType==MODE_TYPE_ALL

[0232] In the following description, slice_type may be a syntax element specifying the type of a slice to which a current block belongs.

[0233] The syntax element pred_mode_ibc_flag may specify whether the IBC mode is applied to the current block. For example, when pred_mode_ibc_flag has a first value, the IBC mode may not be applied to the current block. When pred_mode_ibc_flag has a second value, the IBC mode may be applied to the current block. Meanwhile, when pred_mode_ibc_flag is not signaled, the value of pred_mode_ibc_flag may be determined according to at least one of the following embodiments. Specifically, whether to signal pred_mode_ibc_flag may depend on whether the current block satisfies Equation 4 and / or Equation 5.

[0234] [Equation 4]

[0235] ((slice_type==I&&cu_skip_flag[x0][y0]==0)||(slice_type!=I&&(CuPredMode[x0][y0]!=MODE_TYPE_INTR A||(cbWidth==4&&cbHeight==4&&cu_skip_flag[x0][y0]==0))))&&cbWidth<=64&&cbHeight<=64&&modeType! =MODE_TYPE_INTER

[0236] [Equation 5]

[0237] sps_ibc_enabled_flag&&treeType! =DUAL_TREE_CHROMA

[0238] Meanwhile, when it is determined that pred_mode_ibc_flag is not sent with a signal, the value of pred_mode_ibc_flag may be implicitly determined based on one of the following embodiments. For example, when cu_skip_flag has a second value and the current block is a 4x4 block, pred_mode_ibc_flag may be determined as the second value. As another example, when the size of the current block is 128x128, pred_mode_ibc_flag may be determined as the first value. As another example, when the tree structure of the current block is dual-tree chroma, pred_mode_ibc_flag may be determined as the first value. As another example, when the current block is included in an I slice, pred_mode_ibc_flag may be determined as the same value as sps_ibc_enabled_flag of the current block. On the contrary, when the current block is included in a P or B slice, pred_mode_ibc_flag may be determined as the first value.

[0239] Meanwhile, when the current block is included in a P or B slice and cu_skip_flag has a second value, syntax elements other than pred_mode_ibc_flag or merge-related syntax elements (e.g., merge_data) may not be signaled after signaling of cu_skip_flag. Meanwhile, when the current block is included in an I slice, syntax elements other than the merge index may not be signaled after signaling of cu_skip_flag.

[0240] According to the present embodiment, whether IBC is applied to the current block may be determined based on the syntax elements cu_skip_flag and pred_mode_ibc_flag. For example, when the current block is included in an I slice, sps_ibc_enabled_flag has a second value and cu_skip_flag has a second value, the current block may be encoded / decoded in the IBC skip mode. In addition, even if cu_skip_flag has a first value, when pred_mode_ibc_flag has a second value, the current block may be encoded / decoded in one of the IBC merge mode or the IBC MVP mode.

[0241] Referring to Equation 4, when the current block has a size of 64x128, 128x64, or 128x128, pred_mode_ibc_flag may not be signaled. However, in Equation 2, which is a signaling condition of cu_skip_flag, since determination of whether the width or height of the current block is equal to or greater than 64 is not performed, cu_skip_flag may be signaled even if the current block has a size of 64x128, 128x64, or 128x128. As a result, a problem may occur in which the IBC mode is applied to the current block even if the current block has a size of 64x128, 128x64, or 128x128.

[0242] Meanwhile, for pipeline processing of one picture, a VPDU (virtual pipeline data unit) may be defined. A VPDU may mean an operation unit that may be processed simultaneously by an image encoding / decoding device through a pipeline stage. In an image encoding / decoding device, the size of a VPDU may be defined as the size of a maximum transform block. For example, the size of a VPDU may be 64x64.

[0243] Because the IBC buffer cannot be applied to blocks larger than VPDU, when the size of the current block exceeds 64x64, the image encoding / decoding device may not be able to generate reference samples. However, when the current block is a dual tree and is included in an I slice, such a problem may not occur because the current block is implicitly partitioned into 64x64 blocks. However, when the current block is a single tree and is included in an I slice, the above problem may occur. In order to solve such a problem, when the size of the current block exceeds a predetermined block size (e.g., 64x64), the signaling of cu_skip_flag can be limited.

[0244] Fig.19 is a view illustrating an image decoding method according to an embodiment of the present disclosure.

[0245] refer to Fig.19 According to an embodiment of the present disclosure, an image decoding method may include determining whether to parse first information specifying whether a skip mode is applied to a current block (S1910), determining whether to parse second information specifying whether an IBC (Intra Block Copy) mode is applied to the current block (S1920), determining whether to apply the IBC mode to the current mode based on the first information and the second information (S1920) (S1930) and / or deriving a prediction block of the current block based on whether the IBC mode is applied (S1940).

[0246] In this case, whether to parse the first information may be determined based on at least one of the width or height of the current block. Specifically, when the width and height of the current block are equal to or less than the first value, it may be determined that the first information is parsed.

[0247] Fig. 20 is a view illustrating an image encoding method according to an embodiment of the present disclosure.

[0248] refer to Fig. 20 According to an embodiment of the present disclosure, an image encoding method may include determining whether to encode first information specifying whether a skip mode is applied to a current block (S2010), determining whether to encode second information specifying whether an IBC mode is applied to the current block (S2020), and generating a bit stream of the current block based on the first information and the second information (S2030).

[0249] In this case, whether to encode the first information may be determined based on at least one of the width or height of the current block. Specifically, when the width and height of the current block are equal to or less than the first value, it may be determined that the first information is encoded.

[0250] For example, in the following description, the first information and the second information may mean cu_skip_flag and pred_mode_ibc_flag.

[0251] Example #2

[0252] Hereinafter, a method of signaling a syntax element cu_skip_flag according to some embodiments of the present disclosure will be described.

[0253] According to the present embodiment, when sps_ibc_enabled_flag has a second value, the current block is included in an I slice, and at least one of the width or height of the current block exceeds the first value, cu_skip_flag may not be signaled. As another example, when sps_ibc_enabled_flag has a second value, the current block is included in an I slice, and the width and height of the current block are equal to or less than the first value, cu_skip_flag may be signaled. For example, the first value may be a positive integer satisfying 2^n. For example, the first value may be 64.

[0254] Figure 21 to Figure 24 is a diagram illustrating a bitstream structure according to some embodiments of the present disclosure.

[0255] For example, refer to Fig.21 , whether to signal cu_skip_flag may be determined based on Equation 6 below.

[0256] [Equation 6]

[0257] treeType! =DUAL_TREE_CHROMA&&! (((cbWidth==4&&cbHeight==4)||modeType==MODE_TYPE_INTRA)&&!sps_ibc_enabled_flag)||(sps_ibc_enabled_flag&&cbWidth<=64&&cbHeight

[0258] As another example, refer to Fig. 22 , whether to signal cu_skip_flag may be determined based on Equation 7 below.

[0259] [Equation 7]

[0260] treeType! =DUAL_TREE_CHROMA&&(!((cbWidth==4&&cbHeight==4)||modeType==MODE_TYPE_INTRA)||(sps_ibc_enabled_flag&&cbWidth<=64&&cbHeight<=64))

[0261] Meanwhile, when cu_skip_flag is transmitted based on the condition of Equation 6 or Equation 7, cu_skip_flag for 128×128 blocks may be signaled. Therefore, according to another embodiment of the present disclosure, whether cu_skip_flag is signaled may be determined based on Equation 8 below.

[0262] [Equation 8]

[0263] treeType! =DUAL_TREE_CHROMA&&((slice_type!=I&&(sps_ibc_enabled_flag||!((cbWidth==4&&cbHeight==4)||modeType==MODE_TYPE_INTRA)))||(slice_type

[0264] ==I&&sps_ibc_enabled_flag&&cbWidth<=64&&cbHeight<=64))

[0265] Fig.24 The syntax elements can be expressed in different ways Fig.23 The grammatical structure of .

[0266] Meanwhile, when the signaling of cu_skip_flag is restricted according to the present disclosure, the application of the IBC mode may be restricted. For example, when at least one of the width or height of the current block exceeds 64 and thus the signaling of cu_skip_flag and pred_mode_ibc_flag is restricted, the value of pred_mode_ibc_flag may be implicitly determined as the first value.

[0267] Furthermore, when at least one of the width or height of the current block exceeds 64 and thus signaling of cu_skip_flag and pred_mode_ibc_flag is restricted, the value of pred_mode_ibc_flag may be implicitly determined as the first value only when the current block is included in an I slice.

[0268] According to some embodiments of the present disclosure, application of the IBC mode to blocks exceeding VPDU (Virtual Pipe Data Unit) is restricted, thereby increasing image encoding / decoding efficiency.

[0269] Although for the sake of clarity of description, the exemplary method of the present disclosure described above is represented as a series of operations, it is not intended to limit the order of executing the steps, and these steps can be performed simultaneously or in different orders when necessary. In order to implement the method according to the present invention, the steps described may further include other steps, may include the remaining steps except some steps, or may include other additional steps except some steps.

[0270] In the present disclosure, an image encoding device or an image decoding device that performs a predetermined operation (step) may perform an operation (step) of confirming an execution condition or situation of the corresponding operation (step). For example, if it is described that a predetermined operation is performed when a predetermined condition is met, the image encoding device or the image decoding device may perform the predetermined operation after determining whether the predetermined condition is met.

[0271] The various embodiments of the present disclosure are not a list of all possible combinations and are intended to describe representative aspects of the present disclosure, and matters described in the various embodiments may be applied independently or in combination of two or more.

[0272] Various embodiments of the present disclosure may be implemented in hardware, firmware, software or a combination thereof. In the case of implementing the present disclosure in hardware, the present disclosure may be implemented in 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 general purpose processor, a controller, a microcontroller, a microprocessor, etc.

[0273] In addition, the image decoding device and the image encoding device of the embodiment of the present disclosure can be included in multimedia broadcast transmission and reception equipment, mobile communication terminals, home theater video equipment, digital theater video equipment, surveillance cameras, video chat equipment, real-time communication equipment such as video communication, mobile streaming equipment, storage media, cameras, video on demand (VoD) service providing equipment, OTT video (over the top video) equipment, Internet streaming service providing equipment, three-dimensional (3D) video equipment, video phone video equipment, medical video equipment, etc., and can be used to process video signals or data signals. For example, OTT video equipment can include game consoles, Blu-ray players, Internet access TVs, home theater systems, smart phones, tablet PCs, digital video recorders (DVRs), etc.

[0274] Fig.25 is a view showing a content streaming system to which an embodiment of the present disclosure can be applied.

[0275] like Fig.25 As shown in , a content streaming transmission system to which an embodiment of the present disclosure is applied may mainly include an encoding server, a streaming transmission server, a network server, a media storage, a user device, and a multimedia input device.

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

[0277] A bitstream may be generated by applying the image encoding method or the image encoding device according to the embodiment of the present disclosure, and a streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.

[0278] The streaming server sends multimedia data to the user device based on the user's request through the network server, and the network server serves as a medium to notify the user of the service. When the user requests the required service from the network server, the network server can deliver it to the streaming server, and the streaming server can send the multimedia data to the user. In this case, the content streaming system may include a separate control server. In this case, the control server serves as a command / response between devices in the control content streaming system.

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

[0280] Examples of user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation devices, tablet PCs, tablet computers, ultrabooks, wearable devices (e.g., smart watches, smart glasses, head-mounted displays), digital televisions, desktop computers, digital signage, etc.

[0281] Each server in the content streaming system may operate as a distributed server, in which case data received from each server may be distributed.

[0282] The scope of the present disclosure includes software or executable commands (e.g., operating systems, applications, firmware, programs, etc.) for enabling operations according to the methods of various embodiments to be performed on a device or computer, and a non-transitory computer-readable medium having such software or commands stored thereon and executable on a device or computer.

[0283] Industrial Applicability

[0284] The embodiments of the present disclosure may be used to encode or decode an image.

Claims

1. An image decoding method performed by an image decoding device, the image decoding method comprising: parsing first information specifying whether a skip mode applies to a current block; parsing second information specifying whether an intra block copy (IBC) mode is applied to the current block; determining whether the IBC mode is applied to the current block based on the first information and the second information; as well as Based on whether the IBC mode is applied, a prediction block of the current block is derived, wherein whether to parse the first information is determined based on a width and a height of the current block.

2. The image decoding method according to claim 1, wherein: Based on the width and height of the current block being equal to or smaller than a first value, it is determined that the first information is parsed.

3. The image decoding method according to claim 2, wherein: The first value is 64.

4. The image decoding method according to claim 2, wherein: Whether to parse the first information is determined further based on third information specifying whether the IBC mode is applicable to the current block.

5. The image decoding method according to claim 4, wherein: Based on the third information specifying that the IBC mode is applicable to the current block, it is determined that the first information is parsed.

6. The image decoding method according to claim 4, wherein: The third information is signaled at a higher level of the current block.

7. The image decoding method according to claim 4, wherein: Further based on the type of the slice including the current block, it is determined whether to parse the first information.

8. The image decoding method according to claim 7, wherein: Based on the fact that the slice including the current block is an I slice, it is determined that the first information is parsed.

9. The image decoding method according to claim 1, wherein: Whether to parse the second information is determined based on at least one of the first information or the width or height of the current block.

10. An image decoding device, comprising: Memory; and at least one processor, wherein the at least one processor is configured to: parsing first information specifying whether a skip mode applies to a current block; parsing second information specifying whether an intra block copy (IBC) mode is applied to the current block; Based on the first information and the second information, determining whether the IBC mode is applied to the current block; and Based on whether the IBC mode is applied, a prediction block of the current block is derived, wherein whether to parse the first information is determined based on a width and a height of the current block.

11. An image encoding method performed by an image encoding device, the image encoding method comprising: encoding first information specifying whether a skip mode applies to a current block; encoding second information specifying whether an intra block copy (IBC) mode is applied to the current block; as well as A bitstream for the current block is generated based on whether the first information and the second information are encoded, wherein whether the first information is encoded is determined based on a width and a height of the current block.

12. The image encoding method according to claim 11, wherein: Based on the width and height of the current block being equal to or smaller than a first value, it is determined that the first information is encoded.

13. The image encoding method according to claim 12, wherein: The first value is 64.

14. The image encoding method according to claim 11, wherein: Whether to encode the first information is further determined based on whether the IBC mode is applicable to the current block.