Image encoding / decoding method and device using maximum transform size restriction for chroma component coding block, and bitstream transmission method

By determining the prediction mode in the image encoding/decoding method, generating prediction blocks and residual blocks, and determining the transform block size based on the color components, the problem of low high-resolution image coding efficiency in the prior art is solved, and more efficient image coding and decoding is achieved.

JP7671393B2Active Publication Date: 2025-05-01NOKIA TECHNOLOGIES OY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024079309
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-06-24
Filing Date
2024-05-15
Publication Date
2025-05-01
Estimated Expiration
2040-06-24

AI Technical Summary

Technical Problem

The prior art is difficult to effectively improve the encoding/decoding efficiency of high-resolution and high-quality images, especially when limiting the maximum conversion size of the pigment component encoding block.

Method used

By determining the prediction mode of the current block in the image encoding/decoding method, if the prediction mode is Intra Block Copy (IBC) mode, a prediction block is generated; the size of the transform block is determined according to the color component; the residual block of the current block is generated; and the current block is restored based on the prediction block and the residual block.

Benefits of technology

Improve image encoding/decoding efficiency, reduce transmission and storage costs while improving image quality by limiting the maximum conversion size of the pigment component encoding block.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007671393000003
    Figure 0007671393000003
  • Figure 0007671393000004
    Figure 0007671393000004
  • Figure 0007671393000005
    Figure 0007671393000005
Patent Text Reader

Abstract

To provide an image encoding / decoding method and apparatus.SOLUTION: An image encoding / decoding method and an apparatus are provided. An image decoding method performed by an image decoding apparatus according to the present disclosure may include the steps of: determining a prediction mode of a current block; generating a prediction block of the current block on the basis of, intra block copy (IBC) prediction mode information, based on the prediction mode of the current block being an IBC prediction mode; determining a size of a transform block of the current block on the basis of a color component of the current block; generating a residual block of the current block on the basis of the size of the transform block; and reconstructing the current block on the basis of the prediction block and the residual block of the current block.SELECTED DRAWING: Figure 30
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 more particularly to a method and apparatus for encoding / decoding an image by limiting the maximum transform size of a chroma component coding block, and a method for transmitting a bitstream generated by the image encoding method / apparatus of the present disclosure. [Background technology]

[0002] Recently, the demand for high-resolution, high-quality images, for example, HD (High Definition) images and UHD (Ultra High Definition) images, is increasing in various fields. As the resolution and quality of image data increases, the amount of information or bits transmitted increases relatively compared to conventional image data. The increase in the amount of information or bits transmitted leads to an increase in transmission costs and storage costs.

[0003] This requires a highly efficient image compression technique for effectively transmitting, storing, and reproducing high-resolution, high-quality image information. Summary of the Invention [Problem to be solved by the invention]

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

[0005] Another object of the present disclosure is to provide an image encoding / decoding method and apparatus that improves encoding / decoding efficiency by limiting the maximum transform size of a chroma component coding block.

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

[0007] Another object of the present disclosure is to provide a recording medium storing a bitstream 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 bitstream that is received by the image decoding device according to the present disclosure, decoded, and used to restore an image.

[0009] The technical problems to be solved by the present disclosure are not limited to the above-mentioned technical problems, and other technical problems not described above will be clearly understood by a person having ordinary skill in the art to which the present disclosure pertains from the following description. [Means for solving the problem]

[0010] An image decoding method performed by an image decoding device according to one aspect of the present disclosure may include a step of determining a prediction mode of a current block; if the prediction mode of the current block is an IBC (intra block copy) prediction mode, a step of generating a prediction block for the current block based on IBC prediction mode information; a step of determining a size of a transform block of the current block based on a color component of the current block; a step of generating a residual block of the current block based on the size of the transform block; and a step of reconstructing the current block based on the prediction block and the residual block of the current block.

[0011] In addition, an image decoding device according to an aspect of the present disclosure includes a memory and at least one processor, the at least one processor may determine a prediction mode of a current block, generate a prediction block for the current block based on IBC (intra block copy) prediction mode information when the prediction mode of the current block is an IBC (intra block copy) prediction mode, determine a size of a transform block of the current block based on a color component of the current block, and generate a residual block of the current block based on the size of the transform block. In this case, the decoding device may reconstruct the current block based on the prediction block and the residual block of the current block.

[0012] In addition, an image encoding method performed by an image encoding device according to an aspect of the present disclosure may include the steps of dividing the image to determine a current block, performing IBC prediction on the current block to generate a predicted block of the current block, generating a residual block of the current block based on the predicted block, and encoding prediction mode information of the current block. In this case, the residual block may be encoded based on a size of a transform block of the current block, and the size of the transform block may be determined based on a color component of the current block.

[0013] Furthermore, a transmission method according to another aspect of the present disclosure can transmit a bitstream generated by the image encoding device or image encoding method of the present disclosure.

[0014] Furthermore, a computer-readable recording medium according to another aspect of the present disclosure can store a bitstream generated by the image encoding method or image encoding device of the present disclosure.

[0015] The features described above in the brief summary of the present disclosure are merely exemplary embodiments of the detailed description of the present disclosure that follows and are not intended to limit the scope of the present disclosure. Effect of the Invention

[0016] According to the present disclosure, an image encoding / decoding method and apparatus with improved encoding / decoding efficiency can be provided.

[0017] Furthermore, according to the present disclosure, an image encoding / decoding method and apparatus can be provided that improves encoding / decoding efficiency by limiting the maximum transform size of a chroma component coding block.

[0018] According to the present disclosure, there can also be provided a method for transmitting a bitstream generated by the image encoding method or apparatus according to the present disclosure.

[0019] According to the present disclosure, a recording medium storing a bitstream generated by the image encoding method or apparatus according to the present disclosure can be provided.

[0020] Furthermore, according to the present disclosure, it is possible to provide a recording medium storing a bitstream that is received by the image decoding device according to the present disclosure, decoded, and used to restore an image.

[0021] The effects obtained by the present disclosure are not limited to the effects described above, and other effects not described above will be clearly understood by those having ordinary skill in the art to which the present disclosure pertains from the following description. [Brief description of the drawings]

[0022] [Figure 1] FIG. 1 is a schematic diagram illustrating a video coding system to which an embodiment of the present disclosure can be applied. [Diagram 2] 1 is a diagram illustrating an image encoding device to which an embodiment of the present disclosure can be applied; [Diagram 3] 1 is a diagram illustrating an image decoding device to which an embodiment of the present disclosure can be applied; [Figure 4] FIG. 2 is a diagram showing an image division structure according to an embodiment. [Diagram 5]FIG. 11 is a diagram showing an example of a block division type according to a multi-type tree structure. [Figure 6] FIG. 1 illustrates an example signaling mechanism for block partition information in a quadtree with nested multi-type tree structure according to the present disclosure. [Figure 7] FIG. 1 illustrates an embodiment in which a CTU is divided into multiple CUs. [Figure 8] FIG. 13 is a diagram showing an example of a redundant division pattern. [Figure 9] 1 is a flowchart illustrating an inter-prediction based video / image encoding method according to an embodiment. [Figure 10] 13 is a diagram illustrating an exemplary configuration of an inter prediction unit 180 according to an embodiment. [Figure 11] 1 is a flowchart illustrating an inter-prediction based video / image decoding method according to an embodiment. [Figure 12] 2 is a diagram illustrating an exemplary configuration of an inter prediction unit 260 according to an embodiment. [Figure 13] FIG. 2 illustrates neighboring blocks that can be used as spatial merging candidates according to one embodiment. [Figure 14] FIG. 2 is a diagram illustrating a method for constructing a merge candidate list according to one embodiment. [Figure 15] 1 is a diagram illustrating a motion vector predictor candidate list construction method according to an embodiment; [Figure 16] A diagram showing a syntax structure for transmitting MVD from an image encoding device to an image decoding device according to one embodiment. [Figure 17] 1 is a flowchart illustrating an IBC-based video / image encoding method according to one embodiment. [Figure 18] 1 is a diagram illustrating an exemplary configuration of a prediction unit that performs an IBC-based video / image encoding method according to an embodiment of the present invention. [Figure 19] 1 is a flowchart illustrating an IBC-based video / image decoding method according to an embodiment. [Figure 20] 1 is a diagram illustrating an exemplary configuration of a prediction unit that performs an IBC-based video / image decoding method according to an embodiment of the present invention. [Figure 21] A diagram showing syntax for chroma format signaling according to one embodiment. [Figure 22] FIG. 2 is a diagram showing a chroma format classification table according to one embodiment. [Figure 23] FIG. 13 is a diagram for explaining a case of CU division restriction for virtual pipeline processing. [Figure 24] FIG. 13 is a diagram illustrating an example of division of a CU and a TU according to an embodiment. [Diagram 25] FIG. 13 is a diagram illustrating an example of division of a CU and a TU according to an embodiment. [Figure 26] FIG. 13 is a diagram illustrating an example of division of a CU and a TU according to an embodiment. [Figure 27] 1 is a flowchart illustrating IBC prediction and intra prediction with maximum transform size applied according to one embodiment. [Figure 28] 1 is a flowchart illustrating IBC prediction and intra prediction with maximum transform size applied according to one embodiment. [Figure 29] 1 is a flowchart illustrating a method for encoding an image by an encoding device according to an embodiment. [Diagram 30] 4 is a flowchart showing a method for a decoding device according to an embodiment to decode an image. [Diagram 31] FIG. 1 illustrates a content streaming system to which an embodiment of the present disclosure can be applied. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0023] The present disclosure will be described in detail below with reference to the accompanying drawings so that those skilled in the art can easily implement the present disclosure. However, the present disclosure may be embodied in various different forms and is not limited to the embodiments described herein.

[0024] In describing the embodiments of the present disclosure, if it is determined that a specific description of a known configuration or function may make the gist of the present disclosure unclear, the detailed description thereof will be omitted. In addition, in the drawings, parts that are not related to the description of the present disclosure are omitted, and similar parts are denoted by similar reference numerals.

[0025] In the present disclosure, when a certain component is "connected," "coupled," or "connected" to another component, this includes not only a direct connection relationship, but also an indirect connection relationship in which another component exists between them. Furthermore, when a certain component is described as "including" or "having" another component, this does not mean that the other component is excluded, but that the other component can be further included, unless otherwise specified.

[0026] In this disclosure, terms such as "first" and "second" are used only for the purpose of distinguishing one component from another component, and do not limit the order or importance of the components unless otherwise specified. Therefore, within the scope of this disclosure, a first component in one embodiment may be called a second component in another embodiment, and similarly, a second component in one embodiment may be called a first component in another embodiment.

[0027] In this disclosure, components that are distinguished from one another are used to clearly describe the characteristics of each component, and do not necessarily mean that the components are separate. In other words, multiple components may be integrated and configured as a single hardware or software unit, or one component may be distributed and configured as multiple hardware or software units. Thus, even if not otherwise stated, such integrated or distributed embodiments are also included in the scope of the present disclosure.

[0028] In the present disclosure, the components described in the various embodiments are not necessarily essential components, and some may be optional components. Therefore, an embodiment consisting of a subset of the components described in one embodiment is also included in the scope of the present disclosure. In addition, an embodiment including other components in addition to the components described in the various embodiments is also included in the scope of the present disclosure.

[0029] The present disclosure relates to image encoding and decoding, and terms used in this disclosure may have ordinary meanings in the technical field to which the present disclosure belongs, unless they are newly defined in this disclosure.

[0030] In this disclosure, a "picture" generally means a unit indicating any one image in a particular time period, a slice / tile is a coding unit constituting a part of a picture, and one picture may be composed of one or more slices / tiles. Also, a slice / tile may include one or more coding tree units (CTUs).

[0031] In this disclosure, a "pixel" or a "pel" may refer to the smallest unit constituting one picture (or image). A term corresponding to a pixel may be a "sample." A sample may generally indicate a pixel or a pixel value, may indicate only a pixel / pixel value of a luma component, or may indicate only a pixel / pixel value of a chroma component.

[0032] In this disclosure, a "unit" may refer to a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. A unit may be used interchangeably with terms such as "sample array," "block," or "area," depending on the case. In a general case, an M×N block may include a set (or array) of samples or transform coefficients consisting of M columns and N rows.

[0033] In the present disclosure, a "current block" may refer to any one of a "current coding block," a "current coding unit," a "block to be coded," a "block to be decoded," or a "block to be processed." If prediction is performed, a "current block" may refer to a "current predicted block" or a "block to be predicted." If transformation (inverse transformation) / quantization (inverse quantization) is performed, a "current block" may refer to a "current transformed block" or a "block to be transformed." If filtering is performed, a "current block" may refer to a "block to be filtered."

[0034] In addition, in this disclosure, a "current block" may mean a "luma block of a current block" unless a chroma block is explicitly stated. A "chroma block of a current block" may be expressed by explicitly including an explicit statement of a chroma block, such as a "chroma block" or a "current chroma block."

[0035] In the present disclosure, " / " and "," can be interpreted as "and / or." For example, "A / B" and "A, B" can be interpreted as "A and / or B." Also, "A / B / C" and "A, B, C" can mean "at least one of A, B, and / or C."

[0036] In this disclosure, "or" can be interpreted as "and / or." For example, "A or B" can mean 1) only "A," 2) only "B," or 3) "A and B." Or, in this disclosure, "or" can mean "additionally or alternatively."

[0037] Video Coding System Overview

[0038] FIG. 1 is a diagram illustrating a video coding system according to this disclosure.

[0039] A video coding system according to an embodiment may include an encoding device 10 and a decoding device 20. The encoding device 10 may transmit encoded video and / or image information or data to the decoding device 20 in a file or streaming format via a digital storage medium or a network.

[0040] The encoding device 10 according to an embodiment may include a video source generating unit 11, an encoding unit 12, and a transmitting unit 13. The decoding device 20 according to an embodiment may include a receiving unit 21, a decoding unit 22, and a rendering unit 23. The encoding unit 12 may be referred to as a video / image encoding unit, and the decoding unit 22 may be referred to as a video / image decoding unit. The transmitting unit 13 may be included in the encoding unit 12. The receiving unit 21 may be included in the decoding unit 22. The rendering unit 23 may include a display unit, which may be configured as a separate device or an external component.

[0041] The video source generating unit 11 can obtain the video / images through a video / image capture, synthesis or generation process, etc. The video source generating unit 11 can include a video / image capture device and / or a video / image generation device. The video / image capture device can include, for example, one or more cameras, a video / image archive containing previously captured videos / images, etc. The video / image generation device can include, for example, a computer, a tablet, a smartphone, etc., and can (electronically) generate the video / images. For example, a virtual video / image can be generated through a computer, etc., in which case the video / image capture process can be replaced by a process in which related data is generated.

[0042] The encoder 12 may encode the input video / image. The encoder 12 may perform a series of steps such as prediction, transformation, quantization, etc. for compression and encoding efficiency. The encoder 12 may output the encoded data (encoded video / image information) in a bitstream format.

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

[0044] The decoding unit 22 can decode the video / image by performing a series of steps such as inverse quantization, inverse transformation, and prediction corresponding to the operations of the encoding unit 12.

[0045] The rendering unit 23 can render the decoded video / images. The rendered video / images can be displayed via a display unit.

[0046] Overview of the image encoding device

[0047] FIG. 2 is a diagram illustrating an image encoding device to which an embodiment of the present disclosure can be applied.

[0048] As shown in Fig. 2, the image coding device 100 may include an image division unit 110, a subtraction unit 115, a transformation unit 120, a quantization unit 130, an inverse quantization unit 140, an inverse transformation unit 150, an addition unit 155, a filtering unit 160, a memory 170, an inter prediction unit 180, an intra prediction unit 185, and an entropy coding unit 190. The inter prediction unit 180 and the intra prediction unit 185 may be collectively referred to as a "prediction unit." The transformation unit 120, the quantization unit 130, the inverse quantization unit 140, and the inverse transformation unit 150 may be included in a residual processing unit. The residual processing unit may further include a subtraction unit 115.

[0049] All or at least some of the components constituting the image encoding device 100 may be realized by a single hardware component (e.g., an encoder or a processor) depending on the embodiment. Also, the memory 170 may include a decoded picture buffer (DPB) and may be realized by a digital storage medium.

[0050] The image division unit 110 may divide an input image (or picture, frame) input to the image encoding device 100 into one or more processing units. As an example, the processing units may be called coding units (CUs). The coding units may be obtained by recursively dividing a coding tree unit (CTU) or a largest coding unit (LCU) according to a QT / BT / TT (Quad-tree / Binary-tree / Ternal-tree) structure. For example, one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad-tree structure, a binary-tree structure, and / or a ternary-tree structure. For dividing the coding units, a quad-tree structure may be applied first, and a binary-tree structure and / or a ternary-tree structure may be applied later. A coding procedure according to the present disclosure may be performed based on a final coding unit that is not further divided. The maximum coding unit may be used as the final coding unit, and a lower depth coding unit obtained by dividing the maximum coding unit may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and / or restoration, which will be described later. As another example, a processing unit of the coding procedure may be a prediction unit (PU) or a transform unit (TU). The prediction unit and the transform unit may be divided or partitioned from the final coding unit, respectively. The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.

[0051] The prediction unit (inter prediction unit 180 or intra prediction unit 185) may perform prediction on a block to be processed (current block) and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied in units of a current block or a CU. The prediction unit may generate various information related to prediction of the current block and transmit it to the entropy encoding unit 190. The information related to prediction may be encoded by the entropy encoding unit 190 and output in a bitstream format.

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

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

[0054] The prediction unit may generate a prediction signal based on various prediction methods and / or prediction techniques, which will be described later. For example, the prediction unit may apply intra prediction or inter prediction for prediction of the current block, and may simultaneously apply intra prediction and inter prediction. A prediction method that simultaneously applies intra prediction and inter prediction for prediction of the current block may be called combined inter and intra prediction (CIIP). The prediction unit may also perform intra block copy (IBC) for prediction of the current block. Intra block copy can be used for content image / video coding such as games, for example, as in screen content coding (SCC). IBC is a method of predicting a current block using an already restored reference block in a current picture that is located a predetermined distance away from the current block. When IBC is applied, the position of the reference block in the current picture may be coded as a vector (block vector) corresponding to the predetermined distance. IBC is basically performed in the current picture, but may be performed similarly to inter prediction in that a reference block is derived in the current picture. That is, the IBC may use at least one of the inter prediction techniques described in this disclosure.

[0055] The prediction signal generated by the prediction unit may be used to generate a restored signal or a residual signal. The subtraction unit 115 may subtract the prediction signal (predicted block, prediction sample array) output from the prediction unit from the input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array). The generated residual signal may be transmitted to the conversion unit 120.

[0056] The transform unit 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-Loeve transform (KLT), a graph-based transform (GBT), or a conditionally non-linear transform (CNT). Here, the GBT refers to a transform obtained from a graph when the relationship information between pixels is expressed as a graph. The CNT refers to a transform obtained based on a predicted signal generated using all previously reconstructed pixels. The transform process may be applied to pixel blocks having the same square size, or may be applied to non-square, variable-sized blocks.

[0057] The quantization unit 130 may quantize the transform coefficients and transmit the quantized transform coefficients to the entropy coding unit 190. The entropy coding unit 190 may code the quantized signal (information on the quantized transform coefficients) and output the coded signal in a bitstream format. The information on the quantized transform coefficients may be referred to as residual information. The quantization unit 130 may rearrange the quantized transform coefficients in a block format into a one-dimensional vector format based on a coefficient scan order, and may generate information on the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector format.

[0058] The entropy coding unit 190 can perform various coding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). The entropy coding unit 190 may also code information required for video / image restoration (e.g., syntax elements (values ​​of syntax elements, etc.) together or separately) in addition to the quantized transform coefficients. The coded information (e.g., coded video / image information) may be transmitted or stored in a bitstream format in network abstraction layer (NAL) unit units. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / image information may also include general constraint information. The signaling information, information to be transmitted, and / or syntax elements mentioned in the present disclosure may be coded through the above-mentioned coding procedures and included in the bitstream.

[0059] The bitstream may be transmitted via a network or may be stored in a digital storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media such as a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitting unit (not shown) for transmitting the signal output from the entropy encoding unit 190 and / or a storing unit (not shown) for storing the signal may be provided as an internal / external element of the image encoding device 100, or the transmitting unit may be provided as a component of the entropy encoding unit 190.

[0060] The quantized transform coefficients output from the quantization unit 130 can be used to generate a residual signal. For example, the quantized transform coefficients are subjected to inverse quantization and inverse transformation via the inverse quantization unit 140 and the inverse transformation unit 150, so that a residual signal (residual block or residual sample) can be restored.

[0061] The adder 155 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to a prediction signal output from the inter prediction unit 180 or the intra prediction unit 185. When there is no residual for the current block to be processed, such as when a skip mode is applied, a predicted block may be used as a reconstructed block. The adder 155 may be referred to as a reconstruction unit or a reconstructed block generation unit. The generated reconstructed signal may be used for intra prediction of the next current block to be processed in the current picture, and may also be used for inter prediction of the next picture after filtering as described below.

[0062] The filtering unit 160 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 160 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may store the modified reconstructed picture in the memory 170, specifically, in the DPB of the memory 170. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, and the like. The filtering unit 160 may generate various information related to filtering, as will be described later in the description of each filtering method, and transmit the information to the entropy coding unit 190. The information related to filtering may be coded by the entropy coding unit 190 and output in a bitstream format.

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

[0064] The DPB in the memory 170 may store modified reconstructed pictures to be used as reference pictures in the inter prediction unit 180. The memory 170 may store motion information of blocks from which motion information in the current picture is derived (or coded) and / or motion information of already reconstructed intra-picture blocks. The stored motion information may be transmitted to the inter prediction unit 180 to be used as motion information of spatial surrounding blocks or motion information of temporal surrounding blocks. The memory 170 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 185.

[0065] Overview of the image decoding device

[0066] FIG. 3 is a diagram illustrating an image decoding device to which an embodiment of the present disclosure can be applied.

[0067] 3, the image decoding device 200 may include an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an adder 235, a filtering unit 240, a memory 250, an inter prediction unit 260, and an intra prediction unit 265. The inter prediction unit 260 and the intra prediction unit 265 may be collectively referred to as a "prediction unit." The inverse quantization unit 220 and the inverse transform unit 230 may be included in a residual processing unit.

[0068] All or at least some of the components constituting the image decoding device 200 may be realized by one hardware component (e.g., a decoder or a processor) depending on the embodiment. Also, the memory 170 may include a DPB and may be realized by a digital storage medium.

[0069] The image decoding device 200, which receives a bitstream including video / image information, can reconstruct an image by executing a process corresponding to the process performed by the image encoding device 100 of FIG. 1. For example, the image decoding device 200 can perform decoding using a processing unit applied in the image encoding device. Thus, the processing unit for decoding can be, for example, a coding unit. The coding unit can be obtained by dividing a coding tree unit or a maximum coding unit. Then, the reconstructed image signal decoded and output by the image decoding device 200 can be reproduced by a reproduction device (not shown).

[0070] The image decoding apparatus 200 may receive a signal output from the image encoding apparatus of FIG. 2 in the form of a bitstream. The received signal may be decoded via the entropy decoding unit 210. For example, the entropy decoding unit 210 may derive information (e.g., video / image information) required for image restoration (or picture restoration) by parsing the bitstream. The video / image information may further include information on various parameter sets such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. The image decoding apparatus may further use information on the parameter set and / or the general constraint information to decode an image. The signaling information, received information, and / or syntax elements referred to in the present disclosure may be obtained from the bitstream by being decoded via the decoding procedure. For example, the entropy decoding unit 210 may decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output values ​​of syntax elements required for image restoration and quantized values ​​of transform coefficients related to the residual. More specifically, the CABAC entropy decoding method may receive bins corresponding to each syntax element from the bitstream, determine a context model using syntax element information to be decoded and decoded information of neighboring blocks and a block to be decoded, or information of a symbol / bin decoded in a previous step, predict the occurrence probability of the bin based on the determined context model, and perform arithmetic decoding of the bin to generate a symbol corresponding to the value of each syntax element. In this case, the CABAC entropy decoding method may update the context model using information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model.Among the information decoded by the entropy decoding unit 210, information related to prediction is provided to a prediction unit (inter prediction unit 260 and intra prediction unit 265), and residual values ​​entropy-decoded by the entropy decoding unit 210, i.e., quantized transform coefficients and related parameter information, may be input to the inverse quantization unit 220. Also, among the information decoded by the entropy decoding unit 210, information related to filtering may be provided to the filtering unit 240. Meanwhile, a receiving unit (not shown) for receiving a signal output from the image encoding device may be further provided as an internal / external element of the image decoding device 200, or the receiving unit may be provided as a component of the entropy decoding unit 210.

[0071] Meanwhile, the image decoding device according to the present disclosure may be called a video / image / picture decoding device. The image decoding device may include an information decoder (video / image / picture information decoder) and / or a sample decoder (video / image / picture sample decoder). The information decoder may include an entropy decoding unit 210, and the sample decoder may include at least one of an inverse quantization unit 220, an inverse transform unit 230, an adder 235, a filtering unit 240, a memory 250, an inter prediction unit 260, and an intra prediction unit 265.

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

[0073] The inverse transform unit 230 can inversely transform the transform coefficients to obtain a residual signal (residual block, residual sample array).

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

[0075] The prediction unit can generate a prediction signal based on various prediction methods (techniques) described below, as has been described in the explanation of the prediction unit of the image encoding device 100.

[0076] 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 may be similarly applied to the intra prediction unit 265.

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

[0078] The adder 235 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to a prediction signal (predicted block, predicted sample array) output from a prediction unit (including the inter prediction unit 260 and / or the intra prediction unit 265). When there is no residual for a current block to be processed, such as when a skip mode is applied, the predicted block may be used as a reconstructed block. The description of the adder 155 may be similarly applied to the adder 235. The adder 235 may be referred to as a reconstruction unit or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of a next current block to be processed in a current picture, and may also be used for inter prediction of a next picture after filtering as described below.

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

[0080] 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 motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 260 to be used as motion information of a spatial surrounding block or motion information of a temporal surrounding block. The memory 250 may store a reconstructed sample of a reconstructed block in the current picture and transmit it to the intra prediction unit 265.

[0081] In this specification, the embodiments described for the filtering unit 160, inter prediction unit 180 and intra prediction unit 185 of the image encoding device 100 can also be applied in a similar or corresponding manner to the filtering unit 240, inter prediction unit 260 and intra prediction unit 265 of the image decoding device 200, respectively.

[0082] Image Segmentation Overview

[0083] The video / image coding method according to the present disclosure may be performed based on the following image partition structure. Specifically, procedures such as prediction, residual processing ((inverse) transform, (inverse) quantization, etc.), syntax element coding, filtering, etc., described below, may be performed based on CTU, CU (and / or TU, PU) derived based on the image partition structure. An image may be divided in units of blocks, and the block partition procedure may be performed in the image partition unit 110 of the encoding device described above. Partition-related information may be coded by the entropy coding unit 190 and transmitted to the decoding device in the form of a bitstream. The entropy decoding unit 210 of the decoding device may derive a block partition structure of a current picture based on the partition-related information obtained from the bitstream, and perform a series of procedures for image decoding (e.g., prediction, residual processing, block / picture reconstruction, in-loop filtering, etc.) based on the block partition structure.

[0084] A picture can be divided into a sequence of coding tree units (CTUs). FIG. 4 shows an example of a picture being divided into CTUs. A CTU can correspond to a coding tree block (CTB). Alternatively, a CTU can include a coding tree block of luma samples and two coding tree blocks of corresponding chroma samples. For example, for a picture containing three sample arrays, a CTU can include an N×N block of luma samples and two corresponding blocks of chroma samples.

[0085] Overview of CTU division

[0086] As mentioned above, a coding unit can be obtained by recursively splitting a coding tree unit (CTU) or a largest coding unit (LCU) according to a QT / BT / TT (Quad-tree / Binary-tree / Ternal-tree) structure. For example, a CTU can be first split into a quad-tree structure. Then, the leaf nodes of the quad-tree structure can be further split according to a multi-type tree structure.

[0087] Partitioning by a quadtree means dividing a current CU (or CTU) into four equal parts. By partitioning by a quadtree, the current CU can be divided into four CUs having the same width and height. If the current CU is not further divided 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 is not further divided and can be used as the above-mentioned final coding unit. Alternatively, the CU corresponding to the leaf node of the quadtree structure can be further divided by a multi-type tree structure.

[0088] 5 is a diagram showing the types of division of a block by a multi-type tree structure. Division by a multi-type tree structure can include two divisions by a binary tree structure and two divisions by a ternary tree structure.

[0089] The two divisions according to the binary tree structure may include vertical binary splitting (SPLIT_BT_VER) and horizontal binary splitting (SPLIT_BT_HOR). Vertical binary splitting (SPLIT_BT_VER) refers to a division in which the current CU is divided into two equal parts vertically. As shown in FIG. 4, two CUs having the same height as the height of the current CU and half the width of the current CU may be generated by the vertical binary splitting. Horizontal binary splitting (SPLIT_BT_HOR) refers to a division in which the current CU is divided into two equal parts horizontally. As shown in FIG. 5, two CUs having the same width as the width of the current CU and half the height of the current CU may be generated by the horizontal binary splitting.

[0090] The two divisions according to the ternary tree structure may include vertical ternary splitting (SPLIT_TT_VER) and horizontal ternary splitting (SPLIT_TT_HOR). The vertical ternary splitting (SPLIT_TT_VER) divides the current CU vertically at a ratio of 1:2:1. As shown in FIG. 5, the vertical ternary splitting may generate two CUs having the same height as the current CU and a width 1 / 4 of the current CU, and a CU having the same height as the current CU and a width half the current CU. The horizontal ternary splitting (SPLIT_TT_HOR) divides the current CU horizontally at a ratio of 1:2:1. As shown in FIG. 4, the horizontal ternary splitting may generate two CUs having a height 1 / 4 of the current CU and a width equal to the current CU, and a CU having a height half the current CU and a width equal to the current CU.

[0091] FIG. 6 is a diagram illustrating a signaling mechanism of block partition information in a quadtree with nested multi-type tree structure according to the present disclosure.

[0092] Here, the CTU is treated as the root node of the quadtree, and the CTU is first split into a quadtree structure. Information (e.g., qt_split_flag) indicating whether or not to perform quadtree splitting for the current CU (CTU or quadtree node (QT_node)) can be signaled. For example, if qt_split_flag is a first value (e.g., "1"), the current CU can be split into a quadtree. Also, if qt_split_flag is a second value (e.g., "0"), the current CU is not split into a quadtree and becomes a leaf node (QT_leaf_node) of the quadtree. The leaf nodes of each quadtree can then be further split into a multitype tree structure. That is, the leaf node of the quadtree can become a node (MTT_node) of the multitype tree. In a multi-type tree structure, a first flag (e.g., mtt_split_cu_flag) may be signaled to indicate whether the current node is further split. If the node is further split (e.g., the first flag is 1), a second flag (e.g., mtt_split_cu_vertical_flag) may be signaled to indicate the splitting direction. For example, if the second flag is 1, the splitting direction may be vertical, and if the second flag is 0, the splitting direction may be horizontal. Then, a third flag (e.g., mtt_split_cu_binary_flag) may be signaled to indicate whether the splitting type is a binary splitting type or a ternary splitting type. For example, if the third flag is 1, the splitting type may be a binary splitting type, and if the third flag is 0, the splitting type may be a ternary splitting type. The nodes of the multitype tree obtained by binary or ternary partitioning can be further partitioned into a multitype tree structure, but the nodes of the multitype tree cannot be partitioned into a quadtree structure.If the first flag is 0, the corresponding node of the multitype tree is not further divided and becomes a leaf node (MTT_leaf_node) of the multitype tree. The CU corresponding to the leaf node of the multitype tree can be used as the final coding unit described above.

[0093] Based on the above mtt_split_cu_vertical_flag and mtt_split_cu_binary_flag, a multi-type tree splitting mode (MttSplitMode) of a CU can be derived as shown in Table 1. In the following description, the multi-type tree splitting mode can be abbreviated as a multi-tree splitting type or a splitting type.

[0094] [Table 1]

[0095] FIG. 7 illustrates an example in which a CTU is divided into multiple CUs by applying a multi-type tree after applying a quadtree. In FIG. 7, a bold block edge 710 indicates a quadtree division, and the remaining edges 720 indicate a multi-type tree division. A CU may correspond to a coding block CB. In one embodiment, a CU may include a coding block of luma samples and two coding blocks of chroma samples corresponding to the luma samples. A chroma component (sample) CB or TB size may be derived based on a luma component (sample) CB or TB size according to a component ratio according to a color format (chroma format, e.g., 4:4:4, 4:2:2, 4:2:0, etc.) of a picture / image. If the color format is 4:4:4, the chroma component CB / TB size may be set to be the same as the luma component CB / TB size. If the color format is 4:2:2, the width of the chroma components CB / TB can be set to half the width of the luma components CB / TB, and the height of the chroma components CB / TB can be set to the height of the luma components CB / TB. If the color format is 4:2:0, the width of the chroma components CB / TB can be set to half the width of the luma components CB / TB, and the height of the chroma components CB / TB can be set to half the height of the luma components CB / TB.

[0096] In one embodiment, when the size of the CTU is 128 based on the luma sample unit, the size of the CU can have a size from 128×128, which is the same size as the CTU, to 4×4. In one embodiment, in the case of a 4:2:0 color format (or chroma format), the chroma CB size can have a size from 64×64 to 2×2.

[0097] Meanwhile, in one embodiment, the CU size and the TU size may be the same, or multiple TUs may exist within a CU region. The TU size may generally refer to a luma component (sample) TB (Transform Block) size.

[0098] The TU size may be derived based on a maximum allowable TB size (maxTbSize) that is a preset value. For example, if the CU size is larger than the maxTbSize, multiple TUs (TBs) having the maxTbSize may be derived from the CU, and transform / inverse transform may be performed in units of the TUs (TBs). For example, the maximum allowable luma TB size may be 64×64, and the maximum allowable chroma TB size may be 32×32. If the width or height of a CB divided by the tree structure is larger than the maximum transform width or height, the CB may be automatically (or implicitly) divided until the horizontal and vertical TB size constraints are satisfied.

[0099] Also, for example, when intra prediction is applied, the intra prediction mode / type may be derived in units of the CU (or CB), and the procedure of deriving neighboring reference samples and generating predicted samples may be performed in units of TU (or TB). In this case, one or more TUs (or TBs) may exist within one CU (or CB) region, and in this case, the multiple TUs (or TBs) may share the same intra prediction mode / type.

[0100] Meanwhile, for a quadtree coding tree scheme with a multi-type tree, the following parameters can be signaled from the encoding device to the decoding device as SPS syntax elements. For example, at least one of CTUsize, a parameter indicating the size of a root node of a quadtree, MinQTSize, a parameter indicating the minimum allowable size of a leaf node of a quadtree, MaxBTSize, a parameter indicating the maximum allowable size of a root node of a binary tree, MaxTTSize, a parameter indicating the maximum allowable size of a root node of a ternary tree, MaxMttDepth, a parameter indicating the maximum allowed hierarchy depth of a multi-type tree split from a leaf node of a quadtree, MinBtSize, a parameter indicating the minimum allowable leaf node size of a binary tree, and MinTtSize, a parameter indicating the minimum allowable leaf node size of a ternary tree, can be signaled.

[0101] In one embodiment using a 4:2:0 chroma format, the CTU size may be set to a 128x128 luma block and two 64x64 chroma blocks corresponding to the luma block. In this case, MinQTSize may be set to 16x16, MaxBtSize may be set to 128x128, MaxTtSzie may be set to 64x64, MinBtSize and MinTtSize may be set to 4x4, and MaxMttDepth may be set to 4. A quadtree split may be applied to the CTU to generate quadtree leaf nodes. The quadtree leaf nodes may be referred to as leaf QT nodes. The quadtree leaf nodes may have a size from 16x16 (e.g., the MinQTSize) to 128x128 (e.g., the CTU size). If the leaf QT node is 128x128, it may not be further split into a binary / ternary tree. This is because even if the partition is performed in this case, it will exceed MaxBtsize and MaxTtszie (e.g., 64×64). In other cases, the leaf QT node may be further partitioned into a multitype tree. Thus, the leaf QT node is a root node for the multitype tree, and the leaf QT node may have a multitype tree depth (mttDepth) value of 0. If the multitype tree depth reaches MaxMttdepth (e.g., 4), no further additional partitioning may be considered. If the width of the multitype tree node is equal to MinBtSize and equal to or less than 2×MinTtSize, no further additional horizontal partitioning may be considered. If the height of the multitype tree node is equal to MinBtSize and equal to or less than 2×MinTtSize, no further additional vertical partitioning may be considered. In this case, if partitioning is not considered, the encoding device may omit signaling of partition information. In such a case, the decoding device may induce the partition information to a predetermined value.

[0102] Meanwhile, one CTU may include a coding block of luma samples (hereinafter referred to as a "luma block") and two coding blocks of corresponding chroma samples (hereinafter referred to as "chroma blocks"). The above coding tree scheme may be applied to the luma blocks and chroma blocks of a current CU in the same manner, or may be applied separately. Specifically, the luma blocks and chroma blocks in one CTU may be divided into the same block tree structure, and the tree structure in this case may be represented as a single tree (SINGLE_TREE). Alternatively, the luma blocks and chroma blocks in one CTU may be divided into separate block tree structures, and the tree structure in this case may be represented as a dual tree (DUAL_TREE). In other words, when a CTU is divided into a dual tree, a block tree structure for the luma blocks and a block tree structure for the chroma blocks may exist separately. In this case, the block tree structure for the luma block may be called a dual tree luma (DUAL_TREE_LUMA), and the block tree structure for the chroma block may be called a dual tree chroma (DUAL_TREE_CHROMA). For P and B slice / tile groups, the luma block and the chroma block in one CTU may be restricted to have the same coding tree structure. However, for I slice / tile groups, the luma block and the chroma block may have separate block tree structures. If the separate block tree structure is applied, the luma coding tree block (CTB) may be divided into CUs based on a specific coding tree structure, and the chroma CTB may be divided into chroma CUs based on another coding tree structure. That is, it may mean that a CU in an I slice / tile group to which a separate block tree structure is applied may be composed of a coding block of a luma component or a coding block of two chroma components, and a CU in a P or B slice / tile group may be composed of blocks of three color components (a luma component and two chroma components).

[0103] Although the quadtree coding tree structure with the multi-type tree has been described above, the structure in which the CU is divided is not limited thereto. For example, the BT structure and the TT structure can be interpreted as concepts included in a multiple partitioning tree (MPT) structure, and the CU can be interpreted as being divided by the QT structure and the MPT structure. In an example in which the CU is divided by the QT structure and the MPT structure, a syntax element (e.g., MPT_split_type) including information on whether the leaf node of the QT structure is divided into several blocks and a syntax element (e.g., MPT_split_mode) including information on which direction the leaf node of the QT structure is divided in, vertically or horizontally, are signaled, so that the division structure can be determined.

[0104] In another example, the CUs may be divided in a manner different from that of the QT structure, the BT structure, or the TT structure, that is, unlike the QT structure in which the CUs of the lower depth are divided into 1 / 4 size of the CUs of the higher depth, or the BT structure in which the CUs of the lower depth are divided into 1 / 2 size of the CUs of the higher depth, or the TT structure in which the CUs of the lower depth are divided into 1 / 4 or 1 / 2 size of the CUs of the higher depth, the CUs of the lower depth may be divided into 1 / 5, 1 / 3, 3 / 8, 3 / 5, 2 / 3, or 5 / 8 size of the CUs of the higher depth, as the case may be, and the manner in which the CUs are divided is not limited thereto.

[0105] In this way, the quadtree coding block structure with the multi-type tree can provide a very flexible block partition structure. Meanwhile, due to the partition types supported by the multi-type tree, different partition patterns can potentially result in the same coding block structure in some cases. The encoding device and the decoding device can reduce the amount of data of partition information by limiting the occurrence of such redundant partition patterns.

[0106] For example, FIG. 8 exemplarily illustrates redundant partitioning patterns that may occur in binary tree partitioning and ternary tree partitioning. As shown in FIG. 8, the continuous binary partitioning 810 and 820 in one direction at the two-step level has the same coding block structure as the binary partitioning for the center partition after ternary partitioning. In such a case, binary tree partitioning for the center blocks 830 and 840 of the ternary tree partitioning can be prohibited. Such prohibition can be applied to the CUs of all pictures. If such a particular partitioning is prohibited, the signaling of the corresponding syntax element can be modified to reflect such a prohibited case, thereby reducing the number of bits signaled for the partitioning. For example, as in the example shown in FIG. 8, if binary tree partitioning for the center block of the CU is prohibited, the mtt_split_cu_binary_flag syntax element indicating whether the partitioning is binary partitioning or ternary partitioning is not signaled, and its value can be induced to 0 by the decoding device.

[0107] Inter Prediction Overview

[0108] Inter prediction according to the present disclosure will be described below.

[0109] The prediction unit of the image encoding device / image decoding device according to the present disclosure may perform inter prediction on a block basis to derive a prediction sample. Inter prediction may indicate a prediction derived in a manner dependent on data elements (e.g., sample values ​​or motion information, etc.) of pictures other than the current picture. When inter prediction is applied to the current block, a predicted block (prediction block or prediction sample array) for the current block may be derived based on a reference block (reference sample array) identified by a motion vector on a reference picture indicated by a reference picture index. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, motion information of the current block may be predicted on a block, sub-block, or sample basis based on correlation between motion information of a neighboring block and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction type (L0 prediction, L1 prediction, Bi prediction, etc.) information. When inter prediction is applied, the neighboring block may include a spatial neighboring block present in the current picture and a temporal neighboring block present in the reference picture. The reference picture including the reference block and the reference picture including the temporal peripheral block may be the same or different. The temporal peripheral block may be called a collocated reference block, a collocated CU (colCU), a col block, etc., and the reference picture including the temporal peripheral block may be called a collocated picture (colPic), a col picture, etc. For example, a motion information candidate list may be constructed based on the peripheral blocks of the current block, and a flag or index information indicating which candidate is selected (used) to derive the motion vector and / or reference picture index of the current block may be signaled.

[0110] Inter prediction may be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the motion information of the current block may be the same as the motion information of the selected neighboring block. In the case of skip mode, unlike the merge mode, a residual signal may not be transmitted. In the case of motion vector prediction (MVP) mode, the motion vector of the selected neighboring block may be used as a motion vector predictor, and a motion vector difference may be signaled. In this case, the motion vector of the current block may be derived using the sum of the motion vector predictor and the motion vector difference. In this disclosure, the MVP mode may be used synonymously with AMVP (Advanced Motion Vector Prediction).

[0111] The motion information may include L0 motion information and / or L1 motion information based on an inter prediction type (such as L0 prediction, L1 prediction, Bi prediction, etc.). A motion vector in the L0 direction may be referred to as an L0 motion vector or MVL0, and a motion vector in the L1 direction may be referred to as an L1 motion vector or MVL1. A prediction based on an L0 motion vector may be referred to as an L0 prediction, a prediction based on an L1 motion vector may be referred to as an L1 prediction, and a prediction based on both 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 a reference picture list L0 (L0), and the L1 motion vector may indicate a motion vector associated with a reference picture list L1 (L1). The reference picture list L0 may include pictures earlier in output order than the current picture as reference pictures, and the reference picture list L1 may include pictures later in output order than the current picture. 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 further include a picture subsequent to the current picture in output order as a reference picture. In this case, the previous picture may be indexed first in the reference picture list L0, and the subsequent picture may be indexed next. The reference picture list L1 may further include a picture prior to the current picture in output order as a reference picture. In this case, the subsequent picture may be indexed first in the reference picture list L1, and the previous picture may be indexed next. Here, the output order may correspond to a picture order count (POC) order.

[0112] FIG. 9 is a flow chart illustrating an inter-prediction based video / image coding method.

[0113] FIG. 10 is a diagram illustrating an example configuration of the inter prediction unit 180 according to the present disclosure.

[0114] The encoding method of FIG. 9 may be performed by the image encoding device of FIG. 2. Specifically, step S610 may be performed by the inter prediction unit 180, and step S620 may be performed by the residual processing unit. Specifically, step S620 may be performed by the subtraction unit 115. Step S630 may be performed by the entropy encoding unit 190. The prediction information of step S630 may be derived by the inter prediction unit 180, and the residual information of step S630 may be derived by the residual processing unit. The residual information is information on the residual sample. The residual information may include information on quantized transform coefficients for the residual sample. As described above, the residual sample may be derived as a transform coefficient via the transform unit 120 of the image encoding device, and the transform coefficient may be derived as a quantized transform coefficient via the quantization unit 130. The information on the quantized transform coefficient may be coded in the entropy encoding unit 190 through a residual coding procedure.

[0115] The image encoding apparatus may perform inter prediction on a current block (S610). The image encoding apparatus may derive an inter prediction mode and motion information of a current block, and generate a prediction sample of the current block. Here, the inter prediction mode determination, motion information derivation, and prediction sample generation procedures may be performed simultaneously, or any one procedure may be performed prior to the other procedures. For example, as shown in FIG. 10, an inter prediction unit 180 of the image encoding apparatus 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 a prediction mode for the current block, the motion information derivation unit 182 may derive motion information of the current block, and the prediction sample derivation unit 183 may derive a prediction sample of the current block. For example, the inter prediction unit 180 of the image encoding apparatus may search for a block similar to the current block within a certain area (search area) of a reference picture through motion estimation, and derive a reference block whose difference with the current block is minimum or equal to or less than a certain criterion. Based on this, a reference picture index indicating a reference picture in which the reference block is located may be derived, and a motion vector may be derived based on a position difference between the reference block and the current block. The image encoding apparatus may determine a mode to be applied to the current block from among various prediction modes. The image encoding apparatus may compare rate-distortion (RD) costs for the various prediction modes and determine an optimal prediction mode for the current block. However, the method in which the image encoding apparatus determines a prediction mode for the current block is not limited to the above example, and various methods may be used.

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

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

[0118] The image encoding apparatus may derive a residual sample based on the predicted sample (S620). The image encoding apparatus may derive the residual sample by comparing an original sample of the current block with the predicted sample. For example, the residual sample may be derived by subtracting a corresponding predicted sample from an original sample.

[0119] The image encoding apparatus may encode image information including prediction information and residual information (S630). The image encoding apparatus may output the encoded image information in a bitstream format. The prediction information may include prediction mode information (e.g., a skip flag, a merge flag, or a mode index) and information on motion information, which are information related to the prediction procedure. The skip flag of the prediction mode information is information indicating whether a skip mode is applied to the current block, and the merge flag is information indicating whether a merge mode is applied to the current block. Alternatively, the prediction mode information may be information indicating one of a plurality of prediction modes, such as a mode index. If the skip flag and the merge flag are each 0, it may be determined that the MVP mode is applied to the current block. The information on the motion information may include candidate selection information (e.g., a merge index, an MVP flag, or an MVP index) which is information for deriving a motion vector. The merge index of the candidate selection information may be signaled when a merge mode is applied to the current block, and may be information for selecting one of merge candidates included in a merge candidate list. Among the candidate selection information, the MVP flag or the 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 on the motion information may include the above-mentioned information on the MVD and / or reference picture index information. In addition, the information on the motion information may include information indicating whether L0 prediction, L1 prediction, or Bi-prediction is applied. The residual information is information on the residual sample. The residual information may include information on a quantized transform coefficient for the residual sample.

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

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

[0122] FIG. 11 is a flow chart illustrating an inter-prediction based video / image decoding method.

[0123] FIG. 12 is a diagram illustrating an example configuration of the inter prediction unit 260 according to the present disclosure.

[0124] The image decoding apparatus may perform operations corresponding to those performed by the image encoding apparatus, and may perform prediction for a current block based on received prediction information to derive predicted samples.

[0125] The decoding method of FIG. 11 may be performed by the image decoding apparatus of FIG. 3. Steps S810 to S830 may be performed by the inter prediction unit 260, and the prediction information of step S810 and the residual information of step S840 may be obtained from a bitstream by the entropy decoding unit 210. The residual processing unit of the image decoding apparatus may derive a residual sample for a current block based on the residual information (S840). Specifically, the inverse quantization unit 220 of the residual processing unit may derive a transform coefficient by performing inverse quantization based on the quantized transform coefficient derived based on the residual information, and the inverse transform unit 230 of the residual processing unit may derive a residual sample for the current block by performing inverse transform on the transform coefficient. Step S850 may be performed by the adder 235 or a reconstruction unit.

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

[0127] For example, it may be determined whether the skip mode is applied to the current block based on the skip flag. Also, it may be determined whether the merge mode or the MVP mode is applied to the current block based on the merge flag. Or, it may select one of various inter prediction mode candidates based on the mode index. The inter prediction mode candidates may include skip mode, merge mode, and / or MVP mode, or may include various inter prediction modes described below.

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

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

[0130] The image decoding apparatus may generate a prediction sample for the current block based on the motion information of the current block (S830). In this case, the reference picture may be derived based on a reference picture index of the current block, and the prediction sample of the current block may be derived using a sample of a reference block to which the motion vector of the current block points on the reference picture. Depending on the case, a prediction sample filtering procedure may be further performed on all or some of the prediction samples of the current block.

[0131] For example, as shown in FIG 12, the inter prediction unit 260 of the image decoding apparatus may include a prediction mode determination unit 261, a motion information derivation unit 262, and a prediction sample derivation unit 263. The inter prediction unit 260 of the image decoding apparatus may determine a prediction mode for the current block based on prediction mode information received from the prediction mode determination unit 261, derive motion information (such as a motion vector and / or a reference picture index) of the current block based on information on the motion information received from the motion information derivation unit 262, and derive a prediction sample of the current block in the prediction sample derivation unit 263.

[0132] The image decoding apparatus may generate a residual sample for the current block based on the received residual information (S840). The image decoding apparatus may generate a reconstructed sample for the current block based on the predicted sample and the residual sample, and generate a reconstructed picture based on the reconstructed sample (S850). Thereafter, an in-loop filter procedure or the like may be further applied to the reconstructed picture, as described above.

[0133] As described above, the inter prediction procedure may include an inter prediction mode determination step, a motion information derivation step according to the determined prediction mode, and a prediction execution step (generation of a prediction sample) based on the derived motion information. The inter prediction procedure may be performed in an image encoding device and an image decoding device as described above.

[0134] The motion information derivation step according to the prediction mode will be described in more detail below.

[0135] As described above, inter prediction may be performed using motion information of a current block. The image coding apparatus may derive optimal motion information for a current block through a motion estimation procedure. For example, the image coding apparatus may search for a similar reference block with high correlation using an original block in an original picture for the current block in a fractional pixel unit within a determined search range in the reference picture, thereby deriving motion information. The similarity of the blocks may be calculated based on a sum of absolute differences (SAD) between the current block and the reference block. In this case, the motion information may be derived based on a reference block with the smallest SAD in the search range. The derived motion information may be signaled to the image decoding apparatus by various methods based on the inter prediction mode.

[0136] When a merge mode is applied to a current block, the motion information of the current block is not directly transmitted, but is derived using the motion information of the neighboring blocks. Thus, the motion information of the current prediction block can be indicated by transmitting 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 this disclosure, since the current block is a unit of prediction execution, the current block can be used in the same sense as the current prediction block, and the neighboring block can be used in the same sense as the neighboring prediction block.

[0137] The image encoding apparatus may search for a merge candidate block used to derive motion information of a current block to perform a merge mode. For example, but not limited to, up to 5 merge candidate blocks may be used. The maximum number of merge candidate blocks may be transmitted from a slice header or a tile group header, but is not limited to this. After finding the merge candidate blocks, the image encoding apparatus may generate a merge candidate list, and may select a merge candidate block having the smallest RD cost as a final merge candidate block.

[0138] The present disclosure provides various embodiments for the merge candidate blocks constituting the 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.

[0139] FIG. 13 is a diagram illustrating neighboring blocks that can be used as spatial merging candidates.

[0140] FIG. 14 is a diagram illustrating a method for constructing a merge candidate list according to an example of the present disclosure.

[0141] The image encoding device / image decoding device may insert the spatial merge candidates derived by searching the spatial peripheral blocks of the current block into the merge candidate list (S1110). For example, the spatial peripheral blocks may include a lower left corner peripheral block A0, a left side peripheral block A1, a top right corner peripheral block B0, a top side peripheral block B1, and a top left corner peripheral block B2 of the current block as shown in FIG. 13. However, this is merely an example, and additional peripheral blocks such as a right side peripheral block, a bottom peripheral block, and a bottom right peripheral block may be used as the spatial peripheral blocks in addition to the spatial peripheral blocks described above. The image encoding device / image decoding device may search the spatial peripheral blocks based on a priority order to detect available blocks and derive motion information of the detected blocks as the spatial merge candidates. For example, the image encoding device / image decoding device may search the five blocks shown in FIG. 13 in the order of A1, B1, B0, A0, and B2, and sequentially index available candidates to construct a merge candidate list.

[0142] The image coding apparatus / image decoding apparatus may insert a derived temporal merge candidate into the merge candidate list by searching for a temporal peripheral block of the current block (S1120). The temporal peripheral block may be located on a reference picture that is a different picture from the current picture in which the current block is located. The reference picture in which the temporal peripheral block is located may be called a collocated picture or a col picture. The temporal peripheral block may be searched for in the order of a lower right corner peripheral block and a lower right center block of a colocated block with respect to the current block on the col picture. Meanwhile, when motion data compression is applied to reduce memory load, specific motion information may be stored as representative motion information for each certain storage unit for the col picture. In this case, it is not necessary to store motion information for all blocks in the certain storage unit, and thus a motion data compression effect can be obtained. In this case, the certain storage unit may be predetermined, for example, in units of 16×16 samples or 8×8 samples, or size information for the certain storage unit may be signaled from the image coding apparatus to the image decoding apparatus. When the motion data compression is applied, the motion information of the temporal peripheral block can be replaced with the representative motion information of the certain storage unit in which the temporal peripheral block is located. In other words, in this case, from the viewpoint of implementation, the temporal merge candidate can be derived based on the motion information of the prediction block that covers the position arithmetically shifted left after arithmetically shifting a certain value based on the coordinate (upper left sample position) of the temporal peripheral block, rather than the prediction block located at the coordinate of the temporal peripheral block. For example, if the certain storage unit is 2 n ×2 nWhen it is in sample units, if the coordinates of the temporal neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the corrected position ((xTnb>>n)<<n), (yTnb>>n)<<n)) can be used for the temporal merge candidate. Specifically, for example, when the fixed storage unit is 16×16 sample units, if the coordinates of the temporal neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the corrected position ((xTnb>>4)<<4), (yTnb>>4)<<4)) can be used for the temporal merge candidate. Or, for example, when the fixed storage unit is 8×8 sample units, if the coordinates of the temporal neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the corrected position ((xTnb>>3)<<3), (yTnb>>3)<<3)) can be used for the temporal merge candidate.

[0143] Referring to FIG. 14 again, the image encoding device / image decoding device can check whether the number of current merge candidates is smaller than the number of maximum merge candidates (S1130). The number of the maximum merge candidates can be predefined or signaled from the image encoding device to the image decoding device. For example, the image encoding device can generate information regarding the number of the maximum merge candidates, encode it, and transmit it to the image decoding device in the form of a bit stream. When all of the number of the maximum merge candidates are satisfied, the subsequent candidate addition process (S1140) can be not performed.

[0144] If, as a result of the check in step S1130, the number of the current merge candidates is smaller than the number of the maximum merge candidates, the image encoding device / image decoding device can induce additional merge candidates based on a predetermined method and then insert them into the merge candidate list (S1140).

[0145] As a result of the check in step S1130, if the number of the current merging candidates is not smaller than the maximum number of merging candidates, the image encoding device / image decoding device may end construction of the merging candidate list. In this case, the image encoding device may select an optimal merging candidate from among the merging candidates constituting the merging candidate list based on an RD cost, and may signal candidate selection information (e.g., a merge index) indicating the selected merging candidate to the image decoding device. The image decoding device may select the optimal merging candidate based on the merging candidate list and the candidate selection information.

[0146] As described above, the motion information of the selected merging candidate may be used as the motion information of the current block, and a predicted sample of the current block may be derived based on the motion information of the current block. The image encoding apparatus may derive a residual sample of the current block based on the predicted sample, and may signal residual information regarding the residual sample to an image decoding apparatus. As described above, the image decoding apparatus may generate a reconstructed sample based on the residual sample derived based on the residual information and the predicted sample, and generate a reconstructed picture based on the reconstructed sample.

[0147] When a skip mode is applied to a current block, motion information of the current block can be derived in the same manner as when a merge mode is applied to the previous block, except that when the skip mode is applied, the residual signal for the current block is omitted, and thus the predicted samples can be used immediately as reconstructed samples.

[0148] When the MVP mode is applied to the current block, a motion vector predictor (mvp) candidate list can be generated using the motion vector of the restored spatial surrounding block (e.g., the surrounding block shown in FIG. 13) and / or the motion vector corresponding to the temporal surrounding block (or Col block). That is, the motion vector of the restored spatial surrounding block and / or the motion vector corresponding to the temporal surrounding block can be used as a motion vector predictor candidate of the current block. When bi-prediction is applied, an mvp candidate list for deriving L0 motion information and an mvp candidate list for deriving L1 motion information can be generated and used separately. Prediction information (or prediction information) for the current block can include candidate selection information (e.g., an MVP flag or an MVP index) indicating an optimal motion vector predictor candidate selected from the motion vector predictor candidates included in the mvp candidate list. In this case, the prediction unit can select a motion vector predictor of the current block from the motion vector predictor candidates included in the mvp candidate list using the candidate selection information. The prediction unit of the image encoding device may obtain a motion vector difference (MVD) between a motion vector of a current block and a motion vector predictor, and may encode the obtained motion vector difference and output the motion vector difference in a bitstream format. That is, the MVD may be obtained by subtracting the motion vector predictor from the motion vector of the current block. The prediction unit of the image decoding device may obtain a motion vector difference included in information related to 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 decoding device may obtain or induce a reference picture index indicating a reference picture, etc., from information related to the prediction.

[0149] FIG. 15 is a diagram illustrating a motion vector predictor candidate list construction method according to an example of the present disclosure.

[0150] First, the spatial candidate blocks of the current block are searched for, and available candidate blocks can be inserted into the MVP candidate list (S1210). Then, it is determined whether the MVP candidate list contains less than two MVP candidates (S1220). If there are two, the construction of the MVP candidate list can be completed.

[0151] In step S1220, if there are less than two spatial candidate blocks available, the temporal candidate blocks of the current block may be searched and the available candidate blocks may be inserted into the MVP candidate list (S1230). If no temporal candidate blocks are available, the construction of the MVP candidate list may be completed by inserting a zero motion vector into the MVP candidate list (S1240).

[0152] On the other hand, when the MVP mode is applied, the reference picture index may be explicitly signaled. In this case, a picture index (refidxL0) for L0 prediction and a reference picture index (refidxL1) for L1 prediction may be signaled separately. For example, when the MVP mode is applied and bi-prediction (BI prediction) is applied, information on refidxL0 and information on refidxL1 may both be signaled.

[0153] As described above, when the MVP mode is applied, information on the MVD derived from the image coding apparatus may be signaled to the image decoding apparatus. The information on the MVD may include, for example, information indicating x, y components for the MVD absolute value and the sign. In this case, information indicating whether the MVD absolute value is greater than 0 and greater than 1, and the rest of the MVD may be signaled stepwise. For example, information indicating whether the MVD absolute value is greater than 1 may be signaled only when the value of flag information indicating whether the MVD absolute value is greater than 0 is 1.

[0154] FIG. 16 is a diagram showing 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.

[0155] In FIG. 16, abs_mvd_greater0_flag[0] indicates whether the absolute value of the x component of MVD is greater than 0, and abs_mvd_greater0_flag[1] indicates whether the absolute value of the y component of MVD is greater than 0. Similarly, abs_mvd_greater1_flag[0] indicates whether the absolute value of the x component of MVD is greater than 1, and abs_mvd_greater1_flag[1] indicates whether the absolute value of the y component of MVD is greater than 1. As shown in FIG. 16, abs_mvd_greater1_flag can be transmitted only when abs_mvd_greater0_flag is 1. In FIG. 16, abs_mvd_minus2 indicates a value obtained by subtracting 2 from the absolute value of MVD, and mvd_sign_flag indicates whether the sign of MVD is positive or negative. Using the syntax structure shown in FIG. 16, the MVD can be derived as follows:

[0156] [Number 1]

[0157] MVD[compIdx]=abs_mvd_greater0_flag[compIdx]*abs_mvd_minus2[compIdx]+2*1-2*mvd_sign_flag[compIdx]

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

[0159] Overview of IBC (Intra Block Copy) prediction

[0160] The IBC forecast according to this disclosure will be described below.

[0161] IBC prediction may be performed in a prediction unit of an image encoding device / image decoding device. IBC prediction may be simply referred to as "IBC". The IBC may be used for content image / video coding such as games, such as screen content coding (SCC). The IBC may be performed similarly to inter prediction in that it basically performs prediction within a current picture, but derives a reference block within the current picture. That is, the IBC may use at least one of the inter prediction techniques described in this disclosure. For example, the IBC may use at least one of the above-mentioned motion information (motion vector) derivation methods. At least one of the inter prediction techniques may be partially modified in consideration of the IBC prediction. The IBC may refer to a current picture. Thus, it may be referred to as current picture referencing (CPR).

[0162] For IBC, the image coding apparatus may derive an optimal block vector (or motion vector) for a current block (e.g., CU) by performing block matching BM. The derived block vector (or motion vector) may be signaled to the image decoding apparatus via a bitstream using a method similar to the motion information (motion vector) signaling in the above-mentioned inter prediction. The image decoding apparatus may derive a reference block for the current block in the current picture via the signaled block vector (motion vector), and may thereby derive a prediction signal (predicted block or prediction sample) for the current block. Herein, the block vector (or motion vector) may indicate a displacement from the current block to a reference block located in an already restored area in the current picture. Thus, the block vector (or motion vector) may also be referred to as a displacement vector. Hereinafter, the motion vector in IBC may correspond to the block vector or the displacement vector. The motion vector of the current block may include a motion vector for a luma component (luma motion vector) or a motion vector for a chroma component (chroma motion vector). For example, the luma motion vector for an IBC coded CU may also be in integer sample units (i.e., integer precision). The chroma motion vector may also be clipped in integer sample units. As described above, IBC may use at least one of the inter prediction techniques, for example, the luma motion vector may be encoded / decoded using the merge mode or MVP mode described above.

[0163] When a merge mode is applied to a luma IBC block, a merge candidate list for the luma IBC block may be configured similarly to the merge candidate list in the inter mode described with reference to Figure 14. However, in the case of a luma IBC block, the temporal surrounding blocks may not be used as merge candidates.

[0164] When the MVP mode is applied to a luma IBC block, the MVP candidate list for the luma IBC block may be configured similarly to the MVP candidate list in the inter mode described with reference to Figure 15. However, in the case of a luma IBC block, a temporal candidate block may not be used as an MVP candidate.

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

[0166] An image coding device implementing IBC can search the already defined region to determine the reference block with the smallest RD cost, and derive a motion vector (block vector) based on the positions of the reference block and the current block.

[0167] Whether or not IBC is applied to the current block may be signaled as IBC execution information at the CU level. Information regarding a signaling method (IBC MVP mode or IBC skip / merge mode) of the motion vector of the current block may be signaled. The IBC execution information may be used to determine the prediction mode of the current block. Thus, the IBC execution information may be included in information regarding the prediction mode of the current block.

[0168] In the case of IBC skip / merge mode, a merge candidate index may be signaled and used to indicate a block vector used to predict the current luma block among block vectors included in the merge candidate list. In this case, the merge candidate list may include neighboring blocks coded using IBC. The merge candidate list may be configured to include spatial merge candidates and not include temporal merge candidates. The merge candidate list may further include History-based Motion Vector Predictor (HMVP) candidates and / or pairwise candidates.

[0169] In the case of the IBC MVP mode, the block vector difference value may be coded in the same manner as the motion vector difference value in the inter mode. As in the MVP mode of the inter mode, the block vector prediction method may be used by forming an MVP candidate list including two candidates as predictors. One of the two candidates may be derived from the left peripheral block, and the other may be derived from the upper peripheral block. In this case, only if the left or upper peripheral block is coded in IBC, a candidate may be derived from the peripheral block. If the left or upper peripheral block is not available, for example, if it is not coded in IBC, a default block vector may be included in the MVP candidate list as a predictor. Also, information (e.g., a flag) for indicating one of the two block vector predictors is signaled and used as candidate selection information, similar to the MVP mode of the inter mode. The MVP candidate list may include an HMVP candidate and / or a zero motion vector as a default block vector.

[0170] The HMVP candidates may also be called history-based MVP candidates, and MVP candidates, merge candidates, or block vector candidates previously used in encoding / decoding of the current block may be stored in the HMVP list as HMVP candidates. Thereafter, if the merge candidate list or MVP candidate list of the current block does not include the maximum number of candidates, the candidates stored in the HMVP list may be added to the merge candidate list or MVP candidate list of the current block as HMVP candidates.

[0171] The pairwise candidate refers to a candidate derived by selecting two candidates according to a predetermined order from among the candidates already included in the merge candidate list of the current block, and averaging the two selected candidates.

[0172] FIG. 17 is a flow chart illustrating an IBC-based video / image encoding method.

[0173] FIG. 18 is a diagram illustrating an example of a configuration of a prediction unit that performs the IBC-based video / image encoding method according to the present disclosure.

[0174] The encoding method of FIG. 17 may be performed by the image encoding device of FIG. 2. Specifically, step S1410 may be performed by a prediction unit, and step S1420 may be performed by a residual processing unit. Specifically, step S1420 may be performed by a subtraction unit 115. Step S1430 may be performed by an entropy encoding unit 190. The prediction information of step S1430 may be derived by a prediction unit, and the residual information of step S1430 may be derived by a residual processing unit. The residual information is information about the residual sample. The residual information may include information about quantized transform coefficients for the residual sample. As described above, the residual sample may be derived as a transform coefficient via a transform unit 120 of the image encoding device, and the transform coefficient may be derived as a quantized transform coefficient via a quantization unit 130. Information about the quantized transform coefficient may be coded in the entropy encoding unit 190 through a residual coding procedure.

[0175] The image encoding apparatus may perform IBC prediction (prediction based on IBC) for a current block (S1410). The image encoding apparatus may derive a prediction mode and a motion vector (block vector) for the current block, and generate a prediction sample for the current block. The prediction mode may include at least one of the above-mentioned inter prediction modes. Here, the prediction mode determination, motion vector derivation, and prediction sample generation procedures may be performed simultaneously, or any one of the procedures may be performed first. For example, as shown in FIG. 18, a prediction unit of an image encoding apparatus performing a video / image encoding method based on IBC may include a prediction mode determination unit, a motion vector derivation unit, and a prediction sample derivation unit. A prediction mode determination unit may determine a prediction mode for the current block, a motion vector derivation unit may derive a motion vector for the current block, and a prediction sample derivation unit may derive a prediction sample for the current block. For example, a prediction unit of an image encoding device may search for a block similar to the current block within a reconstructed area (or a certain area (search area) of the reconstructed area) of a current picture, and derive a reference block whose difference from the current block is minimum or equal to or less than a certain criterion. The image encoding device may derive a motion vector based on a displacement difference between the reference block and the current block. The image encoding device may determine a mode to be applied to the current block from among various prediction modes. The image encoding device may compare rate distortion costs (RD costs) for the various prediction modes and determine an optimal prediction mode for the current block. However, the method in which the image encoding device determines a prediction mode for the current block is not limited to the above example, and various methods may be used.

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

[0177] As another example, when the MVP mode is applied to the current block, the image encoding apparatus may derive motion vector predictor (MVP) candidates from neighboring blocks of the current block, and may construct an MVP candidate list using the induced MVP candidates. The image encoding apparatus may use a motion vector of an 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, a motion vector indicating a reference block derived by the above-mentioned motion estimation may be used as the motion vector of the current block, and an MVP candidate having a motion vector with the smallest difference from the motion vector of the current block among the MVP candidates may become the selected MVP candidate. A motion vector difference (MVD), which is a difference obtained by subtracting the MVP from the motion vector of the current block, may be derived. In this case, index information indicating the selected MVP candidate and information regarding the MVD may be signaled to the image decoding apparatus.

[0178] The image encoding apparatus may derive a residual sample based on the predicted sample (S1420). The image encoding apparatus may derive the residual sample by comparing an original sample of the current block with the predicted sample. For example, the residual sample may be derived by subtracting a corresponding predicted sample from an original sample.

[0179] The image encoding apparatus may encode image information including prediction information and residual information (S1430). The image encoding apparatus may output the encoded image information in a bitstream format. The prediction information may include prediction mode information (e.g., a skip flag, a merge flag, or a mode index) and information on a motion vector as information related to the prediction procedure. The skip flag of the prediction mode information is information indicating whether a skip mode is applied to a current block, and the merge flag is information indicating whether a merge mode is applied to a current block. Alternatively, the prediction mode information may be information indicating one of a plurality of prediction modes, such as a mode index. If the skip flag and the merge flag are each 0, it may be determined that an MVP mode is applied to the current block. The information on the motion vector may include candidate selection information (e.g., a merge index, an MVP flag, or an MVP index) that is information for deriving a motion vector. The merge index of the candidate selection information may be signaled when a merge mode is applied to the current block, and may be information for selecting one of merge candidates included in a merge candidate list. The MVP flag or MVP index of the candidate selection information may be signaled when an MVP mode is applied to a current block, and may be information for selecting one of the MVP candidates included in an MVP candidate list. The information about the motion vector may include information about the above-mentioned MVD. 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 quantized transform coefficients for the residual sample.

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

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

[0182] FIG. 19 is a flow chart illustrating an IBC-based video / image decoding method.

[0183] FIG. 20 is a diagram illustrating an example configuration of a prediction unit that executes the IBC-based video / image decoding method according to the present disclosure.

[0184] The image decoding apparatus may perform operations corresponding to those performed by the image encoding apparatus, and may perform IBC prediction on the current block based on the received prediction information to derive a prediction sample.

[0185] The decoding method of FIG. 19 may be performed by the image decoding apparatus of FIG. 3. Steps S1610 to S1630 may be performed by a prediction unit, and prediction information of step S1610 and residual information of step S1640 may be acquired from a bitstream by an entropy decoding unit 210. The residual processing unit of the image decoding apparatus may derive a residual sample for a current block based on the residual information (S1640). Specifically, the inverse quantization unit 220 of the residual processing unit may derive a transform coefficient by performing inverse quantization based on a quantized transform coefficient derived based on the residual information, and the inverse transform unit 230 of the residual processing unit may derive a residual sample for the current block by performing inverse transform on the transform coefficient. Step S1650 may be performed by an adder 235 or a reconstruction unit.

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

[0187] For example, it may be determined whether the skip mode is applied to the current block based on the skip flag. Also, it may be determined whether the merge mode or the MVP mode is applied to the current block based on the merge flag. Or, it may select one of various prediction mode candidates based on the mode index. The prediction mode candidates may include skip mode, merge mode, and / or MVP mode, or may include the various inter prediction modes described above.

[0188] The image decoding apparatus may derive a motion vector of the current block based on the determined prediction mode (S1620). For example, when a skip mode or a merge mode is applied to the current block, the image decoding apparatus may form the above-mentioned merge candidate list 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). A 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.

[0189] As another example, when the MVP mode is applied to the current block, the image decoding apparatus may construct an MVP candidate list and use a motion vector of an 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 information on the MVD, and the motion vector of the current block may be derived based on the MVP of the current block and the MVD.

[0190] The image decoding apparatus may generate prediction samples for the current block based on the motion vector of the current block (S1630). The prediction samples of the current block may be derived using samples of a reference block to which the motion vector of the current block points on the current picture. Depending on the circumstances, a prediction sample filtering procedure may be further performed on all or some of the prediction samples of the current block.

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

[0192] The image decoding apparatus may generate a residual sample for the current block based on the received residual information (S1640). The image decoding apparatus may generate a reconstructed sample for the current block based on the predicted sample and the residual sample, and generate a reconstructed picture based on the reconstructed sample (S1650). Then, an in-loop filtering procedure or the like may be further applied to the reconstructed picture, as described above.

[0193] As described above, one unit (e.g., a coding unit CU) may include a luma block (luma CB) and a chroma block (chroma CB). In this case, the luma block and the corresponding chroma block may have the same motion information (e.g., motion vector) or different motion information. As an 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 corresponding chroma block may have the same motion information.

[0194] Chroma Format Overview

[0195] The following describes the chroma format. An image can be encoded with encoding data including a luma component (e.g., Y) array and two chroma component (e.g., Cb, Cr) arrays. For example, one pixel of the encoded image can include a luma sample and a chroma sample. A chroma format can be used to indicate a configuration format of a luma sample and a chroma sample, and the chroma format can also be called a color format.

[0196] In one embodiment, the image can be encoded in various chroma formats such as monochrome, 4:2:0, 4:2:2, 4:4:4, etc. In monochrome sampling, there can be one sample array, which can be a luma array. In 4:2:0 sampling, there can be one luma sample array and two chroma sample arrays, each of which can be half the height and half the width of the luma array. In 4:2:2 sampling, there can be one luma sample array and two chroma sample arrays, each of which can be the same height and half the width of the luma array. In 4:4:4 sampling, there can be one luma sample array and two chroma sample arrays, each of which can be the same height and width as the luma array.

[0197] For example, in the case of 4:2:0 sampling, a chroma sample may be located at the bottom of a corresponding luma sample, in the case of 4:2:2 sampling, a chroma sample may be located overlapping the position of a corresponding luma sample, and in the case of 4:4:4 sampling, both the luma sample and the chroma sample may be located overlapping.

[0198] The chroma format used in the encoding device and the decoding device may be predetermined. Alternatively, the chroma format may be signaled from the encoding device to the decoding device for adaptive use in the encoding device and the decoding device. In one embodiment, the chroma format may be signaled based on at least one of chroma_format_idc and separate_colour_plane_flag. At least one of chroma_format_idc and separate_colour_plane_flag may be signaled via a higher level syntax such as DPS, VPS, SPS or PPS. For example, chroma_format_idc and separate_colour_plane_flag may be included in the SPS syntax as shown in FIG. 21.

[0199] Meanwhile, FIG. 22 shows an example of chroma format classification using signaling of chroma_format_idc and separate_colour_plane_flag. chroma_format_idc may be information indicating a chroma format applied to an encoded image. separate_colour_plane_flag may indicate whether a color array is processed separately in a particular chroma format. For example, a first value (e.g., 0) of chroma_format_idc may indicate monochrome sampling. A second value (e.g., 1) of chroma_format_idc may indicate 4:2:0 sampling. A third value (e.g., 2) of chroma_format_idc may indicate 4:2:2 sampling. A fourth value (e.g., 3) of chroma_format_idc may indicate 4:4:4 sampling.

[0200] In 4:4:4 sampling, the following may apply depending on the value of separate_colour_plane_flag: If the value of separate_colour_plane_flag is a first value (e.g., 0), each of the two chroma arrays may have the same height and width as the luma array. In this case, the value of ChromaArrayType, which indicates the type of chroma sample array, may be set to be equal to chroma_format_idc. If the value of separate_colour_plane_flag is a second value (e.g., 1), the luma, Cb, and Cr sample arrays may be processed separately, thereby each being processed like a monochrome sampled picture. In this case, ChromaArrayType may be set to 0.

[0201] Intra prediction for chroma blocks

[0202] When intra prediction is performed on the current block, prediction can be performed on the luma component block (luma block) of the current block and prediction can be performed on the chroma component block (chroma block), in which case the intra prediction mode for the chroma block can be set separately from the intra prediction mode for the luma block.

[0203] For example, an intra-prediction mode for a chroma block may be indicated based on intra-chroma prediction mode information, and the intra-chroma prediction mode information may be signaled in the form of an intra_chroma_pred_mode syntax element. As an example, the intra-chroma prediction mode information may indicate any one of a planar mode, a DC mode, a vertical mode, a horizontal mode, a derived mode (DM), and a cross-component linear model (CCLM) mode. Here, the planar mode may indicate the 0th intra-prediction mode, the DC mode may indicate the 1st intra-prediction mode, the vertical mode may indicate the 26th intra-prediction mode, and the horizontal mode may indicate the 10th intra-prediction mode. DM may also be referred to as a direct mode. CCLM may also be referred to as a linear model (LM).

[0204] Meanwhile, DM and CCLM are dependent intra prediction modes that predict a chroma block using information of a luma block. The DM may indicate a mode in which the same intra prediction mode as the intra prediction mode for the luma component is applied as the intra prediction mode for the chroma component. In addition, the CCLM may indicate an intra prediction mode in which a restored sample of a luma block is subsampled in a process of generating a prediction block for a chroma block, and a sample derived by applying CCLM parameters α and β to the subsampled sample is used as a prediction sample for the chroma block.

[0205]

number

[0206] Here, pred c (i,j) may indicate a predicted sample of the (i,j) coordinate of the current chroma block in the current CU. L'(i,j) may represent a reconstructed sample of the (i,j) coordinate of the current luma block in the CU. For example, L Let '(i,j) denote the down-sampled reconstructed samples of the current luma block. The linear model coefficients α and β can be signaled or derived from neighboring samples.

[0207] Virtual Pipeline Data Unit

[0208] For pipeline processing within a picture, virtual pipeline data units (VPDUs) can be defined. The VPDUs can be defined as non-overlapping units within one picture. In a hardware decoding device, successive VPDUs can be processed simultaneously by multiple pipeline stages. The VPDU size in most pipeline stages can be roughly proportional to the buffer size. Therefore, keeping the VPDU size small is important in considering the buffer size from the hardware perspective. In most hardware decoding devices, the VPDU size can be set to be equal to the maximum transform block (TB) size. For example, the VPDU size can be 64×64 (64×64 luma samples). Also, the VPDU size can be changed (increased or decreased) taking into account the ternary tree (TT) and / or binary tree (BT) partitions mentioned above in VVC.

[0209] On the other hand, in order to maintain the VPDU size at a luma sample size of 64×64, the division of CUs as shown in Fig. 23 may be restricted. More specifically, at least one of the following restrictions may be applied:

[0210] Restriction 1: Ternary tree partitioning (TT) is not allowed for CUs whose width or height is 128 or whose width and height are 128.

[0211] Restriction 2: Horizontal binary tree splitting (BT) is not allowed for CUs of 128×N (where N is an integer less than or equal to 64 and greater than 0) (e.g., horizontal binary tree splitting is not allowed for a CU whose width is 128 and whose height is less than 128).

[0212] Restriction 3: Vertical binary tree splitting (BT) is not allowed for a CU of N×128 (where N is an integer less than or equal to 64 and greater than 0) (e.g., for a CU whose height is 128 and whose width is less than 128, vertical binary tree splitting is not allowed).

[0213] Maximum size limit for chroma blocks for pipeline processing

[0214] As described above regarding the partitioning structure and the transformation process, a CU can be divided to generate multiple TUs. If the size of a CU is larger than the maximum TU size, the CU can be divided into multiple TUs. This allows transformation and / or inverse transformation to be performed on each TU. In general, the maximum TU size for a luma block can be set to the maximum available transform size that the encoding device and / or decoding device can perform. An example of CU and TU division according to an embodiment is shown in Figures 24 to 26.

[0215] 24 illustrates an example of TUs generated by splitting a luma CU and a chroma CU according to an embodiment. In an embodiment, the maximum size of a luma CU may be 64×64, the maximum available transform size may be 32×32, and non-square TUs may not be allowed. Thus, the maximum size of a luma component transform block may be 32×32. In such an embodiment, the maximum TU size may be set according to the following formula:

[0216] [Number 3]

[0217] maxTbSize=(cIdx==0)?MaxTbSizeY:MaxTbSizeY / max(SubWidthC,SubHeightC)

[0218] In the above formula, maxTbSize is the maximum size of a transform block (TB), and cIdx may be a color component of the block. cIdx0 may indicate a luma component, 1 may indicate a Cb chroma component, and 2 may indicate a Cr chroma component. MaxTbSizeY is the maximum size of a luma component transform block, SubWidthC is the ratio of the width of a chroma block to the width of a luma block, SubHeightC is the ratio of the height of a chroma block to the height of a luma block, and max(A,B) is a function that returns the larger value of A and B as a result value.

[0219] According to the above formula, in the above embodiment, in the case of a luma block, the maximum size of the transform block may be set to the maximum size of the luma component transform block, where the maximum size of the luma component transform block is a value that is set during encoding and may be signaled from the encoding device to the decoding device via a bitstream.

[0220] Also, in the above embodiment, the maximum size of the transform block of the chroma block may be set to a value obtained by dividing the maximum size of the luma component transform block by the larger value of SubWidthC and SubHeightC, where SubWidthC and SubHeightC may be determined based on chroma_format_idc and separate_colour_plane_flag signaled from the encoding device to the decoding device via the bitstream as shown in FIG.

[0221] According to the above formula, in the above embodiment, the maximum size of the transform block may be determined to be any one of the minimum width and the minimum height that the transform block can have. Thus, in the above embodiment, the TU division of the luma block and the chroma block may be performed as shown in Fig. 24. For example, as shown in Fig. 24, in the case of a chroma block having a 4:2:2 format, the maximum size of the transform block may be determined to be 16, so that the chroma CU may be divided into a number of transform blocks in a form different from the division form of the luma CU into the transform blocks.

[0222] 25 illustrates an example of TUs generated by dividing luma CUs and chroma CUs according to another embodiment. In one embodiment, the maximum size of a luma CU may be 128×128, the maximum available transform size may be 64×64, and non-square TUs may not be allowed. Thus, the maximum size of a luma component transform block may be 64×64. In such an embodiment, the maximum size of a transform block may be set as shown in the following formula. In the following formula, min(A,B) may be a function that returns the smaller value of A and B.

[0223] [Number 4]

[0224] maxTbSize=(cIdx==0)?MaxTbSizeY:MaxTbSizeY / min(SubWidthC,SubHeightC)

[0225] Meanwhile, according to the above formula, the larger value of the width and height of the block is applied as the maximum size of the transform block, so that the luma CU and the chroma CU can be divided into a plurality of TUs as in the example of FIG.

[0226] In the examples of Figures 24 and 25, when a chroma CU having a 4:2:2 format is divided into TUs, the chroma CU is divided in a form different from the TU division form of the corresponding luma CU. However, when encoding / decoding a chroma block by referring to a luma block as in the above-mentioned DM mode or CCLM mode for predicting a chroma block, it is efficient to process the encoding (or decoding) of the corresponding chroma block immediately after encoding (or decoding) the luma block corresponding to the chroma block in order to reduce delay in pipeline processing and save memory.

[0227] However, in the example of FIG. 24, after the encoding process of one luma transform block 2411, two chroma transform blocks 2421 and 2423 must be encoded, which requires a separate process in relation to other color formats (4:4:4 or 4:2:0). Also, in the example of FIG. 25, after the encoding process of two luma transform blocks 2511 and 2512, one chroma transform block 2521 must be encoded. As described above, when using the 4:2:2 format, the above-mentioned TU division method has a problem that a separate process must be added to perform pipeline processing or pipeline processing cannot be performed because the luma blocks and the corresponding chroma blocks do not match.

[0228] Maximum size limit for chroma transformation blocks for pipeline processing

[0229] Hereinafter, a method for setting the size of the maximum transform block for a chroma CU so that the above-mentioned condition for performing VPDU is achieved will be described.

[0230] 26 illustrates an example of a TU generated by splitting a luma CU and a chroma CU according to another embodiment. In one embodiment, the maximum size of a luma CU may be 128×128, the maximum available transform size may be 64×64, and splitting of a non-square TU may be allowed. Thus, the maximum size of a luma component transform block may be 64×64.

[0231] For division of a non-square TU, the maximum size of a transform block may be defined for each of the width and height, as shown in FIG 26. For example, the maximum size of a transform block may be defined by defining the maximum width (maxTbWidth) of a transform block and the maximum height (maxTbHeight) of a transform block as shown in the following formula.

[0232] [Number 5]

[0233] maxTbWidth=(cIdx==0)?MaxTbSizeY:MaxTbSizeY / SubWidthC

[0234] [Number 6]

[0235] maxTbHeight=(cIdx==0)?MaxTbSizeY:MaxTbSizeY / SubHeightC

[0236] As in the above-described embodiment, by defining the maximum size of a transform block by width and height, even in the case of a chroma CU having a 4:2:2 format, as in the example of Fig. 26, it is possible to divide a chroma CU into TUs in the same manner as the TU division form of the corresponding luma CU. As a result, by dividing the TUs of a chroma CU so as to correspond to the TUs of the luma CU, it is possible to process the encoding (or decoding) of the corresponding chroma block immediately after encoding (or decoding) of the luma block, thereby reducing delay in pipeline processing.

[0237] Maximum size of chroma transform block in IBC and inter prediction modes

[0238] Hereinafter, the execution of an IBC (Intra block copy) prediction mode and an inter prediction mode to which the maximum size limit of a chroma transform block for the above-mentioned chroma pipeline processing is applied will be described. The encoding device and the decoding device can perform IBC prediction and inter prediction by limiting the maximum size of a chroma transform block according to the following description, and the operations of each device can correspond to each other. In addition, the following description of IBC prediction can be directly applied to the inter prediction mode. Accordingly, the IBC prediction operation of the decoding device according to one embodiment will be described below.

[0239] A decoding apparatus according to an embodiment may perform IBC prediction to generate a luma prediction block predSamplesL of size (cbWidth)×(cbHeight) and chroma prediction blocks predSamplesCb and predSamplesCr of size (cbWidth / SubWidthC)×(cbHeight / SubHeightC), where cbWidth may be the width of the current CU and cbHeight may be the height of the current CU.

[0240] Then, the decoding apparatus may generate a luma residual block resSamplesL having a size of (cbWidth)×(cbHeight) and chroma residual blocks resSamplesCr and resSamplesCb having a size of (cbWidth / SubWidthC)×(cbHeight / SubHeightC). Finally, the decoding apparatus may generate a reconstructed block using the prediction block and the residual block.

[0241] Hereinafter, a method for limiting the maximum size of a chroma transform block in order to generate a residual block of a CU encoded in an IBC prediction mode according to an embodiment of the present invention will be described. The decoding device can generate a reconstruction block using the residual block generated in this step.

[0242] In order to generate a residual block of size (nTbW)×(nTbH) for a CU encoded in IBC prediction mode, the decoding device according to an embodiment may directly obtain the following information from the bitstream or derive it from other information obtained from the bitstream, where nTbW and nTbH may be set to the width cbWidth and height cbHeight of the current CU.

[0243] - A sample position (xTb0, yTb0) indicating the position of the top-left sample of the current transform block relative to the position of the top-left sample of the current picture.

[0244] - Parameter nTbW indicating the width of the current transformation block

[0245] - Parameter nTbH indicating the height of the current transformation block

[0246] - Parameter cIdx indicating the color component of the current CU

[0247] From the input information, the decoder can derive the maximum width of a transform block, maxTbWidth, and the maximum height of a transform block, maxTbHeight, as follows:

[0248] [Number 7]

[0249] maxTbWidth=(cIdx==0)?MaxTbSizeY:MaxTbSizeY / SubWidthC

[0250] [Number 8]

[0251] maxTbHeight=(cIdx==0)?MaxTbSizeY:MaxTbSizeY / SubHeightC

[0252] Furthermore, the decoding device can derive the top-left sample position (xTbY, yTbY) of the current transform block based on whether the current CU is a luma component or a chroma component, as follows:

[0253] [Number 9]

[0254] (xTbY,yTbY)=(cIdx==0)?(xTb0,yTb0):(xTb0*SubWidthC,yTb0*SubHeightC)

[0255] As in the above formula, when the current transform block is a chroma block, the maximum width and height of the transform block and the top left sample position of the current transform block can be determined based on the chroma format to reflect the size of the chroma block determined by the chroma format of the current transform block.

[0256] Hereinafter, the decoding apparatus may generate a residual block by performing the following procedure. This will be described with reference to FIG. 27. First, the decoding apparatus may determine whether to divide a current transform block (S2710). For example, the decoding apparatus may determine whether to divide the current transform block based on whether the width and height of the current transform block are greater than the width and height of the largest transform block. For example, if nTbW is greater than maxTbWidth or nTbH is greater than maxTbHeight, the decoding apparatus may determine to divide the current transform block to generate a lower transform block.

[0257] When dividing the current transform block into lower transform blocks, as described above, the decoding device can derive the width newTbW and height newTbH of the lower transform block as shown in the following equation (S2720).

[0258] [Number 10]

[0259] newTbW=(nTbW>maxTbWidth)?(nTbW / 2):nTbW

[0260] [Number 11]

[0261] newTbH=(nTbH>maxTbHeight)?(nTbH / 2):nTbH

[0262] Next, the decoding apparatus may generate a residual block using the lower transform blocks that divide the current transform block (S2730). In one embodiment, as shown in FIG 26, the current transform block may be a transform block having a width and height of a chroma CU in a 4:2:2 format, and the lower transform blocks may be a first lower transform block 2621 to a fourth lower transform block 2624 that divide the current transform block into four non-square blocks.

[0263] First, the decoding apparatus may generate a residual block for the first lower-order transform block. Referring to FIG. 26, the first lower-order transform block 2621 may be specified by a sample position (xTb0, yTb0), a width newTbW of the lower-order transform block, and a height newTbH of the lower-order transform block. The decoding apparatus may generate a residual block of the first lower-order transform block 2621 using a color component cIdx of the current CU. The decoding apparatus may generate a modified reconstructed picture based on the generated residual block. Then, in-loop filtering may be performed on the reconstructed picture.

[0264] Then, if nTbW is greater than maxTbWidth, the decoding device may generate a residual block for the second lower-level transform block. The second lower-level transform block 2622 may be specified at a sample position (xTb0+newTbW, yTb0), a width of the lower-level transform block newTbW, and a height of the lower-level transform block newTbH. The decoding device may generate a residual block of the second lower-level transform block 2622 using the color component cIdx of the current CU. The decoding device may generate a modified reconstructed picture based on the modified reconstructed picture. Then, in-loop filtering may be performed on the reconstructed picture.

[0265] Next, if nTbH is greater than maxTbHeight, the decoding device may generate a residual block for the third lower transform block. The third lower transform block 2623 may be specified at sample position (xTb0, yTb0+newTbH), the width of the lower transform block newTbW, and the height of the lower transform block newTbH. As before, the decoding device may generate a residual block using the color components cIdx of the current CU.

[0266] Next, if nTbW is greater than maxTbWidth and nTbH is greater than maxTbHeight, the decoding device may generate a residual block for the fourth lower transform block. The fourth lower transform block 2624 may be specified at sample position (xTb0+newTbW, yTb0+newTbH), the width of the lower transform block newTbW, and the height of the lower transform block newTbH. As before, the decoding device may generate a residual block using the color component cIdx of the current CU.

[0267] Meanwhile, when the current transform block is not divided, the decoding apparatus may perform IBC prediction as follows. For example, when nTbW is smaller than maxTbWidth and nTbH is smaller than maxTbHeight, the current transform block may not be divided. In this case, the decoding apparatus may generate a residual block for the IBC prediction mode by performing a scaling and transform process using the sample position (xTbY, xTbY), the color component cIdx of the current CU, the transform block width nTbW, and the transform block height nTbH as input. The decoding apparatus may generate a modified reconstructed picture based on this. Thereafter, in-loop filtering may be performed on the reconstructed picture.

[0268] Maximum size of chroma transform block in intra prediction mode

[0269] The following describes the execution of intra prediction mode with the maximum size restriction of the chroma transform block for the above-mentioned chroma pipeline processing. The encoding device and the decoding device can perform intra prediction with the maximum size restriction of the chroma transform block according to the following description, and the operations of each device correspond to each other, so the operation of the decoding device will be described below.

[0270] The decoding device according to an embodiment can generate a reconstructed picture by performing intra prediction. The reconstructed picture can be subjected to in-loop filtering. To perform intra prediction, the decoding device according to an embodiment can obtain the following information directly from the bitstream or can derive it from other information obtained from the bitstream.

[0271] - A sample position (xTb0, yTb0) indicating the position of the top-left sample of the current transform block relative to the position of the top-left sample of the current picture.

[0272] - Parameter nTbW indicating the width of the current transformation block

[0273] - Parameter nTbH indicating the height of the current transformation block

[0274] - Parameter predModeIntra indicating the intra prediction mode of the current CU

[0275] - Parameter cIdx indicating the color component of the current CU

[0276] From the input information, the decoder can derive the maximum width of a transform block, maxTbWidth, and the maximum height of a transform block, maxTbHeight, as follows:

[0277] [Number 12]

[0278] maxTbWidth=(cIdx==0)?MaxTbSizeY:MaxTbSizeY / SubWidthC

[0279] [Number 13]

[0280] maxTbHeight=(cIdx==0)?MaxTbSizeY:MaxTbSizeY / SubHeightC

[0281] Furthermore, the decoding device can derive the top-left sample position (xTbY, yTbY) of the current transform block based on whether the current CU is a luma component or a chroma component, as follows:

[0282] [Number 14]

[0283] (xTbY,yTbY)=(cIdx==0)?(xTb0,yTb0):(xTb0*SubWidthC,yTb0*SubHeightC)

[0284] Hereinafter, the decoding apparatus may perform intra prediction by performing the following procedure. This will be described with reference to FIG. 28. First, the decoding apparatus may determine whether to divide the current transform block (S2810). For example, the decoding apparatus may determine whether to divide the current transform block based on whether the width and height of the current transform block are greater than the width and height of the maximum transform block. In addition, the decoding apparatus may determine whether to divide the current transform block by further considering whether an ISP (Intra Sub-partition) is applied to the current CU. For example, if nTbW is greater than maxTbWidth or nTbH is greater than maxTbHeight, the decoding apparatus may determine to divide the current transform block and perform intra prediction. In addition, the decoding apparatus may determine to divide the current transform block and perform intra prediction only when an ISP is not applied to the current CU (for example, the value of IntraSubpartitionSplitType is NO_ISP_SPLIT, i.e., an ISP is not applied to the current CU) in such a case.

[0285] When dividing the current transform block into lower transform blocks, the decoding apparatus can derive the width newTbW and the height newTbH of the lower transform block according to the following equations (S2820).

[0286] [Number 15]

[0287] newTbW=(nTbW>maxTbWidth)?(nTbW / 2):nTbW

[0288] [Number 16]

[0289] newTbH=(nTbH>maxTbHeight)?(nTbH / 2):nTbH

[0290] This will be described with reference to FIG. 26. In one embodiment, the width nTbW of the current transform block may be the width of a chroma CU, and the height nTbH of the current transform block may be the height of a chroma CU. In this embodiment, the width newTbW of the lower transform block and the height newTbH of the lower transform block may be determined to be the width and height of the transform block 2621 that divides the chroma CU. That is, in this embodiment, the current transform block may be a transform block having the width and height of a chroma CU in a 4:2:2 format, and the lower transform blocks may be the first lower transform block 2621 to the fourth lower transform block 2624 that divide the current transform block into four non-square blocks.

[0291] Next, the decoding apparatus may perform intra prediction using the lower transform block into which the current transform block is divided (S2830). First, the decoding apparatus may perform intra prediction on the first lower transform block. Referring to FIG. 26, the first lower transform block 2621 may be specified by a sample position (xTb0, yTb0), a width newTbW of the lower transform block, and a height newTbH of the lower transform block. The decoding apparatus may perform intra prediction on the first lower transform block 2621 using an intra prediction mode predModeIntra of the current CU and a color component cIdx of the current CU. As a result, a modified reconstructed picture for the first lower transform block 2621 may be generated.

[0292] For example, the decoding device may generate a prediction sample matrix predSamples of size (newTbW)×(newTbH) by performing an intra sample prediction process. For example, the decoding device may perform the intra sample prediction process using the sample position (xTb0, yTb0), the intra prediction mode predModeIntra, the transform block width (nTbW)newTbW, the transform block height (nTbH)newTbH, the coding block width (nCbW)nTbW, the coding block height (nCbH)nTbH, and the value of the parameter cIdx.

[0293] The decoder may also perform a scaling and transformation process to generate a residual sample matrix resSamples of size (newTbW)×(newTbH). For example, the decoder may perform the scaling and transformation process based on the sample position (xTb0, yTb0), the value of the parameter cIdx, the transform block width (nTbW)newTbW, and the transform block height (nTbH)newTbH.

[0294] Also, the decoding device can generate a reconstructed picture by performing a picture reconstruction process for a color component. For example, the decoding device can perform the picture reconstruction process for the color component by setting the transform block position to (xTb0, yTb0), the transform block width (nTbW) to newTbW, the transform block height (nTbH) to newTbH, and using the value of the parameter cIdx and a prediction sample matrix predSamples of size (newTbW)×(newTbH) and a residual sample matrix resSamples of size (newTbW)×(newTbH).

[0295] Next, if nTbW is greater than maxTbWidth, the decoding apparatus may perform intra prediction on the second lower-level transform block. The second lower-level transform block 2622 may be specified by a sample position (xTb0+newTbW, yTb0), a width of the lower-level transform block newTbW, and a height of the lower-level transform block newTbH. The decoding apparatus may perform intra prediction of the second lower-level transform block 2622 using an intra prediction mode predModeIntra of the current CU and a color component cIdx of the current CU. The intra prediction of the second lower-level transform block 2622 may be performed in the same manner as the intra prediction of the first lower-level transform block 2621 for the sample position thereof. As a result, a modified reconstructed picture for the second lower-level transform block 2622 may be generated.

[0296] Next, if nTbH is greater than maxTbHeight, the decoding device may perform intra prediction on the third lower transform block. The third lower transform block 2623 may be specified at sample position (xTb0, yTb0+newTbH), the width of the lower transform block newTbW, and the height of the lower transform block newTbH. As before, the decoding device may perform intra prediction using the intra prediction mode predModeIntra of the current CU and the color component cIdx of the current CU.

[0297] Next, if nTbW is greater than maxTbWidth and nTbH is greater than maxTbHeight, the decoding device may perform intra prediction on the fourth lower-level transform block. The fourth lower-level transform block 2624 may be specified at sample position (xTb0+newTbW, yTb0+newTbH), the width of the lower-level transform block newTbW, and the height of the lower-level transform block newTbH. As before, the decoding device may perform intra prediction using the intra prediction mode predModeIntra of the current CU and the color component cIdx of the current CU.

[0298] Meanwhile, when the current transform block is not split, the decoding device may perform intra prediction as follows: For example, when nTbW is smaller than maxTbWidth and nTbH is smaller than maxTbHeight, or when ISP is applied to the current CU (for example, the value of IntraSubpartitionSplitType is not NO_ISP_SPLIT), the current transform block may not be split.

[0299] First, the decoding device can derive parameters nW, nH, numPartsX, and numPartsY as follows:

[0300] [Number 17]

[0301] nW=IntraSubPartitionsSplitType==ISP_VER_SPLIT?nTbW / NumIntraSubPartitions:nTbW

[0302] nH=IntraSubPartitionsSplitType==ISP_HOR_SPLIT?nTbH / NumIntraSubPartitions:nTbH

[0303] numPartsX=IntraSubPartitionsSplitType==ISP_VER_SPLIT?NumIntraSubPartitions:1

[0304] numPartsY=IntraSubPartitionsSplitType==ISP_HOR_SPLIT?NumIntraSubPartitions:1

[0305] In the above formula, IntraSubPartitionsSplitType indicates the ISP split type of the current CU, ISP_VER_SPLIT indicates vertical ISP split, ISP_HOR_SPLIT indicates horizontal ISP split, and NumIntraSubPartitions indicates the number of ISP sub-partitions.

[0306] Then, the decoding device can generate a prediction sample matrix predSamples of size (nTbW)×(nTbH) by performing an intra sample prediction process. For example, the decoding device can perform the intra sample prediction process using the sample position (xTb0+nW*xPartIdx, yTb0+nH*yPartIdx), the intra prediction mode predModeIntra, the width (nTbW)nW of the transform block, the height (nTbH)nH of the transform block, the width (nCbW)nTbW of the coding block, the height (nCbH)nTbH of the coding block, and the value of the parameter cIdx. Here, the value of the partition index xPartIdx can have a value from 0 to numPartX-1, and the value of yPartIdx can have a value from 0 to numPartsY-1.

[0307] Then, the decoder can perform a scaling and transformation process to generate a residual sample matrix resSamples of size (nTbW)×(nTbH). For example, the decoder can perform the scaling and transformation process based on the sample positions (xTbY+nW*xPartIdx, yTbY+nH*yPartIdx), the value of the parameter cIdx, the width (nTbW)nW of the transform block, and the height (nTbH)nH of the transform block.

[0308] Next, the decoding device can generate a reconstructed picture by performing a picture reconstruction process for the color component. For example, the decoding device can perform the picture reconstruction process for the color component by setting the transform block position to (xTb0+nW*xPartIdx, yTb0+nH*yPartIdx), setting the transform block width (nTbW) to nW, setting the transform block height (nTbH) to nH, using a preset value of cIdx, and using a prediction sample matrix predSamples of size (nTbW)×(nTbH) and a residual sample matrix resSamples of size (nTbW)×(nTbH).

[0309] Encoding method

[0310] Hereinafter, a method for performing encoding by an encoding device according to an embodiment using the above-mentioned method will be described with reference to Fig. 29. The encoding device according to an embodiment includes a memory and at least one processor, and the at least one processor can perform the following encoding method.

[0311] First, the encoding device may divide an image to determine a current block (S2910). Next, the encoding device may perform IBC prediction on the current block to generate a predicted block of the current block (S2920). Next, the encoding device may generate a residual block of the current block based on the predicted block (S2930). Next, the encoding device may encode prediction mode information of the current block (S2940). In this case, the residual block is encoded based on a size of a transform block of the current block, and the size of the transform block may be determined based on a color component of the current block.

[0312] More specifically, if the color components of the current block are chroma components, the size of the transform block may be determined based on a color format, and the width of the transform block may be determined based on a maximum width of the transform block, which may be determined based on a maximum size and a color format of the transform block of a luma block corresponding to the current block.

[0313] In addition, the height of the transform block may be determined based on a maximum height of the transform block, and the maximum height of the transform block may be determined based on a maximum size and color format of the transform block of the luma block corresponding to the current block.

[0314] In addition, if the color format of the current block is a format indicating that the width and height of a chroma block are half the width of a corresponding luma block, the maximum width of the transform block may be determined to be half the maximum width of the transform block of the luma block corresponding to the current block, and the maximum height of the transform block may be determined to be half the maximum height of the transform block of the luma block corresponding to the current block.

[0315] Also, if the current block is a chroma block, the location of the top left sample of the transform block may be determined based on the location and color format of the top left sample of the luma block corresponding to the current block.

[0316] Also, if the current block is a chroma block, when the transform block is divided into a plurality of lower transform blocks, the upper left position of the lower transform block may be determined based on the maximum width of the transform block and the maximum height of the transform block. In this case, the maximum width of the transform block may be determined based on the maximum size and color format of the transform block of the luma block corresponding to the current block, and the maximum height of the transform block may be determined based on the maximum size and color format of the transform block of the luma block corresponding to the current block.

[0317] In addition, if the current block is a chroma block, a plurality of lower transform blocks may be generated by vertically dividing the current block if the width of the transform block is greater than the maximum width of the transform block. The maximum width of the transform block may be determined based on the maximum size and color format of the transform block of the luma block corresponding to the current block. In this case, the plurality of lower transform blocks may include a first lower transform block and a second lower transform block, and the width of the first lower transform block and the width of the second lower transform block may be determined to be the maximum width of the transform block.

[0318] In addition, if the current block is a chroma block and the height of the transform block is greater than the maximum height of the transform block, the current block may be horizontally divided to generate a plurality of lower transform blocks, and the maximum height of the transform blocks may be determined based on the maximum height of the transform blocks of the luma block corresponding to the current block and a color format. In this case, the plurality of lower transform blocks may include a third lower transform block and a fourth lower transform block, and the height of the third lower transform block and the height of the fourth lower transform block may be determined to be the maximum height of the transform blocks.

[0319] Decryption method

[0320] Hereinafter, a method for performing decoding by a decoding device according to an embodiment using the above-mentioned method will be described with reference to Fig. 30. The decoding device according to an embodiment includes a memory and at least one processor, and the at least one processor can perform the following decoding method.

[0321] First, the decoding apparatus may determine a prediction mode of a current block (S3010). Next, if the prediction mode of the current block is an intra block copy (IBC) prediction mode, the decoding apparatus may generate a prediction block for the current block based on IBC prediction mode information (S3020). Next, the decoding apparatus may determine a size of a transform block of the current block based on a color component of the current block (S3030). Next, the decoding apparatus may generate a residual block of the current block based on the size of the transform block (S3040). Then, the decoding apparatus may reconstruct the current block based on the prediction block and the residual block of the current block (S3050).

[0322] More specifically, if the color components of the current block are chroma components, the size of the transform block may be determined based on a color format, and the width of the transform block may be determined based on a maximum width of the transform block, which may be determined based on a maximum size and a color format of the transform block of a luma block corresponding to the current block.

[0323] In addition, the height of the transform block may be determined based on a maximum height of the transform block, and the maximum height of the transform block may be determined based on a maximum size and color format of the transform block of the luma block corresponding to the current block.

[0324] In addition, if the color format of the current block is a format indicating that the width and height of a chroma block are half the width of a corresponding luma block, the maximum width of the transform block may be determined to be half the maximum width of the transform block of the luma block corresponding to the current block, and the maximum height of the transform block may be determined to be half the maximum height of the transform block of the luma block corresponding to the current block.

[0325] Also, if the current block is a chroma block, the location of the top left sample of the transform block may be determined based on the location and color format of the top left sample of the luma block corresponding to the current block.

[0326] Also, if the current block is a chroma block, when the transform block is divided into a plurality of lower transform blocks, the upper left position of the lower transform block may be determined based on the maximum width of the transform block and the maximum height of the transform block. In this case, the maximum width of the transform block may be determined based on the maximum size and color format of the transform block of the luma block corresponding to the current block, and the maximum height of the transform block may be determined based on the maximum size and color format of the transform block of the luma block corresponding to the current block.

[0327] Also, if the current block is a chroma block, and the width of the transform block is greater than the maximum width of the transform block, the current block may be vertically divided to generate a plurality of lower transform blocks. The maximum width of the transform block may be determined based on the maximum size and color format of the transform block of the luma block corresponding to the current block. In this case, the plurality of lower transform blocks may include a first lower transform block and a second lower transform block, and the width of the first lower transform block and the width of the second lower transform block may be determined to be the maximum width of the transform block.

[0328] In addition, if the current block is a chroma block and the height of the transform block is greater than the maximum height of the transform block, the current block may be horizontally divided to generate a plurality of lower transform blocks, and the maximum height of the transform blocks may be determined based on the maximum height of the transform blocks of the luma block corresponding to the current block and a color format. In this case, the plurality of lower transform blocks may include a height of a third lower transform block and a fourth lower transform block, and the height of the third lower transform block and the height of the fourth lower transform block may be determined to be the maximum height of the transform blocks.

[0329] Application examples

[0330] Although the exemplary method of the present disclosure is expressed as a series of operations for clarity of explanation, this is not intended to limit the order in which the steps are performed, and each step may be performed simultaneously or in a different order, if necessary. To realize the method according to the present disclosure, the steps illustrated may include other steps, some steps may be omitted and the remaining steps may be omitted, or some steps may be omitted and additional steps may be included.

[0331] In the present disclosure, an image encoding device or an image decoding device that performs a predetermined operation (step) can perform the operation (step) to check the execution conditions or circumstances of the operation (step). For example, if it is described that a predetermined operation is performed when a predetermined condition is satisfied, the image encoding device or the image decoding device can perform the predetermined operation after performing an operation to check whether the predetermined condition is satisfied or not.

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

[0333] Additionally, various embodiments of the present disclosure may be implemented using hardware, firmware, software, or a combination thereof, etc. In the case of a hardware implementation, the implementation may be implemented using one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general processors, controllers, microcontrollers, microprocessors, etc.

[0334] In addition, the image decoding device and the image encoding device to which the embodiments of the present disclosure are applied may be included in a multimedia broadcast transmitting / receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video conversation device, a real-time communication device such as a video communication, a mobile streaming device, a storage medium, a camcorder, a custom video (VoD) service providing device, an over-the-top video (OTT) device, an internet streaming service providing device, a three-dimensional (3D) video device, an image telephone video device, and a medical video device, and may be used to process a video signal or a data signal. For example, the over-the-top video (OTT) device may include a game console, a Blu-ray player, an internet-connected TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), and the like.

[0335] FIG. 31 is a diagram illustrating a content streaming system to which an embodiment of the present disclosure can be applied.

[0336] As shown in FIG. 31, a content streaming system to which an embodiment of the present disclosure is applied may broadly include an encoding server, a streaming server, a Web server, a media storage, a user device, and a multimedia input device.

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

[0338] The bitstream may be generated by an image encoding method and / or image encoding device to which an embodiment of the present disclosure is applied, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.

[0339] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server can act as a medium to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, and the streaming server can transmit the multimedia data to the user. At this time, the content streaming system can include a separate control server, and in this case, the control server can control commands / responses between devices in the content streaming system.

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

[0341] Examples of the user devices include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices such as smartwatches, smart glass, head mounted displays (HMDs), digital TVs, desktop computers, and digital signage.

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

[0343] The scope of the present disclosure includes software or machine-executable commands (e.g., operating systems, applications, firmware, programs, etc.) that cause operations according to the methods of the various embodiments to be performed on a device or computer, and non-transitory computer-readable medium on which such software or commands can be stored and executed on a device or computer. [Industrial Applicability]

[0344] The embodiments according to the present disclosure can be used to encode / decode images.

Claims

1. An image decoding method performed by an image decoding device, comprising: determining a prediction mode for a current block; obtaining information indicating whether a merge mode is applied to the current block based on the prediction mode of the current block being an intra block copy (IBC) prediction mode; generating a prediction block of the current block based on the obtained information; determining a size of a transformation block of the current block based on color components of the current block; generating a residual block of the current block based on a size of the transformation block; reconstructing the current block based on the predicted block and a residual block of the current block; a maximum width and a maximum height of the transformation block are determined separately based on color components of the current block; the current block is a chroma block, The image decoding method, wherein the transform block is divided into a plurality of lower-level transform blocks, and the upper left position of the lower-level transform block is determined based on a maximum width of the transform block and a maximum height of the transform block.

2. An image encoding method performed by an image encoding device, comprising: Segmenting the image to determine a current block; performing intra block copy (IBC) prediction on the current block to generate a predicted block of the current block; generating a residual block of the current block based on the predicted block; and encoding information indicating whether a merge mode is applied to the current block based on the prediction mode of the current block being an IBC prediction mode; the residual block is encoded based on a size of a transform block of the current block; a size of the transformation block is determined based on color components of the current block; a maximum width and a maximum height of the transformation block are determined separately based on color components of the current block; the current block is a chroma block, A method for encoding an image, wherein the transform block is divided into a plurality of sub-transform blocks, and the upper left position of the sub-transform block is determined based on a maximum width of the transform block and a maximum height of the transform block.

3. A method for transmitting a bitstream generated by an image encoding method, comprising the steps of: The image encoding method includes: Segmenting the image to determine a current block; performing intra block copy (IBC) prediction on the current block to generate a predicted block of the current block; generating a residual block of the current block based on the predicted block; and encoding information indicating whether a merge mode is applied to the current block based on the prediction mode of the current block being an IBC prediction mode; the residual block is encoded based on a size of a transform block of the current block; a size of the transformation block is determined based on color components of the current block; a maximum width and a maximum height of the transformation block are determined separately based on color components of the current block; the current block is a chroma block, A method for transmitting a bitstream, wherein the transform block is divided into a plurality of sub-transform blocks, and an upper left position of the sub-transform block is determined based on a maximum width of the transform block and a maximum height of the transform block.